Trait sixtyfps_corelib::backend::Backend [−][src]
pub trait Backend: Send + Sync { fn create_window(&'static self) -> ComponentWindow; fn run_event_loop(&'static self, behavior: EventLoopQuitBehavior); fn quit_event_loop(&'static self); fn register_font_from_memory(
&'static self,
data: &[u8]
) -> Result<(), Box<dyn Error>>; fn register_font_from_path(
&'static self,
path: &Path
) -> Result<(), Box<dyn Error>>; fn set_clipboard_text(&'static self, text: String); fn clipboard_text(&'static self) -> Option<String>; fn post_event(&'static self, event: Box<dyn FnOnce() + Send>); }
Interface implemented by backends
Required methods
fn create_window(&'static self) -> ComponentWindow
[src]
Instentiate a window for a component.
FIXME: should return a Box
fn run_event_loop(&'static self, behavior: EventLoopQuitBehavior)
[src]
Spins an event loop and renders the visible windows.
fn quit_event_loop(&'static self)
[src]
Exits the event loop.
fn register_font_from_memory(
&'static self,
data: &[u8]
) -> Result<(), Box<dyn Error>>
[src]
&'static self,
data: &[u8]
) -> Result<(), Box<dyn Error>>
This function can be used to register a custom TrueType font with SixtyFPS,
for use with the font-family
property. The provided slice must be a valid TrueType
font.
fn register_font_from_path(
&'static self,
path: &Path
) -> Result<(), Box<dyn Error>>
[src]
&'static self,
path: &Path
) -> Result<(), Box<dyn Error>>
This function can be used to register a custom TrueType font with SixtyFPS,
for use with the font-family
property. The provided path must refer to a valid TrueType
font.
fn set_clipboard_text(&'static self, text: String)
[src]
fn clipboard_text(&'static self) -> Option<String>
[src]
fn post_event(&'static self, event: Box<dyn FnOnce() + Send>)
[src]
Send an user event to from another thread that should be run in the GUI event loop