SDLRuby 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -22
  3. data/LICENSE.txt +21 -21
  4. data/README.md +31 -31
  5. data/Rakefile +12 -12
  6. data/SDLRuby.gemspec +38 -0
  7. data/examples/alert.rb +8 -0
  8. data/examples/window.rb +7 -0
  9. data/lib/SDLRuby/event/accessor.rb +2 -2
  10. data/lib/SDLRuby/event.rb +101 -101
  11. data/lib/SDLRuby/image/include/SDL_image.h.rb +61 -61
  12. data/lib/SDLRuby/mixer/include/SDL_mixer.h.rb +95 -95
  13. data/lib/SDLRuby/rw_ops/rw_object.rb +34 -34
  14. data/lib/SDLRuby/rw_ops.rb +91 -91
  15. data/lib/SDLRuby/sdl/include/SDL.h.rb +44 -44
  16. data/lib/SDLRuby/sdl/include/SDL_audio.h.rb +160 -160
  17. data/lib/SDLRuby/sdl/include/SDL_blendmode.h.rb +30 -30
  18. data/lib/SDLRuby/sdl/include/SDL_clipboard.h.rb +10 -10
  19. data/lib/SDLRuby/sdl/include/SDL_config.h.rb +13 -13
  20. data/lib/SDLRuby/sdl/include/SDL_cpuinfo.h.rb +27 -27
  21. data/lib/SDLRuby/sdl/include/SDL_endian.h.rb +12 -12
  22. data/lib/SDLRuby/sdl/include/SDL_error.h.rb +28 -28
  23. data/lib/SDLRuby/sdl/include/SDL_events.h.rb +472 -472
  24. data/lib/SDLRuby/sdl/include/SDL_filesystem.h.rb +6 -6
  25. data/lib/SDLRuby/sdl/include/SDL_gamecontroller.h.rb +147 -147
  26. data/lib/SDLRuby/sdl/include/SDL_gesture.h.rb +12 -12
  27. data/lib/SDLRuby/sdl/include/SDL_guid.h.rb +13 -13
  28. data/lib/SDLRuby/sdl/include/SDL_hints.h.rb +199 -199
  29. data/lib/SDLRuby/sdl/include/SDL_joystick.h.rb +131 -131
  30. data/lib/SDLRuby/sdl/include/SDL_keyboard.h.rb +35 -35
  31. data/lib/SDLRuby/sdl/include/SDL_keycode.h.rb +292 -292
  32. data/lib/SDLRuby/sdl/include/SDL_locale.h.rb +13 -13
  33. data/lib/SDLRuby/sdl/include/SDL_main.h.rb +3 -3
  34. data/lib/SDLRuby/sdl/include/SDL_messagebox.h.rb +58 -58
  35. data/lib/SDLRuby/sdl/include/SDL_misc.h.rb +5 -5
  36. data/lib/SDLRuby/sdl/include/SDL_mouse.h.rb +57 -57
  37. data/lib/SDLRuby/sdl/include/SDL_pixels.h.rb +285 -285
  38. data/lib/SDLRuby/sdl/include/SDL_platform.h.rb +3 -3
  39. data/lib/SDLRuby/sdl/include/SDL_power.h.rb +6 -6
  40. data/lib/SDLRuby/sdl/include/SDL_rect.h.rb +46 -46
  41. data/lib/SDLRuby/sdl/include/SDL_render.h.rb +131 -131
  42. data/lib/SDLRuby/sdl/include/SDL_revision.h.rb +2 -2
  43. data/lib/SDLRuby/sdl/include/SDL_rwops.h.rb +78 -78
  44. data/lib/SDLRuby/sdl/include/SDL_scancode.h.rb +252 -252
  45. data/lib/SDLRuby/sdl/include/SDL_sensor.h.rb +25 -25
  46. data/lib/SDLRuby/sdl/include/SDL_shape.h.rb +40 -40
  47. data/lib/SDLRuby/sdl/include/SDL_stdinc.h.rb +62 -62
  48. data/lib/SDLRuby/sdl/include/SDL_surface.h.rb +100 -100
  49. data/lib/SDLRuby/sdl/include/SDL_system.h.rb +6 -6
  50. data/lib/SDLRuby/sdl/include/SDL_syswm.h.rb +10 -10
  51. data/lib/SDLRuby/sdl/include/SDL_timer.h.rb +21 -21
  52. data/lib/SDLRuby/sdl/include/SDL_touch.h.rb +15 -15
  53. data/lib/SDLRuby/sdl/include/SDL_types.h.rb +3 -3
  54. data/lib/SDLRuby/sdl/include/SDL_version.h.rb +14 -14
  55. data/lib/SDLRuby/sdl/include/SDL_video.h.rb +264 -264
  56. data/lib/SDLRuby/sdl.rb +218 -218
  57. data/lib/SDLRuby/ttf/include/SDL_ttf.h.rb +54 -54
  58. data/lib/SDLRuby/version.rb +5 -5
  59. data/lib/SDLRuby/window/surfacer.rb +37 -37
  60. data/lib/SDLRuby.rb +32 -16
  61. data/sig/SDLRuby.rbs +4 -4
  62. data/sig/lib/SDLRuby/event/accessor.rbs +157 -157
  63. data/sig/lib/SDLRuby/event/type.rbs +67 -67
  64. data/sig/lib/SDLRuby/event.rbs +47 -47
  65. data/sig/lib/SDLRuby/keyboard.rbs +25 -25
  66. data/sig/lib/SDLRuby/mouse.rbs +35 -35
  67. data/sig/lib/SDLRuby/sdl.rbs +655 -655
  68. data/sig/lib/SDLRuby/timer.rbs +7 -7
  69. metadata +6 -3
