sdl2-bindings 0.1.4 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd77fceb8ffd1049445bd935e70a4f195c7a5a226b31935e245a16ef1a92f02b
4
- data.tar.gz: 30c35f832b5601403101ba55ca38d65b68c1861a458f2fbf3bff09c5f5d27e8a
3
+ metadata.gz: 1ff45dc869d3e6b6580a58bc614aa46ee16ec4731dc2e0f2f23dac2b15d4f330
4
+ data.tar.gz: ac4785455d17d1089d9092f07c81db507cab2802a98339cea60b8e874ba766cf
5
5
  SHA512:
6
- metadata.gz: 50865f79869188cf34ed0cd4a6fa16b08413fb7270afad386fa6c70ad67f665594d10eb084387c5068b0c0e8fde0b9fdb97f2610b44e98d8a1248daa6144f4f5
7
- data.tar.gz: ce21fba9684e64d286e83b7cfd8185678331d3c864ded0c3a0fc7cc1214b21b7270f1b6a96889e90a4d8ca38ffea978a7b9c25cf9cf5c1b5a753b2f4b4d0ecea
6
+ metadata.gz: 27ed6da2b7a9bccac8fa1662104108cafff1b300a20aab006af30a72d93350ec7c7946e8a553612a46cb15fb62b69ff5acad7b9edd4f1a80d3152fcae02984ff
7
+ data.tar.gz: 361e671205aebb5714bbec11b627ec88f4efb17795d7a61353eba7602fbd7c623b3c6e91658df0512c395f7a8c523e015e6984435abad7ef8504091aa75b100e
data/ChangeLog CHANGED
@@ -1,3 +1,12 @@
1
+ 2022-11-23 vaiorabbit <http://twitter.com/vaiorabbit>
2
+
3
+ * SDL 2.26.0 ( https://github.com/libsdl-org/SDL/releases/tag/release-2.26.0 )
4
+
5
+ 2022-10-09 vaiorabbit <http://twitter.com/vaiorabbit>
6
+
7
+ * SDL 2.24.1 ( https://github.com/libsdl-org/SDL/releases/tag/release-2.24.1 )
8
+ * Fixed wrong value definitions
9
+
1
10
  2022-08-20 vaiorabbit <http://twitter.com/vaiorabbit>
2
11
 
3
12
  * SDL 2.24.0 ( https://github.com/libsdl-org/SDL/releases/tag/release-2.24.0 )
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  # sdl2-bindings : Yet another SDL2 wrapper for Ruby #
4
4
 
5
5
  * Created : 2015-09-19
6
- * Last modified : 2022-08-20
6
+ * Last modified : 2022-11-23
7
7
 
8
8
  ## Features ##
9
9
 
@@ -11,14 +11,20 @@
11
11
  * Based on Ruby/FFI
12
12
  * No need to build C extension library
13
13
 
14
+ See the project below to learn how to use this library:
15
+
16
+ * Whac-a-Mole! : Ruby SDL2 bindings demo
17
+ * <https://github.com/vaiorabbit/sdl2-bindings-whacamole>
18
+ * [![](http://img.youtube.com/vi/HroP-_EWcg8/mqdefault.jpg)](https://www.youtube.com/watch?v=HroP-_EWcg8)
19
+
14
20
  ## Limitations ##
15
21
 
16
22
  * Several original APIs originally defined with pre-processor macro are unavailable in this library (e.g. `SDL_LoadBMP`)
17
23
 
18
24
  ## Target version ##
19
25
 
20
- * [2022-08-20]
21
- * SDL : 2.24.0
26
+ * [2022-11-23]
27
+ * SDL : 2.26.0
22
28
  * SDL_image : 2.6.2
23
29
  * SDL_mixer : 2.6.2
24
30
  * SDL_ttf : 2.20.1
@@ -56,17 +62,40 @@
56
62
  * SDL_ttf : 2.20.0
57
63
  * SDL2_gfx : 1.0.4
58
64
  * SDL_sound : 2.0.1
65
+ * [2022-08-20]
66
+ * SDL : 2.24.0
67
+ * SDL_image : 2.6.2
68
+ * SDL_mixer : 2.6.2
69
+ * SDL_ttf : 2.20.1
70
+ * SDL2_gfx : 1.0.4
71
+ * SDL_sound : 2.0.1
72
+ * [2022-10-09]
73
+ * SDL : 2.24.1
74
+ * SDL_image : 2.6.2
75
+ * SDL_mixer : 2.6.2
76
+ * SDL_ttf : 2.20.1
77
+ * SDL2_gfx : 1.0.4
78
+ * SDL_sound : 2.0.1
79
+ * [2022-11-03]
80
+ * SDL : 2.24.2
81
+ * SDL_image : 2.6.2
82
+ * SDL_mixer : 2.6.2
83
+ * SDL_ttf : 2.20.1
84
+ * SDL2_gfx : 1.0.4
85
+ * SDL_sound : 2.0.1
59
86
 
60
87
  </details>
61
88
 
62
89
  ## Supported Environments ##
63
90
 
64
91
  * [2022-04-29] Windows 10 (21H1), ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x64-mingw-ucrt]
65
- * [2022-07-31] macOS Monterey (12.4), ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin21]
92
+ * [2022-10-09] macOS Monterey (12.5.1), ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
93
+ * [2022-10-09] Debian 11 (bullseye) on ASUS Chromebook Detachable CZ1, ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [aarch64-linux]
66
94
 
67
95
  <details>
68
96
  <summary>Older Environments</summary>
69
97
 
98
+ * [2022-07-31] macOS Monterey (12.4), ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin21]
70
99
  * [2022-02-12] Windows 10 (21H1), ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x64-mingw-ucrt]
71
100
  * [2022-01-11] macOS Monterey (12.1), ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin20]
