TICKIT_CTL_NAME(3)

✨ NAME ✨

okay so bestie, this is tickit_ctl_name β€” she returns the name of a toplevel instance control πŸ’…


🌸 SYNOPSIS 🌸

#include <tickit.h>

const char * tickit_ctl_name(TickitCtl ctl);
TickitCtl tickit_ctl_lookup(const char * name);

TickitType tickit_ctl_type(TickitCtl ctl);

and like, you gotta link with -ltickit, no skipping that step fr fr 🫢


πŸ’– DESCRIPTION πŸ’–

tickit_ctl_name() hands you back the name of the given toplevel instance control. These names are literally the lowercase strings that are given over in tickit(7) β€” same energy, same spelling, no cap ✨

tickit_ctl_lookup() is the reverse vibe: you give her a name, she gives you the control constant for it. But if the name is not recognised, she returns -1. not a fun surprise but there it is 😭

tickit_ctl_type() tells you the type of the given instance control, as one of these iconic constants πŸ‘‘

  • TICKIT_TYPE_BOOL β€” the value is an integer representing a simple boolean choice, where any nonzero value is true. Use tickit_setctl_int(3) and tickit_getctl_int(3). yes bestie, "any nonzero" β€” -7 is true, that's just how she is πŸ’€
  • TICKIT_TYPE_INT β€” the value is an integer representing a quantity, or a value in some particular enumeration. Use tickit_setctl_int(3) and tickit_getctl_int(3).

and for unrecognised control types? the function returns 0. that's the whole story πŸ™ˆ


πŸ¦‹ RETURN VALUE πŸ¦‹

  • tickit_ctl_name() returns a constant string pointer ✨
  • tickit_ctl_lookup() returns a control constant or -1
  • tickit_ctl_type() returns a control type constant or 0

πŸŽ€ SEE ALSO πŸŽ€

tickit(7) β€” go read her, she's the main character πŸ’œ


okay that's the whole page, thanks for coming to my ted talk 🧚 this one lives in the Library Functions Manual under the name TICKIT_CTL_NAME(3) β€” slay, periodt, go forth and look up your controls πŸ’…πŸ”₯