rustyray-sys 0.2.1

Low level bindings for raylib
Documentation
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
/**********************************************************************************************
*
*   raylib v5.5 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
*
*   FEATURES:
*       - NO external dependencies, all required libraries included with raylib
*       - Multiplatform: Windows, Linux, FreeBSD, OpenBSD, NetBSD, DragonFly,
*                        MacOS, Haiku, Android, Raspberry Pi, DRM native, HTML5.
*       - Written in plain C code (C99) in PascalCase/camelCase notation
*       - Hardware accelerated with OpenGL (1.1, 2.1, 3.3, 4.3, ES2, ES3 - choose at compile)
*       - Unique OpenGL abstraction layer (usable as standalone module): [rlgl]
*       - Multiple Fonts formats supported (TTF, OTF, FNT, BDF, Sprite fonts)
*       - Outstanding texture formats support, including compressed formats (DXT, ETC, ASTC)
*       - Full 3d support for 3d Shapes, Models, Billboards, Heightmaps and more!
*       - Flexible Materials system, supporting classic maps and PBR maps
*       - Animated 3D models supported (skeletal bones animation) (IQM, M3D, GLTF)
*       - Shaders support, including Model shaders and Postprocessing shaders
*       - Powerful math module for Vector, Matrix and Quaternion operations: [raymath]
*       - Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, QOA, XM, MOD)
*       - VR stereo rendering with configurable HMD device parameters
*       - Bindings to multiple programming languages available!
*
*   NOTES:
*       - One default Font is loaded on InitWindow()->LoadFontDefault() [core, text]
*       - One default Texture2D is loaded on rlglInit(), 1x1 white pixel R8G8B8A8 [rlgl] (OpenGL 3.3 or ES2)
*       - One default Shader is loaded on rlglInit()->rlLoadShaderDefault() [rlgl] (OpenGL 3.3 or ES2)
*       - One default RenderBatch is loaded on rlglInit()->rlLoadRenderBatch() [rlgl] (OpenGL 3.3 or ES2)
*
*   DEPENDENCIES (included):
*       [rcore][GLFW] rglfw (Camilla Löwy - github.com/glfw/glfw) for window/context management and input
*       [rcore][RGFW] rgfw (ColleagueRiley - github.com/ColleagueRiley/RGFW) for window/context management and input
*       [rlgl] glad/glad_gles2 (David Herberth - github.com/Dav1dde/glad) for OpenGL 3.3 extensions loading
*       [raudio] miniaudio (David Reid - github.com/mackron/miniaudio) for audio device/context management
*
*   OPTIONAL DEPENDENCIES (included):
*       [rcore] msf_gif (Miles Fogle) for GIF recording
*       [rcore] sinfl (Micha Mettke) for DEFLATE decompression algorithm
*       [rcore] sdefl (Micha Mettke) for DEFLATE compression algorithm
*       [rcore] rprand (Ramon Snatamaria) for pseudo-random numbers generation
*       [rtextures] qoi (Dominic Szablewski - https://phoboslab.org) for QOI image manage
*       [rtextures] stb_image (Sean Barret) for images loading (BMP, TGA, PNG, JPEG, HDR...)
*       [rtextures] stb_image_write (Sean Barret) for image writing (BMP, TGA, PNG, JPG)
*       [rtextures] stb_image_resize2 (Sean Barret) for image resizing algorithms
*       [rtextures] stb_perlin (Sean Barret) for Perlin Noise image generation
*       [rtext] stb_truetype (Sean Barret) for ttf fonts loading
*       [rtext] stb_rect_pack (Sean Barret) for rectangles packing
*       [rmodels] par_shapes (Philip Rideout) for parametric 3d shapes generation
*       [rmodels] tinyobj_loader_c (Syoyo Fujita) for models loading (OBJ, MTL)
*       [rmodels] cgltf (Johannes Kuhlmann) for models loading (glTF)
*       [rmodels] m3d (bzt) for models loading (M3D, https://bztsrc.gitlab.io/model3d)
*       [rmodels] vox_loader (Johann Nadalutti) for models loading (VOX)
*       [raudio] dr_wav (David Reid) for WAV audio file loading
*       [raudio] dr_flac (David Reid) for FLAC audio file loading
*       [raudio] dr_mp3 (David Reid) for MP3 audio file loading
*       [raudio] stb_vorbis (Sean Barret) for OGG audio loading
*       [raudio] jar_xm (Joshua Reisenauer) for XM audio module loading
*       [raudio] jar_mod (Joshua Reisenauer) for MOD audio module loading
*       [raudio] qoa (Dominic Szablewski - https://phoboslab.org) for QOA audio manage
*
*
*   LICENSE: zlib/libpng
*
*   raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
*   BSD-like license that allows static linking with closed source software:
*
*   Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
*
*   This software is provided "as-is", without any express or implied warranty. In no event
*   will the authors be held liable for any damages arising from the use of this software.
*
*   Permission is granted to anyone to use this software for any purpose, including commercial
*   applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
*     1. The origin of this software must not be misrepresented; you must not claim that you
*     wrote the original software. If you use this software in a product, an acknowledgment
*     in the product documentation would be appreciated but is not required.
*
*     2. Altered source versions must be plainly marked as such, and must not be misrepresented
*     as being the original software.
*
*     3. This notice may not be removed or altered from any source distribution.
*
**********************************************************************************************/

use libc::{c_char, c_double, c_float, c_int, c_uchar, c_uint, c_void};
use va_list::VaList;

use crate::{
    audio::{AudioCallback, AudioStream, Music, Sound, Wave},
    camera::Camera2D,
    color::Color,
    consts::{
        ConfigFlag, GamepadAxis, GamepadButton, Gesture, KeyboardKey, MouseButton, MouseCursor,
        TextureFilter, TextureWrap,
    },
    math::{Rectangle, Vector2},
    texture::{Image, RenderTexture, RenderTexture2D, Texture},
};

