raylib-bindings 0.0.2 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/lib/raygui.rb CHANGED
@@ -1,305 +1,556 @@
1
- # Yet another raylib wrapper for Ruby
2
- #
3
- # * https://github.com/vaiorabbit/raylib-bindings
4
- #
5
- # [NOTICE] This is an automatically generated file.
6
-
7
- require 'ffi'
8
-
9
- module Raylib
10
- extend FFI::Library
11
- # Define/Macro
12
-
13
- RAYGUI_VERSION = "3.0"
14
-
15
- # Enum
16
-
17
- GUI_STATE_NORMAL = 0
18
- GUI_STATE_FOCUSED = 1
19
- GUI_STATE_PRESSED = 2
20
- GUI_STATE_DISABLED = 3
21
- GUI_TEXT_ALIGN_LEFT = 0
22
- GUI_TEXT_ALIGN_CENTER = 1
23
- GUI_TEXT_ALIGN_RIGHT = 2
24
- DEFAULT = 0
25
- LABEL = 1
26
- BUTTON = 2
27
- TOGGLE = 3
28
- SLIDER = 4
29
- PROGRESSBAR = 5
30
- CHECKBOX = 6
31
- COMBOBOX = 7
32
- DROPDOWNBOX = 8
33
- TEXTBOX = 9
34
- VALUEBOX = 10
35
- SPINNER = 11
36
- LISTVIEW = 12
37
- COLORPICKER = 13
38
- SCROLLBAR = 14
39
- STATUSBAR = 15
40
- BORDER_COLOR_NORMAL = 0
41
- BASE_COLOR_NORMAL = 1
42
- TEXT_COLOR_NORMAL = 2
43
- BORDER_COLOR_FOCUSED = 3
44
- BASE_COLOR_FOCUSED = 4
45
- TEXT_COLOR_FOCUSED = 5
46
- BORDER_COLOR_PRESSED = 6
47
- BASE_COLOR_PRESSED = 7
48
- TEXT_COLOR_PRESSED = 8
49
- BORDER_COLOR_DISABLED = 9
50
- BASE_COLOR_DISABLED = 10
51
- TEXT_COLOR_DISABLED = 11
52
- BORDER_WIDTH = 12
53
- TEXT_PADDING = 13
54
- TEXT_ALIGNMENT = 14
55
- RESERVED = 15
56
- TEXT_SIZE = 16
57
- TEXT_SPACING = 17
58
- LINE_COLOR = 18
59
- BACKGROUND_COLOR = 19
60
- GROUP_PADDING = 16
61
- SLIDER_WIDTH = 16
62
- SLIDER_PADDING = 17
63
- PROGRESS_PADDING = 16
64
- CHECK_PADDING = 16
65
- COMBO_BUTTON_WIDTH = 16
66
- COMBO_BUTTON_PADDING = 17
67
- ARROW_PADDING = 16
68
- DROPDOWN_ITEMS_PADDING = 17
69
- TEXT_INNER_PADDING = 16
70
- TEXT_LINES_PADDING = 17
71
- COLOR_SELECTED_FG = 18
72
- COLOR_SELECTED_BG = 19
73
- SPIN_BUTTON_WIDTH = 16
74
- SPIN_BUTTON_PADDING = 17
75
- ARROWS_SIZE = 16
76
- ARROWS_VISIBLE = 17
77
- SCROLL_SLIDER_PADDING = 18
78
- SCROLL_SLIDER_SIZE = 19
79
- SCROLL_PADDING = 20
80
- SCROLL_SPEED = 21
81
- SCROLLBAR_LEFT_SIDE = 0
82
- SCROLLBAR_RIGHT_SIDE = 1
83
- LIST_ITEMS_HEIGHT = 16
84
- LIST_ITEMS_PADDING = 17
85
- SCROLLBAR_WIDTH = 18
86
- SCROLLBAR_SIDE = 19
87
- COLOR_SELECTOR_SIZE = 16
88
- HUEBAR_WIDTH = 17
89
- HUEBAR_PADDING = 18
90
- HUEBAR_SELECTOR_HEIGHT = 19
91
- HUEBAR_SELECTOR_OVERFLOW = 20
92
-
93
- # Typedef
94
-
95
- typedef :int, :GuiControlState
96
- typedef :int, :GuiTextAlignment
97
- typedef :int, :GuiControl
98
- typedef :int, :GuiControlProperty
99
- typedef :int, :GuiDefaultProperty
100
- typedef :int, :GuiToggleProperty
101
- typedef :int, :GuiSliderProperty
102
- typedef :int, :GuiProgressBarProperty
103
- typedef :int, :GuiCheckBoxProperty
104
- typedef :int, :GuiComboBoxProperty
105
- typedef :int, :GuiDropdownBoxProperty
106
- typedef :int, :GuiTextBoxProperty
107
- typedef :int, :GuiSpinnerProperty
108
- typedef :int, :GuiScrollBarProperty
109
- typedef :int, :GuiScrollBarSide
110
- typedef :int, :GuiListViewProperty
111
- typedef :int, :GuiColorPickerProperty
112
-
113
- # Struct
114
-
115
- class GuiStyleProp < FFI::Struct
116
- layout(
117
- :controlId, :ushort,
118
- :propertyId, :ushort,
119
- :propertyValue, :int,
120
- )
121
- end
122
-
123
-
124
- # Function
125
-
126
- def self.setup_raygui_symbols()
127
- symbols = [
128
- :GuiEnable,
129
- :GuiDisable,
130
- :GuiLock,
131
- :GuiUnlock,
132
- :GuiIsLocked,
133
- :GuiFade,
134
- :GuiSetState,
135
- :GuiGetState,
136
- :GuiSetFont,
137
- :GuiGetFont,
138
- :GuiSetStyle,
139
- :GuiGetStyle,
140
- :GuiWindowBox,
141
- :GuiGroupBox,
142
- :GuiLine,
143
- :GuiPanel,
144
- :GuiScrollPanel,
145
- :GuiLabel,
146
- :GuiButton,
147
- :GuiLabelButton,
148
- :GuiToggle,
149
- :GuiToggleGroup,
150
- :GuiCheckBox,
151
- :GuiComboBox,
152
- :GuiDropdownBox,
153
- :GuiSpinner,
154
- :GuiValueBox,
155
- :GuiTextBox,
156
- :GuiTextBoxMulti,
157
- :GuiSlider,
158
- :GuiSliderBar,
159
- :GuiProgressBar,
160
- :GuiStatusBar,
161
- :GuiDummyRec,
162
- :GuiScrollBar,
163
- :GuiGrid,
164
- :GuiListView,
165
- :GuiListViewEx,
166
- :GuiMessageBox,
167
- :GuiTextInputBox,
168
- :GuiColorPicker,
169
- :GuiColorPanel,
170
- :GuiColorBarAlpha,
171
- :GuiColorBarHue,
172
- :GuiLoadStyle,
173
- :GuiLoadStyleDefault,
174
- :GuiIconText,
175
- :GuiDrawIcon,
176
- :GuiGetIcons,
177
- :GuiGetIconData,
178
- :GuiSetIconData,
179
- :GuiSetIconPixel,
180
- :GuiClearIconPixel,
181
- :GuiCheckIconPixel,
182
- ]
183
- args = {
184
- :GuiEnable => [],
185
- :GuiDisable => [],
186
- :GuiLock => [],
187
- :GuiUnlock => [],
188
- :GuiIsLocked => [],
189
- :GuiFade => [:float],
190
- :GuiSetState => [:int],
191
- :GuiGetState => [],
192
- :GuiSetFont => [Font.by_value],
193
- :GuiGetFont => [],
194
- :GuiSetStyle => [:int, :int, :int],
195
- :GuiGetStyle => [:int, :int],
196
- :GuiWindowBox => [Rectangle.by_value, :pointer],
197
- :GuiGroupBox => [Rectangle.by_value, :pointer],
198
- :GuiLine => [Rectangle.by_value, :pointer],
199
- :GuiPanel => [Rectangle.by_value],
200
- :GuiScrollPanel => [Rectangle.by_value, Rectangle.by_value, :pointer],
201
- :GuiLabel => [Rectangle.by_value, :pointer],
202
- :GuiButton => [Rectangle.by_value, :pointer],
203
- :GuiLabelButton => [Rectangle.by_value, :pointer],
204
- :GuiToggle => [Rectangle.by_value, :pointer, :bool],
205
- :GuiToggleGroup => [Rectangle.by_value, :pointer, :int],
206
- :GuiCheckBox => [Rectangle.by_value, :pointer, :bool],
207
- :GuiComboBox => [Rectangle.by_value, :pointer, :int],
208
- :GuiDropdownBox => [Rectangle.by_value, :pointer, :pointer, :bool],
209
- :GuiSpinner => [Rectangle.by_value, :pointer, :pointer, :int, :int, :bool],
210
- :GuiValueBox => [Rectangle.by_value, :pointer, :pointer, :int, :int, :bool],
211
- :GuiTextBox => [Rectangle.by_value, :pointer, :int, :bool],
212
- :GuiTextBoxMulti => [Rectangle.by_value, :pointer, :int, :bool],
213
- :GuiSlider => [Rectangle.by_value, :pointer, :pointer, :float, :float, :float],
214
- :GuiSliderBar => [Rectangle.by_value, :pointer, :pointer, :float, :float, :float],
215
- :GuiProgressBar => [Rectangle.by_value, :pointer, :pointer, :float, :float, :float],
216
- :GuiStatusBar => [Rectangle.by_value, :pointer],
217
- :GuiDummyRec => [Rectangle.by_value, :pointer],
218
- :GuiScrollBar => [Rectangle.by_value, :int, :int, :int],
219
- :GuiGrid => [Rectangle.by_value, :float, :int],
220
- :GuiListView => [Rectangle.by_value, :pointer, :pointer, :int],
221
- :GuiListViewEx => [Rectangle.by_value, :pointer, :int, :pointer, :pointer, :int],
222
- :GuiMessageBox => [Rectangle.by_value, :pointer, :pointer, :pointer],
223
- :GuiTextInputBox => [Rectangle.by_value, :pointer, :pointer, :pointer, :pointer],
224
- :GuiColorPicker => [Rectangle.by_value, Color.by_value],
225
- :GuiColorPanel => [Rectangle.by_value, Color.by_value],
226
- :GuiColorBarAlpha => [Rectangle.by_value, :float],
227
- :GuiColorBarHue => [Rectangle.by_value, :float],
228
- :GuiLoadStyle => [:pointer],
229
- :GuiLoadStyleDefault => [],
230
- :GuiIconText => [:int, :pointer],
231
- :GuiDrawIcon => [:int, :int, :int, :int, Color.by_value],
232
- :GuiGetIcons => [],
233
- :GuiGetIconData => [:int],
234
- :GuiSetIconData => [:int, :pointer],
235
- :GuiSetIconPixel => [:int, :int, :int],
236
- :GuiClearIconPixel => [:int, :int, :int],
237
- :GuiCheckIconPixel => [:int, :int, :int],
238
- }
239
- retvals = {
240
- :GuiEnable => :void,
241
- :GuiDisable => :void,
242
- :GuiLock => :void,
243
- :GuiUnlock => :void,
244
- :GuiIsLocked => :bool,
245
- :GuiFade => :void,
246
- :GuiSetState => :void,
247
- :GuiGetState => :int,
248
- :GuiSetFont => :void,
249
- :GuiGetFont => Font.by_value,
250
- :GuiSetStyle => :void,
251
- :GuiGetStyle => :int,
252
- :GuiWindowBox => :bool,
253
- :GuiGroupBox => :void,
254
- :GuiLine => :void,
255
- :GuiPanel => :void,
256
- :GuiScrollPanel => Rectangle.by_value,
257
- :GuiLabel => :void,
258
- :GuiButton => :bool,
259
- :GuiLabelButton => :bool,
260
- :GuiToggle => :bool,
261
- :GuiToggleGroup => :int,
262
- :GuiCheckBox => :bool,
263
- :GuiComboBox => :int,
264
- :GuiDropdownBox => :bool,
265
- :GuiSpinner => :bool,
266
- :GuiValueBox => :bool,
267
- :GuiTextBox => :bool,
268
- :GuiTextBoxMulti => :bool,
269
- :GuiSlider => :float,
270
- :GuiSliderBar => :float,
271
- :GuiProgressBar => :float,
272
- :GuiStatusBar => :void,
273
- :GuiDummyRec => :void,
274
- :GuiScrollBar => :int,
275
- :GuiGrid => Vector2.by_value,
276
- :GuiListView => :int,
277
- :GuiListViewEx => :int,
278
- :GuiMessageBox => :int,
279
- :GuiTextInputBox => :int,
280
- :GuiColorPicker => Color.by_value,
281
- :GuiColorPanel => Color.by_value,
282
- :GuiColorBarAlpha => :float,
283
- :GuiColorBarHue => :float,
284
- :GuiLoadStyle => :void,
285
- :GuiLoadStyleDefault => :void,
286
- :GuiIconText => :pointer,
287
- :GuiDrawIcon => :void,
288
- :GuiGetIcons => :pointer,
289
- :GuiGetIconData => :pointer,
290
- :GuiSetIconData => :void,
291
- :GuiSetIconPixel => :void,
292
- :GuiClearIconPixel => :void,
293
- :GuiCheckIconPixel => :bool,
294
- }
295
- symbols.each do |sym|
296
- begin
297
- attach_function sym, args[sym], retvals[sym]
298
- rescue FFI::NotFoundError => error
299
- $stderr.puts("[Warning] Failed to import #{sym} (#{error}).")
300
- end
301
- end
302
- end
303
-
304
- end
305
-
1
+ # Yet another raylib wrapper for Ruby
2
+ #
3
+ # * https://github.com/vaiorabbit/raylib-bindings
4
+ #
5
+ # [NOTICE] This is an automatically generated file.
6
+
7
+ require 'ffi'
8
+
9
+ module Raylib
10
+ extend FFI::Library
11
+ # Define/Macro
12
+
13
+ RAYGUI_VERSION = "3.2-dev"
14
+ SCROLLBAR_LEFT_SIDE = 0
15
+ SCROLLBAR_RIGHT_SIDE = 1
16
+
17
+ # Enum
18
+
19
+ GUI_STATE_NORMAL = 0
20
+ GUI_STATE_FOCUSED = 1
21
+ GUI_STATE_PRESSED = 2
22
+ GUI_STATE_DISABLED = 3
23
+ GUI_TEXT_ALIGN_LEFT = 0
24
+ GUI_TEXT_ALIGN_CENTER = 1
25
+ GUI_TEXT_ALIGN_RIGHT = 2
26
+ DEFAULT = 0
27
+ LABEL = 1
28
+ BUTTON = 2
29
+ TOGGLE = 3
30
+ SLIDER = 4
31
+ PROGRESSBAR = 5
32
+ CHECKBOX = 6
33
+ COMBOBOX = 7
34
+ DROPDOWNBOX = 8
35
+ TEXTBOX = 9
36
+ VALUEBOX = 10
37
+ SPINNER = 11
38
+ LISTVIEW = 12
39
+ COLORPICKER = 13
40
+ SCROLLBAR = 14
41
+ STATUSBAR = 15
42
+ BORDER_COLOR_NORMAL = 0
43
+ BASE_COLOR_NORMAL = 1
44
+ TEXT_COLOR_NORMAL = 2
45
+ BORDER_COLOR_FOCUSED = 3
46
+ BASE_COLOR_FOCUSED = 4
47
+ TEXT_COLOR_FOCUSED = 5
48
+ BORDER_COLOR_PRESSED = 6
49
+ BASE_COLOR_PRESSED = 7
50
+ TEXT_COLOR_PRESSED = 8
51
+ BORDER_COLOR_DISABLED = 9
52
+ BASE_COLOR_DISABLED = 10
53
+ TEXT_COLOR_DISABLED = 11
54
+ BORDER_WIDTH = 12
55
+ TEXT_PADDING = 13
56
+ TEXT_ALIGNMENT = 14
57
+ RESERVED = 15
58
+ TEXT_SIZE = 16
59
+ TEXT_SPACING = 17
60
+ LINE_COLOR = 18
61
+ BACKGROUND_COLOR = 19
62
+ GROUP_PADDING = 16
63
+ SLIDER_WIDTH = 16
64
+ SLIDER_PADDING = 17
65
+ PROGRESS_PADDING = 16
66
+ ARROWS_SIZE = 16
67
+ ARROWS_VISIBLE = 17
68
+ SCROLL_SLIDER_PADDING = 18
69
+ SCROLL_SLIDER_SIZE = 19
70
+ SCROLL_PADDING = 20
71
+ SCROLL_SPEED = 21
72
+ CHECK_PADDING = 16
73
+ COMBO_BUTTON_WIDTH = 16
74
+ COMBO_BUTTON_SPACING = 17
75
+ ARROW_PADDING = 16
76
+ DROPDOWN_ITEMS_SPACING = 17
77
+ TEXT_INNER_PADDING = 16
78
+ TEXT_LINES_SPACING = 17
79
+ SPIN_BUTTON_WIDTH = 16
80
+ SPIN_BUTTON_SPACING = 17
81
+ LIST_ITEMS_HEIGHT = 16
82
+ LIST_ITEMS_SPACING = 17
83
+ SCROLLBAR_WIDTH = 18
84
+ SCROLLBAR_SIDE = 19
85
+ COLOR_SELECTOR_SIZE = 16
86
+ HUEBAR_WIDTH = 17
87
+ HUEBAR_PADDING = 18
88
+ HUEBAR_SELECTOR_HEIGHT = 19
89
+ HUEBAR_SELECTOR_OVERFLOW = 20
90
+ RAYGUI_ICON_NONE = 0
91
+ RAYGUI_ICON_FOLDER_FILE_OPEN = 1
92
+ RAYGUI_ICON_FILE_SAVE_CLASSIC = 2
93
+ RAYGUI_ICON_FOLDER_OPEN = 3
94
+ RAYGUI_ICON_FOLDER_SAVE = 4
95
+ RAYGUI_ICON_FILE_OPEN = 5
96
+ RAYGUI_ICON_FILE_SAVE = 6
97
+ RAYGUI_ICON_FILE_EXPORT = 7
98
+ RAYGUI_ICON_FILE_NEW = 8
99
+ RAYGUI_ICON_FILE_DELETE = 9
100
+ RAYGUI_ICON_FILETYPE_TEXT = 10
101
+ RAYGUI_ICON_FILETYPE_AUDIO = 11
102
+ RAYGUI_ICON_FILETYPE_IMAGE = 12
103
+ RAYGUI_ICON_FILETYPE_PLAY = 13
104
+ RAYGUI_ICON_FILETYPE_VIDEO = 14
105
+ RAYGUI_ICON_FILETYPE_INFO = 15
106
+ RAYGUI_ICON_FILE_COPY = 16
107
+ RAYGUI_ICON_FILE_CUT = 17
108
+ RAYGUI_ICON_FILE_PASTE = 18
109
+ RAYGUI_ICON_CURSOR_HAND = 19
110
+ RAYGUI_ICON_CURSOR_POINTER = 20
111
+ RAYGUI_ICON_CURSOR_CLASSIC = 21
112
+ RAYGUI_ICON_PENCIL = 22
113
+ RAYGUI_ICON_PENCIL_BIG = 23
114
+ RAYGUI_ICON_BRUSH_CLASSIC = 24
115
+ RAYGUI_ICON_BRUSH_PAINTER = 25
116
+ RAYGUI_ICON_WATER_DROP = 26
117
+ RAYGUI_ICON_COLOR_PICKER = 27
118
+ RAYGUI_ICON_RUBBER = 28
119
+ RAYGUI_ICON_COLOR_BUCKET = 29
120
+ RAYGUI_ICON_TEXT_T = 30
121
+ RAYGUI_ICON_TEXT_A = 31
122
+ RAYGUI_ICON_SCALE = 32
123
+ RAYGUI_ICON_RESIZE = 33
124
+ RAYGUI_ICON_FILTER_POINT = 34
125
+ RAYGUI_ICON_FILTER_BILINEAR = 35
126
+ RAYGUI_ICON_CROP = 36
127
+ RAYGUI_ICON_CROP_ALPHA = 37
128
+ RAYGUI_ICON_SQUARE_TOGGLE = 38
129
+ RAYGUI_ICON_SYMMETRY = 39
130
+ RAYGUI_ICON_SYMMETRY_HORIZONTAL = 40
131
+ RAYGUI_ICON_SYMMETRY_VERTICAL = 41
132
+ RAYGUI_ICON_LENS = 42
133
+ RAYGUI_ICON_LENS_BIG = 43
134
+ RAYGUI_ICON_EYE_ON = 44
135
+ RAYGUI_ICON_EYE_OFF = 45
136
+ RAYGUI_ICON_FILTER_TOP = 46
137
+ RAYGUI_ICON_FILTER = 47
138
+ RAYGUI_ICON_TARGET_POINT = 48
139
+ RAYGUI_ICON_TARGET_SMALL = 49
140
+ RAYGUI_ICON_TARGET_BIG = 50
141
+ RAYGUI_ICON_TARGET_MOVE = 51
142
+ RAYGUI_ICON_CURSOR_MOVE = 52
143
+ RAYGUI_ICON_CURSOR_SCALE = 53
144
+ RAYGUI_ICON_CURSOR_SCALE_RIGHT = 54
145
+ RAYGUI_ICON_CURSOR_SCALE_LEFT = 55
146
+ RAYGUI_ICON_UNDO = 56
147
+ RAYGUI_ICON_REDO = 57
148
+ RAYGUI_ICON_REREDO = 58
149
+ RAYGUI_ICON_MUTATE = 59
150
+ RAYGUI_ICON_ROTATE = 60
151
+ RAYGUI_ICON_REPEAT = 61
152
+ RAYGUI_ICON_SHUFFLE = 62
153
+ RAYGUI_ICON_EMPTYBOX = 63
154
+ RAYGUI_ICON_TARGET = 64
155
+ RAYGUI_ICON_TARGET_SMALL_FILL = 65
156
+ RAYGUI_ICON_TARGET_BIG_FILL = 66
157
+ RAYGUI_ICON_TARGET_MOVE_FILL = 67
158
+ RAYGUI_ICON_CURSOR_MOVE_FILL = 68
159
+ RAYGUI_ICON_CURSOR_SCALE_FILL = 69
160
+ RAYGUI_ICON_CURSOR_SCALE_RIGHT_FILL = 70
161
+ RAYGUI_ICON_CURSOR_SCALE_LEFT_FILL = 71
162
+ RAYGUI_ICON_UNDO_FILL = 72
163
+ RAYGUI_ICON_REDO_FILL = 73
164
+ RAYGUI_ICON_REREDO_FILL = 74
165
+ RAYGUI_ICON_MUTATE_FILL = 75
166
+ RAYGUI_ICON_ROTATE_FILL = 76
167
+ RAYGUI_ICON_REPEAT_FILL = 77
168
+ RAYGUI_ICON_SHUFFLE_FILL = 78
169
+ RAYGUI_ICON_EMPTYBOX_SMALL = 79
170
+ RAYGUI_ICON_BOX = 80
171
+ RAYGUI_ICON_BOX_TOP = 81
172
+ RAYGUI_ICON_BOX_TOP_RIGHT = 82
173
+ RAYGUI_ICON_BOX_RIGHT = 83
174
+ RAYGUI_ICON_BOX_BOTTOM_RIGHT = 84
175
+ RAYGUI_ICON_BOX_BOTTOM = 85
176
+ RAYGUI_ICON_BOX_BOTTOM_LEFT = 86
177
+ RAYGUI_ICON_BOX_LEFT = 87
178
+ RAYGUI_ICON_BOX_TOP_LEFT = 88
179
+ RAYGUI_ICON_BOX_CENTER = 89
180
+ RAYGUI_ICON_BOX_CIRCLE_MASK = 90
181
+ RAYGUI_ICON_POT = 91
182
+ RAYGUI_ICON_ALPHA_MULTIPLY = 92
183
+ RAYGUI_ICON_ALPHA_CLEAR = 93
184
+ RAYGUI_ICON_DITHERING = 94
185
+ RAYGUI_ICON_MIPMAPS = 95
186
+ RAYGUI_ICON_BOX_GRID = 96
187
+ RAYGUI_ICON_GRID = 97
188
+ RAYGUI_ICON_BOX_CORNERS_SMALL = 98
189
+ RAYGUI_ICON_BOX_CORNERS_BIG = 99
190
+ RAYGUI_ICON_FOUR_BOXES = 100
191
+ RAYGUI_ICON_GRID_FILL = 101
192
+ RAYGUI_ICON_BOX_MULTISIZE = 102
193
+ RAYGUI_ICON_ZOOM_SMALL = 103
194
+ RAYGUI_ICON_ZOOM_MEDIUM = 104
195
+ RAYGUI_ICON_ZOOM_BIG = 105
196
+ RAYGUI_ICON_ZOOM_ALL = 106
197
+ RAYGUI_ICON_ZOOM_CENTER = 107
198
+ RAYGUI_ICON_BOX_DOTS_SMALL = 108
199
+ RAYGUI_ICON_BOX_DOTS_BIG = 109
200
+ RAYGUI_ICON_BOX_CONCENTRIC = 110
201
+ RAYGUI_ICON_BOX_GRID_BIG = 111
202
+ RAYGUI_ICON_OK_TICK = 112
203
+ RAYGUI_ICON_CROSS = 113
204
+ RAYGUI_ICON_ARROW_LEFT = 114
205
+ RAYGUI_ICON_ARROW_RIGHT = 115
206
+ RAYGUI_ICON_ARROW_DOWN = 116
207
+ RAYGUI_ICON_ARROW_UP = 117
208
+ RAYGUI_ICON_ARROW_LEFT_FILL = 118
209
+ RAYGUI_ICON_ARROW_RIGHT_FILL = 119
210
+ RAYGUI_ICON_ARROW_DOWN_FILL = 120
211
+ RAYGUI_ICON_ARROW_UP_FILL = 121
212
+ RAYGUI_ICON_AUDIO = 122
213
+ RAYGUI_ICON_FX = 123
214
+ RAYGUI_ICON_WAVE = 124
215
+ RAYGUI_ICON_WAVE_SINUS = 125
216
+ RAYGUI_ICON_WAVE_SQUARE = 126
217
+ RAYGUI_ICON_WAVE_TRIANGULAR = 127
218
+ RAYGUI_ICON_CROSS_SMALL = 128
219
+ RAYGUI_ICON_PLAYER_PREVIOUS = 129
220
+ RAYGUI_ICON_PLAYER_PLAY_BACK = 130
221
+ RAYGUI_ICON_PLAYER_PLAY = 131
222
+ RAYGUI_ICON_PLAYER_PAUSE = 132
223
+ RAYGUI_ICON_PLAYER_STOP = 133
224
+ RAYGUI_ICON_PLAYER_NEXT = 134
225
+ RAYGUI_ICON_PLAYER_RECORD = 135
226
+ RAYGUI_ICON_MAGNET = 136
227
+ RAYGUI_ICON_LOCK_CLOSE = 137
228
+ RAYGUI_ICON_LOCK_OPEN = 138
229
+ RAYGUI_ICON_CLOCK = 139
230
+ RAYGUI_ICON_TOOLS = 140
231
+ RAYGUI_ICON_GEAR = 141
232
+ RAYGUI_ICON_GEAR_BIG = 142
233
+ RAYGUI_ICON_BIN = 143
234
+ RAYGUI_ICON_HAND_POINTER = 144
235
+ RAYGUI_ICON_LASER = 145
236
+ RAYGUI_ICON_COIN = 146
237
+ RAYGUI_ICON_EXPLOSION = 147
238
+ RAYGUI_ICON_1UP = 148
239
+ RAYGUI_ICON_PLAYER = 149
240
+ RAYGUI_ICON_PLAYER_JUMP = 150
241
+ RAYGUI_ICON_KEY = 151
242
+ RAYGUI_ICON_DEMON = 152
243
+ RAYGUI_ICON_TEXT_POPUP = 153
244
+ RAYGUI_ICON_GEAR_EX = 154
245
+ RAYGUI_ICON_CRACK = 155
246
+ RAYGUI_ICON_CRACK_POINTS = 156
247
+ RAYGUI_ICON_STAR = 157
248
+ RAYGUI_ICON_DOOR = 158
249
+ RAYGUI_ICON_EXIT = 159
250
+ RAYGUI_ICON_MODE_2D = 160
251
+ RAYGUI_ICON_MODE_3D = 161
252
+ RAYGUI_ICON_CUBE = 162
253
+ RAYGUI_ICON_CUBE_FACE_TOP = 163
254
+ RAYGUI_ICON_CUBE_FACE_LEFT = 164
255
+ RAYGUI_ICON_CUBE_FACE_FRONT = 165
256
+ RAYGUI_ICON_CUBE_FACE_BOTTOM = 166
257
+ RAYGUI_ICON_CUBE_FACE_RIGHT = 167
258
+ RAYGUI_ICON_CUBE_FACE_BACK = 168
259
+ RAYGUI_ICON_CAMERA = 169
260
+ RAYGUI_ICON_SPECIAL = 170
261
+ RAYGUI_ICON_LINK_NET = 171
262
+ RAYGUI_ICON_LINK_BOXES = 172
263
+ RAYGUI_ICON_LINK_MULTI = 173
264
+ RAYGUI_ICON_LINK = 174
265
+ RAYGUI_ICON_LINK_BROKE = 175
266
+ RAYGUI_ICON_TEXT_NOTES = 176
267
+ RAYGUI_ICON_NOTEBOOK = 177
268
+ RAYGUI_ICON_SUITCASE = 178
269
+ RAYGUI_ICON_SUITCASE_ZIP = 179
270
+ RAYGUI_ICON_MAILBOX = 180
271
+ RAYGUI_ICON_MONITOR = 181
272
+ RAYGUI_ICON_PRINTER = 182
273
+ RAYGUI_ICON_PHOTO_CAMERA = 183
274
+ RAYGUI_ICON_PHOTO_CAMERA_FLASH = 184
275
+ RAYGUI_ICON_HOUSE = 185
276
+ RAYGUI_ICON_HEART = 186
277
+ RAYGUI_ICON_CORNER = 187
278
+ RAYGUI_ICON_VERTICAL_BARS = 188
279
+ RAYGUI_ICON_VERTICAL_BARS_FILL = 189
280
+ RAYGUI_ICON_LIFE_BARS = 190
281
+ RAYGUI_ICON_INFO = 191
282
+ RAYGUI_ICON_CROSSLINE = 192
283
+ RAYGUI_ICON_HELP = 193
284
+ RAYGUI_ICON_FILETYPE_ALPHA = 194
285
+ RAYGUI_ICON_FILETYPE_HOME = 195
286
+ RAYGUI_ICON_LAYERS_VISIBLE = 196
287
+ RAYGUI_ICON_LAYERS = 197
288
+ RAYGUI_ICON_WINDOW = 198
289
+ RAYGUI_ICON_HIDPI = 199
290
+ RAYGUI_ICON_FILETYPE_BINARY = 200
291
+ RAYGUI_ICON_HEX = 201
292
+ RAYGUI_ICON_SHIELD = 202
293
+ RAYGUI_ICON_203 = 203
294
+ RAYGUI_ICON_204 = 204
295
+ RAYGUI_ICON_205 = 205
296
+ RAYGUI_ICON_206 = 206
297
+ RAYGUI_ICON_207 = 207
298
+ RAYGUI_ICON_208 = 208
299
+ RAYGUI_ICON_209 = 209
300
+ RAYGUI_ICON_210 = 210
301
+ RAYGUI_ICON_211 = 211
302
+ RAYGUI_ICON_212 = 212
303
+ RAYGUI_ICON_213 = 213
304
+ RAYGUI_ICON_214 = 214
305
+ RAYGUI_ICON_215 = 215
306
+ RAYGUI_ICON_216 = 216
307
+ RAYGUI_ICON_217 = 217
308
+ RAYGUI_ICON_218 = 218
309
+ RAYGUI_ICON_219 = 219
310
+ RAYGUI_ICON_220 = 220
311
+ RAYGUI_ICON_221 = 221
312
+ RAYGUI_ICON_222 = 222
313
+ RAYGUI_ICON_223 = 223
314
+ RAYGUI_ICON_224 = 224
315
+ RAYGUI_ICON_225 = 225
316
+ RAYGUI_ICON_226 = 226
317
+ RAYGUI_ICON_227 = 227
318
+ RAYGUI_ICON_228 = 228
319
+ RAYGUI_ICON_229 = 229
320
+ RAYGUI_ICON_230 = 230
321
+ RAYGUI_ICON_231 = 231
322
+ RAYGUI_ICON_232 = 232
323
+ RAYGUI_ICON_233 = 233
324
+ RAYGUI_ICON_234 = 234
325
+ RAYGUI_ICON_235 = 235
326
+ RAYGUI_ICON_236 = 236
327
+ RAYGUI_ICON_237 = 237
328
+ RAYGUI_ICON_238 = 238
329
+ RAYGUI_ICON_239 = 239
330
+ RAYGUI_ICON_240 = 240
331
+ RAYGUI_ICON_241 = 241
332
+ RAYGUI_ICON_242 = 242
333
+ RAYGUI_ICON_243 = 243
334
+ RAYGUI_ICON_244 = 244
335
+ RAYGUI_ICON_245 = 245
336
+ RAYGUI_ICON_246 = 246
337
+ RAYGUI_ICON_247 = 247
338
+ RAYGUI_ICON_248 = 248
339
+ RAYGUI_ICON_249 = 249
340
+ RAYGUI_ICON_250 = 250
341
+ RAYGUI_ICON_251 = 251
342
+ RAYGUI_ICON_252 = 252
343
+ RAYGUI_ICON_253 = 253
344
+ RAYGUI_ICON_254 = 254
345
+ RAYGUI_ICON_255 = 255
346
+
347
+ # Typedef
348
+
349
+ typedef :int, :GuiControlState
350
+ typedef :int, :GuiTextAlignment
351
+ typedef :int, :GuiControl
352
+ typedef :int, :GuiControlProperty
353
+ typedef :int, :GuiDefaultProperty
354
+ typedef :int, :GuiToggleProperty
355
+ typedef :int, :GuiSliderProperty
356
+ typedef :int, :GuiProgressBarProperty
357
+ typedef :int, :GuiScrollBarProperty
358
+ typedef :int, :GuiCheckBoxProperty
359
+ typedef :int, :GuiComboBoxProperty
360
+ typedef :int, :GuiDropdownBoxProperty
361
+ typedef :int, :GuiTextBoxProperty
362
+ typedef :int, :GuiSpinnerProperty
363
+ typedef :int, :GuiListViewProperty
364
+ typedef :int, :GuiColorPickerProperty
365
+ typedef :int, :guiIconName
366
+
367
+ # Struct
368
+
369
+ class GuiStyleProp < FFI::Struct
370
+ layout(
371
+ :controlId, :ushort,
372
+ :propertyId, :ushort,
373
+ :propertyValue, :int,
374
+ )
375
+ end
376
+
377
+
378
+ # Function
379
+
380
+ def self.setup_raygui_symbols()
381
+ symbols = [
382
+ :GuiEnable,
383
+ :GuiDisable,
384
+ :GuiLock,
385
+ :GuiUnlock,
386
+ :GuiIsLocked,
387
+ :GuiFade,
388
+ :GuiSetState,
389
+ :GuiGetState,
390
+ :GuiSetFont,
391
+ :GuiGetFont,
392
+ :GuiSetStyle,
393
+ :GuiGetStyle,
394
+ :GuiWindowBox,
395
+ :GuiGroupBox,
396
+ :GuiLine,
397
+ :GuiPanel,
398
+ :GuiScrollPanel,
399
+ :GuiLabel,
400
+ :GuiButton,
401
+ :GuiLabelButton,
402
+ :GuiToggle,
403
+ :GuiToggleGroup,
404
+ :GuiCheckBox,
405
+ :GuiComboBox,
406
+ :GuiDropdownBox,
407
+ :GuiSpinner,
408
+ :GuiValueBox,
409
+ :GuiTextBox,
410
+ :GuiTextBoxMulti,
411
+ :GuiSlider,
412
+ :GuiSliderBar,
413
+ :GuiProgressBar,
414
+ :GuiStatusBar,
415
+ :GuiDummyRec,
416
+ :GuiGrid,
417
+ :GuiListView,
418
+ :GuiListViewEx,
419
+ :GuiMessageBox,
420
+ :GuiTextInputBox,
421
+ :GuiColorPicker,
422
+ :GuiColorPanel,
423
+ :GuiColorBarAlpha,
424
+ :GuiColorBarHue,
425
+ :GuiLoadStyle,
426
+ :GuiLoadStyleDefault,
427
+ :GuiIconText,
428
+ :GuiDrawIcon,
429
+ :GuiGetIcons,
430
+ :GuiGetIconData,
431
+ :GuiSetIconData,
432
+ :GuiSetIconPixel,
433
+ :GuiClearIconPixel,
434
+ :GuiCheckIconPixel,
435
+ ]
436
+ args = {
437
+ :GuiEnable => [],
438
+ :GuiDisable => [],
439
+ :GuiLock => [],
440
+ :GuiUnlock => [],
441
+ :GuiIsLocked => [],
442
+ :GuiFade => [:float],
443
+ :GuiSetState => [:int],
444
+ :GuiGetState => [],
445
+ :GuiSetFont => [Font.by_value],
446
+ :GuiGetFont => [],
447
+ :GuiSetStyle => [:int, :int, :int],
448
+ :GuiGetStyle => [:int, :int],
449
+ :GuiWindowBox => [Rectangle.by_value, :pointer],
450
+ :GuiGroupBox => [Rectangle.by_value, :pointer],
451
+ :GuiLine => [Rectangle.by_value, :pointer],
452
+ :GuiPanel => [Rectangle.by_value, :pointer],
453
+ :GuiScrollPanel => [Rectangle.by_value, :pointer, Rectangle.by_value, :pointer],
454
+ :GuiLabel => [Rectangle.by_value, :pointer],
455
+ :GuiButton => [Rectangle.by_value, :pointer],
456
+ :GuiLabelButton => [Rectangle.by_value, :pointer],
457
+ :GuiToggle => [Rectangle.by_value, :pointer, :bool],
458
+ :GuiToggleGroup => [Rectangle.by_value, :pointer, :int],
459
+ :GuiCheckBox => [Rectangle.by_value, :pointer, :bool],
460
+ :GuiComboBox => [Rectangle.by_value, :pointer, :int],
461
+ :GuiDropdownBox => [Rectangle.by_value, :pointer, :pointer, :bool],
462
+ :GuiSpinner => [Rectangle.by_value, :pointer, :pointer, :int, :int, :bool],
463
+ :GuiValueBox => [Rectangle.by_value, :pointer, :pointer, :int, :int, :bool],
464
+ :GuiTextBox => [Rectangle.by_value, :pointer, :int, :bool],
465
+ :GuiTextBoxMulti => [Rectangle.by_value, :pointer, :int, :bool],
466
+ :GuiSlider => [Rectangle.by_value, :pointer, :pointer, :float, :float, :float],
467
+ :GuiSliderBar => [Rectangle.by_value, :pointer, :pointer, :float, :float, :float],
468
+ :GuiProgressBar => [Rectangle.by_value, :pointer, :pointer, :float, :float, :float],
469
+ :GuiStatusBar => [Rectangle.by_value, :pointer],
470
+ :GuiDummyRec => [Rectangle.by_value, :pointer],
471
+ :GuiGrid => [Rectangle.by_value, :pointer, :float, :int],
472
+ :GuiListView => [Rectangle.by_value, :pointer, :pointer, :int],
473
+ :GuiListViewEx => [Rectangle.by_value, :pointer, :int, :pointer, :pointer, :int],
474
+ :GuiMessageBox => [Rectangle.by_value, :pointer, :pointer, :pointer],
475
+ :GuiTextInputBox => [Rectangle.by_value, :pointer, :pointer, :pointer, :pointer],
476
+ :GuiColorPicker => [Rectangle.by_value, :pointer, Color.by_value],
477
+ :GuiColorPanel => [Rectangle.by_value, :pointer, Color.by_value],
478
+ :GuiColorBarAlpha => [Rectangle.by_value, :pointer, :float],
479
+ :GuiColorBarHue => [Rectangle.by_value, :pointer, :float],
480
+ :GuiLoadStyle => [:pointer],
481
+ :GuiLoadStyleDefault => [],
482
+ :GuiIconText => [:int, :pointer],
483
+ :GuiDrawIcon => [:int, :int, :int, :int, Color.by_value],
484
+ :GuiGetIcons => [],
485
+ :GuiGetIconData => [:int],
486
+ :GuiSetIconData => [:int, :pointer],
487
+ :GuiSetIconPixel => [:int, :int, :int],
488
+ :GuiClearIconPixel => [:int, :int, :int],
489
+ :GuiCheckIconPixel => [:int, :int, :int],
490
+ }
491
+ retvals = {
492
+ :GuiEnable => :void,
493
+ :GuiDisable => :void,
494
+ :GuiLock => :void,
495
+ :GuiUnlock => :void,
496
+ :GuiIsLocked => :bool,
497
+ :GuiFade => :void,
498
+ :GuiSetState => :void,
499
+ :GuiGetState => :int,
500
+ :GuiSetFont => :void,
501
+ :GuiGetFont => Font.by_value,
502
+ :GuiSetStyle => :void,
503
+ :GuiGetStyle => :int,
504
+ :GuiWindowBox => :bool,
505
+ :GuiGroupBox => :void,
506
+ :GuiLine => :void,
507
+ :GuiPanel => :void,
508
+ :GuiScrollPanel => Rectangle.by_value,
509
+ :GuiLabel => :void,
510
+ :GuiButton => :bool,
511
+ :GuiLabelButton => :bool,
512
+ :GuiToggle => :bool,
513
+ :GuiToggleGroup => :int,
514
+ :GuiCheckBox => :bool,
515
+ :GuiComboBox => :int,
516
+ :GuiDropdownBox => :bool,
517
+ :GuiSpinner => :bool,
518
+ :GuiValueBox => :bool,
519
+ :GuiTextBox => :bool,
520
+ :GuiTextBoxMulti => :bool,
521
+ :GuiSlider => :float,
522
+ :GuiSliderBar => :float,
523
+ :GuiProgressBar => :float,
524
+ :GuiStatusBar => :void,
525
+ :GuiDummyRec => :void,
526
+ :GuiGrid => Vector2.by_value,
527
+ :GuiListView => :int,
528
+ :GuiListViewEx => :int,
529
+ :GuiMessageBox => :int,
530
+ :GuiTextInputBox => :int,
531
+ :GuiColorPicker => Color.by_value,
532
+ :GuiColorPanel => Color.by_value,
533
+ :GuiColorBarAlpha => :float,
534
+ :GuiColorBarHue => :float,
535
+ :GuiLoadStyle => :void,
536
+ :GuiLoadStyleDefault => :void,
537
+ :GuiIconText => :pointer,
538
+ :GuiDrawIcon => :void,
539
+ :GuiGetIcons => :pointer,
540
+ :GuiGetIconData => :pointer,
541
+ :GuiSetIconData => :void,
542
+ :GuiSetIconPixel => :void,
543
+ :GuiClearIconPixel => :void,
544
+ :GuiCheckIconPixel => :bool,
545
+ }
546
+ symbols.each do |sym|
547
+ begin
548
+ attach_function sym, args[sym], retvals[sym]
549
+ rescue FFI::NotFoundError => error
550
+ $stderr.puts("[Warning] Failed to import #{sym} (#{error}).")
551
+ end
552
+ end
553
+ end
554
+
555
+ end
556
+