Struct wayland_client::core::shm::Shm [] [src]

pub struct Shm {
    // some fields omitted
}

The shared memory controller.

This object can be queried for memory_pools used for the buffers.

Like other global objects, this handle can be cloned.

Methods

impl Shm

fn pool_from_fd<F: AsRawFd>(&self, fd: &F, size: i32) -> ShmPool

Creates a shared memory pool from given file descriptor.

The server will internally mmap the sepcified size number of bytes from this file descriptor. The created ShmPool will have access to these bytes exactly.

fn pool_from_raw_fd(&self, fd: c_int, size: i32) -> ShmPool

Creates a sahred memory pool from given raw file descriptor.

Same as pool_from_fd(..) otherwise

Trait Implementations

impl Bind<Registry> for Shm

fn interface() -> &'static wl_interface

unsafe fn wrap(ptr: *mut wl_shm, registry: Registry) -> Shm

impl FFI for Shm

type Ptr = wl_shm

fn ptr(&self) -> *const wl_shm

unsafe fn ptr_mut(&self) -> *mut wl_shm

Derived Implementations

impl Clone for Shm

fn clone(&self) -> Shm

fn clone_from(&mut self, source: &Self)