Struct freya::prelude::events::PointerData
source · pub struct PointerData {
pub screen_coordinates: Point2D<f64, Measure>,
pub element_coordinates: Point2D<f64, Measure>,
pub point_type: PointerType,
}Expand description
Data of a Mouse event.
Fields§
§screen_coordinates: Point2D<f64, Measure>§element_coordinates: Point2D<f64, Measure>§point_type: PointerTypeImplementations§
source§impl PointerData
impl PointerData
pub fn new( screen_coordinates: Point2D<f64, Measure>, element_coordinates: Point2D<f64, Measure>, point_type: PointerType ) -> PointerData
source§impl PointerData
impl PointerData
sourcepub fn get_screen_coordinates(&self) -> Point2D<f64, Measure>
pub fn get_screen_coordinates(&self) -> Point2D<f64, Measure>
Get the mouse coordinates relative to the window bounds.
sourcepub fn get_element_coordinates(&self) -> Point2D<f64, Measure>
pub fn get_element_coordinates(&self) -> Point2D<f64, Measure>
Get the mouse coordinates relatives to the element bounds.
sourcepub fn get_pointer_type(&self) -> PointerType
pub fn get_pointer_type(&self) -> PointerType
Get the pointer type that triggered this event.
Trait Implementations§
source§impl Clone for PointerData
impl Clone for PointerData
source§fn clone(&self) -> PointerData
fn clone(&self) -> PointerData
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl RefUnwindSafe for PointerData
impl Send for PointerData
impl Sync for PointerData
impl Unpin for PointerData
impl UnwindSafe for PointerData
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer