Skip to content

Commit e54ab86

Browse files
ADD: fix more comment positions
1 parent 1de09d4 commit e54ab86

File tree

10 files changed

+292
-349
lines changed

10 files changed

+292
-349
lines changed

units/runtime/sdlclipboard.inc

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
{* Function prototypes *}
99

10+
type
11+
TSDL_SetClipboardText_func = function(text: PAnsiChar): cint; cdecl;
12+
var
1013
{*
1114
* Put UTF-8 text into the clipboard.
1215
*
@@ -19,12 +22,12 @@
1922
* \sa SDL_GetClipboardText
2023
* \sa SDL_HasClipboardText
2124
}
22-
type
23-
TSDL_SetClipboardText_func = function(text: PAnsiChar): cint; cdecl;
24-
var
2525
SDL_SetClipboardText : TSDL_SetClipboardText_func = Nil;
2626

2727

28+
type
29+
TSDL_GetClipboardText_func = function(): PAnsiChar; cdecl;
30+
var
2831
{*
2932
* Get UTF-8 text from the clipboard, which must be freed with SDL_free().
3033
*
@@ -41,12 +44,12 @@ var
4144
* \sa SDL_HasClipboardText
4245
* \sa SDL_SetClipboardText
4346
}
44-
type
45-
TSDL_GetClipboardText_func = function(): PAnsiChar; cdecl;
46-
var
4747
SDL_GetClipboardText : TSDL_GetClipboardText_func = Nil;
4848

4949

50+
type
51+
TSDL_HasClipboardText_func = function(): TSDL_bool; cdecl;
52+
var
5053
{*
5154
* Query whether the clipboard exists and contains a non-empty text string.
5255
*
@@ -57,12 +60,12 @@ var
5760
* \sa SDL_GetClipboardText
5861
* \sa SDL_SetClipboardText
5962
}
60-
type
61-
TSDL_HasClipboardText_func = function(): TSDL_bool; cdecl;
62-
var
6363
SDL_HasClipboardText : TSDL_HasClipboardText_func = Nil;
6464

6565

66+
type
67+
TSDL_SetPrimarySelectionText_func = function(text: PAnsiChar): cint; cdecl;
68+
var
6669
{*
6770
* Put UTF-8 text into the primary selection.
6871
*
@@ -75,12 +78,12 @@ var
7578
* \sa SDL_GetPrimarySelectionText
7679
* \sa SDL_HasPrimarySelectionText
7780
}
78-
type
79-
TSDL_SetPrimarySelectionText_func = function(text: PAnsiChar): cint; cdecl;
80-
var
8181
SDL_SetPrimarySelectionText : TSDL_SetPrimarySelectionText_func = Nil;
8282

8383

84+
type
85+
TSDL_GetPrimarySelectionText_func = function(): PAnsiChar; cdecl;
86+
var
8487
{*
8588
* Get UTF-8 text from the primary selection, which must be freed with
8689
* SDL_free().
@@ -98,12 +101,12 @@ var
98101
* \sa SDL_HasPrimarySelectionText
99102
* \sa SDL_SetPrimarySelectionText
100103
}
101-
type
102-
TSDL_GetPrimarySelectionText_func = function(): PAnsiChar; cdecl;
103-
var
104104
SDL_GetPrimarySelectionText : TSDL_GetPrimarySelectionText_func = Nil;
105105

106106

107+
type
108+
TSDL_HasPrimarySelectionText_func = function(): TSDL_bool; cdecl;
109+
var
107110
{*
108111
* Query whether the primary selection exists and contains a non-empty text
109112
* string.
@@ -116,8 +119,5 @@ var
116119
* \sa SDL_GetPrimarySelectionText
117120
* \sa SDL_SetPrimarySelectionText
118121
}
119-
type
120-
TSDL_HasPrimarySelectionText_func = function(): TSDL_bool; cdecl;
121-
var
122122
SDL_HasPrimarySelectionText : TSDL_HasPrimarySelectionText_func = Nil;
123123

units/runtime/sdlevents.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,9 @@ type
727727
procedure SDL_FlushEvent(type_: TSDL_EventType) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FlushEvent' {$ENDIF} {$ENDIF};
728728
procedure SDL_FlushEvents(minType, maxType: TSDL_EventType) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FlushEvents' {$ENDIF} {$ENDIF};
729729

730+
type
731+
TSDL_PollEvent_func = function (event: PSDL_Event): cint32 cdecl;
732+
Var
730733
{**
731734
* Polls for currently pending events.
732735
*
@@ -735,9 +738,6 @@ type
735738
* event - If not nil, the next event is removed from the queue and
736739
* stored in that area.
737740
*}
738-
type
739-
TSDL_PollEvent_func = function (event: PSDL_Event): cint32 cdecl;
740-
Var
741741
SDL_PollEvent : TSDL_PollEvent_func = Nil;
742742

