esize-grip-visible.html) [ role
](property.Window.role.html) [ screen ](property.Window.screen.html) [ skip-
pager-hint ](property.Window.skip-pager-hint.html) [ skip-taskbar-hint
](property.Window.skip-taskbar-hint.html) [ startup-id
](property.Window.startup-id.html) [ title ](property.Window.title.html) [
transient-for ](property.Window.transient-for.html) [ type
](property.Window.type.html) [ type-hint ](property.Window.type-hint.html) [
urgency-hint ](property.Window.urgency-hint.html) [ window-position
](property.Window.window-position.html)

#####  Signals

[ activate-default ](signal.Window.activate-default.html) [ activate-focus
](signal.Window.activate-focus.html) [ enable-debugging
](signal.Window.enable-debugging.html) [ keys-changed ](signal.Window.keys-
changed.html) [ set-focus ](signal.Window.set-focus.html)

#####  Virtual methods

[ activate_default ](vfunc.Window.activate_default.html) [ activate_focus
](vfunc.Window.activate_focus.html) [ enable_debugging
](vfunc.Window.enable_debugging.html) [ keys_changed
](vfunc.Window.keys_changed.html) [ set_focus ](vfunc.Window.set_focus.html)

Generated by [ gi-docgen ](https://gitlab.gnome.org/GNOME/gi-docgen) 2023.4

###  Class

#  [ Gtk ](index.html) Window

####  Description  [ [src]
](https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/gtkwindow.c#L88 "go
to source location")

    
    
    class Gtk.Window : Gtk.Bin
      implements Atk.ImplementorIface, Gtk.Buildable {
      priv: GtkWindowPrivate*
    }

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 ` GtkBuildable ` interface supports a
custom ` <accel-groups> ` element, which supports any number of ` <group> `
elements representing the ` GtkAccelGroup ` objects you want to add to your
window (synonymous with gtk_window_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">
      <accel-groups>
        <group name="accelgroup1"/>
      </accel-groups>
      <initial-focus name="thunderclap"/>
    </object>
    
    ...
    
    <object class="GtkAccelGroup" id="accelgroup1"/>
    

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

#  CSS nodes

    
    
    window.background
    ├── decoration
    ├── <titlebar child>.titlebar [.default-decoration]
    ╰── <child>
    

GtkWindow has a 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.

####  Hierarchy

hierarchy  this  GtkWindow  implements_0  AtkImplementorIface  this--
implements_0  implements_1  GtkBuildable  this--implements_1  ancestor_0
GtkBin  ancestor_0--this  ancestor_1  GtkContainer  ancestor_1--ancestor_0
ancestor_2  GtkWidget  ancestor_2--ancestor_1  ancestor_3  GInitiallyUnowned
ancestor_3--ancestor_2  ancestor_4  GObject  ancestor_4--ancestor_3

####  Ancestors

  * [ GtkBin ](class.Bin.html "Bin")
  * [ GtkContainer ](class.Container.html "