sdl2-bindings 0.2.2 → 0.2.3

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: 846860734bc78ffbbb72e61cad3d1a29862d1167a9677e99eea7becb7994ea57
4
- data.tar.gz: 144141b0efc6c17a659eeb6bae890d334f8fb8f3f2851d058db02a0aea1195be
3
+ metadata.gz: eb7934f7a0efe274fe48321f9129b887796897a649598e62cff8170ec340fea7
4
+ data.tar.gz: 1f9cb49ae64fc1aa71977a6afbe158210eadfdf9f4d2bcb8573168316ab708d5
5
5
  SHA512:
6
- metadata.gz: 506882992eea3d2fb36049770c3737769c1c5ca0d2ca02b75b2347125a9e1f93394760bb36a11653b24609aa79b619a7d752762e8067290b579e1a3311c3a125
7
- data.tar.gz: 6cfc644c9065593f64b3e2f5a66861dc0bf5e8069b4f7ed65727e90f7b4da6b95c7420c010ff378e6b41ae71d79ea7bff5400315a9bdbcbca93917105849f2ee
6
+ metadata.gz: 90e3388ed34707c64b309f6f302e96ab6477b6e3d57e14562767c37ae64feb16b652008dc02b4fc1d2745b6259a11496364a4f815146a35e44b1a51d3d39735b
7
+ data.tar.gz: a58d436d7f452eaf8b8aba0a629a35b1d7774d55834113124e2c9fc946a1d64d760f0f15ca686928c19fea3529ad962b47d83834d2f94776bd935289d8a4e2f9
data/ChangeLog CHANGED
@@ -1,3 +1,19 @@
1
+ 2024-02-03 vaiorabbit <http://twitter.com/vaiorabbit>
2
+
3
+ * SDL 2.30.0
4
+
5
+ 2024-01-28 vaiorabbit <http://twitter.com/vaiorabbit>
6
+
7
+ * SDL_mixer 2.8.0 and SDL_ttf 2.22.0
8
+
9
+ 2024-01-20 vaiorabbit <http://twitter.com/vaiorabbit>
10
+
11
+ * SDL 2.29.1, etc.
12
+
13
+ 2023-12-09 vaiorabbit <http://twitter.com/vaiorabbit>
14
+
15
+ * SDL_image 2.8.0 ( https://github.com/libsdl-org/SDL_image/releases/tag/release-2.8.0 )
16
+
1
17
  2023-08-10 vaiorabbit <http://twitter.com/vaiorabbit>
2
18
 
3
19
  * SDL 2.28.2 ( https://github.com/libsdl-org/SDL/releases/tag/release-2.28.2 )
data/LICENSE.txt CHANGED
@@ -1,5 +1,5 @@
1
1
  sdl2-bindings : Yet another SDL2 wrapper for Ruby
2
- Copyright (c) 2015-2023 vaiorabbit <http://twitter.com/vaiorabbit>
2
+ Copyright (c) 2015-2024 vaiorabbit <http://twitter.com/vaiorabbit>
3
3
 
4
4
  This software is provided 'as-is', without any express or implied
5
5
  warranty. In no event will the authors be held liable for any damages
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 : 2023-08-10
6
+ * Last modified : 2024-02-03
7
7
 
8
8
  ## Features ##
9
9
 
@@ -23,13 +23,13 @@ See the project below to learn how to use this library:
23
23
 
24
24
  ## Target version ##
25
25
 
26
- * [2023-08-10]
27
- * SDL : 2.28.2~
28
- * SDL_image : 2.6.3
29
- * SDL_mixer : 2.6.3
30
- * SDL_ttf : 2.20.2
26
+ * [2024-02-03]
27
+ * SDL : 2.30.0~
28
+ * SDL_image : 2.8.2
29
+ * SDL_mixer : 2.8.0
30
+ * SDL_ttf : 2.22.0
31
31
  * SDL2_gfx : 1.0.4
32
- * SDL_sound : 2.0.1
32
+ * SDL_sound : 2.0.2
33
33
 
34
34
  <details>
35
35
  <summary>Older versions</summary>
@@ -104,19 +104,36 @@ See the project below to learn how to use this library:
104
104
  * SDL_ttf : 2.20.2
105
105
  * SDL2_gfx : 1.0.4
106
106
  * SDL_sound : 2.0.1
107
+ * [2023-08-10]
108
+ * SDL : 2.28.2~
109
+ * SDL_image : 2.6.3
110
+ * SDL_mixer : 2.6.3
111
+ * SDL_ttf : 2.20.2
112
+ * SDL2_gfx : 1.0.4
113
+ * SDL_sound : 2.0.1
114
+ * [2024-01-28]
115
+ * SDL : 2.29.1~
116
+ * SDL_image : 2.8.2
117
+ * SDL_mixer : 2.8.0
118
+ * SDL_ttf : 2.22.0
119
+ * SDL2_gfx : 1.0.4
120
+ * SDL_sound : 2.0.2
121
+
107
122
 
108
123
  </details>
109
124
 
110
125
  ## Supported Environments ##
111
126
 
127
+ * [2023-12-09] macOS Sonoma (14.2.1) ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
112
128
  * [2023-01-07] Windows 11 (22H2), ruby 3.2.0 (2022-12-25 revision a528908271) [x64-mingw-ucrt]
113
- * [2023-01-07] macOS Ventura (13.2.1) ruby 3.2.1 (2023-02-08 revision 31819e82c8) [arm64-darwin22]
114
129
  * [2022-10-09] Debian 11 (bullseye) on ASUS Chromebook Detachable CZ1, ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [aarch64-linux]
115
130
  * [2023-02-05] Ubuntu Linux 22.04 LTS (jammy) on WSL/Windows 11, ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux]
116
131
 
117
132
  <details>
118
133
  <summary>Older Environments</summary>
119
134
 
135
+ * [2023-12-09] macOS Sonoma (14.0) ruby 3.2.1 (2023-02-08 revision 31819e82c8) [arm64-darwin22]
136
+ * [2023-01-07] macOS Ventura (13.2.1) ruby 3.2.1 (2023-02-08 revision 31819e82c8) [arm64-darwin22]
120
137
  * [2022-04-29] Windows 10 (21H1), ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x64-mingw-ucrt]
