]> gitweb.factorcode.org Git - factor.git/blob - extra/raylib/raylib-docs.factor
raylib: fix help-lint
[factor.git] / extra / raylib / raylib-docs.factor
1 ! Copyright (C) 2023 CapitalEx.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: accessors alien alien.c-types arrays help.markup
4 help.syntax kernel make math math.parser quotations sequences
5 strings urls ;
6 FROM: alien.c-types => float ;
7 IN: raylib
8
9 <PRIVATE
10 : $enum-members ( element -- )
11     "Enum members" $heading
12     first lookup-c-type members>> [ first ] map $subsections ;
13
14 : $raylib-color ( element -- )
15     "Word description" $heading
16     { { "value" Color } } $values
17     "Represents the color (" print-element print-element ")" print-element
18     "\n\n" print-element
19     "For a visual guide, see the following:\n" print-element
20     { "https://raw.githubusercontent.com/raysan5/raylib/master/examples/shapes/shapes_colors_palette.png" }
21         $url ;
22
23 GENERIC: ($raylib-key) ( array -- )
24 PREDICATE: triple < array length>> 3 = ;
25
26 M: pair ($raylib-key)
27     "Represents the key " print-element
28     first2 [ % " (" % # ")" % ] "" make $snippet
29     "." print-element ;
30
31 M: triple ($raylib-key)
32     unclip-last swap ($raylib-key) " " [ print-element ] bi@ ;
33
34
35 : $raylib-key ( element -- )
36     "Enum value description" $heading
37     ($raylib-key)
38     { $see-also KeyboardKey } print-element ;
39
40 PRIVATE>
41
42 ! Raylib version info
43 HELP: RAYLIB_VERSION_MAJOR
44 { $values
45     value: fixnum
46 }
47 { $description
48     The current major version of raylib.
49 } ;
50
51 HELP: RAYLIB_VERSION_MINOR
52 { $values
53     value: fixnum
54 }
55 { $description
56     The current minor version of raylib.
57 } ;
58
59 HELP: RAYLIB_VERSION_PATCH
60 { $values
61     value: fixnum
62 }
63 { $description
64     The current patch version of raylib.
65 } ;
66
67 HELP: RAYLIB_VERSION
68 { $values
69     value: string
70 }
71 { $description
72     A string representing the current version of raylib.
73 } ;
74
75
76 ! Config flag enum
77 HELP: ConfigFlags
78 { $var-description
79     An enum representing the various configuration flags in Raylib.
80
81     { $enum-members ConfigFlags } } ;
82
83 HELP: FLAG_VSYNC_HINT
84 { $class-description
85     Setting this flag will attempt to enable v-sync on the GPU.
86     { $see-also ConfigFlags } } ;
87
88 HELP: FLAG_FULLSCREEN_MODE
89 { $class-description
90     Setting this flag will run the program in fullscreen
91     { $see-also ConfigFlags } } ;
92
93 HELP: FLAG_WINDOW_RESIZABLE
94 { $class-description
95     Setting this flag allows for resizing the window.
96     { $see-also ConfigFlags } } ;
97
98 HELP: FLAG_WINDOW_UNDECORATED
99 { $class-description
100     Setting this flag remove window decorations (frame and buttons).
101     { $see-also ConfigFlags } } ;
102
103 HELP: FLAG_WINDOW_HIDDEN
104 { $class-description
105     Setting this flag will hide the window.
106     { $see-also ConfigFlags } } ;
107
108 HELP: FLAG_WINDOW_MINIMIZED
109 { $class-description
110     Setting this flag will minize the window.
111     { $see-also ConfigFlags } } ;
112
113 HELP: FLAG_WINDOW_MAXIMIZED
114 { $class-description
115     Setting this flag will maximize the window to the monitor size.
116     { $see-also ConfigFlags } } ;
117
118 HELP: FLAG_WINDOW_UNFOCUSED
119 { $class-description
120     Setting this flag will set the window to be unfocused.
121     { $see-also ConfigFlags } } ;
122
123 HELP: FLAG_WINDOW_TOPMOST
124 { $class-description
125     Setting this flag sets the window to always be on top.
126     { $see-also ConfigFlags } } ;
127
128 HELP: FLAG_WINDOW_ALWAYS_RUN
129 { $class-description
130     Setting this flag allows the window to run while minimized.
131     { $see-also ConfigFlags } } ;
132
133 HELP: FLAG_WINDOW_TRANSPARENT
134 { $class-description
135     Setting this flag allows for transparent framebuffer.
136     { $see-also ConfigFlags } } ;
137
138 HELP: FLAG_WINDOW_HIGHDPI
139 { $class-description
140     Setting this flag will enable HighDPI support.
141     { $see-also ConfigFlags } } ;
142
143 HELP: FLAG_MSAA_4X_HINT
144 { $class-description
145     Setting this flag will attempt to enable MSAA 4x.
146     { $see-also ConfigFlags } } ;
147
148 HELP: FLAG_INTERLACED_HINT
149 { $class-description
150     Setting this flag will attempt to enable the interlaced video
151     format for V3D.
152     { $see-also ConfigFlags } } ;
153
154
155 ! Trace log level enum
156 HELP: TraceLogLevel
157 { $var-description
158     Represents the various logging levels in Raylib.
159     Logs are displayed using the system's standard output.
160
161     { $enum-members TraceLogLevel } } ;
162
163 HELP: LOG_ALL
164 { $class-description
165     Displays all logs.
166
167     { $see-also TraceLogLevel } } ;
168
169 HELP: LOG_TRACE
170 { $class-description
171     Deplays trace logging. \ LOG_TRACE meant for internal usage.
172
173     { $see-also TraceLogLevel } } ;
174
175 HELP: LOG_INFO
176 { $class-description
177     Displays debugging logs. { $snippet LOG_INFO } is used for internal
178     debugging and should be disabled on release builds.
179
180     { $see-also TraceLogLevel } } ;
181
182 HELP: LOG_WARNING
183 { $class-description
184     Displays warning logs. Warnings are recoverable failures.
185
186     { $see-also TraceLogLevel } } ;
187
188 HELP: LOG_ERROR
189 { $class-description
190     Displays error logs. Errors are unrecoverable failures.
191
192     { $see-also TraceLogLevel } } ;
193
194 HELP: LOG_FATAL
195 { $class-description
196     Displays fatal logs. Fatal errors are used while aborting
197     the program.
198     { $see-also TraceLogLevel } } ;
199
200 HELP: LOG_NONE
201 { $class-description
202     Disables raylib logging.
203
204     { $see-also TraceLogLevel } } ;
205
206
207 ! Keyboard key enum
208 HELP: KeyboardKey
209 { $var-description
210     An enum representing the various key codes Raylib can produce.
211     These codes are based on the physical layout of a US QWERTY
212     keyboard layout. Use \ get-key-pressed to allow for defining
213     alternative layouts.
214
215     { $enum-members KeyboardKey } } ;
216
217 HELP: KEY_NULL          { $raylib-key 0    "NULL" " Used for no key pressed." } ;
218 HELP: KEY_APOSTROPHE    { $raylib-key 39   "'"                                } ;
219 HELP: KEY_COMMA         { $raylib-key 44   ","                                } ;
220 HELP: KEY_MINUS         { $raylib-key 45   "-"                                } ;
221 HELP: KEY_PERIOD        { $raylib-key 46   "."                                } ;
222 HELP: KEY_SLASH         { $raylib-key 47   "/"                                } ;
223 HELP: KEY_ZERO          { $raylib-key 48   "0"                                } ;
224 HELP: KEY_ONE           { $raylib-key 49   "1"                                } ;
225 HELP: KEY_TWO           { $raylib-key 50   "2"                                } ;
226 HELP: KEY_THREE         { $raylib-key 51   "3"                                } ;
227 HELP: KEY_FOUR          { $raylib-key 52   "4"                                } ;
228 HELP: KEY_FIVE          { $raylib-key 53   "5"                                } ;
229 HELP: KEY_SIX           { $raylib-key 54   "6"                                } ;
230 HELP: KEY_SEVEN         { $raylib-key 55   "7"                                } ;
231 HELP: KEY_EIGHT         { $raylib-key 56   "8"                                } ;
232 HELP: KEY_NINE          { $raylib-key 57   "9"                                } ;
233 HELP: KEY_SEMICOLON     { $raylib-key 59   ";"                                } ;
234 HELP: KEY_EQUAL         { $raylib-key 61   "="                                } ;
235 HELP: KEY_A             { $raylib-key 65   "lowercase and uppercase A"        } ;
236 HELP: KEY_B             { $raylib-key 66   "lowercase and uppercase B"        } ;
237 HELP: KEY_C             { $raylib-key 67   "lowercase and uppercase C"        } ;
238 HELP: KEY_D             { $raylib-key 68   "lowercase and uppercase D"        } ;
239 HELP: KEY_E             { $raylib-key 69   "lowercase and uppercase E"        } ;
240 HELP: KEY_F             { $raylib-key 70   "lowercase and uppercase F"        } ;
241 HELP: KEY_G             { $raylib-key 71   "lowercase and uppercase G"        } ;
242 HELP: KEY_H             { $raylib-key 72   "lowercase and uppercase H"        } ;
243 HELP: KEY_I             { $raylib-key 73   "lowercase and uppercase I"        } ;
244 HELP: KEY_J             { $raylib-key 74   "lowercase and uppercase J"        } ;
245 HELP: KEY_K             { $raylib-key 75   "lowercase and uppercase K"        } ;
246 HELP: KEY_L             { $raylib-key 76   "lowercase and uppercase L"        } ;
247 HELP: KEY_M             { $raylib-key 77   "lowercase and uppercase M"        } ;
248 HELP: KEY_N             { $raylib-key 78   "lowercase and uppercase N"        } ;
249 HELP: KEY_O             { $raylib-key 79   "lowercase and uppercase O"        } ;
250 HELP: KEY_P             { $raylib-key 80   "lowercase and uppercase P"        } ;
251 HELP: KEY_Q             { $raylib-key 81   "lowercase and uppercase Q"        } ;
252 HELP: KEY_R             { $raylib-key 82   "lowercase and uppercase R"        } ;
253 HELP: KEY_S             { $raylib-key 83   "lowercase and uppercase S"        } ;
254 HELP: KEY_T             { $raylib-key 84   "lowercase and uppercase T"        } ;
255 HELP: KEY_U             { $raylib-key 85   "lowercase and uppercase U"        } ;
256 HELP: KEY_V             { $raylib-key 86   "lowercase and uppercase V"        } ;
257 HELP: KEY_W             { $raylib-key 87   "lowercase and uppercase W"        } ;
258 HELP: KEY_X             { $raylib-key 88   "lowercase and uppercase X"        } ;
259 HELP: KEY_Y             { $raylib-key 89   "lowercase and uppercase Y"        } ;
260 HELP: KEY_Z             { $raylib-key 90   "lowercase and uppercase Z"        } ;
261 HELP: KEY_LEFT_BRACKET  { $raylib-key 91   "["                                } ;
262 HELP: KEY_BACKSLASH     { $raylib-key 92   "\\"                               } ;
263 HELP: KEY_RIGHT_BRACKET { $raylib-key 93   "]"                                } ;
264 HELP: KEY_GRAVE         { $raylib-key 96   "`"                                } ;
265 HELP: KEY_SPACE         { $raylib-key 32   "Space"                            } ;
266 HELP: KEY_ESCAPE        { $raylib-key 256  "Esc"                              } ;
267 HELP: KEY_ENTER         { $raylib-key 257  "Enter"                            } ;
268 HELP: KEY_TAB           { $raylib-key 258  "Tab"                              } ;
269 HELP: KEY_BACKSPACE     { $raylib-key 259  "Backspace"                        } ;
270 HELP: KEY_INSERT        { $raylib-key 260  "Ins"                              } ;
271 HELP: KEY_DELETE        { $raylib-key 261  "Del"                              } ;
272 HELP: KEY_RIGHT         { $raylib-key 262  "Cursor right"                     } ;
273 HELP: KEY_LEFT          { $raylib-key 263  "Cursor left"                      } ;
274 HELP: KEY_DOWN          { $raylib-key 264  "Cursor down"                      } ;
275 HELP: KEY_UP            { $raylib-key 265  "Cursor up"                        } ;
276 HELP: KEY_PAGE_UP       { $raylib-key 266  "Page up"                          } ;
277 HELP: KEY_PAGE_DOWN     { $raylib-key 267  "Page down"                        } ;
278 HELP: KEY_HOME          { $raylib-key 268  "Home"                             } ;
279 HELP: KEY_END           { $raylib-key 269  "End"                              } ;
280 HELP: KEY_CAPS_LOCK     { $raylib-key 280  "Caps lock"                        } ;
281 HELP: KEY_SCROLL_LOCK   { $raylib-key 281  "Scroll down"                      } ;
282 HELP: KEY_NUM_LOCK      { $raylib-key 282  "Num lock"                         } ;
283 HELP: KEY_PRINT_SCREEN  { $raylib-key 283  "Print screen"                     } ;
284 HELP: KEY_PAUSE         { $raylib-key 284  "Pause"                            } ;
285 HELP: KEY_F1            { $raylib-key 290  "F1"                               } ;
286 HELP: KEY_F2            { $raylib-key 291  "F2"                               } ;
287 HELP: KEY_F3            { $raylib-key 292  "F3"                               } ;
288 HELP: KEY_F4            { $raylib-key 293  "F4"                               } ;
289 HELP: KEY_F5            { $raylib-key 294  "F5"                               } ;
290 HELP: KEY_F6            { $raylib-key 295  "F6"                               } ;
291 HELP: KEY_F7            { $raylib-key 296  "F7"                               } ;
292 HELP: KEY_F8            { $raylib-key 297  "F8"                               } ;
293 HELP: KEY_F9            { $raylib-key 298  "F9"                               } ;
294 HELP: KEY_F10           { $raylib-key 299  "F10"                              } ;
295 HELP: KEY_F11           { $raylib-key 300  "F11"                              } ;
296 HELP: KEY_F12           { $raylib-key 301  "F12"                              } ;
297 HELP: KEY_LEFT_SHIFT    { $raylib-key 340  "Shift left"                       } ;
298 HELP: KEY_LEFT_CONTROL  { $raylib-key 341  "Control left"                     } ;
299 HELP: KEY_LEFT_ALT      { $raylib-key 342  "Alt left"                         } ;
300 HELP: KEY_LEFT_SUPER    { $raylib-key 343  "Super left"                       } ;
301 HELP: KEY_RIGHT_SHIFT   { $raylib-key 344  "Shift right"                      } ;
302 HELP: KEY_RIGHT_CONTROL { $raylib-key 345  "Control right"                    } ;
303 HELP: KEY_RIGHT_ALT     { $raylib-key 346  "Alt right"                        } ;
304 HELP: KEY_RIGHT_SUPER   { $raylib-key 347  "Super right"                      } ;
305 HELP: KEY_KB_MENU       { $raylib-key 348  "KB menu"                          } ;
306 HELP: KEY_KP_0          { $raylib-key 320  "Keypad 0"                         } ;
307 HELP: KEY_KP_1          { $raylib-key 321  "Keypad 1"                         } ;
308 HELP: KEY_KP_2          { $raylib-key 322  "Keypad 2"                         } ;
309 HELP: KEY_KP_3          { $raylib-key 323  "Keypad 3"                         } ;
310 HELP: KEY_KP_4          { $raylib-key 324  "Keypad 4"                         } ;
311 HELP: KEY_KP_5          { $raylib-key 325  "Keypad 5"                         } ;
312 HELP: KEY_KP_6          { $raylib-key 326  "Keypad 6"                         } ;
313 HELP: KEY_KP_7          { $raylib-key 327  "Keypad 7"                         } ;
314 HELP: KEY_KP_8          { $raylib-key 328  "Keypad 8"                         } ;
315 HELP: KEY_KP_9          { $raylib-key 329  "Keypad 9"                         } ;
316 HELP: KEY_KP_DECIMAL    { $raylib-key 330  "Keypad ."                         } ;
317 HELP: KEY_KP_DIVIDE     { $raylib-key 331  "Keypad /"                         } ;
318 HELP: KEY_KP_MULTIPLY   { $raylib-key 332  "Keypad *"                         } ;
319 HELP: KEY_KP_SUBTRACT   { $raylib-key 333  "Keypad -"                         } ;
320 HELP: KEY_KP_ADD        { $raylib-key 334  "Keypad +"                         } ;
321 HELP: KEY_KP_ENTER      { $raylib-key 335  "Keypad Enter"                     } ;
322 HELP: KEY_KP_EQUAL      { $raylib-key 336  "Keypad ="                         } ;
323 HELP: KEY_BACK          { $raylib-key 4    "Android back button"              } ;
324 HELP: KEY_MENU          { $raylib-key 82   "Android menu button"              } ;
325 HELP: KEY_VOLUME_UP     { $raylib-key 24   "Android volume up button"         } ;
326 HELP: KEY_VOLUME_DOWN   { $raylib-key 25   "Android volume down button"       } ;
327
328
329 ! Mouse button enum
330 HELP: MouseButton
331 { $var-description
332     An enum representing the various key mouse buttons Ralyb has support for.
333
334     { $enum-members MouseButton } } ;
335
336 HELP: MOUSE_BUTTON_LEFT
337 { $class-description
338     Represents the left mouse button.
339
340     { $see-also MouseButton } } ;
341
342 HELP: MOUSE_BUTTON_RIGHT
343 { $class-description
344     Represents the right mouse button.
345
346     { $see-also MouseButton } } ;
347
348 HELP: MOUSE_BUTTON_MIDDLE
349 { $class-description
350     Represents the middle mouse button. On most mice, this is clicking
351     the scroll wheel.
352
353     { $see-also MouseButton } } ;
354
355 HELP: MOUSE_BUTTON_SIDE
356 { $class-description
357     Represents a side button on mice that have additional buttons.
358
359     { $see-also MouseButton } } ;
360
361 HELP: MOUSE_BUTTON_EXTRA
362 { $class-description
363     Represents an extra button on mice that have additional buttons.
364
365     { $see-also MouseButton } } ;
366
367 HELP: MOUSE_BUTTON_FORWARD
368 { $class-description
369     Represents the " \"forward\" " button on mice that have additional buttons.
370
371     { $see-also MouseButton } } ;
372
373 HELP: MOUSE_BUTTON_BACK
374 { $class-description
375     Represents the " \"back\" " button on mice that have additional buttons.
376
377     { $see-also MouseButton } } ;
378
379
380 ! Mouse cursor enum
381 HELP: MouseCursor
382 { $var-description
383     An enum representing the various states the cursor can be in.
384     This is used to change the cursor icon " / " shape.
385
386
387     { $enum-members MouseCursor } } ;
388
389 HELP: MOUSE_CURSOR_DEFAULT
390 { $var-description
391     Default pointer shape.
392
393     { $see-also MouseCursor } } ;
394
395 HELP: MOUSE_CURSOR_ARROW
396 { $var-description
397     Arrow shape.
398
399     { $see-also MouseCursor } } ;
400
401 HELP: MOUSE_CURSOR_IBEAM
402 { $var-description
403     Text writing cursor shape.
404
405     { $see-also MouseCursor } } ;
406
407 HELP: MOUSE_CURSOR_CROSSHAIR
408 { $var-description
409     Cross shape.
410
411     { $see-also MouseCursor } } ;
412
413 HELP: MOUSE_CURSOR_POINTING_HAND
414 { $var-description
415     Pointing hand cursor.
416
417     { $see-also MouseCursor } } ;
418
419 HELP: MOUSE_CURSOR_RESIZE_EW
420 { $var-description
421     Horizontal resize/move arrow shape.
422
423     { $see-also MouseCursor } } ;
424
425 HELP: MOUSE_CURSOR_RESIZE_NS
426 { $var-description
427     Vertical resize/move arrow shape.
428
429     { $see-also MouseCursor } } ;
430
431 HELP: MOUSE_CURSOR_RESIZE_NWSE
432 { $var-description
433     Top-left to bottom-right diagonal resize/move arrow shape.
434
435     { $see-also MouseCursor } } ;
436
437 HELP: MOUSE_CURSOR_RESIZE_NESW
438 { $var-description
439     The top-right to bottom-left diagonal resize/move arrow shape.
440
441     { $see-also MouseCursor } } ;
442
443 HELP: MOUSE_CURSOR_RESIZE_ALL
444 { $var-description
445     The omni-directional resize/move cursor shape.
446
447     { $see-also MouseCursor } } ;
448
449 HELP: MOUSE_CURSOR_NOT_ALLOWED
450 { $var-description
451     The operation-not-allowed shape.
452
453     { $see-also MouseCursor } } ;
454
455
456 ! Gamepad button enum
457 HELP: GamepadButton
458 { $var-description
459     This enum represents the various buttons a gamepad might have.
460
461     It's important to keep in mind different controllers may have
462     different button orderings. Each enum member notes the
463     differences in their respective documentation sections.
464
465     { $see-also GamepadAxis }
466
467     { $enum-members GamepadButton } } ;
468
469 HELP: GAMEPAD_BUTTON_UNKNOWN
470 { $class-description
471      Unknown button, just for error checking
472
473      { $see-also GamepadButton } } ;
474
475 HELP: GAMEPAD_BUTTON_LEFT_FACE_UP
476 { $class-description
477      Gamepad left DPAD up button
478
479      { $see-also GamepadButton } } ;
480
481 HELP: GAMEPAD_BUTTON_LEFT_FACE_RIGHT
482 { $class-description
483      Gamepad left DPAD right button
484
485      { $see-also GamepadButton } } ;
486
487 HELP: GAMEPAD_BUTTON_LEFT_FACE_DOWN
488 { $class-description
489      Gamepad left DPAD down button
490
491      { $see-also GamepadButton } } ;
492
493 HELP: GAMEPAD_BUTTON_LEFT_FACE_LEFT
494 { $class-description
495      Gamepad left DPAD left button
496
497      { $see-also GamepadButton } } ;
498
499 HELP: GAMEPAD_BUTTON_RIGHT_FACE_UP
500 { $class-description
501      Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
502
503      { $see-also GamepadButton } } ;
504
505 HELP: GAMEPAD_BUTTON_RIGHT_FACE_RIGHT
506 { $class-description
507      Gamepad right button right (i.e. PS3: Square, Xbox: X)
508
509      { $see-also GamepadButton } } ;
510
511 HELP: GAMEPAD_BUTTON_RIGHT_FACE_DOWN
512 { $class-description
513      Gamepad right button down (i.e. PS3: Cross, Xbox: A)
514
515      { $see-also GamepadButton } } ;
516
517 HELP: GAMEPAD_BUTTON_RIGHT_FACE_LEFT
518 { $class-description
519      Gamepad right button left (i.e. PS3: Circle, Xbox: B)
520
521      { $see-also GamepadButton } } ;
522
523 HELP: GAMEPAD_BUTTON_LEFT_TRIGGER_1
524 { $class-description
525      Gamepad top/back trigger left (first), it could be a trailing button
526
527      { $see-also GamepadButton } } ;
528
529 HELP: GAMEPAD_BUTTON_LEFT_TRIGGER_2
530 { $class-description
531      Gamepad top/back trigger left (second), it could be a trailing button
532
533      { $see-also GamepadButton } } ;
534
535 HELP: GAMEPAD_BUTTON_RIGHT_TRIGGER_1
536 { $class-description
537      Gamepad top/back trigger right (one), it could be a trailing button
538
539      { $see-also GamepadButton } } ;
540
541 HELP: GAMEPAD_BUTTON_RIGHT_TRIGGER_2
542 { $class-description
543      Gamepad top/back trigger right (second), it could be a trailing button
544
545      { $see-also GamepadButton } } ;
546
547 HELP: GAMEPAD_BUTTON_MIDDLE_LEFT
548 { $class-description
549      Gamepad center buttons, left one (i.e. PS3: Select)
550
551      { $see-also GamepadButton } } ;
552
553 HELP: GAMEPAD_BUTTON_MIDDLE
554 { $class-description
555      Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX)
556
557      { $see-also GamepadButton } } ;
558
559 HELP: GAMEPAD_BUTTON_MIDDLE_RIGHT
560 { $class-description
561      Gamepad center buttons, right one (i.e. PS3: Start)
562
563      { $see-also GamepadButton } } ;
564
565 HELP: GAMEPAD_BUTTON_LEFT_THUMB
566 { $class-description
567      Gamepad joystick pressed button left
568
569      { $see-also GamepadButton } } ;
570
571 HELP: GAMEPAD_BUTTON_RIGHT_THUMB
572 { $class-description
573      Gamepad joystick pressed button right
574
575      { $see-also GamepadButton } } ;
576
577
578 ! Gamepad axis enum
579 HELP: GamepadAxis
580 { $var-description
581     Contains a set of flags for each axis a gamepad may have. Raylib
582     supports controllers with two triggers and two joysticks.
583
584     { $enum-members GamepadAxis } } ;
585
586 HELP: GAMEPAD_AXIS_LEFT_X
587 { $class-description
588     Represents the left gamepad stick and its tilt on the X axis (left/right).
589     { $see-also GamepadAxis } } ;
590
591 HELP: GAMEPAD_AXIS_LEFT_Y
592 { $class-description
593     Represents the left gamepad stick and its tilt on the Y axis (up/down).
594     { $see-also GamepadAxis } } ;
595
596 HELP: GAMEPAD_AXIS_RIGHT_X
597 { $class-description
598     Represents the right gamepad stick and its tilt on the X axis (left/right).
599     { $see-also GamepadAxis } } ;
600
601 HELP: GAMEPAD_AXIS_RIGHT_Y
602 { $class-description
603     Represents the right gamepad stick and its tilt on the Y axis (up/down).
604     { $see-also GamepadAxis } } ;
605
606 HELP: GAMEPAD_AXIS_LEFT_TRIGGER
607 { $class-description
608     Represents the left gamepad trigger. Trigger has the value
609     range [1..-1].
610     { $see-also GamepadAxis } } ;
611
612 HELP: GAMEPAD_AXIS_RIGHT_TRIGGER
613 { $class-description
614     Represents the left gamepad trigger. Trigger has the value
615     range [1..-1].
616     { $see-also GamepadAxis } } ;
617
618
619 ! Material map index enum
620 HELP: MaterialMapIndex
621 { $var-description
622     Provides convient names for each index into a texture's various
623     material maps.
624
625     { $enum-members MaterialMapIndex } } ;
626 HELP: MATERIAL_MAP_ALBEDO
627 { $class-description
628     Represents the index for a texture's albedo material (same as: \ MATERIAL_MAP_DIFFUSE ).
629
630     { $see-also MaterialMapIndex } } ;
631
632 HELP: MATERIAL_MAP_METALNESS
633 { $class-description
634     Represents the index for a texture's metalness material (same as: \ MATERIAL_MAP_SPECULAR ).
635
636     { $see-also MaterialMapIndex } } ;
637
638 HELP: MATERIAL_MAP_NORMAL
639 { $class-description
640     Represents the index for a texture's normal material.
641
642     { $see-also MaterialMapIndex } } ;
643
644 HELP: MATERIAL_MAP_ROUGHNESS
645 { $class-description
646     Represents the index for a texture's roughness material.
647
648     { $see-also MaterialMapIndex } } ;
649
650 HELP: MATERIAL_MAP_OCCLUSION
651 { $class-description
652     Represents the index for a texture's ambient occlusion material.
653
654     { $see-also MaterialMapIndex } } ;
655
656 HELP: MATERIAL_MAP_EMISSION
657 { $class-description
658     Represents the index for a texture's emission material.
659
660     { $see-also MaterialMapIndex } } ;
661
662 HELP: MATERIAL_MAP_HEIGHT
663 { $class-description
664     Represents the index for a texture's heightmap material.
665
666     { $see-also MaterialMapIndex } } ;
667
668 HELP: MATERIAL_MAP_CUBEMAP
669 { $class-description
670     Represents the index for a texture's Cubemap material (NOTE: Uses GL_TEXTURE_CUBE_MAP).
671
672     { $see-also MaterialMapIndex } } ;
673
674 HELP: MATERIAL_MAP_IRRADIANCE
675 { $class-description
676     Represents the index for a texture's irradiance material (NOTE: Uses GL_TEXTURE_CUBE_MAP).
677
678     { $see-also MaterialMapIndex } } ;
679
680 HELP: MATERIAL_MAP_PREFILTER
681 { $class-description
682     Represents the index for a texture's prefilter material (NOTE: Uses GL_TEXTURE_CUBE_MAP).
683
684     { $see-also MaterialMapIndex } } ;
685
686 HELP: MATERIAL_MAP_BRDF
687 { $class-description
688     Represents the index for a texture's brdf material.
689
690     { $see-also MaterialMapIndex } } ;
691
692 ! Shader Location Index
693 ! TODO: make a better description of these. They are kinda bad...
694 HELP: ShaderLocationIndex
695 { $var-description
696     Shader location index enum.
697
698     { $enum-members ShaderLocationIndex } } ;
699
700 HELP: SHADER_LOC_VERTEX_POSITION
701 { $class-description
702     Shader location: vertex attribute: position
703
704     { $see-also ShaderLocationIndex } } ;
705
706 HELP: SHADER_LOC_VERTEX_TEXCOORD01
707 { $class-description
708     Shader location: vertex attribute: texcoord01
709
710     { $see-also ShaderLocationIndex } } ;
711
712 HELP: SHADER_LOC_VERTEX_TEXCOORD02
713 { $class-description
714     Shader location: vertex attribute: texcoord02
715
716     { $see-also ShaderLocationIndex } } ;
717
718 HELP: SHADER_LOC_VERTEX_NORMAL
719 { $class-description
720     Shader location: vertex attribute: normal
721
722     { $see-also ShaderLocationIndex } } ;
723
724 HELP: SHADER_LOC_VERTEX_TANGENT
725 { $class-description
726     Shader location: vertex attribute: tangent
727
728     { $see-also ShaderLocationIndex } } ;
729
730 HELP: SHADER_LOC_VERTEX_COLOR
731 { $class-description
732     Shader location: vertex attribute: color
733
734     { $see-also ShaderLocationIndex } } ;
735
736 HELP: SHADER_LOC_MATRIX_MVP
737 { $class-description
738     Shader location: matrix uniform: model-view-projection
739
740     { $see-also ShaderLocationIndex } } ;
741
742 HELP: SHADER_LOC_MATRIX_VIEW
743 { $class-description
744     Shader location: matrix uniform: view (camera transform)
745
746     { $see-also ShaderLocationIndex } } ;
747
748 HELP: SHADER_LOC_MATRIX_PROJECTION
749 { $class-description
750     Shader location: matrix uniform: projection
751
752     { $see-also ShaderLocationIndex } } ;
753
754 HELP: SHADER_LOC_MATRIX_MODEL
755 { $class-description
756     Shader location: matrix uniform: model (transform)
757
758     { $see-also ShaderLocationIndex } } ;
759
760 HELP: SHADER_LOC_MATRIX_NORMAL
761 { $class-description
762     Shader location: matrix uniform: normal
763
764     { $see-also ShaderLocationIndex } } ;
765
766 HELP: SHADER_LOC_VECTOR_VIEW
767 { $class-description
768     Shader location: vector uniform: view
769
770     { $see-also ShaderLocationIndex } } ;
771
772 HELP: SHADER_LOC_COLOR_DIFFUSE
773 { $class-description
774     Shader location: vector uniform: diffuse color
775
776     { $see-also ShaderLocationIndex } } ;
777
778 HELP: SHADER_LOC_COLOR_SPECULAR
779 { $class-description
780     Shader location: vector uniform: specular color
781
782     { $see-also ShaderLocationIndex } } ;
783
784 HELP: SHADER_LOC_COLOR_AMBIENT
785 { $class-description
786     Shader location: vector uniform: ambient color
787
788     { $see-also ShaderLocationIndex } } ;
789
790 HELP: SHADER_LOC_MAP_ALBEDO
791 { $class-description
792     Shader location: sampler2d texture: albedo (same as: SHADER_LOC_MAP_DIFFUSE)
793
794     { $see-also ShaderLocationIndex } } ;
795
796 HELP: SHADER_LOC_MAP_METALNESS
797 { $class-description
798     Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR)
799
800     { $see-also ShaderLocationIndex } } ;
801
802 HELP: SHADER_LOC_MAP_NORMAL
803 { $class-description
804     Shader location: sampler2d texture: normal
805
806     { $see-also ShaderLocationIndex } } ;
807
808 HELP: SHADER_LOC_MAP_ROUGHNESS
809 { $class-description
810     Shader location: sampler2d texture: roughness
811
812     { $see-also ShaderLocationIndex } } ;
813
814 HELP: SHADER_LOC_MAP_OCCLUSION
815 { $class-description
816     Shader location: sampler2d texture: occlusion
817
818     { $see-also ShaderLocationIndex } } ;
819
820 HELP: SHADER_LOC_MAP_EMISSION
821 { $class-description
822     Shader location: sampler2d texture: emission
823
824     { $see-also ShaderLocationIndex } } ;
825
826 HELP: SHADER_LOC_MAP_HEIGHT
827 { $class-description
828     Shader location: sampler2d texture: height
829
830     { $see-also ShaderLocationIndex } } ;
831
832 HELP: SHADER_LOC_MAP_CUBEMAP
833 { $class-description
834     Shader location: samplerCube texture: cubemap
835
836     { $see-also ShaderLocationIndex } } ;
837
838 HELP: SHADER_LOC_MAP_IRRADIANCE
839 { $class-description
840     Shader location: samplerCube texture: irradiance
841
842     { $see-also ShaderLocationIndex } } ;
843
844 HELP: SHADER_LOC_MAP_PREFILTER
845 { $class-description
846     Shader location: samplerCube texture: prefilter
847
848     { $see-also ShaderLocationIndex } } ;
849
850 HELP: SHADER_LOC_MAP_BRDF
851 { $class-description
852     Shader location: sampler2d texture: brdf
853
854     { $see-also ShaderLocationIndex } } ;
855
856
857
858 ! Shader uniform data type
859 ! TODO: Better descriptions for these...
860 HELP: ShaderUniformDataType
861 { $var-description
862     Represents the various types a uniform shader can be.
863
864     { $enum-members MaterialMapIndex } } ;
865
866 HELP: SHADER_UNIFORM_FLOAT
867 { $class-description
868     Shader uniform type: float
869     { $see-also ShaderUniformDataType } } ;
870
871 HELP: SHADER_UNIFORM_VEC2
872 { $class-description
873     Shader uniform type: vec2 (2 float)
874     { $see-also ShaderUniformDataType } } ;
875
876 HELP: SHADER_UNIFORM_VEC3
877 { $class-description
878     Shader uniform type: vec3 (3 float)
879     { $see-also ShaderUniformDataType } } ;
880
881 HELP: SHADER_UNIFORM_VEC4
882 { $class-description
883     Shader uniform type: vec4 (4 float)
884     { $see-also ShaderUniformDataType } } ;
885
886 HELP: SHADER_UNIFORM_INT
887 { $class-description
888     Shader uniform type: int
889     { $see-also ShaderUniformDataType } } ;
890
891 HELP: SHADER_UNIFORM_IVEC2
892 { $class-description
893     Shader uniform type: ivec2 (2 int)
894     { $see-also ShaderUniformDataType } } ;
895
896 HELP: SHADER_UNIFORM_IVEC3
897 { $class-description
898     Shader uniform type: ivec3 (3 int)
899     { $see-also ShaderUniformDataType } } ;
900
901 HELP: SHADER_UNIFORM_IVEC4
902 { $class-description
903     Shader uniform type: ivec4 (4 int)
904     { $see-also ShaderUniformDataType } } ;
905
906 HELP: SHADER_UNIFORM_SAMPLER2D
907 { $class-description
908     Shader uniform type: sampler2d
909     { $see-also ShaderUniformDataType } } ;
910
911
912 ! Shader attribute data type enum
913 HELP: ShaderAttributeDataType
914 { $var-description
915     Shader attribute data types
916
917     { $enum-members ShaderAttributeDataType } } ;
918
919 HELP: SHADER_ATTRIB_FLOAT
920 { $class-description
921     Shader attribute type: float
922
923     { $see-also ShaderAttributeDataType } } ;
924
925 HELP: SHADER_ATTRIB_VEC2
926 { $class-description
927     Shader attribute type: vec2 (2 float)
928
929     { $see-also ShaderAttributeDataType } } ;
930
931 HELP: SHADER_ATTRIB_VEC3
932 { $class-description
933     Shader attribute type: vec3 (3 float)
934
935     { $see-also ShaderAttributeDataType } } ;
936
937 HELP: SHADER_ATTRIB_VEC4
938 { $class-description
939     Shader attribute type: vec4 (4 float)
940
941     { $see-also ShaderAttributeDataType } } ;
942
943
944 ! Pixel format enum.
945 HELP: PixelFormat
946 { $var-description
947     The various pixel formats that can be used by Raylib.
948     This enum's values start from { $snippet 1 } .
949
950     { $warning Support depends on OpenGL version and platform. }
951     { $enum-members PixelFormat } } ;
952
953 HELP: PIXELFORMAT_UNCOMPRESSED_GRAYSCALE
954 { $class-description
955     8 bit per pixel (no alpha).
956
957     { $see-also PixelFormat } } ;
958
959 HELP: PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA
960 { $class-description
961     8*2 bits per pixel (2 channels).
962
963     { $see-also PixelFormat } } ;
964
965 HELP: PIXELFORMAT_UNCOMPRESSED_R5G6B5
966 { $class-description
967     16 bits per pixel.
968
969     { $see-also PixelFormat } } ;
970
971 HELP: PIXELFORMAT_UNCOMPRESSED_R8G8B8
972 { $class-description
973     24 bits per pixel.
974
975     { $see-also PixelFormat } } ;
976
977 HELP: PIXELFORMAT_UNCOMPRESSED_R5G5B5A1
978 { $class-description
979     16 bits per pixel (1 bit alpha).
980
981     { $see-also PixelFormat } } ;
982
983 HELP: PIXELFORMAT_UNCOMPRESSED_R4G4B4A4
984 { $class-description
985     16 bits per pixel (4 bit alpha).
986
987     { $see-also PixelFormat } } ;
988
989 HELP: PIXELFORMAT_UNCOMPRESSED_R8G8B8A8
990 { $class-description
991     32 bits per pixel.
992
993     { $see-also PixelFormat } } ;
994
995 HELP: PIXELFORMAT_UNCOMPRESSED_R32
996 { $class-description
997     32 bits per pixel (1 channel - float).
998
999     { $see-also PixelFormat } } ;
1000
1001 HELP: PIXELFORMAT_UNCOMPRESSED_R32G32B32
1002 { $class-description
1003     32*3 bits per pixel (3 channels - float).
1004
1005     { $see-also PixelFormat } } ;
1006
1007 HELP: PIXELFORMAT_UNCOMPRESSED_R32G32B32A32
1008 { $class-description
1009     32*4 bits per pixel (4 channels - float).
1010
1011     { $see-also PixelFormat } } ;
1012
1013 HELP: PIXELFORMAT_COMPRESSED_DXT1_RGB
1014 { $class-description
1015     4 bits per pixel (no alpha).
1016
1017     { $see-also PixelFormat } } ;
1018
1019 HELP: PIXELFORMAT_COMPRESSED_DXT1_RGBA
1020 { $class-description
1021     4 bits per pixel (1 bit alpha).
1022
1023     { $see-also PixelFormat } } ;
1024
1025 HELP: PIXELFORMAT_COMPRESSED_DXT3_RGBA
1026 { $class-description
1027     8 bits per pixel.
1028
1029     { $see-also PixelFormat } } ;
1030
1031 HELP: PIXELFORMAT_COMPRESSED_DXT5_RGBA
1032 { $class-description
1033     8 bits per pixel.
1034
1035     { $see-also PixelFormat } } ;
1036
1037 HELP: PIXELFORMAT_COMPRESSED_ETC1_RGB
1038 { $class-description
1039     4 bits per pixel.
1040
1041     { $see-also PixelFormat } } ;
1042
1043 HELP: PIXELFORMAT_COMPRESSED_ETC2_RGB
1044 { $class-description
1045     4 bits per pixel.
1046
1047     { $see-also PixelFormat } } ;
1048
1049 HELP: PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA
1050 { $class-description
1051     8 bits per pixel.
1052
1053     { $see-also PixelFormat } } ;
1054
1055 HELP: PIXELFORMAT_COMPRESSED_PVRT_RGB
1056 { $class-description
1057     4 bits per pixel.
1058
1059     { $see-also PixelFormat } } ;
1060
1061 HELP: PIXELFORMAT_COMPRESSED_PVRT_RGBA
1062 { $class-description
1063     4 bits per pixel.
1064
1065     { $see-also PixelFormat } } ;
1066
1067 HELP: PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA
1068 { $class-description
1069     8 bits per pixel.
1070
1071     { $see-also PixelFormat } } ;
1072
1073 HELP: PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA
1074 { $class-description
1075     2 bits per pixel.
1076
1077     { $see-also PixelFormat } } ;
1078
1079
1080 ! Texture filter mode enum
1081 HELP: TextureFilterMode
1082 { $var-description
1083     Controls the filter mode of the texture. In Raylib, filtering will
1084     consider mipmaps if available in the current texture. Additionally,
1085     filter is accordingly set for minification and magnification.
1086
1087     { $enum-members TextureFilterMode } } ;
1088
1089 HELP: TEXTURE_FILTER_POINT
1090 { $class-description
1091     No filter just pixel aproximation.
1092
1093     { $see-also TextureFilterMode } } ;
1094
1095 HELP: TEXTURE_FILTER_BILINEAR
1096 { $class-description
1097     Linear filtering.
1098
1099     { $see-also TextureFilterMode } } ;
1100
1101 HELP: TEXTURE_FILTER_TRILINEAR
1102 { $class-description
1103     Trilinear filtering (linear with mipmaps).
1104
1105     { $see-also TextureFilterMode } } ;
1106
1107 HELP: TEXTURE_FILTER_ANISOTROPIC_4X
1108 { $class-description
1109     Anisotropic filtering 4x.
1110
1111     { $see-also TextureFilterMode } } ;
1112
1113 HELP: TEXTURE_FILTER_ANISOTROPIC_8X
1114 { $class-description
1115     Anisotropic filtering 8x.
1116
1117     { $see-also TextureFilterMode } } ;
1118
1119 HELP: TEXTURE_FILTER_ANISOTROPIC_16X
1120 { $class-description
1121     Anisotropic filtering 16x.
1122
1123     { $see-also TextureFilterMode } } ;
1124
1125
1126 ! Texture wrap mode enume
1127 HELP: TextureWrapMode
1128 { $var-description
1129     Represents the way a texture will repeate when reading
1130     past the image bounds.
1131
1132     { $enum-members TextureWrapMode } } ;
1133
1134 HELP: TEXTURE_WRAP_REPEAT
1135 { $class-description
1136     Using this mode, a texture will repeate infinitely in all directions.
1137
1138     { $see-also TextureWrapMode } } ;
1139
1140 HELP: TEXTURE_WRAP_CLAMP
1141 { $class-description
1142     Using this mode, the edge pixels in a texture will
1143     be stretched out into infinity.
1144
1145     { $see-also TextureWrapMode } } ;
1146
1147 HELP:
1148 TEXTURE_WRAP_MIRROR_REPEAT
1149 { $class-description
1150     Using this mode, the texture will repeat infinitely in all directions.
1151     However, each tiling will be mirrored compared to the previous tiling.
1152
1153
1154     { $see-also TextureWrapMode } } ;
1155
1156 HELP: TEXTURE_WRAP_MIRROR_CLAMP
1157 { $class-description
1158     This mode combines mirrored with clamped. The texture will infinitely
1159     tile the last pixel from the oppisite side.
1160
1161     { $see-also TextureWrapMode } } ;
1162
1163
1164 ! Cubemap layout enum
1165 HELP: CubemapLayout
1166 { $var-description
1167     Represents the layout a cube map is using.
1168
1169     { $enum-members CubemapLayout } } ;
1170
1171 HELP: CUBEMAP_LAYOUT_AUTO_DETECT
1172 { $class-description
1173     Raylib will attempt to automatically detect the cubemap's layout type.
1174
1175     { $see-also CubemapLayout } } ;
1176
1177 HELP: CUBEMAP_LAYOUT_LINE_VERTICAL
1178 { $class-description
1179     A cubemap who's layout is defined by a horizontal line with faces.
1180
1181     { $see-also CubemapLayout } } ;
1182
1183 HELP: CUBEMAP_LAYOUT_LINE_HORIZONTAL
1184 { $class-description
1185     A cubemap who's layout is defined by a vertical line with faces.
1186
1187     { $see-also CubemapLayout } } ;
1188
1189 HELP: CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR
1190 { $class-description
1191     A cubemap who's layout is defined by a 3x4 cross with cubemap faces.
1192
1193     { $see-also CubemapLayout } } ;
1194
1195 HELP: CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE
1196 { $class-description
1197     A cubemap who's layout is defined by a 4x3 cross with cubemap faces.
1198
1199     { $see-also CubemapLayout } } ;
1200
1201 HELP: CUBEMAP_LAYOUT_PANORAMA
1202 { $class-description
1203     A cubemap who's layout is defined by a panoramic image (equirectangular map).
1204
1205     { $see-also CubemapLayout } } ;
1206
1207
1208 ! font type enum
1209 HELP: FontType
1210 { $var-description
1211     A C-enum defining the various font generation methods in Raylib.
1212
1213     { $enum-members FontType } } ;
1214
1215 HELP: FONT_DEFAULT
1216 { $class-description
1217     Default font generation with anti-aliasing.
1218
1219     { $see-also FontType } } ;
1220
1221 HELP: FONT_BITMAP
1222 { $class-description
1223     Bitmap font generation without anti-aliasing.
1224
1225     { $see-also FontType } } ;
1226
1227 HELP: FONT_SDF
1228 { $class-description
1229     SDF font generation. Requires an external shader.
1230
1231     { $see-also FontType } } ;
1232
1233
1234 ! Blend mode enum
1235 HELP: BlendMode
1236 { $var-description
1237     A C-enum holding the OpenGL texture blend modes.
1238
1239
1240     { $enum-members BlendMode } } ;
1241
1242 HELP: BLEND_ALPHA
1243 { $class-description
1244     Blend mode for blending texturing while considering the alpha channel.
1245     This is the default mode.
1246     { $see-also BlendMode } } ;
1247
1248 HELP: BLEND_ADDITIVE
1249 { $class-description
1250     Blend mode for blending textures while adding colors
1251     { $see-also BlendMode } } ;
1252
1253 HELP: BLEND_MULTIPLIED
1254 { $class-description
1255     Blend mode for blending textures while multiplying colors.
1256     { $see-also BlendMode } } ;
1257
1258 HELP: BLEND_ADD_COLORS
1259 { $class-description
1260     Alternative blend mode to \ BLEND_ADDITIVE
1261     { $see-also BlendMode } } ;
1262
1263 HELP: BLEND_SUBTRACT_COLORS
1264 { $class-description
1265     Blend mode for blending textures while subtracting colors.
1266     { $see-also BlendMode } } ;
1267
1268 HELP: BLEND_ALPHA_PREMULTIPLY
1269 { $class-description
1270     Blend mode for blending premultipled textures while considering the alpha channel
1271     { $see-also BlendMode } } ;
1272
1273 HELP: BLEND_CUSTOM
1274 { $class-description
1275     Blend mode for using custom src/dst factors. This is intended for use with
1276     { $snippet rl-set-blend-factors } from { $vocab-link "rlgl" } .
1277     { $see-also BlendMode } } ;
1278
1279 HELP: BLEND_CUSTOM_SEPARATE
1280 { $class-description
1281     Blend mode for using custom rgb/alpha seperate src/dst
1282     factors. This is intended for use with { $snippet rl-set-blend-factors-seperate }
1283     from { $vocab-link "rlgl" } .
1284     { $see-also BlendMode } } ;
1285
1286
1287 ! Gestures enum
1288 HELP: Gestures
1289 { $var-description
1290     Represents the various touch gestures Raylib supports.
1291     This enum is a set of bitflags to enable desired
1292     gestures individually.
1293
1294     { $enum-members Gestures } } ;
1295
1296 HELP: GESTURE_NONE
1297 { $class-description
1298     Used as the empty set of gestures.
1299
1300     Has the value: { $snippet 0 }
1301     { $see-also Gestures } } ;
1302
1303 HELP: GESTURE_TAP
1304 { $class-description
1305     Represents a tap gesture.
1306
1307     Has the value: { $snippet 1 }
1308     { $see-also Gestures } } ;
1309
1310 HELP: GESTURE_DOUBLETAP
1311 { $class-description
1312     Represents a double tap gesture.
1313
1314     Has the value: { $snippet 2 }
1315     { $see-also Gestures } } ;
1316
1317 HELP: GESTURE_HOLD
1318 { $class-description
1319     Represents a hold gesture.
1320
1321     Has the value: { $snippet 4 }
1322     { $see-also Gestures } } ;
1323
1324 HELP: GESTURE_DRAG
1325 { $class-description
1326     Represents a drag gesture.
1327
1328     Has the value: { $snippet 8 }
1329     { $see-also Gestures } } ;
1330 HELP: GESTURE_SWIPE_RIGHT
1331 { $class-description
1332     Represents a swipe to the right.
1333
1334     Has the value: { $snippet 16 }
1335     { $see-also Gestures } } ;
1336
1337 HELP: GESTURE_SWIPE_LEFT
1338 { $class-description
1339     Represents a swipe to the left
1340
1341     Has the value: { $snippet 32 }
1342     { $see-also Gestures } } ;
1343
1344 HELP: GESTURE_SWIPE_UP
1345 { $class-description
1346     Represents a swap upwards.
1347
1348     Has the value: { $snippet 64 }
1349     { $see-also Gestures } } ;
1350
1351 HELP: GESTURE_SWIPE_DOWN
1352 { $class-description
1353     Represents a swap downwards.
1354
1355     Has the value: { $snippet 128 }
1356     { $see-also Gestures } } ;
1357
1358 HELP: GESTURE_PINCH_IN
1359 { $class-description
1360     Represents a inwards pinch.
1361
1362     Has the value: { $snippet 256 }
1363     { $see-also Gestures } } ;
1364
1365 HELP: GESTURE_PINCH_OUT
1366 { $class-description
1367     Represents a outwards pinch.
1368
1369     Has the value: { $snippet 512 }
1370     { $see-also Gestures } } ;
1371
1372
1373 ! Camera mode enum
1374 HELP: CameraMode
1375 { $var-description
1376     The various modes a camera can behave in Raylib.
1377
1378     { $enum-members CameraMode } } ;
1379
1380 HELP: CAMERA_CUSTOM
1381 { $class-description
1382     A 3D camera with custom behavior.
1383
1384     { $see-also CameraMode } } ;
1385
1386 HELP: CAMERA_FREE
1387 { $class-description
1388     A \ Camera3D with unrestricted movement.
1389
1390     { $see-also CameraMode } } ;
1391
1392 HELP: CAMERA_ORBITAL
1393 { $class-description
1394     A \ Camera3D that will orbit a fixed point in 3D space.
1395
1396     { $see-also CameraMode } } ;
1397
1398 HELP: CAMERA_FIRST_PERSON
1399 { $class-description
1400     A \ Camera3D that cannot roll and looked on the up-axis.
1401
1402     { $see-also CameraMode } } ;
1403
1404 HELP: CAMERA_THIRD_PERSON
1405 { $class-description
1406     Similiar to \ CAMERA_FIRST_PERSON , however the camera is focused
1407     to a target point.
1408
1409     { $see-also CameraMode } } ;
1410
1411
1412 ! Camera projection enum
1413 HELP: CameraProjection
1414 { $var-description
1415     Represents the projects a camera can use.
1416
1417     { $enum-members CameraProjection } } ;
1418
1419 HELP: CAMERA_PERSPECTIVE
1420 { $class-description
1421     Sets a \ Camera3D to use a perspective projection.
1422
1423     { $see-also CameraProjection } } ;
1424
1425 HELP: CAMERA_ORTHOGRAPHIC
1426 { $class-description
1427     Sets a \ Camera3D to use an orthographic projection. Parallel lines
1428     will stay parallel in this projection.
1429
1430     { $see-also CameraProjection } } ;
1431
1432
1433 ! N-patch layout enum
1434 HELP: NPatchLayout
1435 { $var-description
1436     Raylib features support for " \"n-patch\" " tiles. N-patches allow
1437     for texture to be automatically repeated and stretched. Raylib
1438     has support for the follow n-patch styles:
1439     { $list
1440         { "3x3 (" { $link NPATCH_NINE_PATCH } ")"           }
1441         { "1x3 (" { $link NPATCH_THREE_PATCH_VERTICAL } ")" }
1442         { "3x1 (" { $link NPATCH_THREE_PATCH_HORIZONTAL } ")" }
1443     }
1444     $nl
1445     See the following page for an example:
1446     $nl
1447     { $url "https://www.raylib.com/examples/textures/loader.html?name=textures_npatch_drawing" }
1448     { $enum-members NPatchLayout } } ;
1449
1450 HELP: NPATCH_NINE_PATCH
1451 { $class-description
1452     Represents a 3x3 n-patch tile. This tile type can expand both horizontally
1453     and vertically. It has the following sections:
1454     { $list
1455         { "4 corners that are neither stretched nor scaled." }
1456         { "4 edge tiles (top, bottom, left, right) that will be repeated
1457             vertically and horizontally." }
1458         { "1 center tile that will be stretched to fill the space between
1459             the edge tiles and corner tiles." }
1460     }
1461
1462     { $see-also NPatchLayout } } ;
1463
1464 HELP: NPATCH_THREE_PATCH_VERTICAL
1465 { $class-description
1466     Represents a 1x3 tiling that can be stretched vertically.
1467
1468     { $see-also NPatchLayout } } ;
1469
1470 HELP: NPATCH_THREE_PATCH_HORIZONTAL
1471 { $class-description
1472     Represents a 3x1 tiling that can be streched vertically.
1473
1474     { $see-also NPatchLayout } } ;
1475
1476 HELP: Vector2
1477 { $class-description
1478     Represents a 2D vector in Raylib. Implements the
1479     { $link "sequence-protocol" } .
1480
1481     { $warning
1482         Values are all single-precision where
1483         as Factor is double precision (see \ alien.c-types:float ) } } ;
1484
1485 HELP: Vector3
1486 { $class-description
1487     Represents a 3D vector in Raylib. Implements the
1488     { $link "sequence-protocol" } .
1489
1490     { $warning
1491         Values are all single-precision where
1492         as Factor is double precision (see \ alien.c-types:float ) } } ;
1493
1494 HELP: Vector4
1495 { $class-description
1496     Represents a 4D vector in Raylib. Implements the
1497     { $link "sequence-protocol" } .
1498
1499     { $warning
1500         Values are all single-precision where
1501         as Factor is double precision (see \ alien.c-types:float ) } } ;
1502
1503 HELP: Quaternion
1504 { $description
1505     A c-typedef for a \ Vector4 . } ;
1506
1507 HELP: invalid-vector-length 
1508 { $error-description 
1509     Raised when calling functions such as \ like
1510     and \ new-sequence . Indicates that the 
1511     converted sequence doesn't fit into the bounds
1512     of the given \ Vector2 , \ Vector3 , \ Vector4 . } ;
1513
1514 HELP: <Vector2> 
1515 { $values 
1516     x: float 
1517     y: float 
1518     obj: Vector2 }
1519 { $description
1520     Constructs a new \ Vector2 . } ;
1521
1522 HELP: <Vector3> 
1523 { $values 
1524     x: float 
1525     y: float 
1526     z: float 
1527     obj: Vector3 }
1528 { $description
1529     Constructs a new \ Vector3 . } ;
1530
1531 HELP: <Vector4> 
1532 { $values 
1533     x: float 
1534     y: float 
1535     z: float 
1536     w: float 
1537     obj: Vector4 }
1538 { $description
1539     Constructs a new \ Vector4 . } ;
1540
1541 HELP: Matrix
1542 { $class-description
1543     Represents a 4x4 OpenGL style matrix. It's right handed
1544     and column major.
1545
1546     { $warning
1547         Values are all single-precision where
1548         as Factor is double precision (see \ alien.c-types:float ) } } ;
1549 HELP: Color
1550 { $class-description
1551     Represents a RGBA color with 8-bit unsigned components.
1552     Raylib comes with 25 default colors.
1553
1554     { $heading Builtin colors }
1555     { $subsections
1556         LIGHTGRAY
1557         GRAY
1558         DARKGRAY
1559         YELLOW
1560         GOLD
1561         ORANGE
1562         PINK
1563         RED
1564         MAROON
1565         GREEN
1566         LIME
1567         DARKGREEN
1568         SKYBLUE
1569         BLUE
1570         DARKBLUE
1571         PURPLE
1572         VIOLET
1573         DARKPURPLE
1574         BEIGE
1575         BROWN
1576         DARKBROWN
1577         WHITE
1578         BLACK
1579         MAGENTA
1580         RAYWHITE } } ;
1581
1582 HELP: Rectangle
1583 { $class-description
1584     Represents a 2D rectangle defined by a x position, y position, width, and height.
1585     { $warning
1586         Values are all single-precision where
1587         as Factor is double precision (see \ alien.c-types:float ) } } ;
1588
1589 HELP: Image
1590 { $class-description 
1591     Represents a RGBA (32bit) image in Raylib. 
1592     Data is always stored in main memory. }
1593 { $heading Fields }
1594 { $table 
1595     { "data"    { $link void* }       "Image raw data"                 }
1596     { "width"   { $link int }         "Image base width"               }
1597     { "height"  { $link int }         "Image base height"              }
1598     { "mipmaps" { $link int }         "Mipmap levels, 1 by default"    }
1599     { "format"  { $link PixelFormat } "Data format (PixelFormat type)" } 
1600 } ;
1601
1602 HELP: Texture2D
1603 { $class-description 
1604     Represents an texture stored on the GPU. }
1605 { $heading Fields }
1606 { $table 
1607     { "id"      { $link uint        }  "OpenGL Texture ID"              }   
1608     { "width"   { $link int         }  "Texture Base Width"             }  
1609     { "height"  { $link int         }  "Texture Base Height"            }                 
1610     { "mipmaps" { $link int         }  "Mipmap Levels, 1 by default"    }               
1611     { "format"  { $link PixelFormat }  "Data Format (PixelFormat type)" }     
1612 }  ;
1613
1614 HELP: RenderTexture2D
1615 { $class-description
1616     FBO for texture rendering. }
1617 { $heading Fields }
1618 { $table 
1619     { "id"       { $link uint      } "OpenGL Framebuffer Object (FBO) id" }                         
1620     { "texture"  { $link Texture2D } "Color buffer attachment texture"    }               
1621     { "depth"    { $link Texture2D } "Depth buffer attachment texture"    } 
1622 } ;               
1623
1624
1625 HELP: NPatchInfo
1626 { $class-description
1627     Information about a n-patch tile. }
1628 { $heading Fields }
1629 { $table 
1630     { "source"  { $link Rectangle } "Texture source rectangle"               }
1631     { "left"    { $link int       } "Left border offset"                     }
1632     { "top"     { $link int       } "Top border offset"                      }
1633     { "right"   { $link int       } "Right border offset"                    }
1634     { "bottom"  { $link int       } "Bottom border offset"                   }
1635     { "layout"  { $link int       } "Layout of the n-patch: 3x3, 1x3 or 3x1" }
1636 } ;
1637
1638 HELP: GlyphInfo
1639 { $class-description 
1640     Contains information about the gyphs in a font. }
1641 { $heading Fields }
1642 { $table 
1643     { "value"    { $link int    } "Texture source rectangle"  }
1644     { "offsetX"  { $link int    } "Texture source rectangle"  }
1645     { "offsetY"  { $link int    } "Left border offset"        }
1646     { "advanceX" { $link int    } "Top border offset"         }
1647     { "image"    { $link Image  } "Right border offset"       }
1648 } ;
1649
1650 HELP: Font
1651 { $class-description
1652     Represents a collections of glyphs that can be drawn to the screen.
1653     The fields are defined as followed: }
1654 { $heading Fields }
1655 { $table
1656     { { $snippet baseSize     } { " the base size of the characters. This is how tall a glyph is." } }
1657     { { $snippet glyphCount   } { " the number of glyph characters." } }
1658     { { $snippet glyphPadding } { " the padding around each glyph." } }
1659     { { $snippet texture      } { " the texture atlas continaing the glyphs." } }
1660     { { $snippet recs         } { " an array of rectangles used to find each glyph in " { $snippet texture } "." } }
1661     { { $snippet glyphs       } { " metadata about each glyph." } }
1662 } ;
1663
1664 HELP: Camera3D
1665 { $class-description
1666     Represents a camera in 3D space. The fields are defined as followed: }
1667 { $heading Fields }
1668 { $table
1669     { { $snippet position   } " is the camera position in 3D space." }
1670     { { $snippet target     } " is the target the camera is looking at." }
1671     { { $snippet up         } " is the direction that faces up relative to the camera." }
1672     { { $snippet fovy       } " is the camera's field of view aperature in degrees. Used as the near-plane for orthogrphic projections." }
1673     { { $snippet projection } " is the camera's projection:" { $link CAMERA_PERSPECTIVE } " or " { $link CAMERA_ORTHOGRAPHIC } }
1674 } ;
1675
1676 HELP: Camera2D
1677 { $class-description
1678     Represents a camera in 2D space. The fields are defined
1679     as followed: }
1680 { $heading Fields }
1681 { $table
1682     { { $snippet offset   } " is the camera offset (dispacement from target)" }
1683     { { $snippet target   } " is the camera target (rotation and zoom origin)." }
1684     { { $snippet rotation } " is the camera rotation in degrees." }
1685     { { $snippet zoom     } " is the camera zoom/scalling, should be 1.0f by default." } } ;
1686
1687 HELP: Camera
1688 { $var-description
1689     A c-typedef alias for \ Camera3D .
1690 } ;
1691
1692 HELP: Mesh 
1693 { $class-description
1694     Holds the vertex data and VAO/VBO for a 3D mesh. } 
1695  
1696 { $heading Fields }
1697 { $table
1698     { "vertexCount"   { $link int } "Number of vertices stored in arrays" }    
1699     { "triangleCount" { $link int } "Number of triangles stored (indexed or not)" }  
1700     { "_vertices"     { { $link float  } { $snippet "*" } } "Vertex position (XYZ - 3 components per vertex)"                                }   
1701     { "_texcoords"    { { $link float  } { $snippet "*" } } "Vertex texture coordinates (UV - 2 components per vertex)"                     }  
1702     { "_texcoords2"   { { $link float  } { $snippet "*" } } "Vertex second texture coordinates (useful for lightmaps)"                       } 
1703     { "_normals"      { { $link float  } { $snippet "*" } } "Vertex normals (XYZ - 3 components per vertex)"                                 }   
1704     { "tangents"      { { $link float  } { $snippet "*" } } "Vertex tangents (XYZW - 4 components per vertex)"                              }    
1705     { "colors"        { { $link uchar  } { $snippet "*" } } "Vertex colors (RGBA - 4 components per vertex)"                                 }      
1706     { "indices"       { { $link ushort } { $snippet "*" } } "Vertex indices (in case vertex data comes indexed)"                             }    
1707     
1708     { "animVertices"  { { $link float  } { $snippet "*" } } "Animated vertex positions (after bones transformations)"                        }
1709     { "animNormals"   { { $link float  } { $snippet "*" } } "Animated normals (after bones transformation)"                                  }
1710     { "boneIds"       { { $link uchar  } { $snippet "*" } } "Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skining)" }
1711     { "boneWeights"   { { $link float  } { $snippet "*" } } "Vertex bone weight, up to 4 bones influence by vertex (skinning)"               }
1712     
1713     { "vaoId"         { $link uint                      } "OpenGL Vertex Array Object id"                                                    } 
1714     { "vboId"         { { $link uint } { $snippet "*" } } "OpenGL Vertex Buffer Objects id (7 types of vertex data)"                         } } ;   
1715
1716
1717 HELP: Shader
1718 { $class-description 
1719     Represents a graphics shader in Raylib. The size of 
1720     { $snippet locs } depends on { $snippet MAX_SHADER_LOCATIONS } . 
1721     
1722     { $warning 
1723         { $snippet MAX_SHADER_LOCATIONS } is set when raylib is compiled
1724         to a shared library. This cannot be changed from Factor. } }
1725 { $heading Fields }
1726 { $table
1727     { "id"   { $link uint                     } "Shader program id"      } 
1728     { "locs" { { $link int } { $snippet "*" } } "Shader locations array" } } ;
1729
1730
1731 HELP: MaterialMap
1732
1733 { $heading Fields }
1734 { $table 
1735     { "texture" { $link Texture2D } "Material map Texture" }     
1736     { "color"   { $link Color }     "Material map color"   }          
1737     { "value"   { $link float }     "Material map value"   } } ;        
1738
1739 HELP: Material
1740
1741 { $heading Fields } 
1742 { $table 
1743     { "shader" { $link Shader                             }  "Material shader"                           }
1744     { "_maps"  { { $link MaterialMap } { $snippet "*"   } } "Material maps.  Uses MAX_MATERIAL_MAPS."    }   
1745     { "params" { { $link float       } { $snippet "[4]" } }  "Material generic parameters (if required)" } } ;    
1746
1747 HELP: Transform
1748 { $class-description 
1749     Represents a 3D vertex transformation. }
1750 { $heading Fields }
1751 { $table
1752     { "translation" { $link Vector3    } }
1753     { "rotation"    { $link Quaternion } }
1754     { "scale"       { $link Vector3    } } } ;
1755
1756
1757 HELP: BoneInfo
1758 { $class-description
1759     A skeletal animation bone. }
1760 { $heading Fields }
1761 { $table
1762     { { $snippet name }     " is the name of the bone. Max 32 characters." }
1763     { { $snippet processor }  " the parent index." } } ;
1764
1765 HELP: Model
1766 { $class-description
1767     Meshes, materials and animation data }
1768 { $heading Fields }
1769 { $table
1770     { "transform"     { $link Matrix                     } "Local transform matrix."           }
1771     { "meshCount"     { $link int                        } "Number of meshes."                 }
1772     { "materialCount" { $link int                        } "Number of materials."              }
1773     { "_meshes"       { { $link void } { $snippet "*" }  } "Meshes array."                     }
1774     { "_materials"    { { $link void } { $snippet "*" }  } "Materials array."                  }
1775     { "meshMaterial"  { { $link int  } { $snippet "*" }  } "Mesh material number."             }
1776     { "boneCount"     { $link int                        } "Number of bones."                  }
1777     { "_bones"        { { $link void } { $snippet "*"  } } "Bones information (skeleton)."     }
1778     { "bindPose"      { { $link void } { $snippet "*"  } } "Bones base transformation (pose)." } } ;
1779
1780
1781 HELP: ModelAnimation
1782 { $class-description 
1783     Represents information about a animation for a 3D model. }
1784 { $heading Fields }
1785 { $table
1786     { "boneCount"  { $link int                             }  "Number of bones."              }
1787     { "frameCount" { $link int                             }  "Numbero f animation frames."   }
1788     { "_bones"     { { $link BoneInfo  } { $snippet "**" } }  "Bones information (skeleton)." }
1789     { "framePoses" { { $link Transform } { $snippet "**" } }  "Poses array by frame"          } } ;
1790
1791
1792 HELP: Ray
1793 { $class-description
1794     Represents a ray casted across 3D space. }
1795 { $heading Fields } 
1796 { $table 
1797     { "position"  { $link Vector3 } "Ray position (origin)" }   
1798     { "direction" { $link Vector3 } "Ray direction"         } } ;
1799
1800 HELP: RayCollision
1801 { $class-description
1802     Represents collision information from a Ray. }
1803 { $heading Fields } 
1804 { $table
1805     { "hit"      { $link bool    } "Did the ray hit something?" }  
1806     { "distance" { $link float   } "Distance to nearest hit"    }  
1807     { "point"    { $link Vector3 } "Point of nearest hit"       }  
1808     { "normal"   { $link Vector3 } "Surface normal of hit"      } } ;
1809
1810 HELP: BoundingBox
1811 { $class-description
1812     Represents a 3D bounding box defined by two points: }
1813 { $heading Fields }
1814 { $table
1815     { { $snippet min }  " The minimum vertex box-corner." }
1816     { { $snippet max }  " The maxium vertex box-corner." }
1817 } ;
1818
1819 HELP: Wave
1820 { $class-description 
1821     Audio wave data }
1822 { $heading Fields } 
1823 { $table 
1824     { "frameCount" { $link uint  } "Total number of frames (considering channels)" }   
1825     { "sampleRate" { $link uint  } "Frequency (samples per second)"                }   
1826     { "sampleSize" { $link uint  } "Bit depth (bits per sample): 8,16,32"          }   
1827     { "channels"   { $link uint  } "Number of channels (1-mono, 2-stereo)"         }     
1828     { "data"       { $link void* } "Buffer data pointer"                           } } ;      
1829
1830 HELP: AudioStream
1831 { $class-description
1832     Represents a stream of audio data in Raylib. }
1833 { $heading Fields }
1834 { $table
1835     { { $snippet buffer }     " a pointer to the internal data used by the audio system."            }
1836     { { $snippet processor }  " a pointer to the interanl data processor, useful for audio effects." }
1837     { { $snippet sampleRate } " the frequence of the samples."                                       }
1838     { { $snippet sampleSize } " the bit depth of the samples: spport values are 8, 16, and 32."      }
1839     { { $snippet channels }   " the number of channels: 1 for mono, 2 for stereo."                   }
1840 } ;
1841
1842 HELP: Sound
1843
1844 { $heading Fields } 
1845 { $table 
1846     { "stream"     { $link AudioStream } "Audio stream"                                  }  
1847     { "frameCount" { $link uint        } "Total number of frames (considering channels)" } } ; 
1848
1849 HELP: Music
1850 { $class-description 
1851     Audio stream, anything longer than ~10 seconds should be streamed. }
1852 { $heading Fields } 
1853 { $table
1854     { "stream"     { $link AudioStream } "Audio stream"                                  }
1855     { "frameCount" { $link uint        } "Total number of frames (considering channels)" }
1856     { "looping"    { $link bool        } "Music looping enable"                          }
1857     { "ctxType"    { $link int         } "Type of music context (audio filetype)"        }
1858     { "ctxData"    { $link void*       } "Audio context data, depends on type"           } } ;
1859
1860 HELP: VrDeviceInfo
1861 { $class-description 
1862     Hold the configuation for a VR device. }
1863 { $heading Fields }
1864 { $table
1865     { "hResolution"            { $link int                          } "HMD horizontal resolution in pixels"            }               
1866     { "vResolution"            { $link int                          } "HMD verticle resolution in pixels"              }               
1867     { "hScreenSize"            { $link float                        } "HMD horizontal size in meters"                  }             
1868     { "vScreenSize"            { $link float                        } "HMD verticle size in meters"                    }             
1869     { "vScreenCenter"          { $link float                        } "HMD screen center in meters"                    }           
1870     { "eyeToScreenDistance"    { $link float                        } "HMD distance between eye and display in meters" }     
1871     { "lensSeparationDistance" { $link float                        } "HMD lens separation distance in meters"         }  
1872     { "interpupillaryDistance" { $link float                        } "HMD IPD in meters"                              }  
1873     { "lensDistortionValues"   { { $link float } { $snippet "[4]" } } "HMD lens distortion constant parameters"        } 
1874     { "chromaAbCorrection"     { { $link float } { $snippet "[4]" } } "HMD chromatic abberation correction parameters" } } ; 
1875
1876 HELP: VrStereoConfig
1877 { $class-description 
1878     VR stereo rendering configuration for simulator. }
1879 { $heading Fields }
1880 { $table 
1881     { "projection"        { { $link Matrix } { $snippet [2] } "VR projection matrices (per eye)"  } }
1882     { "viewOffset"        { { $link Matrix } { $snippet [2] } "VR view offset matrices (per eye)" } }  
1883     { "leftLensCenter"    { { $link float }  { $snippet [2] } "VR left lens center"               } }     
1884     { "rightLensCenter"   { { $link float }  { $snippet [2] } "VR right lens center"              } }    
1885     { "leftScreenCenter"  { { $link float }  { $snippet [2] } "VR left screen center"             } }   
1886     { "rightScreenCenter" { { $link float }  { $snippet [2] } "VR right screen center"            } }  
1887     { "scale"             { { $link float }  { $snippet [2] } "VR distortion scale"               } }              
1888     { "scaleIn"           { { $link float }  { $snippet [2] } "VR distortion scale in"            } }
1889 } ;           
1890
1891 HELP: FilePathList
1892 { $class-description
1893     A list of file paths returned from \ load-directory-files ,
1894     \ load-directory-files-ex . Must be freed with
1895     \ unload-directory-files . }
1896
1897 { $heading Fields }
1898 { $table
1899     { { $snippet capacity } " the max number of entries." }
1900     { { $snippet count } " the number of entries found." }
1901     { { $snippet paths } " array of string where each member is a file path." }
1902 }
1903
1904 { $see-also
1905     load-directory-files
1906     load-directory-files-ex
1907     unload-directory-files
1908 } ;
1909
1910
1911 HELP: LIGHTGRAY  { $raylib-color "200, 200, 200, 255" } ;
1912 HELP: GRAY       { $raylib-color "130, 130, 130, 255" } ;
1913 HELP: DARKGRAY   { $raylib-color "80, 80, 80, 255" } ;
1914 HELP: YELLOW     { $raylib-color "253, 249, 0, 255" } ;
1915 HELP: GOLD       { $raylib-color "255, 203, 0, 255" } ;
1916 HELP: ORANGE     { $raylib-color "255, 161, 0, 255" } ;
1917 HELP: PINK       { $raylib-color "255, 109, 194, 255" } ;
1918 HELP: RED        { $raylib-color "230, 41, 55, 255" } ;
1919 HELP: MAROON     { $raylib-color "190, 33, 55, 255" } ;
1920 HELP: GREEN      { $raylib-color "0, 228, 48, 255" } ;
1921 HELP: LIME       { $raylib-color "0, 158, 47, 255" } ;
1922 HELP: DARKGREEN  { $raylib-color "0, 117, 44, 255" } ;
1923 HELP: SKYBLUE    { $raylib-color "102,  191, 255, 255" } ;
1924 HELP: BLUE       { $raylib-color "0, 121, 241, 255" } ;
1925 HELP: DARKBLUE   { $raylib-color "0, 82, 172, 255" } ;
1926 HELP: PURPLE     { $raylib-color "200, 122, 255, 255" } ;
1927 HELP: VIOLET     { $raylib-color "135, 60, 190, 255 " } ;
1928 HELP: DARKPURPLE { $raylib-color "112, 31, 126, 255 " } ;
1929 HELP: BEIGE      { $raylib-color "211, 176, 131, 255" } ;
1930 HELP: BROWN      { $raylib-color "127, 106, 79, 255 " } ;
1931 HELP: DARKBROWN  { $raylib-color "76, 63, 47, 255" } ;
1932
1933 HELP: WHITE      { $raylib-color "255, 255, 255, 255" } ;
1934 HELP: BLACK      { $raylib-color "0, 0, 0, 255" } ;
1935 HELP: BLANK      { $raylib-color "0, 0, 0, 0" } ;
1936 HELP: MAGENTA    { $raylib-color "255, 0, 255, 255" } ;
1937 HELP: RAYWHITE   { $raylib-color "245, 245, 245, 255" } ;
1938
1939 ! Window-related functions
1940 HELP: init-window
1941 { $values
1942     width: int
1943     height: int
1944     title: c-string }
1945 { $description
1946     "Initialize window and OpenGL context" } ;
1947
1948 HELP: window-should-close
1949 { $values
1950     bool: bool }
1951 { $description
1952     "Check if KEY_ESCAPE pressed or Close icon pressed" } ;
1953
1954 HELP: close-window
1955 { $description
1956     "Close window and unload OpenGL context" } ;
1957
1958 HELP: is-window-ready
1959 { $values
1960     bool: boolean }
1961 { $description
1962     "Check if window has been initialized successfully" } ;
1963
1964 HELP: is-window-fullscreen
1965 { $values
1966     bool: boolean }
1967 { $description
1968     "Check if window is currently fullscreen" } ;
1969
1970 HELP: is-window-hidden
1971 { $values
1972     bool: boolean }
1973 { $description
1974     "Check if window is currently hidden (only PLATFORM_DESKTOP)" } ;
1975
1976 HELP: is-window-minimized
1977 { $values
1978     bool: boolean }
1979 { $description
1980     "Check if window is currently minimized (only PLATFORM_DESKTOP)" } ;
1981
1982 HELP: is-window-maximized
1983 { $values
1984     bool: boolean }
1985 { $description
1986     "Check if window is currently maximized (only PLATFORM_DESKTOP)" } ;
1987
1988 HELP: is-window-focused
1989 { $values
1990     bool: boolean }
1991 { $description
1992     "Check if window is currently focused (only PLATFORM_DESKTOP)" } ;
1993
1994 HELP: is-window-resized
1995 { $values
1996     bool: boolean }
1997 { $description
1998     "Check if window has been resized last frame" } ;
1999
2000 HELP: is-window-state
2001
2002 { $values
2003     flag: uint
2004     bool: boolean }
2005 { $description
2006     "Check if one specific window flag is enabled" } ;
2007
2008 HELP: set-window-state
2009 { $values
2010     flags: uint }
2011 { $description
2012     "Set window configuration state using flags" } ;
2013
2014 HELP: clear-window-state
2015 { $values
2016     flags: uint }
2017 { $description
2018     "Clear window configuration state flags" } ;
2019
2020 HELP: toggle-fullscreen
2021 { $description
2022     "Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)" } ;
2023
2024 HELP: maximize-window
2025 { $description
2026     "Set window state: maximized, if resizable (only PLATFORM_DESKTOP)" } ;
2027
2028 HELP: minimize-window
2029 { $description
2030     "Set window state: minimized, if resizable (only PLATFORM_DESKTOP)" } ;
2031
2032 HELP: restore-window
2033 { $description
2034     "Set window state: not minimized/maximized (only PLATFORM_DESKTOP)" } ;
2035
2036 HELP: set-window-icon
2037 { $values
2038     image: Image }
2039 { $description
2040     "Set icon for window (only PLATFORM_DESKTOP)" } ;
2041
2042 HELP: set-window-icons
2043 { $values
2044     images: { "a " { $link pointer } " to an array of " { $link Image } }
2045     count: int } ;
2046
2047 HELP: set-window-title
2048 { $values
2049     title: c-string }
2050 { $description
2051     "Set title for window (only PLATFORM_DESKTOP)" } ;
2052
2053 HELP: set-window-position
2054 { $values
2055     x: int
2056     y: int }
2057 { $description
2058     "Set window position on screen (only PLATFORM_DESKTOP)" } ;
2059
2060 HELP: set-window-monitor
2061 { $values
2062     monitor: int }
2063 { $description
2064     "Set monitor for the current window (fullscreen mode)" } ;
2065
2066 HELP: set-window-min-size
2067 { $values
2068     width: int
2069     height: int }
2070 { $description
2071     "Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)" } ;
2072
2073 HELP: set-window-size
2074 { $values
2075     width: int
2076     height: int }
2077 { $description
2078     "Set window dimensions" } ;
2079
2080 HELP: set-window-opacity
2081 { $values
2082     opacity: float }
2083 { $description
2084     "Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)" } ;
2085
2086 HELP: get-window-handle
2087 { $values
2088     void*: void* }
2089 { $description
2090     "Get native window handle" } ;
2091
2092 HELP: get-screen-width
2093 { $values
2094     int: int }
2095 { $description
2096     "Get current screen width" } ;
2097
2098 HELP: get-screen-height
2099 { $values
2100     int: int }
2101 { $description
2102     "Get current screen height" } ;
2103
2104 HELP: get-render-width
2105 { $values
2106     int: int }
2107 { $description
2108     "Get current render width (it considers HiDPI)" } ;
2109
2110 HELP: get-render-height
2111 { $values
2112     int: int }
2113 { $description
2114     "Get current render height (it considers HiDPI)" } ;
2115
2116 HELP: get-monitor-count
2117 { $values
2118     int: int }
2119 { $description
2120     "Get number of connected monitors" } ;
2121
2122 HELP: get-current-monitor
2123 { $values
2124     int: int }
2125 { $description
2126     "Get current connected monitor" } ;
2127
2128 HELP: get-monitor-position
2129 { $values
2130     monitor: int
2131     Vector2: Vector2 }
2132 { $description
2133     "Get specified monitor position" } ;
2134
2135 HELP: get-monitor-width
2136 { $values
2137     monitor: int
2138     int: int }
2139 { $description
2140     "Get specified monitor width (max available by monitor)" } ;
2141
2142 HELP: get-monitor-height
2143 { $values
2144     monitor: int
2145     int: int }
2146 { $description
2147     "Get specified monitor height (max available by monitor)" } ;
2148
2149 HELP: get-monitor-physical-width
2150 { $values
2151     monitor: int
2152     int: int }
2153 { $description
2154     "Get specified monitor physical width in millimetres" } ;
2155
2156 HELP: get-monitor-physical-height
2157 { $values
2158     monitor: int
2159     int: int }
2160 { $description
2161     "Get specified monitor physical height in millimetres" } ;
2162
2163 HELP: get-monitor-refresh-rate
2164 { $values
2165     monitor: int
2166     int: int }
2167 { $description
2168     "Get specified monitor refresh rate" } ;
2169
2170 HELP: get-window-position
2171 { $values
2172     Vector2: Vector2 }
2173 { $description
2174     "Get window position XY on monitor" } ;
2175
2176 HELP: get-window-scale-dpi
2177 { $values
2178     Vector2: Vector2 }
2179 { $description
2180     "Get window scale DPI factor" } ;
2181
2182 HELP: get-monitor-name
2183 { $values
2184     monitor: int
2185     c-string: c-string }
2186 { $description
2187     "Get the human-readable, UTF-8 encoded name of the primary monitor" } ;
2188
2189 HELP: set-clipboard-text
2190 { $values
2191     text: c-string }
2192 { $description
2193     "Set clipboard text content" } ;
2194
2195 HELP: get-clipboard-text
2196 { $values
2197     c-string: c-string }
2198 { $description
2199     "Get clipboard text content" } ;
2200
2201 HELP: enable-event-waiting
2202 { $description
2203     "Enable waiting for events on EndDrawing(), no automatic event polling" } ;
2204
2205 HELP: disable-event-waiting
2206 { $description
2207     "Disable waiting for events on EndDrawing(), automatic events polling" } ;
2208
2209
2210 ! Custom frame control functions
2211 HELP: swap-screen-buffer
2212 { $description
2213     "Swap back buffer with front buffer (screen drawing)"
2214
2215     { $warning
2216         "Those functions are intended for advance users that want"
2217         " full control over the frame processing. By default"
2218         " EndDrawing() does this job: \n\t- draws everything"
2219         "\n\t- " { $link swap-screen-buffer }
2220         "\n\t- manage frame timming"
2221         "\n\t- " { $link poll-input-events } ".\n"
2222         "To avoid that behavior and control frame processes manually,"
2223         " enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL" } } ;
2224
2225 HELP: poll-input-events
2226 { $description
2227     "Register all input events"
2228
2229     { $warning
2230         "Those functions are intended for advance users that want"
2231         " full control over the frame processing. By default"
2232         " EndDrawing() does this job: \n\t- draws everything"
2233         "\n\t- " { $link swap-screen-buffer }
2234         "\n\t- manage frame timming"
2235         "\n\t- " { $link poll-input-events } ".\n"
2236         "To avoid that behavior and control frame processes manually,"
2237         " enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL" } } ;
2238
2239 HELP: wait-time
2240 { $values
2241     seconds: double }
2242 { $description
2243     "Wait for some milliseconds (halt program execution)"
2244
2245     { $warning
2246         "Those functions are intended for advance users that want"
2247         " full control over the frame processing. By default"
2248         " EndDrawing() does this job: \n\t- draws everything"
2249         "\n\t- " { $link swap-screen-buffer }
2250         "\n\t- manage frame timming"
2251         "\n\t- " { $link poll-input-events } ".\n"
2252         "To avoid that behavior and control frame processes manually,"
2253         " enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL" } } ;
2254
2255
2256 ! Cursor-related functions
2257 HELP: show-cursor
2258 { $description
2259     "Shows cursor" } ;
2260
2261 HELP: hide-cursor
2262 { $description
2263     "Hides cursor" } ;
2264
2265 HELP: is-cursor-hidden
2266 { $values
2267     bool: boolean }
2268 { $description
2269     "Check if cursor is not visible" } ;
2270
2271 HELP: enable-cursor
2272 { $description
2273     "Enables cursor (unlock cursor)" } ;
2274
2275 HELP: disable-cursor
2276 { $description
2277     "Disables cursor (lock cursor)" } ;
2278
2279 HELP: is-cursor-on-screen
2280 { $values 
2281     bool: bool }
2282 { $description
2283     "Check if cursor is on the screen" } ;
2284
2285
2286 ! Drawing-related functions
2287 HELP: clear-background
2288 { $values
2289     color: Color }
2290 { $description
2291     "Set background color (framebuffer clear color)" } ;
2292
2293 HELP: begin-drawing
2294 { $description
2295     "Setup canvas (framebuffer) to start drawing" } ;
2296
2297 HELP: end-drawing
2298 { $description
2299     "End canvas drawing and swap buffers (double buffering)" } ;
2300
2301 HELP: begin-mode-2d
2302 { $values
2303     camera: Camera2D }
2304 { $description
2305     "Begin 2D mode with custom camera (2D)" } ;
2306
2307 HELP: end-mode-2d
2308 { $description
2309     "Ends 2D mode with custom camera" } ;
2310
2311 HELP: begin-mode-3d
2312 { $values
2313     camera: Camera3D }
2314 { $description
2315     "Begin 3D mode with custom camera (3D)" } ;
2316
2317 HELP: end-mode-3d
2318 { $description
2319     "Ends 3D mode and returns to default 2D orthographic mode" } ;
2320
2321 HELP: begin-texture-mode
2322 { $values
2323     target: RenderTexture2D }
2324 { $description
2325     "Begin drawing to render texture" } ;
2326
2327 HELP: end-texture-mode
2328 { $description
2329     "Ends drawing to render texture" } ;
2330
2331 HELP: begin-shader-mode
2332 { $values
2333     shader: Shader }
2334 { $description
2335     "Begin custom shader drawing" } ;
2336
2337 HELP: end-shader-mode
2338 { $description
2339     "End custom shader drawing (use default shader)" } ;
2340
2341 HELP: begin-blend-mode
2342 { $values
2343     mode: BlendMode }
2344 { $description
2345     "Begin blending mode (alpha, additive, multiplied, subtract, custom)" } ;
2346
2347 HELP: end-blend-mode
2348 { $description
2349     "End blending mode (reset to default: alpha blending)" } ;
2350
2351 HELP: begin-scissor-mode
2352 { $values
2353     x: int
2354     y: int
2355     width: int
2356     height: int }
2357 { $description
2358     "Begin scissor mode (define screen area for following drawing)" } ;
2359
2360 HELP: end-scissor-mode
2361 { $description
2362     "End scissor mode" } ;
2363
2364 HELP: begin-vr-stereo-mode
2365 { $values
2366     config: VrStereoConfig }
2367 { $description
2368     "Begin stereo rendering (requires VR simulator)" } ;
2369
2370 HELP: end-vr-stereo-mode
2371 { $description
2372     "End stereo rendering (requires VR simulator)" } ;
2373
2374
2375 ! VR stereo config functions for VR simulator
2376 HELP: load-vr-stereo-config
2377 { $values
2378     device: VrDeviceInfo
2379     VrStereoConfig: VrStereoConfig }
2380 { $description
2381     "Load VR stereo config for VR simulator device parameters" } ;
2382
2383 HELP: unload-vr-stereo-config
2384 { $values
2385     config: VrStereoConfig }
2386 { $description
2387     "Unload VR stereo config" } ;
2388
2389
2390 ! Shader management functions
2391 HELP: load-shader
2392 { $values
2393     vsFileName: c-string
2394     fsFileName: c-string
2395     Shader: Shader }
2396 { $description
2397     "Load shader from files and bind default locations"
2398
2399     { $warning
2400         "Shader functionality is not available on OpenGL 1.1" } } ;
2401
2402 HELP: load-shader-from-memory
2403 { $values
2404     vsCode: c-string
2405     fsCode: c-string
2406     Shader: Shader }
2407 { $description
2408     "Load shader from code strings and bind default locations"
2409     { $warning
2410         "Shader functionality is not available on OpenGL 1.1" } } ;
2411
2412 HELP: is-shader-ready
2413 { $values
2414     shader: Shader
2415     bool: boolean }
2416 { $description
2417     "Check if a shader is ready"
2418     { $warning
2419         "Shader functionality is not available on OpenGL 1.1" } } ;
2420
2421 HELP: get-shader-location
2422 { $values
2423     shader: Shader
2424     uniformName: c-string
2425     int: int }
2426 { $description
2427     "Get shader uniform location"
2428     { $warning
2429         "Shader functionality is not available on OpenGL 1.1" } } ;
2430
2431 HELP: get-shader-location-attrib
2432 { $values
2433     shader: Shader
2434     attribName: c-string
2435     int: int }
2436 { $description
2437     "Get shader attribute location"
2438     { $warning
2439         "Shader functionality is not available on OpenGL 1.1" } } ;
2440
2441 HELP: set-shader-value
2442 { $values
2443     shader: Shader
2444     locIndex: int
2445     value: void*
2446     uniformType: ShaderUniformDataType }
2447 { $description
2448     "Set shader uniform value"
2449     { $warning
2450         "Shader functionality is not available on OpenGL 1.1" } } ;
2451
2452 HELP: set-shader-value-v
2453 { $values
2454     shader: Shader
2455     locIndex: int
2456     value: void*
2457     uniformType: ShaderUniformDataType
2458     count: int }
2459 { $description
2460     "Set shader uniform value vector"
2461     { $warning
2462         "Shader functionality is not available on OpenGL 1.1" } } ;
2463
2464 HELP: set-shader-value-matrix
2465 { $values
2466     shader: Shader
2467     locIndex: int
2468     mat: Matrix }
2469 { $description
2470     "Set shader uniform value (matrix 4x4)"
2471     { $warning
2472         "Shader functionality is not available on OpenGL 1.1" } } ;
2473
2474 HELP: set-shader-value-texture
2475 { $values
2476     shader: Shader
2477     locIndex: int
2478     texture: Texture2D }
2479 { $description
2480     "Set shader uniform value for texture (sampler2d)"
2481     { $warning
2482         "Shader functionality is not available on OpenGL 1.1" } } ;
2483
2484 HELP: unload-shader
2485 { $values
2486     shader: Shader }
2487 { $description
2488     "Unload shader from GPU memory (VRAM)"
2489     { $warning
2490         "Shader functionality is not available on OpenGL 1.1" } } ;
2491
2492
2493 ! Screen-space-related functions
2494 HELP: get-mouse-ray
2495 { $values
2496     mousePosition: Vector2
2497     camera: Camera
2498     Ray: Ray }
2499 { $description
2500     "Get a ray trace from mouse position" } ;
2501
2502 HELP: get-camera-matrix
2503 { $values
2504     camera: Camera
2505     Matrix: Matrix }
2506 { $description
2507     "Get camera transform matrix (view matrix)" } ;
2508
2509 HELP: get-camera-matrix-2d
2510 { $values
2511     camera: Camera2D
2512     Matrix: Matrix }
2513 { $description
2514     "Get camera 2d transform matrix" } ;
2515
2516 HELP: get-world-to-screen
2517 { $values
2518     position: Vector3
2519     camera: Camera
2520     Vector2: Vector2 }
2521 { $description
2522     "Get the screen space position for a 3d world space position" } ;
2523
2524 HELP: get-world-to-screen-2d
2525 { $values
2526     position: Vector2
2527     camera: Camera2D
2528     Vector2: Vector2 }
2529 { $description
2530     "Get the screen space position for a 2d camera world space position" } ;
2531
2532 HELP: get-world-to-screen-ex
2533 { $values
2534     position: Vector3
2535     camera: Camera
2536     width: int
2537     height: int
2538     Vector2: Vector2 }
2539 { $description
2540     "Get size position for a 3d world space position" } ;
2541
2542 HELP: get-screen-to-world-2d
2543 { $values
2544     position: Vector2
2545     camera: Camera2D
2546     Vector2: Vector2 }
2547 { $description
2548     "Get the world space position for a 2d camera screen space position" } ;
2549
2550
2551 ! Timing-related functions
2552 HELP: set-target-fps
2553 { $values
2554     fps: int }
2555 { $description
2556     "Set target FPS (maximum)" } ;
2557
2558 HELP: get-fps
2559 { $values
2560     int: int }
2561 { $description
2562     "Get current FPS" } ;
2563
2564 HELP: get-frame-time
2565 { $values
2566     float: float }
2567 { $description
2568     "Get time in seconds for last frame drawn (delta time)" } ;
2569
2570 HELP: get-time
2571 { $values
2572     double: double }
2573 { $description
2574     "Get elapsed time in seconds since InitWindow()" } ;
2575
2576
2577 ! Misc. functions
2578 HELP: get-random-value
2579 { $values
2580     min: int
2581     max: int
2582     int: int }
2583 { $description
2584     "Get a random value between min and max (both included)" } ;
2585
2586 HELP: set-random-seed
2587 { $values
2588     seed: uint }
2589 { $description
2590     "Set the seed for the random number generator" } ;
2591
2592 HELP: take-screenshot
2593 { $values
2594     fileName: c-string }
2595 { $description
2596     "Takes a screenshot of current screen (filename extension defines format)" } ;
2597
2598 HELP: set-config-flags
2599 { $values
2600     flags: uint }
2601 { $description
2602     "Setup init configuration flags (view FLAGS)" } ;
2603
2604 HELP: set-trace-log-level
2605 { $values
2606     logLevel: int }
2607 { $description
2608     "Set the current threshold (minimum) log level" } ;
2609
2610 HELP: mem-alloc
2611 { $values
2612     size: uint
2613     void*: void* }
2614 { $description
2615     "Internal memory allocator" } ;
2616
2617 HELP: mem-realloc
2618 { $values
2619     ptr: void*
2620     size: uint
2621     void*: void* }
2622 { $description
2623     "Internal memory reallocator" } ;
2624
2625 HELP: mem-free
2626 { $values
2627     ptr: void* }
2628 { $description
2629     "Internal memory free" } ;
2630
2631
2632 HELP: open-url
2633 { $values
2634     url: c-string }
2635 { $description
2636     "Open URL with default system browser (if available)" } ;
2637
2638
2639 ! Files management functions
2640 HELP: load-file-data
2641 { $values
2642     fileName: c-string
2643     bytesRead: { "a " { $link pointer } " to a " { $link uint } }
2644     c-string: c-string }
2645 { $description
2646     "Load file data as byte array (read)" } ;
2647
2648 HELP: unload-file-data
2649 { $values
2650     data: c-string }
2651 { $description
2652     "Unload file data allocated by LoadFileData()" } ;
2653
2654 HELP: save-file-data
2655 { $values
2656     fileName: c-string
2657     data: void*
2658     bytesToWrite: uint
2659     bool: bool }
2660 { $description
2661     "Save data to file from byte array (write), returns true on success" } ;
2662
2663 HELP: export-data-as-code
2664 { $values
2665     data: { "a " { $link pointer } " to a " { $link uchar } }
2666     size: uint
2667     fileName: c-string
2668     bool: bool }
2669 { $description
2670     "Export data to code (.h), returns true on success" } ;
2671
2672 HELP: load-file-text
2673 { $values
2674     fileName: c-string
2675     c-string: c-string }
2676 { $description
2677     "Load text data from file (read), returns a '\0' terminated string" } ;
2678
2679 HELP: unload-file-text
2680 { $values
2681     text: c-string }
2682 { $description
2683     "Unload file text data allocated by LoadFileText()" } ;
2684
2685 HELP: save-file-text
2686 { $values
2687     fileName: c-string
2688     text: c-string
2689     bool: bool }
2690 { $description
2691     "Save text data to file (write), string must be '\0' terminated, returns true on success" } ;
2692
2693 HELP: file-exists
2694 { $values
2695     fileName: c-string
2696     bool: bool }
2697 { $description
2698     "Check if file exists" } ;
2699
2700 HELP: directory-exists
2701 { $values
2702     dirPath: c-string
2703     bool: bool }
2704 { $description
2705     "Check if a directory path exists" } ;
2706
2707 HELP: is-file-extension
2708 { $values
2709     fileName: c-string
2710     ext: c-string
2711     bool: bool }
2712 { $description
2713     "Check file extension (including point: .png, .wav)" } ;
2714
2715 HELP: get-file-length
2716 { $values
2717     fileName: c-string
2718     int: int }
2719 { $description
2720     "Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)" } ;
2721
2722 HELP: get-file-extension
2723 { $values
2724     fileName: c-string
2725     c-string: c-string }
2726 { $description
2727     "Get pointer to extension for a filename string (includes dot: '.png')" } ;
2728
2729 HELP: get-file-name
2730 { $values
2731     filePath: c-string
2732     c-string: c-string }
2733 { $description
2734     "Get pointer to filename for a path string" } ;
2735
2736 HELP: get-file-name-without-ext
2737 { $values
2738     filePath: c-string
2739     c-string: c-string }
2740 { $description
2741     "Get filename string without extension (uses static string)" } ;
2742
2743 HELP: get-directory-path
2744 { $values
2745     filePath: c-string
2746     c-string: c-string }
2747 { $description
2748     "Get full path for a given fileName with path (uses static string)" } ;
2749
2750 HELP: get-prev-directory-path
2751 { $values
2752     dirPath: c-string
2753     c-string: c-string }
2754 { $description
2755     "Get previous directory path for a given path (uses static string)" } ;
2756
2757 HELP: get-working-directory
2758 { $values
2759     c-string: c-string }
2760 { $description
2761     "Get current working directory (uses static string)" } ;
2762
2763 HELP: get-application-directory
2764 { $values
2765     c-string: c-string }
2766 { $description
2767     "Get the directory if the running application (uses static string)" } ;
2768
2769 HELP: change-directory
2770 { $values
2771     dir: c-string
2772     bool: bool }
2773 { $description
2774     "Change working directory, return true on success" } ;
2775
2776 HELP: is-path-file
2777 { $values
2778     path: c-string
2779     bool: bool }
2780 { $description
2781     "Check if a given path is a file or a directory" } ;
2782
2783 HELP: load-directory-files
2784 { $values
2785     dirPath: c-string
2786     FilePathList: FilePathList }
2787 { $description
2788     "Get filenames in a directory path (memory should be freed)" } ;
2789
2790 HELP: load-directory-files-ex
2791 { $values
2792     dirPath: c-string
2793     filter: c-string
2794     scanSubDirs: bool
2795     FilePathList: FilePathList }
2796 { $description
2797     "Get filenames in a directory path (memory should be freed)" } ;
2798
2799 HELP: unload-directory-files
2800 { $values
2801     files: FilePathList }
2802 { $description
2803     "Clear directory files paths buffers (free memory)" } ;
2804
2805 HELP: is-file-dropped
2806 { $values
2807     bool: bool }
2808 { $description
2809     "Check if a file has been dropped into window" } ;
2810
2811 HELP: load-dropped-files
2812 { $values
2813     FilePathList: FilePathList }
2814 { $description
2815     "Get dropped files names (memory should be freed)" } ;
2816
2817 HELP: unload-dropped-files
2818 { $values
2819     files: FilePathList }
2820 { $description
2821     "Clear dropped files paths buffer (free memory)" } ;
2822
2823 HELP: get-file-mod-time
2824 { $values
2825     fileName: c-string
2826     long: long }
2827 { $description
2828     "Get file modification time (last write time)" } ;
2829
2830
2831 ! Compression/Encoding functionality
2832 HELP: compress-data
2833 { $values
2834     data: { "a " { $link pointer } " to a " { $link uchar } }
2835     dataLength: int
2836     compDataLength: { "a " { $link pointer } " to a " { $link int } }
2837     uchar*: { "a" { $link pointer } " to a " { $link uchar } } }
2838 { $description
2839     "Compress data (DEFLATE algorithm)" } ;
2840
2841 HELP: decompress-data
2842 { $values
2843     compData: { "a " { $link pointer } " to a " { $link uchar } }
2844     compDataLength: int
2845     dataLength: { "a " { $link pointer } " to a " { $link int } }
2846     uchar*: { "a" { $link pointer } " to a " { $link uchar } } }
2847 { $description
2848     "Decompress data (DEFLATE algorithm)" } ;
2849
2850 HELP: encode-data-base64
2851 { $values
2852     data: { "a " { $link pointer } " to a " { $link uchar } }
2853     dataLength: int
2854     outputLength: { "a " { $link pointer } " to a " { $link int } }
2855     c-string: c-string }
2856 { $description
2857     "Encode data to Base64 string" } ;
2858
2859 HELP: decode-data-base64
2860 { $values
2861     data: { "a " { $link pointer } " to a " { $link uchar } }
2862     outputLength: { "a " { $link pointer } " to a " { $link int } }
2863     uchar*: { "a" { $link pointer } " to a " { $link uchar } } }
2864 { $description
2865     "Decode Base64 string data" } ;
2866
2867
2868 ! Input-related functions: keyboard
2869 HELP: is-key-pressed
2870 { $values
2871     key: KeyboardKey
2872     bool: bool }
2873 { $description
2874     "Check if a key has been pressed once" } ;
2875
2876 HELP: is-key-down
2877 { $values
2878     key: KeyboardKey
2879     bool: bool }
2880 { $description
2881     "Check if a key is being pressed" } ;
2882
2883 HELP: is-key-released
2884 { $values
2885     key: KeyboardKey
2886     bool: bool }
2887 { $description
2888     "Check if a key has been released once" } ;
2889
2890 HELP: is-key-up
2891 { $values
2892     key: KeyboardKey
2893     bool: bool }
2894 { $description
2895     "Check if a key is NOT being pressed" } ;
2896
2897 HELP: set-exit-key
2898 { $values
2899     key: KeyboardKey }
2900 { $description
2901     "Set a custom key to exit program (default is ESC)" } ;
2902
2903 HELP: get-key-pressed
2904 { $values
2905     KeyboardKey: KeyboardKey }
2906 { $description
2907     "Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty" } ;
2908
2909 HELP: get-char-pressed
2910 { $values
2911     int: int }
2912 { $description
2913     "Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty" } ;
2914
2915
2916 ! Input-related functions: gamepads
2917 HELP: is-gamepad-available
2918 { $values
2919     gamepad: int
2920     bool: bool }
2921 { $description
2922     "Check if a gamepad is available" } ;
2923
2924 HELP: get-gamepad-name
2925 { $values
2926     gamepad: int
2927     c-string: c-string }
2928 { $description
2929     "Get gamepad internal name id" } ;
2930
2931 HELP: is-gamepad-button-pressed
2932 { $values
2933     gamepad: int
2934     button: GamepadButton
2935     bool: bool }
2936 { $description
2937     "Check if a gamepad button has been pressed once" } ;
2938
2939 HELP: is-gamepad-button-down
2940 { $values
2941     gamepad: int
2942     button: GamepadButton
2943     bool: bool }
2944 { $description
2945     "Check if a gamepad button is being pressed" } ;
2946
2947 HELP: is-gamepad-button-released
2948 { $values
2949     gamepad: int
2950     button: GamepadButton
2951     bool: bool }
2952 { $description
2953     "Check if a gamepad button has been released once" } ;
2954
2955 HELP: is-gamepad-button-up
2956 { $values
2957     gamepad: int
2958     button: GamepadButton
2959     bool: bool }
2960 { $description
2961     "Check if a gamepad button is NOT being pressed" } ;
2962
2963 HELP: get-gamepad-button-pressed
2964 { $values
2965     int: int }
2966 { $description
2967     "Get the last gamepad button pressed" } ;
2968
2969 HELP: get-gamepad-axis-count
2970 { $values
2971     gamepad: int
2972     int: int }
2973 { $description
2974     "Get gamepad axis count for a gamepad" } ;
2975
2976 HELP: get-gamepad-axis-movement
2977 { $values
2978     gamepad: int
2979     axis: GamepadAxis
2980     float: float }
2981 { $description
2982     "Get axis movement value for a gamepad axis" } ;
2983
2984 HELP: set-gamepad-mappings
2985 { $values
2986     mappings: c-string
2987     int: int }
2988 { $description
2989     "Set internal gamepad mappings (SDL_GameControllerDB)" } ;
2990
2991
2992 ! Input-related functions: mouse
2993 HELP: is-mouse-button-pressed
2994 { $values
2995     button: MouseButton
2996     bool: bool }
2997 { $description
2998     "Check if a mouse button has been pressed once" } ;
2999
3000 HELP: is-mouse-button-down
3001 { $values
3002     button: MouseButton
3003     bool: bool }
3004 { $description
3005     "Check if a mouse button is being pressed" } ;
3006
3007 HELP: is-mouse-button-released
3008 { $values
3009     button: MouseButton
3010     bool: bool }
3011 { $description
3012     "Check if a mouse button has been released once" } ;
3013
3014 HELP: is-mouse-button-up
3015 { $values
3016     button: MouseButton
3017     bool: bool }
3018 { $description
3019     "Check if a mouse button is NOT being pressed" } ;
3020
3021 HELP: get-mouse-x
3022 { $values
3023     int: int }
3024 { $description
3025     "Get mouse position X" } ;
3026
3027 HELP: get-mouse-y
3028 { $values
3029     int: int }
3030 { $description
3031     "Get mouse position Y" } ;
3032
3033 HELP: get-mouse-position
3034 { $values
3035     Vector2: Vector2 }
3036 { $description
3037     "Get mouse position XY" } ;
3038
3039 HELP: get-mouse-delta
3040 { $values
3041     Vector2: Vector2 }
3042 { $description
3043     "Get mouse delta between frames" } ;
3044
3045 HELP: set-mouse-position
3046 { $values
3047     x: int
3048     y: int }
3049 { $description
3050     "Set mouse position XY" } ;
3051
3052 HELP: set-mouse-offset
3053 { $values
3054     offsetX: int
3055     offsetY: int }
3056 { $description
3057     "Set mouse offset" } ;
3058
3059 HELP: set-mouse-scale
3060 { $values
3061     scaleX: float
3062     scaleY: float }
3063 { $description
3064     "Set mouse scaling" } ;
3065
3066 HELP: get-mouse-wheel-move
3067 { $values
3068     float: float }
3069 { $description
3070     "Get mouse wheel movement Y" } ;
3071
3072 HELP: get-mouse-wheel-move-v
3073 { $values
3074     Vector2: Vector2 }
3075 { $description
3076     "Get mouse wheel movement for both X and Y" } ;
3077
3078 HELP: set-mouse-cursor
3079 { $values
3080     cursor: MouseCursor }
3081 { $description
3082     "Set mouse cursor" } ;
3083
3084
3085 ! Input-related functions: touch
3086 HELP: get-touch-x
3087 { $values
3088     int: int }
3089 { $description
3090     "Get touch position X for touch point 0 (relative to screen size)" } ;
3091
3092 HELP: get-touch-y
3093 { $values
3094     int: int }
3095 { $description
3096     "Get touch position Y for touch point 0 (relative to screen size)" } ;
3097
3098 HELP: get-touch-position
3099 { $values
3100     index: int
3101     Vector2: Vector2 }
3102 { $description
3103     "Get touch position XY for a touch point index (relative to screen size)" } ;
3104
3105 HELP: get-touch-point-id
3106 { $values
3107     index: int
3108     int: int }
3109 { $description
3110     "Get touch point identifier for given index" } ;
3111
3112 HELP: get-touch-point-count
3113 { $values
3114     int: int }
3115 { $description
3116     "Get number of touch points" } ;
3117
3118
3119 ! ------------------------------------------------------------------------------------
3120 ! Gestures and Touch Handling Functions (Module: rgestures)
3121 ! ------------------------------------------------------------------------------------
3122 HELP: set-gestures-enabled
3123 { $values
3124     flags: uint }
3125 { $description
3126     "Enable a set of gestures using flags" } ;
3127
3128 HELP: is-gesture-detected
3129 { $values
3130     gesture: Gestures
3131     bool: bool }
3132 { $description
3133     "Check if a gesture have been detected" } ;
3134
3135 HELP: get-gesture-detected
3136 { $values
3137     int: int }
3138 { $description
3139     "Get latest detected gesture" } ;
3140
3141 HELP: get-gesture-hold-duration
3142 { $values
3143     float: float }
3144 { $description
3145     "Get gesture hold time in milliseconds" } ;
3146
3147 HELP: get-gesture-drag-vector
3148 { $values
3149     Vector2: Vector2 }
3150 { $description
3151     "Get gesture drag vector" } ;
3152
3153 HELP: get-gesture-drag-angle
3154 { $values
3155     float: float }
3156 { $description
3157     "Get gesture drag angle" } ;
3158
3159 HELP: get-gesture-pinch-vector
3160 { $values
3161     Vector2: Vector2 }
3162 { $description
3163     "Get gesture pinch delta" } ;
3164
3165 HELP: get-gesture-pinch-angle
3166 { $values
3167     float: float }
3168 { $description
3169     "Get gesture pinch angle" } ;
3170
3171
3172 ! ------------------------------------------------------------------------------------
3173 ! Camera System Functions (Module: rcamera)
3174 ! ------------------------------------------------------------------------------------
3175
3176 HELP: update-camera
3177 { $values
3178     camera: { "a " { $link pointer } " to a " { $link Camera } }
3179     mode: CameraMode }
3180 { $description
3181     "Update camera position for selected mode" } ;
3182
3183 HELP: update-camera-pro
3184 { $values
3185     camera: { "a " { $link pointer } " to a " { $link Camera } }
3186     movement: Vector3
3187     rotation: Vector3
3188     zoom: float }
3189 { $description
3190     "Update camera movement/rotation" } ;
3191
3192 HELP: set-shapes-texture
3193 { $values
3194     texture: Texture2D
3195     source: Rectangle
3196 }
3197 { $description
3198     "Set texture and rectangle to be used on shapes drawing" } ;
3199
3200
3201 ! Basic shapes drawing functions
3202 HELP: draw-pixel
3203 { $values
3204     posX: int
3205     posY: int
3206     color: Color }
3207 { $description
3208     "Draw a pixel" } ;
3209
3210 HELP: draw-pixel-v
3211 { $values
3212     position: Vector2
3213     color: Color }
3214 { $description
3215     "Draw a pixel (Vector version)" } ;
3216
3217 HELP: draw-line
3218 { $values
3219     startPosX: int
3220     startPosY: int
3221     endPosX: int
3222     endPosY: int
3223     color: Color }
3224 { $description
3225     "Draw a line" } ;
3226
3227 HELP: draw-line-v
3228 { $values
3229     startPos: Vector2
3230     endPos: Vector2
3231     color: Color }
3232 { $description
3233     "Draw a line (Vector version)" } ;
3234
3235 HELP: draw-line-ex
3236 { $values
3237     startPos: Vector2
3238     endPos: Vector2
3239     thick: float
3240     color: Color }
3241 { $description
3242     "Draw a line defining thickness" } ;
3243
3244 HELP: draw-line-bezier
3245 { $values
3246     startPos: Vector2
3247     endPos: Vector2
3248     thick: float
3249     color: Color }
3250 { $description
3251     "Draw a line using cubic-bezier curves in-out" } ;
3252
3253 HELP: draw-line-bezier-quad
3254 { $values
3255     startPos: Vector2
3256     endPos: Vector2
3257     controlPos: Vector2
3258     thick: float
3259     color: Color }
3260 { $description
3261     "Draw line using quadratic bezier curves with a control point" } ;
3262
3263 HELP: draw-line-bezier-cubic
3264 { $values
3265     startPos: Vector2
3266     endPos: Vector2
3267     startControlPos: Vector2
3268     endControlPos: Vector2
3269     thick: float
3270     color: Color }
3271 { $description
3272     "Draw line using cubic bezier curves with 2 control points" } ;
3273
3274 HELP: draw-line-strip
3275 { $values
3276     points: { "a " { $link pointer } " to a " { $link Vector2 } }
3277     pointCount: int
3278     color: Color }
3279 { $description
3280     "Draw lines sequence" } ;
3281
3282 HELP: draw-circle
3283 { $values
3284     centerX: int
3285     centerY: int
3286     radius: float
3287     color: Color }
3288 { $description
3289     "Draw a color-filled circle" } ;
3290
3291 HELP: draw-circle-sector
3292 { $values
3293     center: Vector2
3294     radius: float
3295     startAngle: float
3296     endAngle: float
3297     segments: int
3298     color: Color }
3299 { $description
3300     "Draw a piece of a circle" } ;
3301
3302 HELP: draw-circle-sector-lines
3303 { $values
3304     center: Vector2
3305     radius: float
3306     startAngle: float
3307     endAngle: float
3308     segments: int
3309     color: Color }
3310 { $description
3311     "Draw circle sector outline" } ;
3312
3313 HELP: draw-circle-gradient
3314 { $values
3315     centerX: int
3316     centerY: int
3317     radius: float
3318     color1: Color
3319     color2: Color }
3320 { $description
3321     "Draw a gradient-filled circle" } ;
3322
3323 HELP: draw-circle-v
3324 { $values
3325     center: Vector2
3326     radius: float
3327     color: Color }
3328 { $description
3329     "Draw a color-filled circle (Vector version)" } ;
3330
3331 HELP: draw-circle-lines
3332 { $values
3333     centerX: int
3334     centerY: int
3335     radius: float
3336     color: Color }
3337 { $description
3338     "Draw circle outline" } ;
3339
3340 HELP: draw-ellipse
3341 { $values
3342     centerX: int
3343     centerY: int
3344     radiusH: float
3345     radiusV: float
3346     color: Color }
3347 { $description
3348     "Draw ellipse" } ;
3349
3350 HELP: draw-ellipse-lines
3351 { $values
3352     centerX: int
3353     centerY: int
3354     radiusH: float
3355     radiusV: float
3356     color: Color }
3357 { $description
3358     "Draw ellipse outline" } ;
3359
3360 HELP: draw-ring
3361 { $values
3362     center: Vector2
3363     innerRadius: float
3364     outerRadius: float
3365     startAngle: float
3366     endAngle: float
3367     segments: int
3368     color: Color }
3369 { $description
3370     "Draw ring" } ;
3371
3372 HELP: draw-ring-lines
3373 { $values
3374     center: Vector2
3375     innerRadius: float
3376     outerRadius: float
3377     startAngle: float
3378     endAngle: float
3379     segments: int
3380     color: Color }
3381 { $description
3382     "Draw ring outline" } ;
3383
3384 HELP: draw-rectangle
3385 { $values
3386     posX: int
3387     posY: int
3388     width: int
3389     height: int
3390     color: Color }
3391 { $description
3392     "Draw a color-filled rectangle" } ;
3393
3394 HELP: draw-rectangle-v
3395 { $values
3396     position: Vector2
3397     size: Vector2
3398     color: Color }
3399 { $description
3400     "Draw a color-filled rectangle (Vector version)" } ;
3401
3402 HELP: draw-rectangle-rec
3403 { $values
3404     rec: Rectangle
3405     color: Color }
3406 { $description
3407     "Draw a color-filled rectangle" } ;
3408
3409 HELP: draw-rectangle-pro
3410 { $values
3411     rec: Rectangle
3412     origin: Vector2
3413     rotation: float
3414     color: Color }
3415 { $description
3416     "Draw a color-filled rectangle with pro parameters" } ;
3417
3418 HELP: draw-rectangle-gradient-v
3419 { $values
3420     posX: int
3421     posY: int
3422     width: int
3423     height: int
3424     color1: Color
3425     color2: Color }
3426 { $description
3427     "Draw a vertical-gradient-filled rectangle" } ;
3428
3429 HELP: draw-rectangle-gradient-h
3430 { $values
3431     posX: int
3432     posY: int
3433     width: int
3434     height: int
3435     color1: Color
3436     color2: Color }
3437 { $description
3438     "Draw a horizontal-gradient-filled rectangle" } ;
3439
3440 HELP: draw-rectangle-gradient-ex
3441 { $values
3442     rec: Rectangle
3443     col1: Color
3444     col2: Color
3445     col3: Color
3446     col4: Color }
3447 { $description
3448     "Draw a gradient-filled rectangle with custom vertex colors" } ;
3449
3450 HELP: draw-rectangle-lines
3451 { $values
3452     posX: int
3453     posY: int
3454     width: int
3455     height: int
3456     color: Color }
3457 { $description
3458     "Draw rectangle outline" } ;
3459
3460 HELP: draw-rectangle-lines-ex
3461 { $values
3462     rec: Rectangle
3463     lineThick: float
3464     color: Color }
3465 { $description
3466     "Draw rectangle outline with extended parameters" } ;
3467
3468 HELP: draw-rectangle-rounded
3469 { $values
3470     rec: Rectangle
3471     roundness: float
3472     segments: int
3473     color: Color }
3474 { $description
3475     "Draw rectangle with rounded edges" } ;
3476
3477 HELP: draw-rectangle-rounded-lines
3478 { $values
3479     rec: Rectangle
3480     roundness: float
3481     segments: int
3482     lineThick: float
3483     color: Color }
3484 { $description
3485     "Draw rectangle with rounded edges outline" } ;
3486
3487 HELP: draw-triangle
3488 { $values
3489     v1: Vector2
3490     v2: Vector2
3491     v3: Vector2
3492     color: Color }
3493 { $description
3494     "Draw a color-filled triangle (vertex in counter-clockwise order!)" } ;
3495
3496 HELP: draw-triangle-lines
3497 { $values
3498     v1: Vector2
3499     v2: Vector2
3500     v3: Vector2
3501     color: Color }
3502 { $description
3503     "Draw triangle outline (vertex in counter-clockwise order!)" } ;
3504
3505 HELP: draw-triangle-fan
3506 { $values
3507     points: { "a " { $link pointer } " to a " { $link Vector2 } }
3508     pointCount: int
3509     color: Color }
3510 { $description
3511     "Draw a triangle fan defined by points (first vertex is the center)" } ;
3512
3513 HELP: draw-triangle-strip
3514 { $values
3515     points: { "a " { $link pointer } " to a " { $link Vector2 } }
3516     pointCount: int
3517     color: Color }
3518 { $description
3519     "Draw a triangle strip defined by points" } ;
3520
3521 HELP: draw-poly
3522 { $values
3523     center: Vector2
3524     sides: int
3525     radius: float
3526     rotation: float
3527     color: Color }
3528 { $description
3529     "Draw a regular polygon (Vector version)" } ;
3530
3531 HELP: draw-poly-lines
3532 { $values
3533     center: Vector2
3534     sides: int
3535     radius: float
3536     rotation: float
3537     color: Color }
3538 { $description
3539     "Draw a polygon outline of n sides" } ;
3540
3541 HELP: draw-poly-lines-ex
3542 { $values
3543     center: Vector2
3544     sides: int
3545     radius: float
3546     rotation: float
3547     lineThick: float
3548     color: Color }
3549 { $description
3550     "Draw a polygon outline of n sides with extended parameters" } ;
3551
3552
3553 ! Basic shapes collision detection functions
3554 HELP: check-collision-recs
3555 { $values
3556     rec1: Rectangle
3557     rec2: Rectangle
3558     bool: bool }
3559 { $description
3560     "Check collision between two rectangles" } ;
3561
3562 HELP: check-collision-circles
3563 { $values
3564     center1: Vector2
3565     radius1: float
3566     center2: Vector2
3567     radius2: float
3568     bool: bool }
3569 { $description
3570     "Check collision between two circles" } ;
3571
3572 HELP: check-collision-circle-rec
3573 { $values
3574     center: Vector2
3575     radius: float
3576     rec: Rectangle
3577     bool: bool }
3578 { $description
3579     "Check collision between circle and rectangle" } ;
3580
3581 HELP: check-collision-point-rec
3582 { $values
3583     point: Vector2
3584     rec: Rectangle
3585     bool: bool }
3586 { $description
3587     "Check if point is inside rectangle" } ;
3588
3589 HELP: check-collision-point-circle
3590 { $values
3591     point: Vector2
3592     center: Vector2
3593     radius: float
3594     bool: bool }
3595 { $description
3596     "Check if point is inside circle" } ;
3597
3598 HELP: check-collision-point-triangle
3599 { $values
3600     point: Vector2
3601     p1: Vector2
3602     p2: Vector2
3603     p3: Vector2
3604     bool: bool }
3605 { $description
3606     "Check if point is inside a triangle" } ;
3607
3608 HELP: check-collision-point-poly
3609 { $values
3610     point: Vector2
3611     points: { "a " { $link pointer } " to a " { $link Vector2 } }
3612     pointCount: int
3613     bool: bool }
3614 { $description
3615     "Check if point is within a polygon described by array of vertices" } ;
3616
3617 HELP: check-collision-lines
3618 { $values
3619     startPos1: Vector2
3620     endPos1: Vector2
3621     startPos2: Vector2
3622     endPos2: Vector2
3623     collisionPoint: { "a " { $link pointer } " to a " { $link Vector2 } }
3624     bool: bool }
3625 { $description
3626     "Check the collision between two lines defined by two points each, returns collision point by reference" } ;
3627
3628 HELP: check-collision-point-line
3629 { $values
3630     point: Vector2
3631     p1: Vector2
3632     p2: Vector2
3633     threshold: int
3634     bool: bool }
3635 { $description
3636     "Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]" } ;
3637
3638 HELP: get-collision-rec
3639 { $values
3640     rec1: Rectangle
3641     rec2: Rectangle
3642     Rectangle Rectangle }
3643 { $description
3644     "Get collision rectangle for two rectangles collision" } ;
3645
3646 ! Image loading functions
3647 HELP: load-image
3648 { $values
3649     fileName: c-string
3650     Image: Image }
3651 { $description
3652     "Load image from file into CPU memory (RAM). " } ;
3653
3654 HELP: load-image-raw
3655 { $values
3656     fileName: c-string
3657     width: int
3658     height: int
3659     format: int
3660     headerSize: int
3661     Image: Image }
3662 { $description
3663     "Load image from RAW file data." } ;
3664
3665 HELP: load-image-anim
3666 { $values
3667     fileName: c-string
3668     frames: { "a " { $link pointer } " to a " { $link int } }
3669     Image: Image }
3670 { $description
3671     "Load image sequence from file (frames appended to image.data)" } ;
3672
3673 HELP: load-image-from-memory
3674 { $values
3675     fileType: c-string
3676     fileData: c-string
3677     dataSize: int
3678     Image: Image }
3679 { $description
3680     "Load image from memory buffer, fileType refers to extension: i.e. '.png'" } ;
3681
3682 HELP: load-image-from-texture
3683 { $values
3684     texture: Texture2D
3685     Image: Image }
3686 { $description
3687     "Load image from GPU texture data" } ;
3688
3689 HELP: load-image-from-screen
3690 { $values
3691     Image: Image }
3692 { $description
3693     "Load image from screen buffer and (screenshot)" } ;
3694
3695 HELP: is-image-ready
3696 { $values
3697     image: Image
3698     bool: bool }
3699 { $description
3700     "Check if an image is ready" } ;
3701
3702 HELP: unload-image
3703 { $values
3704     image: Image }
3705 { $description
3706     "Unload image from CPU memory (RAM)" } ;
3707
3708 HELP: export-image
3709 { $values
3710     image: Image
3711     fileName: c-string
3712     bool: bool }
3713 { $description
3714     "Export image data to file, returns true on success" } ;
3715
3716 HELP: export-image-as-code
3717 { $values
3718     image: Image
3719     fileName: c-string
3720     bool: bool }
3721 { $description
3722     "Export image as code file defining an array of bytes, returns true on success" } ;
3723
3724
3725 ! Image generation functions
3726 HELP: gen-image-color
3727 { $values
3728     width: int
3729     height: int
3730     color: Color
3731     Image: Image }
3732 { $description
3733     "Generate image: plain color" } ;
3734
3735 HELP: gen-image-gradient-v
3736 { $values
3737     width: int
3738     height: int
3739     top: Color
3740     bottom: Color
3741     Image: Image }
3742 { $description
3743     "Generate image: vertical gradient" } ;
3744
3745 HELP: gen-image-gradient-h
3746 { $values
3747     width: int
3748     height: int
3749     left: Color
3750     right: Color
3751     Image: Image }
3752 { $description
3753     "Generate image: horizontal gradient" } ;
3754
3755 HELP: gen-image-gradient-radial
3756 { $values
3757     width: int
3758     height: int
3759     density: float
3760     inner: Color
3761     outer: Color
3762     Image: Image }
3763 { $description
3764     "Generate image: radial gradient" } ;
3765
3766 HELP: gen-image-checked
3767 { $values
3768     width: int
3769     height: int
3770     checksX: int
3771     checksY: int
3772     col1: Color
3773     col2: Color
3774     Image: Image }
3775 { $description
3776     "Generate image: checked" } ;
3777
3778 HELP: gen-image-white-noise
3779 { $values
3780     width: int
3781     height: int
3782     factor: float
3783     Image: Image }
3784 { $description
3785     "Generate image: white noise" } ;
3786
3787 HELP: gen-image-perlin-noise
3788 { $values
3789     width: int
3790     height: int
3791     offsetX: int
3792     offsetY: int
3793     scale: float
3794     Image: Image }
3795 { $description
3796     "Generate image: perlin noise" } ;
3797
3798 HELP: gen-image-cellular
3799 { $values
3800     width: int
3801     height: int
3802     tileSize: int
3803     Image: Image }
3804 { $description
3805     "Generate image: cellular algorithm, bigger tileSize means bigger cells" } ;
3806
3807 HELP: gen-image-text
3808 { $values
3809     width: int
3810     height: int
3811     text: c-string
3812     Image: Image }
3813 { $description
3814     "Generate image: text" } ;
3815
3816
3817 ! Image manipulation functions
3818 HELP: image-copy
3819 { $values
3820     image: Image
3821     Image: Image }
3822 { $description
3823     "Create an image duplicate (useful for transformations)" } ;
3824
3825 HELP: image-from-image
3826 { $values
3827     image: Image
3828     rec: Rectangle
3829     Image: Image }
3830 { $description
3831     "Create an image from another image piece" } ;
3832
3833 HELP: image-text
3834 { $values
3835     text: c-string
3836     fontSize: int
3837     color: Color
3838     Image: Image }
3839 { $description
3840     "Create an image from text (default font)" } ;
3841
3842 HELP: image-text-ex
3843 { $values
3844     font: Font
3845     text: c-string
3846     fontSize: float
3847     spacing: float
3848     tint: Color
3849     Image: Image }
3850 { $description
3851     "Create an image from text (custom sprite font)" } ;
3852
3853 HELP: image-format
3854 { $values
3855     image: { "a " { $link pointer } " to a " { $link Image } }
3856     newformat: int }
3857 { $description
3858     "Convert image data to desired format" } ;
3859
3860 HELP: image-to-pot
3861 { $values
3862     image: { "a " { $link pointer } " to a " { $link Image } }
3863     fill: Color }
3864 { $description
3865     "Convert image to POT (power-of-two)" } ;
3866
3867 HELP: image-crop
3868 { $values
3869     image: { "a " { $link pointer } " to a " { $link Image } }
3870     crop: Rectangle }
3871 { $description
3872     "Crop an image to a defined rectangle" } ;
3873
3874 HELP: image-alpha-crop
3875 { $values
3876     image: { "a " { $link pointer } " to a " { $link Image } }
3877     threshold: float }
3878 { $description
3879     "Crop image depending on alpha value" } ;
3880
3881 HELP: image-alpha-clear
3882 { $values
3883     image: { "a " { $link pointer } " to a " { $link Image } }
3884     color: Color
3885     threshold: float }
3886 { $description
3887     "Clear alpha channel to desired color" } ;
3888
3889 HELP: image-alpha-mask
3890 { $values
3891     image: { "a " { $link pointer } " to a " { $link Image } }
3892     alphaMask: Image }
3893 { $description
3894     "Apply alpha mask to image" } ;
3895
3896 HELP: image-alpha-premultiply
3897 { $values
3898     image: { "a " { $link pointer } " to a " { $link Image } } }
3899 { $description
3900     "Premultiply alpha channel" } ;
3901
3902 HELP: image-blur-gaussian
3903 { $values
3904     image: { "a " { $link pointer } " to a " { $link Image } }
3905     blurSize: int }
3906 { $description
3907     "Blur image with gaussian" } ;
3908
3909 HELP: image-resize
3910 { $values
3911     image: { "a " { $link pointer } " to a " { $link Image } }
3912     newWidth: int
3913     newHeight: int }
3914 { $description
3915     "Resize image (Bicubic scaling algorithm)" } ;
3916
3917 HELP: image-resize-nn
3918 { $values
3919     image: { "a " { $link pointer } " to a " { $link Image } }
3920     newWidth: int
3921     newHeight: int }
3922 { $description
3923     "Resize image (Nearest-Neighbor scaling algorithm)" } ;
3924
3925 HELP: image-resize-canvas
3926 { $values
3927     image: { "a " { $link pointer } " to a " { $link Image } }
3928     newWidth: int
3929     newHeight: int
3930     offsetX: int
3931     offsetY: int
3932     fill: Color }
3933 { $description
3934     "Resize canvas and fill with color" } ;
3935
3936 HELP: image-mipmaps
3937 { $values
3938     image: { "a " { $link pointer } " to a " { $link Image } } }
3939 { $description
3940     "Compute all mipmap levels for a provided image" } ;
3941
3942 HELP: image-dither
3943 { $values
3944     image: { "a " { $link pointer } " to a " { $link Image } }
3945     rBpp: int
3946     gBpp: int
3947     bBpp: int
3948     aBpp: int }
3949 { $description
3950     "Dither image data to 16bpp or lower (Floyd-Steinberg dithering)" } ;
3951
3952 HELP: image-flip-vertical
3953 { $values
3954     image: { "a " { $link pointer } " to a " { $link Image } } }
3955 { $description
3956     "Flip image vertically" } ;
3957
3958 HELP: image-flip-horizontal
3959 { $values
3960     image: { "a " { $link pointer } " to a " { $link Image } } }
3961 { $description
3962     "Flip image horizontally" } ;
3963
3964 HELP: image-rotate-cw
3965 { $values
3966     image: { "a " { $link pointer } " to a " { $link Image } } }
3967 { $description
3968     "Rotate image clockwise 90deg" } ;
3969
3970 HELP: image-rotate-ccw
3971 { $values
3972     image: { "a " { $link pointer } " to a " { $link Image } } }
3973 { $description
3974     "Rotate image counter-clockwise 90deg" } ;
3975
3976 HELP: image-color-tint
3977 { $values
3978     image: { "a " { $link pointer } " to a " { $link Image } }
3979     color: Color }
3980 { $description
3981     "Modify image color: tint" } ;
3982
3983 HELP: image-color-invert
3984 { $values
3985     image: { "a " { $link pointer } " to a " { $link Image } } }
3986 { $description
3987     "Modify image color: invert" } ;
3988
3989 HELP: image-color-grayscale
3990 { $values
3991     image: { "a " { $link pointer } " to a " { $link Image } } }
3992 { $description
3993     "Modify image color: grayscale" } ;
3994
3995 HELP: image-color-contrast
3996 { $values
3997     image: { "a " { $link pointer } " to a " { $link Image } }
3998     contrast: float }
3999 { $description
4000     "Modify image color: contrast (-100 to 100)" } ;
4001
4002 HELP: image-color-brightness
4003 { $values
4004     image: { "a " { $link pointer } " to a " { $link Image } }
4005     brightness: int }
4006 { $description
4007     "Modify image color: brightness (-255 to 255)" } ;
4008
4009 HELP: image-color-replace
4010 { $values
4011     image: { "a " { $link pointer } " to a " { $link Image } }
4012     color: Color
4013     replace: Color }
4014 { $description
4015     "Modify image color: replace color" } ;
4016
4017 HELP: load-image-colors
4018 { $values
4019     image: Image 
4020     Color*: { "a " { $link pointer } " to an array of " { $link Color } "s" } }
4021 { $description
4022     "Load color data from image as a Color array (RGBA - 32bit)" } ;
4023
4024 HELP: load-image-palette
4025 { $values
4026     image: Image
4027     maxPaletteSize: int
4028     colorCount: { "a " { $link pointer } " to a " { $link int } } 
4029     Color*: { "a " { $link pointer } " to an array of " { $link Color } "s" } }
4030 { $description
4031     "Load colors palette from image as a Color array (RGBA - 32bit)" } ;
4032
4033 HELP: unload-image-colors
4034 { $values
4035     colors: { "a " { $link pointer } " to a " { $link Color } } }
4036 { $description
4037     "Unload color data loaded with LoadImageColors()" } ;
4038
4039 HELP: unload-image-palette
4040 { $values
4041     colors: { "a " { $link pointer } " to a " { $link Color } } }
4042 { $description
4043     "Unload colors palette loaded with LoadImagePalette()" } ;
4044
4045 HELP: get-image-alpha-border
4046 { $values
4047     image: Image
4048     threshold: float
4049     Rectangle: Rectangle }
4050 { $description
4051     "Get image alpha border rectangle" } ;
4052
4053 HELP: get-image-color
4054 { $values
4055     image: Image
4056     x: int
4057     y: int
4058     Color: Color }
4059 { $description
4060     "Get image pixel color at (x, y) position" } ;
4061
4062
4063 ! Image drawing functions
4064 HELP: image-clear-background
4065 { $values
4066     dst: { "a " { $link pointer } " to a " { $link Image } }
4067     color: Color }
4068 { $description
4069     "Clear image background with given color" } ;
4070
4071 HELP: image-draw-pixel
4072 { $values
4073     dst: { "a " { $link pointer } " to a " { $link Image } }
4074     posX: int
4075     posY: int
4076     color: Color }
4077 { $description
4078     "Draw pixel within an image" } ;
4079
4080 HELP: image-draw-pixel-v
4081 { $values
4082     dst: { "a " { $link pointer } " to a " { $link Image } }
4083     position: Vector2
4084     color: Color }
4085 { $description
4086     "Draw pixel within an image (Vector version)" } ;
4087
4088 HELP: image-draw-line
4089 { $values
4090     dst: { "a " { $link pointer } " to a " { $link Image } }
4091     startPosX: int
4092     startPosY: int
4093     endPosX: int
4094     endPosY: int
4095     color: Color }
4096 { $description
4097     "Draw line within an image" } ;
4098
4099 HELP: image-draw-line-v
4100 { $values
4101     dst: { "a " { $link pointer } " to a " { $link Image } }
4102     start: Vector2
4103     end: Vector2
4104     color: Color }
4105 { $description
4106     "Draw line within an image (Vector version)" } ;
4107
4108 HELP: image-draw-circle
4109 { $values
4110     dst: { "a " { $link pointer } " to a " { $link Image } }
4111     centerX: int
4112     centerY: int
4113     radius: int
4114     color: Color }
4115 { $description
4116     "Draw circle within an image" } ;
4117
4118 HELP: image-draw-circle-v
4119 { $values
4120     dst: { "a " { $link pointer } " to a " { $link Image } }
4121     center: Vector2
4122     radius: int
4123     color: Color }
4124 { $description
4125     "Draw circle within an image (Vector version)" } ;
4126
4127 HELP: image-draw-circle-lines
4128 { $values
4129     dst: { "a " { $link pointer } " to a " { $link Image } }
4130     centerX: int
4131     centerY: int
4132     radius: int
4133     color: Color }
4134 { $description
4135     "Draw circle within an image" } ;
4136
4137 HELP: image-draw-circle-lines-v
4138 { $values
4139     dst: { "a " { $link pointer } " to a " { $link Image } }
4140     center: Vector2
4141     radius: int
4142     color: Color }
4143 { $description
4144     "Draw circle within an image (Vector version)" } ;
4145
4146 HELP: image-draw-rectangle
4147 { $values
4148     dst: { "a " { $link pointer } " to a " { $link Image } }
4149     posX: int
4150     posY: int
4151     width: int
4152     height: int
4153     color: Color }
4154 { $description
4155     "Draw rectangle within an image" } ;
4156
4157 HELP: image-draw-rectangle-v
4158 { $values
4159     dst: { "a " { $link pointer } " to a " { $link Image } }
4160     position: Vector2
4161     size: Vector2
4162     color: Color }
4163 { $description
4164     "Draw rectangle within an image (Vector version)" } ;
4165
4166 HELP: image-draw-rectangle-rec
4167 { $values
4168     dst: { "a " { $link pointer } " to a " { $link Image } }
4169     rec: Rectangle
4170     color: Color }
4171 { $description
4172     "Draw rectangle within an image" } ;
4173
4174 HELP: image-draw-rectangle-lines
4175 { $values
4176     dst: { "a " { $link pointer } " to a " { $link Image } }
4177     rec: Rectangle
4178     thick: int
4179     color: Color }
4180 { $description
4181     "Draw rectangle lines within an image" } ;
4182
4183 HELP: image-draw
4184 { $values
4185     dst: { "a " { $link pointer } " to a " { $link Image } }
4186     src: Image
4187     srcRec: Rectangle
4188     dstRec: Rectangle
4189     tint: Color }
4190 { $description
4191     "Draw a source image within a destination image (tint applied to source)" } ;
4192
4193 HELP: image-draw-text
4194 { $values
4195     dst: { "a " { $link pointer } " to a " { $link Image } }
4196     text: c-string
4197     posX: int
4198     posY: int
4199     fontSize: int
4200     color: Color }
4201 { $description
4202     "Draw text (using default font) within an image (destination)" } ;
4203
4204 HELP: image-draw-text-ex
4205 { $values
4206     dst: { "a " { $link pointer } " to a " { $link Image } }
4207     font: Font
4208     text: c-string
4209     position: Vector2
4210     fontSize: float
4211     spacing: float
4212     tint: Color }
4213 { $description
4214     "Draw text (custom sprite font) within an image (destination)" } ;
4215
4216
4217 ! Texture loading functions
4218 ! NOTE: These functions require GPU access
4219 HELP: load-texture
4220 { $values
4221     fileName: c-string
4222     Texture2D: Texture2D }
4223 { $description
4224     "Load texture from file into GPU memory (VRAM)" } ;
4225
4226 HELP: load-texture-from-image
4227 { $values
4228     image: Image
4229     Texture2D: Texture2D }
4230 { $description
4231     "Load texture from image data" } ;
4232
4233 HELP: load-texture-cubemap
4234 { $values
4235     image: Image
4236     layout: CubemapLayout
4237     TextureCubemap: TextureCubemap }
4238 { $description
4239     "Load cubemap from image, multiple image cubemap layouts supported" } ;
4240
4241 HELP: load-render-texture
4242 { $values
4243     width: int
4244     height: int
4245     RenderTexture2D: RenderTexture2D }
4246 { $description
4247     "Load texture for rendering (framebuffer)" } ;
4248
4249 HELP: is-texture-ready
4250 { $values
4251     texture: Texture2D
4252     bool: bool }
4253 { $description
4254     "Check if a texture is ready" } ;
4255
4256 HELP: unload-texture
4257 { $values
4258     texture: Texture2D }
4259 { $description
4260     "Unload texture from GPU memory (VRAM)" } ;
4261
4262 HELP: is-render-texture-ready
4263 { $values
4264     target: RenderTexture2D }
4265 { $description
4266     "Check if a render texture is ready" } ;
4267
4268 HELP: unload-render-texture
4269 { $values
4270     target: RenderTexture2D }
4271 { $description
4272     "Unload render texture from GPU memory (VRAM)" } ;
4273
4274 HELP: update-texture
4275 { $values
4276     texture: Texture2D
4277     pixels: void* }
4278 { $description
4279     "Update GPU texture with new data" } ;
4280
4281 HELP: update-texture-rec
4282 { $values
4283     texture: Texture2D
4284     rec: Rectangle
4285     pixels: void* }
4286 { $description
4287     "Update GPU texture rectangle with new data" } ;
4288
4289
4290 ! Texture configuration functions
4291 HELP: gen-texture-mipmaps
4292 { $values
4293     texture: { "a " { $link pointer } " to a " { $link Texture2D } } }
4294 { $description
4295     "Generate GPU mipmaps for a texture" } ;
4296
4297 HELP: set-texture-filter
4298 { $values
4299     texture: Texture2D
4300     filter: TextureFilterMode }
4301 { $description
4302     "Set texture scaling filter mode" } ;
4303
4304 HELP: set-texture-wrap
4305 { $values
4306     texture: Texture2D
4307     wrap: TextureWrapMode }
4308 { $description
4309     "Set texture wrapping mode" } ;
4310
4311
4312 ! Texture drawing functions
4313 HELP: draw-texture
4314 { $values
4315     texture: Texture2D
4316     posX: int
4317     posY: int
4318     tint: Color }
4319 { $description
4320     "Draw a Texture2D" } ;
4321
4322 HELP: draw-texture-v
4323 { $values
4324     texture: Texture2D
4325     position: Vector2
4326     tint: Color }
4327 { $description
4328     "Draw a Texture2D with position defined as Vector2" } ;
4329
4330 HELP: draw-texture-ex
4331 { $values
4332     texture: Texture2D
4333     position: Vector2
4334     rotation: float
4335     scale: float
4336     tint: Color }
4337 { $description
4338     "Draw a Texture2D with extended parameters" } ;
4339
4340 HELP: draw-texture-rec
4341 { $values
4342     texture: Texture2D
4343     source: Rectangle
4344     position: Vector2
4345     tint: Color }
4346 { $description
4347     "Draw a part of a texture defined by a rectangle" } ;
4348
4349 HELP: draw-texture-pro
4350 { $values
4351     texture: Texture2D
4352     source: Rectangle
4353     dest: Rectangle
4354     origin: Vector2
4355     rotation: float
4356     tint: Color }
4357 { $description
4358     "Draw a part of a texture defined by a rectangle with 'pro' parameters" } ;
4359
4360 HELP: draw-texture-npatch
4361 { $values
4362     texture: Texture2D
4363     nPatchInfo: NPatchInfo
4364     dest: Rectangle
4365     origin: Vector2
4366     rotation: float
4367     tint: Color }
4368 { $description
4369     "Draws a texture (or part of it) that stretches or shrinks nicely" } ;
4370
4371
4372 ! Color/pixel related functions
4373 HELP: fade
4374 { $values
4375     color: Color
4376     alpha: float
4377     Color: Color }
4378 { $description
4379     "Get color with alpha applied, alpha goes from 0.0f to 1.0f" } ;
4380
4381 HELP: color-to-int
4382 { $values
4383     color: Color
4384     int: int }
4385 { $description
4386     "Get hexadecimal value for a Color" } ;
4387
4388 HELP: color-normalize
4389 { $values
4390     color: Color
4391     Vector4: Vector4 }
4392 { $description
4393     "Get Color normalized as float [0..1]" } ;
4394
4395 HELP: color-from-normalized
4396 { $values
4397     normalized: Vector4
4398     Color: Color }
4399 { $description
4400     "Get Color from normalized values [0..1]" } ;
4401
4402 HELP: color-to-hsv
4403 { $values
4404     color: Color
4405     Vector3: Vector3 }
4406 { $description
4407     "Get HSV values for a Color, hue [0..360], saturation/value [0..1]" } ;
4408
4409 HELP: color-from-hsv
4410 { $values
4411     hue: float
4412     saturation: float
4413     value: float
4414     Color: Color }
4415 { $description
4416     "Get a Color from HSV values, hue [0..360], saturation/value [0..1]" } ;
4417
4418 HELP: color-tint
4419 { $values
4420     color: Color
4421     tint: Color
4422     Color: Color }
4423 { $description
4424     "Get color with tint" } ;
4425
4426 HELP: color-brightness
4427 { $values
4428     color: Color
4429     factor: float
4430     Color: Color }
4431 { $description
4432     "Get color with brightness" } ;
4433
4434 HELP: color-contrast
4435 { $values
4436     color: Color
4437     contrast: float
4438     Color: Color }
4439 { $description
4440     "Get color with contrast" } ;
4441
4442 HELP: color-alpha
4443 { $values
4444     color: Color
4445     alpha: float
4446     Color: Color }
4447 { $description
4448     "Get color with alpha applied, alpha goes from 0.0f to 1.0f" } ;
4449
4450 HELP: color-alpha-blend
4451 { $values
4452     dst: Color
4453     src: Color
4454     tint: Color
4455     Color: Color }
4456 { $description
4457     "Get src alpha-blended into dst color with tint" } ;
4458
4459 HELP: get-color
4460 { $values
4461     hexValue: uint
4462     Color: Color }
4463 { $description
4464     "Get Color structure from hexadecimal value" } ;
4465
4466 HELP: get-pixel-color
4467 { $values
4468     srcPtr: void*
4469     format: PixelFormat
4470     Color: Color }
4471 { $description
4472     "Get Color from a source pixel pointer of certain format" } ;
4473
4474 HELP: set-pixel-color
4475 { $values
4476     dstPtr: void*
4477     color: Color
4478     format: PixelFormat }
4479 { $description
4480     "Set color formatted into destination pixel pointer" } ;
4481
4482 HELP: get-pixel-data-size
4483 { $values
4484     width: int
4485     height: int
4486     format: PixelFormat
4487     int: int }
4488 { $description
4489     "Get pixel data size in bytes for certain format" } ;
4490
4491
4492 ! Font loading/unloading functions
4493 HELP: get-font-default
4494 { $values
4495     Font: Font }
4496 { $description
4497     "Get the default Font" } ;
4498
4499 HELP: load-font
4500 { $values
4501     fileName: c-string
4502     Font: Font }
4503 { $description
4504     "Load font from file into GPU memory (VRAM)" } ;
4505
4506 HELP: load-font-ex
4507 { $values
4508     fileName: c-string
4509     fontSize: int
4510     fontChars: { "a " { $link pointer } " to a " { $link int } }
4511     glyphCount: int
4512     Font: Font }
4513 { $description
4514     "Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set" } ;
4515
4516 HELP: load-font-from-image
4517 { $values
4518     image: Image
4519     key: Color
4520     firstChar: int
4521     Font: Font }
4522 { $description
4523     "Load font from Image (XNA style)" } ;
4524
4525 HELP: load-font-from-memory
4526 { $values
4527     fileType: c-string
4528     fileData: c-string
4529     dataSize: int
4530     fontSize: int
4531     fontChars: { "a " { $link pointer } " to a " { $link int } }
4532     glyphCount: int
4533     Font: Font }
4534 { $description
4535     "Load font from memory buffer, fileType refers to extension: i.e. '.ttf'" } ;
4536
4537 HELP: is-font-ready
4538 { $values
4539     font: Font
4540     bool: bool }
4541 { $description
4542     "Check if a font is ready" } ;
4543
4544 HELP: load-font-data
4545 { $values
4546     fileData: c-string
4547     dataSize: int
4548     fontSize: int
4549     fontChars: { "a " { $link pointer } " to a " { $link int } }
4550     glyphCount: int
4551     type: FontType
4552     GlyphInfo*: { "a " { $link pointer } " to " { $link GlyphInfo } } }
4553 { $description
4554     "Load font data for further use" } ;
4555
4556 HELP: gen-image-font-atlas
4557 { $values
4558     chars: { "a " { $link pointer } " to a " { $link GlyphInfo } }
4559     recs: { "a double " { $link pointer } " to a " { $link Rectangle } }
4560     glyphCount: int
4561     fontSize: int
4562     padding: int
4563     packMethod: int
4564     Image: Image }
4565 { $description
4566     "Generate image font atlas using chars info" } ;
4567
4568 HELP: unload-font-data
4569 { $values
4570     chars: { "a " { $link pointer } " to a " { $link GlyphInfo } }
4571     glyphCount: int }
4572 { $description
4573     "Unload font chars info data (RAM)" } ;
4574
4575 HELP: unload-font
4576 { $values
4577     font: Font }
4578 { $description
4579     "Unload Font from GPU memory (VRAM)" } ;
4580
4581 HELP: export-font-as-code
4582 { $values
4583     font: Font
4584     fileName: c-string
4585     bool: bool }
4586 { $description
4587     "Export font as code file, returns true on success" } ;
4588
4589
4590 ! Text drawing functions
4591 HELP: draw-fps
4592 { $values
4593     posX: int
4594     posY: int }
4595 { $description
4596     "Draw current FPS" } ;
4597
4598 HELP: draw-text
4599 { $values
4600     text: c-string
4601     posX: int
4602     posY: int
4603     fontSize: int
4604     color: Color }
4605 { $description
4606     "Draw text (using default font)" } ;
4607
4608 HELP: draw-text-ex
4609 { $values
4610     font: Font
4611     text: c-string
4612     position: Vector2
4613     fontSize: float
4614     spacing: float
4615     tint: Color }
4616 { $description
4617     "Draw text using font and additional parameters" } ;
4618
4619 HELP: draw-text-pro
4620 { $values
4621     font: Font
4622     text: c-string
4623     position: Vector2
4624     origin: Vector2
4625     rotation: float
4626     fontSize: float
4627     spacing: float
4628     tint: Color }
4629 { $description
4630     "Draw text using Font and pro parameters (rotation)" } ;
4631
4632 HELP: draw-text-codepoint
4633 { $values
4634     font: Font
4635     codepoint: int
4636     position: Vector2
4637     fontSize: float
4638     tint: Color }
4639 { $description
4640     "Draw one character (codepoint)" } ;
4641
4642 HELP: draw-text-codepoints
4643 { $values
4644     font: Font
4645     codepoint: { "a " { $link pointer } " to a " { $link int } }
4646     count: int
4647     position: Vector2
4648     fontSize: float
4649     spacing: float
4650     tint: Color }
4651 { $description
4652     "Draw multiple character (codepoint)" } ;
4653
4654
4655 ! Text font info functions
4656 HELP: measure-text
4657 { $values
4658     text: c-string
4659     fontSize: int
4660     int: int }
4661 { $description
4662     "Measure string width for default font" } ;
4663
4664 HELP: measure-text-ex
4665 { $values
4666     font: Font
4667     text: c-string
4668     fontSize: float
4669     spacing: float
4670     Vector2: Vector2 }
4671 { $description
4672     "Measure string size for Font" } ;
4673
4674 HELP: get-glyph-index
4675 { $values
4676     font: Font
4677     codepoint: int
4678     int: int }
4679 { $description
4680     "Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found" } ;
4681
4682 HELP: get-glyph-info
4683 { $values
4684     font: Font
4685     codepoint: int
4686     GlyphInfo: GlyphInfo }
4687 { $description
4688     "Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found" } ;
4689
4690 HELP: get-glyph-atlas-rec
4691 { $values
4692     font: Font
4693     codepoint: int
4694     Rectangle: Rectangle }
4695 { $description
4696     "Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found" } ;
4697
4698
4699 ! Text codepoints management functions (unicode characters)
4700 HELP: load-utf8
4701 { $values
4702     codepoints: { "a " { $link pointer } " to a " { $link int } }
4703     length: int
4704     c-string: c-string }
4705 { $description
4706     "Load UTF-8 text encoded from codepoints array" } ;
4707
4708 HELP: unload-utf8
4709 { $values
4710     text: c-string }
4711 { $description
4712     "Unload UTF-8 text encoded from codepoints array" } ;
4713
4714 HELP: load-codepoints
4715 { $values
4716     text: c-string
4717     count: { "a " { $link pointer } " to a " { $link int } }
4718     int*:  { "a " { $link pointer } " to a " { $link int } } }
4719 { $description
4720     "Load all codepoints from a UTF-8 text string, codepoints count returned by parameter" } ;
4721
4722 HELP: unload-codepoints
4723 { $values
4724     codepoints: { "a " { $link pointer } " to a " { $link int } } }
4725 { $description
4726     "Unload codepoints data from memory" } ;
4727
4728 HELP: get-codepoint-count
4729 { $values
4730     text: c-string
4731     int: int }
4732 { $description
4733     "Get total number of codepoints in a UTF-8 encoded string" } ;
4734
4735 HELP: get-codepoint
4736 { $values
4737     text: c-string
4738     bytesProcessed: { "a " { $link pointer } " to a " { $link int } }
4739     int: int }
4740 { $description
4741     "Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure" } ;
4742
4743 HELP: get-codepoint-next
4744 { $values
4745     text: c-string
4746     codepointSize: { "a " { $link pointer } " to a " { $link int } }
4747     int: int }
4748 { $description
4749     "Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure" } ;
4750
4751 HELP: get-codepoint-previous
4752 { $values
4753     text: c-string
4754     codepointSize: { "a " { $link pointer } " to a " { $link int } }
4755     int: int }
4756 { $description
4757     "Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure" } ;
4758
4759 HELP: codepoint-to-utf8
4760 { $values
4761     codepoint: int
4762     byteSize: { "a " { $link pointer } " to a " { $link int } }
4763     c-string: c-string  }
4764 { $description
4765     "Encode one codepoint into UTF-8 byte array (array length returned as parameter)" } ;
4766
4767
4768 ! Text strings management functions (no UTF-8 strings, only byte chars)
4769 ! NOTE: Some strings allocate memory internally for returned strings, just be careful!
4770 HELP: text-copy
4771 { $values
4772     dst: c-string
4773     src: c-string
4774     int: int }
4775 { $description
4776     "Copy one string to another, returns bytes copied" } ;
4777
4778 HELP: text-is-equal
4779 { $values
4780     text1: c-string
4781     text2: c-string
4782     bool: bool }
4783 { $description
4784     "Check if two text string are equal" } ;
4785
4786 HELP: text-length
4787 { $values
4788     text: c-string
4789     uint: uint }
4790 { $description
4791     "Get text length, checks for '\0' ending" } ;
4792
4793 HELP: text-subtext
4794 { $values
4795     text: c-string
4796     position: int
4797     length: int
4798     c-string: c-string }
4799 { $description
4800     "Get a piece of a text string" } ;
4801
4802 HELP: text-replace
4803 { $values
4804     text: c-string
4805     replace: c-string
4806     by: c-string
4807     c-string: c-string }
4808 { $description
4809     "Replace text string"
4810     { $warning
4811         "Memory must be freed!" } } ;
4812
4813 HELP: text-insert
4814 { $values
4815     text: c-string
4816     insert: c-string
4817     position: int
4818     c-string: c-string }
4819 { $description
4820     "Insert text in a position"
4821     { $warning
4822         "Memory must be freed!" } } ;
4823
4824 HELP: text-join
4825 { $values
4826     textList: { "a " { $link pointer } " to a " { $link c-string } }
4827     count: int
4828     delimiter: c-string
4829     c-string: c-string }
4830 { $description
4831     "Join text strings with delimiter" } ;
4832
4833 HELP: text-split
4834 { $values
4835     text: c-string
4836     delimiter: char
4837     count: { "a " { $link pointer } " to a " { $link int } }
4838     c-string*: { "a " { $link pointer } " to an array of " { $link c-string } } }
4839 { $description
4840     "Split text into multiple strings" } ;
4841
4842 HELP: text-append
4843 { $values
4844     text: c-string
4845     append: c-string
4846     position: { "a " { $link pointer } " to a " { $link int } } }
4847 { $description
4848     "Append text at specific position and move cursor!" } ;
4849
4850 HELP: text-find-index
4851 { $values
4852     text: c-string
4853     find: c-string
4854     int: int }
4855 { $description
4856     "Find first text occurrence within a string" } ;
4857
4858 HELP: text-to-upper
4859 { $values
4860     text: c-string
4861     c-string: c-string }
4862 { $description
4863     "Get upper case version of provided string" } ;
4864
4865 HELP: text-to-lower
4866 { $values
4867     text: c-string
4868     c-string: c-string }
4869 { $description
4870     "Get lower case version of provided string" } ;
4871
4872 HELP: text-to-pascal
4873 { $values
4874     text: c-string
4875     c-string: c-string }
4876 { $description
4877     "Get Pascal case notation version of provided string" } ;
4878
4879 HELP: text-to-integer
4880 { $values
4881     text: c-string
4882     int: int }
4883 { $description
4884     "Get integer value from text."
4885     { $warning
4886         "Negative values not supported" } } ;
4887
4888 ! Basic geometric 3D shapes drawing functions
4889 HELP: draw-line-3d
4890 { $values
4891     startPos: Vector3
4892     endPos: Vector3
4893     color: Color }
4894 { $description
4895     "Draw a line in 3D world space" } ;
4896
4897 HELP: draw-point-3d
4898 { $values
4899     position: Vector3
4900     color: Color }
4901 { $description
4902     "Draw a point in 3D space, actually a small line" } ;
4903
4904 HELP: draw-circle-3d
4905 { $values
4906     center: Vector3
4907     radius: float
4908     rotationAxis: Vector3
4909     rotationAngle: float
4910     color: Color }
4911 { $description
4912     "Draw a circle in 3D world space" } ;
4913
4914 HELP: draw-triangle-3d
4915 { $values
4916     v1: Vector3
4917     v2: Vector3
4918     v3: Vector3
4919     color: Color }
4920 { $description
4921     "Draw a color-filled triangle (vertex in counter-clockwise order!)" } ;
4922
4923 HELP: draw-triangle-strip-3d
4924 { $values
4925     points: { "a " { $link pointer } " to a " { $link Vector3 } }
4926     pointCount: int
4927     color: Color }
4928 { $description
4929     "Draw a triangle strip defined by points" } ;
4930
4931 HELP: draw-cube
4932 { $values
4933     position: Vector3
4934     width: float
4935     height: float
4936     length: float
4937     color: Color }
4938 { $description
4939     "Draw cube" } ;
4940
4941 HELP: draw-cube-v
4942 { $values
4943     position: Vector3
4944     size: Vector3
4945     color: Color }
4946 { $description
4947     "Draw cube (Vector version)" } ;
4948
4949 HELP: draw-cube-wires
4950 { $values
4951     position: Vector3
4952     width: float
4953     height: float
4954     length: float
4955     color: Color }
4956 { $description
4957     "Draw cube wires" } ;
4958
4959 HELP: draw-cube-wires-v
4960 { $values
4961     position: Vector3
4962     size: Vector3
4963     color: Color }
4964 { $description
4965     "Draw cube wires (Vector version)" } ;
4966
4967 HELP: draw-sphere
4968 { $values
4969     centerPos: Vector3
4970     radius: float
4971     color: Color }
4972 { $description
4973     "Draw sphere" } ;
4974
4975 HELP: draw-sphere-ex
4976 { $values
4977     centerPos: Vector3
4978     radius: float
4979     rings: int
4980     slices: int
4981     color: Color }
4982 { $description
4983     "Draw sphere with extended parameters" } ;
4984
4985 HELP: draw-sphere-wires
4986 { $values
4987     centerPos: Vector3
4988     radius: float
4989     rings: int
4990     slices: int
4991     color: Color }
4992 { $description
4993     "Draw sphere wires" } ;
4994
4995 HELP: draw-cylinder
4996 { $values
4997     position: Vector3
4998     radiusTop: float
4999     radiusBottom: float
5000     height: float
5001     slices: int
5002     color: Color }
5003 { $description
5004     "Draw a cylinder/cone" } ;
5005
5006 HELP: draw-cylinder-ex
5007 { $values
5008     startPos: Vector3
5009     endPos: Vector3
5010     startRadius: float
5011     endRadius: float
5012     sides: int
5013     color: Color }
5014 { $description
5015     "Draw a cylinder with base at startPos and top at endPos" } ;
5016
5017 HELP: draw-cylinder-wires
5018 { $values
5019     position: Vector3
5020     radiusTop: float
5021     radiusBottom: float
5022     height: float
5023     slices: int
5024     color: Color }
5025 { $description
5026     "Draw a cylinder/cone wires" } ;
5027
5028 HELP: draw-cylinder-wires-ex
5029 { $values
5030     startPos: Vector3
5031     endPos: Vector3
5032     startRadius: float
5033     endRadius: float
5034     sides: int
5035     color: Color }
5036 { $description
5037     "Draw a cylinder wires with base at startPos and top at endPos" } ;
5038
5039 HELP: draw-capsule
5040 { $values
5041     startPos: Vector3
5042     endPos: Vector3
5043     radius: float
5044     slices: int
5045     rings: int
5046     color: Color }
5047 { $description
5048     "Draw a capsule with the center of its sphere caps at startPos and endPos" } ;
5049
5050 HELP: draw-capsule-wires
5051 { $values
5052     startPos: Vector3
5053     endPos: Vector3
5054     radius: float
5055     slices: int
5056     rings: int
5057     color: Color }
5058 { $description
5059     "Draw capsule wireframe with the center of its sphere caps at startPos and endPos" } ;
5060
5061 HELP: draw-plane
5062 { $values
5063     centerPos: Vector3
5064     size: Vector2
5065     color: Color }
5066 { $description
5067     "Draw a plane XZ" } ;
5068
5069 HELP: draw-ray
5070 { $values
5071     ray: Ray
5072     color: Color }
5073 { $description
5074     "Draw a ray line" } ;
5075
5076 HELP: draw-grid
5077 { $values
5078     slices: int
5079     spacing: float }
5080 { $description
5081     "Draw a grid (centered at (0, 0, 0))" } ;
5082
5083
5084 ! Model management functions
5085 HELP: load-model
5086 { $values
5087     fileName: c-string
5088     Model: Model }
5089 { $description
5090     "Load model from files (meshes and materials)" } ;
5091
5092 HELP: load-model-from-mesh
5093 { $values
5094     mesh: Mesh
5095     Model: Model }
5096 { $description
5097     "Load model from generated mesh (default material)" } ;
5098
5099 HELP: is-model-ready
5100 { $values
5101     model: Model
5102     bool: bool }
5103 { $description
5104     "Check if a model is ready" } ;
5105
5106 HELP: unload-model
5107 { $values
5108     model: Model }
5109 { $description
5110     "Unload model (including meshes) from memory (RAM and/or VRAM)" } ;
5111
5112 HELP: get-model-bounding-box
5113 { $values
5114     model: Model
5115     BoundingBox: BoundingBox }
5116 { $description
5117     "Compute model bounding box limits (considers all meshes)" } ;
5118
5119
5120 ! Model drawing functions
5121 HELP: draw-model
5122 { $values
5123     model: Model
5124     position: Vector3
5125     scale: float
5126     tint: Color }
5127 { $description
5128     "Draw a model (with texture if set)" } ;
5129
5130 HELP: draw-model-ex
5131 { $values
5132     model: Model
5133     position: Vector3
5134     rotationAxis: Vector3
5135     rotationAngle: float
5136     scale: Vector3
5137     tint: Color }
5138 { $description
5139     "Draw a model with extended parameters" } ;
5140
5141 HELP: draw-model-wires
5142 { $values
5143     model: Model
5144     position: Vector3
5145     scale: float
5146     tint: Color }
5147 { $description
5148     "Draw a model wires (with texture if set)" } ;
5149
5150 HELP: draw-model-wires-ex
5151 { $values
5152     model: Model
5153     position: Vector3
5154     rotationAxis: Vector3
5155     rotationAngle: float
5156     scale: Vector3
5157     tint: Color }
5158 { $description
5159     "Draw a model wires (with texture if set) with extended parameters" } ;
5160
5161 HELP: draw-bounding-box
5162 { $values
5163     box: BoundingBox
5164     color: Color }
5165 { $description
5166     "Draw bounding box (wires)" } ;
5167
5168 HELP: draw-billboard
5169 { $values
5170     camera: Camera
5171     texture: Texture2D
5172     position: Vector3
5173     size: float
5174     tint: Color }
5175 { $description
5176     "Draw a billboard texture" } ;
5177
5178 HELP: draw-billboard-rec
5179 { $values
5180     camera: Camera
5181     texture: Texture2D
5182     source: Rectangle
5183     position: Vector3
5184     size: Vector2
5185     tint: Color }
5186 { $description
5187     "Draw a billboard texture defined by source" } ;
5188
5189 HELP: draw-billboard-pro
5190 { $values
5191     camera: Camera
5192     texture: Texture2D
5193     source: Rectangle
5194     position: Vector3
5195     up: Vector3
5196     size: Vector2
5197     origin: Vector2
5198     rotation: float
5199     tint: Color }
5200 { $description
5201     "Draw a billboard texture defined by source and rotation" } ;
5202
5203
5204 ! Mesh management functions
5205 HELP: upload-mesh
5206 { $values
5207     mesh: { "a " { $link pointer } " to a " { $link Mesh } }
5208     dynamic: bool }
5209 { $description
5210     "Upload mesh vertex data in GPU and provide VAO/VBO ids" } ;
5211
5212 HELP: update-mesh-buffer
5213 { $values
5214     mesh: Mesh
5215     index: int
5216     data: void*
5217     dataSize: int
5218     offset: int }
5219 { $description
5220     "Update mesh vertex data in GPU for a specific buffer index" } ;
5221
5222 HELP: unload-mesh
5223 { $values
5224     mesh: Mesh }
5225 { $description
5226     "Unload mesh data from CPU and GPU" } ;
5227
5228 HELP: draw-mesh
5229 { $values
5230     mesh: Mesh
5231     material: Material
5232     transform: Matrix }
5233 { $description
5234     "Draw a 3d mesh with material and transform" } ;
5235
5236 HELP: draw-mesh-instanced
5237 { $values
5238     mesh: Mesh
5239     material: Material
5240     transforms: { "a " { $link pointer } " to a " { $link Matrix } }
5241     instances: int }
5242 { $description
5243     "Draw multiple mesh instances with material and different transforms" } ;
5244
5245 HELP: export-mesh
5246 { $values
5247     mesh: Mesh
5248     fileName: c-string
5249     bool: bool }
5250 { $description
5251     "Export mesh data to file, returns true on success" } ;
5252
5253 HELP: get-mesh-bounding-box
5254 { $values
5255     mesh: Mesh
5256     BoundingBox: BoundingBox }
5257 { $description
5258     "Compute mesh bounding box limits" } ;
5259
5260 HELP: gen-mesh-tangents
5261 { $values
5262     mesh: { "a " { $link pointer } " to a " { $link Mesh } } }
5263 { $description
5264     "Compute mesh tangents" } ;
5265
5266
5267 ! Mesh generation functions
5268 HELP: gen-mesh-poly
5269 { $values
5270     sides: int
5271     radius: float
5272     Mesh: Mesh }
5273 { $description
5274     "Generate polygonal mesh" } ;
5275
5276 HELP: gen-mesh-plane
5277 { $values
5278     width: float
5279     length: float
5280     resX: int
5281     resZ: int
5282     Mesh: Mesh }
5283 { $description
5284     "Generate plane mesh (with subdivisions)" } ;
5285
5286 HELP: gen-mesh-cube
5287 { $values
5288     width: float
5289     height: float
5290     length: float
5291     Mesh: Mesh }
5292 { $description
5293     "Generate cuboid mesh" } ;
5294
5295 HELP: gen-mesh-sphere
5296 { $values
5297     radius: float
5298     rings: int
5299     slices: int
5300     Mesh: Mesh }
5301 { $description
5302     "Generate sphere mesh (standard sphere)" } ;
5303
5304 HELP: gen-mesh-hemi-sphere
5305 { $values
5306     radius: float
5307     rings: int
5308     slices: int
5309     Mesh: Mesh }
5310 { $description
5311     "Generate half-sphere mesh (no bottom cap)" } ;
5312
5313 HELP: gen-mesh-cylinder
5314 { $values
5315     radius: float
5316     height: float
5317     slices: int
5318     Mesh: Mesh }
5319 { $description
5320     "Generate cylinder mesh" } ;
5321
5322 HELP: gen-mesh-cone
5323 { $values
5324     radius: float
5325     height: float
5326     slices: int
5327     Mesh: Mesh }
5328 { $description
5329     "Generate cone/pyramid mesh" } ;
5330
5331 HELP: gen-mesh-torus
5332 { $values
5333     radius: float
5334     size: float
5335     radSeg: int
5336     sides: int
5337     Mesh: Mesh }
5338 { $description
5339     "Generate torus mesh" } ;
5340
5341 HELP: gen-mesh-knot
5342 { $values
5343     radius: float
5344     size: float
5345     radSeg: int
5346     sides: int
5347     Mesh: Mesh }
5348 { $description
5349     "Generate trefoil knot mesh" } ;
5350
5351 HELP: gen-mesh-heightmap
5352 { $values
5353     heightmap: Image
5354     size: Vector3
5355     Mesh: Mesh }
5356 { $description
5357     "Generate heightmap mesh from image data" } ;
5358
5359 HELP: gen-mesh-cubicmap
5360 { $values
5361     cubicmap: Image
5362     cubeSize: Vector3
5363     Mesh: Mesh }
5364 { $description
5365     "Generate cubes-based map mesh from image data" } ;
5366
5367
5368 ! Material loading/unloading functions
5369 HELP: load-materials
5370 { $values
5371     fileName: c-string
5372     materialCount: { "a " { $link pointer } " to a " { $link int } }
5373     Material*: { "a " { $link pointer } " to a " { $link Material } } }
5374 { $description
5375     "Load materials from model file" } ;
5376
5377 HELP: load-material-default
5378 { $values
5379     Material: Material }
5380 { $description
5381     "Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)" } ;
5382
5383 HELP: is-material-ready
5384 { $values
5385     material: Material
5386     bool: bool }
5387 { $description
5388     "check if a material is ready" } ;
5389
5390 HELP: unload-material
5391 { $values
5392     material: Material }
5393 { $description
5394     "Unload material from GPU memory (VRAM)" } ;
5395
5396 HELP: set-material-texture
5397 { $values
5398     material: { "a " { $link pointer } " to a " { $link Material } }
5399     mapType: int
5400     texture: Texture2D }
5401 { $description
5402     "Set texture for a material map type  ( Material_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)" } ;
5403
5404 HELP: set-model-mesh-material
5405 { $values
5406     model: { "a " { $link pointer } " to a " { $link Model } }
5407     meshId: int
5408     materialId: int }
5409 { $description
5410     "Set material for a mesh" } ;
5411
5412
5413 ! Model animations loading/unloading functions
5414 HELP: load-model-animations
5415 { $values
5416     fileName: c-string
5417     animCount: { "a " { $link pointer } " to a " { $link uint } }
5418     ModelAnimation*: { "a " { $link pointer } " to a " { $link ModelAnimation } } }
5419 { $description
5420     "Load model animations from file" } ;
5421
5422 HELP: update-model-animation
5423 { $values
5424     model: Model
5425     anim: ModelAnimation
5426     frame: int }
5427 { $description
5428     "Update model animation pose" } ;
5429
5430 HELP: unload-model-animation
5431 { $values
5432     anim: ModelAnimation }
5433 { $description
5434     "Unload animation data" } ;
5435
5436 HELP: unload-model-animations
5437 { $values
5438     animations: { "a " { $link pointer } " to a "  { $link ModelAnimation } }
5439     count: uint }
5440 { $description
5441     "Unload animation array data" } ;
5442
5443 HELP: is-model-animation-valid
5444 { $values
5445     model: Model
5446     anim: ModelAnimation
5447     bool: bool }
5448 { $description
5449     "Check model animation skeleton match" } ;
5450
5451
5452 ! Collision detection functions
5453 HELP: check-collision-spheres
5454 { $values
5455     center1: Vector3
5456     radius1: float
5457     center2: Vector3
5458     radius2: float
5459     bool: bool }
5460 { $description
5461     "Check collision between two spheres" } ;
5462
5463 HELP: check-collision-boxes
5464 { $values
5465     box1: BoundingBox
5466     box2: BoundingBox
5467     bool: bool }
5468 { $description
5469     "Check collision between two bounding boxes" } ;
5470
5471 HELP: check-collision-box-sphere
5472 { $values
5473     box: BoundingBox
5474     center: Vector3
5475     radius: float
5476     bool: bool }
5477 { $description
5478     "Check collision between box and sphere" } ;
5479
5480 HELP: get-ray-collision-sphere
5481 { $values
5482     ray: Ray
5483     center: Vector3
5484     radius: float
5485     RayCollision: RayCollision }
5486 { $description
5487     "Get collision info between ray and sphere" } ;
5488
5489 HELP: get-ray-collision-box
5490 { $values
5491     ray: Ray
5492     box: BoundingBox
5493     RayCollision: RayCollision }
5494 { $description
5495     "Get collision info between ray and box" } ;
5496
5497 HELP: get-ray-collision-mesh
5498 { $values
5499     ray: Ray
5500     mesh: Mesh
5501     transform: Matrix
5502     RayCollision: RayCollision }
5503 { $description
5504     "Get collision info between ray and mesh" } ;
5505
5506 HELP: get-ray-collision-triangle
5507 { $values
5508     ray: Ray
5509     p1: Vector3
5510     p2: Vector3
5511     p3: Vector3
5512     RayCollision: RayCollision }
5513 { $description
5514     "Get collision info between ray and triangle" } ;
5515
5516 HELP: get-ray-collision-quad
5517 { $values
5518     ray: Ray
5519     p1: Vector3
5520     p2: Vector3
5521     p3: Vector3
5522     p4: Vector3
5523     RayCollision: RayCollision }
5524 { $description
5525     "Get collision info between ray and quad" } ;
5526
5527 HELP: get-ray-collision-model
5528 { $values 
5529     ray: Ray
5530     model: Model 
5531     ray-collision: RayCollision } ;
5532
5533 HELP: get-ray-collision-ground 
5534 { $values 
5535     ray: Ray
5536     ground-height: float 
5537     ray-collision: RayCollision } ;
5538
5539 HELP: AudioCallback
5540 { $values
5541     quot: { $quotation ( void* int -- ) }
5542     alien: c-ptr }
5543 { $description
5544     Constructs a \ alien-callback that can be passed to
5545     raylib's audio processing functions. }
5546 { $see-also
5547     set-audio-stream-callback
5548     attach-audio-stream-processor
5549     detach-audio-stream-processor
5550     attach-audio-mixed-processor
5551     detach-audio-mixed-processor } ;
5552
5553 ! Audio device management functions
5554 HELP: init-audio-device
5555 { $description
5556     "Initialize audio device and context " } ;
5557
5558 HELP: close-audio-device
5559 { $description
5560     "Close the audio device and context " } ;
5561
5562 HELP: is-audio-device-ready
5563 { $values 
5564     bool: bool }
5565 { $description
5566     "Check if audio device has been initialized successfully " } ;
5567
5568 HELP: set-master-volume
5569 { $values
5570     volume: float }
5571 { $description
5572     "Set master volume (listener)" } ;
5573
5574 ! Wave/Sound loading/unloading functions
5575 HELP: load-wave
5576 { $values
5577     fileName: c-string
5578     Wave: Wave }
5579 { $description
5580     Load wave data from file } ;
5581
5582 HELP: load-wave-from-memory
5583 { $values
5584     fileType: c-string
5585     fileData: c-string
5586     dataSize: int
5587     Wave: Wave }
5588 { $description
5589     Load wave from memory buffer, fileType refers to extension: i.e. '.wav' } ;
5590
5591 HELP: is-wave-ready
5592 { $values
5593     wave: Wave
5594     bool: bool }
5595 { $description
5596     "Checks if wave data is ready " } ;
5597
5598 HELP: load-sound
5599 { $values
5600     fileName: c-string
5601     Sound: Sound }
5602 { $description
5603     "Load sound from file" } ;
5604
5605 HELP: load-sound-from-wave
5606 { $values
5607     wave: Wave
5608     Sound: Sound }
5609 { $description
5610     "Load sound from wave data " } ;
5611
5612 HELP: is-sound-ready
5613 { $values
5614     sound: Sound
5615     bool: bool }
5616 { $description
5617     "Checks if a sound is ready" } ;
5618
5619 HELP: update-sound
5620 { $values
5621     sound: Sound
5622     data: void*
5623     sampleCount: int }
5624 { $description
5625     "Update sound buffer with new data" } ;
5626
5627 HELP: unload-wave
5628 { $values
5629     wave: Wave }
5630 { $description
5631     "Unload wave data" } ;
5632
5633 HELP: unload-sound
5634 { $values
5635     sound: Sound }
5636 { $description
5637     Unload sound } ;
5638
5639 HELP: export-wave
5640 { $values
5641     wave: Wave
5642     fileName: c-string
5643     bool: bool }
5644 { $description
5645     "Export wave data to file, returns true on success " } ;
5646
5647 HELP: export-wave-as-code
5648 { $values
5649     wave: Wave
5650     fileName: c-string
5651     bool: bool }
5652 { $description
5653     "Export wave sample data to code (.h), returns true on success " } ;
5654
5655
5656 ! Wave/Sound management functions
5657 HELP: play-sound
5658 { $values
5659     sound: Sound }
5660 { $description
5661     Play a sound } ;
5662
5663 HELP: stop-sound
5664 { $values
5665     sound: Sound }
5666 { $description
5667     Stop playing a sound } ;
5668
5669 HELP: pause-sound
5670 { $values
5671     sound: Sound }
5672 { $description
5673     Pause a sound } ;
5674
5675 HELP: resume-sound
5676 { $values
5677     sound: Sound }
5678 { $description
5679     Resume a paused sound } ;
5680
5681 HELP: is-sound-playing
5682 { $values
5683     sound: Sound
5684     bool: bool }
5685 { $description
5686     Check if a sound is currently playing } ;
5687
5688 HELP: set-sound-volume
5689 { $values
5690     sound: Sound
5691     volume: float }
5692 { $description
5693     Set volume for a sound (1.0 is max level) } ;
5694
5695 HELP: set-sound-pitch
5696 { $values
5697     sound: Sound
5698     pitch: float }
5699 { $description
5700     Set pitch for a sound (1.0 is base level) } ;
5701
5702 HELP: set-sound-pan
5703 { $values
5704     sound: Sound
5705     pan: float }
5706 { $description
5707     Set pan for a sound (0.5 is center) } ;
5708
5709 HELP: wave-copy
5710 { $values
5711     wave: Wave
5712     Wave: Wave }
5713 { $description
5714     "Copy a wave to a new wave " } ;
5715
5716 HELP: wave-crop
5717 { $values
5718     wave: { "a " { $link pointer } " to a " { $link Wave } }
5719     initSample: int
5720     finalSample: int  }
5721 { $description
5722     Crop a wave to defined samples range } ;
5723
5724 HELP: wave-format
5725 { $values
5726     wave: { "a " { $link pointer } " to a " { $link Wave } }
5727     sampleRate: int
5728     sampleSize: int
5729     channels: int  }
5730 { $description
5731     Convert wave data to desired format } ;
5732
5733 HELP: load-wave-samples
5734 { $values
5735     wave: Wave
5736     float*: { "a " { $link pointer } " to some " { $link float } "s" } }
5737 { $description
5738     "Load samples data from wave as a floats array " } ;
5739
5740 HELP: unload-wave-samples
5741 { $values
5742     samples: { "a " { $link pointer } " to some " { $link float } "s" } }
5743 { $description
5744     "Unload samples data loaded with " { $link load-wave-samples } } ;
5745
5746 ! Music management functions
5747 HELP: load-music-stream
5748 { $values
5749     fileName: c-string
5750     Music: Music }
5751 { $description
5752     Load music stream from file } ;
5753
5754 HELP: load-music-stream-from-memory
5755 { $values
5756     fileType: c-string
5757     data: c-string
5758     dataSize: int
5759     Music: Music }
5760 { $description
5761     Load music stream from data } ;
5762
5763 HELP: is-music-ready
5764 { $values
5765     music: Music
5766     bool: bool }
5767 { $description
5768     "Checks if a music stream is ready " } ;
5769
5770 HELP: unload-music-stream
5771 { $values
5772     music: Music }
5773 { $description
5774     "Unload music stream " } ;
5775
5776 HELP: play-music-stream
5777 { $values
5778     music: Music }
5779 { $description
5780     "Start music playing " } ;
5781
5782 HELP: is-music-stream-playing
5783 { $values
5784     music: Music
5785     bool: bool }
5786 { $description
5787     "Check if music is playing " } ;
5788
5789 HELP: update-music-stream
5790 { $values
5791     music: Music }
5792 { $description
5793     "Updates buffers for music streaming " } ;
5794
5795 HELP: stop-music-stream
5796 { $values
5797     music: Music }
5798 { $description
5799     "Stop music playing " } ;
5800
5801 HELP: pause-music-stream
5802 { $values
5803     music: Music }
5804 { $description
5805     "Pause music playing " } ;
5806
5807 HELP: resume-music-stream
5808 { $values
5809     music: Music }
5810 { $description
5811     "Resume playing paused music " } ;
5812
5813 HELP: seek-music-stream
5814 { $values
5815     music: Music
5816     position: float }
5817 { $description
5818     "Seek music to a position (in seconds)" } ;
5819
5820 HELP: set-music-volume
5821 { $values
5822     music: Music
5823     volume: float }
5824 { $description
5825     "Set volume for music (1.0 is max level)" } ;
5826
5827 HELP: set-music-pitch
5828 { $values
5829     music: Music
5830     pitch: float }
5831 { $description
5832     "Set pitch for a music (1.0 is base level)" } ;
5833
5834 HELP: set-music-pan
5835 { $values
5836     sound: Music
5837     pan: float }
5838 { $description
5839     "Set pan for a music (0.5 is center)" } ;
5840
5841 HELP: get-music-time-length
5842 { $values
5843     music: Music
5844     float: float }
5845 { $description
5846     "Get music time length (in seconds) " } ;
5847
5848 HELP: get-music-time-played
5849 { $values
5850     music: Music
5851     float: float }
5852 { $description
5853     "Get current music time played (in seconds) " } ;
5854
5855 ! AudioStream management functions
5856 HELP: load-audio-stream
5857 { $values
5858     sampleRate: uint
5859     sampleSize: uint
5860     channels: uint
5861     AudioStream: AudioStream }
5862 { $description
5863     "Load audio stream (to stream raw audio pcm data)" } ;
5864
5865 HELP: is-audio-stream-ready
5866 { $values
5867     stream: AudioStream
5868     bool: bool }
5869 { $description
5870     "Checks if an audio stream is ready " } ;
5871
5872 HELP: unload-audio-stream
5873 { $values
5874     stream: AudioStream }
5875 { $description
5876     "Unload audio stream and free memory " } ;
5877
5878 HELP: update-audio-stream
5879 { $values
5880     stream: AudioStream
5881     data: void*
5882     frameCount: int }
5883 { $description
5884     "Update audio stream buffers with data" } ;
5885
5886 HELP: is-audio-stream-processed
5887 { $values
5888     stream: AudioStream
5889     bool: bool }
5890 { $description
5891     "Check if any audio stream buffers requires refill " } ;
5892
5893 HELP: play-audio-stream
5894 { $values
5895     stream: AudioStream }
5896 { $description
5897     "Play audio stream " } ;
5898
5899 HELP: pause-audio-stream
5900 { $values
5901     stream: AudioStream }
5902 { $description
5903     "Pause audio stream " } ;
5904
5905 HELP: resume-audio-stream
5906 { $values
5907     stream: AudioStream }
5908 { $description
5909     "Resume audio stream " } ;
5910
5911 HELP: is-audio-stream-playing
5912 { $values
5913     stream: AudioStream
5914     bool: bool }
5915 { $description
5916     "Check if audio stream is playing " } ;
5917
5918 HELP: stop-audio-stream
5919 { $values
5920     stream: AudioStream }
5921 { $description
5922     "Stop audio stream " } ;
5923
5924 HELP: set-audio-stream-volume
5925 { $values
5926     stream: AudioStream
5927     volume: float }
5928 { $description
5929     "Set volume for audio stream (1.0 is max level)" } ;
5930
5931 HELP: set-audio-stream-pitch
5932 { $values
5933     stream: AudioStream
5934     pitch: float }
5935 { $description
5936     "Set pitch for audio stream (1.0 is base level)" } ;
5937
5938 HELP: set-audio-stream-pan
5939 { $values
5940     stream: AudioStream
5941     pan: float }
5942 { $description
5943     "Set pan for audio stream (0.5 is center)" } ;
5944
5945 HELP: set-audio-stream-buffer-size-default
5946 { $values
5947     size: int }
5948 { $description
5949     "Default size for new audio streams" } ;
5950
5951 HELP: set-audio-stream-callback
5952 { $values
5953     stream: AudioStream
5954     callback: AudioCallback }
5955 { $description
5956     "Audio thread callback to request new data" } ;
5957
5958
5959 HELP: attach-audio-stream-processor
5960     { $values
5961         stream: AudioStream
5962         processor: AudioCallback }
5963 { $description
5964     "Attach audio stream processor to stream" } ;
5965
5966 HELP: detach-audio-stream-processor
5967     { $values
5968         stream: AudioStream
5969         processor: AudioCallback }
5970 { $description
5971     "Detach audio stream processor from stream" } ;
5972
5973
5974 HELP: attach-audio-mixed-processor
5975 { $values
5976     processor: AudioCallback }
5977 { $description
5978     "Attach audio stream processor to the entire audio pipeline" } ;
5979
5980 HELP: detach-audio-mixed-processor
5981 { $values
5982     processor: AudioCallback }
5983 { $description
5984     "Detach audio stream processor from the entire audio pipeline" } ;
5985
5986
5987 ARTICLE: "raylib" "Raylib"
5988     { $heading About Raylib  }
5989         Raylib attempts to be a simple and easy-to-use library for writing
5990         graphical applications.
5991
5992     { $subheading Main Website }
5993         { $url "https://www.raylib.com/index.html" }
5994
5995     { $subheading Raylib Cheat Sheet }
5996         { $url "https://www.raylib.com/cheatsheet/cheatsheet.html" }
5997
5998     { $heading About These Bindings }
5999         The { $vocab-link "raylib" } vocabulary provides bindings to
6000         Raylib 4.5. The vocab is fully documented using Factor's help
6001         system. So, you can reliably use the browser to find information about
6002         the various functions in raylib.
6003
6004     { $warning
6005         Use caution when attempting to leverage concurrency features.
6006         Raylib and the UI tools can interact in nasty ways: { $link "raylib-and-threads" } .
6007     }
6008 ;
6009
6010 ARTICLE: "raylib-and-threads" "Raylib and Threads"
6011     Factor features a powerful UI tool kit. However, Raylibe is designed
6012     under a single threaded model. Running a Raylib program will lock up
6013     the UI until the program finishes. However, attempting to use
6014     concurrency and threading features can corrupt the UI if done wrong.
6015 ;
6016
6017 ABOUT: "raylib"