Function x11rb::protocol::shm::attach_fd

source ·
pub fn attach_fd<Conn, A>(
    conn: &Conn,
    shmseg: Seg,
    shm_fd: A,
    read_only: bool
) -> Result<VoidCookie<'_, Conn>, ConnectionError>
Expand description

Create a shared memory segment.

Create a shared memory segment. The file descriptor will be mapped at offset zero, and the size will be obtained using fstat(). A zero size will result in a Value error.

§Fields

  • shmseg - A shared memory segment ID created with xcb_generate_id().
  • shm_fd - The file descriptor the server should mmap().
  • read_only - True if the segment shall be mapped read only by the X11 server, otherwise false.