121
138
  * [2022-10-09] macOS Monterey (12.5.1), ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
122
139
  * [2022-07-31] macOS Monterey (12.4), ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin21]
@@ -135,7 +152,7 @@ See the project below to learn how to use this library:
135
152
  The zlib/libpng License ( http://opensource.org/licenses/Zlib ).
136
153
 
137
154
  sdl2-bindings : Yet another SDL2 wrapper for Ruby
138
- Copyright (c) 2015-2023 vaiorabbit <http://twitter.com/vaiorabbit>
155
+ Copyright (c) 2015-2024 vaiorabbit <http://twitter.com/vaiorabbit>
139
156
 
140
157
  This software is provided 'as-is', without any express or implied
141
158
  warranty. In no event will the authors be held liable for any damages
data/lib/sdl2_events.rb CHANGED
@@ -62,6 +62,8 @@ module SDL
62
62
  CONTROLLERTOUCHPADMOTION = 1623
63
63
  CONTROLLERTOUCHPADUP = 1624
64
64
  CONTROLLERSENSORUPDATE = 1625
65
+ CONTROLLERUPDATECOMPLETE_RESERVED_FOR_SDL3 = 1626
66
+ CONTROLLERSTEAMHANDLEUPDATED = 1627
65
67
  FINGERDOWN = 1792
66
68
  FINGERUP = 1793
67
69
  FINGERMOTION = 1794
@@ -423,13 +425,6 @@ module SDL
423
425
  )
424
426
  end
425
427
 
426
- class OSEvent < FFI::Struct
427
- layout(
428
- :type, :uint,
429
- :timestamp, :uint,
430
- )
431
- end
432
-
433
428
  class UserEvent < FFI::Struct
434
429
  layout(
435
430
  :type, :uint,
@@ -28,6 +28,7 @@ module SDL
28
28
  CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_LEFT = 11
29
29
  CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT = 12
30
30
  CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_PAIR = 13
31
+ CONTROLLER_TYPE_MAX = 14
31
32
  CONTROLLER_BINDTYPE_NONE = 0
32
33
  CONTROLLER_BINDTYPE_BUTTON = 1
33
34
  CONTROLLER_BINDTYPE_AXIS = 2
@@ -125,6 +126,7 @@ module SDL
125
126
  :SDL_GameControllerGetProductVersion,
126
127
  :SDL_GameControllerGetFirmwareVersion,
127
128
  :SDL_GameControllerGetSerial,
129
+ :SDL_GameControllerGetSteamHandle,
128
130
  :SDL_GameControllerGetAttached,
129
131
  :SDL_GameControllerGetJoystick,
130
132
  :SDL_GameControllerEventState,
@@ -184,6 +186,7 @@ module SDL
184
186
  :SDL_GameControllerGetProductVersion => :GameControllerGetProductVersion,
185
187
  :SDL_GameControllerGetFirmwareVersion => :GameControllerGetFirmwareVersion,
186
188
  :SDL_GameControllerGetSerial => :GameControllerGetSerial,
189
+ :SDL_GameControllerGetSteamHandle => :GameControllerGetSteamHandle,
187
190
  :SDL_GameControllerGetAttached => :GameControllerGetAttached,
188
191
  :SDL_GameControllerGetJoystick => :GameControllerGetJoystick,
189
192
  :SDL_GameControllerEventState => :GameControllerEventState,
@@ -243,6 +246,7 @@ module SDL
243
246
  :SDL_GameControllerGetProductVersion => [:pointer],
244
247
  :SDL_GameControllerGetFirmwareVersion => [:pointer],
245
248
  :SDL_GameControllerGetSerial => [:pointer],
249
+ :SDL_GameControllerGetSteamHandle => [:pointer],
246
250
  :SDL_GameControllerGetAttached => [:pointer],
247
251
  :SDL_GameControllerGetJoystick => [:pointer],
248
252
  :SDL_GameControllerEventState => [:int],
@@ -302,6 +306,7 @@ module SDL
302
306
  :SDL_GameControllerGetProductVersion => :ushort,
303
307
  :SDL_GameControllerGetFirmwareVersion => :ushort,
304
308
  :SDL_GameControllerGetSerial => :pointer,
309
+ :SDL_GameControllerGetSteamHandle => :ulong_long,
305
310
  :SDL_GameControllerGetAttached => :int,
306
311
  :SDL_GameControllerGetJoystick => :pointer,
307
312
  :SDL_GameControllerEventState => :int,
data/lib/sdl2_haptic.rb CHANGED
@@ -10,22 +10,22 @@ module SDL
10
10
  extend FFI::Library
11
11
  # Define/Macro
12
12
 
13
- HAPTIC_CONSTANT = (1 << 0)
14
- HAPTIC_SINE = (1 << 1)
15
- HAPTIC_LEFTRIGHT = (1 << 2)
16
- HAPTIC_TRIANGLE = (1 << 3)
17
- HAPTIC_SAWTOOTHUP = (1 << 4)
18
- HAPTIC_SAWTOOTHDOWN = (1 << 5)
19
- HAPTIC_RAMP = (1 << 6)
20
- HAPTIC_SPRING = (1 << 7)
21
- HAPTIC_DAMPER = (1 << 8)
22
- HAPTIC_INERTIA = (1 << 9)
23
- HAPTIC_FRICTION = (1 << 10)
24
- HAPTIC_CUSTOM = (1 << 11)
25
- HAPTIC_GAIN = (1 << 12)
26
- HAPTIC_AUTOCENTER = (1 << 13)
27
- HAPTIC_STATUS = (1 << 14)
28
- HAPTIC_PAUSE = (1 << 15)
13
+ HAPTIC_CONSTANT = 1 << 0
14
+ HAPTIC_SINE = 1 << 1
15
+ HAPTIC_LEFTRIGHT = 1 << 2
16
+ HAPTIC_TRIANGLE = 1 << 3
17
+ HAPTIC_SAWTOOTHUP = 1 << 4
18
+ HAPTIC_SAWTOOTHDOWN = 1 << 5
19
+ HAPTIC_RAMP = 1 << 6
20
+ HAPTIC_SPRING = 1 << 7
21
+ HAPTIC_DAMPER = 1 << 8
22
+ HAPTIC_INERTIA = 1 << 9
23
+ HAPTIC_FRICTION = 1 << 10
24
+ HAPTIC_CUSTOM = 1 << 11
25
+ HAPTIC_GAIN = 1 << 12
26
+ HAPTIC_AUTOCENTER = 1 << 13
27
+ HAPTIC_STATUS = 1 << 14
28
+ HAPTIC_PAUSE = 1 << 15
29
29
  HAPTIC_POLAR = 0
30
30
  HAPTIC_CARTESIAN = 1
31
31
  HAPTIC_SPHERICAL = 2
data/lib/sdl2_hints.rb CHANGED
@@ -51,6 +51,14 @@ module SDL
51
51
  HINT_IME_SUPPORT_EXTENDED_TEXT = "SDL_IME_SUPPORT_EXTENDED_TEXT"
52
52
  HINT_IOS_HIDE_HOME_INDICATOR = "SDL_IOS_HIDE_HOME_INDICATOR"
53
53
  HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS = "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
54
+ HINT_JOYSTICK_ARCADESTICK_DEVICES = "SDL_JOYSTICK_ARCADESTICK_DEVICES"
55
+ HINT_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED = "SDL_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED"
56
+ HINT_JOYSTICK_BLACKLIST_DEVICES = "SDL_JOYSTICK_BLACKLIST_DEVICES"
57
+ HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED = "SDL_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED"
58
+ HINT_JOYSTICK_FLIGHTSTICK_DEVICES = "SDL_JOYSTICK_FLIGHTSTICK_DEVICES"
59
+ HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED = "SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED"
60
+ HINT_JOYSTICK_GAMECUBE_DEVICES = "SDL_JOYSTICK_GAMECUBE_DEVICES"
61
+ HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED = "SDL_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED"
54
62
  HINT_JOYSTICK_HIDAPI = "SDL_JOYSTICK_HIDAPI"
55
63
  HINT_JOYSTICK_HIDAPI_GAMECUBE = "SDL_JOYSTICK_HIDAPI_GAMECUBE"
56
64
  HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE = "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE"
@@ -68,6 +76,7 @@ module SDL
68
76
  HINT_JOYSTICK_HIDAPI_PS5_RUMBLE = "SDL_JOYSTICK_HIDAPI_PS5_RUMBLE"
69
77
  HINT_JOYSTICK_HIDAPI_STADIA = "SDL_JOYSTICK_HIDAPI_STADIA"
70
78
  HINT_JOYSTICK_HIDAPI_STEAM = "SDL_JOYSTICK_HIDAPI_STEAM"
79
+ HINT_JOYSTICK_HIDAPI_STEAMDECK = "SDL_JOYSTICK_HIDAPI_STEAMDECK"
71
80
  HINT_JOYSTICK_HIDAPI_SWITCH = "SDL_JOYSTICK_HIDAPI_SWITCH"
72
81
  HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED = "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
73
82
  HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED = "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"
@@ -80,17 +89,25 @@ module SDL
80
89
  HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS = "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"
81
90
  HINT_JOYSTICK_HIDAPI_XBOX_ONE = "SDL_JOYSTICK_HIDAPI_XBOX_ONE"
82
91
  HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED = "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"
92
+ HINT_JOYSTICK_IOKIT = "SDL_JOYSTICK_IOKIT"
93
+ HINT_JOYSTICK_MFI = "SDL_JOYSTICK_MFI"
83
94
  HINT_JOYSTICK_RAWINPUT = "SDL_JOYSTICK_RAWINPUT"
84
95
  HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT = "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
85
96
  HINT_JOYSTICK_ROG_CHAKRAM = "SDL_JOYSTICK_ROG_CHAKRAM"
86
97
  HINT_JOYSTICK_THREAD = "SDL_JOYSTICK_THREAD"
98
+ HINT_JOYSTICK_THROTTLE_DEVICES = "SDL_JOYSTICK_THROTTLE_DEVICES"
99
+ HINT_JOYSTICK_THROTTLE_DEVICES_EXCLUDED = "SDL_JOYSTICK_THROTTLE_DEVICES_EXCLUDED"
87
100
  HINT_JOYSTICK_WGI = "SDL_JOYSTICK_WGI"
101
+ HINT_JOYSTICK_WHEEL_DEVICES = "SDL_JOYSTICK_WHEEL_DEVICES"
102
+ HINT_JOYSTICK_WHEEL_DEVICES_EXCLUDED = "SDL_JOYSTICK_WHEEL_DEVICES_EXCLUDED"
103
+ HINT_JOYSTICK_ZERO_CENTERED_DEVICES = "SDL_JOYSTICK_ZERO_CENTERED_DEVICES"
88
104
  HINT_KMSDRM_REQUIRE_DRM_MASTER = "SDL_KMSDRM_REQUIRE_DRM_MASTER"
89
105
  HINT_JOYSTICK_DEVICE = "SDL_JOYSTICK_DEVICE"
90
106
  HINT_LINUX_DIGITAL_HATS = "SDL_LINUX_DIGITAL_HATS"
91
107
  HINT_LINUX_HAT_DEADZONES = "SDL_LINUX_HAT_DEADZONES"
92
108
  HINT_LINUX_JOYSTICK_CLASSIC = "SDL_LINUX_JOYSTICK_CLASSIC"
93
109
  HINT_LINUX_JOYSTICK_DEADZONES = "SDL_LINUX_JOYSTICK_DEADZONES"
110
+ HINT_LOGGING = "SDL_LOGGING"
94
111
  HINT_MAC_BACKGROUND_APP = "SDL_MAC_BACKGROUND_APP"
95
112
  HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK = "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
96
113
  HINT_MAC_OPENGL_ASYNC_DISPATCH = "SDL_MAC_OPENGL_ASYNC_DISPATCH"
@@ -122,6 +139,9 @@ module SDL
122
139
  HINT_RENDER_OPENGL_SHADERS = "SDL_RENDER_OPENGL_SHADERS"
123
140
  HINT_RENDER_SCALE_QUALITY = "SDL_RENDER_SCALE_QUALITY"
124
141
  HINT_RENDER_VSYNC = "SDL_RENDER_VSYNC"
142
+ HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE = "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"
143
+ HINT_ROG_GAMEPAD_MICE = "SDL_ROG_GAMEPAD_MICE"
144
+ HINT_ROG_GAMEPAD_MICE_EXCLUDED = "SDL_ROG_GAMEPAD_MICE_EXCLUDED"
125
145
  HINT_PS2_DYNAMIC_VSYNC = "SDL_PS2_DYNAMIC_VSYNC"
126
146
  HINT_RETURN_KEY_HIDES_IME = "SDL_RETURN_KEY_HIDES_IME"
127
147
  HINT_RPI_VIDEO_LAYER = "SDL_RPI_VIDEO_LAYER"
@@ -185,6 +205,7 @@ module SDL
185
205
  HINT_AUDIODRIVER = "SDL_AUDIODRIVER"
186
206
  HINT_KMSDRM_DEVICE_INDEX = "SDL_KMSDRM_DEVICE_INDEX"
187
207
  HINT_TRACKPAD_IS_TOUCH_ONLY = "SDL_TRACKPAD_IS_TOUCH_ONLY"
208
+ HINT_SHUTDOWN_DBUS_ON_QUIT = "SDL_SHUTDOWN_DBUS_ON_QUIT"
188
209
 
189
210
  # Enum
190
211
 
data/lib/sdl2_image.rb CHANGED
@@ -11,7 +11,7 @@ module SDL
11
11
  # Define/Macro
12
12
 
13
13
  IMAGE_MAJOR_VERSION = 2
14
- IMAGE_MINOR_VERSION = 6
14
+ IMAGE_MINOR_VERSION = 8
15
15
  IMAGE_PATCHLEVEL = 2
16
16
 
17
17
  # Enum
@@ -102,6 +102,7 @@ module SDL
102
102
  :IMG_LoadAnimationTyped_RW,
103
103
  :IMG_FreeAnimation,
104
104
  :IMG_LoadGIFAnimation_RW,
105
+ :IMG_LoadWEBPAnimation_RW,
105
106
  ]