// Window-related functions
unsafe extern "C" {
    /// Initialize window and OpenGL context
    #[link_name = "InitWindow"]
    pub fn init_window(width: c_int, height: c_int, title: *const c_char);
    /// Close window and unload OpenGL context
    #[link_name = "CloseWindow"]
    pub fn close_window();
    /// Check if application should close (KEY_ESCAPE pressed or windows close icon clicked)
    #[link_name = "WindowShouldClose"]
    pub fn window_should_close() -> bool;
    /// Check if window has been initialized successfully
    #[link_name = "IsWindowReady"]
    pub fn is_window_ready() -> bool;
    /// Check if window is currently fullscreen
    #[link_name = "IsWindowFullscreen"]
    pub fn is_window_fullscreen() -> bool;
    /// Check if window is currently hidden
    #[link_name = "IsWindowHidden"]
    pub fn is_window_hidden() -> bool;
    /// Check if window is currently minimized
    #[link_name = "IsWindowMinimized"]
    pub fn is_window_minimized() -> bool;
    /// Check if window is currently maximized
    #[link_name = "IsWindowMaximized"]
    pub fn is_window_maximized() -> bool;
    /// Check if window is currently focused
    #[link_name = "IsWindowFocused"]
    pub fn is_window_focused() -> bool;
    /// Check if window has been resized last frame
    #[link_name = "IsWindowResized"]
    pub fn is_window_resized() -> bool;
    /// Check if one specific window flag is enabled
    ///
    /// Flags should be of values defined in [ConfigFlag].
    ///
    /// Use this value as a bitmask.
    ///
    /// # Examples
    /// ```no_run
    /// use rustyray_sys::{ffi::is_window_state, consts::ConfigFlag};
    ///
    /// unsafe { is_window_state(ConfigFlag::VsyncHint) };
    /// ```
    #[link_name = "IsWindowState"]
    pub fn is_window_state(flags: ConfigFlag) -> bool;
    /// Set window configuration state using flags
    ///
    /// Flags should be of values defined in [ConfigFlag].
    ///
    /// Use this value as a bitmask.
    ///
    /// # Examples
    /// ```no_run
    /// use rustyray_sys::{ffi::set_window_state, consts::ConfigFlag};
    ///
    /// unsafe { set_window_state(ConfigFlag::VsyncHint); }
    /// ```
    #[link_name = "SetWindowState"]
    pub fn set_window_state(flags: ConfigFlag);
    /// Clear window configuration state flags
    ///
    /// Flags should be of values defined in [ConfigFlag].
    ///
    /// Use this value as a bitmask.
    ///
    /// # Examples
    /// ```no_run
    /// use rustyray_sys::{ffi::clear_window_state, consts::ConfigFlag};
    ///
    /// unsafe { clear_window_state(ConfigFlag::VsyncHint); }
    /// ```
    #[link_name = "ClearWindowState"]
    pub fn clear_window_state(flags: ConfigFlag);
    /// Toggle window state: fullscreen/windowed, resizes monitor to match window resolution
    #[link_name = "ToggleFullscreen"]
    pub fn toggle_fullscreen();
    /// Toggle window state: borderless windowed, resizes window to match monitor resolution
    #[link_name = "ToggleBorderlessWindowed"]
    pub fn toggle_borderless_windowed();
    /// Set window state: maximized, if resizable
    #[link_name = "MaximizeWindow"]
    pub fn maximize_window();
    /// Set window state: minimized, if resizable
    #[link_name = "MinimizeWindow"]
    pub fn minimize_window();
    /// Set window state: not minimized/maximized
    #[link_name = "RestoreWindow"]
    pub fn restore_window();
    /// Set icon for window (single image, RGBA 32bit)
    #[link_name = "SetWindowIcon"]
    pub fn set_window_icon(image: Image);
    /// Set icon for window (multiple images, RGBA 32bit)
    #[link_name = "SetWindowIcons"]
    pub fn set_window_icons(images: *const Image, count: c_int);
    /// Set title for window
    #[link_name = "SetWindowTitle"]
    pub fn set_window_title(title: *const c_char);
    /// Set window position on screen
    #[link_name = "SetWindowPosition"]
    pub fn set_window_position(x: c_int, y: c_int);
    /// Set monitor for the current window
    #[link_name = "SetWindowMonitor"]
    pub fn set_window_monitor(monitor: c_int);
    /// Set window minimum dimensions (for [ConfigFlag::WindowResizable])
    #[link_name = "SetWindowMinSize"]
    pub fn set_window_min_size(width: c_int, height: c_int);
    /// Set window maximum dimensions (for [ConfigFlag::WindowResizable])
    #[link_name = "SetWindowMaxSize"]
    pub fn set_window_max_size(width: c_int, height: c_int);
    /// Set window dimension
    #[link_name = "SetWindowSize"]
    pub fn set_window_size(width: c_int, height: c_int);
    /// Set window opacity [0.0..1.0]
    #[link_name = "SetWindowOpacity"]
    pub fn set_window_opacity(opacity: c_float);
    /// Set window focused
    #[link_name = "SetWindowFocused"]
    pub fn set_window_focused();
    /// Get current screen width
    #[link_name = "GetScreenWidth"]
    pub fn get_screen_width() -> c_int;
    /// Get current screen height
    #[link_name = "GetScreenHeight"]
    pub fn get_screen_height() -> c_int;
    /// Get current render width (it considers HiDPI)
    #[link_name = "GetRenderWidth"]
    pub fn get_render_width() -> c_int;
    /// Get current render height (it considers HiDPI)
    #[link_name = "GetRenderHeight"]
    pub fn get_render_height() -> c_int;
    /// Get number of connected monitors
    #[link_name = "GetMonitorCount"]
    pub fn get_monitor_count() -> c_int;
    /// Get current monitor where window is placed
    #[link_name = "GetCurrentMonitor"]
    pub fn get_current_monitor() -> c_int;
    /// Get specified monitor position
    #[link_name = "GetMonitorPosition"]
    pub fn get_monitor_position(monitor: c_int) -> Vector2;
    /// Get specified monitor width (current video mode used by monitor)
    #[link_name = "GetMonitorWidth"]
    pub fn get_monitor_width(monitor: c_int) -> c_int;
    /// Get specified monitor height (current video mode used by monitor)
    #[link_name = "GetMonitorHeight"]
    pub fn get_monitor_height(monitor: c_int) -> c_int;
    /// Get specified monitor physical width in millimetres
    #[link_name = "GetMonitorPhysicalWidth"]
    pub fn get_monitor_physical_width(monitor: c_int) -> c_int;
    /// Get specified monitor physical height in millimetres
    #[link_name = "GetMonitorPhysicalHeight"]
    pub fn get_monitor_physical_height(monitor: c_int) -> c_int;
    /// Get specified monitor refresh rate
    #[link_name = "GetMonitorRefreshRate"]
    pub fn get_monitor_refresh_rate(monitor: c_int) -> c_int;
    /// Get position XY on monitor
    #[link_name = "GetWindowPosition"]
    pub fn get_window_position() -> Vector2;
    /// Get window scale DPI factor
    #[link_name = "GetWindowScaleDPI"]
    pub fn get_window_scale_dpi() -> Vector2;
    /// Get the human-readable, UTF-8 encoded name of the specified monitor
    #[link_name = "GetMonitorName"]
    pub fn get_monitor_name(monitor: c_int) -> *const c_char;
    /// Set clipboard text content
    #[link_name = "SetClipboardText"]
    pub fn set_clipboard_text(text: *const c_char);
    /// Get clipboard text content
    #[link_name = "GetClipboardText"]
    pub fn get_clipboard_text() -> *const c_char;
    /// Get clipboard image content
    #[link_name = "GetClipboardImage"]
    pub fn get_clipboard_image() -> Image;
    /// Enable waiting for events on [end_drawing], no automatic event polling
    #[link_name = "EnableEventWaiting"]
    pub fn enable_event_waiting();
    /// Disable waiting for events on [end_drawing], automatic event polling
    #[link_name = "DisableEventWaiting"]
    pub fn disable_event_waiting();
}

