XMGETFOCUSWIDGET(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

✨ XmGetFocusWidget ✨

okay bestie, gather round, because we're reading a library call man page and it's honestly kind of a serve πŸ’… it's called XmGetFocusWidget and it lives in the Motif/Xm docs, so yes, we're in widget-girl territory now πŸŽ€


πŸ’– NAME πŸ’–

XmGetFocusWidget β€” returns the ID of the widget that has keyboard focus 🎯

like... literally just that. she tells you who's holding the focus. iconic behavior, no notes 🫢


🌸 SYNOPSIS 🌸

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

so you pull in <Xm/Xm.h>, you call XmGetFocusWidget, you hand her a Widget, and she hands you back a Widget. that's the whole vibe ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, bestie: XmGetFocusWidget goes snooping through the hierarchy that contains the widget you specified, and it returns the ID of the widget that has keyboard focus. πŸ‘‘

the way it does this is lowkey clever: it extracts the widget ID from the associated Shell widget. and because it does that, your specified widget can literally be anywhere in the hierarchy. anywhere. no cap. it does not have to be the focused one, it does not have to be adjacent, it just has to be in there somewhere and the Shell does the rest 🌈

  • widget β€” specifies a widget ID within a given hierarchy 🧚

⭐ RETURN ⭐

returns the ID of the widget with keyboard focus πŸ’–

and if no child of the Shell has focus, the function returns NULL. so pls check for NULL, bestie, don't be out here dereferencing a whole nothing 😭



and that's the whole page, periodt πŸŽ€ this was XmGetFocusWidget, a library call page, straight out of the Xm manual β€” mwah, love that for her, and love that for you for reading the whole thing πŸ’…πŸ«Ά