106
107
  apis = {
107
108
  :IMG_Linked_Version => :IMG_Linked_Version,
@@ -162,6 +163,7 @@ module SDL
162
163
  :IMG_LoadAnimationTyped_RW => :IMG_LoadAnimationTyped_RW,
163
164
  :IMG_FreeAnimation => :IMG_FreeAnimation,
164
165
  :IMG_LoadGIFAnimation_RW => :IMG_LoadGIFAnimation_RW,
166
+ :IMG_LoadWEBPAnimation_RW => :IMG_LoadWEBPAnimation_RW,
165
167
  }
166
168
  args = {
167
169
  :IMG_Linked_Version => [],
@@ -222,6 +224,7 @@ module SDL
222
224
  :IMG_LoadAnimationTyped_RW => [:pointer, :int, :pointer],
223
225
  :IMG_FreeAnimation => [:pointer],
224
226
  :IMG_LoadGIFAnimation_RW => [:pointer],
227
+ :IMG_LoadWEBPAnimation_RW => [:pointer],
225
228
  }
226
229
  retvals = {
227
230
  :IMG_Linked_Version => :pointer,
@@ -282,6 +285,7 @@ module SDL
282
285
  :IMG_LoadAnimationTyped_RW => :pointer,
283
286
  :IMG_FreeAnimation => :void,
284
287
  :IMG_LoadGIFAnimation_RW => :pointer,
288
+ :IMG_LoadWEBPAnimation_RW => :pointer,
285
289
  }