// Cursor-related functions
unsafe extern "C" {
    /// Shows cursor
    #[link_name = "ShowCursor"]
    pub fn show_cursor();
    /// Hides cursor
    #[link_name = "HideCursor"]
    pub fn hide_cursor();
    /// Check if cursor is not visible
    #[link_name = "IsCursorHidden"]
    pub fn is_cursor_hidden() -> bool;
    /// Enables cursor (unlock cursor)
    #[link_name = "EnableCursor"]
    pub fn enable_cursor();
    /// Disabled cursor (lock cursor)
    #[link_name = "DisableCursor"]
    pub fn disable_cursor();
    /// Check if cursor is on the screen
    #[link_name = "IsCursorOnScreen"]
    pub fn is_cursor_on_screen() -> bool;
}

// Drawing related functions
unsafe extern "C" {
    /// Set background color (framebuffer clear color)
    #[link_name = "ClearBackground"]
    pub fn clear_background(color: Color);
    /// Setup canvas (framebuffer) to start drawing
    #[link_name = "BeginDrawing"]
    pub fn begin_drawing();
    /// End canvas drawing and swap buffers (double buffering)
    #[link_name = "EndDrawing"]
    pub fn end_drawing();
    /// Begin 2D mode with custom camera (2D)
    #[link_name = "BeginMode2D"]
    pub fn begin_mode_2d(camera: Camera2D);
    /// Ends 2D mode with custom camera
    #[link_name = "EndMode2D"]
    pub fn end_mode_2d();
    /// Begin drawing to render texture
    #[link_name = "BeginTextureMode"]
    pub fn begin_texture_mode(render_texture: RenderTexture2D);
    /// Ends drawing to render texture
    #[link_name = "EndTextureMode"]
    pub fn end_texture_mode();
}

// Image loading functions
unsafe extern "C" {
    /// Load image from memory buffer, fileType refers to extension: i.e. '.png'
    #[link_name = "LoadImageFromMemory"]
    pub fn load_image_from_memory(
        file_type: *const c_char,
        file_data: *const c_uchar,
        data_size: c_int,
    ) -> Image;
}

// Texture loading functions
// Note: These function require GPU access
unsafe extern "C" {
    /// Load texture from file into GPU memory (VRAM)
    #[link_name = "LoadTexture"]
    pub fn load_texture(path: *const c_char) -> Texture;
    /// Load texture from image data
    #[link_name = "LoadTextureFromImage"]
    pub fn load_texture_from_image(image: Image) -> Texture;
    /// Load texture for rendering (framebuffer)
    #[link_name = "LoadRenderTexture"]
    pub fn load_render_texture(width: c_int, height: c_int) -> RenderTexture;
    /// Check if a texture is valid (loaded in GPU)
    #[link_name = "IsTextureValid"]
    pub fn is_texture_valid(texture: Texture) -> bool;
    /// Unload texture from GPU memory (VRAM)
    #[link_name = "UnloadTexture"]
    pub fn unload_texture(texture: Texture);
    /// Check if a render texture is valid (loaded in GPU)
    #[link_name = "IsRenderTextureValid"]
    pub fn is_render_texture_valid(target: RenderTexture) -> bool;
    /// Unload render texture from GPU memory (VRAM)
    #[link_name = "UnloadRenderTexture"]
    pub fn unload_render_texture(render_texture: RenderTexture);
    /// Update GPU texture with new data
    #[link_name = "UpdateTexture"]
    pub fn update_texture(texture: Texture, pixels: *const c_void);
    /// Update GPU texture rectangle with new data
    #[link_name = "UpdateTextureRec"]
    pub fn update_texture_rec(texture: Texture, rec: Rectangle, pixels: *const c_void);
}

