pub enum WindowEventDispatchResult {
Accepted,
Rejected,
Ignored,
}Expand description
Result of dispatching a window event through Slint’s runtime.
For pointer events (PointerPressed, PointerReleased, PointerMoved,
PointerScrolled), the mapping is:
Accepted— an item consumed the event (returnedEventAccepted,GrabMouse, orStartDrag; or, for a drag in flight, aDropAreaaccepted the rewrittenDragMove/Drop).Ignored— the event reached no item that wanted it, or there was no component to dispatch to. Hover-only handling (e.g. aTouchAreathat updateshas-hoveronPointerMovedwithout otherwise consuming) is reported asIgnored.
PointerExited is a teardown
event: the runtime always acts on it, so it is reported as Accepted even
when no item was under the cursor.
Variants§
Accepted
A receiver handled the event (e.g. a key handler consumed it, or the runtime acted on a resize / scale / close).
Rejected
A receiver actively refused the event (e.g. a close-requested callback
prevented the window from closing).
Ignored
The event fell through without being handled (e.g. a key event with no matching handler, or a pointer event that no item consumed).
Trait Implementations§
Source§impl Clone for WindowEventDispatchResult
impl Clone for WindowEventDispatchResult
Source§fn clone(&self) -> WindowEventDispatchResult
fn clone(&self) -> WindowEventDispatchResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WindowEventDispatchResult
Source§impl Debug for WindowEventDispatchResult
impl Debug for WindowEventDispatchResult
impl Eq for WindowEventDispatchResult
Source§impl From<KeyEventResult> for WindowEventDispatchResult
impl From<KeyEventResult> for WindowEventDispatchResult
Source§fn from(value: KeyEventResult) -> Self
fn from(value: KeyEventResult) -> Self
Converts to this type from the input type.
Source§impl From<Option<MouseDispatchResult>> for WindowEventDispatchResult
impl From<Option<MouseDispatchResult>> for WindowEventDispatchResult
Source§fn from(value: Option<MouseDispatchResult>) -> Self
fn from(value: Option<MouseDispatchResult>) -> Self
None (no component to dispatch to) and accepted: false both map to Ignored.
Source§impl PartialEq for WindowEventDispatchResult
impl PartialEq for WindowEventDispatchResult
Source§fn eq(&self, other: &WindowEventDispatchResult) -> bool
fn eq(&self, other: &WindowEventDispatchResult) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for WindowEventDispatchResult
Auto Trait Implementations§
impl Freeze for WindowEventDispatchResult
impl RefUnwindSafe for WindowEventDispatchResult
impl Send for WindowEventDispatchResult
impl Sync for WindowEventDispatchResult
impl Unpin for WindowEventDispatchResult
impl UnsafeUnpin for WindowEventDispatchResult
impl UnwindSafe for WindowEventDispatchResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.