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
pub fn get_dropped_file(&mut self) -> Option<File>
Auto Trait Implementations§
impl !Freeze for App
impl !RefUnwindSafe for App
impl !Send for App
impl !Sync for App
impl !UnwindSafe for App
impl Unpin for App
impl UnsafeUnpin for App
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more