<?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-gtkselectiondata">
  <refnamediv>
    <refname>gtk.SelectionData</refname>
    <refpurpose>an object that stores information about a
selection</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.SelectionData</classname></ooclass>
      <ooclass><classname>gobject.GBoxed</classname></ooclass>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkselectiondata--set">set</link></methodname>
	<methodparam><parameter
		       role="keyword">type</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">format</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">data</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkselectiondata--set-text">set_text</link></methodname>
	<methodparam><parameter role="keyword">str</parameter></methodparam>
	<methodparam><parameter role="keyword">len</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkselectiondata--get-text">get_text</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkselectiondata--get-targets">get_targets</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkselectiondata--targets-include-text">targets_include_text</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkselectiondata--tree-set-row-drag-data">tree_set_row_drag_data</link></methodname>
	<methodparam><parameter
		       role="keyword">tree_model</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">path</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkselectiondata--tree-get-row-drag-data">tree_get_row_drag_data</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkselectiondata--set-pixbuf">set_pixbuf</link></methodname>
	<methodparam><parameter role="keyword">pixbuf</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkselectiondata--get-pixbuf">get_pixbuf</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkselectiondata--set-uris">set_uris</link></methodname>
	<methodparam><parameter role="keyword">uris</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkselectiondata--get-uris">get_uris</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkselectiondata--targets-include-image">targets_include_image</link></methodname>
	<methodparam><parameter role="keyword">writable</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkselectiondata--targets-include-rich-text">targets_include_rich_text</link></methodname>
        <methodparam><parameter role="keyword">buffer</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkselectiondata--targets-include-uri">targets_include_uri</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      
      <!-- NOT IMPLEMENTED
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtkselectiondata- -get-data">get_data</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      -->
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtkselectiondata--get-data-type">get_data_type</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtkselectiondata--get-display">get_display</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtkselectiondata--get-format">get_format</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtkselectiondata--get-length">get_length</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtkselectiondata--get-target">get_target</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
    </classsynopsis>

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

<methodsynopsis language="python">
	<methodname><link linkend="function-gtk--selection-owner-set-for-display">gtk.selection_owner_set_for_display</link></methodname>
	<methodparam><parameter role="keyword">display</parameter></methodparam>
	<methodparam><parameter role="keyword">widget</parameter></methodparam>
	<methodparam><parameter role="keyword">selection</parameter></methodparam>
	<methodparam><parameter role="keyword">time</parameter><initializer>0</initializer></methodparam>
      </methodsynopsis><methodsynopsis language="python">
	<methodname><link linkend="function-gtk--target-list-add-image-targets">gtk.target_list_add_image_targets</link></methodname>
	<methodparam><parameter role="keyword">list</parameter><initializer>None</initializer></methodparam>
	<methodparam><parameter role="keyword">info</parameter><initializer>0</initializer></methodparam>
	<methodparam><parameter role="keyword">writable</parameter><initializer>False</initializer></methodparam>
      </methodsynopsis><methodsynopsis language="python">
	<methodname><link linkend="function-gtk--target-list-add-text-targets">gtk.target_list_add_text_targets</link></methodname>
	<methodparam><parameter role="keyword">list</parameter><initializer>None</initializer></methodparam>
	<methodparam><parameter role="keyword">info</parameter><initializer>0</initializer></methodparam>
      </methodsynopsis><methodsynopsis language="python">
	<methodname><link linkend="function-gtk--target-list-add-uri-targets">gtk.target_list_add_uri_targets</link></methodname>
	<methodparam><parameter role="keyword">list</parameter><initializer>None</initializer></methodparam>
	<methodparam><parameter role="keyword">info</parameter><initializer>0</initializer></methodparam>
      </methodsynopsis><methodsynopsis language="python">
	<methodname><link linkend="function-gtk--target-list-add-rich-text-targets">gtk.target_list_add_rich_text_targets</link></methodname>
	<methodparam><parameter role="keyword">list</parameter></methodparam>
	<methodparam><parameter role="keyword">info</parameter></methodparam>
	<methodparam><parameter role="keyword">deserializable</parameter></methodparam>
	<methodparam><parameter role="keyword">buffer</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
	<methodname><link linkend="function-gtk--targets-include-image">gtk.targets_include_image</link></methodname>
	<methodparam><parameter role="keyword">targets</parameter></methodparam>
	<methodparam><parameter role="keyword">writable</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
	<methodname><link linkend="function-gtk--targets-include-rich-text">gtk.targets_include_rich_text</link></methodname>
	<methodparam><parameter role="keyword">targets</parameter></methodparam>
	<methodparam><parameter role="keyword">buffer</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
	<methodname><link linkend="function-gtk--targets-include-text">gtk.targets_include_text</link></methodname>
	<methodparam><parameter role="keyword">targets</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
	<methodname><link linkend="function-gtk--targets-include-uri">gtk.targets_include_uri</link></methodname>
	<methodparam><parameter role="keyword">targets</parameter></methodparam>
      </methodsynopsis>
