gtk4::prelude

Trait GtkWindowExt

Source
pub trait GtkWindowExt:
    IsA<Window>
    + Sealed
    + 'static {
Show 94 methods // Provided methods fn close(&self) { ... } fn destroy(&self) { ... } fn fullscreen(&self) { ... } fn fullscreen_on_monitor(&self, monitor: &Monitor) { ... } fn application(&self) -> Option<Application> { ... } fn child(&self) -> Option<Widget> { ... } fn is_decorated(&self) -> bool { ... } fn default_size(&self) -> (i32, i32) { ... } fn default_widget(&self) -> Option<Widget> { ... } fn is_deletable(&self) -> bool { ... } fn must_destroy_with_parent(&self) -> bool { ... } fn focus(&self) -> Option<Widget> { ... } fn gets_focus_visible(&self) -> bool { ... } fn group(&self) -> WindowGroup { ... } fn is_handle_menubar_accel(&self) -> bool { ... } fn hides_on_close(&self) -> bool { ... } fn icon_name(&self) -> Option<GString> { ... } fn is_mnemonics_visible(&self) -> bool { ... } fn is_modal(&self) -> bool { ... } fn is_resizable(&self) -> bool { ... } fn title(&self) -> Option<GString> { ... } fn titlebar(&self) -> Option<Widget> { ... } fn transient_for(&self) -> Option<Window> { ... } fn has_group(&self) -> bool { ... } fn is_active(&self) -> bool { ... } fn is_fullscreen(&self) -> bool { ... } fn is_maximized(&self) -> bool { ... } fn is_suspended(&self) -> bool { ... } fn maximize(&self) { ... } fn minimize(&self) { ... } fn present(&self) { ... } fn present_with_time(&self, timestamp: u32) { ... } fn set_application(&self, application: Option<&impl IsA<Application>>) { ... } fn set_child(&self, child: Option<&impl IsA<Widget>>) { ... } fn set_decorated(&self, setting: bool) { ... } fn set_default_size(&self, width: i32, height: i32) { ... } fn set_default_widget(&self, default_widget: Option<&impl IsA<Widget>>) { ... } fn set_deletable(&self, setting: bool) { ... } fn set_destroy_with_parent(&self, setting: bool) { ... } fn set_display(&self, display: &impl IsA<Display>) { ... } fn set_focus(&self, focus: Option<&impl IsA<Widget>>) { ... } fn set_focus_visible(&self, setting: bool) { ... } fn set_handle_menubar_accel(&self, handle_menubar_accel: bool) { ... } fn set_hide_on_close(&self, setting: bool) { ... } fn set_icon_name(&self, name: Option<&str>) { ... } fn set_mnemonics_visible(&self, setting: bool) { ... } fn set_modal(&self, modal: bool) { ... } fn set_resizable(&self, resizable: bool) { ... } fn set_startup_id(&self, startup_id: &str) { ... } fn set_title(&self, title: Option<&str>) { ... } fn set_titlebar(&self, titlebar: Option<&impl IsA<Widget>>) { ... } fn set_transient_for(&self, parent: Option<&impl IsA<Window>>) { ... } fn unfullscreen(&self) { ... } fn unmaximize(&self) { ... } fn unminimize(&self) { ... } fn default_height(&self) -> i32 { ... } fn set_default_height(&self, default_height: i32) { ... } fn default_width(&self) -> i32 { ... } fn set_default_width(&self, default_width: i32) { ... } fn set_fullscreened(&self, fullscreened: bool) { ... } fn set_maximized(&self, maximized: bool) { ... } fn connect_activate_default<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn emit_activate_default(&self) { ... } fn connect_activate_focus<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn emit_activate_focus(&self) { ... } fn connect_close_request<F: Fn(&Self) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_enable_debugging<F: Fn(&Self, bool) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn emit_enable_debugging(&self, toggle: bool) -> bool { ... } fn connect_keys_changed<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_application_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_child_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_decorated_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_default_height_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_default_widget_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_default_width_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_deletable_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_destroy_with_parent_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_display_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_focus_visible_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_focus_widget_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_fullscreened_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_handle_menubar_accel_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_hide_on_close_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_icon_name_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_is_active_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_maximized_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_mnemonics_visible_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_modal_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_resizable_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_startup_id_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_suspended_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_title_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_titlebar_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_transient_for_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all Window methods.

§Implementors

AboutDialog, ApplicationWindow, Assistant, Dialog, ShortcutsWindow, Window

Provided Methods§

Source

fn close(&self)

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.

Source

fn destroy(&self)

Source

fn fullscreen(&self)

