gslist.h

Go to the documentation of this file.
00001 /* GLIB - Library of useful routines for C programming
00002  * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the
00016  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017  * Boston, MA 02111-1307, USA.
00018  */
00019 
00020 /*
00021  * Modified by the GLib Team and others 1997-2000.  See the AUTHORS
00022  * file for a list of people on the GLib Team.  See the ChangeLog
00023  * files for a list of changes.  These files are distributed with
00024  * GLib at ftp://ftp.gtk.org/pub/gtk/. 
00025  */
00026 
00027 #ifndef __G_SLIST_H__
00028 #define __G_SLIST_H__
00029 
00030 #include <gmem.h>
00031 
00032 G_BEGIN_DECLS
00033 
00034 typedef struct _GSList          GSList;
00035 
00036 struct _GSList
00037 {
00038   gpointer data;
00039   GSList *next;
00040 };
00041 
00042 /* Singly linked lists
00043  */
00044 void     g_slist_push_allocator (GAllocator       *allocato);
00045 void     g_slist_pop_allocator  (void);
00046 GSList*  g_slist_alloc          (void);
00047 void     g_slist_free           (GSList           *list);
00048 void     g_slist_free_1         (GSList           *list);
00049 GSList*  g_slist_append         (GSList           *list,
00050                                  gpointer          data);
00051 GSList*  g_slist_prepend        (GSList           *list,
00052                                  gpointer          data);
00053 GSList*  g_slist_insert         (GSList           *list,
00054                                  gpointer          data,
00055                                  gint              position);
00056 GSList*  g_slist_insert_sorted  (GSList           *list,
00057                                  gpointer          data,
00058                                  GCompareFunc      func);
00059 GSList*  g_slist_insert_before  (GSList           *slist,
00060                                  GSList           *sibling,
00061                                  gpointer          data);
00062 GSList*  g_slist_concat         (GSList           *list1,
00063                                  GSList           *list2);
00064 GSList*  g_slist_remove         (GSList           *list,
00065                                  gconstpointer     data);
00066 GSList*  g_slist_remove_link    (GSList           *list,
00067                                  GSList           *link);
00068 GSList*  g_slist_delete_link    (GSList           *list,
00069                                  GSList           *link);
00070 GSList*  g_slist_reverse        (GSList           *list);
00071 GSList*  g_slist_copy           (GSList           *list);
00072 GSList*  g_slist_nth            (GSList           *list,
00073                                  guint             n);
00074 GSList*  g_slist_find           (GSList           *list,
00075                                  gconstpointer     data);
00076 GSList*  g_slist_find_custom    (GSList           *list,
00077                                  gconstpointer     data,
00078                                  GCompareFunc      func);
00079 gint     g_slist_position       (GSList           *list,
00080                                  GSList           *llink);
00081 gint     g_slist_index          (GSList           *list,
00082                                  gconstpointer     data);
00083 GSList*  g_slist_last           (GSList           *list);
00084 guint    g_slist_length         (GSList           *list);
00085 void     g_slist_foreach        (GSList           *list,
00086                                  GFunc             func,
00087                                  gpointer          user_data);
00088 GSList*  g_slist_sort           (GSList           *list,
00089                                  GCompareFunc      compare_func);
00090 GSList*  g_slist_sort_with_data (GSList           *list,
00091                                  GCompareFuncData  compare_func,
00092                                  gpointer          user_data);
00093 gpointer g_slist_nth_data       (GSList           *list,
00094                                  guint             n);
00095 #define  g_slist_next(slist)    ((slist) ? (((GSList *)(slist))->next) : NULL)
00096 
00097 G_END_DECLS
00098 
00099 #endif /* __G_SLIST_H__ */
00100 

Generated on Tue Jul 5 14:14:41 2011 for ROOT_528-00b_version by  doxygen 1.5.1