[][src]Struct winflip::WFApp

pub struct WFApp {
    pub window_width: u32,
    pub window_height: u32,
    pub framebuffer_width: u32,
    pub framebuffer_height: u32,
    pub sample_count: u32,
    pub swap_interval: u32,
    pub dpi_scale: f32,
    pub quit_requested: bool,
    pub quit_ordered: bool,
    pub event_consumed: bool,
    pub window_title: String,
    pub frame_count: u64,
    pub mouse_x: f32,
    pub mouse_y: f32,
    pub win32_mouse_tracked: bool,
    pub onscreen_keyboard_shown: bool,
    pub event: Event,
    pub desc: Desc,
    pub keycodes: [Keycode; 512],
    pub clipboard_enabled: bool,
    pub clipboard_size: usize,
    pub clipboard: Vec<u8>,
}

Basic application context, should be toplevel type where state lives. This is _sapp_state, give or take some. Basically all the window state that isn't part of a particular backend.

Fields

window_width: u32window_height: u32framebuffer_width: u32framebuffer_height: u32sample_count: u32swap_interval: u32dpi_scale: f32quit_requested: boolquit_ordered: boolevent_consumed: boolwindow_title: Stringframe_count: u64mouse_x: f32mouse_y: f32win32_mouse_tracked: boolonscreen_keyboard_shown: boolevent: Eventdesc: Desckeycodes: [Keycode; 512]clipboard_enabled: boolclipboard_size: usizeclipboard: Vec<u8>

Methods

impl WFApp[src]

Most of the _sapp_* functions live here

pub fn call_event(&mut self, e: &Event) -> bool[src]

pub fn new(desc: &Desc) -> Self[src]

pub fn discard_state(&mut self)[src]

TODO: This is basically just Drop

pub fn new_event(&self, typ: EventType) -> Event[src]

pub fn events_enabled(&self) -> bool[src]

pub fn translate_key(&self, scancode: usize) -> Option<Keycode>[src]

TODO: Just use TryFrom?

pub fn frame(&mut self)[src]

Auto Trait Implementations

impl RefUnwindSafe for WFApp

impl Send for WFApp

impl Sync for WFApp

impl Unpin for WFApp

impl UnwindSafe for WFApp

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.