0.7.2claws release
[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 *paned;
44
45         MimeViewType type;
46
47         GtkWidget *scrolledwin;
48         GtkWidget *ctree;
49         GtkWidget *vbox;
50
51         GtkWidget *popupmenu;
52         GtkItemFactory *popupfactory;
53
54         GtkCTreeNode *opened;
55
56         TextView *textview;
57         ImageView *imageview;
58
59         MessageView *messageview;
60
61         MimeInfo *mimeinfo;
62
63         gchar *file;
64 };
65
66 MimeView *mimeview_create       (void);
67 void mimeview_init              (MimeView       *mimeview);
68 void mimeview_show_message      (MimeView       *mimeview,
69                                  MimeInfo       *mimeinfo,
70                                  const gchar    *file);
71 void mimeview_destroy           (MimeView       *mimeview);
72
73 void mimeview_pass_key_press_event      (MimeView       *mimeview,
74                                          GdkEventKey    *event);
75
76 #endif /* __MIMEVIEW_H__ */