~ubuntu-branches/ubuntu/utopic/rhythmbox/utopic-proposed

« back to all changes in this revision

Viewing changes to doc/reference/html/rhythmbox-rb-tree-dnd.html

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2014-04-03 17:23:01 UTC
  • mfrom: (1.3.5)
  • Revision ID: package-import@ubuntu.com-20140403172301-1fd16h8r1nr8ytno
Tags: 3.0.2-0ubuntu1
* New upstream bugfix version (lp: #1296334)
* Clean patches included in the update
* debian/librhythmbox-core8.symbols:
  - new version update

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
<link rel="up" href="ch02.html" title="Lib">
9
9
<link rel="prev" href="RBStringValueMap.html" title="RBStringValueMap">
10
10
<link rel="next" href="rhythmbox-rb-util.html" title="rb-util">
11
 
<meta name="generator" content="GTK-Doc V1.19.1 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.20.1 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
</head>
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
 
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
16
 
<td width="100%" align="left">
17
 
<a href="#" class="shortcut">Top</a>
18
 
                   | 
19
 
                  <a href="#rhythmbox-rb-tree-dnd.description" class="shortcut">Description</a>
20
 
                   | 
21
 
                  <a href="#rhythmbox-rb-tree-dnd.object-hierarchy" class="shortcut">Object Hierarchy</a>
22
 
                   | 
23
 
                  <a href="#rhythmbox-rb-tree-dnd.implementations" class="shortcut">Known Implementations</a>
 
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
 
16
<td width="100%" align="left" class="shortcuts">
 
17
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
 
18
                  <a href="#rhythmbox-rb-tree-dnd.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
 
19
                  <a href="#rhythmbox-rb-tree-dnd.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_implementations">  <span class="dim">|</span> 
 
20
                  <a href="#rhythmbox-rb-tree-dnd.implementations" class="shortcut">Known Implementations</a></span>
24
21
</td>
25
22
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
26
23
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
34
31
<h2><span class="refentrytitle"><a name="rhythmbox-rb-tree-dnd.top_of_page"></a>rb-tree-dnd</span></h2>
35
32
<p>rb-tree-dnd — multi-row drag and drop support for GtkTreeViews</p>
36
33
</td>
37
 
<td valign="top" align="right"></td>
 
34
<td class="gallery_image" valign="top" align="right"></td>
38
35
</tr></table></div>
39
 
<div class="refsynopsisdiv">
40
 
<a name="rhythmbox-rb-tree-dnd.synopsis"></a><h2>Synopsis</h2>
41
 
<a name="RbTreeDragSource"></a><a name="RbTreeDragDest"></a><pre class="synopsis">                    <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource-struct" title="RbTreeDragSource">RbTreeDragSource</a>;
42
 
struct              <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSourceIface" title="struct RbTreeDragSourceIface">RbTreeDragSourceIface</a>;
43
 
                    <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest-struct" title="RbTreeDragDest">RbTreeDragDest</a>;
44
 
struct              <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDestIface" title="struct RbTreeDragDestIface">RbTreeDragDestIface</a>;
45
 
enum                <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDestFlag" title="enum RbTreeDestFlag">RbTreeDestFlag</a>;
46
 
<span class="returnvalue">gboolean</span>            <a class="link" href="rhythmbox-rb-tree-dnd.html#rb-tree-drag-source-row-draggable" title="rb_tree_drag_source_row_draggable ()">rb_tree_drag_source_row_draggable</a>   (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> *drag_source</code></em>,
47
 
                                                         <em class="parameter"><code><span class="type">GList</span> *path_list</code></em>);
48
 
<span class="returnvalue">gboolean</span>            <a class="link" href="rhythmbox-rb-tree-dnd.html#rb-tree-drag-source-drag-data-delete" title="rb_tree_drag_source_drag_data_delete ()">rb_tree_drag_source_drag_data_delete</a>
49
 
                                                        (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> *drag_source</code></em>,
50
 
                                                         <em class="parameter"><code><span class="type">GList</span> *path_list</code></em>);
51
 
<span class="returnvalue">gboolean</span>            <a class="link" href="rhythmbox-rb-tree-dnd.html#rb-tree-drag-source-drag-data-get" title="rb_tree_drag_source_drag_data_get ()">rb_tree_drag_source_drag_data_get</a>   (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> *drag_source</code></em>,
52
 
                                                         <em class="parameter"><code><span class="type">GList</span> *path_list</code></em>,
53
 
                                                         <em class="parameter"><code><span class="type">GtkSelectionData</span> *selection_data</code></em>);
54
 
<span class="returnvalue">gboolean</span>            <a class="link" href="rhythmbox-rb-tree-dnd.html#rb-tree-drag-dest-drag-data-received" title="rb_tree_drag_dest_drag_data_received ()">rb_tree_drag_dest_drag_data_received</a>
55
 
                                                        (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a> *drag_dest</code></em>,
56
 
                                                         <em class="parameter"><code><span class="type">GtkTreePath</span> *dest</code></em>,
57
 
                                                         <em class="parameter"><code><span class="type">GtkTreeViewDropPosition</span> pos</code></em>,
58
 
                                                         <em class="parameter"><code><span class="type">GtkSelectionData</span> *selection_data</code></em>);
59
 
<span class="returnvalue">gboolean</span>            <a class="link" href="rhythmbox-rb-tree-dnd.html#rb-tree-drag-dest-row-drop-possible" title="rb_tree_drag_dest_row_drop_possible ()">rb_tree_drag_dest_row_drop_possible</a> (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a> *drag_dest</code></em>,
60
 
                                                         <em class="parameter"><code><span class="type">GtkTreePath</span> *dest_path</code></em>,
61
 
                                                         <em class="parameter"><code><span class="type">GtkTreeViewDropPosition</span> pos</code></em>,
62
 
                                                         <em class="parameter"><code><span class="type">GtkSelectionData</span> *selection_data</code></em>);
63
 
<span class="returnvalue">gboolean</span>            <a class="link" href="rhythmbox-rb-tree-dnd.html#rb-tree-drag-dest-row-drop-position" title="rb_tree_drag_dest_row_drop_position ()">rb_tree_drag_dest_row_drop_position</a> (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a> *drag_dest</code></em>,
64
 
                                                         <em class="parameter"><code><span class="type">GtkTreePath</span> *dest_path</code></em>,
65
 
                                                         <em class="parameter"><code><span class="type">GList</span> *targets</code></em>,
66
 
                                                         <em class="parameter"><code><span class="type">GtkTreeViewDropPosition</span> *pos</code></em>);
67
 
<span class="returnvalue">void</span>                <a class="link" href="rhythmbox-rb-tree-dnd.html#rb-tree-dnd-add-drag-dest-support" title="rb_tree_dnd_add_drag_dest_support ()">rb_tree_dnd_add_drag_dest_support</a>   (<em class="parameter"><code><span class="type">GtkTreeView</span> *tree_view</code></em>,
68
 
                                                         <em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDestFlag" title="enum RbTreeDestFlag"><span class="type">RbTreeDestFlag</span></a> flags</code></em>,
69
 
                                                         <em class="parameter"><code>const <span class="type">GtkTargetEntry</span> *targets</code></em>,
70
 
                                                         <em class="parameter"><code><span class="type">gint</span> n_targets</code></em>,
71
 
                                                         <em class="parameter"><code><span class="type">GdkDragAction</span> actions</code></em>);
72
 
<span class="returnvalue">void</span>                <a class="link" href="rhythmbox-rb-tree-dnd.html#rb-tree-dnd-add-drag-source-support" title="rb_tree_dnd_add_drag_source_support ()">rb_tree_dnd_add_drag_source_support</a> (<em class="parameter"><code><span class="type">GtkTreeView</span> *tree_view</code></em>,
73
 
                                                         <em class="parameter"><code><span class="type">GdkModifierType</span> start_button_mask</code></em>,
74
 
                                                         <em class="parameter"><code>const <span class="type">GtkTargetEntry</span> *targets</code></em>,
75
 
                                                         <em class="parameter"><code><span class="type">gint</span> n_targets</code></em>,
76
 
                                                         <em class="parameter"><code><span class="type">GdkDragAction</span> actions</code></em>);
77
 
</pre>
 
36
<div class="refsect1">
 
37
<a name="rhythmbox-rb-tree-dnd.functions"></a><h2>Functions</h2>
 
38
<div class="informaltable"><table width="100%" border="0">
 
39
<colgroup>
 
40
<col width="150px" class="functions_return">
 
41
<col class="functions_name">
 
42
</colgroup>
 
43
<tbody>
 
44
<tr>
 
45
<td class="function_type">
 
46
<span class="returnvalue">gboolean</span>
 
47
</td>
 
48
<td class="function_name">
 
49
<a class="link" href="rhythmbox-rb-tree-dnd.html#rb-tree-drag-source-row-draggable" title="rb_tree_drag_source_row_draggable ()">rb_tree_drag_source_row_draggable</a> <span class="c_punctuation">()</span>
 
50
</td>
 
51
</tr>
 
52
<tr>
 
53
<td class="function_type">
 
54
<span class="returnvalue">gboolean</span>
 
55
</td>
 
56
<td class="function_name">
 
57
<a class="link" href="rhythmbox-rb-tree-dnd.html#rb-tree-drag-source-drag-data-delete" title="rb_tree_drag_source_drag_data_delete ()">rb_tree_drag_source_drag_data_delete</a> <span class="c_punctuation">()</span>
 
58
</td>
 
59
</tr>
 
60
<tr>
 
61
<td class="function_type">
 
62
<span class="returnvalue">gboolean</span>
 
63
</td>
 
64
<td class="function_name">
 
65
<a class="link" href="rhythmbox-rb-tree-dnd.html#rb-tree-drag-source-drag-data-get" title="rb_tree_drag_source_drag_data_get ()">rb_tree_drag_source_drag_data_get</a> <span class="c_punctuation">()</span>
 
66
</td>
 
67
</tr>
 
68
<tr>
 
69
<td class="function_type">
 
70
<span class="returnvalue">gboolean</span>
 
71
</td>
 
72
<td class="function_name">
 
73
<a class="link" href="rhythmbox-rb-tree-dnd.html#rb-tree-drag-dest-drag-data-received" title="rb_tree_drag_dest_drag_data_received ()">rb_tree_drag_dest_drag_data_received</a> <span class="c_punctuation">()</span>
 
74
</td>
 
75
</tr>
 
76
<tr>
 
77
<td class="function_type">
 
78
<span class="returnvalue">gboolean</span>
 
79
</td>
 
80
<td class="function_name">
 
81
<a class="link" href="rhythmbox-rb-tree-dnd.html#rb-tree-drag-dest-row-drop-possible" title="rb_tree_drag_dest_row_drop_possible ()">rb_tree_drag_dest_row_drop_possible</a> <span class="c_punctuation">()</span>
 
82
</td>
 
83
</tr>
 
84
<tr>
 
85
<td class="function_type">
 
86
<span class="returnvalue">gboolean</span>
 
87
</td>
 
88
<td class="function_name">
 
89
<a class="link" href="rhythmbox-rb-tree-dnd.html#rb-tree-drag-dest-row-drop-position" title="rb_tree_drag_dest_row_drop_position ()">rb_tree_drag_dest_row_drop_position</a> <span class="c_punctuation">()</span>
 
90
</td>
 
91
</tr>
 
92
<tr>
 
93
<td class="function_type">
 
94
<span class="returnvalue">void</span>
 
95
</td>
 
96
<td class="function_name">
 
97
<a class="link" href="rhythmbox-rb-tree-dnd.html#rb-tree-dnd-add-drag-dest-support" title="rb_tree_dnd_add_drag_dest_support ()">rb_tree_dnd_add_drag_dest_support</a> <span class="c_punctuation">()</span>
 
98
</td>
 
99
</tr>
 
100
<tr>
 
101
<td class="function_type">
 
102
<span class="returnvalue">void</span>
 
103
</td>
 
104
<td class="function_name">
 
105
<a class="link" href="rhythmbox-rb-tree-dnd.html#rb-tree-dnd-add-drag-source-support" title="rb_tree_dnd_add_drag_source_support ()">rb_tree_dnd_add_drag_source_support</a> <span class="c_punctuation">()</span>
 
106
</td>
 
107
</tr>
 
108
</tbody>
 
109
</table></div>
 
110
</div>
 
111
<a name="RbTreeDragSource"></a><a name="RbTreeDragDest"></a><div class="refsect1">
 
112
<a name="rhythmbox-rb-tree-dnd.other"></a><h2>Types and Values</h2>
 
113
<div class="informaltable"><table width="100%" border="0">
 
114
<colgroup>
 
115
<col width="150px" class="name">
 
116
<col class="description">
 
117
</colgroup>
 
118
<tbody>
 
119
<tr>
 
120
<td class="datatype_keyword"> </td>
 
121
<td class="function_name"><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource-struct" title="RbTreeDragSource">RbTreeDragSource</a></td>
 
122
</tr>
 
123
<tr>
 
124
<td class="datatype_keyword">struct</td>
 
125
<td class="function_name"><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSourceIface" title="struct RbTreeDragSourceIface">RbTreeDragSourceIface</a></td>
 
126
</tr>
 
127
<tr>
 
128
<td class="datatype_keyword"> </td>
 
129
<td class="function_name"><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest-struct" title="RbTreeDragDest">RbTreeDragDest</a></td>
 
130
</tr>
 
131
<tr>
 
132
<td class="datatype_keyword">struct</td>
 
133
<td class="function_name"><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDestIface" title="struct RbTreeDragDestIface">RbTreeDragDestIface</a></td>
 
134
</tr>
 
135
<tr>
 
136
<td class="datatype_keyword">enum</td>
 
137
<td class="function_name"><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDestFlag" title="enum RbTreeDestFlag">RbTreeDestFlag</a></td>
 
138
</tr>
 
139
</tbody>
 
140
</table></div>
78
141
</div>
79
142
<div class="refsect1">
80
143
<a name="rhythmbox-rb-tree-dnd.object-hierarchy"></a><h2>Object Hierarchy</h2>
81
 
<pre class="synopsis">
82
 
  GInterface
83
 
   +----RbTreeDragSource
84
 
</pre>
85
 
<pre class="synopsis">
86
 
  GInterface
87
 
   +----RbTreeDragDest
 
144
<pre class="screen">    GInterface
 
145
    <span class="lineart">├──</span> RbTreeDragDest
 
146
    <span class="lineart">╰──</span> RbTreeDragSource
88
147
</pre>
89
148
</div>
90
149
<div class="refsect1">
98
157
</div>
99
158
<div class="refsect1">
100
159
<a name="rhythmbox-rb-tree-dnd.description"></a><h2>Description</h2>
101
 
<p>
102
 
Provides support for drag and drop operations to and from GtkTreeView
 
160
<p>Provides support for drag and drop operations to and from GtkTreeView
103
161
widgets that can include multiple rows.  The model backing the tree view
104
 
widgets must implement the <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> and <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a> interfaces.
105
 
</p>
106
 
</div>
107
 
<div class="refsect1">
108
 
<a name="rhythmbox-rb-tree-dnd.details"></a><h2>Details</h2>
 
162
widgets must implement the <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> and <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a> interfaces.</p>
 
163
</div>
 
164
<div class="refsect1">
 
165
<a name="rhythmbox-rb-tree-dnd.functions_details"></a><h2>Functions</h2>
 
166
<div class="refsect2">
 
167
<a name="rb-tree-drag-source-row-draggable"></a><h3>rb_tree_drag_source_row_draggable ()</h3>
 
168
<pre class="programlisting"><span class="returnvalue">gboolean</span>
 
169
rb_tree_drag_source_row_draggable (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> *drag_source</code></em>,
 
170
                                   <em class="parameter"><code><span class="type">GList</span> *path_list</code></em>);</pre>
 
171
<p>Asks the <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> whether a particular row can be used as
 
172
the source of a DND operation. If the source doesn't implement
 
173
this interface, the row is assumed draggable.</p>
 
174
<div class="refsect3">
 
175
<a name="id-1.3.7.10.2.5"></a><h4>Parameters</h4>
 
176
<div class="informaltable"><table width="100%" border="0">
 
177
<colgroup>
 
178
<col width="150px" class="parameters_name">
 
179
<col class="parameters_description">
 
180
<col width="200px" class="parameters_annotations">
 
181
</colgroup>
 
182
<tbody>
 
183
<tr>
 
184
<td class="parameter_name"><p>drag_source</p></td>
 
185
<td class="parameter_description"><p>a <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a></p></td>
 
186
<td class="parameter_annotations"> </td>
 
187
</tr>
 
188
<tr>
 
189
<td class="parameter_name"><p>path_list</p></td>
 
190
<td class="parameter_description"><p>row on which user is initiating a drag</p></td>
 
191
<td class="parameter_annotations"> </td>
 
192
</tr>
 
193
</tbody>
 
194
</table></div>
 
195
</div>
 
196
<div class="refsect3">
 
197
<a name="id-1.3.7.10.2.6"></a><h4>Returns</h4>
 
198
<p> <code class="literal">TRUE</code> if the row can be dragged</p>
 
199
<p></p>
 
200
</div>
 
201
</div>
 
202
<hr>
 
203
<div class="refsect2">
 
204
<a name="rb-tree-drag-source-drag-data-delete"></a><h3>rb_tree_drag_source_drag_data_delete ()</h3>
 
205
<pre class="programlisting"><span class="returnvalue">gboolean</span>
 
206
rb_tree_drag_source_drag_data_delete (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> *drag_source</code></em>,
 
207
                                      <em class="parameter"><code><span class="type">GList</span> *path_list</code></em>);</pre>
 
208
<p>Asks the <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> to delete the row at <em class="parameter"><code>path</code></em>
 
209
, because
 
210
it was moved somewhere else via drag-and-drop. Returns <code class="literal">FALSE</code>
 
211
if the deletion fails because <em class="parameter"><code>path</code></em>
 
212
 no longer exists, or for
 
213
some model-specific reason. Should robustly handle a <em class="parameter"><code>path</code></em>
 
214
 no
 
215
longer found in the model!</p>
 
216
<div class="refsect3">
 
217
<a name="id-1.3.7.10.3.5"></a><h4>Parameters</h4>
 
218
<div class="informaltable"><table width="100%" border="0">
 
219
<colgroup>
 
220
<col width="150px" class="parameters_name">
 
221
<col class="parameters_description">
 
222
<col width="200px" class="parameters_annotations">
 
223
</colgroup>
 
224
<tbody>
 
225
<tr>
 
226
<td class="parameter_name"><p>drag_source</p></td>
 
227
<td class="parameter_description"><p>a <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a></p></td>
 
228
<td class="parameter_annotations"> </td>
 
229
</tr>
 
230
<tr>
 
231
<td class="parameter_name"><p>path_list</p></td>
 
232
<td class="parameter_description"><p>row that was being dragged</p></td>
 
233
<td class="parameter_annotations"> </td>
 
234
</tr>
 
235
</tbody>
 
236
</table></div>
 
237
</div>
 
238
<div class="refsect3">
 
239
<a name="id-1.3.7.10.3.6"></a><h4>Returns</h4>
 
240
<p> <code class="literal">TRUE</code> if the row was successfully deleted</p>
 
241
<p></p>
 
242
</div>
 
243
</div>
 
244
<hr>
 
245
<div class="refsect2">
 
246
<a name="rb-tree-drag-source-drag-data-get"></a><h3>rb_tree_drag_source_drag_data_get ()</h3>
 
247
<pre class="programlisting"><span class="returnvalue">gboolean</span>
 
248
rb_tree_drag_source_drag_data_get (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> *drag_source</code></em>,
 
249
                                   <em class="parameter"><code><span class="type">GList</span> *path_list</code></em>,
 
250
                                   <em class="parameter"><code><span class="type">GtkSelectionData</span> *selection_data</code></em>);</pre>
 
251
<p>Asks the <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> to fill in <em class="parameter"><code>selection_data</code></em>
 
252
 with a
 
253
representation of the row at <em class="parameter"><code>path</code></em>
 
254
. <em class="parameter"><code>selection_data-&gt;target</code></em>
 
255
 gives
 
256
the required type of the data.  Should robustly handle a <em class="parameter"><code>path</code></em>
 
257
 no
 
258
longer found in the model!</p>
 
259
<div class="refsect3">
 
260
<a name="id-1.3.7.10.4.5"></a><h4>Parameters</h4>
 
261
<div class="informaltable"><table width="100%" border="0">
 
262
<colgroup>
 
263
<col width="150px" class="parameters_name">
 
264
<col class="parameters_description">
 
265
<col width="200px" class="parameters_annotations">
 
266
</colgroup>
 
267
<tbody>
 
268
<tr>
 
269
<td class="parameter_name"><p>drag_source</p></td>
 
270
<td class="parameter_description"><p>a <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a></p></td>
 
271
<td class="parameter_annotations"> </td>
 
272
</tr>
 
273
<tr>
 
274
<td class="parameter_name"><p>path_list</p></td>
 
275
<td class="parameter_description"><p>row that was dragged</p></td>
 
276
<td class="parameter_annotations"> </td>
 
277
</tr>
 
278
<tr>
 
279
<td class="parameter_name"><p>selection_data</p></td>
 
280
<td class="parameter_description"><p>a <span class="type">GtkSelectionData</span> to fill with data from the dragged row</p></td>
 
281
<td class="parameter_annotations"> </td>
 
282
</tr>
 
283
</tbody>
 
284
</table></div>
 
285
</div>
 
286
<div class="refsect3">
 
287
<a name="id-1.3.7.10.4.6"></a><h4>Returns</h4>
 
288
<p> <code class="literal">TRUE</code> if data of the required type was provided</p>
 
289
<p></p>
 
290
</div>
 
291
</div>
 
292
<hr>
 
293
<div class="refsect2">
 
294
<a name="rb-tree-drag-dest-drag-data-received"></a><h3>rb_tree_drag_dest_drag_data_received ()</h3>
 
295
<pre class="programlisting"><span class="returnvalue">gboolean</span>
 
296
rb_tree_drag_dest_drag_data_received (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a> *drag_dest</code></em>,
 
297
                                      <em class="parameter"><code><span class="type">GtkTreePath</span> *dest</code></em>,
 
298
                                      <em class="parameter"><code><span class="type">GtkTreeViewDropPosition</span> pos</code></em>,
 
299
                                      <em class="parameter"><code><span class="type">GtkSelectionData</span> *selection_data</code></em>);</pre>
 
300
<p>Asks a <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a> to accept some drag and drop data.</p>
 
301
<div class="refsect3">
 
302
<a name="id-1.3.7.10.5.5"></a><h4>Parameters</h4>
 
303
<div class="informaltable"><table width="100%" border="0">
 
304
<colgroup>
 
305
<col width="150px" class="parameters_name">
 
306
<col class="parameters_description">
 
307
<col width="200px" class="parameters_annotations">
 
308
</colgroup>
 
309
<tbody>
 
310
<tr>
 
311
<td class="parameter_name"><p>drag_dest</p></td>
 
312
<td class="parameter_description"><p>a <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a></p></td>
 
313
<td class="parameter_annotations"> </td>
 
314
</tr>
 
315
<tr>
 
316
<td class="parameter_name"><p>dest</p></td>
 
317
<td class="parameter_description"><p>the <span class="type">GtkTreePath</span> on which the data was dropped</p></td>
 
318
<td class="parameter_annotations"> </td>
 
319
</tr>
 
320
<tr>
 
321
<td class="parameter_name"><p>pos</p></td>
 
322
<td class="parameter_description"><p>the drop position relative to the row identified by <em class="parameter"><code>dest</code></em>
 
323
</p></td>
 
324
<td class="parameter_annotations"> </td>
 
325
</tr>
 
326
<tr>
 
327
<td class="parameter_name"><p>selection_data</p></td>
 
328
<td class="parameter_description"><p>a <span class="type">GtkSelectionData</span> containing the drag data</p></td>
 
329
<td class="parameter_annotations"> </td>
 
330
</tr>
 
331
</tbody>
 
332
</table></div>
 
333
</div>
 
334
<div class="refsect3">
 
335
<a name="id-1.3.7.10.5.6"></a><h4>Returns</h4>
 
336
<p> <code class="literal">TRUE</code> if the data was accepted, <code class="literal">FALSE</code> otherwise</p>
 
337
<p></p>
 
338
</div>
 
339
</div>
 
340
<hr>
 
341
<div class="refsect2">
 
342
<a name="rb-tree-drag-dest-row-drop-possible"></a><h3>rb_tree_drag_dest_row_drop_possible ()</h3>
 
343
<pre class="programlisting"><span class="returnvalue">gboolean</span>
 
344
rb_tree_drag_dest_row_drop_possible (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a> *drag_dest</code></em>,
 
345
                                     <em class="parameter"><code><span class="type">GtkTreePath</span> *dest_path</code></em>,
 
346
                                     <em class="parameter"><code><span class="type">GtkTreeViewDropPosition</span> pos</code></em>,
 
347
                                     <em class="parameter"><code><span class="type">GtkSelectionData</span> *selection_data</code></em>);</pre>
 
348
<p>Asks the <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a> whether data can be dropped on a particular
 
349
row.  This should probably check based on the format and the row.</p>
 
350
<div class="refsect3">
 
351
<a name="id-1.3.7.10.6.5"></a><h4>Parameters</h4>
 
352
<div class="informaltable"><table width="100%" border="0">
 
353
<colgroup>
 
354
<col width="150px" class="parameters_name">
 
355
<col class="parameters_description">
 
356
<col width="200px" class="parameters_annotations">
 
357
</colgroup>
 
358
<tbody>
 
359
<tr>
 
360
<td class="parameter_name"><p>drag_dest</p></td>
 
361
<td class="parameter_description"><p>a <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a></p></td>
 
362
<td class="parameter_annotations"> </td>
 
363
</tr>
 
364
<tr>
 
365
<td class="parameter_name"><p>dest_path</p></td>
 
366
<td class="parameter_description"><p>the <span class="type">GtkTreePath</span> on which the data may be dropped</p></td>
 
367
<td class="parameter_annotations"> </td>
 
368
</tr>
 
369
<tr>
 
370
<td class="parameter_name"><p>pos</p></td>
 
371
<td class="parameter_description"><p>the drop position relative to the row identified by <em class="parameter"><code>dest</code></em>
 
372
</p></td>
 
373
<td class="parameter_annotations"> </td>
 
374
</tr>
 
375
<tr>
 
376
<td class="parameter_name"><p>selection_data</p></td>
 
377
<td class="parameter_description"><p>a <span class="type">GtkSelectionData</span> containing the drag data</p></td>
 
378
<td class="parameter_annotations"> </td>
 
379
</tr>
 
380
</tbody>
 
381
</table></div>
 
382
</div>
 
383
<div class="refsect3">
 
384
<a name="id-1.3.7.10.6.6"></a><h4>Returns</h4>
 
385
<p> <code class="literal">TRUE</code> if the data can be dropped there</p>
 
386
<p></p>
 
387
</div>
 
388
</div>
 
389
<hr>
 
390
<div class="refsect2">
 
391
<a name="rb-tree-drag-dest-row-drop-position"></a><h3>rb_tree_drag_dest_row_drop_position ()</h3>
 
392
<pre class="programlisting"><span class="returnvalue">gboolean</span>
 
393
rb_tree_drag_dest_row_drop_position (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a> *drag_dest</code></em>,
 
394
                                     <em class="parameter"><code><span class="type">GtkTreePath</span> *dest_path</code></em>,
 
395
                                     <em class="parameter"><code><span class="type">GList</span> *targets</code></em>,
 
396
                                     <em class="parameter"><code><span class="type">GtkTreeViewDropPosition</span> *pos</code></em>);</pre>
 
397
<p>Asks the <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a> which drop position to use relative to the specified row.
 
398
The drag destination should decide which drop position to use based on the 
 
399
target row and the list of drag targets.</p>
 
400
<div class="refsect3">
 
401
<a name="id-1.3.7.10.7.5"></a><h4>Parameters</h4>
 
402
<div class="informaltable"><table width="100%" border="0">
 
403
<colgroup>
 
404
<col width="150px" class="parameters_name">
 
405
<col class="parameters_description">
 
406
<col width="200px" class="parameters_annotations">
 
407
</colgroup>
 
408
<tbody>
 
409
<tr>
 
410
<td class="parameter_name"><p>drag_dest</p></td>
 
411
<td class="parameter_description"><p>a <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a></p></td>
 
412
<td class="parameter_annotations"> </td>
 
413
</tr>
 
414
<tr>
 
415
<td class="parameter_name"><p>dest_path</p></td>
 
416
<td class="parameter_description"><p>a <span class="type">GtkTreePath</span> describing a possible drop row</p></td>
 
417
<td class="parameter_annotations"> </td>
 
418
</tr>
 
419
<tr>
 
420
<td class="parameter_name"><p>targets</p></td>
 
421
<td class="parameter_description"><p>a <span class="type">GList</span> containing possible drop target types</p></td>
 
422
<td class="parameter_annotations"> </td>
 
423
</tr>
 
424
<tr>
 
425
<td class="parameter_name"><p>pos</p></td>
 
426
<td class="parameter_description"><p>returns the <span class="type">GtkTreeViewDropPosition</span> to use relative to the row</p></td>
 
427
<td class="parameter_annotations"> </td>
 
428
</tr>
 
429
</tbody>
 
430
</table></div>
 
431
</div>
 
432
<div class="refsect3">
 
433
<a name="id-1.3.7.10.7.6"></a><h4>Returns</h4>
 
434
<p> <code class="literal">TRUE</code> if a drop position has been set, <code class="literal">FALSE</code> if a drop should not be
 
435
allowed in the specified row</p>
 
436
<p></p>
 
437
</div>
 
438
</div>
 
439
<hr>
 
440
<div class="refsect2">
 
441
<a name="rb-tree-dnd-add-drag-dest-support"></a><h3>rb_tree_dnd_add_drag_dest_support ()</h3>
 
442
<pre class="programlisting"><span class="returnvalue">void</span>
 
443
rb_tree_dnd_add_drag_dest_support (<em class="parameter"><code><span class="type">GtkTreeView</span> *tree_view</code></em>,
 
444
                                   <em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDestFlag" title="enum RbTreeDestFlag"><span class="type">RbTreeDestFlag</span></a> flags</code></em>,
 
445
                                   <em class="parameter"><code>const <span class="type">GtkTargetEntry</span> *targets</code></em>,
 
446
                                   <em class="parameter"><code><span class="type">gint</span> n_targets</code></em>,
 
447
                                   <em class="parameter"><code><span class="type">GdkDragAction</span> actions</code></em>);</pre>
 
448
<p>Adds event handlers to perform multi-row drag and drop operations to the specified
 
449
<span class="type">GtkTreeView</span>.  The model backing the tree view should implement the <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a>
 
450
interface.  This should be called immediately after the tree view is created.</p>
 
451
<div class="refsect3">
 
452
<a name="id-1.3.7.10.8.5"></a><h4>Parameters</h4>
 
453
<div class="informaltable"><table width="100%" border="0">
 
454
<colgroup>
 
455
<col width="150px" class="parameters_name">
 
456
<col class="parameters_description">
 
457
<col width="200px" class="parameters_annotations">
 
458
</colgroup>
 
459
<tbody>
 
460
<tr>
 
461
<td class="parameter_name"><p>tree_view</p></td>
 
462
<td class="parameter_description"><p>a <span class="type">GtkTreeView</span> that wants to be a drag destination</p></td>
 
463
<td class="parameter_annotations"> </td>
 
464
</tr>
 
465
<tr>
 
466
<td class="parameter_name"><p>flags</p></td>
 
467
<td class="parameter_description"><p><a href="rhythmbox-rb-tree-dnd.html#RbTreeDestFlag"><span class="type">RbTreeDestFlags</span></a> for this drag destination</p></td>
 
468
<td class="parameter_annotations"> </td>
 
469
</tr>
 
470
<tr>
 
471
<td class="parameter_name"><p>targets</p></td>
 
472
<td class="parameter_description"><p>an array of <span class="type">GtkTargetEntry</span> structures describing the allowed drag targets</p></td>
 
473
<td class="parameter_annotations"> </td>
 
474
</tr>
 
475
<tr>
 
476
<td class="parameter_name"><p>n_targets</p></td>
 
477
<td class="parameter_description"><p>the number of elements in <em class="parameter"><code>targets</code></em>
 
478
</p></td>
 
479
<td class="parameter_annotations"> </td>
 
480
</tr>
 
481
<tr>
 
482
<td class="parameter_name"><p>actions</p></td>
 
483
<td class="parameter_description"><p>the allowable drag actions for this destination</p></td>
 
484
<td class="parameter_annotations"> </td>
 
485
</tr>
 
486
</tbody>
 
487
</table></div>
 
488
</div>
 
489
</div>
 
490
<hr>
 
491
<div class="refsect2">
 
492
<a name="rb-tree-dnd-add-drag-source-support"></a><h3>rb_tree_dnd_add_drag_source_support ()</h3>
 
493
<pre class="programlisting"><span class="returnvalue">void</span>
 
494
rb_tree_dnd_add_drag_source_support (<em class="parameter"><code><span class="type">GtkTreeView</span> *tree_view</code></em>,
 
495
                                     <em class="parameter"><code><span class="type">GdkModifierType</span> start_button_mask</code></em>,
 
496
                                     <em class="parameter"><code>const <span class="type">GtkTargetEntry</span> *targets</code></em>,
 
497
                                     <em class="parameter"><code><span class="type">gint</span> n_targets</code></em>,
 
498
                                     <em class="parameter"><code><span class="type">GdkDragAction</span> actions</code></em>);</pre>
 
499
<p>Adds event handlers to perform multi-row drag and drop operations from the
 
500
specified <span class="type">GtkTreeView</span> widget.  The model backing the <span class="type">GtkTreeView</span> must
 
501
implement the <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> interface.  This should be called immediately
 
502
after the tree view is created.</p>
 
503
<div class="refsect3">
 
504
<a name="id-1.3.7.10.9.5"></a><h4>Parameters</h4>
 
505
<div class="informaltable"><table width="100%" border="0">
 
506
<colgroup>
 
507
<col width="150px" class="parameters_name">
 
508
<col class="parameters_description">
 
509
<col width="200px" class="parameters_annotations">
 
510
</colgroup>
 
511
<tbody>
 
512
<tr>
 
513
<td class="parameter_name"><p>tree_view</p></td>
 
514
<td class="parameter_description"><p>a <span class="type">GtkTreeView</span> that wants to be a drag source</p></td>
 
515
<td class="parameter_annotations"> </td>
 
516
</tr>
 
517
<tr>
 
518
<td class="parameter_name"><p>start_button_mask</p></td>
 
519
<td class="parameter_description"><p>a mask describing modifier keys to handle when dragging</p></td>
 
520
<td class="parameter_annotations"> </td>
 
521
</tr>
 
522
<tr>
 
523
<td class="parameter_name"><p>targets</p></td>
 
524
<td class="parameter_description"><p>an array of <span class="type">GtkTargetEntry</span> structures describing drag data types</p></td>
 
525
<td class="parameter_annotations"> </td>
 
526
</tr>
 
527
<tr>
 
528
<td class="parameter_name"><p>n_targets</p></td>
 
529
<td class="parameter_description"><p>the number of elements in <em class="parameter"><code>targets</code></em>
 
530
</p></td>
 
531
<td class="parameter_annotations"> </td>
 
532
</tr>
 
533
<tr>
 
534
<td class="parameter_name"><p>actions</p></td>
 
535
<td class="parameter_description"><p>a mask describing drag actions that are allowed from this source</p></td>
 
536
<td class="parameter_annotations"> </td>
 
537
</tr>
 
538
</tbody>
 
539
</table></div>
 
540
</div>
 
541
</div>
 
542
</div>
 
543
<div class="refsect1">
 
544
<a name="rhythmbox-rb-tree-dnd.other_details"></a><h2>Types and Values</h2>
109
545
<div class="refsect2">
110
546
<a name="RbTreeDragSource-struct"></a><h3>RbTreeDragSource</h3>
111
547
<pre class="programlisting">typedef struct _RbTreeDragSource RbTreeDragSource;</pre>
177
613
<hr>
178
614
<div class="refsect2">
179
615
<a name="RbTreeDestFlag"></a><h3>enum RbTreeDestFlag</h3>
180
 
<pre class="programlisting">typedef enum {
181
 
        RB_TREE_DEST_EMPTY_VIEW_DROP = 1 &lt;&lt; 0,
182
 
        RB_TREE_DEST_CAN_DROP_INTO = 1 &lt;&lt; 1,
183
 
        RB_TREE_DEST_CAN_DROP_BETWEEN = 1 &lt;&lt; 2,
184
 
        RB_TREE_DEST_SELECT_ON_DRAG_TIMEOUT = 1 &lt;&lt; 3
185
 
} RbTreeDestFlag;
186
 
</pre>
187
 
<p>
188
 
Flags controlling drag destination behaviour.
189
 
</p>
190
 
<div class="variablelist"><table border="0" class="variablelist">
191
 
<colgroup>
192
 
<col align="left" valign="top">
193
 
<col>
194
 
</colgroup>
195
 
<tbody>
196
 
<tr>
197
 
<td><p><a name="RB-TREE-DEST-EMPTY-VIEW-DROP:CAPS"></a><span class="term"><code class="literal">RB_TREE_DEST_EMPTY_VIEW_DROP</code></span></p></td>
198
 
<td>If set, drops into empty spaces in the view are accepted
199
 
</td>
200
 
</tr>
201
 
<tr>
202
 
<td><p><a name="RB-TREE-DEST-CAN-DROP-INTO:CAPS"></a><span class="term"><code class="literal">RB_TREE_DEST_CAN_DROP_INTO</code></span></p></td>
203
 
<td>If set, drops into existing rows are accepted
204
 
</td>
205
 
</tr>
206
 
<tr>
207
 
<td><p><a name="RB-TREE-DEST-CAN-DROP-BETWEEN:CAPS"></a><span class="term"><code class="literal">RB_TREE_DEST_CAN_DROP_BETWEEN</code></span></p></td>
208
 
<td>If set, drops between existing rows are accepted
209
 
</td>
210
 
</tr>
211
 
<tr>
212
 
<td><p><a name="RB-TREE-DEST-SELECT-ON-DRAG-TIMEOUT:CAPS"></a><span class="term"><code class="literal">RB_TREE_DEST_SELECT_ON_DRAG_TIMEOUT</code></span></p></td>
213
 
<td>If set, update the drag selection using a timeout
214
 
</td>
215
 
</tr>
216
 
</tbody>
217
 
</table></div>
218
 
</div>
219
 
<hr>
220
 
<div class="refsect2">
221
 
<a name="rb-tree-drag-source-row-draggable"></a><h3>rb_tree_drag_source_row_draggable ()</h3>
222
 
<pre class="programlisting"><span class="returnvalue">gboolean</span>            rb_tree_drag_source_row_draggable   (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> *drag_source</code></em>,
223
 
                                                         <em class="parameter"><code><span class="type">GList</span> *path_list</code></em>);</pre>
224
 
<p>
225
 
Asks the <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> whether a particular row can be used as
226
 
the source of a DND operation. If the source doesn't implement
227
 
this interface, the row is assumed draggable.
228
 
</p>
229
 
<div class="variablelist"><table border="0" class="variablelist">
230
 
<colgroup>
231
 
<col align="left" valign="top">
232
 
<col>
233
 
</colgroup>
234
 
<tbody>
235
 
<tr>
236
 
<td><p><span class="term"><em class="parameter"><code>drag_source</code></em> :</span></p></td>
237
 
<td>a <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a>
238
 
</td>
239
 
</tr>
240
 
<tr>
241
 
<td><p><span class="term"><em class="parameter"><code>path_list</code></em> :</span></p></td>
242
 
<td>row on which user is initiating a drag</td>
243
 
</tr>
244
 
<tr>
245
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
246
 
<td>
247
 
<code class="literal">TRUE</code> if the row can be dragged</td>
248
 
</tr>
249
 
</tbody>
250
 
</table></div>
251
 
</div>
252
 
<hr>
253
 
<div class="refsect2">
254
 
<a name="rb-tree-drag-source-drag-data-delete"></a><h3>rb_tree_drag_source_drag_data_delete ()</h3>
255
 
<pre class="programlisting"><span class="returnvalue">gboolean</span>            rb_tree_drag_source_drag_data_delete
256
 
                                                        (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> *drag_source</code></em>,
257
 
                                                         <em class="parameter"><code><span class="type">GList</span> *path_list</code></em>);</pre>
258
 
<p>
259
 
Asks the <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> to delete the row at <em class="parameter"><code>path</code></em>, because
260
 
it was moved somewhere else via drag-and-drop. Returns <code class="literal">FALSE</code>
261
 
if the deletion fails because <em class="parameter"><code>path</code></em> no longer exists, or for
262
 
some model-specific reason. Should robustly handle a <em class="parameter"><code>path</code></em> no
263
 
longer found in the model!
264
 
</p>
265
 
<div class="variablelist"><table border="0" class="variablelist">
266
 
<colgroup>
267
 
<col align="left" valign="top">
268
 
<col>
269
 
</colgroup>
270
 
<tbody>
271
 
<tr>
272
 
<td><p><span class="term"><em class="parameter"><code>drag_source</code></em> :</span></p></td>
273
 
<td>a <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a>
274
 
</td>
275
 
</tr>
276
 
<tr>
277
 
<td><p><span class="term"><em class="parameter"><code>path_list</code></em> :</span></p></td>
278
 
<td>row that was being dragged</td>
279
 
</tr>
280
 
<tr>
281
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
282
 
<td>
283
 
<code class="literal">TRUE</code> if the row was successfully deleted</td>
284
 
</tr>
285
 
</tbody>
286
 
</table></div>
287
 
</div>
288
 
<hr>
289
 
<div class="refsect2">
290
 
<a name="rb-tree-drag-source-drag-data-get"></a><h3>rb_tree_drag_source_drag_data_get ()</h3>
291
 
<pre class="programlisting"><span class="returnvalue">gboolean</span>            rb_tree_drag_source_drag_data_get   (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> *drag_source</code></em>,
292
 
                                                         <em class="parameter"><code><span class="type">GList</span> *path_list</code></em>,
293
 
                                                         <em class="parameter"><code><span class="type">GtkSelectionData</span> *selection_data</code></em>);</pre>
294
 
<p>
295
 
Asks the <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> to fill in <em class="parameter"><code>selection_data</code></em> with a
296
 
representation of the row at <em class="parameter"><code>path</code></em>. <em class="parameter"><code>selection_data-&gt;target</code></em> gives
297
 
the required type of the data.  Should robustly handle a <em class="parameter"><code>path</code></em> no
298
 
longer found in the model!
299
 
</p>
300
 
<div class="variablelist"><table border="0" class="variablelist">
301
 
<colgroup>
302
 
<col align="left" valign="top">
303
 
<col>
304
 
</colgroup>
305
 
<tbody>
306
 
<tr>
307
 
<td><p><span class="term"><em class="parameter"><code>drag_source</code></em> :</span></p></td>
308
 
<td>a <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a>
309
 
</td>
310
 
</tr>
311
 
<tr>
312
 
<td><p><span class="term"><em class="parameter"><code>path_list</code></em> :</span></p></td>
313
 
<td>row that was dragged</td>
314
 
</tr>
315
 
<tr>
316
 
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
317
 
<td>a <span class="type">GtkSelectionData</span> to fill with data from the dragged row</td>
318
 
</tr>
319
 
<tr>
320
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
321
 
<td>
322
 
<code class="literal">TRUE</code> if data of the required type was provided</td>
323
 
</tr>
324
 
</tbody>
325
 
</table></div>
326
 
</div>
327
 
<hr>
328
 
<div class="refsect2">
329
 
<a name="rb-tree-drag-dest-drag-data-received"></a><h3>rb_tree_drag_dest_drag_data_received ()</h3>
330
 
<pre class="programlisting"><span class="returnvalue">gboolean</span>            rb_tree_drag_dest_drag_data_received
331
 
                                                        (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a> *drag_dest</code></em>,
332
 
                                                         <em class="parameter"><code><span class="type">GtkTreePath</span> *dest</code></em>,
333
 
                                                         <em class="parameter"><code><span class="type">GtkTreeViewDropPosition</span> pos</code></em>,
334
 
                                                         <em class="parameter"><code><span class="type">GtkSelectionData</span> *selection_data</code></em>);</pre>
335
 
<p>
336
 
Asks a <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a> to accept some drag and drop data.
337
 
</p>
338
 
<div class="variablelist"><table border="0" class="variablelist">
339
 
<colgroup>
340
 
<col align="left" valign="top">
341
 
<col>
342
 
</colgroup>
343
 
<tbody>
344
 
<tr>
345
 
<td><p><span class="term"><em class="parameter"><code>drag_dest</code></em> :</span></p></td>
346
 
<td>a <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a>
347
 
</td>
348
 
</tr>
349
 
<tr>
350
 
<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
351
 
<td>the <span class="type">GtkTreePath</span> on which the data was dropped</td>
352
 
</tr>
353
 
<tr>
354
 
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
355
 
<td>the drop position relative to the row identified by <em class="parameter"><code>dest</code></em>
356
 
</td>
357
 
</tr>
358
 
<tr>
359
 
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
360
 
<td>a <span class="type">GtkSelectionData</span> containing the drag data</td>
361
 
</tr>
362
 
<tr>
363
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
364
 
<td>
365
 
<code class="literal">TRUE</code> if the data was accepted, <code class="literal">FALSE</code> otherwise</td>
366
 
</tr>
367
 
</tbody>
368
 
</table></div>
369
 
</div>
370
 
<hr>
371
 
<div class="refsect2">
372
 
<a name="rb-tree-drag-dest-row-drop-possible"></a><h3>rb_tree_drag_dest_row_drop_possible ()</h3>
373
 
<pre class="programlisting"><span class="returnvalue">gboolean</span>            rb_tree_drag_dest_row_drop_possible (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a> *drag_dest</code></em>,
374
 
                                                         <em class="parameter"><code><span class="type">GtkTreePath</span> *dest_path</code></em>,
375
 
                                                         <em class="parameter"><code><span class="type">GtkTreeViewDropPosition</span> pos</code></em>,
376
 
                                                         <em class="parameter"><code><span class="type">GtkSelectionData</span> *selection_data</code></em>);</pre>
377
 
<p>
378
 
Asks the <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a> whether data can be dropped on a particular
379
 
row.  This should probably check based on the format and the row.
380
 
</p>
381
 
<div class="variablelist"><table border="0" class="variablelist">
382
 
<colgroup>
383
 
<col align="left" valign="top">
384
 
<col>
385
 
</colgroup>
386
 
<tbody>
387
 
<tr>
388
 
<td><p><span class="term"><em class="parameter"><code>drag_dest</code></em> :</span></p></td>
389
 
<td>a <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a>
390
 
</td>
391
 
</tr>
392
 
<tr>
393
 
<td><p><span class="term"><em class="parameter"><code>dest_path</code></em> :</span></p></td>
394
 
<td>the <span class="type">GtkTreePath</span> on which the data may be dropped</td>
395
 
</tr>
396
 
<tr>
397
 
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
398
 
<td>the drop position relative to the row identified by <em class="parameter"><code>dest</code></em>
399
 
</td>
400
 
</tr>
401
 
<tr>
402
 
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
403
 
<td>a <span class="type">GtkSelectionData</span> containing the drag data</td>
404
 
</tr>
405
 
<tr>
406
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
407
 
<td>
408
 
<code class="literal">TRUE</code> if the data can be dropped there</td>
409
 
</tr>
410
 
</tbody>
411
 
</table></div>
412
 
</div>
413
 
<hr>
414
 
<div class="refsect2">
415
 
<a name="rb-tree-drag-dest-row-drop-position"></a><h3>rb_tree_drag_dest_row_drop_position ()</h3>
416
 
<pre class="programlisting"><span class="returnvalue">gboolean</span>            rb_tree_drag_dest_row_drop_position (<em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a> *drag_dest</code></em>,
417
 
                                                         <em class="parameter"><code><span class="type">GtkTreePath</span> *dest_path</code></em>,
418
 
                                                         <em class="parameter"><code><span class="type">GList</span> *targets</code></em>,
419
 
                                                         <em class="parameter"><code><span class="type">GtkTreeViewDropPosition</span> *pos</code></em>);</pre>
420
 
<p>
421
 
Asks the <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a> which drop position to use relative to the specified row.
422
 
The drag destination should decide which drop position to use based on the 
423
 
target row and the list of drag targets.
424
 
</p>
425
 
<div class="variablelist"><table border="0" class="variablelist">
426
 
<colgroup>
427
 
<col align="left" valign="top">
428
 
<col>
429
 
</colgroup>
430
 
<tbody>
431
 
<tr>
432
 
<td><p><span class="term"><em class="parameter"><code>drag_dest</code></em> :</span></p></td>
433
 
<td>a <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a>
434
 
</td>
435
 
</tr>
436
 
<tr>
437
 
<td><p><span class="term"><em class="parameter"><code>dest_path</code></em> :</span></p></td>
438
 
<td>a <span class="type">GtkTreePath</span> describing a possible drop row</td>
439
 
</tr>
440
 
<tr>
441
 
<td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td>
442
 
<td>a <span class="type">GList</span> containing possible drop target types</td>
443
 
</tr>
444
 
<tr>
445
 
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
446
 
<td>returns the <span class="type">GtkTreeViewDropPosition</span> to use relative to the row</td>
447
 
</tr>
448
 
<tr>
449
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
450
 
<td>
451
 
<code class="literal">TRUE</code> if a drop position has been set, <code class="literal">FALSE</code> if a drop should not be
452
 
allowed in the specified row</td>
453
 
</tr>
454
 
</tbody>
455
 
</table></div>
456
 
</div>
457
 
<hr>
458
 
<div class="refsect2">
459
 
<a name="rb-tree-dnd-add-drag-dest-support"></a><h3>rb_tree_dnd_add_drag_dest_support ()</h3>
460
 
<pre class="programlisting"><span class="returnvalue">void</span>                rb_tree_dnd_add_drag_dest_support   (<em class="parameter"><code><span class="type">GtkTreeView</span> *tree_view</code></em>,
461
 
                                                         <em class="parameter"><code><a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDestFlag" title="enum RbTreeDestFlag"><span class="type">RbTreeDestFlag</span></a> flags</code></em>,
462
 
                                                         <em class="parameter"><code>const <span class="type">GtkTargetEntry</span> *targets</code></em>,
463
 
                                                         <em class="parameter"><code><span class="type">gint</span> n_targets</code></em>,
464
 
                                                         <em class="parameter"><code><span class="type">GdkDragAction</span> actions</code></em>);</pre>
465
 
<p>
466
 
Adds event handlers to perform multi-row drag and drop operations to the specified
467
 
<span class="type">GtkTreeView</span>.  The model backing the tree view should implement the <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest"><span class="type">RbTreeDragDest</span></a>
468
 
interface.  This should be called immediately after the tree view is created.
469
 
</p>
470
 
<div class="variablelist"><table border="0" class="variablelist">
471
 
<colgroup>
472
 
<col align="left" valign="top">
473
 
<col>
474
 
</colgroup>
475
 
<tbody>
476
 
<tr>
477
 
<td><p><span class="term"><em class="parameter"><code>tree_view</code></em> :</span></p></td>
478
 
<td>a <span class="type">GtkTreeView</span> that wants to be a drag destination</td>
479
 
</tr>
480
 
<tr>
481
 
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
482
 
<td>
483
 
<a href="rhythmbox-rb-tree-dnd.html#RbTreeDestFlag"><span class="type">RbTreeDestFlags</span></a> for this drag destination</td>
484
 
</tr>
485
 
<tr>
486
 
<td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td>
487
 
<td>an array of <span class="type">GtkTargetEntry</span> structures describing the allowed drag targets</td>
488
 
</tr>
489
 
<tr>
490
 
<td><p><span class="term"><em class="parameter"><code>n_targets</code></em> :</span></p></td>
491
 
<td>the number of elements in <em class="parameter"><code>targets</code></em>
492
 
</td>
493
 
</tr>
494
 
<tr>
495
 
<td><p><span class="term"><em class="parameter"><code>actions</code></em> :</span></p></td>
496
 
<td>the allowable drag actions for this destination</td>
497
 
</tr>
498
 
</tbody>
499
 
</table></div>
500
 
</div>
501
 
<hr>
502
 
<div class="refsect2">
503
 
<a name="rb-tree-dnd-add-drag-source-support"></a><h3>rb_tree_dnd_add_drag_source_support ()</h3>
504
 
<pre class="programlisting"><span class="returnvalue">void</span>                rb_tree_dnd_add_drag_source_support (<em class="parameter"><code><span class="type">GtkTreeView</span> *tree_view</code></em>,
505
 
                                                         <em class="parameter"><code><span class="type">GdkModifierType</span> start_button_mask</code></em>,
506
 
                                                         <em class="parameter"><code>const <span class="type">GtkTargetEntry</span> *targets</code></em>,
507
 
                                                         <em class="parameter"><code><span class="type">gint</span> n_targets</code></em>,
508
 
                                                         <em class="parameter"><code><span class="type">GdkDragAction</span> actions</code></em>);</pre>
509
 
<p>
510
 
Adds event handlers to perform multi-row drag and drop operations from the
511
 
specified <span class="type">GtkTreeView</span> widget.  The model backing the <span class="type">GtkTreeView</span> must
512
 
implement the <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource"><span class="type">RbTreeDragSource</span></a> interface.  This should be called immediately
513
 
after the tree view is created.
514
 
</p>
515
 
<div class="variablelist"><table border="0" class="variablelist">
516
 
<colgroup>
517
 
<col align="left" valign="top">
518
 
<col>
519
 
</colgroup>
520
 
<tbody>
521
 
<tr>
522
 
<td><p><span class="term"><em class="parameter"><code>tree_view</code></em> :</span></p></td>
523
 
<td>a <span class="type">GtkTreeView</span> that wants to be a drag source</td>
524
 
</tr>
525
 
<tr>
526
 
<td><p><span class="term"><em class="parameter"><code>start_button_mask</code></em> :</span></p></td>
527
 
<td>a mask describing modifier keys to handle when dragging</td>
528
 
</tr>
529
 
<tr>
530
 
<td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td>
531
 
<td>an array of <span class="type">GtkTargetEntry</span> structures describing drag data types</td>
532
 
</tr>
533
 
<tr>
534
 
<td><p><span class="term"><em class="parameter"><code>n_targets</code></em> :</span></p></td>
535
 
<td>the number of elements in <em class="parameter"><code>targets</code></em>
536
 
</td>
537
 
</tr>
538
 
<tr>
539
 
<td><p><span class="term"><em class="parameter"><code>actions</code></em> :</span></p></td>
540
 
<td>a mask describing drag actions that are allowed from this source</td>
541
 
</tr>
542
 
</tbody>
543
 
</table></div>
 
616
<p>Flags controlling drag destination behaviour.</p>
 
617
<div class="refsect3">
 
618
<a name="id-1.3.7.11.6.4"></a><h4>Members</h4>
 
619
<div class="informaltable"><table width="100%" border="0">
 
620
<colgroup>
 
621
<col width="300px" class="enum_members_name">
 
622
<col class="enum_members_description">
 
623
<col width="200px" class="enum_members_annotations">
 
624
</colgroup>
 
625
<tbody>
 
626
<tr>
 
627
<td class="enum_member_name"><p><a name="RB-TREE-DEST-EMPTY-VIEW-DROP:CAPS"></a>RB_TREE_DEST_EMPTY_VIEW_DROP</p></td>
 
628
<td class="enum_member_description">
 
629
<p>If set, drops into empty spaces in the view are accepted</p>
 
630
</td>
 
631
<td class="enum_member_annotations"> </td>
 
632
</tr>
 
633
<tr>
 
634
<td class="enum_member_name"><p><a name="RB-TREE-DEST-CAN-DROP-INTO:CAPS"></a>RB_TREE_DEST_CAN_DROP_INTO</p></td>
 
635
<td class="enum_member_description">
 
636
<p>If set, drops into existing rows are accepted</p>
 
637
</td>
 
638
<td class="enum_member_annotations"> </td>
 
639
</tr>
 
640
<tr>
 
641
<td class="enum_member_name"><p><a name="RB-TREE-DEST-CAN-DROP-BETWEEN:CAPS"></a>RB_TREE_DEST_CAN_DROP_BETWEEN</p></td>
 
642
<td class="enum_member_description">
 
643
<p>If set, drops between existing rows are accepted</p>
 
644
</td>
 
645
<td class="enum_member_annotations"> </td>
 
646
</tr>
 
647
<tr>
 
648
<td class="enum_member_name"><p><a name="RB-TREE-DEST-SELECT-ON-DRAG-TIMEOUT:CAPS"></a>RB_TREE_DEST_SELECT_ON_DRAG_TIMEOUT</p></td>
 
649
<td class="enum_member_description">
 
650
<p>If set, update the drag selection using a timeout</p>
 
651
</td>
 
652
<td class="enum_member_annotations"> </td>
 
653
</tr>
 
654
</tbody>
 
655
</table></div>
 
656
</div>
544
657
</div>
545
658
</div>
546
659
</div>
547
660
<div class="footer">
548
661
<hr>
549
 
          Generated by GTK-Doc V1.19.1</div>
 
662
          Generated by GTK-Doc V1.20.1</div>
550
663
</body>
551
664
</html>
 
 
b'\\ No newline at end of file'