xcb_dri2_connect(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_connect ✨

okay bestie, welcome to xcb_dri2_connect(3) πŸ’– this is one of those XCB request pages from the XCB Requests corner of the X11 universe, and yes, she's giving "the docs are a little shy" energy. Let's get into it 🫢


🌸 NAME 🌸

xcb_dri2_connect β€” (literally the whole description, bestie. it's blank. iconic of her honestly πŸ’…)


πŸŽ€ SYNOPSIS πŸŽ€

First up, the include. You need this or nothing works, no cap:

#include <xcb/dri2.h>

🌈 Request function

xcb_dri2_connect_cookie_t xcb_dri2_connect(xcb_connection_t *conn,
       xcb_window_t window, uint32_t driver_type);

🌈 Reply datastructure

Look at this struct, she's structured, she's organized, she's a whole vibe:

typedef struct xcb_dri2_connect_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint32_t driver_name_length;
    uint32_t device_name_length;
    uint8_t  pad1[16];
} xcb_dri2_connect_reply_t;

🌈 Reply function

xcb_dri2_connect_reply_t *xcb_dri2_connect_reply(xcb_connection_t *conn,
       xcb_dri2_connect_cookie_t cookie, xcb_generic_error_t **e);

🌈 Reply accessors

these are the little helpers that go digging around inside the reply for you 🧚:

char *xcb_dri2_connect_driver_name(const xcb_dri2_connect_request_t
       *reply);

int xcb_dri2_connect_driver_name_length(const xcb_dri2_connect_reply_t
       *reply);

xcb_generic_iterator_t xcb_dri2_connect_driver_name_end(const
       xcb_dri2_connect_reply_t *reply);

void *xcb_dri2_connect_alignment_pad(const xcb_dri2_connect_request_t
       *reply);

int xcb_dri2_connect_alignment_pad_length(const xcb_dri2_connect_reply_t
       *reply);

xcb_generic_iterator_t xcb_dri2_connect_alignment_pad_end(const
       xcb_dri2_connect_reply_t *reply);

char *xcb_dri2_connect_device_name(const xcb_dri2_connect_request_t
       *reply);

int xcb_dri2_connect_device_name_length(const xcb_dri2_connect_reply_t
       *reply);

xcb_generic_iterator_t xcb_dri2_connect_device_name_end(const
       xcb_dri2_connect_reply_t *reply);
🫠 yes, some of these take an xcb_dri2_connect_request_t and some take an xcb_dri2_connect_reply_t. that's exactly how they're written up there. don't come for me, come for the docs. πŸ’€

πŸ’œ REQUEST ARGUMENTS πŸ’œ

  • conn β€” The XCB connection to X11. your little telephone line to the server, fr fr πŸ“ž
  • window β€” TODO: NOT YET DOCUMENTED. 😭 bestie they just left it blank. we do not know. it remains a mystery.
  • driver_type β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ also a mystery. also blank. the docs said "figure it out."

πŸ¦‹ REPLY FIELDS πŸ¦‹

  • response_type β€” The type of this reply, in this case XCB_DRI2_CONNECT. This field is also present in the xcb_generic_reply_t and can be used to tell replies apart from each other. she'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.
  • length β€” The length of the reply, in words (a word is 4 bytes). math girlies stay winning ✨
  • driver_name_length β€” TODO: NOT YET DOCUMENTED.
  • device_name_length β€” TODO: NOT YET DOCUMENTED.

🌸 DESCRIPTION 🌸

…and that's it. that's the section. it's empty. she said "no thoughts, head empty" πŸ’…


⭐ RETURN VALUE ⭐

Returns an xcb_dri2_connect_cookie_t. Errors have to be handled when calling the reply function xcb_dri2_connect_reply.

If you want to handle errors in the event loop instead, use xcb_dri2_connect_unchecked. See xcb-requests(3) for details.

πŸŽ€ so like, the cookie is your lil ticket, and you trade it in at xcb_dri2_connect_reply to get the actual reply. or you go the _unchecked route and deal with errors in the event loop. choose your fighter. 🫢

πŸ’€ ERRORS πŸ’€

This request does never generate any errors.

πŸ”₯ nothing. not a single one. she's unproblematic. periodt.

🌈 SEE ALSO 🌈

(nothing listed here, bestie. the void. the empty set. we move.)


πŸ’– AUTHOR πŸ’–

Generated from dri2.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.


and that's the whole page, bestie! πŸŽ€ this one came out of X Version 11, libxcb 1.17.0, so if you're running something wildly different and it's giving chaos, that's why. mwah, go connect something πŸ’…βœ¨