72
101
  * [2021-12-02] macOS Big Sur (11.6), ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [arm64-darwin20]
@@ -27,21 +27,33 @@ module SDL
27
27
  :SDL_SetClipboardText,
28
28
  :SDL_GetClipboardText,
29
29
  :SDL_HasClipboardText,
30
+ :SDL_SetPrimarySelectionText,
31
+ :SDL_GetPrimarySelectionText,
32
+ :SDL_HasPrimarySelectionText,
30
33
  ]
31
34
  apis = {
32
35
  :SDL_SetClipboardText => :SetClipboardText,
33
36
  :SDL_GetClipboardText => :GetClipboardText,
34
37
  :SDL_HasClipboardText => :HasClipboardText,
38
+ :SDL_SetPrimarySelectionText => :SetPrimarySelectionText,
39
+ :SDL_GetPrimarySelectionText => :GetPrimarySelectionText,
40
+ :SDL_HasPrimarySelectionText => :HasPrimarySelectionText,
35
41
  }
36
42
  args = {
37
43
  :SDL_SetClipboardText => [:pointer],
38
44
  :SDL_GetClipboardText => [],
39
45
  :SDL_HasClipboardText => [],
46
+ :SDL_SetPrimarySelectionText => [:pointer],
47
+ :SDL_GetPrimarySelectionText => [],
48
+ :SDL_HasPrimarySelectionText => [],
40
49
  }
41
50
  retvals = {
42
51
  :SDL_SetClipboardText => :int,
43
52
  :SDL_GetClipboardText => :pointer,
44
53
  :SDL_HasClipboardText => :int,
54
+ :SDL_SetPrimarySelectionText => :int,
55
+ :SDL_GetPrimarySelectionText => :pointer,
56
+ :SDL_HasPrimarySelectionText => :int,
45
57
  }
46
58
  symbols.each do |sym|
47
59
  begin
data/lib/sdl2_events.rb CHANGED
@@ -211,6 +211,8 @@ module SDL
211
211
  :direction, :uint,
212
212
  :preciseX, :float,
213
213
  :preciseY, :float,
214
+ :mouseX, :int,
215
+ :mouseY, :int,
214
216
  )
215
217
  end
216
218
 
@@ -337,6 +339,7 @@ module SDL
337
339
  :which, :int,
338
340
  :sensor, :int,
339
341
  :data, [:float, 3],
342
+ :timestamp_us, :ulong_long,
340
343
  )
341
344
  end
342
345
 
@@ -409,6 +412,7 @@ module SDL
409
412
  :timestamp, :uint,
410
413
  :which, :int,
