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.
Sourcepub fn set_root_window_bounds(&mut self, outer: Rect, inner: Rect)
pub fn set_root_window_bounds(&mut self, outer: Rect, inner: Rect)
Set the bounds of the top-level window. The outer bounds contain any window decoration and borders.
§Caveats
Since an application can not get the position of its window under Wayland, calling this method only makes sense under X11.
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