Trait gtk4::prelude::GtkWindowExt
source · pub trait GtkWindowExt: 'static {
Show 93 methods
// Required 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 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 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_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 focus_widget(&self) -> Option<Widget>;
fn set_focus_widget<P: IsA<Widget>>(&self, focus_widget: Option<&P>);
fn is_fullscreened(&self) -> bool;
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) -> Inhibit + '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_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;
}
Required 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 gets_focus_visible(&self) -> bool
fn group(&self) -> WindowGroup
Available on crate feature
v4_2
only.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 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_visible(&self, setting: bool)
Available on crate feature
v4_2
only.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 focus_widget(&self) -> Option<Widget>
fn set_focus_widget<P: IsA<Widget>>(&self, focus_widget: Option<&P>)
fn is_fullscreened(&self) -> bool
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) -> Inhibit + '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
Available on crate feature
v4_2
only.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_title_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
sourcefn connect_titlebar_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_titlebar_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId
Available on crate feature
v4_6
only.