xcb_get_image(3)

πŸ“¦
version 1.17.0 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

xcb_get_image πŸ’– (3) β€” XCB Requests

okay bestie, sit DOWN, because we're doing the xcb_get_image page together and it's gonna be a whole vibe. this is a libxcb manual page, section 3, from the XCB Requests fam. it's giving "grab pixels off the server", and honestly? iconic. πŸŽ€


✨ NAME ✨

xcb_get_image β€” (the description here is literally blank in the original, no cap, we're all just vibing with the function name) πŸ¦‹


✨ SYNOPSIS ✨

🌸 Request function 🌸

xcb_get_image_cookie_t xcb_get_image(xcb_connection_t *conn,
       uint8_t format, xcb_drawable_t drawable, int16_t x, int16_t y,
       uint16_t width, uint16_t height, uint32_t plane_mask);

🌸 Reply datastructure 🌸

typedef struct xcb_get_image_reply_t {
    uint8_t        response_type;
    uint8_t        depth;
    uint16_t       sequence;
    uint32_t       length;
    xcb_visualid_t visual;
    uint8_t        pad0[20];
} xcb_get_image_reply_t;

🌸 Reply function 🌸

xcb_get_image_reply_t *xcb_get_image_reply(xcb_connection_t *conn,
       xcb_get_image_cookie_t cookie, xcb_generic_error_t **e);

🌸 Reply accessors 🌸

uint8_t *xcb_get_image_data(const xcb_get_image_request_t *reply);

int xcb_get_image_data_length(const xcb_get_image_reply_t *reply);

xcb_generic_iterator_t xcb_get_image_data_end(const
       xcb_get_image_reply_t *reply);

✨ REQUEST ARGUMENTS ✨

  • conn β€” your XCB connection to X11. the whole portal to the server, periodt. πŸ’…
  • format β€” bestie, it's one of these values:
    • XCB_IMAGE_FORMAT_XY_BITMAP β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
    • XCB_IMAGE_FORMAT_XY_PIXMAP β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
    • XCB_IMAGE_FORMAT_Z_PIXMAP β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
    • TODO: NOT YET DOCUMENTED. β€” (yes this one is just sitting there on its own, it's literally in the original, I don't make the rules, I just report them faithfully πŸ’€)
  • drawable β€” TODO: NOT YET DOCUMENTED. 😭
  • x β€” TODO: NOT YET DOCUMENTED. 😭
  • y β€” TODO: NOT YET DOCUMENTED. 😭
  • width β€” TODO: NOT YET DOCUMENTED. 😭
  • height β€” TODO: NOT YET DOCUMENTED. 😭
  • plane_mask β€” TODO: NOT YET DOCUMENTED. 😭

✨ REPLY FIELDS ✨

  • response_type β€” the type of this reply, and in this case it's XCB_GET_IMAGE. this field is also present in the xcb_generic_reply_t, and you can use it to tell replies apart from each other. it's literally the name tag at the party. 🫢
  • sequence β€” the sequence number of the last request processed by the X11 server. the receipts, fr fr. 🧾
  • length β€” the length of the reply, in words (and a word is 4 bytes, don't forget). πŸ“
  • depth β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • visual β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ

✨ DESCRIPTION ✨

so... the DESCRIPTION section on this page is empty. like, nothing. void. a blank canvas. it's giving "the vibes are mysterious and the docs are too". that's just how it ships, bestie, I'm not gonna make stuff up. πŸ¦‹


✨ RETURN VALUE ✨

it returns an xcb_get_image_cookie_t. πŸͺ and here's the thing β€” errors have to be handled when you call the reply function xcb_get_image_reply.

if you'd rather handle errors in the event loop instead, use xcb_get_image_unchecked. see xcb-requests(3) for the deets. πŸ’–


✨ ERRORS ✨

this request does never generate any errors. literally zero, none, not a single one, slay. πŸ‘‘

✨ SEE ALSO ✨

(nothing is listed here on this page β€” the section is just chillin' empty.)


✨ AUTHOR ✨

Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. πŸ“§


and that's the whole page, bestie!! this one came from X Version 11, libxcb 1.17.0, and its date stamp is xcb_get_image(3) β€” so like, remember where you found it, mwah πŸ’‹ βœ¨πŸŒΈπŸ’œ