xcb_alloc_color_planes(3)
๐ xcb_alloc_color_planes โ the libxcb page, but make it make sense
hiii bestie ๐ welcome to xcb_alloc_color_planes(3), a page from the libxcb family (you know, the XCB Requests crew, and yes the manual is literally titled xcb_alloc_color_planes). she's a color-plane allocation request and she's here to be understood, no cap. let's get into it โจ
๐ NAME ๐
xcb_alloc_color_planes โ and that's it. that's the whole thing.
no fr, the description after the dash is empty in the original. iconic of her honestly, leaving us on read. ๐
๐ SYNOPSIS ๐
first up, you gotta bring in the header:
#include <xcb/xproto.h>
โจ Request function โจ
here's the request itself, in all her main character glory:
xcb_alloc_color_planes_cookie_t
xcb_alloc_color_planes(xcb_connection_t *conn,
uint8_t contiguous, xcb_colormap_t cmap, uint16_t colors,
uint16_t reds, uint16_t greens, uint16_t blues);
she hands you back a cookie ๐ช (a xcb_alloc_color_planes_cookie_t, to be exact) โ that's your lil claim ticket for the reply later.
๐ฆ Reply datastructure ๐ฆ
this is the shape of the reply when it lands:
typedef struct xcb_alloc_color_planes_reply_t {
uint8_t response_type;
uint8_t pad0;
uint16_t sequence;
uint32_t length;
uint16_t pixels_len;
uint8_t pad1[2];
uint32_t red_mask;
uint32_t green_mask;
uint32_t blue_mask;
uint8_t pad2[8];
} xcb_alloc_color_planes_reply_t;
yep, there's pad0, pad1[2] and pad2[8] padding in there โ that's just the struct doing her alignment thing, don't worry about it ๐ซถ
๐ Reply function ๐
and here's how you actually go get that reply:
xcb_alloc_color_planes_reply_t
*xcb_alloc_color_planes_reply(xcb_connection_t *conn,
xcb_alloc_color_planes_cookie_t cookie, xcb_generic_error_t **e);
pass back the cookie you got, and she'll hand you the reply (or route an error out through e).
๐ง Reply accessors ๐ง
three lil helpers so you don't have to hand-roll your pointer math:
uint32_t *xcb_alloc_color_planes_pixels(const
xcb_alloc_color_planes_request_t *reply);
int xcb_alloc_color_planes_pixels_length(const
xcb_alloc_color_planes_reply_t *reply);
xcb_generic_iterator_t xcb_alloc_color_planes_pixels_end(const
xcb_alloc_color_planes_reply_t *reply);
๐ธ REQUEST ARGUMENTS ๐ธ
the tea on every parameter you gotta feed her:
connโ your XCB connection to X11. the whole reason we're here ๐contiguousโTODO: NOT YET DOCUMENTED.cmapโTODO: NOT YET DOCUMENTED.colorsโTODO: NOT YET DOCUMENTED.redsโTODO: NOT YET DOCUMENTED.greensโTODO: NOT YET DOCUMENTED.bluesโTODO: NOT YET DOCUMENTED.
not the manpage leaving a whole stack of TODO: NOT YET DOCUMENTED. like that ๐ญ we love an unfinished draft. i'm not gonna make stuff up for you bestie โ if the page doesn't say it, i'm not saying it either. fr fr.
โญ REPLY FIELDS โญ
what you get back in that xcb_alloc_color_planes_reply_t:
response_typeโ the type of this reply, which in this case isXCB_ALLOC_COLOR_PLANES. this field is also hanging out in thexcb_generic_reply_t, and it's how you tell replies apart from each other.sequenceโ the sequence number of the last request that the X11 server processed.lengthโ the length of the reply, counted in words (and a word is 4 bytes, so do the math ๐งฎ).pixels_lenโTODO: NOT YET DOCUMENTED.red_maskโTODO: NOT YET DOCUMENTED.green_maskโTODO: NOT YET DOCUMENTED.blue_maskโTODO: NOT YET DOCUMENTED.
๐ซ DESCRIPTION ๐ซ
it's... empty. nothing there. a whole section with zero content. she said "no thoughts, head empty" ๐
๐ฅ RETURN VALUE ๐ฅ
she returns an xcb_alloc_color_planes_cookie_t. and listen โ errors have to be handled when you call the reply function, xcb_alloc_color_planes_reply.
if you'd rather handle errors in the event loop instead, use xcb_alloc_color_planes_unchecked. check out xcb-requests(3) for the deets on how that works.
๐ ERRORS ๐
this request never generates any errors.
periodt. that's the whole section. she's chill like that ๐
๐ SEE ALSO ๐
nothing listed here either, bestie. empty. blank. the void. ๐
๐ซถ AUTHOR ๐ซถ
Generated from xproto.xml. contact xcb@lists.freedesktop.org for corrections and improvements.
and that's the whole page, you ate it ๐
this was X Version 11, libxcb 1.17.0, from the xcb_alloc_color_planes(3) manual. go forth and allocate those color planes, bestie โ i'm obsessed with you, mwah ๐โจ๐๐ฆ
๐ฆ where this page comes from
- alpine 3.22: libxcb-doc 1.17.0-r0 ยท MIT
- alpine 3.23: libxcb-doc 1.17.0-r1 ยท MIT
- alpine 3.24: libxcb-doc 1.17.0-r2 ยท MIT
- arch rolling: libxcb 1.17.0-1 ยท X11
- centos-stream 10: libxcb-devel 1.17.0-3.el10 ยท X11
- debian trixie: libxcb-doc 1.17.0-2
- fedora 43: libxcb-devel 1.17.0-6.fc43 ยท X11
- fedora 43: libxcb-devel 1.17.0-6.fc43 ยท X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 ยท X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 ยท X11
- nixpkgs unstable: libxcb 1.17.0
- opensuse-leap 16.0: libxcb-devel-doc 1.17.0-160000.2.2 ยท MIT
- ubuntu questing: libxcb-doc 1.17.0-2build1
- ubuntu resolute: libxcb-doc 1.17.0-2ubuntu1
- ubuntu stonking: libxcb-doc 1.17.0-2ubuntu1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms