pub struct Adapter { /* private fields */ }
Implementations§
source§impl Adapter
impl Adapter
sourcepub fn new(
activation_handler: impl 'static + ActivationHandler + Send,
action_handler: impl 'static + ActionHandler + Send,
deactivation_handler: impl 'static + DeactivationHandler + Send,
) -> Self
pub fn new( activation_handler: impl 'static + ActivationHandler + Send, action_handler: impl 'static + ActionHandler + Send, deactivation_handler: impl 'static + DeactivationHandler + Send, ) -> Self
Create a new Unix adapter.
All of the handlers will always be called from another thread.
pub fn set_root_window_bounds(&mut self, outer: Rect, inner: Rect)
sourcepub fn update_if_active(&mut self, update_factory: impl FnOnce() -> TreeUpdate)
pub fn update_if_active(&mut self, update_factory: impl FnOnce() -> TreeUpdate)
If and only if the tree has been initialized, call the provided function
and apply the resulting update. Note: If the caller’s implementation of
ActivationHandler::request_initial_tree
initially returned None
,
the TreeUpdate
returned by the provided function must contain
a full tree.
sourcepub fn update_window_focus_state(&mut self, is_focused: bool)
pub fn update_window_focus_state(&mut self, is_focused: bool)
Update the tree state based on whether the window is focused.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Adapter
impl RefUnwindSafe for Adapter
impl Send for Adapter
impl Sync for Adapter
impl Unpin for Adapter
impl UnwindSafe for Adapter
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more