XCB_RANDR_GET_SCREEN_SIZE_RANGE(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

πŸ’– NAME πŸ’–

xcb_randr_get_screen_size_range β€” bestie, this one asks the X server like "hey, how big can this screen even get??" and hands you back a lil cookie so you can go pick up the answer later. (The original page's one-liner was literally empty, so consider this a vibe translation, not new lore. πŸŽ€)


✨ SYNOPSIS ✨

Ok so first you gotta bring in the header, no cap:

#include <xcb/randr.h>

🌸 Request function 🌸

Here's the glow-up β€” this is the call that sends the request:

xcb_randr_get_screen_size_range_cookie_t
       xcb_randr_get_screen_size_range(xcb_connection_t *conn,
       xcb_window_t window);

πŸ¦‹ Reply datastructure πŸ¦‹

And this is the lil struct that comes back, the actual reply shape, iconic:

typedef struct xcb_randr_get_screen_size_range_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint16_t min_width;
    uint16_t min_height;
    uint16_t max_width;
    uint16_t max_height;
    uint8_t  pad1[16];
} xcb_randr_get_screen_size_range_reply_t;

πŸ’… Reply function πŸ’…

And this is how you go collect it β€” the reply function:

xcb_randr_get_screen_size_range_reply_t
       *xcb_randr_get_screen_size_range_reply(xcb_connection_t *conn,
       xcb_randr_get_screen_size_range_cookie_t cookie,
       xcb_generic_error_t **e);

🫢 REQUEST ARGUMENTS 🫢

  • conn β€” the XCB connection to X11. Your link to the server, your little phone line to the mothership. πŸ’œ
  • window β€” TODO: NOT YET DOCUMENTED. Yeah bestie, the docs literally say that. Not me making it up, that's the actual text, I promise. πŸ™ˆ

🌈 REPLY FIELDS 🌈

  • response_type β€” the type of this reply, and in this case it's XCB_RANDR_GET_SCREEN_SIZE_RANGE. This field also lives in the xcb_generic_reply_t, so you can use it to tell your replies apart from each other when they all show up at the function. Detective energy. πŸ”
  • sequence β€” the sequence number of the last request processed by the X11 server. It's the timestamp of the server's last main character moment.
  • length β€” the length of the reply, in words. And heads up, a word is 4 bytes. Not a dictionary word. A word. 😭
  • min_width β€” TODO: NOT YET DOCUMENTED. πŸ“
  • min_height β€” TODO: NOT YET DOCUMENTED. πŸ“
  • max_width β€” TODO: NOT YET DOCUMENTED. πŸ“
  • max_height β€” TODO: NOT YET DOCUMENTED. πŸ“

🧚 DESCRIPTION 🧚

So… the DESCRIPTION section on this page is empty. Like, empty empty. Nothing there. We're all just vibing in the silence. 🌸


⭐ RETURN VALUE ⭐

It returns an xcb_randr_get_screen_size_range_cookie_t. That's your lil claim ticket 🎟️.

Errors? Those have to be handled when you call the reply function:

xcb_randr_get_screen_size_range_reply

(Which, on the page, is written all hyphen-broken as xcb_ran‐dr_get_screen_size_range_reply β€” same thing, just wrapped, don't panic. πŸ’–)

But if you'd rather handle your errors in the event loop instead, then use:

xcb_randr_get_screen_size_range_unchecked

(Also hyphen-wrapped on the original as xcb_ran‐dr_get_screen_size_range_unchecked. Same function, bestie.)

And for the full tea on all of that, go read xcb-requests(3). It explains the details. πŸ‘‘


πŸ’€ ERRORS πŸ’€

This request does never generate any errors.

Periodt. Zero. None. It's the low-drama friend of the XCB family. πŸ•ŠοΈ


πŸ”₯ SEE ALSO πŸ”₯

The SEE ALSO section is empty on this page. Nothing to link, nothing to scroll to. Just us. πŸŒ™


πŸ‘‘ AUTHOR πŸ‘‘

Generated from randr.xml. If you spot something wrong or wanna make it better, hit up xcb@lists.freedesktop.org for corrections and improvements. They take fan mail and bug reports. 🫢


X Version 11 Β· libxcb 1.17.0 β€” that's the source and version of this whole thing, and that's the sign-off, mwah. πŸ’‹ Go forth and query your screen size range, you gorgeous nerd. πŸŽ€βœ¨πŸ¦‹