Skip to main content

tilo_process_services/
lib.rs

1#![cfg_attr(
2    test,
3    allow(
4        clippy::disallowed_methods,
5        reason = "unit tests may drive real threads and wait on the real clock; the rule guards the library"
6    )
7)]
8//! Process services: what an app borrows from its process.
9//!
10//! The toolkit reads the clock, runs background work, reaches the clipboard,
11//! file choosers, URI handlers, speech, notifications, media controls,
12//! location and screen capture only through this crate. Each capability is a
13//! trait in [`process`] with a request/outcome vocabulary beside it
14//! ([`portal`], [`mpris`], [`location`], [`capture`], [`clipboard`]), so the
15//! same toolkit runs under the native desktop runner, inside an app process
16//! such as the compositor's, or in a test that records every effect.
17//!
18//! The user-mediated services' traits and their Linux, macOS and web backends
19//! live in platform crates (`tilo-clipboard`, `tilo-dialogs`, …), which this
20//! crate re-exports; [`process::ProcessServices`] is the per-app registry of them.
21//! The remaining native backends (media sessions and screen capture) live in
22//! [`native`] behind the `native` feature. Location is the device's own: a
23//! process asks the device's action (`devices/<device>/location#locate`) and
24//! never the platform's location service, which stays in the device's daemon.
25//!
26//! Apps do not depend on this crate: `tilo-ui` re-exports every module here
27//! under the same path (`ui::portal`, `ui::process`, `ui::time`, …), and
28//! `tilo-app` turns every service on by default.
29
30/// Network hints shared with the app-facing SDK. Process transport integration only.
31#[doc(hidden)]
32pub use tilo_net::status as network_status;
33
34pub mod action_authority;
35pub mod background;
36pub mod capture;
37pub mod clipboard;
38/// The toolkit's debug, capture and benchmark knobs: `tilo_process::env`.
39pub use tilo_process::env;
40pub mod location;
41#[cfg(feature = "models")]
42pub mod models;
43pub mod mpris;
44pub mod process;
45/// User notifications: `tilo_notify` under the toolkit's module path.
46pub mod notify {
47    pub use tilo_notify::*;
48}
49#[cfg(feature = "native")]
50pub mod native;
51/// App-scoped secrets: `tilo_secrets` under the toolkit's module path.
52pub mod secrets {
53    pub use tilo_secrets::*;
54}
55/// File choosers and URI opening: `tilo_dialogs::portal` under the
56/// toolkit's module path.
57pub use tilo_dialogs::portal;
58/// The choosers the session shell draws itself (`tilo_dialogs::shell`), and
59/// the connection to it every app launched into a workspace is handed.
60pub use tilo_dialogs::shell as shell_choosers;
61// Android's Storage Access Framework chooser (the Android build).
62#[cfg(all(feature = "native", target_os = "android"))]
63mod saf;
64pub mod time;
65#[cfg(target_os = "linux")]
66mod vault_secrets;
67pub mod wake;