XtMapWidget(3)

πŸ’– XtMapWidget β€” bestie edition πŸ’–

ok so this is the XtMapWidget(3) page from the XT FUNCTIONS girlies, and it's literally about mapping and unmapping widgets. yes bestie, showing and hiding your windows. it's giving window-management main character energy and we're obsessed. πŸ¦‹


✨ NAME ✨

XtMapWidget, XtSetMappedWhenManaged, XtUnmapWidget β€” the trio that maps and unmaps widgets πŸ’…


🌸 SYNTAX 🌸

#include <X11/Intrinsic.h>

void XtMapWidget(Widget w);

void XtSetMappedWhenManaged(Widget w, Boolean map_when_managed);

void XtUnmapWidget(Widget w);

no cap, that's the whole vibe. three little functions, zero drama. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • map_when_managed β€” a Boolean value, and it's specifying the new value of the map_when_managed field. it's the little switch that decides everything, iykyk.
  • w β€” specifies the widget. that's it. that's the widget. 🫢

πŸ‘‘ DESCRIPTION πŸ‘‘

ok so here's the tea, fr fr:

If the widget is realized and managed, and if the new value of map_when_managed is True, then XtSetMappedWhenManaged maps the window. 🌈

If the widget is realized and managed, and if the new value of map_when_managed is False, it unmaps the window. πŸ’€

XtSetMappedWhenManaged is a convenience function β€” and bestie, she's the fast one β€” it's equivalent to (but slightly faster than) calling XtSetValues and setting the new value for the mappedWhenManaged resource. πŸ”₯

And as an alternative to using XtSetMappedWhenManaged to control mapping, a client may set mapped_when_managed to False and use XtMapWidget and XtUnmapWidget explicitly. so you've got options, and honestly? both ate. πŸ’…

both realized AND managed have to be true for any of this mapping/unmapping to happen β€” that's the vibe check the widget has to pass first. ⭐

🌟 SEE ALSO 🌟

  • XtManageChildren(3)
  • X Toolkit Intrinsics - C Language Interface
  • Xlib - C Language X Interface

and that's the whole page bestie, we're done here! πŸŽ€ this little icon came from X Version 11, specifically libXt 1.3.1, and it's stamped with a date that's just as iconic as it is. slay, go map some widgets. πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from