sdl2-bindings 0.1.1 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +140 -124
- data/LICENSE.txt +0 -0
- data/README.md +93 -77
- data/lib/sdl2.rb +131 -131
- data/lib/sdl2_audio.rb +265 -261
- data/lib/sdl2_blendmode.rb +72 -72
- data/lib/sdl2_clipboard.rb +56 -56
- data/lib/sdl2_cpuinfo.rb +137 -129
- data/lib/sdl2_error.rb +71 -71
- data/lib/sdl2_events.rb +575 -564
- data/lib/sdl2_filesystem.rb +52 -52
- data/lib/sdl2_framerate.rb +74 -74
- data/lib/sdl2_gamecontroller.rb +345 -329
- data/lib/sdl2_gesture.rb +61 -61
- data/lib/sdl2_gfxPrimitives.rb +283 -283
- data/lib/sdl2_guid.rb +58 -0
- data/lib/sdl2_haptic.rb +301 -301
- data/lib/sdl2_hidapi.rb +139 -139
- data/lib/sdl2_hints.rb +240 -221
- data/lib/sdl2_image.rb +296 -232
- data/lib/sdl2_imageFilter.rb +164 -164
- data/lib/sdl2_joystick.rb +332 -294
- data/lib/sdl2_keyboard.rb +129 -125
- data/lib/sdl2_keycode.rb +311 -307
- data/lib/sdl2_log.rb +131 -131
- data/lib/sdl2_main.rb +74 -74
- data/lib/sdl2_messagebox.rb +102 -102
- data/lib/sdl2_misc.rb +48 -48
- data/lib/sdl2_mixer.rb +464 -392
- data/lib/sdl2_mouse.rb +136 -136
- data/lib/sdl2_pixels.rb +240 -240
- data/lib/sdl2_platform.rb +48 -48
- data/lib/sdl2_power.rb +54 -54
- data/lib/sdl2_rect.rb +145 -145
- data/lib/sdl2_render.rb +408 -408
- data/lib/sdl2_rotozoom.rb +76 -76
- data/lib/sdl2_rwops.rb +242 -238
- data/lib/sdl2_scancode.rb +293 -289
- data/lib/sdl2_sensor.rb +115 -115
- data/lib/sdl2_shape.rb +83 -83
- data/lib/sdl2_sound.rb +154 -154
- data/lib/sdl2_stdinc.rb +564 -556
- data/lib/sdl2_surface.rb +229 -229
- data/lib/sdl2_syswm.rb +160 -160
- data/lib/sdl2_timer.rb +74 -74
- data/lib/sdl2_touch.rb +86 -86
- data/lib/sdl2_ttf.rb +414 -358
- data/lib/sdl2_version.rb +67 -67
- data/lib/sdl2_video.rb +549 -540
- data/lib/sdl2_vulkan.rb +72 -72
- metadata +4 -3
data/lib/sdl2_hints.rb
CHANGED
@@ -1,221 +1,240 @@
|
|
1
|
-
# Ruby-SDL2 : Yet another SDL2 wrapper for Ruby
|
2
|
-
#
|
3
|
-
# * https://github.com/vaiorabbit/sdl2-bindings
|
4
|
-
#
|
5
|
-
# [NOTICE] This is an automatically generated file.
|
6
|
-
|
7
|
-
require 'ffi'
|
8
|
-
|
9
|
-
module SDL
|
10
|
-
extend FFI::Library
|
11
|
-
# Define/Macro
|
12
|
-
|
13
|
-
HINT_ACCELEROMETER_AS_JOYSTICK = "SDL_ACCELEROMETER_AS_JOYSTICK"
|
14
|
-
HINT_ALLOW_ALT_TAB_WHILE_GRABBED = "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"
|
15
|
-
HINT_ALLOW_TOPMOST = "SDL_ALLOW_TOPMOST"
|
16
|
-
HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION = "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION"
|
17
|
-
HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION = "SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION"
|
18
|
-
HINT_ANDROID_BLOCK_ON_PAUSE = "SDL_ANDROID_BLOCK_ON_PAUSE"
|
19
|
-
HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO = "SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO"
|
20
|
-
HINT_ANDROID_TRAP_BACK_BUTTON = "SDL_ANDROID_TRAP_BACK_BUTTON"
|
21
|
-
HINT_APP_NAME = "SDL_APP_NAME"
|
22
|
-
HINT_APPLE_TV_CONTROLLER_UI_EVENTS = "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
|
23
|
-
HINT_APPLE_TV_REMOTE_ALLOW_ROTATION = "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
|
24
|
-
HINT_AUDIO_CATEGORY = "SDL_AUDIO_CATEGORY"
|
25
|
-
HINT_AUDIO_DEVICE_APP_NAME = "SDL_AUDIO_DEVICE_APP_NAME"
|
26
|
-
HINT_AUDIO_DEVICE_STREAM_NAME = "SDL_AUDIO_DEVICE_STREAM_NAME"
|
27
|
-
HINT_AUDIO_DEVICE_STREAM_ROLE = "SDL_AUDIO_DEVICE_STREAM_ROLE"
|
28
|
-
HINT_AUDIO_RESAMPLING_MODE = "SDL_AUDIO_RESAMPLING_MODE"
|
29
|
-
HINT_AUTO_UPDATE_JOYSTICKS = "SDL_AUTO_UPDATE_JOYSTICKS"
|
30
|
-
HINT_AUTO_UPDATE_SENSORS = "SDL_AUTO_UPDATE_SENSORS"
|
31
|
-
HINT_BMP_SAVE_LEGACY_FORMAT = "SDL_BMP_SAVE_LEGACY_FORMAT"
|
32
|
-
HINT_DISPLAY_USABLE_BOUNDS = "SDL_DISPLAY_USABLE_BOUNDS"
|
33
|
-
HINT_EMSCRIPTEN_ASYNCIFY = "SDL_EMSCRIPTEN_ASYNCIFY"
|
34
|
-
HINT_EMSCRIPTEN_KEYBOARD_ELEMENT = "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
|
35
|
-
HINT_ENABLE_STEAM_CONTROLLERS = "SDL_ENABLE_STEAM_CONTROLLERS"
|
36
|
-
HINT_EVENT_LOGGING = "SDL_EVENT_LOGGING"
|
37
|
-
HINT_FORCE_RAISEWINDOW = "SDL_HINT_FORCE_RAISEWINDOW"
|
38
|
-
HINT_FRAMEBUFFER_ACCELERATION = "SDL_FRAMEBUFFER_ACCELERATION"
|
39
|
-
HINT_GAMECONTROLLERCONFIG = "SDL_GAMECONTROLLERCONFIG"
|
40
|
-
HINT_GAMECONTROLLERCONFIG_FILE = "SDL_GAMECONTROLLERCONFIG_FILE"
|
41
|
-
HINT_GAMECONTROLLERTYPE = "SDL_GAMECONTROLLERTYPE"
|
42
|
-
HINT_GAMECONTROLLER_IGNORE_DEVICES = "SDL_GAMECONTROLLER_IGNORE_DEVICES"
|
43
|
-
HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT = "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
|
44
|
-
HINT_GAMECONTROLLER_USE_BUTTON_LABELS = "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"
|
45
|
-
HINT_GRAB_KEYBOARD = "SDL_GRAB_KEYBOARD"
|
46
|
-
HINT_IDLE_TIMER_DISABLED = "SDL_IOS_IDLE_TIMER_DISABLED"
|
47
|
-
HINT_IME_INTERNAL_EDITING = "SDL_IME_INTERNAL_EDITING"
|
48
|
-
HINT_IME_SHOW_UI = "SDL_IME_SHOW_UI"
|
49
|
-
HINT_IME_SUPPORT_EXTENDED_TEXT = "SDL_IME_SUPPORT_EXTENDED_TEXT"
|
50
|
-
HINT_IOS_HIDE_HOME_INDICATOR = "SDL_IOS_HIDE_HOME_INDICATOR"
|
51
|
-
HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS = "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
|
52
|
-
HINT_JOYSTICK_HIDAPI = "SDL_JOYSTICK_HIDAPI"
|
53
|
-
HINT_JOYSTICK_HIDAPI_GAMECUBE = "SDL_JOYSTICK_HIDAPI_GAMECUBE"
|
54
|
-
HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE = "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE"
|
55
|
-
HINT_JOYSTICK_HIDAPI_JOY_CONS = "SDL_JOYSTICK_HIDAPI_JOY_CONS"
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
:
|
192
|
-
|
193
|
-
|
194
|
-
:
|
195
|
-
:
|
196
|
-
:
|
197
|
-
:
|
198
|
-
:
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
:
|
204
|
-
:
|
205
|
-
:
|
206
|
-
:
|
207
|
-
:
|
208
|
-
:
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
1
|
+
# Ruby-SDL2 : Yet another SDL2 wrapper for Ruby
|
2
|
+
#
|
3
|
+
# * https://github.com/vaiorabbit/sdl2-bindings
|
4
|
+
#
|
5
|
+
# [NOTICE] This is an automatically generated file.
|
6
|
+
|
7
|
+
require 'ffi'
|
8
|
+
|
9
|
+
module SDL
|
10
|
+
extend FFI::Library
|
11
|
+
# Define/Macro
|
12
|
+
|
13
|
+
HINT_ACCELEROMETER_AS_JOYSTICK = "SDL_ACCELEROMETER_AS_JOYSTICK"
|
14
|
+
HINT_ALLOW_ALT_TAB_WHILE_GRABBED = "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"
|
15
|
+
HINT_ALLOW_TOPMOST = "SDL_ALLOW_TOPMOST"
|
16
|
+
HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION = "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION"
|
17
|
+
HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION = "SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION"
|
18
|
+
HINT_ANDROID_BLOCK_ON_PAUSE = "SDL_ANDROID_BLOCK_ON_PAUSE"
|
19
|
+
HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO = "SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO"
|
20
|
+
HINT_ANDROID_TRAP_BACK_BUTTON = "SDL_ANDROID_TRAP_BACK_BUTTON"
|
21
|
+
HINT_APP_NAME = "SDL_APP_NAME"
|
22
|
+
HINT_APPLE_TV_CONTROLLER_UI_EVENTS = "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
|
23
|
+
HINT_APPLE_TV_REMOTE_ALLOW_ROTATION = "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
|
24
|
+
HINT_AUDIO_CATEGORY = "SDL_AUDIO_CATEGORY"
|
25
|
+
HINT_AUDIO_DEVICE_APP_NAME = "SDL_AUDIO_DEVICE_APP_NAME"
|
26
|
+
HINT_AUDIO_DEVICE_STREAM_NAME = "SDL_AUDIO_DEVICE_STREAM_NAME"
|
27
|
+
HINT_AUDIO_DEVICE_STREAM_ROLE = "SDL_AUDIO_DEVICE_STREAM_ROLE"
|
28
|
+
HINT_AUDIO_RESAMPLING_MODE = "SDL_AUDIO_RESAMPLING_MODE"
|
29
|
+
HINT_AUTO_UPDATE_JOYSTICKS = "SDL_AUTO_UPDATE_JOYSTICKS"
|
30
|
+
HINT_AUTO_UPDATE_SENSORS = "SDL_AUTO_UPDATE_SENSORS"
|
31
|
+
HINT_BMP_SAVE_LEGACY_FORMAT = "SDL_BMP_SAVE_LEGACY_FORMAT"
|
32
|
+
HINT_DISPLAY_USABLE_BOUNDS = "SDL_DISPLAY_USABLE_BOUNDS"
|
33
|
+
HINT_EMSCRIPTEN_ASYNCIFY = "SDL_EMSCRIPTEN_ASYNCIFY"
|
34
|
+
HINT_EMSCRIPTEN_KEYBOARD_ELEMENT = "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
|
35
|
+
HINT_ENABLE_STEAM_CONTROLLERS = "SDL_ENABLE_STEAM_CONTROLLERS"
|
36
|
+
HINT_EVENT_LOGGING = "SDL_EVENT_LOGGING"
|
37
|
+
HINT_FORCE_RAISEWINDOW = "SDL_HINT_FORCE_RAISEWINDOW"
|
38
|
+
HINT_FRAMEBUFFER_ACCELERATION = "SDL_FRAMEBUFFER_ACCELERATION"
|
39
|
+
HINT_GAMECONTROLLERCONFIG = "SDL_GAMECONTROLLERCONFIG"
|
40
|
+
HINT_GAMECONTROLLERCONFIG_FILE = "SDL_GAMECONTROLLERCONFIG_FILE"
|
41
|
+
HINT_GAMECONTROLLERTYPE = "SDL_GAMECONTROLLERTYPE"
|
42
|
+
HINT_GAMECONTROLLER_IGNORE_DEVICES = "SDL_GAMECONTROLLER_IGNORE_DEVICES"
|
43
|
+
HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT = "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
|
44
|
+
HINT_GAMECONTROLLER_USE_BUTTON_LABELS = "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"
|
45
|
+
HINT_GRAB_KEYBOARD = "SDL_GRAB_KEYBOARD"
|
46
|
+
HINT_IDLE_TIMER_DISABLED = "SDL_IOS_IDLE_TIMER_DISABLED"
|
47
|
+
HINT_IME_INTERNAL_EDITING = "SDL_IME_INTERNAL_EDITING"
|
48
|
+
HINT_IME_SHOW_UI = "SDL_IME_SHOW_UI"
|
49
|
+
HINT_IME_SUPPORT_EXTENDED_TEXT = "SDL_IME_SUPPORT_EXTENDED_TEXT"
|
50
|
+
HINT_IOS_HIDE_HOME_INDICATOR = "SDL_IOS_HIDE_HOME_INDICATOR"
|
51
|
+
HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS = "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
|
52
|
+
HINT_JOYSTICK_HIDAPI = "SDL_JOYSTICK_HIDAPI"
|
53
|
+
HINT_JOYSTICK_HIDAPI_GAMECUBE = "SDL_JOYSTICK_HIDAPI_GAMECUBE"
|
54
|
+
HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE = "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE"
|
55
|
+
HINT_JOYSTICK_HIDAPI_JOY_CONS = "SDL_JOYSTICK_HIDAPI_JOY_CONS"
|
56
|
+
HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS = "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS"
|
57
|
+
HINT_JOYSTICK_HIDAPI_LUNA = "SDL_JOYSTICK_HIDAPI_LUNA"
|
58
|
+
HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC = "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC"
|
59
|
+
HINT_JOYSTICK_HIDAPI_SHIELD = "SDL_JOYSTICK_HIDAPI_SHIELD"
|
60
|
+
HINT_JOYSTICK_HIDAPI_PS4 = "SDL_JOYSTICK_HIDAPI_PS4"
|
61
|
+
HINT_JOYSTICK_HIDAPI_PS4_RUMBLE = "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
|
62
|
+
HINT_JOYSTICK_HIDAPI_PS5 = "SDL_JOYSTICK_HIDAPI_PS5"
|
63
|
+
HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED = "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"
|
64
|
+
HINT_JOYSTICK_HIDAPI_PS5_RUMBLE = "SDL_JOYSTICK_HIDAPI_PS5_RUMBLE"
|
65
|
+
HINT_JOYSTICK_HIDAPI_STADIA = "SDL_JOYSTICK_HIDAPI_STADIA"
|
66
|
+
HINT_JOYSTICK_HIDAPI_STEAM = "SDL_JOYSTICK_HIDAPI_STEAM"
|
67
|
+
HINT_JOYSTICK_HIDAPI_SWITCH = "SDL_JOYSTICK_HIDAPI_SWITCH"
|
68
|
+
HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED = "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
|
69
|
+
HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED = "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"
|
70
|
+
HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED = "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"
|
71
|
+
HINT_JOYSTICK_HIDAPI_XBOX = "SDL_JOYSTICK_HIDAPI_XBOX"
|
72
|
+
HINT_JOYSTICK_RAWINPUT = "SDL_JOYSTICK_RAWINPUT"
|
73
|
+
HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT = "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
|
74
|
+
HINT_JOYSTICK_ROG_CHAKRAM = "SDL_JOYSTICK_ROG_CHAKRAM"
|
75
|
+
HINT_JOYSTICK_THREAD = "SDL_JOYSTICK_THREAD"
|
76
|
+
HINT_KMSDRM_REQUIRE_DRM_MASTER = "SDL_KMSDRM_REQUIRE_DRM_MASTER"
|
77
|
+
HINT_JOYSTICK_DEVICE = "SDL_JOYSTICK_DEVICE"
|
78
|
+
HINT_LINUX_DIGITAL_HATS = "SDL_LINUX_DIGITAL_HATS"
|
79
|
+
HINT_LINUX_HAT_DEADZONES = "SDL_LINUX_HAT_DEADZONES"
|
80
|
+
HINT_LINUX_JOYSTICK_CLASSIC = "SDL_LINUX_JOYSTICK_CLASSIC"
|
81
|
+
HINT_LINUX_JOYSTICK_DEADZONES = "SDL_LINUX_JOYSTICK_DEADZONES"
|
82
|
+
HINT_MAC_BACKGROUND_APP = "SDL_MAC_BACKGROUND_APP"
|
83
|
+
HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK = "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
|
84
|
+
HINT_MAC_OPENGL_ASYNC_DISPATCH = "SDL_MAC_OPENGL_ASYNC_DISPATCH"
|
85
|
+
HINT_MOUSE_DOUBLE_CLICK_RADIUS = "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
|
86
|
+
HINT_MOUSE_DOUBLE_CLICK_TIME = "SDL_MOUSE_DOUBLE_CLICK_TIME"
|
87
|
+
HINT_MOUSE_FOCUS_CLICKTHROUGH = "SDL_MOUSE_FOCUS_CLICKTHROUGH"
|
88
|
+
HINT_MOUSE_NORMAL_SPEED_SCALE = "SDL_MOUSE_NORMAL_SPEED_SCALE"
|
89
|
+
HINT_MOUSE_RELATIVE_MODE_CENTER = "SDL_MOUSE_RELATIVE_MODE_CENTER"
|
90
|
+
HINT_MOUSE_RELATIVE_MODE_WARP = "SDL_MOUSE_RELATIVE_MODE_WARP"
|
91
|
+
HINT_MOUSE_RELATIVE_SCALING = "SDL_MOUSE_RELATIVE_SCALING"
|
92
|
+
HINT_MOUSE_RELATIVE_SPEED_SCALE = "SDL_MOUSE_RELATIVE_SPEED_SCALE"
|
93
|
+
HINT_MOUSE_RELATIVE_WARP_MOTION = "SDL_MOUSE_RELATIVE_WARP_MOTION"
|
94
|
+
HINT_MOUSE_TOUCH_EVENTS = "SDL_MOUSE_TOUCH_EVENTS"
|
95
|
+
HINT_MOUSE_AUTO_CAPTURE = "SDL_MOUSE_AUTO_CAPTURE"
|
96
|
+
HINT_NO_SIGNAL_HANDLERS = "SDL_NO_SIGNAL_HANDLERS"
|
97
|
+
HINT_OPENGL_ES_DRIVER = "SDL_OPENGL_ES_DRIVER"
|
98
|
+
HINT_ORIENTATIONS = "SDL_IOS_ORIENTATIONS"
|
99
|
+
HINT_POLL_SENTINEL = "SDL_POLL_SENTINEL"
|
100
|
+
HINT_PREFERRED_LOCALES = "SDL_PREFERRED_LOCALES"
|
101
|
+
HINT_QTWAYLAND_CONTENT_ORIENTATION = "SDL_QTWAYLAND_CONTENT_ORIENTATION"
|
102
|
+
HINT_QTWAYLAND_WINDOW_FLAGS = "SDL_QTWAYLAND_WINDOW_FLAGS"
|
103
|
+
HINT_RENDER_BATCHING = "SDL_RENDER_BATCHING"
|
104
|
+
HINT_RENDER_LINE_METHOD = "SDL_RENDER_LINE_METHOD"
|
105
|
+
HINT_RENDER_DIRECT3D11_DEBUG = "SDL_RENDER_DIRECT3D11_DEBUG"
|
106
|
+
HINT_RENDER_DIRECT3D_THREADSAFE = "SDL_RENDER_DIRECT3D_THREADSAFE"
|
107
|
+
HINT_RENDER_DRIVER = "SDL_RENDER_DRIVER"
|
108
|
+
HINT_RENDER_LOGICAL_SIZE_MODE = "SDL_RENDER_LOGICAL_SIZE_MODE"
|
109
|
+
HINT_RENDER_OPENGL_SHADERS = "SDL_RENDER_OPENGL_SHADERS"
|
110
|
+
HINT_RENDER_SCALE_QUALITY = "SDL_RENDER_SCALE_QUALITY"
|
111
|
+
HINT_RENDER_VSYNC = "SDL_RENDER_VSYNC"
|
112
|
+
HINT_RETURN_KEY_HIDES_IME = "SDL_RETURN_KEY_HIDES_IME"
|
113
|
+
HINT_RPI_VIDEO_LAYER = "SDL_RPI_VIDEO_LAYER"
|
114
|
+
HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME = "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"
|
115
|
+
HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL = "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"
|
116
|
+
HINT_THREAD_PRIORITY_POLICY = "SDL_THREAD_PRIORITY_POLICY"
|
117
|
+
HINT_THREAD_STACK_SIZE = "SDL_THREAD_STACK_SIZE"
|
118
|
+
HINT_TIMER_RESOLUTION = "SDL_TIMER_RESOLUTION"
|
119
|
+
HINT_TOUCH_MOUSE_EVENTS = "SDL_TOUCH_MOUSE_EVENTS"
|
120
|
+
HINT_VITA_TOUCH_MOUSE_DEVICE = "SDL_HINT_VITA_TOUCH_MOUSE_DEVICE"
|
121
|
+
HINT_TV_REMOTE_AS_JOYSTICK = "SDL_TV_REMOTE_AS_JOYSTICK"
|
122
|
+
HINT_VIDEO_ALLOW_SCREENSAVER = "SDL_VIDEO_ALLOW_SCREENSAVER"
|
123
|
+
HINT_VIDEO_DOUBLE_BUFFER = "SDL_VIDEO_DOUBLE_BUFFER"
|
124
|
+
HINT_VIDEO_EGL_ALLOW_TRANSPARENCY = "SDL_VIDEO_EGL_ALLOW_TRANSPARENCY"
|
125
|
+
HINT_VIDEO_EXTERNAL_CONTEXT = "SDL_VIDEO_EXTERNAL_CONTEXT"
|
126
|
+
HINT_VIDEO_HIGHDPI_DISABLED = "SDL_VIDEO_HIGHDPI_DISABLED"
|
127
|
+
HINT_VIDEO_MAC_FULLSCREEN_SPACES = "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
|
128
|
+
HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS = "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
|
129
|
+
HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR = "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
|
130
|
+
HINT_VIDEO_WAYLAND_PREFER_LIBDECOR = "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
|
131
|
+
HINT_VIDEO_WAYLAND_MODE_EMULATION = "SDL_VIDEO_WAYLAND_MODE_EMULATION"
|
132
|
+
HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT = "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
|
133
|
+
HINT_VIDEO_FOREIGN_WINDOW_OPENGL = "SDL_VIDEO_FOREIGN_WINDOW_OPENGL"
|
134
|
+
HINT_VIDEO_FOREIGN_WINDOW_VULKAN = "SDL_VIDEO_FOREIGN_WINDOW_VULKAN"
|
135
|
+
HINT_VIDEO_WIN_D3DCOMPILER = "SDL_VIDEO_WIN_D3DCOMPILER"
|
136
|
+
HINT_VIDEO_X11_FORCE_EGL = "SDL_VIDEO_X11_FORCE_EGL"
|
137
|
+
HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR = "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
|
138
|
+
HINT_VIDEO_X11_NET_WM_PING = "SDL_VIDEO_X11_NET_WM_PING"
|
139
|
+
HINT_VIDEO_X11_WINDOW_VISUALID = "SDL_VIDEO_X11_WINDOW_VISUALID"
|
140
|
+
HINT_VIDEO_X11_XINERAMA = "SDL_VIDEO_X11_XINERAMA"
|
141
|
+
HINT_VIDEO_X11_XRANDR = "SDL_VIDEO_X11_XRANDR"
|
142
|
+
HINT_VIDEO_X11_XVIDMODE = "SDL_VIDEO_X11_XVIDMODE"
|
143
|
+
HINT_WAVE_FACT_CHUNK = "SDL_WAVE_FACT_CHUNK"
|
144
|
+
HINT_WAVE_RIFF_CHUNK_SIZE = "SDL_WAVE_RIFF_CHUNK_SIZE"
|
145
|
+
HINT_WAVE_TRUNCATION = "SDL_WAVE_TRUNCATION"
|
146
|
+
HINT_WINDOWS_DISABLE_THREAD_NAMING = "SDL_WINDOWS_DISABLE_THREAD_NAMING"
|
147
|
+
HINT_WINDOWS_ENABLE_MESSAGELOOP = "SDL_WINDOWS_ENABLE_MESSAGELOOP"
|
148
|
+
HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS = "SDL_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS"
|
149
|
+
HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL = "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"
|
150
|
+
HINT_WINDOWS_INTRESOURCE_ICON = "SDL_WINDOWS_INTRESOURCE_ICON"
|
151
|
+
HINT_WINDOWS_INTRESOURCE_ICON_SMALL = "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
|
152
|
+
HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 = "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
|
153
|
+
HINT_WINDOWS_USE_D3D9EX = "SDL_WINDOWS_USE_D3D9EX"
|
154
|
+
HINT_WINDOWS_DPI_AWARENESS = "SDL_WINDOWS_DPI_AWARENESS"
|
155
|
+
HINT_WINDOWS_DPI_SCALING = "SDL_WINDOWS_DPI_SCALING"
|
156
|
+
HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN = "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
|
157
|
+
HINT_WINDOW_NO_ACTIVATION_WHEN_SHOWN = "SDL_WINDOW_NO_ACTIVATION_WHEN_SHOWN"
|
158
|
+
HINT_WINRT_HANDLE_BACK_BUTTON = "SDL_WINRT_HANDLE_BACK_BUTTON"
|
159
|
+
HINT_WINRT_PRIVACY_POLICY_LABEL = "SDL_WINRT_PRIVACY_POLICY_LABEL"
|
160
|
+
HINT_WINRT_PRIVACY_POLICY_URL = "SDL_WINRT_PRIVACY_POLICY_URL"
|
161
|
+
HINT_X11_FORCE_OVERRIDE_REDIRECT = "SDL_X11_FORCE_OVERRIDE_REDIRECT"
|
162
|
+
HINT_XINPUT_ENABLED = "SDL_XINPUT_ENABLED"
|
163
|
+
HINT_DIRECTINPUT_ENABLED = "SDL_DIRECTINPUT_ENABLED"
|
164
|
+
HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING = "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING"
|
165
|
+
HINT_AUDIO_INCLUDE_MONITORS = "SDL_AUDIO_INCLUDE_MONITORS"
|
166
|
+
HINT_X11_WINDOW_TYPE = "SDL_X11_WINDOW_TYPE"
|
167
|
+
HINT_QUIT_ON_LAST_WINDOW_CLOSE = "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
|
168
|
+
HINT_VIDEODRIVER = "SDL_VIDEODRIVER"
|
169
|
+
HINT_AUDIODRIVER = "SDL_AUDIODRIVER"
|
170
|
+
HINT_KMSDRM_DEVICE_INDEX = "SDL_KMSDRM_DEVICE_INDEX"
|
171
|
+
HINT_TRACKPAD_IS_TOUCH_ONLY = "SDL_TRACKPAD_IS_TOUCH_ONLY"
|
172
|
+
|
173
|
+
# Enum
|
174
|
+
|
175
|
+
HINT_DEFAULT = 0
|
176
|
+
HINT_NORMAL = 1
|
177
|
+
HINT_OVERRIDE = 2
|
178
|
+
|
179
|
+
# Typedef
|
180
|
+
|
181
|
+
typedef :int, :SDL_HintPriority
|
182
|
+
callback :SDL_HintCallback, [:pointer, :pointer, :pointer, :pointer], :void
|
183
|
+
|
184
|
+
# Struct
|
185
|
+
|
186
|
+
|
187
|
+
# Function
|
188
|
+
|
189
|
+
def self.setup_hints_symbols(output_error = false)
|
190
|
+
symbols = [
|
191
|
+
:SDL_SetHintWithPriority,
|
192
|
+
:SDL_SetHint,
|
193
|
+
:SDL_ResetHint,
|
194
|
+
:SDL_GetHint,
|
195
|
+
:SDL_GetHintBoolean,
|
196
|
+
:SDL_AddHintCallback,
|
197
|
+
:SDL_DelHintCallback,
|
198
|
+
:SDL_ClearHints,
|
199
|
+
]
|
200
|
+
apis = {
|
201
|
+
:SDL_SetHintWithPriority => :SetHintWithPriority,
|
202
|
+
:SDL_SetHint => :SetHint,
|
203
|
+
:SDL_ResetHint => :ResetHint,
|
204
|
+
:SDL_GetHint => :GetHint,
|
205
|
+
:SDL_GetHintBoolean => :GetHintBoolean,
|
206
|
+
:SDL_AddHintCallback => :AddHintCallback,
|
207
|
+
:SDL_DelHintCallback => :DelHintCallback,
|
208
|
+
:SDL_ClearHints => :ClearHints,
|
209
|
+
}
|
210
|
+
args = {
|
211
|
+
:SDL_SetHintWithPriority => [:pointer, :pointer, :int],
|
212
|
+
:SDL_SetHint => [:pointer, :pointer],
|
213
|
+
:SDL_ResetHint => [:pointer],
|
214
|
+
:SDL_GetHint => [:pointer],
|
215
|
+
:SDL_GetHintBoolean => [:pointer, :int],
|
216
|
+
:SDL_AddHintCallback => [:pointer, :SDL_HintCallback, :pointer],
|
217
|
+
:SDL_DelHintCallback => [:pointer, :SDL_HintCallback, :pointer],
|
218
|
+
:SDL_ClearHints => [],
|
219
|
+
}
|
220
|
+
retvals = {
|
221
|
+
:SDL_SetHintWithPriority => :int,
|
222
|
+
:SDL_SetHint => :int,
|
223
|
+
:SDL_ResetHint => :int,
|
224
|
+
:SDL_GetHint => :pointer,
|
225
|
+
:SDL_GetHintBoolean => :int,
|
226
|
+
:SDL_AddHintCallback => :void,
|
227
|
+
:SDL_DelHintCallback => :void,
|
228
|
+
:SDL_ClearHints => :void,
|
229
|
+
}
|
230
|
+
symbols.each do |sym|
|
231
|
+
begin
|
232
|
+
attach_function apis[sym], sym, args[sym], retvals[sym]
|
233
|
+
rescue FFI::NotFoundError => error
|
234
|
+
$stderr.puts("[Warning] Failed to import #{sym} (#{error}).") if output_error
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
end
|
240
|
+
|