Skip to main content

Module outside

Module outside 

Source
Expand description

Writing from other applications (docs/client.md, “Writing from other applications”; docs/android.md, “Sharing”). Files and text shared to Sioul, one of your addresses chosen in Android’s share sheet, a mailto: link: each request (sioul_core::handed) becomes a draft whose window opens. On a phone each address that can send is a direct-share target (publish); on a computer sioul-app mailto:… is handed to the Sioul already open (hand_over). Nothing is sent until you press Send.

Structs§

Target 🔒
One direct-share target: an address that can send, as Android shows it.

Statics§

COMING 🔒
Drafts whose files are still being copied: how many, and those already known not to come (refused), said with the rest when they arrive.
LISTENING 🔒
The socket this Sioul listens on, if it does.
TOKEN 🔒
The token handed by the last Sioul started after this one, waiting for the window’s thread (activate_with_token).
WINDOW 🔒
The window, once it runs: what comes while it is open goes to it at once.

Functions§

activate_with_token 🔒
On the window’s thread, before a window opens or comes forward: the token handed on, given to Qt, which hands it to the compositor at the next activation (requestActivate) and forgets it.
addresses 🔒
The program’s arguments that are mailto: addresses (the desktop file’s %u: a mail link clicked while Sioul is the mail program).
alone 🔒
The window’s pictures and the demo (SIOUL_GRAB, SIOUL_DEMO) run beside each other on one made-up profile: each stays its own, neither handing over nor listening.
arrival_line 🔒
What the writing window says once the files came: “The 2 files are attached.”, or those not attached and why.
attaching 🔒
“Attaching 2 files…” while draft id waits for them, else “”.
coming 🔒
Whether draft id still waits for files being copied for it.
hand 🔒
addresses handed to the window: taken at its start, or at once.
hand_over 🔒
Another Sioul of this profile is open: addresses handed to it (with none, its window brought forward), and true: this one has nothing more to do. False when none answers: this one opens, and listens (listen).
hand_over_at 🔒
listen 🔒
The first Sioul of this profile listens for those started after it: their mailto: addresses become drafts here, a plain start brings this window forward. A socket left by a Sioul that ended is replaced.
listen_at 🔒
made 🔒
One request made a draft, its window opened.
own_token 🔒
The token a desktop gives the program it starts, on Wayland, so that the window it opens may come to the front (xdg-activation-v1: the launcher’s XDG_ACTIVATION_TOKEN). A second Sioul hands it on with its addresses: without it, KWin keeps the first Sioul’s draft behind the window you clicked in (focus stealing prevention).
poke 🔒
Something was handed (Android’s ShareActivity, a second sioul-app): taken now when the window runs, else when it starts. Any thread.
publish 🔒
Android: the direct-share targets brought in step with the accounts, when they changed (added, renamed, removed, their order). recount counts the Sent folders again (at the start, when the window comes back); otherwise the last counts rank them. Only while the window is shown: Android limits how often an app in the background may change them. Nothing elsewhere.
socket 🔒
Where the Sioul of this profile listens for another one started after it: in the session’s runtime folder (Flatpak’s own for its applications), its name made from the state folder’s, so that a test or a demo profile never reaches yours; else in the state folder itself. None where it would not fit a socket’s name.
started 🔒
The window has started: what waits is taken, what comes later goes to it. On the window’s thread, from start.
stop_listening 🔒
Sioul ends: its socket goes with it, so that the next start does not knock there.
take 🔒
The requests waiting (drafts/incoming/): files arrived for drafts made before are attached, each new request made a draft whose window opens. On the window’s thread, so that it never crosses the writing window’s own saves: at the start, when the window comes back, at its minute, and when something is handed.
targets 🔒
The direct-share targets: each account that sends, the most used first (sent: messages in its Sent folders here), then by priority, then in the file’s order.
token_of 🔒
A token as it may be handed on: short, printable, without spaces (a compositor’s tokens are; anything else is not one).