raylib-bindings 0.7.9-x64-mingw → 0.7.11-x64-mingw

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