pub struct App {
pub events: Rc<RefCell<Vec<AppEvent>>>,
/* private fields */
}
Expand description
the main application struct
Fields§
§events: Rc<RefCell<Vec<AppEvent>>>
Implementations§
source§impl App
impl App
sourcepub fn get_screen_resolution(&self) -> (u32, u32)
pub fn get_screen_resolution(&self) -> (u32, u32)
return the screen resolution in physical pixels
sourcepub fn get_params() -> Vec<String>
pub fn get_params() -> Vec<String>
return the command line / URL parameters
sourcepub fn set_fullscreen(&mut self, b: bool)
pub fn set_fullscreen(&mut self, b: bool)
activate or deactivate fullscreen. only works on native target
sourcepub fn print<T: Into<String>>(msg: T)
pub fn print<T: Into<String>>(msg: T)
print a message on standard output (native) or js console (web)
sourcepub fn hidpi_factor(&self) -> f32
pub fn hidpi_factor(&self) -> f32
returns the HiDPI factor for current screen
sourcepub fn canvas<'p>(&'p self) -> Box<dyn FnMut(&str) -> *const c_void + 'p>
pub fn canvas<'p>(&'p self) -> Box<dyn FnMut(&str) -> *const c_void + 'p>
return the opengl context for this window