/usr/share/gtk-doc/html/pygtk/class-gtkselectiondata.html is in python-gtk2-doc 2.24.0-4ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.SelectionData</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="prev" href="class-gtkscrolledwindow.html" title="gtk.ScrolledWindow"><link rel="next" href="class-gtkseparator.html" title="gtk.Separator"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.SelectionData</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkscrolledwindow.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkseparator.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.SelectionData"><a name="class-gtkselectiondata"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.SelectionData</h2><p>gtk.SelectionData — an object that stores information about a
selection</p></div><div class="refsect1" title="Synopsis"><a name="id3889965"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.SelectionData</span></span>(<span class="ooclass"><span class="classname">gobject.GBoxed</span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--set" title="gtk.SelectionData.set">set</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>format</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--set-text" title="gtk.SelectionData.set_text">set_text</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>str</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>len</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--get-text" title="gtk.SelectionData.get_text">get_text</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--get-targets" title="gtk.SelectionData.get_targets">get_targets</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--targets-include-text" title="gtk.SelectionData.targets_include_text">targets_include_text</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--tree-set-row-drag-data" title="gtk.SelectionData.tree_set_row_drag_data">tree_set_row_drag_data</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tree_model</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--tree-get-row-drag-data" title="gtk.SelectionData.tree_get_row_drag_data">tree_get_row_drag_data</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--set-pixbuf" title="gtk.SelectionData.set_pixbuf">set_pixbuf</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--get-pixbuf" title="gtk.SelectionData.get_pixbuf">get_pixbuf</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--set-uris" title="gtk.SelectionData.set_uris">set_uris</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uris</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--get-uris" title="gtk.SelectionData.get_uris">get_uris</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--targets-include-image" title="gtk.SelectionData.targets_include_image">targets_include_image</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>writable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--targets-include-rich-text" title="gtk.SelectionData.targets_include_rich_text">targets_include_rich_text</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--targets-include-uri" title="gtk.SelectionData.targets_include_uri">targets_include_uri</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--get-data-type" title="gtk.SelectionData.get_data_type">get_data_type</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--get-display" title="gtk.SelectionData.get_display">get_display</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--get-format" title="gtk.SelectionData.get_format">get_format</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--get-length" title="gtk.SelectionData.get_length">get_length</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--get-target" title="gtk.SelectionData.get_targets">get_target</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
<span class="bold"><strong>Functions</strong></span>
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#function-gtk--selection-owner-set-for-display" title="gtk.selection_owner_set_for_display">gtk.selection_owner_set_for_display</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>selection</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#function-gtk--target-list-add-image-targets" title="gtk.target_list_add_image_targets">gtk.target_list_add_image_targets</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>list</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>writable</code></strong></span><span class="initializer">=False</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#function-gtk--target-list-add-text-targets" title="gtk.target_list_add_text_targets">gtk.target_list_add_text_targets</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>list</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#function-gtk--target-list-add-uri-targets" title="gtk.target_list_add_uri_targets">gtk.target_list_add_uri_targets</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>list</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#function-gtk--target-list-add-rich-text-targets" title="gtk.target_list_add_rich_text_targets">gtk.target_list_add_rich_text_targets</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>list</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>deserializable</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#function-gtk--targets-include-image" title="gtk.targets_include_image">gtk.targets_include_image</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>targets</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>writable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#function-gtk--targets-include-rich-text" title="gtk.targets_include_rich_text">gtk.targets_include_rich_text</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>targets</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#function-gtk--targets-include-text" title="gtk.targets_include_text">gtk.targets_include_text</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>targets</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkselectiondata.html#function-gtk--targets-include-uri" title="gtk.targets_include_uri">gtk.targets_include_uri</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>targets</code></strong></span></span>)</code>
</pre></div><div class="refsect1" title="Attributes"><a name="id3890929"></a><h2>Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"selection"</td><td valign="top">Read</td><td valign="top">A <a class="link" href="class-gdkatom.html" title="gtk.gdk.Atom"><code class="classname">gtk.gdk.Atom</code></a> indicating the selection type (e.g. "PRIMARY").</td></tr><tr valign="top"><td valign="top">"target"</td><td valign="top">Read</td><td valign="top">A <a class="link" href="class-gdkatom.html" title="gtk.gdk.Atom"><code class="classname">gtk.gdk.Atom</code></a> indicating the selection target type (e.g. "TARGETS").</td></tr><tr valign="top"><td valign="top">"type"</td><td valign="top">Read</td><td valign="top">A <a class="link" href="class-gdkatom.html" title="gtk.gdk.Atom"><code class="classname">gtk.gdk.Atom</code></a> indicating the selection data type (e.g. "STRING").</td></tr><tr valign="top"><td valign="top">"format"</td><td valign="top">Read</td><td valign="top">The unit length of the data in bits (e.g. 8 for a
string or 32 of an integer).</td></tr><tr valign="top"><td valign="top">"data"</td><td valign="top">Read</td><td valign="top">The data as a string.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id3891096"></a><h2>Description</h2><p>A <a class="link" href="class-gtkselectiondata.html" title="gtk.SelectionData"><code class="classname">gtk.SelectionData</code></a>
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 <a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--set-text" title="gtk.SelectionData.set_text"><code class="methodname">set_text</code>()</a>,
<a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--get-text" title="gtk.SelectionData.get_text"><code class="methodname">get_text</code>()</a>
and <a class="link" href="class-gtkselectiondata.html#method-gtkselectiondata--get-targets" title="gtk.SelectionData.get_targets"><code class="methodname">get_targets</code>()</a>
methods.</p></div><div class="refsect1" title="Methods"><a name="id3891146"></a><h2>Methods</h2><div class="refsect2" title="gtk.SelectionData.set"><a name="method-gtkselectiondata--set"></a><h3>gtk.SelectionData.set</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>format</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkatom.html" title="gtk.gdk.Atom"><code class="classname">gtk.gdk.Atom</code></a> or string
that specifies a <a class="link" href="class-gdkatom.html" title="gtk.gdk.Atom"><code class="classname">gtk.gdk.Atom</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>format</code></strong> :</span></p></td><td>the number of bits in a
unit</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a string containing the
data</td></tr></tbody></table><p>The <code class="methodname">set</code>() method sets the data for a
selection in the <a class="link" href="class-gtkselectiondata.html" title="gtk.SelectionData"><code class="classname">gtk.SelectionData</code></a>
object. <em class="parameter"><code>data</code></em> is a string containing the data to be
set; <em class="parameter"><code>format</code></em> 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, <em class="parameter"><code>type</code></em> is a <a class="link" href="class-gdkatom.html" title="gtk.gdk.Atom"><code class="classname">gtk.gdk.Atom</code></a> or a
string that specifies a <a class="link" href="class-gdkatom.html" title="gtk.gdk.Atom"><code class="classname">gtk.gdk.Atom</code></a>.</p></div><div class="refsect2" title="gtk.SelectionData.set_text"><a name="method-gtkselectiondata--set-text"></a><h3>gtk.SelectionData.set_text</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_text</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>str</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>len</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>str</code></strong> :</span></p></td><td>a string</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>len</code></strong> :</span></p></td><td>the length of <em class="parameter"><code>str</code></em>, or -1
if <em class="parameter"><code>str</code></em> for the full length.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code>, if the selection was
successfully set; otherwise, <code class="literal">False</code>.</td></tr></tbody></table><p>The <code class="methodname">set_text</code>() method sets the contents
of the selection from the string specified by <em class="parameter"><code>str</code></em>.
The string is converted to the form specified by the
<code class="literal">selection_data.target</code> attribute. This method returns True
if the selection data was successfully set.</p></div><div class="refsect2" title="gtk.SelectionData.get_text"><a name="method-gtkselectiondata--get-text"></a><h3>gtk.SelectionData.get_text</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_text</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the converted text, or
<code class="literal">None</code>.</td></tr></tbody></table><p>The <code class="methodname">get_text</code>() method returns the
contents of the selection data as a string.</p></div><div class="refsect2" title="gtk.SelectionData.get_targets"><a name="method-gtkselectiondata--get-targets"></a><h3>gtk.SelectionData.get_targets</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_targets</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing a list of targets (<a class="link" href="class-gdkatom.html" title="gtk.gdk.Atom"><code class="classname">gtk.gdk.Atom</code></a>s) or
<code class="literal">None</code> if no valid targets are
available.</td></tr></tbody></table><p>The <code class="methodname">get_targets</code>() method returns a
tuple containing a list of valid targets for the selection as a list of
<a class="link" href="class-gdkatom.html" title="gtk.gdk.Atom"><code class="classname">gtk.gdk.Atom</code></a>s or
None if there are no valid targets.</p></div><div class="refsect2" title="gtk.SelectionData.targets_include_text"><a name="method-gtkselectiondata--targets-include-text"></a><h3>gtk.SelectionData.targets_include_text</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">targets_include_text</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the selection data
holds a list of targets, and a suitable target for text is
included.</td></tr></tbody></table><p>The <code class="methodname">targets_include_text</code>() method
returns <code class="literal">True</code> if any of the selection data targets can be
used to provide text.</p></div><div class="refsect2" title="gtk.SelectionData.tree_set_row_drag_data"><a name="method-gtkselectiondata--tree-set-row-drag-data"></a><h3>gtk.SelectionData.tree_set_row_drag_data</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">tree_set_row_drag_data</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tree_model</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>tree_model</code></strong> :</span></p></td><td>a <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>path</code></strong> :</span></p></td><td>a row in
<em class="parameter"><code>tree_model</code></em></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the <a class="link" href="class-gtkselectiondata.html" title="gtk.SelectionData"><code class="classname">gtk.SelectionData</code></a>
had the proper target type to allow us to set a tree
row</td></tr></tbody></table><p>The <code class="methodname">tree_set_row_drag_data</code>() method
sets the selection data of target type <code class="literal">GTK_TREE_MODEL_ROW</code>
for the row (specified by <em class="parameter"><code>path</code></em>) in the <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a>
(specified by tree_model). Normally used in a "<a class="link" href="class-gtkwidget.html#signal-gtkwidget--drag-data-get" title='The "drag-data-get" gtk.Widget Signal'>drag-data-get</a>" signal
handler.</p></div><div class="refsect2" title="gtk.SelectionData.tree_get_row_drag_data"><a name="method-gtkselectiondata--tree-get-row-drag-data"></a><h3>gtk.SelectionData.tree_get_row_drag_data</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">tree_get_row_drag_data</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing a <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a> and
one of its rows.</td></tr></tbody></table><p>The <code class="methodname">tree_get_row_drag_data</code>() method
returns a tuple containing a <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a> and
a row from that <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a>
from selection data of target type <code class="literal">GTK_TREE_MODEL_ROW</code>.
Normally called from a "<a class="link" href="class-gtkwidget.html#signal-gtkwidget--drag-data-received" title='The "drag-data-received" gtk.Widget Signal'>drag-data-received</a>"
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 "<a class="link" href="class-gtkwidget.html#signal-gtkwidget--drag-data-received" title='The "drag-data-received" gtk.Widget Signal'>drag-data-received</a>"
signal handler, you can assume that selection data of type
<code class="literal">"GTK_TREE_MODEL_ROW"</code> is from the current process.</p></div><div class="refsect2" title="gtk.SelectionData.set_pixbuf"><a name="method-gtkselectiondata--set-pixbuf"></a><h3>gtk.SelectionData.set_pixbuf</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_pixbuf</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>pixbuf</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code>, if the selection was
successfully set; otherwise, <code class="literal">False</code>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="methodname">set_pixbuf</code>() method sets the
contents of the selection from the <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a>
specified by <em class="parameter"><code>pixbuf</code></em>. This method returns
<code class="literal">True</code> if the selection data was successfully set.</p></div><div class="refsect2" title="gtk.SelectionData.get_pixbuf"><a name="method-gtkselectiondata--get-pixbuf"></a><h3>gtk.SelectionData.get_pixbuf</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_pixbuf</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>if the selection data contained a recognized
image type and it could be converted to a <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a>, a
newly allocated pixbuf is returned, or
<code class="literal">None</code>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="methodname">get_pixbuf</code>() method returns the
contents of the selection data as a <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a> if
possible.</p></div><div class="refsect2" title="gtk.SelectionData.set_uris"><a name="method-gtkselectiondata--set-uris"></a><h3>gtk.SelectionData.set_uris</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_uris</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uris</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>uris</code></strong> :</span></p></td><td>a list of strings holding
URIs</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code>, if the selection was
successfully set; otherwise, <code class="literal">False</code>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="methodname">set_uris</code>() method sets the contents
of the selection from the list of URIs specified by
<em class="parameter"><code>uris</code></em>. This method returns <code class="literal">True</code> if
the selection data was successfully set.</p></div><div class="refsect2" title="gtk.SelectionData.get_uris"><a name="method-gtkselectiondata--get-uris"></a><h3>gtk.SelectionData.get_uris</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_uris</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of URIs, or
<code class="literal">None</code>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="methodname">get_uris</code>() method returns the
contents of the selection data as a list of URIs.</p></div><div class="refsect2" title="gtk.SelectionData.targets_include_image"><a name="method-gtkselectiondata--targets-include-image"></a><h3>gtk.SelectionData.targets_include_image</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">targets_include_image</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>writable</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>writable</code></strong> :</span></p></td><td>If <code class="literal">True</code> only accept targets
that GTK+ can convert a <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a>
to.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code>, if the selection has a
list of targets that includes an image target.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="methodname">targets_include_image</code>() method
returns <code class="literal">True</code> if the selection targets include an image
target.</p></div><div class="refsect2" title="gtk.SelectionData.targets_include_rich_text"><a name="method-gtkselectiondata--targets-include-rich-text"></a><h3>gtk.SelectionData.targets_include_rich_text</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">targets_include_rich_text</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>buffer</code></strong> :</span></p></td><td>a <a class="link" href="class-gtktextbuffer.html" title="gtk.TextBuffer"><code class="classname">gtk.TextBuffer</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if a suitable target
for rich text is included in the selectiondata
targets.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>Determines if any of the selectiondata targets can be used to
provide rich text.</p></div><div class="refsect2" title="gtk.SelectionData.targets_include_uri"><a name="method-gtkselectiondata--targets-include-uri"></a><h3>gtk.SelectionData.targets_include_uri</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">targets_include_uri</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if a suitable target
for uris is included in the selectiondata
targets.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>Determines if any of the selectiondata targets can be used to
provide a list of URIs.</p></div><div class="refsect2" title="gtk.SelectionData.get_data_type"><a name="method-gtkselectiondata--get-data-type"></a><h3>gtk.SelectionData.get_data_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_data_type</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the data type of the selection.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.14 and above.</p></div><p>Retrieves the data type of the selection.</p></div><div class="refsect2" title="gtk.SelectionData.get_display"><a name="method-gtkselectiondata--get-display"></a><h3>gtk.SelectionData.get_display</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_display</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the display of the selection.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.14 and above.</p></div><p>Retrieves the display of the selection.</p></div><div class="refsect2" title="gtk.SelectionData.get_format"><a name="method-gtkselectiondata--get-format"></a><h3>gtk.SelectionData.get_format</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_format</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the format of the selection.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.14 and above.</p></div><p>Retrieves the format of the selection.</p></div><div class="refsect2" title="gtk.SelectionData.get_length"><a name="method-gtkselectiondata--get-length"></a><h3>gtk.SelectionData.get_length</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_length</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the length of the data of the selection.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.14 and above.</p></div><p>Retrieves the length of the data of the selection.</p></div><div class="refsect2" title="gtk.SelectionData.get_targets"><a name="method-gtkselectiondata--get-target"></a><h3>gtk.SelectionData.get_targets</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_target</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the target of the selection.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.14 and above.</p></div><p>Retrieves the target of the selection.</p></div></div><div class="refsect1" title="Functions"><a name="id3893032"></a><h2>Functions</h2><div class="refsect2" title="gtk.selection_owner_set_for_display"><a name="function-gtk--selection-owner-set-for-display"></a><h3>gtk.selection_owner_set_for_display</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.selection_owner_set_for_display</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>selection</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span><span class="initializer">=0</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>display</code></strong> :</span></p></td><td> the <a class="link" href="class-gdkdisplay.html" title="gtk.gdk.Display"><code class="classname">gtk.gdk.Display</code></a>
where the selection is set</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>widget</code></strong> :</span></p></td><td>the new selection owner (a <a class="link" href="class-gtkwidget.html" title="gtk.Widget"><code class="classname">gtk.Widget</code></a>),
or <code class="literal">None</code>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>selection</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkatom.html" title="gtk.gdk.Atom"><code class="classname">gtk.gdk.Atom</code></a>
or string representing a selection target</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>time</code></strong> :</span></p></td><td>the timestamp used to claim the
selection</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the operation
succeeded</td></tr></tbody></table><p>The <code class="function">gtk.selection_owner_set_for_display</code>()
function claims ownership of the selection specified by
<em class="parameter"><code>selection</code></em> for the widget specified by
<em class="parameter"><code>widget</code></em> on the <a class="link" href="class-gdkdisplay.html" title="gtk.gdk.Display"><code class="classname">gtk.gdk.Display</code></a>
specified by <em class="parameter"><code>display</code></em>. If
<em class="parameter"><code>widget</code></em> is <code class="literal">None</code>, the ownership of
the selection is released.</p></div><div class="refsect2" title="gtk.target_list_add_image_targets"><a name="function-gtk--target-list-add-image-targets"></a><h3>gtk.target_list_add_image_targets</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.target_list_add_image_targets</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>list</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>writable</code></strong></span><span class="initializer">=False</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>list</code></strong> :</span></p></td><td>A sequence of target entry tuples or
<code class="literal">None</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>info</code></strong> :</span></p></td><td>an application specified ID that will be
passed back to the application</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>writable</code></strong> :</span></p></td><td>If <code class="literal">True</code>, only add targets
for image formats that a pixbuf can be converted to.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new list concatenating
<em class="parameter"><code>list</code></em> and the built-in image targets supported by
<a class="link" href="class-gtkselectiondata.html" title="gtk.SelectionData"><code class="classname">gtk.SelectionData</code></a>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">gtk.target_list_add_image_targets</code>()
function adds the image target tuples supported by <a class="link" href="class-gtkselectiondata.html" title="gtk.SelectionData"><code class="classname">gtk.SelectionData</code></a>
to the list of target entry tuples specified by
<em class="parameter"><code>list</code></em>. <code class="literal">info</code> is used as the info
field of the target entry tuples.</p></div><div class="refsect2" title="gtk.target_list_add_text_targets"><a name="function-gtk--target-list-add-text-targets"></a><h3>gtk.target_list_add_text_targets</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.target_list_add_text_targets</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>list</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span><span class="initializer">=0</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>list</code></strong> :</span></p></td><td>A sequence of target entry tuples or
<code class="literal">None</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>info</code></strong> :</span></p></td><td>an application specified ID that will be
passed back to the application</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new list concatenating
<em class="parameter"><code>list</code></em> and the built-in text targets supported by
<a class="link" href="class-gtkselectiondata.html" title="gtk.SelectionData"><code class="classname">gtk.SelectionData</code></a>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">gtk.target_list_add_text_targets</code>()
function adds the text target tuples supported by <a class="link" href="class-gtkselectiondata.html" title="gtk.SelectionData"><code class="classname">gtk.SelectionData</code></a>
to the list of target entry tuples specified by
<em class="parameter"><code>list</code></em>. <code class="literal">info</code> is used as the info
field of the target entry tuples.</p></div><div class="refsect2" title="gtk.target_list_add_uri_targets"><a name="function-gtk--target-list-add-uri-targets"></a><h3>gtk.target_list_add_uri_targets</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.target_list_add_uri_targets</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>list</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span><span class="initializer">=0</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>list</code></strong> :</span></p></td><td>A sequence of target entry tuples or
<code class="literal">None</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>info</code></strong> :</span></p></td><td>an application specified ID that will be
passed back to the application</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new list concatenating
<em class="parameter"><code>list</code></em> and the built-in URI targets supported by
<a class="link" href="class-gtkselectiondata.html" title="gtk.SelectionData"><code class="classname">gtk.SelectionData</code></a>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">gtk.target_list_add_uri_targets</code>()
function adds the URI target tuples supported by <a class="link" href="class-gtkselectiondata.html" title="gtk.SelectionData"><code class="classname">gtk.SelectionData</code></a>
to the list of target entry tuple specified by
<em class="parameter"><code>list</code></em>. <code class="literal">info</code> is used as the info
field of the target entry tuples.</p></div><div class="refsect2" title="gtk.targets_include_uri"><a name="function-gtk--targets-include-uri"></a><h3>gtk.targets_include_uri</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.targets_include_uri</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>targets</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>targets</code></strong> :</span></p></td><td>a list of target strings</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if targets includes a
uri target.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>Determines if any of the targets in
<em class="parameter"><code>targets</code></em> can be used to provide an uri
list.</p></div><div class="refsect2" title="gtk.targets_include_text"><a name="function-gtk--targets-include-text"></a><h3>gtk.targets_include_text</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.targets_include_text</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>targets</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>targets</code></strong> :</span></p></td><td>a list of target strings</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if targets includes a
text target.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>Determines if any of the targets in
<em class="parameter"><code>targets</code></em> can be used to provide text.</p></div><div class="refsect2" title="gtk.targets_include_rich_text"><a name="function-gtk--targets-include-rich-text"></a><h3>gtk.targets_include_rich_text</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.targets_include_rich_text</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>targets</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>targets</code></strong> :</span></p></td><td>a list of target strings</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>buffer</code></strong> :</span></p></td><td>a <a class="link" href="class-gtktextbuffer.html" title="gtk.TextBuffer"><code class="classname">gtk.TextBuffer</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>Determines if any of the targets in
<em class="parameter"><code>targets</code></em> can be used to provide rich
text.</p></div><div class="refsect2" title="gtk.targets_include_image"><a name="function-gtk--targets-include-image"></a><h3>gtk.targets_include_image</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.targets_include_image</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>targets</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>writable</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>targets</code></strong> :</span></p></td><td>a list of target strings</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>writable</code></strong> :</span></p></td><td>if <code class="literal">True</code> accept only targets
for which GTK+ knows how to convert a pixbuf into the
format</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if
<em class="parameter"><code>targets</code></em> include a suitable target for
images</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>Determines if any of the targets in targets can be used to
provide a <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a>.</p></div><div class="refsect2" title="gtk.target_list_add_rich_text_targets"><a name="function-gtk--target-list-add-rich-text-targets"></a><h3>gtk.target_list_add_rich_text_targets</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.target_list_add_rich_text_targets</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>list</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>deserializable</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>list</code></strong> :</span></p></td><td>a list of targets</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>info</code></strong> :</span></p></td><td>an ID that will be passed back to the
application</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>deserializable</code></strong> :</span></p></td><td>if <code class="literal">True</code>, deserializable rich
text formats will be added, otherwise, serializable formats will
be added.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>buffer</code></strong> :</span></p></td><td>a <a class="link" href="class-gtktextbuffer.html" title="gtk.TextBuffer"><code class="classname">gtk.TextBuffer</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a target list with the rich text targets
registered with <em class="parameter"><code>buffer</code></em> appended to
<em class="parameter"><code>list</code></em>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>Appends the rich text targets registered with the <a class="link" href="class-gtktextbuffer.html#method-gtktextbuffer--register-serialize-format" title="gtk.TextBuffer.register_serialize_format"><code class="methodname">register_serialize_format</code>()</a>
or <a class="link" href="class-gtktextbuffer.html#method-gtktextbuffer--register-deserialize-format" title="gtk.TextBuffer.register_deserialize_format"><code class="methodname">register_deserialize_format</code>()</a>
methods to the target list. All targets are added with the same
<em class="parameter"><code>info</code></em>.
list</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtkscrolledwindow.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gtkseparator.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.ScrolledWindow </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.Separator</td></tr></table></div></body></html>
|