<?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 % gtkdocentities SYSTEM "../xml/gtkdocentities.ent">
  %gtkdocentities;
]>
<refentry id="AtkRelationSet">
<refmeta>
<refentrytitle role="top_of_page" id="AtkRelationSet.top_of_page">AtkRelationSet</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>ATK Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>AtkRelationSet</refname>
<refpurpose>A set of AtkRelations, normally the set of
AtkRelations which an AtkObject has.</refpurpose>
</refnamediv>

<refsect1 id="AtkRelationSet.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="AtkRelationSet"><returnvalue>AtkRelationSet</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="atk-relation-set-new">atk_relation_set_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-relation-set-contains">atk_relation_set_contains</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="atk-relation-set-remove">atk_relation_set_remove</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="atk-relation-set-add">atk_relation_set_add</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-relation-set-get-n-relations">atk_relation_set_get_n_relations</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="AtkRelation"><returnvalue>AtkRelation</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="atk-relation-set-get-relation">atk_relation_set_get_relation</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="AtkRelation"><returnvalue>AtkRelation</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="atk-relation-set-get-relation-by-type">atk_relation_set_get_relation_by_type</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="atk-relation-set-add-relation-by-type">atk_relation_set_add_relation_by_type</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="AtkRelationSet.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="AtkRelationSet-struct">AtkRelationSet</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="AtkRelationSet.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> AtkRelationSet
</screen>
</refsect1>


<refsect1 id="AtkRelationSet.description" role="desc">
<title role="desc.title">Description</title>
<para>The AtkRelationSet held by an object establishes its relationships
with objects beyond the normal "parent/child" hierarchical
relationships that all user interface objects have.
AtkRelationSets establish whether objects are labelled or
controlled by other components, share group membership with other
components (for instance within a radio-button group), or share
content which "flows" between them, among other types of possible
relationships.</para>

</refsect1>
<refsect1 id="AtkRelationSet.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="atk-relation-set-new" role="function">
<title>atk_relation_set_new&#160;()</title>
<indexterm zone="atk-relation-set-new"><primary>atk_relation_set_new</primary></indexterm>
<programlisting language="C"><link linkend="AtkRelationSet"><returnvalue>AtkRelationSet</returnvalue></link>&#160;*
atk_relation_set_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new empty relation set.</para>
<refsect3 id="atk-relation-set-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="AtkRelationSet"><type>AtkRelationSet</type></link> </para>
</refsect3></refsect2>
<refsect2 id="atk-relation-set-contains" role="function">
<title>atk_relation_set_contains&#160;()</title>
<indexterm zone="atk-relation-set-contains"><primary>atk_relation_set_contains</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
atk_relation_set_contains (<parameter><link linkend="AtkRelationSet"><type>AtkRelationSet</type></link> *set</parameter>,
                           <parameter><link linkend="AtkRelationType"><type>AtkRelationType</type></link> relationship</parameter>);</programlisting>
<para>Determines whether the relation set contains a relation that matches the
specified type.</para>
<refsect3 id="atk-relation-set-contains.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>set</para></entry>
<entry role="parameter_description"><para>an <link linkend="AtkRelationSet"><type>AtkRelationSet</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>relationship</para></entry>
<entry role="parameter_description"><para>an <link linkend="AtkRelationType"><type>AtkRelationType</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="atk-relation-set-contains.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>relationship</parameter>
is the relationship type of a relation
in <parameter>set</parameter>
, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise</para>
</refsect3></refsect2>
<refsect2 id="atk-relation-set-remove" role="function">
<title>atk_relation_set_remove&#160;()</title>
<indexterm zone="atk-relation-set-remove"><primary>atk_relation_set_remove</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
atk_relation_set_remove (<parameter><link linkend="AtkRelationSet"><type>AtkRelationSet</type></link> *set</parameter>,
                         <parameter><link linkend="AtkRelation"><type>AtkRelation</type></link> *relation</parameter>);</programlisting>
<para>Removes a relation from the relation set.
This function unref's the <link linkend="AtkRelation"><type>AtkRelation</type></link> so it will be deleted unless there
is another reference to it.</para>
<refsect3 id="atk-relation-set-remove.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>set</para></entry>
<entry role="parameter_description"><para>an <link linkend="AtkRelationSet"><type>AtkRelationSet</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>relation</para></entry>
<entry role="parameter_description"><para>an <link linkend="AtkRelation"><type>AtkRelation</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="atk-relation-set-add" role="function">
<title>atk_relation_set_add&#160;()</title>
<indexterm zone="atk-relation-set-add"><primary>atk_relation_set_add</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
atk_relation_set_add (<parameter><link linkend="AtkRelationSet"><type>AtkRelationSet</type></link> *set</parameter>,
                      <parameter><link linkend="AtkRelation"><type>AtkRelation</type></link> *relation</parameter>);</programlisting>