286
290
  symbols.each do |sym|
287
291
  begin
data/lib/sdl2_mixer.rb CHANGED
@@ -11,14 +11,13 @@ module SDL
11
11
  # Define/Macro
12
12
 
13
13
  MIXER_MAJOR_VERSION = 2
14
- MIXER_MINOR_VERSION = 6
15
- MIXER_PATCHLEVEL = 2
14
+ MIXER_MINOR_VERSION = 8
15
+ MIXER_PATCHLEVEL = 0
16
16
  MIX_CHANNELS = 8
17
17
  MIX_DEFAULT_FREQUENCY = 44100
18
- MIX_DEFAULT_FORMAT = AUDIO_S16LSB
18
+ MIX_DEFAULT_FORMAT = AUDIO_S16SYS
19
19
  MIX_DEFAULT_CHANNELS = 2
20
20
  MIX_CHANNEL_POST = -2
21
- MIX_EFFECTSMAXSPEED = "MIX_EFFECTSMAXSPEED"
22
21
 
23
22
  # Enum
24
23
 
@@ -28,6 +27,7 @@ module SDL
28
27
  MIX_INIT_OGG = 16
29
28
  MIX_INIT_MID = 32
30
29
  MIX_INIT_OPUS = 64
30
+ MIX_INIT_WAVPACK = 128
31
31
  MIX_NO_FADING = 0