// Texture configuration function
unsafe extern "C" {
    /// Generate GPU mipmaps for a texture
    #[link_name = "GenTextureMipmaps"]
    pub fn gen_texture_mipmaps(texture: *mut Texture);
    /// Set texture scaling filter mode
    #[link_name = "SetTextureFilter"]
    pub fn set_texture_filter(texture: Texture, filter: TextureFilter);
    /// Set texture wrapping mode
    #[link_name = "SetTextureWrap"]
    pub fn set_texture_wrap(texture: Texture, wrap: TextureWrap);
}

// Texture drawing functions
unsafe extern "C" {
    /// Draw a [Texture]
    #[link_name = "DrawTexture"]
    pub fn draw_texture(texture: Texture, pos_x: c_int, pos_y: c_int, tint: Color);
    /// Draw a [Texture] with position defined as [Vector2]
    #[link_name = "DrawTextureV"]
    pub fn draw_texture_v(texture: Texture, pos: Vector2, tint: Color);
    /// Draw a [Texture] with extended parameters
    #[link_name = "DrawTextureEx"]
    pub fn draw_texture_ex(
        texture: Texture,
        pos: Vector2,
        rotation: c_float,
        scale: c_float,
        tint: Color,
    );
    /// Draw a part of a [Texture] defined by a [Rectangle]
    #[link_name = "DrawTextureRec"]
    pub fn draw_texture_rec(texture: Texture, source: Rectangle, position: Vector2, tint: Color);
    /// Draw a part of a [Texture] defined by a [Rectangle] with 'pro' parameters
    #[link_name = "DrawTexturePro"]
    pub fn draw_texture_pro(
        texture: Texture,
        source: Rectangle,
        dest: Rectangle,
        origin: Vector2,
        rotation: c_float,
        tint: Color,
    );
    // TODO: Add draw_texture_npatch when NPatchInfo is implemented
}

// Text drawing functions
unsafe extern "C" {
    /// Draw current FPS
    #[link_name = "DrawFPS"]
    pub fn draw_fps(pos_x: c_int, pos_y: c_int);
    /// Draw text (using default font)
    #[link_name = "DrawText"]
    pub fn draw_text(
        text: *const c_char,
        pos_x: c_int,
        pos_y: c_int,
        font_size: c_int,
        color: Color,
    );
}

// Text font info functions
unsafe extern "C" {
    /// Measure string width for default font
    #[link_name = "MeasureText"]
    pub fn measure_text(text: *const c_char, font_size: c_int) -> c_int;
}

// Basic shapes drawing functions
unsafe extern "C" {
    /// Draw a line
    #[link_name = "DrawLine"]
    pub fn draw_line(start_x: c_int, start_y: c_int, end_x: c_int, end_y: c_int, color: Color);
    /// Draw a line (using gl lines)
    #[link_name = "DrawLineV"]
    pub fn draw_line_v(start: Vector2, end: Vector2, color: Color);
    /// Draw a line (using triangles/quads)
    #[link_name = "DrawLineEx"]
    pub fn draw_line_ex(start: Vector2, end: Vector2, thick: c_float, color: Color);
    /// Draw lines sequence (using gl lines)
    #[link_name = "DrawLineStrip"]
    pub fn draw_line_strip(points: *const Vector2, num_points: c_int, color: Color);
    /// Draw line segment cubic-bezier in-out interpolation
    #[link_name = "DrawLineBezier"]
    pub fn draw_line_bezier(start: Vector2, end: Vector2, thick: c_float, color: Color);
    /// Draw a color-filled circle
    #[link_name = "DrawCircle"]
    pub fn draw_circle(center_x: c_int, center_y: c_int, radius: c_float, color: Color);
    /// Draw a color-filled circle (Vector version)
    #[link_name = "DrawCircleV"]
    pub fn draw_circle_v(center: Vector2, radius: c_float, color: Color);
    /// Draw circle outline
    #[link_name = "DrawCircleLines"]
    pub fn draw_circle_lines(center_x: c_int, center_y: c_int, radius: c_float, color: Color);
    /// Draw a color-filled circle (Vector version)
    #[link_name = "DrawEllipse"]
    pub fn draw_ellipse(
        center_x: c_int,
        center_y: c_int,
        radius_x: c_float,
        radius_y: c_float,
        color: Color,
    );
    /// Draw a color-filled rectangle
    #[link_name = "DrawRectangleRec"]
    pub fn draw_rectangle_rec(rec: Rectangle, color: Color);
    /// Draw a color-filled rectangle with pro parameters
    #[link_name = "DrawRectanglePro"]
    pub fn draw_rectangle_pro(rec: Rectangle, origin: Vector2, rotation: f32, color: Color);
    /// Draw rectangle outline
    #[link_name = "DrawRectangleLines"]
    pub fn draw_rectangle_lines(
        pos_x: c_int,
        pos_y: c_int,
        width: c_int,
        height: c_int,
        color: Color,
    );
    #[link_name = "DrawRectangleLinesEx"]
    pub fn draw_rectangle_lines_ex(rect: Rectangle, line_thickness: c_float, color: Color);
    #[link_name = "DrawTriangle"]
    pub fn draw_triangle(v1: Vector2, v2: Vector2, v3: Vector2, color: Color);
    #[link_name = "DrawTriangleLines"]
    pub fn draw_triangle_lines(v1: Vector2, v2: Vector2, v3: Vector2, color: Color);
}

