File: class-gtkselectiondata.html

package info (click to toggle)
python-gtk2-doc 2.5.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,304 kB
  • ctags: 3,741
  • sloc: makefile: 38
file content (116 lines) | stat: -rw-r--r-- 35,853 bytes parent folder | download
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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.SelectionData</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><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="previous" 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" lang="en"><a name="class-gtkselectiondata"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.SelectionData</h2><p>gtk.SelectionData &#8212; an object that stores information about a
selection</p></div><div class="refsect1" lang="en"><a name="id3499088"></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 href="class-gtkselectiondata.html#method-gtkselectiondata--set" title="gtk.SelectionData.set">set</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>type</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>format</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>data</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkselectiondata.html#method-gtkselectiondata--set-text" title="gtk.SelectionData.set_text">set_text</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>str</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>len</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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 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 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 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"><b class="parameter"><tt>tree_model</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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 href="class-gtkselectiondata.html#method-gtkselectiondata--set-pixbuf" title="gtk.SelectionData.set_pixbuf">set_pixbuf</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>pixbuf</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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 href="class-gtkselectiondata.html#method-gtkselectiondata--set-uris" title="gtk.SelectionData.set_uris">set_uris</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>uris</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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 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"><b class="parameter"><tt>writable</tt></b></span></span>)</code><br></pre></td></tr></table><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
<span class="bold"><b>Functions</b></span>

