xcb_xf86dri_create_context(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_create_context β€” the XCB Requests era

okay bestie, so this one lives in section 3 of the manual (that's the xcb_xf86dri_create_context(3) of it all), and it's filed under XCB Requests. yes, the header on the page is literally just the name plus that, no tagline, no subtitle, nothing. the NAME section below is empty too β€” not me shipping a whole manpage with no one-line summary πŸ’€. so like, this is the request for creating a DRI context, and the docs are gonna be kinda mysterious about it. buckle up πŸŽ€


✨ NAME ✨

xcb_xf86dri_create_context β€” [crickets] πŸ¦—

fr fr, there is no description line here in the original. it's giving mystery. moving on.


🌸 SYNOPSIS 🌸

first, the include, don't forget it:

#include <xcb/xf86dri.h>

πŸ’– Request function

xcb_xf86dri_create_context_cookie_t
       xcb_xf86dri_create_context(xcb_connection_t *conn,
       uint32_t screen, uint32_t visual, uint32_t context);

πŸ’– Reply datastructure

typedef struct xcb_xf86dri_create_context_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint32_t hw_context;
} xcb_xf86dri_create_context_reply_t;

πŸ’– Reply function

xcb_xf86dri_create_context_reply_t
       *xcb_xf86dri_create_context_reply(xcb_connection_t *conn,
       xcb_xf86dri_create_context_cookie_t cookie,
       xcb_generic_error_t **e);

πŸ‘‘ REQUEST ARGUMENTS πŸ‘‘

one bullet per argument, no skips, periodt:

  • conn β€” the XCB connection to X11. your whole link to the server, your main character πŸ”Œ
  • screen β€” TODO: NOT YET DOCUMENTED. yeah bestie, the upstream docs just left this one blank 😭
  • visual β€” TODO: NOT YET DOCUMENTED. also blank. iconic of them honestly.
  • context β€” TODO: NOT YET DOCUMENTED. and this one too. three for three 🫢

πŸ¦‹ REPLY FIELDS πŸ¦‹

  • response_type β€” the type of this reply, and in this case it's XCB_XF86DRI_CREATE_CONTEXT. this field also lives in the xcb_generic_reply_t, so you can use it to tell replies apart from each other. your little name tag at the party 🏷️
  • sequence β€” the sequence number of the last request processed by the X11 server. yes, the server keeps count, she's organized like that πŸ’…
  • length β€” the length of the reply, in words (a word is 4 bytes). so multiply by 4 if you want bytes, iykyk ✨
  • hw_context β€” TODO: NOT YET DOCUMENTED. blank again, of course it is 🌸

🌈 DESCRIPTION 🌈

...nothing. the section exists and it's empty. the silence is deafening. it's giving vibe check passed, words not found πŸ™ˆ


⭐ RETURN VALUE ⭐

returns an xcb_xf86dri_create_context_cookie_t. cookies are the whole XCB thing, you hold onto it and redeem it later πŸͺ

errors have to be handled when calling the reply function xcb_xf86dri_create_context_reply. that's the moment of truth.

but if you'd rather handle errors in the event loop instead, use xcb_xf86dri_create_context_unchecked. see xcb-requests(3) for details πŸ‘€

πŸ’œ ERRORS πŸ’œ

this request does never generate any errors. not one. zero. clean sheet, ate and left no crumbs ✨


πŸŽ€ SEE ALSO πŸŽ€

nothing listed. empty. we love a minimalist queen πŸ‘‘


🌸 AUTHOR 🌸

generated from xf86dri.xml. contact xcb@lists.freedesktop.org for corrections and improvements β€” so if you spot something off, bestie, that's the inbox to slide into 🫢


and that's the whole page, mwah. this beauty shipped with libxcb 1.17.0 under X Version 11 β€” the footer said so, so I'm saying so. go create some contexts, no cap πŸ’–πŸ¦‹πŸ’