Struct
GLibQueue
since: 2.0
Description
struct GQueue {
GList* head;
GList* tail;
guint length;
}
Contains the public fields of a [Queue][glib-Double-ended-Queues].
Structure members
headA pointer to the first element of the queue.
tailA pointer to the last element of the queue.
lengthThe number of elements in the queue.
Available since: 2.0
Instance methods
g_queue_clear
Removes all the elements in queue. If queue elements contain
dynamically-allocated memory, they should be freed first.
since: 2.14
g_queue_clear_full
Convenience method, which frees all the memory used by a GQueue,
and calls the provided free_func on each item in the GQueue.
since: 2.60
g_queue_copy
Copies a queue. Note that is a shallow copy. If the elements in the
queue consist of pointers to data, the pointers are copied, but the
actual data is not.
since: 2.4
g_queue_find_custom
Finds an element in a GQueue, using a supplied function to find the
desired element. It iterates over the queue, calling the given function
which should return 0 when the desired element is found. The function
takes two gconstpointer arguments, the GQueue element’s data as the
first argument and the given user data as the second argument.
since: 2.4
g_queue_foreach
Calls func for each element in the queue passing user_data to the function.
since: 2.4
g_queue_free
Frees the memory allocated for the GQueue. Only call this function
if queue was created with g_queue_new(). If queue elements contain
dynamically-allocated memory, they should be freed first.
since: 2.0
g_queue_free_full
Convenience method, which frees all the memory used by a GQueue,
and calls the specified destroy function on every element’s data.
since: 2.32
g_queue_init
A statically-allocated GQueue must be initialized with this function
before it can be used. Alternatively you can initialize it with
G_QUEUE_INIT. It is not necessary to initialize queues created with g_queue_new().
since: 2.14
g_queue_unlink
Unlinks link_ so that it will no longer be part of queue.
The link is not freed.
since: 2.4