Trait browser_window::prelude::ApplicationExt
source · pub trait ApplicationExt: Clone {
// Required methods
fn assert_correct_thread(&self);
fn dispatch(
&self,
work: fn(_: ApplicationImpl, _: *mut ()),
data: *mut ()
) -> bool;
fn dispatch_delayed(
&self,
work: fn(_: ApplicationImpl, _: *mut ()),
data: *mut (),
delay: Duration
) -> bool;
fn exit(&self, exit_code: i32);
fn exit_threadsafe(&self, exit_code: i32);
fn initialize(
argc: c_int,
argv: *mut *mut c_char,
settings: &ApplicationSettings
) -> Result<ApplicationImpl>;
fn mark_as_done(&self);
fn run(
&self,
on_ready: fn(_: ApplicationImpl, _: *mut ()),
data: *mut ()
) -> i32;
// Provided method
fn free(&self) { ... }
}
Required Methods§
sourcefn assert_correct_thread(&self)
fn assert_correct_thread(&self)
Asserts if not on the GUI thread
sourcefn dispatch(
&self,
work: fn(_: ApplicationImpl, _: *mut ()),
data: *mut ()
) -> bool
fn dispatch( &self, work: fn(_: ApplicationImpl, _: *mut ()), data: *mut () ) -> bool
Dispatches work to be executed on the GUI thread.
sourcefn dispatch_delayed(
&self,
work: fn(_: ApplicationImpl, _: *mut ()),
data: *mut (),
delay: Duration
) -> bool
fn dispatch_delayed( &self, work: fn(_: ApplicationImpl, _: *mut ()), data: *mut (), delay: Duration ) -> bool
Dispatches work to be executed on the GUI thread, but delayed by the specified number of milliseconds.
sourcefn exit_threadsafe(&self, exit_code: i32)
fn exit_threadsafe(&self, exit_code: i32)
Same as exit
, but is thread-safe.
fn initialize( argc: c_int, argv: *mut *mut c_char, settings: &ApplicationSettings ) -> Result<ApplicationImpl>
sourcefn mark_as_done(&self)
fn mark_as_done(&self)
When this is called, the runtime will exit as soon as there are no more windows left.
Provided Methods§
Object Safety§
This trait is not object safe.