xcb_dri2_get_buffers(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_dri2_get_buffers(3) πŸ’–

okay bestie, welcome to the XCB Requests corner of the manual, where we're talking about xcb_dri2_get_buffers from the libxcb fam. pull up a chair, grab a boba, and let's get into it πŸ§‹βœ¨


✨ NAME ✨

xcb_dri2_get_buffers β€” (yes bestie, that dash really is just sitting there all by itself, the og page left it blank, iconic mysterious queen behavior πŸ’…)


🌸 SYNOPSIS 🌸

First things first, you gotta bring in the header:

#include <xcb/dri2.h>

πŸŽ€ Request function

xcb_dri2_get_buffers_cookie_t
       xcb_dri2_get_buffers(xcb_connection_t *conn,
       xcb_drawable_t drawable, uint32_t count,
       uint32_t attachments_len, const uint32_t *attachments);

πŸ¦‹ Reply datastructure

typedef struct xcb_dri2_get_buffers_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint32_t width;
    uint32_t height;
    uint32_t count;
    uint8_t  pad1[12];
} xcb_dri2_get_buffers_reply_t;

🌈 Reply function

xcb_dri2_get_buffers_reply_t
       *xcb_dri2_get_buffers_reply(xcb_connection_t *conn,
       xcb_dri2_get_buffers_cookie_t cookie, xcb_generic_error_t **e);

⭐ Reply accessors

xcb_dri2_dri2_buffer_t *xcb_dri2_get_buffers_buffers(const
       xcb_dri2_get_buffers_request_t *reply);

int xcb_dri2_get_buffers_buffers_length(const
       xcb_dri2_get_buffers_reply_t *reply);

xcb_dri2_dri2_buffer_iterator_t
       xcb_dri2_get_buffers_buffers_iterator(const
       xcb_dri2_get_buffers_reply_t *reply);

πŸ’œ REQUEST ARGUMENTS πŸ’œ

  • conn β€” the XCB connection to X11. your lil hotline to the server, no cap πŸ’«
  • drawable β€” TODO: NOT YET DOCUMENTED. (the docs said "girl idk" and moved on πŸ™ˆ)
  • count β€” TODO: NOT YET DOCUMENTED. (same energy, we're all just vibing)
  • attachments_len β€” TODO: NOT YET DOCUMENTED. (the mystery continues 😭)
  • attachments β€” TODO: NOT YET DOCUMENTED. (literally the plot of every unsolved mystery ever)

🫢 REPLY FIELDS 🫢

  • response_type β€” the type of this reply, and in this case it's XCB_DRI2_GET_BUFFERS. this field also lives in the xcb_generic_reply_t and it's how you tell your replies apart from each other, like name tags at a party πŸŽ‰
  • sequence β€” the sequence number of the last request processed by the X11 server. it's giving "who was here last" energy πŸ‘‘
  • length β€” the length of the reply, in words. and a word is 4 bytes, bestie, write that down ✍️
  • width β€” TODO: NOT YET DOCUMENTED. (not me being left on read by the documentation πŸ’€)
  • height β€” TODO: NOT YET DOCUMENTED. (the silence is loud fr fr)
  • count β€” TODO: NOT YET DOCUMENTED. (okay they really said "figure it out" 😭)

🌟 DESCRIPTION 🌟

(the original page has literally nothing here, so here we are, standing in a beautiful empty room together. aesthetic. ethereal. no notes. ✨)


πŸ”₯ RETURN VALUE πŸ”₯

Returns an xcb_dri2_get_buffers_cookie_t. πŸͺ

Errors have to be handled when you call the reply function xcb_dri2_get_buffers_reply.

But if you'd rather handle errors in the event loop instead β€” main character choice, honestly β€” use xcb_dri2_get_buffers_unchecked. see xcb-requests(3) for the deets πŸ’…


πŸ’€ ERRORS πŸ’€

This request does never generate any errors. zero drama, zero chaos, just peace and quiet, we love that for us 🌿


πŸ‘‘ SEE ALSO πŸ‘‘

(the original page lists absolutely nothing here, so there's nothing to link, bestie β€” but the vibe is immaculate regardless ✨)

πŸ’Œ AUTHOR πŸ’Œ

Generated from dri2.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. (they're literally asking for your feedback, so slide into those inboxes if you spot something 🫢)


and that's the whole page, bestie!! this beauty comes to you from X Version 11, rocking libxcb 1.17.0, filed under xcb_dri2_get_buffers(3). stay slaying, stay compiling, and may your buffers always be ready πŸ’–βœ¨πŸŽ€πŸ¦‹