Gtk.Widget
const Gtk = imports.gi.Gtk; let widget = new Gtk.Widget({ app_paintable: value, can_default: value, can_focus: value, double_buffered: value, events: value, expand: value, halign: value, has_default: value, has_focus: value, has_tooltip: value, height_request: value, hexpand: value, hexpand_set: value, is_focus: value, margin: value, margin_bottom: value, margin_left: value, margin_right: value, margin_top: value, name: value, no_show_all: value, opacity: value, parent: value, receives_default: value, sensitive: value, style: value, tooltip_markup: value, tooltip_text: value, valign: value, vexpand: value, vexpand_set: value, visible: value, width_request: value, });
GtkWidget is the base class all widgets in GTK+ derive from. It manages the widget lifecycle, states and style.
<refsect2 id="geometry-management"> <title>Height-for-width Geometry Management</title> <para> GTK+ uses a height-for-width (and width-for-height) geometry management system. Height-for-width means that a widget can change how much vertical space it needs, depending on the amount of horizontal space that it is given (and similar for width-for-height). The most common example is a label that reflows to fill up the available width, wraps to fewer lines, and therefore needs less height.
Height-for-width geometry management is implemented in GTK+ by way of five virtual methods: <itemizedlist> <listitem>Gtk.WidgetClass.get_request_mode()</listitem> <listitem>Gtk.WidgetClass.get_preferred_width()</listitem> <listitem>Gtk.WidgetClass.get_preferred_height()</listitem> <listitem>Gtk.WidgetClass.get_preferred_height_for_width()</listitem> <listitem>Gtk.WidgetClass.get_preferred_width_for_height()</listitem> </itemizedlist>
There are some important things to keep in mind when implementing height-for-width and when using it in container implementations.
The geometry management system will query a widget hierarchy in only one orientation at a time. When widgets are initially queried for their minimum sizes it is generally done in two initial passes in the Gtk.SizeRequestMode chosen by the toplevel.
For example, when queried in the normal Gtk.SizeRequestMode.height_for_width mode: First, the default minimum and natural width for each widget in the interface will be computed using Gtk.get_preferred_width. Because the preferred widths for each container depend on the preferred widths of their children, this information propagates up the hierarchy, and finally a minimum and natural width is determined for the entire toplevel. Next, the toplevel will use the minimum width to query for the minimum height contextual to that width using Gtk.get_preferred_height_for_width, which will also be a highly recursive operation. The minimum height for the minimum width is normally used to set the minimum size constraint on the toplevel (unless Gtk.set_geometry_hints is explicitly used instead).
After the toplevel window has initially requested its size in both dimensions it can go on to allocate itself a reasonable size (or a size previously specified with Gtk.set_default_size). During the recursive allocation process it's important to note that request cycles will be recursively executed while container widgets allocate their children. Each container widget, once allocated a size, will go on to first share the space in one orientation among its children and then request each child's height for its target allocated width or its width for allocated height, depending. In this way a Gtk.Widget will typically be requested its size a number of times before actually being allocated a size. The size a widget is finally allocated can of course differ from the size it has requested. For this reason, Gtk.Widget caches a small number of results to avoid re-querying for the same sizes in one allocation cycle.
See <link linkend="container-geometry-management">GtkContainer's geometry management section</link> to learn more about how height-for-width allocations are performed by container widgets.
If a widget does move content around to intelligently use up the allocated size then it must support the request in both #GtkSizeRequestModes even if the widget in question only trades sizes in a single orientation.
For instance, a Gtk.Label that does height-for-width word wrapping will not expect to have Gtk.WidgetClass.get_preferred_height() called because that call is specific to a width-for-height request. In this case the label must return the height required for its own minimum possible width. By following this rule any widget that handles height-for-width or width-for-height requests will always be allocated at least enough space to fit its own content.
Here are some examples of how a Gtk.SizeRequestMode.height_for_width widget generally deals with width-for-height requests, for Gtk.WidgetClass.get_preferred_height() it will do: <programlisting><![CDATA[ static void foo_widget_get_preferred_height (GtkWidget *widget, gint *min_height, gint *nat_height) { if (i_am_in_height_for_width_mode) { gint min_width;
GTK_WIDGET_GET_CLASS (widget)->get_preferred_width (widget, &min_width, NULL); GTK_WIDGET_GET_CLASS (widget)->get_preferred_height_for_width (widget, min_width, min_height, nat_height); } else { ... some widgets do both. For instance, if a GtkLabel is rotated to 90 degrees it will return the minimum and natural height for the rotated label here. } } ]]></programlisting>
And in Gtk.WidgetClass.get_preferred_width_for_height() it will simply return the minimum and natural width:
<programlisting><![CDATA[ static void foo_widget_get_preferred_width_for_height (GtkWidget *widget, gint for_height, gint *min_width, gint *nat_width) { if (i_am_in_height_for_width_mode) { GTK_WIDGET_GET_CLASS (widget)->get_preferred_width (widget, min_width, nat_width); } else { ... again if a widget is sometimes operating in width-for-height mode (like a rotated GtkLabel) it can go ahead and do its real width for height calculation here. } } ]]></programlisting>
Often a widget needs to get its own request during size request or allocation. For example, when computing height it may need to also compute width. Or when deciding how to use an allocation, the widget may need to know its natural size. In these cases, the widget should be careful to call its virtual methods directly, like this: <example> <title>Widget calling its own size request method.</title> <programlisting> GTK_WIDGET_GET_CLASS(widget)->get_preferred_width (widget), &min, &natural); </programlisting> </example>
It will not work to use the wrapper functions, such as Gtk.get_preferred_width inside your own size request implementation. These return a request adjusted by Gtk.SizeGroup and by the Gtk.WidgetClass.adjust_size_request() virtual method. If a widget used the wrappers inside its virtual method implementations, then the adjustments (such as widget margins) would be applied twice. GTK+ therefore does not allow this and will warn if you try to do it.
Of course if you are getting the size request for <emphasis>another</emphasis> widget, such as a child of a container, you <emphasis>must</emphasis> use the wrapper APIs. Otherwise, you would not properly consider widget margins, Gtk.SizeGroup, and so forth. </para> </refsect2> <refsect2 id="style-properties"> <title>Style Properties</title> <para> <structname>GtkWidget</structname> introduces <firstterm>style properties</firstterm> - these are basically object properties that are stored not on the object, but in the style object associated to the widget. Style properties are set in <link linkend="gtk-Resource-Files">resource files</link>. This mechanism is used for configuring such things as the location of the scrollbar arrows through the theme, giving theme authors more control over the look of applications without the need to write a theme engine in C. </para> <para> Use Gtk.install_style_property to install style properties for a widget class, Gtk.find_style_property or Gtk.list_style_properties to get information about existing style properties and Gtk.style_get_property, Gtk.style_get or Gtk.style_get_valist to obtain the value of a style property. </para> </refsect2> <refsect2 id="GtkWidget-BUILDER-UI"> <title>GtkWidget as GtkBuildable</title> <para> The GtkWidget implementation of the GtkBuildable interface supports a custom <accelerator> element, which has attributes named key, modifiers and signal and allows to specify accelerators. </para> <example> <title>A UI definition fragment specifying an accelerator</title> <programlisting><![CDATA[ <object class="GtkButton"> <accelerator key="q" modifiers="GDK_CONTROL_MASK" signal="clicked"/> </object> ]]></programlisting> </example> <para> In addition to accelerators, <structname>GtkWidget</structname> also support a custom <accessible> element, which supports actions and relations. Properties on the accessible implementation of an object can be set by accessing the internal child "accessible" of a <structname>GtkWidget</structname>. </para> <example> <title>A UI definition fragment specifying an accessible</title> <programlisting><![CDATA[ <object class="GtkButton" id="label1"/> <property name="label">I am a Label for a Button</property> </object> <object class="GtkButton" id="button1"> <accessibility> <action action_name="click" translatable="yes">Click the button.</action> <relation target="label1" type="labelled-by"/> </accessibility> <child internal-child="accessible"> <object class="AtkObject" id="a11y-button1"> <property name="accessible-name">Clickable Button</property> </object> </child> </object> ]]></programlisting> </example> <para> Finally, GtkWidget allows style information such as style classes to be associated with widgets, using the custom <style> element: <example> <title>A UI definition fragment specifying an style class</title> <programlisting><![CDATA[ <object class="GtkButton" id="button1"> <style> <class name="my-special-button-class"/> <class name="dark-button"/> </style> </object> ]]></programlisting> </example> </para> </refsect2>
Hierarchy
-
GObject.Object
-
GObject.InitiallyUnowned
- Gtk.Widget
-
Methods
- Gtk.Widget.prototype.activate
- Gtk.Widget.prototype.add_accelerator
- Gtk.Widget.prototype.add_device_events
- Gtk.Widget.prototype.add_events
- Gtk.Widget.prototype.add_mnemonic_label
- Gtk.Widget.prototype.add_tick_callback
- Gtk.Widget.prototype.can_activate_accel
- Gtk.Widget.prototype.child_focus
- Gtk.Widget.prototype.child_notify
- Gtk.Widget.prototype.class_path
- Gtk.Widget.prototype.compute_expand
- Gtk.Widget.prototype.create_pango_context
- Gtk.Widget.prototype.create_pango_layout
- Gtk.Widget.prototype.destroy
- Gtk.Widget.prototype.destroyed
- Gtk.Widget.prototype.device_is_shadowed
- Gtk.Widget.prototype.drag_begin
- Gtk.Widget.prototype.drag_check_threshold
- Gtk.Widget.prototype.drag_dest_add_image_targets
- Gtk.Widget.prototype.drag_dest_add_text_targets
- Gtk.Widget.prototype.drag_dest_add_uri_targets
- Gtk.Widget.prototype.drag_dest_find_target
- Gtk.Widget.prototype.drag_dest_get_target_list
- Gtk.Widget.prototype.drag_dest_get_track_motion
- Gtk.Widget.prototype.drag_dest_set
- Gtk.Widget.prototype.drag_dest_set_proxy
- Gtk.Widget.prototype.drag_dest_set_target_list
- Gtk.Widget.prototype.drag_dest_set_track_motion
- Gtk.Widget.prototype.drag_dest_unset
- Gtk.Widget.prototype.drag_get_data
- Gtk.Widget.prototype.drag_highlight
- Gtk.Widget.prototype.drag_source_add_image_targets
- Gtk.Widget.prototype.drag_source_add_text_targets
- Gtk.Widget.prototype.drag_source_add_uri_targets
- Gtk.Widget.prototype.drag_source_get_target_list
- Gtk.Widget.prototype.drag_source_set
- Gtk.Widget.prototype.drag_source_set_icon_gicon
- Gtk.Widget.prototype.drag_source_set_icon_name
- Gtk.Widget.prototype.drag_source_set_icon_pixbuf
- Gtk.Widget.prototype.drag_source_set_icon_stock
- Gtk.Widget.prototype.drag_source_set_target_list
- Gtk.Widget.prototype.drag_source_unset
- Gtk.Widget.prototype.drag_unhighlight
- Gtk.Widget.prototype.draw
- Gtk.Widget.prototype.ensure_style
- Gtk.Widget.prototype.error_bell
- Gtk.Widget.prototype.event
- Gtk.Widget.prototype.freeze_child_notify
- Gtk.Widget.prototype.get_accessible
- Gtk.Widget.prototype.get_allocated_height
- Gtk.Widget.prototype.get_allocated_width
- Gtk.Widget.prototype.get_allocation
- Gtk.Widget.prototype.get_ancestor
- Gtk.Widget.prototype.get_app_paintable
- Gtk.Widget.prototype.get_can_default
- Gtk.Widget.prototype.get_can_focus
- Gtk.Widget.prototype.get_child_requisition
- Gtk.Widget.prototype.get_child_visible
- Gtk.Widget.prototype.get_clipboard
- Gtk.Widget.prototype.get_composite_name
- Gtk.Widget.prototype.get_device_enabled
- Gtk.Widget.prototype.get_device_events
- Gtk.Widget.prototype.get_direction
- Gtk.Widget.prototype.get_display
- Gtk.Widget.prototype.get_double_buffered
- Gtk.Widget.prototype.get_events
- Gtk.Widget.prototype.get_frame_clock
- Gtk.Widget.prototype.get_halign
- Gtk.Widget.prototype.get_has_tooltip
- Gtk.Widget.prototype.get_has_window
- Gtk.Widget.prototype.get_hexpand
- Gtk.Widget.prototype.get_hexpand_set
- Gtk.Widget.prototype.get_mapped
- Gtk.Widget.prototype.get_margin_bottom
- Gtk.Widget.prototype.get_margin_left
- Gtk.Widget.prototype.get_margin_right
- Gtk.Widget.prototype.get_margin_top
- Gtk.Widget.prototype.get_modifier_mask
- Gtk.Widget.prototype.get_modifier_style
- Gtk.Widget.prototype.get_name
- Gtk.Widget.prototype.get_no_show_all
- Gtk.Widget.prototype.get_opacity
- Gtk.Widget.prototype.get_pango_context
- Gtk.Widget.prototype.get_parent
- Gtk.Widget.prototype.get_parent_window
- Gtk.Widget.prototype.get_path
- Gtk.Widget.prototype.get_pointer
- Gtk.Widget.prototype.get_preferred_height
- Gtk.Widget.prototype.get_preferred_height_for_width
- Gtk.Widget.prototype.get_preferred_size
- Gtk.Widget.prototype.get_preferred_width
- Gtk.Widget.prototype.get_preferred_width_for_height
- Gtk.Widget.prototype.get_realized
- Gtk.Widget.prototype.get_receives_default
- Gtk.Widget.prototype.get_request_mode
- Gtk.Widget.prototype.get_requisition
- Gtk.Widget.prototype.get_root_window
- Gtk.Widget.prototype.get_screen
- Gtk.Widget.prototype.get_sensitive
- Gtk.Widget.prototype.get_settings
- Gtk.Widget.prototype.get_size_request
- Gtk.Widget.prototype.get_state
- Gtk.Widget.prototype.get_state_flags
- Gtk.Widget.prototype.get_style
- Gtk.Widget.prototype.get_style_context
- Gtk.Widget.prototype.get_support_multidevice
- Gtk.Widget.prototype.get_tooltip_markup
- Gtk.Widget.prototype.get_tooltip_text
- Gtk.Widget.prototype.get_tooltip_window
- Gtk.Widget.prototype.get_toplevel
- Gtk.Widget.prototype.get_valign
- Gtk.Widget.prototype.get_vexpand
- Gtk.Widget.prototype.get_vexpand_set
- Gtk.Widget.prototype.get_visible
- Gtk.Widget.prototype.get_visual
- Gtk.Widget.prototype.get_window
- Gtk.Widget.prototype.grab_add
- Gtk.Widget.prototype.grab_default
- Gtk.Widget.prototype.grab_focus
- Gtk.Widget.prototype.grab_remove
- Gtk.Widget.prototype.has_default
- Gtk.Widget.prototype.has_focus
- Gtk.Widget.prototype.has_grab
- Gtk.Widget.prototype.has_rc_style
- Gtk.Widget.prototype.has_screen
- Gtk.Widget.prototype.has_visible_focus
- Gtk.Widget.prototype.hide
- Gtk.Widget.prototype.hide_on_delete
- Gtk.Widget.prototype.in_destruction
- Gtk.Widget.prototype.input_shape_combine_region
- Gtk.Widget.prototype.insert_action_group
- Gtk.Widget.prototype.intersect
- Gtk.Widget.prototype.is_ancestor
- Gtk.Widget.prototype.is_composited
- Gtk.Widget.prototype.is_drawable
- Gtk.Widget.prototype.is_focus
- Gtk.Widget.prototype.is_sensitive
- Gtk.Widget.prototype.is_toplevel
- Gtk.Widget.prototype.is_visible
- Gtk.Widget.prototype.keynav_failed
- Gtk.Widget.prototype.list_accel_closures
- Gtk.Widget.prototype.list_mnemonic_labels
- Gtk.Widget.prototype.map
- Gtk.Widget.prototype.mnemonic_activate
- Gtk.Widget.prototype.modify_base
- Gtk.Widget.prototype.modify_bg
- Gtk.Widget.prototype.modify_cursor
- Gtk.Widget.prototype.modify_fg
- Gtk.Widget.prototype.modify_font
- Gtk.Widget.prototype.modify_style
- Gtk.Widget.prototype.modify_text
- Gtk.Widget.prototype.override_background_color
- Gtk.Widget.prototype.override_color
- Gtk.Widget.prototype.override_cursor
- Gtk.Widget.prototype.override_font
- Gtk.Widget.prototype.override_symbolic_color
- Gtk.Widget.prototype.path
- Gtk.Widget.prototype.queue_compute_expand
- Gtk.Widget.prototype.queue_draw
- Gtk.Widget.prototype.queue_draw_area
- Gtk.Widget.prototype.queue_draw_region
- Gtk.Widget.prototype.queue_resize
- Gtk.Widget.prototype.queue_resize_no_redraw
- Gtk.Widget.prototype.realize
- Gtk.Widget.prototype.region_intersect
- Gtk.Widget.prototype.register_window
- Gtk.Widget.prototype.remove_accelerator
- Gtk.Widget.prototype.remove_mnemonic_label
- Gtk.Widget.prototype.remove_tick_callback
- Gtk.Widget.prototype.render_icon
- Gtk.Widget.prototype.render_icon_pixbuf
- Gtk.Widget.prototype.reparent
- Gtk.Widget.prototype.reset_rc_styles
- Gtk.Widget.prototype.reset_style
- Gtk.Widget.prototype.send_expose
- Gtk.Widget.prototype.send_focus_change
- Gtk.Widget.prototype.set_accel_path
- Gtk.Widget.prototype.set_allocation
- Gtk.Widget.prototype.set_app_paintable
- Gtk.Widget.prototype.set_can_default
- Gtk.Widget.prototype.set_can_focus
- Gtk.Widget.prototype.set_child_visible
- Gtk.Widget.prototype.set_composite_name
- Gtk.Widget.prototype.set_device_enabled
- Gtk.Widget.prototype.set_device_events
- Gtk.Widget.prototype.set_direction
- Gtk.Widget.prototype.set_double_buffered
- Gtk.Widget.prototype.set_events
- Gtk.Widget.prototype.set_halign
- Gtk.Widget.prototype.set_has_tooltip
- Gtk.Widget.prototype.set_has_window
- Gtk.Widget.prototype.set_hexpand
- Gtk.Widget.prototype.set_hexpand_set
- Gtk.Widget.prototype.set_mapped
- Gtk.Widget.prototype.set_margin_bottom
- Gtk.Widget.prototype.set_margin_left
- Gtk.Widget.prototype.set_margin_right
- Gtk.Widget.prototype.set_margin_top
- Gtk.Widget.prototype.set_name
- Gtk.Widget.prototype.set_no_show_all
- Gtk.Widget.prototype.set_opacity
- Gtk.Widget.prototype.set_parent
- Gtk.Widget.prototype.set_parent_window
- Gtk.Widget.prototype.set_realized
- Gtk.Widget.prototype.set_receives_default
- Gtk.Widget.prototype.set_redraw_on_allocate
- Gtk.Widget.prototype.set_sensitive
- Gtk.Widget.prototype.set_size_request
- Gtk.Widget.prototype.set_state
- Gtk.Widget.prototype.set_state_flags
- Gtk.Widget.prototype.set_style
- Gtk.Widget.prototype.set_support_multidevice
- Gtk.Widget.prototype.set_tooltip_markup
- Gtk.Widget.prototype.set_tooltip_text
- Gtk.Widget.prototype.set_tooltip_window
- Gtk.Widget.prototype.set_valign
- Gtk.Widget.prototype.set_vexpand
- Gtk.Widget.prototype.set_vexpand_set
- Gtk.Widget.prototype.set_visible
- Gtk.Widget.prototype.set_visual
- Gtk.Widget.prototype.set_window
- Gtk.Widget.prototype.shape_combine_region
- Gtk.Widget.prototype.show
- Gtk.Widget.prototype.show_all
- Gtk.Widget.prototype.show_now
- Gtk.Widget.prototype.size_allocate
- Gtk.Widget.prototype.size_request
- Gtk.Widget.prototype.style_attach
- Gtk.Widget.prototype.style_get_property
- Gtk.Widget.prototype.thaw_child_notify
- Gtk.Widget.prototype.translate_coordinates
- Gtk.Widget.prototype.trigger_tooltip_query
- Gtk.Widget.prototype.unmap
- Gtk.Widget.prototype.unparent
- Gtk.Widget.prototype.unrealize
- Gtk.Widget.prototype.unregister_window
- Gtk.Widget.prototype.unset_state_flags
Properties
- app-paintable
- can-default
- can-focus
- composite-child
- double-buffered
- events
- expand
- halign
- has-default
- has-focus
- has-tooltip
- height-request
- hexpand
- hexpand-set
- is-focus
- margin
- margin-bottom
- margin-left
- margin-right
- margin-top
- name
- no-show-all
- opacity
- parent
- receives-default
- sensitive
- style
- tooltip-markup
- tooltip-text
- valign
- vexpand
- vexpand-set
- visible
- width-request
- window
Signals
- accel-closures-changed
- button-press-event
- button-release-event
- can-activate-accel
- child-notify
- composited-changed
- configure-event
- damage-event
- delete-event
- destroy
- destroy-event
- direction-changed
- drag-begin
- drag-data-delete
- drag-data-get
- drag-data-received
- drag-drop
- drag-end
- drag-failed
- drag-leave
- drag-motion
- draw
- enter-notify-event
- event
- event-after
- focus
- focus-in-event
- focus-out-event
- grab-broken-event
- grab-focus
- grab-notify
- hide
- hierarchy-changed
- key-press-event
- key-release-event
- keynav-failed
- leave-notify-event
- map
- map-event
- mnemonic-activate
- motion-notify-event
- move-focus
- parent-set
- popup-menu
- property-notify-event
- proximity-in-event
- proximity-out-event
- query-tooltip
- realize
- screen-changed
- scroll-event
- selection-clear-event
- selection-get
- selection-notify-event
- selection-received
- selection-request-event
- show
- show-help
- size-allocate
- state-changed
- state-flags-changed
- style-set
- style-updated
- touch-event
- unmap
- unmap-event
- unrealize
- visibility-notify-event
- window-state-event
Virtual functions
- Gtk.Widget::adjust_size_allocation
- Gtk.Widget::adjust_size_request
- Gtk.Widget::button_press_event
- Gtk.Widget::button_release_event
- Gtk.Widget::can_activate_accel
- Gtk.Widget::child_notify
- Gtk.Widget::composited_changed
- Gtk.Widget::compute_expand
- Gtk.Widget::configure_event
- Gtk.Widget::damage_event
- Gtk.Widget::delete_event
- Gtk.Widget::destroy_event
- Gtk.Widget::direction_changed
- Gtk.Widget::dispatch_child_properties_changed
- Gtk.Widget::drag_begin
- Gtk.Widget::drag_data_delete
- Gtk.Widget::drag_data_get
- Gtk.Widget::drag_data_received
- Gtk.Widget::drag_drop
- Gtk.Widget::drag_end
- Gtk.Widget::drag_failed
- Gtk.Widget::drag_leave
- Gtk.Widget::drag_motion
- Gtk.Widget::enter_notify_event
- Gtk.Widget::focus_in_event
- Gtk.Widget::focus_out_event
- Gtk.Widget::get_accessible
- Gtk.Widget::get_preferred_height
- Gtk.Widget::get_preferred_height_for_width
- Gtk.Widget::get_preferred_width
- Gtk.Widget::get_preferred_width_for_height
- Gtk.Widget::get_request_mode
- Gtk.Widget::grab_broken_event
- Gtk.Widget::grab_focus
- Gtk.Widget::grab_notify
- Gtk.Widget::hierarchy_changed
- Gtk.Widget::key_press_event
- Gtk.Widget::key_release_event
- Gtk.Widget::keynav_failed
- Gtk.Widget::leave_notify_event
- Gtk.Widget::map_event
- Gtk.Widget::mnemonic_activate
- Gtk.Widget::motion_notify_event
- Gtk.Widget::move_focus
- Gtk.Widget::parent_set
- Gtk.Widget::popup_menu
- Gtk.Widget::property_notify_event
- Gtk.Widget::proximity_in_event
- Gtk.Widget::proximity_out_event
- Gtk.Widget::query_tooltip
- Gtk.Widget::screen_changed
- Gtk.Widget::scroll_event
- Gtk.Widget::selection_clear_event
- Gtk.Widget::selection_get
- Gtk.Widget::selection_notify_event
- Gtk.Widget::selection_received
- Gtk.Widget::selection_request_event
- Gtk.Widget::show_all
- Gtk.Widget::show_help
- Gtk.Widget::size_allocate
- Gtk.Widget::state_changed
- Gtk.Widget::state_flags_changed
- Gtk.Widget::style_set
- Gtk.Widget::style_updated
- Gtk.Widget::touch_event
- Gtk.Widget::unmap_event
- Gtk.Widget::visibility_notify_event
- Gtk.Widget::window_state_event