raylib-bindings 0.5.3 → 0.5.5

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