xcb_test_compare_cursor(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_test_compare_cursor ✨

okay bestie, pull up a chair because we're looking at a page from the XCB Requests chapter of the manual, and this one is literally called xcb_test_compare_cursor. it's from the XTEST family, it lives in libxcb, and it does exactly one little job: ask the X server "hey, is this cursor the one on this window?" πŸ’…


🌸 NAME 🌸

xcb_test_compare_cursor β€”

fr fr, that's it. the original page leaves this one blank after the dash, so we're not gonna invent a description. mysterious queen behavior. πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

First things first, you gotta bring in the header:

#include <xcb/xtest.h>

Request function πŸ’Œ

xcb_test_compare_cursor_cookie_t
       xcb_test_compare_cursor(xcb_connection_t *conn,
       xcb_window_t window, xcb_cursor_t cursor);

Reply datastructure 🧚

typedef struct xcb_test_compare_cursor_reply_t {
    uint8_t  response_type;
    uint8_t  same;
    uint16_t sequence;
    uint32_t length;
} xcb_test_compare_cursor_reply_t;

Reply function πŸ‘‘

xcb_test_compare_cursor_reply_t
       *xcb_test_compare_cursor_reply(xcb_connection_t *conn,
       xcb_test_compare_cursor_cookie_t cookie,
       xcb_generic_error_t **e);

πŸ’– REQUEST ARGUMENTS πŸ’–

  • conn β€” the XCB connection to X11. your lil hotline to the server, no cap.
  • window β€” TODO: NOT YET DOCUMENTED. yeah bestie, the docs said "we'll get to it" and then never did. πŸ™ˆ
  • cursor β€” TODO: NOT YET DOCUMENTED. same energy. iconic of them, honestly.

🌈 REPLY FIELDS 🌈

  • response_type β€” what kind of reply this is. in this case it's XCB_TEST_COMPARE_CURSOR. this field is also hanging out in the xcb_generic_reply_t, so you can use it to tell your replies apart from each other. very "which one of you is which" of it. πŸ”₯
  • sequence β€” the sequence number of the last request the X11 server processed.
  • length β€” how long the reply is, measured in words. and yes, a word here is 4 bytes. periodt.
  • same β€” TODO: NOT YET DOCUMENTED. the original really just left us on read for this one. 😭

πŸŽ€ DESCRIPTION πŸŽ€

genuinely nothing here. the original page has an empty DESCRIPTION section, so there is no prose for me to translate. we respect the silence. 🫢

⭐ RETURN VALUE ⭐

You get back an xcb_test_compare_cursor_cookie_t. that's your lil claim ticket. 🎟️

Errors? those have to be handled when you call the reply function, xcb_test_compare_cursor_reply.

But if you'd rather handle errors in the event loop instead, use xcb_test_compare_cursor_unchecked. see xcb-requests(3) for the details, iykyk.


πŸ’€ ERRORS πŸ’€

This request never generates any errors. not one. zero. clean slate. we love a low-drama request. ✨


🌸 SEE ALSO 🌸

empty in the original! no cross-references listed here at all. shocking, I know. πŸ’œ

πŸ‘‘ AUTHOR πŸ‘‘

Generated from xtest.xml. For corrections and improvements, contact xcb@lists.freedesktop.org.


and that's the whole page, bestie! πŸ¦‹ this one came from X Version 11, and it's part of libxcb 1.17.0 β€” so if you're running that, you're running this exact vibe. mwah, go forth and compare those cursors. πŸ’…πŸ’–