xcb_randr_get_crtc_info(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_get_crtc_info πŸ’–

okay bestie, so this is a page from the XCB Requests manual, and it's about xcb_randr_get_crtc_info β€” like, the RandR (Resize and Rotate) request that goes and asks the X server what's up with a specific CRTC. Yes, we're doing display pipeline lore today. πŸ–₯️✨


✨ NAME ✨

xcb_randr_get_crtc_info -

ngl the original page literally just leaves the description blank after the dash. iconic behaviour honestly. no cap, that's all it says. πŸ™ˆ

πŸŽ€ SYNOPSIS πŸŽ€

first thing's first, you gotta include the header, periodt:

#include <xcb/randr.h>

πŸ’… Request function

xcb_randr_get_crtc_info_cookie_t
       xcb_randr_get_crtc_info(xcb_connection_t *conn,
       xcb_randr_crtc_t crtc, xcb_timestamp_t config_timestamp);

πŸ¦‹ Reply datastructure

typedef struct xcb_randr_get_crtc_info_reply_t {
    uint8_t          response_type;
    uint8_t          status;
    uint16_t         sequence;
    uint32_t         length;
    xcb_timestamp_t  timestamp;
    int16_t          x;
    int16_t          y;
    uint16_t         width;
    uint16_t         height;
    xcb_randr_mode_t mode;
    uint16_t         rotation;
    uint16_t         rotations;
    uint16_t         num_outputs;
    uint16_t         num_possible_outputs;
} xcb_randr_get_crtc_info_reply_t;

🌈 Reply function

xcb_randr_get_crtc_info_reply_t
       *xcb_randr_get_crtc_info_reply(xcb_connection_t *conn,
       xcb_randr_get_crtc_info_cookie_t cookie,
       xcb_generic_error_t **e);

⭐ Reply accessors

xcb_randr_output_t *xcb_randr_get_crtc_info_outputs(const
       xcb_randr_get_crtc_info_request_t *reply);

int xcb_randr_get_crtc_info_outputs_length(const
       xcb_randr_get_crtc_info_reply_t *reply);

xcb_generic_iterator_t xcb_randr_get_crtc_info_outputs_end(const
       xcb_randr_get_crtc_info_reply_t *reply);

xcb_randr_output_t *xcb_randr_get_crtc_info_possible(const
       xcb_randr_get_crtc_info_request_t *reply);

int xcb_randr_get_crtc_info_possible_length(const
       xcb_randr_get_crtc_info_reply_t *reply);

xcb_generic_iterator_t xcb_randr_get_crtc_info_possible_end(const
       xcb_randr_get_crtc_info_reply_t *reply);
lowkey important: copy those signatures exactly as they are, okay? i'm not out here editing the header for you. πŸ’€

🌸 REQUEST ARGUMENTS 🌸

  • conn β€” the XCB connection to X11. your lil hotline to the server. πŸ’–
  • crtc β€” TODO: NOT YET DOCUMENTED. yeah bestie, the docs really just left us on read for this one. 🫢
  • config_timestamp β€” TODO: NOT YET DOCUMENTED. also left on read. both of them. together. in the group chat. 😭

🧚 REPLY FIELDS 🧚

  • response_type β€” the type of this reply. in this case it's XCB_RANDR_GET_CRTC_INFO. this field also lives in the xcb_generic_reply_t, so you can use it to tell replies apart from each other β€” like name tags at a party, so you know which reply is which. πŸ‘‘
  • sequence β€” the sequence number of the last request processed by the X11 server. it's the server keeping receipts. 🧾
  • length β€” how long the reply is, in words. and a word is 4 bytes, just so we're clear. ✨
  • status β€” TODO: NOT YET DOCUMENTED.
  • timestamp β€” TODO: NOT YET DOCUMENTED.
  • x β€” TODO: NOT YET DOCUMENTED.
  • y β€” TODO: NOT YET DOCUMENTED.
  • width β€” TODO: NOT YET DOCUMENTED.
  • height β€” TODO: NOT YET DOCUMENTED.
  • mode β€” TODO: NOT YET DOCUMENTED.
  • rotation β€” TODO: NOT YET DOCUMENTED.
  • rotations β€” TODO: NOT YET DOCUMENTED.
  • num_outputs β€” TODO: NOT YET DOCUMENTED.
  • num_possible_outputs β€” TODO: NOT YET DOCUMENTED.
the way that half this struct is just vibes and a TODO... we love an unfinished draft. 🫠

πŸ’œ DESCRIPTION πŸ’œ

...and that's it. that's the whole section. it's empty. the DESCRIPTION section literally has nothing in it. it's giving mysterious. it's giving "i'll text you later" and then never texting. πŸ™ˆ


✨ RETURN VALUE ✨

so this returns an xcb_randr_get_crtc_info_cookie_t β€” a cookie!! πŸͺ adorable. and errors have to be handled when you call the reply function xcb_randr_get_crtc_info_reply, okay? don't just leave that cookie sitting there unhandled.

but if you'd rather handle errors in the event loop instead, use xcb_randr_get_crtc_info_unchecked. see xcb-requests(3) for the deets. πŸ’…


πŸ’€ ERRORS πŸ’€

this request does never generate any errors.

fr fr. never. not one. it's the chillest request at the function. no drama, no errors, just vibes. 😌

🌈 SEE ALSO 🌈

...

yeah bestie, there's nothing here either. no references. no cross-links. just an empty section and the sound of wind. πŸƒ

🫢 AUTHOR 🫢

generated from randr.xml. contact xcb@lists.freedesktop.org for corrections and improvements β€” so if you spot something sus, that's the inbox to slide into. πŸ’Œ


and that's a wrap! πŸ’– this page came to you from X Version 11, libxcb 1.17.0, in the form of xcb_randr_get_crtc_info(3). go forth and interrogate your CRTCs, bestie β€” you've got this. slay, no cap, periodt. βœ¨πŸŽ€πŸ¦‹