Struct reverie_engine_opengl::window::CursorPosition
source · pub struct CursorPosition<O> {
pub x: i32,
pub y: i32,
/* private fields */
}
Fields§
§x: i32
§y: i32
Implementations§
source§impl CursorPosition<DesktopOrigin>
impl CursorPosition<DesktopOrigin>
pub fn to_window_origin( &self, window_x: i32, window_y: i32 ) -> CursorPosition<WindowOrigin>
pub fn to_window_center( &self, window_x: i32, window_y: i32, window_width: i32, window_height: i32 ) -> CursorPosition<WindowCenter>
Trait Implementations§
source§impl<O: Clone> Clone for CursorPosition<O>
impl<O: Clone> Clone for CursorPosition<O>
source§fn clone(&self) -> CursorPosition<O>
fn clone(&self) -> CursorPosition<O>
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 moresource§impl<O: Debug> Debug for CursorPosition<O>
impl<O: Debug> Debug for CursorPosition<O>
source§impl<O: PartialEq> PartialEq for CursorPosition<O>
impl<O: PartialEq> PartialEq for CursorPosition<O>
source§fn eq(&self, other: &CursorPosition<O>) -> bool
fn eq(&self, other: &CursorPosition<O>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<O: Copy> Copy for CursorPosition<O>
impl<O: Eq> Eq for CursorPosition<O>
impl<O> StructuralPartialEq for CursorPosition<O>
Auto Trait Implementations§
impl<O> Freeze for CursorPosition<O>
impl<O> RefUnwindSafe for CursorPosition<O>where
O: RefUnwindSafe,
impl<O> Send for CursorPosition<O>where
O: Send,
impl<O> Sync for CursorPosition<O>where
O: Sync,
impl<O> Unpin for CursorPosition<O>where
O: Unpin,
impl<O> UnwindSafe for CursorPosition<O>where
O: UnwindSafe,
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.