xcb_input_xi_query_device(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_query_device πŸ’–

okay so this is a page from the XCB Requests corner of the universe β€” it's xcb_input_xi_query_device(3), and bestie, it's literally the request that asks the X server "hey girl, what's up with this device?" and gets the whole tea back. no cap. πŸŽ€


✨ NAME ✨

xcb_input_xi_query_device β€” asks the X server for the info about an input device (the description in the original is, and I cannot stress this enough, completely blank, so we're all just vibing here together 🫢)


🌸 SYNOPSIS 🌸

First things first, you gotta pull in the header:

#include <xcb/xinput.h>

πŸ¦‹ Request function

xcb_input_xi_query_device_cookie_t
       xcb_input_xi_query_device(xcb_connection_t *conn,
       xcb_input_device_id_t deviceid);

πŸ¦‹ Reply datastructure

typedef struct xcb_input_xi_query_device_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint16_t num_infos;
    uint8_t  pad1[22];
} xcb_input_xi_query_device_reply_t;

πŸ¦‹ Reply function

xcb_input_xi_query_device_reply_t
       *xcb_input_xi_query_device_reply(xcb_connection_t *conn,
       xcb_input_xi_query_device_cookie_t cookie,
       xcb_generic_error_t **e);

πŸ¦‹ Reply accessors

the lil helpers that let you actually walk the reply, obsessed:

int xcb_input_xi_query_device_infos_length(const
       xcb_input_xi_query_device_reply_t *reply);
xcb_input_xi_device_info_iterator_t
       xcb_input_xi_query_device_infos_iterator(const
       xcb_input_xi_query_device_reply_t *reply);

πŸ’… REQUEST ARGUMENTS πŸ’…

  • conn β€” the XCB connection to X11, your lil hotline to the server πŸ’–
  • deviceid β€” TODO: NOT YET DOCUMENTED. yeah bestie, nobody wrote this one down yet 😭

πŸ‘‘ REPLY FIELDS πŸ‘‘

  • response_type β€” the type of this reply, which in this case is XCB_INPUT_XI_QUERY_DEVICE. this field also lives in the xcb_generic_reply_t, so you can use it 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. literally the receipt number.
  • length β€” the length of the reply, in words. and a word is 4 bytes, iykyk ✨
  • num_infos β€” TODO: NOT YET DOCUMENTED. we simply do not know, and that's the vibe πŸ™ˆ

🌈 DESCRIPTION 🌈

okay so the DESCRIPTION section here is empty. like, fully empty. nothing. the void. the original just has the heading and then moves on. so there's nothing to tell you and I refuse to make stuff up πŸ’€

πŸ“ RETURN VALUE πŸ“

Returns an xcb_input_xi_query_device_cookie_t. it's a cookie bestie, not the answer itself β€” you gotta trade it in later.

Errors have to be handled when calling the reply function xcb_input_xi_query_device_reply.

If you'd rather handle errors in the event loop instead, use xcb_input_xi_query_device_unchecked. See xcb-requests(3) for details. ✨


🧚 ERRORS 🧚

This request does never generate any errors. periodt. clean. flawless. no drama. πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

this section is empty in the original β€” no references listed at all. nothing to see, nothing to also. πŸ’œ

🌟 AUTHOR 🌟

Generated from xinput.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. (so if you spot something off, that's the inbox, bestie 🫢)


and that's the whole page!! this one came from X Version 11, libxcb 1.17.0, and it's the xcb_input_xi_query_device(3) manual page β€” thanks for reading, ily, go query some devices πŸ’…βœ¨πŸŒΈ