Tk_GetVRootGeometry(3)
π Tk_GetVRootGeometry π
okay bestie, so this is a Tk Library Procedures page β like, the official one β and it's all about finding out where a "virtual root" window lives and how big it is. yes, virtual root. no, it's not a metaphor. stay with me π«Ά
πΈ NAME πΈ
Tk_GetVRootGeometry β literally just: get the location and size of the virtual root for a window β¨
π SYNOPSIS π
#include <tk.h>
Tk_GetVRootGeometry(tkwin, xPtr, yPtr, widthPtr, heightPtr)
π¦ ARGUMENTS π¦
Tk_Window tkwin(in) β the token for the window whose virtual root you wanna interrogate πint xPtr(out) β points to the word where we're gonna stash the x-offset of the virtual rootint yPtr(out) β points to the word where the y-offset goesint widthPtr(out) β points to the word that gets the virtual root's widthint heightPtr(out) β points to the word that gets the virtual root's height
β¨ DESCRIPTION β¨
so Tk_GetVRootGeometry hands you back the geometry info for the virtual root window that's associated with tkwin. and which one is "associated", you ask? it's the virtual root that tkwin's nearest top-level ancestor got reparented into by the window manager β or, if tkwin is a top-level window itself, then it's tkwin's own associated virtual root. main character energy, honestly π
how do we even find that window? the window manager tags it with a __SWM_ROOT or __WM_ROOT property on the top-level window. that's the receipt, iykyk π
okay so here's the vibe check that matters: iftkwinis not associated with a virtual root (like, say, because the window manager just doesn't do virtual roots β some of them simply don't), then*xPtrand*yPtrget set to0, and*widthPtrand*heightPtrget set to the dimensions of the screen containingtkwin. no cap, that's the fallback. π«Ά
π₯ KEYWORDS π₯
geometry, height, location, virtual root, width, window manager
and that's the whole page, bestie, you ate that π this was Tk, version 4.0, dated Tk_GetVRootGeometry(3) β mwah, slay, periodt πβ¨π
π¦ 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