</programlisting>

  </refsect1>

  <refsect1>
    <title>Attributes</title>

    <blockquote role="properties">
      <informaltable pgwide="1" frame="none">
	<tgroup cols="3">
	<?dbhtml cellpadding="5"?>
	  <colspec column="1" colwidth="1in"/>
	  <colspec column="2" colwidth="1in"/>
	  <colspec column="3" colwidth="4in"/>
	  <tbody>

	    <row valign="top">
	      <entry>"selection"</entry>
	      <entry>Read</entry>
	      <entry>A <link linkend="class-gdkatom"><classname>gtk.gdk.Atom</classname></link> indicating the selection type (e.g. "PRIMARY").</entry>
	    </row>

	    <row valign="top">
	      <entry>"target"</entry>
	      <entry>Read</entry>
	      <entry>A <link linkend="class-gdkatom"><classname>gtk.gdk.Atom</classname></link> indicating the selection target type (e.g. "TARGETS").</entry>
	    </row>

	    <row valign="top">
	      <entry>"type"</entry>
	      <entry>Read</entry>
	      <entry>A <link linkend="class-gdkatom"><classname>gtk.gdk.Atom</classname></link> indicating the selection data type (e.g. "STRING").</entry>
	    </row>

	    <row valign="top">
	      <entry>"format"</entry>
	      <entry>Read</entry>
	      <entry>The unit length of the data in bits (e.g. 8 for a
string or 32 of an integer).</entry>
	    </row>

	    <row valign="top">
	      <entry>"data"</entry>
	      <entry>Read</entry>
	      <entry>The data as a string.</entry>
	    </row>

	</tbody>
      </tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>A <link
linkend="class-gtkselectiondata"><classname>gtk.SelectionData</classname></link> 
object is used to store information about a chunk of data associated with a
selection. In PyGTK the selection data is always a string so the application
will have to provide functions to convert the data to and from a string to
support data types other than strings and targets. The string and targets
types are directly supported using the <link
linkend="method-gtkselectiondata--set-text"><methodname>set_text</methodname>()</link>, 
<link
linkend="method-gtkselectiondata--get-text"><methodname>get_text</methodname>()</link> 
and <link
linkend="method-gtkselectiondata--get-targets"><methodname>get_targets</methodname>()</link> 
methods.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-gtkselectiondata--set">
      <title>gtk.SelectionData.set</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set</methodname>
	  <methodparam><parameter
			 role="keyword">type</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">format</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">data</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">type</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gdkatom"><classname>gtk.gdk.Atom</classname></link> or string
that specifies a <link
linkend="class-gdkatom"><classname>gtk.gdk.Atom</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">format</parameter>&nbsp;:</term>
	  <listitem><simpara>the number of bits in a
unit</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">data</parameter>&nbsp;:</term>
	  <listitem><simpara>a string containing the
data</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set</methodname>() method sets the data for a
selection in the <link
linkend="class-gtkselectiondata"><classname>gtk.SelectionData</classname></link>
object. <parameter>data</parameter> is a string containing the data to be
set; <parameter>format</parameter> is the number of bits in a unit of the
data (e.g. integer data has a format of 32 on most systems; string data
format is 8); and, <parameter>type</parameter> is a <link
linkend="class-gdkatom"><classname>gtk.gdk.Atom</classname></link> or a
string that specifies a <link
linkend="class-gdkatom"><classname>gtk.gdk.Atom</classname></link>.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--set-text">
      <title>gtk.SelectionData.set_text</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_text</methodname>
	  <methodparam><parameter
			 role="keyword">str</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">len</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">str</parameter>&nbsp;:</term>
	  <listitem><simpara>a string</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">len</parameter>&nbsp;:</term>
	  <listitem><simpara>the length of <parameter>str</parameter>, or -1