411
414
  :data, [:float, 6],
415
+ :timestamp_us, :ulong_long,
412
416
  )
413
417
  end
414
418
 
@@ -147,6 +147,7 @@ module SDL
147
147
  :SDL_GameControllerIsSensorEnabled,
148
148
  :SDL_GameControllerGetSensorDataRate,
149
149
  :SDL_GameControllerGetSensorData,
150
+ :SDL_GameControllerGetSensorDataWithTimestamp,
150
151
  :SDL_GameControllerRumble,
151
152
  :SDL_GameControllerRumbleTriggers,
152
153
  :SDL_GameControllerHasLED,
@@ -205,6 +206,7 @@ module SDL
205
206
  :SDL_GameControllerIsSensorEnabled => :GameControllerIsSensorEnabled,
206
207
  :SDL_GameControllerGetSensorDataRate => :GameControllerGetSensorDataRate,
207
208
  :SDL_GameControllerGetSensorData => :GameControllerGetSensorData,
209
+ :SDL_GameControllerGetSensorDataWithTimestamp => :GameControllerGetSensorDataWithTimestamp,
208
210
  :SDL_GameControllerRumble => :GameControllerRumble,
209
211
  :SDL_GameControllerRumbleTriggers => :GameControllerRumbleTriggers,
210
212
  :SDL_GameControllerHasLED => :GameControllerHasLED,
@@ -263,6 +265,7 @@ module SDL
263
265
  :SDL_GameControllerIsSensorEnabled => [:pointer, :int],
264
266
  :SDL_GameControllerGetSensorDataRate => [:pointer, :int],
265
267
  :SDL_GameControllerGetSensorData => [:pointer, :int, :pointer, :int],
268
+ :SDL_GameControllerGetSensorDataWithTimestamp => [:pointer, :int, :pointer, :pointer, :int],
266
269
  :SDL_GameControllerRumble => [:pointer, :ushort, :ushort, :uint],
267
270
  :SDL_GameControllerRumbleTriggers => [:pointer, :ushort, :ushort, :uint],
268
271
  :SDL_GameControllerHasLED => [:pointer],
@@ -321,6 +324,7 @@ module SDL
321
324
  :SDL_GameControllerIsSensorEnabled => :int,
322
325
  :SDL_GameControllerGetSensorDataRate => :float,
323
326
  :SDL_GameControllerGetSensorData => :int,
327
+ :SDL_GameControllerGetSensorDataWithTimestamp => :int,
324
328
  :SDL_GameControllerRumble => :int,
325
329
  :SDL_GameControllerRumbleTriggers => :int,
326
330
  :SDL_GameControllerHasLED => :int,
data/lib/sdl2_hints.rb CHANGED
@@ -43,6 +43,7 @@ module SDL
43
43
  HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT = "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
44
44
  HINT_GAMECONTROLLER_USE_BUTTON_LABELS = "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"
45
45
  HINT_GRAB_KEYBOARD = "SDL_GRAB_KEYBOARD"
46
+ HINT_HIDAPI_IGNORE_DEVICES = "SDL_HIDAPI_IGNORE_DEVICES"
46
47
  HINT_IDLE_TIMER_DISABLED = "SDL_IOS_IDLE_TIMER_DISABLED"
47
48
  HINT_IME_INTERNAL_EDITING = "SDL_IME_INTERNAL_EDITING"
48
49
  HINT_IME_SHOW_UI = "SDL_IME_SHOW_UI"
@@ -54,9 +55,11 @@ module SDL
54
55
  HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE = "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE"
55
56
  HINT_JOYSTICK_HIDAPI_JOY_CONS = "SDL_JOYSTICK_HIDAPI_JOY_CONS"
56
57
  HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS = "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS"
58
+ HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS = "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"
57
59
  HINT_JOYSTICK_HIDAPI_LUNA = "SDL_JOYSTICK_HIDAPI_LUNA"
58
60
  HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC = "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC"
59
61
  HINT_JOYSTICK_HIDAPI_SHIELD = "SDL_JOYSTICK_HIDAPI_SHIELD"
62
+ HINT_JOYSTICK_HIDAPI_PS3 = "SDL_JOYSTICK_HIDAPI_PS3"
60
63
  HINT_JOYSTICK_HIDAPI_PS4 = "SDL_JOYSTICK_HIDAPI_PS4"
