xcb_translate_coordinates(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_translate_coordinates ✨

okay so bestie, welcome to the xcb_translate_coordinates page from the XCB Requests manual πŸ’– this one is a lil request in libxcb that lives in <xcb/xproto.h> and honestly? it's giving "translate my coordinates, queen" πŸ¦‹ let's get into it fr fr


🌸 SYNOPSIS 🌸

first things first, you gotta include the header, no cap:

#include <xcb/xproto.h>

πŸŽ€ Request function

xcb_translate_coordinates_cookie_t
       xcb_translate_coordinates(xcb_connection_t *conn,
       xcb_window_t src_window, xcb_window_t dst_window, int16_t src_x,
       int16_t src_y);

πŸŽ€ Reply datastructure

typedef struct xcb_translate_coordinates_reply_t {
    uint8_t      response_type;
    uint8_t      same_screen;
    uint16_t     sequence;
    uint32_t     length;
    xcb_window_t child;
    int16_t      dst_x;
    int16_t      dst_y;
} xcb_translate_coordinates_reply_t;

πŸŽ€ Reply function

xcb_translate_coordinates_reply_t
       *xcb_translate_coordinates_reply(xcb_connection_t *conn,
       xcb_translate_coordinates_cookie_t cookie,
       xcb_generic_error_t **e);

πŸ’… REQUEST ARGUMENTS πŸ’…

  • conn β€” the XCB connection to X11, obviously πŸ’œ that's your link to the server, your main character connection fr.
  • src_window β€” TODO: NOT YET DOCUMENTED. yeah bestie, the docs just left us on read on this one 😭
  • dst_window β€” TODO: NOT YET DOCUMENTED. also ghosted by the documentation πŸ™ˆ
  • src_x β€” TODO: NOT YET DOCUMENTED. no notes, no explanation, nothing πŸ’€
  • src_y β€” TODO: NOT YET DOCUMENTED. same vibe, zero tea πŸ“

πŸ¦‹ REPLY FIELDS πŸ¦‹

  • response_type β€” the type of this reply, and in this case it's XCB_TRANSLATE_COORDINATES ✨ this field is also present in the xcb_generic_reply_t, so you can use it to tell replies apart from each other β€” iconic detective behaviour πŸ”
  • sequence β€” the sequence number of the last request processed by the X11 server, slay πŸ’«
  • length β€” the length of the reply, in words. and reminder bestie: a word is 4 bytes πŸ‘‘
  • same_screen β€” TODO: NOT YET DOCUMENTED. the mystery continues πŸ’€
  • child β€” TODO: NOT YET DOCUMENTED. we simply do not know her 😭
  • dst_x β€” TODO: NOT YET DOCUMENTED. undocumented and unbothered fr
  • dst_y β€” TODO: NOT YET DOCUMENTED. last one, also a total mystery 🌸

🌈 DESCRIPTION 🌈

(yeah... there's literally nothing here in the original. it's an empty vibe. the section exists, the words do not. periodt πŸ’…)


⭐ RETURN VALUE ⭐

Returns an xcb_translate_coordinates_cookie_t πŸͺ and listen, errors have to be handled when you call the reply function xcb_translate_coordinates_reply. that's the whole deal, no cap.

but if you'd rather handle errors in the event loop instead, use xcb_translate_coordinates_unchecked β€” see xcb-requests(3) for the details πŸ‘€

πŸ”₯ ERRORS πŸ”₯

this request does never generate any errors. not one. zero. she's perfect, she's flawless, she never misses πŸ’–βœ¨


🫢 SEE ALSO 🫢

(nothing listed here in the original, bestie β€” the section is just sitting there, quiet, minding its own business 🌸)


πŸ‘‘ AUTHOR πŸ‘‘

generated from xproto.xml 🧚 contact xcb@lists.freedesktop.org for corrections and improvements β€” they're literally accepting feedback, so if you spot something, speak up bestie πŸ’Œ


X Version 11 Β· libxcb 1.17.0 Β· xcb_translate_coordinates(3)

and that's the whole page, babe πŸ’œ go translate some coordinates, stay hydrated, and remember: the TODOs are not your fault 🫢✨