pub enum Action {
PointerTargetChanged {
old: Option<ElementId>,
new: Option<ElementId>,
},
PointerButton {
target: Option<ElementId>,
pos: Point,
pressed: bool,
},
Chrome(ChromeAction),
}Expand description
Legacy/provider-facing input action summary.
Runtime event routing primarily dispatches widget events directly; this enum remains a compact description for pointer target/button and window-chrome actions. Positions are logical pixels.
§Examples
use ailloli_ui_core::{ElementId, Point};
use ailloli_ui_runtime::input::Action;
let action = Action::PointerButton { target: Some(ElementId(1)), pos: Point::new(2.0, 3.0), pressed: true };
assert!(matches!(action, Action::PointerButton { pressed: true, .. }));Variants§
PointerTargetChanged
Mouse/pointer hover target changed.
Fields
PointerButton
Pointer button transition at a logical position.
Fields
§
pos: PointWindow-space logical-pixel position.
Chrome(ChromeAction)
Provider-neutral window chrome request.
Trait Implementations§
impl StructuralPartialEq for Action
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnwindSafe for Action
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<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
Source§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.