.TH xcb_create_gc 3  "libxcb 1.13.1" "X Version 11" "XCB Requests"
.ad l
.SH NAME
xcb_create_gc \- Creates a graphics context
.SH SYNOPSIS
.hy 0
.B #include <xcb/xproto.h>
.SS Request function
.HP
xcb_void_cookie_t \fBxcb_create_gc\fP(xcb_connection_t\ *\fIconn\fP, xcb_gcontext_t\ \fIcid\fP, xcb_drawable_t\ \fIdrawable\fP, uint32_t\ \fIvalue_mask\fP, const void\ *\fIvalue_list\fP);
.br
.hy 1
.SH REQUEST ARGUMENTS
.IP \fIconn\fP 1i
The XCB connection to X11.
.IP \fIcid\fP 1i
The ID with which you will refer to the graphics context, created by
\fIxcb_generate_id\fP.
.IP \fIdrawable\fP 1i
Drawable to get the root/depth from.
.IP \fIvalue_mask\fP 1i
TODO: NOT YET DOCUMENTED.
.IP \fIvalue_list\fP 1i
TODO: NOT YET DOCUMENTED.
.SH 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.
.SH RETURN VALUE
Returns an \fIxcb_void_cookie_t\fP. Errors (if any) have to be handled in the event loop.

If you want to handle errors directly with \fIxcb_request_check\fP instead, use \fIxcb_create_gc_checked\fP. See \fBxcb-requests(3)\fP for details.
.SH ERRORS
.IP \fIxcb_alloc_error_t\fP 1i
The X server could not allocate the requested resources (no memory?).
.IP \fIxcb_drawable_error_t\fP 1i
The specified \fIdrawable\fP (Window or Pixmap) does not exist.
.IP \fIxcb_font_error_t\fP 1i
TODO: reasons?
.IP \fIxcb_match_error_t\fP 1i
TODO: reasons?
.IP \fIxcb_pixmap_error_t\fP 1i
TODO: reasons?
.IP \fIxcb_value_error_t\fP 1i
TODO: reasons?
.SH SEE ALSO
.BR xcb-requests (3),
.BR xcb_generate_id (3)
.SH AUTHOR
Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.
