Made GPG signatures verifiable by clicking the
[claws.git] / src / mimeview.h
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2002 Hiroyuki Yamamoto
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
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
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __MIMEVIEW_H__
21 #define __MIMEVIEW_H__
22
23 #include <glib.h>
24 #include <gdk/gdk.h>
25 #include <gtk/gtkwidget.h>
26 #include <gtk/gtkctree.h>
27
28 typedef struct _MimeView        MimeView;
29
30 #include "textview.h"
31 #include "imageview.h"
32 #include "messageview.h"
33 #include "procmime.h"
34
35 typedef enum
36 {
37         MIMEVIEW_TEXT,
38         MIMEVIEW_IMAGE
39 } MimeViewType;
40
41 struct _MimeView
42 {
43         GtkWidget *notebook;
44         GtkWidget *vbox;
45
46         GtkWidget *paned;
47         GtkWidget *scrolledwin;
48         GtkWidget *ctree;
49         GtkWidget *mime_vbox;
50
51         MimeViewType type;
52
53         GtkWidget *popupmenu;
54         GtkItemFactory *popupfactory;
55
56         GtkCTreeNode *opened;
57
58         TextView *textview;
59         ImageView *imageview;
60
61         MessageView *messageview;
62
63         MimeInfo *mimeinfo;
64
65         gchar *file;
66 };
67
68 MimeView *mimeview_create       (void);
69 void mimeview_init              (MimeView       *mimeview);
70 void mimeview_show_message      (MimeView       *mimeview,
71                                  MimeInfo       *mimeinfo,
72                                  const gchar    *file);
73 void mimeview_destroy           (MimeView       *mimeview);
74
75 #if USE_GPGME
76 void mimeview_check_signature   (MimeView       *mimeview);
77 #endif
78 void mimeview_pass_key_press_event      (MimeView       *mimeview,
79                                          GdkEventKey    *event);
80
81 #endif /* __MIMEVIEW_H__ */