-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathfunctions.rb
More file actions
1549 lines (1034 loc) · 70.1 KB
/
functions.rb
File metadata and controls
1549 lines (1034 loc) · 70.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
module Raylib
# Initialize window and OpenGL context
attach_function :init_window, :InitWindow, [:int, :int, :pointer], :void
# Check if KEY_ESCAPE pressed or Close icon pressed
attach_function :window_should_close, :WindowShouldClose, [], :bool
# Close window and unload OpenGL context
attach_function :close_window, :CloseWindow, [], :void
# Check if window has been initialized successfully
attach_function :is_window_valid, :IsWindowValid, [], :bool
# Check if window is currently fullscreen
attach_function :is_window_fullscreen, :IsWindowFullscreen, [], :bool
# Check if window is currently hidden (only PLATFORM_DESKTOP)
attach_function :is_window_hidden, :IsWindowHidden, [], :bool
# Check if window is currently minimized (only PLATFORM_DESKTOP)
attach_function :is_window_minimized, :IsWindowMinimized, [], :bool
# Check if window is currently maximized (only PLATFORM_DESKTOP)
attach_function :is_window_maximized, :IsWindowMaximized, [], :bool
# Check if window is currently focused (only PLATFORM_DESKTOP)
attach_function :is_window_focused, :IsWindowFocused, [], :bool
# Check if window has been resized last frame
attach_function :is_window_resized, :IsWindowResized, [], :bool
# Check if one specific window flag is enabled
attach_function :is_window_state, :IsWindowState, [:uint], :bool
# Set window configuration state using flags (only PLATFORM_DESKTOP)
attach_function :set_window_state, :SetWindowState, [:uint], :void
# Clear window configuration state flags
attach_function :clear_window_state, :ClearWindowState, [:uint], :void
# Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
attach_function :toggle_fullscreen, :ToggleFullscreen, [], :void
# Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
attach_function :maximize_window, :MaximizeWindow, [], :void
# Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
attach_function :minimize_window, :MinimizeWindow, [], :void
# Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
attach_function :restore_window, :RestoreWindow, [], :void
# Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)
attach_function :set_window_icon, :SetWindowIcon, [Image.by_value], :void
# Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
attach_function :set_window_icons, :SetWindowIcons, [:pointer, :int], :void
# Set title for window (only PLATFORM_DESKTOP)
attach_function :set_window_title, :SetWindowTitle, [:pointer], :void
# Set window position on screen (only PLATFORM_DESKTOP)
attach_function :set_window_position, :SetWindowPosition, [:int, :int], :void
# Set monitor for the current window (fullscreen mode)
attach_function :set_window_monitor, :SetWindowMonitor, [:int], :void
# Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
attach_function :set_window_min_size, :SetWindowMinSize, [:int, :int], :void
# Set window dimensions
attach_function :set_window_size, :SetWindowSize, [:int, :int], :void
# Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
attach_function :set_window_opacity, :SetWindowOpacity, [:float], :void
# Get native window handle
attach_function :get_window_handle, :GetWindowHandle, [], :pointer
# Get current screen width
attach_function :get_screen_width, :GetScreenWidth, [], :int
# Get current screen height
attach_function :get_screen_height, :GetScreenHeight, [], :int
# Get current render width (it considers HiDPI)
attach_function :get_render_width, :GetRenderWidth, [], :int
# Get current render height (it considers HiDPI)
attach_function :get_render_height, :GetRenderHeight, [], :int
# Get number of connected monitors
attach_function :get_monitor_count, :GetMonitorCount, [], :int
# Get current connected monitor
attach_function :get_current_monitor, :GetCurrentMonitor, [], :int
# Get specified monitor position
attach_function :get_monitor_position, :GetMonitorPosition, [:int], Vector2.by_value
# Get specified monitor width (current video mode used by monitor)
attach_function :get_monitor_width, :GetMonitorWidth, [:int], :int
# Get specified monitor height (current video mode used by monitor)
attach_function :get_monitor_height, :GetMonitorHeight, [:int], :int
# Get specified monitor physical width in millimetres
attach_function :get_monitor_physical_width, :GetMonitorPhysicalWidth, [:int], :int
# Get specified monitor physical height in millimetres
attach_function :get_monitor_physical_height, :GetMonitorPhysicalHeight, [:int], :int
# Get specified monitor refresh rate
attach_function :get_monitor_refresh_rate, :GetMonitorRefreshRate, [:int], :int
# Get window position XY on monitor
attach_function :get_window_position, :GetWindowPosition, [], Vector2.by_value
# Get window scale DPI factor
attach_function :get_window_scale_dpi, :GetWindowScaleDPI, [], Vector2.by_value
# Get the human-readable, UTF-8 encoded name of the primary monitor
attach_function :get_monitor_name, :GetMonitorName, [:int], :pointer
# Set clipboard text content
attach_function :set_clipboard_text, :SetClipboardText, [:pointer], :void
# Get clipboard text content
attach_function :get_clipboard_text, :GetClipboardText, [], :pointer
# Enable waiting for events on EndDrawing(), no automatic event polling
attach_function :enable_event_waiting, :EnableEventWaiting, [], :void
# Disable waiting for events on EndDrawing(), automatic events polling
attach_function :disable_event_waiting, :DisableEventWaiting, [], :void
# Swap back buffer with front buffer (screen drawing)
attach_function :swap_screen_buffer, :SwapScreenBuffer, [], :void
# Register all input events
attach_function :poll_input_events, :PollInputEvents, [], :void
# Wait for some time (halt program execution)
attach_function :wait_time, :WaitTime, [:double], :void
# Shows cursor
attach_function :show_cursor, :ShowCursor, [], :void
# Hides cursor
attach_function :hide_cursor, :HideCursor, [], :void
# Check if cursor is not visible
attach_function :is_cursor_hidden, :IsCursorHidden, [], :bool
# Enables cursor (unlock cursor)
attach_function :enable_cursor, :EnableCursor, [], :void
# Disables cursor (lock cursor)
attach_function :disable_cursor, :DisableCursor, [], :void
# Check if cursor is on the screen
attach_function :is_cursor_on_screen, :IsCursorOnScreen, [], :bool
# Set background color (framebuffer clear color)
attach_function :clear_background, :ClearBackground, [Color.by_value], :void
# Setup canvas (framebuffer) to start drawing
attach_function :begin_drawing, :BeginDrawing, [], :void
# End canvas drawing and swap buffers (double buffering)
attach_function :end_drawing, :EndDrawing, [], :void
# Begin 2D mode with custom camera (2D)
attach_function :begin_mode_2d, :BeginMode2D, [Camera2D.by_value], :void
# Ends 2D mode with custom camera
attach_function :end_mode_2d, :EndMode2D, [], :void
# Begin 3D mode with custom camera (3D)
attach_function :begin_mode_3d, :BeginMode3D, [Camera3D.by_value], :void
# Ends 3D mode and returns to default 2D orthographic mode
attach_function :end_mode_3d, :EndMode3D, [], :void
# Begin drawing to render texture
attach_function :begin_texture_mode, :BeginTextureMode, [RenderTexture2D.by_value], :void
# Ends drawing to render texture
attach_function :end_texture_mode, :EndTextureMode, [], :void
# Begin custom shader drawing
attach_function :begin_shader_mode, :BeginShaderMode, [Shader.by_value], :void
# End custom shader drawing (use default shader)
attach_function :end_shader_mode, :EndShaderMode, [], :void
# Begin blending mode (alpha, additive, multiplied, subtract, custom)
attach_function :begin_blend_mode, :BeginBlendMode, [:int], :void
# End blending mode (reset to default: alpha blending)
attach_function :end_blend_mode, :EndBlendMode, [], :void
# Begin scissor mode (define screen area for following drawing)
attach_function :begin_scissor_mode, :BeginScissorMode, [:int, :int, :int, :int], :void
# End scissor mode
attach_function :end_scissor_mode, :EndScissorMode, [], :void
# Begin stereo rendering (requires VR simulator)
attach_function :begin_vr_stereo_mode, :BeginVrStereoMode, [VrStereoConfig.by_value], :void
# End stereo rendering (requires VR simulator)
attach_function :end_vr_stereo_mode, :EndVrStereoMode, [], :void
# Load VR stereo config for VR simulator device parameters
attach_function :load_vr_stereo_config, :LoadVrStereoConfig, [VrDeviceInfo.by_value], VrStereoConfig.by_value
# Unload VR stereo config
attach_function :unload_vr_stereo_config, :UnloadVrStereoConfig, [VrStereoConfig.by_value], :void
# Load shader from files and bind default locations
attach_function :load_shader, :LoadShader, [:pointer, :pointer], Shader.by_value
# Load shader from code strings and bind default locations
attach_function :load_shader_from_memory, :LoadShaderFromMemory, [:pointer, :pointer], Shader.by_value
# Check if a shader is ready
attach_function :is_shader_valid, :IsShaderValid, [Shader.by_value], :bool
# Get shader uniform location
attach_function :get_shader_location, :GetShaderLocation, [Shader.by_value, :pointer], :int
# Get shader attribute location
attach_function :get_shader_location_attrib, :GetShaderLocationAttrib, [Shader.by_value, :pointer], :int
# Set shader uniform value
attach_function :set_shader_value, :SetShaderValue, [Shader.by_value, :int, :pointer, :int], :void
# Set shader uniform value vector
attach_function :set_shader_value_v, :SetShaderValueV, [Shader.by_value, :int, :pointer, :int, :int], :void
# Set shader uniform value (matrix 4x4)
attach_function :set_shader_value_matrix, :SetShaderValueMatrix, [Shader.by_value, :int, Matrix.by_value], :void
# Set shader uniform value for texture (sampler2d)
attach_function :set_shader_value_texture, :SetShaderValueTexture, [Shader.by_value, :int, Texture2D.by_value], :void
# Unload shader from GPU memory (VRAM)
attach_function :unload_shader, :UnloadShader, [Shader.by_value], :void
# Get a ray trace from mouse position
attach_function :get_mouse_ray, :GetMouseRay, [Vector2.by_value, Camera.by_value], Ray.by_value
# Get camera transform matrix (view matrix)
attach_function :get_camera_matrix, :GetCameraMatrix, [Camera.by_value], Matrix.by_value
# Get camera 2d transform matrix
attach_function :get_camera_matrix_2d, :GetCameraMatrix2D, [Camera2D.by_value], Matrix.by_value
# Get the screen space position for a 3d world space position
attach_function :get_world_to_screen, :GetWorldToScreen, [Vector3.by_value, Camera.by_value], Vector2.by_value
# Get the world space position for a 2d camera screen space position
attach_function :get_screen_to_world_2d, :GetScreenToWorld2D, [Vector2.by_value, Camera2D.by_value], Vector2.by_value
# Get size position for a 3d world space position
attach_function :get_world_to_screen_ex, :GetWorldToScreenEx, [Vector3.by_value, Camera.by_value, :int, :int], Vector2.by_value
# Get the screen space position for a 2d camera world space position
attach_function :get_world_to_screen_2d, :GetWorldToScreen2D, [Vector2.by_value, Camera2D.by_value], Vector2.by_value
# Set target FPS (maximum)
attach_function :set_target_fps, :SetTargetFPS, [:int], :void
# Get current FPS
attach_function :get_fps, :GetFPS, [], :int
# Get time in seconds for last frame drawn (delta time)
attach_function :get_frame_time, :GetFrameTime, [], :float
# Get elapsed time in seconds since InitWindow()
attach_function :get_time, :GetTime, [], :double
# Get a random value between min and max (both included)
attach_function :get_random_value, :GetRandomValue, [:int, :int], :int
# Set the seed for the random number generator
attach_function :set_random_seed, :SetRandomSeed, [:uint], :void
# Takes a screenshot of current screen (filename extension defines format)
attach_function :take_screenshot, :TakeScreenshot, [:pointer], :void
# Setup init configuration flags (view FLAGS)
attach_function :set_config_flags, :SetConfigFlags, [:uint], :void
# Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)
attach_function :trace_log, :TraceLog, [:int, :pointer, :varargs], :void
# Set the current threshold (minimum) log level
attach_function :set_trace_log_level, :SetTraceLogLevel, [:int], :void
# Internal memory allocator
attach_function :mem_alloc, :MemAlloc, [:uint], :pointer
# Internal memory reallocator
attach_function :mem_realloc, :MemRealloc, [:pointer, :uint], :pointer
# Internal memory free
attach_function :mem_free, :MemFree, [:pointer], :void
# Open URL with default system browser (if available)
attach_function :open_url, :OpenURL, [:pointer], :void
# Set custom trace log
attach_function :set_trace_log_callback, :SetTraceLogCallback, [:TraceLogCallback], :void
# Set custom file binary data loader
attach_function :set_load_file_data_callback, :SetLoadFileDataCallback, [:LoadFileDataCallback], :void
# Set custom file binary data saver
attach_function :set_save_file_data_callback, :SetSaveFileDataCallback, [:SaveFileDataCallback], :void
# Set custom file text data loader
attach_function :set_load_file_text_callback, :SetLoadFileTextCallback, [:LoadFileTextCallback], :void
# Set custom file text data saver
attach_function :set_save_file_text_callback, :SetSaveFileTextCallback, [:SaveFileTextCallback], :void
# Load file data as byte array (read)
attach_function :load_file_data, :LoadFileData, [:pointer, :pointer], :pointer
# Unload file data allocated by LoadFileData()
attach_function :unload_file_data, :UnloadFileData, [:pointer], :void
# Save data to file from byte array (write), returns true on success
attach_function :save_file_data, :SaveFileData, [:pointer, :pointer, :uint], :bool
# Export data to code (.h), returns true on success
attach_function :export_data_as_code, :ExportDataAsCode, [:pointer, :uint, :pointer], :bool
# Load text data from file (read), returns a '\0' terminated string
attach_function :load_file_text, :LoadFileText, [:pointer], :pointer
# Unload file text data allocated by LoadFileText()
attach_function :unload_file_text, :UnloadFileText, [:pointer], :void
# Save text data to file (write), string must be '\0' terminated, returns true on success
attach_function :save_file_text, :SaveFileText, [:pointer, :pointer], :bool
# Check if file exists
attach_function :file_exists, :FileExists, [:pointer], :bool
# Check if a directory path exists
attach_function :directory_exists, :DirectoryExists, [:pointer], :bool
# Check file extension (including point: .png, .wav)
attach_function :is_file_extension, :IsFileExtension, [:pointer, :pointer], :bool
# Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)
attach_function :get_file_length, :GetFileLength, [:pointer], :int
# Get pointer to extension for a filename string (includes dot: '.png')
attach_function :get_file_extension, :GetFileExtension, [:pointer], :pointer
# Get pointer to filename for a path string
attach_function :get_file_name, :GetFileName, [:pointer], :pointer
# Get filename string without extension (uses static string)
attach_function :get_file_name_without_ext, :GetFileNameWithoutExt, [:pointer], :pointer
# Get full path for a given fileName with path (uses static string)
attach_function :get_directory_path, :GetDirectoryPath, [:pointer], :pointer
# Get previous directory path for a given path (uses static string)
attach_function :get_prev_directory_path, :GetPrevDirectoryPath, [:pointer], :pointer
# Get current working directory (uses static string)
attach_function :get_working_directory, :GetWorkingDirectory, [], :pointer
# Get the directory if the running application (uses static string)
attach_function :get_application_directory, :GetApplicationDirectory, [], :pointer
# Change working directory, return true on success
attach_function :change_directory, :ChangeDirectory, [:pointer], :bool
# Check if a given path is a file or a directory
attach_function :is_path_file, :IsPathFile, [:pointer], :bool
# Load directory filepaths
attach_function :load_directory_files, :LoadDirectoryFiles, [:pointer], FilePathList.by_value
# Load directory filepaths with extension filtering and recursive directory scan
attach_function :load_directory_files_ex, :LoadDirectoryFilesEx, [:pointer, :pointer, :bool], FilePathList.by_value
# Unload filepaths
attach_function :unload_directory_files, :UnloadDirectoryFiles, [FilePathList.by_value], :void
# Check if a file has been dropped into window
attach_function :is_file_dropped, :IsFileDropped, [], :bool
# Load dropped filepaths
attach_function :load_dropped_files, :LoadDroppedFiles, [], FilePathList.by_value
# Unload dropped filepaths
attach_function :unload_dropped_files, :UnloadDroppedFiles, [FilePathList.by_value], :void
# Get file modification time (last write time)
attach_function :get_file_mod_time, :GetFileModTime, [:pointer], :long
# Compress data (DEFLATE algorithm), memory must be MemFree()
attach_function :compress_data, :CompressData, [:pointer, :int, :pointer], :pointer
# Decompress data (DEFLATE algorithm), memory must be MemFree()
attach_function :decompress_data, :DecompressData, [:pointer, :int, :pointer], :pointer
# Encode data to Base64 string, memory must be MemFree()
attach_function :encode_data_base64, :EncodeDataBase64, [:pointer, :int, :pointer], :pointer
# Decode Base64 string data, memory must be MemFree()
attach_function :decode_data_base64, :DecodeDataBase64, [:pointer, :pointer], :pointer
# Check if a key has been pressed once
attach_function :is_key_pressed, :IsKeyPressed, [:int], :bool
# Check if a key is being pressed
attach_function :is_key_down, :IsKeyDown, [:int], :bool
# Check if a key has been released once
attach_function :is_key_released, :IsKeyReleased, [:int], :bool
# Check if a key is NOT being pressed
attach_function :is_key_up, :IsKeyUp, [:int], :bool
# Set a custom key to exit program (default is ESC)
attach_function :set_exit_key, :SetExitKey, [:int], :void
# Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
attach_function :get_key_pressed, :GetKeyPressed, [], :int
# Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty
attach_function :get_char_pressed, :GetCharPressed, [], :int
# Check if a gamepad is available
attach_function :is_gamepad_available, :IsGamepadAvailable, [:int], :bool
# Get gamepad internal name id
attach_function :get_gamepad_name, :GetGamepadName, [:int], :string
# Check if a gamepad button has been pressed once
attach_function :is_gamepad_button_pressed, :IsGamepadButtonPressed, [:int, :int], :bool
# Check if a gamepad button is being pressed
attach_function :is_gamepad_button_down, :IsGamepadButtonDown, [:int, :int], :bool
# Check if a gamepad button has been released once
attach_function :is_gamepad_button_released, :IsGamepadButtonReleased, [:int, :int], :bool
# Check if a gamepad button is NOT being pressed
attach_function :is_gamepad_button_up, :IsGamepadButtonUp, [:int, :int], :bool
# Get the last gamepad button pressed
attach_function :get_gamepad_button_pressed, :GetGamepadButtonPressed, [], :int
# Get gamepad axis count for a gamepad
attach_function :get_gamepad_axis_count, :GetGamepadAxisCount, [:int], :int
# Get axis movement value for a gamepad axis
attach_function :get_gamepad_axis_movement, :GetGamepadAxisMovement, [:int, :int], :float
# Set internal gamepad mappings (SDL_GameControllerDB)
attach_function :set_gamepad_mappings, :SetGamepadMappings, [:pointer], :int
# Check if a mouse button has been pressed once
attach_function :is_mouse_button_pressed, :IsMouseButtonPressed, [:int], :bool
# Check if a mouse button is being pressed
attach_function :is_mouse_button_down, :IsMouseButtonDown, [:int], :bool
# Check if a mouse button has been released once
attach_function :is_mouse_button_released, :IsMouseButtonReleased, [:int], :bool
# Check if a mouse button is NOT being pressed
attach_function :is_mouse_button_up, :IsMouseButtonUp, [:int], :bool
# Get mouse position X
attach_function :get_mouse_x, :GetMouseX, [], :int
# Get mouse position Y
attach_function :get_mouse_y, :GetMouseY, [], :int
# Get mouse position XY
attach_function :get_mouse_position, :GetMousePosition, [], Vector2.by_value
# Get mouse delta between frames
attach_function :get_mouse_delta, :GetMouseDelta, [], Vector2.by_value
# Set mouse position XY
attach_function :set_mouse_position, :SetMousePosition, [:int, :int], :void
# Set mouse offset
attach_function :set_mouse_offset, :SetMouseOffset, [:int, :int], :void
# Set mouse scaling
attach_function :set_mouse_scale, :SetMouseScale, [:float, :float], :void
# Get mouse wheel movement for X or Y, whichever is larger
attach_function :get_mouse_wheel_move, :GetMouseWheelMove, [], :float
# Get mouse wheel movement for both X and Y
attach_function :get_mouse_wheel_move_v, :GetMouseWheelMoveV, [], Vector2.by_value
# Set mouse cursor
attach_function :set_mouse_cursor, :SetMouseCursor, [:int], :void
# Get touch position X for touch point 0 (relative to screen size)
attach_function :get_touch_x, :GetTouchX, [], :int
# Get touch position Y for touch point 0 (relative to screen size)
attach_function :get_touch_y, :GetTouchY, [], :int
# Get touch position XY for a touch point index (relative to screen size)
attach_function :get_touch_position, :GetTouchPosition, [:int], Vector2.by_value
# Get touch point identifier for given index
attach_function :get_touch_point_id, :GetTouchPointId, [:int], :int
# Get number of touch points
attach_function :get_touch_point_count, :GetTouchPointCount, [], :int
# Enable a set of gestures using flags
attach_function :set_gestures_enabled, :SetGesturesEnabled, [:uint], :void
# Check if a gesture have been detected
attach_function :is_gesture_detected, :IsGestureDetected, [:int], :bool
# Get latest detected gesture
attach_function :get_gesture_detected, :GetGestureDetected, [], :int
# Get gesture hold time in milliseconds
attach_function :get_gesture_hold_duration, :GetGestureHoldDuration, [], :float
# Get gesture drag vector
attach_function :get_gesture_drag_vector, :GetGestureDragVector, [], Vector2.by_value
# Get gesture drag angle
attach_function :get_gesture_drag_angle, :GetGestureDragAngle, [], :float
# Get gesture pinch delta
attach_function :get_gesture_pinch_vector, :GetGesturePinchVector, [], Vector2.by_value
# Get gesture pinch angle
attach_function :get_gesture_pinch_angle, :GetGesturePinchAngle, [], :float
# Update camera position for selected mode
attach_function :update_camera, :UpdateCamera, [:pointer, :int], :void
# Update camera movement/rotation
attach_function :update_camera_pro, :UpdateCameraPro, [:pointer, Vector3.by_value, Vector3.by_value, :float], :void
# Set texture and rectangle to be used on shapes drawing
attach_function :set_shapes_texture, :SetShapesTexture, [Texture2D.by_value, Rectangle.by_value], :void
# Draw a pixel
attach_function :draw_pixel, :DrawPixel, [:int, :int, Color.by_value], :void
# Draw a pixel (Vector version)
attach_function :draw_pixel_v, :DrawPixelV, [Vector2.by_value, Color.by_value], :void
# Draw a line
attach_function :draw_line, :DrawLine, [:int, :int, :int, :int, Color.by_value], :void
# Draw a line (Vector version)
attach_function :draw_line_v, :DrawLineV, [Vector2.by_value, Vector2.by_value, Color.by_value], :void
# Draw a line defining thickness
attach_function :draw_line_ex, :DrawLineEx, [Vector2.by_value, Vector2.by_value, :float, Color.by_value], :void
# Draw a line using cubic-bezier curves in-out
attach_function :draw_line_bezier, :DrawLineBezier, [Vector2.by_value, Vector2.by_value, :float, Color.by_value], :void
# Draw line using quadratic bezier curves with a control point
attach_function :draw_spline_bezier_quadratic, :DrawSplineBezierQuadratic, [Vector2.by_value, Vector2.by_value, Vector2.by_value, :float, Color.by_value], :void
# Draw line using cubic bezier curves with 2 control points
attach_function :draw_spline_bezier_cubic, :DrawSplineBezierCubic, [Vector2.by_value, Vector2.by_value, Vector2.by_value, Vector2.by_value, :float, Color.by_value], :void
# Draw lines sequence
attach_function :draw_line_strip, :DrawLineStrip, [:pointer, :int, Color.by_value], :void
# Draw a color-filled circle
attach_function :draw_circle, :DrawCircle, [:int, :int, :float, Color.by_value], :void
# Draw a piece of a circle
attach_function :draw_circle_sector, :DrawCircleSector, [Vector2.by_value, :float, :float, :float, :int, Color.by_value], :void
# Draw circle sector outline
attach_function :draw_circle_sector_lines, :DrawCircleSectorLines, [Vector2.by_value, :float, :float, :float, :int, Color.by_value], :void
# Draw a gradient-filled circle
attach_function :draw_circle_gradient, :DrawCircleGradient, [:int, :int, :float, Color.by_value, Color.by_value], :void
# Draw a color-filled circle (Vector version)
attach_function :draw_circle_v, :DrawCircleV, [Vector2.by_value, :float, Color.by_value], :void
# Draw circle outline
attach_function :draw_circle_lines, :DrawCircleLines, [:int, :int, :float, Color.by_value], :void
# Draw ellipse
attach_function :draw_ellipse, :DrawEllipse, [:int, :int, :float, :float, Color.by_value], :void
# Draw ellipse outline
attach_function :draw_ellipse_lines, :DrawEllipseLines, [:int, :int, :float, :float, Color.by_value], :void
# Draw ring
attach_function :draw_ring, :DrawRing, [Vector2.by_value, :float, :float, :float, :float, :int, Color.by_value], :void
# Draw ring outline
attach_function :draw_ring_lines, :DrawRingLines, [Vector2.by_value, :float, :float, :float, :float, :int, Color.by_value], :void
# Draw a color-filled rectangle
attach_function :draw_rectangle, :DrawRectangle, [:int, :int, :int, :int, Color.by_value], :void
# Draw a color-filled rectangle (Vector version)
attach_function :draw_rectangle_v, :DrawRectangleV, [Vector2.by_value, Vector2.by_value, Color.by_value], :void
# Draw a color-filled rectangle
attach_function :draw_rectangle_rec, :DrawRectangleRec, [Rectangle.by_value, Color.by_value], :void
# Draw a color-filled rectangle with pro parameters
attach_function :draw_rectangle_pro, :DrawRectanglePro, [Rectangle.by_value, Vector2.by_value, :float, Color.by_value], :void
# Draw a vertical-gradient-filled rectangle
attach_function :draw_rectangle_gradient_v, :DrawRectangleGradientV, [:int, :int, :int, :int, Color.by_value, Color.by_value], :void
# Draw a horizontal-gradient-filled rectangle
attach_function :draw_rectangle_gradient_h, :DrawRectangleGradientH, [:int, :int, :int, :int, Color.by_value, Color.by_value], :void
# Draw a gradient-filled rectangle with custom vertex colors
attach_function :draw_rectangle_gradient_ex, :DrawRectangleGradientEx, [Rectangle.by_value, Color.by_value, Color.by_value, Color.by_value, Color.by_value], :void
# Draw rectangle outline
attach_function :draw_rectangle_lines, :DrawRectangleLines, [:int, :int, :int, :int, Color.by_value], :void
# Draw rectangle outline with extended parameters
attach_function :draw_rectangle_lines_ex, :DrawRectangleLinesEx, [Rectangle.by_value, :float, Color.by_value], :void
# Draw rectangle with rounded edges
attach_function :draw_rectangle_rounded, :DrawRectangleRounded, [Rectangle.by_value, :float, :int, Color.by_value], :void
# Draw rectangle with rounded edges outline
attach_function :draw_rectangle_rounded_lines, :DrawRectangleRoundedLines, [Rectangle.by_value, :float, :int, :float, Color.by_value], :void
# Draw a color-filled triangle (vertex in counter-clockwise order!)
attach_function :draw_triangle, :DrawTriangle, [Vector2.by_value, Vector2.by_value, Vector2.by_value, Color.by_value], :void
# Draw triangle outline (vertex in counter-clockwise order!)
attach_function :draw_triangle_lines, :DrawTriangleLines, [Vector2.by_value, Vector2.by_value, Vector2.by_value, Color.by_value], :void
# Draw a triangle fan defined by points (first vertex is the center)
attach_function :draw_triangle_fan, :DrawTriangleFan, [:pointer, :int, Color.by_value], :void
# Draw a triangle strip defined by points
attach_function :draw_triangle_strip, :DrawTriangleStrip, [:pointer, :int, Color.by_value], :void
# Draw a regular polygon (Vector version)
attach_function :draw_poly, :DrawPoly, [Vector2.by_value, :int, :float, :float, Color.by_value], :void
# Draw a polygon outline of n sides
attach_function :draw_poly_lines, :DrawPolyLines, [Vector2.by_value, :int, :float, :float, Color.by_value], :void
# Draw a polygon outline of n sides with extended parameters
attach_function :draw_poly_lines_ex, :DrawPolyLinesEx, [Vector2.by_value, :int, :float, :float, :float, Color.by_value], :void
# Check collision between two rectangles
attach_function :check_collision_recs, :CheckCollisionRecs, [Rectangle.by_value, Rectangle.by_value], :bool
# Check collision between two circles
attach_function :check_collision_circles, :CheckCollisionCircles, [Vector2.by_value, :float, Vector2.by_value, :float], :bool
# Check collision between circle and rectangle
attach_function :check_collision_circle_rec, :CheckCollisionCircleRec, [Vector2.by_value, :float, Rectangle.by_value], :bool
# Check if point is inside rectangle
attach_function :check_collision_point_rec, :CheckCollisionPointRec, [Vector2.by_value, Rectangle.by_value], :bool
# Check if point is inside circle
attach_function :check_collision_point_circle, :CheckCollisionPointCircle, [Vector2.by_value, Vector2.by_value, :float], :bool
# Check if point is inside a triangle
attach_function :check_collision_point_triangle, :CheckCollisionPointTriangle, [Vector2.by_value, Vector2.by_value, Vector2.by_value, Vector2.by_value], :bool
# Check if point is within a polygon described by array of vertices
attach_function :check_collision_point_poly, :CheckCollisionPointPoly, [Vector2.by_value, :pointer, :int], :bool
# Check the collision between two lines defined by two points each, returns collision point by reference
attach_function :check_collision_lines, :CheckCollisionLines, [Vector2.by_value, Vector2.by_value, Vector2.by_value, Vector2.by_value, :pointer], :bool
# Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
attach_function :check_collision_point_line, :CheckCollisionPointLine, [Vector2.by_value, Vector2.by_value, Vector2.by_value, :int], :bool
# Get collision rectangle for two rectangles collision
attach_function :get_collision_rec, :GetCollisionRec, [Rectangle.by_value, Rectangle.by_value], Rectangle.by_value
# Load image from file into CPU memory (RAM)
attach_function :load_image, :LoadImage, [:pointer], Image.by_value
# Load image from RAW file data
attach_function :load_image_raw, :LoadImageRaw, [:pointer, :int, :int, :int, :int], Image.by_value
# Load image sequence from file (frames appended to image.data)
attach_function :load_image_anim, :LoadImageAnim, [:pointer, :pointer], Image.by_value
# Load image from memory buffer, fileType refers to extension: i.e. '.png'
attach_function :load_image_from_memory, :LoadImageFromMemory, [:pointer, :pointer, :int], Image.by_value
# Load image from GPU texture data
attach_function :load_image_from_texture, :LoadImageFromTexture, [Texture2D.by_value], Image.by_value
# Load image from screen buffer and (screenshot)
attach_function :load_image_from_screen, :LoadImageFromScreen, [], Image.by_value
# Check if an image is ready
attach_function :is_image_valid, :IsImageValid, [Image.by_value], :bool
# Unload image from CPU memory (RAM)
attach_function :unload_image, :UnloadImage, [Image.by_value], :void
# Export image data to file, returns true on success
attach_function :export_image, :ExportImage, [Image.by_value, :pointer], :bool
# Export image as code file defining an array of bytes, returns true on success
attach_function :export_image_as_code, :ExportImageAsCode, [Image.by_value, :pointer], :bool
# Generate image: plain color
attach_function :gen_image_color, :GenImageColor, [:int, :int, Color.by_value], Image.by_value
# Generate image: linear gradient
attach_function :gen_image_gradient_v, :GenImageGradientLinear, [:int, :int, :int, Color.by_value, Color.by_value], Image.by_value
# Generate image: radial gradient
attach_function :gen_image_gradient_radial, :GenImageGradientRadial, [:int, :int, :float, Color.by_value, Color.by_value], Image.by_value
# Generate image: checked
attach_function :gen_image_checked, :GenImageChecked, [:int, :int, :int, :int, Color.by_value, Color.by_value], Image.by_value
# Generate image: white noise
attach_function :gen_image_white_noise, :GenImageWhiteNoise, [:int, :int, :float], Image.by_value
# Generate image: perlin noise
attach_function :gen_image_perlin_noise, :GenImagePerlinNoise, [:int, :int, :int, :int, :float], Image.by_value
# Generate image: cellular algorithm, bigger tileSize means bigger cells
attach_function :gen_image_cellular, :GenImageCellular, [:int, :int, :int], Image.by_value
# Generate image: grayscale image from text data
attach_function :gen_image_text, :GenImageText, [:int, :int, :pointer], Image.by_value
# Create an image duplicate (useful for transformations)
attach_function :image_copy, :ImageCopy, [Image.by_value], Image.by_value
# Create an image from another image piece
attach_function :image_from_image, :ImageFromImage, [Image.by_value, Rectangle.by_value], Image.by_value
# Create an image from text (default font)
attach_function :image_text, :ImageText, [:pointer, :int, Color.by_value], Image.by_value
# Create an image from text (custom sprite font)
attach_function :image_text_ex, :ImageTextEx, [Font.by_value, :pointer, :float, :float, Color.by_value], Image.by_value
# Convert image data to desired format
attach_function :image_format, :ImageFormat, [:pointer, :int], :void
# Convert image to POT (power-of-two)
attach_function :image_to_pot, :ImageToPOT, [:pointer, Color.by_value], :void
# Crop an image to a defined rectangle
attach_function :image_crop, :ImageCrop, [:pointer, Rectangle.by_value], :void
# Crop image depending on alpha value
attach_function :image_alpha_crop, :ImageAlphaCrop, [:pointer, :float], :void
# Clear alpha channel to desired color
attach_function :image_alpha_clear, :ImageAlphaClear, [:pointer, Color.by_value, :float], :void
# Apply alpha mask to image
attach_function :image_alpha_mask, :ImageAlphaMask, [:pointer, Image.by_value], :void
# Premultiply alpha channel
attach_function :image_alpha_premultiply, :ImageAlphaPremultiply, [:pointer], :void
# Apply Gaussian blur using a box blur approximation
attach_function :image_blur_gaussian, :ImageBlurGaussian, [:pointer, :int], :void
# Resize image (Bicubic scaling algorithm)
attach_function :image_resize, :ImageResize, [:pointer, :int, :int], :void
# Resize image (Nearest-Neighbor scaling algorithm)
attach_function :image_resize_nn, :ImageResizeNN, [:pointer, :int, :int], :void
# Resize canvas and fill with color
attach_function :image_resize_canvas, :ImageResizeCanvas, [:pointer, :int, :int, :int, :int, Color.by_value], :void
# Compute all mipmap levels for a provided image
attach_function :image_mipmaps, :ImageMipmaps, [:pointer], :void
# Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
attach_function :image_dither, :ImageDither, [:pointer, :int, :int, :int, :int], :void
# Flip image vertically
attach_function :image_flip_vertical, :ImageFlipVertical, [:pointer], :void
# Flip image horizontally
attach_function :image_flip_horizontal, :ImageFlipHorizontal, [:pointer], :void
# Rotate image clockwise 90deg
attach_function :image_rotate_cw, :ImageRotateCW, [:pointer], :void
# Rotate image counter-clockwise 90deg
attach_function :image_rotate_ccw, :ImageRotateCCW, [:pointer], :void
# Modify image color: tint
attach_function :image_color_tint, :ImageColorTint, [:pointer, Color.by_value], :void
# Modify image color: invert
attach_function :image_color_invert, :ImageColorInvert, [:pointer], :void
# Modify image color: grayscale
attach_function :image_color_grayscale, :ImageColorGrayscale, [:pointer], :void
# Modify image color: contrast (-100 to 100)
attach_function :image_color_contrast, :ImageColorContrast, [:pointer, :float], :void
# Modify image color: brightness (-255 to 255)
attach_function :image_color_brightness, :ImageColorBrightness, [:pointer, :int], :void
# Modify image color: replace color
attach_function :image_color_replace, :ImageColorReplace, [:pointer, Color.by_value, Color.by_value], :void
# Load color data from image as a Color array (RGBA - 32bit)
attach_function :load_image_colors, :LoadImageColors, [Image.by_value], :pointer
# Load colors palette from image as a Color array (RGBA - 32bit)
attach_function :load_image_palette, :LoadImagePalette, [Image.by_value, :int, :pointer], :pointer
# Unload color data loaded with LoadImageColors()
attach_function :unload_image_colors, :UnloadImageColors, [:pointer], :void
# Unload colors palette loaded with LoadImagePalette()
attach_function :unload_image_palette, :UnloadImagePalette, [:pointer], :void
# Get image alpha border rectangle
attach_function :get_image_alpha_border, :GetImageAlphaBorder, [Image.by_value, :float], Rectangle.by_value
# Get image pixel color at (x, y) position
attach_function :get_image_color, :GetImageColor, [Image.by_value, :int, :int], Color.by_value
# Clear image background with given color
attach_function :image_clear_background, :ImageClearBackground, [:pointer, Color.by_value], :void
# Draw pixel within an image
attach_function :image_draw_pixel, :ImageDrawPixel, [:pointer, :int, :int, Color.by_value], :void
# Draw pixel within an image (Vector version)
attach_function :image_draw_pixel_v, :ImageDrawPixelV, [:pointer, Vector2.by_value, Color.by_value], :void
# Draw line within an image
attach_function :image_draw_line, :ImageDrawLine, [:pointer, :int, :int, :int, :int, Color.by_value], :void
# Draw line within an image (Vector version)
attach_function :image_draw_line_v, :ImageDrawLineV, [:pointer, Vector2.by_value, Vector2.by_value, Color.by_value], :void
# Draw a filled circle within an image
attach_function :image_draw_circle, :ImageDrawCircle, [:pointer, :int, :int, :int, Color.by_value], :void
# Draw a filled circle within an image (Vector version)
attach_function :image_draw_circle_v, :ImageDrawCircleV, [:pointer, Vector2.by_value, :int, Color.by_value], :void
# Draw circle outline within an image
attach_function :image_draw_circle_lines, :ImageDrawCircleLines, [:pointer, :int, :int, :int, Color.by_value], :void
# Draw circle outline within an image (Vector version)
attach_function :image_draw_circle_lines_v, :ImageDrawCircleLinesV, [:pointer, Vector2.by_value, :int, Color.by_value], :void
# Draw rectangle within an image
attach_function :image_draw_rectangle, :ImageDrawRectangle, [:pointer, :int, :int, :int, :int, Color.by_value], :void
# Draw rectangle within an image (Vector version)
attach_function :image_draw_rectangle_v, :ImageDrawRectangleV, [:pointer, Vector2.by_value, Vector2.by_value, Color.by_value], :void
# Draw rectangle within an image
attach_function :image_draw_rectangle_rec, :ImageDrawRectangleRec, [:pointer, Rectangle.by_value, Color.by_value], :void
# Draw rectangle lines within an image
attach_function :image_draw_rectangle_lines, :ImageDrawRectangleLines, [:pointer, Rectangle.by_value, :int, Color.by_value], :void
# Draw a source image within a destination image (tint applied to source)
attach_function :image_draw, :ImageDraw, [:pointer, Image.by_value, Rectangle.by_value, Rectangle.by_value, Color.by_value], :void
# Draw text (using default font) within an image (destination)
attach_function :image_draw_text, :ImageDrawText, [:pointer, :pointer, :int, :int, :int, Color.by_value], :void
# Draw text (custom sprite font) within an image (destination)
attach_function :image_draw_text_ex, :ImageDrawTextEx, [:pointer, Font.by_value, :pointer, Vector2.by_value, :float, :float, Color.by_value], :void
# Load texture from file into GPU memory (VRAM)
attach_function :load_texture, :LoadTexture, [:pointer], Texture2D.by_value
# Load texture from image data
attach_function :load_texture_from_image, :LoadTextureFromImage, [Image.by_value], Texture2D.by_value
# Load cubemap from image, multiple image cubemap layouts supported
attach_function :load_texture_cubemap, :LoadTextureCubemap, [Image.by_value, :int], TextureCubemap.by_value
# Load texture for rendering (framebuffer)
attach_function :load_render_texture, :LoadRenderTexture, [:int, :int], RenderTexture2D.by_value
# Check if a texture is ready
attach_function :is_texture_valid, :IsTextureValid, [Texture2D.by_value], :bool
# Unload texture from GPU memory (VRAM)
attach_function :unload_texture, :UnloadTexture, [Texture2D.by_value], :void
# Check if a render texture is ready
attach_function :is_render_texture_valid, :IsRenderTextureValid, [RenderTexture2D.by_value], :bool
# Unload render texture from GPU memory (VRAM)
attach_function :unload_render_texture, :UnloadRenderTexture, [RenderTexture2D.by_value], :void
# Update GPU texture with new data
attach_function :update_texture, :UpdateTexture, [Texture2D.by_value, :pointer], :void
# Update GPU texture rectangle with new data
attach_function :update_texture_rec, :UpdateTextureRec, [Texture2D.by_value, Rectangle.by_value, :pointer], :void
# Generate GPU mipmaps for a texture
attach_function :gen_texture_mipmaps, :GenTextureMipmaps, [:pointer], :void
# Set texture scaling filter mode
attach_function :set_texture_filter, :SetTextureFilter, [Texture2D.by_value, :int], :void
# Set texture wrapping mode
attach_function :set_texture_wrap, :SetTextureWrap, [Texture2D.by_value, :int], :void
# Draw a Texture2D
attach_function :draw_texture, :DrawTexture, [Texture2D.by_value, :int, :int, Color.by_value], :void
# Draw a Texture2D with position defined as Vector2
attach_function :draw_texture_v, :DrawTextureV, [Texture2D.by_value, Vector2.by_value, Color.by_value], :void
# Draw a Texture2D with extended parameters
attach_function :draw_texture_ex, :DrawTextureEx, [Texture2D.by_value, Vector2.by_value, :float, :float, Color.by_value], :void
# Draw a part of a texture defined by a rectangle
attach_function :draw_texture_rec, :DrawTextureRec, [Texture2D.by_value, Rectangle.by_value, Vector2.by_value, Color.by_value], :void
# Draw a part of a texture defined by a rectangle with 'pro' parameters
attach_function :draw_texture_pro, :DrawTexturePro, [Texture2D.by_value, Rectangle.by_value, Rectangle.by_value, Vector2.by_value, :float, Color.by_value], :void
# Draws a texture (or part of it) that stretches or shrinks nicely
attach_function :draw_texture_n_patch, :DrawTextureNPatch, [Texture2D.by_value, NPatchInfo.by_value, Rectangle.by_value, Vector2.by_value, :float, Color.by_value], :void
# Get color with alpha applied, alpha goes from 0.0f to 1.0f
attach_function :fade, :Fade, [Color.by_value, :float], Color.by_value
# Get hexadecimal value for a Color
attach_function :color_to_int, :ColorToInt, [Color.by_value], :int
# Get Color normalized as float [0..1]
attach_function :color_normalize, :ColorNormalize, [Color.by_value], Vector4.by_value
# Get Color from normalized values [0..1]
attach_function :color_from_normalized, :ColorFromNormalized, [Vector4.by_value], Color.by_value
# Get HSV values for a Color, hue [0..360], saturation/value [0..1]
attach_function :color_to_hsv, :ColorToHSV, [Color.by_value], Vector3.by_value
# Get a Color from HSV values, hue [0..360], saturation/value [0..1]
attach_function :color_from_hsv, :ColorFromHSV, [:float, :float, :float], Color.by_value
# Get color multiplied with another color
attach_function :color_tint, :ColorTint, [Color.by_value, Color.by_value], Color.by_value
# Get color with brightness correction, brightness factor goes from -1.0f to 1.0f
attach_function :color_brightness, :ColorBrightness, [Color.by_value, :float], Color.by_value
# Get color with contrast correction, contrast values between -1.0f and 1.0f
attach_function :color_contrast, :ColorContrast, [Color.by_value, :float], Color.by_value
# Get color with alpha applied, alpha goes from 0.0f to 1.0f
attach_function :color_alpha, :ColorAlpha, [Color.by_value, :float], Color.by_value
# Get src alpha-blended into dst color with tint
attach_function :color_alpha_blend, :ColorAlphaBlend, [Color.by_value, Color.by_value, Color.by_value], Color.by_value
# Get Color structure from hexadecimal value
attach_function :get_color, :GetColor, [:uint], Color.by_value
# Get Color from a source pixel pointer of certain format
attach_function :get_pixel_color, :GetPixelColor, [:pointer, :int], Color.by_value