xcb_dri3_buffers_from_pixmap(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_dri3_buffers_from_pixmap πŸ’–

okay so bestie, you're reading section 3 of the XCB Requests manual, and today's main character is xcb_dri3_buffers_from_pixmap. it's a DRI3 request, it hands you a pixmap's buffers, and honestly? it's giving very "I know what I'm doing" energy. let's get into it 🫢


✨ NAME ✨

xcb_dri3_buffers_from_pixmap β€”

and that's it. that's the whole description. the manpage left it blank, bestie, so I'm not gonna make up lore for it. no cap. πŸ’€

🌸 SYNOPSIS 🌸

first things first, you gotta pull in the header:

#include <xcb/dri3.h>

πŸŽ€ Request function πŸŽ€

here's the vibe β€” you give it a connection and a pixmap, it gives you back a cookie:

xcb_dri3_buffers_from_pixmap_cookie_t
       xcb_dri3_buffers_from_pixmap(xcb_connection_t *conn,
       xcb_pixmap_t pixmap);

πŸ¦‹ Reply datastructure πŸ¦‹

and this is the lil struct that comes back at you. look at all these fields, she's stacked:

typedef struct xcb_dri3_buffers_from_pixmap_reply_t {
    uint8_t  response_type;
    uint8_t  nfd;
    uint16_t sequence;
    uint32_t length;
    uint16_t width;
    uint16_t height;
    uint8_t  pad0[4];
    uint64_t modifier;
    uint8_t  depth;
    uint8_t  bpp;
    uint8_t  pad1[6];
} xcb_dri3_buffers_from_pixmap_reply_t;

πŸ’… Reply function πŸ’…

and this is the function that actually goes and fetches the reply for you:

xcb_dri3_buffers_from_pixmap_reply_t
       *xcb_dri3_buffers_from_pixmap_reply(xcb_connection_t *conn,
       xcb_dri3_buffers_from_pixmap_cookie_t cookie,
       xcb_generic_error_t **e);

🌈 Reply accessors 🌈

the accessor girlies, in order, exactly as they come. these are your little grabby hands into the reply data:

uint32_t *xcb_dri3_buffers_from_pixmap_strides(const
       xcb_dri3_buffers_from_pixmap_request_t *reply);

int xcb_dri3_buffers_from_pixmap_strides_length(const
       xcb_dri3_buffers_from_pixmap_reply_t *reply);

xcb_generic_iterator_t xcb_dri3_buffers_from_pixmap_strides_end(const
       xcb_dri3_buffers_from_pixmap_reply_t *reply);

uint32_t *xcb_dri3_buffers_from_pixmap_offsets(const
       xcb_dri3_buffers_from_pixmap_request_t *reply);

int xcb_dri3_buffers_from_pixmap_offsets_length(const
       xcb_dri3_buffers_from_pixmap_reply_t *reply);

xcb_generic_iterator_t xcb_dri3_buffers_from_pixmap_offsets_end(const
       xcb_dri3_buffers_from_pixmap_reply_t *reply);

int32_t *xcb_dri3_buffers_from_pixmap_buffers(const
       xcb_dri3_buffers_from_pixmap_request_t *reply);

int xcb_dri3_buffers_from_pixmap_buffers_length(const
       xcb_dri3_buffers_from_pixmap_reply_t *reply);

xcb_generic_iterator_t xcb_dri3_buffers_from_pixmap_buffers_end(const
       xcb_dri3_buffers_from_pixmap_reply_t *reply);

πŸ“ REQUEST ARGUMENTS πŸ“

  • conn β€” your XCB connection to X11. the whole reason any of this works, honestly.
  • pixmap β€” TODO: NOT YET DOCUMENTED. yeah bestie, the manpage really said "we'll fill this in later" and then never did πŸ™ˆ

🧚 REPLY FIELDS 🧚

  • response_type β€” the type of this reply, which in this case is XCB_DRI3_BUFFERS_FROM_PIXMAP. it also lives in the xcb_generic_reply_t, so you can use it to tell your replies apart from each other. very "how do you know which twin is which" of it ✨
  • sequence β€” the sequence number of the last request processed by the X11 server.
  • length β€” the length of the reply, in words (a word is 4 bytes, keep that in your pocket).
  • nfd β€” TODO: NOT YET DOCUMENTED.
  • width β€” TODO: NOT YET DOCUMENTED.
  • height β€” TODO: NOT YET DOCUMENTED.
  • modifier β€” TODO: NOT YET DOCUMENTED.
  • depth β€” TODO: NOT YET DOCUMENTED.
  • bpp β€” TODO: NOT YET DOCUMENTED.

πŸ’€ DESCRIPTION πŸ’€

bestie. there is literally nothing here. the DESCRIPTION section is empty. not me opening the door and finding an empty room 😭


πŸ‘‘ RETURN VALUE πŸ‘‘

it hands you back an xcb_dri3_buffers_from_pixmap_cookie_t. errors? you have to handle those yourself when you call the reply function xcb_dri3_buffers_from_pixmap_reply.

and if you'd rather catch errors in the event loop instead of right there in the moment, use xcb_dri3_buffers_from_pixmap_unchecked. see xcb-requests(3) for the details. periodt πŸ’…


πŸŽ€ ERRORS πŸŽ€

this request does never generate any errors. iconic behaviour, honestly. no drama, no chaos, just vibes 🌸

⭐ SEE ALSO ⭐

...it's empty. nothing linked. no besties referenced. that's the whole section πŸ¦‹


πŸ’œ AUTHOR πŸ’œ

Generated from dri3.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, section 3 of the XCB Requests manual β€” so go forth and pull those buffers, you absolute main character. slay βœ¨πŸ‘‘πŸ’–