<?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="AtkSocket">
<refmeta>
<refentrytitle role="top_of_page" id="AtkSocket.top_of_page">AtkSocket</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>ATK Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>AtkSocket</refname>
<refpurpose>Container for AtkPlug objects from other processes</refpurpose>
</refnamediv>

<refsect1 id="AtkSocket.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="AtkObject"><returnvalue>AtkObject</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="atk-socket-new">atk_socket_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="atk-socket-embed">atk_socket_embed</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-socket-is-occupied">atk_socket_is_occupied</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

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

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="AtkSocket.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> <link linkend="AtkObject">AtkObject</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> AtkSocket
</screen>
</refsect1>
<refsect1 id="AtkSocket.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
AtkSocket implements
 <link linkend="AtkComponent">AtkComponent</link>.</para>

</refsect1>


<refsect1 id="AtkSocket.description" role="desc">
<title role="desc.title">Description</title>
<para>Together with <link linkend="AtkPlug"><type>AtkPlug</type></link>, <link linkend="AtkSocket"><type>AtkSocket</type></link> provides the ability to embed
accessibles from one process into another in a fashion that is
transparent to assistive technologies. <link linkend="AtkSocket"><type>AtkSocket</type></link> works as the
container of <link linkend="AtkPlug"><type>AtkPlug</type></link>, embedding it using the method
<link linkend="atk-socket-embed"><function>atk_socket_embed()</function></link>. Any accessible contained in the <link linkend="AtkPlug"><type>AtkPlug</type></link> will
appear to the assistive technologies as being inside the
application that created the <link linkend="AtkSocket"><type>AtkSocket</type></link>.</para>
<para>The communication between a <link linkend="AtkSocket"><type>AtkSocket</type></link> and a <link linkend="AtkPlug"><type>AtkPlug</type></link> is done by
the IPC layer of the accessibility framework, normally implemented
by the D-Bus based implementation of AT-SPI (at-spi2). If that is
the case, at-spi-atk2 is the responsible to implement the abstract
methods <link linkend="atk-plug-get-id"><function>atk_plug_get_id()</function></link> and <link linkend="atk-socket-embed"><function>atk_socket_embed()</function></link>, so an ATK
implementor shouldn't reimplement them. The process that contains
the <link linkend="AtkPlug"><type>AtkPlug</type></link> is responsible to send the ID returned by
<link linkend="atk-plug-id"><function>atk_plug_id()</function></link> to the process that contains the <link linkend="AtkSocket"><type>AtkSocket</type></link>, so it
could call the method <link linkend="atk-socket-embed"><function>atk_socket_embed()</function></link> in order to embed it.</para>
<para>For the same reasons, an implementor doesn't need to implement
<link linkend="atk-object-get-n-accessible-children"><function>atk_object_get_n_accessible_children()</function></link> and
<link linkend="atk-object-ref-accessible-child"><function>atk_object_ref_accessible_child()</function></link>. All the logic related to those
functions will be implemented by the IPC layer.</para>

</refsect1>
<refsect1 id="AtkSocket.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="atk-socket-new" role="function">
<title>atk_socket_new&#160;()</title>
<indexterm zone="atk-socket-new"><primary>atk_socket_new</primary></indexterm>
<programlisting language="C"><link linkend="AtkObject"><returnvalue>AtkObject</returnvalue></link>&#160;*
atk_socket_new (<parameter><type>void</type></parameter>);</programlisting>
</refsect2>
<refsect2 id="atk-socket-embed" role="function" condition="since:1.30">
<title>atk_socket_embed&#160;()</title>
<indexterm zone="atk-socket-embed" role="1.30"><primary>atk_socket_embed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
atk_socket_embed (<parameter><link linkend="AtkSocket"><type>AtkSocket</type></link> *obj</parameter>,
                  <parameter><link linkend="gchar"><type>gchar</type></link> *plug_id</parameter>);</programlisting>
<para>Embeds the children of an <link linkend="AtkPlug"><type>AtkPlug</type></link> as the children of the
<link linkend="AtkSocket"><type>AtkSocket</type></link>. The plug may be in the same process or in a different
process.</para>
<para>The class item used by this function should be filled in by the IPC
layer (usually at-spi2-atk). The implementor of the AtkSocket
should call this function and pass the id for the plug as returned
by <link linkend="atk-plug-get-id"><function>atk_plug_get_id()</function></link>.  It is the responsibility of the application
to pass the plug id on to the process implementing the <link linkend="AtkSocket"><type>AtkSocket</type></link>
as needed.</para>
<refsect3 id="atk-socket-embed.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>obj</para></entry>
<entry role="parameter_description"><para>an <link linkend="AtkSocket"><type>AtkSocket</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>plug_id</para></entry>
<entry role="parameter_description"><para>the ID of an <link linkend="AtkPlug"><type>AtkPlug</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.30">1.30</link></para></refsect2>
<refsect2 id="atk-socket-is-occupied" role="function" condition="since:1.30">
<title>atk_socket_is_occupied&#160;()</title>
<indexterm zone="atk-socket-is-occupied" role="1.30"><primary>atk_socket_is_occupied</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
atk_socket_is_occupied (<parameter><link linkend="AtkSocket"><type>AtkSocket</type></link> *obj</parameter>);</programlisting>
<para>Determines whether or not the socket has an embedded plug.</para>
<refsect3 id="atk-socket-is-occupied.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>obj</para></entry>
<entry role="parameter_description"><para>an <link linkend="AtkSocket"><type>AtkSocket</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="atk-socket-is-occupied.returns" role="returns">
<title>Returns</title>
<para> TRUE if a plug is embedded in the socket</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.30">1.30</link></para></refsect2>

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

</refsect1>
<refsect1 id="AtkSocket.see-also">
<title>See Also</title>
<para><link linkend="AtkPlug"><type>AtkPlug</type></link></para>

</refsect1>

</refentry>