if <parameter>str</parameter> for the full length.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal>, if the selection was
successfully set; otherwise, <literal>False</literal>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_text</methodname>() method sets the contents
of the selection from the string specified by <parameter>str</parameter>.
The string is converted to the form specified by the
<literal>selection_data.target</literal> attribute. This method returns True
if the selection data was successfully set.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--get-text">
      <title>gtk.SelectionData.get_text</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_text</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a string containing the converted text, or
<literal>None</literal>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_text</methodname>() method returns the
contents of the selection data as a string.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--get-targets">
      <title>gtk.SelectionData.get_targets</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_targets</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a tuple containing a list of targets (<link
linkend="class-gdkatom"><classname>gtk.gdk.Atom</classname></link>s) or
<literal>None</literal> if no valid targets are
available.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_targets</methodname>() method returns a
tuple containing a list of valid targets for the selection as a list of
<link linkend="class-gdkatom"><classname>gtk.gdk.Atom</classname></link>s or
None if there are no valid targets.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--targets-include-text">
      <title>gtk.SelectionData.targets_include_text</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>targets_include_text</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the selection data
holds a list of targets, and a suitable target for text is
included.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>targets_include_text</methodname>() method
returns <literal>True</literal> if any of the selection data targets can be
used to provide text.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--tree-set-row-drag-data">
      <title>gtk.SelectionData.tree_set_row_drag_data</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>tree_set_row_drag_data</methodname>
	  <methodparam><parameter
			 role="keyword">tree_model</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">path</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">tree_model</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktreemodel"><classname>gtk.TreeModel</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">path</parameter>&nbsp;:</term>
	  <listitem><simpara>a row in
<parameter>tree_model</parameter></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the <link
linkend="class-gtkselectiondata"><classname>gtk.SelectionData</classname></link> 
had the proper target type to allow us to set a tree
row</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>tree_set_row_drag_data</methodname>() method
sets the selection data of target type <literal>GTK_TREE_MODEL_ROW</literal>
for the row (specified by <parameter>path</parameter>) in the <link
linkend="class-gtktreemodel"><classname>gtk.TreeModel</classname></link>
(specified by tree_model). Normally used in a "<link
linkend="signal-gtkwidget--drag-data-get">drag-data-get</link>" signal
handler.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--tree-get-row-drag-data">
      <title>gtk.SelectionData.tree_get_row_drag_data</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>tree_get_row_drag_data</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a tuple containing a <link
linkend="class-gtktreemodel"><classname>gtk.TreeModel</classname></link> and
one of its rows.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>tree_get_row_drag_data</methodname>() method
returns a tuple containing a <link
linkend="class-gtktreemodel"><classname>gtk.TreeModel</classname></link> and
a row from that <link
linkend="class-gtktreemodel"><classname>gtk.TreeModel</classname></link>
from selection data of target type <literal>GTK_TREE_MODEL_ROW</literal>.
Normally called from a "<link
linkend="signal-gtkwidget--drag-data-received">drag-data-received</link>"
signal handler. This method can only be used if the selection data
originates from the same process that's calling this method, because a
pointer to the tree model is being passed around. In the "<link
linkend="signal-gtkwidget--drag-data-received">drag-data-received</link>"
signal handler, you can assume that selection data of type
<literal>"GTK_TREE_MODEL_ROW"</literal> is from the current process.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--set-pixbuf">
      <title>gtk.SelectionData.set_pixbuf</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_pixbuf</methodname>
	  <methodparam><parameter
			 role="keyword">pixbuf</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">pixbuf</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gdkpixbuf"><classname>gtk.gdk.Pixbuf</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal>, if the selection was
successfully set; otherwise, <literal>False</literal>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.6 and above.</para>
      </note>

      <para>The <methodname>set_pixbuf</methodname>() method sets the
contents of the selection from the <link
linkend="class-gdkpixbuf"><classname>gtk.gdk.Pixbuf</classname></link>
specified by <parameter>pixbuf</parameter>. This method returns
<literal>True</literal> if the selection data was successfully set.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--get-pixbuf">
      <title>gtk.SelectionData.get_pixbuf</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_pixbuf</methodname>
	  <methodparam></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>if the selection data contained a recognized
image type and it could be converted to a <link
linkend="class-gdkpixbuf"><classname>gtk.gdk.Pixbuf</classname></link>, a
newly allocated pixbuf is returned, or
<literal>None</literal>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.6 and above.</para>
      </note>

      <para>The <methodname>get_pixbuf</methodname>() method returns the
