xcb_dri2_swap_buffers(3)
π xcb_dri2_swap_buffers β the XCB Requests girlies know
okay so bestie, welcome to xcb_dri2_swap_buffers(3) β¨ this is the XCB request that's giving "swap those buffers, queen" β it lives in the DRI2 corner of libxcb and it's part of the XCB Requests family. let's get into it π«Ά
β¨ SYNOPSIS β¨
first up, the include. do not forget the include, i'm begging π
#include <xcb/dri2.h>
π Request function
xcb_dri2_swap_buffers_cookie_t
xcb_dri2_swap_buffers(xcb_connection_t *conn,
xcb_drawable_t drawable, uint32_t target_msc_hi,
uint32_t target_msc_lo, uint32_t divisor_hi, uint32_t divisor_lo,
uint32_t remainder_hi, uint32_t remainder_lo);
π Reply datastructure
look at this struct. she's structured. she's iconic. π
typedef struct xcb_dri2_swap_buffers_reply_t {
uint8_t response_type;
uint8_t pad0;
uint16_t sequence;
uint32_t length;
uint32_t swap_hi;
uint32_t swap_lo;
} xcb_dri2_swap_buffers_reply_t;
π Reply function
xcb_dri2_swap_buffers_reply_t
*xcb_dri2_swap_buffers_reply(xcb_connection_t *conn,
xcb_dri2_swap_buffers_cookie_t cookie, xcb_generic_error_t **e);
πΈ REQUEST ARGUMENTS πΈ
every single one of them, no skipping, we're thorough in this household π
connβ The XCB connection to X11. your lil red telephone to the server, basically πdrawableβ TODO: NOT YET DOCUMENTED. yeah bestie, the docs literally just said "idk yet" πtarget_msc_hiβ TODO: NOT YET DOCUMENTED. same energy πtarget_msc_loβ TODO: NOT YET DOCUMENTED. the silence is deafening πdivisor_hiβ TODO: NOT YET DOCUMENTED.divisor_loβ TODO: NOT YET DOCUMENTED.remainder_hiβ TODO: NOT YET DOCUMENTED.remainder_loβ TODO: NOT YET DOCUMENTED.
ngl the upstream docs left the whole argument list as a to-do list and never came back. we're not gonna invent lore. if it says TODO, it says TODO, periodt. β
π¦ REPLY FIELDS π¦
response_typeβ The type of this reply, in this caseXCB_DRI2_SWAP_BUFFERS. This field is also present in thexcb_generic_reply_tand can be used to tell replies apart from each other. it's the name tag at the party, so you know who walked in πsequenceβ The sequence number of the last request processed by the X11 server. the receipts, basically π§Ύlengthβ The length of the reply, in words (a word is 4 bytes). math girlies rise πswap_hiβ TODO: NOT YET DOCUMENTED.swap_loβ TODO: NOT YET DOCUMENTED.
π DESCRIPTION π
soβ¦ the description section is just. empty. like, there is literally nothing in it. the original page has the heading and then vibes and then the next heading. not me defending a blank section but that's genuinely what's there, bestie π no cap.
β RETURN VALUE β
Returns an xcb_dri2_swap_buffers_cookie_t. πͺ Errors have to be handled when calling the reply function xcb_dri2_swap_buffers_reply.
If you want to handle errors in the event loop instead, use xcb_dri2_swap_buffers_unchecked. See xcb-requests(3) for details.
so like β the cookie is your lil voucher, and you cash it in at the reply function. that's the whole plot π
π₯ ERRORS π₯
This request does never generate any errors. zero. none. she's unbothered, she's thriving, she does not do drama πΈ
π SEE ALSO π
okay so this section is also empty on the actual page. nothing listed. not a single reference. it's giving minimalism, it's giving "we ran out of time" π we're keeping it real and keeping it empty.
π AUTHOR π
Generated from dri2.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. yes you can actually email them, they want to hear from you π«Ά
and that's the whole page bestie!! π
cute lil sign-off: this one ships with X Version 11, libxcb 1.17.0, and the page header/footer is literally just xcb_dri2_swap_buffers(3) on both ends β same girl, same title, no notes. π
β¨
π¦ 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