Struct raylib::core::RaylibHandle[][src]

pub struct RaylibHandle(_);
Expand description

The main interface into the Raylib API.

This is the way in which you will use the vast majority of Raylib’s functionality. A RaylibHandle can be constructed using the init_window function or through a RaylibBuilder obtained with the init function.

Implementations

Sets camera mode.

Updates camera position for selected mode.

Sets camera pan key to combine with mouse movement (free camera).

Sets camera alt key to combine with mouse movement (free camera).

Sets camera smooth zoom key to combine with mouse (free camera).

Sets camera move controls (1st person and 3rd person cameras).

Seems like all draw commands must be issued from the main thread

Setup canvas (framebuffer) to start drawing

Checks if a file has been dropped into the window.

Gets dropped filenames.

Clears dropped files paths buffer.

Detect if a key has been pressed once.

Detect if a key is being pressed.

Detect if a key has been released once.

Detect if a key is NOT being pressed.

Gets latest key pressed.

Gets latest key pressed.

Sets a custom key to exit program (default is ESC).

Detect if a gamepad is available.

Checks gamepad name (if available).

Returns gamepad internal name id.

Detect if a gamepad button has been pressed once.

Detect if a gamepad button is being pressed.

Detect if a gamepad button has been released once.

Detect if a gamepad button is NOT being pressed.

Gets the last gamepad button pressed.

Returns gamepad axis count for a gamepad.

Returns axis movement value for a gamepad axis.

Detect if a mouse button has been pressed once.

Detect if a mouse button is being pressed.

Detect if a mouse button has been released once.

Detect if a mouse button is NOT being pressed.

Returns mouse position X.

Returns mouse position Y.

Returns mouse position.

Sets mouse position.

Sets mouse offset.

Sets mouse scaling.

Returns mouse wheel movement Y.

Returns touch position X for touch point 0 (relative to screen size).

Returns touch position Y for touch point 0 (relative to screen size).

Returns touch position XY for a touch point index (relative to screen size).

Enables a set of gestures using flags.

Checks if a gesture have been detected.

Gets latest detected gesture.

Gets touch points count.

Gets gesture hold time in milliseconds.

Gets gesture drag vector.

Gets gesture drag angle.

Gets gesture pinch delta.

Gets gesture pinch angle.

Takes a screenshot of current screen (saved a .png)

Loads model from files (mesh and material).

Weak materials will leak memeory if they are not unlaoded Unload material from GPU memory (VRAM)

Weak models will leak memeory if they are not unlaoded Unload model from GPU memory (VRAM)

Weak model_animations will leak memeory if they are not unlaoded Unload model_animation from GPU memory (VRAM)

Weak meshs will leak memeory if they are not unlaoded Unload mesh from GPU memory (VRAM)

Loads a custom shader and binds default locations.

Loads shader from code strings and binds default locations.

Loads font from file into GPU memory (VRAM).

Loads font from file with extended parameters.

Load font from Image (XNA style)

Loads font data for further use (see also Font::from_data). Now supports .tiff

Gets the default font.

Loads texture from file into GPU memory (VRAM).

Load cubemap from image, multiple image cubemap layouts supported

Loads texture from image data.

Loads texture for rendering (framebuffer).

Weak Textures will leak memeory if they are not unlaoded Unload textures from GPU memory (VRAM)

Weak RenderTextures will leak memeory if they are not unlaoded Unload RenderTextures from GPU memory (VRAM)

Get clipboard text content

Set clipboard text content

Returns a ray trace from mouse position

Returns the screen space position for a 3d world space position

Returns the screen space position for a 2d camera world space position

Returns size position for a 3d world space position

Returns the world space position for a 2d camera screen space position

Set target FPS (maximum)

Returns current FPS

Returns time in seconds for last frame drawn

Returns elapsed time in seconds since InitWindow()

Checks if KEY_ESCAPE or Close icon was pressed.

Checks if window has been initialized successfully.

Checks if window has been minimized (or lost focus).

Checks if window has been resized.

Checks if window has been hidden.

Returns whether or not window is in fullscreen mode

Check if window is currently focused (only PLATFORM_DESKTOP)

Check if cursor is on the current screen.

Set mouse cursor

Toggles fullscreen mode (only on desktop platforms).

Set window configuration state using flags

Clear window configuration state flags

Get the window config state

Sets icon for window (only on desktop platforms).

Sets title for window (only on desktop platforms).

Sets window position on screen (only on desktop platforms).

Sets monitor for the current window (fullscreen mode).

Sets minimum window dimensions (for FLAG_WINDOW_RESIZABLE).

Sets window dimensions.

Gets current screen width.

Gets current screen height.

Get window position

Shows mouse cursor.

Hides mouse cursor.

Checks if mouse cursor is not visible.

Enables mouse cursor (unlock cursor).

Disables mouse cursor (lock cursor).

Get native window handle

Global gui modification functions

Enable gui controls (global state)

Disable gui controls (global state)

Lock gui controls (global state)

Unlock gui controls (global state)

Set gui state (global state)

Get gui state (global state)

Set gui custom font (global state)

Get gui custom font (global state)

Set one style property SHOULD use one of the Gui*Property enums

Get one style property SHOULD use one of the Gui*Property enums

Load style file (.rgs)

Load style default over global style

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.