-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathsdltouch.inc
43 lines (33 loc) · 1.38 KB
/
sdltouch.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//from "sdl_touch.h"
type
PSDL_TouchID = ^TSDL_TouchID;
TSDL_TouchID = type SInt64;
PSDL_FingerID = ^TSDL_FingerID;
TSDL_FingerID = type SInt64;
PSDL_Finger = ^TSDL_Finger;
TSDL_Finger = record
id: TSDL_FingerID;
x: Float;
y: Float;
pressure: Float;
end;
{* Used as the device ID for mouse events simulated with touch input *}
const
SDL_TOUCH_MOUSEID = UInt32(-1);
{* Function prototypes *}
{**
* Get the number of registered touch devices.
*}
function SDL_GetNumTouchDevices: SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumTouchDevices' {$ENDIF} {$ENDIF};
{**
* Get the touch ID with the given index, or 0 if the index is invalid.
*}
function SDL_GetTouchDevice(index: SInt32): TSDL_TouchID cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTouchDevice' {$ENDIF} {$ENDIF};
{**
* Get the number of active fingers for a given touch device.
*}
function SDL_GetNumTouchFingers(touchID: TSDL_TouchID): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumTouchFingers' {$ENDIF} {$ENDIF};
{**
* Get the finger object of the given touch, with the given index.
*}
function SDL_GetTouchFinger(touchID: TSDL_TouchID; index: SInt32): PSDL_Finger cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTouchFinger' {$ENDIF} {$ENDIF};