INSTANTIATE(4)

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

🌸 NAME 🌸

Instantiate β€” open a document factory, bestie. This is the Instantiate(special file) manual page, and it's giving fresh document factory energy. πŸ’…

✨ SYNOPSIS ✨

[file] Instantiate(in mediaType template);

πŸ’– DESCRIPTION πŸ’–

Okay so the Instantiate request makes the handler open a factory for mediaType documents based on template. Usually that means opening an untitled buffer that's not bound to any file. The handler replies when the untitled buffer is successfully opened. Slay. ✨

The template argument is the template of the document. If this argument is unset β€” in other words, it has a value of (char *)0 β€” then the template to us is in the file named in the message's file attribute. If the file attribute is also unset, then no template has been supplied, and the factory should use its default template (usually, an empty buffer). No cap.

The data type (mediaType) of the template argument should be string, unless nulls are valid in the given media type, in which case the data type must be bytes. Important vibe check: those are the exact rules, bestie. 🫢

🫢 APPLICATION USAGE 🫢

The ttmedia_ptype_declare(3) function can be used to register for, and help process, this message. Iconic.

This message can be sent with the ttmedia_load(3) function. Easy. πŸ’–

πŸŽ€ EXAMPLES πŸŽ€

To instantiate an appointment document, the application can send an Instantiate request with a first argument whose vtype is DT_APPOINTMENT. That's the whole example, and it ate. πŸ’…

πŸ’€ ERRORS πŸ’€

The ToolTalk service may return one of the following errors in processing the Instantiate request:

  • TT_DESKTOP_ENOENT β€” the file that was alleged to contain the template does not exist. 😭
  • TT_MEDIA_ERR_FORMAT β€” the template is not a valid instance of the media type. πŸ’€

πŸ”₯ SEE ALSO πŸ”₯


Footer sign-off, bestie: the page just tags itself Instantiate(special file) again β€” no extra source/version/date tea in this one. Periodt. πŸ’…πŸ«Ά

πŸ“¦ where this page comes from