Trait slint::platform::EventLoopProxy

pub trait EventLoopProxy: Send + Sync {
    // Required methods
    fn quit_event_loop(&self) -> Result<(), EventLoopError>;
    fn invoke_from_event_loop(
        &self,
        event: Box<dyn FnOnce() + Send>
    ) -> Result<(), EventLoopError>;
}
Expand description

Trait that is returned by the Platform::new_event_loop_proxy

This are the implementation details for the function that may need to communicate with the eventloop from different thread

Required Methods§

fn quit_event_loop(&self) -> Result<(), EventLoopError>

Exits the event loop.

This is what is called by slint::quit_event_loop()

fn invoke_from_event_loop( &self, event: Box<dyn FnOnce() + Send> ) -> Result<(), EventLoopError>

Invoke the function from the event loop.

This is what is called by slint::invoke_from_event_loop()

Implementors§