Statistics
| Revision:

root / src / mimeview.h @ 135

History | View | Annotate | Download (2 kB)

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