glib.queue
Module for [Queue] class
class Queue
Types 1
classQueue
Contains the public fields of a [Queue][glib-Double-ended-Queues].
Fields
GQueue _cInstanceMethods
void * _cPtr()void length(uint propval) @propertySet `length` field. Params: propval = the number of elements in the queuevoid clear()Removes all the elements in queue. If queue elements contain dynamically-allocated memory, they should be freed first.void clearFull(glib.types.DestroyNotify freeFunc = null)Convenience method, which frees all the memory used by a #GQueue, and calls the provided free_func on each item in the #GQueue.void foreach_(glib.types.Func func)Calls func for each element in the queue passing user_data to the function.void freeFull(glib.types.DestroyNotify freeFunc)Convenience method, which frees all the memory used by a #GQueue, and calls the specified destroy function on every element's data.uint getLength()Returns the number of items in queue. Returns: the number of items in queueint index(const(void) * data = null)Returns the position of the first element in queue which contains data.void init_()A statically-allocated #GQueue must be initialized with this function before it can be used. Alternatively you can initialize it with `GQUEUEINIT`. It is not necessary to initialize queues created ...void insertSorted(void * data, glib.types.CompareDataFunc func)Inserts data into queue using func to determine the new position.bool isEmpty()Returns true if the queue is empty. Returns: true if the queue is emptyvoid * peekHead()Returns the first element of the queue. Returns: the data of the first element in the queue, or null if the queue is emptyvoid * peekNth(uint n)Returns the `n`'th element of queue.void * peekTail()Returns the last element of the queue. Returns: the data of the last element in the queue, or null if the queue is emptyvoid * popHead()Removes the first element of the queue and returns its data. Returns: the data of the first element in the queue, or null if the queue is emptyvoid * popNth(uint n)Removes the `n`'th element of queue and returns its data.void * popTail()Removes the last element of the queue and returns its data. Returns: the data of the last element in the queue, or null if the queue is emptyvoid pushHead(void * data = null)Adds a new element at the head of the queue.void pushNth(void * data, int n)Inserts a new element into queue at the given position.void pushTail(void * data = null)Adds a new element at the tail of the queue.bool remove(const(void) * data = null)Removes the first element in queue that contains data.uint removeAll(const(void) * data = null)Remove all elements whose data equals data from queue.void reverse()Reverses the order of the items in queue.void sort(glib.types.CompareDataFunc compareFunc)Sorts queue using compare_func.Destructors