xcb_glx_read_pixels(3)
β¨ xcb_glx_read_pixels π
okay bestie, so this is a page from the XCB Requests corner of the manual, and the whole vibe is literally called xcb_glx_read_pixels β yes the manual name is right there in the title, we're being efficient today π
πΈ NAME πΈ
xcb_glx_read_pixels -
(yeah. that's it. that's the whole name section. the description slot is empty, no cap β the manpage authors left it blank like a group chat message that got sent too early π)
π SYNOPSIS π
First things first, you gotta pull in the header:
#include <xcb/glx.h>
Request function
xcb_glx_read_pixels_cookie_t xcb_glx_read_pixels(xcb_connection_t *conn,
xcb_glx_context_tag_t context_tag, int32_t x, int32_t y,
int32_t width, int32_t height, uint32_t format, uint32_t type,
uint8_t swap_bytes, uint8_t lsb_first);
Reply datastructure
typedef struct xcb_glx_read_pixels_reply_t {
uint8_t response_type;
uint8_t pad0;
uint16_t sequence;
uint32_t length;
uint8_t pad1[24];
} xcb_glx_read_pixels_reply_t;
Reply function
xcb_glx_read_pixels_reply_t
*xcb_glx_read_pixels_reply(xcb_connection_t *conn,
xcb_glx_read_pixels_cookie_t cookie, xcb_generic_error_t **e);
Reply accessors
uint8_t *xcb_glx_read_pixels_data(const xcb_glx_read_pixels_request_t
*reply);
int xcb_glx_read_pixels_data_length(const xcb_glx_read_pixels_reply_t
*reply);
xcb_generic_iterator_t xcb_glx_read_pixels_data_end(const
xcb_glx_read_pixels_reply_t *reply);
(and yes, xcb_glx_read_pixels_data really does take an xcb_glx_read_pixels_request_t while its little sisters take the reply type. that's not me being sloppy, that's canon, we respect the lore π«Ά)
β¨ REQUEST ARGUMENTS β¨
connβ your XCB connection to X11. the whole reason we're here π«context_tagβTODO: NOT YET DOCUMENTED.π«xβTODO: NOT YET DOCUMENTED.π«yβTODO: NOT YET DOCUMENTED.π«widthβTODO: NOT YET DOCUMENTED.π«heightβTODO: NOT YET DOCUMENTED.π«formatβTODO: NOT YET DOCUMENTED.π«typeβTODO: NOT YET DOCUMENTED.π«swap_bytesβTODO: NOT YET DOCUMENTED.π«lsb_firstβTODO: NOT YET DOCUMENTED.π«
not me reading nine consecutive "TODO: NOT YET DOCUMENTED." like okay mystery behavior, we see you π fr the docs are just out here leaving us on read. i'm not gonna invent what they do because that would be lying and lying is not the vibe πΈ
π REPLY FIELDS π
response_typeβ the type of this reply, and in this case it's literallyXCB_GLX_READ_PIXELS. this field also lives in thexcb_generic_reply_t, which is how you tell one reply apart from another, so it's giving main character energy in the generic struct too πsequenceβ the sequence number of the last request processed by the X11 server. the lil receipt number bestie π§Ύlengthβ the length of the reply, in words. and a word here is4bytes, just so we're clear π¦
π DESCRIPTION π
...it's empty. the section exists, the words do not. iconic of it honestly. nothing to report, no notes, the silence is the statement π
β RETURN VALUE β
It returns an xcb_glx_read_pixels_cookie_t πͺ β that's your lil ticket, your lil promise that a reply is coming.
Errors? They have to be handled when you call the reply function xcb_glx_read_pixels_reply. That's the deal.
If you'd rather deal with errors in the event loop instead, then use xcb_glx_read_pixels_unchecked β that's the unchecked one, and it exists for exactly this. Peep xcb-requests(3) for the details on how all that works π
π₯ ERRORS π₯
This request does never generate any errors.
Zero errors. Not one. Flawless. Untouchable. Ate and left no crumbs πβ¨ (ok but genuinely, that's what the manpage says, so don't go error-checking this one expecting drama)
π¦ SEE ALSO π¦
(blank! nothing linked. a lonely lil section, but we still show up for it π«Ά)
π AUTHOR π
Generated from glx.xml. If you've got corrections or improvements, hit up xcb@lists.freedesktop.org β they're literally asking, so don't be shy π
and that's the whole page bestie!! π₯³ this one came to you straight outta X Version 11, running libxcb 1.17.0, and yes it's xcb_glx_read_pixels(3) through and through πΈβ¨ mwah, go read some pixels responsibly π
π
π¦ 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