<code class="methodsynopsis">    def <span class="methodname"><a 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"><b class="parameter"><tt>display</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>widget</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>selection</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>time</tt></b></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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"><b class="parameter"><tt>list</tt></b></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>info</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>writable</tt></b></span><span class="initializer">=FALSE</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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"><b class="parameter"><tt>list</tt></b></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>info</tt></b></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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"><b class="parameter"><tt>list</tt></b></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>info</tt></b></span><span class="initializer">=0</span></span>)</code>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3499519"></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><col><col></colgroup><tbody><tr valign="top"><td valign="top">"selection"</td><td valign="top">Read</td><td valign="top">A <a href="class-gdkatom.html" title="gtk.gdk.Atom"><tt class="classname">gtk.gdk.Atom</tt></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 href="class-gdkatom.html" title="gtk.gdk.Atom"><tt class="classname">gtk.gdk.Atom</tt></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 href="class-gdkatom.html" title="gtk.gdk.Atom"><tt class="classname">gtk.gdk.Atom</tt></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" lang="en"><a name="id3499686"></a><h2>Description</h2><p>A <a href="class-gtkselectiondata.html" title="gtk.SelectionData"><tt class="classname">gtk.SelectionData</tt></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 href="class-gtkselectiondata.html#method-gtkselectiondata--set-text" title="gtk.SelectionData.set_text"><tt class="methodname">set_text</tt>()</a>, 
<a href="class-gtkselectiondata.html#method-gtkselectiondata--get-text" title="gtk.SelectionData.get_text"><tt class="methodname">get_text</tt>()</a> 
and <a href="class-gtkselectiondata.html#method-gtkselectiondata--get-targets" title="gtk.SelectionData.get_targets"><tt class="methodname">get_targets</tt>()</a> 
methods.</p></div><div class="refsect1" lang="en"><a name="id3499736"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkselectiondata--set"></a><h3>gtk.SelectionData.set</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>type</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>format</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>data</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>type</tt></b>:</span></td><td>a <a href="class-gdkatom.html" title="gtk.gdk.Atom"><tt class="classname">gtk.gdk.Atom</tt></a> or string
that specifies a <a href="class-gdkatom.html" title="gtk.gdk.Atom"><tt class="classname">gtk.gdk.Atom</tt></a></td></tr><tr><td><span class="term"><b class="parameter"><tt>format</tt></b>:</span></td><td>the number of bits in a
unit</td></tr><tr><td><span class="term"><b class="parameter"><tt>data</tt></b>:</span></td><td>a string containing the
data</td></tr></tbody></table><p>The <tt class="methodname">set</tt>() method sets the data for a
selection in the <a href="class-gtkselectiondata.html" title="gtk.SelectionData"><tt class="classname">gtk.SelectionData</tt></a>
object. <i class="parameter"><tt>data</tt></i> is a string containing the data to be
set; <i class="parameter"><tt>format</tt></i> 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, <i class="parameter"><tt>type</tt></i> is a <a href="class-gdkatom.html" title="gtk.gdk.Atom"><tt class="classname">gtk.gdk.Atom</tt></a> or a
string that specifies a <a href="class-gdkatom.html" title="gtk.gdk.Atom"><tt class="classname">gtk.gdk.Atom</tt></a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkselectiondata--set-text"></a><h3>gtk.SelectionData.set_text</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_text</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>str</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>len</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>str</tt></b>:</span></td><td>a string</td></tr><tr><td><span class="term"><b class="parameter"><tt>len</tt></b>:</span></td><td>the length of <i class="parameter"><tt>str</tt></i>, or -1
if <i class="parameter"><tt>str</tt></i> for the full length.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt>, if the selection was
successfully set; otherwise, <tt class="literal">FALSE</tt>.</td></tr></tbody></table><p>The <tt class="methodname">set_text</tt>() method sets the contents
of the selection from the string specified by <i class="parameter"><tt>str</tt></i>.
The string is converted to the form specified by the
<tt class="literal">selection_data.target</tt> attribute. This method returns TRUE
if the selection data was successfully set.</p></div><div class="refsect2" lang="en"><a name="method-gtkselectiondata--get-text"></a><h3>gtk.SelectionData.get_text</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_text</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a string containing the converted text, or
<tt class="literal">None</tt>.</td></tr></tbody></table><p>The <tt class="methodname">get_text</tt>() method returns the
contents of the selection data as a string.</p></div><div class="refsect2" lang="en"><a name="method-gtkselectiondata--get-targets"></a><h3>gtk.SelectionData.get_targets</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_targets</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a tuple containing a list of targets (<a href="class-gdkatom.html" title="gtk.gdk.Atom"><tt class="classname">gtk.gdk.Atom</tt></a>s) or
<tt class="literal">None</tt> if no valid targets are
available.</td></tr></tbody></table><p>The <tt class="methodname">get_targets</tt>() method returns a
tuple containing a list of valid targets for the selection as a list of
<a href="class-gdkatom.html" title="gtk.gdk.Atom"><tt class="classname">gtk.gdk.Atom</tt></a>s or
None if there are no valid targets.</p></div><div class="refsect2" lang="en"><a name="method-gtkselectiondata--targets-include-text"></a><h3>gtk.SelectionData.targets_include_text</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">targets_include_text</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the selection data
holds a list of targets, and a suitable target for text is
included.</td></tr></tbody></table><p>The <tt class="methodname">targets_include_text</tt>() method
returns <tt class="literal">TRUE</tt> if any of the selection data targets can be
used to provide text.</p></div><div class="refsect2" lang="en"><a name="method-gtkselectiondata--tree-set-row-drag-data"></a><h3>gtk.SelectionData.tree_set_row_drag_data</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">tree_set_row_drag_data</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tree_model</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>tree_model</tt></b>:</span></td><td>a <a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a></td></tr><tr><td><span class="term"><b class="parameter"><tt>path</tt></b>:</span></td><td>a row in
<i class="parameter"><tt>tree_model</tt></i></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the <a href="class-gtkselectiondata.html" title="gtk.SelectionData"><tt class="classname">gtk.SelectionData</tt></a> 
had the proper target type to allow us to set a tree
row</td></tr></tbody></table><p>The <tt class="methodname">tree_set_row_drag_data</tt>() method
sets the selection data of target type <tt class="literal">GTK_TREE_MODEL_ROW</tt>
for the row (specified by <i class="parameter"><tt>path</tt></i>) in the <a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a>
(specified by tree_model). Normally used in a "<a 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" lang="en"><a name="method-gtkselectiondata--tree-get-row-drag-data"></a><h3>gtk.SelectionData.tree_get_row_drag_data</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">tree_get_row_drag_data</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a tuple containing a <a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a> and
one of its rows.</td></tr></tbody></table><p>The <tt class="methodname">tree_get_row_drag_data</tt>() method
returns a tuple containing a <a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a> and
a row from that <a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a>
from selection data of target type <tt class="literal">GTK_TREE_MODEL_ROW</tt>.
Normally called from a "<a 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 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
<tt class="literal">"GTK_TREE_MODEL_ROW"</tt> is from the current process.</p></div><div class="refsect2" lang="en"><a name="method-gtkselectiondata--set-pixbuf"></a><h3>gtk.SelectionData.set_pixbuf</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_pixbuf</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>pixbuf</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>pixbuf</tt></b>:</span></td><td>a <a href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><tt class="classname">gtk.gdk.Pixbuf</tt></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt>, if the selection was
successfully set; otherwise, <tt class="literal">FALSE</tt>.</td></tr></tbody></table><div class="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 <tt class="methodname">set_pixbuf</tt>() method sets the
contents of the selection from the <a href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><tt class="classname">gtk.gdk.Pixbuf</tt></a>
specified by <i class="parameter"><tt>pixbuf</tt></i>. This method returns
<tt class="literal">TRUE</tt> if the selection data was successfully set.</p></div><div class="refsect2" lang="en"><a name="method-gtkselectiondata--get-pixbuf"></a><h3>gtk.SelectionData.get_pixbuf</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_pixbuf</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>if the selection data contained a recognized
image type and it could be converted to a <a href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><tt class="classname">gtk.gdk.Pixbuf</tt></a>, a
newly allocated pixbuf is returned, or
<tt class="literal">None</tt>.</td></tr></tbody></table><div class="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 <tt class="methodname">get_pixbuf</tt>() method returns the
contents of the selection data as a <a href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><tt class="classname">gtk.gdk.Pixbuf</tt></a> if
possible.</p></div><div class="refsect2" lang="en"><a name="method-gtkselectiondata--set-uris"></a><h3>gtk.SelectionData.set_uris</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_uris</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>uris</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>uris</tt></b>:</span></td><td>a list of strings holding
URIs</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt>, if the selection was
successfully set; otherwise, <tt class="literal">FALSE</tt>.</td></tr></tbody></table><div class="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 <tt class="methodname">set_uris</tt>() method sets the contents
of the selection from the list of URIs specified by
<i class="parameter"><tt>uris</tt></i>. This method returns <tt class="literal">TRUE</tt> if
the selection data was successfully set.</p></div><div class="refsect2" lang="en"><a name="method-gtkselectiondata--get-uris"></a><h3>gtk.SelectionData.get_uris</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_uris</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a list of URIs, or
<tt class="literal">None</tt>.</td></tr></tbody></table><div class="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 <tt class="methodname">get_uris</tt>() method returns the
contents of the selection data as a list or URIs.</p></div><div class="refsect2" lang="en"><a name="method-gtkselectiondata--targets-include-image"></a><h3>gtk.SelectionData.targets_include_image</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">targets_include_image</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>writable</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>writable</tt></b>:</span></td><td>If <tt class="literal">TRUE</tt> only accept targets
that GTK+ can convert a <a href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><tt class="classname">gtk.gdk.Pixbuf</tt></a>
to.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt>, if the selection has a
list of targets that includes an image target.</td></tr></tbody></table><div class="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 <tt class="methodname">targets_include_image</tt>() method
returns <tt class="literal">TRUE</tt> if the selection targets include an image
target.</p></div></div><div class="refsect1" lang="en"><a name="id3500918"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-gtk--selection-owner-set-for-display"></a><h3>gtk.selection_owner_set_for_display</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtk.selection_owner_set_for_display</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>display</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>widget</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>selection</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>time</tt></b></span><span class="initializer">=0</span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>display</tt></b>:</span></td><td> the <a href="class-gdkdisplay.html" title="gtk.gdk.Display"><tt class="classname">gtk.gdk.Display</tt></a>
	  where the selection is set</td></tr><tr><td><span class="term"><b class="parameter"><tt>widget</tt></b>:</span></td><td>the new selection owner (a <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a>),
	  or <tt class="literal">None</tt>.</td></tr><tr><td><span class="term"><b class="parameter"><tt>selection</tt></b>:</span></td><td>a <a href="class-gdkatom.html" title="gtk.gdk.Atom"><tt class="classname">gtk.gdk.Atom</tt></a>
	  or string representing a selection target</td></tr><tr><td><span class="term"><b class="parameter"><tt>time</tt></b>:</span></td><td>the timestamp used to claim the
	  selection</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the operation
	  succeeded</td></tr></tbody></table><p>The <tt class="function">gtk.selection_owner_set_for_display</tt>()
