XMGETVISIBILITY(3)

πŸ“¦
version 2.5.2 Β· 2 versions
, in alpine 3.24, arch rolling, centos-stream 9, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ‘‘ XmGetVisibility β€” the library call that spills the tea on whether ur widget is actually visible πŸ’…

okay bestie, so this is a page from the XmGetVisibility(library call) manual, and it's literally the vibe-check function for widgets. Let's get into it πŸŽ€


✨ NAME ✨

XmGetVisibility β€” a function that determines if a widget is visible πŸ¦‹


πŸ“œ SYNOPSIS πŸ“œ

#include <Xm/Xm.h>
XmVisibility XmGetVisibility(
Widget widget);

πŸ’– DESCRIPTION πŸ’–

So, XmGetVisibility returns the visibility state of the widget you point at. It's out here checking whether some part of the widget's rectangular area is unobscured by the widget's ancestors, OR whether some part of the widget's rectangular area is inside the work window (but possibly outside the clip window) of a ScrolledWindow whose XmNscrollingPolicy is XmAUTOMATIC and whose XmNtraverseObscuredCallback is not NULL. 🌸

🚨 Big caveat incoming, bestie, don't skip this one: XmGetVisibility does not check whether widget is obscured by its siblings, or by siblings of its ancestors. So yeah β€” it will literally return XmVISIBILITY_UNOBSCURED for widgets that are completely or partially covered by one or more siblings of widget, or by one or more siblings of ancestors of widget. It's giving "technically visible, don't @ me." πŸ’€

A few more things it wants you to know:

  • When a widget which is unrealized is being queried, it is indicated that the widget is fully obscured.
  • If an application unmaps a widget that has its XmNmappedWhenManaged resource set to True, the return value is undefined. (undefined = chaos, we don't stan πŸ™ˆ)
  • When a widget which is unmanaged is being queried, it is indicated that the widget is fully obscured.

And the one parameter, which is doing the absolute most:

  • widget β€” Specifies the ID of the widget 🫢

🌈 RETURN 🌈

Returns one of the following values, periodt:

  • XmVISIBILITY_UNOBSCURED β€” indicates that the widget is mapped, not obscured, and is completely visible on the screen. main character energy ✨
  • XmVISIBILITY_PARTIALLY_OBSCURED β€” indicates that the widget is mapped, and is not completely visible on the screen (partially obscured). lowkey shy πŸ₯Ί
  • XmVISIBILITY_FULLY_OBSCURED β€” indicates that the widget is not at all visible on the screen. gone. ghosted. πŸ’€

iykyk πŸ‘‘


and that's the whole page, bestie!! this lil masterpiece comes to you straight from the XmGetVisibility(library call) manual page β€” go forth and check ur visibility, no cap πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά