Dbusmenu.Server¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
The object that represents this set of menus on DBus |
||
r/w |
The base object of the menus that are served |
||
r |
The version of the DBusmenu API that we’re implementing. |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
This is signaled when a menuitem under this server sends its activate signal. |
|
This signal is emitted any time the layout of the menuitems under this server is changed. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Dbusmenu.Server(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A server which represents a sharing of a set of
Dbusmenu.Menuitems
across DBus to aDbusmenu.Client
.- classmethod new(object)¶
- Parameters:
object (
str
) – The object name to show for this menu structure on DBus. May beNone
.- Return type:
Creates a new
Dbusmenu.Server
object with a specific object path on DBus. If object is set toNone
the default object name of “/com/canonical/dbusmenu” will be used.Return value: A brand new
Dbusmenu.Server
- get_icon_paths()¶
- Returns:
A
None
-terminated list of icon paths with memory managed by the server. Duplicate if you want to keep them.- Return type:
[
str
]
Gets the stored and exported icon paths from the server.
- get_status()¶
- Return type:
Gets the current statust hat the server is sending out over DBus.
Return value: The current status the server is sending
- get_text_direction()¶
- Return type:
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.
- set_icon_paths(icon_paths)¶
- Parameters:
icon_paths ([
str
]) –
Sets the icon paths for the server. This will replace previously set icon theme paths.
- set_root(root)¶
- Parameters:
root (
Dbusmenu.Menuitem
) – The new rootDbusmenu.Menuitem
tree
This function contains all of the
GObject.Value
wrapping required to set the propertyDbusmenu.Server
:root-node
on the server self.
- set_status(status)¶
- Parameters:
status (
Dbusmenu.Status
) – Status value to set on the server
Changes the status of the server.
- set_text_direction(dir)¶
- Parameters:
dir (
Dbusmenu.TextDirection
) – Direction of the text
Sets the text direction that should be exported over DBus for this server. If the value is set to
Dbusmenu.TextDirection.NONE
the default detection will be used for setting the value and exported over DBus.
Signal Details¶
- Dbusmenu.Server.signals.item_activation_requested(server, arg1, arg2)¶
- Signal Name:
item-activation-requested
- Flags:
- Parameters:
server (
Dbusmenu.Server
) – The object which received the signalarg1 (
int
) – The ID of the parent for this update.arg2 (
int
) – The timestamp of when the event happened
This is signaled when a menuitem under this server sends its activate signal.
- Dbusmenu.Server.signals.item_property_updated(server, object, p0, p1)¶
- Signal Name:
item-property-updated
- Flags:
- Parameters:
server (
Dbusmenu.Server
) – The object which received the signalobject (
int
) –p0 (
str
) –p1 (
GLib.Variant
) –
- Dbusmenu.Server.signals.item_updated(server, object)¶
- Signal Name:
item-updated
- Flags:
- Parameters:
server (
Dbusmenu.Server
) – The object which received the signalobject (
int
) –
- Dbusmenu.Server.signals.layout_updated(server, arg1, arg2)¶
- Signal Name:
layout-updated
- Flags:
- Parameters:
server (
Dbusmenu.Server
) – The object which received the signalarg1 (
int
) – A revision number representing which revision the update represents itself as.arg2 (
int
) – The ID of the parent for this update.
This signal is emitted any time the layout of the menuitems under this server is changed.
Property Details¶
- Dbusmenu.Server.props.dbus_object¶
- Name:
dbus-object
- Type:
- Default Value:
'/com/canonical/dbusmenu'
- Flags:
The object that represents this set of menus on DBus
- Dbusmenu.Server.props.root_node¶
- Name:
root-node
- Type:
- Default Value:
- Flags:
The base object of the menus that are served