@@ -1,292 +1,292 @@
1
- # frozen_string_literal: true
2
- # encoding: US-ASCII
3
-
4
- module SDLRuby::SDL
5
- require_relative "SDL_stdinc.h"
6
- require_relative "SDL_scancode.h"
7
-
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".unpack1("C")
16
- SDLK_ESCAPE = "\x1B".unpack1("C")
17
- SDLK_BACKSPACE = "\b".unpack1("C")
18
- SDLK_TAB = "\t".unpack1("C")
19
- SDLK_SPACE = ' '.unpack1("C")
20
- SDLK_EXCLAIM = '!'.unpack1("C")
21
- SDLK_QUOTEDBL = '"'.unpack1("C")
22
- SDLK_HASH = '#'.unpack1("C")
23
- SDLK_PERCENT = '%'.unpack1("C")
24
- SDLK_DOLLAR = '$'.unpack1("C")
25
- SDLK_AMPERSAND = '&'.unpack1("C")
26
- SDLK_QUOTE = '\''.unpack1("C")
27
- SDLK_LEFTPAREN = '('.unpack1("C")
28
- SDLK_RIGHTPAREN = ')'.unpack1("C")
29
- SDLK_ASTERISK = '*'.unpack1("C")
30
- SDLK_PLUS = '+'.unpack1("C")
31
- SDLK_COMMA = ','.unpack1("C")
32
- SDLK_MINUS = '-'.unpack1("C")
33
- SDLK_PERIOD = '.'.unpack1("C")
34
- SDLK_SLASH = '/'.unpack1("C")
35
- SDLK_0 = '0'.unpack1("C")
36
- SDLK_1 = '1'.unpack1("C")
37
- SDLK_2 = '2'.unpack1("C")
38
- SDLK_3 = '3'.unpack1("C")
39
- SDLK_4 = '4'.unpack1("C")
40
- SDLK_5 = '5'.unpack1("C")
41
- SDLK_6 = '6'.unpack1("C")
42
- SDLK_7 = '7'.unpack1("C")
43
- SDLK_8 = '8'.unpack1("C")
44
- SDLK_9 = '9'.unpack1("C")
45
- SDLK_COLON = ':'.unpack1("C")
46
- SDLK_SEMICOLON = ';'.unpack1("C")
47
- SDLK_LESS = '<'.unpack1("C")
48
- SDLK_EQUALS = '='.unpack1("C")
49
- SDLK_GREATER = '>'.unpack1("C")
50
- SDLK_QUESTION = '?'.unpack1("C")
51
- SDLK_AT = '@'.unpack1("C")
52
-
53
- SDLK_LEFTBRACKET = '['.unpack1("C")
54
- SDLK_BACKSLASH = '\\'.unpack1("C")
55
- SDLK_RIGHTBRACKET = ']'.unpack1("C")
56
- SDLK_CARET = '^'.unpack1("C")
57
- SDLK_UNDERSCORE = '_'.unpack1("C")
58
- SDLK_BACKQUOTE = '`'.unpack1("C")
59
- SDLK_a = 'a'.unpack1("C")
60
- SDLK_b = 'b'.unpack1("C")
61
- SDLK_c = 'c'.unpack1("C")
62
- SDLK_d = 'd'.unpack1("C")
63
- SDLK_e = 'e'.unpack1("C")
64
- SDLK_f = 'f'.unpack1("C")
65
- SDLK_g = 'g'.unpack1("C")
66
- SDLK_h = 'h'.unpack1("C")
67
- SDLK_i = 'i'.unpack1("C")
68
- SDLK_j = 'j'.unpack1("C")
69
- SDLK_k = 'k'.unpack1("C")
70
- SDLK_l = 'l'.unpack1("C")
71
- SDLK_m = 'm'.unpack1("C")
72
- SDLK_n = 'n'.unpack1("C")
73
- SDLK_o = 'o'.unpack1("C")
74
- SDLK_p = 'p'.unpack1("C")
75
- SDLK_q = 'q'.unpack1("C")
76
- SDLK_r = 'r'.unpack1("C")
77
- SDLK_s = 's'.unpack1("C")
78
- SDLK_t = 't'.unpack1("C")
79
- SDLK_u = 'u'.unpack1("C")
80
- SDLK_v = 'v'.unpack1("C")
81
- SDLK_w = 'w'.unpack1("C")
82
- SDLK_x = 'x'.unpack1("C")
83
- SDLK_y = 'y'.unpack1("C")
84
- SDLK_z = 'z'.unpack1("C")
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".unpack1("C")
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)
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
291
- typealias "SDL_Keymod", "int"
292
- end
1
+ # frozen_string_literal: true
2
+ # encoding: US-ASCII
3
+
4
+ module SDLRuby::SDL
5
+ require_relative "SDL_stdinc.h"
6
+ require_relative "SDL_scancode.h"
7
+
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".unpack1("C")
16
+ SDLK_ESCAPE = "\x1B".unpack1("C")
17
+ SDLK_BACKSPACE = "\b".unpack1("C")
18
+ SDLK_TAB = "\t".unpack1("C")
19
+ SDLK_SPACE = ' '.unpack1("C")
20
+ SDLK_EXCLAIM = '!'.unpack1("C")
21
+ SDLK_QUOTEDBL = '"'.unpack1("C")
22
+ SDLK_HASH = '#'.unpack1("C")
23
+ SDLK_PERCENT = '%'.unpack1("C")
24
+ SDLK_DOLLAR = '$'.unpack1("C")
25
+ SDLK_AMPERSAND = '&'.unpack1("C")
26
+ SDLK_QUOTE = '\''.unpack1("C")
27
+ SDLK_LEFTPAREN = '('.unpack1("C")
28
+ SDLK_RIGHTPAREN = ')'.unpack1("C")
29
+ SDLK_ASTERISK = '*'.unpack1("C")
30
+ SDLK_PLUS = '+'.unpack1("C")
31
+ SDLK_COMMA = ','.unpack1("C")
32
+ SDLK_MINUS = '-'.unpack1("C")
33
+ SDLK_PERIOD = '.'.unpack1("C")
34
+ SDLK_SLASH = '/'.unpack1("C")
35
+ SDLK_0 = '0'.unpack1("C")
36
+ SDLK_1 = '1'.unpack1("C")
37
+ SDLK_2 = '2'.unpack1("C")
38
+ SDLK_3 = '3'.unpack1("C")
39
+ SDLK_4 = '4'.unpack1("C")
40
+ SDLK_5 = '5'.unpack1("C")
41
+ SDLK_6 = '6'.unpack1("C")
42
+ SDLK_7 = '7'.unpack1("C")
43
+ SDLK_8 = '8'.unpack1("C")
44
+ SDLK_9 = '9'.unpack1("C")
45
+ SDLK_COLON = ':'.unpack1("C")
46
+ SDLK_SEMICOLON = ';'.unpack1("C")
47
+ SDLK_LESS = '<'.unpack1("C")
48
+ SDLK_EQUALS = '='.unpack1("C")
49
+ SDLK_GREATER = '>'.unpack1("C")
50
+ SDLK_QUESTION = '?'.unpack1("C")
51
+ SDLK_AT = '@'.unpack1("C")
52
+
53
+ SDLK_LEFTBRACKET = '['.unpack1("C")
54
+ SDLK_BACKSLASH = '\\'.unpack1("C")
55
+ SDLK_RIGHTBRACKET = ']'.unpack1("C")
56
+ SDLK_CARET = '^'.unpack1("C")
57
+ SDLK_UNDERSCORE = '_'.unpack1("C")
58
+ SDLK_BACKQUOTE = '`'.unpack1("C")
59
+ SDLK_a = 'a'.unpack1("C")
60
+ SDLK_b = 'b'.unpack1("C")
61
+ SDLK_c = 'c'.unpack1("C")
62
+ SDLK_d = 'd'.unpack1("C")
63
+ SDLK_e = 'e'.unpack1("C")
64
+ SDLK_f = 'f'.unpack1("C")
65
+ SDLK_g = 'g'.unpack1("C")
66
+ SDLK_h = 'h'.unpack1("C")
67
+ SDLK_i = 'i'.unpack1("C")
68
+ SDLK_j = 'j'.unpack1("C")
69
+ SDLK_k = 'k'.unpack1("C")
70
+ SDLK_l = 'l'.unpack1("C")
71
+ SDLK_m = 'm'.unpack1("C")
72
+ SDLK_n = 'n'.unpack1("C")
73
+ SDLK_o = 'o'.unpack1("C")
74
+ SDLK_p = 'p'.unpack1("C")
75
+ SDLK_q = 'q'.unpack1("C")
76
+ SDLK_r = 'r'.unpack1("C")
77
+ SDLK_s = 's'.unpack1("C")
78
+ SDLK_t = 't'.unpack1("C")
79
+ SDLK_u = 'u'.unpack1("C")
80
+ SDLK_v = 'v'.unpack1("C")
81
+ SDLK_w = 'w'.unpack1("C")
82
+ SDLK_x = 'x'.unpack1("C")
83
+ SDLK_y = 'y'.unpack1("C")
84
+ SDLK_z = 'z'.unpack1("C")
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".unpack1("C")
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)
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
291
+ typealias "SDL_Keymod", "int"
292
+ end
@@ -1,13 +1,13 @@
1
- module SDLRuby::SDL
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
- )
11
-
12
- extern "SDL_Locale * SDL_GetPreferredLocales(void)"
13
- end
1
+ module SDLRuby::SDL
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
+ )
11
+
12
+ extern "SDL_Locale * SDL_GetPreferredLocales(void)"
13
+ end
@@ -1,3 +1,3 @@
1
- module SDLRuby::SDL
2
- require_relative 'SDL_stdinc.h.rb'
3
- end
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ end