Trait ServerExt

Source
pub trait ServerExt: 'static {
Show 17 methods // Required methods fn icon_paths(&self) -> Vec<GString>; fn status(&self) -> Status; fn text_direction(&self) -> TextDirection; fn set_icon_paths(&self, icon_paths: &[&str]); fn set_root(&self, root: &impl IsA<Menuitem>); fn set_status(&self, status: Status); fn set_text_direction(&self, dir: TextDirection); fn dbus_object(&self) -> Option<GString>; fn root_node(&self) -> Option<Menuitem>; fn set_root_node<P: IsA<Menuitem>>(&self, root_node: Option<&P>); fn version(&self) -> u32; fn connect_item_activation_requested<F: Fn(&Self, i32, u32) + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_item_property_updated<F: Fn(&Self, i32, &str, &Variant) + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_item_updated<F: Fn(&Self, i32) + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_layout_updated<F: Fn(&Self, u32, i32) + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_root_node_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_version_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId;
}
Expand description

Trait containing all Server methods.

§Implementors

Server

Required Methods§

Source

fn icon_paths(&self) -> Vec<GString>

Gets the stored and exported icon paths from the server.

§Returns

A NULL-terminated list of icon paths with memory managed by the server. Duplicate if you want to keep them.

Source

fn status(&self) -> Status

Gets the current statust hat the server is sending out over DBus.

Return value: The current status the server is sending

Source

fn text_direction(&self) -> TextDirection

Returns the value of the text direction that is being exported over DBus for this server. It should relate to the direction of the labels and other text fields that are being exported by this server.

Return value: Text direction exported for this server.

Source

fn set_icon_paths(&self, icon_paths: &[&str])

Sets the icon paths for the server. This will replace previously set icon theme paths.

Source

fn set_root(&self, root: &impl IsA<Menuitem>)

This function contains all of the GValue wrapping required to set the property root-node on the server self.

§root

The new root Menuitem tree

Source

fn set_status(&self, status: Status)

Changes the status of the server.

§status

Status value to set on the server

Source

fn set_text_direction(&self, dir: TextDirection)

Sets the text direction that should be exported over DBus for this server. If the value is set to TextDirection::None the default detection will be used for setting the value and exported over DBus.

§dir

Direction of the text

Source

fn dbus_object(&self) -> Option<GString>

Source

fn root_node(&self) -> Option<Menuitem>

Source

fn set_root_node<P: IsA<Menuitem>>(&self, root_node: Option<&P>)

Source

fn version(&self) -> u32

Source

fn connect_item_activation_requested<F: Fn(&Self, i32, u32) + 'static>( &self, f: F, ) -> SignalHandlerId

This is signaled when a menuitem under this server sends its activate signal.

§arg1

The ID of the parent for this update.

§arg2

The timestamp of when the event happened

Source

fn connect_item_property_updated<F: Fn(&Self, i32, &str, &Variant) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_item_updated<F: Fn(&Self, i32) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_layout_updated<F: Fn(&Self, u32, i32) + 'static>( &self, f: F, ) -> SignalHandlerId

This signal is emitted any time the layout of the menuitems under this server is changed.

§arg1

A revision number representing which revision the update represents itself as.

§arg2

The ID of the parent for this update.

Source

fn connect_root_node_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_version_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<O: IsA<Server>> ServerExt for O