Since 2.14appendAdds a new item to the end of seq.
the data for the new item
an iterator pointing to the new item
Since 2.14foreachCalls func for each item in the sequence passing user_data
to the function. func must not modify the sequence itself.
the function to call for each item in seq
Since 2.14freeSince 2.14get_Since 2.14get_Since 2.14get_Returns the iterator at position pos. If pos is negative or larger
than the number of items in seq, the end iterator is returned.
a position in seq, or -1 for the end
The GLib.SequenceIter at position pos
Since 2.14get_Since 2.14insert_Inserts data into seq using cmp_func to determine the new
position. The sequence must already be sorted according to cmp_func;
otherwise the new position of data is undefined.
cmp_func is called with two items of the seq, and cmp_data.
It should return 0 if the items are equal, a negative value
if the first item comes before the second, and a positive value
if the second item comes before the first.
Note that when adding a large amount of data to a GLib.Sequence,
it is more efficient to do unsorted insertions and then call
g_sequence_sort() or g_sequence_sort_iter().
the data to insert
the function used to compare items in the sequence
a GLib.SequenceIter pointing to the new item.
Since 2.14insert_Like g_sequence_insert_sorted(), but uses
a GLib.SequenceIterCompareFunc instead of a GLib.CompareDataFunc as
the compare function.
iter_cmp is called with two iterators pointing into seq.
It should return 0 if the iterators are equal, a negative
value if the first iterator comes before the second, and a
positive value if the second iterator comes before the first.
Note that when adding a large amount of data to a GLib.Sequence,
it is more efficient to do unsorted insertions and then call
g_sequence_sort() or g_sequence_sort_iter().
data for the new item
the function used to compare iterators in the sequence
a GLib.SequenceIter pointing to the new item
Since 2.48is_Since 2.28lookupReturns an iterator pointing to the position of the first item found
equal to data according to cmp_func and cmp_data. If more than one
item is equal, it is not guaranteed that it is the first which is
returned. In that case, you can use g_sequence_iter_next() and
g_sequence_iter_prev() to get others.
cmp_func is called with two items of the seq, and cmp_data.
It should return 0 if the items are equal, a negative value if
the first item comes before the second, and a positive value if
the second item comes before the first.
This function will fail if the data contained in the sequence is unsorted.
data to look up
the function used to compare items in the sequence
an GLib.SequenceIter pointing to the position of the first item found equal to data according to cmp_func and cmp_data, or null if no such item exists
Since 2.28lookup_Like g_sequence_lookup(), but uses a GLib.SequenceIterCompareFunc
instead of a GLib.CompareDataFunc as the compare function.
iter_cmp is called with two iterators pointing into seq.
It should return 0 if the iterators are equal, a negative value
if the first iterator comes before the second, and a positive
value if the second iterator comes before the first.
This function will fail if the data contained in the sequence is unsorted.
data to look up
the function used to compare iterators in the sequence
an GLib.SequenceIter pointing to the position of the first item found equal to data according to iter_cmp and cmp_data, or null if no such item exists
Since 2.14prependAdds a new item to the front of seq
the data for the new item
an iterator pointing to the new item
Since 2.14searchReturns an iterator pointing to the position where data would
be inserted according to cmp_func and cmp_data.
cmp_func is called with two items of the seq, and cmp_data.
It should return 0 if the items are equal, a negative value if
the first item comes before the second, and a positive value if
the second item comes before the first.
If you are simply searching for an existing element of the sequence,
consider using g_sequence_lookup().
This function will fail if the data contained in the sequence is unsorted.
data for the new item
the function used to compare items in the sequence
an GLib.SequenceIter pointing to the position where data would have been inserted according to cmp_func and cmp_data
Since 2.14search_Like g_sequence_search(), but uses a GLib.SequenceIterCompareFunc
instead of a GLib.CompareDataFunc as the compare function.
iter_cmp is called with two iterators pointing into seq.
It should return 0 if the iterators are equal, a negative value
if the first iterator comes before the second, and a positive
value if the second iterator comes before the first.
If you are simply searching for an existing element of the sequence,
consider using g_sequence_lookup_iter().
This function will fail if the data contained in the sequence is unsorted.
data for the new item
the function used to compare iterators in the sequence
a GLib.SequenceIter pointing to the position in seq where data would have been inserted according to iter_cmp and cmp_data
Since 2.14sortSorts seq using cmp_func.
cmp_func is passed two items of seq and should
return 0 if they are equal, a negative value if the
first comes before the second, and a positive value
if the second comes before the first.
the function used to sort the sequence
Since 2.14sort_Like g_sequence_sort(), but uses a GLib.SequenceIterCompareFunc instead
of a GLib.CompareDataFunc as the compare function
cmp_func is called with two iterators pointing into seq. It should
return 0 if the iterators are equal, a negative value if the first
iterator comes before the second, and a positive value if the second
iterator comes before the first.
the function used to compare iterators in the sequence
StaticSince 2.14foreach_Calls func for each item in the range (begin, end) passing
user_data to the function. func must not modify the sequence
itself.
StaticSince 2.14getStaticSince 2.14insert_Inserts a new item just before the item pointed to by iter.
the data for the new item
StaticSince 2.14moveMoves the item pointed to by src to the position indicated by dest.
After calling this function dest will point to the position immediately
after src. It is allowed for src and dest to point into different
sequences.
a GLib.SequenceIter pointing to the item to move
a GLib.SequenceIter pointing to the position to which the item is moved
StaticSince 2.14move_Inserts the (begin, end) range at the destination pointed to by dest.
The begin and end iters must point into the same sequence. It is
allowed for dest to point to a different sequence than the one pointed
into by begin and end.
If dest is null, the range indicated by begin and end is
removed from the sequence. If dest points to a place within
the (begin, end) range, the range does not move.
StaticSince 2.14range_Finds an iterator somewhere in the range (begin, end). This
iterator will be close to the middle of the range, but is not
guaranteed to be exactly in the middle.
The begin and end iterators must both point to the same sequence
and begin must come before or be equal to end in the sequence.
StaticSince 2.14removeRemoves the item pointed to by iter. It is an error to pass the
end iterator to this function.
If the sequence has a data destroy function associated with it, this function is called on the data for the removed item.
StaticSince 2.14remove_Removes all items in the (begin, end) range.
If the sequence has a data destroy function associated with it, this function is called on the data for the removed items.
StaticSince 2.14setChanges the data for the item pointed to by iter to be data. If
the sequence has a data destroy function associated with it, that
function is called on the existing data that iter pointed to.
new data for the item
StaticSince 2.14sort_Moves the data pointed to by iter to a new position as indicated by
cmp_func. This
function should be called for items in a sequence already sorted according
to cmp_func whenever some aspect of an item changes so that cmp_func
may return different values for that item.
cmp_func is called with two items of the seq, and cmp_data.
It should return 0 if the items are equal, a negative value if
the first item comes before the second, and a positive value if
the second item comes before the first.
the function used to compare items in the sequence
StaticSince 2.14sort_Like g_sequence_sort_changed(), but uses
a GLib.SequenceIterCompareFunc instead of a GLib.CompareDataFunc as
the compare function.
iter_cmp is called with two iterators pointing into the GLib.Sequence that
iter points into. It should
return 0 if the iterators are equal, a negative value if the first
iterator comes before the second, and a positive value if the second
iterator comes before the first.
the function used to compare iterators in the sequence
StaticSince 2.14swapSwaps the items pointed to by a and b. It is allowed for a and b
to point into difference sequences.
The GLib.Sequence struct is an opaque data type representing a sequence data type.