Struct wayland_client::protocol::wl_shm_pool::WlShmPool
source · pub struct WlShmPool(/* private fields */);
Implementations§
source§impl WlShmPool
impl WlShmPool
sourcepub fn create_buffer(
&self,
offset: i32,
width: i32,
height: i32,
stride: i32,
format: Format
) -> Main<WlBuffer>
pub fn create_buffer( &self, offset: i32, width: i32, height: i32, stride: i32, format: Format ) -> Main<WlBuffer>
create a buffer from the pool
Create a wl_buffer object from the pool.
The buffer is created offset bytes into the pool and has width and height as specified. The stride argument specifies the number of bytes from the beginning of one row to the beginning of the next. The format is the pixel format of the buffer and must be one of those advertised through the wl_shm.format event.
A buffer will keep a reference to the pool it was created from so it is valid to destroy the pool immediately after creating a buffer from it.
Trait Implementations§
source§impl Interface for WlShmPool
impl Interface for WlShmPool
source§fn c_interface() -> *const wl_interface
fn c_interface() -> *const wl_interface
Pointer to the C representation of this interface
source§impl PartialEq for WlShmPool
impl PartialEq for WlShmPool
impl Eq for WlShmPool
impl StructuralEq for WlShmPool
impl StructuralPartialEq for WlShmPool
Auto Trait Implementations§
impl !RefUnwindSafe for WlShmPool
impl Send for WlShmPool
impl Sync for WlShmPool
impl Unpin for WlShmPool
impl !UnwindSafe for WlShmPool
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