// Input-related functions: keyboard
unsafe extern "C" {
    /// Check if a key has been pressed once
    #[link_name = "IsKeyPressed"]
    pub fn is_key_pressed(key: KeyboardKey) -> bool;
    /// Check if a key has been pressed again
    #[link_name = "IsKeyPressedRepeat"]
    pub fn is_key_pressed_repeat(key: KeyboardKey) -> bool;
    /// Check if a key is being pressed
    #[link_name = "IsKeyDown"]
    pub fn is_key_down(key: KeyboardKey) -> bool;
    /// Check if a key has been released once
    #[link_name = "IsKeyReleased"]
    pub fn is_key_released(key: KeyboardKey) -> bool;
    /// Check if a key is **NOT** being pressed
    #[link_name = "IsKeyUp"]
    pub fn is_key_up(key: KeyboardKey) -> bool;
    /// Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
    #[link_name = "GetKeyPressed"]
    pub fn get_key_pressed() -> c_int;
    /// Get char pressed (unicode), call it multiple times for chars queued, return s0 when the queue is empty
    #[link_name = "GetCharPressed"]
    pub fn get_char_pressed() -> c_int;
    /// Set a custom key to exit program (default is [KeyboardKey::Escape])
    #[link_name = "SetExitKey"]
    pub fn set_exit_key(key: KeyboardKey);
}

// Input-related functions: gamepads
unsafe extern "C" {
    /// Check if a gamepad is available
    #[link_name = "IsGamepadAvailable"]
    pub fn is_gamepad_available(gamepad: c_int) -> bool;
    /// Get gamepad internal name id
    #[link_name = "GetGamepadName"]
    pub fn get_gamepad_name(gamepad: c_int) -> *const c_char;
    /// Check if a gamepad button has been pressed once
    #[link_name = "IsGamepadButtonPressed"]
    pub fn is_gamepad_button_pressed(gamepad: c_int, button: GamepadButton) -> bool;
    /// Check if a gamepad button is being pressed
    #[link_name = "IsGamepadButtonDown"]
    pub fn is_gamepad_button_down(gamepad: c_int, button: GamepadButton) -> bool;
    /// Check if a gamepad button has been released once
    #[link_name = "IsGamepadButtonReleased"]
    pub fn is_gamepad_button_released(gamepad: c_int, button: GamepadButton) -> bool;
    /// Check if a gamepad button is **NOT** being pressed
    #[link_name = "IsGamepadButtonUp"]
    pub fn is_gamepad_button_up(gamepad: c_int, button: GamepadButton) -> bool;
    /// Get the last gamepad button pressed
    #[link_name = "GetGamepadButtonPressed"]
    pub fn get_gamepad_button_pressed() -> c_int;
    /// Get gamepad axis count for a gamepad
    #[link_name = "GetGamepadAxisCount"]
    pub fn get_gamepad_axis_count(gamepad: c_int) -> c_int;
    /// Get axis movement value for a gamepad axis
    #[link_name = "GetGamepadAxisMovement"]
    pub fn get_gamepad_axis_movement(gamepad: c_int, axis: GamepadAxis) -> c_float;
    /// Set gamepad vibration for both motors (duration in seconds)
    #[link_name = "SetGamepadVibration"]
    pub fn set_gamepad_vibration(
        gamepad: c_int,
        left_motor: c_float,
        right_motor: c_float,
        duration: c_float,
    );
}

// Input-related functions: mouse
unsafe extern "C" {
    /// Check if a [MouseButton] has been pressed once
    #[link_name = "IsMouseButtonPressed"]
    pub fn is_mouse_button_pressed(button: MouseButton) -> bool;
    /// Check if a [MouseButton] is beening pressed
    #[link_name = "IsMouseButtonDown"]
    pub fn is_mouse_button_down(button: MouseButton) -> bool;
    /// Check if a [MouseButton] has been released once
    #[link_name = "IsMouseButtonReleased"]
    pub fn is_mouse_button_released(button: MouseButton) -> bool;
    /// Check if a [MouseButton] is **NOT** being pressed
    #[link_name = "IsMouseButtonUp"]
    pub fn is_mouse_button_up(button: MouseButton) -> bool;
    /// Get mouse position X
    #[link_name = "GetMouseX"]
    pub fn get_mouse_x() -> c_int;
    /// Get mouse position Y
    #[link_name = "GetMouseY"]
    pub fn get_mouse_y() -> c_int;
    /// Get mouse position XY
    #[link_name = "GetMousePosition"]
    pub fn get_mouse_position() -> Vector2;
    /// Get mouse delta between frames
    #[link_name = "GetMouseDelta"]
    pub fn get_mouse_delta() -> Vector2;
    /// Set mouse position XY
    #[link_name = "SetMousePosition"]
    pub fn set_mouse_position(x: c_int, y: c_int);
    /// Set mouse offset
    #[link_name = "SetMouseOffset"]
    pub fn set_mouse_offset(offset_x: c_int, offset_y: c_int);
    /// Set mouse scaling
    #[link_name = "SetMouseScale"]
    pub fn set_mouse_scale(scale_x: c_float, scale_y: c_float);
    /// Get mouse wheel movement for X or Y, whichever is larger
    #[link_name = "GetMouseWheelMove"]
    pub fn get_mouse_wheel_move() -> c_float;
    /// Get mouse wheel movement for both X or Y
    #[link_name = "GetMouseWheelMoveV"]
    pub fn get_mouse_wheel_move_v() -> Vector2;
    /// Set mouse cursor
    #[link_name = "SetMouseCursor"]
    pub fn set_mouse_cursor(cursor: MouseCursor);
}

// Input-related functions: touch
unsafe extern "C" {
    /// Get touch position X for touch point 0 (relative to screen size)
    #[link_name = "GetTouchX"]
    pub fn get_touch_x() -> c_int;
    /// Get touch position Y for touch point 0 (relative to screen size)
    #[link_name = "GetTouchY"]
    pub fn get_touch_y() -> c_int;
    /// Get touch position XY for a touch point index (relative to screen size)
    #[link_name = "GetTouchPosition"]
    pub fn get_touch_position(index: c_int) -> Vector2;
    /// Get touch point identifier for given index
    #[link_name = "GetTouchPointId"]
    pub fn get_touch_point_id(index: c_int) -> c_int;
    /// Get number of touch points
    #[link_name = "GetTouchPointCount"]
    pub fn get_touch_point_count() -> c_int;
}
// Gestures and Touch handling functions
unsafe extern "C" {
    /// Enable a set of [Gesture] using flags
    #[link_name = "SetGesturesEnabled"]
    pub fn set_gestures_enabled(flags: Gesture);
    /// Check if a [Gesture] have been detected
    #[link_name = "IsGestureDetected"]
    pub fn is_gesture_detected(gesture: Gesture) -> bool;
    /// Get latest detected [Gesture]
    #[link_name = "GetGestureDetected"]
    pub fn get_gesture_detected() -> Gesture;
    /// Get [Gesture] hold time in seconds
    #[link_name = "GetGestureHoldDuration"]
    pub fn get_gesture_hold_duration() -> c_float;
    /// Get [Gesture] drag [Vector2]
    #[link_name = "GetGestureDragVector"]
    pub fn get_gesture_drag_vector() -> Vector2;
    /// Get [Gesture] drag angle
    #[link_name = "GetGestureDragAngle"]
    pub fn get_gesture_drag_angle() -> c_float;
    /// Get [Gesture] pinch delta
    #[link_name = "GetGesturePinchVector"]
    pub fn get_gesture_pinch_vector() -> Vector2;
    /// Get [Gesture] pinch angle
    #[link_name = "GetGesturePinchAngle"]
    pub fn get_gesture_pinch_angle() -> c_float;
}

// Timing-related functions
unsafe extern "C" {
    /// Set target FPS (maximum)
    #[link_name = "SetTargetFPS"]
    pub fn set_target_fps(fps: c_int);
    /// Get time in seconds for last frame drawn (delta time)
    #[link_name = "GetFrameTime"]
    pub fn get_frame_time() -> c_float;
    /// Get elapsed time in seconds since InitWindow()
    #[link_name = "GetTime"]
    pub fn get_time() -> c_double;
    /// Get current FPS
    #[link_name = "GetFPS"]
    pub fn get_fps() -> c_int;
}

// Misc functions
unsafe extern "C" {
    /// Takes a screenshot of current screen (filename extension defines format)
    #[link_name = "TakeScreenshot"]
    pub fn take_screenshot(file_name: *const c_char);
    /// Setup init configuration flags (view FLAGS)
    ///
    /// Flags should be of values defined in [ConfigFlag].
    ///
    /// Use this value as a bitmask.
    ///
    /// # Examples
    /// ```no_run
    /// use rustyray_sys::{ffi::set_config_flags, consts::ConfigFlag};
    ///
    /// unsafe { set_config_flags(ConfigFlag::VsyncHint) }
    /// ```
    #[link_name = "SetConfigFlags"]
    pub fn set_config_flags(flags: ConfigFlag);
    /// Open URL with default system browser (if available)
    #[link_name = "OpenURL"]
    pub fn open_url(url: *const c_char);
}

// Audio device management functions
unsafe extern "C" {
    /// Initialize audio device and context
    #[link_name = "InitAudioDevice"]
    pub fn init_audio_device();
    /// Close the audio device and context
    #[link_name = "CloseAudioDevice"]
    pub fn close_audio_device();
    /// Check if audio device has been initialized successfully
    #[link_name = "IsAudioDeviceReady"]
    pub fn is_audio_device_ready() -> bool;
    /// Set master volume (listener)
    #[link_name = "SetMasterVolume"]
    pub fn set_master_volume(volume: c_float);
    /// Get master volume (listener)
    #[link_name = "GetMasterVolume"]
    pub fn get_master_volume() -> c_float;
}

// Wave/Sound loading/unloading functions
unsafe extern "C" {
    /// Load wave data from file
    #[link_name = "LoadWave"]
    pub fn load_wave(file_name: *const c_char) -> Wave;
    /// Load wave from memory buffer, file_type refers to extension: i.e. `.wav`
    #[link_name = "LoadWaveFromMemory"]
    pub fn load_wave_from_memory(
        file_type: *const c_char,
        file_data: *const c_uchar,
        data_size: c_int,
    ) -> Wave;
    /// Checks if wave data is valid (data loaded and parameters)
    #[link_name = "IsWaveValid"]
    pub fn is_wave_valid(wave: Wave) -> bool;
    /// Load sound from file
    #[link_name = "LoadSound"]
    pub fn load_sound(file_name: *const c_char) -> Sound;
    /// Load sound from wave data
    #[link_name = "LoadSoundFromWave"]
    pub fn load_sound_from_wave(wave: Wave) -> Sound;
    /// Create a new sound that shares the same sample data as the source sound, does not own the sound data
    #[link_name = "LoadSoundAlias"]
    pub fn load_sound_alias(source: Sound) -> Sound;
    /// Checks if sound is valid (data loaded and buffers initialized)
    #[link_name = "IsSoundValid"]
    pub fn is_sound_valid(sound: Sound) -> bool;
    /// Update sound buffer with new data
    #[link_name = "UpdateSound"]
    pub fn update_sound(sound: Sound, data: *const c_void, sample_count: c_int);
    /// Unload wave data
    #[link_name = "UnloadWave"]
    pub fn unload_wave(wave: Wave);
    /// Unload sound
    #[link_name = "UnloadSound"]
    pub fn unload_sound(sound: Sound);
    /// Unload a sound alias (does not deallocate sample data)
    #[link_name = "UnloadSoundAlias"]
    pub fn unload_sound_alias(alias: Sound);
    /// Export wave data to file, returns true on success
    #[link_name = "ExportWave"]
    pub fn export_wave(wave: Wave, file_name: *const c_char) -> bool;
    /// Export wave sample data to code (.h), returns true on success
    #[link_name = "ExportWaveAsCode"]
    pub fn export_wave_as_code(wave: Wave, file_name: *const c_char) -> bool;
}

