00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef __G_SLIST_H__
00029 #define __G_SLIST_H__
00030
00031 #include <_ansi.h>
00032 #include <glib/gmem.h>
00033
00034 G_BEGIN_DECLS
00035
00036 typedef struct _GSList GSList;
00037
00038 struct _GSList
00039 {
00040 gpointer data;
00041 GSList *next;
00042 };
00043
00044
00045
00046 IMPORT_C GSList* g_slist_alloc (void) G_GNUC_WARN_UNUSED_RESULT;
00047 IMPORT_C void g_slist_free (GSList *list);
00048 IMPORT_C void g_slist_free_1 (GSList *list);
00049 #define g_slist_free1 g_slist_free_1
00050 IMPORT_C GSList* g_slist_append (GSList *list,
00051 gpointer data) G_GNUC_WARN_UNUSED_RESULT;
00052 IMPORT_C GSList* g_slist_prepend (GSList *list,
00053 gpointer data) G_GNUC_WARN_UNUSED_RESULT;
00054 IMPORT_C GSList* g_slist_insert (GSList *list,
00055 gpointer data,
00056 gint position) G_GNUC_WARN_UNUSED_RESULT;
00057 IMPORT_C GSList* g_slist_insert_sorted (GSList *list,
00058 gpointer data,
00059 GCompareFunc func) G_GNUC_WARN_UNUSED_RESULT;
00060 IMPORT_C GSList* g_slist_insert_sorted_with_data (GSList *list,
00061 gpointer data,
00062 GCompareDataFunc func,
00063 gpointer user_data) G_GNUC_WARN_UNUSED_RESULT;
00064 IMPORT_C GSList* g_slist_insert_before (GSList *slist,
00065 GSList *sibling,
00066 gpointer data) G_GNUC_WARN_UNUSED_RESULT;
00067 IMPORT_C GSList* g_slist_concat (GSList *list1,
00068 GSList *list2) G_GNUC_WARN_UNUSED_RESULT;
00069 IMPORT_C GSList* g_slist_remove (GSList *list,
00070 gconstpointer data) G_GNUC_WARN_UNUSED_RESULT;
00071 IMPORT_C GSList* g_slist_remove_all (GSList *list,
00072 gconstpointer data) G_GNUC_WARN_UNUSED_RESULT;
00073 IMPORT_C GSList* g_slist_remove_link (GSList *list,
00074 GSList *link_) G_GNUC_WARN_UNUSED_RESULT;
00075 IMPORT_C GSList* g_slist_delete_link (GSList *list,
00076 GSList *link_) G_GNUC_WARN_UNUSED_RESULT;
00077 IMPORT_C GSList* g_slist_reverse (GSList *list) G_GNUC_WARN_UNUSED_RESULT;
00078 IMPORT_C GSList* g_slist_copy (GSList *list) G_GNUC_WARN_UNUSED_RESULT;
00079 IMPORT_C GSList* g_slist_nth (GSList *list,
00080 guint n);
00081 IMPORT_C GSList* g_slist_find (GSList *list,
00082 gconstpointer data);
00083 IMPORT_C GSList* g_slist_find_custom (GSList *list,
00084 gconstpointer data,
00085 GCompareFunc func);
00086 IMPORT_C gint g_slist_position (GSList *list,
00087 GSList *llink);
00088 IMPORT_C gint g_slist_index (GSList *list,
00089 gconstpointer data);
00090 IMPORT_C GSList* g_slist_last (GSList *list);
00091 IMPORT_C guint g_slist_length (GSList *list);
00092 IMPORT_C void g_slist_foreach (GSList *list,
00093 GFunc func,
00094 gpointer user_data);
00095 IMPORT_C GSList* g_slist_sort (GSList *list,
00096 GCompareFunc compare_func) G_GNUC_WARN_UNUSED_RESULT;
00097 IMPORT_C GSList* g_slist_sort_with_data (GSList *list,
00098 GCompareDataFunc compare_func,
00099 gpointer user_data) G_GNUC_WARN_UNUSED_RESULT;
00100 IMPORT_C gpointer g_slist_nth_data (GSList *list,
00101 guint n);
00102
00103 #define g_slist_next(slist) ((slist) ? (((GSList *)(slist))->next) : NULL)
00104
00105 #ifndef G_DISABLE_DEPRECATED
00106 IMPORT_C void g_slist_push_allocator (gpointer dummy);
00107 IMPORT_C void g_slist_pop_allocator (void);
00108 #endif
00109 G_END_DECLS
00110
00111 #endif
00112