Tk_GetRootCoords(3)
π NAME π
okay so welcome to Tk_GetRootCoords(3) from the Tk Library Procedures manual β she's here to Compute root-window coordinates of window, and yes bestie, she ate π
Tk_GetRootCoords - Compute root-window coordinates of window
β¨ SYNOPSIS β¨
#include <tk.h>
Tk_GetRootCoords(tkwin, xPtr, yPtr)
πΈ ARGUMENTS πΈ
Tk_Window tkwin(in) β Token for window. it's literally the little handle that tells you which window we're talking about π«Άint *xPtr(out) β Pointer to location in which to store root-window x-coordinate corresponding to left edge oftkwin's border β¨int *yPtr(out) β Pointer to location in which to store root-window y-coordinate corresponding to top edge oftkwin's border π
π¦ DESCRIPTION π¦
This procedure scans through the structural information maintained by Tk to compute the root-window coordinates corresponding to the upper-left corner of tkwin's border. like, it's doing the coordinate math through Tk's own structural tea, no cap π₯
If tkwin has no border, then Tk_GetRootCoords returns the root-window coordinates corresponding to location (0,0) in tkwin. okay so no border? we're still locked in at (0,0) π
Tk_GetRootCoords is relatively efficient, since it does not have to communicate with the X server. highkey iconic behavior β fast because it doesn't need to chat with the X server, periodt π
π KEYWORDS π
coordinates, root window β iykyk π§
xoxo, signing off from the Tk source/version zone with page Tk_GetRootCoords(3) πβ¨
π¦ where this page comes from
- alpine 3.23: tk9-doc 9.0.3-r0 Β· TCL
- alpine 3.24: tk9-doc 9.0.3-r2 Β· TCL
- fedora 43: tk-devel 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 43: tk-devel 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk-devel 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk-devel 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- nixos 26.05: tk 9.0.3
- nixpkgs unstable: tk 9.1.0
- Copyright (c) 1990 The Regents of the University of California
- Copyright (c) 1994-1996 Sun Microsystems, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms