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},
};
unsafe extern "C" {
#[link_name = "InitWindow"]
pub fn init_window(width: c_int, height: c_int, title: *const c_char);
#[link_name = "CloseWindow"]
pub fn close_window();
#[link_name = "WindowShouldClose"]
pub fn window_should_close() -> bool;
#[link_name = "IsWindowReady"]
pub fn is_window_ready() -> bool;
#[link_name = "IsWindowFullscreen"]
pub fn is_window_fullscreen() -> bool;
#[link_name = "IsWindowHidden"]
pub fn is_window_hidden() -> bool;
#[link_name = "IsWindowMinimized"]
pub fn is_window_minimized() -> bool;
#[link_name = "IsWindowMaximized"]
pub fn is_window_maximized() -> bool;
#[link_name = "IsWindowFocused"]
pub fn is_window_focused() -> bool;
#[link_name = "IsWindowResized"]
pub fn is_window_resized() -> bool;
#[link_name = "IsWindowState"]
pub fn is_window_state(flags: ConfigFlag) -> bool;
#[link_name = "SetWindowState"]
pub fn set_window_state(flags: ConfigFlag);
#[link_name = "ClearWindowState"]
pub fn clear_window_state(flags: ConfigFlag);
#[link_name = "ToggleFullscreen"]
pub fn toggle_fullscreen();
#[link_name = "ToggleBorderlessWindowed"]
pub fn toggle_borderless_windowed();
#[link_name = "MaximizeWindow"]
pub fn maximize_window();
#[link_name = "MinimizeWindow"]
pub fn minimize_window();
#[link_name = "RestoreWindow"]
pub fn restore_window();
#[link_name = "SetWindowIcon"]
pub fn set_window_icon(image: Image);
#[link_name = "SetWindowIcons"]
pub fn set_window_icons(images: *const Image, count: c_int);
#[link_name = "SetWindowTitle"]
pub fn set_window_title(title: *const c_char);
#[link_name = "SetWindowPosition"]
pub fn set_window_position(x: c_int, y: c_int);
#[link_name = "SetWindowMonitor"]
pub fn set_window_monitor(monitor: c_int);
#[link_name = "SetWindowMinSize"]
pub fn set_window_min_size(width: c_int, height: c_int);
#[link_name = "SetWindowMaxSize"]
pub fn set_window_max_size(width: c_int, height: c_int);
#[link_name = "SetWindowSize"]
pub fn set_window_size(width: c_int, height: c_int);
#[link_name = "SetWindowOpacity"]
pub fn set_window_opacity(opacity: c_float);
#[link_name = "SetWindowFocused"]
pub fn set_window_focused();
#[link_name = "GetScreenWidth"]
pub fn get_screen_width() -> c_int;
#[link_name = "GetScreenHeight"]
pub fn get_screen_height() -> c_int;
#[link_name = "GetRenderWidth"]
pub fn get_render_width() -> c_int;
#[link_name = "GetRenderHeight"]
pub fn get_render_height() -> c_int;
#[link_name = "GetMonitorCount"]
pub fn get_monitor_count() -> c_int;
#[link_name = "GetCurrentMonitor"]
pub fn get_current_monitor() -> c_int;
#[link_name = "GetMonitorPosition"]
pub fn get_monitor_position(monitor: c_int) -> Vector2;
#[link_name = "GetMonitorWidth"]
pub fn get_monitor_width(monitor: c_int) -> c_int;
#[link_name = "GetMonitorHeight"]
pub fn get_monitor_height(monitor: c_int) -> c_int;
#[link_name = "GetMonitorPhysicalWidth"]
pub fn get_monitor_physical_width(monitor: c_int) -> c_int;
#[link_name = "GetMonitorPhysicalHeight"]
pub fn get_monitor_physical_height(monitor: c_int) -> c_int;
#[link_name = "GetMonitorRefreshRate"]
pub fn get_monitor_refresh_rate(monitor: c_int) -> c_int;
#[link_name = "GetWindowPosition"]
pub fn get_window_position() -> Vector2;
#[link_name = "GetWindowScaleDPI"]
pub fn get_window_scale_dpi() -> Vector2;
#[link_name = "GetMonitorName"]
pub fn get_monitor_name(monitor: c_int) -> *const c_char;
#[link_name = "SetClipboardText"]
pub fn set_clipboard_text(text: *const c_char);
#[link_name = "GetClipboardText"]
pub fn get_clipboard_text() -> *const c_char;
#[link_name = "GetClipboardImage"]
pub fn get_clipboard_image() -> Image;
#[link_name = "EnableEventWaiting"]
pub fn enable_event_waiting();
#[link_name = "DisableEventWaiting"]
pub fn disable_event_waiting();
}
unsafe extern "C" {
#[link_name = "ShowCursor"]
pub fn show_cursor();
#[link_name = "HideCursor"]
pub fn hide_cursor();
#[link_name = "IsCursorHidden"]
pub fn is_cursor_hidden() -> bool;
#[link_name = "EnableCursor"]
pub fn enable_cursor();
#[link_name = "DisableCursor"]
pub fn disable_cursor();
#[link_name = "IsCursorOnScreen"]
pub fn is_cursor_on_screen() -> bool;
}
unsafe extern "C" {
#[link_name = "ClearBackground"]
pub fn clear_background(color: Color);
#[link_name = "BeginDrawing"]
pub fn begin_drawing();
#[link_name = "EndDrawing"]
pub fn end_drawing();
#[link_name = "BeginMode2D"]
pub fn begin_mode_2d(camera: Camera2D);
#[link_name = "EndMode2D"]
pub fn end_mode_2d();
#[link_name = "BeginTextureMode"]
pub fn begin_texture_mode(render_texture: RenderTexture2D);
#[link_name = "EndTextureMode"]
pub fn end_texture_mode();
}
unsafe extern "C" {
#[link_name = "LoadImageFromMemory"]
pub fn load_image_from_memory(
file_type: *const c_char,
file_data: *const c_uchar,
data_size: c_int,
) -> Image;
}
unsafe extern "C" {
#[link_name = "LoadTexture"]
pub fn load_texture(path: *const c_char) -> Texture;
#[link_name = "LoadTextureFromImage"]
pub fn load_texture_from_image(image: Image) -> Texture;
#[link_name = "LoadRenderTexture"]
pub fn load_render_texture(width: c_int, height: c_int) -> RenderTexture;
#[link_name = "IsTextureValid"]
pub fn is_texture_valid(texture: Texture) -> bool;
#[link_name = "UnloadTexture"]
pub fn unload_texture(texture: Texture);
#[link_name = "IsRenderTextureValid"]
pub fn is_render_texture_valid(target: RenderTexture) -> bool;
#[link_name = "UnloadRenderTexture"]
pub fn unload_render_texture(render_texture: RenderTexture);
#[link_name = "UpdateTexture"]
pub fn update_texture(texture: Texture, pixels: *const c_void);
#[link_name = "UpdateTextureRec"]
pub fn update_texture_rec(texture: Texture, rec: Rectangle, pixels: *const c_void);
}
unsafe extern "C" {
#[link_name = "GenTextureMipmaps"]
pub fn gen_texture_mipmaps(texture: *mut Texture);
#[link_name = "SetTextureFilter"]
pub fn set_texture_filter(texture: Texture, filter: TextureFilter);
#[link_name = "SetTextureWrap"]
pub fn set_texture_wrap(texture: Texture, wrap: TextureWrap);
}
unsafe extern "C" {
#[link_name = "DrawTexture"]
pub fn draw_texture(texture: Texture, pos_x: c_int, pos_y: c_int, tint: Color);
#[link_name = "DrawTextureV"]
pub fn draw_texture_v(texture: Texture, pos: Vector2, tint: Color);
#[link_name = "DrawTextureEx"]
pub fn draw_texture_ex(
texture: Texture,
pos: Vector2,
rotation: c_float,
scale: c_float,
tint: Color,
);
#[link_name = "DrawTextureRec"]
pub fn draw_texture_rec(texture: Texture, source: Rectangle, position: Vector2, tint: Color);
#[link_name = "DrawTexturePro"]
pub fn draw_texture_pro(
texture: Texture,
source: Rectangle,
dest: Rectangle,
origin: Vector2,
rotation: c_float,
tint: Color,
);
}
unsafe extern "C" {
#[link_name = "DrawFPS"]
pub fn draw_fps(pos_x: c_int, pos_y: c_int);
#[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,
);
}
unsafe extern "C" {
#[link_name = "MeasureText"]
pub fn measure_text(text: *const c_char, font_size: c_int) -> c_int;
}
unsafe extern "C" {
#[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);
#[link_name = "DrawLineV"]
pub fn draw_line_v(start: Vector2, end: Vector2, color: Color);
#[link_name = "DrawLineEx"]
pub fn draw_line_ex(start: Vector2, end: Vector2, thick: c_float, color: Color);
#[link_name = "DrawLineStrip"]
pub fn draw_line_strip(points: *const Vector2, num_points: c_int, color: Color);
#[link_name = "DrawLineBezier"]
pub fn draw_line_bezier(start: Vector2, end: Vector2, thick: c_float, color: Color);
#[link_name = "DrawCircle"]
pub fn draw_circle(center_x: c_int, center_y: c_int, radius: c_float, color: Color);
#[link_name = "DrawCircleV"]
pub fn draw_circle_v(center: Vector2, radius: c_float, color: Color);
#[link_name = "DrawCircleLines"]
pub fn draw_circle_lines(center_x: c_int, center_y: c_int, radius: c_float, color: Color);
#[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,
);
#[link_name = "DrawRectangleRec"]
pub fn draw_rectangle_rec(rec: Rectangle, color: Color);
#[link_name = "DrawRectanglePro"]
pub fn draw_rectangle_pro(rec: Rectangle, origin: Vector2, rotation: f32, color: Color);
#[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);
}
unsafe extern "C" {
#[link_name = "IsKeyPressed"]
pub fn is_key_pressed(key: KeyboardKey) -> bool;
#[link_name = "IsKeyPressedRepeat"]
pub fn is_key_pressed_repeat(key: KeyboardKey) -> bool;
#[link_name = "IsKeyDown"]
pub fn is_key_down(key: KeyboardKey) -> bool;
#[link_name = "IsKeyReleased"]
pub fn is_key_released(key: KeyboardKey) -> bool;
#[link_name = "IsKeyUp"]
pub fn is_key_up(key: KeyboardKey) -> bool;
#[link_name = "GetKeyPressed"]
pub fn get_key_pressed() -> c_int;
#[link_name = "GetCharPressed"]
pub fn get_char_pressed() -> c_int;
#[link_name = "SetExitKey"]
pub fn set_exit_key(key: KeyboardKey);
}
unsafe extern "C" {
#[link_name = "IsGamepadAvailable"]
pub fn is_gamepad_available(gamepad: c_int) -> bool;
#[link_name = "GetGamepadName"]
pub fn get_gamepad_name(gamepad: c_int) -> *const c_char;
#[link_name = "IsGamepadButtonPressed"]
pub fn is_gamepad_button_pressed(gamepad: c_int, button: GamepadButton) -> bool;
#[link_name = "IsGamepadButtonDown"]
pub fn is_gamepad_button_down(gamepad: c_int, button: GamepadButton) -> bool;
#[link_name = "IsGamepadButtonReleased"]
pub fn is_gamepad_button_released(gamepad: c_int, button: GamepadButton) -> bool;
#[link_name = "IsGamepadButtonUp"]
pub fn is_gamepad_button_up(gamepad: c_int, button: GamepadButton) -> bool;
#[link_name = "GetGamepadButtonPressed"]
pub fn get_gamepad_button_pressed() -> c_int;
#[link_name = "GetGamepadAxisCount"]
pub fn get_gamepad_axis_count(gamepad: c_int) -> c_int;
#[link_name = "GetGamepadAxisMovement"]
pub fn get_gamepad_axis_movement(gamepad: c_int, axis: GamepadAxis) -> c_float;
#[link_name = "SetGamepadVibration"]
pub fn set_gamepad_vibration(
gamepad: c_int,
left_motor: c_float,
right_motor: c_float,
duration: c_float,
);
}
unsafe extern "C" {
#[link_name = "IsMouseButtonPressed"]
pub fn is_mouse_button_pressed(button: MouseButton) -> bool;
#[link_name = "IsMouseButtonDown"]
pub fn is_mouse_button_down(button: MouseButton) -> bool;
#[link_name = "IsMouseButtonReleased"]
pub fn is_mouse_button_released(button: MouseButton) -> bool;
#[link_name = "IsMouseButtonUp"]
pub fn is_mouse_button_up(button: MouseButton) -> bool;
#[link_name = "GetMouseX"]
pub fn get_mouse_x() -> c_int;
#[link_name = "GetMouseY"]
pub fn get_mouse_y() -> c_int;
#[link_name = "GetMousePosition"]
pub fn get_mouse_position() -> Vector2;
#[link_name = "GetMouseDelta"]
pub fn get_mouse_delta() -> Vector2;
#[link_name = "SetMousePosition"]
pub fn set_mouse_position(x: c_int, y: c_int);
#[link_name = "SetMouseOffset"]
pub fn set_mouse_offset(offset_x: c_int, offset_y: c_int);
#[link_name = "SetMouseScale"]
pub fn set_mouse_scale(scale_x: c_float, scale_y: c_float);
#[link_name = "GetMouseWheelMove"]
pub fn get_mouse_wheel_move() -> c_float;
#[link_name = "GetMouseWheelMoveV"]
pub fn get_mouse_wheel_move_v() -> Vector2;
#[link_name = "SetMouseCursor"]
pub fn set_mouse_cursor(cursor: MouseCursor);
}
unsafe extern "C" {
#[link_name = "GetTouchX"]
pub fn get_touch_x() -> c_int;
#[link_name = "GetTouchY"]
pub fn get_touch_y() -> c_int;
#[link_name = "GetTouchPosition"]
pub fn get_touch_position(index: c_int) -> Vector2;
#[link_name = "GetTouchPointId"]
pub fn get_touch_point_id(index: c_int) -> c_int;
#[link_name = "GetTouchPointCount"]
pub fn get_touch_point_count() -> c_int;
}
unsafe extern "C" {
#[link_name = "SetGesturesEnabled"]
pub fn set_gestures_enabled(flags: Gesture);
#[link_name = "IsGestureDetected"]
pub fn is_gesture_detected(gesture: Gesture) -> bool;
#[link_name = "GetGestureDetected"]
pub fn get_gesture_detected() -> Gesture;
#[link_name = "GetGestureHoldDuration"]
pub fn get_gesture_hold_duration() -> c_float;
#[link_name = "GetGestureDragVector"]
pub fn get_gesture_drag_vector() -> Vector2;
#[link_name = "GetGestureDragAngle"]
pub fn get_gesture_drag_angle() -> c_float;
#[link_name = "GetGesturePinchVector"]
pub fn get_gesture_pinch_vector() -> Vector2;
#[link_name = "GetGesturePinchAngle"]
pub fn get_gesture_pinch_angle() -> c_float;
}
unsafe extern "C" {
#[link_name = "SetTargetFPS"]
pub fn set_target_fps(fps: c_int);
#[link_name = "GetFrameTime"]
pub fn get_frame_time() -> c_float;
#[link_name = "GetTime"]
pub fn get_time() -> c_double;
#[link_name = "GetFPS"]
pub fn get_fps() -> c_int;
}
unsafe extern "C" {
#[link_name = "TakeScreenshot"]
pub fn take_screenshot(file_name: *const c_char);
#[link_name = "SetConfigFlags"]
pub fn set_config_flags(flags: ConfigFlag);
#[link_name = "OpenURL"]
pub fn open_url(url: *const c_char);
}
unsafe extern "C" {
#[link_name = "InitAudioDevice"]
pub fn init_audio_device();
#[link_name = "CloseAudioDevice"]
pub fn close_audio_device();
#[link_name = "IsAudioDeviceReady"]
pub fn is_audio_device_ready() -> bool;
#[link_name = "SetMasterVolume"]
pub fn set_master_volume(volume: c_float);
#[link_name = "GetMasterVolume"]
pub fn get_master_volume() -> c_float;
}
unsafe extern "C" {
#[link_name = "LoadWave"]
pub fn load_wave(file_name: *const c_char) -> Wave;
#[link_name = "LoadWaveFromMemory"]
pub fn load_wave_from_memory(
file_type: *const c_char,
file_data: *const c_uchar,
data_size: c_int,
) -> Wave;
#[link_name = "IsWaveValid"]
pub fn is_wave_valid(wave: Wave) -> bool;
#[link_name = "LoadSound"]
pub fn load_sound(file_name: *const c_char) -> Sound;
#[link_name = "LoadSoundFromWave"]
pub fn load_sound_from_wave(wave: Wave) -> Sound;
#[link_name = "LoadSoundAlias"]
pub fn load_sound_alias(source: Sound) -> Sound;
#[link_name = "IsSoundValid"]
pub fn is_sound_valid(sound: Sound) -> bool;
#[link_name = "UpdateSound"]
pub fn update_sound(sound: Sound, data: *const c_void, sample_count: c_int);
#[link_name = "UnloadWave"]
pub fn unload_wave(wave: Wave);
#[link_name = "UnloadSound"]
pub fn unload_sound(sound: Sound);
#[link_name = "UnloadSoundAlias"]
pub fn unload_sound_alias(alias: Sound);
#[link_name = "ExportWave"]
pub fn export_wave(wave: Wave, file_name: *const c_char) -> bool;
#[link_name = "ExportWaveAsCode"]
pub fn export_wave_as_code(wave: Wave, file_name: *const c_char) -> bool;
}
unsafe extern "C" {
#[link_name = "PlaySound"]
pub fn play_sound(sound: Sound);
#[link_name = "StopSound"]
pub fn stop_sound(sound: Sound);
#[link_name = "PauseSound"]
pub fn pause_sound(sound: Sound);
#[link_name = "ResumeSound"]
pub fn resume_sound(sound: Sound);
#[link_name = "IsSoundPlaying"]
pub fn is_sound_playing(sound: Sound) -> bool;
#[link_name = "SetSoundVolume"]
pub fn set_sound_volume(sound: Sound, volume: c_float);
#[link_name = "SetSoundPitch"]
pub fn set_sound_pitch(sound: Sound, pitch: c_float);
#[link_name = "SetSoundPan"]
pub fn set_sound_pan(sound: Sound, pan: c_float);
#[link_name = "WaveCopy"]
pub fn wave_copy(wave: Wave) -> Wave;
#[link_name = "WaveCrop"]
pub fn wave_crop(wave: *mut Wave, init_frame: c_int, final_frame: c_int);
#[link_name = "WaveFormat"]
pub fn wave_format(wave: *mut Wave, sample_rate: c_int, sample_size: c_int, channels: c_int);
#[link_name = "LoadWaveSamples"]
pub fn load_wave_samples(wave: Wave) -> *mut c_float;
#[link_name = "UnloadWaveSamples"]
pub fn unload_wave_samples(samples: *mut c_float);
}
unsafe extern "C" {
#[link_name = "LoadMusicStream"]
pub fn load_music_stream(file_name: *const c_char) -> Music;
#[link_name = "LoadMusicStreamFromMemory"]
pub fn load_music_stream_from_memory(
file_type: *const c_char,
data: *const c_uchar,
data_size: c_int,
) -> Music;
#[link_name = "IsMusicValid"]
pub fn is_music_valid(music: Music) -> bool;
#[link_name = "UnloadMusicStream"]
pub fn unload_music_stream(music: Music);
#[link_name = "PlayMusicStream"]
pub fn play_music_stream(music: Music);
#[link_name = "IsMusicStreamPlaying"]
pub fn is_music_stream_playing(music: Music) -> bool;
#[link_name = "UpdateMusicStream"]
pub fn update_music_stream(music: Music);
#[link_name = "StopMusicStream"]
pub fn stop_music_stream(music: Music);
#[link_name = "PauseMusicStream"]
pub fn pause_music_stream(music: Music);
#[link_name = "ResumeMusicStream"]
pub fn resume_music_stream(music: Music);
#[link_name = "SeekMusicStream"]
pub fn seek_music_stream(music: Music, position: c_float);
#[link_name = "SetMusicVolume"]
pub fn set_music_volume(music: Music, volume: c_float);
#[link_name = "SetMusicPitch"]
pub fn set_music_pitch(music: Music, pitch: c_float);
#[link_name = "SetMusicPan"]
pub fn set_music_pan(music: Music, pan: c_float);
#[link_name = "GetMusicTimeLength"]
pub fn get_music_time_length(music: Music) -> c_float;
#[link_name = "GetMusicTimePlayed"]
pub fn get_music_time_played(music: Music) -> c_float;
}
unsafe extern "C" {
#[link_name = "LoadAudioStream"]
pub fn load_audio_stream(
sample_rate: c_uint,
sample_size: c_uint,
channels: c_uint,
) -> AudioStream;
#[link_name = "IsAudioStreamValid"]
pub fn is_audio_stream_valid(stream: AudioStream) -> bool;
#[link_name = "UnloadAudioStream"]
pub fn unload_audio_stream(stream: AudioStream);
#[link_name = "UpdateAudioStream"]
pub fn update_audio_stream(stream: AudioStream, data: *const c_void, frame_count: c_int);
#[link_name = "IsAudioStreamProcessed"]
pub fn is_audio_stream_processed(stream: AudioStream) -> bool;
#[link_name = "PlayAudioStream"]
pub fn play_audio_stream(stream: AudioStream);
#[link_name = "PauseAudioStream"]
pub fn pause_audio_stream(stream: AudioStream);
#[link_name = "ResumeAudioStream"]
pub fn resume_audio_stream(stream: AudioStream);
#[link_name = "IsAudioStreamPlaying"]
pub fn is_audio_stream_playing(stream: AudioStream) -> bool;
#[link_name = "StopAudioStream"]
pub fn stop_audio_stream(stream: AudioStream);
#[link_name = "SetAudioStreamVolume"]
pub fn set_audio_stream_volume(stream: AudioStream, volume: c_float);
#[link_name = "SetAudioStreamPitch"]
pub fn set_audio_stream_pitch(stream: AudioStream, pitch: c_float);
#[link_name = "SetAudioStreamPan"]
pub fn set_audio_stream_pan(stream: AudioStream, pan: c_float);
#[link_name = "SetAudioStreamBufferSizeDefault"]
pub fn set_audio_stream_buffer_size_default(size: c_int);
#[link_name = "SetAudioStreamCallback"]
pub fn set_audio_stream_callback(stream: AudioStream, callback: AudioCallback);
#[link_name = "AttachAudioStreamProcessor"]
pub fn attach_audio_stream_processor(stream: AudioStream, processor: AudioCallback);
#[link_name = "DetachAudioStreamProcessor"]
pub fn detach_audio_stream_processor(stream: AudioStream, processor: AudioCallback);
#[link_name = "AttachAudioMixedProcessor"]
pub fn attach_audio_mixed_processor(processor: AudioCallback);
#[link_name = "DetachAudioMixedProcessor"]
pub fn detach_audio_mixed_processor(processor: AudioCallback);
}
unsafe extern "C" {
#[link_name = "CheckCollisionRecs"]
pub fn check_collision_recs(rec1: Rectangle, rec2: Rectangle) -> bool;
#[link_name = "CheckCollisionCircles"]
pub fn check_collision_circles(
center1: Vector2,
radius1: f32,
center2: Vector2,
radius2: f32,
) -> bool;
#[link_name = "CheckCollisionCircleRec"]
pub fn check_collision_circle_rec(center1: Vector2, radius1: c_float, rec: Rectangle) -> bool;
#[link_name = "CheckCollisionCircleLine"]
pub fn check_collision_circle_line(
center: Vector2,
radius: f32,
p1: Vector2,
p2: Vector2,
) -> bool;
#[link_name = "CheckCollisionPointRec"]
pub fn check_collision_point_rec(point: Vector2, rec: Rectangle) -> bool;
#[link_name = "CheckCollisionPointCircle"]
pub fn check_collision_point_circle(point: Vector2, center: Vector2, radius: c_float) -> bool;
#[link_name = "CheckCollisionPointTriangle"]
pub fn check_collision_point_triangle(
point: Vector2,
p1: Vector2,
p2: Vector2,
p3: Vector2,
) -> bool;
#[link_name = "CheckCollisionPointLine"]
pub fn check_collision_point_line(
point: Vector2,
p1: Vector2,
p2: Vector2,
threshold: c_int,
) -> bool;
#[link_name = "CheckCollisionPointPoly"]
pub fn check_collision_point_poly(
point: Vector2,
p1: *const Vector2,
point_count: c_int,
) -> bool;
#[link_name = "GetCollisionRec"]
pub fn get_collision_rec(rec1: Rectangle, rec2: Rectangle) -> Rectangle;
}
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);
}