xcb_create_gc - Man Page

Creates a graphics context

Synopsis

#include <xcb/xproto.h>

Request function

xcb_void_cookie_t xcb_create_gc(xcb_connection_t *conn, xcb_gcontext_t cid, xcb_drawable_t drawable, uint32_t value_mask, const void *value_list);

Request Arguments

conn

The XCB connection to X11.

cid

The ID with which you will refer to the graphics context, created by xcb_generate_id.

drawable

Drawable to get the root/depth from.

value_mask

TODO: NOT YET DOCUMENTED.

value_list

TODO: NOT YET DOCUMENTED.

Description

Creates a graphics context. The graphics context can be used with any drawable that has the same root and depth as the specified drawable.

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_gc_checked. See xcb-requests(3) for details.

Errors

xcb_alloc_error_t

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

xcb_drawable_error_t

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

xcb_font_error_t

TODO: reasons?

xcb_match_error_t

TODO: reasons?

xcb_pixmap_error_t

TODO: reasons?

xcb_value_error_t

TODO: reasons?

See Also

xcb-requests(3), xcb_generate_id(3)

Author

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

Referenced By

The man page xcb_create_gc_checked(3) is an alias of xcb_create_gc(3).

libxcb 1.17.0 X Version 11 XCB Requests