sdl2_ffi 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/README.md +21 -59
- data/lib/sdl2.rb +52 -15
- data/lib/sdl2/application.rb +71 -0
- data/lib/sdl2/audio.rb +72 -24
- data/lib/sdl2/clipboard.rb +9 -3
- data/lib/sdl2/color.rb +8 -3
- data/lib/sdl2/cpuinfo.rb +30 -10
- data/lib/sdl2/engine.rb +52 -0
- data/lib/sdl2/engine/block_engine.rb +27 -0
- data/lib/sdl2/engine/engines.rb +46 -0
- data/lib/sdl2/error.rb +9 -3
- data/lib/sdl2/events.rb +68 -6
- data/lib/sdl2/gamecontroller.rb +60 -20
- data/lib/sdl2/gem_version.rb +1 -1
- data/lib/sdl2/gesture.rb +12 -4
- data/lib/sdl2/haptic.rb +90 -30
- data/lib/sdl2/hints.rb +12 -4
- data/lib/sdl2/image.rb +85 -3
- data/lib/sdl2/init.rb +15 -5
- data/lib/sdl2/joystick.rb +63 -21
- data/lib/sdl2/keyboard.rb +101 -17
- data/lib/sdl2/keycode.rb +72 -72
- data/lib/sdl2/library.rb +7 -0
- data/lib/sdl2/log.rb +78 -21
- data/lib/sdl2/mixer.rb +651 -0
- data/lib/sdl2/mixer/chunk.rb +47 -0
- data/lib/sdl2/mixer/lib_paths.rb +8 -0
- data/lib/sdl2/mouse.rb +39 -13
- data/lib/sdl2/pixels.rb +39 -13
- data/lib/sdl2/point.rb +29 -0
- data/lib/sdl2/power.rb +3 -1
- data/lib/sdl2/rect.rb +94 -19
- data/lib/sdl2/render.rb +156 -52
- data/lib/sdl2/rwops.rb +60 -20
- data/lib/sdl2/surface.rb +85 -28
- data/lib/sdl2/syswm.rb +3 -1
- data/lib/sdl2/timer.rb +18 -6
- data/lib/sdl2/touch.rb +12 -4
- data/lib/sdl2/ttf.rb +153 -59
- data/lib/sdl2/ttf/font.rb +21 -5
- data/lib/sdl2/version.rb +9 -3
- data/lib/sdl2/video.rb +210 -70
- data/lib/sdl2/window.rb +9 -3
- data/spec/fixtures/approvals/lazyfoonet_lesson_07_true_type_fonts/draws_the_message_to_the_screen.approved.png +0 -0
- data/spec/fixtures/approvals/lazyfoonet_lesson_07_true_type_fonts/writes_a_message_to_a_surface.approved.png +0 -0
- data/spec/fixtures/approvals/lazyfoonet_lesson_09_mouse_events/defaults_to_mouse_out.approved.png +0 -0
- data/spec/fixtures/approvals/lazyfoonet_lesson_09_mouse_events/has_a_button_sheet.approved.png +0 -0
- data/spec/fixtures/approvals/lazyfoonet_lesson_09_mouse_events/shows_mouse_down.approved.png +0 -0
- data/spec/fixtures/approvals/lazyfoonet_lesson_09_mouse_events/shows_mouse_in.approved.png +0 -0
- data/spec/fixtures/approvals/lazyfoonet_lesson_09_mouse_events/shows_mouse_out.approved.png +0 -0
- data/spec/fixtures/approvals/lazyfoonet_lesson_09_mouse_events/shows_mouse_up.approved.png +0 -0
- data/spec/fixtures/images/button_sheet.png +0 -0
- data/spec/functional/lazy_foo_tutorial/lazy_foo_01_hello_world_spec.rb +9 -2
- data/spec/functional/lazy_foo_tutorial/lazy_foo_03_extension_libraries_spec.rb +1 -0
- data/spec/functional/lazy_foo_tutorial/lazy_foo_04_event_driven_programming_spec.rb +4 -3
- data/spec/functional/lazy_foo_tutorial/lazy_foo_05_color_keying_spec.rb +1 -1
- data/spec/functional/lazy_foo_tutorial/lazy_foo_06_clip_blitting_and_sprite_sheets_spec.rb +4 -3
- data/spec/functional/lazy_foo_tutorial/lazy_foo_07_true_type_fonts_spec.rb +4 -2
- data/spec/functional/lazy_foo_tutorial/lazy_foo_08_key_presses_spec.rb +10 -22
- data/spec/functional/lazy_foo_tutorial/lazy_foo_09_mouse_events_spec.rb +121 -0
- data/spec/functional/lazy_foo_tutorial/lazy_foo_10_key_states_spec.rb +30 -0
- data/spec/functional/lazy_foo_tutorial/lazy_foo_11_playing_sounds_spec.rb +116 -0
- data/spec/functional/lazy_foo_tutorial/lazy_foo_12_timing_spec.rb +57 -0
- data/spec/spec_helper.rb +3 -1
- metadata +31 -2
data/lib/sdl2/rwops.rb
CHANGED
@@ -107,25 +107,65 @@ module SDL2
|
|
107
107
|
|
108
108
|
end
|
109
109
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
110
|
+
##
|
111
|
+
#
|
112
|
+
api :SDL_RWFromFile, [:string, :string], RWops.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
113
|
+
##
|
114
|
+
#
|
115
|
+
api :SDL_RWFromFP, [:pointer, :bool], RWops.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
116
|
+
##
|
117
|
+
#
|
118
|
+
api :SDL_RWFromMem, [:pointer, :count], RWops.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
119
|
+
##
|
120
|
+
#
|
121
|
+
api :SDL_RWFromConstMem, [:pointer, :count], RWops.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
122
|
+
##
|
123
|
+
#
|
124
|
+
api :SDL_AllocRW, [], RWops.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
125
|
+
##
|
126
|
+
#
|
127
|
+
api :SDL_FreeRW, [RWops.by_ref], :void
|
128
|
+
##
|
129
|
+
#
|
130
|
+
api :SDL_ReadU8, [RWops.by_ref], :uint8
|
131
|
+
##
|
132
|
+
#
|
133
|
+
api :SDL_ReadLE16, [RWops.by_ref], :uint16
|
134
|
+
##
|
135
|
+
#
|
136
|
+
api :SDL_ReadBE16, [RWops.by_ref], :uint16
|
137
|
+
##
|
138
|
+
#
|
139
|
+
api :SDL_ReadLE32, [RWops.by_ref], :uint32
|
140
|
+
##
|
141
|
+
#
|
142
|
+
api :SDL_ReadBE32, [RWops.by_ref], :uint32
|
143
|
+
##
|
144
|
+
#
|
145
|
+
api :SDL_ReadLE64, [RWops.by_ref], :uint64
|
146
|
+
##
|
147
|
+
#
|
148
|
+
api :SDL_ReadBE64, [RWops.by_ref], :uint64
|
123
149
|
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
150
|
+
##
|
151
|
+
#
|
152
|
+
api :SDL_WriteU8, [RWops.by_ref, :uint8], :size_t
|
153
|
+
##
|
154
|
+
#
|
155
|
+
api :SDL_WriteLE16, [RWops.by_ref, :uint16], :size_t
|
156
|
+
##
|
157
|
+
#
|
158
|
+
api :SDL_WriteBE16, [RWops.by_ref, :uint16], :size_t
|
159
|
+
##
|
160
|
+
#
|
161
|
+
api :SDL_WriteLE32, [RWops.by_ref, :uint32], :size_t
|
162
|
+
##
|
163
|
+
#
|
164
|
+
api :SDL_WriteBE32, [RWops.by_ref, :uint32], :size_t
|
165
|
+
##
|
166
|
+
#
|
167
|
+
api :SDL_WriteLE64, [RWops.by_ref, :uint64], :size_t
|
168
|
+
##
|
169
|
+
#
|
170
|
+
api :SDL_WriteBE64, [RWops.by_ref, :uint64], :size_t
|
131
171
|
end
|
data/lib/sdl2/surface.rb
CHANGED
@@ -141,6 +141,7 @@ module SDL2
|
|
141
141
|
if key.nil?#then disable color keying
|
142
142
|
SDL2.set_color_key(self, false, 0)
|
143
143
|
else# Enable color key by value
|
144
|
+
#binding.pry
|
144
145
|
SDL2.set_color_key(self, true, pixel_value)
|
145
146
|
end
|
146
147
|
end
|
@@ -187,12 +188,24 @@ module SDL2
|
|
187
188
|
|
188
189
|
callback :blit, [Surface.by_ref, Rect.by_ref, Surface.by_ref, Rect.by_ref], :int
|
189
190
|
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
191
|
+
##
|
192
|
+
#
|
193
|
+
api :SDL_CreateRGBSurface, [:surface_flags, :int, :int, :int, :uint32, :uint32, :uint32, :uint32], Surface.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
194
|
+
##
|
195
|
+
#
|
196
|
+
api :SDL_FreeSurface, [Surface.by_ref], :void
|
197
|
+
##
|
198
|
+
#
|
199
|
+
api :SDL_SetSurfacePalette, [Surface.by_ref, Palette.by_ref], :int, {error: true}
|
200
|
+
##
|
201
|
+
#
|
202
|
+
api :SDL_LockSurface, [Surface.by_ref], :int
|
203
|
+
##
|
204
|
+
#
|
205
|
+
api :SDL_UnlockSurface, [Surface.by_ref], :void
|
206
|
+
##
|
207
|
+
#
|
208
|
+
api :SDL_LoadBMP_RW, [RWops.by_ref, :int], Surface.auto_ptr
|
196
209
|
|
197
210
|
# Redefine SDL_LoadBMP macro:
|
198
211
|
def self.load_bmp(file)
|
@@ -201,31 +214,67 @@ module SDL2
|
|
201
214
|
|
202
215
|
returns_error(:load_bmp,TRUE_WHEN_NOT_NULL)
|
203
216
|
|
204
|
-
|
217
|
+
##
|
218
|
+
#
|
219
|
+
api :SDL_SaveBMP_RW, [Surface.by_ref, RWops.by_ref, :int], :int
|
205
220
|
|
206
221
|
def self.save_bmp(surface, file)
|
207
222
|
SDL2.save_bmp_rw(surface, RWops.from_file(file, 'wb'), 1)
|
208
223
|
end
|
209
224
|
|
210
|
-
|
211
|
-
|
212
|
-
|
225
|
+
##
|
226
|
+
#
|
227
|
+
api :SDL_SetSurfaceRLE, [Surface.by_ref, :int], :int
|
228
|
+
##
|
229
|
+
#
|
230
|
+
api :SDL_SetColorKey, [Surface.by_ref, :bool, :uint32], :int, {error: true}
|
231
|
+
##
|
232
|
+
#
|
233
|
+
api :SDL_GetColorKey, [Surface.by_ref, UInt32Struct.by_ref], :uint32, {error: true}
|
213
234
|
# Could mean an SDL error... or maybe not?
|
214
235
|
boolean? :get_color_key, TRUE_WHEN_ZERO
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
236
|
+
##
|
237
|
+
#
|
238
|
+
api :SDL_SetSurfaceColorMod, [Surface.by_ref, :uint8, :uint8, :uint8], :int
|
239
|
+
##
|
240
|
+
#
|
241
|
+
api :SDL_GetSurfaceColorMod, [Surface.by_ref, UInt8Struct.by_ref,UInt8Struct.by_ref,UInt8Struct.by_ref], :int
|
242
|
+
##
|
243
|
+
#
|
244
|
+
api :SDL_SetSurfaceAlphaMod, [Surface.by_ref, :uint8], :int, {error: true}
|
245
|
+
##
|
246
|
+
#
|
247
|
+
api :SDL_GetSurfaceAlphaMod, [Surface.by_ref,UInt8Struct.by_ref], :int, {error: true}
|
248
|
+
##
|
249
|
+
#
|
250
|
+
api :SDL_SetSurfaceBlendMode, [Surface.by_ref, :blend_mode], :int, {error: true}
|
251
|
+
##
|
252
|
+
#
|
253
|
+
api :SDL_GetSurfaceBlendMode, [Surface.by_ref, BlendModeStruct.by_ref], :int, {error: true}
|
254
|
+
##
|
255
|
+
#
|
256
|
+
api :SDL_SetClipRect, [Surface.by_ref, Rect.by_ref], :int, {error: true}
|
257
|
+
##
|
258
|
+
#
|
259
|
+
api :SDL_GetClipRect, [Surface.by_ref, Rect.by_ref], :int, {error: true}
|
260
|
+
##
|
261
|
+
#
|
262
|
+
api :SDL_ConvertSurface, [Surface.by_ref, PixelFormat.by_ref, :surface_flags], Surface.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
263
|
+
##
|
264
|
+
#
|
265
|
+
api :SDL_ConvertSurfaceFormat, [Surface.by_ref, :pixel_format, :surface_flags], Surface.auto_ptr
|
266
|
+
##
|
267
|
+
#
|
268
|
+
api :SDL_ConvertPixels, [:int, :int, :pixel_format, :pointer, :int, :pixel_format, :pointer, :int], :int, {error: true}
|
269
|
+
##
|
270
|
+
#
|
271
|
+
api :SDL_FillRect, [Surface.by_ref, Rect.by_ref, :uint32], :int, {error: true}
|
272
|
+
##
|
273
|
+
#
|
274
|
+
api :SDL_FillRects, [Surface.by_ref, Rect.by_ref, :count, :uint32], :int, {error: true}
|
275
|
+
##
|
276
|
+
#
|
277
|
+
api :SDL_UpperBlit, [Surface.by_ref, Rect.by_ref, Surface.by_ref, Rect.by_ref], :int, {error: true}
|
229
278
|
|
230
279
|
# using upper_blit
|
231
280
|
def self.blit_surface(src, srcrect, dst, dstrect)
|
@@ -235,9 +284,15 @@ module SDL2
|
|
235
284
|
|
236
285
|
returns_error(:blit_surface, TRUE_WHEN_ZERO)
|
237
286
|
|
238
|
-
|
239
|
-
|
240
|
-
|
287
|
+
##
|
288
|
+
#
|
289
|
+
api :SDL_LowerBlit, [Surface.by_ref, Rect.by_ref, Surface.by_ref, Rect.by_ref], :int
|
290
|
+
##
|
291
|
+
#
|
292
|
+
api :SDL_SoftStretch, [Surface.by_ref, Rect.by_ref, Surface.by_ref, Rect.by_ref], :int
|
293
|
+
##
|
294
|
+
#
|
295
|
+
api :SDL_UpperBlitScaled, [Surface.by_ref, Rect.by_ref, Surface.by_ref, Rect.by_ref], :int
|
241
296
|
|
242
297
|
# using upper_blit_scaled
|
243
298
|
def self.blit_scaled(src, srcrect, dst, dstrect)
|
@@ -246,6 +301,8 @@ module SDL2
|
|
246
301
|
|
247
302
|
returns_error(:blit_scaled, TRUE_WHEN_ZERO)
|
248
303
|
|
249
|
-
|
304
|
+
##
|
305
|
+
#
|
306
|
+
api :SDL_LowerBlitScaled, [Surface.by_ref, Rect.by_ref, Surface.by_ref, Rect.by_ref], :int
|
250
307
|
|
251
308
|
end
|
data/lib/sdl2/syswm.rb
CHANGED
@@ -15,6 +15,8 @@ module SDL2 # SDL_syswm.h
|
|
15
15
|
# Line 99~107
|
16
16
|
enum :syswm_type, [:unkown, :window, :x11, :directfb, :cocoa, :uikit]
|
17
17
|
|
18
|
-
|
18
|
+
##
|
19
|
+
#
|
20
|
+
api :SDL_GetWindowWMInfo, [Window.by_ref, SYSWM::Info.by_ref], :bool
|
19
21
|
|
20
22
|
end
|
data/lib/sdl2/timer.rb
CHANGED
@@ -2,16 +2,28 @@ require 'sdl2'
|
|
2
2
|
|
3
3
|
module SDL2
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
##
|
6
|
+
#
|
7
|
+
api :SDL_GetTicks, [], :uint32
|
8
|
+
##
|
9
|
+
#
|
10
|
+
api :SDL_GetPerformanceCounter, [], :uint64
|
11
|
+
##
|
12
|
+
#
|
13
|
+
api :SDL_GetPerformanceFrequency, [], :uint64
|
14
|
+
##
|
15
|
+
#
|
16
|
+
api :SDL_Delay, [:uint32], :void
|
9
17
|
|
10
18
|
callback :timer_callback, [:uint32, :pointer], :uint32
|
11
19
|
|
12
20
|
typedef :int, :timer_id
|
13
21
|
|
14
|
-
|
15
|
-
|
22
|
+
##
|
23
|
+
#
|
24
|
+
api :SDL_AddTimer, [:uint32, :timer_callback, :pointer], :timer_id
|
25
|
+
##
|
26
|
+
#
|
27
|
+
api :SDL_RemoveTimer, [:timer_id], :bool
|
16
28
|
|
17
29
|
end
|
data/lib/sdl2/touch.rb
CHANGED
@@ -15,10 +15,18 @@ module SDL2
|
|
15
15
|
|
16
16
|
TOUCH_MOUSEID = -1
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
##
|
19
|
+
#
|
20
|
+
api :SDL_GetNumTouchDevices, [], :int
|
21
|
+
##
|
22
|
+
#
|
23
|
+
api :SDL_GetTouchDevice, [:int], :touch_id
|
24
|
+
##
|
25
|
+
#
|
26
|
+
api :SDL_GetNumTouchFingers, [:touch_id], :int
|
27
|
+
##
|
28
|
+
#
|
29
|
+
api :SDL_GetTouchFinger, [:touch_id, :int], Finger.by_ref
|
22
30
|
|
23
31
|
|
24
32
|
end
|
data/lib/sdl2/ttf.rb
CHANGED
@@ -15,18 +15,32 @@ module SDL2
|
|
15
15
|
extend SDL2::Library
|
16
16
|
ffi_lib SDL_TTF_MODULE
|
17
17
|
|
18
|
-
|
18
|
+
##
|
19
|
+
#
|
20
|
+
api :TTF_Linked_Version, [], Version.auto_ptr
|
19
21
|
|
20
22
|
UNICODE_BOM_NATIVE = 0xFEFF
|
21
23
|
UNICODE_BOM_SWAPPED = 0xFFFE
|
22
24
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
25
|
+
##
|
26
|
+
#
|
27
|
+
api :TTF_ByteSwappedUNICODE, [:int], :void
|
28
|
+
|
29
|
+
##
|
30
|
+
#
|
31
|
+
api :TTF_Init, [], :int, {error: true, filter: TRUE_WHEN_ZERO}
|
32
|
+
##
|
33
|
+
#
|
34
|
+
api :TTF_OpenFont, [:string, :int], Font.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
35
|
+
##
|
36
|
+
#
|
37
|
+
api :TTF_OpenFontIndex, [:string, :int, :long], Font.auto_ptr
|
38
|
+
##
|
39
|
+
#
|
40
|
+
api :TTF_OpenFontRW, [RWops.by_ref, :int, :int], Font.auto_ptr
|
41
|
+
##
|
42
|
+
#
|
43
|
+
api :TTF_OpenFontIndexRW, [RWops.by_ref, :int, :int, :long], Font.auto_ptr
|
30
44
|
|
31
45
|
module STYLE
|
32
46
|
include EnumerableConstants
|
@@ -39,10 +53,18 @@ module SDL2
|
|
39
53
|
|
40
54
|
enum :font_style, STYLE.flatten_consts
|
41
55
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
56
|
+
##
|
57
|
+
#
|
58
|
+
api :TTF_GetFontStyle, [Font.by_ref], :int
|
59
|
+
##
|
60
|
+
#
|
61
|
+
api :TTF_SetFontStyle, [Font.by_ref, :int], :void
|
62
|
+
##
|
63
|
+
#
|
64
|
+
api :TTF_GetFontOutline, [Font.by_ref], :int
|
65
|
+
##
|
66
|
+
#
|
67
|
+
api :TTF_SetFontOutline, [Font.by_ref, :int], :void
|
46
68
|
|
47
69
|
module HINTING
|
48
70
|
include EnumerableConstants
|
@@ -53,23 +75,51 @@ module SDL2
|
|
53
75
|
end
|
54
76
|
enum :hinting, HINTING.flatten_consts
|
55
77
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
78
|
+
##
|
79
|
+
#
|
80
|
+
api :TTF_GetFontHinting, [Font.by_ref], :hinting
|
81
|
+
##
|
82
|
+
#
|
83
|
+
api :TTF_SetFontHinting, [Font.by_ref, :int], :void
|
84
|
+
|
85
|
+
##
|
86
|
+
#
|
87
|
+
api :TTF_FontHeight, [Font.by_ref], :int
|
88
|
+
##
|
89
|
+
#
|
90
|
+
api :TTF_FontAscent, [Font.by_ref], :int
|
91
|
+
##
|
92
|
+
#
|
93
|
+
api :TTF_FontDescent, [Font.by_ref], :int
|
94
|
+
##
|
95
|
+
#
|
96
|
+
api :TTF_FontLineSkip, [Font.by_ref], :int
|
97
|
+
##
|
98
|
+
#
|
99
|
+
api :TTF_GetFontKerning, [Font.by_ref], :int
|
100
|
+
##
|
101
|
+
#
|
102
|
+
api :TTF_SetFontKerning, [Font.by_ref], :int
|
103
|
+
##
|
104
|
+
#
|
105
|
+
api :TTF_FontFaces, [Font.by_ref], :long
|
106
|
+
##
|
107
|
+
#
|
108
|
+
api :TTF_FontFaceIsFixedWidth, [Font.by_ref], :int
|
109
|
+
##
|
110
|
+
#
|
111
|
+
api :TTF_FontFaceFamilyName, [Font.by_ref], :string
|
112
|
+
##
|
113
|
+
#
|
114
|
+
api :TTF_FontFaceStyleName, [Font.by_ref], :string
|
115
|
+
|
116
|
+
##
|
117
|
+
#
|
118
|
+
api :TTF_GlyphIsProvided, [Font.by_ref, :uint16], :int
|
119
|
+
|
120
|
+
##
|
121
|
+
#
|
122
|
+
api :TTF_GlyphMetrics, [
|
73
123
|
Font.by_ref,
|
74
124
|
:uint16,
|
75
125
|
IntStruct.by_ref,
|
@@ -79,36 +129,80 @@ module SDL2
|
|
79
129
|
IntStruct.by_ref
|
80
130
|
], :int
|
81
131
|
|
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
|
-
|
132
|
+
##
|
133
|
+
#
|
134
|
+
api :TTF_SizeText, [Font.by_ref, :string, IntStruct.by_ref, IntStruct.by_ref], :int
|
135
|
+
##
|
136
|
+
#
|
137
|
+
api :TTF_SizeUTF8, [Font.by_ref, :string, IntStruct.by_ref, IntStruct.by_ref], :int
|
138
|
+
##
|
139
|
+
#
|
140
|
+
api :TTF_SizeUNICODE, [Font.by_ref, :string, IntStruct.by_ref, IntStruct.by_ref], :int
|
141
|
+
|
142
|
+
##
|
143
|
+
#
|
144
|
+
api :TTF_RenderText_Solid, [Font.by_ref, :string, Color.by_value], Surface.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
145
|
+
##
|
146
|
+
#
|
147
|
+
api :TTF_RenderUTF8_Solid, [Font.by_ref, :string, Color.by_value], Surface.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
148
|
+
##
|
149
|
+
#
|
150
|
+
api :TTF_RenderUNICODE_Solid, [Font.by_ref, :string, Color.by_value], Surface.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
151
|
+
|
152
|
+
##
|
153
|
+
#
|
154
|
+
api :TTF_RenderGlyph_Solid, [Font.by_ref, :uint16, Color.by_value], Surface.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
155
|
+
|
156
|
+
##
|
157
|
+
#
|
158
|
+
api :TTF_RenderText_Shaded, [Font.by_ref, :string, Color.by_value, Color.by_value], Surface.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
159
|
+
##
|
160
|
+
#
|
161
|
+
api :TTF_RenderUTF8_Shaded, [Font.by_ref, :string, Color.by_value, Color.by_value], Surface.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
162
|
+
##
|
163
|
+
#
|
164
|
+
api :TTF_RenderUNICODE_Shaded, [Font.by_ref, :string, Color.by_value, Color.by_value], Surface.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
165
|
+
|
166
|
+
##
|
167
|
+
#
|
168
|
+
api :TTF_RenderGlyph_Shaded, [Font.by_ref, :uint16, Color.by_value, Color.by_value], Surface.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
169
|
+
|
170
|
+
##
|
171
|
+
#
|
172
|
+
api :TTF_RenderText_Blended, [Font.by_ref, :string, Color.by_value], Surface.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
173
|
+
##
|
174
|
+
#
|
175
|
+
api :TTF_RenderUTF8_Blended, [Font.by_ref, :string, Color.by_value], Surface.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
176
|
+
##
|
177
|
+
#
|
178
|
+
api :TTF_RenderUNICODE_Blended, [Font.by_ref, :string, Color.by_value], Surface.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
179
|
+
|
180
|
+
##
|
181
|
+
#
|
182
|
+
api :TTF_RenderText_Blended_Wrapped, [Font.by_ref, :string, Color.by_value, :uint32], Surface.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
183
|
+
##
|
184
|
+
#
|
185
|
+
api :TTF_RenderUTF8_Blended_Wrapped, [Font.by_ref, :string, Color.by_value, :uint32], Surface.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
186
|
+
##
|
187
|
+
#
|
188
|
+
api :TTF_RenderUNICODE_Blended_Wrapped, [Font.by_ref, :string, Color.by_value, :uint32], Surface.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
189
|
+
|
190
|
+
##
|
191
|
+
#
|
192
|
+
api :TTF_RenderGlyph_Blended, [Font.by_ref, :uint16, Color.by_value], Surface.auto_ptr, {error: true, filter: TRUE_WHEN_NOT_NULL}
|
193
|
+
|
194
|
+
##
|
195
|
+
#
|
196
|
+
api :TTF_CloseFont, [Font.by_ref], :void
|
197
|
+
##
|
198
|
+
#
|
199
|
+
api :TTF_Quit, [], :void
|
200
|
+
##
|
201
|
+
#
|
202
|
+
api :TTF_WasInit, [], :int
|
203
|
+
##
|
204
|
+
#
|
205
|
+
api :TTF_GetFontKerningSize, [Font.by_ref, :int, :int], :int
|
112
206
|
|
113
207
|
end
|
114
208
|
|