SDLRuby 0.1.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/lib/SDLRuby/event/accessor.rb +62 -63
  4. data/lib/SDLRuby/event/type.rb +1 -1
  5. data/lib/SDLRuby/event.rb +101 -80
  6. data/lib/SDLRuby/sdl/include/SDL.h.rb +11 -0
  7. data/lib/SDLRuby/sdl/include/SDL_audio.h.rb +125 -14
  8. data/lib/SDLRuby/sdl/include/SDL_blendmode.h.rb +24 -0
  9. data/lib/SDLRuby/sdl/include/SDL_endian.h.rb +10 -1
  10. data/lib/SDLRuby/sdl/include/SDL_error.h.rb +21 -2
  11. data/lib/SDLRuby/sdl/include/SDL_events.h.rb +458 -18
  12. data/lib/SDLRuby/sdl/include/SDL_gamecontroller.h.rb +92 -11
  13. data/lib/SDLRuby/sdl/include/SDL_guid.h.rb +10 -4
  14. data/lib/SDLRuby/sdl/include/SDL_hints.h.rb +186 -1
  15. data/lib/SDLRuby/sdl/include/SDL_joystick.h.rb +72 -10
  16. data/lib/SDLRuby/sdl/include/SDL_keyboard.h.rb +13 -4
  17. data/lib/SDLRuby/sdl/include/SDL_keycode.h.rb +287 -2
  18. data/lib/SDLRuby/sdl/include/SDL_locale.h.rb +9 -2
  19. data/lib/SDLRuby/sdl/include/SDL_messagebox.h.rb +50 -2
  20. data/lib/SDLRuby/sdl/include/SDL_mouse.h.rb +39 -8
  21. data/lib/SDLRuby/sdl/include/SDL_pixels.h.rb +271 -11
  22. data/lib/SDLRuby/sdl/include/SDL_rect.h.rb +43 -14
  23. data/lib/SDLRuby/sdl/include/SDL_render.h.rb +112 -75
  24. data/lib/SDLRuby/sdl/include/SDL_rwops.h.rb +63 -19
  25. data/lib/SDLRuby/sdl/include/SDL_scancode.h.rb +248 -1
  26. data/lib/SDLRuby/sdl/include/SDL_shape.h.rb +33 -6
  27. data/lib/SDLRuby/sdl/include/SDL_stdinc.h.rb +42 -4
  28. data/lib/SDLRuby/sdl/include/SDL_surface.h.rb +92 -29
  29. data/lib/SDLRuby/sdl/include/SDL_syswm.h.rb +1 -7
  30. data/lib/SDLRuby/sdl/include/SDL_timer.h.rb +11 -3
  31. data/lib/SDLRuby/sdl/include/SDL_version.h.rb +10 -2
  32. data/lib/SDLRuby/sdl/include/SDL_video.h.rb +221 -74
  33. data/lib/SDLRuby/sdl/sdl.rb +0 -50
  34. data/lib/SDLRuby/sdl.rb +7 -8
  35. data/lib/SDLRuby/version.rb +1 -1
  36. data/sig/lib/SDLRuby/event/accessor.rbs +157 -0
  37. data/sig/lib/SDLRuby/event/type.rbs +67 -0
  38. data/sig/lib/SDLRuby/event.rbs +47 -0
  39. data/sig/lib/SDLRuby/sdl.rbs +655 -0
  40. metadata +6 -22
  41. data/lib/SDLRuby/sdl/sdl_audio.rb +0 -75
  42. data/lib/SDLRuby/sdl/sdl_blendmode.rb +0 -10
  43. data/lib/SDLRuby/sdl/sdl_error.rb +0 -5
  44. data/lib/SDLRuby/sdl/sdl_events.rb +0 -470
  45. data/lib/SDLRuby/sdl/sdl_hints.rb +0 -9
  46. data/lib/SDLRuby/sdl/sdl_keyboard.rb +0 -12
  47. data/lib/SDLRuby/sdl/sdl_locale.rb +0 -8
  48. data/lib/SDLRuby/sdl/sdl_message_box.rb +0 -7
  49. data/lib/SDLRuby/sdl/sdl_mouse.rb +0 -32
  50. data/lib/SDLRuby/sdl/sdl_palette.rb +0 -12
  51. data/lib/SDLRuby/sdl/sdl_pixels.rb +0 -138
  52. data/lib/SDLRuby/sdl/sdl_rect.rb +0 -11
  53. data/lib/SDLRuby/sdl/sdl_render.rb +0 -35
  54. data/lib/SDLRuby/sdl/sdl_rw_ops.rb +0 -29
  55. data/lib/SDLRuby/sdl/sdl_scancode.rb +0 -255
  56. data/lib/SDLRuby/sdl/sdl_surface.rb +0 -27
  57. data/lib/SDLRuby/sdl/sdl_version.rb +0 -5
  58. data/lib/SDLRuby/sdl/sdl_video.rb +0 -104
  59. data/sig/SDLRuby/event.rbs +0 -104
  60. data/sig/SDLRuby/sdl.rbs +0 -606
@@ -1,13 +1,198 @@
1
+ # frozen_string_literal: true
2
+ # encoding: US-ASCII
3
+
1
4
  module SDLRuby::SDL
