xcb_input_query_device_state(3)
β¨ xcb_input_query_device_state β¨
okay bestie, welcome to the XCB Requests chapter of the manual, section 3 π
this one is xcb_input_query_device_state and she is lowkey iconic β she asks the X server "hey queen, what's the current state of this device?" and the server tells you. that's the whole vibe. no cap.
πΈ NAME πΈ
xcb_input_query_device_state β (the original page leaves this blank, so likeβ¦ that's all we got, bestie π)
π SYNOPSIS π
first up, you gotta pull in the header:
#include <xcb/xinput.h>
Request function
xcb_input_query_device_state_cookie_t
xcb_input_query_device_state(xcb_connection_t *conn,
uint8_t device_id);
Reply datastructure
typedef struct xcb_input_query_device_state_reply_t {
uint8_t response_type;
uint8_t xi_reply_type;
uint16_t sequence;
uint32_t length;
uint8_t num_classes;
uint8_t pad0[23];
} xcb_input_query_device_state_reply_t;
Reply function
xcb_input_query_device_state_reply_t
*xcb_input_query_device_state_reply(xcb_connection_t *conn,
xcb_input_query_device_state_cookie_t cookie,
xcb_generic_error_t **e);
Reply accessors
int xcb_input_query_device_state_classes_length(const
xcb_input_query_device_state_reply_t *reply);
xcb_input_input_state_iterator_t
xcb_input_query_device_state_classes_iterator(const
xcb_input_query_device_state_reply_t *reply);
π REQUEST ARGUMENTS π
connβ the XCB connection to X11. your little hotline to the server, fr fr.device_idβTODO: NOT YET DOCUMENTED.yeah bestie, the upstream docs left this one on read π it's auint8_tand it's the device you're asking about, that's all we know.
π¦ REPLY FIELDS π¦
response_typeβ the type of this reply. in this case it'sXCB_INPUT_QUERY_DEVICE_STATE. this field is also present in thexcb_generic_reply_t, and it's literally how you tell replies apart from each other πsequenceβ the sequence number of the last request processed by the X11 server. her little receipt number π§Ύlengthβ the length of the reply, in words. and a word is 4 bytes, so do the math bestie.xi_reply_typeβTODO: NOT YET DOCUMENTED.πnum_classesβTODO: NOT YET DOCUMENTED.π
π DESCRIPTION π
nothing here, bestie. the original page has an empty DESCRIPTION section. the silence is deafening π
β RETURN VALUE β
she returns an xcb_input_query_device_state_cookie_t πͺ β that's your little claim ticket.
errors have to be handled when you call the reply function xcb_input_query_device_state_reply, okay? that's the moment of truth.
and if you'd rather handle errors in the event loop instead? use xcb_input_query_device_state_unchecked. see xcb-requests(3) for the deets, iykyk.
π ERRORS π
this request does never generate any errors. periodt. not a single one. flawless behavior honestly π₯
π SEE ALSO π
this section is empty on the original page too π«Ά nothing to link, nothing to see, moving on.
π AUTHOR π
generated from xinput.xml. if you spot something wrong or wanna make it better, hit up xcb@lists.freedesktop.org for corrections and improvements β they're literally waiting for your email bestie π
and that's the whole page!! this beauty came to you from X Version 11, libxcb 1.17.0, and she is xcb_input_query_device_state(3) β slay, stay hydrated, and remember: cookies don't eat themselves πͺβ¨π
π¦ where this page comes from
- alpine 3.22: libxcb-doc 1.17.0-r0 Β· MIT
- alpine 3.23: libxcb-doc 1.17.0-r1 Β· MIT
- alpine 3.24: libxcb-doc 1.17.0-r2 Β· MIT
- arch rolling: libxcb 1.17.0-1 Β· X11
- centos-stream 10: libxcb-devel 1.17.0-3.el10 Β· X11
- debian trixie: libxcb-doc 1.17.0-2
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- nixpkgs unstable: libxcb 1.17.0
- opensuse-leap 16.0: libxcb-devel-doc 1.17.0-160000.2.2 Β· MIT
- ubuntu questing: libxcb-doc 1.17.0-2build1
- ubuntu resolute: libxcb-doc 1.17.0-2ubuntu1
- ubuntu stonking: libxcb-doc 1.17.0-2ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms