SDLRuby 0.1.0 → 0.2.0

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 +4 -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 +98 -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,138 +0,0 @@
1
- module SDLRuby
2
- module SDL
3
- SDL_ALPHA_OPAQUE = 255
4
- SDL_ALPHA_TRANSPARENT = 0
5
-
6
- SDL_Color = struct ["Uint8 r", "Uint8 g", "Uint8 b", "Uint8 a"]
7
-
8
- # SDL_PixelType
9
- i1 = 1
10
- i4 = 2
11
- i8 = 3
12
- p8 = 4
13
- p16 = 5
14
- p32 = 6
15
- a_u8 = 7
16
-
17
- # SDL_BitmapOrder
18
- b_4321 = 1
19
- b_1234 = 2
20
-
21
- # SDL_PackedOrder
22
- p_xrgb = 1
23
- p_rgbx = 2
24
- p_argb = 3
25
- p_rgba = 4
26
- p_xbgr = 5
27
- p_bgrx = 6
28
- p_abgr = 7
29
- p_bgra = 8
30
-
31
- # SDL_ArrayOrder
32
- a_rgb = 1
33
- a_bgr = 4
34
-
35
- # SDL_PackedLayout
36
- l_332 = 1
37
- l_4444 = 2
38
- l_1555 = 3
39
- l_5551 = 4
40
- l_565 = 5
41
- l_8888 = 6
42
- l_2101010 = 7
43
-
44
- pixelformat = -> (type, order, layout, bits, bytes) {
45
- 1 << 28 | type << 24 | order << 20 | layout << 16 | bits << 8 | bytes << 0
46
- }
47
-
48
- SDL_PIXELFORMAT_UNKNOWN = 0
49
- SDL_PIXELFORMAT_INDEX1LSB = pixelformat.(i1, b_4321, 0, 1, 0)
50
- SDL_PIXELFORMAT_INDEX1MSB = pixelformat.(i1, b_1234, 0, 1, 0)
51
- SDL_PIXELFORMAT_INDEX4LSB = pixelformat.(i4, b_4321, 0, 4, 0)
52
- SDL_PIXELFORMAT_INDEX4MSB = pixelformat.(i4, b_1234, 0, 4, 0)
53
- SDL_PIXELFORMAT_INDEX8 = pixelformat.(i8, 0, 0, 8, 1)
54
- SDL_PIXELFORMAT_RGB332 = pixelformat.(p8, p_xrgb, l_332, 8, 1)
55
- SDL_PIXELFORMAT_XRGB4444 = pixelformat.(p16, p_xrgb, l_4444, 12, 2)
56
- SDL_PIXELFORMAT_RGB444 = SDL_PIXELFORMAT_XRGB4444
57
- SDL_PIXELFORMAT_XBGR4444 = pixelformat.(p16, p_xbgr, l_4444, 12, 2)
58
- SDL_PIXELFORMAT_BGR444 = SDL_PIXELFORMAT_XBGR4444
59
- SDL_PIXELFORMAT_XRGB1555 = pixelformat.(p16, p_xrgb, l_1555, 15, 2)
60
- SDL_PIXELFORMAT_RGB555 = SDL_PIXELFORMAT_XRGB1555
61
- SDL_PIXELFORMAT_XBGR1555 = pixelformat.(p16, p_xbgr, l_1555, 15, 2)
62
- SDL_PIXELFORMAT_BGR555 = SDL_PIXELFORMAT_XBGR1555
63
- SDL_PIXELFORMAT_ARGB4444 = pixelformat.(p16, p_argb, l_4444, 16, 2)
64
- SDL_PIXELFORMAT_RGBA4444 = pixelformat.(p16, p_rgba, l_4444, 16, 2)
65
- SDL_PIXELFORMAT_ABGR4444 = pixelformat.(p16, p_abgr, l_4444, 16, 2)
66
- SDL_PIXELFORMAT_BGRA4444 = pixelformat.(p16, p_bgra, l_4444, 16, 2)
67
- SDL_PIXELFORMAT_ARGB1555 = pixelformat.(p16, p_argb, l_1555, 16, 2)
68
- SDL_PIXELFORMAT_RGBA5551 = pixelformat.(p16, p_rgba, l_5551, 16, 2)
69
- SDL_PIXELFORMAT_ABGR1555 = pixelformat.(p16, p_abgr, l_1555, 16, 2)
70
- SDL_PIXELFORMAT_BGRA5551 = pixelformat.(p16, p_bgra, l_5551, 16, 2)
71
- SDL_PIXELFORMAT_RGB565 = pixelformat.(p16, p_xrgb, l_565, 16, 2)
72
- SDL_PIXELFORMAT_BGR565 = pixelformat.(p16, p_xbgr, l_565, 16, 2)
73
- SDL_PIXELFORMAT_RGB24 = pixelformat.(a_u8, a_rgb, 0, 24, 3)
74
- SDL_PIXELFORMAT_BGR24 = pixelformat.(a_u8, a_bgr, 0, 24, 3)
75
- SDL_PIXELFORMAT_XRGB8888 = pixelformat.(p32, p_xrgb, l_8888, 24, 4)
76
- SDL_PIXELFORMAT_RGB888 = SDL_PIXELFORMAT_XRGB8888
77
- SDL_PIXELFORMAT_RGBX8888 = pixelformat.(p32, p_rgbx, l_8888, 24, 4)
78
- SDL_PIXELFORMAT_XBGR8888 = pixelformat.(p32, p_xbgr, l_8888, 24, 4)
79
- SDL_PIXELFORMAT_BGR888 = SDL_PIXELFORMAT_XBGR8888
80
- SDL_PIXELFORMAT_BGRX8888 = pixelformat.(p32, p_bgrx, l_8888, 24, 4)
81
- SDL_PIXELFORMAT_ARGB8888 = pixelformat.(p32, p_argb, l_8888, 32, 4)
82
- SDL_PIXELFORMAT_RGBA8888 = pixelformat.(p32, p_rgba, l_8888, 32, 4)
83
- SDL_PIXELFORMAT_ABGR8888 = pixelformat.(p32, p_abgr, l_8888, 32, 4)
84
- SDL_PIXELFORMAT_BGRA8888 = pixelformat.(p32, p_bgra, l_8888, 32, 4)
85
- SDL_PIXELFORMAT_ARGB2101010 = pixelformat.(p32, p_argb, l_2101010, 32, 4)
86
-
87
- if "\x01\x02\x03\x04".unpack("I") == 0x1020304
88
- # BIG ENDIAN
89
- SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888
90
- SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888
91
- SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888
92
- SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888
93
- else
94
- SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888
95
- SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888
96
- SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888
97
- SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888
98
- end
99
-
100
- pixel_fourcc = -> (a, b, c, d) {
101
- _a, _b, _c, _d = [a, b, c, d].map { |s| s.encode("ASCII").bytes.first }
102
- _a << 0 | _b << 8 | _c << 16 | _d << 24
103
- }
104
-
105
- SDL_PIXELFORMAT_YV12 = pixel_fourcc.('Y', 'V', '1', '2')
106
- SDL_PIXELFORMAT_IYUV = pixel_fourcc.('I', 'Y', 'U', 'V')
107
- SDL_PIXELFORMAT_YUY2 = pixel_fourcc.('Y', 'U', 'Y', '2')
108
- SDL_PIXELFORMAT_UYVY = pixel_fourcc.('U', 'Y', 'V', 'Y')
109
- SDL_PIXELFORMAT_YVYU = pixel_fourcc.('Y', 'V', 'Y', 'U')
110
- SDL_PIXELFORMAT_NV12 = pixel_fourcc.('N', 'V', '1', '2')
111
- SDL_PIXELFORMAT_NV21 = pixel_fourcc.('N', 'V', '2', '1')
112
- SDL_PIXELFORMAT_EXTERNAL_OES = pixel_fourcc.('O', 'E', 'S', ' ')
113
-
114
- SDL_PixelFormat = struct(
115
- [
116
- "Uint32 format",
117
- "SDL_Palette* palette",
118
- "Uint8 BitsPerPixel",
119
- "Uint8 BytesPerPixel",
120
- "Uint8 padding[2]",
121
- "Uint32 Rmask",
122
- "Uint32 Gmask",
123
- "Uint32 Bmask",
124
- "Uint32 Amask",
125
- "Uint8 Rloss",
126
- "Uint8 Gloss",
127
- "Uint8 Bloss",
128
- "Uint8 Aloss",
129
- "Uint8 Rshift",
130
- "Uint8 Gshift",
131
- "Uint8 Bshift",
132
- "Uint8 Ashift",
133
- "int refcount",
134
- "SDL_PixelFormat* next"
135
- ]
136
- )
137
- end
138
- end
@@ -1,11 +0,0 @@
1
- module SDLRuby
2
- module SDL
3
- SDL_Point = struct(["int x", "int y"])
4
-
5
- SDL_FPoint = struct(["float x", "float y"])
6
-
7
- SDL_Rect = struct(["int x", "int y", "int w", "int h"])
8
-
9
- SDL_FRect = struct(["float x", "float y", "float w", "float h"])
10
- end
11
- end
@@ -1,35 +0,0 @@
1
- module SDLRuby
2
- module SDL
3
- SDL_RENDERER_SOFTWARE = 0x00000001
4
- SDL_RENDERER_ACCELERATED = 0x00000002
5
- SDL_RENDERER_PRESENTVSYNC = 0x00000004
6
- SDL_RENDERER_TARGETTEXTURE = 0x00000008
7
- typealias "SDL_RendererFlags", "int"
8
-
9
- SDL_RendererInfo = struct(
10
- [
11
- "const char *name",
12
- "Uint32 flags",
13
- "Uint32 num_texture_formats",
14
- "Uint32 texture_formats[16]",
15
- "int max_texture_width",
16
- "int max_texture_height"
17
- ]
18
- )
19
-
20
- SDL_FLIP_NONE = 0x00000000
21
- SDL_FLIP_HORIZONTAL = 0x00000001
22
- SDL_FLIP_VERTICAL = 0x00000002
23
- typealias "SDL_RendererFlip", "int"
24
-
25
- SDL_SCALEMODE_NEAREST = 0
26
- SDL_SCALEMODE_LINEAR = 1
27
- SDL_SCALEMODE_BEST = 2
28
- typealias "SDL_ScaleMode", "int"
29
-
30
- SDL_TEXTUREACCESS_STATIC = 0
31
- SDL_TEXTUREACCESS_STREAMING = 1
32
- SDL_TEXTUREACCESS_TARGET = 2
33
- typealias "SDL_TextureAccess", "int"
34
- end
35
- end
@@ -1,29 +0,0 @@
1
- module SDLRuby
2
- module SDL
3
- SDL_RWOPS_UNKNOWN = 0
4
- SDL_RWOPS_WINFILE = 1
5
- SDL_RWOPS_STDFILE = 2
6
- SDL_RWOPS_JNIFILE = 3
7
- SDL_RWOPS_MEMORY = 4
8
- SDL_RWOPS_MEMORY_RO = 5
9
-
10
- # アクセッサ用の構造体。実際のSDL_RWopsとは違い隠し領域のメンバーを含まない。
11
- #
12
- SDL_RWops = struct(
13
- [
14
- "void *size",
15
- "void *seek",
16
- "void *read",
17
- "void *write",
18
- "void *close",
19
- "Uint32 type"
20
- ]
21
- )
22
-
23
- SDL_RWops.module_eval do
24
- class << self
25
- undef malloc
26
- end
27
- end
28
- end
29
- end
@@ -1,255 +0,0 @@
1
- module SDLRuby
2
- module SDL
3
- SDL_SCANCODE_UNKNOWN = 0
4
- SDL_SCANCODE_A = 4
5
- SDL_SCANCODE_B = 5
6
- SDL_SCANCODE_C = 6
7
- SDL_SCANCODE_D = 7
8
- SDL_SCANCODE_E = 8
9
- SDL_SCANCODE_F = 9
10
- SDL_SCANCODE_G = 10
11
- SDL_SCANCODE_H = 11
12
- SDL_SCANCODE_I = 12
13
- SDL_SCANCODE_J = 13
14
- SDL_SCANCODE_K = 14
15
- SDL_SCANCODE_L = 15
16
- SDL_SCANCODE_M = 16
17
- SDL_SCANCODE_N = 17
18
- SDL_SCANCODE_O = 18
19
- SDL_SCANCODE_P = 19
20
- SDL_SCANCODE_Q = 20
21
- SDL_SCANCODE_R = 21
22
- SDL_SCANCODE_S = 22
23
- SDL_SCANCODE_T = 23
24
- SDL_SCANCODE_U = 24
25
- SDL_SCANCODE_V = 25
26
- SDL_SCANCODE_W = 26
27
- SDL_SCANCODE_X = 27
28
- SDL_SCANCODE_Y = 28
29
- SDL_SCANCODE_Z = 29
30
- SDL_SCANCODE_1 = 30
31
- SDL_SCANCODE_2 = 31
32
- SDL_SCANCODE_3 = 32
33
- SDL_SCANCODE_4 = 33
34
- SDL_SCANCODE_5 = 34
35
- SDL_SCANCODE_6 = 35
36
- SDL_SCANCODE_7 = 36
37
- SDL_SCANCODE_8 = 37
38
- SDL_SCANCODE_9 = 38
39
- SDL_SCANCODE_0 = 39
40
- SDL_SCANCODE_RETURN = 40
41
- SDL_SCANCODE_ESCAPE = 41
42
- SDL_SCANCODE_BACKSPACE = 42
43
- SDL_SCANCODE_TAB = 43
44
- SDL_SCANCODE_SPACE = 44
45
- SDL_SCANCODE_MINUS = 45
46
- SDL_SCANCODE_EQUALS = 46
47
- SDL_SCANCODE_LEFTBRACKET = 47
48
- SDL_SCANCODE_RIGHTBRACKET = 48
49
- SDL_SCANCODE_BACKSLASH = 49
50
- SDL_SCANCODE_NONUSHASH = 50
51
- SDL_SCANCODE_SEMICOLON = 51
52
- SDL_SCANCODE_APOSTROPHE = 52
53
- SDL_SCANCODE_GRAVE = 53
54
- SDL_SCANCODE_COMMA = 54
55
- SDL_SCANCODE_PERIOD = 55
56
- SDL_SCANCODE_SLASH = 56
57
- SDL_SCANCODE_CAPSLOCK = 57
58
- SDL_SCANCODE_F1 = 58
59
- SDL_SCANCODE_F2 = 59
60
- SDL_SCANCODE_F3 = 60
61
- SDL_SCANCODE_F4 = 61
62
- SDL_SCANCODE_F5 = 62
63
- SDL_SCANCODE_F6 = 63
64
- SDL_SCANCODE_F7 = 64
65
- SDL_SCANCODE_F8 = 65
66
- SDL_SCANCODE_F9 = 66
67
- SDL_SCANCODE_F10 = 67
68
- SDL_SCANCODE_F11 = 68
69
- SDL_SCANCODE_F12 = 69
70
- SDL_SCANCODE_PRINTSCREEN = 70
71
- SDL_SCANCODE_SCROLLLOCK = 71
72
- SDL_SCANCODE_PAUSE = 72
73
- SDL_SCANCODE_INSERT = 73
74
- SDL_SCANCODE_HOME = 74
75
- SDL_SCANCODE_PAGEUP = 75
76
- SDL_SCANCODE_DELETE = 76
77
- SDL_SCANCODE_END = 77
78
- SDL_SCANCODE_PAGEDOWN = 78
79
- SDL_SCANCODE_RIGHT = 79
80
- SDL_SCANCODE_LEFT = 80
81
- SDL_SCANCODE_DOWN = 81
82
- SDL_SCANCODE_UP = 82
83
- SDL_SCANCODE_NUMLOCKCLEAR = 83
84
- SDL_SCANCODE_KP_DIVIDE = 84
85
- SDL_SCANCODE_KP_MULTIPLY = 85
86
- SDL_SCANCODE_KP_MINUS = 86
87
- SDL_SCANCODE_KP_PLUS = 87
88
- SDL_SCANCODE_KP_ENTER = 88
89
- SDL_SCANCODE_KP_1 = 89
90
- SDL_SCANCODE_KP_2 = 90
91
- SDL_SCANCODE_KP_3 = 91
92
- SDL_SCANCODE_KP_4 = 92
93
- SDL_SCANCODE_KP_5 = 93
94
- SDL_SCANCODE_KP_6 = 94
95
- SDL_SCANCODE_KP_7 = 95
96
- SDL_SCANCODE_KP_8 = 96
97
- SDL_SCANCODE_KP_9 = 97
98
- SDL_SCANCODE_KP_0 = 98
99
- SDL_SCANCODE_KP_PERIOD = 99
100
- SDL_SCANCODE_NONUSBACKSLASH = 100
101
- SDL_SCANCODE_APPLICATION = 101
102
- SDL_SCANCODE_POWER = 102
103
- SDL_SCANCODE_KP_EQUALS = 103
104
- SDL_SCANCODE_F13 = 104
105
- SDL_SCANCODE_F14 = 105
106
- SDL_SCANCODE_F15 = 106
107
- SDL_SCANCODE_F16 = 107
108
- SDL_SCANCODE_F17 = 108
109
- SDL_SCANCODE_F18 = 109
110
- SDL_SCANCODE_F19 = 110
111
- SDL_SCANCODE_F20 = 111
112
- SDL_SCANCODE_F21 = 112
113
- SDL_SCANCODE_F22 = 113
114
- SDL_SCANCODE_F23 = 114
115
- SDL_SCANCODE_F24 = 115
116
- SDL_SCANCODE_EXECUTE = 116
117
- SDL_SCANCODE_HELP = 117
118
- SDL_SCANCODE_MENU = 118
119
- SDL_SCANCODE_SELECT = 119
120
- SDL_SCANCODE_STOP = 120
121
- SDL_SCANCODE_AGAIN = 121
122
- SDL_SCANCODE_UNDO = 122
123
- SDL_SCANCODE_CUT = 123
124
- SDL_SCANCODE_COPY = 124
125
- SDL_SCANCODE_PASTE = 125
126
- SDL_SCANCODE_FIND = 126
127
- SDL_SCANCODE_MUTE = 127
128
- SDL_SCANCODE_VOLUMEUP = 128
129
- SDL_SCANCODE_VOLUMEDOWN = 129
130
- SDL_SCANCODE_LOCKINGCAPSLOCK = 130
131
- SDL_SCANCODE_LOCKINGNUMLOCK = 131
132
- SDL_SCANCODE_LOCKINGSCROLLLOCK = 132
133
- SDL_SCANCODE_KP_COMMA = 133
134
- SDL_SCANCODE_KP_EQUALSAS400 = 134
135
- SDL_SCANCODE_INTERNATIONAL1 = 135
136
- SDL_SCANCODE_INTERNATIONAL2 = 136
137
- SDL_SCANCODE_INTERNATIONAL3 = 137
138
- SDL_SCANCODE_INTERNATIONAL4 = 138
139
- SDL_SCANCODE_INTERNATIONAL5 = 139
140
- SDL_SCANCODE_INTERNATIONAL6 = 140
141
- SDL_SCANCODE_INTERNATIONAL7 = 141
142
- SDL_SCANCODE_INTERNATIONAL8 = 142
143
- SDL_SCANCODE_INTERNATIONAL9 = 143
144
- SDL_SCANCODE_LANG1 = 144
145
- SDL_SCANCODE_LANG2 = 145
146
- SDL_SCANCODE_LANG3 = 146
147
- SDL_SCANCODE_LANG4 = 147
148
- SDL_SCANCODE_LANG5 = 148
149
- SDL_SCANCODE_LANG6 = 149
150
- SDL_SCANCODE_LANG7 = 150
151
- SDL_SCANCODE_LANG8 = 151
152
- SDL_SCANCODE_LANG9 = 152
153
- SDL_SCANCODE_ALTERASE = 153
154
- SDL_SCANCODE_SYSREQ = 154
155
- SDL_SCANCODE_CANCEL = 155
156
- SDL_SCANCODE_CLEAR = 156
157
- SDL_SCANCODE_PRIOR = 157
158
- SDL_SCANCODE_RETURN2 = 158
159
- SDL_SCANCODE_SEPARATOR = 159
160
- SDL_SCANCODE_OUT = 160
161
- SDL_SCANCODE_OPER = 161
162
- SDL_SCANCODE_CLEARAGAIN = 162
163
- SDL_SCANCODE_CRSEL = 163
164
- SDL_SCANCODE_EXSEL = 164
165
- SDL_SCANCODE_KP_00 = 176
166
- SDL_SCANCODE_KP_000 = 177
167
- SDL_SCANCODE_THOUSANDSSEPARATOR = 178
168
- SDL_SCANCODE_DECIMALSEPARATOR = 179
169
- SDL_SCANCODE_CURRENCYUNIT = 180
170
- SDL_SCANCODE_CURRENCYSUBUNIT = 181
171
- SDL_SCANCODE_KP_LEFTPAREN = 182
172
- SDL_SCANCODE_KP_RIGHTPAREN = 183
173
- SDL_SCANCODE_KP_LEFTBRACE = 184
174
- SDL_SCANCODE_KP_RIGHTBRACE = 185
175
- SDL_SCANCODE_KP_TAB = 186
176
- SDL_SCANCODE_KP_BACKSPACE = 187
177
- SDL_SCANCODE_KP_A = 188
178
- SDL_SCANCODE_KP_B = 189
179
- SDL_SCANCODE_KP_C = 190
180
- SDL_SCANCODE_KP_D = 191
181
- SDL_SCANCODE_KP_E = 192
182
- SDL_SCANCODE_KP_F = 193
183
- SDL_SCANCODE_KP_XOR = 194
184
- SDL_SCANCODE_KP_POWER = 195
185
- SDL_SCANCODE_KP_PERCENT = 196
186
- SDL_SCANCODE_KP_LESS = 197
187
- SDL_SCANCODE_KP_GREATER = 198
188
- SDL_SCANCODE_KP_AMPERSAND = 199
189
- SDL_SCANCODE_KP_DBLAMPERSAND = 200
190
- SDL_SCANCODE_KP_VERTICALBAR = 201
191
- SDL_SCANCODE_KP_DBLVERTICALBAR = 202
192
- SDL_SCANCODE_KP_COLON = 203
193
- SDL_SCANCODE_KP_HASH = 204
194
- SDL_SCANCODE_KP_SPACE = 205
195
- SDL_SCANCODE_KP_AT = 206
196
- SDL_SCANCODE_KP_EXCLAM = 207
197
- SDL_SCANCODE_KP_MEMSTORE = 208
198
- SDL_SCANCODE_KP_MEMRECALL = 209
199
- SDL_SCANCODE_KP_MEMCLEAR = 210
200
- SDL_SCANCODE_KP_MEMADD = 211
201
- SDL_SCANCODE_KP_MEMSUBTRACT = 212
202
- SDL_SCANCODE_KP_MEMMULTIPLY = 213
203
- SDL_SCANCODE_KP_MEMDIVIDE = 214
204
- SDL_SCANCODE_KP_PLUSMINUS = 215
205
- SDL_SCANCODE_KP_CLEAR = 216
206
- SDL_SCANCODE_KP_CLEARENTRY = 217
207
- SDL_SCANCODE_KP_BINARY = 218
208
- SDL_SCANCODE_KP_OCTAL = 219
209
- SDL_SCANCODE_KP_DECIMAL = 220
210
- SDL_SCANCODE_KP_HEXADECIMAL = 221
211
- SDL_SCANCODE_LCTRL = 224
212
- SDL_SCANCODE_LSHIFT = 225
213
- SDL_SCANCODE_LALT = 226
214
- SDL_SCANCODE_LGUI = 227
215
- SDL_SCANCODE_RCTRL = 228
216
- SDL_SCANCODE_RSHIFT = 229
217
- SDL_SCANCODE_RALT = 230
218
- SDL_SCANCODE_RGUI = 231
219
- SDL_SCANCODE_MODE = 257
220
- SDL_SCANCODE_AUDIONEXT = 258
221
- SDL_SCANCODE_AUDIOPREV = 259
222
- SDL_SCANCODE_AUDIOSTOP = 260
223
- SDL_SCANCODE_AUDIOPLAY = 261
224
- SDL_SCANCODE_AUDIOMUTE = 262
225
- SDL_SCANCODE_MEDIASELECT = 263
226
- SDL_SCANCODE_WWW = 264
227
- SDL_SCANCODE_MAIL = 265
228
- SDL_SCANCODE_CALCULATOR = 266
229
- SDL_SCANCODE_COMPUTER = 267
230
- SDL_SCANCODE_AC_SEARCH = 268
231
- SDL_SCANCODE_AC_HOME = 269
232
- SDL_SCANCODE_AC_BACK = 270
233
- SDL_SCANCODE_AC_FORWARD = 271
234
- SDL_SCANCODE_AC_STOP = 272
235
- SDL_SCANCODE_AC_REFRESH = 273
236
- SDL_SCANCODE_AC_BOOKMARKS = 274
237
- SDL_SCANCODE_BRIGHTNESSDOWN = 275
238
- SDL_SCANCODE_BRIGHTNESSUP = 276
239
- SDL_SCANCODE_DISPLAYSWITCH = 277
240
- SDL_SCANCODE_KBDILLUMTOGGLE = 278
241
- SDL_SCANCODE_KBDILLUMDOWN = 279
242
- SDL_SCANCODE_KBDILLUMUP = 280
243
- SDL_SCANCODE_EJECT = 281
244
- SDL_SCANCODE_SLEEP = 282
245
- SDL_SCANCODE_APP1 = 283
246
- SDL_SCANCODE_APP2 = 284
247
- SDL_SCANCODE_AUDIOREWIND = 285
248
- SDL_SCANCODE_AUDIOFASTFORWARD = 286
249
- SDL_SCANCODE_SOFTLEFT = 287
250
- SDL_SCANCODE_SOFTRIGHT = 288
251
- SDL_SCANCODE_CALL = 289
252
- SDL_SCANCODE_ENDCALL = 290
253
- SDL_NUM_SCANCODES = 512
254
- end
255
- end
@@ -1,27 +0,0 @@
1
- module SDLRuby
2
- module SDL
3
- SDL_DONTFREE = 0x00000004
4
-
5
- SDL_Surface = struct(
6
- [
7
- "Uint32 flags",
8
- "SDL_PixelFormat* format",
9
- "int w",
10
- "int h",
11
- "int pitch",
12
- "void* pixels",
13
- "void* userdata",
14
- "int locked",
15
- "void* list_blitmap",
16
- { clip_rect: SDL_Rect },
17
- "SDL_BlitMap* map",
18
- "int refcount"
19
- ]
20
- )
21
-
22
- extern "int SDL_UpperBlit(SDL_Surface * src, const SDL_Rect * srcrect,
23
- SDL_Surface * dst, SDL_Rect * dstrect)"
24
- extern "int SDL_UpperBlitScaled(SDL_Surface * src, const SDL_Rect * srcrect,
25
- SDL_Surface * dst, SDL_Rect * dstrect)"
26
- end
27
- end
@@ -1,5 +0,0 @@
1
- module SDLRuby
2
- module SDL
3
- SDL_version = struct ["Uint8 major", "Uint8 minor", "Uint8 patch"]
4
- end
5
- end
@@ -1,104 +0,0 @@
1
- module SDLRuby
2
- module SDL
3
- # SDL_WindowFlags
4
- #
5
- SDL_WINDOW_FULLSCREEN = 0x00000001
6
- SDL_WINDOW_OPENGL = 0x00000002
7
- SDL_WINDOW_SHOWN = 0x00000004
8
- SDL_WINDOW_HIDDEN = 0x00000008
9
- SDL_WINDOW_BORDERLESS = 0x00000010
10
- SDL_WINDOW_RESIZABLE = 0x00000020
11
- SDL_WINDOW_MINIMIZED = 0x00000040
12
- SDL_WINDOW_MAXIMIZED = 0x00000080
13
- SDL_WINDOW_MOUSE_GRABBED = 0x00000100
14
- SDL_WINDOW_INPUT_FOCUS = 0x00000200
15
- SDL_WINDOW_MOUSE_FOCUS = 0x00000400
16
- SDL_WINDOW_FULLSCREEN_DESKTOP = SDL_WINDOW_FULLSCREEN | 0x00001000
17
- SDL_WINDOW_FOREIGN = 0x00000800
18
- SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000
19
- SDL_WINDOW_MOUSE_CAPTURE = 0x00004000
20
- SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000
21
- SDL_WINDOW_SKIP_TASKBAR = 0x00010000
22
- SDL_WINDOW_UTILITY = 0x00020000
23
- SDL_WINDOW_TOOLTIP = 0x00040000
24
- SDL_WINDOW_POPUP_MENU = 0x00080000
25
- SDL_WINDOW_KEYBOARD_GRABBED = 0x00100000
26
- SDL_WINDOW_VULKAN = 0x10000000
27
- SDL_WINDOW_METAL = 0x20000000
28
- SDL_WINDOW_INPUT_GRABBED = SDL_WINDOW_MOUSE_GRABBED
29
-
30
- # Window position
31
- #
32
- SDL_WINDOWPOS_UNDEFINED = 0x1FFF0000
33
- SDL_WINDOWPOS_CENTERED = 0x2FFF0000
34
-
35
- # SDL_HitTestResult
36
- #
37
- SDL_HITTEST_NORMAL = 0
38
- SDL_HITTEST_DRAGGABLE = 1
39
- SDL_HITTEST_RESIZE_TOPLEFT = 2
40
- SDL_HITTEST_RESIZE_TOP = 3
41
- SDL_HITTEST_RESIZE_TOPRIGHT = 4
42
- SDL_HITTEST_RESIZE_RIGHT = 5
43
- SDL_HITTEST_RESIZE_BOTTOMRIGHT = 6
44
- SDL_HITTEST_RESIZE_BOTTOM = 7
45
- SDL_HITTEST_RESIZE_BOTTOMLEFT = 8
46
- SDL_HITTEST_RESIZE_LEFT = 9
47
-
48
- # Display orientation
49
- #
50
- SDL_ORIENTATION_UNKNOWN = 0
51
- SDL_ORIENTATION_LANDSCAPE = 1
52
- SDL_ORIENTATION_LANDSCAPE_FLIPPED = 2
53
- SDL_ORIENTATION_PORTRAIT = 3
54
- SDL_ORIENTATION_PORTRAIT_FLIPPED = 4
55
-
56
- # Window flash operation
57
- #
58
- SDL_FLASH_CANCEL = 0
59
- SDL_FLASH_BRIEFLY = 1
60
- SDL_FLASH_UNTIL_FOCUSED =2
61
-
62
- SDL_DisplayMode = struct(
63
- [
64
- "Uint32 format",
65
- "int w",
66
- "int h",
67
- "int refresh_rate",
68
- "void *driverdata"
69
- ]
70
- )
71
-
72
- # SDL_shape.h
73
- #
74
- SDL_NONSHAPEABLE_WINDOW = -1
75
- SDL_INVALID_SHAPE_ARGUMENT = -2
76
- SDL_WINDOW_LACKS_SHAPE = -3
77
-
78
- # WindowShapeMode
79
- #
80
- ShapeModeDefault = 0
81
- ShapeModeBinarizeAlpha = 1
82
- ShapeModeReverseBinarizeAlpha = 2
83
- ShapeModeColorKey = 3
84
- typealias "WindowShapeMode", "int"
85
-
86
- SDL_SHAPEMODEALPHA = -> (mode) {
87
- mode == ShapeModeDefault || mode == ShapeModeBinarizeAlpha || mode == ShapeModeReverseBinarizeAlpha
88
- }
89
-
90
- SDL_WindowShapeParams = union(
91
- [
92
- "Uint8 binarizationCutoff",
93
- { colorKey: SDL_Color }
94
- ]
95
- )
96
-
97
- SDL_WindowShapeMode = struct(
98
- [
99
- "WindowShapeMode mode",
100
- { parameters: SDL_WindowShapeParams }
101
- ]
102
- )
103
- end
104
- end