61
64
  HINT_JOYSTICK_HIDAPI_PS4_RUMBLE = "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
62
65
  HINT_JOYSTICK_HIDAPI_PS5 = "SDL_JOYSTICK_HIDAPI_PS5"
@@ -68,7 +71,14 @@ module SDL
68
71
  HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED = "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
69
72
  HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED = "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"
70
73
  HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED = "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"
74
+ HINT_JOYSTICK_HIDAPI_WII = "SDL_JOYSTICK_HIDAPI_WII"
75
+ HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED = "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED"
71
76
  HINT_JOYSTICK_HIDAPI_XBOX = "SDL_JOYSTICK_HIDAPI_XBOX"
77
+ HINT_JOYSTICK_HIDAPI_XBOX_360 = "SDL_JOYSTICK_HIDAPI_XBOX_360"
78
+ HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED = "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED"
79
+ HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS = "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"
80
+ HINT_JOYSTICK_HIDAPI_XBOX_ONE = "SDL_JOYSTICK_HIDAPI_XBOX_ONE"
81
+ HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED = "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"
72
82
  HINT_JOYSTICK_RAWINPUT = "SDL_JOYSTICK_RAWINPUT"
73
83
  HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT = "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
74
84
  HINT_JOYSTICK_ROG_CHAKRAM = "SDL_JOYSTICK_ROG_CHAKRAM"
@@ -90,6 +100,7 @@ module SDL
90
100
  HINT_MOUSE_RELATIVE_MODE_WARP = "SDL_MOUSE_RELATIVE_MODE_WARP"
91
101
  HINT_MOUSE_RELATIVE_SCALING = "SDL_MOUSE_RELATIVE_SCALING"
92
102
  HINT_MOUSE_RELATIVE_SPEED_SCALE = "SDL_MOUSE_RELATIVE_SPEED_SCALE"
103
+ HINT_MOUSE_RELATIVE_SYSTEM_SCALE = "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"
93
104
  HINT_MOUSE_RELATIVE_WARP_MOTION = "SDL_MOUSE_RELATIVE_WARP_MOTION"
94
105
  HINT_MOUSE_TOUCH_EVENTS = "SDL_MOUSE_TOUCH_EVENTS"
95
106
  HINT_MOUSE_AUTO_CAPTURE = "SDL_MOUSE_AUTO_CAPTURE"
@@ -109,6 +120,7 @@ module SDL
109
120
  HINT_RENDER_OPENGL_SHADERS = "SDL_RENDER_OPENGL_SHADERS"
110
121
  HINT_RENDER_SCALE_QUALITY = "SDL_RENDER_SCALE_QUALITY"
111
122
  HINT_RENDER_VSYNC = "SDL_RENDER_VSYNC"
123
+ HINT_PS2_DYNAMIC_VSYNC = "SDL_PS2_DYNAMIC_VSYNC"
112
124
  HINT_RETURN_KEY_HIDES_IME = "SDL_RETURN_KEY_HIDES_IME"
113
125
  HINT_RPI_VIDEO_LAYER = "SDL_RPI_VIDEO_LAYER"
114
126
  HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME = "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"
@@ -129,6 +141,7 @@ module SDL
129
141
  HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR = "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
130
142
  HINT_VIDEO_WAYLAND_PREFER_LIBDECOR = "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
131
143
  HINT_VIDEO_WAYLAND_MODE_EMULATION = "SDL_VIDEO_WAYLAND_MODE_EMULATION"
144
+ HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP = "SDL_VIDEO_WAYLAND_EMULATE_MOUSE_WARP"
132
145
  HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT = "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
133
146
  HINT_VIDEO_FOREIGN_WINDOW_OPENGL = "SDL_VIDEO_FOREIGN_WINDOW_OPENGL"
134
147
  HINT_VIDEO_FOREIGN_WINDOW_VULKAN = "SDL_VIDEO_FOREIGN_WINDOW_VULKAN"
@@ -191,6 +204,7 @@ module SDL
191
204
  :SDL_SetHintWithPriority,
192
205
  :SDL_SetHint,
