xcb_xv_query_best_size(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_xv_query_best_size β€” the one where XCB asks X11 "bestie, what size actually fits?" πŸ’–

okay so this is a page from the XCB manual (libxcb), and it's all about the xcb_xv_query_best_size request in <xcb/xv.h>. she's a lil Xv-flavoured request that goes and asks the server for the ✨best✨ size, and honestly the docs are giving "we'll finish this later" energy but we're gonna work with what we've got 🫢


✨ NAME ✨

xcb_xv_query_best_size β€” no description line in the original, it's just vibes and a name, so that's what we're passing along πŸ’…


🌸 SYNOPSIS 🌸

first things first, you gotta pull in the header:

#include <xcb/xv.h>

πŸŽ€ Request function

xcb_xv_query_best_size_cookie_t
       xcb_xv_query_best_size(xcb_connection_t *conn,
       xcb_xv_port_t port, uint16_t vid_w, uint16_t vid_h,
       uint16_t drw_w, uint16_t drw_h, uint8_t motion);

πŸ¦‹ Reply datastructure

typedef struct xcb_xv_query_best_size_reply_t {
           uint8_t  response_type;
           uint8_t  pad0;
           uint16_t sequence;
           uint32_t length;
           uint16_t actual_width;
           uint16_t actual_height;
       } xcb_xv_query_best_size_reply_t;

🌈 Reply function

xcb_xv_query_best_size_reply_t
       *xcb_xv_query_best_size_reply(xcb_connection_t *conn,
       xcb_xv_query_best_size_cookie_t cookie, xcb_generic_error_t **e);

πŸ’œ REQUEST ARGUMENTS πŸ’œ

these are the things you hand over when you fire off the request, bestie:

  • conn β€” the XCB connection to X11. your little hotline to the server πŸ“ž
  • port β€” TODO: NOT YET DOCUMENTED. yeah. the original really said that 😭
  • vid_w β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • vid_h β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • drw_w β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • drw_h β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • motion β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
not me being so real: those TODO: NOT YET DOCUMENTED. lines are literally what the manual says, so I'm not about to invent meanings for them. no cap, I refuse to make stuff up πŸ”₯

πŸ‘‘ REPLY FIELDS πŸ‘‘

what comes back in the reply struct:

  • response_type β€” the type of this reply, in this case XCB_XV_QUERY_BEST_SIZE. this field is also present in the xcb_generic_reply_t and can be used to tell replies apart from each other. it's giving name-tag at a party 🏷️
  • sequence β€” the sequence number of the last request processed by the X11 server. tracking number energy fr fr
  • length β€” the length of the reply, in words (a word is 4 bytes). math girlies rise πŸ’…
  • actual_width β€” TODO: NOT YET DOCUMENTED. 😭
  • actual_height β€” TODO: NOT YET DOCUMENTED. 😭

🌟 DESCRIPTION 🌟

...and that's it. the DESCRIPTION section of this page is genuinely empty. nothing. a void. main character silence πŸ•³οΈβœ¨ (the actual explanation was never written, so I'm not gonna pretend otherwise)


πŸ“ RETURN VALUE πŸ“

Returns an xcb_xv_query_best_size_cookie_t. Errors have to be handled when calling the reply function xcb_xv_query_best_size_reply.

If you want to handle errors in the event loop instead, use xcb_xv_query_best_size_unchecked. See xcb-requests(3) for details.

so like β€” cookie first, then you cash it in with the reply function and deal with any errors right there. or, if you'd rather catch errors while you're vibing in the event loop, there's xcb_xv_query_best_size_unchecked for that. the full tea is in xcb-requests(3) πŸ«–


πŸ’€ ERRORS πŸ’€

This request does never generate any errors.

yup, zero. none. not a single one. she's a good girl, no drama, no error handling required 😌✨


πŸ”₯ SEE ALSO πŸ”₯

the original lists absolutely nothing here β€” the section exists and it's empty, which is honestly iconic in a haunted way πŸ‘»πŸ’œ


🌸 AUTHOR 🌸

Generated from xv.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.

so if you spot something cursed in here, that's the inbox to slide into πŸ“¬


okay that's the whole page, you ate it, you understood it, periodt πŸ’… and for the cute little sign-off: this one's from X Version 11, shipped with libxcb 1.17.0, and the page answers to the name xcb_xv_query_best_size(3) πŸŽ€πŸ’–πŸ¦‹