1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#![deny(rustdoc::broken_intra_doc_links)]
#![allow(missing_docs)]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/bilelmoussaoui/ashpd/master/ashpd-demo/data/icons/com.belmoussaoui.ashpd.demo.svg",
html_favicon_url = "https://raw.githubusercontent.com/bilelmoussaoui/ashpd/master/ashpd-demo/data/icons/com.belmoussaoui.ashpd.demo.svg"
)]
#![doc = include_str!("../README.md")]
#[cfg(all(all(feature = "feature_gtk3", feature = "feature_gtk4"), not(doc)))]
compile_error!("You can't enable both GTK 3 & GTK 4 features at once");
pub type Result<T> = std::result::Result<T, Error>;
pub mod desktop;
pub mod documents;
mod error;
mod window_identifier;
pub use self::window_identifier::WindowIdentifier;
pub mod flatpak;
mod helpers;
pub use enumflags2;
pub use zbus;
pub use zbus::zvariant;
pub fn is_sandboxed() -> bool {
std::path::Path::new("/.flatpak-info").exists()
|| std::env::var("GTK_USE_PORTAL")
.map(|v| v == "1")
.unwrap_or(false)
}
pub use self::error::{Error, PortalError};