Tk_MapWindow(3)

πŸ¦‹ Tk_MapWindow(3) πŸ¦‹

Tk Library Procedures β€” map or unmap a window, bestie πŸ’…


✨ NAME ✨

Tk_MapWindow, Tk_UnmapWindow β€” map or unmap a window 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <tk.h>

Tk_Window
Tk_MapWindow(tkwin)

Tk_UnmapWindow(tkwin)

🌸 ARGUMENTS 🌸

  • Tk_Window tkwin (in) β€” token for window, okay bestie? That’s the whole vibe πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

So these procedures are the ones you use to map and unmap windows managed by Tk. Iconic.

Tk_MapWindow maps the window given by tkwin, and it also creates an X window corresponding to tkwin if it does not already exist. Yep, it’s giving β€œmake it appear, and also handle the X window situation.” See the Tk_CreateWindow manual entry for information on deferred window creation πŸ‘€

Tk_UnmapWindow unmaps tkwin's window from the screen. Bye-bye screen presence for that window ✨

Now, the timing tea β˜•: if tkwin is a child window (i.e. Tk_CreateWindow was used to create a child window), then event handlers interested in map and unmap events are invoked immediately. Instant. No waiting. If tkwin is not an internal window, then the event handlers will be invoked later, after X has seen the request and returned an event for it. So like, X has to see it first, periodt.

πŸ’€ These procedures should be used in place of the X procedures XMapWindow and XUnmapWindow, since they update Tk's local data structure for tkwin. Applications using Tk should not invoke XMapWindow and XUnmapWindow directly. No cap, don’t do it.

πŸ”₯ KEYWORDS πŸ”₯

  • map
  • unmap
  • window

Signed off with πŸ’– from the footer: source/version is Tk, and the footer doesn’t show a date β€” so no invented date, bestie, just Tk and Tk_MapWindow(3) energy πŸŽ€

πŸ“¦ where this page comes from