TICKIT_CTLNAME(3)

πŸ“¦ version 0.4.1, in ubuntu jammy

✨ TICKIT_CTLNAME ✨

okay bestie, so this is TICKIT_CTLNAME(3) from the Library Functions Manual β€” aka section 3, the "functions" shelf of the library. it's a lil trio of helpers for asking questions about toplevel instance controls in tickit. names, lookups, types. that's the whole vibe. πŸ’…


🌸 NAME 🌸

tickit_ctlname β€” it hands you back the name of a toplevel instance control πŸŽ€


✨ SYNOPSIS ✨

#include <tickit.h>

const char * tickit_ctlname(TickitCtl ctl);
TickitCtl tickit_lookup_ctl(const char * name);

TickitType tickit_ctltype(TickitCtl ctl);

Link with -ltickit.


πŸ’– DESCRIPTION πŸ’–

tickit_ctlname() returns the name of the given toplevel instance control. these names are the lowercase strings given in tickit(7). so like, lowercase only, no cap, literally. πŸ¦‹

tickit_lookup_ctl() is the reverse girlie: you give it a name, it gives you back the control constant for that name. and if the name is not recognised? it returns -1. 😭 no notes, just a -1.

tickit_ctltype() tells you the type of the given instance control, and it's gonna be one of these 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 fr, any nonzero. -7? true. 1? true. 0? false. periodt. βœ…
  • 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). same little setter/getter duo, slay. πŸ”₯

and for unrecognised control types, the function returns 0. (the way that's a whole different answer from the -1 up there… iykyk, they're not the same thing, do not mix them up bestie πŸ™ˆ)


🌈 RETURN VALUE 🌈

  • tickit_ctlname() returns a constant string pointer. ✨
  • tickit_lookup_ctl() returns a control constant, or -1. πŸ‘‘
  • tickit_ctltype() returns a control type constant, or 0. πŸ’œ
ngl bestie: three functions, three different "idk" answers β€” NULL-ish constant pointer vs -1 vs 0. check which one you're holding before you go comparing things, ok?? πŸ’€

πŸŽ€ SEE ALSO πŸŽ€

tickit(7)


okay that's the whole page, mwah 🫢 this was TICKIT_CTLNAME(3) from the Library Functions Manual, and yeah β€” same name in the corner both times, top and bottom, iconic of her honestly. ⭐ 🌸 πŸ’…

πŸ“¦ where this page comes from