1 /*
2  * This program is free software; you can redistribute it and/or modify it
3  * under the terms of the GNU Lesser General Public License as published by
4  * the Free Software Foundation.
5  *
6  * This program is distributed in the hope that it will be useful, but
7  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
8  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9  * for more details.
10  *
11  * You should have received a copy of the GNU Lesser General Public License
12  * along with this program; if not, see <http://www.gnu.org/licenses/>.
13  *
14  *
15  * Authors:
16  *		Srinivasa Ragavan <sragavan@gnome.org>
17  *
18  * Copyright (C) 2010 Intel corporation. (www.intel.com)
19  *
20  */
21 
22 #ifndef E_MAIL_VIEW_H
23 #define E_MAIL_VIEW_H
24 
25 #include <shell/e-shell-view.h>
26 #include <shell/e-shell-searchbar.h>
27 
28 /* Standard GObject macros */
29 #define E_TYPE_MAIL_VIEW \
30 	(e_mail_view_get_type ())
31 #define E_MAIL_VIEW(obj) \
32 	(G_TYPE_CHECK_INSTANCE_CAST \
33 	((obj), E_TYPE_MAIL_VIEW, EMailView))
34 #define E_MAIL_VIEW_CLASS(cls) \
35 	(G_TYPE_CHECK_CLASS_CAST \
36 	((cls), E_TYPE_MAIL_VIEW, EMailViewClass))
37 #define E_IS_MAIL_VIEW(obj) \
38 	(G_TYPE_CHECK_INSTANCE_TYPE \
39 	((obj), E_TYPE_MAIL_VIEW))
40 #define E_IS_MAIL_VIEW_CLASS(cls) \
41 	(G_TYPE_CHECK_CLASS_TYPE \
42 	((cls), E_TYPE_MAIL_VIEW))
43 #define E_MAIL_VIEW_GET_CLASS(obj) \
44 	(G_TYPE_INSTANCE_GET_CLASS \
45 	((obj), E_TYPE_MAIL_VIEW, EMailViewClass))
46 
47 G_BEGIN_DECLS
48 
49 typedef struct _EMailView EMailView;
50 typedef struct _EMailViewClass EMailViewClass;
51 typedef struct _EMailViewPrivate EMailViewPrivate;
52 
53 struct _EMailView {
54 	GtkBox parent;
55 	EMailViewPrivate *priv;
56 };
57 
58 struct _EMailViewClass {
59 	GtkBoxClass parent_class;
60 
61 	/* Signals */
62 	void		(*pane_close)		(EMailView *view);
63 	void		(*view_changed)		(EMailView *view);
64 	void		(*open_mail)		(EMailView *view,
65 						 const gchar *uid);
66 
67 	/* Methods */
68 	void		(*set_search_strings)	(EMailView *view,
69 						 GSList *search_strings);
70 	GalViewInstance *
71 			(*get_view_instance)	(EMailView *view);
72 	void		(*update_view_instance)	(EMailView *view);
73 	GtkOrientation	(*get_orientation)	(EMailView *view);
74 	void		(*set_orientation)	(EMailView *view,
75 						 GtkOrientation orientation);
76 	gboolean	(*get_preview_visible)	(EMailView *view);
77 	void		(*set_preview_visible)	(EMailView *view,
78 						 gboolean visible);
79 	gboolean	(*get_show_deleted)	(EMailView *view);
80 	void		(*set_show_deleted)	(EMailView *view,
81 						 gboolean show_deleted);
82 	gboolean	(*get_show_junk)	(EMailView *view);
83 	void		(*set_show_junk)	(EMailView *view,
84 						 gboolean show_junk);
85 };
86 
87 GType		e_mail_view_get_type		(void);
88 EShellView *	e_mail_view_get_shell_view	(EMailView *view);
89 void		e_mail_view_update_view_instance (EMailView *view);
90 GalViewInstance *
91 		e_mail_view_get_view_instance	(EMailView *view);
92 void		e_mail_view_set_search_strings	(EMailView *view,
93 						 GSList *search_strings);
94 void		e_mail_view_set_orientation	(EMailView *view,
95 						 GtkOrientation orientation);
96 GtkOrientation	e_mail_view_get_orientation	(EMailView *);
97 void		e_mail_view_set_preview_visible	(EMailView *view,
98 						 gboolean visible);
99 gboolean	e_mail_view_get_preview_visible	(EMailView *view);
100 EMailView *	e_mail_view_get_previous_view	(EMailView *view);
101 void		e_mail_view_set_previous_view	(EMailView *view,
102 						 EMailView *previous_view);
103 gboolean	e_mail_view_get_show_deleted	(EMailView *view);
104 void		e_mail_view_set_show_deleted	(EMailView *view,
105 						 gboolean show_deleted);
106 gboolean	e_mail_view_get_show_junk	(EMailView *view);
107 void		e_mail_view_set_show_junk	(EMailView *view,
108 						 gboolean show_junk);
109 
110 G_END_DECLS
111 
112 #endif /* E_MAIL_VIEW_H */
113