XCB_RANDR_GET_SCREEN_RESOURCES(3)
π xcb_randr_get_screen_resources(3) β XCB Requests π
okay bestie, gather round, because we are reading an XCB Requests manual page together and honestly? it's giving "under-documented but iconic." the title is xcb_randr_get_screen_resources, it lives in the XCB Requests fam, and we're gonna go through every single line of it. no skimming. π
β¨ NAME β¨
xcb_randr_get_screen_resources β
that's it. that's the whole name section. there's a dash and then... nothing. the description after the dash is literally empty. not me getting ghosted by the man page itself π. the function name is xcb_randr_get_screen_resources and we move on with our lives.
β¨ SYNOPSIS β¨
first things first, you gotta pull in the header, periodt:
#include <xcb/randr.h>
πΈ Request function πΈ
xcb_randr_get_screen_resources_cookie_t
xcb_randr_get_screen_resources(xcb_connection_t *conn,
xcb_window_t window);
π¦ Reply datastructure π¦
this is the lil struct that comes back at you, and every field is load-bearing so don't touch anything:
typedef struct xcb_randr_get_screen_resources_reply_t {
uint8_t response_type;
uint8_t pad0;
uint16_t sequence;
uint32_t length;
xcb_timestamp_t timestamp;
xcb_timestamp_t config_timestamp;
uint16_t num_crtcs;
uint16_t num_outputs;
uint16_t num_modes;
uint16_t names_len;
uint8_t pad1[8];
} xcb_randr_get_screen_resources_reply_t;
π Reply function π
xcb_randr_get_screen_resources_reply_t
*xcb_randr_get_screen_resources_reply(xcb_connection_t *conn,
xcb_randr_get_screen_resources_cookie_t cookie,
xcb_generic_error_t **e);
π Reply accessors π
these are your little helpers for getting at the good stuff inside the reply:
xcb_randr_crtc_t *xcb_randr_get_screen_resources_crtcs(const
xcb_randr_get_screen_resources_request_t *reply);
int xcb_randr_get_screen_resources_crtcs_length(const
xcb_randr_get_screen_resources_reply_t *reply);
xcb_generic_iterator_t xcb_randr_get_screen_resources_crtcs_end(const
xcb_randr_get_screen_resources_reply_t *reply);
xcb_randr_output_t *xcb_randr_get_screen_resources_outputs(const
xcb_randr_get_screen_resources_request_t *reply);
int xcb_randr_get_screen_resources_outputs_length(const
xcb_randr_get_screen_resources_reply_t *reply);
xcb_generic_iterator_t xcb_randr_get_screen_resources_outputs_end(const
xcb_randr_get_screen_resources_reply_t *reply);
xcb_randr_mode_info_t *xcb_randr_get_screen_resources_modes(const
xcb_randr_get_screen_resources_request_t *reply);
int xcb_randr_get_screen_resources_modes_length(const
xcb_randr_get_screen_resources_reply_t *reply);
xcb_randr_mode_info_iterator_t
xcb_randr_get_screen_resources_modes_iterator(const
xcb_randr_get_screen_resources_reply_t *reply);
uint8_t *xcb_randr_get_screen_resources_names(const
xcb_randr_get_screen_resources_request_t *reply);
int xcb_randr_get_screen_resources_names_length(const
xcb_randr_get_screen_resources_reply_t *reply);
xcb_generic_iterator_t xcb_randr_get_screen_resources_names_end(const
xcb_randr_get_screen_resources_reply_t *reply);
π yes, the_crtcs,_outputs,_modesand_namesaccessors really do take axcb_randr_get_screen_resources_request_t *replywhile their_lengthand_endsiblings take axcb_randr_get_screen_resources_reply_t *reply. that's just how it is. we don't ask questions, we copy the signature exactly. fr fr.
β¨ REQUEST ARGUMENTS β¨
connβ your XCB connection to X11. the whole hotline to the server, babe.windowβ TODO: NOT YET DOCUMENTED. yeah. the docs said "we'll get to it" and then never got to it. π
β¨ REPLY FIELDS β¨
response_typeβ the type of this reply, which in this case isXCB_RANDR_GET_SCREEN_RESOURCES. this field also shows up in thexcb_generic_reply_t, and it's how you tell your replies apart from each other when they're all piled up in the group chat.sequenceβ the sequence number of the last request processed by the X11 server. it's the receipts. π§Ύlengthβ the length of the reply, in words (and a word is 4 bytes, in case you were about to guess).timestampβ TODO: NOT YET DOCUMENTED.config_timestampβ TODO: NOT YET DOCUMENTED.num_crtcsβ TODO: NOT YET DOCUMENTED.num_outputsβ TODO: NOT YET DOCUMENTED.num_modesβ TODO: NOT YET DOCUMENTED.names_lenβ TODO: NOT YET DOCUMENTED.
π five whole fields of pure TODO energy. the vibes are immaculate, the documentation is not.
β¨ DESCRIPTION β¨
there is no description. the section exists, and then it's just... silence. the void. an empty room. it's giving minimalism, it's giving mystery, it's giving "we ran out of time before the release." we respect it and we move on. π
β¨ RETURN VALUE β¨
so what do you actually get back? you get an xcb_randr_get_screen_resources_cookie_t. cute lil cookie. πͺ
and the important part, bestie: errors have to be handled when you call the reply function xcb_randr_get_screen_resources_reply.
but if you'd rather handle your errors in the event loop instead, use xcb_randr_get_screen_resources_unchecked. the details of all that live in xcb-requests(3) β go read it, it's the lore.
β¨ ERRORS β¨
this request does never generate any errors.
never. zero. none. she simply doesn't miss. π₯
β¨ SEE ALSO β¨
nothing listed here. empty. a blank little shelf. (the SEE ALSO section is out here living its truth.) π¦
β¨ AUTHOR β¨
Generated from randr.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.
so if you spot something wrong, don't @ me, @ the mailing list. they're the main characters here. π
and that's the whole page, bestie! you just read the entirety of xcb_randr_get_screen_resources(3), no skips, no cap. this one shipped as part of X Version 11, from libxcb 1.17.0 β go forth and query those screen resources. slay, and remember: a word is 4 bytes. π
β¨π«Ά
π¦ where this page comes from
- alpine 3.22: libxcb-doc 1.17.0-r0 Β· MIT
- alpine 3.23: libxcb-doc 1.17.0-r1 Β· MIT
- alpine 3.24: libxcb-doc 1.17.0-r2 Β· MIT
- arch rolling: libxcb 1.17.0-1 Β· X11
- centos-stream 10: libxcb-devel 1.17.0-3.el10 Β· X11
- debian trixie: libxcb-doc 1.17.0-2
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- nixpkgs unstable: libxcb 1.17.0
- opensuse-leap 16.0: libxcb-devel-doc 1.17.0-160000.2.2 Β· MIT
- ubuntu questing: libxcb-doc 1.17.0-2build1
- ubuntu resolute: libxcb-doc 1.17.0-2ubuntu1
- ubuntu stonking: libxcb-doc 1.17.0-2ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms