Struct wayland_server::protocol::wl_shm_pool::Implementation
[−]
[src]
pub struct Implementation<ID> {
pub create_buffer: fn(_: &mut EventLoopHandle, _: &mut ID, _: &Client, _: &WlShmPool, _: WlBuffer, _: i32, _: i32, _: i32, _: i32, _: Format),
pub destroy: fn(_: &mut EventLoopHandle, _: &mut ID, _: &Client, _: &WlShmPool),
pub resize: fn(_: &mut EventLoopHandle, _: &mut ID, _: &Client, _: &WlShmPool, _: i32),
}Fields
create_buffer: fn(_: &mut EventLoopHandle, _: &mut ID, _: &Client, _: &WlShmPool, _: WlBuffer, _: i32, _: i32, _: i32, _: i32, _: Format)
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.
Arguments: event_queue_handle, interface_data, client, wl_shm_pool, id, offset, width, height, stride, format
destroy: fn(_: &mut EventLoopHandle, _: &mut ID, _: &Client, _: &WlShmPool)
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.
Arguments: event_queue_handle, interface_data, client, wl_shm_pool
This is a destructor, you cannot send events to this object once this method is called.
resize: fn(_: &mut EventLoopHandle, _: &mut ID, _: &Client, _: &WlShmPool, _: i32)
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.
Arguments: event_queue_handle, interface_data, client, wl_shm_pool, size
Trait Implementations
impl<ID> Copy for Implementation<ID>[src]
impl<ID> Clone for Implementation<ID>[src]
fn clone(&self) -> Implementation<ID>[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more