8
8
<link rel="up" href="ch02.html" title="Lib">
9
9
<link rel="prev" href="rhythmbox-Media-player-ID.html" title="Media player ID">
10
10
<link rel="next" href="rhythmbox-rb-debug.html" title="rb-debug">
11
<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
37
37
</tr></table></div>
38
38
<div class="refsynopsisdiv">
39
39
<a name="rhythmbox-rb-async-queue-watch.synopsis"></a><h2>Synopsis</h2>
40
<pre class="synopsis"><span class="returnvalue">void</span> (<a class="link" href="rhythmbox-rb-async-queue-watch.html#RBAsyncQueueWatchFunc" title="RBAsyncQueueWatchFunc ()">*RBAsyncQueueWatchFunc</a>) (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> item</code></em>,
41
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
42
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="rhythmbox-rb-async-queue-watch.html#rb-async-queue-watch-new" title="rb_async_queue_watch_new ()">rb_async_queue_watch_new</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Asynchronous-Queues.html#GAsyncQueue"><span class="type">GAsyncQueue</span></a> *queue</code></em>,
43
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> priority</code></em>,
40
<pre class="synopsis"><span class="returnvalue">void</span> (<a class="link" href="rhythmbox-rb-async-queue-watch.html#RBAsyncQueueWatchFunc" title="RBAsyncQueueWatchFunc ()">*RBAsyncQueueWatchFunc</a>) (<em class="parameter"><code><span class="type">gpointer</span> item</code></em>,
41
<em class="parameter"><code><span class="type">gpointer</span> data</code></em>);
42
<span class="returnvalue">guint</span> <a class="link" href="rhythmbox-rb-async-queue-watch.html#rb-async-queue-watch-new" title="rb_async_queue_watch_new ()">rb_async_queue_watch_new</a> (<em class="parameter"><code><span class="type">GAsyncQueue</span> *queue</code></em>,
43
<em class="parameter"><code><span class="type">gint</span> priority</code></em>,
44
44
<em class="parameter"><code><a class="link" href="rhythmbox-rb-async-queue-watch.html#RBAsyncQueueWatchFunc" title="RBAsyncQueueWatchFunc ()"><span class="type">RBAsyncQueueWatchFunc</span></a> callback</code></em>,
45
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
46
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>,
47
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *context</code></em>);
45
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
46
<em class="parameter"><code><span class="type">GDestroyNotify</span> notify</code></em>,
47
<em class="parameter"><code><span class="type">GMainContext</span> *context</code></em>);
50
50
<div class="refsect1">
51
51
<a name="rhythmbox-rb-async-queue-watch.description"></a><h2>Description</h2>
53
This provides a way to feed work items to the main loop using a <a href="http://library.gnome.org/devel/glib/unstable/glib-Asynchronous-Queues.html#GAsyncQueue"><span class="type">GAsyncQueue</span></a>
53
This provides a way to feed work items to the main loop using a <span class="type">GAsyncQueue</span>
54
54
without polling it.
58
58
<a name="rhythmbox-rb-async-queue-watch.details"></a><h2>Details</h2>
59
59
<div class="refsect2">
60
60
<a name="RBAsyncQueueWatchFunc"></a><h3>RBAsyncQueueWatchFunc ()</h3>
61
<pre class="programlisting"><span class="returnvalue">void</span> (*RBAsyncQueueWatchFunc) (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> item</code></em>,
62
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
61
<pre class="programlisting"><span class="returnvalue">void</span> (*RBAsyncQueueWatchFunc) (<em class="parameter"><code><span class="type">gpointer</span> item</code></em>,
62
<em class="parameter"><code><span class="type">gpointer</span> data</code></em>);</pre>
64
64
Callback to call when an item is found in the queue.
81
81
<div class="refsect2">
82
82
<a name="rb-async-queue-watch-new"></a><h3>rb_async_queue_watch_new ()</h3>
83
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> rb_async_queue_watch_new (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Asynchronous-Queues.html#GAsyncQueue"><span class="type">GAsyncQueue</span></a> *queue</code></em>,
84
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> priority</code></em>,
83
<pre class="programlisting"><span class="returnvalue">guint</span> rb_async_queue_watch_new (<em class="parameter"><code><span class="type">GAsyncQueue</span> *queue</code></em>,
84
<em class="parameter"><code><span class="type">gint</span> priority</code></em>,
85
85
<em class="parameter"><code><a class="link" href="rhythmbox-rb-async-queue-watch.html#RBAsyncQueueWatchFunc" title="RBAsyncQueueWatchFunc ()"><span class="type">RBAsyncQueueWatchFunc</span></a> callback</code></em>,
86
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
87
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>,
88
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *context</code></em>);</pre>
86
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
87
<em class="parameter"><code><span class="type">GDestroyNotify</span> notify</code></em>,
88
<em class="parameter"><code><span class="type">GMainContext</span> *context</code></em>);</pre>
90
Creates a new <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GSource"><span class="type">GSource</span></a> that triggers when the <a href="http://library.gnome.org/devel/glib/unstable/glib-Asynchronous-Queues.html#GAsyncQueue"><span class="type">GAsyncQueue</span></a> is
90
Creates a new <span class="type">GSource</span> that triggers when the <span class="type">GAsyncQueue</span> is
91
91
non-empty. This is used in rhythmbox to process queues within
92
92
<a class="link" href="RhythmDB.html" title="RhythmDB"><span class="type">RhythmDB</span></a> in the main thread without polling.
98
98
<td><p><span class="term"><em class="parameter"><code>queue</code></em> :</span></p></td>
99
<td>the <a href="http://library.gnome.org/devel/glib/unstable/glib-Asynchronous-Queues.html#GAsyncQueue"><span class="type">GAsyncQueue</span></a> to watch</td>
99
<td>the <span class="type">GAsyncQueue</span> to watch</td>
102
102
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
103
<td>priority value for the <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GSource"><span class="type">GSource</span></a>
103
<td>priority value for the <span class="type">GSource</span>
119
119
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
120
<td>the <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> to attach the source to</td>
120
<td>the <span class="type">GMainContext</span> to attach the source to</td>
123
123
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
124
<td>the ID of the new <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GSource"><span class="type">GSource</span></a>
124
<td>the ID of the new <span class="type">GSource</span>