raylib-bindings 0.7.9-aarch64-linux → 0.7.10-aarch64-linux

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