Fix bug #3574: Template addressing
[claws.git] / src / messageview.h
blob792e15d7f24553f596c4fcfecdd4897d2f9017a1
1 /*
2 * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2016 Hiroyuki Yamamoto and the Claws Mail team
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 3 of the License, or
8 * (at your option) any later version.
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.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef __MESSAGEVIEW_H__
20 #define __MESSAGEVIEW_H__
22 #ifdef HAVE_CONFIG_H
23 #include "claws-features.h"
24 #endif
26 #include <glib.h>
27 #include <gtk/gtk.h>
29 #include "mainwindow.h"
30 #include "viewtypes.h"
31 #include "procmsg.h"
32 #include "procmime.h"
33 #include "toolbar.h"
35 #define MESSAGE_VIEW_SHOW_DONE_HOOKLIST "message_view_show_done_hooklist"
38 struct _MessageView
40 GtkWidget *vbox;
42 gboolean new_window;
43 GtkWidget *window;
45 /* Toolbar handlebox */
46 GtkWidget *handlebox;
47 Toolbar *toolbar;
48 GtkWidget *menubar;
50 HeaderView *headerview;
51 MimeView *mimeview;
52 NoticeView *noticeview;
53 GtkWidget *statusbar;
54 gint statusbar_cid;
56 MainWindow *mainwin;
58 MsgInfo *msginfo;
60 gchar *forced_charset;
61 EncodingType forced_encoding;
63 gboolean visible;
65 /* this message was filtered by an action */
66 gboolean filtered;
68 /* From messageview_show */
69 gboolean all_headers;
71 gint msginfo_update_callback_id;
72 gboolean updating;
73 gboolean deferred_destroy;
75 gboolean show_full_text;
76 gboolean partial_display_shown;
77 gboolean update_needed;
78 GtkUIManager *ui_manager;
79 GList *trail;
80 gint trail_pos;
83 struct _MimeInfoSearch
85 MimeInfo *parent;
86 MimeInfo *current;
87 MimeInfo *found;
89 typedef struct _MimeInfoSearch MimeInfoSearch;
91 MessageView *messageview_create (MainWindow *mainwin);
92 MessageView *messageview_create_with_new_window (MainWindow *mainwin);
94 void messageview_init (MessageView *messageview);
95 gint messageview_show (MessageView *messageview,
96 MsgInfo *msginfo,
97 gboolean all_headers);
98 void messageview_clear (MessageView *messageview);
99 void messageview_destroy (MessageView *messageview);
101 TextView *messageview_get_current_textview (MessageView *messageview);
102 MimeInfo *messageview_get_selected_mime_part (MessageView *messageview);
104 void messageview_copy_clipboard (MessageView *messageview);
105 void messageview_select_all (MessageView *messageview);
106 void messageview_set_position (MessageView *messageview,
107 gint pos);
108 const GList *messageview_get_msgview_list (void);
109 void messageview_delete (MessageView *messageview);
110 gboolean messageview_search_string (MessageView *messageview,
111 const gchar *str,
112 gboolean case_sens);
113 gboolean messageview_search_string_backward (MessageView *messageview,
114 const gchar *str,
115 gboolean case_sens);
117 gboolean messageview_is_visible (MessageView *messageview);
119 void messageview_update_actions_menu (MessageView *msgview);
120 void messageview_reflect_prefs_pixmap_theme (void);
121 gchar *messageview_get_selection (MessageView *msgview);
123 void messageview_set_menu_sensitive (MessageView *msgview);
124 void messageview_learn (MessageView *msgview,
125 gboolean is_spam);
126 void messageview_print (MsgInfo *msginfo,
127 gboolean all_headers,
128 gint sel_start,
129 gint sel_end,
130 gint partnum);
131 void messageview_list_urls (MessageView *msgview);
132 void messageview_show_partial_display (MessageView *msgview,
133 MsgInfo *msginfo,
134 size_t length);
135 gboolean messageview_nav_has_prev(MessageView *messageview);
136 gboolean messageview_nav_has_next(MessageView *messageview);
137 MsgInfo *messageview_nav_get_prev(MessageView *messageview);
138 MsgInfo *messageview_nav_get_next(MessageView *messageview);
140 #endif /* __MESSAGEVIEW_H__ */