sdl2-bindings 0.1.0 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +134 -108
- data/LICENSE.txt +0 -0
- data/README.md +86 -68
- data/lib/sdl2.rb +131 -127
- data/lib/sdl2_audio.rb +261 -261
- data/lib/sdl2_blendmode.rb +72 -72
- data/lib/sdl2_clipboard.rb +56 -56
- data/lib/sdl2_cpuinfo.rb +129 -129
- data/lib/sdl2_error.rb +71 -71
- data/lib/sdl2_events.rb +564 -552
- data/lib/sdl2_filesystem.rb +52 -52
- data/lib/sdl2_framerate.rb +74 -74
- data/lib/sdl2_gamecontroller.rb +329 -329
- data/lib/sdl2_gesture.rb +61 -61
- data/lib/sdl2_gfxPrimitives.rb +283 -283
- data/lib/sdl2_haptic.rb +301 -301
- data/lib/sdl2_hidapi.rb +139 -139
- data/lib/sdl2_hints.rb +221 -207
- data/lib/sdl2_image.rb +296 -232
- data/lib/sdl2_imageFilter.rb +164 -164
- data/lib/sdl2_joystick.rb +294 -294
- data/lib/sdl2_keyboard.rb +125 -117
- data/lib/sdl2_keycode.rb +307 -307
- data/lib/sdl2_log.rb +131 -131
- data/lib/sdl2_main.rb +74 -74
- data/lib/sdl2_messagebox.rb +102 -102
- data/lib/sdl2_misc.rb +48 -48
- data/lib/sdl2_mixer.rb +464 -392
- data/lib/sdl2_mouse.rb +136 -136
- data/lib/sdl2_pixels.rb +240 -240
- data/lib/sdl2_platform.rb +48 -48
- data/lib/sdl2_power.rb +54 -54
- data/lib/sdl2_rect.rb +145 -109
- data/lib/sdl2_render.rb +408 -404
- data/lib/sdl2_rotozoom.rb +76 -76
- data/lib/sdl2_rwops.rb +242 -238
- data/lib/sdl2_scancode.rb +289 -289
- data/lib/sdl2_sensor.rb +115 -115
- data/lib/sdl2_shape.rb +83 -83
- data/lib/sdl2_sound.rb +154 -0
- data/lib/sdl2_stdinc.rb +548 -564
- data/lib/sdl2_surface.rb +229 -229
- data/lib/sdl2_syswm.rb +160 -160
- data/lib/sdl2_timer.rb +74 -74
- data/lib/sdl2_touch.rb +86 -82
- data/lib/sdl2_ttf.rb +414 -357
- data/lib/sdl2_version.rb +67 -67
- data/lib/sdl2_video.rb +540 -540
- data/lib/sdl2_vulkan.rb +72 -72
- metadata +3 -2
data/lib/sdl2_image.rb
CHANGED
@@ -1,232 +1,296 @@
|
|
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
|
-
IMAGE_MAJOR_VERSION = 2
|
14
|
-
IMAGE_MINOR_VERSION =
|
15
|
-
IMAGE_PATCHLEVEL =
|
16
|
-
|
17
|
-
# Enum
|
18
|
-
|
19
|
-
IMG_INIT_JPG = 1
|
20
|
-
IMG_INIT_PNG = 2
|
21
|
-
IMG_INIT_TIF = 4
|
22
|
-
IMG_INIT_WEBP = 8
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
:
|
36
|
-
:
|
37
|
-
:
|
38
|
-
:
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
:
|
48
|
-
:
|
49
|
-
:
|
50
|
-
:
|
51
|
-
:
|
52
|
-
:
|
53
|
-
:
|
54
|
-
:
|
55
|
-
:
|
56
|
-
:
|
57
|
-
:
|
58
|
-
:
|
59
|
-
:
|
60
|
-
:
|
61
|
-
:
|
62
|
-
:
|
63
|
-
:
|
64
|
-
:
|
65
|
-
:
|
66
|
-
:
|
67
|
-
:
|
68
|
-
:
|
69
|
-
:
|
70
|
-
:
|
71
|
-
:
|
72
|
-
:
|
73
|
-
:
|
74
|
-
:
|
75
|
-
:
|
76
|
-
:
|
77
|
-
:
|
78
|
-
:
|
79
|
-
:
|
80
|
-
|
81
|
-
|
82
|
-
:
|
83
|
-
:
|
84
|
-
:
|
85
|
-
:
|
86
|
-
:
|
87
|
-
:
|
88
|
-
:
|
89
|
-
:
|
90
|
-
:
|
91
|
-
:
|
92
|
-
:
|
93
|
-
:
|
94
|
-
:
|
95
|
-
:
|
96
|
-
:
|
97
|
-
:
|
98
|
-
:
|
99
|
-
:
|
100
|
-
:
|
101
|
-
:
|
102
|
-
:
|
103
|
-
:
|
104
|
-
:
|
105
|
-
|
106
|
-
|
107
|
-
:
|
108
|
-
:
|
109
|
-
:
|
110
|
-
:
|
111
|
-
:
|
112
|
-
:
|
113
|
-
:
|
114
|
-
:
|
115
|
-
:
|
116
|
-
:
|
117
|
-
:
|
118
|
-
:
|
119
|
-
:
|
120
|
-
:
|
121
|
-
:
|
122
|
-
:
|
123
|
-
:
|
124
|
-
:
|
125
|
-
:
|
126
|
-
:
|
127
|
-
|
128
|
-
|
129
|
-
:
|
130
|
-
:
|
131
|
-
:
|
132
|
-
:
|
133
|
-
:
|
134
|
-
:
|
135
|
-
:
|
136
|
-
:
|
137
|
-
:
|
138
|
-
:
|
139
|
-
:
|
140
|
-
:
|
141
|
-
:
|
142
|
-
:
|
143
|
-
:
|
144
|
-
:
|
145
|
-
:
|
146
|
-
:
|
147
|
-
:
|
148
|
-
:
|
149
|
-
:
|
150
|
-
:
|
151
|
-
:
|
152
|
-
:
|
153
|
-
:
|
154
|
-
:
|
155
|
-
:
|
156
|
-
:
|
157
|
-
:
|
158
|
-
:
|
159
|
-
:
|
160
|
-
:
|
161
|
-
:
|
162
|
-
:
|
163
|
-
:
|
164
|
-
:
|
165
|
-
|
166
|
-
|
167
|
-
:
|
168
|
-
:
|
169
|
-
:
|
170
|
-
:
|
171
|
-
:
|
172
|
-
:
|
173
|
-
:
|
174
|
-
|
175
|
-
|
176
|
-
:
|
177
|
-
:
|
178
|
-
:
|
179
|
-
:
|
180
|
-
:
|
181
|
-
:
|
182
|
-
:
|
183
|
-
:
|
184
|
-
:
|
185
|
-
:
|
186
|
-
:
|
187
|
-
:
|
188
|
-
:
|
189
|
-
:
|
190
|
-
:
|
191
|
-
:
|
192
|
-
:
|
193
|
-
:
|
194
|
-
:
|
195
|
-
:
|
196
|
-
:
|
197
|
-
:
|
198
|
-
:
|
199
|
-
:
|
200
|
-
:
|
201
|
-
:
|
202
|
-
:
|
203
|
-
:
|
204
|
-
:
|
205
|
-
:
|
206
|
-
:
|
207
|
-
:
|
208
|
-
:
|
209
|
-
:
|
210
|
-
:
|
211
|
-
:
|
212
|
-
:
|
213
|
-
:
|
214
|
-
:
|
215
|
-
:
|
216
|
-
:
|
217
|
-
:
|
218
|
-
:
|
219
|
-
:
|
220
|
-
:
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
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
|
+
IMAGE_MAJOR_VERSION = 2
|
14
|
+
IMAGE_MINOR_VERSION = 6
|
15
|
+
IMAGE_PATCHLEVEL = 0
|
16
|
+
|
17
|
+
# Enum
|
18
|
+
|
19
|
+
IMG_INIT_JPG = 1
|
20
|
+
IMG_INIT_PNG = 2
|
21
|
+
IMG_INIT_TIF = 4
|
22
|
+
IMG_INIT_WEBP = 8
|
23
|
+
IMG_INIT_JXL = 16
|
24
|
+
IMG_INIT_AVIF = 32
|
25
|
+
|
26
|
+
# Typedef
|
27
|
+
|
28
|
+
typedef :int, :IMG_InitFlags
|
29
|
+
|
30
|
+
# Struct
|
31
|
+
|
32
|
+
class IMG_Animation < FFI::Struct
|
33
|
+
layout(
|
34
|
+
:w, :int,
|
35
|
+
:h, :int,
|
36
|
+
:count, :int,
|
37
|
+
:frames, :pointer,
|
38
|
+
:delays, :pointer,
|
39
|
+
)
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
# Function
|
44
|
+
|
45
|
+
def self.setup_image_symbols(output_error = false)
|
46
|
+
symbols = [
|
47
|
+
:IMG_Linked_Version,
|
48
|
+
:IMG_Init,
|
49
|
+
:IMG_Quit,
|
50
|
+
:IMG_LoadTyped_RW,
|
51
|
+
:IMG_Load,
|
52
|
+
:IMG_Load_RW,
|
53
|
+
:IMG_LoadTexture,
|
54
|
+
:IMG_LoadTexture_RW,
|
55
|
+
:IMG_LoadTextureTyped_RW,
|
56
|
+
:IMG_isAVIF,
|
57
|
+
:IMG_isICO,
|
58
|
+
:IMG_isCUR,
|
59
|
+
:IMG_isBMP,
|
60
|
+
:IMG_isGIF,
|
61
|
+
:IMG_isJPG,
|
62
|
+
:IMG_isJXL,
|
63
|
+
:IMG_isLBM,
|
64
|
+
:IMG_isPCX,
|
65
|
+
:IMG_isPNG,
|
66
|
+
:IMG_isPNM,
|
67
|
+
:IMG_isSVG,
|
68
|
+
:IMG_isQOI,
|
69
|
+
:IMG_isTIF,
|
70
|
+
:IMG_isXCF,
|
71
|
+
:IMG_isXPM,
|
72
|
+
:IMG_isXV,
|
73
|
+
:IMG_isWEBP,
|
74
|
+
:IMG_LoadAVIF_RW,
|
75
|
+
:IMG_LoadICO_RW,
|
76
|
+
:IMG_LoadCUR_RW,
|
77
|
+
:IMG_LoadBMP_RW,
|
78
|
+
:IMG_LoadGIF_RW,
|
79
|
+
:IMG_LoadJPG_RW,
|
80
|
+
:IMG_LoadJXL_RW,
|
81
|
+
:IMG_LoadLBM_RW,
|
82
|
+
:IMG_LoadPCX_RW,
|
83
|
+
:IMG_LoadPNG_RW,
|
84
|
+
:IMG_LoadPNM_RW,
|
85
|
+
:IMG_LoadSVG_RW,
|
86
|
+
:IMG_LoadQOI_RW,
|
87
|
+
:IMG_LoadTGA_RW,
|
88
|
+
:IMG_LoadTIF_RW,
|
89
|
+
:IMG_LoadXCF_RW,
|
90
|
+
:IMG_LoadXPM_RW,
|
91
|
+
:IMG_LoadXV_RW,
|
92
|
+
:IMG_LoadWEBP_RW,
|
93
|
+
:IMG_LoadSizedSVG_RW,
|
94
|
+
:IMG_ReadXPMFromArray,
|
95
|
+
:IMG_ReadXPMFromArrayToRGB888,
|
96
|
+
:IMG_SavePNG,
|
97
|
+
:IMG_SavePNG_RW,
|
98
|
+
:IMG_SaveJPG,
|
99
|
+
:IMG_SaveJPG_RW,
|
100
|
+
:IMG_LoadAnimation,
|
101
|
+
:IMG_LoadAnimation_RW,
|
102
|
+
:IMG_LoadAnimationTyped_RW,
|
103
|
+
:IMG_FreeAnimation,
|
104
|
+
:IMG_LoadGIFAnimation_RW,
|
105
|
+
]
|
106
|
+
apis = {
|
107
|
+
:IMG_Linked_Version => :IMG_Linked_Version,
|
108
|
+
:IMG_Init => :IMG_Init,
|
109
|
+
:IMG_Quit => :IMG_Quit,
|
110
|
+
:IMG_LoadTyped_RW => :IMG_LoadTyped_RW,
|
111
|
+
:IMG_Load => :IMG_Load,
|
112
|
+
:IMG_Load_RW => :IMG_Load_RW,
|
113
|
+
:IMG_LoadTexture => :IMG_LoadTexture,
|
114
|
+
:IMG_LoadTexture_RW => :IMG_LoadTexture_RW,
|
115
|
+
:IMG_LoadTextureTyped_RW => :IMG_LoadTextureTyped_RW,
|
116
|
+
:IMG_isAVIF => :IMG_isAVIF,
|
117
|
+
:IMG_isICO => :IMG_isICO,
|
118
|
+
:IMG_isCUR => :IMG_isCUR,
|
119
|
+
:IMG_isBMP => :IMG_isBMP,
|
120
|
+
:IMG_isGIF => :IMG_isGIF,
|
121
|
+
:IMG_isJPG => :IMG_isJPG,
|
122
|
+
:IMG_isJXL => :IMG_isJXL,
|
123
|
+
:IMG_isLBM => :IMG_isLBM,
|
124
|
+
:IMG_isPCX => :IMG_isPCX,
|
125
|
+
:IMG_isPNG => :IMG_isPNG,
|
126
|
+
:IMG_isPNM => :IMG_isPNM,
|
127
|
+
:IMG_isSVG => :IMG_isSVG,
|
128
|
+
:IMG_isQOI => :IMG_isQOI,
|
129
|
+
:IMG_isTIF => :IMG_isTIF,
|
130
|
+
:IMG_isXCF => :IMG_isXCF,
|
131
|
+
:IMG_isXPM => :IMG_isXPM,
|
132
|
+
:IMG_isXV => :IMG_isXV,
|
133
|
+
:IMG_isWEBP => :IMG_isWEBP,
|
134
|
+
:IMG_LoadAVIF_RW => :IMG_LoadAVIF_RW,
|
135
|
+
:IMG_LoadICO_RW => :IMG_LoadICO_RW,
|
136
|
+
:IMG_LoadCUR_RW => :IMG_LoadCUR_RW,
|
137
|
+
:IMG_LoadBMP_RW => :IMG_LoadBMP_RW,
|
138
|
+
:IMG_LoadGIF_RW => :IMG_LoadGIF_RW,
|
139
|
+
:IMG_LoadJPG_RW => :IMG_LoadJPG_RW,
|
140
|
+
:IMG_LoadJXL_RW => :IMG_LoadJXL_RW,
|
141
|
+
:IMG_LoadLBM_RW => :IMG_LoadLBM_RW,
|
142
|
+
:IMG_LoadPCX_RW => :IMG_LoadPCX_RW,
|
143
|
+
:IMG_LoadPNG_RW => :IMG_LoadPNG_RW,
|
144
|
+
:IMG_LoadPNM_RW => :IMG_LoadPNM_RW,
|
145
|
+
:IMG_LoadSVG_RW => :IMG_LoadSVG_RW,
|
146
|
+
:IMG_LoadQOI_RW => :IMG_LoadQOI_RW,
|
147
|
+
:IMG_LoadTGA_RW => :IMG_LoadTGA_RW,
|
148
|
+
:IMG_LoadTIF_RW => :IMG_LoadTIF_RW,
|
149
|
+
:IMG_LoadXCF_RW => :IMG_LoadXCF_RW,
|
150
|
+
:IMG_LoadXPM_RW => :IMG_LoadXPM_RW,
|
151
|
+
:IMG_LoadXV_RW => :IMG_LoadXV_RW,
|
152
|
+
:IMG_LoadWEBP_RW => :IMG_LoadWEBP_RW,
|
153
|
+
:IMG_LoadSizedSVG_RW => :IMG_LoadSizedSVG_RW,
|
154
|
+
:IMG_ReadXPMFromArray => :IMG_ReadXPMFromArray,
|
155
|
+
:IMG_ReadXPMFromArrayToRGB888 => :IMG_ReadXPMFromArrayToRGB888,
|
156
|
+
:IMG_SavePNG => :IMG_SavePNG,
|
157
|
+
:IMG_SavePNG_RW => :IMG_SavePNG_RW,
|
158
|
+
:IMG_SaveJPG => :IMG_SaveJPG,
|
159
|
+
:IMG_SaveJPG_RW => :IMG_SaveJPG_RW,
|
160
|
+
:IMG_LoadAnimation => :IMG_LoadAnimation,
|
161
|
+
:IMG_LoadAnimation_RW => :IMG_LoadAnimation_RW,
|
162
|
+
:IMG_LoadAnimationTyped_RW => :IMG_LoadAnimationTyped_RW,
|
163
|
+
:IMG_FreeAnimation => :IMG_FreeAnimation,
|
164
|
+
:IMG_LoadGIFAnimation_RW => :IMG_LoadGIFAnimation_RW,
|
165
|
+
}
|
166
|
+
args = {
|
167
|
+
:IMG_Linked_Version => [],
|
168
|
+
:IMG_Init => [:int],
|
169
|
+
:IMG_Quit => [],
|
170
|
+
:IMG_LoadTyped_RW => [:pointer, :int, :pointer],
|
171
|
+
:IMG_Load => [:pointer],
|
172
|
+
:IMG_Load_RW => [:pointer, :int],
|
173
|
+
:IMG_LoadTexture => [:pointer, :pointer],
|
174
|
+
:IMG_LoadTexture_RW => [:pointer, :pointer, :int],
|
175
|
+
:IMG_LoadTextureTyped_RW => [:pointer, :pointer, :int, :pointer],
|
176
|
+
:IMG_isAVIF => [:pointer],
|
177
|
+
:IMG_isICO => [:pointer],
|
178
|
+
:IMG_isCUR => [:pointer],
|
179
|
+
:IMG_isBMP => [:pointer],
|
180
|
+
:IMG_isGIF => [:pointer],
|
181
|
+
:IMG_isJPG => [:pointer],
|
182
|
+
:IMG_isJXL => [:pointer],
|
183
|
+
:IMG_isLBM => [:pointer],
|
184
|
+
:IMG_isPCX => [:pointer],
|
185
|
+
:IMG_isPNG => [:pointer],
|
186
|
+
:IMG_isPNM => [:pointer],
|
187
|
+
:IMG_isSVG => [:pointer],
|
188
|
+
:IMG_isQOI => [:pointer],
|
189
|
+
:IMG_isTIF => [:pointer],
|
190
|
+
:IMG_isXCF => [:pointer],
|
191
|
+
:IMG_isXPM => [:pointer],
|
192
|
+
:IMG_isXV => [:pointer],
|
193
|
+
:IMG_isWEBP => [:pointer],
|
194
|
+
:IMG_LoadAVIF_RW => [:pointer],
|
195
|
+
:IMG_LoadICO_RW => [:pointer],
|
196
|
+
:IMG_LoadCUR_RW => [:pointer],
|
197
|
+
:IMG_LoadBMP_RW => [:pointer],
|
198
|
+
:IMG_LoadGIF_RW => [:pointer],
|
199
|
+
:IMG_LoadJPG_RW => [:pointer],
|
200
|
+
:IMG_LoadJXL_RW => [:pointer],
|
201
|
+
:IMG_LoadLBM_RW => [:pointer],
|
202
|
+
:IMG_LoadPCX_RW => [:pointer],
|
203
|
+
:IMG_LoadPNG_RW => [:pointer],
|
204
|
+
:IMG_LoadPNM_RW => [:pointer],
|
205
|
+
:IMG_LoadSVG_RW => [:pointer],
|
206
|
+
:IMG_LoadQOI_RW => [:pointer],
|
207
|
+
:IMG_LoadTGA_RW => [:pointer],
|
208
|
+
:IMG_LoadTIF_RW => [:pointer],
|
209
|
+
:IMG_LoadXCF_RW => [:pointer],
|
210
|
+
:IMG_LoadXPM_RW => [:pointer],
|
211
|
+
:IMG_LoadXV_RW => [:pointer],
|
212
|
+
:IMG_LoadWEBP_RW => [:pointer],
|
213
|
+
:IMG_LoadSizedSVG_RW => [:pointer, :int, :int],
|
214
|
+
:IMG_ReadXPMFromArray => [:pointer],
|
215
|
+
:IMG_ReadXPMFromArrayToRGB888 => [:pointer],
|
216
|
+
:IMG_SavePNG => [:pointer, :pointer],
|
217
|
+
:IMG_SavePNG_RW => [:pointer, :pointer, :int],
|
218
|
+
:IMG_SaveJPG => [:pointer, :pointer, :int],
|
219
|
+
:IMG_SaveJPG_RW => [:pointer, :pointer, :int, :int],
|
220
|
+
:IMG_LoadAnimation => [:pointer],
|
221
|
+
:IMG_LoadAnimation_RW => [:pointer, :int],
|
222
|
+
:IMG_LoadAnimationTyped_RW => [:pointer, :int, :pointer],
|
223
|
+
:IMG_FreeAnimation => [:pointer],
|
224
|
+
:IMG_LoadGIFAnimation_RW => [:pointer],
|
225
|
+
}
|
226
|
+
retvals = {
|
227
|
+
:IMG_Linked_Version => :pointer,
|
228
|
+
:IMG_Init => :int,
|
229
|
+
:IMG_Quit => :void,
|
230
|
+
:IMG_LoadTyped_RW => :pointer,
|
231
|
+
:IMG_Load => :pointer,
|
232
|
+
:IMG_Load_RW => :pointer,
|
233
|
+
:IMG_LoadTexture => :pointer,
|
234
|
+
:IMG_LoadTexture_RW => :pointer,
|
235
|
+
:IMG_LoadTextureTyped_RW => :pointer,
|
236
|
+
:IMG_isAVIF => :int,
|
237
|
+
:IMG_isICO => :int,
|
238
|
+
:IMG_isCUR => :int,
|
239
|
+
:IMG_isBMP => :int,
|
240
|
+
:IMG_isGIF => :int,
|
241
|
+
:IMG_isJPG => :int,
|
242
|
+
:IMG_isJXL => :int,
|
243
|
+
:IMG_isLBM => :int,
|
244
|
+
:IMG_isPCX => :int,
|
245
|
+
:IMG_isPNG => :int,
|
246
|
+
:IMG_isPNM => :int,
|
247
|
+
:IMG_isSVG => :int,
|
248
|
+
:IMG_isQOI => :int,
|
249
|
+
:IMG_isTIF => :int,
|
250
|
+
:IMG_isXCF => :int,
|
251
|
+
:IMG_isXPM => :int,
|
252
|
+
:IMG_isXV => :int,
|
253
|
+
:IMG_isWEBP => :int,
|
254
|
+
:IMG_LoadAVIF_RW => :pointer,
|
255
|
+
:IMG_LoadICO_RW => :pointer,
|
256
|
+
:IMG_LoadCUR_RW => :pointer,
|
257
|
+
:IMG_LoadBMP_RW => :pointer,
|
258
|
+
:IMG_LoadGIF_RW => :pointer,
|
259
|
+
:IMG_LoadJPG_RW => :pointer,
|
260
|
+
:IMG_LoadJXL_RW => :pointer,
|
261
|
+
:IMG_LoadLBM_RW => :pointer,
|
262
|
+
:IMG_LoadPCX_RW => :pointer,
|
263
|
+
:IMG_LoadPNG_RW => :pointer,
|
264
|
+
:IMG_LoadPNM_RW => :pointer,
|
265
|
+
:IMG_LoadSVG_RW => :pointer,
|
266
|
+
:IMG_LoadQOI_RW => :pointer,
|
267
|
+
:IMG_LoadTGA_RW => :pointer,
|
268
|
+
:IMG_LoadTIF_RW => :pointer,
|
269
|
+
:IMG_LoadXCF_RW => :pointer,
|
270
|
+
:IMG_LoadXPM_RW => :pointer,
|
271
|
+
:IMG_LoadXV_RW => :pointer,
|
272
|
+
:IMG_LoadWEBP_RW => :pointer,
|
273
|
+
:IMG_LoadSizedSVG_RW => :pointer,
|
274
|
+
:IMG_ReadXPMFromArray => :pointer,
|
275
|
+
:IMG_ReadXPMFromArrayToRGB888 => :pointer,
|
276
|
+
:IMG_SavePNG => :int,
|
277
|
+
:IMG_SavePNG_RW => :int,
|
278
|
+
:IMG_SaveJPG => :int,
|
279
|
+
:IMG_SaveJPG_RW => :int,
|
280
|
+
:IMG_LoadAnimation => :pointer,
|
281
|
+
:IMG_LoadAnimation_RW => :pointer,
|
282
|
+
:IMG_LoadAnimationTyped_RW => :pointer,
|
283
|
+
:IMG_FreeAnimation => :void,
|
284
|
+
:IMG_LoadGIFAnimation_RW => :pointer,
|
285
|
+
}
|
286
|
+
symbols.each do |sym|
|
287
|
+
begin
|
288
|
+
attach_function apis[sym], sym, args[sym], retvals[sym]
|
289
|
+
rescue FFI::NotFoundError => error
|
290
|
+
$stderr.puts("[Warning] Failed to import #{sym} (#{error}).") if output_error
|
291
|
+
end
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
end
|
296
|
+
|