<refentry id="GtkWindow">
<refmeta>
<refentrytitle>GtkWindow</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GtkWindow</refname><refpurpose></refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

#include &lt;gtk/gtk.h&gt;


struct      <link linkend="GtkWindow-struct">GtkWindow</link>;
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gtk-window-new">gtk_window_new</link>                  (<link linkend="GtkWindowType">GtkWindowType</link> type);
void        <link linkend="gtk-window-set-title">gtk_window_set_title</link>            (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             const <link linkend="gchar">gchar</link> *title);
void        <link linkend="gtk-window-set-wmclass">gtk_window_set_wmclass</link>          (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             const <link linkend="gchar">gchar</link> *wmclass_name,
                                             const <link linkend="gchar">gchar</link> *wmclass_class);
void        <link linkend="gtk-window-set-policy">gtk_window_set_policy</link>           (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> allow_shrink,
                                             <link linkend="gint">gint</link> allow_grow,
                                             <link linkend="gint">gint</link> auto_shrink);
void        <link linkend="gtk-window-set-resizable">gtk_window_set_resizable</link>        (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gboolean">gboolean</link> resizable);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-window-get-resizable">gtk_window_get_resizable</link>        (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-window-add-accel-group">gtk_window_add_accel_group</link>      (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group);
void        <link linkend="gtk-window-remove-accel-group">gtk_window_remove_accel_group</link>   (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group);
#define     <link linkend="gtk-window-position">gtk_window_position</link>
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-window-activate-focus">gtk_window_activate_focus</link>       (<link linkend="GtkWindow">GtkWindow</link> *window);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-window-activate-default">gtk_window_activate_default</link>     (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-window-set-modal">gtk_window_set_modal</link>            (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gboolean">gboolean</link> modal);
void        <link linkend="gtk-window-set-default-size">gtk_window_set_default_size</link>     (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> width,
                                             <link linkend="gint">gint</link> height);
void        <link linkend="gtk-window-set-geometry-hints">gtk_window_set_geometry_hints</link>   (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GtkWidget">GtkWidget</link> *geometry_widget,
                                             <link linkend="GdkGeometry">GdkGeometry</link> *geometry,
                                             <link linkend="GdkWindowHints">GdkWindowHints</link> geom_mask);
void        <link linkend="gtk-window-set-gravity">gtk_window_set_gravity</link>          (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GdkGravity">GdkGravity</link> gravity);
<link linkend="GdkGravity">GdkGravity</link>  <link linkend="gtk-window-get-gravity">gtk_window_get_gravity</link>          (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-window-set-position">gtk_window_set_position</link>         (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GtkWindowPosition">GtkWindowPosition</link> position);
void        <link linkend="gtk-window-set-transient-for">gtk_window_set_transient_for</link>    (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GtkWindow">GtkWindow</link> *parent);
void        <link linkend="gtk-window-set-destroy-with-parent">gtk_window_set_destroy_with_parent</link>
                                            (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gboolean">gboolean</link> setting);
<link linkend="GList">GList</link>*      <link linkend="gtk-window-list-toplevels">gtk_window_list_toplevels</link>       (void);
void        <link linkend="gtk-window-add-mnemonic">gtk_window_add_mnemonic</link>         (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="guint">guint</link> keyval,
                                             <link linkend="GtkWidget">GtkWidget</link> *target);
void        <link linkend="gtk-window-remove-mnemonic">gtk_window_remove_mnemonic</link>      (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="guint">guint</link> keyval,
                                             <link linkend="GtkWidget">GtkWidget</link> *target);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-window-mnemonic-activate">gtk_window_mnemonic_activate</link>    (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="guint">guint</link> keyval,
                                             <link linkend="GdkModifierType">GdkModifierType</link> modifier);
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gtk-window-get-focus">gtk_window_get_focus</link>            (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-window-set-focus">gtk_window_set_focus</link>            (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GtkWidget">GtkWidget</link> *focus);
void        <link linkend="gtk-window-set-default">gtk_window_set_default</link>          (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GtkWidget">GtkWidget</link> *default_widget);
void        <link linkend="gtk-window-present">gtk_window_present</link>              (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-window-iconify">gtk_window_iconify</link>              (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-window-deiconify">gtk_window_deiconify</link>            (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-window-stick">gtk_window_stick</link>                (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-window-unstick">gtk_window_unstick</link>              (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-window-maximize">gtk_window_maximize</link>             (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-window-unmaximize">gtk_window_unmaximize</link>           (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-window-begin-resize-drag">gtk_window_begin_resize_drag</link>    (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GdkWindowEdge">GdkWindowEdge</link> edge,
                                             <link linkend="gint">gint</link> button,
                                             <link linkend="gint">gint</link> root_x,
                                             <link linkend="gint">gint</link> root_y,
                                             <link linkend="guint32">guint32</link> timestamp);
void        <link linkend="gtk-window-begin-move-drag">gtk_window_begin_move_drag</link>      (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> button,
                                             <link linkend="gint">gint</link> root_x,
                                             <link linkend="gint">gint</link> root_y,
                                             <link linkend="guint32">guint32</link> timestamp);
void        <link linkend="gtk-window-set-decorated">gtk_window_set_decorated</link>        (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gboolean">gboolean</link> setting);
void        <link linkend="gtk-window-set-frame-dimensions">gtk_window_set_frame_dimensions</link> (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> left,
                                             <link linkend="gint">gint</link> top,
                                             <link linkend="gint">gint</link> right,
                                             <link linkend="gint">gint</link> bottom);
void        <link linkend="gtk-window-set-has-frame">gtk_window_set_has_frame</link>        (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gboolean">gboolean</link> setting);
void        <link linkend="gtk-window-set-mnemonic-modifier">gtk_window_set_mnemonic_modifier</link>
                                            (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GdkModifierType">GdkModifierType</link> modifier);
void        <link linkend="gtk-window-set-role">gtk_window_set_role</link>             (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             const <link linkend="gchar">gchar</link> *role);
void        <link linkend="gtk-window-set-type-hint">gtk_window_set_type_hint</link>        (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GdkWindowTypeHint">GdkWindowTypeHint</link> hint);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-window-get-decorated">gtk_window_get_decorated</link>        (<link linkend="GtkWindow">GtkWindow</link> *window);
<link linkend="GList">GList</link>*      <link linkend="gtk-window-get-default-icon-list">gtk_window_get_default_icon_list</link>
                                            (void);
void        <link linkend="gtk-window-get-default-size">gtk_window_get_default_size</link>     (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> *width,
                                             <link linkend="gint">gint</link> *height);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-window-get-destroy-with-parent">gtk_window_get_destroy_with_parent</link>
                                            (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-window-get-frame-dimensions">gtk_window_get_frame_dimensions</link> (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> *left,
                                             <link linkend="gint">gint</link> *top,
                                             <link linkend="gint">gint</link> *right,
                                             <link linkend="gint">gint</link> *bottom);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-window-get-has-frame">gtk_window_get_has_frame</link>        (<link linkend="GtkWindow">GtkWindow</link> *window);
<link linkend="GdkPixbuf">GdkPixbuf</link>*  <link linkend="gtk-window-get-icon">gtk_window_get_icon</link>             (<link linkend="GtkWindow">GtkWindow</link> *window);
<link linkend="GList">GList</link>*      <link linkend="gtk-window-get-icon-list">gtk_window_get_icon_list</link>        (<link linkend="GtkWindow">GtkWindow</link> *window);
<link linkend="GdkModifierType">GdkModifierType</link> <link linkend="gtk-window-get-mnemonic-modifier">gtk_window_get_mnemonic_modifier</link>
                                            (<link linkend="GtkWindow">GtkWindow</link> *window);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-window-get-modal">gtk_window_get_modal</link>            (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-window-get-position">gtk_window_get_position</link>         (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> *root_x,
                                             <link linkend="gint">gint</link> *root_y);
G_CONST_RETURN <link linkend="gchar">gchar</link>* <link linkend="gtk-window-get-role">gtk_window_get_role</link>   (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-window-get-size">gtk_window_get_size</link>             (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> *width,
                                             <link linkend="gint">gint</link> *height);
G_CONST_RETURN <link linkend="gchar">gchar</link>* <link linkend="gtk-window-get-title">gtk_window_get_title</link>  (<link linkend="GtkWindow">GtkWindow</link> *window);
<link linkend="GtkWindow">GtkWindow</link>*  <link linkend="gtk-window-get-transient-for">gtk_window_get_transient_for</link>    (<link linkend="GtkWindow">GtkWindow</link> *window);
<link linkend="GdkWindowTypeHint">GdkWindowTypeHint</link> <link linkend="gtk-window-get-type-hint">gtk_window_get_type_hint</link>  (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-window-move">gtk_window_move</link>                 (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> x,
                                             <link linkend="gint">gint</link> y);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-window-parse-geometry">gtk_window_parse_geometry</link>       (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             const <link linkend="gchar">gchar</link> *geometry);
void        <link linkend="gtk-window-reshow-with-initial-size">gtk_window_reshow_with_initial_size</link>
                                            (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-window-resize">gtk_window_resize</link>               (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> width,
                                             <link linkend="gint">gint</link> height);
void        <link linkend="gtk-window-set-default-icon-list">gtk_window_set_default_icon_list</link>
                                            (<link linkend="GList">GList</link> *list);
void        <link linkend="gtk-window-set-icon">gtk_window_set_icon</link>             (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GdkPixbuf">GdkPixbuf</link> *icon);
void        <link linkend="gtk-window-set-icon-list">gtk_window_set_icon_list</link>        (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GList">GList</link> *list);


void        <link linkend="gtk-decorated-window-init">gtk_decorated_window_init</link>       (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-decorated-window-calculate-frame-size">gtk_decorated_window_calculate_frame_size</link>
                                            (<link linkend="GtkWindow">GtkWindow</link> *window);
void        <link linkend="gtk-decorated-window-set-title">gtk_decorated_window_set_title</link>  (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             const <link linkend="gchar">gchar</link> *title);
void        <link linkend="gtk-decorated-window-move-resize-window">gtk_decorated_window_move_resize_window</link>
                                            (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> x,
                                             <link linkend="gint">gint</link> y,
                                             <link linkend="gint">gint</link> width,
                                             <link linkend="gint">gint</link> height);

</synopsis>
</refsynopsisdiv>

<refsect1>
<title>Object Hierarchy</title>
<synopsis>

  <link linkend="GObject">GObject</link>
   +----<link linkend="GtkObject">GtkObject</link>
         +----<link linkend="GtkWidget">GtkWidget</link>
               +----<link linkend="GtkContainer">GtkContainer</link>
                     +----<link linkend="GtkBin">GtkBin</link>
                           +----GtkWindow
</synopsis>

</refsect1>

<refsect1>
<title>Properties</title>
<synopsis>

  &quot;<link linkend="GtkWindow--type">type</link>&quot;                 <link linkend="GtkWindowType">GtkWindowType</link>        : Read / Write / Construct Only
  &quot;<link linkend="GtkWindow--title">title</link>&quot;                <link linkend="gchararray">gchararray</link>           : Read / Write
  &quot;<link linkend="GtkWindow--allow-shrink">allow-shrink</link>&quot;         <link linkend="gboolean">gboolean</link>             : Read / Write
  &quot;<link linkend="GtkWindow--allow-grow">allow-grow</link>&quot;           <link linkend="gboolean">gboolean</link>             : Read / Write
  &quot;<link linkend="GtkWindow--resizable">resizable</link>&quot;            <link linkend="gboolean">gboolean</link>             : Read / Write
  &quot;<link linkend="GtkWindow--modal">modal</link>&quot;                <link linkend="gboolean">gboolean</link>             : Read / Write
  &quot;<link linkend="GtkWindow--window-position">window-position</link>&quot;      <link linkend="GtkWindowPosition">GtkWindowPosition</link>    : Read / Write
  &quot;<link linkend="GtkWindow--default-width">default-width</link>&quot;        <link linkend="gint">gint</link>                 : Read / Write
  &quot;<link linkend="GtkWindow--default-height">default-height</link>&quot;       <link linkend="gint">gint</link>                 : Read / Write
  &quot;<link linkend="GtkWindow--destroy-with-parent">destroy-with-parent</link>&quot;  <link linkend="gboolean">gboolean</link>             : Read / Write
  &quot;<link linkend="GtkWindow--icon">icon</link>&quot;                 <link linkend="GdkPixbuf">GdkPixbuf</link>            : Read / Write
</synopsis>
</refsect1>

<refsect1>
<title>Signal Prototypes</title>
<synopsis>

&quot;<link linkend="GtkWindow-activate-default">activate-default</link>&quot;
            void        user_function      (<link linkend="GtkWindow">GtkWindow</link> *window,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GtkWindow-activate-focus">activate-focus</link>&quot;
            void        user_function      (<link linkend="GtkWindow">GtkWindow</link> *window,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GtkWindow-frame-event">frame-event</link>&quot;
            <link linkend="gboolean">gboolean</link>    user_function      (<link linkend="GtkWindow">GtkWindow</link> *window,
                                            <link linkend="GdkEvent">GdkEvent</link> *event,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GtkWindow-keys-changed">keys-changed</link>&quot;
            void        user_function      (<link linkend="GtkWindow">GtkWindow</link> *window,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GtkWindow-move-focus">move-focus</link>&quot;
            void        user_function      (<link linkend="GtkWindow">GtkWindow</link> *window,
                                            <link linkend="GtkDirectionType">GtkDirectionType</link> arg1,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GtkWindow-set-focus">set-focus</link>&quot; void        user_function      (<link linkend="GtkWindow">GtkWindow</link> *window,
                                            <link linkend="GtkWidget">GtkWidget</link> *widget,
                                            <link linkend="gpointer">gpointer</link> user_data);
</synopsis>
</refsect1>


<refsect1>
<title>Description</title>
<para>

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GtkWindow-struct">struct GtkWindow</title>
<programlisting>struct GtkWindow;</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="gtk-window-new">gtk_window_new ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gtk_window_new                  (<link linkend="GtkWindowType">GtkWindowType</link> type);</programlisting>
<para>
Creates a new <link linkend="GtkWindow">GtkWindow</link>, which is a toplevel window that can
contain other widgets. Nearly always, the type of the window should
be <link linkend="GTK-WINDOW-TOPLEVEL-CAPS">GTK_WINDOW_TOPLEVEL</link>. If you're implementing something like a
popup menu from scratch (which is a bad idea, just use <link linkend="GtkMenu">GtkMenu</link>),
you might use <link linkend="GTK-WINDOW-POPUP-CAPS">GTK_WINDOW_POPUP</link>. <link linkend="GTK-WINDOW-POPUP-CAPS">GTK_WINDOW_POPUP</link> is not for
dialogs, though in some other toolkits dialogs are called "popups".
In GTK+, <link linkend="GTK-WINDOW-POPUP-CAPS">GTK_WINDOW_POPUP</link> means a pop-up menu or pop-up tooltip.
On X11, popup windows are not controlled by the <link
linkend="gtk-X11-arch">window manager</link>.
</para>
<para>
If you simply want an undecorated window (no window borders), use
<link linkend="gtk-window-set-decorated">gtk_window_set_decorated</link>(), don't use <link linkend="GTK-WINDOW-POPUP-CAPS">GTK_WINDOW_POPUP</link>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>type</parameter>&nbsp;:</entry>
<entry> type of window
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a new <link linkend="GtkWindow">GtkWindow</link>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-title">gtk_window_set_title ()</title>
<programlisting>void        gtk_window_set_title            (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             const <link linkend="gchar">gchar</link> *title);</programlisting>
<para>
Sets the title of the <link linkend="GtkWindow">GtkWindow</link>. The title of a window will be
displayed in its title bar; on the X Window System, the title bar
is rendered by the <link linkend="gtk-X11-arch">window
manager</link>, so exactly how the title appears to users may vary
according to a user's exact configuration. The title should help a
user distinguish this window from other windows they may have
open. A good title might include the application name and current
document filename, for example.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>title</parameter>&nbsp;:</entry>
<entry> title of the window
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-wmclass">gtk_window_set_wmclass ()</title>
<programlisting>void        gtk_window_set_wmclass          (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             const <link linkend="gchar">gchar</link> *wmclass_name,
                                             const <link linkend="gchar">gchar</link> *wmclass_class);</programlisting>
<para>
Don't use this function. It sets the X Window System "class" and
"name" hints for a window.  According to the ICCCM, you should
always set these to the same value for all windows in an
application, and GTK+ sets them to that value by default, so calling
this function is sort of pointless. However, you may want to call
<link linkend="gtk-window-set-role">gtk_window_set_role</link>() on each window in your application, for the
benefit of the session manager. Setting the role allows the window
manager to restore window positions when loading a saved session.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>wmclass_name</parameter>&nbsp;:</entry>
<entry> window name hint
</entry></row>
<row><entry align="right"><parameter>wmclass_class</parameter>&nbsp;:</entry>
<entry> window class hint
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-policy">gtk_window_set_policy ()</title>
<programlisting>void        gtk_window_set_policy           (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> allow_shrink,
                                             <link linkend="gint">gint</link> allow_grow,
                                             <link linkend="gint">gint</link> auto_shrink);</programlisting>
<warning>
<para>
<literal>gtk_window_set_policy</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Changes how a toplevel window deals with its size request and user resize
attempts. There are really only two reasonable ways to call this function:
<orderedlist>
<listitem>
<para>
<literal>gtk_window_set_policy (GTK_WINDOW (window), FALSE, TRUE, FALSE)</literal> 
means that the window is user-resizable.
</para>
</listitem>
<listitem>
<para>
<literal>gtk_window_set_policy (GTK_WINDOW (window), FALSE, FALSE, TRUE)</literal> 
means that the window's size is program-controlled, and should simply match 
the current size request of the window's children.
</para>
</listitem>
</orderedlist>
The first policy is the default, that is, by default windows are designed to 
be resized by users.
</para>

<para>
The basic ugly truth of this function is that it should be simply:
<literal>
 void gtk_window_set_resizable (GtkWindow* window, gboolean setting);
</literal>
...which is why GTK+ 2.0 introduces <link linkend="gtk-window-set-resizable">gtk_window_set_resizable</link>(), which you 
should use instead of <link linkend="gtk-window-set-policy">gtk_window_set_policy</link>().
</para>

<para>
If set to <literal>TRUE</literal>, the <parameter>allow_grow</parameter> parameter allows the user to expand the window
beyond the size request of its child widgets. If <parameter>allow_grow</parameter> is <literal>TRUE</literal>, be sure to
check that your child widgets work properly as the window is resized.
</para>

<para>
A toplevel window will always change size to ensure its child widgets receive
their requested size. This means that if you add child widgets, the toplevel
window will expand to contain them. However, normally the toplevel will not
shrink to fit the size request of its children if it's too large; the
<parameter>auto_shrink</parameter> parameter causes the window to shrink when child widgets have too
much space. <parameter>auto_shrink</parameter> is normally used with the second of the two window
policies mentioned above.  That is, set <parameter>auto_shrink</parameter> to <literal>TRUE</literal> if you want the
window to have a fixed, always-optimal size determined by your program.
</para>

<para>
Note that <parameter>auto_shrink</parameter> doesn't do anything if <parameter>allow_shrink</parameter> and <parameter>allow_grow</parameter> are
both set to <literal>FALSE</literal>.
</para>

<para>
Neither of the two suggested window policies set the <parameter>allow_shrink</parameter> parameter to
<literal>TRUE</literal>.  If <parameter>allow_shrink</parameter> is <literal>TRUE</literal>, the user can shrink the window so that its
children do not receive their full size request; this is basically a bad thing,
because most widgets will look wrong if this happens. Furthermore GTK+ has a
tendency to re-expand the window if size is recalculated for any reason. The
upshot is that <parameter>allow_shrink</parameter> should always be set to <literal>FALSE</literal>.
</para>

<para>
Sometimes when you think you want to use <parameter>allow_shrink</parameter>, the real problem is that
some specific child widget is requesting too much space, so the user can't
shrink the window sufficiently. Perhaps you are calling <link linkend="gtk-widget-set-size-request">gtk_widget_set_size_request</link>()
on a child widget, and forcing its size request to be too large. Instead of
setting the child's usize, consider using <link linkend="gtk-window-set-default-size">gtk_window_set_default_size</link>() so that
the child gets a larger allocation than it requests.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry>the window
</entry></row>
<row><entry align="right"><parameter>allow_shrink</parameter>&nbsp;:</entry>
<entry>whether the user can shrink the window below its size request
</entry></row>
<row><entry align="right"><parameter>allow_grow</parameter>&nbsp;:</entry>
<entry>whether the user can grow the window larger than its size request
</entry></row>
<row><entry align="right"><parameter>auto_shrink</parameter>&nbsp;:</entry>
<entry>whether the window automatically snaps back to its size request if
it's larger


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-resizable">gtk_window_set_resizable ()</title>
<programlisting>void        gtk_window_set_resizable        (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gboolean">gboolean</link> resizable);</programlisting>
<para>
Sets whether the user can resize a window. Windows are user resizable
by default.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>resizable</parameter>&nbsp;:</entry>
<entry> <literal>TRUE</literal> if the user can resize this window
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-resizable">gtk_window_get_resizable ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_window_get_resizable        (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Gets the value set by <link linkend="gtk-window-set-resizable">gtk_window_set_resizable</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if the user can resize the window
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-add-accel-group">gtk_window_add_accel_group ()</title>
<programlisting>void        gtk_window_add_accel_group      (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group);</programlisting>
<para>
Associate <parameter>accel_group</parameter> with <parameter>window</parameter>, such that calling
<link linkend="gtk-accel-groups-activate">gtk_accel_groups_activate</link>() on <parameter>window</parameter> will activate accelerators
in <parameter>accel_group</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> window to attach accelerator group to
</entry></row>
<row><entry align="right"><parameter>accel_group</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkAccelGroup">GtkAccelGroup</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-remove-accel-group">gtk_window_remove_accel_group ()</title>
<programlisting>void        gtk_window_remove_accel_group   (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group);</programlisting>
<para>
Reverses the effects of <link linkend="gtk-window-add-accel-group">gtk_window_add_accel_group</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>accel_group</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkAccelGroup">GtkAccelGroup</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-position">gtk_window_position</title>
<programlisting>#define	gtk_window_position			gtk_window_set_position
</programlisting>
<warning>
<para>
<literal>gtk_window_position</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Deprecated alias for <link linkend="gtk-window-set-position">gtk_window_set_position</link>().
</para></refsect2>
<refsect2>
<title><anchor id="gtk-window-activate-focus">gtk_window_activate_focus ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_window_activate_focus       (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-activate-default">gtk_window_activate_default ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_window_activate_default     (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-modal">gtk_window_set_modal ()</title>
<programlisting>void        gtk_window_set_modal            (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gboolean">gboolean</link> modal);</programlisting>
<para>
Sets a window modal or non-modal. Modal windows prevent interaction
with other windows in the same application. To keep modal dialogs
on top of main application windows, use
<link linkend="gtk-window-set-transient-for">gtk_window_set_transient_for</link>() to make the dialog transient for the
parent; most <link linkend="gtk-X11-arch">window managers</link>
will then disallow lowering the dialog below the parent.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>modal</parameter>&nbsp;:</entry>
<entry> whether the window is modal
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-default-size">gtk_window_set_default_size ()</title>
<programlisting>void        gtk_window_set_default_size     (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> width,
                                             <link linkend="gint">gint</link> height);</programlisting>
<para>
Sets the default size of a window. If the window's "natural" size
(its size request) is larger than the default, the default will be
ignored. More generally, if the default size does not obey the
geometry hints for the window (<link linkend="gtk-window-set-geometry-hints">gtk_window_set_geometry_hints</link>() can
be used to set these explicitly), the default size will be clamped
to the nearest permitted size.
</para>
<para>
Unlike <link linkend="gtk-widget-set-size-request">gtk_widget_set_size_request</link>(), which sets a size request for
a widget and thus would keep users from shrinking the window, this
function only sets the initial size, just as if the user had
resized the window themselves. Users can still shrink the window
again as they normally would. Setting a default size of -1 means to
use the "natural" default size (the size request of the window).
</para>
<para>
For more control over a window's initial size and how resizing works,
investigate <link linkend="gtk-window-set-geometry-hints">gtk_window_set_geometry_hints</link>().
</para>
<para>
For some uses, <link linkend="gtk-window-resize">gtk_window_resize</link>() is a more appropriate function.
<link linkend="gtk-window-resize">gtk_window_resize</link>() changes the current size of the window, rather
than the size to be used on initial display. <link linkend="gtk-window-resize">gtk_window_resize</link>() always
affects the window itself, not the geometry widget.
</para>
<para>
The default size of a window only affects the first time a window is
shown; if a window is hidden and re-shown, it will remember the size
it had prior to hiding, rather than using the default size.
</para>
<para>
Windows can't actually be 0x0 in size, they must be at least 1x1, but
passing 0 for <parameter>width</parameter> and <parameter>height</parameter> is OK, resulting in a 1x1 default size.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>width</parameter>&nbsp;:</entry>
<entry> width in pixels, or -1 to unset the default width
</entry></row>
<row><entry align="right"><parameter>height</parameter>&nbsp;:</entry>
<entry> height in pixels, or -1 to unset the default height
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-geometry-hints">gtk_window_set_geometry_hints ()</title>
<programlisting>void        gtk_window_set_geometry_hints   (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GtkWidget">GtkWidget</link> *geometry_widget,
                                             <link linkend="GdkGeometry">GdkGeometry</link> *geometry,
                                             <link linkend="GdkWindowHints">GdkWindowHints</link> geom_mask);</programlisting>
<para>
This function sets up hints about how a window can be resized by
the user.  You can set a minimum and maximum size; allowed resize
increments (e.g. for xterm, you can only resize by the size of a
character); aspect ratios; and more. See the <link linkend="GdkGeometry">GdkGeometry</link> struct.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>geometry_widget</parameter>&nbsp;:</entry>
<entry> widget the geometry hints will be applied to
</entry></row>
<row><entry align="right"><parameter>geometry</parameter>&nbsp;:</entry>
<entry> struct containing geometry information
</entry></row>
<row><entry align="right"><parameter>geom_mask</parameter>&nbsp;:</entry>
<entry> mask indicating which struct fields should be paid attention to
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-gravity">gtk_window_set_gravity ()</title>
<programlisting>void        gtk_window_set_gravity          (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GdkGravity">GdkGravity</link> gravity);</programlisting>
<para>
Window gravity defines the meaning of coordinates passed to
<link linkend="gtk-window-move">gtk_window_move</link>(). See <link linkend="gtk-window-move">gtk_window_move</link>() and <link linkend="GdkGravity">GdkGravity</link> for
more details.
</para>
<para>
The default window gravity is <link linkend="GDK-GRAVITY-NORTH-WEST-CAPS">GDK_GRAVITY_NORTH_WEST</link> which will
typically "do what you mean."</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>gravity</parameter>&nbsp;:</entry>
<entry> window gravity
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-gravity">gtk_window_get_gravity ()</title>
<programlisting><link linkend="GdkGravity">GdkGravity</link>  gtk_window_get_gravity          (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Gets the value set by <link linkend="gtk-window-set-gravity">gtk_window_set_gravity</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> window gravity
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-position">gtk_window_set_position ()</title>
<programlisting>void        gtk_window_set_position         (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GtkWindowPosition">GtkWindowPosition</link> position);</programlisting>
<para>
Sets a position constraint for this window. If the old or new
constraint is <literal>GTK_WIN_POS_CENTER_ALWAYS</literal>, this will also cause
the window to be repositioned to satisfy the new constraint.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>.
</entry></row>
<row><entry align="right"><parameter>position</parameter>&nbsp;:</entry>
<entry> a position constraint.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-transient-for">gtk_window_set_transient_for ()</title>
<programlisting>void        gtk_window_set_transient_for    (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GtkWindow">GtkWindow</link> *parent);</programlisting>
<para>
Dialog windows should be set transient for the main application
window they were spawned from. This allows <link
linkend="gtk-X11-arch">window managers</link> to e.g. keep the
dialog on top of the main window, or center the dialog over the
main window. <link linkend="gtk-dialog-new-with-buttons">gtk_dialog_new_with_buttons</link>() and other convenience
functions in GTK+ will sometimes call
<link linkend="gtk-window-set-transient-for">gtk_window_set_transient_for</link>() on your behalf.
</para>
<para>
On Windows, this function will and put the child window
on top of the parent, much as the window manager would have
done on X.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>parent</parameter>&nbsp;:</entry>
<entry> parent window
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-destroy-with-parent">gtk_window_set_destroy_with_parent ()</title>
<programlisting>void        gtk_window_set_destroy_with_parent
                                            (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gboolean">gboolean</link> setting);</programlisting>
<para>
If <parameter>setting</parameter> is <literal>TRUE</literal>, then destroying the transient parent of <parameter>window</parameter>
will also destroy <parameter>window</parameter> itself. This is useful for dialogs that
shouldn't persist beyond the lifetime of the main window they're
associated with, for example.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>setting</parameter>&nbsp;:</entry>
<entry> whether to destroy <parameter>window</parameter> with its transient parent
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-list-toplevels">gtk_window_list_toplevels ()</title>
<programlisting><link linkend="GList">GList</link>*      gtk_window_list_toplevels       (void);</programlisting>
<para>
Returns a list of all existing toplevel windows. The widgets
in the list are not individually referenced. If you want
to iterate through the list and perform actions involving
callbacks that might destroy the widgets, you <emphasis>must</emphasis> call
<literal>g_list_foreach (result, (GFunc)g_object_ref, NULL)</literal> first, and
then unref all the widgets afterwards.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> list of toplevel widgets
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-add-mnemonic">gtk_window_add_mnemonic ()</title>
<programlisting>void        gtk_window_add_mnemonic         (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="guint">guint</link> keyval,
                                             <link linkend="GtkWidget">GtkWidget</link> *target);</programlisting>
<para>
Adds a mnemonic to this window.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>keyval</parameter>&nbsp;:</entry>
<entry> the mnemonic
</entry></row>
<row><entry align="right"><parameter>target</parameter>&nbsp;:</entry>
<entry> the widget that gets activated by the mnemonic
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-remove-mnemonic">gtk_window_remove_mnemonic ()</title>
<programlisting>void        gtk_window_remove_mnemonic      (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="guint">guint</link> keyval,
                                             <link linkend="GtkWidget">GtkWidget</link> *target);</programlisting>
<para>
Removes a mnemonic from this window.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>keyval</parameter>&nbsp;:</entry>
<entry> the mnemonic
</entry></row>
<row><entry align="right"><parameter>target</parameter>&nbsp;:</entry>
<entry> the widget that gets activated by the mnemonic
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-mnemonic-activate">gtk_window_mnemonic_activate ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_window_mnemonic_activate    (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="guint">guint</link> keyval,
                                             <link linkend="GdkModifierType">GdkModifierType</link> modifier);</programlisting>
<para>
Activates the targets associated with the mnemonic.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>keyval</parameter>&nbsp;:</entry>
<entry> the mnemonic
</entry></row>
<row><entry align="right"><parameter>modifier</parameter>&nbsp;:</entry>
<entry> the modifiers 
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if the activation is done. 
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-focus">gtk_window_get_focus ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gtk_window_get_focus            (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Retrieves the current focused widget within the window.
Note that this is the widget that would have the focus
if the toplevel window focused; if the toplevel window
is not focused then  <literal>GTK_WIDGET_HAS_FOCUS (widget)</literal> will
not be <literal>TRUE</literal> for the widget.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the currently focused widget.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-focus">gtk_window_set_focus ()</title>
<programlisting>void        gtk_window_set_focus            (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GtkWidget">GtkWidget</link> *focus);</programlisting>
<para>
If <parameter>focus</parameter> is not the current focus widget, and is focusable, sets
it as the focus widget for the window. If <parameter>focus</parameter> is <literal>NULL</literal>, unsets
the focus widget for this window. To set the focus to a particular
widget in the toplevel, it is usually more convenient to use
<link linkend="gtk-widget-grab-focus">gtk_widget_grab_focus</link>() instead of this function.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>focus</parameter>&nbsp;:</entry>
<entry> widget to be the new focus widget, or <literal>NULL</literal> to unset
  any focus widget for the toplevel window.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-default">gtk_window_set_default ()</title>
<programlisting>void        gtk_window_set_default          (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GtkWidget">GtkWidget</link> *default_widget);</programlisting>
<para>
The default widget is the widget that's activated when the user
presses Enter in a dialog (for example). This function sets or
unsets the default widget for a <link linkend="GtkWindow">GtkWindow</link> about. When setting
(rather than unsetting) the default widget it's generally easier to
call <link linkend="gtk-widget-grab-focus">gtk_widget_grab_focus</link>() on the widget. Before making a widget
the default widget, you must set the <link linkend="GTK-CAN-DEFAULT-CAPS">GTK_CAN_DEFAULT</link> flag on the
widget you'd like to make the default using <link linkend="GTK-WIDGET-SET-FLAGS-CAPS">GTK_WIDGET_SET_FLAGS</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>default_widget</parameter>&nbsp;:</entry>
<entry> widget to be the default, or <literal>NULL</literal> to unset the
                 default widget for the toplevel.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-present">gtk_window_present ()</title>
<programlisting>void        gtk_window_present              (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Presents a window to the user. This may mean raising the window
in the stacking order, deiconifying it, moving it to the current
desktop, and/or giving it the keyboard focus, possibly dependent
on the user's platform, window manager, and preferences.
</para>
<para>
If <parameter>window</parameter> is hidden, this function calls <link linkend="gtk-widget-show">gtk_widget_show</link>()
as well.
</para>
<para>
This function should be used when the user tries to open a window
that's already open. Say for example the preferences dialog is
currently open, and the user chooses Preferences from the menu
a second time; use <link linkend="gtk-window-present">gtk_window_present</link>() to move the already-open dialog
where the user can see it.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-iconify">gtk_window_iconify ()</title>
<programlisting>void        gtk_window_iconify              (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Asks to iconify (i.e. minimize) the specified <parameter>window</parameter>. Note that
you shouldn't assume the window is definitely iconified afterward,
because other entities (e.g. the user or <link
linkend="gtk-X11-arch">window manager</link>) could deiconify it
again, or there may not be a window manager in which case
iconification isn't possible, etc. But normally the window will end
up iconified. Just don't write code that crashes if not.
</para>
<para>
It's permitted to call this function before showing a window,
in which case the window will be iconified before it ever appears
onscreen.
</para>
<para>
You can track iconification via the "window_state_event" signal
on <link linkend="GtkWidget">GtkWidget</link>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-deiconify">gtk_window_deiconify ()</title>
<programlisting>void        gtk_window_deiconify            (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Asks to deiconify (i.e. unminimize) the specified <parameter>window</parameter>. Note
that you shouldn't assume the window is definitely deiconified
afterward, because other entities (e.g. the user or <link
linkend="gtk-X11-arch">window manager</link>) could iconify it
again before your code which assumes deiconification gets to run.
</para>
<para>
You can track iconification via the "window_state_event" signal
on <link linkend="GtkWidget">GtkWidget</link>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-stick">gtk_window_stick ()</title>
<programlisting>void        gtk_window_stick                (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Asks to stick <parameter>window</parameter>, which means that it will appear on all user
desktops. Note that you shouldn't assume the window is definitely
stuck afterward, because other entities (e.g. the user or <link
linkend="gtk-X11-arch">window manager</link>) could unstick it
again, and some window managers do not support sticking
windows. But normally the window will end up stuck. Just don't
write code that crashes if not.
</para>
<para>
It's permitted to call this function before showing a window.
</para>
<para>
You can track stickiness via the "window_state_event" signal
on <link linkend="GtkWidget">GtkWidget</link>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-unstick">gtk_window_unstick ()</title>
<programlisting>void        gtk_window_unstick              (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Asks to unstick <parameter>window</parameter>, which means that it will appear on only
one of the user's desktops. Note that you shouldn't assume the
window is definitely unstuck afterward, because other entities
(e.g. the user or <link linkend="gtk-X11-arch">window
manager</link>) could stick it again. But normally the window will
end up stuck. Just don't write code that crashes if not.
</para>
<para>
You can track stickiness via the "window_state_event" signal
on <link linkend="GtkWidget">GtkWidget</link>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-maximize">gtk_window_maximize ()</title>
<programlisting>void        gtk_window_maximize             (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Asks to maximize <parameter>window</parameter>, so that it becomes full-screen. Note that
you shouldn't assume the window is definitely maximized afterward,
because other entities (e.g. the user or <link
linkend="gtk-X11-arch">window manager</link>) could unmaximize it
again, and not all window managers support maximization. But
normally the window will end up maximized. Just don't write code
that crashes if not.
</para>
<para>
It's permitted to call this function before showing a window,
in which case the window will be maximized when it appears onscreen
initially.
</para>
<para>
You can track maximization via the "window_state_event" signal
on <link linkend="GtkWidget">GtkWidget</link>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-unmaximize">gtk_window_unmaximize ()</title>
<programlisting>void        gtk_window_unmaximize           (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Asks to unmaximize <parameter>window</parameter>. Note that you shouldn't assume the
window is definitely unmaximized afterward, because other entities
(e.g. the user or <link linkend="gtk-X11-arch">window
manager</link>) could maximize it again, and not all window
managers honor requests to unmaximize. But normally the window will
end up unmaximized. Just don't write code that crashes if not.
</para>
<para>
You can track maximization via the "window_state_event" signal
on <link linkend="GtkWidget">GtkWidget</link>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-begin-resize-drag">gtk_window_begin_resize_drag ()</title>
<programlisting>void        gtk_window_begin_resize_drag    (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GdkWindowEdge">GdkWindowEdge</link> edge,
                                             <link linkend="gint">gint</link> button,
                                             <link linkend="gint">gint</link> root_x,
                                             <link linkend="gint">gint</link> root_y,
                                             <link linkend="guint32">guint32</link> timestamp);</programlisting>
<para>
Starts resizing a window. This function is used if an application
has window resizing controls. When GDK can support it, the resize
will be done using the standard mechanism for the <link
linkend="gtk-X11-arch">window manager</link> or windowing
system. Otherwise, GDK will try to emulate window resizing,
potentially not all that well, depending on the windowing system.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>edge</parameter>&nbsp;:</entry>
<entry> position of the resize control
</entry></row>
<row><entry align="right"><parameter>button</parameter>&nbsp;:</entry>
<entry> mouse button that initiated the drag
</entry></row>
<row><entry align="right"><parameter>root_x</parameter>&nbsp;:</entry>
<entry> X position where the user clicked to initiate the drag, in root window coordinates
</entry></row>
<row><entry align="right"><parameter>root_y</parameter>&nbsp;:</entry>
<entry> Y position where the user clicked to initiate the drag
</entry></row>
<row><entry align="right"><parameter>timestamp</parameter>&nbsp;:</entry>
<entry> timestamp from the click event that initiated the drag
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-begin-move-drag">gtk_window_begin_move_drag ()</title>
<programlisting>void        gtk_window_begin_move_drag      (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> button,
                                             <link linkend="gint">gint</link> root_x,
                                             <link linkend="gint">gint</link> root_y,
                                             <link linkend="guint32">guint32</link> timestamp);</programlisting>
<para>
Starts moving a window. This function is used if an application has
window movement grips. When GDK can support it, the window movement
will be done using the standard mechanism for the <link
linkend="gtk-X11-arch">window manager</link> or windowing
system. Otherwise, GDK will try to emulate window movement,
potentially not all that well, depending on the windowing system.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>button</parameter>&nbsp;:</entry>
<entry> mouse button that initiated the drag
</entry></row>
<row><entry align="right"><parameter>root_x</parameter>&nbsp;:</entry>
<entry> X position where the user clicked to initiate the drag, in root window coordinates
</entry></row>
<row><entry align="right"><parameter>root_y</parameter>&nbsp;:</entry>
<entry> Y position where the user clicked to initiate the drag
</entry></row>
<row><entry align="right"><parameter>timestamp</parameter>&nbsp;:</entry>
<entry> timestamp from the click event that initiated the drag
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-decorated">gtk_window_set_decorated ()</title>
<programlisting>void        gtk_window_set_decorated        (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gboolean">gboolean</link> setting);</programlisting>
<para>
By default, windows are decorated with a title bar, resize
controls, etc.  Some <link linkend="gtk-X11-arch">window
managers</link> allow GTK+ to disable these decorations, creating a
borderless window. If you set the decorated property to <literal>FALSE</literal>
using this function, GTK+ will do its best to convince the window
manager not to decorate the window.
</para>
<para>
On Windows, this function always works, since there's no window manager
policy involved.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>setting</parameter>&nbsp;:</entry>
<entry> <literal>TRUE</literal> to decorate the window
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-frame-dimensions">gtk_window_set_frame_dimensions ()</title>
<programlisting>void        gtk_window_set_frame_dimensions (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> left,
                                             <link linkend="gint">gint</link> top,
                                             <link linkend="gint">gint</link> right,
                                             <link linkend="gint">gint</link> bottom);</programlisting>
<para>
(Note: this is a special-purpose function intended for the framebuffer
 port; see <link linkend="gtk-window-set-has-frame">gtk_window_set_has_frame</link>(). It will have no effect on the
 window border drawn by the window manager, which is the normal
 case when using the X Window system.)
</para>
<para>
For windows with frames (see <link linkend="gtk-window-set-has-frame">gtk_window_set_has_frame</link>()) this function
can be used to change the size of the frame border.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link> that has a frame
</entry></row>
<row><entry align="right"><parameter>left</parameter>&nbsp;:</entry>
<entry> The width of the left border
</entry></row>
<row><entry align="right"><parameter>top</parameter>&nbsp;:</entry>
<entry> The height of the top border
</entry></row>
<row><entry align="right"><parameter>right</parameter>&nbsp;:</entry>
<entry> The width of the right border
</entry></row>
<row><entry align="right"><parameter>bottom</parameter>&nbsp;:</entry>
<entry> The height of the bottom border
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-has-frame">gtk_window_set_has_frame ()</title>
<programlisting>void        gtk_window_set_has_frame        (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gboolean">gboolean</link> setting);</programlisting>
<para>
(Note: this is a special-purpose function for the framebuffer port,
 that causes GTK+ to draw its own window border. For most applications,
 you want <link linkend="gtk-window-set-decorated">gtk_window_set_decorated</link>() instead, which tells the window
 manager whether to draw the window border.)
</para>
<para>
If this function is called on a window with setting of <literal>TRUE</literal>, before
it is realized or showed, it will have a "frame" window around
<parameter>window</parameter>->window, accessible in <parameter>window</parameter>->frame. Using the signal 
frame_event you can recieve all events targeted at the frame.
</para>
<para>
This function is used by the linux-fb port to implement managed
windows, but it could concievably be used by X-programs that
want to do their own window decorations.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>setting</parameter>&nbsp;:</entry>
<entry> a boolean
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-mnemonic-modifier">gtk_window_set_mnemonic_modifier ()</title>
<programlisting>void        gtk_window_set_mnemonic_modifier
                                            (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GdkModifierType">GdkModifierType</link> modifier);</programlisting>
<para>
Sets the mnemonic modifier for this window.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>modifier</parameter>&nbsp;:</entry>
<entry> the modifier mask used to activate
              mnemonics on this window.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-role">gtk_window_set_role ()</title>
<programlisting>void        gtk_window_set_role             (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             const <link linkend="gchar">gchar</link> *role);</programlisting>
<para>
This function is only useful on X11, not with other GTK+ targets.
</para>
<para>
In combination with the window title, the window role allows a
<link linkend="gtk-X11-arch">window manager</link> to identify "the
same" window when an application is restarted. So for example you
might set the "toolbox" role on your app's toolbox window, so that
when the user restarts their session, the window manager can put
the toolbox back in the same place.
</para>
<para>
If a window already has a unique title, you don't need to set the
role, since the WM can use the title to identify the window when
restoring the session.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>role</parameter>&nbsp;:</entry>
<entry> unique identifier for the window to be used when restoring a session
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-type-hint">gtk_window_set_type_hint ()</title>
<programlisting>void        gtk_window_set_type_hint        (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GdkWindowTypeHint">GdkWindowTypeHint</link> hint);</programlisting>
<para>
By setting the type hint for the window, you allow the window
manager to decorate and handle the window in a way which is
suitable to the function of the window in your application.
</para>
<para>
This function should be called before the window becomes visible.
</para>
<para>
<link linkend="gtk-dialog-new-with-buttons">gtk_dialog_new_with_buttons</link>() and other convenience functions in GTK+
will sometimes call <link linkend="gtk-window-set-type-hint">gtk_window_set_type_hint</link>() on your behalf.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>hint</parameter>&nbsp;:</entry>
<entry> the window type
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-decorated">gtk_window_get_decorated ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_window_get_decorated        (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Returns whether the window has been set to have decorations
such as a title bar via <link linkend="gtk-window-set-decorated">gtk_window_set_decorated</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if the window has been set to have decorations
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-default-icon-list">gtk_window_get_default_icon_list ()</title>
<programlisting><link linkend="GList">GList</link>*      gtk_window_get_default_icon_list
                                            (void);</programlisting>
<para>
Gets the value set by <link linkend="gtk-window-set-default-icon-list">gtk_window_set_default_icon_list</link>().
The list is a copy and should be freed with <link linkend="g-list-free">g_list_free</link>(),
but the pixbufs in the list have not had their reference count
incremented.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> copy of default icon list 
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-default-size">gtk_window_get_default_size ()</title>
<programlisting>void        gtk_window_get_default_size     (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> *width,
                                             <link linkend="gint">gint</link> *height);</programlisting>
<para>
Gets the default size of the window. A value of -1 for the width or
height indicates that a default size has not been explicitly set
for that dimension, so the "natural" size of the window will be
used.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>width</parameter>&nbsp;:</entry>
<entry> location to store the default width, or <literal>NULL</literal>
</entry></row>
<row><entry align="right"><parameter>height</parameter>&nbsp;:</entry>
<entry> location to store the default height, or <literal>NULL</literal>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-destroy-with-parent">gtk_window_get_destroy_with_parent ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_window_get_destroy_with_parent
                                            (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Returns whether the window will be destroyed with its transient parent. See
<link linkend="gtk-window-set-destroy-with-parent">gtk_window_set_destroy_with_parent</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if the window will be destroyed with its transient parent.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-frame-dimensions">gtk_window_get_frame_dimensions ()</title>
<programlisting>void        gtk_window_get_frame_dimensions (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> *left,
                                             <link linkend="gint">gint</link> *top,
                                             <link linkend="gint">gint</link> *right,
                                             <link linkend="gint">gint</link> *bottom);</programlisting>
<para>
(Note: this is a special-purpose function intended for the
 framebuffer port; see <link linkend="gtk-window-set-has-frame">gtk_window_set_has_frame</link>(). It will not
 return the size of the window border drawn by the <link
 linkend="gtk-X11-arch">window manager</link>, which is the normal
 case when using a windowing system.  See
 <link linkend="gdk-window-get-frame-extents">gdk_window_get_frame_extents</link>() to get the standard window border
 extents.)
</para>
<para>
Retrieves the dimensions of the frame window for this toplevel.
See <link linkend="gtk-window-set-has-frame">gtk_window_set_has_frame</link>(), <link linkend="gtk-window-set-frame-dimensions">gtk_window_set_frame_dimensions</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>left</parameter>&nbsp;:</entry>
<entry> location to store the width of the frame at the left, or <literal>NULL</literal>
</entry></row>
<row><entry align="right"><parameter>top</parameter>&nbsp;:</entry>
<entry> location to store the height of the frame at the top, or <literal>NULL</literal>
</entry></row>
<row><entry align="right"><parameter>right</parameter>&nbsp;:</entry>
<entry> location to store the width of the frame at the returns, or <literal>NULL</literal>
</entry></row>
<row><entry align="right"><parameter>bottom</parameter>&nbsp;:</entry>
<entry> location to store the height of the frame at the bottom, or <literal>NULL</literal>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-has-frame">gtk_window_get_has_frame ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_window_get_has_frame        (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Accessor for whether the window has a frame window exterior to
<parameter>window</parameter>->window. Gets the value set by <link linkend="gtk-window-set-has-frame">gtk_window_set_has_frame</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if a frame has been added to the window
  via <link linkend="gtk-window-set-has-frame">gtk_window_set_has_frame</link>().
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-icon">gtk_window_get_icon ()</title>
<programlisting><link linkend="GdkPixbuf">GdkPixbuf</link>*  gtk_window_get_icon             (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Gets the value set by <link linkend="gtk-window-set-icon">gtk_window_set_icon</link>() (or if you've
called <link linkend="gtk-window-set-icon-list">gtk_window_set_icon_list</link>(), gets the first icon in
the icon list).</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> icon for window
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-icon-list">gtk_window_get_icon_list ()</title>
<programlisting><link linkend="GList">GList</link>*      gtk_window_get_icon_list        (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Retrieves the list of icons set by <link linkend="gtk-window-set-icon-list">gtk_window_set_icon_list</link>().
The list is copied, but the reference count on each
member won't be incremented.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> copy of window's icon list
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-mnemonic-modifier">gtk_window_get_mnemonic_modifier ()</title>
<programlisting><link linkend="GdkModifierType">GdkModifierType</link> gtk_window_get_mnemonic_modifier
                                            (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Returns the mnemonic modifier for this window. See
<link linkend="gtk-window-set-mnemonic-modifier">gtk_window_set_mnemonic_modifier</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the modifier mask used to activate
              mnemonics on this window.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-modal">gtk_window_get_modal ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_window_get_modal            (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Returns whether the window is modal. See <link linkend="gtk-window-set-modal">gtk_window_set_modal</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if the window is set to be modal and
              establishes a grab when shown
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-position">gtk_window_get_position ()</title>
<programlisting>void        gtk_window_get_position         (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> *root_x,
                                             <link linkend="gint">gint</link> *root_y);</programlisting>
<para>
This function returns the position you need to pass to
<link linkend="gtk-window-move">gtk_window_move</link>() to keep <parameter>window</parameter> in its current position.  This
means that the meaning of the returned value varies with window
gravity. See <link linkend="gtk-window-move">gtk_window_move</link>() for more details.
</para>
<para>
If you haven't changed the window gravity, its gravity will be
<link linkend="GDK-GRAVITY-NORTH-WEST-CAPS">GDK_GRAVITY_NORTH_WEST</link>. This means that <link linkend="gtk-window-get-position">gtk_window_get_position</link>()
gets the position of the top-left corner of the window manager
frame for the window. <link linkend="gtk-window-move">gtk_window_move</link>() sets the position of this
same top-left corner.
</para>
<para>
<link linkend="gtk-window-get-position">gtk_window_get_position</link>() is not 100% reliable because the X Window System
does not specify a way to obtain the geometry of the
decorations placed on a window by the window manager.
Thus GTK+ is using a "best guess" that works with most
window managers.
</para>
<para>
Moreover, nearly all window managers are historically broken with
respect to their handling of window gravity. So moving a window to
its current position as returned by <link linkend="gtk-window-get-position">gtk_window_get_position</link>() tends
to result in moving the window slightly. Window managers are
slowly getting better over time.
</para>
<para>
If a window has gravity <link linkend="GDK-GRAVITY-STATIC-CAPS">GDK_GRAVITY_STATIC</link> the window manager
frame is not relevant, and thus <link linkend="gtk-window-get-position">gtk_window_get_position</link>() will
always produce accurate results. However you can't use static
gravity to do things like place a window in a corner of the screen,
because static gravity ignores the window manager decorations.
</para>
<para>
If you are saving and restoring your application's window
positions, you should know that it's impossible for applications to
do this without getting it somewhat wrong because applications do
not have sufficient knowledge of window manager state. The Correct
Mechanism is to support the session management protocol (see the
"GnomeClient" object in the GNOME libraries for example) and allow
the window manager to save your window sizes and positions.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>root_x</parameter>&nbsp;:</entry>
<entry> return location for X coordinate of gravity-determined reference p\oint
</entry></row>
<row><entry align="right"><parameter>root_y</parameter>&nbsp;:</entry>
<entry> return location for Y coordinate of gravity-determined reference p\oint
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-role">gtk_window_get_role ()</title>
<programlisting>G_CONST_RETURN <link linkend="gchar">gchar</link>* gtk_window_get_role   (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Returns the role of the window. See <link linkend="gtk-window-set-role">gtk_window_set_role</link>() for
further explanation.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the role of the window if set, or <literal>NULL</literal>. The
  returned is owned by the widget and must not be modified
  or freed.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-size">gtk_window_get_size ()</title>
<programlisting>void        gtk_window_get_size             (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> *width,
                                             <link linkend="gint">gint</link> *height);</programlisting>
<para>
Obtains the current size of <parameter>window</parameter>. If <parameter>window</parameter> is not onscreen,
it returns the size GTK+ will suggest to the <link
linkend="gtk-X11-arch">window manager</link> for the initial window
size (but this is not reliably the same as the size the window
manager will actually select). The size obtained by
<link linkend="gtk-window-get-size">gtk_window_get_size</link>() is the last size received in a
<link linkend="GdkEventConfigure">GdkEventConfigure</link>, that is, GTK+ uses its locally-stored size,
rather than querying the X server for the size. As a result, if you
call <link linkend="gtk-window-resize">gtk_window_resize</link>() then immediately call
<link linkend="gtk-window-get-size">gtk_window_get_size</link>(), the size won't have taken effect yet. After
the window manager processes the resize request, GTK+ receives
notification that the size has changed via a configure event, and
the size of the window gets updated.
</para>
<para>
Note 1: Nearly any use of this function creates a race condition,
because the size of the window may change between the time that you
get the size and the time that you perform some action assuming
that size is the current size. To avoid race conditions, connect to
"configure_event" on the window and adjust your size-dependent
state to match the size delivered in the <link linkend="GdkEventConfigure">GdkEventConfigure</link>.
</para>
<para>
Note 2: The returned size does <emphasis>not</emphasis> include the
size of the window manager decorations (aka the window frame or
border). Those are not drawn by GTK+ and GTK+ has no reliable
method of determining their size.
</para>
<para>
Note 3: If you are getting a window size in order to position
the window onscreen, there may be a better way. The preferred
way is to simply set the window's semantic type with
<link linkend="gtk-window-set-type-hint">gtk_window_set_type_hint</link>(), which allows the window manager to
e.g. center dialogs. Also, if you set the transient parent of
dialogs with <link linkend="gtk-window-set-transient-for">gtk_window_set_transient_for</link>() window managers
will often center the dialog over its parent window. It's
much preferred to let the window manager handle these
things rather than doing it yourself, because all apps will
behave consistently and according to user prefs if the window
manager handles it. Also, the window manager can take the size
of the window decorations/border into account, while your
application cannot.
</para>
<para>
In any case, if you insist on application-specified window
positioning, there's <emphasis>still</emphasis> a better way than
doing it yourself - <link linkend="gtk-window-set-position">gtk_window_set_position</link>() will frequently
handle the details for you.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>width</parameter>&nbsp;:</entry>
<entry> return location for width, or <literal>NULL</literal>
</entry></row>
<row><entry align="right"><parameter>height</parameter>&nbsp;:</entry>
<entry> return location for height, or <literal>NULL</literal>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-title">gtk_window_get_title ()</title>
<programlisting>G_CONST_RETURN <link linkend="gchar">gchar</link>* gtk_window_get_title  (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Retrieves the title of the window. See <link linkend="gtk-window-set-title">gtk_window_set_title</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the title of the window, or <literal>NULL</literal> if none has
   been set explicitely. The returned string is owned by the widget
   and must not be modified or freed.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-transient-for">gtk_window_get_transient_for ()</title>
<programlisting><link linkend="GtkWindow">GtkWindow</link>*  gtk_window_get_transient_for    (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Fetches the transient parent for this window. See
<link linkend="gtk-window-set-transient-for">gtk_window_set_transient_for</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the transient parent for this window, or <literal>NULL</literal>
   if no transient parent has been set.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-get-type-hint">gtk_window_get_type_hint ()</title>
<programlisting><link linkend="GdkWindowTypeHint">GdkWindowTypeHint</link> gtk_window_get_type_hint  (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Gets the type hint for this window. See <link linkend="gtk-window-set-type-hint">gtk_window_set_type_hint</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the type hint for <parameter>window</parameter>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-move">gtk_window_move ()</title>
<programlisting>void        gtk_window_move                 (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> x,
                                             <link linkend="gint">gint</link> y);</programlisting>
<para>
Asks the <link linkend="gtk-X11-arch">window manager</link> to move
<parameter>window</parameter> to the given position.  Window managers are free to ignore
this; most window managers ignore requests for initial window
positions (instead using a user-defined placement algorithm) and
honor requests after the window has already been shown.
</para>
<para>
Note: the position is the position of the gravity-determined
reference point for the window. The gravity determines two things:
first, the location of the reference point in root window
coordinates; and second, which point on the window is positioned at
the reference point.
</para>
<para>
By default the gravity is <link linkend="GDK-GRAVITY-NORTH-WEST-CAPS">GDK_GRAVITY_NORTH_WEST</link>, so the reference
point is simply the <parameter>x</parameter>, <parameter>y</parameter> supplied to <link linkend="gtk-window-move">gtk_window_move</link>(). The
top-left corner of the window decorations (aka window frame or
border) will be placed at <parameter>x</parameter>, <parameter>y</parameter>.  Therefore, to position a window
at the top left of the screen, you want to use the default gravity
(which is <link linkend="GDK-GRAVITY-NORTH-WEST-CAPS">GDK_GRAVITY_NORTH_WEST</link>) and move the window to 0,0.
</para>
<para>
To position a window at the bottom right corner of the screen, you
would set <link linkend="GDK-GRAVITY-SOUTH-EAST-CAPS">GDK_GRAVITY_SOUTH_EAST</link>, which means that the reference
point is at <parameter>x</parameter> + the window width and <parameter>y</parameter> + the window height, and
the bottom-right corner of the window border will be placed at that
reference point. So, to place a window in the bottom right corner
you would first set gravity to south east, then write:
<literal>gtk_window_move (window, <link linkend="gdk-screen-width">gdk_screen_width</link>() - window_width,
<link linkend="gdk-screen-height">gdk_screen_height</link>() - window_height)</literal>.
</para>
<para>
The extended window manager hints specification at
<ulink url="http://www.freedesktop.org/standards/wm-spec.html">
http://www.freedesktop.org/standards/wm-spec.html</ulink> has a 
nice table of gravities in the "implementation notes" section.
</para>
<para>
The <link linkend="gtk-window-get-position">gtk_window_get_position</link>() documentation may also be relevant.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>x</parameter>&nbsp;:</entry>
<entry> X coordinate to move window to
</entry></row>
<row><entry align="right"><parameter>y</parameter>&nbsp;:</entry>
<entry> Y coordinate to move window to
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-parse-geometry">gtk_window_parse_geometry ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_window_parse_geometry       (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             const <link linkend="gchar">gchar</link> *geometry);</programlisting>
<para>
Parses a standard X Window System geometry string - see the
manual page for X (type 'man X') for details on this.
<link linkend="gtk-window-parse-geometry">gtk_window_parse_geometry</link>() does work on all GTK+ ports
including Win32 but is primarily intended for an X environment.
</para>
<para>
If either a size or a position can be extracted from the
geometry string, <link linkend="gtk-window-parse-geometry">gtk_window_parse_geometry</link>() returns <literal>TRUE</literal>
and calls <link linkend="gtk-window-set-default-size">gtk_window_set_default_size</link>() and/or <link linkend="gtk-window-move">gtk_window_move</link>()
to resize/move the window.
</para>
<para>
If <link linkend="gtk-window-parse-geometry">gtk_window_parse_geometry</link>() returns <literal>TRUE</literal>, it will also
set the <link linkend="GDK-HINT-USER-POS-CAPS">GDK_HINT_USER_POS</link> and/or <link linkend="GDK-HINT-USER-SIZE-CAPS">GDK_HINT_USER_SIZE</link> hints
indicating to the window manager that the size/position of
the window was user-specified. This causes most window
managers to honor the geometry.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>geometry</parameter>&nbsp;:</entry>
<entry> geometry string
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if string was parsed successfully
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-reshow-with-initial-size">gtk_window_reshow_with_initial_size ()</title>
<programlisting>void        gtk_window_reshow_with_initial_size
                                            (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>
Hides <parameter>window</parameter>, then reshows it, resetting the
default size and position of the window. Used
by GUI builders only.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-resize">gtk_window_resize ()</title>
<programlisting>void        gtk_window_resize               (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> width,
                                             <link linkend="gint">gint</link> height);</programlisting>
<para>
Resizes the window as if the user had done so, obeying geometry
constraints. The default geometry constraint is that windows may
not be smaller than their size request; to override this
constraint, call <link linkend="gtk-widget-set-size-request">gtk_widget_set_size_request</link>() to set the window's
request to a smaller value.
</para>
<para>
If <link linkend="gtk-window-resize">gtk_window_resize</link>() is called before showing a window for the
first time, it overrides any default size set with
<link linkend="gtk-window-set-default-size">gtk_window_set_default_size</link>().
</para>
<para>
Windows may not be resized smaller than 1 by 1 pixels.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>width</parameter>&nbsp;:</entry>
<entry> width in pixels to resize the window to
</entry></row>
<row><entry align="right"><parameter>height</parameter>&nbsp;:</entry>
<entry> height in pixels to resize the window to
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-default-icon-list">gtk_window_set_default_icon_list ()</title>
<programlisting>void        gtk_window_set_default_icon_list
                                            (<link linkend="GList">GList</link> *list);</programlisting>
<para>
Sets an icon list to be used as fallback for windows that haven't
had <link linkend="gtk-window-set-icon-list">gtk_window_set_icon_list</link>() called on them to set up a
window-specific icon list. This function allows you to set up the
icon for all windows in your app at once.
</para>
<para>
See <link linkend="gtk-window-set-icon-list">gtk_window_set_icon_list</link>() for more details.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry> a list of <link linkend="GdkPixbuf">GdkPixbuf</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-icon">gtk_window_set_icon ()</title>
<programlisting>void        gtk_window_set_icon             (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GdkPixbuf">GdkPixbuf</link> *icon);</programlisting>
<para>
Sets up the icon representing a <link linkend="GtkWindow">GtkWindow</link>. This icon is used when
the window is minimized (also known as iconified).  Some window
managers or desktop environments may also place it in the window
frame, or display it in other contexts.
</para>
<para>
The icon should be provided in whatever size it was naturally
drawn; that is, don't scale the image before passing it to
GTK+. Scaling is postponed until the last minute, when the desired
final size is known, to allow best quality.
</para>
<para>
If you have your icon hand-drawn in multiple sizes, use
<link linkend="gtk-window-set-icon-list">gtk_window_set_icon_list</link>(). Then the best size will be used.
</para>
<para>
This function is equivalent to calling <link linkend="gtk-window-set-icon-list">gtk_window_set_icon_list</link>()
with a 1-element list.
</para>
<para>
See also <link linkend="gtk-window-set-default-icon-list">gtk_window_set_default_icon_list</link>() to set the icon
for all windows in your application in one go.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>icon</parameter>&nbsp;:</entry>
<entry> icon image, or <literal>NULL</literal>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-window-set-icon-list">gtk_window_set_icon_list ()</title>
<programlisting>void        gtk_window_set_icon_list        (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="GList">GList</link> *list);</programlisting>
<para>
Sets up the icon representing a <link linkend="GtkWindow">GtkWindow</link>. The icon is used when
the window is minimized (also known as iconified).  Some window
managers or desktop environments may also place it in the window
frame, or display it in other contexts.
</para>
<para>
<link linkend="gtk-window-set-icon-list">gtk_window_set_icon_list</link>() allows you to pass in the same icon in
several hand-drawn sizes. The list should contain the natural sizes
your icon is available in; that is, don't scale the image before
passing it to GTK+. Scaling is postponed until the last minute,
when the desired final size is known, to allow best quality.
</para>
<para>
By passing several sizes, you may improve the final image quality
of the icon, by reducing or eliminating automatic image scaling.
</para>
<para>
Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and
larger images (64x64, 128x128) if you have them.
</para>
<para>
See also <link linkend="gtk-window-set-default-icon-list">gtk_window_set_default_icon_list</link>() to set the icon
for all windows in your application in one go.
</para>
<para>
Note that transient windows (those who have been set transient for another
window using <link linkend="gtk-window-set-transient-for">gtk_window_set_transient_for</link>()) will inherit their
icon from their transient parent. So there's no need to explicitly
set the icon on transient windows.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkWindow">GtkWindow</link>
</entry></row>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry> list of <link linkend="GdkPixbuf">GdkPixbuf</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-decorated-window-init">gtk_decorated_window_init ()</title>
<programlisting>void        gtk_decorated_window_init       (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-decorated-window-calculate-frame-size">gtk_decorated_window_calculate_frame_size ()</title>
<programlisting>void        gtk_decorated_window_calculate_frame_size
                                            (<link linkend="GtkWindow">GtkWindow</link> *window);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-decorated-window-set-title">gtk_decorated_window_set_title ()</title>
<programlisting>void        gtk_decorated_window_set_title  (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             const <link linkend="gchar">gchar</link> *title);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>title</parameter>&nbsp;:</entry>
<entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-decorated-window-move-resize-window">gtk_decorated_window_move_resize_window ()</title>
<programlisting>void        gtk_decorated_window_move_resize_window
                                            (<link linkend="GtkWindow">GtkWindow</link> *window,
                                             <link linkend="gint">gint</link> x,
                                             <link linkend="gint">gint</link> y,
                                             <link linkend="gint">gint</link> width,
                                             <link linkend="gint">gint</link> height);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>x</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>y</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>width</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>height</parameter>&nbsp;:</entry>
<entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>
<refsect1>
<title>Properties</title>
<variablelist>
<varlistentry><term><anchor id="GtkWindow--type">&quot;<literal>type</literal>&quot; (<link linkend="GtkWindowType">GtkWindowType</link> : Read / Write / Construct Only)</term>
<listitem>
<para>
The type of the window.
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkWindow--title">&quot;<literal>title</literal>&quot; (<link linkend="gchararray">gchararray</link> : Read / Write)</term>
<listitem>
<para>
The title of the window.
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkWindow--allow-shrink">&quot;<literal>allow-shrink</literal>&quot; (<link linkend="gboolean">gboolean</link> : Read / Write)</term>
<listitem>
<para>
If the window can be resized to a smaller size by the user.
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkWindow--allow-grow">&quot;<literal>allow-grow</literal>&quot; (<link linkend="gboolean">gboolean</link> : Read / Write)</term>
<listitem>
<para>
If the window can be resized to a larger size by the user.
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkWindow--resizable">&quot;<literal>resizable</literal>&quot; (<link linkend="gboolean">gboolean</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkWindow--modal">&quot;<literal>modal</literal>&quot; (<link linkend="gboolean">gboolean</link> : Read / Write)</term>
<listitem>
<para>
If the window is modal, i.e. it grabs all GTK+ events.
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkWindow--window-position">&quot;<literal>window-position</literal>&quot; (<link linkend="GtkWindowPosition">GtkWindowPosition</link> : Read / Write)</term>
<listitem>
<para>
The position of the window.
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkWindow--default-width">&quot;<literal>default-width</literal>&quot; (<link linkend="gint">gint</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkWindow--default-height">&quot;<literal>default-height</literal>&quot; (<link linkend="gint">gint</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkWindow--destroy-with-parent">&quot;<literal>destroy-with-parent</literal>&quot; (<link linkend="gboolean">gboolean</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkWindow--icon">&quot;<literal>icon</literal>&quot; (<link linkend="GdkPixbuf">GdkPixbuf</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>

</variablelist>
</refsect1>

<refsect1>
<title>Signals</title>
<refsect2><title><anchor id="GtkWindow-activate-default">The &quot;activate-default&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkWindow">GtkWindow</link> *window,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry>the object which received the signal.

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GtkWindow-activate-focus">The &quot;activate-focus&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkWindow">GtkWindow</link> *window,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry>the object which received the signal.

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GtkWindow-frame-event">The &quot;frame-event&quot; signal</title>
<programlisting><link linkend="gboolean">gboolean</link>    user_function                  (<link linkend="GtkWindow">GtkWindow</link> *window,
                                            <link linkend="GdkEvent">GdkEvent</link> *event,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry>the object which received the signal.
</entry></row>
<row><entry align="right"><parameter>event</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>

</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GtkWindow-keys-changed">The &quot;keys-changed&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkWindow">GtkWindow</link> *window,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry>the object which received the signal.

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GtkWindow-move-focus">The &quot;move-focus&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkWindow">GtkWindow</link> *window,
                                            <link linkend="GtkDirectionType">GtkDirectionType</link> arg1,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry>the object which received the signal.
</entry></row>
<row><entry align="right"><parameter>arg1</parameter>&nbsp;:</entry>
<entry>

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GtkWindow-set-focus">The &quot;set-focus&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkWindow">GtkWindow</link> *window,
                                            <link linkend="GtkWidget">GtkWidget</link> *widget,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry>the object which received the signal.
</entry></row>
<row><entry align="right"><parameter>widget</parameter>&nbsp;:</entry>
<entry>

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2>
</refsect1>



</refentry>
