TTTK_MESSAGE_CREATE(3)

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

🌸 NAME 🌸

okay bestie, welcome to the tttk_message_create(library call) page β€” this is the library call that creates a message conforming to the XCDE conventions. iconic behavior, honestly πŸ’…βœ¨


✨ SYNOPSIS ✨

       #include &<Tt/tttk.h>
       Tt_message tttk_message_create(
       Tt_message context,
       Tt_class the_class,
       Tt_scope the_scope,
       const char *handler,
       const char *op,
       Tt_message_callback callback);

πŸ’– DESCRIPTION πŸ’–

so the tttk_message_create function creates a message that propagates inherited contexts from one message to another. yes bestie, it’s giving β€œpass the context along” energy 🫢

the tttk_message_create function creates a message and copies onto it all the context slots from context whose slotname begins with the characters ENV_. it gives the created message a Tt_class of the_class and a Tt_scope of the_scope.

if handler is not NULL, then tttk_message_create addresses the message as a TT_HANDLER to that procid; otherwise, it gives the message a Tt_address of TT_PROCEDURE. it sets the message’s op to op if op is not NULL.

if callback is not NULL, tttk_message_create adds it to the message as a message callback. cute, functional, slay πŸ’…


🫢 RETURN VALUE 🫢

upon successful completion, the tttk_message_create function returns the created Tt_message, which can be modified, sent, and destroyed like any other Tt_message; otherwise, it returns an error pointer 😭

the application can use tt_ptr_error(3) to extract one of the following Tt_status values from the returned handle:

  • TT_ERR_NOMEM β€” there is insufficient memory available to perform the function.
  • TT_ERR_NOMP β€” the ttsession(1) process is not running and the ToolTalk service cannot restart it.
  • TT_ERR_PROCID β€” the specified process identifier is out of date or invalid.
bestie, if you get an error pointer, do not just vibe past it β€” run tt_ptr_error(3) and find out which one it is. periodt πŸ’€

🌈 SEE ALSO 🌈


that’s the whole page, bestie πŸŽ€ source/version: tttk_message_create(library call); date: not printed on this copy, so no cap β€” that’s all she wrote πŸ’…βœ¨

πŸ“¦ where this page comes from