Statistics
| Revision:

root / src / mimeview.h @ 601

History | View | Annotate | Download (2.2 kB)

1
/*
2
 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3
 * Copyright (C) 1999-2005 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/gtktreemodel.h>
27
#include <gtk/gtktreestore.h>
28
#include <gtk/gtktreeselection.h>
29
30
typedef struct _MimeView        MimeView;
31
32
#include "textview.h"
33
#include "imageview.h"
34
#include "messageview.h"
35
#include "procmime.h"
36
37
typedef enum
38
{
39
        MIMEVIEW_TEXT,
40
        MIMEVIEW_IMAGE
41
} MimeViewType;
42
43
struct _MimeView
44
{
45
        GtkWidget *paned;
46
47
        GtkWidget *scrolledwin;
48
        GtkWidget *treeview;
49
50
        GtkTreeStore *store;
51
        GtkTreeSelection *selection;
52
53
        GtkWidget *mime_vbox;
54
55
        MimeViewType type;
56
57
        GtkWidget *popupmenu;
58
        GtkItemFactory *popupfactory;
59
60
        GtkTreePath *opened;
61
62
        TextView *textview;
63
        ImageView *imageview;
64
65
        MessageView *messageview;
66
67
        MimeInfo *mimeinfo;
68
69
        gchar *file;
70
71
        gchar *drag_file;
72
};
73
74
MimeView *mimeview_create        (void);
75
void mimeview_init                (MimeView        *mimeview);
76
void mimeview_show_message        (MimeView        *mimeview,
77
                                 MimeInfo        *mimeinfo,
78
                                 const gchar        *file);
79
void mimeview_clear                (MimeView        *mimeview);
80
void mimeview_destroy                (MimeView        *mimeview);
81
82
MimeInfo *mimeview_get_selected_part        (MimeView        *mimeview);
83
84
gboolean mimeview_step                        (MimeView        *mimeview,
85
                                         GtkScrollType         type);
86
87
void mimeview_pass_key_press_event        (MimeView        *mimeview,
88
                                         GdkEventKey        *event);
89
90
void mimeview_save_as                        (MimeView        *mimeview);
91
void mimeview_save_all                        (MimeView        *mimeview);
92
93
#endif /* __MIMEVIEW_H__ */