[−][src]Struct uni_app::sys::App
the main application struct
Fields
events: Rc<RefCell<Vec<AppEvent>>>
Methods
impl App
[src]
pub fn new(config: AppConfig) -> App
[src]
create a new game window
pub fn get_params() -> Vec<String>
[src]
return the command line / URL parameters
pub fn set_fullscreen(&self, b: bool)
[src]
activate or deactivate fullscreen. only works on native target
pub fn print<T: Into<String>>(msg: T)
[src]
print a message on standard output (native) or js console (web)
pub fn exit()
[src]
exit current process (close the game window). On web target, this does nothing.
pub fn hidpi_factor(&self) -> f32
[src]
returns the HiDPI factor for current screen
pub fn canvas<'p>(&'p self) -> Box<dyn FnMut(&str) -> *const c_void + 'p>
[src]
return the opengl context for this window
pub fn poll_events<F>(&mut self, callback: F) -> bool where
F: FnOnce(&mut Self),
[src]
F: FnOnce(&mut Self),
pub fn run<'a, F>(self, callback: F) where
F: FnMut(&mut Self),
[src]
F: FnMut(&mut Self),
start the game loop, calling provided callback every frame
Auto Trait Implementations
impl !Send for App
impl !Sync for App
impl Unpin for App
impl !UnwindSafe for App
impl !RefUnwindSafe for App
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T> Downcast for T where
T: Any,
T: Any,