2
- require_relative 'SDL_stdinc.h.rb'
5
+ require_relative "SDL_stdinc.h"
6
+
7
+ SDL_HINT_ACCELEROMETER_AS_JOYSTICK = "SDL_ACCELEROMETER_AS_JOYSTICK"
8
+ SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED = "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"
9
+ SDL_HINT_ALLOW_TOPMOST = "SDL_ALLOW_TOPMOST"
10
+ SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION = "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION"
11
+ SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION = "SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION"
12
+ SDL_HINT_ANDROID_BLOCK_ON_PAUSE = "SDL_ANDROID_BLOCK_ON_PAUSE"
13
+ SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO = "SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO"
14
+ SDL_HINT_ANDROID_TRAP_BACK_BUTTON = "SDL_ANDROID_TRAP_BACK_BUTTON"
15
+ SDL_HINT_APP_NAME = "SDL_APP_NAME"
16
+ SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS = "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
17
+ SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION = "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
18
+ SDL_HINT_AUDIO_CATEGORY = "SDL_AUDIO_CATEGORY"
19
+ SDL_HINT_AUDIO_DEVICE_APP_NAME = "SDL_AUDIO_DEVICE_APP_NAME"
20
+ SDL_HINT_AUDIO_DEVICE_STREAM_NAME = "SDL_AUDIO_DEVICE_STREAM_NAME"
21
+ SDL_HINT_AUDIO_DEVICE_STREAM_ROLE = "SDL_AUDIO_DEVICE_STREAM_ROLE"
22
+ SDL_HINT_AUDIO_RESAMPLING_MODE = "SDL_AUDIO_RESAMPLING_MODE"
23
+ SDL_HINT_AUTO_UPDATE_JOYSTICKS = "SDL_AUTO_UPDATE_JOYSTICKS"
24
+ SDL_HINT_AUTO_UPDATE_SENSORS = "SDL_AUTO_UPDATE_SENSORS"
25
+ SDL_HINT_BMP_SAVE_LEGACY_FORMAT = "SDL_BMP_SAVE_LEGACY_FORMAT"
26
+ SDL_HINT_DISPLAY_USABLE_BOUNDS = "SDL_DISPLAY_USABLE_BOUNDS"
27
+ SDL_HINT_EMSCRIPTEN_ASYNCIFY = "SDL_EMSCRIPTEN_ASYNCIFY"
28
+ SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT = "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
29
+ SDL_HINT_ENABLE_SCREEN_KEYBOARD = "SDL_ENABLE_SCREEN_KEYBOARD"
30
+ SDL_HINT_ENABLE_STEAM_CONTROLLERS = "SDL_ENABLE_STEAM_CONTROLLERS"
31
+ SDL_HINT_EVENT_LOGGING = "SDL_EVENT_LOGGING"
32
+ SDL_HINT_FORCE_RAISEWINDOW = "SDL_HINT_FORCE_RAISEWINDOW"
33
+ SDL_HINT_FRAMEBUFFER_ACCELERATION = "SDL_FRAMEBUFFER_ACCELERATION"
34
+ SDL_HINT_GAMECONTROLLERCONFIG = "SDL_GAMECONTROLLERCONFIG"
35
+ SDL_HINT_GAMECONTROLLERCONFIG_FILE = "SDL_GAMECONTROLLERCONFIG_FILE"
36
+ SDL_HINT_GAMECONTROLLERTYPE = "SDL_GAMECONTROLLERTYPE"
37
+ SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES = "SDL_GAMECONTROLLER_IGNORE_DEVICES"
38
+ SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT = "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
39
+ SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS = "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"
40
+ SDL_HINT_GRAB_KEYBOARD = "SDL_GRAB_KEYBOARD"
41
+ SDL_HINT_HIDAPI_IGNORE_DEVICES = "SDL_HIDAPI_IGNORE_DEVICES"
42
+ SDL_HINT_IDLE_TIMER_DISABLED = "SDL_IOS_IDLE_TIMER_DISABLED"
43
+ SDL_HINT_IME_INTERNAL_EDITING = "SDL_IME_INTERNAL_EDITING"
44
+ SDL_HINT_IME_SHOW_UI = "SDL_IME_SHOW_UI"
45
+ SDL_HINT_IME_SUPPORT_EXTENDED_TEXT = "SDL_IME_SUPPORT_EXTENDED_TEXT"
46
+ SDL_HINT_IOS_HIDE_HOME_INDICATOR = "SDL_IOS_HIDE_HOME_INDICATOR"
47
+ SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS = "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
48
+ SDL_HINT_JOYSTICK_HIDAPI = "SDL_JOYSTICK_HIDAPI"
49
+ SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE = "SDL_JOYSTICK_HIDAPI_GAMECUBE"
50
+ SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE = "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE"
51
+ SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS = "SDL_JOYSTICK_HIDAPI_JOY_CONS"
52
+ SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS = "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS"
53
+ SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS = "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"
54
+ SDL_HINT_JOYSTICK_HIDAPI_LUNA = "SDL_JOYSTICK_HIDAPI_LUNA"
55
+ SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC = "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC"
56
+ SDL_HINT_JOYSTICK_HIDAPI_SHIELD = "SDL_JOYSTICK_HIDAPI_SHIELD"
57
+ SDL_HINT_JOYSTICK_HIDAPI_PS3 = "SDL_JOYSTICK_HIDAPI_PS3"
58
+ SDL_HINT_JOYSTICK_HIDAPI_PS4 = "SDL_JOYSTICK_HIDAPI_PS4"
59
+ SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE = "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
60
+ SDL_HINT_JOYSTICK_HIDAPI_PS5 = "SDL_JOYSTICK_HIDAPI_PS5"
61
+ SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED = "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"
62
+ SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE = "SDL_JOYSTICK_HIDAPI_PS5_RUMBLE"
63
+ SDL_HINT_JOYSTICK_HIDAPI_STADIA = "SDL_JOYSTICK_HIDAPI_STADIA"
64
+ SDL_HINT_JOYSTICK_HIDAPI_STEAM = "SDL_JOYSTICK_HIDAPI_STEAM"
65
+ SDL_HINT_JOYSTICK_HIDAPI_SWITCH = "SDL_JOYSTICK_HIDAPI_SWITCH"
66
+ SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED = "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
67
+ SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED = "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"
68
+ SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED = "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"
69
+ SDL_HINT_JOYSTICK_HIDAPI_WII = "SDL_JOYSTICK_HIDAPI_WII"
70
+ SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED = "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED"
71
+ SDL_HINT_JOYSTICK_HIDAPI_XBOX = "SDL_JOYSTICK_HIDAPI_XBOX"
72
+ SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 = "SDL_JOYSTICK_HIDAPI_XBOX_360"
73
+ SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED = "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED"
74
+ SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS = "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"
75
+ SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE = "SDL_JOYSTICK_HIDAPI_XBOX_ONE"
76
+ SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED = "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"
77
+ SDL_HINT_JOYSTICK_RAWINPUT = "SDL_JOYSTICK_RAWINPUT"
78
+ SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT = "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
79
+ SDL_HINT_JOYSTICK_ROG_CHAKRAM = "SDL_JOYSTICK_ROG_CHAKRAM"
80
+ SDL_HINT_JOYSTICK_THREAD = "SDL_JOYSTICK_THREAD"
81
+ SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER = "SDL_KMSDRM_REQUIRE_DRM_MASTER"
82
+ SDL_HINT_JOYSTICK_DEVICE = "SDL_JOYSTICK_DEVICE"
83
+ SDL_HINT_LINUX_DIGITAL_HATS = "SDL_LINUX_DIGITAL_HATS"
84
+ SDL_HINT_LINUX_HAT_DEADZONES = "SDL_LINUX_HAT_DEADZONES"
85
+ SDL_HINT_LINUX_JOYSTICK_CLASSIC = "SDL_LINUX_JOYSTICK_CLASSIC"
86
+ SDL_HINT_LINUX_JOYSTICK_DEADZONES = "SDL_LINUX_JOYSTICK_DEADZONES"
87
+ SDL_HINT_MAC_BACKGROUND_APP = "SDL_MAC_BACKGROUND_APP"
88
+ SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK = "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
89
+ SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH = "SDL_MAC_OPENGL_ASYNC_DISPATCH"
90
+ SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS = "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
91
+ SDL_HINT_MOUSE_DOUBLE_CLICK_TIME = "SDL_MOUSE_DOUBLE_CLICK_TIME"
92
+ SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH = "SDL_MOUSE_FOCUS_CLICKTHROUGH"
93
+ SDL_HINT_MOUSE_NORMAL_SPEED_SCALE = "SDL_MOUSE_NORMAL_SPEED_SCALE"
94
+ SDL_HINT_MOUSE_RELATIVE_MODE_CENTER = "SDL_MOUSE_RELATIVE_MODE_CENTER"
95
+ SDL_HINT_MOUSE_RELATIVE_MODE_WARP = "SDL_MOUSE_RELATIVE_MODE_WARP"
96
+ SDL_HINT_MOUSE_RELATIVE_SCALING = "SDL_MOUSE_RELATIVE_SCALING"
97
+ SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE = "SDL_MOUSE_RELATIVE_SPEED_SCALE"
98
+ SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE = "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"
99
+ SDL_HINT_MOUSE_RELATIVE_WARP_MOTION = "SDL_MOUSE_RELATIVE_WARP_MOTION"
100
+ SDL_HINT_MOUSE_TOUCH_EVENTS = "SDL_MOUSE_TOUCH_EVENTS"
101
+ SDL_HINT_MOUSE_AUTO_CAPTURE = "SDL_MOUSE_AUTO_CAPTURE"
102
+ SDL_HINT_NO_SIGNAL_HANDLERS = "SDL_NO_SIGNAL_HANDLERS"
103
+ SDL_HINT_OPENGL_ES_DRIVER = "SDL_OPENGL_ES_DRIVER"
104
+ SDL_HINT_ORIENTATIONS = "SDL_IOS_ORIENTATIONS"
105
+ SDL_HINT_POLL_SENTINEL = "SDL_POLL_SENTINEL"
106
+ SDL_HINT_PREFERRED_LOCALES = "SDL_PREFERRED_LOCALES"
107
+ SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION = "SDL_QTWAYLAND_CONTENT_ORIENTATION"
108
+ SDL_HINT_QTWAYLAND_WINDOW_FLAGS = "SDL_QTWAYLAND_WINDOW_FLAGS"
109
+ SDL_HINT_RENDER_BATCHING = "SDL_RENDER_BATCHING"
110
+ SDL_HINT_RENDER_LINE_METHOD = "SDL_RENDER_LINE_METHOD"
111
+ SDL_HINT_RENDER_DIRECT3D11_DEBUG = "SDL_RENDER_DIRECT3D11_DEBUG"
112
+ SDL_HINT_RENDER_DIRECT3D_THREADSAFE = "SDL_RENDER_DIRECT3D_THREADSAFE"
113
+ SDL_HINT_RENDER_DRIVER = "SDL_RENDER_DRIVER"
114
+ SDL_HINT_RENDER_LOGICAL_SIZE_MODE = "SDL_RENDER_LOGICAL_SIZE_MODE"
115
+ SDL_HINT_RENDER_OPENGL_SHADERS = "SDL_RENDER_OPENGL_SHADERS"
116
+ SDL_HINT_RENDER_SCALE_QUALITY = "SDL_RENDER_SCALE_QUALITY"
117
+ SDL_HINT_RENDER_VSYNC = "SDL_RENDER_VSYNC"
118
+ SDL_HINT_PS2_DYNAMIC_VSYNC = "SDL_PS2_DYNAMIC_VSYNC"
119
+ SDL_HINT_RETURN_KEY_HIDES_IME = "SDL_RETURN_KEY_HIDES_IME"
120
+ SDL_HINT_RPI_VIDEO_LAYER = "SDL_RPI_VIDEO_LAYER"
121
+ SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME = "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"
122
+ SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL = "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"
123
+ SDL_HINT_THREAD_PRIORITY_POLICY = "SDL_THREAD_PRIORITY_POLICY"
124
+ SDL_HINT_THREAD_STACK_SIZE = "SDL_THREAD_STACK_SIZE"
125
+ SDL_HINT_TIMER_RESOLUTION = "SDL_TIMER_RESOLUTION"
126
+ SDL_HINT_TOUCH_MOUSE_EVENTS = "SDL_TOUCH_MOUSE_EVENTS"
127
+ SDL_HINT_VITA_TOUCH_MOUSE_DEVICE = "SDL_HINT_VITA_TOUCH_MOUSE_DEVICE"
128
+ SDL_HINT_TV_REMOTE_AS_JOYSTICK = "SDL_TV_REMOTE_AS_JOYSTICK"
129
+ SDL_HINT_VIDEO_ALLOW_SCREENSAVER = "SDL_VIDEO_ALLOW_SCREENSAVER"
130
+ SDL_HINT_VIDEO_DOUBLE_BUFFER = "SDL_VIDEO_DOUBLE_BUFFER"
131
+ SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY = "SDL_VIDEO_EGL_ALLOW_TRANSPARENCY"
132
+ SDL_HINT_VIDEO_EXTERNAL_CONTEXT = "SDL_VIDEO_EXTERNAL_CONTEXT"
133
+ SDL_HINT_VIDEO_HIGHDPI_DISABLED = "SDL_VIDEO_HIGHDPI_DISABLED"
134
+ SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES = "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
135
+ SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS = "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
136
+ SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR = "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
137
+ SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR = "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
138
+ SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION = "SDL_VIDEO_WAYLAND_MODE_EMULATION"
139
+ SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP = "SDL_VIDEO_WAYLAND_EMULATE_MOUSE_WARP"
140
+ SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT = "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
141
+ SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL = "SDL_VIDEO_FOREIGN_WINDOW_OPENGL"
142
+ SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN = "SDL_VIDEO_FOREIGN_WINDOW_VULKAN"
143
+ SDL_HINT_VIDEO_WIN_D3DCOMPILER = "SDL_VIDEO_WIN_D3DCOMPILER"
144
+ SDL_HINT_VIDEO_X11_FORCE_EGL = "SDL_VIDEO_X11_FORCE_EGL"
145
+ SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR = "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
146
+ SDL_HINT_VIDEO_X11_NET_WM_PING = "SDL_VIDEO_X11_NET_WM_PING"
147
+ SDL_HINT_VIDEO_X11_WINDOW_VISUALID = "SDL_VIDEO_X11_WINDOW_VISUALID"
148
+ SDL_HINT_VIDEO_X11_XINERAMA = "SDL_VIDEO_X11_XINERAMA"
149
+ SDL_HINT_VIDEO_X11_XRANDR = "SDL_VIDEO_X11_XRANDR"
150
+ SDL_HINT_VIDEO_X11_XVIDMODE = "SDL_VIDEO_X11_XVIDMODE"
151
+ SDL_HINT_WAVE_FACT_CHUNK = "SDL_WAVE_FACT_CHUNK"
152
+ SDL_HINT_WAVE_RIFF_CHUNK_SIZE = "SDL_WAVE_RIFF_CHUNK_SIZE"
153
+ SDL_HINT_WAVE_TRUNCATION = "SDL_WAVE_TRUNCATION"
154
+ SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING = "SDL_WINDOWS_DISABLE_THREAD_NAMING"
155
+ SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS = "SDL_WINDOWS_ENABLE_MENU_MNEMONICS"
156
+ SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP = "SDL_WINDOWS_ENABLE_MESSAGELOOP"
157
+ SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS = "SDL_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS"
158
+ SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL = "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"
159
+ SDL_HINT_WINDOWS_INTRESOURCE_ICON = "SDL_WINDOWS_INTRESOURCE_ICON"
160
+ SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL = "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
161
+ SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 = "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
162
+ SDL_HINT_WINDOWS_USE_D3D9EX = "SDL_WINDOWS_USE_D3D9EX"
163
+ SDL_HINT_WINDOWS_DPI_AWARENESS = "SDL_WINDOWS_DPI_AWARENESS"
164
+ SDL_HINT_WINDOWS_DPI_SCALING = "SDL_WINDOWS_DPI_SCALING"
165
+ SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN = "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
166
+ SDL_HINT_WINDOW_NO_ACTIVATION_WHEN_SHOWN = "SDL_WINDOW_NO_ACTIVATION_WHEN_SHOWN"
167
+ SDL_HINT_WINRT_HANDLE_BACK_BUTTON = "SDL_WINRT_HANDLE_BACK_BUTTON"
168
+ SDL_HINT_WINRT_PRIVACY_POLICY_LABEL = "SDL_WINRT_PRIVACY_POLICY_LABEL"
169
+ SDL_HINT_WINRT_PRIVACY_POLICY_URL = "SDL_WINRT_PRIVACY_POLICY_URL"
170
+ SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT = "SDL_X11_FORCE_OVERRIDE_REDIRECT"
171
+ SDL_HINT_XINPUT_ENABLED = "SDL_XINPUT_ENABLED"
172
+ SDL_HINT_DIRECTINPUT_ENABLED = "SDL_DIRECTINPUT_ENABLED"
173
+ SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING = "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING"
174
+ SDL_HINT_AUDIO_INCLUDE_MONITORS = "SDL_AUDIO_INCLUDE_MONITORS"
175
+ SDL_HINT_X11_WINDOW_TYPE = "SDL_X11_WINDOW_TYPE"
176
+ SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE = "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
177
+ SDL_HINT_VIDEODRIVER = "SDL_VIDEODRIVER"
178
+ SDL_HINT_AUDIODRIVER = "SDL_AUDIODRIVER"
179
+ SDL_HINT_KMSDRM_DEVICE_INDEX = "SDL_KMSDRM_DEVICE_INDEX"
180
+ SDL_HINT_TRACKPAD_IS_TOUCH_ONLY = "SDL_TRACKPAD_IS_TOUCH_ONLY"
3
181
 
