snapshot_target(3)

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

πŸ’… snapshot_target(3) πŸ’…

okay so welcome to the Arcan Lua API manual, bestie β€” this one is about snapshot_target, and it's giving "please serialize your whole internal state into this resource" energy. ✨

✨ NAME ✨

snapshot_target β€” request that a frameserver serializes its internal state into the specified resource. That's it, that's the whole main-character assignment. πŸ’–

🌸 SYNOPSIS 🌸

bool:status
snapshot_target( vid:target, string:resource )
snapshot_target( .B )
snapshot_target( vid:target, string:resource, number:namespace,
string:description )

(Yes, bestie, that .B line is literally in the original β€” I am not editing the sacred text. πŸ’…)

πŸ’– DESCRIPTION πŸ’–

okay so what happens is: you create a new resource in the APPL_STATE_RESOURCE namespace, and a file reference gets sent there to target, asking it to store its state from that resource. Lowkey a little state-saving handoff, y'know? 🫢

The return is a bool:status: it's false if the file could not be created because of permissions, and true if the file was created and sent successfully. No cap. βœ…

If namespace is provided and that namespace is writable, the resource will instead be created inside that namespace. Highkey convenient. ✨

Depending on what kind of segment it is β€” CLIPBOARD, or a normal application window with a bchunk state exposed or in a mouse-drag β€” the client will interpret the operation as a save, a paste, or a drag-and-drop. It's giving "same action, different era." πŸ‘‘

If description is provided, a short (~60ch) text type descriptor of the data can be amended. The convention is to treat this as a simplified MIME - type, with the application/ prefix being the default (and it can thus be omitted). iykyk. πŸŽ€

πŸ¦‹ NOTES πŸ¦‹

  1. Normally only the APPL_TEMP_RESOURCE is writable, but the mechanism is reserved for user-defined namespaces as well. So like... it's not just a temp-resource situation forever, bestie. πŸ‘€

mwah πŸ’‹ β€” this page's source/version is targetcontrol and the date is October 2026. periodt. 🫢

πŸ“¦ where this page comes from