1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 double-ended queue data structure.
7 <!-- ##### SECTION Long_Description ##### -->
9 The #GQueue structure and its associated functions provide a standard
10 queue data structure. Internally, #GQueue uses the same data structure as
11 #GList to store elements.
14 The data contained in each element can be either integer values, by using one
16 <link linkend="glib-Type-Conversion-Macros">Type Conversion Macros</link>,
17 or simply pointers to any type of data.
20 To create a new #GQueue, use g_queue_new().
23 To add elements, use g_queue_push_head(), g_queue_push_head_link(),
24 g_queue_push_tail() and g_queue_push_tail_link().
27 To remove elements, use g_queue_pop_head() and g_queue_pop_tail().
30 To free the entire queue, use g_queue_free().
33 <!-- ##### SECTION See_Also ##### -->
38 <!-- ##### STRUCT GQueue ##### -->
40 Contains the public fields of a <link linkend="glib-queues">Queue</link>.
43 @head: a pointer to the first element of the queue.
44 @tail: a pointer to the last element of the queue.
45 @length: the number of elements in the queue.
47 <!-- ##### FUNCTION g_queue_new ##### -->
55 <!-- ##### FUNCTION g_queue_free ##### -->
63 <!-- ##### FUNCTION g_queue_push_head ##### -->
72 <!-- ##### FUNCTION g_queue_push_tail ##### -->
81 <!-- ##### FUNCTION g_queue_pop_head ##### -->
90 <!-- ##### FUNCTION g_queue_pop_tail ##### -->
99 <!-- ##### FUNCTION g_queue_is_empty ##### -->
108 <!-- ##### FUNCTION g_queue_peek_head ##### -->
117 <!-- ##### FUNCTION g_queue_peek_tail ##### -->
126 <!-- ##### FUNCTION g_queue_push_head_link ##### -->
135 <!-- ##### FUNCTION g_queue_push_tail_link ##### -->
144 <!-- ##### FUNCTION g_queue_pop_head_link ##### -->
153 <!-- ##### FUNCTION g_queue_pop_tail_link ##### -->