mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-16 10:51:07 +02:00
GQueue: documentation and formatting fixes
This commit is contained in:
parent
a918519328
commit
44db9f2a0f
191
glib/gqueue.c
191
glib/gqueue.c
@ -61,7 +61,7 @@
|
|||||||
*
|
*
|
||||||
* Creates a new #GQueue.
|
* Creates a new #GQueue.
|
||||||
*
|
*
|
||||||
* Returns: a new #GQueue.
|
* Returns: a newly allocated #GQueue
|
||||||
**/
|
**/
|
||||||
GQueue *
|
GQueue *
|
||||||
g_queue_new (void)
|
g_queue_new (void)
|
||||||
@ -71,10 +71,10 @@ g_queue_new (void)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_queue_free:
|
* g_queue_free:
|
||||||
* @queue: a #GQueue.
|
* @queue: a #GQueue
|
||||||
*
|
*
|
||||||
* Frees the memory allocated for the #GQueue. Only call this function if
|
* Frees the memory allocated for the #GQueue. Only call this function
|
||||||
* @queue was created with g_queue_new(). If queue elements contain
|
* if @queue was created with g_queue_new(). If queue elements contain
|
||||||
* dynamically-allocated memory, they should be freed first.
|
* dynamically-allocated memory, they should be freed first.
|
||||||
*
|
*
|
||||||
* <note><para>
|
* <note><para>
|
||||||
@ -97,8 +97,8 @@ g_queue_free (GQueue *queue)
|
|||||||
* @queue: a pointer to a #GQueue
|
* @queue: a pointer to a #GQueue
|
||||||
* @free_func: the function to be called to free each element's data
|
* @free_func: the function to be called to free each element's data
|
||||||
*
|
*
|
||||||
* Convenience method, which frees all the memory used by a #GQueue, and
|
* Convenience method, which frees all the memory used by a #GQueue,
|
||||||
* calls the specified destroy function on every element's data.
|
* and calls the specified destroy function on every element's data.
|
||||||
*
|
*
|
||||||
* Since: 2.32
|
* Since: 2.32
|
||||||
*/
|
*/
|
||||||
@ -120,7 +120,7 @@ g_queue_free_full (GQueue *queue,
|
|||||||
* g_queue_new().
|
* g_queue_new().
|
||||||
*
|
*
|
||||||
* Since: 2.14
|
* Since: 2.14
|
||||||
**/
|
*/
|
||||||
void
|
void
|
||||||
g_queue_init (GQueue *queue)
|
g_queue_init (GQueue *queue)
|
||||||
{
|
{
|
||||||
@ -154,8 +154,8 @@ g_queue_clear (GQueue *queue)
|
|||||||
*
|
*
|
||||||
* Returns %TRUE if the queue is empty.
|
* Returns %TRUE if the queue is empty.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if the queue is empty.
|
* Returns: %TRUE if the queue is empty
|
||||||
**/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
g_queue_is_empty (GQueue *queue)
|
g_queue_is_empty (GQueue *queue)
|
||||||
{
|
{
|
||||||
@ -170,10 +170,10 @@ g_queue_is_empty (GQueue *queue)
|
|||||||
*
|
*
|
||||||
* Returns the number of items in @queue.
|
* Returns the number of items in @queue.
|
||||||
*
|
*
|
||||||
* Return value: The number of items in @queue.
|
* Return value: the number of items in @queue
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
guint
|
guint
|
||||||
g_queue_get_length (GQueue *queue)
|
g_queue_get_length (GQueue *queue)
|
||||||
{
|
{
|
||||||
@ -189,7 +189,7 @@ g_queue_get_length (GQueue *queue)
|
|||||||
* Reverses the order of the items in @queue.
|
* Reverses the order of the items in @queue.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
void
|
void
|
||||||
g_queue_reverse (GQueue *queue)
|
g_queue_reverse (GQueue *queue)
|
||||||
{
|
{
|
||||||
@ -207,10 +207,10 @@ g_queue_reverse (GQueue *queue)
|
|||||||
* queue consist of pointers to data, the pointers are copied, but the
|
* queue consist of pointers to data, the pointers are copied, but the
|
||||||
* actual data is not.
|
* actual data is not.
|
||||||
*
|
*
|
||||||
* Return value: A copy of @queue
|
* Return value: a copy of @queue
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
GQueue *
|
GQueue *
|
||||||
g_queue_copy (GQueue *queue)
|
g_queue_copy (GQueue *queue)
|
||||||
{
|
{
|
||||||
@ -237,7 +237,7 @@ g_queue_copy (GQueue *queue)
|
|||||||
* function.
|
* function.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
void
|
void
|
||||||
g_queue_foreach (GQueue *queue,
|
g_queue_foreach (GQueue *queue,
|
||||||
GFunc func,
|
GFunc func,
|
||||||
@ -264,10 +264,10 @@ g_queue_foreach (GQueue *queue,
|
|||||||
*
|
*
|
||||||
* Finds the first link in @queue which contains @data.
|
* Finds the first link in @queue which contains @data.
|
||||||
*
|
*
|
||||||
* Return value: The first link in @queue which contains @data.
|
* Return value: the first link in @queue which contains @data
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
GList *
|
GList *
|
||||||
g_queue_find (GQueue *queue,
|
g_queue_find (GQueue *queue,
|
||||||
gconstpointer data)
|
gconstpointer data)
|
||||||
@ -290,10 +290,10 @@ g_queue_find (GQueue *queue,
|
|||||||
* takes two gconstpointer arguments, the #GQueue element's data as the
|
* takes two gconstpointer arguments, the #GQueue element's data as the
|
||||||
* first argument and the given user data as the second argument.
|
* first argument and the given user data as the second argument.
|
||||||
*
|
*
|
||||||
* Return value: The found link, or %NULL if it wasn't found
|
* Return value: the found link, or %NULL if it wasn't found
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
GList *
|
GList *
|
||||||
g_queue_find_custom (GQueue *queue,
|
g_queue_find_custom (GQueue *queue,
|
||||||
gconstpointer data,
|
gconstpointer data,
|
||||||
@ -317,7 +317,7 @@ g_queue_find_custom (GQueue *queue,
|
|||||||
* Sorts @queue using @compare_func.
|
* Sorts @queue using @compare_func.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
void
|
void
|
||||||
g_queue_sort (GQueue *queue,
|
g_queue_sort (GQueue *queue,
|
||||||
GCompareDataFunc compare_func,
|
GCompareDataFunc compare_func,
|
||||||
@ -336,7 +336,7 @@ g_queue_sort (GQueue *queue,
|
|||||||
* @data: the data for the new element.
|
* @data: the data for the new element.
|
||||||
*
|
*
|
||||||
* Adds a new element at the head of the queue.
|
* Adds a new element at the head of the queue.
|
||||||
**/
|
*/
|
||||||
void
|
void
|
||||||
g_queue_push_head (GQueue *queue,
|
g_queue_push_head (GQueue *queue,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
@ -357,10 +357,10 @@ g_queue_push_head (GQueue *queue,
|
|||||||
* larger than the number of elements in the @queue, the element is
|
* larger than the number of elements in the @queue, the element is
|
||||||
* added to the end of the queue.
|
* added to the end of the queue.
|
||||||
*
|
*
|
||||||
* Inserts a new element into @queue at the given position
|
* Inserts a new element into @queue at the given position.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
void
|
void
|
||||||
g_queue_push_nth (GQueue *queue,
|
g_queue_push_nth (GQueue *queue,
|
||||||
gpointer data,
|
gpointer data,
|
||||||
@ -379,12 +379,12 @@ g_queue_push_nth (GQueue *queue,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_queue_push_head_link:
|
* g_queue_push_head_link:
|
||||||
* @queue: a #GQueue.
|
* @queue: a #GQueue
|
||||||
* @link_: a single #GList element, <emphasis>not</emphasis> a list with
|
* @link_: a single #GList element, <emphasis>not</emphasis> a list with
|
||||||
* more than one element.
|
* more than one element
|
||||||
*
|
*
|
||||||
* Adds a new element at the head of the queue.
|
* Adds a new element at the head of the queue.
|
||||||
**/
|
*/
|
||||||
void
|
void
|
||||||
g_queue_push_head_link (GQueue *queue,
|
g_queue_push_head_link (GQueue *queue,
|
||||||
GList *link)
|
GList *link)
|
||||||
@ -405,11 +405,11 @@ g_queue_push_head_link (GQueue *queue,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_queue_push_tail:
|
* g_queue_push_tail:
|
||||||
* @queue: a #GQueue.
|
* @queue: a #GQueue
|
||||||
* @data: the data for the new element.
|
* @data: the data for the new element
|
||||||
*
|
*
|
||||||
* Adds a new element at the tail of the queue.
|
* Adds a new element at the tail of the queue.
|
||||||
**/
|
*/
|
||||||
void
|
void
|
||||||
g_queue_push_tail (GQueue *queue,
|
g_queue_push_tail (GQueue *queue,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
@ -426,12 +426,12 @@ g_queue_push_tail (GQueue *queue,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_queue_push_tail_link:
|
* g_queue_push_tail_link:
|
||||||
* @queue: a #GQueue.
|
* @queue: a #GQueue
|
||||||
* @link_: a single #GList element, <emphasis>not</emphasis> a list with
|
* @link_: a single #GList element, <emphasis>not</emphasis> a list with
|
||||||
* more than one element.
|
* more than one element
|
||||||
*
|
*
|
||||||
* Adds a new element at the tail of the queue.
|
* Adds a new element at the tail of the queue.
|
||||||
**/
|
*/
|
||||||
void
|
void
|
||||||
g_queue_push_tail_link (GQueue *queue,
|
g_queue_push_tail_link (GQueue *queue,
|
||||||
GList *link)
|
GList *link)
|
||||||
@ -461,7 +461,7 @@ g_queue_push_tail_link (GQueue *queue,
|
|||||||
* Inserts @link into @queue at the given position.
|
* Inserts @link into @queue at the given position.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
void
|
void
|
||||||
g_queue_push_nth_link (GQueue *queue,
|
g_queue_push_nth_link (GQueue *queue,
|
||||||
gint n,
|
gint n,
|
||||||
@ -503,13 +503,13 @@ g_queue_push_nth_link (GQueue *queue,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_queue_pop_head:
|
* g_queue_pop_head:
|
||||||
* @queue: a #GQueue.
|
* @queue: a #GQueue
|
||||||
*
|
*
|
||||||
* Removes the first element of the queue.
|
* 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
|
* Returns: the data of the first element in the queue, or %NULL
|
||||||
* is empty.
|
* if the queue is empty
|
||||||
**/
|
*/
|
||||||
gpointer
|
gpointer
|
||||||
g_queue_pop_head (GQueue *queue)
|
g_queue_pop_head (GQueue *queue)
|
||||||
{
|
{
|
||||||
@ -536,13 +536,13 @@ g_queue_pop_head (GQueue *queue)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_queue_pop_head_link:
|
* g_queue_pop_head_link:
|
||||||
* @queue: a #GQueue.
|
* @queue: a #GQueue
|
||||||
*
|
*
|
||||||
* Removes the first element of the queue.
|
* Removes and returns the first element of the queue.
|
||||||
*
|
*
|
||||||
* Returns: the #GList element at the head of the queue, or %NULL if the queue
|
* Returns: the #GList element at the head of the queue, or %NULL
|
||||||
* is empty.
|
* if the queue is empty
|
||||||
**/
|
*/
|
||||||
GList *
|
GList *
|
||||||
g_queue_pop_head_link (GQueue *queue)
|
g_queue_pop_head_link (GQueue *queue)
|
||||||
{
|
{
|
||||||
@ -572,12 +572,12 @@ g_queue_pop_head_link (GQueue *queue)
|
|||||||
* g_queue_peek_head_link:
|
* g_queue_peek_head_link:
|
||||||
* @queue: a #GQueue
|
* @queue: a #GQueue
|
||||||
*
|
*
|
||||||
* Returns the first link in @queue
|
* Returns the first link in @queue.
|
||||||
*
|
*
|
||||||
* Return value: the first link in @queue, or %NULL if @queue is empty
|
* Return value: the first link in @queue, or %NULL if @queue is empty
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
GList *
|
GList *
|
||||||
g_queue_peek_head_link (GQueue *queue)
|
g_queue_peek_head_link (GQueue *queue)
|
||||||
{
|
{
|
||||||
@ -590,12 +590,12 @@ g_queue_peek_head_link (GQueue *queue)
|
|||||||
* g_queue_peek_tail_link:
|
* g_queue_peek_tail_link:
|
||||||
* @queue: a #GQueue
|
* @queue: a #GQueue
|
||||||
*
|
*
|
||||||
* Returns the last link @queue.
|
* Returns the last link in @queue.
|
||||||
*
|
*
|
||||||
* Return value: the last link in @queue, or %NULL if @queue is empty
|
* Return value: the last link in @queue, or %NULL if @queue is empty
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
GList *
|
GList *
|
||||||
g_queue_peek_tail_link (GQueue *queue)
|
g_queue_peek_tail_link (GQueue *queue)
|
||||||
{
|
{
|
||||||
@ -606,13 +606,13 @@ g_queue_peek_tail_link (GQueue *queue)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_queue_pop_tail:
|
* g_queue_pop_tail:
|
||||||
* @queue: a #GQueue.
|
* @queue: a #GQueue
|
||||||
*
|
*
|
||||||
* Removes the last element of the queue.
|
* 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
|
* Returns: the data of the last element in the queue, or %NULL
|
||||||
* is empty.
|
* if the queue is empty
|
||||||
**/
|
*/
|
||||||
gpointer
|
gpointer
|
||||||
g_queue_pop_tail (GQueue *queue)
|
g_queue_pop_tail (GQueue *queue)
|
||||||
{
|
{
|
||||||
@ -640,14 +640,14 @@ g_queue_pop_tail (GQueue *queue)
|
|||||||
/**
|
/**
|
||||||
* g_queue_pop_nth:
|
* g_queue_pop_nth:
|
||||||
* @queue: a #GQueue
|
* @queue: a #GQueue
|
||||||
* @n: the position of the element.
|
* @n: the position of the element
|
||||||
*
|
*
|
||||||
* Removes the @n'th element of @queue.
|
* Removes the @n'th element of @queue and returns its data.
|
||||||
*
|
*
|
||||||
* Return value: the element's data, or %NULL if @n is off the end of @queue.
|
* Return value: the element's data, or %NULL if @n is off the end of @queue
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
gpointer
|
gpointer
|
||||||
g_queue_pop_nth (GQueue *queue,
|
g_queue_pop_nth (GQueue *queue,
|
||||||
guint n)
|
guint n)
|
||||||
@ -670,13 +670,13 @@ g_queue_pop_nth (GQueue *queue,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_queue_pop_tail_link:
|
* g_queue_pop_tail_link:
|
||||||
* @queue: a #GQueue.
|
* @queue: a #GQueue
|
||||||
*
|
*
|
||||||
* Removes the last element of the queue.
|
* Removes and returns the last element of the queue.
|
||||||
*
|
*
|
||||||
* Returns: the #GList element at the tail of the queue, or %NULL if the queue
|
* Returns: the #GList element at the tail of the queue, or %NULL
|
||||||
* is empty.
|
* if the queue is empty
|
||||||
**/
|
*/
|
||||||
GList *
|
GList *
|
||||||
g_queue_pop_tail_link (GQueue *queue)
|
g_queue_pop_tail_link (GQueue *queue)
|
||||||
{
|
{
|
||||||
@ -709,10 +709,10 @@ g_queue_pop_tail_link (GQueue *queue)
|
|||||||
*
|
*
|
||||||
* Removes and returns the link at the given position.
|
* Removes and returns the link at the given position.
|
||||||
*
|
*
|
||||||
* Return value: The @n'th link, or %NULL if @n is off the end of @queue.
|
* Return value: the @n'th link, or %NULL if @n is off the end of @queue
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
GList*
|
GList*
|
||||||
g_queue_pop_nth_link (GQueue *queue,
|
g_queue_pop_nth_link (GQueue *queue,
|
||||||
guint n)
|
guint n)
|
||||||
@ -737,11 +737,11 @@ g_queue_pop_nth_link (GQueue *queue,
|
|||||||
*
|
*
|
||||||
* Returns the link at the given position
|
* Returns the link at the given position
|
||||||
*
|
*
|
||||||
* Return value: The link at the @n'th position, or %NULL if @n is off the
|
* Return value: the link at the @n'th position, or %NULL
|
||||||
* end of the list
|
* if @n is off the end of the list
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
GList *
|
GList *
|
||||||
g_queue_peek_nth_link (GQueue *queue,
|
g_queue_peek_nth_link (GQueue *queue,
|
||||||
guint n)
|
guint n)
|
||||||
@ -775,15 +775,15 @@ g_queue_peek_nth_link (GQueue *queue,
|
|||||||
/**
|
/**
|
||||||
* g_queue_link_index:
|
* g_queue_link_index:
|
||||||
* @queue: a #GQueue
|
* @queue: a #GQueue
|
||||||
* @link_: A #GList link
|
* @link_: a #GList link
|
||||||
*
|
*
|
||||||
* Returns the position of @link_ in @queue.
|
* Returns the position of @link_ in @queue.
|
||||||
*
|
*
|
||||||
* Return value: The position of @link_, or -1 if the link is
|
* Return value: the position of @link_, or -1 if the link is
|
||||||
* not part of @queue
|
* not part of @queue
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
gint
|
gint
|
||||||
g_queue_link_index (GQueue *queue,
|
g_queue_link_index (GQueue *queue,
|
||||||
GList *link_)
|
GList *link_)
|
||||||
@ -801,10 +801,10 @@ g_queue_link_index (GQueue *queue,
|
|||||||
* Unlinks @link_ so that it will no longer be part of @queue. The link is
|
* Unlinks @link_ so that it will no longer be part of @queue. The link is
|
||||||
* not freed.
|
* not freed.
|
||||||
*
|
*
|
||||||
* @link_ must be part of @queue,
|
* @link_ must be part of @queue.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
void
|
void
|
||||||
g_queue_unlink (GQueue *queue,
|
g_queue_unlink (GQueue *queue,
|
||||||
GList *link_)
|
GList *link_)
|
||||||
@ -829,7 +829,7 @@ g_queue_unlink (GQueue *queue,
|
|||||||
* @link_ must be part of @queue.
|
* @link_ must be part of @queue.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
void
|
void
|
||||||
g_queue_delete_link (GQueue *queue,
|
g_queue_delete_link (GQueue *queue,
|
||||||
GList *link_)
|
GList *link_)
|
||||||
@ -843,13 +843,13 @@ g_queue_delete_link (GQueue *queue,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_queue_peek_head:
|
* g_queue_peek_head:
|
||||||
* @queue: a #GQueue.
|
* @queue: a #GQueue
|
||||||
*
|
*
|
||||||
* Returns the first element of the queue.
|
* Returns the first element of the queue.
|
||||||
*
|
*
|
||||||
* Returns: the data of the first element in the queue, or %NULL if the queue
|
* Returns: the data of the first element in the queue, or %NULL
|
||||||
* is empty.
|
* if the queue is empty
|
||||||
**/
|
*/
|
||||||
gpointer
|
gpointer
|
||||||
g_queue_peek_head (GQueue *queue)
|
g_queue_peek_head (GQueue *queue)
|
||||||
{
|
{
|
||||||
@ -860,13 +860,13 @@ g_queue_peek_head (GQueue *queue)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_queue_peek_tail:
|
* g_queue_peek_tail:
|
||||||
* @queue: a #GQueue.
|
* @queue: a #GQueue
|
||||||
*
|
*
|
||||||
* Returns the last element of the queue.
|
* Returns the last element of the queue.
|
||||||
*
|
*
|
||||||
* Returns: the data of the last element in the queue, or %NULL if the queue
|
* Returns: the data of the last element in the queue, or %NULL
|
||||||
* is empty.
|
* if the queue is empty
|
||||||
**/
|
*/
|
||||||
gpointer
|
gpointer
|
||||||
g_queue_peek_tail (GQueue *queue)
|
g_queue_peek_tail (GQueue *queue)
|
||||||
{
|
{
|
||||||
@ -878,15 +878,15 @@ g_queue_peek_tail (GQueue *queue)
|
|||||||
/**
|
/**
|
||||||
* g_queue_peek_nth:
|
* g_queue_peek_nth:
|
||||||
* @queue: a #GQueue
|
* @queue: a #GQueue
|
||||||
* @n: the position of the element.
|
* @n: the position of the element
|
||||||
*
|
*
|
||||||
* Returns the @n'th element of @queue.
|
* Returns the @n'th element of @queue.
|
||||||
*
|
*
|
||||||
* Return value: The data for the @n'th element of @queue, or %NULL if @n is
|
* Return value: the data for the @n'th element of @queue,
|
||||||
* off the end of @queue.
|
* or %NULL if @n is off the end of @queue
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
gpointer
|
gpointer
|
||||||
g_queue_peek_nth (GQueue *queue,
|
g_queue_peek_nth (GQueue *queue,
|
||||||
guint n)
|
guint n)
|
||||||
@ -906,14 +906,15 @@ g_queue_peek_nth (GQueue *queue,
|
|||||||
/**
|
/**
|
||||||
* g_queue_index:
|
* g_queue_index:
|
||||||
* @queue: a #GQueue
|
* @queue: a #GQueue
|
||||||
* @data: the data to find.
|
* @data: the data to find
|
||||||
*
|
*
|
||||||
* Returns the position of the first element in @queue which contains @data.
|
* Returns the position of the first element in @queue which contains @data.
|
||||||
*
|
*
|
||||||
* Return value: The position of the first element in @queue which contains @data, or -1 if no element in @queue contains @data.
|
* Return value: the position of the first element in @queue which
|
||||||
|
* contains @data, or -1 if no element in @queue contains @data
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
gint
|
gint
|
||||||
g_queue_index (GQueue *queue,
|
g_queue_index (GQueue *queue,
|
||||||
gconstpointer data)
|
gconstpointer data)
|
||||||
@ -926,14 +927,14 @@ g_queue_index (GQueue *queue,
|
|||||||
/**
|
/**
|
||||||
* g_queue_remove:
|
* g_queue_remove:
|
||||||
* @queue: a #GQueue
|
* @queue: a #GQueue
|
||||||
* @data: data to remove.
|
* @data: the data to remove
|
||||||
*
|
*
|
||||||
* Removes the first element in @queue that contains @data.
|
* Removes the first element in @queue that contains @data.
|
||||||
*
|
*
|
||||||
* Return value: %TRUE if @data was found and removed from @queue
|
* Return value: %TRUE if @data was found and removed from @queue
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
g_queue_remove (GQueue *queue,
|
g_queue_remove (GQueue *queue,
|
||||||
gconstpointer data)
|
gconstpointer data)
|
||||||
@ -953,14 +954,14 @@ g_queue_remove (GQueue *queue,
|
|||||||
/**
|
/**
|
||||||
* g_queue_remove_all:
|
* g_queue_remove_all:
|
||||||
* @queue: a #GQueue
|
* @queue: a #GQueue
|
||||||
* @data: data to remove
|
* @data: the data to remove
|
||||||
*
|
*
|
||||||
* Remove all elements whose data equals @data from @queue.
|
* Remove all elements whose data equals @data from @queue.
|
||||||
*
|
*
|
||||||
* Return value: the number of elements removed from @queue
|
* Return value: the number of elements removed from @queue
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
guint
|
guint
|
||||||
g_queue_remove_all (GQueue *queue,
|
g_queue_remove_all (GQueue *queue,
|
||||||
gconstpointer data)
|
gconstpointer data)
|
||||||
@ -997,7 +998,7 @@ g_queue_remove_all (GQueue *queue,
|
|||||||
* @sibling must be part of @queue.
|
* @sibling must be part of @queue.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
void
|
void
|
||||||
g_queue_insert_before (GQueue *queue,
|
g_queue_insert_before (GQueue *queue,
|
||||||
GList *sibling,
|
GList *sibling,
|
||||||
@ -1021,7 +1022,7 @@ g_queue_insert_before (GQueue *queue,
|
|||||||
* @sibling must be part of @queue
|
* @sibling must be part of @queue
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
void
|
void
|
||||||
g_queue_insert_after (GQueue *queue,
|
g_queue_insert_after (GQueue *queue,
|
||||||
GList *sibling,
|
GList *sibling,
|
||||||
@ -1045,12 +1046,12 @@ g_queue_insert_after (GQueue *queue,
|
|||||||
* return 0 if the elements are equal, a negative value if the first
|
* return 0 if the elements are equal, a negative value if the first
|
||||||
* element comes before the second, and a positive value if the second
|
* element comes before the second, and a positive value if the second
|
||||||
* element comes before the first.
|
* element comes before the first.
|
||||||
* @user_data: user data passed to @func.
|
* @user_data: user data passed to @func
|
||||||
*
|
*
|
||||||
* Inserts @data into @queue using @func to determine the new position.
|
* Inserts @data into @queue using @func to determine the new position.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
*/
|
||||||
void
|
void
|
||||||
g_queue_insert_sorted (GQueue *queue,
|
g_queue_insert_sorted (GQueue *queue,
|
||||||
gpointer data,
|
gpointer data,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user