<para>Add a new relation to the current relation set if it is not already
present.
This function ref's the AtkRelation so the caller of this function
should unref it to ensure that it will be destroyed when the AtkRelationSet
is destroyed.</para>
<refsect3 id="atk-relation-set-add.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>set</para></entry>
<entry role="parameter_description"><para>an <link linkend="AtkRelationSet"><type>AtkRelationSet</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>relation</para></entry>
<entry role="parameter_description"><para>an <link linkend="AtkRelation"><type>AtkRelation</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="atk-relation-set-get-n-relations" role="function">
<title>atk_relation_set_get_n_relations&#160;()</title>
<indexterm zone="atk-relation-set-get-n-relations"><primary>atk_relation_set_get_n_relations</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
atk_relation_set_get_n_relations (<parameter><link linkend="AtkRelationSet"><type>AtkRelationSet</type></link> *set</parameter>);</programlisting>
<para>Determines the number of relations in a relation set.</para>
<refsect3 id="atk-relation-set-get-n-relations.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>set</para></entry>
<entry role="parameter_description"><para>an <link linkend="AtkRelationSet"><type>AtkRelationSet</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="atk-relation-set-get-n-relations.returns" role="returns">
<title>Returns</title>
<para> an integer representing the number of relations in the set.</para>
</refsect3></refsect2>
<refsect2 id="atk-relation-set-get-relation" role="function">
<title>atk_relation_set_get_relation&#160;()</title>
<indexterm zone="atk-relation-set-get-relation"><primary>atk_relation_set_get_relation</primary></indexterm>
<programlisting language="C"><link linkend="AtkRelation"><returnvalue>AtkRelation</returnvalue></link>&#160;*
atk_relation_set_get_relation (<parameter><link linkend="AtkRelationSet"><type>AtkRelationSet</type></link> *set</parameter>,
                               <parameter><link linkend="gint"><type>gint</type></link> i</parameter>);</programlisting>
<para>Determines the relation at the specified position in the relation set.</para>
<refsect3 id="atk-relation-set-get-relation.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>set</para></entry>
<entry role="parameter_description"><para>an <link linkend="AtkRelationSet"><type>AtkRelationSet</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>i</para></entry>
<entry role="parameter_description"><para>a gint representing a position in the set, starting from 0.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="atk-relation-set-get-relation.returns" role="returns">
<title>Returns</title>
<para>a <link linkend="AtkRelation"><type>AtkRelation</type></link>, which is the relation at
position i in the set. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="atk-relation-set-get-relation-by-type" role="function">
<title>atk_relation_set_get_relation_by_type&#160;()</title>
<indexterm zone="atk-relation-set-get-relation-by-type"><primary>atk_relation_set_get_relation_by_type</primary></indexterm>
<programlisting language="C"><link linkend="AtkRelation"><returnvalue>AtkRelation</returnvalue></link>&#160;*
atk_relation_set_get_relation_by_type (<parameter><link linkend="AtkRelationSet"><type>AtkRelationSet</type></link> *set</parameter>,
                                       <parameter><link linkend="AtkRelationType"><type>AtkRelationType</type></link> relationship</parameter>);</programlisting>
<para>Finds a relation that matches the specified type.</para>
<refsect3 id="atk-relation-set-get-relation-by-type.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>set</para></entry>
<entry role="parameter_description"><para>an <link linkend="AtkRelationSet"><type>AtkRelationSet</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>relationship</para></entry>
<entry role="parameter_description"><para>an <link linkend="AtkRelationType"><type>AtkRelationType</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="atk-relation-set-get-relation-by-type.returns" role="returns">
<title>Returns</title>
<para>an <link linkend="AtkRelation"><type>AtkRelation</type></link>, which is a relation matching the
specified type. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="atk-relation-set-add-relation-by-type" role="function" condition="since:1.9">
<title>atk_relation_set_add_relation_by_type&#160;()</title>
<indexterm zone="atk-relation-set-add-relation-by-type" role="1.9"><primary>atk_relation_set_add_relation_by_type</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
atk_relation_set_add_relation_by_type (<parameter><link linkend="AtkRelationSet"><type>AtkRelationSet</type></link> *set</parameter>,
                                       <parameter><link linkend="AtkRelationType"><type>AtkRelationType</type></link> relationship</parameter>,
                                       <parameter><link linkend="AtkObject"><type>AtkObject</type></link> *target</parameter>);</programlisting>
<para>Add a new relation of the specified type with the specified target to 
the current relation set if the relation set does not contain a relation
of that type. If it is does contain a relation of that typea the target
is added to the relation.</para>
<refsect3 id="atk-relation-set-add-relation-by-type.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>set</para></entry>
<entry role="parameter_description"><para>an <link linkend="AtkRelationSet"><type>AtkRelationSet</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>relationship</para></entry>
<entry role="parameter_description"><para>an <link linkend="AtkRelationType"><type>AtkRelationType</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>target</para></entry>
<entry role="parameter_description"><para>an <link linkend="AtkObject"><type>AtkObject</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.9">1.9</link></para></refsect2>

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

</refsect1>

</refentry>
