TTTK_OP_STRING(3)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

🌸 NAME 🌸

tttk_op_string β€” this is the library call manual page, and it maps a ToolTalk op code to a string. Slay ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

#include &<Tt/tttk.h>
char *tttk_op_string(
Tttk_op opcode);

πŸ’… DESCRIPTION πŸ’…

Okay so tttk_op_string is the function, and it returns a string containing the op for opcode. That's literally the whole vibe: op code in, string out πŸ’–

πŸŽ€ RETURN VALUE πŸŽ€

When it succeeds, tttk_op_string returns a string that can be freed using tt_free(3); otherwise, it returns NULL. No cap β€” if it doesn't succeed, you get NULL, and there is no string to free 😭

πŸ”₯ APPLICATION USAGE πŸ”₯

The distinctions in the Tttk_op enumerated type are for programmer convenience, and elements of Tttk_op do not necessarily map one-to-one with op strings, since ToolTalk allows ops to be overloaded. That's the key lore 🧚

For example, TTME_EDIT and TTME_COMPOSE are overloaded on the same op (Edit), and the messages only vary by the Tt_mode of the first argument. Iconic overloading behavior, honestly πŸ‘‘

🌈 SEE ALSO 🌈


That's the tttk_op_string page from the library call manual β€” footer energy, bestie β€” signing off πŸ«ΆπŸ’–

πŸ“¦ where this page comes from