xcb_query_colors(3)
β¨ xcb_query_colors β the libxcb glow-up β¨
okay so bestie, you're reading the manual page for xcb_query_colors(3), from the XCB Requests crew π
. Yes it's a page about asking the X server what colors a bunch of pixels actually are. No cap. Let's get into it π
πΈ NAME πΈ
xcb_query_colors β (the NAME section is literally empty in the original, so this is your cue to go read DESCRIPTION. iconic of it, honestly π)
π SYNOPSIS π
First things first, you gotta include the header:
#include <xcb/xproto.h>
β¨ Request function β¨
xcb_query_colors_cookie_t xcb_query_colors(xcb_connection_t *conn,
xcb_colormap_t cmap, uint32_t pixels_len, const
uint32_t *pixels);
π¦ Reply datastructure π¦
typedef struct xcb_query_colors_reply_t {
uint8_t response_type;
uint8_t pad0;
uint16_t sequence;
uint32_t length;
uint16_t colors_len;
uint8_t pad1[22];
} xcb_query_colors_reply_t;
π Reply function π
xcb_query_colors_reply_t *xcb_query_colors_reply(xcb_connection_t *conn,
xcb_query_colors_cookie_t cookie, xcb_generic_error_t **e);
π Reply accessors π
xcb_rgb_t *xcb_query_colors_colors(const xcb_query_colors_request_t
*reply);
int xcb_query_colors_colors_length(const xcb_query_colors_reply_t
*reply);
xcb_rgb_iterator_t xcb_query_colors_colors_iterator(const
xcb_query_colors_reply_t *reply);
π REQUEST ARGUMENTS π
connβ the XCB connection to X11, your lil hotline to the server π«Άcmapβ TODO: NOT YET DOCUMENTED. (yes bestie, they left it blank, we're all just living with it π)pixels_lenβ TODO: NOT YET DOCUMENTED.pixelsβ TODO: NOT YET DOCUMENTED.
π REPLY FIELDS π
response_typeβ what kind of reply this is; in this case it'sXCB_QUERY_COLORS. This field also lives in thexcb_generic_reply_t, so you can use it to tell your replies apart from each other πsequenceβ the sequence number of the last request the X11 server actually processed.lengthβ how long the reply is, measured in words (and a word is 4 bytes, periodt).colors_lenβ TODO: NOT YET DOCUMENTED. (again. we stay unbothered π )
π DESCRIPTION π
(surprise! the DESCRIPTION section is empty. not me getting all dressed up for a section with no text π)
β RETURN VALUE β
It hands you back an xcb_query_colors_cookie_t. Errors have to be handled when you call the reply function xcb_query_colors_reply.
If you'd rather handle errors in the event loop instead, use xcb_query_colors_unchecked. See xcb-requests(3) for the details, iykyk π₯
π ERRORS π
This request does never generate any errors. not a single one. she's perfect, she's lowkey unproblematic πΈ
π SEE ALSO π
(the original is empty here too β the vibes are immaculate and the cross-references are not, bestie π§)
π AUTHOR π
Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements β fr fr, they want your feedback π«Ά
okay that's the whole page, and as a lil sign-off: this is from X Version 11, libxcb 1.17.0, and the footer date line on the original says xcb_query_colors(3). go query some colors, main character πβ¨π
π¦ 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