function claims ownership of the selection specified by
<i class="parameter"><tt>selection</tt></i> for the widget specified by
<i class="parameter"><tt>widget</tt></i> on the <a href="class-gdkdisplay.html" title="gtk.gdk.Display"><tt class="classname">gtk.gdk.Display</tt></a>
specified by <i class="parameter"><tt>display</tt></i>. If
<i class="parameter"><tt>widget</tt></i> is <tt class="literal">None</tt>, the ownership of
the selection is released.</p></div><div class="refsect2" lang="en"><a name="function-gtk--target-list-add-image-targets"></a><h3>gtk.target_list_add_image_targets</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtk.target_list_add_image_targets</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>list</tt></b></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>info</tt></b></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>writable</tt></b></span><span class="initializer">=FALSE</span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>list</tt></b>:</span></td><td>A sequence of target entry tuples or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>info</tt></b>:</span></td><td>an application specified ID that will be
passed back to the application</td></tr><tr><td><span class="term"><b class="parameter"><tt>writable</tt></b>:</span></td><td>If <tt class="literal">TRUE</tt>, only add targets
for image formats that a pixbuf can be converted to.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new list concatenating
<i class="parameter"><tt>list</tt></i> and the built-in image targets supported by
<a href="class-gtkselectiondata.html" title="gtk.SelectionData"><tt class="classname">gtk.SelectionData</tt></a>.</td></tr></tbody></table><div class="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 <tt class="function">gtk.target_list_add_image_targets</tt>()
function adds the image target tuples supported by <a href="class-gtkselectiondata.html" title="gtk.SelectionData"><tt class="classname">gtk.SelectionData</tt></a>
to the list of target entry tuples specified by
<i class="parameter"><tt>list</tt></i>. <tt class="literal">info</tt> is used as the info
field of the target entry tuples.</p></div><div class="refsect2" lang="en"><a name="function-gtk--target-list-add-text-targets"></a><h3>gtk.target_list_add_text_targets</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtk.target_list_add_text_targets</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>list</tt></b></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>info</tt></b></span><span class="initializer">=0</span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>list</tt></b>:</span></td><td>A sequence of target entry tuples or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>info</tt></b>:</span></td><td>an application specified ID that will be
passed back to the application</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new list concatenating
<i class="parameter"><tt>list</tt></i> and the built-in text targets supported by
<a href="class-gtkselectiondata.html" title="gtk.SelectionData"><tt class="classname">gtk.SelectionData</tt></a>.</td></tr></tbody></table><div class="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 <tt class="function">gtk.target_list_add_text_targets</tt>()
function adds the text target tuples supported by <a href="class-gtkselectiondata.html" title="gtk.SelectionData"><tt class="classname">gtk.SelectionData</tt></a>
to the list of target entry tuples specified by
<i class="parameter"><tt>list</tt></i>. <tt class="literal">info</tt> is used as the info
field of the target entry tuples.</p></div><div class="refsect2" lang="en"><a name="function-gtk--target-list-add-uri-targets"></a><h3>gtk.target_list_add_uri_targets</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtk.target_list_add_uri_targets</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>list</tt></b></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>info</tt></b></span><span class="initializer">=0</span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>list</tt></b>:</span></td><td>A sequence of target entry tuples or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>info</tt></b>:</span></td><td>an application specified ID that will be
passed back to the application</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new list concatenating
<i class="parameter"><tt>list</tt></i> and the built-in URI targets supported by
<a href="class-gtkselectiondata.html" title="gtk.SelectionData"><tt class="classname">gtk.SelectionData</tt></a>.</td></tr></tbody></table><div class="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 <tt class="function">gtk.target_list_add_uri_targets</tt>()
function adds the URI target tuples supported by <a href="class-gtkselectiondata.html" title="gtk.SelectionData"><tt class="classname">gtk.SelectionData</tt></a>
to the list of target entry tuple specified by
<i class="parameter"><tt>list</tt></i>. <tt class="literal">info</tt> is used as the info
field of the target entry tuples.</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>