Skip to content

Commit f6e7ace

Browse files
Merge pull request #113 from Free-Pascal-meets-SDL-Website/update-sdlgesture
Update sdlgesture.inc to version 2.26.2
2 parents e37c674 + 5f655c2 commit f6e7ace

File tree

2 files changed

+58
-23
lines changed

2 files changed

+58
-23
lines changed

units/sdl2.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ interface
190190
{$I sdlhaptic.inc}
191191
{$I sdlhidapi.inc} // 2.0.18
192192
{$I sdltouch.inc} // 2.24.0
193-
{$I sdlgesture.inc}
193+
{$I sdlgesture.inc} // 2.26.2
194194
{$I sdlsyswm.inc}
195195
{$I sdlevents.inc} // 2.24.0
196196
{$I sdllocale.inc} // 2.0.14

units/sdlgesture.inc

+57-22
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,70 @@
11
//from "sdl_gesture.h"
22

33
type
4-
TSDL_GestureID = cint64;
4+
TSDL_GestureID = type cint64;
55

66
{* Function prototypes *}
77

8-
{**
9-
* Begin Recording a gesture on the specified touch, or all touches (-1)
10-
*
11-
*
12-
*}
13-
function SDL_RecordGesture(touchId: TSDL_TouchID): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RecordGesture' {$ENDIF} {$ENDIF};
8+
{/**
9+
* Begin recording a gesture on a specified touch device or all touch devices.
10+
*
11+
* If the parameter `touchId` is -1 (i.e., all devices), this function will
12+
* always return 1, regardless of whether there actually are any devices.
13+
*
14+
* \param touchId the touch device id, or -1 for all touch devices
15+
* \returns 1 on success or 0 if the specified device could not be found.
16+
*
17+
* \since This function is available since SDL 2.0.0.
18+
*
19+
* \sa SDL_GetTouchDevice
20+
*}
21+
function SDL_RecordGesture(touchId: TSDL_TouchID): cint; cdecl;
22+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RecordGesture' {$ENDIF} {$ENDIF};
1423
1524
{**
16-
* Save all currently loaded Dollar Gesture templates
17-
*
18-
*
19-
*}
20-
function SDL_SaveAllDollarTemplates(src: PSDL_RWops): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SaveAllDollarTemplates' {$ENDIF} {$ENDIF};
25+
* Save all currently loaded Dollar Gesture templates.
26+
*
27+
* \param dst a SDL_RWops to save to
28+
* \returns the number of saved templates on success or 0 on failure; call
29+
* SDL_GetError() for more information.
30+
*
31+
* \since This function is available since SDL 2.0.0.
32+
*
33+
* \sa SDL_LoadDollarTemplates
34+
* \sa SDL_SaveDollarTemplate
35+
*}
36+
function SDL_SaveAllDollarTemplates(dst: PSDL_RWops): cint; cdecl;
37+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SaveAllDollarTemplates' {$ENDIF} {$ENDIF};
2138
2239
{**
23-
* Save a currently loaded Dollar Gesture template
24-
*
25-
*
26-
*}
27-
function SDL_SaveDollarTemplate(gestureId: TSDL_GestureID; src: PSDL_RWops): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SaveDollarTemplate' {$ENDIF} {$ENDIF};
40+
* Save a currently loaded Dollar Gesture template.
41+
*
42+
* \param gestureId a gesture id
43+
* \param dst a SDL_RWops to save to
44+
* \returns 1 on success or 0 on failure; call SDL_GetError() for more
45+
* information.
46+
*
47+
* \since This function is available since SDL 2.0.0.
48+
*
49+
* \sa SDL_LoadDollarTemplates
50+
* \sa SDL_SaveAllDollarTemplates
51+
*}
52+
function SDL_SaveDollarTemplate(gestureId: TSDL_GestureID; dst: PSDL_RWops): cint; cdecl;
53+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SaveDollarTemplate' {$ENDIF} {$ENDIF};
2854
2955
3056
{**
31-
* Load Dollar Gesture templates from a file
32-
*
33-
*
34-
*}
35-
function SDL_LoadDollarTemplates(touchId: TSDL_TouchID; src: PSDL_RWops): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LoadDollarTemplates' {$ENDIF} {$ENDIF};
57+
* Load Dollar Gesture templates from a file.
58+
*
59+
* \param touchId a touch id
60+
* \param src a SDL_RWops to load from
61+
* \returns the number of loaded templates on success or a negative error code
62+
* (or 0) on failure; call SDL_GetError() for more information.
63+
*
64+
* \since This function is available since SDL 2.0.0.
65+
*
66+
* \sa SDL_SaveAllDollarTemplates
67+
* \sa SDL_SaveDollarTemplate
68+
*}
69+
function SDL_LoadDollarTemplates(touchId: TSDL_TouchID; src: PSDL_RWops): cint; cdecl;
70+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LoadDollarTemplates' {$ENDIF} {$ENDIF};

0 commit comments

Comments
 (0)