32
32
  MIX_FADING_OUT = 1
33
33
  MIX_FADING_IN = 2
@@ -42,6 +42,8 @@ module SDL
42
42
  MUS_FLAC = 8
43
43
  MUS_MODPLUG_UNUSED = 9
44
44
  MUS_OPUS = 10
45
+ MUS_WAVPACK = 11
46
+ MUS_GME = 12
45
47
 
46
48
  # Typedef
47
49
 
@@ -72,6 +74,7 @@ module SDL
72
74
  :Mix_Quit,
73
75
  :Mix_OpenAudio,
74
76
  :Mix_OpenAudioDevice,
77
+ :Mix_PauseAudio,
75
78
  :Mix_QuerySpec,
76
79
  :Mix_AllocateChannels,
77
80
  :Mix_LoadWAV_RW,
@@ -143,6 +146,8 @@ module SDL
143
146
  :Mix_RewindMusic,
144
147
  :Mix_PausedMusic,
145
148
  :Mix_ModMusicJumpToOrder,
149
+ :Mix_StartTrack,
150
+ :Mix_GetNumTracks,
146
151
  :Mix_SetMusicPosition,
147
152
  :Mix_GetMusicPosition,
148
153
  :Mix_MusicDuration,
@@ -168,6 +173,7 @@ module SDL
168
173
  :Mix_Quit => :Mix_Quit,
