Module rokol::app[][src]

Application (FFI)

crate::Rokol::run runs an implementation of RApp.

Structs

Mod

Rokol modifier keys as bitflags

Enums

EventType

Type of rokol::app::Event

Key

rokol::app keycode

Mouse

rokol::app mouse input

Traits

RApp

rokol::app callbacks

RAppFfiCallback

rokol::app callbacks for C

Functions

cancel_quit

Cancel a pending quit (when SAPP_EVENTTYPE_QUIT_REQUESTED has been received)

clipboard

(Clipboard) Read string from clipboard (usually during SAPP_EVENTTYPE_CLIPBOARD_PASTED)

color_fmt

TODO: use crate::gfx::PixelFormat as return value

consume_event

Call from inside event callback to consume the current event (don't forward to platform)

depth_format

TODO: use crate::gfx::PixelFormat

dpi_scale

Dpi scaling factor (window pixels to framebuffer pixels)

dropped_file_path

(Drag) The dropped file paths

frame_count

Current frame counter (for comparison with sapp_event.frame_count)

height

Height of the current frame buffer in pixels

height_f
is_fullscreen
is_high_dpi

True when high_dpi was requested and actually running in a high-dpi scenario

is_kbd_shown

(Mobile) True if the mobile device onscreen keyboard is currently shown

is_mouse_locked

True if in mouse-pointer-lock mode (this may toggle a few frames later)

is_mouse_shown

Show or hide the mouse cursor

is_valid

Returns true after Rokol app is initialized

n_dropped_files

(Drag) The total number of dropped files (after an SAPP_EVENTTYPE_FILES_DROPPED event)

quit

Initiate a "hard quit" (quit application without sending SAPP_EVENTTYPE_QUIT_REQUSTED)

request_quit

Initiate a "soft quit" (sends SAPP_EVENTTYPE_QUIT_REQUESTED)

sample_count

Default frame buffer count

set_clipboard

(Clipboard) Write string into clipboard

set_lock_mouse
set_show_kbd

(Mobile) Show or hide the mobile device onscreen keyboard

set_show_mouse

Show or hide the mouse cursor

set_win_title

(Desktop) Set the window title (only on desktop platforms)

size

(Non-Sokol) size of the current frame buffer in pixels

size_f

(Non-Sokol) size of the current frame buffer in pixels

size_f_scaled

(Non-Sokol) size of the window (not the frame buffer)

size_scaled

(Non-Sokol) size of the window (not the frame buffer)

toggle_fullscreen
width

Width of the current frame buffer in pixels

width_f

Type Definitions

Event

rokol::app application event

TouchPoint

rokol::app touch input