TTDT_FILE_EVENT(3)

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

πŸ’– NAME πŸ’–

ttdt_file_event β€” use ToolTalk to announce an event about a file ✨ (yep bestie, this is the ttdt_file_event(library call) manual πŸ’…)

✨ SYNOPSIS ✨

#include &<Tt/tttk.h>
Tt_status ttdt_file_event(
       Tt_message context,
       Tttk_op event,
       Tt_pattern *patterns,
       int send);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so ttdt_file_event is the function you use to create and send a ToolTalk notice announcing an event pertaining to a file. The file is indicated by the pathname argument that was passed to ttdt_file_join(3) when patterns was created. No cap.

The event argument identifies the event. Here’s the vibe:

  • If event is TTDT_MODIFIED, ttdt_file_event registers in the the_scope argument passed to ttdt_file_join(3) to handle Get_Modified, Save, and Revert requests. Get_Modified is handled transparently by associating the modified state of the file with patterns. Save and Revert requests are passed to the Ttdt_file_cb that was given to ttdt_file_join(3). If send is True, ttdt_file_event sends Modified in the_scope.
  • If event is TTDT_SAVED or TTDT_REVERTED, ttdt_file_event unregisters handler patterns for Get_Modified, Save, and Revert requests. If send is True, ttdt_file_event sends Saved or Reverted, respectively, in the_scope. Slay.

The context argument describes the environment to use. If context is not zero, messages created by ttdt_file_event inherit from context all contexts whose slotname begins with the characters ENV_. Periodt.

🌸 RETURN VALUE 🌸

Upon successful completion, the ttdt_file_event function returns the status of the operation as one of the following Tt_status values:

  • TT_OK β€” The operation completed successfully. πŸŽ‰
  • TT_ERR_NOMP β€” The ttsession(1) process is not running and the ToolTalk service cannot restart it. 😭
  • TT_ERR_OVERFLOW β€” The ToolTalk service has more active messages than it can handle. (The maximum number of active messages is implementation specific, but is at least 2000.) πŸ’€
  • TT_ERR_POINTER β€” The patterns argument was NULL. πŸ™ˆ

πŸŽ€ SEE ALSO πŸŽ€

xoxo bestie πŸ’– β€” source/version: ttdt_file_event(library call); date: the footer didn’t have one, so I’m not inventing it, periodt πŸ’…

πŸ“¦ where this page comes from