43
43
<a name="RBHistory.synopsis"></a><h2>Synopsis</h2>
44
44
<pre class="synopsis"> <a class="link" href="RBHistory.html#RBHistory-struct" title="RBHistory">RBHistory</a>;
45
45
<a class="link" href="RBHistory.html#RBHistoryClass" title="RBHistoryClass">RBHistoryClass</a>;
46
<a class="link" href="RBHistory.html" title="RBHistory"><span class="returnvalue">RBHistory</span></a> * <a class="link" href="RBHistory.html#rb-history-new" title="rb_history_new ()">rb_history_new</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> truncate_on_play</code></em>,
47
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GFunc"><span class="type">GFunc</span></a> destroyer</code></em>,
48
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> destroy_userdata</code></em>);
46
<a class="link" href="RBHistory.html" title="RBHistory"><span class="returnvalue">RBHistory</span></a> * <a class="link" href="RBHistory.html#rb-history-new" title="rb_history_new ()">rb_history_new</a> (<em class="parameter"><code><span class="type">gboolean</span> truncate_on_play</code></em>,
47
<em class="parameter"><code><span class="type">GFunc</span> destroyer</code></em>,
48
<em class="parameter"><code><span class="type">gpointer</span> destroy_userdata</code></em>);
49
49
<span class="returnvalue">void</span> <a class="link" href="RBHistory.html#rb-history-set-destroy-notify" title="rb_history_set_destroy_notify ()">rb_history_set_destroy_notify</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>,
50
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GFunc"><span class="type">GFunc</span></a> destroyer</code></em>,
51
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> destroy_userdata</code></em>);
50
<em class="parameter"><code><span class="type">GFunc</span> destroyer</code></em>,
51
<em class="parameter"><code><span class="type">gpointer</span> destroy_userdata</code></em>);
52
52
<span class="returnvalue">void</span> <a class="link" href="RBHistory.html#rb-history-set-truncate-on-play" title="rb_history_set_truncate_on_play ()">rb_history_set_truncate_on_play</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>,
53
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> truncate_on_play</code></em>);
53
<em class="parameter"><code><span class="type">gboolean</span> truncate_on_play</code></em>);
54
54
<span class="returnvalue">void</span> <a class="link" href="RBHistory.html#rb-history-set-maximum-size" title="rb_history_set_maximum_size ()">rb_history_set_maximum_size</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>,
55
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> maximum_size</code></em>);
56
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="RBHistory.html#rb-history-length" title="rb_history_length ()">rb_history_length</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>);
55
<em class="parameter"><code><span class="type">guint</span> maximum_size</code></em>);
56
<span class="returnvalue">guint</span> <a class="link" href="RBHistory.html#rb-history-length" title="rb_history_length ()">rb_history_length</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>);
57
57
<a class="link" href="RhythmDB.html#RhythmDBEntry" title="RhythmDBEntry"><span class="returnvalue">RhythmDBEntry</span></a> * <a class="link" href="RBHistory.html#rb-history-first" title="rb_history_first ()">rb_history_first</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>);
58
58
<a class="link" href="RhythmDB.html#RhythmDBEntry" title="RhythmDBEntry"><span class="returnvalue">RhythmDBEntry</span></a> * <a class="link" href="RBHistory.html#rb-history-previous" title="rb_history_previous ()">rb_history_previous</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>);
59
59
<a class="link" href="RhythmDB.html#RhythmDBEntry" title="RhythmDBEntry"><span class="returnvalue">RhythmDBEntry</span></a> * <a class="link" href="RBHistory.html#rb-history-current" title="rb_history_current ()">rb_history_current</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>);
67
67
<em class="parameter"><code><a class="link" href="RhythmDB.html#RhythmDBEntry" title="RhythmDBEntry"><span class="type">RhythmDBEntry</span></a> *entry</code></em>);
68
68
<span class="returnvalue">void</span> <a class="link" href="RBHistory.html#rb-history-append" title="rb_history_append ()">rb_history_append</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>,
69
69
<em class="parameter"><code><a class="link" href="RhythmDB.html#RhythmDBEntry" title="RhythmDBEntry"><span class="type">RhythmDBEntry</span></a> *entry</code></em>);
70
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="RBHistory.html#rb-history-get-current-index" title="rb_history_get_current_index ()">rb_history_get_current_index</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>);
70
<span class="returnvalue">gint</span> <a class="link" href="RBHistory.html#rb-history-get-current-index" title="rb_history_get_current_index ()">rb_history_get_current_index</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>);
71
71
<span class="returnvalue">void</span> <a class="link" href="RBHistory.html#rb-history-insert-at-index" title="rb_history_insert_at_index ()">rb_history_insert_at_index</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>,
72
72
<em class="parameter"><code><a class="link" href="RhythmDB.html#RhythmDBEntry" title="RhythmDBEntry"><span class="type">RhythmDBEntry</span></a> *entry</code></em>,
73
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> index</code></em>);
73
<em class="parameter"><code><span class="type">guint</span> index</code></em>);
74
74
<span class="returnvalue">void</span> <a class="link" href="RBHistory.html#rb-history-remove-entry" title="rb_history_remove_entry ()">rb_history_remove_entry</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>,
75
75
<em class="parameter"><code><a class="link" href="RhythmDB.html#RhythmDBEntry" title="RhythmDBEntry"><span class="type">RhythmDBEntry</span></a> *entry</code></em>);
76
76
<span class="returnvalue">void</span> <a class="link" href="RBHistory.html#rb-history-clear" title="rb_history_clear ()">rb_history_clear</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>);
77
<a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * <a class="link" href="RBHistory.html#rb-history-dump" title="rb_history_dump ()">rb_history_dump</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>);
78
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="RBHistory.html#rb-history-contains-entry" title="rb_history_contains_entry ()">rb_history_contains_entry</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>,
77
<span class="returnvalue">GPtrArray</span> * <a class="link" href="RBHistory.html#rb-history-dump" title="rb_history_dump ()">rb_history_dump</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>);
78
<span class="returnvalue">gboolean</span> <a class="link" href="RBHistory.html#rb-history-contains-entry" title="rb_history_contains_entry ()">rb_history_contains_entry</a> (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>,
79
79
<em class="parameter"><code><a class="link" href="RhythmDB.html#RhythmDBEntry" title="RhythmDBEntry"><span class="type">RhythmDBEntry</span></a> *entry</code></em>);
82
82
<div class="refsect1" title="Object Hierarchy">
83
83
<a name="RBHistory.object-hierarchy"></a><h2>Object Hierarchy</h2>
84
84
<pre class="synopsis">
85
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
89
89
<div class="refsect1" title="Properties">
90
90
<a name="RBHistory.properties"></a><h2>Properties</h2>
91
91
<pre class="synopsis">
92
"<a class="link" href="RBHistory.html#RBHistory--maximum-size" title='The "maximum-size" property'>maximum-size</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write
93
"<a class="link" href="RBHistory.html#RBHistory--truncate-on-play" title='The "truncate-on-play" property'>truncate-on-play</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct
92
"<a class="link" href="RBHistory.html#RBHistory--maximum-size" title='The "maximum-size" property'>maximum-size</a>" <span class="type">guint</span> : Read / Write
93
"<a class="link" href="RBHistory.html#RBHistory--truncate-on-play" title='The "truncate-on-play" property'>truncate-on-play</a>" <span class="type">gboolean</span> : Read / Write / Construct
96
96
<div class="refsect1" title="Description">
127
127
<div class="refsect2" title="rb_history_new ()">
128
128
<a name="rb-history-new"></a><h3>rb_history_new ()</h3>
129
<pre class="programlisting"><a class="link" href="RBHistory.html" title="RBHistory"><span class="returnvalue">RBHistory</span></a> * rb_history_new (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> truncate_on_play</code></em>,
130
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GFunc"><span class="type">GFunc</span></a> destroyer</code></em>,
131
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> destroy_userdata</code></em>);</pre>
129
<pre class="programlisting"><a class="link" href="RBHistory.html" title="RBHistory"><span class="returnvalue">RBHistory</span></a> * rb_history_new (<em class="parameter"><code><span class="type">gboolean</span> truncate_on_play</code></em>,
130
<em class="parameter"><code><span class="type">GFunc</span> destroyer</code></em>,
131
<em class="parameter"><code><span class="type">gpointer</span> destroy_userdata</code></em>);</pre>
133
133
Creates a new history instance.
162
162
<div class="refsect2" title="rb_history_set_destroy_notify ()">
163
163
<a name="rb-history-set-destroy-notify"></a><h3>rb_history_set_destroy_notify ()</h3>
164
164
<pre class="programlisting"><span class="returnvalue">void</span> rb_history_set_destroy_notify (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>,
165
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GFunc"><span class="type">GFunc</span></a> destroyer</code></em>,
166
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> destroy_userdata</code></em>);</pre>
165
<em class="parameter"><code><span class="type">GFunc</span> destroyer</code></em>,
166
<em class="parameter"><code><span class="type">gpointer</span> destroy_userdata</code></em>);</pre>
168
168
Sets a new function to call when removing entries from the history.
192
192
<div class="refsect2" title="rb_history_set_truncate_on_play ()">
193
193
<a name="rb-history-set-truncate-on-play"></a><h3>rb_history_set_truncate_on_play ()</h3>
194
194
<pre class="programlisting"><span class="returnvalue">void</span> rb_history_set_truncate_on_play (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>,
195
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> truncate_on_play</code></em>);</pre>
195
<em class="parameter"><code><span class="type">gboolean</span> truncate_on_play</code></em>);</pre>
197
197
Sets the 'truncate-on-play' property.
216
216
<div class="refsect2" title="rb_history_set_maximum_size ()">
217
217
<a name="rb-history-set-maximum-size"></a><h3>rb_history_set_maximum_size ()</h3>
218
218
<pre class="programlisting"><span class="returnvalue">void</span> rb_history_set_maximum_size (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>,
219
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> maximum_size</code></em>);</pre>
219
<em class="parameter"><code><span class="type">guint</span> maximum_size</code></em>);</pre>
221
221
Sets the maximum-size property
240
240
<div class="refsect2" title="rb_history_length ()">
241
241
<a name="rb-history-length"></a><h3>rb_history_length ()</h3>
242
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> rb_history_length (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>);</pre>
242
<pre class="programlisting"><span class="returnvalue">guint</span> rb_history_length (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>);</pre>
244
244
Returns the number of entries in the history.
496
496
<div class="refsect2" title="rb_history_get_current_index ()">
497
497
<a name="rb-history-get-current-index"></a><h3>rb_history_get_current_index ()</h3>
498
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> rb_history_get_current_index (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>);</pre>
498
<pre class="programlisting"><span class="returnvalue">gint</span> rb_history_get_current_index (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>);</pre>
500
500
Gets the index of the current entry. This is guaranteed to be < the
501
501
history's size, so if the history is empty, it returns -1.
521
521
<a name="rb-history-insert-at-index"></a><h3>rb_history_insert_at_index ()</h3>
522
522
<pre class="programlisting"><span class="returnvalue">void</span> rb_history_insert_at_index (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>,
523
523
<em class="parameter"><code><a class="link" href="RhythmDB.html#RhythmDBEntry" title="RhythmDBEntry"><span class="type">RhythmDBEntry</span></a> *entry</code></em>,
524
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> index</code></em>);</pre>
524
<em class="parameter"><code><span class="type">guint</span> index</code></em>);</pre>
526
526
Inserts <em class="parameter"><code>entry</code></em> at <em class="parameter"><code>index</code></em> within the history list. 0<=<em class="parameter"><code>index</code></em><=size
590
590
<div class="refsect2" title="rb_history_dump ()">
591
591
<a name="rb-history-dump"></a><h3>rb_history_dump ()</h3>
592
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * rb_history_dump (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>);</pre>
592
<pre class="programlisting"><span class="returnvalue">GPtrArray</span> * rb_history_dump (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>);</pre>
594
594
Constructs a copy of the whole history in order. Caller must free the result.
595
595
The caller does not own any references on the entries in the returned array.
615
615
<div class="refsect2" title="rb_history_contains_entry ()">
616
616
<a name="rb-history-contains-entry"></a><h3>rb_history_contains_entry ()</h3>
617
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> rb_history_contains_entry (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>,
617
<pre class="programlisting"><span class="returnvalue">gboolean</span> rb_history_contains_entry (<em class="parameter"><code><a class="link" href="RBHistory.html" title="RBHistory"><span class="type">RBHistory</span></a> *hist</code></em>,
618
618
<em class="parameter"><code><a class="link" href="RhythmDB.html#RhythmDBEntry" title="RhythmDBEntry"><span class="type">RhythmDBEntry</span></a> *entry</code></em>);</pre>
620
Returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the entry is present in the history list.
620
Returns <code class="literal">TRUE</code> if the entry is present in the history list.
622
622
<div class="variablelist"><table border="0">
623
623
<col align="left" valign="top">
645
645
<a name="RBHistory.property-details"></a><h2>Property Details</h2>
646
646
<div class="refsect2" title='The "maximum-size" property'>
647
647
<a name="RBHistory--maximum-size"></a><h3>The <code class="literal">"maximum-size"</code> property</h3>
648
<pre class="programlisting"> "maximum-size" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write</pre>
648
<pre class="programlisting"> "maximum-size" <span class="type">guint</span> : Read / Write</pre>
650
650
Maximum number of entries to store in the history. If 0, no limit is applied.
655
655
<div class="refsect2" title='The "truncate-on-play" property'>
656
656
<a name="RBHistory--truncate-on-play"></a><h3>The <code class="literal">"truncate-on-play"</code> property</h3>
657
<pre class="programlisting"> "truncate-on-play" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct</pre>
657
<pre class="programlisting"> "truncate-on-play" <span class="type">gboolean</span> : Read / Write / Construct</pre>
659
659
If set, <a class="link" href="RBHistory.html#rb-history-set-playing" title="rb_history_set_playing ()"><code class="function">rb_history_set_playing()</code></a> truncates the rest of the history