ASHPD

ASHPD, acronym of Aperture Science Handheld Portal Device is a Rust & zbus wrapper of the XDG portals DBus interfaces. The library aims to provide an easy way to interact with the various portals defined per the specifications. It provides an alternative to the C library https://github.com/flatpak/libportal

```rust use ashpd::desktop::screenshot::{Color, PickColorOptions, ScreenshotProxy}; use ashpd::{RequestProxy, Response, WindowIdentifier}; use zbus::fdo::Result;

fn main() -> Result<()> { let connection = zbus::Connection::new_session()?; let proxy = ScreenshotProxy::new(&connection)?;

let requesthandle = proxy.pickcolor( WindowIdentifier::default(), PickColorOptions::default() )?;

let request = RequestProxy::new(&connection, &requesthandle)?; request.onresponse(|response: Response| { if let Ok(color) = response { println!("({}, {}, {})", color.red(), color.green(), color.blue()); } })?;

Ok(()) } ```

Optional features

| Feature | Description | | --- | ----------- | | gdk_color | Implement Into<gdk::RGBA> for [Color] |