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