1 | /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ |
---|
2 | /* e-folder-tree.h |
---|
3 | * |
---|
4 | * Copyright (C) 2000 Ximian, Inc. |
---|
5 | * |
---|
6 | * This program is free software; you can redistribute it and/or |
---|
7 | * modify it under the terms of version 2 of the GNU General Public |
---|
8 | * License as published by the Free Software Foundation. |
---|
9 | * |
---|
10 | * This program is distributed in the hope that it will be useful, |
---|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
13 | * General Public License for more details. |
---|
14 | * |
---|
15 | * You should have received a copy of the GNU General Public |
---|
16 | * License along with this program; if not, write to the |
---|
17 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
18 | * Boston, MA 02111-1307, USA. |
---|
19 | * |
---|
20 | * Author: Ettore Perazzoli |
---|
21 | */ |
---|
22 | |
---|
23 | #ifndef _E_FOLDER_TREE_H_ |
---|
24 | #define _E_FOLDER_TREE_H_ |
---|
25 | |
---|
26 | #include <glib.h> |
---|
27 | |
---|
28 | |
---|
29 | typedef struct _EFolderTree EFolderTree; |
---|
30 | |
---|
31 | typedef void (* EFolderDestroyNotify) (EFolderTree *tree, const char *path, void *data, void *closure); |
---|
32 | typedef void (* EFolderTreeForeachFunc) (EFolderTree *tree, const char *path, void *data, void *closure); |
---|
33 | |
---|
34 | |
---|
35 | EFolderTree *e_folder_tree_new (EFolderDestroyNotify folder_destroy_notify, |
---|
36 | void *closure); |
---|
37 | |
---|
38 | void e_folder_tree_destroy (EFolderTree *folder_tree); |
---|
39 | |
---|
40 | gboolean e_folder_tree_add (EFolderTree *folder_tree, |
---|
41 | const char *path, |
---|
42 | void *data); |
---|
43 | gboolean e_folder_tree_remove (EFolderTree *folder_tree, |
---|
44 | const char *path); |
---|
45 | |
---|
46 | int e_folder_tree_get_count (EFolderTree *folder_tree); |
---|
47 | |
---|
48 | void *e_folder_tree_get_folder (EFolderTree *folder_tree, |
---|
49 | const char *path); |
---|
50 | GList *e_folder_tree_get_subfolders (EFolderTree *folder_tree, |
---|
51 | const char *path); |
---|
52 | |
---|
53 | void e_folder_tree_foreach (EFolderTree *folder_tree, |
---|
54 | EFolderTreeForeachFunc foreach_func, |
---|
55 | void *data); |
---|
56 | |
---|
57 | const char *e_folder_tree_get_path_for_data (EFolderTree *folder_tree, |
---|
58 | const void *data); |
---|
59 | |
---|
60 | #endif /* _E_FOLDER_TREE_H_ */ |
---|