raylib-bindings 0.2.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/raygui.rb CHANGED
@@ -1,790 +1,801 @@
1
- # Yet another raylib wrapper for Ruby
2
- #
3
- # * https://github.com/vaiorabbit/raylib-bindings
4
- #
5
- # [NOTICE] Autogenerated. Do not edit.
6
-
7
- require 'ffi'
8
-
9
- module Raylib
10
- extend FFI::Library
11
-
12
- # Define/Macro
13
-
14
- RAYGUI_VERSION = "3.2"
15
- SCROLLBAR_LEFT_SIDE = 0
16
- SCROLLBAR_RIGHT_SIDE = 1
17
-
18
- # Enum
19
-
20
- # enum GuiState
21
- # Gui control state
22
- STATE_NORMAL = 0
23
- STATE_FOCUSED = 1
24
- STATE_PRESSED = 2
25
- STATE_DISABLED = 3
26
-
27
- # enum GuiTextAlignment
28
- # Gui control text alignment
29
- TEXT_ALIGN_LEFT = 0
30
- TEXT_ALIGN_CENTER = 1
31
- TEXT_ALIGN_RIGHT = 2
32
-
33
- # enum GuiControl
34
- # Gui controls
35
- DEFAULT = 0
36
- LABEL = 1 # Used also for: LABELBUTTON
37
- BUTTON = 2
38
- TOGGLE = 3 # Used also for: TOGGLEGROUP
39
- SLIDER = 4 # Used also for: SLIDERBAR
40
- PROGRESSBAR = 5
41
- CHECKBOX = 6
42
- COMBOBOX = 7
43
- DROPDOWNBOX = 8
44
- TEXTBOX = 9 # Used also for: TEXTBOXMULTI
45
- VALUEBOX = 10
46
- SPINNER = 11 # Uses: BUTTON, VALUEBOX
47
- LISTVIEW = 12
48
- COLORPICKER = 13
49
- SCROLLBAR = 14
50
- STATUSBAR = 15
51
-
52
- # enum GuiControlProperty
53
- # Gui base properties for every control
54
- BORDER_COLOR_NORMAL = 0
55
- BASE_COLOR_NORMAL = 1
56
- TEXT_COLOR_NORMAL = 2
57
- BORDER_COLOR_FOCUSED = 3
58
- BASE_COLOR_FOCUSED = 4
59
- TEXT_COLOR_FOCUSED = 5
60
- BORDER_COLOR_PRESSED = 6
61
- BASE_COLOR_PRESSED = 7
62
- TEXT_COLOR_PRESSED = 8
63
- BORDER_COLOR_DISABLED = 9
64
- BASE_COLOR_DISABLED = 10
65
- TEXT_COLOR_DISABLED = 11
66
- BORDER_WIDTH = 12
67
- TEXT_PADDING = 13
68
- TEXT_ALIGNMENT = 14
69
- RESERVED = 15
70
-
71
- # enum GuiDefaultProperty
72
- # DEFAULT extended properties
73
- TEXT_SIZE = 16 # Text size (glyphs max height)
74
- TEXT_SPACING = 17 # Text spacing between glyphs
75
- LINE_COLOR = 18 # Line control color
76
- BACKGROUND_COLOR = 19 # Background color
77
-
78
- # enum GuiToggleProperty
79
- # Toggle/ToggleGroup
80
- GROUP_PADDING = 16 # ToggleGroup separation between toggles
81
-
82
- # enum GuiSliderProperty
83
- # Slider/SliderBar
84
- SLIDER_WIDTH = 16 # Slider size of internal bar
85
- SLIDER_PADDING = 17 # Slider/SliderBar internal bar padding
86
-
87
- # enum GuiProgressBarProperty
88
- # ProgressBar
89
- PROGRESS_PADDING = 16 # ProgressBar internal padding
90
-
91
- # enum GuiScrollBarProperty
92
- # ScrollBar
93
- ARROWS_SIZE = 16
94
- ARROWS_VISIBLE = 17
95
- SCROLL_SLIDER_PADDING = 18 # (SLIDERBAR, SLIDER_PADDING)
96
- SCROLL_SLIDER_SIZE = 19
97
- SCROLL_PADDING = 20
98
- SCROLL_SPEED = 21
99
-
100
- # enum GuiCheckBoxProperty
101
- # CheckBox
102
- CHECK_PADDING = 16 # CheckBox internal check padding
103
-
104
- # enum GuiComboBoxProperty
105
- # ComboBox
106
- COMBO_BUTTON_WIDTH = 16 # ComboBox right button width
107
- COMBO_BUTTON_SPACING = 17 # ComboBox button separation
108
-
109
- # enum GuiDropdownBoxProperty
110
- # DropdownBox
111
- ARROW_PADDING = 16 # DropdownBox arrow separation from border and items
112
- DROPDOWN_ITEMS_SPACING = 17 # DropdownBox items separation
113
-
114
- # enum GuiTextBoxProperty
115
- # TextBox/TextBoxMulti/ValueBox/Spinner
116
- TEXT_INNER_PADDING = 16 # TextBox/TextBoxMulti/ValueBox/Spinner inner text padding
117
- TEXT_LINES_SPACING = 17 # TextBoxMulti lines separation
118
-
119
- # enum GuiSpinnerProperty
120
- # Spinner
121
- SPIN_BUTTON_WIDTH = 16 # Spinner left/right buttons width
122
- SPIN_BUTTON_SPACING = 17 # Spinner buttons separation
123
-
124
- # enum GuiListViewProperty
125
- # ListView
126
- LIST_ITEMS_HEIGHT = 16 # ListView items height
127
- LIST_ITEMS_SPACING = 17 # ListView items separation
128
- SCROLLBAR_WIDTH = 18 # ListView scrollbar size (usually width)
129
- SCROLLBAR_SIDE = 19 # ListView scrollbar side (0-left, 1-right)
130
-
131
- # enum GuiColorPickerProperty
132
- # ColorPicker
133
- COLOR_SELECTOR_SIZE = 16
134
- HUEBAR_WIDTH = 17 # ColorPicker right hue bar width
135
- HUEBAR_PADDING = 18 # ColorPicker right hue bar separation from panel
136
- HUEBAR_SELECTOR_HEIGHT = 19 # ColorPicker right hue bar selector height
137
- HUEBAR_SELECTOR_OVERFLOW = 20 # ColorPicker right hue bar selector overflow
138
-
139
- # enum GuiIconName
140
- #
141
- ICON_NONE = 0
142
- ICON_FOLDER_FILE_OPEN = 1
143
- ICON_FILE_SAVE_CLASSIC = 2
144
- ICON_FOLDER_OPEN = 3
145
- ICON_FOLDER_SAVE = 4
146
- ICON_FILE_OPEN = 5
147
- ICON_FILE_SAVE = 6
148
- ICON_FILE_EXPORT = 7
149
- ICON_FILE_ADD = 8
150
- ICON_FILE_DELETE = 9
151
- ICON_FILETYPE_TEXT = 10
152
- ICON_FILETYPE_AUDIO = 11
153
- ICON_FILETYPE_IMAGE = 12
154
- ICON_FILETYPE_PLAY = 13
155
- ICON_FILETYPE_VIDEO = 14
156
- ICON_FILETYPE_INFO = 15
157
- ICON_FILE_COPY = 16
158
- ICON_FILE_CUT = 17
159
- ICON_FILE_PASTE = 18
160
- ICON_CURSOR_HAND = 19
161
- ICON_CURSOR_POINTER = 20
162
- ICON_CURSOR_CLASSIC = 21
163
- ICON_PENCIL = 22
164
- ICON_PENCIL_BIG = 23
165
- ICON_BRUSH_CLASSIC = 24
166
- ICON_BRUSH_PAINTER = 25
167
- ICON_WATER_DROP = 26
168
- ICON_COLOR_PICKER = 27
169
- ICON_RUBBER = 28
170
- ICON_COLOR_BUCKET = 29
171
- ICON_TEXT_T = 30
172
- ICON_TEXT_A = 31
173
- ICON_SCALE = 32
174
- ICON_RESIZE = 33
175
- ICON_FILTER_POINT = 34
176
- ICON_FILTER_BILINEAR = 35
177
- ICON_CROP = 36
178
- ICON_CROP_ALPHA = 37
179
- ICON_SQUARE_TOGGLE = 38
180
- ICON_SYMMETRY = 39
181
- ICON_SYMMETRY_HORIZONTAL = 40
182
- ICON_SYMMETRY_VERTICAL = 41
183
- ICON_LENS = 42
184
- ICON_LENS_BIG = 43
185
- ICON_EYE_ON = 44
186
- ICON_EYE_OFF = 45
187
- ICON_FILTER_TOP = 46
188
- ICON_FILTER = 47
189
- ICON_TARGET_POINT = 48
190
- ICON_TARGET_SMALL = 49
191
- ICON_TARGET_BIG = 50
192
- ICON_TARGET_MOVE = 51
193
- ICON_CURSOR_MOVE = 52
194
- ICON_CURSOR_SCALE = 53
195
- ICON_CURSOR_SCALE_RIGHT = 54
196
- ICON_CURSOR_SCALE_LEFT = 55
197
- ICON_UNDO = 56
198
- ICON_REDO = 57
199
- ICON_REREDO = 58
200
- ICON_MUTATE = 59
201
- ICON_ROTATE = 60
202
- ICON_REPEAT = 61
203
- ICON_SHUFFLE = 62
204
- ICON_EMPTYBOX = 63
205
- ICON_TARGET = 64
206
- ICON_TARGET_SMALL_FILL = 65
207
- ICON_TARGET_BIG_FILL = 66
208
- ICON_TARGET_MOVE_FILL = 67
209
- ICON_CURSOR_MOVE_FILL = 68
210
- ICON_CURSOR_SCALE_FILL = 69
211
- ICON_CURSOR_SCALE_RIGHT_FILL = 70
212
- ICON_CURSOR_SCALE_LEFT_FILL = 71
213
- ICON_UNDO_FILL = 72
214
- ICON_REDO_FILL = 73
215
- ICON_REREDO_FILL = 74
216
- ICON_MUTATE_FILL = 75
217
- ICON_ROTATE_FILL = 76
218
- ICON_REPEAT_FILL = 77
219
- ICON_SHUFFLE_FILL = 78
220
- ICON_EMPTYBOX_SMALL = 79
221
- ICON_BOX = 80
222
- ICON_BOX_TOP = 81
223
- ICON_BOX_TOP_RIGHT = 82
224
- ICON_BOX_RIGHT = 83
225
- ICON_BOX_BOTTOM_RIGHT = 84
226
- ICON_BOX_BOTTOM = 85
227
- ICON_BOX_BOTTOM_LEFT = 86
228
- ICON_BOX_LEFT = 87
229
- ICON_BOX_TOP_LEFT = 88
230
- ICON_BOX_CENTER = 89
231
- ICON_BOX_CIRCLE_MASK = 90
232
- ICON_POT = 91
233
- ICON_ALPHA_MULTIPLY = 92
234
- ICON_ALPHA_CLEAR = 93
235
- ICON_DITHERING = 94
236
- ICON_MIPMAPS = 95
237
- ICON_BOX_GRID = 96
238
- ICON_GRID = 97
239
- ICON_BOX_CORNERS_SMALL = 98
240
- ICON_BOX_CORNERS_BIG = 99
241
- ICON_FOUR_BOXES = 100
242
- ICON_GRID_FILL = 101
243
- ICON_BOX_MULTISIZE = 102
244
- ICON_ZOOM_SMALL = 103
245
- ICON_ZOOM_MEDIUM = 104
246
- ICON_ZOOM_BIG = 105
247
- ICON_ZOOM_ALL = 106
248
- ICON_ZOOM_CENTER = 107
249
- ICON_BOX_DOTS_SMALL = 108
250
- ICON_BOX_DOTS_BIG = 109
251
- ICON_BOX_CONCENTRIC = 110
252
- ICON_BOX_GRID_BIG = 111
253
- ICON_OK_TICK = 112
254
- ICON_CROSS = 113
255
- ICON_ARROW_LEFT = 114
256
- ICON_ARROW_RIGHT = 115
257
- ICON_ARROW_DOWN = 116
258
- ICON_ARROW_UP = 117
259
- ICON_ARROW_LEFT_FILL = 118
260
- ICON_ARROW_RIGHT_FILL = 119
261
- ICON_ARROW_DOWN_FILL = 120
262
- ICON_ARROW_UP_FILL = 121
263
- ICON_AUDIO = 122
264
- ICON_FX = 123
265
- ICON_WAVE = 124
266
- ICON_WAVE_SINUS = 125
267
- ICON_WAVE_SQUARE = 126
268
- ICON_WAVE_TRIANGULAR = 127
269
- ICON_CROSS_SMALL = 128
270
- ICON_PLAYER_PREVIOUS = 129
271
- ICON_PLAYER_PLAY_BACK = 130
272
- ICON_PLAYER_PLAY = 131
273
- ICON_PLAYER_PAUSE = 132
274
- ICON_PLAYER_STOP = 133
275
- ICON_PLAYER_NEXT = 134
276
- ICON_PLAYER_RECORD = 135
277
- ICON_MAGNET = 136
278
- ICON_LOCK_CLOSE = 137
279
- ICON_LOCK_OPEN = 138
280
- ICON_CLOCK = 139
281
- ICON_TOOLS = 140
282
- ICON_GEAR = 141
283
- ICON_GEAR_BIG = 142
284
- ICON_BIN = 143
285
- ICON_HAND_POINTER = 144
286
- ICON_LASER = 145
287
- ICON_COIN = 146
288
- ICON_EXPLOSION = 147
289
- ICON_1UP = 148
290
- ICON_PLAYER = 149
291
- ICON_PLAYER_JUMP = 150
292
- ICON_KEY = 151
293
- ICON_DEMON = 152
294
- ICON_TEXT_POPUP = 153
295
- ICON_GEAR_EX = 154
296
- ICON_CRACK = 155
297
- ICON_CRACK_POINTS = 156
298
- ICON_STAR = 157
299
- ICON_DOOR = 158
300
- ICON_EXIT = 159
301
- ICON_MODE_2D = 160
302
- ICON_MODE_3D = 161
303
- ICON_CUBE = 162
304
- ICON_CUBE_FACE_TOP = 163
305
- ICON_CUBE_FACE_LEFT = 164
306
- ICON_CUBE_FACE_FRONT = 165
307
- ICON_CUBE_FACE_BOTTOM = 166
308
- ICON_CUBE_FACE_RIGHT = 167
309
- ICON_CUBE_FACE_BACK = 168
310
- ICON_CAMERA = 169
311
- ICON_SPECIAL = 170
312
- ICON_LINK_NET = 171
313
- ICON_LINK_BOXES = 172
314
- ICON_LINK_MULTI = 173
315
- ICON_LINK = 174
316
- ICON_LINK_BROKE = 175
317
- ICON_TEXT_NOTES = 176
318
- ICON_NOTEBOOK = 177
319
- ICON_SUITCASE = 178
320
- ICON_SUITCASE_ZIP = 179
321
- ICON_MAILBOX = 180
322
- ICON_MONITOR = 181
323
- ICON_PRINTER = 182
324
- ICON_PHOTO_CAMERA = 183
325
- ICON_PHOTO_CAMERA_FLASH = 184
326
- ICON_HOUSE = 185
327
- ICON_HEART = 186
328
- ICON_CORNER = 187
329
- ICON_VERTICAL_BARS = 188
330
- ICON_VERTICAL_BARS_FILL = 189
331
- ICON_LIFE_BARS = 190
332
- ICON_INFO = 191
333
- ICON_CROSSLINE = 192
334
- ICON_HELP = 193
335
- ICON_FILETYPE_ALPHA = 194
336
- ICON_FILETYPE_HOME = 195
337
- ICON_LAYERS_VISIBLE = 196
338
- ICON_LAYERS = 197
339
- ICON_WINDOW = 198
340
- ICON_HIDPI = 199
341
- ICON_FILETYPE_BINARY = 200
342
- ICON_HEX = 201
343
- ICON_SHIELD = 202
344
- ICON_FILE_NEW = 203
345
- ICON_FOLDER_ADD = 204
346
- ICON_ALARM = 205
347
- ICON_CPU = 206
348
- ICON_ROM = 207
349
- ICON_STEP_OVER = 208
350
- ICON_STEP_INTO = 209
351
- ICON_STEP_OUT = 210
352
- ICON_RESTART = 211
353
- ICON_BREAKPOINT_ON = 212
354
- ICON_BREAKPOINT_OFF = 213
355
- ICON_BURGER_MENU = 214
356
- ICON_CASE_SENSITIVE = 215
357
- ICON_REG_EXP = 216
358
- ICON_FOLDER = 217
359
- ICON_FILE = 218
360
- ICON_219 = 219
361
- ICON_220 = 220
362
- ICON_221 = 221
363
- ICON_222 = 222
364
- ICON_223 = 223
365
- ICON_224 = 224
366
- ICON_225 = 225
367
- ICON_226 = 226
368
- ICON_227 = 227
369
- ICON_228 = 228
370
- ICON_229 = 229
371
- ICON_230 = 230
372
- ICON_231 = 231
373
- ICON_232 = 232
374
- ICON_233 = 233
375
- ICON_234 = 234
376
- ICON_235 = 235
377
- ICON_236 = 236
378
- ICON_237 = 237
379
- ICON_238 = 238
380
- ICON_239 = 239
381
- ICON_240 = 240
382
- ICON_241 = 241
383
- ICON_242 = 242
384
- ICON_243 = 243
385
- ICON_244 = 244
386
- ICON_245 = 245
387
- ICON_246 = 246
388
- ICON_247 = 247
389
- ICON_248 = 248
390
- ICON_249 = 249
391
- ICON_250 = 250
392
- ICON_251 = 251
393
- ICON_252 = 252
394
- ICON_253 = 253
395
- ICON_254 = 254
396
- ICON_255 = 255
397
-
398
-
399
- # Typedef
400
-
401
- typedef :int, :GuiState
402
- typedef :int, :GuiTextAlignment
403
- typedef :int, :GuiControl
404
- typedef :int, :GuiControlProperty
405
- typedef :int, :GuiDefaultProperty
406
- typedef :int, :GuiToggleProperty
407
- typedef :int, :GuiSliderProperty
408
- typedef :int, :GuiProgressBarProperty
409
- typedef :int, :GuiScrollBarProperty
410
- typedef :int, :GuiCheckBoxProperty
411
- typedef :int, :GuiComboBoxProperty
412
- typedef :int, :GuiDropdownBoxProperty
413
- typedef :int, :GuiTextBoxProperty
414
- typedef :int, :GuiSpinnerProperty
415
- typedef :int, :GuiListViewProperty
416
- typedef :int, :GuiColorPickerProperty
417
- typedef :int, :GuiIconName
418
-
419
- # Struct
420
-
421
- # Style property
422
- class GuiStyleProp < FFI::Struct
423
- layout(
424
- :controlId, :ushort,
425
- :propertyId, :ushort,
426
- :propertyValue, :uint,
427
- )
428
- end
429
-
430
-
431
- # Function
432
-
433
- def self.setup_raygui_symbols
434
- entries = [
435
-
436
- # GuiEnable : Enable gui controls (global state)
437
- # @return [void]
438
- [:GuiEnable, :GuiEnable, [], :void],
439
-
440
- # GuiDisable : Disable gui controls (global state)
441
- # @return [void]
442
- [:GuiDisable, :GuiDisable, [], :void],
443
-
444
- # GuiLock : Lock gui controls (global state)
445
- # @return [void]
446
- [:GuiLock, :GuiLock, [], :void],
447
-
448
- # GuiUnlock : Unlock gui controls (global state)
449
- # @return [void]
450
- [:GuiUnlock, :GuiUnlock, [], :void],
451
-
452
- # GuiIsLocked : Check if gui is locked (global state)
453
- # @return [bool]
454
- [:GuiIsLocked, :GuiIsLocked, [], :bool],
455
-
456
- # GuiFade : Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
457
- # @param alpha [float]
458
- # @return [void]
459
- [:GuiFade, :GuiFade, [:float], :void],
460
-
461
- # GuiSetState : Set gui state (global state)
462
- # @param state [int]
463
- # @return [void]
464
- [:GuiSetState, :GuiSetState, [:int], :void],
465
-
466
- # GuiGetState : Get gui state (global state)
467
- # @return [int]
468
- [:GuiGetState, :GuiGetState, [], :int],
469
-
470
- # GuiSetFont : Set gui custom font (global state)
471
- # @param font [Font]
472
- # @return [void]
473
- [:GuiSetFont, :GuiSetFont, [Font.by_value], :void],
474
-
475
- # GuiGetFont : Get gui custom font (global state)
476
- # @return [Font]
477
- [:GuiGetFont, :GuiGetFont, [], Font.by_value],
478
-
479
- # GuiSetStyle : Set one style property
480
- # @param control [int]
481
- # @param property [int]
482
- # @param value [int]
483
- # @return [void]
484
- [:GuiSetStyle, :GuiSetStyle, [:int, :int, :int], :void],
485
-
486
- # GuiGetStyle : Get one style property
487
- # @param control [int]
488
- # @param property [int]
489
- # @return [int]
490
- [:GuiGetStyle, :GuiGetStyle, [:int, :int], :int],
491
-
492
- # GuiWindowBox : Window Box control, shows a window that can be closed
493
- # @param bounds [Rectangle]
494
- # @param title [const char *]
495
- # @return [bool]
496
- [:GuiWindowBox, :GuiWindowBox, [Rectangle.by_value, :pointer], :bool],
497
-
498
- # GuiGroupBox : Group Box control with text name
499
- # @param bounds [Rectangle]
500
- # @param text [const char *]
501
- # @return [void]
502
- [:GuiGroupBox, :GuiGroupBox, [Rectangle.by_value, :pointer], :void],
503
-
504
- # GuiLine : Line separator control, could contain text
505
- # @param bounds [Rectangle]
506
- # @param text [const char *]
507
- # @return [void]
508
- [:GuiLine, :GuiLine, [Rectangle.by_value, :pointer], :void],
509
-
510
- # GuiPanel : Panel control, useful to group controls
511
- # @param bounds [Rectangle]
512
- # @param text [const char *]
513
- # @return [void]
514
- [:GuiPanel, :GuiPanel, [Rectangle.by_value, :pointer], :void],
515
-
516
- # GuiTabBar : Tab Bar control, returns TAB to be closed or -1
517
- # @param bounds [Rectangle]
518
- # @param text [const char **]
519
- # @param count [int]
520
- # @param active [int *]
521
- # @return [int]
522
- [:GuiTabBar, :GuiTabBar, [Rectangle.by_value, :pointer, :int, :pointer], :int],
523
-
524
- # GuiScrollPanel : Scroll Panel control
525
- # @param bounds [Rectangle]
526
- # @param text [const char *]
527
- # @param content [Rectangle]
528
- # @param scroll [Vector2 *]
529
- # @return [Rectangle]
530
- [:GuiScrollPanel, :GuiScrollPanel, [Rectangle.by_value, :pointer, Rectangle.by_value, :pointer], Rectangle.by_value],
531
-
532
- # GuiLabel : Label control, shows text
533
- # @param bounds [Rectangle]
534
- # @param text [const char *]
535
- # @return [void]
536
- [:GuiLabel, :GuiLabel, [Rectangle.by_value, :pointer], :void],
537
-
538
- # GuiButton : Button control, returns true when clicked
539
- # @param bounds [Rectangle]
540
- # @param text [const char *]
541
- # @return [bool]
542
- [:GuiButton, :GuiButton, [Rectangle.by_value, :pointer], :bool],
543
-
544
- # GuiLabelButton : Label button control, show true when clicked
545
- # @param bounds [Rectangle]
546
- # @param text [const char *]
547
- # @return [bool]
548
- [:GuiLabelButton, :GuiLabelButton, [Rectangle.by_value, :pointer], :bool],
549
-
550
- # GuiToggle : Toggle Button control, returns true when active
551
- # @param bounds [Rectangle]
552
- # @param text [const char *]
553
- # @param active [bool]
554
- # @return [bool]
555
- [:GuiToggle, :GuiToggle, [Rectangle.by_value, :pointer, :bool], :bool],
556
-
557
- # GuiToggleGroup : Toggle Group control, returns active toggle index
558
- # @param bounds [Rectangle]
559
- # @param text [const char *]
560
- # @param active [int]
561
- # @return [int]
562
- [:GuiToggleGroup, :GuiToggleGroup, [Rectangle.by_value, :pointer, :int], :int],
563
-
564
- # GuiCheckBox : Check Box control, returns true when active
565
- # @param bounds [Rectangle]
566
- # @param text [const char *]
567
- # @param checked [bool]
568
- # @return [bool]
569
- [:GuiCheckBox, :GuiCheckBox, [Rectangle.by_value, :pointer, :bool], :bool],
570
-
571
- # GuiComboBox : Combo Box control, returns selected item index
572
- # @param bounds [Rectangle]
573
- # @param text [const char *]
574
- # @param active [int]
575
- # @return [int]
576
- [:GuiComboBox, :GuiComboBox, [Rectangle.by_value, :pointer, :int], :int],
577
-
578
- # GuiDropdownBox : Dropdown Box control, returns selected item
579
- # @param bounds [Rectangle]
580
- # @param text [const char *]
581
- # @param active [int *]
582
- # @param editMode [bool]
583
- # @return [bool]
584
- [:GuiDropdownBox, :GuiDropdownBox, [Rectangle.by_value, :pointer, :pointer, :bool], :bool],
585
-
586
- # GuiSpinner : Spinner control, returns selected value
587
- # @param bounds [Rectangle]
588
- # @param text [const char *]
589
- # @param value [int *]
590
- # @param minValue [int]
591
- # @param maxValue [int]
592
- # @param editMode [bool]
593
- # @return [bool]
594
- [:GuiSpinner, :GuiSpinner, [Rectangle.by_value, :pointer, :pointer, :int, :int, :bool], :bool],
595
-
596
- # GuiValueBox : Value Box control, updates input text with numbers
597
- # @param bounds [Rectangle]
598
- # @param text [const char *]
599
- # @param value [int *]
600
- # @param minValue [int]
601
- # @param maxValue [int]
602
- # @param editMode [bool]
603
- # @return [bool]
604
- [:GuiValueBox, :GuiValueBox, [Rectangle.by_value, :pointer, :pointer, :int, :int, :bool], :bool],
605
-
606
- # GuiTextBox : Text Box control, updates input text
607
- # @param bounds [Rectangle]
608
- # @param text [char *]
609
- # @param textSize [int]
610
- # @param editMode [bool]
611
- # @return [bool]
612
- [:GuiTextBox, :GuiTextBox, [Rectangle.by_value, :pointer, :int, :bool], :bool],
613
-
614
- # GuiTextBoxMulti : Text Box control with multiple lines
615
- # @param bounds [Rectangle]
616
- # @param text [char *]
617
- # @param textSize [int]
618
- # @param editMode [bool]
619
- # @return [bool]
620
- [:GuiTextBoxMulti, :GuiTextBoxMulti, [Rectangle.by_value, :pointer, :int, :bool], :bool],
621
-
622
- # GuiSlider : Slider control, returns selected value
623
- # @param bounds [Rectangle]
624
- # @param textLeft [const char *]
625
- # @param textRight [const char *]
626
- # @param value [float]
627
- # @param minValue [float]
628
- # @param maxValue [float]
629
- # @return [float]
630
- [:GuiSlider, :GuiSlider, [Rectangle.by_value, :pointer, :pointer, :float, :float, :float], :float],
631
-
632
- # GuiSliderBar : Slider Bar control, returns selected value
633
- # @param bounds [Rectangle]
634
- # @param textLeft [const char *]
635
- # @param textRight [const char *]
636
- # @param value [float]
637
- # @param minValue [float]
638
- # @param maxValue [float]
639
- # @return [float]
640
- [:GuiSliderBar, :GuiSliderBar, [Rectangle.by_value, :pointer, :pointer, :float, :float, :float], :float],
641
-
642
- # GuiProgressBar : Progress Bar control, shows current progress value
643
- # @param bounds [Rectangle]
644
- # @param textLeft [const char *]
645
- # @param textRight [const char *]
646
- # @param value [float]
647
- # @param minValue [float]
648
- # @param maxValue [float]
649
- # @return [float]
650
- [:GuiProgressBar, :GuiProgressBar, [Rectangle.by_value, :pointer, :pointer, :float, :float, :float], :float],
651
-
652
- # GuiStatusBar : Status Bar control, shows info text
653
- # @param bounds [Rectangle]
654
- # @param text [const char *]
655
- # @return [void]
656
- [:GuiStatusBar, :GuiStatusBar, [Rectangle.by_value, :pointer], :void],
657
-
658
- # GuiDummyRec : Dummy control for placeholders
659
- # @param bounds [Rectangle]
660
- # @param text [const char *]
661
- # @return [void]
662
- [:GuiDummyRec, :GuiDummyRec, [Rectangle.by_value, :pointer], :void],
663
-
664
- # GuiGrid : Grid control, returns mouse cell position
665
- # @param bounds [Rectangle]
666
- # @param text [const char *]
667
- # @param spacing [float]
668
- # @param subdivs [int]
669
- # @return [Vector2]
670
- [:GuiGrid, :GuiGrid, [Rectangle.by_value, :pointer, :float, :int], Vector2.by_value],
671
-
672
- # GuiListView : List View control, returns selected list item index
673
- # @param bounds [Rectangle]
674
- # @param text [const char *]
675
- # @param scrollIndex [int *]
676
- # @param active [int]
677
- # @return [int]
678
- [:GuiListView, :GuiListView, [Rectangle.by_value, :pointer, :pointer, :int], :int],
679
-
680
- # GuiListViewEx : List View with extended parameters
681
- # @param bounds [Rectangle]
682
- # @param text [const char **]
683
- # @param count [int]
684
- # @param focus [int *]
685
- # @param scrollIndex [int *]
686
- # @param active [int]
687
- # @return [int]
688
- [:GuiListViewEx, :GuiListViewEx, [Rectangle.by_value, :pointer, :int, :pointer, :pointer, :int], :int],
689
-
690
- # GuiMessageBox : Message Box control, displays a message
691
- # @param bounds [Rectangle]
692
- # @param title [const char *]
693
- # @param message [const char *]
694
- # @param buttons [const char *]
695
- # @return [int]
696
- [:GuiMessageBox, :GuiMessageBox, [Rectangle.by_value, :pointer, :pointer, :pointer], :int],
697
-
698
- # GuiTextInputBox : Text Input Box control, ask for text, supports secret
699
- # @param bounds [Rectangle]
700
- # @param title [const char *]
701
- # @param message [const char *]
702
- # @param buttons [const char *]
703
- # @param text [char *]
704
- # @param textMaxSize [int]
705
- # @param secretViewActive [int *]
706
- # @return [int]
707
- [:GuiTextInputBox, :GuiTextInputBox, [Rectangle.by_value, :pointer, :pointer, :pointer, :pointer, :int, :pointer], :int],
708
-
709
- # GuiColorPicker : Color Picker control (multiple color controls)
710
- # @param bounds [Rectangle]
711
- # @param text [const char *]
712
- # @param color [Color]
713
- # @return [Color]
714
- [:GuiColorPicker, :GuiColorPicker, [Rectangle.by_value, :pointer, Color.by_value], Color.by_value],
715
-
716
- # GuiColorPanel : Color Panel control
717
- # @param bounds [Rectangle]
718
- # @param text [const char *]
719
- # @param color [Color]
720
- # @return [Color]
721
- [:GuiColorPanel, :GuiColorPanel, [Rectangle.by_value, :pointer, Color.by_value], Color.by_value],
722
-
723
- # GuiColorBarAlpha : Color Bar Alpha control
724
- # @param bounds [Rectangle]
725
- # @param text [const char *]
726
- # @param alpha [float]
727
- # @return [float]
728
- [:GuiColorBarAlpha, :GuiColorBarAlpha, [Rectangle.by_value, :pointer, :float], :float],
729
-
730
- # GuiColorBarHue : Color Bar Hue control
731
- # @param bounds [Rectangle]
732
- # @param text [const char *]
733
- # @param value [float]
734
- # @return [float]
735
- [:GuiColorBarHue, :GuiColorBarHue, [Rectangle.by_value, :pointer, :float], :float],
736
-
737
- # GuiLoadStyle : Load style file over global style variable (.rgs)
738
- # @param fileName [const char *]
739
- # @return [void]
740
- [:GuiLoadStyle, :GuiLoadStyle, [:pointer], :void],
741
-
742
- # GuiLoadStyleDefault : Load style default over global style
743
- # @return [void]
744
- [:GuiLoadStyleDefault, :GuiLoadStyleDefault, [], :void],
745
-
746
- # GuiEnableTooltip : Enable gui tooltips (global state)
747
- # @return [void]
748
- [:GuiEnableTooltip, :GuiEnableTooltip, [], :void],
749
-
750
- # GuiDisableTooltip : Disable gui tooltips (global state)
751
- # @return [void]
752
- [:GuiDisableTooltip, :GuiDisableTooltip, [], :void],
753
-
754
- # GuiSetTooltip : Set tooltip string
755
- # @param tooltip [const char *]
756
- # @return [void]
757
- [:GuiSetTooltip, :GuiSetTooltip, [:pointer], :void],
758
-
759
- # GuiIconText : Get text with icon id prepended (if supported)
760
- # @param iconId [int]
761
- # @param text [const char *]
762
- # @return [const char *]
763
- [:GuiIconText, :GuiIconText, [:int, :pointer], :pointer],
764
-
765
- # GuiGetIcons : Get raygui icons data pointer
766
- # @return [unsigned int *]
767
- [:GuiGetIcons, :GuiGetIcons, [], :pointer],
768
-
769
- # GuiLoadIcons : Load raygui icons file (.rgi) into internal icons data
770
- # @param fileName [const char *]
771
- # @param loadIconsName [bool]
772
- # @return [char **]
773
- [:GuiLoadIcons, :GuiLoadIcons, [:pointer, :bool], :pointer],
774
-
775
- # GuiDrawIcon
776
- # @param iconId [int]
777
- # @param posX [int]
778
- # @param posY [int]
779
- # @param pixelSize [int]
780
- # @param color [Color]
781
- # @return [void]
782
- [:GuiDrawIcon, :GuiDrawIcon, [:int, :int, :int, :int, Color.by_value], :void],
783
- ]
784
- entries.each do |entry|
785
- attach_function entry[0], entry[1], entry[2], entry[3]
786
- rescue FFI::NotFoundError => e
787
- warn "[Warning] Failed to import #{entry[0]} (#{e})."
788
- end
789
- end
790
- end
1
+ # Yet another raylib wrapper for Ruby
2
+ #
3
+ # * https://github.com/vaiorabbit/raylib-bindings
4
+ #
5
+ # [NOTICE] Autogenerated. Do not edit.
6
+
7
+ require 'ffi'
8
+
9
+ module Raylib
10
+ extend FFI::Library
11
+
12
+ # Define/Macro
13
+
14
+ RAYGUI_VERSION = "3.2"
15
+ SCROLLBAR_LEFT_SIDE = 0
16
+ SCROLLBAR_RIGHT_SIDE = 1
17
+
18
+ # Enum
19
+
20
+ # enum GuiState
21
+ # Gui control state
22
+ STATE_NORMAL = 0
23
+ STATE_FOCUSED = 1
24
+ STATE_PRESSED = 2
25
+ STATE_DISABLED = 3
26
+
27
+ # enum GuiTextAlignment
28
+ # Gui control text alignment
29
+ TEXT_ALIGN_LEFT = 0
30
+ TEXT_ALIGN_CENTER = 1
31
+ TEXT_ALIGN_RIGHT = 2
32
+
33
+ # enum GuiControl
34
+ # Gui controls
35
+ DEFAULT = 0
36
+ LABEL = 1 # Used also for: LABELBUTTON
37
+ BUTTON = 2
38
+ TOGGLE = 3 # Used also for: TOGGLEGROUP
39
+ SLIDER = 4 # Used also for: SLIDERBAR
40
+ PROGRESSBAR = 5
41
+ CHECKBOX = 6
42
+ COMBOBOX = 7
43
+ DROPDOWNBOX = 8
44
+ TEXTBOX = 9 # Used also for: TEXTBOXMULTI
45
+ VALUEBOX = 10
46
+ SPINNER = 11 # Uses: BUTTON, VALUEBOX
47
+ LISTVIEW = 12
48
+ COLORPICKER = 13
49
+ SCROLLBAR = 14
50
+ STATUSBAR = 15
51
+
52
+ # enum GuiControlProperty
53
+ # Gui base properties for every control
54
+ BORDER_COLOR_NORMAL = 0
55
+ BASE_COLOR_NORMAL = 1
56
+ TEXT_COLOR_NORMAL = 2
57
+ BORDER_COLOR_FOCUSED = 3
58
+ BASE_COLOR_FOCUSED = 4
59
+ TEXT_COLOR_FOCUSED = 5
60
+ BORDER_COLOR_PRESSED = 6
61
+ BASE_COLOR_PRESSED = 7
62
+ TEXT_COLOR_PRESSED = 8
63
+ BORDER_COLOR_DISABLED = 9
64
+ BASE_COLOR_DISABLED = 10
65
+ TEXT_COLOR_DISABLED = 11
66
+ BORDER_WIDTH = 12
67
+ TEXT_PADDING = 13
68
+ TEXT_ALIGNMENT = 14
69
+ RESERVED = 15
70
+
71
+ # enum GuiDefaultProperty
72
+ # DEFAULT extended properties
73
+ TEXT_SIZE = 16 # Text size (glyphs max height)
74
+ TEXT_SPACING = 17 # Text spacing between glyphs
75
+ LINE_COLOR = 18 # Line control color
76
+ BACKGROUND_COLOR = 19 # Background color
77
+
78
+ # enum GuiToggleProperty
79
+ # Toggle/ToggleGroup
80
+ GROUP_PADDING = 16 # ToggleGroup separation between toggles
81
+
82
+ # enum GuiSliderProperty
83
+ # Slider/SliderBar
84
+ SLIDER_WIDTH = 16 # Slider size of internal bar
85
+ SLIDER_PADDING = 17 # Slider/SliderBar internal bar padding
86
+
87
+ # enum GuiProgressBarProperty
88
+ # ProgressBar
89
+ PROGRESS_PADDING = 16 # ProgressBar internal padding
90
+
91
+ # enum GuiScrollBarProperty
92
+ # ScrollBar
93
+ ARROWS_SIZE = 16
94
+ ARROWS_VISIBLE = 17
95
+ SCROLL_SLIDER_PADDING = 18 # (SLIDERBAR, SLIDER_PADDING)
96
+ SCROLL_SLIDER_SIZE = 19
97
+ SCROLL_PADDING = 20
98
+ SCROLL_SPEED = 21
99
+
100
+ # enum GuiCheckBoxProperty
101
+ # CheckBox
102
+ CHECK_PADDING = 16 # CheckBox internal check padding
103
+
104
+ # enum GuiComboBoxProperty
105
+ # ComboBox
106
+ COMBO_BUTTON_WIDTH = 16 # ComboBox right button width
107
+ COMBO_BUTTON_SPACING = 17 # ComboBox button separation
108
+
109
+ # enum GuiDropdownBoxProperty
110
+ # DropdownBox
111
+ ARROW_PADDING = 16 # DropdownBox arrow separation from border and items
112
+ DROPDOWN_ITEMS_SPACING = 17 # DropdownBox items separation
113
+
114
+ # enum GuiTextBoxProperty
115
+ # TextBox/TextBoxMulti/ValueBox/Spinner
116
+ TEXT_INNER_PADDING = 16 # TextBox/TextBoxMulti/ValueBox/Spinner inner text padding
117
+ TEXT_LINES_SPACING = 17 # TextBoxMulti lines separation
118
+
119
+ # enum GuiSpinnerProperty
120
+ # Spinner
121
+ SPIN_BUTTON_WIDTH = 16 # Spinner left/right buttons width
122
+ SPIN_BUTTON_SPACING = 17 # Spinner buttons separation
123
+
124
+ # enum GuiListViewProperty
125
+ # ListView
126
+ LIST_ITEMS_HEIGHT = 16 # ListView items height
127
+ LIST_ITEMS_SPACING = 17 # ListView items separation
128
+ SCROLLBAR_WIDTH = 18 # ListView scrollbar size (usually width)
129
+ SCROLLBAR_SIDE = 19 # ListView scrollbar side (0-left, 1-right)
130
+
131
+ # enum GuiColorPickerProperty
132
+ # ColorPicker
133
+ COLOR_SELECTOR_SIZE = 16
134
+ HUEBAR_WIDTH = 17 # ColorPicker right hue bar width
135
+ HUEBAR_PADDING = 18 # ColorPicker right hue bar separation from panel
136
+ HUEBAR_SELECTOR_HEIGHT = 19 # ColorPicker right hue bar selector height
137
+ HUEBAR_SELECTOR_OVERFLOW = 20 # ColorPicker right hue bar selector overflow
138
+
139
+ # enum GuiIconName
140
+ #
141
+ ICON_NONE = 0
142
+ ICON_FOLDER_FILE_OPEN = 1
143
+ ICON_FILE_SAVE_CLASSIC = 2
144
+ ICON_FOLDER_OPEN = 3
145
+ ICON_FOLDER_SAVE = 4
146
+ ICON_FILE_OPEN = 5
147
+ ICON_FILE_SAVE = 6
148
+ ICON_FILE_EXPORT = 7
149
+ ICON_FILE_ADD = 8
150
+ ICON_FILE_DELETE = 9
151
+ ICON_FILETYPE_TEXT = 10
152
+ ICON_FILETYPE_AUDIO = 11
153
+ ICON_FILETYPE_IMAGE = 12
154
+ ICON_FILETYPE_PLAY = 13
155
+ ICON_FILETYPE_VIDEO = 14
156
+ ICON_FILETYPE_INFO = 15
157
+ ICON_FILE_COPY = 16
158
+ ICON_FILE_CUT = 17
159
+ ICON_FILE_PASTE = 18
160
+ ICON_CURSOR_HAND = 19
161
+ ICON_CURSOR_POINTER = 20
162
+ ICON_CURSOR_CLASSIC = 21
163
+ ICON_PENCIL = 22
164
+ ICON_PENCIL_BIG = 23
165
+ ICON_BRUSH_CLASSIC = 24
166
+ ICON_BRUSH_PAINTER = 25
167
+ ICON_WATER_DROP = 26
168
+ ICON_COLOR_PICKER = 27
169
+ ICON_RUBBER = 28
170
+ ICON_COLOR_BUCKET = 29
171
+ ICON_TEXT_T = 30
172
+ ICON_TEXT_A = 31
173
+ ICON_SCALE = 32
174
+ ICON_RESIZE = 33
175
+ ICON_FILTER_POINT = 34
176
+ ICON_FILTER_BILINEAR = 35
177
+ ICON_CROP = 36
178
+ ICON_CROP_ALPHA = 37
179
+ ICON_SQUARE_TOGGLE = 38
180
+ ICON_SYMMETRY = 39
181
+ ICON_SYMMETRY_HORIZONTAL = 40
182
+ ICON_SYMMETRY_VERTICAL = 41
183
+ ICON_LENS = 42
184
+ ICON_LENS_BIG = 43
185
+ ICON_EYE_ON = 44
186
+ ICON_EYE_OFF = 45
187
+ ICON_FILTER_TOP = 46
188
+ ICON_FILTER = 47
189
+ ICON_TARGET_POINT = 48
190
+ ICON_TARGET_SMALL = 49
191
+ ICON_TARGET_BIG = 50
192
+ ICON_TARGET_MOVE = 51
193
+ ICON_CURSOR_MOVE = 52
194
+ ICON_CURSOR_SCALE = 53
195
+ ICON_CURSOR_SCALE_RIGHT = 54
196
+ ICON_CURSOR_SCALE_LEFT = 55
197
+ ICON_UNDO = 56
198
+ ICON_REDO = 57
199
+ ICON_REREDO = 58
200
+ ICON_MUTATE = 59
201
+ ICON_ROTATE = 60
202
+ ICON_REPEAT = 61
203
+ ICON_SHUFFLE = 62
204
+ ICON_EMPTYBOX = 63
205
+ ICON_TARGET = 64
206
+ ICON_TARGET_SMALL_FILL = 65
207
+ ICON_TARGET_BIG_FILL = 66
208
+ ICON_TARGET_MOVE_FILL = 67
209
+ ICON_CURSOR_MOVE_FILL = 68
210
+ ICON_CURSOR_SCALE_FILL = 69
211
+ ICON_CURSOR_SCALE_RIGHT_FILL = 70
212
+ ICON_CURSOR_SCALE_LEFT_FILL = 71
213
+ ICON_UNDO_FILL = 72
214
+ ICON_REDO_FILL = 73
215
+ ICON_REREDO_FILL = 74
216
+ ICON_MUTATE_FILL = 75
217
+ ICON_ROTATE_FILL = 76
218
+ ICON_REPEAT_FILL = 77
219
+ ICON_SHUFFLE_FILL = 78
220
+ ICON_EMPTYBOX_SMALL = 79
221
+ ICON_BOX = 80
222
+ ICON_BOX_TOP = 81
223
+ ICON_BOX_TOP_RIGHT = 82
224
+ ICON_BOX_RIGHT = 83
225
+ ICON_BOX_BOTTOM_RIGHT = 84
226
+ ICON_BOX_BOTTOM = 85
227
+ ICON_BOX_BOTTOM_LEFT = 86
228
+ ICON_BOX_LEFT = 87
229
+ ICON_BOX_TOP_LEFT = 88
230
+ ICON_BOX_CENTER = 89
231
+ ICON_BOX_CIRCLE_MASK = 90
232
+ ICON_POT = 91
233
+ ICON_ALPHA_MULTIPLY = 92
234
+ ICON_ALPHA_CLEAR = 93
235
+ ICON_DITHERING = 94
236
+ ICON_MIPMAPS = 95
237
+ ICON_BOX_GRID = 96
238
+ ICON_GRID = 97
239
+ ICON_BOX_CORNERS_SMALL = 98
240
+ ICON_BOX_CORNERS_BIG = 99
241
+ ICON_FOUR_BOXES = 100
242
+ ICON_GRID_FILL = 101
243
+ ICON_BOX_MULTISIZE = 102
244
+ ICON_ZOOM_SMALL = 103
245
+ ICON_ZOOM_MEDIUM = 104
246
+ ICON_ZOOM_BIG = 105
247
+ ICON_ZOOM_ALL = 106
248
+ ICON_ZOOM_CENTER = 107
249
+ ICON_BOX_DOTS_SMALL = 108
250
+ ICON_BOX_DOTS_BIG = 109
251
+ ICON_BOX_CONCENTRIC = 110
252
+ ICON_BOX_GRID_BIG = 111
253
+ ICON_OK_TICK = 112
254
+ ICON_CROSS = 113
255
+ ICON_ARROW_LEFT = 114
256
+ ICON_ARROW_RIGHT = 115
257
+ ICON_ARROW_DOWN = 116
258
+ ICON_ARROW_UP = 117
259
+ ICON_ARROW_LEFT_FILL = 118
260
+ ICON_ARROW_RIGHT_FILL = 119
261
+ ICON_ARROW_DOWN_FILL = 120
262
+ ICON_ARROW_UP_FILL = 121
263
+ ICON_AUDIO = 122
264
+ ICON_FX = 123
265
+ ICON_WAVE = 124
266
+ ICON_WAVE_SINUS = 125
267
+ ICON_WAVE_SQUARE = 126
268
+ ICON_WAVE_TRIANGULAR = 127
269
+ ICON_CROSS_SMALL = 128
270
+ ICON_PLAYER_PREVIOUS = 129
271
+ ICON_PLAYER_PLAY_BACK = 130
272
+ ICON_PLAYER_PLAY = 131
273
+ ICON_PLAYER_PAUSE = 132
274
+ ICON_PLAYER_STOP = 133
275
+ ICON_PLAYER_NEXT = 134
276
+ ICON_PLAYER_RECORD = 135
277
+ ICON_MAGNET = 136
278
+ ICON_LOCK_CLOSE = 137
279
+ ICON_LOCK_OPEN = 138
280
+ ICON_CLOCK = 139
281
+ ICON_TOOLS = 140
282
+ ICON_GEAR = 141
283
+ ICON_GEAR_BIG = 142
284
+ ICON_BIN = 143
285
+ ICON_HAND_POINTER = 144
286
+ ICON_LASER = 145
287
+ ICON_COIN = 146
288
+ ICON_EXPLOSION = 147
289
+ ICON_1UP = 148
290
+ ICON_PLAYER = 149
291
+ ICON_PLAYER_JUMP = 150
292
+ ICON_KEY = 151
293
+ ICON_DEMON = 152
294
+ ICON_TEXT_POPUP = 153
295
+ ICON_GEAR_EX = 154
296
+ ICON_CRACK = 155
297
+ ICON_CRACK_POINTS = 156
298
+ ICON_STAR = 157
299
+ ICON_DOOR = 158
300
+ ICON_EXIT = 159
301
+ ICON_MODE_2D = 160
302
+ ICON_MODE_3D = 161
303
+ ICON_CUBE = 162
304
+ ICON_CUBE_FACE_TOP = 163
305
+ ICON_CUBE_FACE_LEFT = 164
306
+ ICON_CUBE_FACE_FRONT = 165
307
+ ICON_CUBE_FACE_BOTTOM = 166
308
+ ICON_CUBE_FACE_RIGHT = 167
309
+ ICON_CUBE_FACE_BACK = 168
310
+ ICON_CAMERA = 169
311
+ ICON_SPECIAL = 170
312
+ ICON_LINK_NET = 171
313
+ ICON_LINK_BOXES = 172
314
+ ICON_LINK_MULTI = 173
315
+ ICON_LINK = 174
316
+ ICON_LINK_BROKE = 175
317
+ ICON_TEXT_NOTES = 176
318
+ ICON_NOTEBOOK = 177
319
+ ICON_SUITCASE = 178
320
+ ICON_SUITCASE_ZIP = 179
321
+ ICON_MAILBOX = 180
322
+ ICON_MONITOR = 181
323
+ ICON_PRINTER = 182
324
+ ICON_PHOTO_CAMERA = 183
325
+ ICON_PHOTO_CAMERA_FLASH = 184
326
+ ICON_HOUSE = 185
327
+ ICON_HEART = 186
328
+ ICON_CORNER = 187
329
+ ICON_VERTICAL_BARS = 188
330
+ ICON_VERTICAL_BARS_FILL = 189
331
+ ICON_LIFE_BARS = 190
332
+ ICON_INFO = 191
333
+ ICON_CROSSLINE = 192
334
+ ICON_HELP = 193
335
+ ICON_FILETYPE_ALPHA = 194
336
+ ICON_FILETYPE_HOME = 195
337
+ ICON_LAYERS_VISIBLE = 196
338
+ ICON_LAYERS = 197
339
+ ICON_WINDOW = 198
340
+ ICON_HIDPI = 199
341
+ ICON_FILETYPE_BINARY = 200
342
+ ICON_HEX = 201
343
+ ICON_SHIELD = 202
344
+ ICON_FILE_NEW = 203
345
+ ICON_FOLDER_ADD = 204
346
+ ICON_ALARM = 205
347
+ ICON_CPU = 206
348
+ ICON_ROM = 207
349
+ ICON_STEP_OVER = 208
350
+ ICON_STEP_INTO = 209
351
+ ICON_STEP_OUT = 210
352
+ ICON_RESTART = 211
353
+ ICON_BREAKPOINT_ON = 212
354
+ ICON_BREAKPOINT_OFF = 213
355
+ ICON_BURGER_MENU = 214
356
+ ICON_CASE_SENSITIVE = 215
357
+ ICON_REG_EXP = 216
358
+ ICON_FOLDER = 217
359
+ ICON_FILE = 218
360
+ ICON_219 = 219
361
+ ICON_220 = 220
362
+ ICON_221 = 221
363
+ ICON_222 = 222
364
+ ICON_223 = 223
365
+ ICON_224 = 224
366
+ ICON_225 = 225
367
+ ICON_226 = 226
368
+ ICON_227 = 227
369
+ ICON_228 = 228
370
+ ICON_229 = 229
371
+ ICON_230 = 230
372
+ ICON_231 = 231
373
+ ICON_232 = 232
374
+ ICON_233 = 233
375
+ ICON_234 = 234
376
+ ICON_235 = 235
377
+ ICON_236 = 236
378
+ ICON_237 = 237
379
+ ICON_238 = 238
380
+ ICON_239 = 239
381
+ ICON_240 = 240
382
+ ICON_241 = 241
383
+ ICON_242 = 242
384
+ ICON_243 = 243
385
+ ICON_244 = 244
386
+ ICON_245 = 245
387
+ ICON_246 = 246
388
+ ICON_247 = 247
389
+ ICON_248 = 248
390
+ ICON_249 = 249
391
+ ICON_250 = 250
392
+ ICON_251 = 251
393
+ ICON_252 = 252
394
+ ICON_253 = 253
395
+ ICON_254 = 254
396
+ ICON_255 = 255
397
+
398
+
399
+ # Typedef
400
+
401
+ typedef :int, :GuiState
402
+ typedef :int, :GuiTextAlignment
403
+ typedef :int, :GuiControl
404
+ typedef :int, :GuiControlProperty
405
+ typedef :int, :GuiDefaultProperty
406
+ typedef :int, :GuiToggleProperty
407
+ typedef :int, :GuiSliderProperty
408
+ typedef :int, :GuiProgressBarProperty
409
+ typedef :int, :GuiScrollBarProperty
410
+ typedef :int, :GuiCheckBoxProperty
411
+ typedef :int, :GuiComboBoxProperty
412
+ typedef :int, :GuiDropdownBoxProperty
413
+ typedef :int, :GuiTextBoxProperty
414
+ typedef :int, :GuiSpinnerProperty
415
+ typedef :int, :GuiListViewProperty
416
+ typedef :int, :GuiColorPickerProperty
417
+ typedef :int, :GuiIconName
418
+
419
+ # Struct
420
+
421
+ # Style property
422
+ class GuiStyleProp < FFI::Struct
423
+ layout(
424
+ :controlId, :ushort,
425
+ :propertyId, :ushort,
426
+ :propertyValue, :uint,
427
+ )
428
+ def controlId = self[:controlId]
429
+ def controlId=(v) self[:controlId] = v end
430
+ def propertyId = self[:propertyId]
431
+ def propertyId=(v) self[:propertyId] = v end
432
+ def propertyValue = self[:propertyValue]
433
+ def propertyValue=(v) self[:propertyValue] = v end
434
+ end
435
+
436
+
437
+ # Function
438
+
439
+ def self.setup_raygui_symbols
440
+ entries = [
441
+
442
+ # GuiEnable : Enable gui controls (global state)
443
+ # @return [void]
444
+ [:GuiEnable, :GuiEnable, [], :void],
445
+
446
+ # GuiDisable : Disable gui controls (global state)
447
+ # @return [void]
448
+ [:GuiDisable, :GuiDisable, [], :void],
449
+
450
+ # GuiLock : Lock gui controls (global state)
451
+ # @return [void]
452
+ [:GuiLock, :GuiLock, [], :void],
453
+
454
+ # GuiUnlock : Unlock gui controls (global state)
455
+ # @return [void]
456
+ [:GuiUnlock, :GuiUnlock, [], :void],
457
+
458
+ # GuiIsLocked : Check if gui is locked (global state)
459
+ # @return [bool]
460
+ [:GuiIsLocked, :GuiIsLocked, [], :bool],
461
+
462
+ # GuiFade : Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
463
+ # @param alpha [float]
464
+ # @return [void]
465
+ [:GuiFade, :GuiFade, [:float], :void],
466
+
467
+ # GuiSetState : Set gui state (global state)
468
+ # @param state [int]
469
+ # @return [void]
470
+ [:GuiSetState, :GuiSetState, [:int], :void],
471
+
472
+ # GuiGetState : Get gui state (global state)
473
+ # @return [int]
474
+ [:GuiGetState, :GuiGetState, [], :int],
475
+
476
+ # GuiSetFont : Set gui custom font (global state)
477
+ # @param font [Font]
478
+ # @return [void]
479
+ [:GuiSetFont, :GuiSetFont, [Font.by_value], :void],
480
+
481
+ # GuiGetFont : Get gui custom font (global state)
482
+ # @return [Font]
483
+ [:GuiGetFont, :GuiGetFont, [], Font.by_value],
484
+
485
+ # GuiSetStyle : Set one style property
486
+ # @param control [int]
487
+ # @param property [int]
488
+ # @param value [int]
489
+ # @return [void]
490
+ [:GuiSetStyle, :GuiSetStyle, [:int, :int, :int], :void],
491
+
492
+ # GuiGetStyle : Get one style property
493
+ # @param control [int]
494
+ # @param property [int]
495
+ # @return [int]
496
+ [:GuiGetStyle, :GuiGetStyle, [:int, :int], :int],
497
+
498
+ # GuiWindowBox : Window Box control, shows a window that can be closed
499
+ # @param bounds [Rectangle]
500
+ # @param title [const char *]
501
+ # @return [bool]
502
+ [:GuiWindowBox, :GuiWindowBox, [Rectangle.by_value, :pointer], :bool],
503
+
504
+ # GuiGroupBox : Group Box control with text name
505
+ # @param bounds [Rectangle]
506
+ # @param text [const char *]
507
+ # @return [void]
508
+ [:GuiGroupBox, :GuiGroupBox, [Rectangle.by_value, :pointer], :void],
509
+
510
+ # GuiLine : Line separator control, could contain text
511
+ # @param bounds [Rectangle]
512
+ # @param text [const char *]
513
+ # @return [void]
514
+ [:GuiLine, :GuiLine, [Rectangle.by_value, :pointer], :void],
515
+
516
+ # GuiPanel : Panel control, useful to group controls
517
+ # @param bounds [Rectangle]
518
+ # @param text [const char *]
519
+ # @return [void]
520
+ [:GuiPanel, :GuiPanel, [Rectangle.by_value, :pointer], :void],
521
+
522
+ # GuiTabBar : Tab Bar control, returns TAB to be closed or -1
523
+ # @param bounds [Rectangle]
524
+ # @param text [const char **]
525
+ # @param count [int]
526
+ # @param active [int *]
527
+ # @return [int]
528
+ [:GuiTabBar, :GuiTabBar, [Rectangle.by_value, :pointer, :int, :pointer], :int],
529
+
530
+ # GuiScrollPanel : Scroll Panel control
531
+ # @param bounds [Rectangle]
532
+ # @param text [const char *]
533
+ # @param content [Rectangle]
534
+ # @param scroll [Vector2 *]
535
+ # @return [Rectangle]
536
+ [:GuiScrollPanel, :GuiScrollPanel, [Rectangle.by_value, :pointer, Rectangle.by_value, :pointer], Rectangle.by_value],
537
+
538
+ # GuiLabel : Label control, shows text
539
+ # @param bounds [Rectangle]
540
+ # @param text [const char *]
541
+ # @return [void]
542
+ [:GuiLabel, :GuiLabel, [Rectangle.by_value, :pointer], :void],
543
+
544
+ # GuiButton : Button control, returns true when clicked
545
+ # @param bounds [Rectangle]
546
+ # @param text [const char *]
547
+ # @return [bool]
548
+ [:GuiButton, :GuiButton, [Rectangle.by_value, :pointer], :bool],
549
+
550
+ # GuiLabelButton : Label button control, show true when clicked
551
+ # @param bounds [Rectangle]
552
+ # @param text [const char *]
553
+ # @return [bool]
554
+ [:GuiLabelButton, :GuiLabelButton, [Rectangle.by_value, :pointer], :bool],
555
+
556
+ # GuiToggle : Toggle Button control, returns true when active
557
+ # @param bounds [Rectangle]
558
+ # @param text [const char *]
559
+ # @param active [bool]
560
+ # @return [bool]
561
+ [:GuiToggle, :GuiToggle, [Rectangle.by_value, :pointer, :bool], :bool],
562
+
563
+ # GuiToggleGroup : Toggle Group control, returns active toggle index
564
+ # @param bounds [Rectangle]
565
+ # @param text [const char *]
566
+ # @param active [int]
567
+ # @return [int]
568
+ [:GuiToggleGroup, :GuiToggleGroup, [Rectangle.by_value, :pointer, :int], :int],
569
+
570
+ # GuiCheckBox : Check Box control, returns true when active
571
+ # @param bounds [Rectangle]
572
+ # @param text [const char *]
573
+ # @param checked [bool]
574
+ # @return [bool]
575
+ [:GuiCheckBox, :GuiCheckBox, [Rectangle.by_value, :pointer, :bool], :bool],
576
+
577
+ # GuiComboBox : Combo Box control, returns selected item index
578
+ # @param bounds [Rectangle]
579
+ # @param text [const char *]
580
+ # @param active [int]
581
+ # @return [int]
582
+ [:GuiComboBox, :GuiComboBox, [Rectangle.by_value, :pointer, :int], :int],
583
+
584
+ # GuiDropdownBox : Dropdown Box control, returns selected item
585
+ # @param bounds [Rectangle]
586
+ # @param text [const char *]
587
+ # @param active [int *]
588
+ # @param editMode [bool]
589
+ # @return [bool]
590
+ [:GuiDropdownBox, :GuiDropdownBox, [Rectangle.by_value, :pointer, :pointer, :bool], :bool],
591
+
592
+ # GuiSpinner : Spinner control, returns selected value
593
+ # @param bounds [Rectangle]
594
+ # @param text [const char *]
595
+ # @param value [int *]
596
+ # @param minValue [int]
597
+ # @param maxValue [int]
598
+ # @param editMode [bool]
599
+ # @return [bool]
600
+ [:GuiSpinner, :GuiSpinner, [Rectangle.by_value, :pointer, :pointer, :int, :int, :bool], :bool],
601
+
602
+ # GuiValueBox : Value Box control, updates input text with numbers
603
+ # @param bounds [Rectangle]
604
+ # @param text [const char *]
605
+ # @param value [int *]
606
+ # @param minValue [int]
607
+ # @param maxValue [int]
608
+ # @param editMode [bool]
609
+ # @return [bool]
610
+ [:GuiValueBox, :GuiValueBox, [Rectangle.by_value, :pointer, :pointer, :int, :int, :bool], :bool],
611
+
612
+ # GuiTextBox : Text Box control, updates input text
613
+ # @param bounds [Rectangle]
614
+ # @param text [char *]
615
+ # @param textSize [int]
616
+ # @param editMode [bool]
617
+ # @return [bool]
618
+ [:GuiTextBox, :GuiTextBox, [Rectangle.by_value, :pointer, :int, :bool], :bool],
619
+
620
+ # GuiTextBoxMulti : Text Box control with multiple lines
621
+ # @param bounds [Rectangle]
622
+ # @param text [char *]
623
+ # @param textSize [int]
624
+ # @param editMode [bool]
625
+ # @return [bool]
626
+ [:GuiTextBoxMulti, :GuiTextBoxMulti, [Rectangle.by_value, :pointer, :int, :bool], :bool],
627
+
628
+ # GuiSlider : Slider control, returns selected value
629
+ # @param bounds [Rectangle]
630
+ # @param textLeft [const char *]
631
+ # @param textRight [const char *]
632
+ # @param value [float]
633
+ # @param minValue [float]
634
+ # @param maxValue [float]
635
+ # @return [float]
636
+ [:GuiSlider, :GuiSlider, [Rectangle.by_value, :pointer, :pointer, :float, :float, :float], :float],
637
+
638
+ # GuiSliderBar : Slider Bar control, returns selected value
639
+ # @param bounds [Rectangle]
640
+ # @param textLeft [const char *]
641
+ # @param textRight [const char *]
642
+ # @param value [float]
643
+ # @param minValue [float]
644
+ # @param maxValue [float]
645
+ # @return [float]
646
+ [:GuiSliderBar, :GuiSliderBar, [Rectangle.by_value, :pointer, :pointer, :float, :float, :float], :float],
647
+
648
+ # GuiProgressBar : Progress Bar control, shows current progress value
649
+ # @param bounds [Rectangle]
650
+ # @param textLeft [const char *]
651
+ # @param textRight [const char *]
652
+ # @param value [float]
653
+ # @param minValue [float]
654
+ # @param maxValue [float]
655
+ # @return [float]
656
+ [:GuiProgressBar, :GuiProgressBar, [Rectangle.by_value, :pointer, :pointer, :float, :float, :float], :float],
657
+
658
+ # GuiStatusBar : Status Bar control, shows info text
659
+ # @param bounds [Rectangle]
660
+ # @param text [const char *]
661
+ # @return [void]
662
+ [:GuiStatusBar, :GuiStatusBar, [Rectangle.by_value, :pointer], :void],
663
+
664
+ # GuiDummyRec : Dummy control for placeholders
665
+ # @param bounds [Rectangle]
666
+ # @param text [const char *]
667
+ # @return [void]
668
+ [:GuiDummyRec, :GuiDummyRec, [Rectangle.by_value, :pointer], :void],
669
+
670
+ # GuiGrid : Grid control, returns mouse cell position
671
+ # @param bounds [Rectangle]
672
+ # @param text [const char *]
673
+ # @param spacing [float]
674
+ # @param subdivs [int]
675
+ # @return [Vector2]
676
+ [:GuiGrid, :GuiGrid, [Rectangle.by_value, :pointer, :float, :int], Vector2.by_value],
677
+
678
+ # GuiListView : List View control, returns selected list item index
679
+ # @param bounds [Rectangle]
680
+ # @param text [const char *]
681
+ # @param scrollIndex [int *]
682
+ # @param active [int]
683
+ # @return [int]
684
+ [:GuiListView, :GuiListView, [Rectangle.by_value, :pointer, :pointer, :int], :int],
685
+
686
+ # GuiListViewEx : List View with extended parameters
687
+ # @param bounds [Rectangle]
688
+ # @param text [const char **]
689
+ # @param count [int]
690
+ # @param focus [int *]
691
+ # @param scrollIndex [int *]
692
+ # @param active [int]
693
+ # @return [int]
694
+ [:GuiListViewEx, :GuiListViewEx, [Rectangle.by_value, :pointer, :int, :pointer, :pointer, :int], :int],
695
+
696
+ # GuiMessageBox : Message Box control, displays a message
697
+ # @param bounds [Rectangle]
698
+ # @param title [const char *]
699
+ # @param message [const char *]
700
+ # @param buttons [const char *]
701
+ # @return [int]
702
+ [:GuiMessageBox, :GuiMessageBox, [Rectangle.by_value, :pointer, :pointer, :pointer], :int],
703
+
704
+ # GuiTextInputBox : Text Input Box control, ask for text, supports secret
705
+ # @param bounds [Rectangle]
706
+ # @param title [const char *]
707
+ # @param message [const char *]
708
+ # @param buttons [const char *]
709
+ # @param text [char *]
710
+ # @param textMaxSize [int]
711
+ # @param secretViewActive [int *]
712
+ # @return [int]
713
+ [:GuiTextInputBox, :GuiTextInputBox, [Rectangle.by_value, :pointer, :pointer, :pointer, :pointer, :int, :pointer], :int],
714
+
715
+ # GuiColorPicker : Color Picker control (multiple color controls)
716
+ # @param bounds [Rectangle]
717
+ # @param text [const char *]
718
+ # @param color [Color]
719
+ # @return [Color]
720
+ [:GuiColorPicker, :GuiColorPicker, [Rectangle.by_value, :pointer, Color.by_value], Color.by_value],
721
+
722
+ # GuiColorPanel : Color Panel control
723
+ # @param bounds [Rectangle]
724
+ # @param text [const char *]
725
+ # @param color [Color]
726
+ # @return [Color]
727
+ [:GuiColorPanel, :GuiColorPanel, [Rectangle.by_value, :pointer, Color.by_value], Color.by_value],
728
+
729
+ # GuiColorBarAlpha : Color Bar Alpha control
730
+ # @param bounds [Rectangle]
731
+ # @param text [const char *]
732
+ # @param alpha [float]
733
+ # @return [float]
734
+ [:GuiColorBarAlpha, :GuiColorBarAlpha, [Rectangle.by_value, :pointer, :float], :float],
735
+
736
+ # GuiColorBarHue : Color Bar Hue control
737
+ # @param bounds [Rectangle]
738
+ # @param text [const char *]
739
+ # @param value [float]
740
+ # @return [float]
741
+ [:GuiColorBarHue, :GuiColorBarHue, [Rectangle.by_value, :pointer, :float], :float],
742
+
743
+ # GuiLoadStyle : Load style file over global style variable (.rgs)
744
+ # @param fileName [const char *]
745
+ # @return [void]
746
+ [:GuiLoadStyle, :GuiLoadStyle, [:pointer], :void],
747
+
748
+ # GuiLoadStyleDefault : Load style default over global style
749
+ # @return [void]
750
+ [:GuiLoadStyleDefault, :GuiLoadStyleDefault, [], :void],
751
+
752
+ # GuiEnableTooltip : Enable gui tooltips (global state)
753
+ # @return [void]
754
+ [:GuiEnableTooltip, :GuiEnableTooltip, [], :void],
755
+
756
+ # GuiDisableTooltip : Disable gui tooltips (global state)
757
+ # @return [void]
758
+ [:GuiDisableTooltip, :GuiDisableTooltip, [], :void],
759
+
760
+ # GuiSetTooltip : Set tooltip string
761
+ # @param tooltip [const char *]
762
+ # @return [void]
763
+ [:GuiSetTooltip, :GuiSetTooltip, [:pointer], :void],
764
+
765
+ # GuiIconText : Get text with icon id prepended (if supported)
766
+ # @param iconId [int]
767
+ # @param text [const char *]
768
+ # @return [const char *]
769
+ [:GuiIconText, :GuiIconText, [:int, :pointer], :pointer],
770
+
771
+ # GuiGetIcons : Get raygui icons data pointer
772
+ # @return [unsigned int *]
773
+ [:GuiGetIcons, :GuiGetIcons, [], :pointer],
774
+
775
+ # GuiLoadIcons : Load raygui icons file (.rgi) into internal icons data
776
+ # @param fileName [const char *]
777
+ # @param loadIconsName [bool]
778
+ # @return [char **]
779
+ [:GuiLoadIcons, :GuiLoadIcons, [:pointer, :bool], :pointer],
780
+
781
+ # GuiDrawIcon
782
+ # @param iconId [int]
783
+ # @param posX [int]
784
+ # @param posY [int]
785
+ # @param pixelSize [int]
786
+ # @param color [Color]
787
+ # @return [void]
788
+ [:GuiDrawIcon, :GuiDrawIcon, [:int, :int, :int, :int, Color.by_value], :void],
789
+
790
+ # GuiSetIconScale : Set icon drawing size
791
+ # @param scale [int]
792
+ # @return [void]
793
+ [:GuiSetIconScale, :GuiSetIconScale, [:int], :void],
794
+ ]
795
+ entries.each do |entry|
796
+ attach_function entry[0], entry[1], entry[2], entry[3]
797
+ rescue FFI::NotFoundError => e
798
+ warn "[Warning] Failed to import #{entry[0]} (#{e})."
799
+ end
800
+ end
801
+ end