pub struct MutableInteractionSource { /* private fields */ }Implementations§
Source§impl MutableInteractionSource
impl MutableInteractionSource
pub fn new() -> Self
pub fn with_runtime(runtime: RuntimeHandle) -> Self
pub fn id(&self) -> u64
pub fn press(&self, press_position: Point) -> PressInteractionPress
pub fn release(&self, press: PressInteractionPress)
pub fn cancel(&self, press: PressInteractionPress)
Sourcepub fn enter_hover(&self) -> HoverInteractionEnter
pub fn enter_hover(&self) -> HoverInteractionEnter
Reports that a pointer came to rest over a node, Compose’s
emit(HoverInteraction.Enter()), and returns the enter to end it
with.
Sourcepub fn exit_hover(&self, enter: HoverInteractionEnter)
pub fn exit_hover(&self, enter: HoverInteractionEnter)
Reports that the pointer enter reported left.
pub fn emit(&self, interaction: Interaction)
Sourcepub fn collectIsPressedAsState(&self) -> State<bool>
pub fn collectIsPressedAsState(&self) -> State<bool>
Returns whether the interaction source is currently pressed as a
reactive State.
Mirrors Jetpack Compose: InteractionSource.collectIsPressedAsState().
The value flips to true when a PressInteraction::Press is emitted
and back to false once every active press has seen a matching
PressInteraction::Release or PressInteraction::Cancel. Reading the
returned state inside a composable subscribes the enclosing recompose
scope, so the composable recomposes whenever the pressed state changes.
Sourcepub fn collectIsHoveredAsState(&self) -> State<bool>
pub fn collectIsHoveredAsState(&self) -> State<bool>
Returns whether a pointer rests over a node of this source as a
reactive State: true from a HoverInteraction::Enter until
every enter has seen its HoverInteraction::Exit.
Mirrors Jetpack Compose: InteractionSource.collectIsHoveredAsState().
pub fn collectLastInteractionAsState(&self) -> State<Option<Interaction>>
Trait Implementations§
Source§impl Clone for MutableInteractionSource
impl Clone for MutableInteractionSource
impl Copy for MutableInteractionSource
Source§impl Debug for MutableInteractionSource
impl Debug for MutableInteractionSource
Source§impl Default for MutableInteractionSource
impl Default for MutableInteractionSource
impl Eq for MutableInteractionSource
Auto Trait Implementations§
impl Freeze for MutableInteractionSource
impl RefUnwindSafe for MutableInteractionSource
impl Send for MutableInteractionSource
impl Sync for MutableInteractionSource
impl Unpin for MutableInteractionSource
impl UnsafeUnpin for MutableInteractionSource
impl UnwindSafe for MutableInteractionSource
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
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