182
+ SDL_HINT_DEFAULT = 0
183
+ SDL_HINT_NORMAL = 1
184
+ SDL_HINT_OVERRIDE = 2
4
185
  typealias "SDL_HintPriority", "int"
186
+
5
187
  extern "SDL_bool SDL_SetHintWithPriority(const char *name, const char *value, SDL_HintPriority priority)"
6
188
  extern "SDL_bool SDL_SetHint(const char *name, const char *value)"
7
189
  extern "SDL_bool SDL_ResetHint(const char *name)"
8
190
  extern "void SDL_ResetHints(void)"
9
191
  extern "const char * SDL_GetHint(const char *name)"
10
192
  extern "SDL_bool SDL_GetHintBoolean(const char *name, SDL_bool default_value)"
193
+
194
+ typealias "SDL_HintCallback", "int"
195
+
11
196
  extern "void SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata)"
12
197
  extern "void SDL_DelHintCallback(const char *name, SDL_HintCallback callback, void *userdata)"
13
198
  extern "void SDL_ClearHints(void)"
@@ -1,20 +1,41 @@
1
1
  module SDLRuby::SDL
2
- require_relative 'SDL_stdinc.h.rb'
3
- require_relative 'SDL_error.h.rb'
4
- require_relative 'SDL_guid.h.rb'
2
+ require_relative "SDL_stdinc.h"
3
+ require_relative "SDL_error.h"
4
+ require_relative "SDL_guid.h"
5
5
 
