XtTranslateCoords(3)
π« XtTranslateCoords β the XT FUNCTIONS girlies know π«
okay bestie, so this is XtTranslateCoords, and she's a function from the XT FUNCTIONS corner of the X world. Her whole vibe? Translating widget coordinates. That's it, that's the job. π
β¨ NAME β¨
XtTranslateCoords β translate widget coordinates π¦
πΈ SYNTAX πΈ
#include <X11/Intrinsic.h>
void XtTranslateCoords(Widget w, Position x, Position y, Position
*rootx_return, Position *rooty_return);
like. look at her. no return value, just pure void energy. main character who does the work and dips π
π ARGUMENTS π
rootx_returnrooty_returnβ these two are the little output girlies: they return the root-relative x and y coordinates. you hand her pointers, she fills them in. give her something to write to, okay? π«Άxyβ these ones are the input side of the equation: you specify the widget-relative x and y coordinates. that's where you're starting from.wβ and this is just... the widget. the one. specifies the widget. she's the context, she's the moment, she's the whole reason any of this works. π
π₯ DESCRIPTION π₯
so, real talk: XtTranslateCoords is similar to the Xlib XTranslateCoordinates function β like, they're giving the same energy, same goal, same "where is this actually on the screen" fantasy.
BUT. and this is the iconic part, no cap:
she does not generate a server request. none. zero. not a single round trip to the server. π
why? because all the required information already is in the widget's data structures. she's not asking anybody for anything β she already has it. local knowledge only. she ate and she didn't even need the server's help. periodt. β¨
ok but fr fr β that's the whole selling point here. same result as the Xlib version, but cheaper, because it's all sitting right there in the widget already.
π SEE ALSO π
- X Toolkit Intrinsics - C Language Interface
- Xlib - C Language X Interface
iykyk, go read them if you wanna go deeper π§
okay that's the whole page bestie!! this was X Version 11, libXt 1.3.1, and the page itself is XtTranslateCoords(3) β mwah, go translate some coordinates, you're gonna slay ππβ
π¦ where this page comes from
- alpine 3.22: libxt-doc 1.3.1-r0 Β· MIT
- alpine 3.23: libxt-doc 1.3.1-r0 Β· MIT
- alpine 3.24: libxt-doc 1.3.1-r0 Β· MIT
- arch rolling: libxt 1.3.1-1 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 43: libXt-devel 1.3.1-3.fc43 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 43: libXt-devel 1.3.1-3.fc43 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 44: libXt-devel 1.3.1-4.fc44 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 44: libXt-devel 1.3.1-4.fc44 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- Copyright 1993 X Consortium
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms