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

# [NAME](#NAME)

xcb\_create\_pixmap - Creates a pixmap

# [SYNOPSIS](#SYNOPSIS)

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

## [Request function](#Request_function)

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

# [REQUEST ARGUMENTS](#REQUEST_ARGUMENTS)

[*conn*](#conn)

The XCB connection to X11.

[*depth*](#depth)

TODO

[*pid*](#pid)

The ID with which you will refer to the new pixmap, created by *xcb\_generate\_id*.

[*drawable*](#drawable)

Drawable to get the screen from.

[*width*](#width)

The width of the new pixmap.

[*height*](#height)

The height of the new pixmap.

# [DESCRIPTION](#DESCRIPTION)

Creates a pixmap. The pixmap can only be used on the same screen as *drawable* is on and only with drawables of the same *depth*.

# [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\_create\_pixmap\_checked*. See [**xcb-requests(3)**](/man/os/libxcb/xcb-requests.3) for details.

# [ERRORS](#ERRORS)

[*xcb\_alloc\_error\_t*](#xcb_alloc_error_t)

The X server could not allocate the requested resources (no memory?).

[*xcb\_drawable\_error\_t*](#xcb_drawable_error_t)

The specified *drawable* (Window or Pixmap) does not exist.

[*xcb\_value\_error\_t*](#xcb_value_error_t)

TODO: reasons?

# [SEE ALSO](#SEE_ALSO)

[**xcb-requests**(3)](/man/os/libxcb/xcb-requests.3), [**xcb\_generate\_id**(3)](/man/os/libxcb/xcb_generate_id.3)

# [AUTHOR](#AUTHOR)

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

libxcb 1.17.0 X Version 11

---

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