6
- typealias "SDL_Joystick", "struct _SDL_Joystick"
7
- typealias "SDL_JoystickGUID", "SDL_GUID"
6
+ # typealias "SDL_JoystickGUID", "SDL_GUID"
8
7
  typealias "SDL_JoystickID", "Sint32"
8
+
9
+ SDL_JOYSTICK_TYPE_UNKNOWN = 0
10
+ SDL_JOYSTICK_TYPE_GAMECONTROLLER = 1
11
+ SDL_JOYSTICK_TYPE_WHEEL = 2
12
+ SDL_JOYSTICK_TYPE_ARCADE_STICK = 3
13
+ SDL_JOYSTICK_TYPE_FLIGHT_STICK = 4
14
+ SDL_JOYSTICK_TYPE_DANCE_PAD = 5
15
+ SDL_JOYSTICK_TYPE_GUITAR = 6
16
+ SDL_JOYSTICK_TYPE_DRUM_KIT = 7
17
+ SDL_JOYSTICK_TYPE_ARCADE_PAD = 8
18
+ SDL_JOYSTICK_TYPE_THROTTLE = 9
9
19
  typealias "SDL_JoystickType", "int"
20
+
21
+ SDL_JOYSTICK_POWER_UNKNOWN = -1
22
+ SDL_JOYSTICK_POWER_EMPTY = 0
23
+ SDL_JOYSTICK_POWER_LOW = 1
24
+ SDL_JOYSTICK_POWER_MEDIUM = 2
25
+ SDL_JOYSTICK_POWER_FULL = 3
26
+ SDL_JOYSTICK_POWER_WIRED = 4
27
+ SDL_JOYSTICK_POWER_MAX = 5
10
28
  typealias "SDL_JoystickPowerLevel", "int"