Asks to place @self 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 [state][struct@crate::Gdk::Toplevel#state] property, or by listening to notifications of the fullscreened property.

Source

fn fullscreen_on_monitor(&self, monitor: &Monitor)

Asks to place @self 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 [state][struct@crate::Gdk::Toplevel#state] property, or by listening to notifications of the fullscreened property.

§monitor

which monitor to go fullscreen on

Source

fn application(&self) -> Option<Application>

Gets the Application associated with the window.

§Returns

a Application

Source

fn child(&self) -> Option<Widget>

Gets the child widget of @self.

§Returns

the child widget of @self

Source

fn is_decorated(&self) -> bool

Returns whether the window has been set to have decorations.

§Returns

true if the window has been set to have decorations

Source

fn default_size(&self) -> (i32, i32)

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.

§Returns
§width

location to store the default width

§height

location to store the default height

Source

fn default_widget(&self) -> Option<Widget>

Returns the default widget for @self.

§Returns

the default widget

Source

fn is_deletable(&self) -> bool

Returns whether the window has been set to have a close button.

§Returns

true if the window has been set to have a close button

Source

fn must_destroy_with_parent(&self) -> bool

Returns whether the window will be destroyed with its transient parent.

§Returns

true if the window will be destroyed with its transient parent.

Source

fn focus(&self) -> Option<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.

§Returns

the currently focused widget

Source

fn gets_focus_visible(&self) -> bool

Gets whether “focus rectangles” are supposed to be visible.

§Returns

true if “focus rectangles” are supposed to be visible in this window.

Source

fn group(&self) -> WindowGroup

Returns the group for @self.

If the window has no group, then the default group is returned.

§Returns

the WindowGroup for a window or the default group

Source

fn is_handle_menubar_accel(&self) -> bool

Available on crate feature v4_2 only.

Returns whether this window reacts to F10 key presses by activating a menubar it contains.

§Returns

true if the window handles F10

Source

fn hides_on_close(&self) -> bool

Returns whether the window will be hidden when the close button is clicked.

§Returns

true if the window will be hidden

Source

fn icon_name(&self) -> Option<GString>

Returns the name of the themed icon for the window.

§Returns

the icon name

Source

fn is_mnemonics_visible(&self) -> bool

Gets whether mnemonics are supposed to be visible.

§Returns

true if mnemonics are supposed to be visible in this window.

Source

fn is_modal(&self) -> bool

Returns whether the window is modal.

§Returns

true if the window is set to be modal and establishes a grab when shown

Source

fn is_resizable(&self) -> bool

Gets the value set by gtk_window_set_resizable().

§Returns

true if the user can resize the window

Source

fn title(&self) -> Option<GString>

Retrieves the title of the window.

§Returns

the title of the window

Source

fn titlebar(&self) -> Option<Widget>

Returns the custom titlebar that has been set with gtk_window_set_titlebar().

§Returns

the custom titlebar

Source

fn transient_for(&self) -> Option<Window>

Fetches the transient parent for this window.

§Returns

the transient parent for this window

Source

fn has_group(&self) -> bool

Returns whether @self has an explicit window group.

§Returns

true if @self has an explicit window group.

Source

fn is_active(&self) -> bool

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.

§Returns

true if the window part of the current active window.

Source

fn is_fullscreen(&self) -> bool

Retrieves the current fullscreen state of @self.

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 fullscreen() or unfullscreen().

If the window isn’t yet mapped, the value returned will whether the initial requested state is fullscreen.

§Returns

whether the window has a fullscreen state.

Source

fn is_maximized(&self) -> bool

Retrieves the current maximized state of @self.

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 maximize() or unmaximize().

If the window isn’t yet mapped, the value returned will whether the initial requested state is maximized.

§Returns

whether the window has a maximized state.

Source

fn is_suspended(&self) -> bool

Available on crate feature v4_12 only.

Retrieves the current suspended state of @self.

A window being suspended means it’s currently not visible to the user, for example by being on a inactive workspace, minimized, obstructed.

§Returns

whether the window is suspended.

Source

fn maximize(&self)

Asks to maximize @self, 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 [state][struct@crate::Gdk::Toplevel#state] property, or by listening to notifications on the maximized property.

Source

fn minimize(&self)

Asks to minimize the specified @self.

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 [state][struct@crate::Gdk::Toplevel#state] property.

Source

fn present(&self)

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 @self is hidden, this function also makes it visible.

Source

fn present_with_time(&self, timestamp: u32)

👎Deprecated: Since 4.14

Presents a window to the user in response to an user interaction.

See 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.

§Deprecated since 4.14

Use gtk_window_present()

§timestamp

the timestamp of the user interaction (typically a button or key press event) which triggered this call

Source

fn set_application(&self, application: Option<&impl IsA<Application>>)

Sets or unsets the Application 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 to None.

This is equivalent to calling GtkApplicationExt::remove_window() and/or GtkApplicationExt::add_window() on the old/new applications as relevant.

§application

a Application, or None to unset

Source

fn set_child(&self, child: Option<&impl IsA<Widget>>)

Sets the child widget of @self.

§child

the child widget

Source

fn set_decorated(&self, setting: bool)

Sets whether the window should be decorated.

By default, windows are decorated with a title bar, resize controls, etc. Some window managers allow GTK to disable these decorations, creating a borderless window. If you set the decorated property to false using this function, GTK will do its best to convince the window manager not to decorate the window. Depending on the system, this function may not have any effect when called on a window that is already visible, so you should call it before calling WidgetExt::show().

On Windows, this function always works, since there’s no window manager policy involved.

§setting

true to decorate the window

Source

fn set_default_size(&self, width: i32, height: i32)

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 WidgetExt::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 default_size(). Using the window allocation directly will not work in all circumstances and can lead to growing or shrinking windows.

§width

width in pixels, or -1 to unset the default width

§height

height in pixels, or -1 to unset the default height

Source

fn set_default_widget(&self, default_widget: Option<&impl IsA<Widget>>)

Sets the default widget.

The default widget is the widget that is activated when the user presses Enter in a dialog (for example).

§default_widget

widget to be the default to unset the default widget for the toplevel

Source

fn set_deletable(&self, setting: bool)

Sets whether the window should be deletable.

By default, windows have a close button in the window frame. Some window managers allow GTK to disable this button. If you set the deletable property to false using this function, GTK will do its best to convince the window manager not to show a close button. Depending on the system, this function may not have any effect when called on a window that is already visible, so you should call it before calling WidgetExt::show().

On Windows, this function always works, since there’s no window manager policy involved.

§setting

true to decorate the window as deletable

Source

fn set_destroy_with_parent(&self, setting: bool)

If @setting is true, then destroying the transient parent of @self will also destroy @self itself.

This is useful for dialogs that shouldn’t persist beyond the lifetime of the main window they are associated with, for example.

§setting

whether to destroy @self with its transient parent

Source

fn set_display(&self, display: &impl IsA<Display>)

Sets the gdk::Display where the @self is displayed.

If the window is already mapped, it will be unmapped, and then remapped on the new display.

§display

a gdk::Display

Source

fn set_focus(&self, focus: Option<&impl IsA<Widget>>)

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 None, 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 WidgetExt::grab_focus() instead of this function.

§focus

widget to be the new focus widget, or None to unset any focus widget for the toplevel window.

Source

fn set_focus_visible(&self, setting: bool)

Sets whether “focus rectangles” are supposed to be visible.

This property is maintained by GTK based on user input, and should not be set by applications.

§setting

the new value

Source

fn set_handle_menubar_accel(&self, handle_menubar_accel: bool)

Available on crate feature v4_2 only.

Sets whether this window should react to F10 key presses by activating a menubar it contains.

§handle_menubar_accel

true to make @self handle F10

Source

fn set_hide_on_close(&self, setting: bool)

If @setting is true, then clicking the close button on the window will not destroy it, but only hide it.

§setting

whether to hide the window when it is closed

Source

fn set_icon_name(&self, name: Option<&str>)

Sets the icon for the window from a named themed icon.

See the docs for IconTheme for more details. On some platforms, the window icon is not used at all.

Note that this has nothing to do with the WM_ICON_NAME property which is mentioned in the ICCCM.

§name

the name of the themed icon

Source

fn set_mnemonics_visible(&self, setting: bool)

Sets whether mnemonics are supposed to be visible.

This property is maintained by GTK based on user input, and should not be set by applications.

§setting

the new value

Source

fn set_modal(&self, modal: bool)

Sets a window modal or non-modal.

Modal windows prevent interaction with other windows in the same application. To keep modal dialogs on top of main application windows, use set_transient_for() to make the dialog transient for the parent; most window managers will then disallow lowering the dialog below the parent.

whether the window is modal

Source

fn set_resizable(&self, resizable: bool)

Sets whether the user can resize a window.

Windows are user resizable by default.

§resizable

true if the user can resize this window

Source

fn set_startup_id(&self, startup_id: &str)

Sets the startup notification ID.

Startup notification identifiers are used by desktop environment to track application startup, to provide user feedback and other features. This function changes the corresponding property on the underlying gdk::Surface.

Normally, startup identifier is managed automatically and you should only use this function in special cases like transferring focus from other processes. You should use this function before calling present() or any equivalent function generating a window map event.

This function is only useful on X11, not with other GTK targets.

§startup_id

a string with startup-notification identifier

Source

fn set_title(&self, title: Option<&str>)

Sets the title of the Window.

The title of a window will be displayed in its title bar; on the X Window System, the title bar is rendered by the window manager so exactly how the title appears to users may vary according to a user’s exact configuration. The title should help a user distinguish this window from other windows they may have open. A good title might include the application name and current document filename, for example.

Passing None does the same as setting the title to an empty string.

§title

title of the window

Source

fn set_titlebar(&self, titlebar: Option<&impl IsA<Widget>>)

Sets a custom titlebar for @self.

A typical widget used here is HeaderBar, as it provides various features expected of a titlebar while allowing the addition of child widgets to it.

If you set a custom titlebar, GTK will do its best to convince the window manager not to put its own titlebar on the window. Depending on the system, this function may not work for a window that is already visible, so you set the titlebar before calling WidgetExt::show().

§titlebar

the widget to use as titlebar

Source

fn set_transient_for(&self, parent: Option<&impl IsA<Window>>)

Dialog windows should be set transient for the main application window they were spawned from. This allows window managers to e.g. keep the dialog on top of the main window, or center the dialog over the main window. Dialog::with_buttons() and other convenience functions in GTK will sometimes call gtk_window_set_transient_for() on your behalf.

Passing None for @parent unsets the current transient window.

On Windows, this function puts the child window on top of the parent, much as the window manager would have done on X.

§parent

parent window

Source

fn unfullscreen(&self)

Asks to remove the fullscreen state for @self, 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 [state][struct@crate::Gdk::Toplevel#state] property, or by listening to notifications of the fullscreened property.

Source

fn unmaximize(&self)

Asks to unmaximize @self.

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 [state][struct@crate::Gdk::Toplevel#state] property, or by listening to notifications on the maximized property.

Source

fn unminimize(&self)

Asks to unminimize the specified @self.

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 [state][struct@crate::Gdk::Toplevel#state] property.

Source

fn default_height(&self) -> i32

The default height of the window.

Source

fn set_default_height(&self, default_height: i32)

The default height of the window.

Source

fn default_width(&self) -> i32

The default width of the window.

Source

fn set_default_width(&self, default_width: i32)

The default width of the window.

Source

fn set_fullscreened(&self, fullscreened: bool)

Whether the window is fullscreen.

Setting this property is the equivalent of calling fullscreen() or 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.

Source

fn set_maximized(&self, maximized: bool)

Whether the window is maximized.

Setting this property is the equivalent of calling maximize() or 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.

Source

fn connect_activate_default<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Emitted when the user activates the default widget of @window.

This is a keybinding signal.

The keybindings for this signal are all forms of the Enter key.

Source

fn emit_activate_default(&self)

Source

fn connect_activate_focus<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Emitted when the user activates the currently focused widget of @window.

This is a keybinding signal.

The default binding for this signal is .

Source

fn emit_activate_focus(&self)

Source

fn connect_close_request<F: Fn(&Self) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

Emitted when the user clicks on the close button of the window.

§Returns

true to stop other handlers from being invoked for the signal

Source

fn connect_enable_debugging<F: Fn(&Self, bool) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId

Emitted when the user enables or disables interactive debugging.

When @toggle is true, interactive debugging is toggled on or off, when it is false, the debugger will be pointed at the widget under the pointer.

This is a keybinding signal.

The default bindings for this signal are Ctrl+Shift+I and Ctrl+Shift+D.

§toggle

toggle the debugger

§Returns

true if the key binding was handled

Source

fn emit_enable_debugging(&self, toggle: bool) -> bool

Source

fn connect_keys_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

👎Deprecated: Since 4.10

emitted when the set of accelerators or mnemonics that are associated with @window changes.

§Deprecated since 4.10

Use Shortcut and EventController to implement keyboard shortcuts

Source

fn connect_application_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source

fn connect_decorated_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_default_height_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_default_widget_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_default_width_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_deletable_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_destroy_with_parent_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_display_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_focus_visible_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_focus_widget_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_fullscreened_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_handle_menubar_accel_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Available on crate feature v4_2 only.
Source

fn connect_hide_on_close_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_icon_name_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_is_active_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_maximized_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_mnemonics_visible_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_modal_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source

fn connect_resizable_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_startup_id_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_suspended_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Available on crate feature v4_12 only.
Source

fn connect_title_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source

fn connect_titlebar_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Available on crate feature v4_6 only.
Source

fn connect_transient_for_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§