<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-atkstateset">

  <refnamediv>
    <refname>atk.StateSet</refname>
      <refpurpose>an <link
      linkend="class-atkstateset"><classname>atk.StateSet</classname></link>
      determines a component's state set.</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>atk.StateSet</classname></ooclass>
      <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
      <constructorsynopsis language="python">
        <methodname><link linkend="constructor-atkstateset">atk.StateSet</link></methodname>
        <methodparam></methodparam>
      </constructorsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkstateset--is-empty">is_empty</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkstateset--add-state">add_state</link></methodname>
        <methodparam><parameter role="keyword">type</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkstateset--add-states">add_states</link></methodname>
        <methodparam><parameter role="keyword">types</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkstateset--clear-states">clear_states</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkstateset--contains-state">contains_state</link></methodname>
        <methodparam><parameter role="keyword">type</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkstateset--contains-states">contains_states</link></methodname>
        <methodparam><parameter role="keyword">types</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkstateset--remove-state">remove_state</link></methodname>
        <methodparam><parameter role="keyword">type</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkstateset--and-sets">and_sets</link></methodname>
        <methodparam><parameter role="keyword">compare_set</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkstateset--or-sets">or_sets</link></methodname>
        <methodparam><parameter role="keyword">compare_set</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkstateset--xor-sets">xor_sets</link></methodname>
        <methodparam><parameter role="keyword">compare_set</parameter></methodparam>
      </methodsynopsis>
</classsynopsis>

<programlisting>
<emphasis role="bold">Functions</emphasis>

<methodsynopsis language="python">
    <methodname><link linkend="function-atk--state-type-register">atk.state_type_register</link></methodname>
    <methodparam><parameter role="keyword">name</parameter></methodparam>
  </methodsynopsis><methodsynopsis language="python">
    <methodname><link linkend="function-atk--state-type-get-name">atk.state_type_get_name</link></methodname>
    <methodparam><parameter role="keyword">type</parameter></methodparam>
  </methodsynopsis><methodsynopsis language="python">
    <methodname><link linkend="function-atk--state-type-for-name">atk.state_type_for_name</link></methodname>
    <methodparam><parameter role="keyword">name</parameter></methodparam>
  </methodsynopsis></programlisting>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-atkstateset">atk.StateSet</link>
