XtGetActionList(3)

πŸ’– XtGetActionList(3) πŸ’–

part of the XT FUNCTIONS girlies β€” this is the XtGetActionList page, bestie, and she's serving


✨ NAME ✨

XtGetActionList β€” obtain class action list πŸŽ€


🌸 SYNTAX 🌸

okay so first you gotta pull in the header, no cap:

#include <X11/Intrinsic.h>

void XtGetActionList(WidgetClass widget_class, XtActionList*
       actions_return, Cardinal* num_actions_return);

three args, one function, zero drama (unless you forget to free, but we'll get there πŸ’€)


πŸ¦‹ ARGUMENTS πŸ¦‹

  • widget_class β€” the widget class whose actions are to be returned. like, which class's action list are we even talking about, bestie.
  • actions_return β€” returns the action list. this is where she hands you the goods ✨
  • num_actions_return β€” returns the number of action procedures declared by the class. yes, it counts them for you. iconic behavior.

πŸ’… DESCRIPTION πŸ’…

XtGetActionList returns the action table defined by the specified widget class. note the word specified β€” this table does not include actions defined by the superclasses. it's giving "just the class, nothing inherited, mind your business" 🫢

so here's the vibe check, and listen close because this part matters:

if widget_class is not initialized, or is not coreWidgetClass or a subclass thereof, or if the class does not define any actions, then *actions_return will be NULL and *num_actions_return will be zero. no action list for you, babes 😭

and if *actions_return is non-NULL? the client is responsible for freeing the table using XtFree when it is no longer needed. that's on YOU. not her. not the library. you. don't leak it, i'm literally begging πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

  • X Toolkit Intrinsics - C Language Interface
  • Xlib - C Language X Interface

go read those if you want the full lore, iykyk πŸ“š


🌈 FINAL VIBES 🌈

this page is living in X Version 11, libXt 1.3.1, and it's been that girl since forever β€” XtGetActionList, action list obtained, slay πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from