xcb_randr_create_lease(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_randr_create_lease ๐Ÿ’–

okay bestie, welcome to the xcb_randr_create_lease page from the XCB Requests fam (that's xcb_randr_create_lease(3) if you're being formal at the function's birthday party ๐ŸŽ‚). grab a lil snack, we're doing randr leases today and honestly? iconic behaviour.


โœจ NAME โœจ

xcb_randr_create_lease โ€” literally no description here ๐Ÿ˜ญ the original page leaves this blank, so we're leaving it blank too. the vibes are mysterious, the function is named, that's the whole story fr fr.


๐ŸŒˆ SYNOPSIS ๐ŸŒˆ

First things first, you gotta pull in the header, no cap:

#include <xcb/randr.h>

๐ŸŽ€ Request function

xcb_randr_create_lease_cookie_t
       xcb_randr_create_lease(xcb_connection_t *conn,
       xcb_window_t window, xcb_randr_lease_t lid, uint16_t num_crtcs,
       uint16_t num_outputs, const xcb_randr_crtc_t *crtcs, const
       xcb_randr_output_t *outputs);

๐Ÿฆ‹ Reply datastructure

the lil struct you get back, exactly as written:

typedef struct xcb_randr_create_lease_reply_t {
    uint8_t  response_type;
    uint8_t  nfd;
    uint16_t sequence;
    uint32_t length;
    uint8_t  pad0[24];
} xcb_randr_create_lease_reply_t;

๐ŸŒธ Reply function

xcb_randr_create_lease_reply_t
       *xcb_randr_create_lease_reply(xcb_connection_t *conn,
       xcb_randr_create_lease_cookie_t cookie, xcb_generic_error_t **e);

๐Ÿ’… REQUEST ARGUMENTS ๐Ÿ’…

the tea on every single thing you're passing in:

  • conn โ€” your XCB connection to X11. it's giving "the whole reason we're here" energy.
  • window โ€” TODO: NOT YET DOCUMENTED. ๐Ÿ™ˆ the docs just did not show up to class today.
  • lid โ€” TODO: NOT YET DOCUMENTED. same, bestie. same.
  • num_crtcs โ€” TODO: NOT YET DOCUMENTED. the mystery continues.
  • num_outputs โ€” TODO: NOT YET DOCUMENTED. not a single clue was provided ๐Ÿ˜ญ
  • crtcs โ€” TODO: NOT YET DOCUMENTED. undoc'd and unbothered.
  • outputs โ€” TODO: NOT YET DOCUMENTED. we truly know nothing and that's the situation.
ngl, this whole arguments section is a group chat where everyone left you on read. that's just how the page is, we're not inventing lore ๐Ÿ”ฅ

๐Ÿ‘‘ REPLY FIELDS ๐Ÿ‘‘

what's inside that reply when it comes back to you:

  • response_type โ€” the type of this reply, which in this case is XCB_RANDR_CREATE_LEASE. this field is also chilling in the xcb_generic_reply_t, and you can use it to tell replies apart from each other. it's basically the reply's little name tag ๐Ÿท๏ธ
  • sequence โ€” the sequence number of the last request that got processed by the X11 server.
  • length โ€” how long the reply is, in words (and a word is 4 bytes, so do your lil math ๐Ÿงฎ).
  • nfd โ€” TODO: NOT YET DOCUMENTED. ๐Ÿซ 
  • master_fd โ€” TODO: NOT YET DOCUMENTED. also undocumented, also mysterious, also somehow on the list. periodt.

๐Ÿงš DESCRIPTION ๐Ÿงš

okay so. the original page has a DESCRIPTION section and it is... completely empty. nothing. a void. a blank canvas. a main character with no backstory ๐Ÿ’€ we are preserving that emptiness exactly as it came, because we keep every single detail, including the details that are literally nothing. respect the emptiness bestie โœจ


โญ RETURN VALUE โญ

it hands you back an xcb_randr_create_lease_cookie_t. ๐Ÿช (a cookie!! how cute is that)

errors? you gotta deal with those yourself, and specifically when you call the reply function xcb_randr_create_lease_reply.

and if you'd rather handle errors in the event loop instead, use xcb_randr_create_lease_unchecked. see xcb-requests(3) for the deets. iykyk ๐Ÿ’œ


๐Ÿ“ ERRORS ๐Ÿ“

this request does never generate any errors. โœจ

zero drama, zero errors, the most well-behaved request in the whole building. we love a low-maintenance icon ๐Ÿ‘‘


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

nothing listed here! the original SEE ALSO section is empty, so there's nothing to point you at. a moment of silence for the cross-references that never were ๐Ÿ˜ญ๐ŸŒธ


๐ŸŒˆ AUTHOR ๐ŸŒˆ

generated from randr.xml. if you've got corrections and improvements, hit up xcb@lists.freedesktop.org โ€” they're literally waiting for your feedback, bestie ๐Ÿซถ


and that's the whole page! ๐Ÿ’– this beauty came to you from X Version 11, libxcb 1.17.0, and yes it's xcb_randr_create_lease(3) โ€” go forth, make leases, slay the randr game. mwah ๐Ÿ’…โœจ๐ŸŽ€