</synopsis>

  </refsect1>

  <refsect1 id="signal-prototypes-atkstateset">
    <title>atk.StateSet Signal Prototypes</title>

    <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>An <link
    linkend="class-atkstateset"><classname>atk.StateSet</classname></link>
    determines a component's state set. It is composed of a set of ATK
    states specified using the <xref linkend="atk-state-type-constants"
    endterm="atk-state-type-constants-title"></xref>.</para>

  </refsect1>

  <refsect1>
    <title>Constructor</title>
 
    <refsect2 id="constructor-atkstateset">
      <title>atk.StateSet</title>
 
      <programlisting><constructorsynopsis language="python">
        <methodname>atk.StateSet</methodname>
        <methodparam></methodparam>
      </constructorsynopsis></programlisting>
 
      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>a new <link
          linkend="class-atkstateset"><classname>atk.StateSet</classname></link></simpara></listitem>
        </varlistentry>
      </variablelist>
 
      <para>Creates a new empty state set.</para>
 
    </refsect2>
 
  </refsect1>
 
  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-atkstateset--is-empty">
      <title>atk.StateSet.is_empty</title>

      <programlisting><methodsynopsis language="python">
        <methodname>is_empty</methodname>
        <methodparam></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara><literal>True</literal> if the set has no
          states set, otherwise
          <literal>False</literal></simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Checks whether the state set is empty, i.e. has no states
      set.</para>

    </refsect2>

    <refsect2 id="method-atkstateset--add-state">
      <title>atk.StateSet.add_state</title>

      <programlisting><methodsynopsis language="python">
        <methodname>add_state</methodname>
        <methodparam><parameter role="keyword">type</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">type</parameter>&nbsp;:</term>
          <listitem><simpara>one of the <xref
          linkend="atk-state-type-constants"
          endterm="atk-state-type-constants-title"></xref></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara><literal>True</literal> if the state for
          <parameter>type</parameter> is not already in the
          set.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Add a new state for the specified type to the current state set
      if it is not already present.</para>

    </refsect2>

    <refsect2 id="method-atkstateset--add-states">
      <title>atk.StateSet.add_states</title>

      <programlisting><methodsynopsis language="python">
        <methodname>add_states</methodname>
        <methodparam><parameter role="keyword">types</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">types</parameter>&nbsp;:</term>
          <listitem><simpara>a sequence of <xref
          linkend="atk-state-type-constants"
          endterm="atk-state-type-constants-title"></xref>.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Add the states for the specified types to the current state
      set.</para>

    </refsect2>

    <refsect2 id="method-atkstateset--clear-states">
      <title>atk.StateSet.clear_states</title>

      <programlisting><methodsynopsis language="python">
        <methodname>clear_states</methodname>
        <methodparam></methodparam>
      </methodsynopsis></programlisting>

      <para>Removes all states from the state set.</para>

    </refsect2>

    <refsect2 id="method-atkstateset--contains-state">
      <title>atk.StateSet.contains_state</title>

      <programlisting><methodsynopsis language="python">
        <methodname>contains_state</methodname>
        <methodparam><parameter role="keyword">type</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">type</parameter>&nbsp;:</term>
          <listitem><simpara>one of the <xref
          linkend="atk-state-type-constants"
          endterm="atk-state-type-constants-title"></xref>.</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara><literal>True</literal> if
          <parameter>type</parameter> is the state type is in the
          set.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Checks whether the state for the specified type is in the
      specified set.</para>

    </refsect2>

    <refsect2 id="method-atkstateset--contains-states">
      <title>atk.StateSet.contains_states</title>

      <programlisting><methodsynopsis language="python">
        <methodname>contains_states</methodname>
        <methodparam><parameter role="keyword">types</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">types</parameter>&nbsp;:</term>
          <listitem><simpara>a sequence of <xref
          linkend="atk-state-type-constants"
          endterm="atk-state-type-constants-title"></xref></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara><literal>True</literal> if all the states in
          <parameter>types</parameter> are in the set.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Checks whether the states for all the specified types are in the
      specified set.</para>

    </refsect2>

    <refsect2 id="method-atkstateset--remove-state">
      <title>atk.StateSet.remove_state</title>

      <programlisting><methodsynopsis language="python">
        <methodname>remove_state</methodname>
        <methodparam><parameter role="keyword">type</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">type</parameter>&nbsp;:</term>
          <listitem><simpara>one of the <xref
          linkend="atk-state-type-constants"
          endterm="atk-state-type-constants-title"></xref></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara><literal>True</literal> if
          <parameter>type</parameter> was in the set.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Removes the state for the specified type from the state
      set.</para>

    </refsect2>

    <refsect2 id="method-atkstateset--and-sets">
      <title>atk.StateSet.and_sets</title>

      <programlisting><methodsynopsis language="python">
        <methodname>and_sets</methodname>
        <methodparam><parameter role="keyword">compare_set</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">compare_set</parameter>&nbsp;:</term>
          <listitem><simpara>another <link
          linkend="class-atkstateset"><classname>atk.StateSet</classname></link></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>a new <link
          linkend="class-atkstateset"><classname>atk.StateSet</classname></link>
          which is the intersection of the two sets.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Constructs the intersection of the two sets, returning
      <literal>None</literal> if the intersection is empty.</para>

    </refsect2>

    <refsect2 id="method-atkstateset--or-sets">
      <title>atk.StateSet.or_sets</title>

      <programlisting><methodsynopsis language="python">
        <methodname>or_sets</methodname>
        <methodparam><parameter role="keyword">compare_set</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">compare_set</parameter>&nbsp;:</term>
          <listitem><simpara>another <link
          linkend="class-atkstateset"><classname>atk.StateSet</classname></link></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>a new <link
          linkend="class-atkstateset"><classname>atk.StateSet</classname></link>
          which is the union of the two sets, returning
          <literal>None</literal> is empty.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Constructs the union of the two sets.</para>

    </refsect2>

    <refsect2 id="method-atkstateset--xor-sets">
      <title>atk.StateSet.xor_sets</title>

      <programlisting><methodsynopsis language="python">
        <methodname>xor_sets</methodname>
        <methodparam><parameter role="keyword">compare_set</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">compare_set</parameter>&nbsp;:</term>
          <listitem><simpara>another <link
          linkend="class-atkstateset"><classname>atk.StateSet</classname></link></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>a new <link
          linkend="class-atkstateset"><classname>atk.StateSet</classname></link>
          which contains the states which are in exactly one of the two
          sets.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Constructs the exclusive-or of the two sets, returning
      <literal>None</literal> is empty.  The set returned by this operation
      contains the states in exactly one of the two sets.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Functions</title>

    <refsect2 id="function-atk--state-type-register">
      <title>atk.state_type_register</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>atk.state_type_register</methodname>
	  <methodparam><parameter
			 role="keyword">name</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">name</parameter>&nbsp;:</term>
	  <listitem><simpara>a character string describing the new
	  state.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a new state type value for the new
	  state.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>Registers a new object state and adds it to the <xref
      linkend="atk-state-type-constants"
      endterm="atk-state-type-constants-title"></xref>.</para>

    </refsect2>

    <refsect2 id="function-atk--state-type-get-name">
      <title>atk.state_type_get_name</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>atk.state_type_get_name</methodname>
	  <methodparam><parameter
			 role="keyword">type</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">type</parameter>&nbsp;:</term>
	  <listitem><simpara>one of the <xref
	  linkend="atk-state-type-constants"
	  endterm="atk-state-type-constants-title"></xref>.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the string describing the state
	  type</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>Gets the description string describing the state type specified
      by<parameter>type</parameter>.</para>

    </refsect2>

    <refsect2 id="function-atk--state-type-for-name">
      <title>atk.state_type_for_name</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>atk.state_type_for_name</methodname>
	  <methodparam><parameter
			 role="keyword">name</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">name</parameter>&nbsp;:</term>
	  <listitem><simpara>a character string state
	  name</simpara></listitem>
	</varlistentry>
	<varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>one of the <xref
	  linkend="atk-state-type-constants"
	  endterm="atk-state-type-constants-title"></xref>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>Gets the state type corresponding to the description string
      <parameter>name</parameter>.</para>

    </refsect2>

  </refsect1>

</refentry>