169
174
  :Mix_OpenAudio => :Mix_OpenAudio,
170
175
  :Mix_OpenAudioDevice => :Mix_OpenAudioDevice,
176
+ :Mix_PauseAudio => :Mix_PauseAudio,
171
177
  :Mix_QuerySpec => :Mix_QuerySpec,
172
178
  :Mix_AllocateChannels => :Mix_AllocateChannels,
173
179
  :Mix_LoadWAV_RW => :Mix_LoadWAV_RW,
@@ -239,6 +245,8 @@ module SDL
239
245
  :Mix_RewindMusic => :Mix_RewindMusic,
240
246
  :Mix_PausedMusic => :Mix_PausedMusic,
241
247
  :Mix_ModMusicJumpToOrder => :Mix_ModMusicJumpToOrder,
248
+ :Mix_StartTrack => :Mix_StartTrack,
249
+ :Mix_GetNumTracks => :Mix_GetNumTracks,
242
250
  :Mix_SetMusicPosition => :Mix_SetMusicPosition,
243
251
  :Mix_GetMusicPosition => :Mix_GetMusicPosition,
244
252
  :Mix_MusicDuration => :Mix_MusicDuration,
@@ -264,6 +272,7 @@ module SDL
264
272
  :Mix_Quit => [],
265
273
  :Mix_OpenAudio => [:int, :ushort, :int, :int],
266
274
  :Mix_OpenAudioDevice => [:int, :ushort, :int, :int, :pointer, :int],
275
+ :Mix_PauseAudio => [:int],
267
276
  :Mix_QuerySpec => [:pointer, :pointer, :pointer],
268
277
  :Mix_AllocateChannels => [:int],
269
278
  :Mix_LoadWAV_RW => [:pointer, :int],
@@ -335,6 +344,8 @@ module SDL
335
344
  :Mix_RewindMusic => [],
336
345
  :Mix_PausedMusic => [],
337
346
  :Mix_ModMusicJumpToOrder => [:int],
347
+ :Mix_StartTrack => [:pointer, :int],
348
+ :Mix_GetNumTracks => [:pointer],
338
349
  :Mix_SetMusicPosition => [:double],
339
350
  :Mix_GetMusicPosition => [:pointer],
340
351
  :Mix_MusicDuration => [:pointer],
@@ -360,6 +371,7 @@ module SDL
360
371
  :Mix_Quit => :void,
361
372
  :Mix_OpenAudio => :int,
362
373
  :Mix_OpenAudioDevice => :int,
374
+ :Mix_PauseAudio => :void,
363
375
  :Mix_QuerySpec => :int,
364
376
  :Mix_AllocateChannels => :int,
365
377
  :Mix_LoadWAV_RW => :pointer,
@@ -431,6 +443,8 @@ module SDL
431
443
  :Mix_RewindMusic => :void,
432
444
  :Mix_PausedMusic => :int,
433
445
  :Mix_ModMusicJumpToOrder => :int,
