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.
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_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_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_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_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.
Properties
RB.History:maximum-size
Maximum number of entries to store in the history. If 0, no limit is applied.
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.