2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2012 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/>.
23 typedef struct _MimeViewerFactory MimeViewerFactory
;
24 typedef struct _MimeViewer MimeViewer
;
34 #include "messageview.h"
36 #include "noticeview.h"
45 typedef struct _SigCheckData SigCheckData
;
51 gboolean cancel_th_init
;
54 gboolean free_after_use
;
55 gboolean destroy_mimeview
;
64 GtkWidget
*scrolledwin
;
66 GtkWidget
*mime_notebook
;
67 GtkWidget
*ctree_mainbox
;
68 GtkWidget
*icon_scroll
;
70 GtkWidget
*icon_mainbox
;
71 GtkWidget
*mime_toggle
;
72 GtkWidget
*scrollbutton
;
81 MimeViewer
*mimeviewer
;
83 MessageView
*messageview
;
91 GtkTargetList
*target_list
; /* DnD */
96 NoticeView
*siginfoview
;
99 GtkUIManager
*ui_manager
;
100 GtkActionGroup
*action_group
;
101 gboolean signed_part
;
104 SigCheckData
*check_data
;
108 struct _MimeViewerFactory
111 * Array of supported content types.
112 * Must be NULL terminated and lower case
114 gchar
**content_types
;
117 MimeViewer
*(*create_viewer
) (void);
122 MimeViewerFactory
*factory
;
124 GtkWidget
*(*get_widget
) (MimeViewer
*);
125 void (*show_mimepart
) (MimeViewer
*, const gchar
*infile
, MimeInfo
*);
126 void (*clear_viewer
) (MimeViewer
*);
127 void (*destroy_viewer
) (MimeViewer
*);
128 gchar
*(*get_selection
) (MimeViewer
*);
129 gboolean (*scroll_page
) (MimeViewer
*, gboolean up
);
130 void (*scroll_one_line
) (MimeViewer
*, gboolean up
);
131 gboolean (*text_search
) (MimeViewer
*, gboolean backward
,
133 gboolean case_sensitive
);
134 void (*print
) (MimeViewer
*);
140 #endif /* __cplusplus */
143 MimeView
*mimeview_create (MainWindow
*mainwin
);
144 void mimeview_init (MimeView
*mimeview
);
145 void mimeview_show_message (MimeView
*mimeview
,
148 gboolean
mimeview_show_part (MimeView
*mimeview
,
150 void mimeview_show_part_as_text (MimeView
*mimeview
,
152 void mimeview_destroy (MimeView
*mimeview
);
153 void mimeview_update (MimeView
*mimeview
);
154 void mimeview_clear (MimeView
*mimeview
);
156 MimeInfo
*mimeview_get_selected_part (MimeView
*mimeview
);
158 gboolean
mimeview_pass_key_press_event (MimeView
*mimeview
,
161 void mimeview_register_viewer_factory (MimeViewerFactory
*factory
);
162 void mimeview_unregister_viewer_factory (MimeViewerFactory
*factory
);
163 void mimeview_handle_cmd (MimeView
*mimeview
,
165 GdkEventButton
*event
,
167 void mimeview_select_mimepart_icon (MimeView
*mimeview
,
169 gboolean
mimeview_scroll_page (MimeView
*mimeview
,
171 void mimeview_scroll_one_line (MimeView
*mimeview
,
173 gint
mimeview_get_selected_part_num (MimeView
*mimeview
);
174 void mimeview_select_part_num (MimeView
*mimeview
,
176 gboolean mimeview_has_viewer_for_content_type
178 const gchar
*content_type
);
179 gboolean
mimeview_tree_is_empty (MimeView
*mimeview
);
180 void mimeview_save_as (MimeView
*mimeview
);
181 void mimeview_display_as_text (MimeView
*mimeview
);
182 void mimeview_launch (MimeView
*mimeview
,
185 void mimeview_open_with (MimeView
*mimeview
);
187 void mimeview_check_signature(MimeView
*mimeview
);
188 void mimeview_select_next_part(MimeView
*mimeview
);
189 void mimeview_select_prev_part(MimeView
*mimeview
);
194 #endif /* __cplusplus */
196 #endif /* __MIMEVIEW_H__ */