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.
- checksums.yaml +4 -4
- data/ChangeLog +145 -134
- data/LICENSE.txt +0 -0
- data/README.md +108 -86
- data/lib/sdl2.rb +131 -131
- data/lib/sdl2_audio.rb +265 -261
- data/lib/sdl2_blendmode.rb +72 -72
- data/lib/sdl2_clipboard.rb +56 -56
- data/lib/sdl2_cpuinfo.rb +137 -129
- data/lib/sdl2_error.rb +71 -71
- data/lib/sdl2_events.rb +575 -564
- data/lib/sdl2_filesystem.rb +52 -52
- data/lib/sdl2_framerate.rb +74 -74
- data/lib/sdl2_gamecontroller.rb +345 -329
- data/lib/sdl2_gesture.rb +61 -61
- data/lib/sdl2_gfxPrimitives.rb +283 -283
- data/lib/sdl2_guid.rb +58 -0
- data/lib/sdl2_haptic.rb +301 -301
- data/lib/sdl2_hidapi.rb +139 -139
- data/lib/sdl2_hints.rb +240 -221
- data/lib/sdl2_image.rb +296 -296
- data/lib/sdl2_imageFilter.rb +164 -164
- data/lib/sdl2_joystick.rb +332 -294
- data/lib/sdl2_keyboard.rb +129 -125
- data/lib/sdl2_keycode.rb +311 -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 -464
- 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 -145
- data/lib/sdl2_render.rb +408 -408
- data/lib/sdl2_rotozoom.rb +76 -76
- data/lib/sdl2_rwops.rb +242 -242
- data/lib/sdl2_scancode.rb +293 -289
- data/lib/sdl2_sensor.rb +115 -115
- data/lib/sdl2_shape.rb +83 -83
- data/lib/sdl2_sound.rb +154 -154
- data/lib/sdl2_stdinc.rb +572 -548
- 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 -86
- data/lib/sdl2_ttf.rb +414 -414
- data/lib/sdl2_version.rb +67 -67
- data/lib/sdl2_video.rb +549 -540
- data/lib/sdl2_vulkan.rb +72 -72
- metadata +4 -3
data/lib/sdl2_imageFilter.rb
CHANGED
@@ -1,164 +1,164 @@
|
|
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
|
-
|
17
|
-
# Typedef
|
18
|
-
|
19
|
-
|
20
|
-
# Struct
|
21
|
-
|
22
|
-
|
23
|
-
# Function
|
24
|
-
|
25
|
-
def self.setup_gfx_imagefilter_symbols(output_error = false)
|
26
|
-
symbols = [
|
27
|
-
:SDL_imageFilterMMXdetect,
|
28
|
-
:SDL_imageFilterMMXoff,
|
29
|
-
:SDL_imageFilterMMXon,
|
30
|
-
:SDL_imageFilterAdd,
|
31
|
-
:SDL_imageFilterMean,
|
32
|
-
:SDL_imageFilterSub,
|
33
|
-
:SDL_imageFilterAbsDiff,
|
34
|
-
:SDL_imageFilterMult,
|
35
|
-
:SDL_imageFilterMultNor,
|
36
|
-
:SDL_imageFilterMultDivby2,
|
37
|
-
:SDL_imageFilterMultDivby4,
|
38
|
-
:SDL_imageFilterBitAnd,
|
39
|
-
:SDL_imageFilterBitOr,
|
40
|
-
:SDL_imageFilterDiv,
|
41
|
-
:SDL_imageFilterBitNegation,
|
42
|
-
:SDL_imageFilterAddByte,
|
43
|
-
:SDL_imageFilterAddUint,
|
44
|
-
:SDL_imageFilterAddByteToHalf,
|
45
|
-
:SDL_imageFilterSubByte,
|
46
|
-
:SDL_imageFilterSubUint,
|
47
|
-
:SDL_imageFilterShiftRight,
|
48
|
-
:SDL_imageFilterShiftRightUint,
|
49
|
-
:SDL_imageFilterMultByByte,
|
50
|
-
:SDL_imageFilterShiftRightAndMultByByte,
|
51
|
-
:SDL_imageFilterShiftLeftByte,
|
52
|
-
:SDL_imageFilterShiftLeftUint,
|
53
|
-
:SDL_imageFilterShiftLeft,
|
54
|
-
:SDL_imageFilterBinarizeUsingThreshold,
|
55
|
-
:SDL_imageFilterClipToRange,
|
56
|
-
:SDL_imageFilterNormalizeLinear,
|
57
|
-
]
|
58
|
-
apis = {
|
59
|
-
:SDL_imageFilterMMXdetect => :imageFilterMMXdetect,
|
60
|
-
:SDL_imageFilterMMXoff => :imageFilterMMXoff,
|
61
|
-
:SDL_imageFilterMMXon => :imageFilterMMXon,
|
62
|
-
:SDL_imageFilterAdd => :imageFilterAdd,
|
63
|
-
:SDL_imageFilterMean => :imageFilterMean,
|
64
|
-
:SDL_imageFilterSub => :imageFilterSub,
|
65
|
-
:SDL_imageFilterAbsDiff => :imageFilterAbsDiff,
|
66
|
-
:SDL_imageFilterMult => :imageFilterMult,
|
67
|
-
:SDL_imageFilterMultNor => :imageFilterMultNor,
|
68
|
-
:SDL_imageFilterMultDivby2 => :imageFilterMultDivby2,
|
69
|
-
:SDL_imageFilterMultDivby4 => :imageFilterMultDivby4,
|
70
|
-
:SDL_imageFilterBitAnd => :imageFilterBitAnd,
|
71
|
-
:SDL_imageFilterBitOr => :imageFilterBitOr,
|
72
|
-
:SDL_imageFilterDiv => :imageFilterDiv,
|
73
|
-
:SDL_imageFilterBitNegation => :imageFilterBitNegation,
|
74
|
-
:SDL_imageFilterAddByte => :imageFilterAddByte,
|
75
|
-
:SDL_imageFilterAddUint => :imageFilterAddUint,
|
76
|
-
:SDL_imageFilterAddByteToHalf => :imageFilterAddByteToHalf,
|
77
|
-
:SDL_imageFilterSubByte => :imageFilterSubByte,
|
78
|
-
:SDL_imageFilterSubUint => :imageFilterSubUint,
|
79
|
-
:SDL_imageFilterShiftRight => :imageFilterShiftRight,
|
80
|
-
:SDL_imageFilterShiftRightUint => :imageFilterShiftRightUint,
|
81
|
-
:SDL_imageFilterMultByByte => :imageFilterMultByByte,
|
82
|
-
:SDL_imageFilterShiftRightAndMultByByte => :imageFilterShiftRightAndMultByByte,
|
83
|
-
:SDL_imageFilterShiftLeftByte => :imageFilterShiftLeftByte,
|
84
|
-
:SDL_imageFilterShiftLeftUint => :imageFilterShiftLeftUint,
|
85
|
-
:SDL_imageFilterShiftLeft => :imageFilterShiftLeft,
|
86
|
-
:SDL_imageFilterBinarizeUsingThreshold => :imageFilterBinarizeUsingThreshold,
|
87
|
-
:SDL_imageFilterClipToRange => :imageFilterClipToRange,
|
88
|
-
:SDL_imageFilterNormalizeLinear => :imageFilterNormalizeLinear,
|
89
|
-
}
|
90
|
-
args = {
|
91
|
-
:SDL_imageFilterMMXdetect => [],
|
92
|
-
:SDL_imageFilterMMXoff => [],
|
93
|
-
:SDL_imageFilterMMXon => [],
|
94
|
-
:SDL_imageFilterAdd => [:pointer, :pointer, :pointer, :uint],
|
95
|
-
:SDL_imageFilterMean => [:pointer, :pointer, :pointer, :uint],
|
96
|
-
:SDL_imageFilterSub => [:pointer, :pointer, :pointer, :uint],
|
97
|
-
:SDL_imageFilterAbsDiff => [:pointer, :pointer, :pointer, :uint],
|
98
|
-
:SDL_imageFilterMult => [:pointer, :pointer, :pointer, :uint],
|
99
|
-
:SDL_imageFilterMultNor => [:pointer, :pointer, :pointer, :uint],
|
100
|
-
:SDL_imageFilterMultDivby2 => [:pointer, :pointer, :pointer, :uint],
|
101
|
-
:SDL_imageFilterMultDivby4 => [:pointer, :pointer, :pointer, :uint],
|
102
|
-
:SDL_imageFilterBitAnd => [:pointer, :pointer, :pointer, :uint],
|
103
|
-
:SDL_imageFilterBitOr => [:pointer, :pointer, :pointer, :uint],
|
104
|
-
:SDL_imageFilterDiv => [:pointer, :pointer, :pointer, :uint],
|
105
|
-
:SDL_imageFilterBitNegation => [:pointer, :pointer, :uint],
|
106
|
-
:SDL_imageFilterAddByte => [:pointer, :pointer, :uint, :uchar],
|
107
|
-
:SDL_imageFilterAddUint => [:pointer, :pointer, :uint, :uint],
|
108
|
-
:SDL_imageFilterAddByteToHalf => [:pointer, :pointer, :uint, :uchar],
|
109
|
-
:SDL_imageFilterSubByte => [:pointer, :pointer, :uint, :uchar],
|
110
|
-
:SDL_imageFilterSubUint => [:pointer, :pointer, :uint, :uint],
|
111
|
-
:SDL_imageFilterShiftRight => [:pointer, :pointer, :uint, :uchar],
|
112
|
-
:SDL_imageFilterShiftRightUint => [:pointer, :pointer, :uint, :uchar],
|
113
|
-
:SDL_imageFilterMultByByte => [:pointer, :pointer, :uint, :uchar],
|
114
|
-
:SDL_imageFilterShiftRightAndMultByByte => [:pointer, :pointer, :uint, :uchar, :uchar],
|
115
|
-
:SDL_imageFilterShiftLeftByte => [:pointer, :pointer, :uint, :uchar],
|
116
|
-
:SDL_imageFilterShiftLeftUint => [:pointer, :pointer, :uint, :uchar],
|
117
|
-
:SDL_imageFilterShiftLeft => [:pointer, :pointer, :uint, :uchar],
|
118
|
-
:SDL_imageFilterBinarizeUsingThreshold => [:pointer, :pointer, :uint, :uchar],
|
119
|
-
:SDL_imageFilterClipToRange => [:pointer, :pointer, :uint, :uchar, :uchar],
|
120
|
-
:SDL_imageFilterNormalizeLinear => [:pointer, :pointer, :uint, :int, :int, :int, :int],
|
121
|
-
}
|
122
|
-
retvals = {
|
123
|
-
:SDL_imageFilterMMXdetect => :int,
|
124
|
-
:SDL_imageFilterMMXoff => :void,
|
125
|
-
:SDL_imageFilterMMXon => :void,
|
126
|
-
:SDL_imageFilterAdd => :int,
|
127
|
-
:SDL_imageFilterMean => :int,
|
128
|
-
:SDL_imageFilterSub => :int,
|
129
|
-
:SDL_imageFilterAbsDiff => :int,
|
130
|
-
:SDL_imageFilterMult => :int,
|
131
|
-
:SDL_imageFilterMultNor => :int,
|
132
|
-
:SDL_imageFilterMultDivby2 => :int,
|
133
|
-
:SDL_imageFilterMultDivby4 => :int,
|
134
|
-
:SDL_imageFilterBitAnd => :int,
|
135
|
-
:SDL_imageFilterBitOr => :int,
|
136
|
-
:SDL_imageFilterDiv => :int,
|
137
|
-
:SDL_imageFilterBitNegation => :int,
|
138
|
-
:SDL_imageFilterAddByte => :int,
|
139
|
-
:SDL_imageFilterAddUint => :int,
|
140
|
-
:SDL_imageFilterAddByteToHalf => :int,
|
141
|
-
:SDL_imageFilterSubByte => :int,
|
142
|
-
:SDL_imageFilterSubUint => :int,
|
143
|
-
:SDL_imageFilterShiftRight => :int,
|
144
|
-
:SDL_imageFilterShiftRightUint => :int,
|
145
|
-
:SDL_imageFilterMultByByte => :int,
|
146
|
-
:SDL_imageFilterShiftRightAndMultByByte => :int,
|
147
|
-
:SDL_imageFilterShiftLeftByte => :int,
|
148
|
-
:SDL_imageFilterShiftLeftUint => :int,
|
149
|
-
:SDL_imageFilterShiftLeft => :int,
|
150
|
-
:SDL_imageFilterBinarizeUsingThreshold => :int,
|
151
|
-
:SDL_imageFilterClipToRange => :int,
|
152
|
-
:SDL_imageFilterNormalizeLinear => :int,
|
153
|
-
}
|
154
|
-
symbols.each do |sym|
|
155
|
-
begin
|
156
|
-
attach_function apis[sym], sym, args[sym], retvals[sym]
|
157
|
-
rescue FFI::NotFoundError => error
|
158
|
-
$stderr.puts("[Warning] Failed to import #{sym} (#{error}).") if output_error
|
159
|
-
end
|
160
|
-
end
|
161
|
-
end
|
162
|
-
|
163
|
-
end
|
164
|
-
|
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
|
+
|
17
|
+
# Typedef
|
18
|
+
|
19
|
+
|
20
|
+
# Struct
|
21
|
+
|
22
|
+
|
23
|
+
# Function
|
24
|
+
|
25
|
+
def self.setup_gfx_imagefilter_symbols(output_error = false)
|
26
|
+
symbols = [
|
27
|
+
:SDL_imageFilterMMXdetect,
|
28
|
+
:SDL_imageFilterMMXoff,
|
29
|
+
:SDL_imageFilterMMXon,
|
30
|
+
:SDL_imageFilterAdd,
|
31
|
+
:SDL_imageFilterMean,
|
32
|
+
:SDL_imageFilterSub,
|
33
|
+
:SDL_imageFilterAbsDiff,
|
34
|
+
:SDL_imageFilterMult,
|
35
|
+
:SDL_imageFilterMultNor,
|
36
|
+
:SDL_imageFilterMultDivby2,
|
37
|
+
:SDL_imageFilterMultDivby4,
|
38
|
+
:SDL_imageFilterBitAnd,
|
39
|
+
:SDL_imageFilterBitOr,
|
40
|
+
:SDL_imageFilterDiv,
|
41
|
+
:SDL_imageFilterBitNegation,
|
42
|
+
:SDL_imageFilterAddByte,
|
43
|
+
:SDL_imageFilterAddUint,
|
44
|
+
:SDL_imageFilterAddByteToHalf,
|
45
|
+
:SDL_imageFilterSubByte,
|
46
|
+
:SDL_imageFilterSubUint,
|
47
|
+
:SDL_imageFilterShiftRight,
|
48
|
+
:SDL_imageFilterShiftRightUint,
|
49
|
+
:SDL_imageFilterMultByByte,
|
50
|
+
:SDL_imageFilterShiftRightAndMultByByte,
|
51
|
+
:SDL_imageFilterShiftLeftByte,
|
52
|
+
:SDL_imageFilterShiftLeftUint,
|
53
|
+
:SDL_imageFilterShiftLeft,
|
54
|
+
:SDL_imageFilterBinarizeUsingThreshold,
|
55
|
+
:SDL_imageFilterClipToRange,
|
56
|
+
:SDL_imageFilterNormalizeLinear,
|
57
|
+
]
|
58
|
+
apis = {
|
59
|
+
:SDL_imageFilterMMXdetect => :imageFilterMMXdetect,
|
60
|
+
:SDL_imageFilterMMXoff => :imageFilterMMXoff,
|
61
|
+
:SDL_imageFilterMMXon => :imageFilterMMXon,
|
62
|
+
:SDL_imageFilterAdd => :imageFilterAdd,
|
63
|
+
:SDL_imageFilterMean => :imageFilterMean,
|
64
|
+
:SDL_imageFilterSub => :imageFilterSub,
|
65
|
+
:SDL_imageFilterAbsDiff => :imageFilterAbsDiff,
|
66
|
+
:SDL_imageFilterMult => :imageFilterMult,
|
67
|
+
:SDL_imageFilterMultNor => :imageFilterMultNor,
|
68
|
+
:SDL_imageFilterMultDivby2 => :imageFilterMultDivby2,
|
69
|
+
:SDL_imageFilterMultDivby4 => :imageFilterMultDivby4,
|
70
|
+
:SDL_imageFilterBitAnd => :imageFilterBitAnd,
|
71
|
+
:SDL_imageFilterBitOr => :imageFilterBitOr,
|
72
|
+
:SDL_imageFilterDiv => :imageFilterDiv,
|
73
|
+
:SDL_imageFilterBitNegation => :imageFilterBitNegation,
|
74
|
+
:SDL_imageFilterAddByte => :imageFilterAddByte,
|
75
|
+
:SDL_imageFilterAddUint => :imageFilterAddUint,
|
76
|
+
:SDL_imageFilterAddByteToHalf => :imageFilterAddByteToHalf,
|
77
|
+
:SDL_imageFilterSubByte => :imageFilterSubByte,
|
78
|
+
:SDL_imageFilterSubUint => :imageFilterSubUint,
|
79
|
+
:SDL_imageFilterShiftRight => :imageFilterShiftRight,
|
80
|
+
:SDL_imageFilterShiftRightUint => :imageFilterShiftRightUint,
|
81
|
+
:SDL_imageFilterMultByByte => :imageFilterMultByByte,
|
82
|
+
:SDL_imageFilterShiftRightAndMultByByte => :imageFilterShiftRightAndMultByByte,
|
83
|
+
:SDL_imageFilterShiftLeftByte => :imageFilterShiftLeftByte,
|
84
|
+
:SDL_imageFilterShiftLeftUint => :imageFilterShiftLeftUint,
|
85
|
+
:SDL_imageFilterShiftLeft => :imageFilterShiftLeft,
|
86
|
+
:SDL_imageFilterBinarizeUsingThreshold => :imageFilterBinarizeUsingThreshold,
|
87
|
+
:SDL_imageFilterClipToRange => :imageFilterClipToRange,
|
88
|
+
:SDL_imageFilterNormalizeLinear => :imageFilterNormalizeLinear,
|
89
|
+
}
|
90
|
+
args = {
|
91
|
+
:SDL_imageFilterMMXdetect => [],
|
92
|
+
:SDL_imageFilterMMXoff => [],
|
93
|
+
:SDL_imageFilterMMXon => [],
|
94
|
+
:SDL_imageFilterAdd => [:pointer, :pointer, :pointer, :uint],
|
95
|
+
:SDL_imageFilterMean => [:pointer, :pointer, :pointer, :uint],
|
96
|
+
:SDL_imageFilterSub => [:pointer, :pointer, :pointer, :uint],
|
97
|
+
:SDL_imageFilterAbsDiff => [:pointer, :pointer, :pointer, :uint],
|
98
|
+
:SDL_imageFilterMult => [:pointer, :pointer, :pointer, :uint],
|
99
|
+
:SDL_imageFilterMultNor => [:pointer, :pointer, :pointer, :uint],
|
100
|
+
:SDL_imageFilterMultDivby2 => [:pointer, :pointer, :pointer, :uint],
|
101
|
+
:SDL_imageFilterMultDivby4 => [:pointer, :pointer, :pointer, :uint],
|
102
|
+
:SDL_imageFilterBitAnd => [:pointer, :pointer, :pointer, :uint],
|
103
|
+
:SDL_imageFilterBitOr => [:pointer, :pointer, :pointer, :uint],
|
104
|
+
:SDL_imageFilterDiv => [:pointer, :pointer, :pointer, :uint],
|
105
|
+
:SDL_imageFilterBitNegation => [:pointer, :pointer, :uint],
|
106
|
+
:SDL_imageFilterAddByte => [:pointer, :pointer, :uint, :uchar],
|
107
|
+
:SDL_imageFilterAddUint => [:pointer, :pointer, :uint, :uint],
|
108
|
+
:SDL_imageFilterAddByteToHalf => [:pointer, :pointer, :uint, :uchar],
|
109
|
+
:SDL_imageFilterSubByte => [:pointer, :pointer, :uint, :uchar],
|
110
|
+
:SDL_imageFilterSubUint => [:pointer, :pointer, :uint, :uint],
|
111
|
+
:SDL_imageFilterShiftRight => [:pointer, :pointer, :uint, :uchar],
|
112
|
+
:SDL_imageFilterShiftRightUint => [:pointer, :pointer, :uint, :uchar],
|
113
|
+
:SDL_imageFilterMultByByte => [:pointer, :pointer, :uint, :uchar],
|
114
|
+
:SDL_imageFilterShiftRightAndMultByByte => [:pointer, :pointer, :uint, :uchar, :uchar],
|
115
|
+
:SDL_imageFilterShiftLeftByte => [:pointer, :pointer, :uint, :uchar],
|
116
|
+
:SDL_imageFilterShiftLeftUint => [:pointer, :pointer, :uint, :uchar],
|
117
|
+
:SDL_imageFilterShiftLeft => [:pointer, :pointer, :uint, :uchar],
|
118
|
+
:SDL_imageFilterBinarizeUsingThreshold => [:pointer, :pointer, :uint, :uchar],
|
119
|
+
:SDL_imageFilterClipToRange => [:pointer, :pointer, :uint, :uchar, :uchar],
|
120
|
+
:SDL_imageFilterNormalizeLinear => [:pointer, :pointer, :uint, :int, :int, :int, :int],
|
121
|
+
}
|
122
|
+
retvals = {
|
123
|
+
:SDL_imageFilterMMXdetect => :int,
|
124
|
+
:SDL_imageFilterMMXoff => :void,
|
125
|
+
:SDL_imageFilterMMXon => :void,
|
126
|
+
:SDL_imageFilterAdd => :int,
|
127
|
+
:SDL_imageFilterMean => :int,
|
128
|
+
:SDL_imageFilterSub => :int,
|
129
|
+
:SDL_imageFilterAbsDiff => :int,
|
130
|
+
:SDL_imageFilterMult => :int,
|
131
|
+
:SDL_imageFilterMultNor => :int,
|
132
|
+
:SDL_imageFilterMultDivby2 => :int,
|
133
|
+
:SDL_imageFilterMultDivby4 => :int,
|
134
|
+
:SDL_imageFilterBitAnd => :int,
|
135
|
+
:SDL_imageFilterBitOr => :int,
|
136
|
+
:SDL_imageFilterDiv => :int,
|
137
|
+
:SDL_imageFilterBitNegation => :int,
|
138
|
+
:SDL_imageFilterAddByte => :int,
|
139
|
+
:SDL_imageFilterAddUint => :int,
|
140
|
+
:SDL_imageFilterAddByteToHalf => :int,
|
141
|
+
:SDL_imageFilterSubByte => :int,
|
142
|
+
:SDL_imageFilterSubUint => :int,
|
143
|
+
:SDL_imageFilterShiftRight => :int,
|
144
|
+
:SDL_imageFilterShiftRightUint => :int,
|
145
|
+
:SDL_imageFilterMultByByte => :int,
|
146
|
+
:SDL_imageFilterShiftRightAndMultByByte => :int,
|
147
|
+
:SDL_imageFilterShiftLeftByte => :int,
|
148
|
+
:SDL_imageFilterShiftLeftUint => :int,
|
149
|
+
:SDL_imageFilterShiftLeft => :int,
|
150
|
+
:SDL_imageFilterBinarizeUsingThreshold => :int,
|
151
|
+
:SDL_imageFilterClipToRange => :int,
|
152
|
+
:SDL_imageFilterNormalizeLinear => :int,
|
153
|
+
}
|
154
|
+
symbols.each do |sym|
|
155
|
+
begin
|
156
|
+
attach_function apis[sym], sym, args[sym], retvals[sym]
|
157
|
+
rescue FFI::NotFoundError => error
|
158
|
+
$stderr.puts("[Warning] Failed to import #{sym} (#{error}).") if output_error
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
end
|
164
|
+
|