Struct wayland_client::protocol::wl_shm_pool::WlShmPool
[−]
[src]
pub struct WlShmPool { /* fields omitted */ }
Methods
impl WlShmPool
[src]
fn create_buffer(
&self,
offset: i32,
width: i32,
height: i32,
stride: i32,
format: Format
) -> RequestResult<WlBuffer>
[src]
&self,
offset: i32,
width: i32,
height: i32,
stride: i32,
format: Format
) -> RequestResult<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.
fn destroy(&self) -> RequestResult<()>
[src]
destroy the pool
Destroy the shared memory pool.
The mmapped memory will be released when all buffers that have been created from this pool are gone.
This is a destructor, you cannot send requests to this object once this method is called.
fn resize(&self, size: i32) -> RequestResult<()>
[src]
change the size of the pool mapping
This request will cause the server to remap the backing memory for the pool from the file descriptor passed when the pool was created, but using the new size. This request can only be used to make the pool bigger.
Trait Implementations
impl Send for WlShmPool
[src]
impl Sync for WlShmPool
[src]
impl Proxy for WlShmPool
[src]
fn ptr(&self) -> *mut wl_proxy
[src]
Pointer to the underlying wayland proxy object
unsafe fn from_ptr_new(ptr: *mut wl_proxy) -> WlShmPool
[src]
Create an instance from a wayland pointer Read more
unsafe fn from_ptr_initialized(ptr: *mut wl_proxy) -> WlShmPool
[src]
Create an instance from a wayland pointer Read more
fn interface_ptr() -> *const wl_interface
[src]
Pointer to the interface representation
fn interface_name() -> &'static str
[src]
Internal wayland name of this interface
fn supported_version() -> u32
[src]
Max version of this interface supported
fn version(&self) -> u32
[src]
Current version of the interface this proxy is instantiated with
fn status(&self) -> Liveness
[src]
Check if the proxy behind this handle is actually still alive
fn equals(&self, other: &WlShmPool) -> bool
[src]
Check of two handles are actually the same wayland object Read more
fn set_user_data(&self, ptr: *mut ())
[src]
Set a pointer associated as user data on this proxy Read more
fn get_user_data(&self) -> *mut ()
[src]
Get the pointer associated as user data on this proxy Read more
unsafe fn clone_unchecked(&self) -> WlShmPool
[src]
Unsafely clone this proxy handle Read more
fn clone(&self) -> Option<Self> where
Self: Sized,
[src]
Self: Sized,
Clone this proxy handle Read more