contents of the selection data as a <link
linkend="class-gdkpixbuf"><classname>gtk.gdk.Pixbuf</classname></link> if
possible.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--set-uris">
      <title>gtk.SelectionData.set_uris</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_uris</methodname>
	  <methodparam><parameter
			 role="keyword">uris</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">uris</parameter>&nbsp;:</term>
	  <listitem><simpara>a list of strings holding
URIs</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal>, if the selection was
successfully set; otherwise, <literal>False</literal>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.6 and above.</para>
      </note>

      <para>The <methodname>set_uris</methodname>() method sets the contents
of the selection from the list of URIs specified by
<parameter>uris</parameter>. This method returns <literal>True</literal> if
the selection data was successfully set.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--get-uris">
      <title>gtk.SelectionData.get_uris</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_uris</methodname>
	  <methodparam></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a list of URIs, or
<literal>None</literal>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.6 and above.</para>
      </note>

      <para>The <methodname>get_uris</methodname>() method returns the
contents of the selection data as a list of URIs.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--targets-include-image">
      <title>gtk.SelectionData.targets_include_image</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>targets_include_image</methodname>
	  <methodparam><parameter
			 role="keyword">writable</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">writable</parameter>&nbsp;:</term>
	  <listitem><simpara>If <literal>True</literal> only accept targets
that GTK+ can convert a <link
linkend="class-gdkpixbuf"><classname>gtk.gdk.Pixbuf</classname></link>
to.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal>, if the selection has a
list of targets that includes an image target.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.6 and above.</para>
      </note>

      <para>The <methodname>targets_include_image</methodname>() method
returns <literal>True</literal> if the selection targets include an image
target.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--targets-include-rich-text">
      <title>gtk.SelectionData.targets_include_rich_text</title>

      <programlisting><methodsynopsis language="python">
        <methodname>targets_include_rich_text</methodname>
        <methodparam><parameter role="keyword">buffer</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">buffer</parameter>&nbsp;:</term>
          <listitem><simpara>a <link
          linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara><literal>True</literal> if a suitable target
          for rich text is included in the selectiondata
          targets.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>Determines if any of the selectiondata targets can be used to
      provide rich text.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--targets-include-uri">
      <title>gtk.SelectionData.targets_include_uri</title>

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

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara><literal>True</literal> if a suitable target
          for uris is included in the selectiondata
          targets.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.10 and above.</para>
      </note>

      <para>Determines if any of the selectiondata targets can be used to
      provide a list of URIs.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--get-data-type">
      <title>gtk.SelectionData.get_data_type</title>

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

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the data type of the selection.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.14 and above.</para>
      </note>

      <para>Retrieves the data type of the selection.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--get-display">
      <title>gtk.SelectionData.get_display</title>

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

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the display of the selection.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.14 and above.</para>
      </note>

      <para>Retrieves the display of the selection.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--get-format">
      <title>gtk.SelectionData.get_format</title>

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

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the format of the selection.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.14 and above.</para>
      </note>

      <para>Retrieves the format of the selection.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--get-length">
      <title>gtk.SelectionData.get_length</title>

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

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the length of the data of the selection.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.14 and above.</para>
      </note>

      <para>Retrieves the length of the data of the selection.</para>

    </refsect2>

    <refsect2 id="method-gtkselectiondata--get-target">
      <title>gtk.SelectionData.get_targets</title>

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

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the target of the selection.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.14 and above.</para>
      </note>

      <para>Retrieves the target of the selection.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Functions</title>

    <refsect2 id="function-gtk--selection-owner-set-for-display">
      <title>gtk.selection_owner_set_for_display</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>gtk.selection_owner_set_for_display</methodname>
	  <methodparam><parameter
			 role="keyword">display</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">widget</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">selection</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">time</parameter><initializer>0</initializer></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">display</parameter>&nbsp;:</term>
	  <listitem><simpara> the <link
	  linkend="class-gdkdisplay"><classname>gtk.gdk.Display</classname></link>
	  where the selection is set</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">widget</parameter>&nbsp;:</term>
	  <listitem><simpara>the new selection owner (a <link
	  linkend="class-gtkwidget"><classname>gtk.Widget</classname></link>),
	  or <literal>None</literal>.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
	  role="keyword">selection</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
	  linkend="class-gdkatom"><classname>gtk.gdk.Atom</classname></link>
	  or string representing a selection target</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">time</parameter>&nbsp;:</term>
	  <listitem><simpara>the timestamp used to claim the
	  selection</simpara></listitem>
	</varlistentry>
	<varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the operation
	  succeeded</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <function>gtk.selection_owner_set_for_display</function>()