29
+
30
+ SDL_IPHONE_MAX_GFORCE = 5.0
31
+
11
32
  extern "void SDL_LockJoysticks(void)"
12
33
  extern "void SDL_UnlockJoysticks(void)"
13
34
  extern "int SDL_NumJoysticks(void)"
14
35
  extern "const char * SDL_JoystickNameForIndex(int device_index)"
15
36
  extern "const char * SDL_JoystickPathForIndex(int device_index)"
16
37
  extern "int SDL_JoystickGetDevicePlayerIndex(int device_index)"
17
- extern "SDL_JoystickGUID SDL_JoystickGetDeviceGUID(int device_index)"
38
+ # extern "SDL_JoystickGUID SDL_JoystickGetDeviceGUID(int device_index)"
18
39
  extern "Uint16 SDL_JoystickGetDeviceVendor(int device_index)"
19
40
  extern "Uint16 SDL_JoystickGetDeviceProduct(int device_index)"
20
41
  extern "Uint16 SDL_JoystickGetDeviceProductVersion(int device_index)"
@@ -24,6 +45,32 @@ module SDLRuby::SDL
24
45
  extern "SDL_Joystick * SDL_JoystickFromInstanceID(SDL_JoystickID instance_id)"
25
46
  extern "SDL_Joystick * SDL_JoystickFromPlayerIndex(int player_index)"
26
47
  extern "int SDL_JoystickAttachVirtual(SDL_JoystickType type, int naxes, int nbuttons, int nhats)"
48
+
49
+ SDL_VirtualJoystickDesc = struct(
50
+ [
51
+ "Uint16 version",
52
+ "Uint16 type",
53
+ "Uint16 naxes",
54
+ "Uint16 nbuttons",
55
+ "Uint16 nhats",
56
+ "Uint16 vendor_id",
57
+ "Uint16 product_id",
58
+ "Uint16 padding",
59
+ "Uint32 button_mask",
60
+ "Uint32 axis_mask",
61
+ "const char *name",
62
+ "void *userdata",
63
+ "void *Update",
64
+ "void *SetPlayerIndex",
65
+ "void *Rumble",
66
+ "void *RumbleTriggers",
67
+ "void *SetLED",
68
+ "void *SendEffect",
69
+ ]
70
+ )
71
+
72
+ SDL_VIRTUAL_JOYSTICK_DESC_VERSION = 1
73
+
27
74
  extern "int SDL_JoystickAttachVirtualEx(const SDL_VirtualJoystickDesc *desc)"
28
75
  extern "int SDL_JoystickDetachVirtual(int device_index)"
29
76
  extern "SDL_bool SDL_JoystickIsVirtual(int device_index)"
@@ -34,16 +81,16 @@ module SDLRuby::SDL
34
81
  extern "const char * SDL_JoystickPath(SDL_Joystick *joystick)"
35
82
  extern "int SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick)"
36
83
  extern "void SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index)"
37
- extern "SDL_JoystickGUID SDL_JoystickGetGUID(SDL_Joystick *joystick)"
84
+ # extern "SDL_JoystickGUID SDL_JoystickGetGUID(SDL_Joystick *joystick)"
38
85
  extern "Uint16 SDL_JoystickGetVendor(SDL_Joystick *joystick)"
