Object Hierarchy:

Object hierarchy for Window


[ CCode ( type_id = "gtk_window_get_type ()" ) ]
public class Window : Bin, Implementor, Buildable

A GtkWindow is a toplevel window which can contain other widgets.

Windows normally have decorations that are under the control of the windowing system and allow the user to manipulate the window (resize it, move it, close it,...).

GtkWindow as GtkBuildable

The GtkWindow implementation of the Buildable interface supports a custom `< accel-groups>` element, which supports any number of `<group>` elements representing the AccelGroup objects you want to add to your window (synonymous with add_accel_group.

It also supports the `<initial-focus>` element, whose name property names the widget to receive the focus when the window is mapped.

An example of a UI definition fragment with accel groups:

<object class="GtkWindow">
<group name="accelgroup1"/>
<initial-focus name="thunderclap"/>


<object class="GtkAccelGroup" id="accelgroup1"/>

The GtkWindow implementation of the Buildable interface supports setting a child as the titlebar by specifying “titlebar” as the “type” attribute of a `<child>` element.

CSS nodes

├── decoration
├── <titlebar child>.titlebar [.default-decoration]
╰── <child>
main CSS node with name window and style class .background, and a subnode with name decoration.

Style classes that are typically used with the main CSS node are .csd (when client-side decorations are in use), .solid-csd (for client-side decorations without invisible borders), .ssd (used by mutter when rendering server-side decorations). GtkWindow also represents window states with the following style classes on the main node: .tiled, .maximized, .fullscreen. Specialized types of window often add their own discriminating style classes, such as .popup or .tooltip.

GtkWindow adds the .titlebar and .default-decoration style classes to the widget that is added as a titlebar child.


Namespace: Gtk
Package: gtk+-3.0



Static methods:

Creation methods:



Inherited Members:

All known members inherited from class Gtk.Bin
All known members inherited from class Gtk.Widget
All known members inherited from interface Atk.Implementor