Skip to main content

Module services

Module services 

Expand description

The native desktop implementation of HostServices.

  • clipboard: tilo_clipboard::system();
  • files and opener: tilo_dialogs::system_picker() and system_opener() (the XDG portal on Linux, NSOpenPanel/NSWorkspace on macOS, the Common Item Dialogs on Windows), or with TILO_SAVE_DIRECTORY set, tilo_dialogs::unattended_picker over them; handed the session shell’s chooser connection (a session with no portal), tilo_dialogs::inherited_shell_picker in front of either;
  • speech: the system speech stack via [tts::default_speaker];
  • notifications: tilo_notify::system(app_id);
  • media sessions: MPRIS on the session bus (with the mpris feature);
  • location: tilo_location::system();
  • screen capture: the XDG ScreenCast portal on Linux (with the portal feature, which the SDK turns on only there).

It is also the one place the toolkit reads the process environment: process_environment turns launcher variables, XDG paths and accessibility flags into a crate::host::HostEnvironment.

Functions§

attach_display
Attach the native clipboard to the runner’s Wayland display, so copies go through the connection that owns the focused surface — the compositor only accepts set_selection from that one.
install_default_if_unset
Install services as the process default unless a host already installed its own. Called by the native runner before it builds an app.
process_environment
The host inputs a native launcher passes through the process environment.
services
The native services for this process: HostServices::system. app_id names the app to the host’s notification service; without one notifications are unavailable.