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
00029 #ifndef __XLIST__
00030 #define __XLIST__
00031
00035 typedef struct _XList XList;
00036
00037 struct _XList {
00038 XList * prev;
00039 XList * next;
00040 void * data;
00041 };
00042
00046 typedef void * (*XCloneFunc) (void * data);
00047
00051 typedef void * (*XFreeFunc) (void * data);
00052
00056 XList * xlist_new (void);
00057
00063 XList * xlist_clone (XList * list);
00064
00071 XList * xlist_clone_with (XList * list, XCloneFunc clone);
00072
00078 XList * xlist_tail (XList * list);
00079
00086 XList * xlist_prepend (XList * list, void * data);
00087
00094 XList * xlist_append (XList * list, void * data);
00095
00103 XList * xlist_add_before (XList * list, void * data, XList * node);
00104
00112 XList * xlist_add_after (XList * list, void * data, XList * node);
00113
00120 XList * xlist_find (XList * list, void * data);
00121
00128 XList * xlist_remove (XList * list, XList * node);
00129
00135 int xlist_length (XList * list);
00136
00142 int xlist_is_empty (XList * list);
00143
00149 int xlist_is_singleton (XList * list);
00150
00157 XList * xlist_free_with (XList * list, XFreeFunc free_func);
00158
00164 XList * xlist_free (XList * list);
00165
00166 #endif
00167
00168