Tk_MainWindow(3)
Tk_MainWindow(3) π
okay so this page is from Tk Library Procedures, and it's all about main-window info, bestie. No cap, the group chat here includes Tk_MainWindow, Tk_GetNumMainWindows, Tk_SetMainMenubar, and Tk_SetWindowMenubar. π«Ά
NAME π¦
Tk_MainWindow, Tk_GetNumMainWindows β functions for querying main window information. The synopsis also pulls in Tk_SetMainMenubar and Tk_SetWindowMenubar, iykyk. β¨
SYNOPSIS πΈ
#include <tk.h>
Tk_Window
Tk_MainWindow(interp)
Tk_SetMainMenubar(interp, tkwin, menuName)
Tk_SetWindowMenubar(interp, tkwin, oldMenuName, menuName)
int
Tk_GetNumMainWindows()
ARGUMENTS π
Tcl_Interp *interp(in/out) β the interpreter associated with the application. πTk_Window tkwin(in) β token for main window. πͺconst char (*menuName)β the name of the new menubar that the toplevel needs to be set to.NULLmeans there is no menu right now. πconst char (*oldMenuName)β the name of the menubar previously set in this toplevel.NULLmeans no menu was set previously. π§
DESCRIPTION π
A main window is a special kind of toplevel window used as the outermost window in an application. Literally main character energy. π
If interp is associated with a Tk application, then Tk_MainWindow returns the application's main window. If there is no Tk application associated with interp, then Tk_MainWindow returns NULL and leaves an error message in interpreter interp's result. π
Tk_GetNumMainWindows returns a count of the number of main windows currently open in the current thread. Bestie, it's a headcount for main windows. π₯
Tk_SetMainMenubar is called when a toplevel widget is brought to front. On the Macintosh, it sets up the menubar that goes across the top of the main monitor. On other platforms, nothing is necessary. π
Tk_SetWindowMenubar associates a menu with a window. The old menu clones for the menubar are thrown away, and a handler is set up to allocate the new ones. The way that old stuff gets yeeted? Iconic. β¨
KEYWORDS β
applicationmain window
later, bestie π footer tea: source/version is Tk 7.0, page is Tk_MainWindow(3), and the date slot is not showing a date on this page β 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