raylib-bindings 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/raygui.rb CHANGED
@@ -1,559 +1,547 @@
1
- # Yet another raylib wrapper for Ruby
2
- #
3
- # * https://github.com/vaiorabbit/raylib-bindings
4
- #
5
- # [NOTICE] This is an automatically generated file.
6
-
7
- require 'ffi'
8
-
9
- module Raylib
10
- extend FFI::Library
11
- # Define/Macro
12
-
13
- RAYGUI_VERSION = "3.2"
14
- SCROLLBAR_LEFT_SIDE = 0
15
- SCROLLBAR_RIGHT_SIDE = 1
16
-
17
- # Enum
18
-
19
- STATE_NORMAL = 0
20
- STATE_FOCUSED = 1
21
- STATE_PRESSED = 2
22
- STATE_DISABLED = 3
23
- TEXT_ALIGN_LEFT = 0
24
- TEXT_ALIGN_CENTER = 1
25
- TEXT_ALIGN_RIGHT = 2
26
- DEFAULT = 0
27
- LABEL = 1
28
- BUTTON = 2
29
- TOGGLE = 3
30
- SLIDER = 4
31
- PROGRESSBAR = 5
32
- CHECKBOX = 6
33
- COMBOBOX = 7
34
- DROPDOWNBOX = 8
35
- TEXTBOX = 9
36
- VALUEBOX = 10
37
- SPINNER = 11
38
- LISTVIEW = 12
39
- COLORPICKER = 13
40
- SCROLLBAR = 14
41
- STATUSBAR = 15
42
- BORDER_COLOR_NORMAL = 0
43
- BASE_COLOR_NORMAL = 1
44
- TEXT_COLOR_NORMAL = 2
45
- BORDER_COLOR_FOCUSED = 3
46
- BASE_COLOR_FOCUSED = 4
47
- TEXT_COLOR_FOCUSED = 5
48
- BORDER_COLOR_PRESSED = 6
49
- BASE_COLOR_PRESSED = 7
50
- TEXT_COLOR_PRESSED = 8
51
- BORDER_COLOR_DISABLED = 9
52
- BASE_COLOR_DISABLED = 10
53
- TEXT_COLOR_DISABLED = 11
54
- BORDER_WIDTH = 12
55
- TEXT_PADDING = 13
56
- TEXT_ALIGNMENT = 14
57
- RESERVED = 15
58
- TEXT_SIZE = 16
59
- TEXT_SPACING = 17
60
- LINE_COLOR = 18
61
- BACKGROUND_COLOR = 19
62
- GROUP_PADDING = 16
63
- SLIDER_WIDTH = 16
64
- SLIDER_PADDING = 17
65
- PROGRESS_PADDING = 16
66
- ARROWS_SIZE = 16
67
- ARROWS_VISIBLE = 17
68
- SCROLL_SLIDER_PADDING = 18
69
- SCROLL_SLIDER_SIZE = 19
70
- SCROLL_PADDING = 20
71
- SCROLL_SPEED = 21
72
- CHECK_PADDING = 16
73
- COMBO_BUTTON_WIDTH = 16
74
- COMBO_BUTTON_SPACING = 17
75
- ARROW_PADDING = 16
76
- DROPDOWN_ITEMS_SPACING = 17
77
- TEXT_INNER_PADDING = 16
78
- TEXT_LINES_SPACING = 17
79
- SPIN_BUTTON_WIDTH = 16
80
- SPIN_BUTTON_SPACING = 17
81
- LIST_ITEMS_HEIGHT = 16
82
- LIST_ITEMS_SPACING = 17
83
- SCROLLBAR_WIDTH = 18
84
- SCROLLBAR_SIDE = 19
85
- COLOR_SELECTOR_SIZE = 16
86
- HUEBAR_WIDTH = 17
87
- HUEBAR_PADDING = 18
88
- HUEBAR_SELECTOR_HEIGHT = 19
89
- HUEBAR_SELECTOR_OVERFLOW = 20
90
- ICON_NONE = 0
91
- ICON_FOLDER_FILE_OPEN = 1
92
- ICON_FILE_SAVE_CLASSIC = 2
93
- ICON_FOLDER_OPEN = 3
94
- ICON_FOLDER_SAVE = 4
95
- ICON_FILE_OPEN = 5
96
- ICON_FILE_SAVE = 6
97
- ICON_FILE_EXPORT = 7
98
- ICON_FILE_ADD = 8
99
- ICON_FILE_DELETE = 9
100
- ICON_FILETYPE_TEXT = 10
101
- ICON_FILETYPE_AUDIO = 11
102
- ICON_FILETYPE_IMAGE = 12
103
- ICON_FILETYPE_PLAY = 13
104
- ICON_FILETYPE_VIDEO = 14
105
- ICON_FILETYPE_INFO = 15
106
- ICON_FILE_COPY = 16
107
- ICON_FILE_CUT = 17
108
- ICON_FILE_PASTE = 18
109
- ICON_CURSOR_HAND = 19
110
- ICON_CURSOR_POINTER = 20
111
- ICON_CURSOR_CLASSIC = 21
112
- ICON_PENCIL = 22
113
- ICON_PENCIL_BIG = 23
114
- ICON_BRUSH_CLASSIC = 24
115
- ICON_BRUSH_PAINTER = 25
116
- ICON_WATER_DROP = 26
117
- ICON_COLOR_PICKER = 27
118
- ICON_RUBBER = 28
119
- ICON_COLOR_BUCKET = 29
120
- ICON_TEXT_T = 30
121
- ICON_TEXT_A = 31
122
- ICON_SCALE = 32
123
- ICON_RESIZE = 33
124
- ICON_FILTER_POINT = 34
125
- ICON_FILTER_BILINEAR = 35
126
- ICON_CROP = 36
127
- ICON_CROP_ALPHA = 37
128
- ICON_SQUARE_TOGGLE = 38
129
- ICON_SYMMETRY = 39
130
- ICON_SYMMETRY_HORIZONTAL = 40
131
- ICON_SYMMETRY_VERTICAL = 41
132
- ICON_LENS = 42
133
- ICON_LENS_BIG = 43
134
- ICON_EYE_ON = 44
135
- ICON_EYE_OFF = 45
136
- ICON_FILTER_TOP = 46
137
- ICON_FILTER = 47
138
- ICON_TARGET_POINT = 48
139
- ICON_TARGET_SMALL = 49
140
- ICON_TARGET_BIG = 50
141
- ICON_TARGET_MOVE = 51
142
- ICON_CURSOR_MOVE = 52
143
- ICON_CURSOR_SCALE = 53
144
- ICON_CURSOR_SCALE_RIGHT = 54
145
- ICON_CURSOR_SCALE_LEFT = 55
146
- ICON_UNDO = 56
147
- ICON_REDO = 57
148
- ICON_REREDO = 58
149
- ICON_MUTATE = 59
150
- ICON_ROTATE = 60
151
- ICON_REPEAT = 61
152
- ICON_SHUFFLE = 62
153
- ICON_EMPTYBOX = 63
154
- ICON_TARGET = 64
155
- ICON_TARGET_SMALL_FILL = 65
156
- ICON_TARGET_BIG_FILL = 66
157
- ICON_TARGET_MOVE_FILL = 67
158
- ICON_CURSOR_MOVE_FILL = 68
159
- ICON_CURSOR_SCALE_FILL = 69
160
- ICON_CURSOR_SCALE_RIGHT_FILL = 70
161
- ICON_CURSOR_SCALE_LEFT_FILL = 71
162
- ICON_UNDO_FILL = 72
163
- ICON_REDO_FILL = 73
164
- ICON_REREDO_FILL = 74
165
- ICON_MUTATE_FILL = 75
166
- ICON_ROTATE_FILL = 76
167
- ICON_REPEAT_FILL = 77
168
- ICON_SHUFFLE_FILL = 78
169
- ICON_EMPTYBOX_SMALL = 79
170
- ICON_BOX = 80
171
- ICON_BOX_TOP = 81
172
- ICON_BOX_TOP_RIGHT = 82
173
- ICON_BOX_RIGHT = 83
174
- ICON_BOX_BOTTOM_RIGHT = 84
175
- ICON_BOX_BOTTOM = 85
176
- ICON_BOX_BOTTOM_LEFT = 86
177
- ICON_BOX_LEFT = 87
178
- ICON_BOX_TOP_LEFT = 88
179
- ICON_BOX_CENTER = 89
180
- ICON_BOX_CIRCLE_MASK = 90
181
- ICON_POT = 91
182
- ICON_ALPHA_MULTIPLY = 92
183
- ICON_ALPHA_CLEAR = 93
184
- ICON_DITHERING = 94
185
- ICON_MIPMAPS = 95
186
- ICON_BOX_GRID = 96
187
- ICON_GRID = 97
188
- ICON_BOX_CORNERS_SMALL = 98
189
- ICON_BOX_CORNERS_BIG = 99
190
- ICON_FOUR_BOXES = 100
191
- ICON_GRID_FILL = 101
192
- ICON_BOX_MULTISIZE = 102
193
- ICON_ZOOM_SMALL = 103
194
- ICON_ZOOM_MEDIUM = 104
195
- ICON_ZOOM_BIG = 105
196
- ICON_ZOOM_ALL = 106
197
- ICON_ZOOM_CENTER = 107
198
- ICON_BOX_DOTS_SMALL = 108
199
- ICON_BOX_DOTS_BIG = 109
200
- ICON_BOX_CONCENTRIC = 110
201
- ICON_BOX_GRID_BIG = 111
202
- ICON_OK_TICK = 112
203
- ICON_CROSS = 113
204
- ICON_ARROW_LEFT = 114
205
- ICON_ARROW_RIGHT = 115
206
- ICON_ARROW_DOWN = 116
207
- ICON_ARROW_UP = 117
208
- ICON_ARROW_LEFT_FILL = 118
209
- ICON_ARROW_RIGHT_FILL = 119
210
- ICON_ARROW_DOWN_FILL = 120
211
- ICON_ARROW_UP_FILL = 121
212
- ICON_AUDIO = 122
213
- ICON_FX = 123
214
- ICON_WAVE = 124
215
- ICON_WAVE_SINUS = 125
216
- ICON_WAVE_SQUARE = 126
217
- ICON_WAVE_TRIANGULAR = 127
218
- ICON_CROSS_SMALL = 128
219
- ICON_PLAYER_PREVIOUS = 129
220
- ICON_PLAYER_PLAY_BACK = 130
221
- ICON_PLAYER_PLAY = 131
222
- ICON_PLAYER_PAUSE = 132
223
- ICON_PLAYER_STOP = 133
224
- ICON_PLAYER_NEXT = 134
225
- ICON_PLAYER_RECORD = 135
226
- ICON_MAGNET = 136
227
- ICON_LOCK_CLOSE = 137
228
- ICON_LOCK_OPEN = 138
229
- ICON_CLOCK = 139
230
- ICON_TOOLS = 140
231
- ICON_GEAR = 141
232
- ICON_GEAR_BIG = 142
233
- ICON_BIN = 143
234
- ICON_HAND_POINTER = 144
235
- ICON_LASER = 145
236
- ICON_COIN = 146
237
- ICON_EXPLOSION = 147
238
- ICON_1UP = 148
239
- ICON_PLAYER = 149
240
- ICON_PLAYER_JUMP = 150
241
- ICON_KEY = 151
242
- ICON_DEMON = 152
243
- ICON_TEXT_POPUP = 153
244
- ICON_GEAR_EX = 154
245
- ICON_CRACK = 155
246
- ICON_CRACK_POINTS = 156
247
- ICON_STAR = 157
248
- ICON_DOOR = 158
249
- ICON_EXIT = 159
250
- ICON_MODE_2D = 160
251
- ICON_MODE_3D = 161
252
- ICON_CUBE = 162
253
- ICON_CUBE_FACE_TOP = 163
254
- ICON_CUBE_FACE_LEFT = 164
255
- ICON_CUBE_FACE_FRONT = 165
256
- ICON_CUBE_FACE_BOTTOM = 166
257
- ICON_CUBE_FACE_RIGHT = 167
258
- ICON_CUBE_FACE_BACK = 168
259
- ICON_CAMERA = 169
260
- ICON_SPECIAL = 170
261
- ICON_LINK_NET = 171
262
- ICON_LINK_BOXES = 172
263
- ICON_LINK_MULTI = 173
264
- ICON_LINK = 174
265
- ICON_LINK_BROKE = 175
266
- ICON_TEXT_NOTES = 176
267
- ICON_NOTEBOOK = 177
268
- ICON_SUITCASE = 178
269
- ICON_SUITCASE_ZIP = 179
270
- ICON_MAILBOX = 180
271
- ICON_MONITOR = 181
272
- ICON_PRINTER = 182
273
- ICON_PHOTO_CAMERA = 183
274
- ICON_PHOTO_CAMERA_FLASH = 184
275
- ICON_HOUSE = 185
276
- ICON_HEART = 186
277
- ICON_CORNER = 187
278
- ICON_VERTICAL_BARS = 188
279
- ICON_VERTICAL_BARS_FILL = 189
280
- ICON_LIFE_BARS = 190
281
- ICON_INFO = 191
282
- ICON_CROSSLINE = 192
283
- ICON_HELP = 193
284
- ICON_FILETYPE_ALPHA = 194
285
- ICON_FILETYPE_HOME = 195
286
- ICON_LAYERS_VISIBLE = 196
287
- ICON_LAYERS = 197
288
- ICON_WINDOW = 198
289
- ICON_HIDPI = 199
290
- ICON_FILETYPE_BINARY = 200
291
- ICON_HEX = 201
292
- ICON_SHIELD = 202
293
- ICON_FILE_NEW = 203
294
- ICON_FOLDER_ADD = 204
295
- ICON_ALARM = 205
296
- ICON_206 = 206
297
- ICON_207 = 207
298
- ICON_208 = 208
299
- ICON_209 = 209
300
- ICON_210 = 210
301
- ICON_211 = 211
302
- ICON_212 = 212
303
- ICON_213 = 213
304
- ICON_214 = 214
305
- ICON_215 = 215
306
- ICON_216 = 216
307
- ICON_217 = 217
308
- ICON_218 = 218
309
- ICON_219 = 219
310
- ICON_220 = 220
311
- ICON_221 = 221
312
- ICON_222 = 222
313
- ICON_223 = 223
314
- ICON_224 = 224
315
- ICON_225 = 225
316
- ICON_226 = 226
317
- ICON_227 = 227
318
- ICON_228 = 228
319
- ICON_229 = 229
320
- ICON_230 = 230
321
- ICON_231 = 231
322
- ICON_232 = 232
323
- ICON_233 = 233
324
- ICON_234 = 234
325
- ICON_235 = 235
326
- ICON_236 = 236
327
- ICON_237 = 237
328
- ICON_238 = 238
329
- ICON_239 = 239
330
- ICON_240 = 240
331
- ICON_241 = 241
332
- ICON_242 = 242
333
- ICON_243 = 243
334
- ICON_244 = 244
335
- ICON_245 = 245
336
- ICON_246 = 246
337
- ICON_247 = 247
338
- ICON_248 = 248
339
- ICON_249 = 249
340
- ICON_250 = 250
341
- ICON_251 = 251
342
- ICON_252 = 252
343
- ICON_253 = 253
344
- ICON_254 = 254
345
- ICON_255 = 255
346
-
347
- # Typedef
348
-
349
- typedef :int, :GuiState
350
- typedef :int, :GuiTextAlignment
351
- typedef :int, :GuiControl
352
- typedef :int, :GuiControlProperty
353
- typedef :int, :GuiDefaultProperty
354
- typedef :int, :GuiToggleProperty
355
- typedef :int, :GuiSliderProperty
356
- typedef :int, :GuiProgressBarProperty
357
- typedef :int, :GuiScrollBarProperty
358
- typedef :int, :GuiCheckBoxProperty
359
- typedef :int, :GuiComboBoxProperty
360
- typedef :int, :GuiDropdownBoxProperty
361
- typedef :int, :GuiTextBoxProperty
362
- typedef :int, :GuiSpinnerProperty
363
- typedef :int, :GuiListViewProperty
364
- typedef :int, :GuiColorPickerProperty
365
- typedef :int, :GuiIconName
366
-
367
- # Struct
368
-
369
- class GuiStyleProp < FFI::Struct
370
- layout(
371
- :controlId, :ushort,
372
- :propertyId, :ushort,
373
- :propertyValue, :uint,
374
- )
375
- end
376
-
377
-
378
- # Function
379
-
380
- def self.setup_raygui_symbols()
381
- symbols = [
382
- :GuiEnable,
383
- :GuiDisable,
384
- :GuiLock,
385
- :GuiUnlock,
386
- :GuiIsLocked,
387
- :GuiFade,
388
- :GuiSetState,
389
- :GuiGetState,
390
- :GuiSetFont,
391
- :GuiGetFont,
392
- :GuiSetStyle,
393
- :GuiGetStyle,
394
- :GuiWindowBox,
395
- :GuiGroupBox,
396
- :GuiLine,
397
- :GuiPanel,
398
- :GuiScrollPanel,
399
- :GuiLabel,
400
- :GuiButton,
401
- :GuiLabelButton,
402
- :GuiToggle,
403
- :GuiToggleGroup,
404
- :GuiCheckBox,
405
- :GuiComboBox,
406
- :GuiDropdownBox,
407
- :GuiSpinner,
408
- :GuiValueBox,
409
- :GuiTextBox,
410
- :GuiTextBoxMulti,
411
- :GuiSlider,
412
- :GuiSliderBar,
413
- :GuiProgressBar,
414
- :GuiStatusBar,
415
- :GuiDummyRec,
416
- :GuiGrid,
417
- :GuiListView,
418
- :GuiListViewEx,
419
- :GuiMessageBox,
420
- :GuiTextInputBox,
421
- :GuiColorPicker,
422
- :GuiColorPanel,
423
- :GuiColorBarAlpha,
424
- :GuiColorBarHue,
425
- :GuiLoadStyle,
426
- :GuiLoadStyleDefault,
427
- :GuiIconText,
428
- :GuiDrawIcon,
429
- :GuiGetIcons,
430
- :GuiGetIconData,
431
- :GuiSetIconData,
432
- :GuiSetIconScale,
433
- :GuiSetIconPixel,
434
- :GuiClearIconPixel,
435
- :GuiCheckIconPixel,
436
- ]
437
- args = {
438
- :GuiEnable => [],
439
- :GuiDisable => [],
440
- :GuiLock => [],
441
- :GuiUnlock => [],
442
- :GuiIsLocked => [],
443
- :GuiFade => [:float],
444
- :GuiSetState => [:int],
445
- :GuiGetState => [],
446
- :GuiSetFont => [Font.by_value],
447
- :GuiGetFont => [],
448
- :GuiSetStyle => [:int, :int, :int],
449
- :GuiGetStyle => [:int, :int],
450
- :GuiWindowBox => [Rectangle.by_value, :pointer],
451
- :GuiGroupBox => [Rectangle.by_value, :pointer],
452
- :GuiLine => [Rectangle.by_value, :pointer],
453
- :GuiPanel => [Rectangle.by_value, :pointer],
454
- :GuiScrollPanel => [Rectangle.by_value, :pointer, Rectangle.by_value, :pointer],
455
- :GuiLabel => [Rectangle.by_value, :pointer],
456
- :GuiButton => [Rectangle.by_value, :pointer],
457
- :GuiLabelButton => [Rectangle.by_value, :pointer],
458
- :GuiToggle => [Rectangle.by_value, :pointer, :bool],
459
- :GuiToggleGroup => [Rectangle.by_value, :pointer, :int],
460
- :GuiCheckBox => [Rectangle.by_value, :pointer, :bool],
461
- :GuiComboBox => [Rectangle.by_value, :pointer, :int],
462
- :GuiDropdownBox => [Rectangle.by_value, :pointer, :pointer, :bool],
463
- :GuiSpinner => [Rectangle.by_value, :pointer, :pointer, :int, :int, :bool],
464
- :GuiValueBox => [Rectangle.by_value, :pointer, :pointer, :int, :int, :bool],
465
- :GuiTextBox => [Rectangle.by_value, :pointer, :int, :bool],
466
- :GuiTextBoxMulti => [Rectangle.by_value, :pointer, :int, :bool],
467
- :GuiSlider => [Rectangle.by_value, :pointer, :pointer, :float, :float, :float],
468
- :GuiSliderBar => [Rectangle.by_value, :pointer, :pointer, :float, :float, :float],
469
- :GuiProgressBar => [Rectangle.by_value, :pointer, :pointer, :float, :float, :float],
470
- :GuiStatusBar => [Rectangle.by_value, :pointer],
471
- :GuiDummyRec => [Rectangle.by_value, :pointer],
472
- :GuiGrid => [Rectangle.by_value, :pointer, :float, :int],
473
- :GuiListView => [Rectangle.by_value, :pointer, :pointer, :int],
474
- :GuiListViewEx => [Rectangle.by_value, :pointer, :int, :pointer, :pointer, :int],
475
- :GuiMessageBox => [Rectangle.by_value, :pointer, :pointer, :pointer],
476
- :GuiTextInputBox => [Rectangle.by_value, :pointer, :pointer, :pointer, :pointer, :int, :pointer],
477
- :GuiColorPicker => [Rectangle.by_value, :pointer, Color.by_value],
478
- :GuiColorPanel => [Rectangle.by_value, :pointer, Color.by_value],
479
- :GuiColorBarAlpha => [Rectangle.by_value, :pointer, :float],
480
- :GuiColorBarHue => [Rectangle.by_value, :pointer, :float],
481
- :GuiLoadStyle => [:pointer],
482
- :GuiLoadStyleDefault => [],
483
- :GuiIconText => [:int, :pointer],
484
- :GuiDrawIcon => [:int, :int, :int, :int, Color.by_value],
485
- :GuiGetIcons => [],
486
- :GuiGetIconData => [:int],
487
- :GuiSetIconData => [:int, :pointer],
488
- :GuiSetIconScale => [:uint],
489
- :GuiSetIconPixel => [:int, :int, :int],
490
- :GuiClearIconPixel => [:int, :int, :int],
491
- :GuiCheckIconPixel => [:int, :int, :int],
492
- }
493
- retvals = {
494
- :GuiEnable => :void,
495
- :GuiDisable => :void,
496
- :GuiLock => :void,
497
- :GuiUnlock => :void,
498
- :GuiIsLocked => :bool,
499
- :GuiFade => :void,
500
- :GuiSetState => :void,
501
- :GuiGetState => :int,
502
- :GuiSetFont => :void,
503
- :GuiGetFont => Font.by_value,
504
- :GuiSetStyle => :void,
505
- :GuiGetStyle => :int,
506
- :GuiWindowBox => :bool,
507
- :GuiGroupBox => :void,
508
- :GuiLine => :void,
509
- :GuiPanel => :void,
510
- :GuiScrollPanel => Rectangle.by_value,
511
- :GuiLabel => :void,
512
- :GuiButton => :bool,
513
- :GuiLabelButton => :bool,
514
- :GuiToggle => :bool,
515
- :GuiToggleGroup => :int,
516
- :GuiCheckBox => :bool,
517
- :GuiComboBox => :int,
518
- :GuiDropdownBox => :bool,
519
- :GuiSpinner => :bool,
520
- :GuiValueBox => :bool,
521
- :GuiTextBox => :bool,
522
- :GuiTextBoxMulti => :bool,
523
- :GuiSlider => :float,
524
- :GuiSliderBar => :float,
525
- :GuiProgressBar => :float,
526
- :GuiStatusBar => :void,
527
- :GuiDummyRec => :void,
528
- :GuiGrid => Vector2.by_value,
529
- :GuiListView => :int,
530
- :GuiListViewEx => :int,
531
- :GuiMessageBox => :int,
532
- :GuiTextInputBox => :int,
533
- :GuiColorPicker => Color.by_value,
534
- :GuiColorPanel => Color.by_value,
535
- :GuiColorBarAlpha => :float,
536
- :GuiColorBarHue => :float,
537
- :GuiLoadStyle => :void,
538
- :GuiLoadStyleDefault => :void,
539
- :GuiIconText => :pointer,
540
- :GuiDrawIcon => :void,
541
- :GuiGetIcons => :pointer,
542
- :GuiGetIconData => :pointer,
543
- :GuiSetIconData => :void,
544
- :GuiSetIconScale => :void,
545
- :GuiSetIconPixel => :void,
546
- :GuiClearIconPixel => :void,
547
- :GuiCheckIconPixel => :bool,
548
- }
549
- symbols.each do |sym|
550
- begin
551
- attach_function sym, args[sym], retvals[sym]
552
- rescue FFI::NotFoundError => error
553
- $stderr.puts("[Warning] Failed to import #{sym} (#{error}).")
554
- end
555
- end
556
- end
557
-
558
- end
559
-
1
+ # Yet another raylib wrapper for Ruby
2
+ #
3
+ # * https://github.com/vaiorabbit/raylib-bindings
4
+ #
5
+ # [NOTICE] This is an automatically generated file.
6
+
7
+ require 'ffi'
8
+
9
+ module Raylib
10
+ extend FFI::Library
11
+ # Define/Macro
12
+
13
+ RAYGUI_VERSION = "3.2"
14
+ SCROLLBAR_LEFT_SIDE = 0
15
+ SCROLLBAR_RIGHT_SIDE = 1
16
+
17
+ # Enum
18
+
19
+ STATE_NORMAL = 0
20
+ STATE_FOCUSED = 1
21
+ STATE_PRESSED = 2
22
+ STATE_DISABLED = 3
23
+ TEXT_ALIGN_LEFT = 0
24
+ TEXT_ALIGN_CENTER = 1
25
+ TEXT_ALIGN_RIGHT = 2
26
+ DEFAULT = 0
27
+ LABEL = 1
28
+ BUTTON = 2
29
+ TOGGLE = 3
30
+ SLIDER = 4
31
+ PROGRESSBAR = 5
32
+ CHECKBOX = 6
33
+ COMBOBOX = 7
34
+ DROPDOWNBOX = 8
35
+ TEXTBOX = 9
36
+ VALUEBOX = 10
37
+ SPINNER = 11
38
+ LISTVIEW = 12
39
+ COLORPICKER = 13
40
+ SCROLLBAR = 14
41
+ STATUSBAR = 15
42
+ BORDER_COLOR_NORMAL = 0
43
+ BASE_COLOR_NORMAL = 1
44
+ TEXT_COLOR_NORMAL = 2
45
+ BORDER_COLOR_FOCUSED = 3
46
+ BASE_COLOR_FOCUSED = 4
47
+ TEXT_COLOR_FOCUSED = 5
48
+ BORDER_COLOR_PRESSED = 6
49
+ BASE_COLOR_PRESSED = 7
50
+ TEXT_COLOR_PRESSED = 8
51
+ BORDER_COLOR_DISABLED = 9
52
+ BASE_COLOR_DISABLED = 10
53
+ TEXT_COLOR_DISABLED = 11
54
+ BORDER_WIDTH = 12
55
+ TEXT_PADDING = 13
56
+ TEXT_ALIGNMENT = 14
57
+ RESERVED = 15
58
+ TEXT_SIZE = 16
59
+ TEXT_SPACING = 17
60
+ LINE_COLOR = 18
61
+ BACKGROUND_COLOR = 19
62
+ GROUP_PADDING = 16
63
+ SLIDER_WIDTH = 16
64
+ SLIDER_PADDING = 17
65
+ PROGRESS_PADDING = 16
66
+ ARROWS_SIZE = 16
67
+ ARROWS_VISIBLE = 17
68
+ SCROLL_SLIDER_PADDING = 18
69
+ SCROLL_SLIDER_SIZE = 19
70
+ SCROLL_PADDING = 20
71
+ SCROLL_SPEED = 21
72
+ CHECK_PADDING = 16
73
+ COMBO_BUTTON_WIDTH = 16
74
+ COMBO_BUTTON_SPACING = 17
75
+ ARROW_PADDING = 16
76
+ DROPDOWN_ITEMS_SPACING = 17
77
+ TEXT_INNER_PADDING = 16
78
+ TEXT_LINES_SPACING = 17
79
+ SPIN_BUTTON_WIDTH = 16
80
+ SPIN_BUTTON_SPACING = 17
81
+ LIST_ITEMS_HEIGHT = 16
82
+ LIST_ITEMS_SPACING = 17
83
+ SCROLLBAR_WIDTH = 18
84
+ SCROLLBAR_SIDE = 19
85
+ COLOR_SELECTOR_SIZE = 16
86
+ HUEBAR_WIDTH = 17
87
+ HUEBAR_PADDING = 18
88
+ HUEBAR_SELECTOR_HEIGHT = 19
89
+ HUEBAR_SELECTOR_OVERFLOW = 20
90
+ ICON_NONE = 0
91
+ ICON_FOLDER_FILE_OPEN = 1
92
+ ICON_FILE_SAVE_CLASSIC = 2
93
+ ICON_FOLDER_OPEN = 3
94
+ ICON_FOLDER_SAVE = 4
95
+ ICON_FILE_OPEN = 5
96
+ ICON_FILE_SAVE = 6
97
+ ICON_FILE_EXPORT = 7
98
+ ICON_FILE_ADD = 8
99
+ ICON_FILE_DELETE = 9
100
+ ICON_FILETYPE_TEXT = 10
101
+ ICON_FILETYPE_AUDIO = 11
102
+ ICON_FILETYPE_IMAGE = 12
103
+ ICON_FILETYPE_PLAY = 13
104
+ ICON_FILETYPE_VIDEO = 14
105
+ ICON_FILETYPE_INFO = 15
106
+ ICON_FILE_COPY = 16
107
+ ICON_FILE_CUT = 17
108
+ ICON_FILE_PASTE = 18
109
+ ICON_CURSOR_HAND = 19
110
+ ICON_CURSOR_POINTER = 20
111
+ ICON_CURSOR_CLASSIC = 21
112
+ ICON_PENCIL = 22
113
+ ICON_PENCIL_BIG = 23
114
+ ICON_BRUSH_CLASSIC = 24
115
+ ICON_BRUSH_PAINTER = 25
116
+ ICON_WATER_DROP = 26
117
+ ICON_COLOR_PICKER = 27
118
+ ICON_RUBBER = 28
119
+ ICON_COLOR_BUCKET = 29
120
+ ICON_TEXT_T = 30
121
+ ICON_TEXT_A = 31
122
+ ICON_SCALE = 32
123
+ ICON_RESIZE = 33
124
+ ICON_FILTER_POINT = 34
125
+ ICON_FILTER_BILINEAR = 35
126
+ ICON_CROP = 36
127
+ ICON_CROP_ALPHA = 37
128
+ ICON_SQUARE_TOGGLE = 38
129
+ ICON_SYMMETRY = 39
130
+ ICON_SYMMETRY_HORIZONTAL = 40
131
+ ICON_SYMMETRY_VERTICAL = 41
132
+ ICON_LENS = 42
133
+ ICON_LENS_BIG = 43
134
+ ICON_EYE_ON = 44
135
+ ICON_EYE_OFF = 45
136
+ ICON_FILTER_TOP = 46
137
+ ICON_FILTER = 47
138
+ ICON_TARGET_POINT = 48
139
+ ICON_TARGET_SMALL = 49
140
+ ICON_TARGET_BIG = 50
141
+ ICON_TARGET_MOVE = 51
142
+ ICON_CURSOR_MOVE = 52
143
+ ICON_CURSOR_SCALE = 53
144
+ ICON_CURSOR_SCALE_RIGHT = 54
145
+ ICON_CURSOR_SCALE_LEFT = 55
146
+ ICON_UNDO = 56
147
+ ICON_REDO = 57
148
+ ICON_REREDO = 58
149
+ ICON_MUTATE = 59
150
+ ICON_ROTATE = 60
151
+ ICON_REPEAT = 61
152
+ ICON_SHUFFLE = 62
153
+ ICON_EMPTYBOX = 63
154
+ ICON_TARGET = 64
155
+ ICON_TARGET_SMALL_FILL = 65
156
+ ICON_TARGET_BIG_FILL = 66
157
+ ICON_TARGET_MOVE_FILL = 67
158
+ ICON_CURSOR_MOVE_FILL = 68
159
+ ICON_CURSOR_SCALE_FILL = 69
160
+ ICON_CURSOR_SCALE_RIGHT_FILL = 70
161
+ ICON_CURSOR_SCALE_LEFT_FILL = 71
162
+ ICON_UNDO_FILL = 72
163
+ ICON_REDO_FILL = 73
164
+ ICON_REREDO_FILL = 74
165
+ ICON_MUTATE_FILL = 75
166
+ ICON_ROTATE_FILL = 76
167
+ ICON_REPEAT_FILL = 77
168
+ ICON_SHUFFLE_FILL = 78
169
+ ICON_EMPTYBOX_SMALL = 79
170
+ ICON_BOX = 80
171
+ ICON_BOX_TOP = 81
172
+ ICON_BOX_TOP_RIGHT = 82
173
+ ICON_BOX_RIGHT = 83
174
+ ICON_BOX_BOTTOM_RIGHT = 84
175
+ ICON_BOX_BOTTOM = 85
176
+ ICON_BOX_BOTTOM_LEFT = 86
177
+ ICON_BOX_LEFT = 87
178
+ ICON_BOX_TOP_LEFT = 88
179
+ ICON_BOX_CENTER = 89
180
+ ICON_BOX_CIRCLE_MASK = 90
181
+ ICON_POT = 91
182
+ ICON_ALPHA_MULTIPLY = 92
183
+ ICON_ALPHA_CLEAR = 93
184
+ ICON_DITHERING = 94
185
+ ICON_MIPMAPS = 95
186
+ ICON_BOX_GRID = 96
187
+ ICON_GRID = 97
188
+ ICON_BOX_CORNERS_SMALL = 98
189
+ ICON_BOX_CORNERS_BIG = 99
190
+ ICON_FOUR_BOXES = 100
191
+ ICON_GRID_FILL = 101
192
+ ICON_BOX_MULTISIZE = 102
193
+ ICON_ZOOM_SMALL = 103
194
+ ICON_ZOOM_MEDIUM = 104
195
+ ICON_ZOOM_BIG = 105
196
+ ICON_ZOOM_ALL = 106
197
+ ICON_ZOOM_CENTER = 107
198
+ ICON_BOX_DOTS_SMALL = 108
199
+ ICON_BOX_DOTS_BIG = 109
200
+ ICON_BOX_CONCENTRIC = 110
201
+ ICON_BOX_GRID_BIG = 111
202
+ ICON_OK_TICK = 112
203
+ ICON_CROSS = 113
204
+ ICON_ARROW_LEFT = 114
205
+ ICON_ARROW_RIGHT = 115
206
+ ICON_ARROW_DOWN = 116
207
+ ICON_ARROW_UP = 117
208
+ ICON_ARROW_LEFT_FILL = 118
209
+ ICON_ARROW_RIGHT_FILL = 119
210
+ ICON_ARROW_DOWN_FILL = 120
211
+ ICON_ARROW_UP_FILL = 121
212
+ ICON_AUDIO = 122
213
+ ICON_FX = 123
214
+ ICON_WAVE = 124
215
+ ICON_WAVE_SINUS = 125
216
+ ICON_WAVE_SQUARE = 126
217
+ ICON_WAVE_TRIANGULAR = 127
218
+ ICON_CROSS_SMALL = 128
219
+ ICON_PLAYER_PREVIOUS = 129
220
+ ICON_PLAYER_PLAY_BACK = 130
221
+ ICON_PLAYER_PLAY = 131
222
+ ICON_PLAYER_PAUSE = 132
223
+ ICON_PLAYER_STOP = 133
224
+ ICON_PLAYER_NEXT = 134
225
+ ICON_PLAYER_RECORD = 135
226
+ ICON_MAGNET = 136
227
+ ICON_LOCK_CLOSE = 137
228
+ ICON_LOCK_OPEN = 138
229
+ ICON_CLOCK = 139
230
+ ICON_TOOLS = 140
231
+ ICON_GEAR = 141
232
+ ICON_GEAR_BIG = 142
233
+ ICON_BIN = 143
234
+ ICON_HAND_POINTER = 144
235
+ ICON_LASER = 145
236
+ ICON_COIN = 146
237
+ ICON_EXPLOSION = 147
238
+ ICON_1UP = 148
239
+ ICON_PLAYER = 149
240
+ ICON_PLAYER_JUMP = 150
241
+ ICON_KEY = 151
242
+ ICON_DEMON = 152
243
+ ICON_TEXT_POPUP = 153
244
+ ICON_GEAR_EX = 154
245
+ ICON_CRACK = 155
246
+ ICON_CRACK_POINTS = 156
247
+ ICON_STAR = 157
248
+ ICON_DOOR = 158
249
+ ICON_EXIT = 159
250
+ ICON_MODE_2D = 160
251
+ ICON_MODE_3D = 161
252
+ ICON_CUBE = 162
253
+ ICON_CUBE_FACE_TOP = 163
254
+ ICON_CUBE_FACE_LEFT = 164
255
+ ICON_CUBE_FACE_FRONT = 165
256
+ ICON_CUBE_FACE_BOTTOM = 166
257
+ ICON_CUBE_FACE_RIGHT = 167
258
+ ICON_CUBE_FACE_BACK = 168
259
+ ICON_CAMERA = 169
260
+ ICON_SPECIAL = 170
261
+ ICON_LINK_NET = 171
262
+ ICON_LINK_BOXES = 172
263
+ ICON_LINK_MULTI = 173
264
+ ICON_LINK = 174
265
+ ICON_LINK_BROKE = 175
266
+ ICON_TEXT_NOTES = 176
267
+ ICON_NOTEBOOK = 177
268
+ ICON_SUITCASE = 178
269
+ ICON_SUITCASE_ZIP = 179
270
+ ICON_MAILBOX = 180
271
+ ICON_MONITOR = 181
272
+ ICON_PRINTER = 182
273
+ ICON_PHOTO_CAMERA = 183
274
+ ICON_PHOTO_CAMERA_FLASH = 184
275
+ ICON_HOUSE = 185
276
+ ICON_HEART = 186
277
+ ICON_CORNER = 187
278
+ ICON_VERTICAL_BARS = 188
279
+ ICON_VERTICAL_BARS_FILL = 189
280
+ ICON_LIFE_BARS = 190
281
+ ICON_INFO = 191
282
+ ICON_CROSSLINE = 192
283
+ ICON_HELP = 193
284
+ ICON_FILETYPE_ALPHA = 194
285
+ ICON_FILETYPE_HOME = 195
286
+ ICON_LAYERS_VISIBLE = 196
287
+ ICON_LAYERS = 197
288
+ ICON_WINDOW = 198
289
+ ICON_HIDPI = 199
290
+ ICON_FILETYPE_BINARY = 200
291
+ ICON_HEX = 201
292
+ ICON_SHIELD = 202
293
+ ICON_FILE_NEW = 203
294
+ ICON_FOLDER_ADD = 204
295
+ ICON_ALARM = 205
296
+ ICON_CPU = 206
297
+ ICON_ROM = 207
298
+ ICON_STEP_OVER = 208
299
+ ICON_STEP_INTO = 209
300
+ ICON_STEP_OUT = 210
301
+ ICON_RESTART = 211
302
+ ICON_BREAKPOINT_ON = 212
303
+ ICON_BREAKPOINT_OFF = 213
304
+ ICON_BURGER_MENU = 214
305
+ ICON_CASE_SENSITIVE = 215
306
+ ICON_REG_EXP = 216
307
+ ICON_217 = 217
308
+ ICON_218 = 218
309
+ ICON_219 = 219
310
+ ICON_220 = 220
311
+ ICON_221 = 221
312
+ ICON_222 = 222
313
+ ICON_223 = 223
314
+ ICON_224 = 224
315
+ ICON_225 = 225
316
+ ICON_226 = 226
317
+ ICON_227 = 227
318
+ ICON_228 = 228
319
+ ICON_229 = 229
320
+ ICON_230 = 230
321
+ ICON_231 = 231
322
+ ICON_232 = 232
323
+ ICON_233 = 233
324
+ ICON_234 = 234
325
+ ICON_235 = 235
326
+ ICON_236 = 236
327
+ ICON_237 = 237
328
+ ICON_238 = 238
329
+ ICON_239 = 239
330
+ ICON_240 = 240
331
+ ICON_241 = 241
332
+ ICON_242 = 242
333
+ ICON_243 = 243
334
+ ICON_244 = 244
335
+ ICON_245 = 245
336
+ ICON_246 = 246
337
+ ICON_247 = 247
338
+ ICON_248 = 248
339
+ ICON_249 = 249
340
+ ICON_250 = 250
341
+ ICON_251 = 251
342
+ ICON_252 = 252
343
+ ICON_253 = 253
344
+ ICON_254 = 254
345
+ ICON_255 = 255
346
+
347
+ # Typedef
348
+
349
+ typedef :int, :GuiState
350
+ typedef :int, :GuiTextAlignment
351
+ typedef :int, :GuiControl
352
+ typedef :int, :GuiControlProperty
353
+ typedef :int, :GuiDefaultProperty
354
+ typedef :int, :GuiToggleProperty
355
+ typedef :int, :GuiSliderProperty
356
+ typedef :int, :GuiProgressBarProperty
357
+ typedef :int, :GuiScrollBarProperty
358
+ typedef :int, :GuiCheckBoxProperty
359
+ typedef :int, :GuiComboBoxProperty
360
+ typedef :int, :GuiDropdownBoxProperty
361
+ typedef :int, :GuiTextBoxProperty
362
+ typedef :int, :GuiSpinnerProperty
363
+ typedef :int, :GuiListViewProperty
364
+ typedef :int, :GuiColorPickerProperty
365
+ typedef :int, :GuiIconName
366
+
367
+ # Struct
368
+
369
+ class GuiStyleProp < FFI::Struct
370
+ layout(
371
+ :controlId, :ushort,
372
+ :propertyId, :ushort,
373
+ :propertyValue, :uint,
374
+ )
375
+ end
376
+
377
+
378
+ # Function
379
+
380
+ def self.setup_raygui_symbols()
381
+ symbols = [
382
+ :GuiEnable,
383
+ :GuiDisable,
384
+ :GuiLock,
385
+ :GuiUnlock,
386
+ :GuiIsLocked,
387
+ :GuiFade,
388
+ :GuiSetState,
389
+ :GuiGetState,
390
+ :GuiSetFont,
391
+ :GuiGetFont,
392
+ :GuiSetStyle,
393
+ :GuiGetStyle,
394
+ :GuiWindowBox,
395
+ :GuiGroupBox,
396
+ :GuiLine,
397
+ :GuiPanel,
398
+ :GuiTabBar,
399
+ :GuiScrollPanel,
400
+ :GuiLabel,
401
+ :GuiButton,
402
+ :GuiLabelButton,
403
+ :GuiToggle,
404
+ :GuiToggleGroup,
405
+ :GuiCheckBox,
406
+ :GuiComboBox,
407
+ :GuiDropdownBox,
408
+ :GuiSpinner,
409
+ :GuiValueBox,
410
+ :GuiTextBox,
411
+ :GuiTextBoxMulti,
412
+ :GuiSlider,
413
+ :GuiSliderBar,
414
+ :GuiProgressBar,
415
+ :GuiStatusBar,
416
+ :GuiDummyRec,
417
+ :GuiGrid,
418
+ :GuiListView,
419
+ :GuiListViewEx,
420
+ :GuiMessageBox,
421
+ :GuiTextInputBox,
422
+ :GuiColorPicker,
423
+ :GuiColorPanel,
424
+ :GuiColorBarAlpha,
425
+ :GuiColorBarHue,
426
+ :GuiLoadStyle,
427
+ :GuiLoadStyleDefault,
428
+ :GuiIconText,
429
+ :GuiGetIcons,
430
+ :GuiLoadIcons,
431
+ :GuiDrawIcon,
432
+ ]
433
+ args = {
434
+ :GuiEnable => [],
435
+ :GuiDisable => [],
436
+ :GuiLock => [],
437
+ :GuiUnlock => [],
438
+ :GuiIsLocked => [],
439
+ :GuiFade => [:float],
440
+ :GuiSetState => [:int],
441
+ :GuiGetState => [],
442
+ :GuiSetFont => [Font.by_value],
443
+ :GuiGetFont => [],
444
+ :GuiSetStyle => [:int, :int, :int],
445
+ :GuiGetStyle => [:int, :int],
446
+ :GuiWindowBox => [Rectangle.by_value, :pointer],
447
+ :GuiGroupBox => [Rectangle.by_value, :pointer],
448
+ :GuiLine => [Rectangle.by_value, :pointer],
449
+ :GuiPanel => [Rectangle.by_value, :pointer],
450
+ :GuiTabBar => [Rectangle.by_value, :pointer, :int, :pointer],
451
+ :GuiScrollPanel => [Rectangle.by_value, :pointer, Rectangle.by_value, :pointer],
452
+ :GuiLabel => [Rectangle.by_value, :pointer],
453
+ :GuiButton => [Rectangle.by_value, :pointer],
454
+ :GuiLabelButton => [Rectangle.by_value, :pointer],
455
+ :GuiToggle => [Rectangle.by_value, :pointer, :bool],
456
+ :GuiToggleGroup => [Rectangle.by_value, :pointer, :int],
457
+ :GuiCheckBox => [Rectangle.by_value, :pointer, :bool],
458
+ :GuiComboBox => [Rectangle.by_value, :pointer, :int],
459
+ :GuiDropdownBox => [Rectangle.by_value, :pointer, :pointer, :bool],
460
+ :GuiSpinner => [Rectangle.by_value, :pointer, :pointer, :int, :int, :bool],
461
+ :GuiValueBox => [Rectangle.by_value, :pointer, :pointer, :int, :int, :bool],
462
+ :GuiTextBox => [Rectangle.by_value, :pointer, :int, :bool],
463
+ :GuiTextBoxMulti => [Rectangle.by_value, :pointer, :int, :bool],
464
+ :GuiSlider => [Rectangle.by_value, :pointer, :pointer, :float, :float, :float],
465
+ :GuiSliderBar => [Rectangle.by_value, :pointer, :pointer, :float, :float, :float],
466
+ :GuiProgressBar => [Rectangle.by_value, :pointer, :pointer, :float, :float, :float],
467
+ :GuiStatusBar => [Rectangle.by_value, :pointer],
468
+ :GuiDummyRec => [Rectangle.by_value, :pointer],
469
+ :GuiGrid => [Rectangle.by_value, :pointer, :float, :int],
470
+ :GuiListView => [Rectangle.by_value, :pointer, :pointer, :int],
471
+ :GuiListViewEx => [Rectangle.by_value, :pointer, :int, :pointer, :pointer, :int],
472
+ :GuiMessageBox => [Rectangle.by_value, :pointer, :pointer, :pointer],
473
+ :GuiTextInputBox => [Rectangle.by_value, :pointer, :pointer, :pointer, :pointer, :int, :pointer],
474
+ :GuiColorPicker => [Rectangle.by_value, :pointer, Color.by_value],
475
+ :GuiColorPanel => [Rectangle.by_value, :pointer, Color.by_value],
476
+ :GuiColorBarAlpha => [Rectangle.by_value, :pointer, :float],
477
+ :GuiColorBarHue => [Rectangle.by_value, :pointer, :float],
478
+ :GuiLoadStyle => [:pointer],
479
+ :GuiLoadStyleDefault => [],
480
+ :GuiIconText => [:int, :pointer],
481
+ :GuiGetIcons => [],
482
+ :GuiLoadIcons => [:pointer, :bool],
483
+ :GuiDrawIcon => [:int, :int, :int, :int, Color.by_value],
484
+ }
485
+ retvals = {
486
+ :GuiEnable => :void,
487
+ :GuiDisable => :void,
488
+ :GuiLock => :void,
489
+ :GuiUnlock => :void,
490
+ :GuiIsLocked => :bool,
491
+ :GuiFade => :void,
492
+ :GuiSetState => :void,
493
+ :GuiGetState => :int,
494
+ :GuiSetFont => :void,
495
+ :GuiGetFont => Font.by_value,
496
+ :GuiSetStyle => :void,
497
+ :GuiGetStyle => :int,
498
+ :GuiWindowBox => :bool,
499
+ :GuiGroupBox => :void,
500
+ :GuiLine => :void,
501
+ :GuiPanel => :void,
502
+ :GuiTabBar => :int,
503
+ :GuiScrollPanel => Rectangle.by_value,
504
+ :GuiLabel => :void,
505
+ :GuiButton => :bool,
506
+ :GuiLabelButton => :bool,
507
+ :GuiToggle => :bool,
508
+ :GuiToggleGroup => :int,
509
+ :GuiCheckBox => :bool,
510
+ :GuiComboBox => :int,
511
+ :GuiDropdownBox => :bool,
512
+ :GuiSpinner => :bool,
513
+ :GuiValueBox => :bool,
514
+ :GuiTextBox => :bool,
515
+ :GuiTextBoxMulti => :bool,
516
+ :GuiSlider => :float,
517
+ :GuiSliderBar => :float,
518
+ :GuiProgressBar => :float,
519
+ :GuiStatusBar => :void,
520
+ :GuiDummyRec => :void,
521
+ :GuiGrid => Vector2.by_value,
522
+ :GuiListView => :int,
523
+ :GuiListViewEx => :int,
524
+ :GuiMessageBox => :int,
525
+ :GuiTextInputBox => :int,
526
+ :GuiColorPicker => Color.by_value,
527
+ :GuiColorPanel => Color.by_value,
528
+ :GuiColorBarAlpha => :float,
529
+ :GuiColorBarHue => :float,
530
+ :GuiLoadStyle => :void,
531
+ :GuiLoadStyleDefault => :void,
532
+ :GuiIconText => :pointer,
533
+ :GuiGetIcons => :pointer,
534
+ :GuiLoadIcons => :pointer,
535
+ :GuiDrawIcon => :void,
536
+ }
537
+ symbols.each do |sym|
538
+ begin
539
+ attach_function sym, args[sym], retvals[sym]
540
+ rescue FFI::NotFoundError => error
541
+ $stderr.puts("[Warning] Failed to import #{sym} (#{error}).")
542
+ end
543
+ end
544
+ end
545
+
546
+ end
547
+