193
206
  :SDL_ResetHint,
207
+ :SDL_ResetHints,
194
208
  :SDL_GetHint,
195
209
  :SDL_GetHintBoolean,
196
210
  :SDL_AddHintCallback,
@@ -201,6 +215,7 @@ module SDL
201
215
  :SDL_SetHintWithPriority => :SetHintWithPriority,
202
216
  :SDL_SetHint => :SetHint,
203
217
  :SDL_ResetHint => :ResetHint,
218
+ :SDL_ResetHints => :ResetHints,
204
219
  :SDL_GetHint => :GetHint,
205
220
  :SDL_GetHintBoolean => :GetHintBoolean,
206
221
  :SDL_AddHintCallback => :AddHintCallback,
@@ -211,6 +226,7 @@ module SDL
211
226
  :SDL_SetHintWithPriority => [:pointer, :pointer, :int],
212
227
  :SDL_SetHint => [:pointer, :pointer],
213
228
  :SDL_ResetHint => [:pointer],
229
+ :SDL_ResetHints => [],
214
230
  :SDL_GetHint => [:pointer],
215
231
  :SDL_GetHintBoolean => [:pointer, :int],
216
232
  :SDL_AddHintCallback => [:pointer, :SDL_HintCallback, :pointer],
@@ -221,6 +237,7 @@ module SDL
221
237
  :SDL_SetHintWithPriority => :int,
222
238
  :SDL_SetHint => :int,
223
239
  :SDL_ResetHint => :int,
240
+ :SDL_ResetHints => :void,
224
241
  :SDL_GetHint => :pointer,
225
242
  :SDL_GetHintBoolean => :int,
226
243
  :SDL_AddHintCallback => :void,
data/lib/sdl2_joystick.rb CHANGED
@@ -119,6 +119,7 @@ module SDL
119
119
  :SDL_JoystickGetType,
120
120
  :SDL_JoystickGetGUIDString,
121
121
  :SDL_JoystickGetGUIDFromString,
122
+ :SDL_GetJoystickGUIDInfo,
122
123
  :SDL_JoystickGetAttached,
123
124
  :SDL_JoystickInstanceID,
124
125
  :SDL_JoystickNumAxes,
@@ -178,6 +179,7 @@ module SDL
178
179
  :SDL_JoystickGetType => :JoystickGetType,
179
180
  :SDL_JoystickGetGUIDString => :JoystickGetGUIDString,
180
181
  :SDL_JoystickGetGUIDFromString => :JoystickGetGUIDFromString,
182
+ :SDL_GetJoystickGUIDInfo => :GetJoystickGUIDInfo,
181
183
  :SDL_JoystickGetAttached => :JoystickGetAttached,
182
184
  :SDL_JoystickInstanceID => :JoystickInstanceID,
183
185
  :SDL_JoystickNumAxes => :JoystickNumAxes,
@@ -237,6 +239,7 @@ module SDL
237
239
  :SDL_JoystickGetType => [:pointer],
238
240
  :SDL_JoystickGetGUIDString => [JoystickGUID.by_value, :pointer, :int],
239
241
  :SDL_JoystickGetGUIDFromString => [:pointer],
242
+ :SDL_GetJoystickGUIDInfo => [JoystickGUID.by_value, :pointer, :pointer, :pointer, :pointer],
240
243
  :SDL_JoystickGetAttached => [:pointer],
241
244
  :SDL_JoystickInstanceID => [:pointer],
242
245
  :SDL_JoystickNumAxes => [:pointer],
@@ -296,6 +299,7 @@ module SDL
296
299
  :SDL_JoystickGetType => :int,
297
300
  :SDL_JoystickGetGUIDString => :void,
298
301
  :SDL_JoystickGetGUIDFromString => JoystickGUID.by_value,
302
+ :SDL_GetJoystickGUIDInfo => :void,
299
303
  :SDL_JoystickGetAttached => :int,
300
304
  :SDL_JoystickInstanceID => :int,
301
305
  :SDL_JoystickNumAxes => :int,
data/lib/sdl2_sensor.rb CHANGED
@@ -18,6 +18,10 @@ module SDL
18
18
  SENSOR_UNKNOWN = 0
