xcb_xv_get_port_attribute(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_get_port_attribute πŸ’…

okay bestie, so this is a page from the XCB Requests manual (section 3, the library-call girlies 🫢). It's literally called xcb_xv_get_port_attribute and yes, we're gonna go through every single line together. no skimming, no skipping, we're doing this properly. periodt. ✨


🌸 NAME 🌸

xcb_xv_get_port_attribute β€” and that's it. That's the whole description. The original just leaves it hanging there after the dash, like a text you sent at 2am and never finished. the vibes are mysterious, ngl.


πŸ¦‹ SYNOPSIS πŸ¦‹

First things first, you gotta pull in the header:

#include <xcb/xv.h>

✨ Request function ✨

xcb_xv_get_port_attribute_cookie_t
       xcb_xv_get_port_attribute(xcb_connection_t *conn,
       xcb_xv_port_t port, xcb_atom_t attribute);

πŸŽ€ Reply datastructure πŸŽ€

here's the lil struct the reply comes back in, look at her:

typedef struct xcb_xv_get_port_attribute_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    int32_t  value;
} xcb_xv_get_port_attribute_reply_t;

🧚 Reply function 🧚

xcb_xv_get_port_attribute_reply_t
       *xcb_xv_get_port_attribute_reply(xcb_connection_t *conn,
       xcb_xv_get_port_attribute_cookie_t cookie,
       xcb_generic_error_t **e);

πŸ’– REQUEST ARGUMENTS πŸ’–

the tea on what you're feeding this function:

  • conn β€” your XCB connection to X11. the whole reason we're here, honestly.
  • port β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ like, the docs simply did not show up to class that day.
  • attribute β€” TODO: NOT YET DOCUMENTED. same energy. we know nothing. it's giving mystery box. πŸ“¦

⭐ REPLY FIELDS ⭐

what comes back in the struct, one field at a time:

  • response_type β€” the type of this reply, and in this case it's XCB_XV_GET_PORT_ATTRIBUTE. this field is also chilling inside the xcb_generic_reply_t, which is how you tell replies apart from each other. very main character, very useful. πŸ‘‘
  • sequence β€” the sequence number of the last request the X11 server processed. it's the receipt number of the server world. 🧾
  • length β€” how long the reply is, measured in words. and heads up, bestie: one word = 4 bytes. πŸ’€ don't forget that, it will get you.
  • value β€” TODO: NOT YET DOCUMENTED. the docs really said "Β―\_(ツ)_/Β―" on this one.

🌈 DESCRIPTION 🌈

so... there is genuinely nothing here. the original DESCRIPTION section is empty. it's an empty section, standing there, looking cute, saying absolutely nothing. iconic honestly. πŸŽ€


πŸ’œ RETURN VALUE πŸ’œ

You get back an xcb_xv_get_port_attribute_cookie_t. Errors have to be handled when you call the reply function, xcb_xv_get_port_attribute_reply. that's the moment of truth, no cap. πŸͺ

But if you'd rather handle your errors in the event loop instead (valid!! different strokes!!), use xcb_xv_get_port_attribute_unchecked and peep xcb-requests(3) for the details.


πŸ”₯ ERRORS πŸ”₯

This request does never generate any errors. literally never. not a single one. she's drama-free, she's unbothered, she's at peace. 😌✨

🫢 SEE ALSO 🫢

nothing here either. empty. a whole section with no friends. we still love her. πŸ’–


🌟 AUTHOR 🌟

Generated from xv.xml. If you've got corrections or improvements, hit up xcb@lists.freedesktop.org. be nice, they're doing their best. πŸ™


okay that's the whole page, bestie, you're officially smarter than you were five minutes ago and that's on growth. πŸ’…

sourced from X Version 11, libxcb 1.17.0, and filed under xcb_xv_get_port_attribute(3) β€” mwah, go slay. πŸ’–βœ¨πŸŽ€πŸ¦‹