// Wave/Sound management functions
unsafe extern "C" {
    /// Play a sound
    #[link_name = "PlaySound"]
    pub fn play_sound(sound: Sound);
    /// Stop playing a sound
    #[link_name = "StopSound"]
    pub fn stop_sound(sound: Sound);
    /// Pause a sound
    #[link_name = "PauseSound"]
    pub fn pause_sound(sound: Sound);
    /// Resume a paused sound
    #[link_name = "ResumeSound"]
    pub fn resume_sound(sound: Sound);
    /// Check if a sound is currently playing
    #[link_name = "IsSoundPlaying"]
    pub fn is_sound_playing(sound: Sound) -> bool;
    /// Set volume for a sound (1.0 is max level)
    #[link_name = "SetSoundVolume"]
    pub fn set_sound_volume(sound: Sound, volume: c_float);
    /// Set pitch for a sound (1.0 is base level)
    #[link_name = "SetSoundPitch"]
    pub fn set_sound_pitch(sound: Sound, pitch: c_float);
    /// Set pan for a sound (0.5 is center)
    #[link_name = "SetSoundPan"]
    pub fn set_sound_pan(sound: Sound, pan: c_float);
    /// Copy the wave to a new wave
    #[link_name = "WaveCopy"]
    pub fn wave_copy(wave: Wave) -> Wave;
    /// Crop a wave to defined frames range
    #[link_name = "WaveCrop"]
    pub fn wave_crop(wave: *mut Wave, init_frame: c_int, final_frame: c_int);
    /// Convert wave data to desired format
    #[link_name = "WaveFormat"]
    pub fn wave_format(wave: *mut Wave, sample_rate: c_int, sample_size: c_int, channels: c_int);
    /// Load samples data from wave as a 32bit float data array
    #[link_name = "LoadWaveSamples"]
    pub fn load_wave_samples(wave: Wave) -> *mut c_float;
    /// Unload samples data loaded with LoadWaveSamples()
    #[link_name = "UnloadWaveSamples"]
    pub fn unload_wave_samples(samples: *mut c_float);
}

unsafe extern "C" {
    /// Load music stream from file
    #[link_name = "LoadMusicStream"]
    pub fn load_music_stream(file_name: *const c_char) -> Music;
    /// Load music stream from file
    #[link_name = "LoadMusicStreamFromMemory"]
    pub fn load_music_stream_from_memory(
        file_type: *const c_char,
        data: *const c_uchar,
        data_size: c_int,
    ) -> Music;
    /// Checks if a music stream is valid (context and buffers initialized)
    #[link_name = "IsMusicValid"]
    pub fn is_music_valid(music: Music) -> bool;
    /// Unload music stream
    #[link_name = "UnloadMusicStream"]
    pub fn unload_music_stream(music: Music);
    /// Start music playing
    #[link_name = "PlayMusicStream"]
    pub fn play_music_stream(music: Music);
    /// Checks if music is playing
    #[link_name = "IsMusicStreamPlaying"]
    pub fn is_music_stream_playing(music: Music) -> bool;
    /// Updates buffers for music streaming
    #[link_name = "UpdateMusicStream"]
    pub fn update_music_stream(music: Music);
    /// Stop music playing
    #[link_name = "StopMusicStream"]
    pub fn stop_music_stream(music: Music);
    /// Pause music playing
    #[link_name = "PauseMusicStream"]
    pub fn pause_music_stream(music: Music);
    /// Resume playing paused music
    #[link_name = "ResumeMusicStream"]
    pub fn resume_music_stream(music: Music);
    /// Seek music to a position (in seconds)
    #[link_name = "SeekMusicStream"]
    pub fn seek_music_stream(music: Music, position: c_float);
    /// Set volume for music (1.0 is max level)
    #[link_name = "SetMusicVolume"]
    pub fn set_music_volume(music: Music, volume: c_float);
    /// Set pitch for music (1.0 is base level)
    #[link_name = "SetMusicPitch"]
    pub fn set_music_pitch(music: Music, pitch: c_float);
    /// Set pan for music (0.5 is center)
    #[link_name = "SetMusicPan"]
    pub fn set_music_pan(music: Music, pan: c_float);
    /// Get music time length (in seconds)
    #[link_name = "GetMusicTimeLength"]
    pub fn get_music_time_length(music: Music) -> c_float;
    /// Get current music time played (in seconds)
    #[link_name = "GetMusicTimePlayed"]
    pub fn get_music_time_played(music: Music) -> c_float;
}

