<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkWindowGroup">
<refmeta>
<refentrytitle role="top_of_page" id="GtkWindowGroup.top_of_page">GtkWindowGroup</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkWindowGroup</refname>
<refpurpose>Limit the effect of grabs</refpurpose>
</refnamediv>

<refsect1 id="GtkWindowGroup.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkWindowGroup"><returnvalue>GtkWindowGroup</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-window-group-new">gtk_window_group_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-window-group-add-window">gtk_window_group_add_window</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-window-group-remove-window">gtk_window_group_remove_window</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-window-group-list-windows">gtk_window_group_list_windows</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkWindowGroup.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkWindowGroup-struct">GtkWindowGroup</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkWindowGroup.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkWindowGroup
</screen>
</refsect1>

<refsect1 id="GtkWindowGroup.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkWindowGroup.description" role="desc">
<title role="desc.title">Description</title>
<para>A <link linkend="GtkWindowGroup"><type>GtkWindowGroup</type></link> restricts the effect of grabs to windows
in the same group, thereby making window groups almost behave
like separate applications. </para>
<para>A window can be a member in at most one window group at a time.
Windows that have not been explicitly assigned to a group are
implicitly treated like windows of the default window group.</para>
<para>GtkWindowGroup objects are referenced by each window in the group,
so once you have added all windows to a GtkWindowGroup, you can drop
the initial reference to the window group with <link linkend="g-object-unref"><function>g_object_unref()</function></link>. If the
windows in the window group are subsequently destroyed, then they will
be removed from the window group and drop their references on the window
group; when all window have been removed, the window group will be
freed.</para>

</refsect1>
<refsect1 id="GtkWindowGroup.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-window-group-new" role="function">
<title>gtk_window_group_new&#160;()</title>
<indexterm zone="gtk-window-group-new"><primary>gtk_window_group_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWindowGroup"><returnvalue>GtkWindowGroup</returnvalue></link>&#160;*
gtk_window_group_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="GtkWindowGroup"><type>GtkWindowGroup</type></link> object.</para>
<para>Modality of windows only affects windows
within the same <link linkend="GtkWindowGroup"><type>GtkWindowGroup</type></link>.</para>
<refsect3 id="gtk-window-group-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkWindowGroup"><type>GtkWindowGroup</type></link>. </para>
</refsect3></refsect2>
<refsect2 id="gtk-window-group-add-window" role="function">
<title>gtk_window_group_add_window&#160;()</title>
<indexterm zone="gtk-window-group-add-window"><primary>gtk_window_group_add_window</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_window_group_add_window (<parameter><link linkend="GtkWindowGroup"><type>GtkWindowGroup</type></link> *window_group</parameter>,
                             <parameter><link linkend="GtkWindow"><type>GtkWindow</type></link> *window</parameter>);</programlisting>
<para>Adds a window to a <link linkend="GtkWindowGroup"><type>GtkWindowGroup</type></link>.</para>
<refsect3 id="gtk-window-group-add-window.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>window_group</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkWindowGroup"><type>GtkWindowGroup</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>window</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkWindow"><type>GtkWindow</type></link> to add</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-window-group-remove-window" role="function">
<title>gtk_window_group_remove_window&#160;()</title>
<indexterm zone="gtk-window-group-remove-window"><primary>gtk_window_group_remove_window</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_window_group_remove_window (<parameter><link linkend="GtkWindowGroup"><type>GtkWindowGroup</type></link> *window_group</parameter>,
                                <parameter><link linkend="GtkWindow"><type>GtkWindow</type></link> *window</parameter>);</programlisting>
<para>Removes a window from a <link linkend="GtkWindowGroup"><type>GtkWindowGroup</type></link>.</para>
<refsect3 id="gtk-window-group-remove-window.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>window_group</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkWindowGroup"><type>GtkWindowGroup</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>window</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkWindow"><type>GtkWindow</type></link> to remove</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-window-group-list-windows" role="function">
<title>gtk_window_group_list_windows&#160;()</title>
<indexterm zone="gtk-window-group-list-windows"><primary>gtk_window_group_list_windows</primary></indexterm>
<programlisting language="C"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
gtk_window_group_list_windows (<parameter><link linkend="GtkWindowGroup"><type>GtkWindowGroup</type></link> *window_group</parameter>);</programlisting>
<para>Returns a list of the <link linkend="GtkWindows"><type>GtkWindows</type></link> that belong to <parameter>window_group</parameter>
.</para>
<refsect3 id="gtk-window-group-list-windows.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>window_group</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkWindowGroup"><type>GtkWindowGroup</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-window-group-list-windows.returns" role="returns">
<title>Returns</title>
<para>A
newly-allocated list of windows inside the group. </para>
<para><emphasis role="annotation">[<acronym>element-type</acronym> GtkWindow][<acronym>transfer container</acronym>]</emphasis></para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkWindowGroup.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkWindowGroup-struct" role="struct">
<title>GtkWindowGroup</title>
<indexterm zone="GtkWindowGroup-struct"><primary>GtkWindowGroup</primary></indexterm>
<programlisting language="C">typedef struct _GtkWindowGroup GtkWindowGroup;</programlisting>
</refsect2>

</refsect1>

</refentry>
