raylib

Types

pub type Color =
  ffi.Color
pub opaque type DrawingContext
pub type Image =
  ffi.Image
pub opaque type Monitor
pub opaque type RLContext
pub type Rectangle =
  ffi.Rectangle
pub type Texture =
  ffi.Texture

Values

pub fn clear_background(
  arg: DrawingContext,
  color color: ffi.Color,
) -> Nil
pub fn disable_cursor(arg: RLContext) -> Nil
pub fn disable_event_waiting(arg: RLContext) -> Nil
pub fn draw(
  arg: RLContext,
  actions actions: fn(DrawingContext) -> t,
) -> t
pub fn draw_circle(
  arg: DrawingContext,
  x x: Int,
  y y: Int,
  radius radius: Float,
  color color: ffi.Color,
) -> Nil
pub fn draw_circle_lines(
  arg: DrawingContext,
  x x: Int,
  y y: Int,
  radius radius: Float,
  color color: ffi.Color,
) -> Nil
pub fn draw_circle_sector(
  arg: DrawingContext,
  center center: vectors.Vec2,
  radius radius: Float,
  from start_angle: Float,
  to end_angle: Float,
  segments segments: Int,
  color color: ffi.Color,
) -> Nil
pub fn draw_circle_sector_lines(
  arg: DrawingContext,
  center center: vectors.Vec2,
  radius radius: Float,
  from start_angle: Float,
  to end_angle: Float,
  segments segments: Int,
  color color: ffi.Color,
) -> Nil
pub fn draw_ellipse(
  arg: DrawingContext,
  x x: Int,
  y y: Int,
  radius_h radius_h: Float,
  radius_v radius_v: Float,
  color color: ffi.Color,
) -> Nil
pub fn draw_ellipse_lines(
  arg: DrawingContext,
  x x: Int,
  y y: Int,
  radius_h radius_h: Float,
  radius_v radius_v: Float,
  color color: ffi.Color,
) -> Nil
pub fn draw_line(
  arg: DrawingContext,
  sx sx: Int,
  sy sy: Int,
  ex ex: Int,
  ey ey: Int,
  color color: ffi.Color,
) -> Nil
pub fn draw_line_bezier(
  arg: DrawingContext,
  start start: vectors.Vec2,
  end end: vectors.Vec2,
  thick thick: Float,
  color color: ffi.Color,
) -> Nil
pub fn draw_line_ex(
  arg: DrawingContext,
  start start: vectors.Vec2,
  end end: vectors.Vec2,
  thick thick: Float,
  color color: ffi.Color,
) -> Nil
pub fn draw_pixel(
  arg: DrawingContext,
  x x: Int,
  y y: Int,
  color color: ffi.Color,
) -> Nil
pub fn draw_rectangle(
  arg: DrawingContext,
  x x: Int,
  y y: Int,
  w width: Int,
  h height: Int,
  color color: ffi.Color,
) -> Nil
pub fn draw_rectangle_pro(
  arg: DrawingContext,
  rec rec: ffi.Rectangle,
  origin origin: vectors.Vec2,
  rot rotation: Float,
  color color: ffi.Color,
) -> Nil
pub fn draw_rectangle_rounded(
  arg: DrawingContext,
  rec rec: ffi.Rectangle,
  roundness roundness: Float,
  segments segments: Int,
  color color: ffi.Color,
) -> Nil
pub fn draw_rectangle_rounded_lines_ex(
  arg: DrawingContext,
  rec rec: ffi.Rectangle,
  roundness roundness: Float,
  segments segments: Int,
  thick thick: Float,
  color color: ffi.Color,
) -> Nil
pub fn draw_ring(
  arg: DrawingContext,
  center: vectors.Vec2,
  from_radius inner_radius: Float,
  to_radius outer_radius: Float,
  from_angle start_angle: Float,
  to_angle end_angle: Float,
  segments segments: Int,
  color color: ffi.Color,
) -> Nil
pub fn draw_ring_lines(
  arg: DrawingContext,
  center center: vectors.Vec2,
  from_radius inner_radius: Float,
  to_radius outer_radius: Float,
  from_angle start_angle: Float,
  to_angle end_angle: Float,
  segments segments: Float,
  color color: ffi.Color,
) -> Nil
pub fn enable_cursor(arg: RLContext) -> Nil
pub fn enable_event_waiting(arg: RLContext) -> Nil
pub fn get_char_pressed(
  arg: RLContext,
) -> Result(UtfCodepoint, Nil)
pub fn get_clipboard_image(arg: RLContext) -> ffi.Image
pub fn get_clipboard_text(arg: RLContext) -> String
pub fn get_color(from hex: Int) -> ffi.Color
pub fn get_current_monitor(arg: RLContext) -> Monitor
pub fn get_fps(arg: RLContext) -> Int
pub fn get_frame_time(arg: RLContext) -> Float
pub fn get_key_pressed(arg: RLContext) -> inputs.KeyCode
pub fn get_monitor_count(arg: RLContext) -> Int
pub fn get_monitor_height(
  arg: RLContext,
  of monitor: Monitor,
) -> Int
pub fn get_monitor_name(
  arg: RLContext,
  of monitor: Monitor,
) -> String
pub fn get_monitor_physical_height(
  arg: RLContext,
  of monitor: Monitor,
) -> Int
pub fn get_monitor_physical_width(
  arg: RLContext,
  of monitor: Monitor,
) -> Int
pub fn get_monitor_position(
  arg: RLContext,
  of monitor: Monitor,
) -> vectors.Vec2
pub fn get_monitor_refresh_rate(
  arg: RLContext,
  of monitor: Monitor,
) -> Int
pub fn get_monitor_width(
  arg: RLContext,
  of monitor: Monitor,
) -> Int
pub fn get_mouse_delta(arg: RLContext) -> vectors.Vec2
pub fn get_mouse_position(arg: RLContext) -> vectors.Vec2
pub fn get_mouse_wheel_move(arg: RLContext) -> Float
pub fn get_mouse_wheel_move_v(arg: RLContext) -> vectors.Vec2
pub fn get_mouse_x(arg: RLContext) -> Int
pub fn get_mouse_y(arg: RLContext) -> Int
pub fn get_render_height(arg: RLContext) -> Int
pub fn get_render_width(arg: RLContext) -> Int
pub fn get_screen_height(arg: RLContext) -> Int
pub fn get_screen_width(arg: RLContext) -> Int
pub fn get_shapes_texture(arg: RLContext) -> ffi.Texture
pub fn get_shapes_texture_rectangle(
  arg: RLContext,
) -> ffi.Rectangle
pub fn get_time(arg: RLContext) -> Float
pub fn get_window_position(arg: RLContext) -> vectors.Vec2
pub fn get_window_scale_dpi(arg: RLContext) -> vectors.Vec2
pub fn hide_cursor(arg: RLContext) -> Nil
pub fn is_cursor_hidden(arg: RLContext) -> Bool
pub fn is_cursor_on_screen(arg: RLContext) -> Bool
pub fn is_key_down(
  arg: RLContext,
  code code: inputs.KeyCode,
) -> Bool
pub fn is_key_pressed(
  arg: RLContext,
  code code: inputs.KeyCode,
) -> Bool
pub fn is_key_pressed_repeat(
  arg: RLContext,
  code code: inputs.KeyCode,
) -> Bool
pub fn is_key_released(
  arg: RLContext,
  code code: inputs.KeyCode,
) -> Bool
pub fn is_key_up(
  arg: RLContext,
  code code: inputs.KeyCode,
) -> Bool
pub fn is_mouse_button_down(
  arg: RLContext,
  code code: inputs.MouseButtonCode,
) -> Bool
pub fn is_mouse_button_pressed(
  arg: RLContext,
  code code: inputs.MouseButtonCode,
) -> Bool
pub fn is_mouse_button_released(
  arg: RLContext,
  code code: inputs.MouseButtonCode,
) -> Bool
pub fn is_mouse_button_up(
  arg: RLContext,
  code code: inputs.MouseButtonCode,
) -> Bool
pub fn is_window_focused(arg: RLContext) -> Bool
pub fn is_window_fullscreen(arg: RLContext) -> Bool
pub fn is_window_hidden(arg: RLContext) -> Bool
pub fn is_window_maximized(arg: RLContext) -> Bool
pub fn is_window_minimized(arg: RLContext) -> Bool
pub fn is_window_resized(arg: RLContext) -> Bool
pub fn maximize_window(arg: RLContext) -> Nil
pub fn minimize_window(arg: RLContext) -> Nil
pub fn restore_window(arg: RLContext) -> Nil
pub fn set_clipboard_text(arg: RLContext, to text: String) -> Nil
pub fn set_exit_key(
  arg: RLContext,
  code code: inputs.KeyCode,
) -> Nil
pub fn set_mouse_position(
  arg: RLContext,
  x x: Int,
  y y: Int,
) -> Nil
pub fn set_mouse_scale(
  arg: RLContext,
  x x: Float,
  y y: Float,
) -> Nil
pub fn set_shapes_texture(
  arg: RLContext,
  to texture: ffi.Texture,
  source source: ffi.Rectangle,
) -> Nil
pub fn set_target_fps(arg: RLContext, to fps: Int) -> Nil
pub fn set_window_focused(arg: RLContext) -> Nil
pub fn set_window_icon(
  arg: RLContext,
  to image: ffi.Image,
) -> Nil
pub fn set_window_max_size(
  arg: RLContext,
  width width: Int,
  height height: Int,
) -> Nil
pub fn set_window_min_size(
  arg: RLContext,
  width width: Int,
  height height: Int,
) -> Nil
pub fn set_window_monitor(arg: RLContext, to monitor: Int) -> Nil
pub fn set_window_opacity(
  arg: RLContext,
  to opacity: Float,
) -> Nil
pub fn set_window_position(
  arg: RLContext,
  x x: Int,
  y y: Int,
) -> Nil
pub fn set_window_size(
  arg: RLContext,
  width width: Int,
  height height: Int,
) -> Nil
pub fn set_window_title(arg: RLContext, to title: String) -> Nil
pub fn show_cursor(arg: RLContext) -> Nil
pub fn start(
  width width: Int,
  height height: Int,
  titled title: String,
  state state: state,
  f f: fn(RLContext, state) -> state,
) -> Nil
pub fn take_screenshot(arg: RLContext, to file: String) -> Nil
pub fn toggle_borderless_windowed(arg: RLContext) -> Nil
pub fn toggle_fullscreen(arg: RLContext) -> Nil
Search Document