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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog +83 -79
  3. data/LICENSE.txt +1 -1
  4. data/README.md +49 -49
  5. data/lib/sdl2.rb +170 -170
  6. data/lib/sdl2_audio.rb +219 -201
  7. data/lib/sdl2_blendmode.rb +69 -69
  8. data/lib/sdl2_clipboard.rb +51 -51
  9. data/lib/sdl2_cpuinfo.rb +106 -106
  10. data/lib/sdl2_error.rb +64 -64
  11. data/lib/sdl2_events.rb +530 -530
  12. data/lib/sdl2_filesystem.rb +48 -48
  13. data/lib/sdl2_framerate.rb +67 -67
  14. data/lib/sdl2_gamecontroller.rb +254 -254
  15. data/lib/sdl2_gesture.rb +55 -55
  16. data/lib/sdl2_gfxPrimitives.rb +222 -222
  17. data/lib/sdl2_haptic.rb +269 -269
  18. data/lib/sdl2_hints.rb +174 -174
  19. data/lib/sdl2_image.rb +185 -185
  20. data/lib/sdl2_imageFilter.rb +132 -132
  21. data/lib/sdl2_joystick.rb +230 -230
  22. data/lib/sdl2_keyboard.rb +99 -99
  23. data/lib/sdl2_keycode.rb +304 -304
  24. data/lib/sdl2_log.rb +115 -115
  25. data/lib/sdl2_main.rb +67 -67
  26. data/lib/sdl2_messagebox.rb +98 -98
  27. data/lib/sdl2_mixer.rb +317 -307
  28. data/lib/sdl2_mouse.rb +117 -117
  29. data/lib/sdl2_pixels.rb +224 -224
  30. data/lib/sdl2_platform.rb +45 -45
  31. data/lib/sdl2_power.rb +51 -51
  32. data/lib/sdl2_rect.rb +102 -102
  33. data/lib/sdl2_render.rb +290 -290
  34. data/lib/sdl2_rotozoom.rb +66 -66
  35. data/lib/sdl2_rwops.rb +208 -208
  36. data/lib/sdl2_scancode.rb +287 -287
  37. data/lib/sdl2_shape.rb +77 -77
  38. data/lib/sdl2_stdinc.rb +393 -393
  39. data/lib/sdl2_surface.rb +182 -182
  40. data/lib/sdl2_syswm.rb +154 -154
  41. data/lib/sdl2_timer.rb +62 -62
  42. data/lib/sdl2_touch.rb +73 -73
  43. data/lib/sdl2_ttf.rb +202 -190
  44. data/lib/sdl2_version.rb +62 -62
  45. data/lib/sdl2_video.rb +411 -411
  46. data/lib/sdl2_vulkan.rb +64 -64
  47. metadata +6 -6
