Tk_ManageGeometry(3)
π Tk_ManageGeometry(3) π
okay bestie, welcome to the <pink>Tk_ManageGeometry(3)</pink> page from Tk Library Procedures β yes, the manual name is folded in right here at the top like a little name tag π«Ά. This one is all about arranging to handle geometry requests for a window, and itβs lowkey giving βbackstage pass to the geometry managersβ energy. π
πΈ NAME πΈ
Tk_ManageGeometry β arrange to handle geometry requests for a window.
β¨ SYNOPSIS β¨
#include <tk.h>
Tk_ManageGeometry(tkwin, mgrPtr, clientData)
π ARGUMENTS π
Tk_Window tkwin(in) β token for the window to be managed. πconst Tk_GeomMgr *mgrPtr(in) β pointer to the data structure containing information about the geometry manager, orNULLto indicate thattkwinβs geometry should not be managed anymore. π The data structure pointed to bymgrPtrmust be static: Tk keeps a reference to it as long as the window is managed. no cap, this matters.void *clientData(in) β an arbitrary one-word value to pass to the geometry manager callbacks. π
π¦ DESCRIPTION π¦
Tk_ManageGeometry arranges for a particular geometry manager, described by the mgrPtr argument, to control the geometry of a particular content window, given by tkwin. If tkwin was previously managed by some other geometry manager, the previous manager loses control in favor of the new one. If mgrPtr is NULL, geometry management is cancelled for tkwin. periodt. β¨
The structure pointed to by mgrPtr contains information about the geometry manager:
typedef struct {
const char *name;
Tk_GeomRequestProc *requestProc;
Tk_GeomLostContentProc *lostContentProc;
} Tk_GeomMgr;
The name field is the textual name for the geometry manager, such as pack or place; this value will be returned by the command winfo manager. iykyk. π·οΈ
requestProc is a procedure in the geometry manager that will be invoked whenever Tk_GeometryRequest is called by the content window to change its desired geometry. requestProc should have arguments and results that match the type Tk_GeomRequestProc:
typedef void Tk_GeomRequestProc(
void *clientData,
Tk_Window tkwin);
The parameters to requestProc will be identical to the corresponding parameters passed to Tk_ManageGeometry. clientData usually points to a data structure containing application-specific information about how to manage tkwinβs geometry. π
The lostContentProc field of mgrPtr points to another procedure in the geometry manager. Tk will invoke lostContentProc if some other manager calls Tk_ManageGeometry to claim tkwin away from the current geometry manager. π¨
bestie, listen:lostContentProcis not invoked ifTk_ManageGeometryis called with aNULLvalue formgrPtr(presumably the current geometry manager has made this call, so it already knows that the window is no longer managed), nor is it called ifmgrPtris the same as the windowβs current geometry manager. thatβs the rule, not me being dramatic. π
lostContentProc should have arguments and results that match the following prototype:
typedef void Tk_GeomLostContentProc(
void *clientData,
Tk_Window tkwin);
The parameters to lostContentProc will be identical to the corresponding parameters passed to Tk_ManageGeometry. fr fr. π«Ά
π₯ KEYWORDS π₯
callback, geometry, managed, request, unmanaged β the whole keyword crew is here, accounted for. π
cute sign-off: source Tk, version/date field 4.0 β okay bye bestie, go manage some geometry and slay ππ¦β¨
π¦ 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-1994 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