Skip to content

Commit 6070019

Browse files
Add UNFINISHED inc files for SDL_events.inc to run
1 parent 17a6a0a commit 6070019

File tree

10 files changed

+229
-0
lines changed

10 files changed

+229
-0
lines changed

units/SDL_audio.inc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{*
2+
* SDL Audio Device instance IDs.
3+
*
4+
* Zero is used to signify an invalid/null device.
5+
*
6+
* \since This datatype is available since SDL 3.1.3.
7+
}
8+
type
9+
PPSDL_AudioDeviceID = ^PSDL_AudioDeviceID;
10+
PSDL_AudioDeviceID = ^TSDL_AudioDeviceID;
11+
TSDL_AudioDeviceID = cuint32;
12+

units/SDL_camera.inc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{*
2+
* This is a unique ID for a camera device for the time it is connected to the
3+
* system, and is never reused for the lifetime of the application.
4+
*
5+
* If the device is disconnected and reconnected, it will get a new ID.
6+
*
7+
* The value 0 is an invalid ID.
8+
*
9+
* \since This datatype is available since SDL 3.1.3.
10+
*
11+
* \sa SDL_GetCameras
12+
}
13+
type
14+
PPSDL_CameraID = ^PSDL_CameraID;
15+
PSDL_CameraID = ^TSDL_CameraID;
16+
TSDL_CameraID = cuint32;
17+

units/SDL_joystick.inc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{*
2+
* This is a unique ID for a joystick for the time it is connected to the
3+
* system, and is never reused for the lifetime of the application.
4+
*
5+
* If the joystick is disconnected and reconnected, it will get a new ID.
6+
*
7+
* The value 0 is an invalid ID.
8+
*
9+
* \since This datatype is available since SDL 3.1.3.
10+
}
11+
type
12+
PPSDL_JoystickID = ^PSDL_JoystickID;
13+
PSDL_JoystickID = ^TSDL_JoystickID;
14+
TSDL_JoystickID = cuint32;
15+

units/SDL_keyboard.inc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{*
2+
* This is a unique ID for a keyboard for the time it is connected to the
3+
* system, and is never reused for the lifetime of the application.
4+
*
5+
* If the keyboard is disconnected and reconnected, it will get a new ID.
6+
*
7+
* The value 0 is an invalid ID.
8+
*
9+
* \since This datatype is available since SDL 3.1.3.
10+
}
11+
type
12+
PPSDL_KeyboardID = ^PSDL_KeyboardID;
13+
PSDL_KeyboardID = ^TSDL_KeyboardID;
14+
TSDL_KeyboardID = cuint32;
15+