function claims ownership of the selection specified by
<parameter>selection</parameter> for the widget specified by
<parameter>widget</parameter> on the <link
linkend="class-gdkdisplay"><classname>gtk.gdk.Display</classname></link>
specified by <parameter>display</parameter>. If
<parameter>widget</parameter> is <literal>None</literal>, the ownership of
the selection is released.</para>

    </refsect2>

    <refsect2 id="function-gtk--target-list-add-image-targets">
      <title>gtk.target_list_add_image_targets</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>gtk.target_list_add_image_targets</methodname>
	  <methodparam><parameter
			 role="keyword">list</parameter><initializer>None</initializer></methodparam>
	  <methodparam><parameter
			 role="keyword">info</parameter><initializer>0</initializer></methodparam>
	<methodparam><parameter role="keyword">writable</parameter><initializer>False</initializer></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">list</parameter>&nbsp;:</term>
	  <listitem><simpara>A sequence of target entry tuples or
<literal>None</literal></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">info</parameter>&nbsp;:</term>
	  <listitem><simpara>an application specified ID that will be
passed back to the application</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">writable</parameter>&nbsp;:</term>
	  <listitem><simpara>If <literal>True</literal>, only add targets
for image formats that a pixbuf can be converted to.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a new list concatenating
<parameter>list</parameter> and the built-in image targets supported by
<link
linkend="class-gtkselectiondata"><classname>gtk.SelectionData</classname></link>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
        <para>This function is available in PyGTK 2.6 and above.</para>
      </note>

      <para>The <function>gtk.target_list_add_image_targets</function>()
function adds the image target tuples supported by <link
linkend="class-gtkselectiondata"><classname>gtk.SelectionData</classname></link>
to the list of target entry tuples specified by
<parameter>list</parameter>. <literal>info</literal> is used as the info
field of the target entry tuples.</para>

    </refsect2>

    <refsect2 id="function-gtk--target-list-add-text-targets">
      <title>gtk.target_list_add_text_targets</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>gtk.target_list_add_text_targets</methodname>
	  <methodparam><parameter
			 role="keyword">list</parameter><initializer>None</initializer></methodparam>
	  <methodparam><parameter
			 role="keyword">info</parameter><initializer>0</initializer></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">list</parameter>&nbsp;:</term>
	  <listitem><simpara>A sequence of target entry tuples or
<literal>None</literal></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">info</parameter>&nbsp;:</term>
	  <listitem><simpara>an application specified ID that will be
passed back to the application</simpara></listitem>
	</varlistentry>
	<varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a new list concatenating
<parameter>list</parameter> and the built-in text targets supported by
<link
linkend="class-gtkselectiondata"><classname>gtk.SelectionData</classname></link>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
        <para>This function is available in PyGTK 2.6 and above.</para>
      </note>

      <para>The <function>gtk.target_list_add_text_targets</function>()
function adds the text target tuples supported by <link
linkend="class-gtkselectiondata"><classname>gtk.SelectionData</classname></link>
to the list of target entry tuples specified by
<parameter>list</parameter>. <literal>info</literal> is used as the info
field of the target entry tuples.</para>

    </refsect2>

    <refsect2 id="function-gtk--target-list-add-uri-targets">
      <title>gtk.target_list_add_uri_targets</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>gtk.target_list_add_uri_targets</methodname>
	  <methodparam><parameter
			 role="keyword">list</parameter><initializer>None</initializer></methodparam>
	  <methodparam><parameter
			 role="keyword">info</parameter><initializer>0</initializer></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">list</parameter>&nbsp;:</term>
	  <listitem><simpara>A sequence of target entry tuples or
<literal>None</literal></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">info</parameter>&nbsp;:</term>
	  <listitem><simpara>an application specified ID that will be
passed back to the application</simpara></listitem>
	</varlistentry>
	<varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a new list concatenating
<parameter>list</parameter> and the built-in URI targets supported by
<link
linkend="class-gtkselectiondata"><classname>gtk.SelectionData</classname></link>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
        <para>This function is available in PyGTK 2.6 and above.</para>
      </note>

      <para>The <function>gtk.target_list_add_uri_targets</function>()
