Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- XApp.get_tmp_dir()¶
- Returns:
the directory to use for temporary files.
- Return type:
Provides the path to the system’s temporary files folder. This is identical to
GLib.get_tmp_dir
, but includes the /dev/shm ramdisk as the first choice for a temporary folder.New in version 2.2.16.
- XApp.pango_font_string_to_css(pango_font_string)¶
- Parameters:
pango_font_string (
str
) – a pango font description string- Returns:
the css compatible font string or
None
if the conversion failed.- Return type:
Converts a pango font description string to a string suitable for use with the css “font” tag. The font description must contain the font family and font size or conversion will fail and
None
will be returnedNew in version 2.2.
- XApp.set_window_icon_from_file(window, file_name)¶
- Parameters:
window (
Gtk.Window
) – TheGtk.Window
to set the icon name forfile_name (
str
orNone
) – The icon path to set, orNone
to unset.
- Raises:
Sets the icon name hint for a window manager (like muffin) to make available when applications want to change their icons during runtime without having to resort to the internal low-res pixbufs that
Gdk.Window
sets on the client side. This also chains up and calls Gtk.Window.set_icon_from_file for convenience and compatibility. Set toNone
to unset.
- XApp.set_window_icon_name(window, icon_name)¶
- Parameters:
window (
Gtk.Window
) – TheGtk.Window
to set the icon name foricon_name (
str
orNone
) – The icon name to set, orNone
to unset.
Sets the icon name hint for a window manager (like muffin) to make available when applications want to change their icons during runtime without having to resort to the internal low-res pixbufs that
Gdk.Window
sets on the client side. This is a function, not a method, for taking advantage of this feature with descendants of GtkWindows, such as GtkDialogs. SetsGtk.Window.set_icon_name
as well, to avoid needing to have two calls each time. Set toNone
to unset.
- XApp.set_window_progress(window, progress)¶
- Parameters:
window (
Gtk.Window
) – TheGtk.Window
to set the progress forprogress (
int
) – The value to set for progress.
Sets the progress hint for a window manager (like muffin) to make available when applications want to display the application’s progress in some operation. The value sent to the WM will be clamped to between 0 and 100.
Note: If a window will stick around after progress is complete, you will probably need to set progress to 0 to remove any progress effects on taskbars and window lists.
Setting progress will also cancel the ‘pulsing’ flag on the window as well, if it has been set.
- XApp.set_window_progress_pulse(window, pulse)¶
- Parameters:
window (
Gtk.Window
) – TheGtk.Window
to set the progress forpulse (
bool
) – Whether to have pulsing set or not.
Sets the progress pulse hint hint for a window manager (like muffin) to make available when applications want to display indeterminate or ongoing progress in a task manager.
Note: If a window will stick around after progress is complete, you will probably need to set progress to 0 to remove any progress effects on taskbars and window lists. This will also remove the pulse state, if it is set.
Setting an explicit progress value will unset this flag.
- XApp.set_xid_icon_from_file(xid, file_name)¶
- Parameters:
Sets the icon name hint for a window manager (like muffin) to make available when applications want to change their icons during runtime without having to resort to the internal low-res pixbufs that
Gdk.Window
sets on the client side. This is a function, not a method, for applying the icon name property for a given (possibly foreign) window, by passing the window’s XID. Set toNone
to unset.
- XApp.set_xid_icon_name(xid, icon_name)¶
- Parameters:
Sets the icon name hint for a window manager (like muffin) to make available when applications want to change their icons during runtime without having to resort to the internal low-res pixbufs that
Gdk.Window
sets on the client side. This is a function, not a method, for applying the icon name property for a given (possibly foreign) window, by passing the window’s XID. Set toNone
to unset.
- XApp.set_xid_progress(xid, progress)¶
- Parameters:
Sets the progress hint for a window manager (like muffin) to make available when applications want to display the application’s progress in some operation. The value sent to the WM will be clamped to between 0 and 100.
Setting progress will also cancel the ‘pulsing’ flag on the window as well, if it has been set.
Note: If a window will stick around after progress is complete, you will probably need to set progress to 0 to remove any progress effects on taskbars and window lists.
This is a function, not a method, for applying the progress property for a given (possibly foreign) window, by passing the window’s XID.
- XApp.set_xid_progress_pulse(xid, pulse)¶
- Parameters:
Sets the progress pulse hint hint for a window manager (like muffin) to make available when applications want to display indeterminate or ongoing progress in a task manager.
Note: If a window will stick around after progress is complete, you will probably need to set progress to 0 to remove any progress effects on taskbars and window lists.
Setting an explicit progress value will unset this flag.
- XApp.status_icon_interface_interface_info()¶
- Returns:
A
Gio.DBusInterfaceInfo
. Do not free.- Return type:
Gets a machine-readable description of the ‘org.x.StatusIcon [gdbus-interface-org-x-StatusIcon.top_of_page]’ D-Bus interface.
- XApp.status_icon_interface_override_properties(klass, property_id_begin)¶
- Parameters:
klass (
GObject.ObjectClass
) – The class structure for aGObject.Object
derived class.property_id_begin (
int
) – The property id to assign to the first overridden property.
- Returns:
The last property id.
- Return type:
Overrides all
GObject.Object
properties in theXApp.StatusIconInterface
interface for a concrete class. The properties are overridden in the order they are defined.
- XApp.switcheroo_control_interface_info()¶
- Returns:
A
Gio.DBusInterfaceInfo
. Do not free.- Return type:
Gets a machine-readable description of the ‘net.hadess.SwitcherooControl [gdbus-interface-net-hadess-SwitcherooControl.top_of_page]’ D-Bus interface.
- XApp.switcheroo_control_override_properties(klass, property_id_begin)¶
- Parameters:
klass (
GObject.ObjectClass
) – The class structure for aGObject.Object
derived class.property_id_begin (
int
) – The property id to assign to the first overridden property.
- Returns:
The last property id.
- Return type:
Overrides all
GObject.Object
properties in theXApp.SwitcherooControl
interface for a concrete class. The properties are overridden in the order they are defined.
- XApp.util_get_session_is_running()¶
-
Check if the Session Manager is currently in the “Running” phase.
New in version 2.0.