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_TREE_H__
00029 #define __G_TREE_H__
00030
00031 #include <_ansi.h>
00032 #include <glib/gnode.h>
00033
00034 G_BEGIN_DECLS
00035
00036 typedef struct _GTree GTree;
00037
00038 typedef gboolean (*GTraverseFunc) (gpointer key,
00039 gpointer value,
00040 gpointer data);
00041
00042
00043
00044 IMPORT_C GTree* g_tree_new (GCompareFunc key_compare_func);
00045 IMPORT_C GTree* g_tree_new_with_data (GCompareDataFunc key_compare_func,
00046 gpointer key_compare_data);
00047 IMPORT_C GTree* g_tree_new_full (GCompareDataFunc key_compare_func,
00048 gpointer key_compare_data,
00049 GDestroyNotify key_destroy_func,
00050 GDestroyNotify value_destroy_func);
00051 IMPORT_C void g_tree_destroy (GTree *tree);
00052 IMPORT_C void g_tree_insert (GTree *tree,
00053 gpointer key,
00054 gpointer value);
00055 IMPORT_C void g_tree_replace (GTree *tree,
00056 gpointer key,
00057 gpointer value);
00058 IMPORT_C gboolean g_tree_remove (GTree *tree,
00059 gconstpointer key);
00060 IMPORT_C gboolean g_tree_steal (GTree *tree,
00061 gconstpointer key);
00062 IMPORT_C gpointer g_tree_lookup (GTree *tree,
00063 gconstpointer key);
00064 IMPORT_C gboolean g_tree_lookup_extended (GTree *tree,
00065 gconstpointer lookup_key,
00066 gpointer *orig_key,
00067 gpointer *value);
00068 IMPORT_C void g_tree_foreach (GTree *tree,
00069 GTraverseFunc func,
00070 gpointer user_data);
00071
00072 #ifndef G_DISABLE_DEPRECATED
00073 IMPORT_C void g_tree_traverse (GTree *tree,
00074 GTraverseFunc traverse_func,
00075 GTraverseType traverse_type,
00076 gpointer user_data);
00077 #endif
00078
00079 IMPORT_C gpointer g_tree_search (GTree *tree,
00080 GCompareFunc search_func,
00081 gconstpointer user_data);
00082 IMPORT_C gint g_tree_height (GTree *tree);
00083 IMPORT_C gint g_tree_nnodes (GTree *tree);
00084
00085
00086
00087 G_END_DECLS
00088
00089 #endif
00090