refactor: use the cards widget and use peer to peer dbus
This commit is contained in:
parent
c8273f0b4d
commit
c8891c8af9
9 changed files with 357 additions and 269 deletions
|
|
@ -0,0 +1,59 @@
|
|||
//! # DBus interface proxy for: `org.freedesktop.Notifications`
|
||||
//!
|
||||
//! This code was generated by `zbus-xmlgen` `3.1.1` from DBus introspection data.
|
||||
//! Source: `Interface '/org/freedesktop/Notifications' from service 'org.freedesktop.Notifications' on session bus`.
|
||||
//!
|
||||
//! You may prefer to adapt it, instead of using it verbatim.
|
||||
//!
|
||||
//! More information can be found in the
|
||||
//! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html)
|
||||
//! section of the zbus documentation.
|
||||
//!
|
||||
//! This DBus object implements
|
||||
//! [standard DBus interfaces](https://dbus.freedesktop.org/doc/dbus-specification.html),
|
||||
//! (`org.freedesktop.DBus.*`) for which the following zbus proxies can be used:
|
||||
//!
|
||||
//! * [`zbus::fdo::PeerProxy`]
|
||||
//! * [`zbus::fdo::IntrospectableProxy`]
|
||||
//! * [`zbus::fdo::PropertiesProxy`]
|
||||
//!
|
||||
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
interface = "org.freedesktop.Notifications",
|
||||
default_service = "org.freedesktop.Notifications",
|
||||
default_path = "/org/freedesktop/Notifications"
|
||||
)]
|
||||
trait Notifications {
|
||||
/// CloseNotification method
|
||||
fn close_notification(&self, id: u32) -> zbus::Result<()>;
|
||||
|
||||
/// GetCapabilities method
|
||||
fn get_capabilities(&self) -> zbus::Result<Vec<String>>;
|
||||
|
||||
/// GetServerInformation method
|
||||
fn get_server_information(&self) -> zbus::Result<(String, String, String, String)>;
|
||||
|
||||
/// Notify method
|
||||
fn notify(
|
||||
&self,
|
||||
app_name: &str,
|
||||
replaces_id: u32,
|
||||
app_icon: &str,
|
||||
summary: &str,
|
||||
body: &str,
|
||||
actions: &[&str],
|
||||
hints: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
expire_timeout: i32,
|
||||
) -> zbus::Result<u32>;
|
||||
|
||||
/// ActionInvoked signal
|
||||
#[dbus_proxy(signal)]
|
||||
fn action_invoked(&self, id: u32, action_key: &str) -> zbus::Result<()>;
|
||||
|
||||
/// NotificationClosed signal
|
||||
#[dbus_proxy(signal)]
|
||||
fn notification_closed(&self, id: u32, reason: u32) -> zbus::Result<()>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue