1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
---|
2 | /* |
---|
3 | * e-folder-list.h |
---|
4 | * Copyright 2000, 2001, Ximian, Inc. |
---|
5 | * |
---|
6 | * Authors: |
---|
7 | * Chris Lahey <clahey@ximian.com> |
---|
8 | * |
---|
9 | * This library is free software; you can redistribute it and/or |
---|
10 | * modify it under the terms of the GNU Library General Public |
---|
11 | * License, version 2, as published by the Free Software Foundation. |
---|
12 | * |
---|
13 | * This library is distributed in the hope that it will be useful, but |
---|
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
16 | * Library General Public License for more details. |
---|
17 | * |
---|
18 | * You should have received a copy of the GNU Library General Public |
---|
19 | * License along with this library; if not, write to the Free Software |
---|
20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
21 | * 02111-1307, USA. |
---|
22 | */ |
---|
23 | |
---|
24 | #ifndef __E_FOLDER_LIST_H__ |
---|
25 | #define __E_FOLDER_LIST_H__ |
---|
26 | |
---|
27 | #include <gal/e-table/e-table-scrolled.h> |
---|
28 | #include "evolution-shell-client.h" |
---|
29 | |
---|
30 | #ifdef __cplusplus |
---|
31 | extern "C" { |
---|
32 | #pragma } |
---|
33 | #endif /* __cplusplus */ |
---|
34 | |
---|
35 | /* EFolderList - A dialog displaying information about a contact. |
---|
36 | * |
---|
37 | * The following arguments are available: |
---|
38 | * |
---|
39 | * name type read/write description |
---|
40 | * -------------------------------------------------------------------------------- |
---|
41 | */ |
---|
42 | |
---|
43 | #define E_FOLDER_LIST_TYPE (e_folder_list_get_type ()) |
---|
44 | #define E_FOLDER_LIST(obj) (GTK_CHECK_CAST ((obj), E_FOLDER_LIST_TYPE, EFolderList)) |
---|
45 | #define E_FOLDER_LIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_FOLDER_LIST_TYPE, EFolderListClass)) |
---|
46 | #define E_IS_FOLDER_LIST(obj) (GTK_CHECK_TYPE ((obj), E_FOLDER_LIST_TYPE)) |
---|
47 | #define E_IS_FOLDER_LIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_FOLDER_LIST_TYPE)) |
---|
48 | |
---|
49 | |
---|
50 | typedef struct _EFolderListPrivate EFolderListPrivate; |
---|
51 | typedef struct _EFolderList EFolderList; |
---|
52 | typedef struct _EFolderListClass EFolderListClass; |
---|
53 | |
---|
54 | struct _EFolderList |
---|
55 | { |
---|
56 | GtkVBox parent; |
---|
57 | |
---|
58 | /* item specific fields */ |
---|
59 | EFolderListPrivate *priv; |
---|
60 | }; |
---|
61 | |
---|
62 | struct _EFolderListClass |
---|
63 | { |
---|
64 | GtkVBoxClass parent_class; |
---|
65 | |
---|
66 | void (*changed) (EFolderList *efl); |
---|
67 | void (*option_menu_changed) (EFolderList *efl, int value); |
---|
68 | }; |
---|
69 | |
---|
70 | typedef struct { |
---|
71 | char *uri; |
---|
72 | char *physical_uri; |
---|
73 | char *display_name; |
---|
74 | } EFolderListItem; |
---|
75 | |
---|
76 | |
---|
77 | EFolderListItem *e_folder_list_parse_xml (char *xml); |
---|
78 | char *e_folder_list_create_xml (EFolderListItem *items); |
---|
79 | void e_folder_list_free_items (EFolderListItem *items); |
---|
80 | |
---|
81 | /* Standard functions */ |
---|
82 | GtkType e_folder_list_get_type (void); |
---|
83 | GtkWidget *e_folder_list_new (EvolutionShellClient *client, |
---|
84 | char *xml); |
---|
85 | GtkWidget *e_folder_list_construct (EFolderList *efl, |
---|
86 | EvolutionShellClient *client, |
---|
87 | char *xml); |
---|
88 | |
---|
89 | /* data access functions */ |
---|
90 | void e_folder_list_set_items (EFolderList *efl, |
---|
91 | EFolderListItem *items); |
---|
92 | EFolderListItem *e_folder_list_get_items (EFolderList *efl); |
---|
93 | void e_folder_list_set_xml (EFolderList *efl, |
---|
94 | char *xml); |
---|
95 | char *e_folder_list_get_xml (EFolderList *efl); |
---|
96 | |
---|
97 | /* Option Menu functions */ |
---|
98 | void e_folder_list_set_option_menu_strings_from_array (EFolderList *efl, |
---|
99 | gchar **strings); |
---|
100 | void e_folder_list_set_option_menu_strings (EFolderList *efl, |
---|
101 | gchar *first_label, |
---|
102 | ...); |
---|
103 | int e_folder_list_get_option_menu_value (EFolderList *efl); |
---|
104 | void e_folder_list_set_option_menu_value (EFolderList *efl, |
---|
105 | int value); |
---|
106 | |
---|
107 | #ifdef __cplusplus |
---|
108 | } |
---|
109 | #endif /* __cplusplus */ |
---|
110 | |
---|
111 | |
---|
112 | #endif /* __E_FOLDER_LIST_H__ */ |
---|