sdl2-bindings 0.0.9 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog +129 -96
  3. data/LICENSE.txt +0 -0
  4. data/README.md +78 -55
  5. data/lib/sdl2.rb +131 -172
  6. data/lib/sdl2_audio.rb +261 -222
  7. data/lib/sdl2_blendmode.rb +72 -69
  8. data/lib/sdl2_clipboard.rb +56 -51
  9. data/lib/sdl2_cpuinfo.rb +129 -106
  10. data/lib/sdl2_error.rb +71 -64
  11. data/lib/sdl2_events.rb +564 -533
  12. data/lib/sdl2_filesystem.rb +52 -48
  13. data/lib/sdl2_framerate.rb +74 -67
  14. data/lib/sdl2_gamecontroller.rb +329 -274
  15. data/lib/sdl2_gesture.rb +61 -55
  16. data/lib/sdl2_gfxPrimitives.rb +283 -222
  17. data/lib/sdl2_haptic.rb +301 -269
  18. data/lib/sdl2_hidapi.rb +139 -118
  19. data/lib/sdl2_hints.rb +221 -198
  20. data/lib/sdl2_image.rb +232 -185
  21. data/lib/sdl2_imageFilter.rb +164 -132
  22. data/lib/sdl2_joystick.rb +294 -239
  23. data/lib/sdl2_keyboard.rb +125 -99
  24. data/lib/sdl2_keycode.rb +307 -305
  25. data/lib/sdl2_log.rb +131 -115
  26. data/lib/sdl2_main.rb +74 -67
  27. data/lib/sdl2_messagebox.rb +102 -98
  28. data/lib/sdl2_misc.rb +48 -45
  29. data/lib/sdl2_mixer.rb +392 -317
  30. data/lib/sdl2_mouse.rb +136 -117
  31. data/lib/sdl2_pixels.rb +240 -224
  32. data/lib/sdl2_platform.rb +48 -45
  33. data/lib/sdl2_power.rb +54 -51
  34. data/lib/sdl2_rect.rb +145 -102
  35. data/lib/sdl2_render.rb +408 -322
  36. data/lib/sdl2_rotozoom.rb +76 -66
  37. data/lib/sdl2_rwops.rb +242 -208
  38. data/lib/sdl2_scancode.rb +289 -287
  39. data/lib/sdl2_sensor.rb +115 -97
  40. data/lib/sdl2_shape.rb +83 -77
  41. data/lib/sdl2_sound.rb +154 -0
  42. data/lib/sdl2_stdinc.rb +556 -439
  43. data/lib/sdl2_surface.rb +229 -188
  44. data/lib/sdl2_syswm.rb +160 -157
  45. data/lib/sdl2_timer.rb +74 -65
  46. data/lib/sdl2_touch.rb +86 -75
  47. data/lib/sdl2_ttf.rb +358 -202
  48. data/lib/sdl2_version.rb +67 -62
  49. data/lib/sdl2_video.rb +540 -446
  50. data/lib/sdl2_vulkan.rb +72 -64
  51. metadata +18 -3
data/lib/sdl2_scancode.rb CHANGED
@@ -1,287 +1,289 @@
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 SDL2
10
- extend FFI::Library
11
- # Define/Macro
12
-
13
-
14
- # Enum
15
-
16
- SDL_SCANCODE_UNKNOWN = 0
17
- SDL_SCANCODE_A = 4
18
- SDL_SCANCODE_B = 5
19
- SDL_SCANCODE_C = 6
20
- SDL_SCANCODE_D = 7
21
- SDL_SCANCODE_E = 8
22
- SDL_SCANCODE_F = 9
23
- SDL_SCANCODE_G = 10
24
- SDL_SCANCODE_H = 11
25
- SDL_SCANCODE_I = 12
26
- SDL_SCANCODE_J = 13
27
- SDL_SCANCODE_K = 14
28
- SDL_SCANCODE_L = 15
29
- SDL_SCANCODE_M = 16
30
- SDL_SCANCODE_N = 17
31
- SDL_SCANCODE_O = 18
32
- SDL_SCANCODE_P = 19
33
- SDL_SCANCODE_Q = 20
34
- SDL_SCANCODE_R = 21
35
- SDL_SCANCODE_S = 22
36
- SDL_SCANCODE_T = 23
37
- SDL_SCANCODE_U = 24
38
- SDL_SCANCODE_V = 25
39
- SDL_SCANCODE_W = 26
40
- SDL_SCANCODE_X = 27
41
- SDL_SCANCODE_Y = 28
42
- SDL_SCANCODE_Z = 29
43
- SDL_SCANCODE_1 = 30
44
- SDL_SCANCODE_2 = 31
45
- SDL_SCANCODE_3 = 32
46
- SDL_SCANCODE_4 = 33
47
- SDL_SCANCODE_5 = 34
48
- SDL_SCANCODE_6 = 35
49
- SDL_SCANCODE_7 = 36
50
- SDL_SCANCODE_8 = 37
51
- SDL_SCANCODE_9 = 38
52
- SDL_SCANCODE_0 = 39
53
- SDL_SCANCODE_RETURN = 40
54
- SDL_SCANCODE_ESCAPE = 41
55
- SDL_SCANCODE_BACKSPACE = 42
56
- SDL_SCANCODE_TAB = 43
57
- SDL_SCANCODE_SPACE = 44
58
- SDL_SCANCODE_MINUS = 45
59
- SDL_SCANCODE_EQUALS = 46
60
- SDL_SCANCODE_LEFTBRACKET = 47
61
- SDL_SCANCODE_RIGHTBRACKET = 48
62
- SDL_SCANCODE_BACKSLASH = 49
63
- SDL_SCANCODE_NONUSHASH = 50
64
- SDL_SCANCODE_SEMICOLON = 51
65
- SDL_SCANCODE_APOSTROPHE = 52
66
- SDL_SCANCODE_GRAVE = 53
67
- SDL_SCANCODE_COMMA = 54
68
- SDL_SCANCODE_PERIOD = 55
69
- SDL_SCANCODE_SLASH = 56
70
- SDL_SCANCODE_CAPSLOCK = 57
71
- SDL_SCANCODE_F1 = 58
72
- SDL_SCANCODE_F2 = 59
73
- SDL_SCANCODE_F3 = 60
74
- SDL_SCANCODE_F4 = 61
75
- SDL_SCANCODE_F5 = 62
76
- SDL_SCANCODE_F6 = 63
77
- SDL_SCANCODE_F7 = 64
78
- SDL_SCANCODE_F8 = 65
79
- SDL_SCANCODE_F9 = 66
80
- SDL_SCANCODE_F10 = 67
81
- SDL_SCANCODE_F11 = 68
82
- SDL_SCANCODE_F12 = 69
83
- SDL_SCANCODE_PRINTSCREEN = 70
84
- SDL_SCANCODE_SCROLLLOCK = 71
85
- SDL_SCANCODE_PAUSE = 72
86
- SDL_SCANCODE_INSERT = 73
87
- SDL_SCANCODE_HOME = 74
88
- SDL_SCANCODE_PAGEUP = 75
89
- SDL_SCANCODE_DELETE = 76
90
- SDL_SCANCODE_END = 77
91
- SDL_SCANCODE_PAGEDOWN = 78
92
- SDL_SCANCODE_RIGHT = 79
93
- SDL_SCANCODE_LEFT = 80
94
- SDL_SCANCODE_DOWN = 81
95
- SDL_SCANCODE_UP = 82
96
- SDL_SCANCODE_NUMLOCKCLEAR = 83
97
- SDL_SCANCODE_KP_DIVIDE = 84
98
- SDL_SCANCODE_KP_MULTIPLY = 85
99
- SDL_SCANCODE_KP_MINUS = 86
100
- SDL_SCANCODE_KP_PLUS = 87
101
- SDL_SCANCODE_KP_ENTER = 88
102
- SDL_SCANCODE_KP_1 = 89
103
- SDL_SCANCODE_KP_2 = 90
104
- SDL_SCANCODE_KP_3 = 91
105
- SDL_SCANCODE_KP_4 = 92
106
- SDL_SCANCODE_KP_5 = 93
107
- SDL_SCANCODE_KP_6 = 94
108
- SDL_SCANCODE_KP_7 = 95
109
- SDL_SCANCODE_KP_8 = 96
110
- SDL_SCANCODE_KP_9 = 97
111
- SDL_SCANCODE_KP_0 = 98
112
- SDL_SCANCODE_KP_PERIOD = 99
113
- SDL_SCANCODE_NONUSBACKSLASH = 100
114
- SDL_SCANCODE_APPLICATION = 101
115
- SDL_SCANCODE_POWER = 102
116
- SDL_SCANCODE_KP_EQUALS = 103
117
- SDL_SCANCODE_F13 = 104
118
- SDL_SCANCODE_F14 = 105
119
- SDL_SCANCODE_F15 = 106
120
- SDL_SCANCODE_F16 = 107
121
- SDL_SCANCODE_F17 = 108
122
- SDL_SCANCODE_F18 = 109
123
- SDL_SCANCODE_F19 = 110
124
- SDL_SCANCODE_F20 = 111
125
- SDL_SCANCODE_F21 = 112
126
- SDL_SCANCODE_F22 = 113
127
- SDL_SCANCODE_F23 = 114
128
- SDL_SCANCODE_F24 = 115
129
- SDL_SCANCODE_EXECUTE = 116
130
- SDL_SCANCODE_HELP = 117
131
- SDL_SCANCODE_MENU = 118
132
- SDL_SCANCODE_SELECT = 119
133
- SDL_SCANCODE_STOP = 120
134
- SDL_SCANCODE_AGAIN = 121
135
- SDL_SCANCODE_UNDO = 122
136
- SDL_SCANCODE_CUT = 123
137
- SDL_SCANCODE_COPY = 124
138
- SDL_SCANCODE_PASTE = 125
139
- SDL_SCANCODE_FIND = 126
140
- SDL_SCANCODE_MUTE = 127
141
- SDL_SCANCODE_VOLUMEUP = 128
142
- SDL_SCANCODE_VOLUMEDOWN = 129
143
- SDL_SCANCODE_KP_COMMA = 133
144
- SDL_SCANCODE_KP_EQUALSAS400 = 134
145
- SDL_SCANCODE_INTERNATIONAL1 = 135
146
- SDL_SCANCODE_INTERNATIONAL2 = 136
147
- SDL_SCANCODE_INTERNATIONAL3 = 137
148
- SDL_SCANCODE_INTERNATIONAL4 = 138
149
- SDL_SCANCODE_INTERNATIONAL5 = 139
150
- SDL_SCANCODE_INTERNATIONAL6 = 140
151
- SDL_SCANCODE_INTERNATIONAL7 = 141
152
- SDL_SCANCODE_INTERNATIONAL8 = 142
153
- SDL_SCANCODE_INTERNATIONAL9 = 143
154
- SDL_SCANCODE_LANG1 = 144
155
- SDL_SCANCODE_LANG2 = 145
156
- SDL_SCANCODE_LANG3 = 146
157
- SDL_SCANCODE_LANG4 = 147
158
- SDL_SCANCODE_LANG5 = 148
159
- SDL_SCANCODE_LANG6 = 149
160
- SDL_SCANCODE_LANG7 = 150
161
- SDL_SCANCODE_LANG8 = 151
162
- SDL_SCANCODE_LANG9 = 152
163
- SDL_SCANCODE_ALTERASE = 153
164
- SDL_SCANCODE_SYSREQ = 154
165
- SDL_SCANCODE_CANCEL = 155
166
- SDL_SCANCODE_CLEAR = 156
167
- SDL_SCANCODE_PRIOR = 157
168
- SDL_SCANCODE_RETURN2 = 158
169
- SDL_SCANCODE_SEPARATOR = 159
170
- SDL_SCANCODE_OUT = 160
171
- SDL_SCANCODE_OPER = 161
172
- SDL_SCANCODE_CLEARAGAIN = 162
173
- SDL_SCANCODE_CRSEL = 163
174
- SDL_SCANCODE_EXSEL = 164
175
- SDL_SCANCODE_KP_00 = 176
176
- SDL_SCANCODE_KP_000 = 177
177
- SDL_SCANCODE_THOUSANDSSEPARATOR = 178
178
- SDL_SCANCODE_DECIMALSEPARATOR = 179
179
- SDL_SCANCODE_CURRENCYUNIT = 180
180
- SDL_SCANCODE_CURRENCYSUBUNIT = 181
181
- SDL_SCANCODE_KP_LEFTPAREN = 182
182
- SDL_SCANCODE_KP_RIGHTPAREN = 183
183
- SDL_SCANCODE_KP_LEFTBRACE = 184
184
- SDL_SCANCODE_KP_RIGHTBRACE = 185
185
- SDL_SCANCODE_KP_TAB = 186
186
- SDL_SCANCODE_KP_BACKSPACE = 187
187
- SDL_SCANCODE_KP_A = 188
188
- SDL_SCANCODE_KP_B = 189
189
- SDL_SCANCODE_KP_C = 190
190
- SDL_SCANCODE_KP_D = 191
191
- SDL_SCANCODE_KP_E = 192
192
- SDL_SCANCODE_KP_F = 193
193
- SDL_SCANCODE_KP_XOR = 194
194
- SDL_SCANCODE_KP_POWER = 195
195
- SDL_SCANCODE_KP_PERCENT = 196
196
- SDL_SCANCODE_KP_LESS = 197
197
- SDL_SCANCODE_KP_GREATER = 198
198
- SDL_SCANCODE_KP_AMPERSAND = 199
199
- SDL_SCANCODE_KP_DBLAMPERSAND = 200
200
- SDL_SCANCODE_KP_VERTICALBAR = 201
201
- SDL_SCANCODE_KP_DBLVERTICALBAR = 202
202
- SDL_SCANCODE_KP_COLON = 203
203
- SDL_SCANCODE_KP_HASH = 204
204
- SDL_SCANCODE_KP_SPACE = 205
205
- SDL_SCANCODE_KP_AT = 206
206
- SDL_SCANCODE_KP_EXCLAM = 207
207
- SDL_SCANCODE_KP_MEMSTORE = 208
208
- SDL_SCANCODE_KP_MEMRECALL = 209
209
- SDL_SCANCODE_KP_MEMCLEAR = 210
210
- SDL_SCANCODE_KP_MEMADD = 211
211
- SDL_SCANCODE_KP_MEMSUBTRACT = 212
212
- SDL_SCANCODE_KP_MEMMULTIPLY = 213
213
- SDL_SCANCODE_KP_MEMDIVIDE = 214
214
- SDL_SCANCODE_KP_PLUSMINUS = 215
215
- SDL_SCANCODE_KP_CLEAR = 216
216
- SDL_SCANCODE_KP_CLEARENTRY = 217
217
- SDL_SCANCODE_KP_BINARY = 218
218
- SDL_SCANCODE_KP_OCTAL = 219
219
- SDL_SCANCODE_KP_DECIMAL = 220
220
- SDL_SCANCODE_KP_HEXADECIMAL = 221
221
- SDL_SCANCODE_LCTRL = 224
222
- SDL_SCANCODE_LSHIFT = 225
223
- SDL_SCANCODE_LALT = 226
224
- SDL_SCANCODE_LGUI = 227
225
- SDL_SCANCODE_RCTRL = 228
226
- SDL_SCANCODE_RSHIFT = 229
227
- SDL_SCANCODE_RALT = 230
228
- SDL_SCANCODE_RGUI = 231
229
- SDL_SCANCODE_MODE = 257
230
- SDL_SCANCODE_AUDIONEXT = 258
231
- SDL_SCANCODE_AUDIOPREV = 259
232
- SDL_SCANCODE_AUDIOSTOP = 260
233
- SDL_SCANCODE_AUDIOPLAY = 261
234
- SDL_SCANCODE_AUDIOMUTE = 262
235
- SDL_SCANCODE_MEDIASELECT = 263
236
- SDL_SCANCODE_WWW = 264
237
- SDL_SCANCODE_MAIL = 265
238
- SDL_SCANCODE_CALCULATOR = 266
239
- SDL_SCANCODE_COMPUTER = 267
240
- SDL_SCANCODE_AC_SEARCH = 268
241
- SDL_SCANCODE_AC_HOME = 269
242
- SDL_SCANCODE_AC_BACK = 270
243
- SDL_SCANCODE_AC_FORWARD = 271
244
- SDL_SCANCODE_AC_STOP = 272
245
- SDL_SCANCODE_AC_REFRESH = 273
246
- SDL_SCANCODE_AC_BOOKMARKS = 274
247
- SDL_SCANCODE_BRIGHTNESSDOWN = 275
248
- SDL_SCANCODE_BRIGHTNESSUP = 276
249
- SDL_SCANCODE_DISPLAYSWITCH = 277
250
- SDL_SCANCODE_KBDILLUMTOGGLE = 278
251
- SDL_SCANCODE_KBDILLUMDOWN = 279
252
- SDL_SCANCODE_KBDILLUMUP = 280
253
- SDL_SCANCODE_EJECT = 281
254
- SDL_SCANCODE_SLEEP = 282
255
- SDL_SCANCODE_APP1 = 283
256
- SDL_SCANCODE_APP2 = 284
257
- SDL_SCANCODE_AUDIOREWIND = 285
258
- SDL_SCANCODE_AUDIOFASTFORWARD = 286
259
- SDL_NUM_SCANCODES = 512
260
-
261
- # Typedef
262
-
263
- typedef :int, :SDL_Scancode
264
-
265
- # Struct
266
-
267
-
268
- # Function
269
-
270
- def self.setup_scancode_symbols()
271
- symbols = [
272
- ]
273
- args = {
274
- }
275
- retvals = {
276
- }
277
- symbols.each do |sym|
278
- begin
279
- attach_function sym, args[sym], retvals[sym]
280
- rescue FFI::NotFoundError => error
281
- $stderr.puts("[Warning] Failed to import #{sym} (#{error}).")
282
- end
283
- end
284
- end
285
-
286
- end
287
-
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
+
14
+ # Enum
15
+
16
+ SCANCODE_UNKNOWN = 0
17
+ SCANCODE_A = 4
18
+ SCANCODE_B = 5
19
+ SCANCODE_C = 6
20
+ SCANCODE_D = 7
21
+ SCANCODE_E = 8
22
+ SCANCODE_F = 9
23
+ SCANCODE_G = 10
24
+ SCANCODE_H = 11
25
+ SCANCODE_I = 12
26
+ SCANCODE_J = 13
27
+ SCANCODE_K = 14
28
+ SCANCODE_L = 15
29
+ SCANCODE_M = 16
30
+ SCANCODE_N = 17
31
+ SCANCODE_O = 18
32
+ SCANCODE_P = 19
33
+ SCANCODE_Q = 20
34
+ SCANCODE_R = 21
35
+ SCANCODE_S = 22
36
+ SCANCODE_T = 23
37
+ SCANCODE_U = 24
38
+ SCANCODE_V = 25
39
+ SCANCODE_W = 26
40
+ SCANCODE_X = 27
41
+ SCANCODE_Y = 28
42
+ SCANCODE_Z = 29
43
+ SCANCODE_1 = 30
44
+ SCANCODE_2 = 31
45
+ SCANCODE_3 = 32
46
+ SCANCODE_4 = 33
47
+ SCANCODE_5 = 34
48
+ SCANCODE_6 = 35
49
+ SCANCODE_7 = 36
50
+ SCANCODE_8 = 37
51
+ SCANCODE_9 = 38
52
+ SCANCODE_0 = 39
53
+ SCANCODE_RETURN = 40
54
+ SCANCODE_ESCAPE = 41
55
+ SCANCODE_BACKSPACE = 42
56
+ SCANCODE_TAB = 43
57
+ SCANCODE_SPACE = 44
58
+ SCANCODE_MINUS = 45
59
+ SCANCODE_EQUALS = 46
60
+ SCANCODE_LEFTBRACKET = 47
61
+ SCANCODE_RIGHTBRACKET = 48
62
+ SCANCODE_BACKSLASH = 49
63
+ SCANCODE_NONUSHASH = 50
64
+ SCANCODE_SEMICOLON = 51
65
+ SCANCODE_APOSTROPHE = 52
66
+ SCANCODE_GRAVE = 53
67
+ SCANCODE_COMMA = 54
68
+ SCANCODE_PERIOD = 55
69
+ SCANCODE_SLASH = 56
70
+ SCANCODE_CAPSLOCK = 57
71
+ SCANCODE_F1 = 58
72
+ SCANCODE_F2 = 59
73
+ SCANCODE_F3 = 60
74
+ SCANCODE_F4 = 61
75
+ SCANCODE_F5 = 62
76
+ SCANCODE_F6 = 63
77
+ SCANCODE_F7 = 64
78
+ SCANCODE_F8 = 65
79
+ SCANCODE_F9 = 66
80
+ SCANCODE_F10 = 67
81
+ SCANCODE_F11 = 68
82
+ SCANCODE_F12 = 69
83
+ SCANCODE_PRINTSCREEN = 70
84
+ SCANCODE_SCROLLLOCK = 71
85
+ SCANCODE_PAUSE = 72
86
+ SCANCODE_INSERT = 73
87
+ SCANCODE_HOME = 74
88
+ SCANCODE_PAGEUP = 75
89
+ SCANCODE_DELETE = 76
90
+ SCANCODE_END = 77
91
+ SCANCODE_PAGEDOWN = 78
92
+ SCANCODE_RIGHT = 79
93
+ SCANCODE_LEFT = 80
94
+ SCANCODE_DOWN = 81
95
+ SCANCODE_UP = 82
96
+ SCANCODE_NUMLOCKCLEAR = 83
97
+ SCANCODE_KP_DIVIDE = 84
98
+ SCANCODE_KP_MULTIPLY = 85
99
+ SCANCODE_KP_MINUS = 86
100
+ SCANCODE_KP_PLUS = 87
101
+ SCANCODE_KP_ENTER = 88
102
+ SCANCODE_KP_1 = 89
103
+ SCANCODE_KP_2 = 90
104
+ SCANCODE_KP_3 = 91
105
+ SCANCODE_KP_4 = 92
106
+ SCANCODE_KP_5 = 93
107
+ SCANCODE_KP_6 = 94
108
+ SCANCODE_KP_7 = 95
109
+ SCANCODE_KP_8 = 96
110
+ SCANCODE_KP_9 = 97
111
+ SCANCODE_KP_0 = 98
112
+ SCANCODE_KP_PERIOD = 99
113
+ SCANCODE_NONUSBACKSLASH = 100
114
+ SCANCODE_APPLICATION = 101
115
+ SCANCODE_POWER = 102
116
+ SCANCODE_KP_EQUALS = 103
117
+ SCANCODE_F13 = 104
118
+ SCANCODE_F14 = 105
119
+ SCANCODE_F15 = 106
120
+ SCANCODE_F16 = 107
121
+ SCANCODE_F17 = 108
122
+ SCANCODE_F18 = 109
123
+ SCANCODE_F19 = 110
124
+ SCANCODE_F20 = 111
125
+ SCANCODE_F21 = 112
126
+ SCANCODE_F22 = 113
127
+ SCANCODE_F23 = 114
128
+ SCANCODE_F24 = 115
129
+ SCANCODE_EXECUTE = 116
130
+ SCANCODE_HELP = 117
131
+ SCANCODE_MENU = 118
132
+ SCANCODE_SELECT = 119
133
+ SCANCODE_STOP = 120
134
+ SCANCODE_AGAIN = 121
135
+ SCANCODE_UNDO = 122
136
+ SCANCODE_CUT = 123
137
+ SCANCODE_COPY = 124
138
+ SCANCODE_PASTE = 125
139
+ SCANCODE_FIND = 126
140
+ SCANCODE_MUTE = 127
141
+ SCANCODE_VOLUMEUP = 128
142
+ SCANCODE_VOLUMEDOWN = 129
143
+ SCANCODE_KP_COMMA = 133
144
+ SCANCODE_KP_EQUALSAS400 = 134
145
+ SCANCODE_INTERNATIONAL1 = 135
146
+ SCANCODE_INTERNATIONAL2 = 136
147
+ SCANCODE_INTERNATIONAL3 = 137
148
+ SCANCODE_INTERNATIONAL4 = 138
149
+ SCANCODE_INTERNATIONAL5 = 139
150
+ SCANCODE_INTERNATIONAL6 = 140
151
+ SCANCODE_INTERNATIONAL7 = 141
152
+ SCANCODE_INTERNATIONAL8 = 142
153
+ SCANCODE_INTERNATIONAL9 = 143
154
+ SCANCODE_LANG1 = 144
155
+ SCANCODE_LANG2 = 145
156
+ SCANCODE_LANG3 = 146
157
+ SCANCODE_LANG4 = 147
158
+ SCANCODE_LANG5 = 148
159
+ SCANCODE_LANG6 = 149
160
+ SCANCODE_LANG7 = 150
161
+ SCANCODE_LANG8 = 151
162
+ SCANCODE_LANG9 = 152
163
+ SCANCODE_ALTERASE = 153
164
+ SCANCODE_SYSREQ = 154
165
+ SCANCODE_CANCEL = 155
166
+ SCANCODE_CLEAR = 156
167
+ SCANCODE_PRIOR = 157
168
+ SCANCODE_RETURN2 = 158
169
+ SCANCODE_SEPARATOR = 159
170
+ SCANCODE_OUT = 160
171
+ SCANCODE_OPER = 161
172
+ SCANCODE_CLEARAGAIN = 162
173
+ SCANCODE_CRSEL = 163
174
+ SCANCODE_EXSEL = 164
175
+ SCANCODE_KP_00 = 176
176
+ SCANCODE_KP_000 = 177
177
+ SCANCODE_THOUSANDSSEPARATOR = 178
178
+ SCANCODE_DECIMALSEPARATOR = 179
179
+ SCANCODE_CURRENCYUNIT = 180
180
+ SCANCODE_CURRENCYSUBUNIT = 181
181
+ SCANCODE_KP_LEFTPAREN = 182
182
+ SCANCODE_KP_RIGHTPAREN = 183
183
+ SCANCODE_KP_LEFTBRACE = 184
184
+ SCANCODE_KP_RIGHTBRACE = 185
185
+ SCANCODE_KP_TAB = 186
186
+ SCANCODE_KP_BACKSPACE = 187
187
+ SCANCODE_KP_A = 188
188
+ SCANCODE_KP_B = 189
189
+ SCANCODE_KP_C = 190
190
+ SCANCODE_KP_D = 191
191
+ SCANCODE_KP_E = 192
192
+ SCANCODE_KP_F = 193
193
+ SCANCODE_KP_XOR = 194
194
+ SCANCODE_KP_POWER = 195
195
+ SCANCODE_KP_PERCENT = 196
196
+ SCANCODE_KP_LESS = 197
197
+ SCANCODE_KP_GREATER = 198
198
+ SCANCODE_KP_AMPERSAND = 199
199
+ SCANCODE_KP_DBLAMPERSAND = 200
200
+ SCANCODE_KP_VERTICALBAR = 201
201
+ SCANCODE_KP_DBLVERTICALBAR = 202
202
+ SCANCODE_KP_COLON = 203
203
+ SCANCODE_KP_HASH = 204
204
+ SCANCODE_KP_SPACE = 205
205
+ SCANCODE_KP_AT = 206
206
+ SCANCODE_KP_EXCLAM = 207
207
+ SCANCODE_KP_MEMSTORE = 208
208
+ SCANCODE_KP_MEMRECALL = 209
209
+ SCANCODE_KP_MEMCLEAR = 210
210
+ SCANCODE_KP_MEMADD = 211
211
+ SCANCODE_KP_MEMSUBTRACT = 212
212
+ SCANCODE_KP_MEMMULTIPLY = 213
213
+ SCANCODE_KP_MEMDIVIDE = 214
214
+ SCANCODE_KP_PLUSMINUS = 215
215
+ SCANCODE_KP_CLEAR = 216
216
+ SCANCODE_KP_CLEARENTRY = 217
217
+ SCANCODE_KP_BINARY = 218
218
+ SCANCODE_KP_OCTAL = 219
219
+ SCANCODE_KP_DECIMAL = 220
220
+ SCANCODE_KP_HEXADECIMAL = 221
221
+ SCANCODE_LCTRL = 224
222
+ SCANCODE_LSHIFT = 225
223
+ SCANCODE_LALT = 226
224
+ SCANCODE_LGUI = 227
225
+ SCANCODE_RCTRL = 228
226
+ SCANCODE_RSHIFT = 229
227
+ SCANCODE_RALT = 230
228
+ SCANCODE_RGUI = 231
229
+ SCANCODE_MODE = 257
230
+ SCANCODE_AUDIONEXT = 258
231
+ SCANCODE_AUDIOPREV = 259
232
+ SCANCODE_AUDIOSTOP = 260
233
+ SCANCODE_AUDIOPLAY = 261
234
+ SCANCODE_AUDIOMUTE = 262
235
+ SCANCODE_MEDIASELECT = 263
236
+ SCANCODE_WWW = 264
237
+ SCANCODE_MAIL = 265
238
+ SCANCODE_CALCULATOR = 266
239
+ SCANCODE_COMPUTER = 267
240
+ SCANCODE_AC_SEARCH = 268
241
+ SCANCODE_AC_HOME = 269
242
+ SCANCODE_AC_BACK = 270
243
+ SCANCODE_AC_FORWARD = 271
244
+ SCANCODE_AC_STOP = 272
245
+ SCANCODE_AC_REFRESH = 273
246
+ SCANCODE_AC_BOOKMARKS = 274
247
+ SCANCODE_BRIGHTNESSDOWN = 275
248
+ SCANCODE_BRIGHTNESSUP = 276
249
+ SCANCODE_DISPLAYSWITCH = 277
250
+ SCANCODE_KBDILLUMTOGGLE = 278
251
+ SCANCODE_KBDILLUMDOWN = 279
252
+ SCANCODE_KBDILLUMUP = 280
253
+ SCANCODE_EJECT = 281
254
+ SCANCODE_SLEEP = 282
255
+ SCANCODE_APP1 = 283
256
+ SCANCODE_APP2 = 284
257
+ SCANCODE_AUDIOREWIND = 285
258
+ SCANCODE_AUDIOFASTFORWARD = 286
259
+ NUM_SCANCODES = 512
260
+
261
+ # Typedef
262
+
263
+ typedef :int, :SDL_Scancode
264
+
265
+ # Struct
266
+
267
+
268
+ # Function
269
+
270
+ def self.setup_scancode_symbols(output_error = false)
271
+ symbols = [
272
+ ]
273
+ apis = {
274
+ }
275
+ args = {
276
+ }
277
+ retvals = {
278
+ }
279
+ symbols.each do |sym|
280
+ begin
281
+ attach_function apis[sym], sym, args[sym], retvals[sym]
282
+ rescue FFI::NotFoundError => error
283
+ $stderr.puts("[Warning] Failed to import #{sym} (#{error}).") if output_error
284
+ end
285
+ end
286
+ end
287
+
288
+ end
289
+