xcb_input_xi_get_focus(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_input_xi_get_focus β€” the manual page bestie

okay so this is the xcb_input_xi_get_focus page from XCB Requests, and we're gonna get into it. it's short, it's sweet, it's giving "little function, big feelings". let's go ✨


🌸 NAME 🌸

xcb_input_xi_get_focus β€” (that's it. that's the whole name section. the original left it blank and honestly? iconic minimalism. we respect it.)</p>


πŸ¦‹ SYNOPSIS πŸ¦‹

first things first, you gotta pull in the header:

#include <xcb/xinput.h>

✨ Request function ✨

xcb_input_xi_get_focus_cookie_t
       xcb_input_xi_get_focus(xcb_connection_t *conn,
       xcb_input_device_id_t deviceid);

πŸŽ€ Reply datastructure πŸŽ€

typedef struct xcb_input_xi_get_focus_reply_t {
    uint8_t      response_type;
    uint8_t      pad0;
    uint16_t     sequence;
    uint32_t     length;
    xcb_window_t focus;
    uint8_t      pad1[20];
} xcb_input_xi_get_focus_reply_t;

πŸ’– Reply function πŸ’–

xcb_input_xi_get_focus_reply_t
       *xcb_input_xi_get_focus_reply(xcb_connection_t *conn,
       xcb_input_xi_get_focus_cookie_t cookie, xcb_generic_error_t **e);

πŸ‘‘ REQUEST ARGUMENTS πŸ‘‘

  • conn β€” your XCB connection to X11. the whole portal to the server, no big deal πŸ’«
  • deviceid β€” TODO: NOT YET DOCUMENTED. yeah bestie, the docs said "we'll get to it" and then never got to it. we're all just living with the mystery. πŸ™ˆ

🌈 REPLY FIELDS 🌈

  • response_type β€” what kind of reply this even is. in this case it's XCB_INPUT_XI_GET_FOCUS. lowkey important: this same field lives in xcb_generic_reply_t too, so you can use it to tell your replies apart from each other. it's the name tag at the party 🏷️
  • sequence β€” the sequence number of the last request processed by the X11 server. so you always know where you are in the timeline ⏳
  • length β€” how long the reply is, measured in words. and a word, for the record, is 4 bytes. not a vibes-based word. a real one. πŸ“
  • focus β€” TODO: NOT YET DOCUMENTED. another mystery box 🎁 (it's a xcb_window_t tho, so that's a hint. iykyk)

🫢 DESCRIPTION 🫢

so the DESCRIPTION section is… empty.</p> nothing. a beautiful void. the original just. didn't fill it in. we're keeping it exactly that way because the facts do not change, even when the facts are a gentle silence πŸŒ™


πŸ’€ RETURN VALUE πŸ’€

  • it returns an xcb_input_xi_get_focus_cookie_t. πŸͺ yes, a cookie. you hold onto that cookie and trade it in later.
  • errors? they have to be handled when you call the reply function, xcb_input_xi_get_focus_reply.
  • but if you'd rather handle errors in the event loop instead β€” totally valid, main character choice β€” use xcb_input_xi_get_focus_unchecked.
  • and for the full details on how all this request/reply/cookie business works, go read xcb-requests(3). πŸ“š

πŸ”₯ ERRORS πŸ”₯

nope. none. this request does never generate any errors. not one. flawless behaviour, no notes. πŸ’…βœ¨

🌸 SEE ALSO 🌸

also empty in the original. a little "see also… nothing" moment. we're preserving the emptiness with love. πŸ•ŠοΈ</p>


πŸ¦„ AUTHOR πŸ¦„

Generated from xinput.xml. if you spot something wrong or wanna make it better, contact xcb@lists.freedesktop.org for corrections and improvements. πŸ’Œ


and that's the whole page bestie!! go forth and get that focus, whatever it ends up being. mwah 🫢

X Version 11 Β· libxcb 1.17.0 Β· xcb_input_xi_get_focus(3) πŸ’– byeee