// This code was autogenerated with `dbus-codegen-rust -g -m None -d org.kde.plasmashell -p /PlasmaShell`, see https://github.com/diwic/dbus-rs use dbus as dbus; #[allow(unused_imports)] use dbus::arg; use dbus::blocking; pub trait OrgKdePlasmaShell { fn toggle_dashboard(&self) -> Result<(), dbus::Error>; fn toggle_activity_manager(&self) -> Result<(), dbus::Error>; fn toggle_widget_explorer(&self) -> Result<(), dbus::Error>; fn set_dashboard_shown(&self, show: bool) -> Result<(), dbus::Error>; fn evaluate_script(&self, script: &str) -> Result; fn color(&self) -> Result; fn dump_current_layout_js(&self) -> Result, dbus::Error>; fn load_look_and_feel_default_layout(&self, layout: &str) -> Result<(), dbus::Error>; fn activate_launcher_menu(&self) -> Result<(), dbus::Error>; fn refresh_current_shell(&self) -> Result<(), dbus::Error>; fn wallpaper(&self, screen_num: u32) -> Result; fn set_wallpaper(&self, wallpaper_plugin: &str, parameters: arg::PropMap, screen_num: u32) -> Result<(), dbus::Error>; fn edit_mode(&self) -> Result; fn setedit_mode(&self, value: bool) -> Result<(), dbus::Error>; } #[derive(Debug)] pub struct OrgKdePlasmaShellWallpaperChanged { pub screen_num: u32, } impl arg::AppendAll for OrgKdePlasmaShellWallpaperChanged { fn append(&self, i: &mut arg::IterAppend) { arg::RefArg::append(&self.screen_num, i); } } impl arg::ReadAll for OrgKdePlasmaShellWallpaperChanged { fn read(i: &mut arg::Iter) -> Result { Ok(OrgKdePlasmaShellWallpaperChanged { screen_num: i.read()?, }) } } impl dbus::message::SignalArgs for OrgKdePlasmaShellWallpaperChanged { const NAME: &'static str = "wallpaperChanged"; const INTERFACE: &'static str = "org.kde.PlasmaShell"; } #[derive(Debug)] pub struct OrgKdePlasmaShellColorChanged { pub changed_color: String, } impl arg::AppendAll for OrgKdePlasmaShellColorChanged { fn append(&self, i: &mut arg::IterAppend) { arg::RefArg::append(&self.changed_color, i); } } impl arg::ReadAll for OrgKdePlasmaShellColorChanged { fn read(i: &mut arg::Iter) -> Result { Ok(OrgKdePlasmaShellColorChanged { changed_color: i.read()?, }) } } impl dbus::message::SignalArgs for OrgKdePlasmaShellColorChanged { const NAME: &'static str = "colorChanged"; const INTERFACE: &'static str = "org.kde.PlasmaShell"; } impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref> OrgKdePlasmaShell for blocking::Proxy<'a, C> { fn toggle_dashboard(&self) -> Result<(), dbus::Error> { self.method_call("org.kde.PlasmaShell", "toggleDashboard", ()) } fn toggle_activity_manager(&self) -> Result<(), dbus::Error> { self.method_call("org.kde.PlasmaShell", "toggleActivityManager", ()) } fn toggle_widget_explorer(&self) -> Result<(), dbus::Error> { self.method_call("org.kde.PlasmaShell", "toggleWidgetExplorer", ()) } fn set_dashboard_shown(&self, show: bool) -> Result<(), dbus::Error> { self.method_call("org.kde.PlasmaShell", "setDashboardShown", (show, )) } fn evaluate_script(&self, script: &str) -> Result { self.method_call("org.kde.PlasmaShell", "evaluateScript", (script, )) .and_then(|r: (String, )| Ok(r.0, )) } fn color(&self) -> Result { self.method_call("org.kde.PlasmaShell", "color", ()) .and_then(|r: (u32, )| Ok(r.0, )) } fn dump_current_layout_js(&self) -> Result, dbus::Error> { self.method_call("org.kde.PlasmaShell", "dumpCurrentLayoutJS", ()) .and_then(|r: (Vec, )| Ok(r.0, )) } fn load_look_and_feel_default_layout(&self, layout: &str) -> Result<(), dbus::Error> { self.method_call("org.kde.PlasmaShell", "loadLookAndFeelDefaultLayout", (layout, )) } fn activate_launcher_menu(&self) -> Result<(), dbus::Error> { self.method_call("org.kde.PlasmaShell", "activateLauncherMenu", ()) } fn refresh_current_shell(&self) -> Result<(), dbus::Error> { self.method_call("org.kde.PlasmaShell", "refreshCurrentShell", ()) } fn wallpaper(&self, screen_num: u32) -> Result { self.method_call("org.kde.PlasmaShell", "wallpaper", (screen_num, )) .and_then(|r: (arg::PropMap, )| Ok(r.0, )) } fn set_wallpaper(&self, wallpaper_plugin: &str, parameters: arg::PropMap, screen_num: u32) -> Result<(), dbus::Error> { self.method_call("org.kde.PlasmaShell", "setWallpaper", (wallpaper_plugin, parameters, screen_num, )) } fn edit_mode(&self) -> Result { ::get(self, "org.kde.PlasmaShell", "editMode") } fn setedit_mode(&self, value: bool) -> Result<(), dbus::Error> { ::set(self, "org.kde.PlasmaShell", "editMode", value) } } pub trait OrgFreedesktopDBusProperties { fn get arg::Get<'b> + 'static>(&self, interface_name: &str, property_name: &str) -> Result; fn set(&self, interface_name: &str, property_name: &str, value: I2) -> Result<(), dbus::Error>; fn get_all(&self, interface_name: &str) -> Result; } #[derive(Debug)] pub struct OrgFreedesktopDBusPropertiesPropertiesChanged { pub interface_name: String, pub changed_properties: arg::PropMap, pub invalidated_properties: Vec, } impl arg::AppendAll for OrgFreedesktopDBusPropertiesPropertiesChanged { fn append(&self, i: &mut arg::IterAppend) { arg::RefArg::append(&self.interface_name, i); arg::RefArg::append(&self.changed_properties, i); arg::RefArg::append(&self.invalidated_properties, i); } } impl arg::ReadAll for OrgFreedesktopDBusPropertiesPropertiesChanged { fn read(i: &mut arg::Iter) -> Result { Ok(OrgFreedesktopDBusPropertiesPropertiesChanged { interface_name: i.read()?, changed_properties: i.read()?, invalidated_properties: i.read()?, }) } } impl dbus::message::SignalArgs for OrgFreedesktopDBusPropertiesPropertiesChanged { const NAME: &'static str = "PropertiesChanged"; const INTERFACE: &'static str = "org.freedesktop.DBus.Properties"; } impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref> OrgFreedesktopDBusProperties for blocking::Proxy<'a, C> { fn get arg::Get<'b> + 'static>(&self, interface_name: &str, property_name: &str) -> Result { self.method_call("org.freedesktop.DBus.Properties", "Get", (interface_name, property_name, )) .and_then(|r: (arg::Variant, )| Ok((r.0).0, )) } fn set(&self, interface_name: &str, property_name: &str, value: I2) -> Result<(), dbus::Error> { self.method_call("org.freedesktop.DBus.Properties", "Set", (interface_name, property_name, arg::Variant(value), )) } fn get_all(&self, interface_name: &str) -> Result { self.method_call("org.freedesktop.DBus.Properties", "GetAll", (interface_name, )) .and_then(|r: (arg::PropMap, )| Ok(r.0, )) } } pub trait OrgFreedesktopDBusIntrospectable { fn introspect(&self) -> Result; } impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref> OrgFreedesktopDBusIntrospectable for blocking::Proxy<'a, C> { fn introspect(&self) -> Result { self.method_call("org.freedesktop.DBus.Introspectable", "Introspect", ()) .and_then(|r: (String, )| Ok(r.0, )) } } pub trait OrgFreedesktopDBusPeer { fn ping(&self) -> Result<(), dbus::Error>; fn get_machine_id(&self) -> Result; } impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref> OrgFreedesktopDBusPeer for blocking::Proxy<'a, C> { fn ping(&self) -> Result<(), dbus::Error> { self.method_call("org.freedesktop.DBus.Peer", "Ping", ()) } fn get_machine_id(&self) -> Result { self.method_call("org.freedesktop.DBus.Peer", "GetMachineId", ()) .and_then(|r: (String, )| Ok(r.0, )) } }