1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>rb-sourcelist-model</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="index.html" title="Rhythmbox Development Reference Manual">
<link rel="up" href="ch06.html" title="Sources">
<link rel="prev" href="RBSource.html" title="RBSource">
<link rel="next" href="RBSourceList.html" title="rb-sourcelist">
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="ch01.html" title="Backends">
<link rel="chapter" href="ch02.html" title="Lib">
<link rel="chapter" href="ch03.html" title="Metadata">
<link rel="chapter" href="ch04.html" title="RhythmDB">
<link rel="chapter" href="ch05.html" title="Shell">
<link rel="chapter" href="ch06.html" title="Sources">
<link rel="chapter" href="ch07.html" title="Widgets">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="RBSource.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch06.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Rhythmbox Development Reference Manual</th>
<td><a accesskey="n" href="RBSourceList.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#RBSourceListModel.synopsis" class="shortcut">Top</a>
|
<a href="#RBSourceListModel.description" class="shortcut">Description</a>
|
<a href="#RBSourceListModel.object-hierarchy" class="shortcut">Object Hierarchy</a>
|
<a href="#RBSourceListModel.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
|
<a href="#RBSourceListModel.signals" class="shortcut">Signals</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="RBSourceListModel"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="RBSourceListModel.top_of_page"></a>rb-sourcelist-model</span></h2>
<p>rb-sourcelist-model — models backing the source list widget</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="RBSourceListModel.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
<a class="link" href="RBSourceListModel.html#RBSourceListModel-struct" title="RBSourceListModel">RBSourceListModel</a>;
<a class="link" href="RBSourceListModel.html#RBSourceListModelClass" title="RBSourceListModelClass">RBSourceListModelClass</a>;
enum <a class="link" href="RBSourceListModel.html#RBSourceListModelColumn" title="enum RBSourceListModelColumn">RBSourceListModelColumn</a>;
<a
href="/usr/share/gtk-doc/html/gtk/GtkTreeModel.html"
>GtkTreeModel</a>* <a class="link" href="RBSourceListModel.html#rb-sourcelist-model-new" title="rb_sourcelist_model_new ()">rb_sourcelist_model_new</a> (void);
void <a class="link" href="RBSourceListModel.html#rb-sourcelist-model-set-dnd-targets" title="rb_sourcelist_model_set_dnd_targets ()">rb_sourcelist_model_set_dnd_targets</a> (<a class="link" href="RBSourceListModel.html" title="rb-sourcelist-model">RBSourceListModel</a> *sourcelist,
<a
href="/usr/share/gtk-doc/html/gtk/GtkTreeView.html"
>GtkTreeView</a> *treeview);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="RBSourceListModel.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
+----<a
href="/usr/share/gtk-doc/html/gtk/GtkTreeModelFilter.html"
>GtkTreeModelFilter</a>
+----RBSourceListModel
</pre>
</div>
<div class="refsect1" lang="en">
<a name="RBSourceListModel.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
RBSourceListModel implements
<a
href="/usr/share/gtk-doc/html/gtk/GtkTreeModel.html"
>GtkTreeModel</a>, <a
href="/usr/share/gtk-doc/html/gtk/gtk-GtkTreeView-drag-and-drop.html#GtkTreeDragSource"
>GtkTreeDragSource</a>, <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragSource">RbTreeDragSource</a> and <a class="link" href="rhythmbox-rb-tree-dnd.html#RbTreeDragDest">RbTreeDragDest</a>.</p>
</div>
<div class="refsect1" lang="en">
<a name="RBSourceListModel.signals"></a><h2>Signals</h2>
<pre class="synopsis">
"<a class="link" href="RBSourceListModel.html#RBSourceListModel-drop-received" title='The "drop-received" signal'>drop-received</a>" : Run Last
</pre>
</div>
<div class="refsect1" lang="en">
<a name="RBSourceListModel.description"></a><h2>Description</h2>
<p>
The <a class="link" href="RBSourceList.html" title="rb-sourcelist"><span class="type">RBSourceList</span></a> widget is backed by a <a
href="/usr/share/gtk-doc/html/gtk/GtkTreeStore.html"
><span class="type">GtkTreeStore</span></a> containing
the sources and a set of attributes used to structure and display
them, and a <a
href="/usr/share/gtk-doc/html/gtk/GtkTreeModelFilter.html"
><span class="type">GtkTreeModelFilter</span></a> that hides sources with the
visibility property set to FALSE. This class implements the filter
model and also creates the actual model.
</p>
<p>
The source list model supports drag and drop in a variety of formats.
The simplest of these are text/uri-list and application/x-rhythmbox-entry,
which convey URIs and IDs of existing database entries. When dragged
to an existing source, these just add the URIs or entries to the target
source. When dragged to an empty space in the source list, this results
in the creation of a static playlist.
</p>
<p>
text/x-rhythmbox-artist, text/x-rhythmbox-album, and text/x-rhythmbox-genre
are used when dragging items from the library browser. When dragged to
the source list, these result in the creation of a new auto playlist with
the dragged items as criteria.</p>
<p>
</p>
</div>
<div class="refsect1" lang="en">
<a name="RBSourceListModel.details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="RBSourceListModel-struct"></a><h3>RBSourceListModel</h3>
<pre class="programlisting">typedef struct _RBSourceListModel RBSourceListModel;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="RBSourceListModelClass"></a><h3>RBSourceListModelClass</h3>
<pre class="programlisting">typedef struct {
GtkTreeModelFilterClass parent_class;
void (*drop_received) (RBSourceListModel *model, RBSource *target, GtkTreeViewDropPosition pos, GtkSelectionData *data);
} RBSourceListModelClass;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="RBSourceListModelColumn"></a><h3>enum RBSourceListModelColumn</h3>
<pre class="programlisting">typedef enum {
RB_SOURCELIST_MODEL_COLUMN_PLAYING = 0,
RB_SOURCELIST_MODEL_COLUMN_PIXBUF,
RB_SOURCELIST_MODEL_COLUMN_NAME,
RB_SOURCELIST_MODEL_COLUMN_SOURCE,
RB_SOURCELIST_MODEL_COLUMN_ATTRIBUTES,
RB_SOURCELIST_MODEL_COLUMN_VISIBILITY,
RB_SOURCELIST_MODEL_COLUMN_IS_GROUP,
RB_SOURCELIST_MODEL_COLUMN_GROUP_CATEGORY,
RB_SOURCELIST_MODEL_N_COLUMNS
} RBSourceListModelColumn;
</pre>
<p>
Columns present in the source list model.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="RB-SOURCELIST-MODEL-COLUMN-PLAYING:CAPS"></a><span class="term"><code class="literal">RB_SOURCELIST_MODEL_COLUMN_PLAYING</code></span></p></td>
<td> TRUE if the source is playing
</td>
</tr>
<tr>
<td><p><a name="RB-SOURCELIST-MODEL-COLUMN-PIXBUF:CAPS"></a><span class="term"><code class="literal">RB_SOURCELIST_MODEL_COLUMN_PIXBUF</code></span></p></td>
<td> the source's icon as a pixbuf
</td>
</tr>
<tr>
<td><p><a name="RB-SOURCELIST-MODEL-COLUMN-NAME:CAPS"></a><span class="term"><code class="literal">RB_SOURCELIST_MODEL_COLUMN_NAME</code></span></p></td>
<td> the source name
</td>
</tr>
<tr>
<td><p><a name="RB-SOURCELIST-MODEL-COLUMN-SOURCE:CAPS"></a><span class="term"><code class="literal">RB_SOURCELIST_MODEL_COLUMN_SOURCE</code></span></p></td>
<td> the <a class="link" href="RBSource.html" title="RBSource"><span class="type">RBSource</span></a> object
</td>
</tr>
<tr>
<td><p><a name="RB-SOURCELIST-MODEL-COLUMN-ATTRIBUTES:CAPS"></a><span class="term"><code class="literal">RB_SOURCELIST_MODEL_COLUMN_ATTRIBUTES</code></span></p></td>
<td> Pango attributes used to render the source name
</td>
</tr>
<tr>
<td><p><a name="RB-SOURCELIST-MODEL-COLUMN-VISIBILITY:CAPS"></a><span class="term"><code class="literal">RB_SOURCELIST_MODEL_COLUMN_VISIBILITY</code></span></p></td>
<td> the source's visibility
</td>
</tr>
<tr>
<td><p><a name="RB-SOURCELIST-MODEL-COLUMN-IS-GROUP:CAPS"></a><span class="term"><code class="literal">RB_SOURCELIST_MODEL_COLUMN_IS_GROUP</code></span></p></td>
<td> whether the row identifies a group or a source
</td>
</tr>
<tr>
<td><p><a name="RB-SOURCELIST-MODEL-COLUMN-GROUP-CATEGORY:CAPS"></a><span class="term"><code class="literal">RB_SOURCELIST_MODEL_COLUMN_GROUP_CATEGORY</code></span></p></td>
<td> if the row is a group, the category for the group
</td>
</tr>
<tr>
<td><p><a name="RB-SOURCELIST-MODEL-N-COLUMNS:CAPS"></a><span class="term"><code class="literal">RB_SOURCELIST_MODEL_N_COLUMNS</code></span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="rb-sourcelist-model-new"></a><h3>rb_sourcelist_model_new ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/gtk/GtkTreeModel.html"
>GtkTreeModel</a>* rb_sourcelist_model_new (void);</pre>
<p>
This constructs both the GtkTreeStore holding the source
data and the filter model that hides invisible sources.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the <a class="link" href="RBSourceListModel.html" title="rb-sourcelist-model"><span class="type">RBSourceListModel</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="rb-sourcelist-model-set-dnd-targets"></a><h3>rb_sourcelist_model_set_dnd_targets ()</h3>
<pre class="programlisting">void rb_sourcelist_model_set_dnd_targets (<a class="link" href="RBSourceListModel.html" title="rb-sourcelist-model">RBSourceListModel</a> *sourcelist,
<a
href="/usr/share/gtk-doc/html/gtk/GtkTreeView.html"
>GtkTreeView</a> *treeview);</pre>
<p>
Sets up the drag and drop targets for the source list.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sourcelist</code></em> :</span></p></td>
<td> the <a class="link" href="RBSourceListModel.html" title="rb-sourcelist-model"><span class="type">RBSourceListModel</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>treeview</code></em> :</span></p></td>
<td> the sourcel ist <a
href="/usr/share/gtk-doc/html/gtk/GtkTreeView.html"
><span class="type">GtkTreeView</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="RBSourceListModel.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2" lang="en">
<a name="RBSourceListModel-drop-received"></a><h3>The <code class="literal">"drop-received"</code> signal</h3>
<pre class="programlisting">void user_function (<a class="link" href="RBSourceListModel.html" title="rb-sourcelist-model">RBSourceListModel</a> *model,
<a class="link" href="RBSource.html" title="RBSource">RBSource</a> *target,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> pos,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run Last</pre>
<p>
Emitted when a drag and drop operation to the source list completes.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td>
<td> the <a class="link" href="RBSourceListModel.html" title="rb-sourcelist-model"><span class="type">RBSourceListModel</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td> the <a class="link" href="RBSource.html" title="RBSource"><span class="type">RBSource</span></a> receiving the drop
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
<td> the drop position
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td> the drop data
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.10</div>
</body>
</html>
|