446
+ :Mix_StartTrack => :int,
447
+ :Mix_GetNumTracks => :int,
434
448
  :Mix_SetMusicPosition => :int,
435
449
  :Mix_GetMusicPosition => :double,
436
450
  :Mix_MusicDuration => :double,
data/lib/sdl2_pixels.rb CHANGED
@@ -27,6 +27,7 @@ module SDL
27
27
  PIXELTYPE_ARRAYU32 = 9
28
28
  PIXELTYPE_ARRAYF16 = 10
29
29
  PIXELTYPE_ARRAYF32 = 11
30
+ PIXELTYPE_INDEX2 = 12
30
31
  BITMAPORDER_NONE = 0
31
32
  BITMAPORDER_4321 = 1
32
33
  BITMAPORDER_1234 = 2
@@ -58,6 +59,8 @@ module SDL
58
59
  PIXELFORMAT_UNKNOWN = 0
59
60
  PIXELFORMAT_INDEX1LSB = 286261504
60
61
  PIXELFORMAT_INDEX1MSB = 287310080
62
+ PIXELFORMAT_INDEX2LSB = 470811136
63
+ PIXELFORMAT_INDEX2MSB = 471859712
61
64
  PIXELFORMAT_INDEX4LSB = 303039488
62
65
  PIXELFORMAT_INDEX4MSB = 304088064
63
66
  PIXELFORMAT_INDEX8 = 318769153
@@ -97,6 +100,10 @@ module SDL
97
100
  PIXELFORMAT_ARGB32 = 377888772
98
101
  PIXELFORMAT_BGRA32 = 372645892
99
102
  PIXELFORMAT_ABGR32 = 373694468
103
+ PIXELFORMAT_RGBX32 = 374740996
104
+ PIXELFORMAT_XRGB32 = 375789572
105
+ PIXELFORMAT_BGRX32 = 370546692
106
+ PIXELFORMAT_XBGR32 = 371595268
100
107
  PIXELFORMAT_YV12 = 842094169
101
108
  PIXELFORMAT_IYUV = 1448433993
102
109
  PIXELFORMAT_YUY2 = 844715353
data/lib/sdl2_sound.rb CHANGED
@@ -12,7 +12,7 @@ module SDL
12
12
 
13
13
  SOUND_VER_MAJOR = 2
14
14
  SOUND_VER_MINOR = 0
15
- SOUND_VER_PATCH = 1
15
+ SOUND_VER_PATCH = 2
16
16
 
17
17
  # Enum
18
18
 
data/lib/sdl2_stdinc.rb CHANGED
@@ -22,14 +22,6 @@ 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
33
25
  typedef :int, :SDL_bool
34
26
  typedef :char, :Sint8
35
27
  typedef :uchar, :Uint8
data/lib/sdl2_ttf.rb CHANGED
@@ -12,8 +12,8 @@ module SDL
12
12
  # Define/Macro
13
13
 
14
14
  TTF_MAJOR_VERSION = 2
15
- TTF_MINOR_VERSION = 20
16
- TTF_PATCHLEVEL = 1
15
+ TTF_MINOR_VERSION = 22
16
+ TTF_PATCHLEVEL = 0
17
17
  TTF_STYLE_NORMAL = 0x00
18
18
  TTF_STYLE_BOLD = 0x01
19
19
  TTF_STYLE_ITALIC = 0x02
data/lib/sdl2_version.rb CHANGED
@@ -11,8 +11,8 @@ module SDL
11
11
  # Define/Macro
12
12
 
13
13
  MAJOR_VERSION = 2
14
- MINOR_VERSION = 28
15
- PATCHLEVEL = 2
14
+ MINOR_VERSION = 30
15
+ PATCHLEVEL = 0
16
16
 
17
17
  # Enum
18
18
 
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.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaiorabbit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-10 00:00:00.000000000 Z
11
+ date: 2024-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  requirements: []
105
- rubygems_version: 3.4.14
105
+ rubygems_version: 3.5.5
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: Bindings for SDL2