xcb_xf86dri_open_connection(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_xf86dri_open_connection β€” the XCB Requests era ✨

okay bestie, welcome to the xcb_xf86dri_open_connection page, from the XCB Requests corner of the libxcb universe. it's a request function, it's giving DRI, and we're gonna walk through it together 🫢


🌸 NAME 🌸

xcb_xf86dri_open_connection β€”

and that's it. that's the whole name section. the original literally just trails off after the dash, no cap 😭 iconic minimalism honestly.


✨ SYNOPSIS ✨

first things first, you gotta let the compiler know what's up:

#include <xcb/xf86dri.h>

πŸŽ€ Request function

xcb_xf86dri_open_connection_cookie_t
       xcb_xf86dri_open_connection(xcb_connection_t *conn,
       uint32_t screen);

πŸ¦‹ Reply datastructure

typedef struct xcb_xf86dri_open_connection_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint32_t sarea_handle_low;
    uint32_t sarea_handle_high;
    uint32_t bus_id_len;
    uint8_t  pad1[12];
} xcb_xf86dri_open_connection_reply_t;

🌈 Reply function

xcb_xf86dri_open_connection_reply_t
       *xcb_xf86dri_open_connection_reply(xcb_connection_t *conn,
       xcb_xf86dri_open_connection_cookie_t cookie,
       xcb_generic_error_t **e);

πŸ’œ Reply accessors

char *xcb_xf86dri_open_connection_bus_id(const
       xcb_xf86dri_open_connection_request_t *reply);

int xcb_xf86dri_open_connection_bus_id_length(const
       xcb_xf86dri_open_connection_reply_t *reply);

xcb_generic_iterator_t xcb_xf86dri_open_connection_bus_id_end(const
       xcb_xf86dri_open_connection_reply_t *reply);
yes bestie, that first accessor really does take xcb_xf86dri_open_connection_request_t in its signature β€” that's exactly what the page says, and we are reproducing it character for character, periodt πŸ’…

πŸ’– REQUEST ARGUMENTS πŸ’–

  • conn β€” the XCB connection to X11. your lil pipeline to the server, your main character link-up 🫢
  • screen β€” TODO: NOT YET DOCUMENTED. 😭 the docs simply did not show up to the function. we don't know, and I'm not gonna make something up.

πŸ“ REPLY FIELDS πŸ“

  • response_type β€” the type of this reply, and in this case it's XCB_XF86DRI_OPEN_CONNECTION. this field also lives in the xcb_generic_reply_t, so you can use it to tell your replies apart from each other. so handy, so iconic πŸ‘‘
  • sequence β€” the sequence number of the last request the X11 server processed.
  • length β€” how long the reply is, in words. and a word here is 4 bytes, bestie, don't forget that part ✨
  • sarea_handle_low β€” TODO: NOT YET DOCUMENTED. 🫠
  • sarea_handle_high β€” TODO: NOT YET DOCUMENTED. 🫠
  • bus_id_len β€” TODO: NOT YET DOCUMENTED. 🫠
three whole TODOs in one struct... the way that documentation just never got written... we love a mystery πŸ”₯

🌟 DESCRIPTION 🌟

there is literally nothing here. the DESCRIPTION section is empty. an absolute vibe. no notes. πŸ™ˆ


⭐ RETURN VALUE ⭐

returns an xcb_xf86dri_open_connection_cookie_t. πŸͺ

now listen β€” errors have to be handled when you call the reply function, xcb_xf86dri_open_connection_reply.

but if you'd rather handle errors in the event loop instead, use xcb_xf86dri_open_connection_unchecked. see xcb-requests(3) for the details, iykyk.


πŸ’€ ERRORS πŸ’€

this request does never generate any errors. not one. zero. a peaceful queen. πŸ‘‘


🧚 SEE ALSO 🧚

nothing here either. empty. a beautiful void. (we do shout out xcb-requests(3) up in RETURN VALUE though, so go look there πŸ‘€)


πŸ‘‘ AUTHOR πŸ‘‘

generated from xf86dri.xml. contact xcb@lists.freedesktop.org for corrections and improvements β€” they're literally asking, bestie, so if you spot something, tell them 🫢


and that's the whole page, fr fr πŸ’– huge thank you to X Version 11, libxcb 1.17.0, and of course our girl xcb_xf86dri_open_connection(3) herself β€” go open that connection, you got this πŸŒΈβœ¨πŸŽ€