Class: Gtk::Window
Direct Known Subclasses
AboutDialog, ApplicationWindow, Assistant, Dialog, ShortcutsWindow
Class Method Summary collapse
-
.auto_startup_notification=(setting) ⇒ nil
Sets whether the window should request startup notification.
-
.default_icon_name ⇒ String
Returns the fallback icon name for windows.
-
.default_icon_name=(name) ⇒ nil
Sets an icon to be used as fallback.
-
.interactive_debugging=(enable) ⇒ nil
Opens or closes the interactive debugger.
-
.list_toplevels ⇒ GLib::List<Gtk::Widget>
Returns a list of all existing toplevel windows.
-
.toplevels ⇒ Gio::ListModel
Returns a list of all existing toplevel windows.
Instance Method Summary collapse
-
#application ⇒ Gtk::Application
The
GtkApplicationassociated with the window. -
#application=(application) ⇒ Gtk::Application
The
GtkApplicationassociated with the window. -
#child ⇒ Gtk::Widget
The child widget.
-
#child=(child) ⇒ Gtk::Widget
The child widget.
-
#close ⇒ nil
Requests that the window is closed.
-
#decorated ⇒ Boolean
Returns whether the window has been set to have decorations.
-
#decorated=(decorated) ⇒ Boolean
Whether the window should have a frame (also known as decorations).
-
#decorated? ⇒ Boolean
Whether the window should have a frame (also known as decorations).
-
#default_height ⇒ Integer
The default height of the window.
-
#default_height=(default_height) ⇒ Integer
The default height of the window.
-
#default_widget ⇒ Gtk::Widget
The default widget.
-
#default_widget=(default_widget) ⇒ Gtk::Widget
The default widget.
-
#default_width ⇒ Integer
The default width of the window.
-
#default_width=(default_width) ⇒ Integer
The default width of the window.
-
#deletable ⇒ Boolean
Returns whether the window has been set to have a close button.
-
#deletable=(deletable) ⇒ Boolean
Whether the window frame should have a close button.
-
#deletable? ⇒ Boolean
Whether the window frame should have a close button.
-
#destroy ⇒ nil
Drop the internal reference GTK holds on toplevel windows.
-
#destroy_with_parent ⇒ Boolean
Returns whether the window will be destroyed with its transient parent.
-
#destroy_with_parent=(destroy_with_parent) ⇒ Boolean
If this window should be destroyed when the parent is destroyed.
-
#destroy_with_parent? ⇒ Boolean
If this window should be destroyed when the parent is destroyed.
-
#display ⇒ Gdk::Display
The display that will display this window.
-
#display=(display) ⇒ Gdk::Display
The display that will display this window.
-
#focus ⇒ Gtk::Widget
Retrieves the current focused widget within the window.
-
#focus=(focus) ⇒ nil
Sets the focus widget.
-
#focus_visible ⇒ Boolean
Gets whether “focus rectangles” are supposed to be visible.
-
#focus_visible=(focus_visible) ⇒ Boolean
Whether 'focus rectangles' are currently visible in this window.
-
#focus_visible? ⇒ Boolean
Whether 'focus rectangles' are currently visible in this window.
-
#focus_widget ⇒ Gtk::Widget
The focus widget.
-
#focus_widget=(focus_widget) ⇒ Gtk::Widget
The focus widget.
-
#fullscreen ⇒ nil
Asks to place window in the fullscreen state.
-
#fullscreen_on_monitor(monitor) ⇒ nil
Asks to place window in the fullscreen state on the given monitor.
-
#fullscreened=(fullscreened) ⇒ Boolean
Whether the window is fullscreen.
-
#fullscreened? ⇒ Boolean
Whether the window is fullscreen.
-
#get_default_size(width, height) ⇒ nil
Gets the default size of the window.
-
#group ⇒ Gtk::WindowGroup
Returns the group for window.
-
#handle_menubar_accel ⇒ Boolean
Returns whether this window reacts to F10 key presses by activating a menubar it contains.
-
#handle_menubar_accel=(handle_menubar_accel) ⇒ Boolean
Whether the window frame should handle F10 for activating menubars.
-
#handle_menubar_accel? ⇒ Boolean
Whether the window frame should handle F10 for activating menubars.
-
#has_group ⇒ Boolean
Returns whether window has an explicit window group.
-
#hide_on_close ⇒ Boolean
Returns whether the window will be hidden when the close button is clicked.
-
#hide_on_close=(hide_on_close) ⇒ Boolean
If this window should be hidden when the users clicks the close button.
-
#hide_on_close? ⇒ Boolean
If this window should be hidden when the users clicks the close button.
-
#icon_name ⇒ String
Specifies the name of the themed icon to use as the window icon.
-
#icon_name=(icon_name) ⇒ String
Specifies the name of the themed icon to use as the window icon.
-
#initialize ⇒ Gtk::Widget
constructor
Creates a new
GtkWindow. -
#is_active ⇒ Boolean
Returns whether the window is part of the current active toplevel.
-
#is_active=(is_active) ⇒ Boolean
Whether the toplevel is the currently active window.
-
#is_active? ⇒ Boolean
Whether the toplevel is the currently active window.
-
#is_fullscreen ⇒ Boolean
Retrieves the current fullscreen state of window.
-
#is_maximized ⇒ Boolean
Retrieves the current maximized state of window.
-
#is_suspended ⇒ Boolean
Retrieves the current suspended state of window.
-
#maximize ⇒ nil
Asks to maximize window, so that it fills the screen.
-
#maximized=(maximized) ⇒ Boolean
Whether the window is maximized.
-
#maximized? ⇒ Boolean
Whether the window is maximized.
-
#minimize ⇒ nil
Asks to minimize the specified window.
-
#mnemonics_visible ⇒ Boolean
Gets whether mnemonics are supposed to be visible.
-
#mnemonics_visible=(mnemonics_visible) ⇒ Boolean
Whether mnemonics are currently visible in this window.
-
#mnemonics_visible? ⇒ Boolean
Whether mnemonics are currently visible in this window.
-
#modal ⇒ Boolean
Returns whether the window is modal.
-
#modal=(modal) ⇒ Boolean
If true, the window is modal.
-
#modal? ⇒ Boolean
If true, the window is modal.
-
#present ⇒ nil
Presents a window to the user.
-
#present_with_time(timestamp) ⇒ nil
Presents a window to the user in response to an user interaction.
-
#resizable ⇒ Boolean
Gets the value set by gtk_window_set_resizable().
-
#resizable=(resizable) ⇒ Boolean
If true, users can resize the window.
-
#resizable? ⇒ Boolean
If true, users can resize the window.
-
#set_default_size(width, height) ⇒ nil
Sets the default size of a window.
-
#startup_id=(startup_id) ⇒ String
A write-only property for setting window's startup notification identifier.
-
#suspended=(suspended) ⇒ Boolean
Whether the window is suspended.
-
#suspended? ⇒ Boolean
Whether the window is suspended.
-
#title ⇒ String
The title of the window.
-
#title=(title) ⇒ String
The title of the window.
-
#titlebar ⇒ Gtk::Widget
The titlebar widget.
-
#titlebar=(titlebar) ⇒ Gtk::Widget
The titlebar widget.
-
#transient_for ⇒ Gtk::Window
The transient parent of the window.
-
#transient_for=(transient_for) ⇒ Gtk::Window
The transient parent of the window.
-
#unfullscreen ⇒ nil
Asks to remove the fullscreen state for window, and return to its previous state.
-
#unmaximize ⇒ nil
Asks to unmaximize window.
-
#unminimize ⇒ nil
Asks to unminimize the specified window.
Methods inherited from Widget
#accessible_role, #accessible_role=, #action_set_enabled, #activate, #activate_action, #activate_action_variant, #activate_default, #activate_signal, #activate_signal=, #activate_signal_from_name=, #add_binding, #add_binding_action, #add_binding_signal, #add_controller, #add_css_class, #add_mnemonic_label, #add_shortcut, #add_tick_callback, #allocate, #allocated_baseline, #allocated_height, #allocated_width, #baseline, #bind_template_callback_full, #bind_template_child_full, #can_focus, #can_focus=, #can_focus?, #can_target, #can_target=, #can_target?, #child_focus, #child_visible, #child_visible=, #clipboard, #compute_bounds, #compute_expand, #compute_point, #compute_transform, #contains, #create_pango_context, #create_pango_layout, #css_classes, #css_classes=, #css_name, #css_name=, #cursor, #cursor=, #cursor_from_name=, default_direction, default_direction=, #direction, #direction=, #dispose_template, #drag_check_threshold, #error_bell, #first_child, #focus_child, #focus_child=, #focus_on_click, #focus_on_click=, #focus_on_click?, #focusable, #focusable=, #focusable?, #font_map, #font_map=, #font_options, #font_options=, #frame_clock, #get_allocation, #get_ancestor, #get_color, #get_preferred_size, #get_size, #get_size_request, #get_template_child, #grab_focus, #halign, #halign=, #has_css_class, #has_default, #has_default=, #has_default?, #has_focus, #has_focus=, #has_focus?, #has_tooltip, #has_tooltip=, #has_tooltip?, #has_visible_focus, #height, #height_request, #height_request=, #hexpand, #hexpand=, #hexpand?, #hexpand_set, #hexpand_set=, #hexpand_set?, #hide, #in_destruction, #init_template, #insert_action_group, #insert_after, #insert_before, #install_action, #install_property_action, #is_ancestor, #is_drawable, #is_focus, #is_sensitive, #is_visible, #keynav_failed, #last_child, #layout_manager, #layout_manager=, #layout_manager_type, #layout_manager_type=, #list_mnemonic_labels, #map, #mapped, #margin_bottom, #margin_bottom=, #margin_end, #margin_end=, #margin_start, #margin_start=, #margin_top, #margin_top=, #measure, #mnemonic_activate, #name, #name=, #native, #next_sibling, #observe_children, #observe_controllers, #opacity, #opacity=, #overflow, #overflow=, #pango_context, #parent, #parent=, #pick, #prev_sibling, #primary_clipboard, #query_action, #queue_allocate, #queue_draw, #queue_resize, #realize, #realized, #receives_default, #receives_default=, #receives_default?, #remove_controller, #remove_css_class, #remove_mnemonic_label, #remove_tick_callback, #request_mode, #root, #root=, #scale_factor, #scale_factor=, #sensitive, #sensitive=, #sensitive?, #set_size_request, #set_state_flags, #settings, #should_layout, #show, #size_allocate, #snapshot_child, #state_flags, #style_context, #template=, #template_from_resource=, #template_scope=, #tooltip_markup, #tooltip_markup=, #tooltip_text, #tooltip_text=, #translate_coordinates, #trigger_tooltip_query, #unmap, #unparent, #unrealize, #unset_state_flags, #valign, #valign=, #vexpand, #vexpand=, #vexpand?, #vexpand_set, #vexpand_set=, #vexpand_set?, #visible, #visible=, #visible?, #width, #width_request, #width_request=
Constructor Details
#initialize ⇒ Gtk::Widget
Creates a new GtkWindow.
To get an undecorated window (no window borders), use [methodGtk.Window.set_decorated].
All top-level windows created by gtk_window_new() are stored in an internal top-level window list. This list can be obtained from [funcGtk.Window.list_toplevels]. Due to GTK keeping a reference to the window internally, gtk_window_new() does not return a reference to the caller.
To delete a GtkWindow, call [methodGtk.Window.destroy].
Class Method Details
.auto_startup_notification=(setting) ⇒ nil
Sets whether the window should request startup notification.
By default, after showing the first GtkWindow, GTK calls
[methodGdk.Toplevel.set_startup_id]. Call this function
to disable the automatic startup notification. You might do this
if your first window is a splash screen, and you want to delay
notification until after your real main window has been shown,
for example.
In that example, you would disable startup notification temporarily, show your splash screen, then re-enable it so that showing the main window would automatically result in notification.
.default_icon_name ⇒ String
Returns the fallback icon name for windows.
The returned string is owned by GTK and should not be modified. It is only valid until the next call to [funcGtk.Window.set_default_icon_name].
.default_icon_name=(name) ⇒ nil
Sets an icon to be used as fallback.
The fallback icon is used for windows that haven't had [methodGtk.Window.set_icon_name] called on them.
.interactive_debugging=(enable) ⇒ nil
Opens or closes the interactive debugger.
The debugger offers access to the widget hierarchy of the application and to useful debugging tools.
This function allows applications that already use Ctrl+Shift+I (or Ctrl+Shift+D) for their own key shortcuts to add a different shortcut to open the Inspector.
If you are not overriding the default key shortcuts for the Inspector, you should not use this function.
.list_toplevels ⇒ GLib::List<Gtk::Widget>
Returns a list of all existing toplevel windows.
The widgets in the list are not individually referenced.
If you want to iterate through the list and perform actions
involving callbacks that might destroy the widgets, you must
call g_list_foreach (result, (GFunc)g_object_ref, NULL) first,
and then unref all the widgets afterwards.
.toplevels ⇒ Gio::ListModel
Returns a list of all existing toplevel windows.
If you want to iterate through the list and perform actions involving callbacks that might destroy the widgets or add new ones, be aware that the list of toplevels will change and emit the "items-changed" signal.
Instance Method Details
#application ⇒ Gtk::Application
The GtkApplication associated with the window.
The application will be kept alive for at least as long as it has any windows associated with it (see g_application_hold() for a way to keep it alive without windows).
Normally, the connection between the application and the window will remain until the window is destroyed, but you can explicitly remove it by setting the :application property to nil.
#application=(application) ⇒ Gtk::Application
The GtkApplication associated with the window.
The application will be kept alive for at least as long as it has any windows associated with it (see g_application_hold() for a way to keep it alive without windows).
Normally, the connection between the application and the window will remain until the window is destroyed, but you can explicitly remove it by setting the :application property to nil.
#child ⇒ Gtk::Widget
The child widget.
#child=(child) ⇒ Gtk::Widget
The child widget.
#close ⇒ nil
Requests that the window is closed.
This is similar to what happens when a window manager close button is clicked.
This function can be used with close buttons in custom titlebars.
#decorated ⇒ Boolean
Returns whether the window has been set to have decorations.
#decorated=(decorated) ⇒ Boolean
Whether the window should have a frame (also known as decorations).
#decorated? ⇒ Boolean
Whether the window should have a frame (also known as decorations).
#default_height ⇒ Integer
The default height of the window.
#default_height=(default_height) ⇒ Integer
The default height of the window.
#default_widget ⇒ Gtk::Widget
The default widget.
#default_widget=(default_widget) ⇒ Gtk::Widget
The default widget.
#default_width ⇒ Integer
The default width of the window.
#default_width=(default_width) ⇒ Integer
The default width of the window.
#deletable ⇒ Boolean
Returns whether the window has been set to have a close button.
#deletable=(deletable) ⇒ Boolean
Whether the window frame should have a close button.
#deletable? ⇒ Boolean
Whether the window frame should have a close button.
#destroy ⇒ nil
Drop the internal reference GTK holds on toplevel windows.
#destroy_with_parent ⇒ Boolean
Returns whether the window will be destroyed with its transient parent.
#destroy_with_parent=(destroy_with_parent) ⇒ Boolean
If this window should be destroyed when the parent is destroyed.
#destroy_with_parent? ⇒ Boolean
If this window should be destroyed when the parent is destroyed.
#display ⇒ Gdk::Display
The display that will display this window.
#display=(display) ⇒ Gdk::Display
The display that will display this window.
#focus ⇒ Gtk::Widget
Retrieves the current focused widget within the window.
Note that this is the widget that would have the focus
if the toplevel window focused; if the toplevel window
is not focused then gtk_widget_has_focus (widget) will
not be true for the widget.
#focus=(focus) ⇒ nil
Sets the focus widget.
If focus is not the current focus widget, and is focusable, sets it as the focus widget for the window. If focus is nil, unsets the focus widget for this window. To set the focus to a particular widget in the toplevel, it is usually more convenient to use [methodGtk.Widget.grab_focus] instead of this function.
#focus_visible ⇒ Boolean
Gets whether “focus rectangles” are supposed to be visible.
#focus_visible=(focus_visible) ⇒ Boolean
Whether 'focus rectangles' are currently visible in this window.
This property is maintained by GTK based on user input and should not be set by applications.
#focus_visible? ⇒ Boolean
Whether 'focus rectangles' are currently visible in this window.
This property is maintained by GTK based on user input and should not be set by applications.
#focus_widget ⇒ Gtk::Widget
The focus widget.
#focus_widget=(focus_widget) ⇒ Gtk::Widget
The focus widget.
#fullscreen ⇒ nil
Asks to place window in the fullscreen state.
Note that you shouldn’t assume the window is definitely fullscreen afterward, because other entities (e.g. the user or window manager) unfullscreen it again, and not all window managers honor requests to fullscreen windows.
You can track the result of this operation via the [propertyGdk.Toplevel:state] property, or by listening to notifications of the [propertyGtk.Window:fullscreened] property.
#fullscreen_on_monitor(monitor) ⇒ nil
Asks to place window in the fullscreen state on the given monitor.
Note that you shouldn't assume the window is definitely fullscreen afterward, or that the windowing system allows fullscreen windows on any given monitor.
You can track the result of this operation via the [propertyGdk.Toplevel:state] property, or by listening to notifications of the [propertyGtk.Window:fullscreened] property.
#fullscreened=(fullscreened) ⇒ Boolean
Whether the window is fullscreen.
Setting this property is the equivalent of calling [methodGtk.Window.fullscreen] or [methodGtk.Window.unfullscreen]; either operation is asynchronous, which means you will need to connect to the ::notify signal in order to know whether the operation was successful.
#fullscreened? ⇒ Boolean
Whether the window is fullscreen.
Setting this property is the equivalent of calling [methodGtk.Window.fullscreen] or [methodGtk.Window.unfullscreen]; either operation is asynchronous, which means you will need to connect to the ::notify signal in order to know whether the operation was successful.
#get_default_size(width, height) ⇒ nil
Gets the default size of the window.
A value of 0 for the width or height indicates that a default size has not been explicitly set for that dimension, so the “natural” size of the window will be used.
This function is the recommended way for saving window state across restarts of applications.
#group ⇒ Gtk::WindowGroup
Returns the group for window.
If the window has no group, then the default group is returned.
#handle_menubar_accel ⇒ Boolean
Returns whether this window reacts to F10 key presses by activating a menubar it contains.
#handle_menubar_accel=(handle_menubar_accel) ⇒ Boolean
Whether the window frame should handle F10 for activating menubars.
#handle_menubar_accel? ⇒ Boolean
Whether the window frame should handle F10 for activating menubars.
#has_group ⇒ Boolean
Returns whether window has an explicit window group.
#hide_on_close ⇒ Boolean
Returns whether the window will be hidden when the close button is clicked.
#hide_on_close=(hide_on_close) ⇒ Boolean
If this window should be hidden when the users clicks the close button.
#hide_on_close? ⇒ Boolean
If this window should be hidden when the users clicks the close button.
#icon_name ⇒ String
Specifies the name of the themed icon to use as the window icon.
See [classGtk.IconTheme] for more details.
#icon_name=(icon_name) ⇒ String
Specifies the name of the themed icon to use as the window icon.
See [classGtk.IconTheme] for more details.
#is_active ⇒ Boolean
Returns whether the window is part of the current active toplevel.
The active toplevel is the window receiving keystrokes.
The return value is true if the window is active toplevel itself. You might use this function if you wanted to draw a widget differently in an active window from a widget in an inactive window.
#is_active=(is_active) ⇒ Boolean
Whether the toplevel is the currently active window.
#is_active? ⇒ Boolean
Whether the toplevel is the currently active window.
#is_fullscreen ⇒ Boolean
Retrieves the current fullscreen state of window.
Note that since fullscreening is ultimately handled by the window manager and happens asynchronously to an application request, you shouldn’t assume the return value of this function changing immediately (or at all), as an effect of calling [methodGtk.Window.fullscreen] or [methodGtk.Window.unfullscreen].
If the window isn't yet mapped, the value returned will whether the initial requested state is fullscreen.
#is_maximized ⇒ Boolean
Retrieves the current maximized state of window.
Note that since maximization is ultimately handled by the window manager and happens asynchronously to an application request, you shouldn’t assume the return value of this function changing immediately (or at all), as an effect of calling [methodGtk.Window.maximize] or [methodGtk.Window.unmaximize].
If the window isn't yet mapped, the value returned will whether the initial requested state is maximized.
#is_suspended ⇒ Boolean
Retrieves the current suspended state of window.
A window being suspended means it's currently not visible to the user, for example by being on a inactive workspace, minimized, obstructed.
#maximize ⇒ nil
Asks to maximize window, so that it fills the screen.
Note that you shouldn’t assume the window is definitely maximized afterward, because other entities (e.g. the user or window manager) could unmaximize it again, and not all window managers support maximization.
It’s permitted to call this function before showing a window, in which case the window will be maximized when it appears onscreen initially.
You can track the result of this operation via the [propertyGdk.Toplevel:state] property, or by listening to notifications on the [propertyGtk.Window:maximized] property.
#maximized=(maximized) ⇒ Boolean
Whether the window is maximized.
Setting this property is the equivalent of calling [methodGtk.Window.maximize] or [methodGtk.Window.unmaximize]; either operation is asynchronous, which means you will need to connect to the ::notify signal in order to know whether the operation was successful.
#maximized? ⇒ Boolean
Whether the window is maximized.
Setting this property is the equivalent of calling [methodGtk.Window.maximize] or [methodGtk.Window.unmaximize]; either operation is asynchronous, which means you will need to connect to the ::notify signal in order to know whether the operation was successful.
#minimize ⇒ nil
Asks to minimize the specified window.
Note that you shouldn’t assume the window is definitely minimized afterward, because the windowing system might not support this functionality; other entities (e.g. the user or the window manager) could unminimize it again, or there may not be a window manager in which case minimization isn’t possible, etc.
It’s permitted to call this function before showing a window, in which case the window will be minimized before it ever appears onscreen.
You can track result of this operation via the [propertyGdk.Toplevel:state] property.
#mnemonics_visible ⇒ Boolean
Gets whether mnemonics are supposed to be visible.
#mnemonics_visible=(mnemonics_visible) ⇒ Boolean
Whether mnemonics are currently visible in this window.
This property is maintained by GTK based on user input, and should not be set by applications.
#mnemonics_visible? ⇒ Boolean
Whether mnemonics are currently visible in this window.
This property is maintained by GTK based on user input, and should not be set by applications.
#modal ⇒ Boolean
Returns whether the window is modal.
#modal=(modal) ⇒ Boolean
If true, the window is modal.
#modal? ⇒ Boolean
If true, the window is modal.
#present ⇒ nil
Presents a window to the user.
This may mean raising the window in the stacking order, unminimizing it, moving it to the current desktop and/or giving it the keyboard focus (possibly dependent on the user’s platform, window manager and preferences).
If window is hidden, this function also makes it visible.
#present_with_time(timestamp) ⇒ nil
Presents a window to the user in response to an user interaction.
See [methodGtk.Window.present] for more details.
The timestamp should be gathered when the window was requested to be shown (when clicking a link for example), rather than once the window is ready to be shown.
#resizable ⇒ Boolean
Gets the value set by gtk_window_set_resizable().
#resizable=(resizable) ⇒ Boolean
If true, users can resize the window.
#resizable? ⇒ Boolean
If true, users can resize the window.
#set_default_size(width, height) ⇒ nil
Sets the default size of a window.
The default size of a window is the size that will be used if no other constraints apply.
The default size will be updated whenever the window is resized to reflect the new size, unless the window is forced to a size, like when it is maximized or fullscreened.
If the window’s minimum size request is larger than the default, the default will be ignored.
Setting the default size to a value <= 0 will cause it to be ignored and the natural size request will be used instead. It is possible to do this while the window is showing to "reset" it to its initial size.
Unlike [methodGtk.Widget.set_size_request], which sets a size request for a widget and thus would keep users from shrinking the window, this function only sets the initial size, just as if the user had resized the window themselves. Users can still shrink the window again as they normally would. Setting a default size of -1 means to use the “natural” default size (the size request of the window).
If you use this function to reestablish a previously saved window size, note that the appropriate size to save is the one returned by [methodGtk.Window.get_default_size]. Using the window allocation directly will not work in all circumstances and can lead to growing or shrinking windows.
#startup_id=(startup_id) ⇒ String
A write-only property for setting window's startup notification identifier.
#suspended=(suspended) ⇒ Boolean
Whether the window is suspended.
See [methodGtk.Window.is_suspended] for details about what suspended means.
#suspended? ⇒ Boolean
Whether the window is suspended.
See [methodGtk.Window.is_suspended] for details about what suspended means.
#title ⇒ String
The title of the window.
#title=(title) ⇒ String
The title of the window.
#titlebar ⇒ Gtk::Widget
The titlebar widget.
#titlebar=(titlebar) ⇒ Gtk::Widget
The titlebar widget.
#transient_for ⇒ Gtk::Window
The transient parent of the window.
#transient_for=(transient_for) ⇒ Gtk::Window
The transient parent of the window.
#unfullscreen ⇒ nil
Asks to remove the fullscreen state for window, and return to its previous state.
Note that you shouldn’t assume the window is definitely not fullscreen afterward, because other entities (e.g. the user or window manager) could fullscreen it again, and not all window managers honor requests to unfullscreen windows; normally the window will end up restored to its normal state. Just don’t write code that crashes if not.
You can track the result of this operation via the [propertyGdk.Toplevel:state] property, or by listening to notifications of the [propertyGtk.Window:fullscreened] property.
#unmaximize ⇒ nil
Asks to unmaximize window.
Note that you shouldn’t assume the window is definitely unmaximized afterward, because other entities (e.g. the user or window manager) maximize it again, and not all window managers honor requests to unmaximize.
You can track the result of this operation via the [propertyGdk.Toplevel:state] property, or by listening to notifications on the [propertyGtk.Window:maximized] property.
#unminimize ⇒ nil
Asks to unminimize the specified window.
Note that you shouldn’t assume the window is definitely unminimized afterward, because the windowing system might not support this functionality; other entities (e.g. the user or the window manager) could minimize it again, or there may not be a window manager in which case minimization isn’t possible, etc.
You can track result of this operation via the [propertyGdk.Toplevel:state] property.