Tk_CoordsToWindow(3)
π Tk_CoordsToWindow(3) π
okay bestie, welcome to the Tk_CoordsToWindow(3) page from the Tk Library Procedures manual. It's literally about finding the window that contains a point, and we're keeping every tiny detail intact. π
β¨ NAME β¨
Tk_CoordsToWindow β Find window containing a point. That's the whole name vibe, and honestly? Iconic. π―
πΈ SYNOPSIS πΈ
#include <tk.h>
Tk_Window
Tk_CoordsToWindow(rootX, rootY, tkwin)
π ARGUMENTS π
int rootX(in) β the X-coordinate, measured in root window coordinates. πint rootY(in) β the Y-coordinate, also in root window coordinates. πTk_Window tkwin(in) β a token for the window that identifies the application. πͺ
π¦ DESCRIPTION π¦
So Tk_CoordsToWindow locates the window that contains a given point. The point is specified in root coordinates with rootX and rootY β and important tea: if a virtual-root window manager is in use, then rootX and rootY are in the coordinate system of the virtual root window. π
The return value from the procedure is a token for the window that contains the given point. If the point is not in any window, or if the containing window is not in the same application as tkwin, then NULL is returned. No cap. π«Ά
The containing window is decided using the same rules that determine which window contains the mouse cursor: if a parent and a child both contain the point, then the child gets preference; and if two siblings both contain the point, then the highest one in the stacking order (i.e. the one that's visible on the screen) gets preference. It's giving sibling rivalry, but make it stacking order. π
lowkey reminder:NULLis the answer when the point is in no window, or when the containing window belongs to a different application thantkwin. π«‘
π KEYWORDS π
containingcoordinatesroot window
signed off by Tk, bestie β this footer is giving source/version energy, and the date slot is a mystery because there isn't one, so I'm not inventing it. π«Ά This page is Tk_CoordsToWindow(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-1993 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