Pointer
struct · ferroui-base · v0.5.0
struct Pointer
Identifies a specific input pointer and tracks the element that captures it.
Members
get_next_free_idnewwith_platform_captureplatform_capture_lostcapture_with_sourcecaptured_gesture_recognizercapture_sourceis_gesture_recognition_skippedset_is_gesture_recognition_skippeddispose
get_next_free_id
fn get_next_free_id() -> i32
Returns a pointer identifier that is not in use.
new
fn new(id: i32, type_: PointerType, is_primary: bool) -> Rc<Pointer>
Creates a pointer.
with_platform_capture
fn with_platform_capture(id: i32, type_: PointerType, is_primary: bool, platform_capture: impl Fn(Option<&Ref<InputElement>>) -> () + 'static) -> Rc<Pointer>
Creates a pointer that captures the pointer in the platform through
platform_capture whenever the capturing element changes.
platform_capture_lost
fn platform_capture_lost(self: &Self)
Notifies the pointer that its capture was lost in the platform.
capture_with_source
fn capture_with_source(self: &Self, control: Option<&Ref<InputElement>>, source: CaptureSource)
Captures pointer input to the specified control, on behalf of
source.
captured_gesture_recognizer
fn captured_gesture_recognizer(self: &Self) -> Option<Ref<GestureRecognizer>>
The gesture recognizer that captures the pointer, if any.
capture_source
fn capture_source(self: &Self) -> CaptureSource
What requested the current capture state.
is_gesture_recognition_skipped
fn is_gesture_recognition_skipped(self: &Self) -> bool
Whether gesture recognition is skipped for the pointer until it is released.
set_is_gesture_recognition_skipped
fn set_is_gesture_recognition_skipped(self: &Self, value: bool)
Sets whether gesture recognition is skipped for the pointer.
dispose
fn dispose(self: &Self)
Releases the pointer: its capture is lost and it can no longer be captured.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherIPointer
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.