units/SDL_keycode.inc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{*
2+
* The SDL virtual key representation.
3+
*
4+
* Values of this type are used to represent keyboard keys using the current
5+
* layout of the keyboard. These values include Unicode values representing
6+
* the unmodified character that would be generated by pressing the key, or an
7+
* `SDLK_*` constant for those keys that do not generate characters.
8+
*
9+
* A special exception is the number keys at the top of the keyboard which map
10+
* to SDLK_0...SDLK_9 on AZERTY layouts.
11+
*
12+
* \since This datatype is available since SDL 3.1.3.
13+
}
14+
type
15+
PPSDL_Keycode = ^PSDL_Keycode;
16+
PSDL_Keycode = ^TSDL_Keycode;
17+
TSDL_Keycode = cuint32;
18+
19+
{*
20+
* Valid key modifiers (possibly OR'd together).
21+
*
22+
* \since This datatype is available since SDL 3.1.3.
23+
}
24+
type
25+
PPSDL_Keymod = ^PSDL_Keymod;
26+
PSDL_Keymod = ^TSDL_Keymod;
27+
TSDL_Keymod = cuint16;
28+

units/SDL_mouse.inc

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{*
2+
* This is a unique ID for a mouse for the time it is connected to the system,
3+
* and is never reused for the lifetime of the application.
4+
*
5+
* If the mouse is disconnected and reconnected, it will get a new ID.
6+
*
7+
* The value 0 is an invalid ID.
8+
*
9+
* \since This datatype is available since SDL 3.1.3.
10+
}
11+
type
12+
PPSDL_MouseID = ^PSDL_MouseID;
13+
PSDL_MouseID = ^TSDL_MouseID;
14+
TSDL_MouseID = cuint32;
15+
16+
{*
17+
* Scroll direction types for the Scroll event
18+
*
19+
* \since This enum is available since SDL 3.1.3.
20+
}
21+
type
22+
PPSDL_MouseWheelDirection = ^PSDL_MouseWheelDirection;
23+
PSDL_MouseWheelDirection = ^TSDL_MouseWheelDirection;
24+
TSDL_MouseWheelDirection = Integer;
25+
const
26+
SDL_MOUSEWHEEL_NORMAL = TSDL_MouseWheelDirection(0); {*< The scroll direction is normal }
27+
SDL_MOUSEWHEEL_FLIPPED = TSDL_MouseWheelDirection(1); {*< The scroll direction is flipped / natural }
28+
29+
{*
30+
* A bitmask of pressed mouse buttons, as reported by SDL_GetMouseState, etc.
31+
*
32+
* - Button 1: Left mouse button
33+
* - Button 2: Middle mouse button
34+
* - Button 3: Right mouse button
35+
* - Button 4: Side mouse button 1
36+
* - Button 5: Side mouse button 2
37+
*
38+
* \since This datatype is available since SDL 3.1.3.
39+
*
40+
* \sa SDL_GetMouseState
41+
* \sa SDL_GetGlobalMouseState
42+
* \sa SDL_GetRelativeMouseState
43+
}
44+
type
45+
PPSDL_MouseButtonFlags = ^PSDL_MouseButtonFlags;
46+
PSDL_MouseButtonFlags = ^TSDL_MouseButtonFlags;
47+
TSDL_MouseButtonFlags = cuint32;

units/SDL_pen.inc

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{*
2+
* SDL pen instance IDs.
3+
*
4+
* Zero is used to signify an invalid/null device.
5+
*
6+
* These show up in pen events when SDL sees input from them. They remain
7+
* consistent as long as SDL can recognize a tool to be the same pen; but if a
8+
* pen physically leaves the area and returns, it might get a new ID.
9+
*
10+
* \since This datatype is available since SDL 3.1.3.
11+
}
12+
type
13+
PPSDL_PenID = ^PSDL_PenID;
14+
PSDL_PenID = ^TSDL_PenID;
15+
TSDL_PenID = cuint32;
16+
{*
17+
* Pen input flags, as reported by various pen events' `pen_state` field.
18+
*
19+
* \since This datatype is available since SDL 3.1.3.
20+
}
21+
PPSDL_PenInputFlags = ^PSDL_PenInputFlags;
22+
PSDL_PenInputFlags = ^TSDL_PenInputFlags;
23+
TSDL_PenInputFlags = cuint32;
24+
25+
{*
26+
* Pen axis indices.
27+
*
28+
* These are the valid values for the `axis` field in SDL_PenAxisEvent. All
29+
* axes are either normalised to 0..1 or report a (positive or negative) angle
30+
* in degrees, with 0.0 representing the centre. Not all pens/backends support
31+
* all axes: unsupported axes are always zero.
32+
*
33+
* To convert angles for tilt and rotation into vector representation, use
34+
* SDL_sinf on the XTILT, YTILT, or ROTATION component, for example:
35+
*
36+
* `SDL_sinf(xtilt * SDL_PI_F / 180.0)`.
37+
*
38+
* \since This enum is available since SDL 3.1.3
39+
}
40+
type
41+
PPSDL_PenAxis = ^PSDL_PenAxis;
42+
PSDL_PenAxis = ^TSDL_PenAxis;
43+
TSDL_PenAxis = type Integer;
44+
const
45+
SDL_PEN_AXIS_PRESSURE = TSDL_PenAxis(0); {*< Pen pressure. Unidirectional: 0 to 1.0 }
46+
SDL_PEN_AXIS_XTILT = TSDL_PenAxis(1); {*< Pen horizontal tilt angle. Bidirectional: -90.0 to 90.0 (left-to-right). }
47+
SDL_PEN_AXIS_YTILT = TSDL_PenAxis(2); {*< Pen vertical tilt angle. Bidirectional: -90.0 to 90.0 (top-to-down). }
48+
SDL_PEN_AXIS_DISTANCE = TSDL_PenAxis(3); {*< Pen distance to drawing surface. Unidirectional: 0.0 to 1.0 }
49+
SDL_PEN_AXIS_ROTATION = TSDL_PenAxis(4); {*< Pen barrel rotation. Bidirectional: -180 to 179.9 (clockwise, 0 is facing up, -180.0 is facing down). }
50+
SDL_PEN_AXIS_SLIDER = TSDL_PenAxis(5); {*< Pen finger wheel or slider (e.g., Airbrush Pen). Unidirectional: 0 to 1.0 }
51+
SDL_PEN_AXIS_TANGENTIAL_PRESSURE = TSDL_PenAxis(6); {*< Pressure from squeezing the pen ("barrel pressure"). }
52+
SDL_PEN_AXIS_COUNT = TSDL_PenAxis(7); {*< Total known pen axis types in this version of SDL. This number may grow in future releases! }
53+

units/SDL_scancode.inc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{** The SDL keyboard scancode representation.
2+
*
3+
* An SDL scancode is the physical representation of a key on the keyboard,
4+
* independent of language and keyboard mapping.
5+
*
6+
* Values of this type are used to represent keyboard keys, among other places
7+
* in the `scancode` field of the SDL_KeyboardEvent structure.
8+
*
9+
* The values in this enumeration are based on the USB usage page standard:
10+
* https://usb.org/sites/default/files/hut1_5.pdf
11+
*
12+
* \since This enum is available since SDL 3.1.3.
13+
}
14+
type
15+
PPSDL_Scancode = ^PSDL_Scancode;
16+
PSDL_Scancode = ^TSDL_Scancode;
17+
TSDL_Scancode = Integer;
18+
const
19+
SDL_SCANCODE_UNKNOWN = 0;
20+

units/SDL_sensor.inc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{*
2+
* This is a unique ID for a sensor for the time it is connected to the
3+
* system, and is never reused for the lifetime of the application.
4+
*
5+
* The value 0 is an invalid ID.
6+
*
7+
* \since This datatype is available since SDL 3.1.3.
8+
}
9+
type
10+
PPSDL_SensorID = ^PSDL_SensorID;
11+
PSDL_SensorID = ^TSDL_SensorID;
12+
TSDL_SensorID = cuint32;
13+

units/SDL_touch.inc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
type
2+
PPSDL_TouchID = ^PSDL_TouchID;
3+
PSDL_TouchID = ^TSDL_TouchID;
4+
TSDL_TouchID = cuint64;
5+
6+
PPSDL_FingerID = ^PSDL_FingerID;
7+
PSDL_FingerID = ^TSDL_FingerID;
8+
TSDL_FingerID = cuint64;
9+

0 commit comments

Comments
 (0)