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>
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<()>
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<()>
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
Pointer to the underlying wayland proxy object
unsafe fn from_ptr_new(ptr: *mut wl_proxy) -> WlShmPool
Create an instance from a wayland pointer Read more
unsafe fn from_ptr_initialized(ptr: *mut wl_proxy) -> WlShmPool
Create an instance from a wayland pointer Read more
fn interface_ptr() -> *const wl_interface
Pointer to the interface representation
fn interface_name() -> &'static str
Internal wayland name of this interface
fn supported_version() -> u32
Max version of this interface supported
fn version(&self) -> u32
Current version of the interface this proxy is instanciated with
fn is_alive(&self) -> bool
Check if the proxt behind this handle is actually still alive
fn equals(&self, other: &WlShmPool) -> bool
Check of two handles are actually the same wayland object Read more
fn set_user_data(&self, ptr: *mut ())
Set a pointer associated as user data on this proxy Read more
fn get_user_data(&self) -> *mut ()
Get the pointer associated as user data on this proxy Read more