77}
88
99{ *
10- * # CategoryTouch
11- *
12- * SDL touch management.
10+ * # CategoryTouch
11+ *
12+ * SDL offers touch input, on platforms that support it. It can manage
13+ * multiple touch devices and track multiple fingers on those devices.
14+ *
15+ * Touches are mostly dealt with through the event system, in the
16+ * SDL_EVENT_FINGER_DOWN, SDL_EVENT_FINGER_MOTION, and SDL_EVENT_FINGER_UP
17+ * events, but there are also functions to query for hardware details, etc.
18+ *
19+ * The touch system, by default, will also send virtual mouse events; this can
20+ * be useful for making a some desktop apps work on a phone without
21+ * significant changes. For apps that care about mouse and touch input
22+ * separately, they should ignore mouse events that have a `which` field of
23+ * SDL_TOUCH_MOUSEID.
1324 }
1425
26+ {
27+ * A unique ID for a touch device.
28+ *
29+ * This ID is valid for the time the device is connected to the system, and is
30+ * never reused for the lifetime of the application.
31+ *
32+ * The value 0 is an invalid ID.
33+ *
34+ * \since This datatype is available since SDL 3.2.0.
35+ }
1536type
1637 PPSDL_TouchID = ^PSDL_TouchID;
1738 PSDL_TouchID = ^TSDL_TouchID;
1839 TSDL_TouchID = cuint64;
1940
41+ {
42+ * A unique ID for a single finger on a touch device.
43+ *
44+ * This ID is valid for the time the finger (stylus, etc) is touching and will
45+ * be unique for all fingers currently in contact, so this ID tracks the
46+ * lifetime of a single continuous touch. This value may represent an index, a
47+ * pointer, or some other unique ID, depending on the platform.
48+ *
49+ * The value 0 is an invalid ID.
50+ *
51+ * \since This datatype is available since SDL 3.2.0.
52+ }
53+ type
2054 PPSDL_FingerID = ^PSDL_FingerID;
2155 PSDL_FingerID = ^TSDL_FingerID;
2256 TSDL_FingerID = cuint64;
2357
58+ {
59+ * An enum that describes the type of a touch device.
60+ *
61+ * \since This enum is available since SDL 3.2.0.
62+ }
2463type
2564 PPSDL_TouchDeviceType = ^PSDL_TouchDeviceType;
2665 PSDL_TouchDeviceType = ^TSDL_TouchDeviceType;
3877 * contact with the touch device (so a "touch" can be a "multitouch," in
3978 * reality), and this struct reports details of the specific fingers.
4079 *
41- * \since This struct is available since SDL 3.1.3 .
80+ * \since This struct is available since SDL 3.2.0 .
4281 *
4382 * \sa SDL_GetTouchFingers
4483 }
5392 end ;
5493
5594{ #todo : SDL3-for-Pascal: Translate macro }
56- { Used as the device ID for mouse events simulated with touch input }
95+ {
96+ * The SDL_MouseID for mouse events simulated with touch input.
97+ *
98+ * \since This macro is available since SDL 3.2.0.
99+ }
57100{ #define SDL_TOUCH_MOUSEID ((SDL_MouseID)-1) }
58101
59102{ #todo : SDL3-for-Pascal: Translate macro }
60- { Used as the SDL_TouchID for touch events simulated with mouse input }
103+ {
104+ * The SDL_TouchID for touch events simulated with mouse input.
105+ *
106+ * \since This macro is available since SDL 3.2.0.
107+ }
61108{ #define SDL_MOUSE_TOUCHID ((SDL_TouchID)-1) }
62109
63110{ *
73120 * SDL_GetError() for more information. This should be freed with
74121 * SDL_free() when it is no longer needed.
75122 *
76- * \since This function is available since SDL 3.1.3 .
123+ * \since This function is available since SDL 3.2.0 .
77124 }
78125function SDL_GetTouchDevices (count: pcint): PSDL_TouchID; cdecl;
79126 external SDL_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _SDL_GetTouchDevices' { $ENDIF} { $ENDIF} ;
@@ -85,7 +132,7 @@ function SDL_GetTouchDevices(count: pcint): PSDL_TouchID; cdecl;
85132 * \returns touch device name, or nil on failure; call SDL_GetError() for
86133 * more information.
87134 *
88- * \since This function is available since SDL 3.1.3 .
135+ * \since This function is available since SDL 3.2.0 .
89136 }
90137function SDL_GetTouchDeviceName (touchID: TSDL_TouchID): PAnsiChar; cdecl;
91138 external SDL_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _SDL_GetTouchDeviceName' { $ENDIF} { $ENDIF} ;
@@ -96,7 +143,7 @@ function SDL_GetTouchDeviceName(touchID: TSDL_TouchID): PAnsiChar; cdecl;
96143 * \param touchID the ID of a touch device.
97144 * \returns touch device type.
98145 *
99- * \since This function is available since SDL 3.1.3 .
146+ * \since This function is available since SDL 3.2.0 .
100147 }
101148function SDL_GetTouchDeviceType (touchID: TSDL_TouchID): TSDL_TouchDeviceType; cdecl;
102149 external SDL_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _SDL_GetTouchDeviceType' { $ENDIF} { $ENDIF} ;
@@ -112,7 +159,7 @@ function SDL_GetTouchDeviceType(touchID: TSDL_TouchID): TSDL_TouchDeviceType; cd
112159 * allocation that should be freed with SDL_free() when it is no
113160 * longer needed.
114161 *
115- * \since This function is available since SDL 3.1.3 .
162+ * \since This function is available since SDL 3.2.0 .
116163 }
117164function SDL_GetTouchFingers (touchID: TSDL_TouchID; count: pcint):PPSDL_Finger; cdecl;
118165 external SDL_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _SDL_GetTouchFingers' { $ENDIF} { $ENDIF} ;
0 commit comments