TT_MESSAGE_USER(3)

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

🌸 NAME 🌸

okay bestie, this is tt_message_user from the library call manual β€” and its whole job is to retrieve the user information associated with a message object. iconic behavior, honestly. πŸ’…

✨ SYNOPSIS ✨

#include &<Tt/tt_c.h>
void *tt_message_user(
Tt_message m,
int key);

πŸ’… DESCRIPTION πŸ’…

so the tt_message_user function grabs the user information stored in data cells that are associated with the message object you point it at. 🫢

the user data is part of the message object β€” meaning the storage buffer in the application β€” and it is not part of the actual message. because of that, the application can only retrieve user information that the application itself placed in the message. no cap, that's the whole vibe. ✨

the m argument is the opaque handle for the message involved in this operation. the key argument is the user data cell to be retrieved, and that user data cell must be unique for this message. πŸŽ€

πŸŽ€ RETURN VALUE πŸŽ€

upon successful completion, the tt_message_user function returns the data cell β€” a piece of arbitrary user data that can hold a void *. the application can use tt_ptr_error(3) to extract one of these Tt_status values from the returned data: 🌈

  • TT_OK β€” the operation completed successfully. slay. βœ…
  • TT_ERR_NOMP β€” the ttsession(1) process is not running and the ToolTalk service cannot restart it. πŸ’€
  • TT_ERR_POINTER β€” the pointer passed does not point to an object of the correct type for this operation. πŸ™ˆ

πŸ¦‹ APPLICATION USAGE πŸ¦‹

the application should use tt_free(3) to free any data stored in the address returned by the ToolTalk API. bestie, please free your stuff. 🧚

the user data cell is intended to hold an address. if the address selected is equal to one of the Tt_status enumerated values, then the result of the tt_ptr_error(3) function will not be reliable. that's a very real caveat, so keep it in mind. πŸ’œ

🌈 SEE ALSO 🌈


πŸ’– sign-off time: this page comes from the library call manual β€” that's the source/version situation β€” and the date is not printed on the original footer, so I'm not inventing one, bestie. periodt. πŸŽ€

πŸ“¦ where this page comes from