function adds the URI target tuples supported by <link
linkend="class-gtkselectiondata"><classname>gtk.SelectionData</classname></link>
to the list of target entry tuple specified by
<parameter>list</parameter>. <literal>info</literal> is used as the info
field of the target entry tuples.</para>

    </refsect2>

    <refsect2 id="function-gtk--targets-include-uri">
      <title>gtk.targets_include_uri</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>gtk.targets_include_uri</methodname>
	  <methodparam><parameter
			 role="keyword">targets</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">targets</parameter>&nbsp;:</term>
	  <listitem><simpara>a list of target strings</simpara></listitem>
	</varlistentry>
	<varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if targets includes a
	  uri target.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
        <para>This function is available in PyGTK 2.10 and above.</para>
      </note>

      <para>Determines if any of the targets in
      <parameter>targets</parameter> can be used to provide an uri
      list.</para>

    </refsect2>

    <refsect2 id="function-gtk--targets-include-text">
      <title>gtk.targets_include_text</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>gtk.targets_include_text</methodname>
	  <methodparam><parameter
			 role="keyword">targets</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">targets</parameter>&nbsp;:</term>
	  <listitem><simpara>a list of target strings</simpara></listitem>
	</varlistentry>
	<varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if targets includes a
	  text target.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
        <para>This function is available in PyGTK 2.10 and above.</para>
      </note>

      <para>Determines if any of the targets in
      <parameter>targets</parameter> can be used to provide text.</para>

    </refsect2>

    <refsect2 id="function-gtk--targets-include-rich-text">
      <title>gtk.targets_include_rich_text</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>gtk.targets_include_rich_text</methodname>
	  <methodparam><parameter
			 role="keyword">targets</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">buffer</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">targets</parameter>&nbsp;:</term>
	  <listitem><simpara>a list of target strings</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">buffer</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
	  linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara></simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
        <para>This function is available in PyGTK 2.10 and above.</para>
      </note>

      <para>Determines if any of the targets in
      <parameter>targets</parameter> can be used to provide rich
      text.</para>

    </refsect2>

    <refsect2 id="function-gtk--targets-include-image">
      <title>gtk.targets_include_image</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>gtk.targets_include_image</methodname>
	  <methodparam><parameter
			 role="keyword">targets</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">writable</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">targets</parameter>&nbsp;:</term>
	  <listitem><simpara>a list of target strings</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">writable</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal> accept only targets
	  for which GTK+ knows how to convert a pixbuf into the
	  format</simpara></listitem>
	</varlistentry>
	<varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if
	  <parameter>targets</parameter> include a suitable target for
	  images</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
        <para>This function is available in PyGTK 2.10 and above.</para>
      </note>

      <para>Determines if any of the targets in targets can be used to
      provide a <link
      linkend="class-gdkpixbuf"><classname>gtk.gdk.Pixbuf</classname></link>.</para>

    </refsect2>

    <refsect2 id="function-gtk--target-list-add-rich-text-targets">
      <title>gtk.target_list_add_rich_text_targets</title>

      <programlisting><methodsynopsis language="python">
	<methodname>gtk.target_list_add_rich_text_targets</methodname>
	<methodparam><parameter role="keyword">list</parameter></methodparam>
	<methodparam><parameter role="keyword">info</parameter></methodparam>
	<methodparam><parameter role="keyword">deserializable</parameter></methodparam>
	<methodparam><parameter role="keyword">buffer</parameter></methodparam>
      </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">list</parameter>&nbsp;:</term>
	  <listitem><simpara>a list of targets</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">info</parameter>&nbsp;:</term>
	  <listitem><simpara>an ID that will be passed back to the
	  application</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">deserializable</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal>, deserializable rich
	  text formats will be added, otherwise, serializable formats will
	  be added.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">buffer</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a target list with the rich text targets
	  registered with <parameter>buffer</parameter> appended to
	  <parameter>list</parameter>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
        <para>This function is available in PyGTK 2.10 and above.</para>
      </note>

      <para>Appends the rich text targets registered with the <link
      linkend="method-gtktextbuffer--register-serialize-format"><methodname>register_serialize_format</methodname>()</link>
      or <link
      linkend="method-gtktextbuffer--register-deserialize-format"><methodname>register_deserialize_format</methodname>()</link>
      methods to the target list. All targets are added with the same
      <parameter>info</parameter>.

list</para>

    </refsect2>

  </refsect1>

</refentry>
