Struct wayland_cursor::CursorImageBuffer
source · pub struct CursorImageBuffer {
pub(crate) buffer: WlBuffer,
pub(crate) delay: u32,
pub(crate) xhot: u32,
pub(crate) yhot: u32,
pub(crate) width: u32,
pub(crate) height: u32,
}
Expand description
A buffer containing a cursor image.
You can access the WlBuffer
via Deref
.
Note that this buffer is internally managed by wayland-cursor, as such you should
not try to act on it beyond assigning it to wl_surface
s.
Fields§
§buffer: WlBuffer
§delay: u32
§xhot: u32
§yhot: u32
§width: u32
§height: u32
Implementations§
source§impl CursorImageBuffer
impl CursorImageBuffer
sourcepub(crate) fn new(
conn: &Connection,
theme: &mut CursorTheme,
image: &XCursorImage,
) -> Self
pub(crate) fn new( conn: &Connection, theme: &mut CursorTheme, image: &XCursorImage, ) -> Self
Construct a new CursorImageBuffer
This function appends the pixels of the image to the provided file, and constructs a wl_buffer on that data.
sourcepub fn dimensions(&self) -> (u32, u32)
pub fn dimensions(&self) -> (u32, u32)
Dimensions of this image
Methods from Deref<Target = WlBuffer>§
Trait Implementations§
source§impl Clone for CursorImageBuffer
impl Clone for CursorImageBuffer
source§fn clone(&self) -> CursorImageBuffer
fn clone(&self) -> CursorImageBuffer
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 Debug for CursorImageBuffer
impl Debug for CursorImageBuffer
Auto Trait Implementations§
impl Freeze for CursorImageBuffer
impl !RefUnwindSafe for CursorImageBuffer
impl Send for CursorImageBuffer
impl Sync for CursorImageBuffer
impl Unpin for CursorImageBuffer
impl !UnwindSafe for CursorImageBuffer
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.