[−][src]Struct druid::Application
The top level application object.
This can be thought of as a reference and it can be safely cloned.
Implementations
impl Application
[src]
pub fn new() -> Result<Application, Error>
[src]
Create a new Application
.
Errors
Errors if an Application
has already been created.
This may change in the future. See druid#771 for discussion.
pub fn global() -> Application
[src]
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>
[src]
Get the current globally active Application
.
A globally active Application
exists
after new
is called and until run
returns.
Panics
Panics if called from a non-main thread.
pub fn run(self, handler: Option<Box<dyn AppHandler + 'static, Global>>)
[src]
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)
[src]
Quit the Application
.
This will cause run
to return control back to the calling function.
pub fn hide(&self)
[src]
Hide the application this window belongs to. (cmd+H)
pub fn hide_others(&self)
[src]
Hide all other applications. (cmd+opt+H)
pub fn clipboard(&self) -> Clipboard
[src]
Returns a handle to the system clipboard.
pub fn get_locale() -> String
[src]
Returns the current locale string.
This should a Unicode language identifier.
Trait Implementations
impl Clone for Application
[src]
pub fn clone(&self) -> Application
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for Application
[src]
impl !Send for Application
[src]
impl !Sync for Application
[src]
impl Unpin for Application
[src]
impl !UnwindSafe for Application
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> RoundFrom<T> for T
pub fn round_from(x: T) -> T
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
U: RoundFrom<T>,
pub fn round_into(self) -> U
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub 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>,