sdl2-bindings 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog +145 -134
  3. data/LICENSE.txt +0 -0
  4. data/README.md +108 -86
  5. data/lib/sdl2.rb +131 -131
  6. data/lib/sdl2_audio.rb +265 -261
  7. data/lib/sdl2_blendmode.rb +72 -72
  8. data/lib/sdl2_clipboard.rb +56 -56
  9. data/lib/sdl2_cpuinfo.rb +137 -129
  10. data/lib/sdl2_error.rb +71 -71
  11. data/lib/sdl2_events.rb +575 -564
  12. data/lib/sdl2_filesystem.rb +52 -52
  13. data/lib/sdl2_framerate.rb +74 -74
  14. data/lib/sdl2_gamecontroller.rb +345 -329
  15. data/lib/sdl2_gesture.rb +61 -61
  16. data/lib/sdl2_gfxPrimitives.rb +283 -283
  17. data/lib/sdl2_guid.rb +58 -0
  18. data/lib/sdl2_haptic.rb +301 -301
  19. data/lib/sdl2_hidapi.rb +139 -139
  20. data/lib/sdl2_hints.rb +240 -221
  21. data/lib/sdl2_image.rb +296 -296
  22. data/lib/sdl2_imageFilter.rb +164 -164
  23. data/lib/sdl2_joystick.rb +332 -294
  24. data/lib/sdl2_keyboard.rb +129 -125
  25. data/lib/sdl2_keycode.rb +311 -307
  26. data/lib/sdl2_log.rb +131 -131
  27. data/lib/sdl2_main.rb +74 -74
  28. data/lib/sdl2_messagebox.rb +102 -102
  29. data/lib/sdl2_misc.rb +48 -48
  30. data/lib/sdl2_mixer.rb +464 -464
  31. data/lib/sdl2_mouse.rb +136 -136
  32. data/lib/sdl2_pixels.rb +240 -240
  33. data/lib/sdl2_platform.rb +48 -48
  34. data/lib/sdl2_power.rb +54 -54
  35. data/lib/sdl2_rect.rb +145 -145
  36. data/lib/sdl2_render.rb +408 -408
  37. data/lib/sdl2_rotozoom.rb +76 -76
  38. data/lib/sdl2_rwops.rb +242 -242
  39. data/lib/sdl2_scancode.rb +293 -289
  40. data/lib/sdl2_sensor.rb +115 -115
  41. data/lib/sdl2_shape.rb +83 -83
  42. data/lib/sdl2_sound.rb +154 -154
  43. data/lib/sdl2_stdinc.rb +572 -548
  44. data/lib/sdl2_surface.rb +229 -229
  45. data/lib/sdl2_syswm.rb +160 -160
  46. data/lib/sdl2_timer.rb +74 -74
  47. data/lib/sdl2_touch.rb +86 -86
  48. data/lib/sdl2_ttf.rb +414 -414
  49. data/lib/sdl2_version.rb +67 -67
  50. data/lib/sdl2_video.rb +549 -540
  51. data/lib/sdl2_vulkan.rb +72 -72
  52. metadata +4 -3
data/lib/sdl2_scancode.rb CHANGED
@@ -1,289 +1,293 @@
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
-
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
+ SCANCODE_SOFTLEFT = 287
260
+ SCANCODE_SOFTRIGHT = 288
261
+ SCANCODE_CALL = 289
262
+ SCANCODE_ENDCALL = 290
263
+ NUM_SCANCODES = 512
264
+
265
+ # Typedef
266
+
267
+ typedef :int, :SDL_Scancode
268
+
269
+ # Struct
270
+
271
+
272
+ # Function
273
+
274
+ def self.setup_scancode_symbols(output_error = false)
275
+ symbols = [
276
+ ]
277
+ apis = {
278
+ }
279
+ args = {
280
+ }
281
+ retvals = {
282
+ }
283
+ symbols.each do |sym|
284
+ begin
285
+ attach_function apis[sym], sym, args[sym], retvals[sym]
286
+ rescue FFI::NotFoundError => error
287
+ $stderr.puts("[Warning] Failed to import #{sym} (#{error}).") if output_error
288
+ end
289
+ end
290
+ end
291
+
292
+ end
293
+