743743
{**

units/runtime/sdlgamecontroller.inc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,15 @@ var
628628
SDL_GameControllerGetSensorData : TSDL_GameControllerGetSensorData_func = Nil;
629629

630630

631+
Type
632+
TSDL_GameControllerGetSensorDataWithTimestamp_func = function(
633+
gamecontroller: PSDL_GameController;
634+
senstype: TSDL_SensorType;
635+
timestamp: pcuint64;
636+
data: pcfloat;
637+
num_values: cint
638+
): cint; cdecl;
639+
var
631640
{**
632641
* Get the current state of a game controller sensor with the timestamp of the
633642
* last update.
@@ -645,15 +654,6 @@ var
645654
*
646655
* \since This function is available since SDL 2.26.0.
647656
*}
648-
Type
649-
TSDL_GameControllerGetSensorDataWithTimestamp_func = function(
650-
gamecontroller: PSDL_GameController;
651-
senstype: TSDL_SensorType;
652-
timestamp: pcuint64;
653-
data: pcfloat;
654-
num_values: cint
655-
): cint; cdecl;
656-
var
657657
SDL_GameControllerGetSensorDataWithTimestamp : TSDL_GameControllerGetSensorDataWithTimestamp_func = Nil;
658658

659659
type

units/runtime/sdlgesture.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ type
77

88
{* Function prototypes *}
99

10+
type
11+
TSDL_RecordGesture_func = function(touchId: TSDL_TouchID): cint; cdecl;
12+
var
1013
{/**
1114
* Begin recording a gesture on a specified touch device or all touch devices.
1215
*
@@ -20,9 +23,6 @@ type
2023
*
2124
* \sa SDL_GetTouchDevice
2225
*}
23-
type
24-
TSDL_RecordGesture_func = function(touchId: TSDL_TouchID): cint; cdecl;
25-
var
2626
SDL_RecordGesture : TSDL_RecordGesture_func = Nil;
2727
2828

units/runtime/sdlhints.inc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2406,6 +2406,9 @@ const
24062406
SDL_HINT_NORMAL = TSDL_HintPriority(1);
24072407
SDL_HINT_OVERRIDE = TSDL_HintPriority(2);
24082408

2409+
type
2410+
TSDL_SetHintWithPriority_func = function(const name: PAnsiChar; const value: PAnsiChar; priority: TSDL_HintPriority): TSDL_Bool; cdecl;
2411+
var
24092412
{/**
24102413
* \brief Set a hint with a specific priority
24112414
*
@@ -2415,20 +2418,17 @@ const
24152418
*
24162419
* \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
24172420
*/}
2418-
type
2419-
TSDL_SetHintWithPriority_func = function(const name: PAnsiChar; const value: PAnsiChar; priority: TSDL_HintPriority): TSDL_Bool; cdecl;
2420-
var
24212421
SDL_SetHintWithPriority : TSDL_SetHintWithPriority_func = Nil;
24222422

24232423

2424+
type
2425+
TSDL_SetHint_func = function(const name: PAnsiChar; const value: PAnsiChar): TSDL_Bool; cdecl;
2426+
var
24242427
{/**
24252428
* \brief Set a hint with normal priority
24262429
*
24272430
* \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
24282431
*/}
2429-
type
2430-
TSDL_SetHint_func = function(const name: PAnsiChar; const value: PAnsiChar): TSDL_Bool; cdecl;
2431-
var
24322432
SDL_SetHint : TSDL_SetHint_func = Nil;
24332433

24342434

@@ -2469,25 +2469,25 @@ var
24692469
SDL_ResetHints : TSDL_ResetHints_proc = Nil;
24702470

24712471

2472+
type
2473+
TSDL_GetHint_func = function(const name: PAnsiChar): PAnsiChar; cdecl;
2474+
var
24722475
{/**
24732476
* \brief Get a hint
24742477
*
24752478
* \return The string value of a hint variable.
24762479
*/}
2477-
type
2478-
TSDL_GetHint_func = function(const name: PAnsiChar): PAnsiChar; cdecl;
2479-
var
24802480
SDL_GetHint : TSDL_GetHint_func = Nil;
24812481

24822482

2483+
type
2484+
TSDL_GetHintBoolean_func = function(const name: PAnsiChar; default_value: TSDL_Bool): TSDL_Bool; cdecl;
2485+
var
24832486
{/**
24842487
* \brief Get a hint
24852488
*
24862489
* \return The boolean value of a hint variable.
24872490
*/}
2488-
type
2489-
TSDL_GetHintBoolean_func = function(const name: PAnsiChar; default_value: TSDL_Bool): TSDL_Bool; cdecl;
2490-
var
24912491
SDL_GetHintBoolean : TSDL_GetHintBoolean_func = Nil;
24922492

24932493

@@ -2509,16 +2509,16 @@ var
25092509
SDL_AddHintCallback : TSDL_AddHintCallback_proc = Nil;
25102510

25112511

2512+
type
2513+
TSDL_DelHintCallback_proc = procedure(const name: PAnsiChar; callback: TSDL_HintCallback; userdata: Pointer); cdecl;
2514+
var
25122515
{/**
25132516
* \brief Remove a function watching a particular hint
25142517
*
25152518
* \param name The hint being watched
25162519
* \param callback The function being called when the hint value changes
25172520
* \param userdata A pointer being passed to the callback function
25182521
*/}
2519-
type
2520-
TSDL_DelHintCallback_proc = procedure(const name: PAnsiChar; callback: TSDL_HintCallback; userdata: Pointer); cdecl;
2521-
var
25222522
SDL_DelHintCallback : TSDL_DelHintCallback_proc = Nil;
25232523

25242524

units/runtime/sdljoystick.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,16 +421,16 @@ type
421421
const
422422
SDL_VIRTUAL_JOYSTICK_DESC_VERSION = 1;
423423

424+
type
425+
TSDL_JoystickAttachVirtualEx_func = function(const desc: PSDL_VirtualJoystickDesc): cint; cdecl;
426+
var
424427
{/**
425428
* Attach a new virtual joystick with extended properties.
426429
*
427430
* \returns the joystick's device index, or -1 if an error occurred.
428431
*
429432
* \since This function is available since SDL 2.24.0.
430433
*/}
431-
type
432-
TSDL_JoystickAttachVirtualEx_func = function(const desc: PSDL_VirtualJoystickDesc): cint; cdecl;
433-
var
434434
SDL_JoystickAttachVirtualEx : TSDL_JoystickAttachVirtualEx_func = Nil;
435435

436436

0 commit comments

Comments
 (0)