A window which will likely contain the rest of the application.
A window is the framework that contains the application. It
provides a context for the other widgets that make up the
As a subclass of GtkBin a window may
only have one child. To add more widgets to a window first
add a widget which can accept more than one child like a
GtkHBox or a GtkVBox.
Then add the other widgets to the child container. Trying to
add more than one child will produce a warning.
Example 156. Adding too many children.
// Create a new window.
$window = new GtkWindow();
// Add two buttons.
Gtk-WARNING **: Attempting to add a widget with type GtkButton to
a GtkWindow, but as a GtkBin subclass a GtkWindow can only
contain one widget at a time; it already contains a widget
of type GtkButton
GtkWindow is a top level widget. This
means that it may not be added as a child of another widget.
Trying to do so will produce a Gtk-WARNING.
Creates a new GtkWindow instance.
Whether or not the window is allowed to grow.
Whether or not the window is allowed to shrink.
Whether or not a window resize configuration event is currently
The number of outstanding resize configuration requests.
Whether or not the window is currently decorated.
The widget which will be activated by default.
Whether or not the window will be destroyed with its parent window.
The widget that currently has keyboard focus.
The frame window surrounding the window.
The gravity of the window.
Whether or not the window is modal.
The title of the window.
The window's type.
A hint describing the window's type.
Emitted when an event other than key-press, key-release, or a change in
focus occurs on the window's frame.
Emitted when a mnemonic accelerator is added, removed or changed or the
mnemonic modifier is set.
Emitted when the user changes the window's focus widget.
Emitted when the window's focus widget is changed.