Struct titanium::desktop::gui::libdruid::Application
pub struct Application { /* private fields */ }
Expand description
The top level application object.
This can be thought of as a reference and it can be safely cloned.
Implementations§
§impl Application
impl Application
pub fn new() -> Result<Application, Error>
pub fn new() -> Result<Application, Error>
pub fn global() -> Application
pub fn global() -> Application
Get the current globally active Application
.
A globally active Application
exists
after new
is called and until run
returns.
Panics
Panics if there is no globally active Application
.
For a non-panicking function use try_global
.
This function will also panic if called from a non-main thread.
pub fn try_global() -> Option<Application>
pub fn try_global() -> Option<Application>
pub fn run(self, handler: Option<Box<dyn AppHandler + 'static, Global>>)
pub fn run(self, handler: Option<Box<dyn AppHandler + 'static, Global>>)
Start the Application
runloop.
The provided handler
will be used to inform of events.
This will consume the Application
and block the current thread
until the Application
has finished executing.
Panics
Panics if the Application
is already running.
pub fn quit(&self)
pub fn quit(&self)
Quit the Application
.
This will cause run
to return control back to the calling function.
pub fn get_locale() -> String
pub fn get_locale() -> String
Returns the current locale string.
This should a Unicode language identifier.
Trait Implementations§
§impl ApplicationExt for Application
impl ApplicationExt for Application
§fn primary_clipboard(&self) -> Clipboard
fn primary_clipboard(&self) -> Clipboard
§impl Clone for Application
impl Clone for Application
§fn clone(&self) -> Application
fn clone(&self) -> Application
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more