[−][src]Struct wlroots::output::Cursor
Methods
impl Cursor[src]
impl Cursorpub fn new(output: &mut Output) -> Option<Cursor>[src]
pub fn new(output: &mut Output) -> Option<Cursor>Creates a new output::Cursor that's bound to the given Output.
When the Output is destroyed each call will return an Error.
Ergonomics
To make this easier for you, I would suggest putting the output::Cursor in your
OutputHandler implementor's state so that when the Output is removed you
just don't have to think about it and it will clean itself up by itself.
pub fn output(&self) -> Handle[src]
pub fn output(&self) -> HandleReturn a copy of the output handle used by this cursor.
There are no guarantees that it is valid to use.
pub fn set_image(&mut self, image: &Image) -> HandleResult<bool>[src]
pub fn set_image(&mut self, image: &Image) -> HandleResult<bool>Sets the hardware cursor's image.
pub fn set_surface<'a, T>(
&mut self,
surface: T,
hotspot_x: i32,
hotspot_y: i32
) -> HandleResult<()> where
T: Into<Option<&'a Surface>>, [src]
pub fn set_surface<'a, T>(
&mut self,
surface: T,
hotspot_x: i32,
hotspot_y: i32
) -> HandleResult<()> where
T: Into<Option<&'a Surface>>, Sets the hardware cursor's surface.
pub fn move_to(&mut self, x: f64, y: f64) -> HandleResult<bool>[src]
pub fn move_to(&mut self, x: f64, y: f64) -> HandleResult<bool>Moves the hardware cursor to the desired location
pub fn coords(&self) -> (f64, f64)[src]
pub fn coords(&self) -> (f64, f64)Get the coordinates of the cursor.
Returned value is in (x, y) format.
pub fn enabled(&self) -> bool[src]
pub fn enabled(&self) -> boolDetermines if the hardware cursor is enabled or not.
pub fn visible(&self) -> bool[src]
pub fn visible(&self) -> boolDetermines if the hardware cursor is visible or not.
pub fn size(&self) -> (u32, u32)[src]
pub fn size(&self) -> (u32, u32)Gets the width and height of the hardware cursor.
Returned value is in (width, height) format.
pub fn hotspots(&self) -> (i32, i32)[src]
pub fn hotspots(&self) -> (i32, i32)Gets the hotspot coordinates of the hardware cursor.
Returned value is in (x, y) coordinates.
pub fn texture<'surface>(&'surface self) -> Option<Texture<'surface>>[src]
pub fn texture<'surface>(&'surface self) -> Option<Texture<'surface>>Gets the texture for the cursor, if a software cursor is used without a surface.
pub fn surface(&self) -> Option<Handle>[src]
pub fn surface(&self) -> Option<Handle>Gets the surface for the cursor, if using a cursor surface.
Trait Implementations
impl Drop for Cursor[src]
impl Drop for Cursorimpl Eq for Cursor[src]
impl Eq for Cursorimpl PartialEq<Cursor> for Cursor[src]
impl PartialEq<Cursor> for Cursorfn eq(&self, other: &Cursor) -> bool[src]
fn eq(&self, other: &Cursor) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Cursor) -> bool[src]
fn ne(&self, other: &Cursor) -> boolThis method tests for !=.
impl Debug for Cursor[src]
impl Debug for CursorAuto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more