Struct accesskit_winit::Adapter
source · pub struct Adapter { /* private fields */ }
Implementations§
source§impl Adapter
impl Adapter
pub fn new<T: From<ActionRequestEvent> + Send + 'static>(
window: &Window,
source: impl 'static + FnOnce() -> TreeUpdate + Send,
event_loop_proxy: EventLoopProxy<T>
) -> Self
sourcepub fn with_action_handler(
window: &Window,
source: impl 'static + FnOnce() -> TreeUpdate + Send,
action_handler: Box<dyn ActionHandler>
) -> Self
pub fn with_action_handler(
window: &Window,
source: impl 'static + FnOnce() -> TreeUpdate + Send,
action_handler: Box<dyn ActionHandler>
) -> Self
Use this if you need to provide your own AccessKit action handler rather than dispatching action requests through the winit event loop. Remember that an AccessKit action handler can be called on any thread, depending on the underlying AccessKit platform adapter.