19
19
  SENSOR_ACCEL = 1
20
20
  SENSOR_GYRO = 2
21
+ SENSOR_ACCEL_L = 3
22
+ SENSOR_GYRO_L = 4
23
+ SENSOR_ACCEL_R = 5
24
+ SENSOR_GYRO_R = 6
21
25
 
22
26
  # Typedef
23
27
 
@@ -45,6 +49,7 @@ module SDL
45
49
  :SDL_SensorGetNonPortableType,
46
50
  :SDL_SensorGetInstanceID,
47
51
  :SDL_SensorGetData,
52
+ :SDL_SensorGetDataWithTimestamp,
48
53
  :SDL_SensorClose,
49
54
  :SDL_SensorUpdate,
50
55
  ]
@@ -63,6 +68,7 @@ module SDL
63
68
  :SDL_SensorGetNonPortableType => :SensorGetNonPortableType,
64
69
  :SDL_SensorGetInstanceID => :SensorGetInstanceID,
65
70
  :SDL_SensorGetData => :SensorGetData,
71
+ :SDL_SensorGetDataWithTimestamp => :SensorGetDataWithTimestamp,
66
72
  :SDL_SensorClose => :SensorClose,
67
73
  :SDL_SensorUpdate => :SensorUpdate,
68
74
  }
@@ -81,6 +87,7 @@ module SDL
81
87
  :SDL_SensorGetNonPortableType => [:pointer],
82
88
  :SDL_SensorGetInstanceID => [:pointer],
83
89
  :SDL_SensorGetData => [:pointer, :pointer, :int],
90
+ :SDL_SensorGetDataWithTimestamp => [:pointer, :pointer, :pointer, :int],
84
91
  :SDL_SensorClose => [:pointer],
85
92
  :SDL_SensorUpdate => [],
86
93
  }
@@ -99,6 +106,7 @@ module SDL
99
106
  :SDL_SensorGetNonPortableType => :int,
100
107
  :SDL_SensorGetInstanceID => :int,
101
108
  :SDL_SensorGetData => :int,
109
+ :SDL_SensorGetDataWithTimestamp => :int,
102
110
  :SDL_SensorClose => :void,
103
111
  :SDL_SensorUpdate => :void,
104
112
  }
data/lib/sdl2_stdinc.rb CHANGED
@@ -10,10 +10,10 @@ module SDL
10
10
  extend FFI::Library
11
11
  # Define/Macro
12
12
 
13
- ICONV_ERROR = -1
14
- ICONV_E2BIG = -2
15
- ICONV_EILSEQ = -3
16
- ICONV_EINVAL = -4
13
+ ICONV_ERROR = 4294967295
14
+ ICONV_E2BIG = 4294967294
15
+ ICONV_EILSEQ = 4294967293
16
+ ICONV_EINVAL = 4294967292
17
17
 
18
18
  # Enum
19
19
 
@@ -22,6 +22,14 @@ module SDL
22
22
 
23
23
  # Typedef
24
24
 
25
+ typedef :char, :int8_t
26
+ typedef :short, :int16_t
27
+ typedef :int, :int32_t
28
+ typedef :long_long, :int64_t
29
+ typedef :uchar, :uint8_t
30
+ typedef :ushort, :uint16_t
31
+ typedef :uint, :uint32_t
32
+ typedef :ulong_long, :uint64_t
25
33
  typedef :int, :SDL_bool
26
34
  typedef :char, :Sint8
27
35
  typedef :uchar, :Uint8
@@ -97,6 +105,7 @@ module SDL
97
105
  :SDL_strchr,
98
106
  :SDL_strrchr,
99
107
  :SDL_strstr,
108
+ :SDL_strcasestr,
100
109
  :SDL_strtokr,
101
110
  :SDL_utf8strlen,
102
111
  :SDL_utf8strnlen,
@@ -224,6 +233,7 @@ module SDL
224
233
  :SDL_strchr => :strchr,
225
234
  :SDL_strrchr => :strrchr,
226
235
  :SDL_strstr => :strstr,
236
+ :SDL_strcasestr => :strcasestr,
227
237
  :SDL_strtokr => :strtokr,
228
238
  :SDL_utf8strlen => :utf8strlen,
