27 lines
936 B
Plaintext
27 lines
936 B
Plaintext
module sdl3::sdl;
|
|
|
|
typedef TouchID = ulong;
|
|
typedef FingerID = ulong;
|
|
|
|
typedef TouchDeviceType = CInt;
|
|
|
|
const TouchDeviceType TOUCH_DEVICE_INVALID @builtin = -1;
|
|
const TouchDeviceType TOUCH_DEVICE_DIRECT @builtin = 0;
|
|
const TouchDeviceType TOUCH_DEVICE_INDIRECT_ABSOLUTE @builtin = 1;
|
|
const TouchDeviceType TOUCH_DEVICE_INDIRECT_RELATIVE @builtin = 2;
|
|
|
|
struct Finger {
|
|
FingerID id;
|
|
float x;
|
|
float y;
|
|
float pressure;
|
|
}
|
|
|
|
const MouseID TOUCH_MOUSEID @builtin = ((MouseID)-1);
|
|
const TouchID MOUSE_TOUCHID @builtin = ((TouchID)-1);
|
|
|
|
extern fn TouchID* get_touch_devices(int *count) @extern("SDL_GetTouchDevices");
|
|
extern fn ZString get_touch_device_name(TouchID touchID) @extern("SDL_GetTouchDeviceName");
|
|
extern fn TouchDeviceType get_touch_device_type(TouchID touchID) @extern("SDL_GetTouchDeviceType");
|
|
extern fn Finger** get_touch_fingers(TouchID touchID, int *count) @extern("SDL_GetTouchFingers");
|