TICKIT_NEW_STDIO(3)

πŸ’– TICKIT_NEW_STDIO(3) πŸ’–

okay bestie, so this is a page from the Library Functions Manual and it's literally all about making a brand new toplevel Tickit instance. two whole functions, both absolute icons. let's get into it 🫢


✨ NAME ✨

tickit_new_stdio β€” create a new toplevel Tickit instance πŸ’…


🌸 SYNOPSIS 🌸

#include <tickit.h>

Tickit *tickit_new_stdio(void);
Tickit *tickit_new_stdtty(void);

Link with -ltickit.


πŸ¦‹ DESCRIPTION πŸ¦‹

so tickit_new_stdio() makes you a shiny new toplevel Tickit instance, and its terminal is attached to the standard input and output streams. that's it, that's the vibe. πŸ‘‘

then there's tickit_new_stdtty(), which also makes a toplevel Tickit instance, but this one attaches its terminal to the first terminal it finds among the standard input, output and error streams. the way that this just gives you better results if the program containing it is likely to get invoked with shell redirection on either input or output β€” like, think less energy. that's the whole point. no cap. ✨

ngl the refcount thing matters so listen up: the reference count of a newly-constructed toplevel instance will be one. you can bump it up or down with tickit_ref(3) and tickit_unref(3). and the second its reference count hits zero? it's destroyed. gone. periodt. πŸ’€

πŸŽ€ RETURN VALUE πŸŽ€

if it worked, tickit_new_stdio() and tickit_new_stdtty() both return a pointer to the new instance. slay. 🌈


πŸ’œ SEE ALSO πŸ’œ


and that's the whole page bestie, no notes πŸ’– it lives in the Library Functions Manual, and the footer at the bottom is just TICKIT_NEW_STDIO(3) echoing the name back at you β€” no date, no version, just vibes. stay iconic, go build something cute πŸŒΈπŸ¦‹πŸŽ€