229
239
  :SDL_utf8strnlen => :utf8strnlen,
@@ -351,6 +361,7 @@ module SDL
351
361
  :SDL_strchr => [:pointer, :int],
352
362
  :SDL_strrchr => [:pointer, :int],
353
363
  :SDL_strstr => [:pointer, :pointer],
364
+ :SDL_strcasestr => [:pointer, :pointer],
354
365
  :SDL_strtokr => [:pointer, :pointer, :pointer],
355
366
  :SDL_utf8strlen => [:pointer],
356
367
  :SDL_utf8strnlen => [:pointer, :ulong],
@@ -478,6 +489,7 @@ module SDL
478
489
  :SDL_strchr => :pointer,
479
490
  :SDL_strrchr => :pointer,
480
491
  :SDL_strstr => :pointer,
492
+ :SDL_strcasestr => :pointer,
481
493
  :SDL_strtokr => :pointer,
482
494
  :SDL_utf8strlen => :size_t,
483
495
  :SDL_utf8strnlen => :size_t,
data/lib/sdl2_touch.rb CHANGED
@@ -10,7 +10,7 @@ module SDL
10
10
  extend FFI::Library
11
11
  # Define/Macro
12
12
 
13
- TOUCH_MOUSEID = -1
13
+ TOUCH_MOUSEID = 4294967295
14
14
  MOUSE_TOUCHID = -1
15
15
 
16
16
  # Enum
data/lib/sdl2_version.rb CHANGED
@@ -12,7 +12,7 @@ module SDL
12
12
 
13
13
  MAJOR_VERSION = 2
14
14
  MINOR_VERSION = 24
15
- PATCHLEVEL = 0
15
+ PATCHLEVEL = 1
16
16
 
17
17
  # Enum
18
18
 
data/lib/sdl2_video.rb CHANGED
@@ -191,6 +191,7 @@ module SDL
191
191
  :SDL_SetWindowSize,
192
192
  :SDL_GetWindowSize,
193
193
  :SDL_GetWindowBordersSize,
194
+ :SDL_GetWindowSizeInPixels,
194
195
  :SDL_SetWindowMinimumSize,
195
196
  :SDL_GetWindowMinimumSize,
196
197
  :SDL_SetWindowMaximumSize,
@@ -287,6 +288,7 @@ module SDL
287
288
  :SDL_SetWindowSize => :SetWindowSize,
288
289
  :SDL_GetWindowSize => :GetWindowSize,
289
290
  :SDL_GetWindowBordersSize => :GetWindowBordersSize,
291
+ :SDL_GetWindowSizeInPixels => :GetWindowSizeInPixels,
290
292
  :SDL_SetWindowMinimumSize => :SetWindowMinimumSize,
291
293
  :SDL_GetWindowMinimumSize => :GetWindowMinimumSize,
292
294
  :SDL_SetWindowMaximumSize => :SetWindowMaximumSize,
@@ -383,6 +385,7 @@ module SDL
383
385
  :SDL_SetWindowSize => [:pointer, :int, :int],
384
386
  :SDL_GetWindowSize => [:pointer, :pointer, :pointer],
385
387
  :SDL_GetWindowBordersSize => [:pointer, :pointer, :pointer, :pointer, :pointer],
388
+ :SDL_GetWindowSizeInPixels => [:pointer, :pointer, :pointer],
386
389
  :SDL_SetWindowMinimumSize => [:pointer, :int, :int],
387
390
  :SDL_GetWindowMinimumSize => [:pointer, :pointer, :pointer],
388
391
  :SDL_SetWindowMaximumSize => [:pointer, :int, :int],
@@ -479,6 +482,7 @@ module SDL
479
482
  :SDL_SetWindowSize => :void,
480
483
  :SDL_GetWindowSize => :void,
481
484
  :SDL_GetWindowBordersSize => :int,
485
+ :SDL_GetWindowSizeInPixels => :void,
482
486
  :SDL_SetWindowMinimumSize => :void,
483
487
  :SDL_GetWindowMinimumSize => :void,
484
488
  :SDL_SetWindowMaximumSize => :void,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sdl2-bindings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaiorabbit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-20 00:00:00.000000000 Z
11
+ date: 2022-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi