sdl2-bindings 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +83 -79
- data/LICENSE.txt +1 -1
- data/README.md +49 -49
- data/lib/sdl2.rb +170 -170
- data/lib/sdl2_audio.rb +219 -201
- data/lib/sdl2_blendmode.rb +69 -69
- data/lib/sdl2_clipboard.rb +51 -51
- data/lib/sdl2_cpuinfo.rb +106 -106
- data/lib/sdl2_error.rb +64 -64
- data/lib/sdl2_events.rb +530 -530
- data/lib/sdl2_filesystem.rb +48 -48
- data/lib/sdl2_framerate.rb +67 -67
- data/lib/sdl2_gamecontroller.rb +254 -254
- data/lib/sdl2_gesture.rb +55 -55
- data/lib/sdl2_gfxPrimitives.rb +222 -222
- data/lib/sdl2_haptic.rb +269 -269
- data/lib/sdl2_hints.rb +174 -174
- data/lib/sdl2_image.rb +185 -185
- data/lib/sdl2_imageFilter.rb +132 -132
- data/lib/sdl2_joystick.rb +230 -230
- data/lib/sdl2_keyboard.rb +99 -99
- data/lib/sdl2_keycode.rb +304 -304
- data/lib/sdl2_log.rb +115 -115
- data/lib/sdl2_main.rb +67 -67
- data/lib/sdl2_messagebox.rb +98 -98
- data/lib/sdl2_mixer.rb +317 -307
- data/lib/sdl2_mouse.rb +117 -117
- data/lib/sdl2_pixels.rb +224 -224
- data/lib/sdl2_platform.rb +45 -45
- data/lib/sdl2_power.rb +51 -51
- data/lib/sdl2_rect.rb +102 -102
- data/lib/sdl2_render.rb +290 -290
- data/lib/sdl2_rotozoom.rb +66 -66
- data/lib/sdl2_rwops.rb +208 -208
- data/lib/sdl2_scancode.rb +287 -287
- data/lib/sdl2_shape.rb +77 -77
- data/lib/sdl2_stdinc.rb +393 -393
- data/lib/sdl2_surface.rb +182 -182
- data/lib/sdl2_syswm.rb +154 -154
- data/lib/sdl2_timer.rb +62 -62
- data/lib/sdl2_touch.rb +73 -73
- data/lib/sdl2_ttf.rb +202 -190
- data/lib/sdl2_version.rb +62 -62
- data/lib/sdl2_video.rb +411 -411
- data/lib/sdl2_vulkan.rb +64 -64
- metadata +6 -6
data/lib/sdl2_scancode.rb
CHANGED
@@ -1,287 +1,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 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 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
|
+
|