MouseDevice
struct · ferroui-base · v0.5.0
struct MouseDevice
Represents a mouse device: turns raw pointer events into routed pointer events on the element under the pointer or capturing it.
Members
new
fn new() -> Rc<MouseDevice>
Creates a mouse device with a pointer of its own.
with_pointer
fn with_pointer(pointer: Rc<Pointer>) -> Rc<MouseDevice>
Creates a mouse device for an existing pointer.
primary
fn primary() -> Rc<MouseDevice>
The primary mouse device of the current thread, created on first use.
reset_primary_for_unit_tests
fn reset_primary_for_unit_tests()
Forgets the primary mouse device, so that tests start with a fresh one.
pointer
fn pointer(self: &Self) -> &Rc<Pointer>
The pointer of the mouse.
dispose
fn dispose(self: &Self)
Releases the mouse device and its pointer.
platform_capture_lost
fn platform_capture_lost(self: &Self)
Notifies the device that the capture of its pointer was lost in the platform.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherIInputDeviceIPointerDeviceIMouseDevice
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.