Class

RBHistory

Description [src]

class RB.History : GObject.Object
{
  priv: RBHistoryPrivate*
}

RBHistory is a GSequence that maintains a “current” pointer and can delete an arbitrary element in amortized O(log(N)) time. It can call a deletion callback when it removes one of its entries.

All operations take amortized O(log(N)) (worst-case O(N)) time unless noted otherwise.

Ancestors

Constructors

rb_history_new

Creates a new history instance.

Instance methods

rb_history_append

Adds a new entry to the end of the history list. If a size limit is set, an entry may be removed from the start to keep the history list within the limit.

rb_history_clear

Empties the history list.

rb_history_contains_entry

Returns TRUE if the entry is present in the history list.

rb_history_current

Returns the current RhythmDBEntry, or NULL if there is no current position.

rb_history_dump

Constructs a copy of the whole history in order. Caller must free the result. The caller does not own any references on the entries in the returned array. Takes O(Nlog(N)) time.

rb_history_first

Returns the first entry in the history.

rb_history_get_current_index

Gets the index of the current entry. This is guaranteed to be < the history’s size, so if the history is empty, it returns -1.

rb_history_go_first

Moves the current position to the first entry in the history.

rb_history_go_last

Moves the current position to the last entry in the history.

rb_history_go_next

Moves the current position to the next entry. If the current position is already at the end of the history, nothing happens.

rb_history_go_previous

Moves the current position to the previous entry. If the current position is already at the start of the history, nothing happens.

rb_history_insert_at_index

Inserts entry at index within the history list. 0<=index<=size.

rb_history_last

Returns the last RhythmDBEntry in the history.

rb_history_length

Returns the number of entries in the history.

rb_history_next

Returns the RhythmDBEntry after the current position.

rb_history_previous

Returns the RhythmDBEntry before the current position.

rb_history_remove_entry

Removes the specified entry from the history list.

rb_history_set_destroy_notify

Sets a new function to call when removing entries from the history.

rb_history_set_maximum_size

Sets the maximum-size property.

rb_history_set_playing

Updates the current position to point to the specified entry. If the truncate-on-play property is set, this will remove all entries after that.

rb_history_set_truncate_on_play

Sets the ‘truncate-on-play’ property.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

RB.History:maximum-size

Maximum number of entries to store in the history. If 0, no limit is applied.

RB.History:truncate-on-play

If set, rb_history_set_playing() truncates the rest of the history.

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct RBHistoryClass {
  GObjectClass parent_class;
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.