// AudioStream management functions
unsafe extern "C" {
    /// Load audio stream (to stream raw audio pcm data)
    #[link_name = "LoadAudioStream"]
    pub fn load_audio_stream(
        sample_rate: c_uint,
        sample_size: c_uint,
        channels: c_uint,
    ) -> AudioStream;
    /// Checks if an audio stream is valid (buffers initialized)
    #[link_name = "IsAudioStreamValid"]
    pub fn is_audio_stream_valid(stream: AudioStream) -> bool;
    /// Unload audio stream and free memory
    #[link_name = "UnloadAudioStream"]
    pub fn unload_audio_stream(stream: AudioStream);
    /// Update audio stream buffers with data
    #[link_name = "UpdateAudioStream"]
    pub fn update_audio_stream(stream: AudioStream, data: *const c_void, frame_count: c_int);
    /// Check if any audio stream buffers requires refill
    #[link_name = "IsAudioStreamProcessed"]
    pub fn is_audio_stream_processed(stream: AudioStream) -> bool;
    /// Play audio stream
    #[link_name = "PlayAudioStream"]
    pub fn play_audio_stream(stream: AudioStream);
    /// Pause audio stream
    #[link_name = "PauseAudioStream"]
    pub fn pause_audio_stream(stream: AudioStream);
    /// Resume audio stream
    #[link_name = "ResumeAudioStream"]
    pub fn resume_audio_stream(stream: AudioStream);
    /// Check if audio stream is playing
    #[link_name = "IsAudioStreamPlaying"]
    pub fn is_audio_stream_playing(stream: AudioStream) -> bool;
    /// Stop audio stream
    #[link_name = "StopAudioStream"]
    pub fn stop_audio_stream(stream: AudioStream);
    /// Set volume for audio stream (1.0 is max level)
    #[link_name = "SetAudioStreamVolume"]
    pub fn set_audio_stream_volume(stream: AudioStream, volume: c_float);
    /// Set pitch for audio stream (1.0 is base level)
    #[link_name = "SetAudioStreamPitch"]
    pub fn set_audio_stream_pitch(stream: AudioStream, pitch: c_float);
    /// Set pan for audio stream (0.5 is centered)
    #[link_name = "SetAudioStreamPan"]
    pub fn set_audio_stream_pan(stream: AudioStream, pan: c_float);
    /// Default size for new audio streams
    #[link_name = "SetAudioStreamBufferSizeDefault"]
    pub fn set_audio_stream_buffer_size_default(size: c_int);
    /// Audio thread callback to request new data
    #[link_name = "SetAudioStreamCallback"]
    pub fn set_audio_stream_callback(stream: AudioStream, callback: AudioCallback);

    /// Attach audio stream processor to stream, receives the samples as 'float'
    #[link_name = "AttachAudioStreamProcessor"]
    pub fn attach_audio_stream_processor(stream: AudioStream, processor: AudioCallback);
    /// Detach audio stream processor from stream
    #[link_name = "DetachAudioStreamProcessor"]
    pub fn detach_audio_stream_processor(stream: AudioStream, processor: AudioCallback);
    /// Attach audio stream processor to the entire audio pipeline, receives the samples as 'float'
    #[link_name = "AttachAudioMixedProcessor"]
    pub fn attach_audio_mixed_processor(processor: AudioCallback);
    /// Detach audio stream processor from the entire audio pipeline
    #[link_name = "DetachAudioMixedProcessor"]
    pub fn detach_audio_mixed_processor(processor: AudioCallback);
}

// Basic shapes collision detection functions
unsafe extern "C" {
    /// Check collision between two rectangles
    #[link_name = "CheckCollisionRecs"]
    pub fn check_collision_recs(rec1: Rectangle, rec2: Rectangle) -> bool;
    /// Check collision between two circles
    #[link_name = "CheckCollisionCircles"]
    pub fn check_collision_circles(
        center1: Vector2,
        radius1: f32,
        center2: Vector2,
        radius2: f32,
    ) -> bool;
    /// Check collision between circle and rectangle
    #[link_name = "CheckCollisionCircleRec"]
    pub fn check_collision_circle_rec(center1: Vector2, radius1: c_float, rec: Rectangle) -> bool;
    /// Check if circle collides with a line created betweeen two points [p1] and [p2]
    #[link_name = "CheckCollisionCircleLine"]
    pub fn check_collision_circle_line(
        center: Vector2,
        radius: f32,
        p1: Vector2,
        p2: Vector2,
    ) -> bool;
    /// Check if point is inside rectangle
    #[link_name = "CheckCollisionPointRec"]
    pub fn check_collision_point_rec(point: Vector2, rec: Rectangle) -> bool;
    /// Check if point is inside circle
    #[link_name = "CheckCollisionPointCircle"]
    pub fn check_collision_point_circle(point: Vector2, center: Vector2, radius: c_float) -> bool;
    /// Check if point is inside triangle
    #[link_name = "CheckCollisionPointTriangle"]
    pub fn check_collision_point_triangle(
        point: Vector2,
        p1: Vector2,
        p2: Vector2,
        p3: Vector2,
    ) -> bool;
    /// Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
    #[link_name = "CheckCollisionPointLine"]
    pub fn check_collision_point_line(
        point: Vector2,
        p1: Vector2,
        p2: Vector2,
        threshold: c_int,
    ) -> bool;
    /// Check if point is within a polygon described by array of vertices
    #[link_name = "CheckCollisionPointPoly"]
    pub fn check_collision_point_poly(
        point: Vector2,
        p1: *const Vector2,
        point_count: c_int,
    ) -> bool;
    /// Get collision rectangle for two rectangles collision
    #[link_name = "GetCollisionRec"]
    pub fn get_collision_rec(rec1: Rectangle, rec2: Rectangle) -> Rectangle;
}

// Logging
pub type TraceLogCallback = extern "C" fn(log_level: c_int, text: *const c_char, args: VaList);

unsafe extern "C" {
    #[link_name = "SetTraceLogCallback"]
    pub fn set_trace_log_callback(callback: TraceLogCallback);
}