data/lib/sdl2_gesture.rb CHANGED
@@ -1,55 +1,55 @@
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
-
17
- # Typedef
18
-
19
- typedef :long_long, :SDL_GestureID
20
-
21
- # Struct
22
-
23
-
24
- # Function
25
-
26
- def self.setup_gesture_symbols()
27
- symbols = [
28
- :SDL_RecordGesture,
29
- :SDL_SaveAllDollarTemplates,
30
- :SDL_SaveDollarTemplate,
31
- :SDL_LoadDollarTemplates,
32
- ]
33
- args = {
34
- :SDL_RecordGesture => [:long_long],
35
- :SDL_SaveAllDollarTemplates => [:pointer],
36
- :SDL_SaveDollarTemplate => [:long_long, :pointer],
37
- :SDL_LoadDollarTemplates => [:long_long, :pointer],
38
- }
39
- retvals = {
40
- :SDL_RecordGesture => :int,
41
- :SDL_SaveAllDollarTemplates => :int,
42
- :SDL_SaveDollarTemplate => :int,
43
- :SDL_LoadDollarTemplates => :int,
44
- }
45
- symbols.each do |sym|
46
- begin
47
- attach_function sym, args[sym], retvals[sym]
48
- rescue FFI::NotFoundError => error
49
- $stderr.puts("[Warning] Failed to import #{sym} (#{error}).")
50
- end
51
- end
52
- end
53
-
54
- end
55
-
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
+
17
+ # Typedef
18
+
19
+ typedef :long_long, :SDL_GestureID
20
+
21
+ # Struct
22
+
23
+
24
+ # Function
25
+
26
+ def self.setup_gesture_symbols()
27
+ symbols = [
28
+ :SDL_RecordGesture,
29
+ :SDL_SaveAllDollarTemplates,
30
+ :SDL_SaveDollarTemplate,
31
+ :SDL_LoadDollarTemplates,
32
+ ]
33
+ args = {
34
+ :SDL_RecordGesture => [:long_long],
35
+ :SDL_SaveAllDollarTemplates => [:pointer],
36
+ :SDL_SaveDollarTemplate => [:long_long, :pointer],
37
+ :SDL_LoadDollarTemplates => [:long_long, :pointer],
38
+ }
39
+ retvals = {
40
+ :SDL_RecordGesture => :int,
41
+ :SDL_SaveAllDollarTemplates => :int,
42
+ :SDL_SaveDollarTemplate => :int,
43
+ :SDL_LoadDollarTemplates => :int,
44
+ }
45
+ symbols.each do |sym|
46
+ begin
47
+ attach_function sym, args[sym], retvals[sym]
48
+ rescue FFI::NotFoundError => error
49
+ $stderr.puts("[Warning] Failed to import #{sym} (#{error}).")
50
+ end
51
+ end
52
+ end
53
+
54
+ end
55
+
@@ -1,222 +1,222 @@
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
- SDL2_GFXPRIMITIVES_MAJOR = 1
14
- SDL2_GFXPRIMITIVES_MINOR = 0
15
- SDL2_GFXPRIMITIVES_MICRO = 4
16
-
17
- # Enum
18
-
19
-
20
- # Typedef
21
-
22
-
23
- # Struct
24
-
25
-
26
- # Function
27
-
28
- def self.setup_gfx_primitives_symbols()
29
- symbols = [
30
- :pixelColor,
31
- :pixelRGBA,
32
- :hlineColor,
33
- :hlineRGBA,
34
- :vlineColor,
35
- :vlineRGBA,
36
- :rectangleColor,
37
- :rectangleRGBA,
38
- :roundedRectangleColor,
39
- :roundedRectangleRGBA,
40
- :boxColor,
41
- :boxRGBA,
42
- :roundedBoxColor,
43
- :roundedBoxRGBA,
44
- :lineColor,
45
- :lineRGBA,
46
- :aalineColor,
47
- :aalineRGBA,
48
- :thickLineColor,
49
- :thickLineRGBA,
50
- :circleColor,
51
- :circleRGBA,
52
- :arcColor,
53
- :arcRGBA,
54
- :aacircleColor,
55
- :aacircleRGBA,
56
- :filledCircleColor,
57
- :filledCircleRGBA,
58
- :ellipseColor,
59
- :ellipseRGBA,
60
- :aaellipseColor,
61
- :aaellipseRGBA,
62
- :filledEllipseColor,
63
- :filledEllipseRGBA,
64
- :pieColor,
65
- :pieRGBA,
66
- :filledPieColor,
67
- :filledPieRGBA,
68
- :trigonColor,
69
- :trigonRGBA,
70
- :aatrigonColor,
71
- :aatrigonRGBA,
72
- :filledTrigonColor,
73
- :filledTrigonRGBA,
74
- :polygonColor,
75
- :polygonRGBA,
76
- :aapolygonColor,
77
- :aapolygonRGBA,
78
- :filledPolygonColor,
79
- :filledPolygonRGBA,
80
- :texturedPolygon,
81
- :bezierColor,
82
- :bezierRGBA,
83
- :gfxPrimitivesSetFont,
84
- :gfxPrimitivesSetFontRotation,
85
- :characterColor,
86
- :characterRGBA,
87
- :stringColor,
88
- :stringRGBA,
89
- ]
90
- args = {
91
- :pixelColor => [:pointer, :short, :short, :uint],
92
- :pixelRGBA => [:pointer, :short, :short, :uchar, :uchar, :uchar, :uchar],
93
- :hlineColor => [:pointer, :short, :short, :short, :uint],
94
- :hlineRGBA => [:pointer, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
95
- :vlineColor => [:pointer, :short, :short, :short, :uint],
96
- :vlineRGBA => [:pointer, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
97
- :rectangleColor => [:pointer, :short, :short, :short, :short, :uint],
98
- :rectangleRGBA => [:pointer, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
99
- :roundedRectangleColor => [:pointer, :short, :short, :short, :short, :short, :uint],
100
- :roundedRectangleRGBA => [:pointer, :short, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
101
- :boxColor => [:pointer, :short, :short, :short, :short, :uint],
102
- :boxRGBA => [:pointer, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
103
- :roundedBoxColor => [:pointer, :short, :short, :short, :short, :short, :uint],
104
- :roundedBoxRGBA => [:pointer, :short, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
105
- :lineColor => [:pointer, :short, :short, :short, :short, :uint],
106
- :lineRGBA => [:pointer, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
107
- :aalineColor => [:pointer, :short, :short, :short, :short, :uint],
108
- :aalineRGBA => [:pointer, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
109
- :thickLineColor => [:pointer, :short, :short, :short, :short, :uchar, :uint],
110
- :thickLineRGBA => [:pointer, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar, :uchar],
111
- :circleColor => [:pointer, :short, :short, :short, :uint],
112
- :circleRGBA => [:pointer, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
113
- :arcColor => [:pointer, :short, :short, :short, :short, :short, :uint],
114
- :arcRGBA => [:pointer, :short, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
115
- :aacircleColor => [:pointer, :short, :short, :short, :uint],
116
- :aacircleRGBA => [:pointer, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
117
- :filledCircleColor => [:pointer, :short, :short, :short, :uint],
118
- :filledCircleRGBA => [:pointer, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
119
- :ellipseColor => [:pointer, :short, :short, :short, :short, :uint],
120
- :ellipseRGBA => [:pointer, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
121
- :aaellipseColor => [:pointer, :short, :short, :short, :short, :uint],
122
- :aaellipseRGBA => [:pointer, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
123
- :filledEllipseColor => [:pointer, :short, :short, :short, :short, :uint],
124
- :filledEllipseRGBA => [:pointer, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
125
- :pieColor => [:pointer, :short, :short, :short, :short, :short, :uint],
126
- :pieRGBA => [:pointer, :short, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
127
- :filledPieColor => [:pointer, :short, :short, :short, :short, :short, :uint],
128
- :filledPieRGBA => [:pointer, :short, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
129
- :trigonColor => [:pointer, :short, :short, :short, :short, :short, :short, :uint],
130
- :trigonRGBA => [:pointer, :short, :short, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
131
- :aatrigonColor => [:pointer, :short, :short, :short, :short, :short, :short, :uint],
132
- :aatrigonRGBA => [:pointer, :short, :short, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
133
- :filledTrigonColor => [:pointer, :short, :short, :short, :short, :short, :short, :uint],
134
- :filledTrigonRGBA => [:pointer, :short, :short, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
135
- :polygonColor => [:pointer, :pointer, :pointer, :int, :uint],
136
- :polygonRGBA => [:pointer, :pointer, :pointer, :int, :uchar, :uchar, :uchar, :uchar],
137
- :aapolygonColor => [:pointer, :pointer, :pointer, :int, :uint],
138
- :aapolygonRGBA => [:pointer, :pointer, :pointer, :int, :uchar, :uchar, :uchar, :uchar],
139
- :filledPolygonColor => [:pointer, :pointer, :pointer, :int, :uint],
140
- :filledPolygonRGBA => [:pointer, :pointer, :pointer, :int, :uchar, :uchar, :uchar, :uchar],
141
- :texturedPolygon => [:pointer, :pointer, :pointer, :int, :pointer, :int, :int],
142
- :bezierColor => [:pointer, :pointer, :pointer, :int, :int, :uint],
143
- :bezierRGBA => [:pointer, :pointer, :pointer, :int, :int, :uchar, :uchar, :uchar, :uchar],
144
- :gfxPrimitivesSetFont => [:pointer, :uint, :uint],
145
- :gfxPrimitivesSetFontRotation => [:uint],
146
- :characterColor => [:pointer, :short, :short, :char, :uint],
147
- :characterRGBA => [:pointer, :short, :short, :char, :uchar, :uchar, :uchar, :uchar],
148
- :stringColor => [:pointer, :short, :short, :pointer, :uint],
149
- :stringRGBA => [:pointer, :short, :short, :pointer, :uchar, :uchar, :uchar, :uchar],
150
- }
151
- retvals = {
152
- :pixelColor => :int,
153
- :pixelRGBA => :int,
154
- :hlineColor => :int,
155
- :hlineRGBA => :int,
156
- :vlineColor => :int,
157
- :vlineRGBA => :int,
158
- :rectangleColor => :int,
159
- :rectangleRGBA => :int,
160
- :roundedRectangleColor => :int,
161
- :roundedRectangleRGBA => :int,
162
- :boxColor => :int,
163
- :boxRGBA => :int,
164
- :roundedBoxColor => :int,
165
- :roundedBoxRGBA => :int,
166
- :lineColor => :int,
167
- :lineRGBA => :int,
168
- :aalineColor => :int,
169
- :aalineRGBA => :int,
170
- :thickLineColor => :int,
171
- :thickLineRGBA => :int,
172
- :circleColor => :int,
173
- :circleRGBA => :int,
174
- :arcColor => :int,
175
- :arcRGBA => :int,
176
- :aacircleColor => :int,
177
- :aacircleRGBA => :int,
178
- :filledCircleColor => :int,
179
- :filledCircleRGBA => :int,
180
- :ellipseColor => :int,
181
- :ellipseRGBA => :int,
182
- :aaellipseColor => :int,
183
- :aaellipseRGBA => :int,
184
- :filledEllipseColor => :int,
185
- :filledEllipseRGBA => :int,
186
- :pieColor => :int,
187
- :pieRGBA => :int,
188
- :filledPieColor => :int,
189
- :filledPieRGBA => :int,
190
- :trigonColor => :int,
191
- :trigonRGBA => :int,
192
- :aatrigonColor => :int,
193
- :aatrigonRGBA => :int,
194
- :filledTrigonColor => :int,
195
- :filledTrigonRGBA => :int,
196
- :polygonColor => :int,
197
- :polygonRGBA => :int,
198
- :aapolygonColor => :int,
199
- :aapolygonRGBA => :int,
200
- :filledPolygonColor => :int,
201
- :filledPolygonRGBA => :int,
202
- :texturedPolygon => :int,
203
- :bezierColor => :int,
204
- :bezierRGBA => :int,
205
- :gfxPrimitivesSetFont => :void,
206
- :gfxPrimitivesSetFontRotation => :void,
207
- :characterColor => :int,
208
- :characterRGBA => :int,
209
- :stringColor => :int,
210
- :stringRGBA => :int,
211
- }
212
- symbols.each do |sym|
213
- begin
214
- attach_function sym, args[sym], retvals[sym]
215
- rescue FFI::NotFoundError => error
216
- $stderr.puts("[Warning] Failed to import #{sym} (#{error}).")
217
- end
218
- end
219
- end
220
-
221
- end
222
-
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
+ SDL2_GFXPRIMITIVES_MAJOR = 1
14
+ SDL2_GFXPRIMITIVES_MINOR = 0
15
+ SDL2_GFXPRIMITIVES_MICRO = 4
16
+
17
+ # Enum
18
+
19
+
20
+ # Typedef
21
+
22
+
23
+ # Struct
24
+
25
+
26
+ # Function
27
+
28
+ def self.setup_gfx_primitives_symbols()
29
+ symbols = [
30
+ :pixelColor,
31
+ :pixelRGBA,
32
+ :hlineColor,
33
+ :hlineRGBA,
34
+ :vlineColor,
35
+ :vlineRGBA,
36
+ :rectangleColor,
37
+ :rectangleRGBA,
38
+ :roundedRectangleColor,
39
+ :roundedRectangleRGBA,
40
+ :boxColor,
41
+ :boxRGBA,
42
+ :roundedBoxColor,
43
+ :roundedBoxRGBA,
44
+ :lineColor,
45
+ :lineRGBA,
46
+ :aalineColor,
47
+ :aalineRGBA,
48
+ :thickLineColor,
49
+ :thickLineRGBA,
50
+ :circleColor,
51
+ :circleRGBA,
52
+ :arcColor,
53
+ :arcRGBA,
54
+ :aacircleColor,
55
+ :aacircleRGBA,
56
+ :filledCircleColor,
57
+ :filledCircleRGBA,
58
+ :ellipseColor,
59
+ :ellipseRGBA,
60
+ :aaellipseColor,
61
+ :aaellipseRGBA,
62
+ :filledEllipseColor,
63
+ :filledEllipseRGBA,
64
+ :pieColor,
65
+ :pieRGBA,
66
+ :filledPieColor,
67
+ :filledPieRGBA,
68
+ :trigonColor,
69
+ :trigonRGBA,
70
+ :aatrigonColor,
71
+ :aatrigonRGBA,
72
+ :filledTrigonColor,
73
+ :filledTrigonRGBA,
74
+ :polygonColor,
75
+ :polygonRGBA,
76
+ :aapolygonColor,
77
+ :aapolygonRGBA,
78
+ :filledPolygonColor,
79
+ :filledPolygonRGBA,
80
+ :texturedPolygon,
81
+ :bezierColor,
82
+ :bezierRGBA,
83
+ :gfxPrimitivesSetFont,
84
+ :gfxPrimitivesSetFontRotation,
85
+ :characterColor,
86
+ :characterRGBA,
87
+ :stringColor,
88
+ :stringRGBA,
89
+ ]
90
+ args = {
91
+ :pixelColor => [:pointer, :short, :short, :uint],
92
+ :pixelRGBA => [:pointer, :short, :short, :uchar, :uchar, :uchar, :uchar],
93
+ :hlineColor => [:pointer, :short, :short, :short, :uint],
94
+ :hlineRGBA => [:pointer, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
95
+ :vlineColor => [:pointer, :short, :short, :short, :uint],
96
+ :vlineRGBA => [:pointer, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
97
+ :rectangleColor => [:pointer, :short, :short, :short, :short, :uint],
98
+ :rectangleRGBA => [:pointer, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
99
+ :roundedRectangleColor => [:pointer, :short, :short, :short, :short, :short, :uint],
100
+ :roundedRectangleRGBA => [:pointer, :short, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
101
+ :boxColor => [:pointer, :short, :short, :short, :short, :uint],
102
+ :boxRGBA => [:pointer, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
103
+ :roundedBoxColor => [:pointer, :short, :short, :short, :short, :short, :uint],
104
+ :roundedBoxRGBA => [:pointer, :short, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
105
+ :lineColor => [:pointer, :short, :short, :short, :short, :uint],
106
+ :lineRGBA => [:pointer, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
107
+ :aalineColor => [:pointer, :short, :short, :short, :short, :uint],
108
+ :aalineRGBA => [:pointer, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
109
+ :thickLineColor => [:pointer, :short, :short, :short, :short, :uchar, :uint],
110
+ :thickLineRGBA => [:pointer, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar, :uchar],
111
+ :circleColor => [:pointer, :short, :short, :short, :uint],
112
+ :circleRGBA => [:pointer, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
113
+ :arcColor => [:pointer, :short, :short, :short, :short, :short, :uint],
114
+ :arcRGBA => [:pointer, :short, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
115
+ :aacircleColor => [:pointer, :short, :short, :short, :uint],
116
+ :aacircleRGBA => [:pointer, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
117
+ :filledCircleColor => [:pointer, :short, :short, :short, :uint],
118
+ :filledCircleRGBA => [:pointer, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
119
+ :ellipseColor => [:pointer, :short, :short, :short, :short, :uint],
120
+ :ellipseRGBA => [:pointer, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
121
+ :aaellipseColor => [:pointer, :short, :short, :short, :short, :uint],
122
+ :aaellipseRGBA => [:pointer, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
123
+ :filledEllipseColor => [:pointer, :short, :short, :short, :short, :uint],
124
+ :filledEllipseRGBA => [:pointer, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
125
+ :pieColor => [:pointer, :short, :short, :short, :short, :short, :uint],
126
+ :pieRGBA => [:pointer, :short, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
127
+ :filledPieColor => [:pointer, :short, :short, :short, :short, :short, :uint],
128
+ :filledPieRGBA => [:pointer, :short, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
129
+ :trigonColor => [:pointer, :short, :short, :short, :short, :short, :short, :uint],
130
+ :trigonRGBA => [:pointer, :short, :short, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
131
+ :aatrigonColor => [:pointer, :short, :short, :short, :short, :short, :short, :uint],
132
+ :aatrigonRGBA => [:pointer, :short, :short, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
133
+ :filledTrigonColor => [:pointer, :short, :short, :short, :short, :short, :short, :uint],
134
+ :filledTrigonRGBA => [:pointer, :short, :short, :short, :short, :short, :short, :uchar, :uchar, :uchar, :uchar],
135
+ :polygonColor => [:pointer, :pointer, :pointer, :int, :uint],
136
+ :polygonRGBA => [:pointer, :pointer, :pointer, :int, :uchar, :uchar, :uchar, :uchar],
137
+ :aapolygonColor => [:pointer, :pointer, :pointer, :int, :uint],
138
+ :aapolygonRGBA => [:pointer, :pointer, :pointer, :int, :uchar, :uchar, :uchar, :uchar],
139
+ :filledPolygonColor => [:pointer, :pointer, :pointer, :int, :uint],
140
+ :filledPolygonRGBA => [:pointer, :pointer, :pointer, :int, :uchar, :uchar, :uchar, :uchar],
141
+ :texturedPolygon => [:pointer, :pointer, :pointer, :int, :pointer, :int, :int],
142
+ :bezierColor => [:pointer, :pointer, :pointer, :int, :int, :uint],
143
+ :bezierRGBA => [:pointer, :pointer, :pointer, :int, :int, :uchar, :uchar, :uchar, :uchar],
144
+ :gfxPrimitivesSetFont => [:pointer, :uint, :uint],
145
+ :gfxPrimitivesSetFontRotation => [:uint],
146
+ :characterColor => [:pointer, :short, :short, :char, :uint],
147
+ :characterRGBA => [:pointer, :short, :short, :char, :uchar, :uchar, :uchar, :uchar],
148
+ :stringColor => [:pointer, :short, :short, :pointer, :uint],
149
+ :stringRGBA => [:pointer, :short, :short, :pointer, :uchar, :uchar, :uchar, :uchar],
150
+ }
151
+ retvals = {
152
+ :pixelColor => :int,
153
+ :pixelRGBA => :int,
154
+ :hlineColor => :int,
155
+ :hlineRGBA => :int,
156
+ :vlineColor => :int,
157
+ :vlineRGBA => :int,
158
+ :rectangleColor => :int,
159
+ :rectangleRGBA => :int,
160
+ :roundedRectangleColor => :int,
161
+ :roundedRectangleRGBA => :int,
162
+ :boxColor => :int,
163
+ :boxRGBA => :int,
164
+ :roundedBoxColor => :int,
165
+ :roundedBoxRGBA => :int,
166
+ :lineColor => :int,
167
+ :lineRGBA => :int,
168
+ :aalineColor => :int,
169
+ :aalineRGBA => :int,
170
+ :thickLineColor => :int,
171
+ :thickLineRGBA => :int,
172
+ :circleColor => :int,
173
+ :circleRGBA => :int,
174
+ :arcColor => :int,
175
+ :arcRGBA => :int,
176
+ :aacircleColor => :int,
177
+ :aacircleRGBA => :int,
178
+ :filledCircleColor => :int,
179
+ :filledCircleRGBA => :int,
180
+ :ellipseColor => :int,
181
+ :ellipseRGBA => :int,
182
+ :aaellipseColor => :int,
183
+ :aaellipseRGBA => :int,
184
+ :filledEllipseColor => :int,
185
+ :filledEllipseRGBA => :int,
186
+ :pieColor => :int,
187
+ :pieRGBA => :int,
188
+ :filledPieColor => :int,
189
+ :filledPieRGBA => :int,
190
+ :trigonColor => :int,
191
+ :trigonRGBA => :int,
192
+ :aatrigonColor => :int,
193
+ :aatrigonRGBA => :int,
194
+ :filledTrigonColor => :int,
195
+ :filledTrigonRGBA => :int,
196
+ :polygonColor => :int,
197
+ :polygonRGBA => :int,
198
+ :aapolygonColor => :int,
199
+ :aapolygonRGBA => :int,
200
+ :filledPolygonColor => :int,
201
+ :filledPolygonRGBA => :int,
202
+ :texturedPolygon => :int,
203
+ :bezierColor => :int,
204
+ :bezierRGBA => :int,
205
+ :gfxPrimitivesSetFont => :void,
206
+ :gfxPrimitivesSetFontRotation => :void,
207
+ :characterColor => :int,
208
+ :characterRGBA => :int,
209
+ :stringColor => :int,
210
+ :stringRGBA => :int,
211
+ }
212
+ symbols.each do |sym|
213
+ begin
214
+ attach_function sym, args[sym], retvals[sym]
215
+ rescue FFI::NotFoundError => error
216
+ $stderr.puts("[Warning] Failed to import #{sym} (#{error}).")
217
+ end
218
+ end
219
+ end
220
+
221
+ end
222
+