39
86
  extern "Uint16 SDL_JoystickGetProduct(SDL_Joystick *joystick)"
40
87
  extern "Uint16 SDL_JoystickGetProductVersion(SDL_Joystick *joystick)"
41
88
  extern "Uint16 SDL_JoystickGetFirmwareVersion(SDL_Joystick *joystick)"
42
89
  extern "const char * SDL_JoystickGetSerial(SDL_Joystick *joystick)"
43
90
  extern "SDL_JoystickType SDL_JoystickGetType(SDL_Joystick *joystick)"
44
- extern "void SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID)"
45
- extern "SDL_JoystickGUID SDL_JoystickGetGUIDFromString(const char *pchGUID)"
46
- extern "void SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint16 *vendor, Uint16 *product, Uint16 *version, Uint16 *crc16)"
91
+ # extern "void SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID)"
92
+ # extern "SDL_JoystickGUID SDL_JoystickGetGUIDFromString(const char *pchGUID)"
93
+ # extern "void SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint16 *vendor, Uint16 *product, Uint16 *version, Uint16 *crc16)"
47
94
  extern "SDL_bool SDL_JoystickGetAttached(SDL_Joystick *joystick)"
48
95
  extern "SDL_JoystickID SDL_JoystickInstanceID(SDL_Joystick *joystick)"
49
96
  extern "int SDL_JoystickNumAxes(SDL_Joystick *joystick)"
@@ -52,8 +99,23 @@ module SDLRuby::SDL
52
99
  extern "int SDL_JoystickNumButtons(SDL_Joystick *joystick)"
53
100
  extern "void SDL_JoystickUpdate(void)"
54
101
  extern "int SDL_JoystickEventState(int state)"
102
+
103
+ SDL_JOYSTICK_AXIS_MAX = 32767
104
+ SDL_JOYSTICK_AXIS_MIN = -32768
105
+
55
106
  extern "Sint16 SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis)"
56
107
  extern "SDL_bool SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state)"
108
+
109
+ SDL_HAT_CENTERED = 0x00
110
+ SDL_HAT_UP = 0x01
111
+ SDL_HAT_RIGHT = 0x02
112
+ SDL_HAT_DOWN = 0x04
113
+ SDL_HAT_LEFT = 0x08
114
+ SDL_HAT_RIGHTUP = (SDL_HAT_RIGHT|SDL_HAT_UP)
115
+ SDL_HAT_RIGHTDOWN = (SDL_HAT_RIGHT|SDL_HAT_DOWN)
116
+ SDL_HAT_LEFTUP = (SDL_HAT_LEFT|SDL_HAT_UP)
117
+ SDL_HAT_LEFTDOWN = (SDL_HAT_LEFT|SDL_HAT_DOWN)
118
+
57
119
  extern "Uint8 SDL_JoystickGetHat(SDL_Joystick *joystick, int hat)"
58
120
  extern "int SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy)"
59
121
  extern "Uint8 SDL_JoystickGetButton(SDL_Joystick *joystick, int button)"
@@ -1,8 +1,17 @@
1
1
  module SDLRuby::SDL
2
- require_relative 'SDL_stdinc.h.rb'
3
- require_relative 'SDL_error.h.rb'
4
- require_relative 'SDL_keycode.h.rb'
5
- require_relative 'SDL_video.h.rb'
2
+ require_relative "SDL_stdinc.h"
3
+ require_relative "SDL_error.h"
4
+ require_relative "SDL_keycode.h"
5
+ require_relative "SDL_video.h"
6
+
7
+ SDL_Keysym = struct(
8
+ [
9
+ "SDL_Scancode scancode",
10
+ "SDL_Keycode sym",
11
+ "Uint16 mod",
12
+ "Uint32 unused",
13
+ ]
14
+ )
6
15
 
7
16
  extern "SDL_Window * SDL_GetKeyboardFocus(void)"
8
17
  extern "const Uint8 * SDL_GetKeyboardState(int *numkeys)"
@@ -1,7 +1,292 @@
1
+ # frozen_string_literal: true
2
+ # encoding: US-ASCII
3
+
1
4
  module SDLRuby::SDL
2
- require_relative 'SDL_stdinc.h.rb'
3
- require_relative 'SDL_scancode.h.rb'
5
+ require_relative "SDL_stdinc.h"
6
+ require_relative "SDL_scancode.h"
7
+
4
8
  typealias "SDL_Keycode", "Sint32"
