pub struct NativeOverlayCapabilities {
pub backend: NativeOverlayBackend,
pub placed: bool,
pub topmost: bool,
pub transparent: bool,
pub non_activating: bool,
pub keyboard_focus_disabled: bool,
pub pointer_pass_through: bool,
}Expand description
Capabilities are returned only after every required overlay invariant is active.
pointer_pass_through describes the selected pointer policy and is not part
of Self::is_fully_effective, because blocking mode is also a valid fully
effective overlay. All other booleans must be true for full effectiveness.
§Examples
use ailloli_ui_winit::native_overlay::{NativeOverlayBackend, NativeOverlayCapabilities};
let partial = NativeOverlayCapabilities {
backend: NativeOverlayBackend::X11,
placed: true,
topmost: false,
transparent: true,
non_activating: true,
keyboard_focus_disabled: true,
pointer_pass_through: true,
};
assert!(!partial.is_fully_effective());Fields§
§backend: NativeOverlayBackendNative backend that established these claims.
placed: boolExact target placement was confirmed.
topmost: boolThe surface is above ordinary application windows.
transparent: boolThe native surface supports alpha transparency.
non_activating: boolShowing the surface does not activate it.
keyboard_focus_disabled: boolKeyboard focus is disabled at the native protocol level.
pointer_pass_through: boolPointer events pass through to underlying surfaces.
Implementations§
Source§impl NativeOverlayCapabilities
Capability construction and invariant checking.
impl NativeOverlayCapabilities
Capability construction and invariant checking.
Sourcepub const fn is_fully_effective(self) -> bool
pub const fn is_fully_effective(self) -> bool
Returns whether placement, z-order, transparency, non-activation, and keyboard-focus suppression are all active.
§Examples
use ailloli_ui_winit::native_overlay::{NativeOverlayBackend, NativeOverlayCapabilities};
let caps = NativeOverlayCapabilities {
backend: NativeOverlayBackend::WaylandLayerShell,
placed: true, topmost: true, transparent: true,
non_activating: true, keyboard_focus_disabled: true,
pointer_pass_through: false,
};
assert!(caps.is_fully_effective());Trait Implementations§
Source§impl Clone for NativeOverlayCapabilities
impl Clone for NativeOverlayCapabilities
Source§fn clone(&self) -> NativeOverlayCapabilities
fn clone(&self) -> NativeOverlayCapabilities
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NativeOverlayCapabilities
impl Debug for NativeOverlayCapabilities
impl Copy for NativeOverlayCapabilities
impl Eq for NativeOverlayCapabilities
impl StructuralPartialEq for NativeOverlayCapabilities
Auto Trait Implementations§
impl Freeze for NativeOverlayCapabilities
impl RefUnwindSafe for NativeOverlayCapabilities
impl Send for NativeOverlayCapabilities
impl Sync for NativeOverlayCapabilities
impl Unpin for NativeOverlayCapabilities
impl UnwindSafe for NativeOverlayCapabilities
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more