Main Page   File List   File Members  

list.h

Go to the documentation of this file.
00001 
00010 #ifndef _LIST_H_
00011 #define _LIST_H_
00012 
00013 #include <gtk/gtk.h>
00014 #include "class.h"
00015 
00016 typedef void(*free_t)(gpointer, gpointer);
00017 
00018 /* lists definition                                                          */
00019 struct s_list {
00020   struct s_class class;  
00021   GSList *GTKList;       
00023   free_t free;           
00024 };
00025 
00026 /*>>> macros                                                                 */
00027 #define LIST(class)        ((struct s_list *)class)
00028 #define LIST_TYPE(const)   CLASS_TYPE(const)
00029 
00030 #define list_append(list, data)                                               \
00031   (LIST(list)->GTKList = g_slist_append(LIST(list)->GTKList, data))
00032 
00033 /*>>> functions prototypes                                                   */
00034 struct s_list *list_alloc(free_t);
00035 void list_free(struct s_list *);
00036 
00037 #ifdef DEBUG
00038 gchar *list_subdebug(struct s_list *);
00039 #endif
00040 
00041 #endif /* _LIST_H_ */

Generated on Tue Aug 6 13:21:19 2002 for lafontaine by doxygen1.2.15