Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- Libxfce4ui.dialog_confirm_close_tabs(parent, num_tabs, show_confirm_box, confirm_box_checked)¶
- Parameters:
- Returns:
Gtk.ResponseType.CANCELif cancelled,Gtk.ResponseType.YESif the user wants to close the window,Gtk.ResponseType.CLOSEif the user wants to close the tab, andGtk.ResponseType.NONEfor 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
Truea 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.WindoworNone) – transient parent of the dialog, orNone.component (
strorNone) – name of the component opening the help page orNone. If the value isNonethe target will be the main page of the documentation website.page (
strorNone) – 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.WindoworNone) – transient parent of the dialog, orNone.component (
strorNone) – name of the component opening the help page orNone. If the value isNonethe target will be the main page of the documentation website.page (
strorNone) – subpage of the component on the website orNone.version (
strorNone) – alternative version, orNoneto 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.Windowwhich will own the grab.capabilities (
Gdk.SeatCapabilities) – Capabilities that will be grabbed.cursor (
Gdk.CursororNone) – The cursor to display while the grab is active. If this isNonethen 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.grabbut 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.Screenis returned.
- Libxfce4ui.gdk_screen_get_geometry()¶
- Returns:
a newly created
Gdk.Rectanglecontaining 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.Iconbased onGio.ThemedIcon.new_with_default_fallbacksandGtk.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.AccelGroupto connect toaction_entries (
Libxfce4ui.GtkActionEntry) – array of action_entries to be addedn_action_entries (
int) – size of the action_entries arraycallback_data (
objectorNone) – data which should be passed to the callback of eachLibxfce4ui.GtkActionEntry
This method will connect each accel_path from the
Libxfce4ui.GtkActionEntryin 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.AccelGroupto 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.GtkActionEntryin 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.Buttonwidget.- Return type:
Creates a new
Gtk.Buttoncontaining a mnemonic label and a stock icon. The stock_id could be something likeGtk.STOCK_OKorGtk.STOCK_APPLY.When the stock_id is
Nonea normal mnemonic button will be created, when label isNonea stock button will be created. This behaviour is added for xfce_message_dialog_new().
- Parameters:
label_text (
str) – Label to use for theGtk.CheckMenuItemtooltip_text (
strorNone) – Tooltip to add on the passed item, orNoneaccel_path (
strorNone) – Unique path, used to identify the accelerator, orNonecallback (
GObject.CallbackorNone) –GObject.Callbackwhich will be triggered on activation, orNonecallback_param (
GObject.ObjectorNone) – optional callback parameter, orNone.active (
bool) – boolean value indicating whether the check box is active.menu_to_append_item (
Gtk.MenuShellorNone) –Gtk.MenuShellon which the item should be appended, orNone
- Returns:
A new
Gtk.CheckMenuItem.- Return type:
Convenience method to create a
Gtk.CheckMenuItemand 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 (
objectorNone) – 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
Trueif the action was found, otherwise it isFalse- Return type:
Activates the callback function of the
Libxfce4ui.GtkActionEntrythat 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.Framewidget.- container_return:
return location for the frame’s container.
- Return type:
(
Gtk.Widget, container_return:Gtk.WidgetorNone)
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.Frameitself. The container_return is aGtk.Alignmentwidget 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.Widgetto put inside the frame.
- Returns:
the newly created
Gtk.Framewidget.- Return type:
Creates a widget with
Libxfce4ui.gtk_frame_box_new() and adds the contentGtk.Widgetto 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.GtkActionEntryorNoneif 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.EventKeythat might trigger a shortcutaccel_group (
Gtk.AccelGroup) – theGtk.AccelGroupthat will be get querieddata (
objectorNone) – 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.ImageMenuItemtooltip_text (
strorNone) – Tooltip to add on the passed item, orNoneaccel_path (
strorNone) – Unique path, used to identify the accelerator, orNonecallback (
GObject.CallbackorNone) –GObject.Callbackwhich will be triggered on activation, orNonecallback_param (
GObject.ObjectorNone) – optional callback parameter, orNone.image (
Gtk.WidgetorNone) – a widget to set as the image for the menu item, orNonemenu_to_append_item (
Gtk.MenuShellorNone) –Gtk.MenuShellon which the item should be appended, orNone
- Returns:
A new
Gtk.ImageMenuItem.- Return type:
Convenience method to create a deprecated
Gtk.ImageMenuItemand 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.ImageMenuItemtooltip_text (
strorNone) – Tooltip to add on the passed item, orNoneaccel_path (
strorNone) – Unique path, used to identify the accelerator, orNonecallback (
GObject.CallbackorNone) –GObject.Callbackwhich will be triggered on activation, orNonecallback_param (
GObject.ObjectorNone) – optional callback parameter, orNone.icon_name (
strorNone) – name of the icon to use for theGtk.ImageMenuItem, orNonemenu_to_append_item (
Gtk.MenuShellorNone) –Gtk.MenuShellon which the item should be appended, orNone
- Returns:
A new
Gtk.ImageMenuItem.- Return type:
Convenience method to create a
Gtk.ImageMenuItemand 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_FORrelation on label for widget, which means accessiblity tools will identify label as descriptive item for the specified widget.
- Parameters:
menu (
Gtk.MenuShell) –Gtk.MenuShellon 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.MenuShellon which the separator should be appended
Convenience method do add separators, used to prevent code duplication
New in version 4.16.
Deprecated since version 4.19.1: Use
Libxfce4ui.gtk_menu_append_separator() instead.
- Parameters:
label_text (
str) – Label to use for theGtk.MenuItemtooltip_text (
strorNone) – Tooltip to add on the passed item, orNoneaccel_path (
strorNone) – Unique path, used to identify the accelerator, orNonecallback (
GObject.CallbackorNone) –GObject.Callbackwhich will be triggered on activation, orNonecallback_param (
GObject.ObjectorNone) – optional callback parameter, orNone.menu_to_append_item (
Gtk.MenuShellorNone) –Gtk.MenuShellon which the item should be appended, orNone
- Returns:
A new
Gtk.MenuItem.- Return type:
Convenience method to create a
Gtk.MenuItemand preconfigure it with the passed parameters.New in version 4.16.
- Parameters:
action_entry (
Libxfce4ui.GtkActionEntry) – Label to use for theGtk.CheckMenuItemcallback_param (
GObject.ObjectorNone) – optional callback parameter, orNone.menu_to_append_item (
Gtk.MenuShellorNone) –Gtk.MenuShellon which the item should be appended, orNone
- Returns:
A new
Gtk.MenuItemorNone- Return type:
Gtk.WidgetorNone
Method to create a menu item from the passed action entry
New in version 4.16.
- Parameters:
menu_item (
Gtk.MenuItem) –Gtk.MenuItemon which the accel label is to setaccel_path (
strorNone) – Unique path, used to identify the accelerator, orNoneto show no accelerator
Use the passed accel_path show the related
Gtk.AccelLabelwith the correct accelerator on the item.New in version 4.16.
- Parameters:
parent_menu_shell (
Gtk.WidgetorNone) – the menu shell containing the triggering menu item, orNone.parent_menu_item (
Gtk.WidgetorNone) – the menu item whose activation triggered the popup, orNone.func (
Gtk.MenuPositionFuncorNone) – a user supplied function used to position the menu, orNone.data (
objectorNone) – 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.Menufor 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
Nonefor 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.CheckMenuItemtooltip_text (
strorNone) – Tooltip to add on the passed item, orNoneaccel_path (
strorNone) – Unique path, used to identify the accelerator, orNonecallback (
GObject.CallbackorNone) –GObject.Callbackwhich will be triggered on activation, orNonecallback_param (
GObject.ObjectorNone) – optional callback parameter, orNone.active (
bool) – boolean value indicating whether the check box is active.menu_to_append_item (
Gtk.MenuShellorNone) –Gtk.MenuShellon which the item should be appended, orNone
- Returns:
A new
Gtk.CheckMenuItem.- Return type:
Convenience method to create a
Gtk.CheckMenuItemand preconfigure it with the passed parameters. In order to simplify usage, aGtk.CheckMenuItemis created and drawn as radio-itemNew in version 4.16.
- Parameters:
action_entry (
Libxfce4ui.GtkActionEntry) – Label to use for theGtk.CheckMenuItemcallback_param (
GObject.ObjectorNone) – optional callback parameter, orNone.active (
bool) – boolean value indicating whether the check box is active.menu_to_append_item (
Gtk.MenuShellorNone) –Gtk.MenuShellon which the item should be appended, orNone
- Returns:
A new
Gtk.MenuItemorNone- Return type:
Gtk.WidgetorNone
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.ToggleToolButtoncallback_param (
GObject.ObjectorNone) – optional callback parameter, orNone.active (
bool) – boolean value indicating whether the toggle is initially active.toolbar_to_append_item (
Gtk.Toolbar) –Gtk.Toolbaron 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.ToolButtoncallback_param (
GObject.ObjectorNone) – optional callback parameter, orNone.toolbar_to_append_item (
Gtk.Toolbar) –Gtk.Toolbaron 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.Windowto 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.Windowextents (
Gtk.Border) – A pointer to aGtk.Borderto copy to.
- Returns:
Trueif aGdk.Windowhas the _GTK_FRAME_EXTENTS atom set.- Return type:
This function can be called to determine if a
Gdk.Windowis using client-side decorations which is indicated by the _GTK_FRAME_EXTENTS X11 atom. It furthermore sets a pointer of typeGtk.Borderto 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:
Noneon 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.ScreenorNone) – aGdk.ScreenorNoneto use the active screen, seeLibxfce4ui.gdk_screen_get_active().working_directory (
strorNone) – child’s current working directory orNoneto inherit parent’s.argv (
str) – child’s argument vector.envp (
strorNone) – child’s environment vector orNoneto inherit parent’s.flags (
GLib.SpawnFlags) – flags fromGLib.SpawnFlags.GLib.SpawnFlags.DO_NOT_REAP_CHILDis 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) –Trueif the process should be a child process,Falseif 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.ScreenorNone) – aGdk.ScreenorNoneto 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) –Trueif the process should be a child process,Falseif it should be reparented to init.
- Raises:
- Returns:
Trueif the command_line was executed successfully,Falseif error is set.- Return type:
Executes the given command_line and returns
Trueif 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.ScreenorNone) – aGdk.ScreenorNoneto 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:
Trueif the command_line was executed successfully,Falseif error is set.- Return type:
Executes the given command_line and returns
Trueif the command terminated successfully. Else, the error is set to the standard error output.Deprecated since version 4.16: Use
Libxfce4ui.spawn_command_lineinstead.
- Libxfce4ui.spawn_on_screen(screen, working_directory, argv, envp, flags, startup_notify, startup_timestamp, startup_icon_name)¶
- Parameters:
screen (
Gdk.ScreenorNone) – aGdk.ScreenorNoneto use the active screen, seeLibxfce4ui.gdk_screen_get_active().working_directory (
strorNone) – child’s current working directory orNoneto inherit parent’s.argv (
str) – child’s argument vector.envp (
strorNone) – child’s environment vector orNoneto inherit parent’s.flags (
GLib.SpawnFlags) – flags fromGLib.SpawnFlags.GLib.SpawnFlags.DO_NOT_REAP_CHILDis 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.spawninstead.
- 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.ScreenorNone) – aGdk.ScreenorNoneto use the active screen, seeLibxfce4ui.gdk_screen_get_active().working_directory (
strorNone) – child’s current working directory orNoneto inherit parent’s.argv (
str) – child’s argument vector.envp (
strorNone) – child’s environment vector orNoneto inherit parent’s.flags (
GLib.SpawnFlags) – flags fromGLib.SpawnFlags.GLib.SpawnFlags.DO_NOT_REAP_CHILDis 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.ClosureorNone) – 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.Containerto move the widget into
- Returns:
- Return type:
Moves a widget from one
Gtk.Containerto another, handling reference count issues to avoid destroying the widget.New in version 4.14.