Bug 792781 - 'Go to Folder' incorrectly unrefs CamelFolder twice
[evolution.git] / src / mail / e-mail-sidebar.h
bloba85c6092430bc8c50452581d5d26e0781b5076e8
1 /*
2 * e-mail-sidebar.h
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
21 #ifndef E_MAIL_SIDEBAR_H
22 #define E_MAIL_SIDEBAR_H
24 #include <mail/em-folder-tree.h>
25 #include <libemail-engine/libemail-engine.h>
27 /* Standard GObject macros */
28 #define E_TYPE_MAIL_SIDEBAR \
29 (e_mail_sidebar_get_type ())
30 #define E_MAIL_SIDEBAR(obj) \
31 (G_TYPE_CHECK_INSTANCE_CAST \
32 ((obj), E_TYPE_MAIL_SIDEBAR, EMailSidebar))
33 #define E_MAIL_SIDEBAR_CLASS(cls) \
34 (G_TYPE_CHECK_CLASS_CAST \
35 ((cls), E_TYPE_MAIL_SIDEBAR, EMailSidebarClass))
36 #define E_IS_MAIL_SIDEBAR(obj) \
37 (G_TYPE_CHECK_INSTANCE_TYPE \
38 ((obj), E_TYPE_MAIL_SIDEBAR))
39 #define E_IS_MAIL_SIDEBAR_CLASS(cls) \
40 (G_TYPE_CHECK_CLASS_TYPE \
41 ((cls), E_TYPE_MAIL_SIDEBAR))
42 #define E_MAIL_SIDEBAR_GET_CLASS(obj) \
43 (G_TYPE_INSTANCE_GET_CLASS \
44 ((obj), E_TYPE_MAIL_SIDEBAR, EMailSidebarClass))
46 G_BEGIN_DECLS
48 typedef struct _EMailSidebar EMailSidebar;
49 typedef struct _EMailSidebarClass EMailSidebarClass;
50 typedef struct _EMailSidebarPrivate EMailSidebarPrivate;
52 /* Flags describing the selected folder. */
53 enum {
54 E_MAIL_SIDEBAR_FOLDER_ALLOWS_CHILDREN = 1 << 0,
55 E_MAIL_SIDEBAR_FOLDER_CAN_DELETE = 1 << 1,
56 E_MAIL_SIDEBAR_FOLDER_IS_JUNK = 1 << 2,
57 E_MAIL_SIDEBAR_FOLDER_IS_OUTBOX = 1 << 3,
58 E_MAIL_SIDEBAR_FOLDER_IS_STORE = 1 << 4,
59 E_MAIL_SIDEBAR_FOLDER_IS_TRASH = 1 << 5,
60 E_MAIL_SIDEBAR_FOLDER_IS_VIRTUAL = 1 << 6,
61 E_MAIL_SIDEBAR_STORE_IS_BUILTIN = 1 << 7,
62 E_MAIL_SIDEBAR_STORE_IS_SUBSCRIBABLE = 1 << 8,
63 E_MAIL_SIDEBAR_STORE_CAN_BE_DISABLED = 1 << 9
66 struct _EMailSidebar {
67 EMFolderTree parent;
68 EMailSidebarPrivate *priv;
71 struct _EMailSidebarClass {
72 EMFolderTreeClass parent;
74 /* Methods */
75 guint32 (*check_state) (EMailSidebar *sidebar);
77 /* Signals */
78 void (*key_file_changed) (EMailSidebar *sidebar);
81 GType e_mail_sidebar_get_type (void);
82 GtkWidget * e_mail_sidebar_new (EMailSession *session,
83 EAlertSink *alert_sink);
84 GKeyFile * e_mail_sidebar_get_key_file (EMailSidebar *sidebar);
85 void e_mail_sidebar_set_key_file (EMailSidebar *sidebar,
86 GKeyFile *key_file);
87 guint32 e_mail_sidebar_check_state (EMailSidebar *sidebar);
88 void e_mail_sidebar_key_file_changed (EMailSidebar *sidebar);
90 G_END_DECLS
92 #endif /* E_MAIL_SIDEBAR_H */