Software: Apache/2.0.54 (Fedora). PHP/5.0.4 uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/share/gtk-doc/html/glib/ drwxr-xr-x |
Viewing file: Select action/file-type:
Synopsis#include <glib.h> GQueue; GQueue* g_queue_new (void); void g_queue_free (GQueue *queue); gboolean g_queue_is_empty (GQueue *queue); guint g_queue_get_length (GQueue *queue); void g_queue_reverse (GQueue *queue); GQueue* g_queue_copy (GQueue *queue); void g_queue_foreach (GQueue *queue, GFunc func, gpointer user_data); GList* g_queue_find (GQueue *queue, gconstpointer data); GList* g_queue_find_custom (GQueue *queue, gconstpointer data, GCompareFunc func); void g_queue_sort (GQueue *queue, GCompareDataFunc compare_func, gpointer user_data); void g_queue_push_head (GQueue *queue, gpointer data); void g_queue_push_tail (GQueue *queue, gpointer data); void g_queue_push_nth (GQueue *queue, gpointer data, gint n); gpointer g_queue_pop_head (GQueue *queue); gpointer g_queue_pop_tail (GQueue *queue); gpointer g_queue_pop_nth (GQueue *queue, guint n); gpointer g_queue_peek_head (GQueue *queue); gpointer g_queue_peek_tail (GQueue *queue); gpointer g_queue_peek_nth (GQueue *queue, guint n); gint g_queue_index (GQueue *queue, gconstpointer data); void g_queue_remove (GQueue *queue, gconstpointer data); void g_queue_remove_all (GQueue *queue, gconstpointer data); void g_queue_insert_before (GQueue *queue, GList *sibling, gpointer data); void g_queue_insert_after (GQueue *queue, GList *sibling, gpointer data); void g_queue_insert_sorted (GQueue *queue, gpointer data, GCompareDataFunc func, gpointer user_data); void g_queue_push_head_link (GQueue *queue, GList *link_); void g_queue_push_tail_link (GQueue *queue, GList *link_); void g_queue_push_nth_link (GQueue *queue, gint n, GList *link_); GList* g_queue_pop_head_link (GQueue *queue); GList* g_queue_pop_tail_link (GQueue *queue); GList* g_queue_pop_nth_link (GQueue *queue, guint n); GList* g_queue_peek_head_link (GQueue *queue); GList* g_queue_peek_tail_link (GQueue *queue); GList* g_queue_peek_nth_link (GQueue *queue, guint n); gint g_queue_link_index (GQueue *queue, GList *link_); void g_queue_unlink (GQueue *queue, GList *link_); void g_queue_delete_link (GQueue *queue, GList *link_); DescriptionThe GQueue structure and its associated functions provide a standard queue data structure. Internally, GQueue uses the same data structure as GList to store elements. The data contained in each element can be either integer values, by using one of the Type Conversion Macros, or simply pointers to any type of data.
To create a new GQueue, use
To add elements, use
To remove elements, use
To free the entire queue, use DetailsGQueuetypedef struct { GList *head; GList *tail; guint length; } GQueue; Contains the public fields of a Queue. g_queue_free ()void g_queue_free (GQueue *queue); Frees the memory allocated for the GQueue.
g_queue_is_empty ()gboolean g_queue_is_empty (GQueue *queue);
Returns
g_queue_get_length ()guint g_queue_get_length (GQueue *queue);
Returns the number of items in
Since 2.4 g_queue_reverse ()void g_queue_reverse (GQueue *queue);
Reverses the order of the items in
Since 2.4 g_queue_copy ()GQueue* g_queue_copy (GQueue *queue);
Copies a
Since 2.4 g_queue_foreach ()void g_queue_foreach (GQueue *queue, GFunc func, gpointer user_data);
Calls
Since 2.4 g_queue_find ()GList* g_queue_find (GQueue *queue, gconstpointer data);
Finds the first link in
Since 2.4 g_queue_find_custom ()GList* g_queue_find_custom (GQueue *queue, gconstpointer data, GCompareFunc func); 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 and the given user data.
Since 2.4 g_queue_sort ()void g_queue_sort (GQueue *queue, GCompareDataFunc compare_func, gpointer user_data);
Sorts
Since 2.4 g_queue_push_head ()void g_queue_push_head (GQueue *queue, gpointer data); Adds a new element at the head of the queue.
g_queue_push_tail ()void g_queue_push_tail (GQueue *queue, gpointer data); Adds a new element at the tail of the queue.
g_queue_push_nth ()void g_queue_push_nth (GQueue *queue, gpointer data, gint n);
Inserts a new element into
Since 2.4 g_queue_pop_head ()gpointer g_queue_pop_head (GQueue *queue); Removes the first element of the queue.
g_queue_pop_tail ()gpointer g_queue_pop_tail (GQueue *queue); Removes the last element of the queue.
g_queue_pop_nth ()gpointer g_queue_pop_nth (GQueue *queue, guint n);
Removes the
Since 2.4 g_queue_peek_head ()gpointer g_queue_peek_head (GQueue *queue); Returns the first element of the queue.
g_queue_peek_tail ()gpointer g_queue_peek_tail (GQueue *queue); Returns the last element of the queue.
g_queue_peek_nth ()gpointer g_queue_peek_nth (GQueue *queue, guint n);
Returns the
Since 2.4 g_queue_index ()gint g_queue_index (GQueue *queue, gconstpointer data);
Returns the position of the first element in
Since 2.4 g_queue_remove ()void g_queue_remove (GQueue *queue, gconstpointer data);
Removes the first element in
Since 2.4 g_queue_remove_all ()void g_queue_remove_all (GQueue *queue, gconstpointer data);
Remove all elemeents in
Since 2.4 g_queue_insert_before ()void g_queue_insert_before (GQueue *queue, GList *sibling, gpointer data);
Inserts
Since 2.4 g_queue_insert_after ()void g_queue_insert_after (GQueue *queue, GList *sibling, gpointer data);
Inserts
Since 2.4 g_queue_insert_sorted ()void g_queue_insert_sorted (GQueue *queue, gpointer data, GCompareDataFunc func, gpointer user_data);
Inserts
Since 2.4 g_queue_push_head_link ()void g_queue_push_head_link (GQueue *queue, GList *link_); Adds a new element at the head of the queue.
g_queue_push_tail_link ()void g_queue_push_tail_link (GQueue *queue, GList *link_); Adds a new element at the tail of the queue.
g_queue_push_nth_link ()void g_queue_push_nth_link (GQueue *queue, gint n, GList *link_);
Inserts
Since 2.4 g_queue_pop_head_link ()GList* g_queue_pop_head_link (GQueue *queue); Removes the first element of the queue.
g_queue_pop_tail_link ()GList* g_queue_pop_tail_link (GQueue *queue); Removes the last element of the queue.
g_queue_pop_nth_link ()GList* g_queue_pop_nth_link (GQueue *queue, guint n); Removes and returns the link at the given position.
Since 2.4 g_queue_peek_head_link ()GList* g_queue_peek_head_link (GQueue *queue);
Returns the first link in
Since 2.4 g_queue_peek_tail_link ()GList* g_queue_peek_tail_link (GQueue *queue);
Returns the last link
Since 2.4 g_queue_peek_nth_link ()GList* g_queue_peek_nth_link (GQueue *queue, guint n); Returns the link at the given position
Since 2.4 g_queue_link_index ()gint g_queue_link_index (GQueue *queue, GList *link_);
Returns the position of
Since 2.4 g_queue_unlink ()void g_queue_unlink (GQueue *queue, GList *link_);
Unlinks
Since 2.4
|
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0043 ]-- |