9
+ SDLK_SCANCODE_MASK = (1<<30)
10
+ def self.SDL_SCANCODE_TO_KEYCODE(x)
11
+ (x | SDLK_SCANCODE_MASK)
12
+ end
13
+
14
+ SDLK_UNKNOWN = 0
15
+ SDLK_RETURN = "\r"
16
+ SDLK_ESCAPE = "\x1B"
17
+ SDLK_BACKSPACE = "\b"
18
+ SDLK_TAB = "\t"
19
+ SDLK_SPACE = ' '
20
+ SDLK_EXCLAIM = '!'
21
+ SDLK_QUOTEDBL = '"'
22
+ SDLK_HASH = '#'
23
+ SDLK_PERCENT = '%'
24
+ SDLK_DOLLAR = '$'
25
+ SDLK_AMPERSAND = '&'
26
+ SDLK_QUOTE = '\''
27
+ SDLK_LEFTPAREN = '('
28
+ SDLK_RIGHTPAREN = ')'
29
+ SDLK_ASTERISK = '*'
30
+ SDLK_PLUS = '+'
31
+ SDLK_COMMA = ','
32
+ SDLK_MINUS = '-'
33
+ SDLK_PERIOD = '.'
34
+ SDLK_SLASH = '/'
35
+ SDLK_0 = '0'
36
+ SDLK_1 = '1'
37
+ SDLK_2 = '2'
38
+ SDLK_3 = '3'
39
+ SDLK_4 = '4'
40
+ SDLK_5 = '5'
41
+ SDLK_6 = '6'
42
+ SDLK_7 = '7'
43
+ SDLK_8 = '8'
44
+ SDLK_9 = '9'
45
+ SDLK_COLON = ':'
46
+ SDLK_SEMICOLON = ';'
47
+ SDLK_LESS = '<'
48
+ SDLK_EQUALS = '='
49
+ SDLK_GREATER = '>'
50
+ SDLK_QUESTION = '?'
51
+ SDLK_AT = '@'
52
+
53
+ SDLK_LEFTBRACKET = '['
54
+ SDLK_BACKSLASH = '\\'
55
+ SDLK_RIGHTBRACKET = ']'
56
+ SDLK_CARET = '^'
57
+ SDLK_UNDERSCORE = '_'
58
+ SDLK_BACKQUOTE = '`'
59
+ SDLK_a = 'a'
60
+ SDLK_b = 'b'
61
+ SDLK_c = 'c'
62
+ SDLK_d = 'd'
63
+ SDLK_e = 'e'
64
+ SDLK_f = 'f'
65
+ SDLK_g = 'g'
66
+ SDLK_h = 'h'
67
+ SDLK_i = 'i'
68
+ SDLK_j = 'j'
69
+ SDLK_k = 'k'
70
+ SDLK_l = 'l'
71
+ SDLK_m = 'm'
72
+ SDLK_n = 'n'
73
+ SDLK_o = 'o'
74
+ SDLK_p = 'p'
75
+ SDLK_q = 'q'
76
+ SDLK_r = 'r'
77
+ SDLK_s = 's'
78
+ SDLK_t = 't'
79
+ SDLK_u = 'u'
80
+ SDLK_v = 'v'
81
+ SDLK_w = 'w'
82
+ SDLK_x = 'x'
83
+ SDLK_y = 'y'
84
+ SDLK_z = 'z'
85
+ SDLK_CAPSLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK)
86
+ SDLK_F1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1)
87
+ SDLK_F2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2)
88
+ SDLK_F3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3)
89
+ SDLK_F4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4)
90
+ SDLK_F5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5)
91
+ SDLK_F6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6)
92
+ SDLK_F7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7)
93
+ SDLK_F8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8)
94
+ SDLK_F9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9)
95
+ SDLK_F10 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10)
96
+ SDLK_F11 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11)
97
+ SDLK_F12 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12)
98
+ SDLK_PRINTSCREEN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN)
99
+ SDLK_SCROLLLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK)
100
+ SDLK_PAUSE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE)
101
+ SDLK_INSERT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT)
102
+ SDLK_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME)
103
+ SDLK_PAGEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP)
104
+ SDLK_DELETE = '\x7F'
105
+ SDLK_END = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END)
106
+ SDLK_PAGEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN)
107
+ SDLK_RIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT)
108
+ SDLK_LEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT)
109
+ SDLK_DOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN)
110
+ SDLK_UP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP)
111
+ SDLK_NUMLOCKCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR)
112
+ SDLK_KP_DIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE)
113
+ SDLK_KP_MULTIPLY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY)
114
+ SDLK_KP_MINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS)
115
+ SDLK_KP_PLUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS)
116
+ SDLK_KP_ENTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER)
117
+ SDLK_KP_1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1)
118
+ SDLK_KP_2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2)
119
+ SDLK_KP_3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3)
120
+ SDLK_KP_4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4)
121
+ SDLK_KP_5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5)
122
+ SDLK_KP_6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6)
123
+ SDLK_KP_7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7)
124
+ SDLK_KP_8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8)
125
+ SDLK_KP_9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9)
126
+ SDLK_KP_0 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0)
127
+ SDLK_KP_PERIOD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD)
128
+ SDLK_APPLICATION = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION)
129
+ SDLK_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER)
130
+ SDLK_KP_EQUALS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS)
131
+ SDLK_F13 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13)
132
+ SDLK_F14 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14)
133
+ SDLK_F15 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15)
134
+ SDLK_F16 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16)
135
+ SDLK_F17 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17)
136
+ SDLK_F18 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18)
137
+ SDLK_F19 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19)
138
+ SDLK_F20 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20)
139
+ SDLK_F21 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21)
140
+ SDLK_F22 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22)
141
+ SDLK_F23 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23)
142
+ SDLK_F24 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24)
143
+ SDLK_EXECUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE)
144
+ SDLK_HELP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP)
145
+ SDLK_MENU = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU)
146
+ SDLK_SELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT)
147
+ SDLK_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP)
148
+ SDLK_AGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN)
149
+ SDLK_UNDO = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO)
150
+ SDLK_CUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT)
151
+ SDLK_COPY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY)
152
+ SDLK_PASTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE)
153
+ SDLK_FIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND)
154
+ SDLK_MUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE)
155
+ SDLK_VOLUMEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP)
156
+ SDLK_VOLUMEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN)
157
+ SDLK_KP_COMMA = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA)
158
+ SDLK_KP_EQUALSAS400 =
159
+ SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400)
160
+ SDLK_ALTERASE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE)
161
+ SDLK_SYSREQ = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ)
162
+ SDLK_CANCEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL)
163
+ SDLK_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR)
164
+ SDLK_PRIOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR)
165
+ SDLK_RETURN2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2)
166
+ SDLK_SEPARATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR)
167
+ SDLK_OUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT)
168
+ SDLK_OPER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER)
169
+ SDLK_CLEARAGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN)
170
+ SDLK_CRSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL)
171
+ SDLK_EXSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL)
172
+ SDLK_KP_00 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00)
173
+ SDLK_KP_000 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000)
174
+ SDLK_THOUSANDSSEPARATOR =
175
+ SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR)
176
+ SDLK_DECIMALSEPARATOR =
177
+ SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR)
178
+ SDLK_CURRENCYUNIT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT)
179
+ SDLK_CURRENCYSUBUNIT =
180
+ SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT)
181
+ SDLK_KP_LEFTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN)
182
+ SDLK_KP_RIGHTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN)
183
+ SDLK_KP_LEFTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE)
184
+ SDLK_KP_RIGHTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE)
185
+ SDLK_KP_TAB = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB)
186
+ SDLK_KP_BACKSPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE)
187
+ SDLK_KP_A = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A)
188
+ SDLK_KP_B = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B)
189
+ SDLK_KP_C = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C)
190
+ SDLK_KP_D = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D)
191
+ SDLK_KP_E = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E)
192
+ SDLK_KP_F = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F)
193
+ SDLK_KP_XOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR)
194
+ SDLK_KP_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER)
195
+ SDLK_KP_PERCENT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT)
196
+ SDLK_KP_LESS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS)
197
+ SDLK_KP_GREATER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER)
198
+ SDLK_KP_AMPERSAND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND)
199
+ SDLK_KP_DBLAMPERSAND =
200
+ SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND)
201
+ SDLK_KP_VERTICALBAR =
202
+ SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR)
203
+ SDLK_KP_DBLVERTICALBAR =
204
+ SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR)
205
+ SDLK_KP_COLON = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON)
206
+ SDLK_KP_HASH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH)
207
+ SDLK_KP_SPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE)
208
+ SDLK_KP_AT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT)
209
+ SDLK_KP_EXCLAM = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM)
210
+ SDLK_KP_MEMSTORE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE)
211
+ SDLK_KP_MEMRECALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL)
212
+ SDLK_KP_MEMCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR)
213
+ SDLK_KP_MEMADD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD)
214
+ SDLK_KP_MEMSUBTRACT =
215
+ SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT)
216
+ SDLK_KP_MEMMULTIPLY =
217
+ SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY)
218
+ SDLK_KP_MEMDIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE)
219
+ SDLK_KP_PLUSMINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS)
220
+ SDLK_KP_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR)
221
+ SDLK_KP_CLEARENTRY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY)
222
+ SDLK_KP_BINARY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY)
223
+ SDLK_KP_OCTAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL)
224
+ SDLK_KP_DECIMAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL)
225
+ SDLK_KP_HEXADECIMAL =
226
+ SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL)
227
+ SDLK_LCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL)
228
+ SDLK_LSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT)
229
+ SDLK_LALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT)
230
+ SDLK_LGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI)
231
+ SDLK_RCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL)
232
+ SDLK_RSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT)
233
+ SDLK_RALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT)
234
+ SDLK_RGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI)
235
+ SDLK_MODE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE)
236
+ SDLK_AUDIONEXT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIONEXT)
237
+ SDLK_AUDIOPREV = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPREV)
238
+ SDLK_AUDIOSTOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOSTOP)
239
+ SDLK_AUDIOPLAY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPLAY)
240
+ SDLK_AUDIOMUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOMUTE)
241
+ SDLK_MEDIASELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIASELECT)
242
+ SDLK_WWW = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WWW)
243
+ SDLK_MAIL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MAIL)
244
+ SDLK_CALCULATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALCULATOR)
245
+ SDLK_COMPUTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COMPUTER)
246
+ SDLK_AC_SEARCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH)
247
+ SDLK_AC_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME)
248
+ SDLK_AC_BACK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK)
249
+ SDLK_AC_FORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD)
250
+ SDLK_AC_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP)
251
+ SDLK_AC_REFRESH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH)
252
+ SDLK_AC_BOOKMARKS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS)
253
+ SDLK_BRIGHTNESSDOWN =
254
+ SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSDOWN)
255
+ SDLK_BRIGHTNESSUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSUP)
256
+ SDLK_DISPLAYSWITCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DISPLAYSWITCH)
257
+ SDLK_KBDILLUMTOGGLE =
258
+ SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMTOGGLE)
259
+ SDLK_KBDILLUMDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN)
260
+ SDLK_KBDILLUMUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP)
261
+ SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT)
262
+ SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP)
263
+ SDLK_APP1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP1)
264
+ SDLK_APP2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP2)
265
+ SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND)
266
+ SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)
267
+ SDLK_SOFTLEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTLEFT)
268
+ SDLK_SOFTRIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTRIGHT)
269
+ SDLK_CALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALL)
270
+ SDLK_ENDCALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ENDCALL)
5
271
  typealias "SDL_KeyCode", "int"
