summaryrefslogtreecommitdiff
path: root/src/gui/macos_trackpad.h
blob: f5266084ddd8384e249d08caba160a2ea6cfbf7e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef PARDES_MACOS_TRACKPAD_H
#define PARDES_MACOS_TRACKPAD_H
#include <SDL3/SDL.h>

enum { UI_TRACKPAD_FINGERS = 1, UI_TRACKPAD_PRESSURE, UI_TRACKPAD_ROTATE,
       UI_TRACKPAD_PINCH, UI_TRACKPAD_SCROLL, UI_TRACKPAD_HISTORY };
/* Same prefix as SDL_UserEvent; the rest lives inside SDL_Event's storage. */
typedef struct {
    Uint32 type, reserved;
    Uint64 timestamp;
    SDL_WindowID windowID;
    int kind;
    float x, y, a, b;
    Uint32 phase;
    int fingers;
} UITrackpadEvent;

Uint32 ui_macos_trackpad_event_type(void);
void ui_macos_trackpad_attach(SDL_Window *window);
void ui_macos_trackpad_haptic(void);
#endif