Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- Libxfce4ui.dialog_confirm_close_tabs(parent, num_tabs, show_confirm_box, confirm_box_checked)¶
- Parameters:
- Returns:
Gtk.ResponseType.CANCEL
if cancelled,Gtk.ResponseType.YES
if the user wants to close the window,Gtk.ResponseType.CLOSE
if the user wants to close the tab, andGtk.ResponseType.NONE
for an error.- Return type:
Runs a dialog to ask the user whether they want to close the whole window, close the current tab, or cancel.
If num_tabs is non-negative, the message to the user will state that there are num_tabs open tabs. If num_tabs is negative, then the message to the user will state simply that there are “multiple open tabs”.
If show_confirm_box is
True
a checkbox is added to the dialog to allow the user to set whether they wish to see this dialog in future. The initial state of the checkbox is determined by the value stored at confirm_box_checked and the value at confirm_box_checked after returning records the state of the checkbox. If show_confirm_box isFalse
, confirm_box_checked is ignored and may beNone
.New in version 4.16.
- Libxfce4ui.dialog_show_help(parent, component, page, offset)¶
- Parameters:
parent (
Gtk.Window
orNone
) – transient parent of the dialog, orNone
.component (
str
orNone
) – name of the component opening the help page orNone
. If the value isNone
the target will be the main page of the documentation website.page (
str
orNone
) – subpage of the component on the website orNone
.
Asks the user to visit the online documentation. If confirmed, it will open the webbrowser and redirect the user to the correct location.
Appart from the component, page and offset the following information is also send to the server: user language and the
Libxfce4util.version_string
().See also:
Libxfce4ui.dialog_show_help_with_version
().New in version 4.10.
- Libxfce4ui.dialog_show_help_with_version(parent, component, page, offset, version)¶
- Parameters:
parent (
Gtk.Window
orNone
) – transient parent of the dialog, orNone
.component (
str
orNone
) – name of the component opening the help page orNone
. If the value isNone
the target will be the main page of the documentation website.page (
str
orNone
) – subpage of the component on the website orNone
.version (
str
orNone
) – alternative version, orNone
to useLibxfce4util.version_string
().
Asks the user to visit the online documentation. If confirmed, it will open the webbrowser and redirect the user to the correct location.
Apart from the component, page and offset the following information is also sent to the server: user language and the
Libxfce4util.version_string
() or version if set.See also:
Libxfce4ui.dialog_show_help
().New in version 4.12.
- Libxfce4ui.gdk_device_grab(seat, window, capabilities, cursor)¶
- Parameters:
window (
Gdk.Window
) – TheGdk.Window
which will own the grab.capabilities (
Gdk.SeatCapabilities
) – Capabilities that will be grabbed.cursor (
Gdk.Cursor
orNone
) – The cursor to display while the grab is active. If this isNone
then the normal cursors are used for window and its descendants, and the cursor for window is used elsewhere.
- Returns:
- Return type:
Similar to
Gdk.Seat.grab
but tries to grab the seat five times with 100ms between each attempt.New in version 4.18.
- Libxfce4ui.gdk_screen_get_active()¶
- Returns:
the currently active
Gdk.Screen
.- monitor_return:
Address to store the monitor number to or
None
.
- Return type:
(
Gdk.Screen
, monitor_return:int
)
Returns the currently active
Gdk.Screen
, that is, the screen which currently contains the pointer. If no active screen was found, the defaultGdk.Screen
is returned.
- Libxfce4ui.gdk_screen_get_geometry()¶
- Returns:
a newly created
Gdk.Rectangle
containing the width and height of the screen.- Return type:
Returns the width and height of the default
Gdk.Screen
. This is a replacement forGdk.Screen.width
/Gdk.Screen.height
.New in version 4.14.
- Libxfce4ui.gicon_from_name(name)¶
- Parameters:
name (
str
) – Name of the application.- Returns:
a new
Gio.ThemedIcon
.- Return type:
This function will first look for a desktop file of name and if successful use the value of the “Icon” property to return a
Gio.Icon
. If no desktop file of name is found it will fallback to returning aGio.Icon
based onGio.ThemedIcon.new_with_default_fallbacks
andGtk.IconTheme.lookup_by_gicon
.New in version 4.16.
- Libxfce4ui.gtk_accel_group_connect_action_entries(accel_group, action_entries, n_action_entries, callback_data)¶
- Parameters:
accel_group (
Gtk.AccelGroup
) – theGtk.AccelGroup
to connect toaction_entries (
Libxfce4ui.GtkActionEntry
) – array of action_entries to be addedn_action_entries (
int
) – size of the action_entries arraycallback_data (
object
orNone
) – data which should be passed to the callback of eachLibxfce4ui.GtkActionEntry
This method will connect each accel_path from the
Libxfce4ui.GtkActionEntry
in action_entries to its related callback. If the accelerator is pressed, the related callback will be called.New in version 4.16.
- Libxfce4ui.gtk_accel_group_disconnect_action_entries(accel_group, action_entries, n_action_entries)¶
- Parameters:
accel_group (
Gtk.AccelGroup
) – theGtk.AccelGroup
to connect toaction_entries (
Libxfce4ui.GtkActionEntry
) – array of action_entries to be addedn_action_entries (
int
) – size of the action_entries array
This method will disconnect each accel_path from the
Libxfce4ui.GtkActionEntry
in action_entries.New in version 4.16.
- Libxfce4ui.gtk_accel_map_add_entries(action_entries, n_action_entries)¶
- Parameters:
action_entries (
Libxfce4ui.GtkActionEntry
) – array of action_entries to be addedn_action_entries (
int
) – size of the action_entries array
Adds the default key of each ActionEntry to the accel_map, if no key was defined for the related accel_path so far.
New in version 4.16.
- Libxfce4ui.gtk_button_new_mixed(stock_id, label)¶
- Parameters:
- Returns:
the newly created
Gtk.Button
widget.- Return type:
Creates a new
Gtk.Button
containing a mnemonic label and a stock icon. The stock_id could be something likeGtk.STOCK_OK
orGtk.STOCK_APPLY
.When the stock_id is
None
a normal mnemonic button will be created, when label isNone
a stock button will be created. This behaviour is added for xfce_message_dialog_new().
- Parameters:
label_text (
str
) – Label to use for theGtk.CheckMenuItem
tooltip_text (
str
orNone
) – Tooltip to add on the passed item, orNone
accel_path (
str
orNone
) – Unique path, used to identify the accelerator, orNone
callback (
GObject.Callback
orNone
) –GObject.Callback
which will be triggered on activation, orNone
callback_param (
GObject.Object
orNone
) – optional callback parameter, orNone
.active (
bool
) – boolean value indicating whether the check box is active.menu_to_append_item (
Gtk.MenuShell
orNone
) –Gtk.MenuShell
on which the item should be appended, orNone
- Returns:
A new
Gtk.CheckMenuItem
.- Return type:
Convenience method to create a
Gtk.CheckMenuItem
and preconfigure it with the passed parameters.New in version 4.16.
- Libxfce4ui.gtk_execute_tab_accel(accel_path, data, entries, entry_count)¶
- Parameters:
accel_path (
str
) – the accelerator path of the action that we want to activatedata (
object
orNone
) – a pointer of data that will be passed to the callback if a tab-shortcut is foundentries (
Libxfce4ui.GtkActionEntry
) – aLibxfce4ui.GtkActionEntry
[]entry_count (
int
) – the number of entries in entries
- Returns:
a boolean that is
True
if the action was found, otherwise it isFalse
- Return type:
Activates the callback function of the
Libxfce4ui.GtkActionEntry
that corresponds to accel_path. If no such action exists in entries, then nothing happens.
- Libxfce4ui.gtk_frame_box_new(label)¶
- Parameters:
label (
str
) – the text to use as the label of the frame.- Returns:
the newly created
Gtk.Frame
widget.- container_return:
return location for the frame’s container.
- Return type:
(
Gtk.Widget
, container_return:Gtk.Widget
orNone
)
Creates an Xfce-styled frame. The frame is a
Gtk.Frame
, without outline and an optional bolded text label. The contents of the frame are indented on the left. The return value is theGtk.Frame
itself. The container_return is aGtk.Alignment
widget to which children of the frame should be added.See also:
Libxfce4ui.gtk_frame_box_new_with_content
().
- Libxfce4ui.gtk_frame_box_new_with_content(label, content)¶
- Parameters:
label (
str
) – the text to use as the label of the frame.content (
Gtk.Widget
) – theGtk.Widget
to put inside the frame.
- Returns:
the newly created
Gtk.Frame
widget.- Return type:
Creates a widget with
Libxfce4ui.gtk_frame_box_new
() and adds the contentGtk.Widget
to the frame.
- Libxfce4ui.gtk_get_action_entry_by_id(action_entries, n_action_entries, id)¶
- Parameters:
action_entries (
Libxfce4ui.GtkActionEntry
) – array of action_entries to be searchedn_action_entries (
int
) – size of the action_entries arrayid (
int
) – id of the action entry (usually enum values are used)
- Returns:
The matching
Libxfce4ui.GtkActionEntry
orNone
if not found- Return type:
Convenience method to find a specific action_entry from an array of action_entries
New in version 4.16.
- Libxfce4ui.gtk_handle_tab_accels(key_event, accel_group, data, entries, entry_count)¶
- Parameters:
key_event (
Gdk.EventKey
) – theGdk.EventKey
that might trigger a shortcutaccel_group (
Gtk.AccelGroup
) – theGtk.AccelGroup
that will be get querieddata (
object
orNone
) – a pointer of data that will be passed to the callback if a tab-shortcut is foundentries (
Libxfce4ui.GtkActionEntry
) – aLibxfce4ui.GtkActionEntry
[]entry_count (
int
) – the number of entries in entries
- Returns:
a boolean that is
Gdk.EVENT_STOP
(True
) if the event was handled, otherwise it isGdk.EVENT_PROPAGATE
(False
)- Return type:
The Tab key is used to navigate the interface by GTK+ so we need to handle shortcuts with the Tab accelerator manually. Tab sometimes becomes ISO_Left_Tab (e.g. in Ctrl+Shift+Tab) so check both here.
- Parameters:
label_text (
str
) – Label to use for theGtk.ImageMenuItem
tooltip_text (
str
orNone
) – Tooltip to add on the passed item, orNone
accel_path (
str
orNone
) – Unique path, used to identify the accelerator, orNone
callback (
GObject.Callback
orNone
) –GObject.Callback
which will be triggered on activation, orNone
callback_param (
GObject.Object
orNone
) – optional callback parameter, orNone
.image (
Gtk.Widget
orNone
) – a widget to set as the image for the menu item, orNone
menu_to_append_item (
Gtk.MenuShell
orNone
) –Gtk.MenuShell
on which the item should be appended, orNone
- Returns:
A new
Gtk.ImageMenuItem
.- Return type:
Convenience method to create a deprecated
Gtk.ImageMenuItem
and preconfigure it with the passed parameters. In order to prevent G_GNUC_BEGIN_IGNORE_DEPRECATIONS in all xfce projects, this method can be usedNew in version 4.16.
- Parameters:
label_text (
str
) – Label to use for theGtk.ImageMenuItem
tooltip_text (
str
orNone
) – Tooltip to add on the passed item, orNone
accel_path (
str
orNone
) – Unique path, used to identify the accelerator, orNone
callback (
GObject.Callback
orNone
) –GObject.Callback
which will be triggered on activation, orNone
callback_param (
GObject.Object
orNone
) – optional callback parameter, orNone
.icon_name (
str
orNone
) – name of the icon to use for theGtk.ImageMenuItem
, orNone
menu_to_append_item (
Gtk.MenuShell
orNone
) –Gtk.MenuShell
on which the item should be appended, orNone
- Returns:
A new
Gtk.ImageMenuItem
.- Return type:
Convenience method to create a
Gtk.ImageMenuItem
and preconfigure it with the passed parameters.New in version 4.16.
- Libxfce4ui.gtk_label_set_a11y_relation(label, widget)¶
- Parameters:
widget (
Gtk.Widget
) – aGtk.Widget
.
Sets the
ATK_RELATION_LABEL_FOR
relation on label for widget, which means accessiblity tools will identify label as descriptive item for the specified widget.
- Parameters:
menu (
Gtk.MenuShell
) –Gtk.MenuShell
on which the separator should be appended
Convenience method do add separators, used to prevent code duplication
New in version 4.16.
- Parameters:
menu (
Gtk.MenuShell
) –Gtk.MenuShell
on which the separator should be appended
Convenience method do add separators, used to prevent code duplication
New in version 4.16.
- Parameters:
label_text (
str
) – Label to use for theGtk.MenuItem
tooltip_text (
str
orNone
) – Tooltip to add on the passed item, orNone
accel_path (
str
orNone
) – Unique path, used to identify the accelerator, orNone
callback (
GObject.Callback
orNone
) –GObject.Callback
which will be triggered on activation, orNone
callback_param (
GObject.Object
orNone
) – optional callback parameter, orNone
.menu_to_append_item (
Gtk.MenuShell
orNone
) –Gtk.MenuShell
on which the item should be appended, orNone
- Returns:
A new
Gtk.MenuItem
.- Return type:
Convenience method to create a
Gtk.MenuItem
and preconfigure it with the passed parameters.New in version 4.16.
- Parameters:
action_entry (
Libxfce4ui.GtkActionEntry
) – Label to use for theGtk.CheckMenuItem
callback_param (
GObject.Object
orNone
) – optional callback parameter, orNone
.menu_to_append_item (
Gtk.MenuShell
orNone
) –Gtk.MenuShell
on which the item should be appended, orNone
- Returns:
A new
Gtk.MenuItem
orNone
- Return type:
Gtk.Widget
orNone
Method to create a menu item from the passed action entry
New in version 4.16.
- Parameters:
menu_item (
Gtk.MenuItem
) –Gtk.MenuItem
on which the accel label is to setaccel_path (
str
orNone
) – Unique path, used to identify the accelerator, orNone
to show no accelerator
Use the passed accel_path show the related
Gtk.AccelLabel
with the correct accelerator on the item.New in version 4.16.
- Parameters:
parent_menu_shell (
Gtk.Widget
orNone
) – the menu shell containing the triggering menu item, orNone
.parent_menu_item (
Gtk.Widget
orNone
) – the menu item whose activation triggered the popup, orNone
.func (
Gtk.MenuPositionFunc
orNone
) – a user supplied function used to position the menu, orNone
.data (
object
orNone
) – user supplied data to be passed to func.button (
int
) – the mouse button which was pressed to initiate the event.activate_time (
int
) – the time at which the activation event occurred.
- Returns:
- Return type:
Attempts to pop up a
Gtk.Menu
for a short duration. Unlike the originalGtk.Menu.popup
(), this function will verify that the menu has been mapped or will keep trying for up to 250ms. It will also return a value indicating whether the menu was eventually mapped or not. Following is an excerpt from the GTK+ Documentation onGtk.Menu
.Displays a menu and makes it available for selection.
Applications can use this function to display context-sensitive menus, and will typically supply
None
for the parent_menu_shell, parent_menu_item, func and data parameters. The default menu positioning function will position the menu at the current mouse cursor position.The button parameter should be the mouse button pressed to initiate the menu popup. If the menu popup was initiated by something other than a mouse button press, such as a mouse button release or a keypress, button should be 0.
The activate_time parameter is used to conflict-resolve initiation of concurrent requests for mouse/keyboard grab requests. To function properly, this needs to be the timestamp of the user event (such as a mouse click or key press) that caused the initiation of the popup. Only if no such event is available,
Gtk.get_current_event_time
() can be used instead.New in version 4.14.
- Parameters:
label_text (
str
) – Label to use for theGtk.CheckMenuItem
tooltip_text (
str
orNone
) – Tooltip to add on the passed item, orNone
accel_path (
str
orNone
) – Unique path, used to identify the accelerator, orNone
callback (
GObject.Callback
orNone
) –GObject.Callback
which will be triggered on activation, orNone
callback_param (
GObject.Object
orNone
) – optional callback parameter, orNone
.active (
bool
) – boolean value indicating whether the check box is active.menu_to_append_item (
Gtk.MenuShell
orNone
) –Gtk.MenuShell
on which the item should be appended, orNone
- Returns:
A new
Gtk.CheckMenuItem
.- Return type:
Convenience method to create a
Gtk.CheckMenuItem
and preconfigure it with the passed parameters. In order to simplify usage, aGtk.CheckMenuItem
is created and drawn as radio-itemNew in version 4.16.
- Parameters:
action_entry (
Libxfce4ui.GtkActionEntry
) – Label to use for theGtk.CheckMenuItem
callback_param (
GObject.Object
orNone
) – optional callback parameter, orNone
.active (
bool
) – boolean value indicating whether the check box is active.menu_to_append_item (
Gtk.MenuShell
orNone
) –Gtk.MenuShell
on which the item should be appended, orNone
- Returns:
A new
Gtk.MenuItem
orNone
- Return type:
Gtk.Widget
orNone
Method to create a toggle menu item from the passed action entry
New in version 4.16.
- Libxfce4ui.gtk_toggle_tool_button_new_from_action_entry(action_entry, callback_param, active, toolbar_to_append_item)¶
- Parameters:
action_entry (
Libxfce4ui.GtkActionEntry
) – Label to use for theGtk.ToggleToolButton
callback_param (
GObject.Object
orNone
) – optional callback parameter, orNone
.active (
bool
) – boolean value indicating whether the toggle is initially active.toolbar_to_append_item (
Gtk.Toolbar
) –Gtk.Toolbar
on which the item should be appended
- Returns:
A new
Gtk.ToggleToolButton
- Return type:
Method to create a toolbar toggle-button from the passed action entry.
New in version 4.17.6.
- Libxfce4ui.gtk_tool_button_new_from_action_entry(action_entry, callback_param, toolbar_to_append_item)¶
- Parameters:
action_entry (
Libxfce4ui.GtkActionEntry
) – Label to use for theGtk.ToolButton
callback_param (
GObject.Object
orNone
) – optional callback parameter, orNone
.toolbar_to_append_item (
Gtk.Toolbar
) –Gtk.Toolbar
on which the item should be appended
- Returns:
A new
Gtk.ToolButton
- Return type:
Method to create a toolbar button from the passed action entry.
New in version 4.16.
- Libxfce4ui.gtk_translate_action_entries(action_entries, n_action_entries)¶
- Parameters:
action_entries (
Libxfce4ui.GtkActionEntry
) – array of action_entries to be translatedn_action_entries (
int
) – size of the action_entries array
Convenience method to translate the label text and tooltip text of an array of action_entries
New in version 4.16.
- Libxfce4ui.gtk_window_center_on_active_screen(window)¶
- Parameters:
window (
Gtk.Window
) – theGtk.Window
to center.
Determines the screen that contains the pointer and centers the window on it. If it failes to determine the current pointer position, window is centered on the default screen.
This function only works properly if you call it before realizing the window and you haven’t set a fixed window position using
Gtk.Window.move
().See also:
Libxfce4ui.gdk_screen_get_active
().
- Libxfce4ui.has_gtk_frame_extents(window, extents)¶
- Parameters:
window (
Gdk.Window
) – AGdk.Window
extents (
Gtk.Border
) – A pointer to aGtk.Border
to copy to.
- Returns:
True
if aGdk.Window
has the _GTK_FRAME_EXTENTS atom set.- Return type:
This function can be called to determine if a
Gdk.Window
is using client-side decorations which is indicated by the _GTK_FRAME_EXTENTS X11 atom. It furthermore sets a pointer of typeGtk.Border
to the actual extents.New in version 4.16.
- Libxfce4ui.icon_name_from_desktop_id(desktop_id)¶
- Parameters:
desktop_id (
str
) – Name of the desktop file.- Returns:
None
on error, else the string value of the “Icon” property.- Return type:
New in version 4.16.
- Libxfce4ui.spawn(screen, working_directory, argv, envp, flags, startup_notify, startup_timestamp, startup_icon_name, child_process)¶
- Parameters:
screen (
Gdk.Screen
orNone
) – aGdk.Screen
orNone
to use the active screen, seeLibxfce4ui.gdk_screen_get_active
().working_directory (
str
orNone
) – child’s current working directory orNone
to inherit parent’s.argv (
str
) – child’s argument vector.envp (
str
orNone
) – child’s environment vector orNone
to inherit parent’s.flags (
GLib.SpawnFlags
) – flags fromGLib.SpawnFlags
.GLib.SpawnFlags.DO_NOT_REAP_CHILD
is not allowed, useLibxfce4ui.spawn_on_screen_with_child_watch
() if you want a child watch.startup_notify (
bool
) – whether to use startup notification.startup_timestamp (
int
) – the timestamp to pass to startup notification, use the event time here if possible to make focus stealing prevention work property. If you don’t have direct access to the event time you could useGtk.get_current_event_time
() or if nothing is available 0 is valid too.child_process (
bool
) –True
if the process should be a child process,False
if it should be reparented to init.
- Raises:
- Returns:
- Return type:
Like gdk_spawn_on_screen() (GDK 2), but also supports startup notification (if Libxfce4ui was built with startup notification support).
New in version 4.16.
- Libxfce4ui.spawn_command_line(screen, command_line, in_terminal, startup_notify, child_process)¶
- Parameters:
screen (
Gdk.Screen
orNone
) – aGdk.Screen
orNone
to use the active screen, seeLibxfce4ui.gdk_screen_get_active
().command_line (
str
) – command line to run.in_terminal (
bool
) – whether to run command_line in a terminal.startup_notify (
bool
) – whether to use startup notification.child_process (
bool
) –True
if the process should be a child process,False
if it should be reparented to init.
- Raises:
- Returns:
True
if the command_line was executed successfully,False
if error is set.- Return type:
Executes the given command_line and returns
True
if the command terminated successfully. Else, the error is set to the standard error output.New in version 4.16.
- Libxfce4ui.spawn_command_line_on_screen(screen, command_line, in_terminal, startup_notify)¶
- Parameters:
screen (
Gdk.Screen
orNone
) – aGdk.Screen
orNone
to use the active screen, seeLibxfce4ui.gdk_screen_get_active
().command_line (
str
) – command line to run.in_terminal (
bool
) – whether to run command_line in a terminal.startup_notify (
bool
) – whether to use startup notification.
- Raises:
- Returns:
True
if the command_line was executed successfully,False
if error is set.- Return type:
Executes the given command_line and returns
True
if the command terminated successfully. Else, the error is set to the standard error output.Deprecated since version 4.16: Use
Libxfce4ui.spawn_command_line
instead.
- Libxfce4ui.spawn_on_screen(screen, working_directory, argv, envp, flags, startup_notify, startup_timestamp, startup_icon_name)¶
- Parameters:
screen (
Gdk.Screen
orNone
) – aGdk.Screen
orNone
to use the active screen, seeLibxfce4ui.gdk_screen_get_active
().working_directory (
str
orNone
) – child’s current working directory orNone
to inherit parent’s.argv (
str
) – child’s argument vector.envp (
str
orNone
) – child’s environment vector orNone
to inherit parent’s.flags (
GLib.SpawnFlags
) – flags fromGLib.SpawnFlags
.GLib.SpawnFlags.DO_NOT_REAP_CHILD
is not allowed, useLibxfce4ui.spawn_on_screen_with_child_watch
() if you want a child watch.startup_notify (
bool
) – whether to use startup notification.startup_timestamp (
int
) – the timestamp to pass to startup notification, use the event time here if possible to make focus stealing prevention work property. If you don’t have direct access to the event time you could useGtk.get_current_event_time
() or if nothing is available 0 is valid too.
- Raises:
- Returns:
- Return type:
Like gdk_spawn_on_screen() (GDK 2), but also supports startup notification (if Libxfce4ui was built with startup notification support).
Deprecated since version 4.16: Use
Libxfce4ui.spawn
instead.
- Libxfce4ui.spawn_on_screen_with_child_watch(screen, working_directory, argv, envp, flags, startup_notify, startup_timestamp, startup_icon_name, child_watch_closure)¶
- Parameters:
screen (
Gdk.Screen
orNone
) – aGdk.Screen
orNone
to use the active screen, seeLibxfce4ui.gdk_screen_get_active
().working_directory (
str
orNone
) – child’s current working directory orNone
to inherit parent’s.argv (
str
) – child’s argument vector.envp (
str
orNone
) – child’s environment vector orNone
to inherit parent’s.flags (
GLib.SpawnFlags
) – flags fromGLib.SpawnFlags
.GLib.SpawnFlags.DO_NOT_REAP_CHILD
is not allowed, you should use the child_watch_closure for this.startup_notify (
bool
) – whether to use startup notification.startup_timestamp (
int
) – the timestamp to pass to startup notification, use the event time here if possible to make focus stealing prevention work property. If you don’t have direct access to the event time you could useGtk.get_current_event_time
() or if nothing is available 0 is valid too.child_watch_closure (
GObject.Closure
orNone
) – closure that is triggered when the child exists orNone
.
- Raises:
- Returns:
- Return type:
Like
Libxfce4ui.spawn_on_screen
(), but allows to attach a closure to watch the child’s exit status. This because only oneGLib.child_watch_add
() is allowed on Unix (per PID) and this is already internally needed for a proper startup notification implementation.- Spawning with a child watch
static void child_watch_callback (GObject *object, gint status) { g_message ("Child exit status is %d", status); } static void spawn_something (void) { GClosure *child_watch; child_watch = g_cclosure_new_swap (G_CALLBACK (child_watch_callback), object, NULL); xfce_spawn_on_screen_with_child_watch (..., child_watch, ...); }
- Libxfce4ui.widget_reparent(widget, new_parent)¶
- Parameters:
widget (
Gtk.Widget
) – aGtk.Widget
.new_parent (
Gtk.Widget
) – aGtk.Container
to move the widget into
- Returns:
- Return type:
Moves a widget from one
Gtk.Container
to another, handling reference count issues to avoid destroying the widget.New in version 4.14.