272
+
273
+ KMOD_NONE = 0x0000
274
+ KMOD_LSHIFT = 0x0001
275
+ KMOD_RSHIFT = 0x0002
276
+ KMOD_LCTRL = 0x0040
277
+ KMOD_RCTRL = 0x0080
278
+ KMOD_LALT = 0x0100
279
+ KMOD_RALT = 0x0200
280
+ KMOD_LGUI = 0x0400
281
+ KMOD_RGUI = 0x0800
282
+ KMOD_NUM = 0x1000
283
+ KMOD_CAPS = 0x2000
284
+ KMOD_MODE = 0x4000
285
+ KMOD_SCROLL = 0x8000
286
+ KMOD_CTRL = KMOD_LCTRL | KMOD_RCTRL
287
+ KMOD_SHIFT = KMOD_LSHIFT | KMOD_RSHIFT
288
+ KMOD_ALT = KMOD_LALT | KMOD_RALT
289
+ KMOD_GUI = KMOD_LGUI | KMOD_RGUI
290
+ KMOD_RESERVED = KMOD_SCROLL
6
291
  typealias "SDL_Keymod", "int"
7
292
  end
@@ -1,6 +1,13 @@
1
1
  module SDLRuby::SDL
2
- require_relative 'SDL_stdinc.h.rb'
3
- require_relative 'SDL_error.h.rb'
2
+ require_relative "SDL_stdinc.h"
3
+ require_relative "SDL_error.h"
4
+
5
+ SDL_Locale = struct(
6
+ [
7
+ "const char *language",
8
+ "const char *country",
9
+ ]
10
+ )
4
11
 
5
12
  extern "SDL_Locale * SDL_GetPreferredLocales(void)"
6
13
  end