1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the program; if not, see <http://www.gnu.org/licenses/>
*
*
* Authors:
* Srinivasa Ragavan <sragavan@novell.com>
*
* Copyright (C) 2009 Novell, Inc. (www.novell.com)
*
*/
#ifndef _MAIL_VIEW_H_
#define _MAIL_VIEW_H_
#include <shell/e-shell-view.h>
#include <mail/e-mail-session.h>
#include "anjal-mail-view.h"
#define MAIL_VIEW_TYPE (mail_view_get_type ())
#define MAIL_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MAIL_VIEW_TYPE, MailView))
#define MAIL_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MAIL_VIEW_TYPE, MailViewClass))
#define IS_MAIL_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAIL_VIEW_TYPE))
#define IS_MAIL_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAIL_VIEW_TYPE))
#define MAIL_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), MAIL_VIEW_TYPE, MailViewClass))
enum {
MAIL_VIEW_FOLDER=1,
MAIL_VIEW_COMPOSER,
MAIL_VIEW_MESSAGE,
MAIL_VIEW_ACCOUNT,
MAIL_VIEW_SETTINGS,
MAIL_VIEW_PEOPLE
};
typedef struct _MailViewPrivate MailViewPrivate;
typedef struct _MailView {
AnjalMailView parent;
EMailSession *session;
GtkWidget *tree; /* Actual tree */
GtkWidget *folder_tree;
GtkWidget *slider;
GtkWidget *check_mail;
GtkWidget *sort_by;
MailViewPrivate *priv;
EShellView *shell_view;
} MailView;
typedef struct _MailViewClass {
AnjalMailViewClass parent_class;
void (* view_new) (MailView*);
} MailViewClass;
typedef enum {
MAIL_VIEW_HOLD_FOCUS=1,
} MailViewFlags;
typedef struct _MailViewChild {
GtkVBox parent;
gint type;
gchar *uri;
MailViewFlags flags;
}MailViewChild;
GType mail_view_get_type (void);
MailView * mail_view_new (void);
void mail_view_set_folder_uri (MailView *mv, const gchar *uri);
void mail_view_show_sort_popup (MailView *mv, GtkWidget *);
void mail_view_show_list (MailView *mv);
void mail_view_close_view (MailView *mv);
void mail_view_set_check_email (MailView *mv, GtkWidget *button);
void mail_view_set_sort_by (MailView *mv, GtkWidget *button);
void mail_view_check_mail (MailView *mv, gboolean deep);
void mail_view_set_folder_tree_widget (MailView *mv, GtkWidget *tree);
void mail_view_set_folder_tree (MailView *mv, GtkWidget *tree);
void mail_view_save (MailView *mv);
MailViewChild * mail_view_add_page (MailView *mv, guint16 type, gpointer data);
void mail_view_set_search (MailView *view, const gchar *search);
void mail_view_set_slider (MailView *mv, GtkWidget *slider);
void mail_view_init_search (MailView *mv, GtkWidget *search);
void mail_view_switch_to_people (MailView* mv, MailViewChild *mpv);
void mail_view_switch_to_settings (MailView* mv, MailViewChild *mpv);
void mail_view_set_search_entry (MailView *mv, GtkWidget *entry);
void mail_view_set_shell_view (MailView *mv, EShellView *shell);
#endif
|