xcb\_shm\_create\_pixmap(3) XCB Requests xcb\_shm\_create\_pixmap(3)

# [NAME](#NAME)

xcb\_shm\_create\_pixmap - Create a pixmap backed by shared memory.

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;xcb/shm.h&gt;**

## [Request function](#Request_function)

xcb\_void\_cookie\_t **xcb\_shm\_create\_pixmap**(xcb\_connection\_t \**conn*, xcb\_pixmap\_t *pid*, xcb\_drawable\_t *drawable*, uint16\_t *width*, uint16\_t *height*, uint8\_t *depth*, xcb\_shm\_seg\_t *shmseg*, uint32\_t *offset*);

# [REQUEST ARGUMENTS](#REQUEST_ARGUMENTS)

[*conn*](#conn)

The XCB connection to X11.

[*pid*](#pid)

A pixmap ID created with xcb\_generate\_id().

[*drawable*](#drawable)

The drawable to create the pixmap in.

[*width*](#width)

The width of the pixmap to create. Must be nonzero, or a Value error results.

[*height*](#height)

The height of the pixmap to create. Must be nonzero, or a Value error results.

[*depth*](#depth)

The depth of the pixmap to create. Must be nonzero, or a Value error results.

[*shmseg*](#shmseg)

The shared memory segment to use to create the pixmap.

[*offset*](#offset)

The offset in the segment to create the pixmap at.

# [DESCRIPTION](#DESCRIPTION)

Create a pixmap backed by shared memory. Writes to the shared memory will be reflected in the contents of the pixmap, and writes to the pixmap will be reflected in the contents of the shared memory.

# [RETURN VALUE](#RETURN_VALUE)

Returns an *xcb\_void\_cookie\_t*. Errors (if any) have to be handled in the event loop.

If you want to handle errors directly with *xcb\_request\_check* instead, use *xcb\_shm\_create\_pixmap\_checked*. See [**xcb-requests(3)**](/man/os/libxcb/xcb-requests.3) for details.

# [ERRORS](#ERRORS)

This request does never generate any errors.

# [SEE ALSO](#SEE_ALSO)

[**xcb-requests**(3)](/man/os/libxcb/xcb-requests.3)

# [AUTHOR](#AUTHOR)

Generated from shm.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.

libxcb 1.17.0 X Version 11

---

Document: xcb_shm_create_pixmap_checked(3) from libxcb 1.17.0-r18 (Chainguard OS)
Source: https://gitlab.freedesktop.org/xorg/lib/libxcb.git
