mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-02 11:56:38 +02:00
Fri Nov 8 19:44:20 2002 Soeren Sandmann <sandmann@daimi.au.dk> * docs/reference/glib/tmpl/arrays.sgml: * docs/reference/glib/tmpl/arrays_byte.sgml: * docs/reference/glib/tmpl/arrays_pointer.sgml: * docs/reference/glib/tmpl/date.sgml: * docs/reference/glib/tmpl/linked_lists_double.sgml: * docs/reference/glib/tmpl/linked_lists_single.sgml: * docs/reference/glib/tmpl/main.sgml: * docs/reference/glib/tmpl/queue.sgml: * docs/reference/glib/tmpl/random_numbers.sgml: * docs/reference/glib/tmpl/relations.sgml: * docs/reference/glib/tmpl/scanner.sgml: * docs/reference/gobject/tmpl/gtype.sgml: * docs/reference/gobject/tmpl/value_arrays.sgml glib/garray.h: * glib/gdate.h glib/giochannel.h glib/glist.h glib/gmain.c: * glib/gmain.h glib/gqueue.c glib/gqueue.h glib/grand.c glib/grand.h: * glib/grel.h glib/gslist.h glib/gtimer.h gobject/gvaluearray.h: Trivial s/foo/foo_/ fixes to make <glib.h> includable with -Wshadow without warnings (#91680)
162 lines
2.3 KiB
Plaintext
162 lines
2.3 KiB
Plaintext
<!-- ##### SECTION Title ##### -->
|
|
Double-ended Queues
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
|
double-ended queue data structure.
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
<para>
|
|
The #GQueue structure and its associated functions provide a standard
|
|
queue data structure. Internally, #GQueue uses the same data structure as
|
|
#GList to store elements.
|
|
</para>
|
|
<para>
|
|
The data contained in each element can be either integer values, by using one
|
|
of the
|
|
<link linkend="glib-Type-Conversion-Macros">Type Conversion Macros</link>,
|
|
or simply pointers to any type of data.
|
|
</para>
|
|
<para>
|
|
To create a new #GQueue, use g_queue_new().
|
|
</para>
|
|
<para>
|
|
To add elements, use g_queue_push_head(), g_queue_push_head_link(),
|
|
g_queue_push_tail() and g_queue_push_tail_link().
|
|
</para>
|
|
<para>
|
|
To remove elements, use g_queue_pop_head() and g_queue_pop_tail().
|
|
</para>
|
|
<para>
|
|
To free the entire queue, use g_queue_free().
|
|
</para>
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
<!-- ##### STRUCT GQueue ##### -->
|
|
<para>
|
|
Contains the public fields of a <link linkend="glib-queues">Queue</link>.
|
|
</para>
|
|
|
|
@head: a pointer to the first element of the queue.
|
|
@tail: a pointer to the last element of the queue.
|
|
@length: the number of elements in the queue.
|
|
|
|
<!-- ##### FUNCTION g_queue_new ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@Returns:
|
|
|
|
|
|
<!-- ##### FUNCTION g_queue_free ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@queue:
|
|
|
|
|
|
<!-- ##### FUNCTION g_queue_push_head ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@queue:
|
|
@data:
|
|
|
|
|
|
<!-- ##### FUNCTION g_queue_push_tail ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@queue:
|
|
@data:
|
|
|
|
|
|
<!-- ##### FUNCTION g_queue_pop_head ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@queue:
|
|
@Returns:
|
|
|
|
|
|
<!-- ##### FUNCTION g_queue_pop_tail ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@queue:
|
|
@Returns:
|
|
|
|
|
|
<!-- ##### FUNCTION g_queue_is_empty ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@queue:
|
|
@Returns:
|
|
|
|
|
|
<!-- ##### FUNCTION g_queue_peek_head ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@queue:
|
|
@Returns:
|
|
|
|
|
|
<!-- ##### FUNCTION g_queue_peek_tail ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@queue:
|
|
@Returns:
|
|
|
|
|
|
<!-- ##### FUNCTION g_queue_push_head_link ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@queue:
|
|
@link_:
|
|
|
|
|
|
<!-- ##### FUNCTION g_queue_push_tail_link ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@queue:
|
|
@link_:
|
|
|
|
|
|
<!-- ##### FUNCTION g_queue_pop_head_link ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@queue:
|
|
@Returns:
|
|
|
|
|
|
<!-- ##### FUNCTION g_queue_pop_tail_link ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@queue:
|
|
@Returns:
|
|
|
|
|