<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>AtkRelation</title> <meta name="generator" content="DocBook XSL Stylesheets V1.64.1"> <link rel="home" href="index.html" title="ATK - Accessibility Toolkit"> <link rel="up" href="atk.html" title="ATK Library"> <link rel="previous" href="AtkRegistry.html" title="AtkRegistry"> <link rel="next" href="AtkRelationSet.html" title="AtkRelationSet"> <meta name="generator" content="GTK-Doc V1.4 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> <link rel="chapter" href="atk.html" title="ATK Library"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"> <td><a accesskey="p" href="AtkRegistry.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> <td><a accesskey="u" href="atk.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> <th width="100%" align="center">ATK - Accessibility Toolkit</th> <td><a accesskey="n" href="AtkRelationSet.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr></table> <div class="refentry" lang="en"> <a name="AtkRelation"></a><div class="titlepage"> <div></div> <div></div> </div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2><span class="refentrytitle">AtkRelation</span></h2> <p>AtkRelation — An object used to describe a relation between a object and one or more other objects.</p> </td> <td valign="top" align="right"></td> </tr></table></div> <div class="refsynopsisdiv"> <h2>Synopsis</h2> <pre class="synopsis"> <a href="AtkRelation.html#AtkRelation-struct">AtkRelation</a>; enum <a href="AtkRelation.html#AtkRelationType">AtkRelationType</a>; <a href="AtkRelation.html#AtkRelationType">AtkRelationType</a> <a href="AtkRelation.html#atk-relation-type-register">atk_relation_type_register</a> (const <a href="../glib/glib-Basic-Types.html#gchar" >gchar</a> *name); const <a href="../glib/glib-Basic-Types.html#gchar" >gchar</a>* <a href="AtkRelation.html#atk-relation-type-get-name">atk_relation_type_get_name</a> (<a href="AtkRelation.html#AtkRelationType">AtkRelationType</a> type); <a href="AtkRelation.html#AtkRelationType">AtkRelationType</a> <a href="AtkRelation.html#atk-relation-type-for-name">atk_relation_type_for_name</a> (const <a href="../glib/glib-Basic-Types.html#gchar" >gchar</a> *name); <a href="AtkRelation.html" title="AtkRelation">AtkRelation</a>* <a href="AtkRelation.html#atk-relation-new">atk_relation_new</a> (<a href="AtkObject.html" title="AtkObject">AtkObject</a> **targets, <a href="../glib/glib-Basic-Types.html#gint" >gint</a> n_targets, <a href="AtkRelation.html#AtkRelationType">AtkRelationType</a> relationship); <a href="AtkRelation.html#AtkRelationType">AtkRelationType</a> <a href="AtkRelation.html#atk-relation-get-relation-type">atk_relation_get_relation_type</a> (<a href="AtkRelation.html" title="AtkRelation">AtkRelation</a> *relation); <a href="../glib/glib-Pointer-Arrays.html#GPtrArray" >GPtrArray</a>* <a href="AtkRelation.html#atk-relation-get-target">atk_relation_get_target</a> (<a href="AtkRelation.html" title="AtkRelation">AtkRelation</a> *relation); <a href="../gss/gss-ext.html#void" >void</a> <a href="AtkRelation.html#atk-relation-add-target">atk_relation_add_target</a> (<a href="AtkRelation.html" title="AtkRelation">AtkRelation</a> *relation, <a href="AtkObject.html" title="AtkObject">AtkObject</a> *target); </pre> </div> <div class="refsect1" lang="en"> <a name="id295498"></a><h2>Object Hierarchy</h2> <pre class="synopsis"> <a href="../gobject/gobject-The-Base-Object-Type.html#GObject" >GObject</a> +----AtkRelation </pre> </div> <div class="refsect1" lang="en"> <a name="id295517"></a><h2>Properties</h2> <pre class="synopsis"> "<a href="AtkRelation.html#AtkRelation--relation-type">relation-type</a>" <a href="AtkRelation.html#AtkRelationType">AtkRelationType</a> : Read / Write "<a href="AtkRelation.html#AtkRelation--target">target</a>" <a href="../gobject/gobject-Value-arrays.html#GValueArray" >GValueArray</a> : Read / Write </pre> </div> <div class="refsect1" lang="en"> <a name="id295561"></a><h2>Description</h2> <p> An AtkRelation describes a relation between an object and one or more other objects. The actual relations that an object has with other objects are defined as an AtkRelationSet, which is a set of AtkRelations. </p> </div> <div class="refsect1" lang="en"> <a name="id295573"></a><h2>Details</h2> <div class="refsect2" lang="en"> <a name="id295578"></a><h3> <a name="AtkRelation-struct"></a>AtkRelation</h3> <a class="indexterm" name="id295588"></a><pre class="programlisting">typedef struct _AtkRelation AtkRelation;</pre> <p> The AtkRelation structure should not be accessed directly. </p> </div> <hr> <div class="refsect2" lang="en"> <a name="id295604"></a><h3> <a name="AtkRelationType"></a>enum AtkRelationType</h3> <a class="indexterm" name="id295613"></a><pre class="programlisting">typedef enum { ATK_RELATION_NULL = 0, ATK_RELATION_CONTROLLED_BY, ATK_RELATION_CONTROLLER_FOR, ATK_RELATION_LABEL_FOR, ATK_RELATION_LABELLED_BY, ATK_RELATION_MEMBER_OF, ATK_RELATION_NODE_CHILD_OF, ATK_RELATION_FLOWS_TO, ATK_RELATION_FLOWS_FROM, ATK_RELATION_SUBWINDOW_OF, ATK_RELATION_EMBEDS, ATK_RELATION_EMBEDDED_BY, ATK_RELATION_POPUP_FOR, ATK_RELATION_PARENT_WINDOW_OF, ATK_RELATION_LAST_DEFINED } AtkRelationType; </pre> <p> Describes the type of the relation</p> <p> </p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td> <span class="term"><tt class="literal">ATK_RELATION_NULL</tt></span></td> <td> Not used, represens "no relationship" or an error condition. </td> </tr> <tr> <td> <span class="term"><tt class="literal">ATK_RELATION_CONTROLLED_BY</tt></span></td> <td> Indicates an object controlled by one or more target objects. </td> </tr> <tr> <td> <span class="term"><tt class="literal">ATK_RELATION_CONTROLLER_FOR</tt></span></td> <td> Indicates an object is an controller for one or more target objects. </td> </tr> <tr> <td> <span class="term"><tt class="literal">ATK_RELATION_LABEL_FOR</tt></span></td> <td> Indicates an object is a label for one or more target objects. </td> </tr> <tr> <td> <span class="term"><tt class="literal">ATK_RELATION_LABELLED_BY</tt></span></td> <td> Indicates an object is labelled by one or more target objects. </td> </tr> <tr> <td> <span class="term"><tt class="literal">ATK_RELATION_MEMBER_OF</tt></span></td> <td> Indicates an object is a member of a group of one or more target objects. </td> </tr> <tr> <td> <span class="term"><tt class="literal">ATK_RELATION_NODE_CHILD_OF</tt></span></td> <td> Indicates an object is a cell in a treetable which is displayed because a cell in the same column is expanded and identifies that cell. </td> </tr> <tr> <td> <span class="term"><tt class="literal">ATK_RELATION_FLOWS_TO</tt></span></td> <td> Indicates that the object has content that flows logically to another AtkObject in a sequential way, (for instance text-flow). </td> </tr> <tr> <td> <span class="term"><tt class="literal">ATK_RELATION_FLOWS_FROM</tt></span></td> <td> Indicates that the object has content that flows logically from another AtkObject in a sequential way, (for instance text-flow). </td> </tr> <tr> <td> <span class="term"><tt class="literal">ATK_RELATION_SUBWINDOW_OF</tt></span></td> <td> Indicates a subwindow attached to a component but otherwise has no connection in the UI heirarchy to that component. </td> </tr> <tr> <td> <span class="term"><tt class="literal">ATK_RELATION_EMBEDS</tt></span></td> <td> Indicates that the object visually embeds another object's content, i.e. this object's content flows around another's content. </td> </tr> <tr> <td> <span class="term"><tt class="literal">ATK_RELATION_EMBEDDED_BY</tt></span></td> <td> Inverse of <tt class="literal">ATK_RELATION_EMBEDS</tt>, indicates that this object's content is visualy embedded in another object. </td> </tr> <tr> <td> <span class="term"><tt class="literal">ATK_RELATION_POPUP_FOR</tt></span></td> <td> Indicates that an object is a popup for another object. </td> </tr> <tr> <td> <span class="term"><tt class="literal">ATK_RELATION_PARENT_WINDOW_OF</tt></span></td> <td> Indicates that an object is a parent window of another object. </td> </tr> <tr> <td> <span class="term"><tt class="literal">ATK_RELATION_LAST_DEFINED</tt></span></td> <td> Not used, this value indicates the end of the enumeration. </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" lang="en"> <a name="id295874"></a><h3> <a name="atk-relation-type-register"></a>atk_relation_type_register ()</h3> <a class="indexterm" name="id295884"></a><pre class="programlisting"><a href="AtkRelation.html#AtkRelationType">AtkRelationType</a> atk_relation_type_register (const <a href="../glib/glib-Basic-Types.html#gchar" >gchar</a> *name);</pre> <p> Associate <i class="parameter"><tt>name</tt></i> with a new <a href="AtkRelation.html#AtkRelationType"><span class="type">AtkRelationType</span></a></p> <p> </p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td> <span class="term"><i class="parameter"><tt>name</tt></i> :</span></td> <td> a name string </td> </tr> <tr> <td> <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td> <td> an <a href="AtkRelation.html#AtkRelationType"><span class="type">AtkRelationType</span></a> associated with <i class="parameter"><tt>name</tt></i> </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" lang="en"> <a name="id295970"></a><h3> <a name="atk-relation-type-get-name"></a>atk_relation_type_get_name ()</h3> <a class="indexterm" name="id295980"></a><pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar" >gchar</a>* atk_relation_type_get_name (<a href="AtkRelation.html#AtkRelationType">AtkRelationType</a> type);</pre> <p> Gets the description string describing the <a href="AtkRelation.html#AtkRelationType"><span class="type">AtkRelationType</span></a> <i class="parameter"><tt>type</tt></i>.</p> <p> </p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td> <span class="term"><i class="parameter"><tt>type</tt></i> :</span></td> <td> The <a href="AtkRelation.html#AtkRelationType"><span class="type">AtkRelationType</span></a> whose name is required </td> </tr> <tr> <td> <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td> <td> the string describing the AtkRelationType </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" lang="en"> <a name="id296063"></a><h3> <a name="atk-relation-type-for-name"></a>atk_relation_type_for_name ()</h3> <a class="indexterm" name="id296073"></a><pre class="programlisting"><a href="AtkRelation.html#AtkRelationType">AtkRelationType</a> atk_relation_type_for_name (const <a href="../glib/glib-Basic-Types.html#gchar" >gchar</a> *name);</pre> <p> Get the <a href="AtkRelation.html#AtkRelationType"><span class="type">AtkRelationType</span></a> type corresponding to a relation name.</p> <p> </p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td> <span class="term"><i class="parameter"><tt>name</tt></i> :</span></td> <td> a string which is the (non-localized) name of an ATK relation type. </td> </tr> <tr> <td> <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td> <td> the <a href="AtkRelation.html#AtkRelationType"><span class="type">AtkRelationType</span></a> enumerated type corresponding to the specified name, or <span class="type">ATK_RELATION_NULL</span> if no matching relation type is found. </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" lang="en"> <a name="id296158"></a><h3> <a name="atk-relation-new"></a>atk_relation_new ()</h3> <a class="indexterm" name="id296168"></a><pre class="programlisting"><a href="AtkRelation.html" title="AtkRelation">AtkRelation</a>* atk_relation_new (<a href="AtkObject.html" title="AtkObject">AtkObject</a> **targets, <a href="../glib/glib-Basic-Types.html#gint" >gint</a> n_targets, <a href="AtkRelation.html#AtkRelationType">AtkRelationType</a> relationship);</pre> <p> Create a new relation for the specified key and the specified list of targets.</p> <p> </p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td> <span class="term"><i class="parameter"><tt>targets</tt></i> :</span></td> <td> an array of pointers to <span class="type">AtkObjects</span> </td> </tr> <tr> <td> <span class="term"><i class="parameter"><tt>n_targets</tt></i> :</span></td> <td> number of <span class="type">AtkObjects</span> pointed to by <i class="parameter"><tt>targets</tt></i> </td> </tr> <tr> <td> <span class="term"><i class="parameter"><tt>relationship</tt></i> :</span></td> <td> an <a href="AtkRelation.html#AtkRelationType"><span class="type">AtkRelationType</span></a> with which to create the new <a href="AtkRelation.html" title="AtkRelation"><span class="type">AtkRelation</span></a> </td> </tr> <tr> <td> <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td> <td> a pointer to a new <a href="AtkRelation.html" title="AtkRelation"><span class="type">AtkRelation</span></a> </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" lang="en"> <a name="id296315"></a><h3> <a name="atk-relation-get-relation-type"></a>atk_relation_get_relation_type ()</h3> <a class="indexterm" name="id296326"></a><pre class="programlisting"><a href="AtkRelation.html#AtkRelationType">AtkRelationType</a> atk_relation_get_relation_type (<a href="AtkRelation.html" title="AtkRelation">AtkRelation</a> *relation);</pre> <p> Gets the type of <i class="parameter"><tt>relation</tt></i></p> <p> </p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td> <span class="term"><i class="parameter"><tt>relation</tt></i> :</span></td> <td> an <a href="AtkRelation.html" title="AtkRelation"><span class="type">AtkRelation</span></a> </td> </tr> <tr> <td> <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td> <td> the type of <i class="parameter"><tt>relation</tt></i> </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" lang="en"> <a name="id296404"></a><h3> <a name="atk-relation-get-target"></a>atk_relation_get_target ()</h3> <a class="indexterm" name="id296414"></a><pre class="programlisting"><a href="../glib/glib-Pointer-Arrays.html#GPtrArray" >GPtrArray</a>* atk_relation_get_target (<a href="AtkRelation.html" title="AtkRelation">AtkRelation</a> *relation);</pre> <p> Gets the target list of <i class="parameter"><tt>relation</tt></i></p> <p> </p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td> <span class="term"><i class="parameter"><tt>relation</tt></i> :</span></td> <td> an <a href="AtkRelation.html" title="AtkRelation"><span class="type">AtkRelation</span></a> </td> </tr> <tr> <td> <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td> <td> the target list of <i class="parameter"><tt>relation</tt></i> </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" lang="en"> <a name="id296491"></a><h3> <a name="atk-relation-add-target"></a>atk_relation_add_target ()</h3> <a class="indexterm" name="id296501"></a><pre class="programlisting"><a href="../gss/gss-ext.html#void" >void</a> atk_relation_add_target (<a href="AtkRelation.html" title="AtkRelation">AtkRelation</a> *relation, <a href="AtkObject.html" title="AtkObject">AtkObject</a> *target);</pre> <p> Adds the specified AtkObject to the target for the relation, if it is not already present.</p> <p> </p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td> <span class="term"><i class="parameter"><tt>relation</tt></i> :</span></td> <td> an <a href="AtkRelation.html" title="AtkRelation"><span class="type">AtkRelation</span></a> </td> </tr> <tr> <td> <span class="term"><i class="parameter"><tt>target</tt></i> :</span></td> <td> an <a href="AtkObject.html" title="AtkObject"><span class="type">AtkObject</span></a> </td> </tr> </tbody> </table></div> <p>Since 1.9 </p> </div> </div> <div class="refsect1" lang="en"> <a name="id296593"></a><h2>Properties</h2> <div class="refsect2" lang="en"> <a name="id296598"></a><h3> <a name="AtkRelation--relation-type"></a>The "<tt class="literal">relation-type</tt>" property</h3> <pre class="programlisting"> "relation-type" <a href="AtkRelation.html#AtkRelationType">AtkRelationType</a> : Read / Write</pre> <p>The type of the relation.</p> <p>Default value: ATK_RELATION_NULL</p> </div> <hr> <div class="refsect2" lang="en"> <a name="id296634"></a><h3> <a name="AtkRelation--target"></a>The "<tt class="literal">target</tt>" property</h3> <pre class="programlisting"> "target" <a href="../gobject/gobject-Value-arrays.html#GValueArray" >GValueArray</a> : Read / Write</pre> <p>An array of the targets for the relation.</p> </div> </div> </div> <table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"> <td align="left"><a accesskey="p" href="AtkRegistry.html"><b><< AtkRegistry</b></a></td> <td align="right"><a accesskey="n" href="AtkRelationSet.html"><b>AtkRelationSet >></b></a></td> </tr></table> </body> </html>