Statistics
| Revision:

root / src / mimeview.h @ 3254

History | View | Annotate | Download (2.65 KB)

1
/*
2
 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3
 * Copyright (C) 1999-2013 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
        GtkWidget *reply_separator;
60
        GtkWidget *reply_menuitem;
61

    
62
        GtkTreePath *opened;
63

    
64
        TextView *textview;
65
        ImageView *imageview;
66

    
67
        MessageView *messageview;
68

    
69
        /* deprecated: use MessageView */
70
        MimeInfo *mimeinfo__;
71
        gchar *file__;
72

    
73
        gchar *drag_file;
74

    
75
        gboolean has_attach_file;
76
};
77

    
78
MimeView *mimeview_create        (void);
79
void mimeview_init                (MimeView        *mimeview);
80
void mimeview_show_message        (MimeView        *mimeview,
81
                                 MimeInfo        *mimeinfo,
82
                                 const gchar        *file);
83
void mimeview_clear                (MimeView        *mimeview);
84
void mimeview_destroy                (MimeView        *mimeview);
85

    
86
MimeInfo *mimeview_get_selected_part        (MimeView        *mimeview);
87

    
88
gboolean mimeview_step                        (MimeView        *mimeview,
89
                                         GtkScrollType         type);
90

    
91
void mimeview_pass_key_press_event        (MimeView        *mimeview,
92
                                         GdkEventKey        *event);
93

    
94
void mimeview_save_as                        (MimeView        *mimeview);
95
void mimeview_save_all                        (MimeView        *mimeview);
96

    
97
void mimeview_print                        (MimeView        *mimeview);
98

    
99
void mimeview_launch_part                (MimeView        *mimeview,
100
                                         MimeInfo        *partinfo);
101
void mimeview_open_part_with                (MimeView        *mimeview,
102
                                         MimeInfo        *partinfo);
103
void mimeview_save_part_as                (MimeView        *mimeview,
104
                                         MimeInfo        *partinfo);
105

    
106
void mimeview_print_part                (MimeView        *mimeview,
107
                                         MimeInfo        *partinfo);
108

    
109
#endif /* __MIMEVIEW_H__ */