1 | /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ |
---|
2 | /* e-storage-set-view.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_STORAGE_SET_VIEW_H__ |
---|
24 | #define __E_STORAGE_SET_VIEW_H__ |
---|
25 | |
---|
26 | #include <gal/e-table/e-tree.h> |
---|
27 | #include <bonobo/bonobo-ui-container.h> |
---|
28 | #include "e-storage-set.h" |
---|
29 | |
---|
30 | #ifdef __cplusplus |
---|
31 | extern "C" { |
---|
32 | #pragma } |
---|
33 | #endif /* __cplusplus */ |
---|
34 | |
---|
35 | #define E_TYPE_STORAGE_SET_VIEW (e_storage_set_view_get_type ()) |
---|
36 | #define E_STORAGE_SET_VIEW(obj) (GTK_CHECK_CAST ((obj), E_TYPE_STORAGE_SET_VIEW, EStorageSetView)) |
---|
37 | #define E_STORAGE_SET_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_STORAGE_SET_VIEW, EStorageSetViewClass)) |
---|
38 | #define E_IS_STORAGE_SET_VIEW(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_STORAGE_SET_VIEW)) |
---|
39 | #define E_IS_STORAGE_SET_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_STORAGE_SET_VIEW)) |
---|
40 | |
---|
41 | |
---|
42 | typedef gboolean (* EStorageSetViewHasCheckBoxFunc) (EStorageSet *storage_set, |
---|
43 | const char *path, |
---|
44 | void *data); |
---|
45 | |
---|
46 | typedef struct _EStorageSetView EStorageSetView; |
---|
47 | typedef struct _EStorageSetViewPrivate EStorageSetViewPrivate; |
---|
48 | typedef struct _EStorageSetViewClass EStorageSetViewClass; |
---|
49 | |
---|
50 | struct _EStorageSetView { |
---|
51 | ETree parent; |
---|
52 | |
---|
53 | EStorageSetViewPrivate *priv; |
---|
54 | }; |
---|
55 | |
---|
56 | struct _EStorageSetViewClass { |
---|
57 | ETreeClass parent_class; |
---|
58 | |
---|
59 | /* Signals. */ |
---|
60 | |
---|
61 | void (* folder_selected) (EStorageSetView *storage_set_view, |
---|
62 | const char *path); |
---|
63 | void (* folder_opened) (EStorageSetView *storage_set_view, |
---|
64 | const char *path); |
---|
65 | |
---|
66 | void (* dnd_action) (EStorageSetView *storage_set_view, |
---|
67 | GdkDragContext *context, |
---|
68 | const char *source_data, |
---|
69 | const char *source_data_type, |
---|
70 | const char *target_path); |
---|
71 | |
---|
72 | void (* folder_context_menu_popping_up) (EStorageSetView *storage_set_view, |
---|
73 | const char *path); |
---|
74 | void (* folder_context_menu_popped_down) (EStorageSetView *storage_set_view); |
---|
75 | void (* checkboxes_changed) (EStorageSetView *storage_set_view); |
---|
76 | }; |
---|
77 | |
---|
78 | |
---|
79 | GtkType e_storage_set_view_get_type (void); |
---|
80 | |
---|
81 | /* DON'T USE THIS. Use e_storage_set_new_view() instead. */ |
---|
82 | GtkWidget *e_storage_set_view_new (EStorageSet *storage_set, |
---|
83 | BonoboUIContainer *ui_container); |
---|
84 | void e_storage_set_view_construct (EStorageSetView *storage_set_view, |
---|
85 | EStorageSet *storage_set, |
---|
86 | BonoboUIContainer *ui_container); |
---|
87 | |
---|
88 | EStorageSet *e_storage_set_view_get_storage_set (EStorageSetView *storage_set_view); |
---|
89 | |
---|
90 | void e_storage_set_view_set_current_folder (EStorageSetView *storage_set_view, |
---|
91 | const char *path); |
---|
92 | const char *e_storage_set_view_get_current_folder (EStorageSetView *storage_set_view); |
---|
93 | |
---|
94 | void e_storage_set_view_set_show_folders (EStorageSetView *storage_set_view, |
---|
95 | gboolean show); |
---|
96 | gboolean e_storage_set_view_get_show_folders (EStorageSetView *storage_set_view); |
---|
97 | |
---|
98 | void e_storage_set_view_set_show_checkboxes (EStorageSetView *storage_set_view, |
---|
99 | gboolean show, |
---|
100 | EStorageSetViewHasCheckBoxFunc has_checkbox_func, |
---|
101 | void *func_data); |
---|
102 | gboolean e_storage_set_view_get_show_checkboxes (EStorageSetView *storage_set_view); |
---|
103 | |
---|
104 | void e_storage_set_view_enable_search (EStorageSetView *storage_set_view, |
---|
105 | gboolean enable); |
---|
106 | |
---|
107 | void e_storage_set_view_set_checkboxes_list (EStorageSetView *storage_set_view, |
---|
108 | GList *checkboxes); |
---|
109 | GList *e_storage_set_view_get_checkboxes_list (EStorageSetView *storage_set_view); |
---|
110 | |
---|
111 | void e_storage_set_view_set_allow_dnd (EStorageSetView *storage_set_view, |
---|
112 | gboolean allow_dnd); |
---|
113 | gboolean e_storage_set_view_get_allow_dnd (EStorageSetView *storage_set_view); |
---|
114 | |
---|
115 | const char *e_storage_set_view_get_right_click_path (EStorageSetView *storage_set_view); |
---|
116 | |
---|
117 | #ifdef __cplusplus |
---|
118 | } |
---|
119 | #endif /* __cplusplus */ |
---|
120 | |
---|
121 | |
---|
122 | #endif /* __E_STORAGE_SET_VIEW_H__ */ |
---|