2 * Claws Mail -- a GTK based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2021 the Claws Mail team and Hiroyuki Yamamoto
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
;
31 #include "messageview.h"
33 #include "noticeview.h"
45 GtkWidget
*scrolledwin
;
47 GtkWidget
*mime_notebook
;
48 GtkWidget
*ctree_mainbox
;
49 GtkWidget
*icon_scroll
;
51 GtkWidget
*icon_mainbox
;
52 GtkWidget
*mime_toggle
;
53 GtkWidget
*scrollbutton
;
63 MimeViewer
*mimeviewer
;
65 MessageView
*messageview
;
73 GtkTargetList
*target_list
; /* DnD */
78 NoticeView
*siginfoview
;
81 GtkUIManager
*ui_manager
;
82 GtkActionGroup
*action_group
;
85 GCancellable
*sig_check_cancellable
;
86 guint sig_check_timeout_tag
;
89 struct _MimeViewerFactory
92 * Array of supported content types.
93 * Must be NULL terminated and lower case
95 gchar
**content_types
;
98 MimeViewer
*(*create_viewer
) (void);
103 MimeViewerFactory
*factory
;
105 GtkWidget
*(*get_widget
) (MimeViewer
*);
106 void (*show_mimepart
) (MimeViewer
*, const gchar
*infile
, MimeInfo
*);
107 void (*clear_viewer
) (MimeViewer
*);
108 void (*destroy_viewer
) (MimeViewer
*);
109 gchar
*(*get_selection
) (MimeViewer
*);
110 gboolean (*scroll_page
) (MimeViewer
*, gboolean up
);
111 void (*scroll_one_line
) (MimeViewer
*, gboolean up
);
112 gboolean (*text_search
) (MimeViewer
*, gboolean backward
,
114 gboolean case_sensitive
);
115 void (*print
) (MimeViewer
*);
121 #endif /* __cplusplus */
124 MimeView
*mimeview_create (MainWindow
*mainwin
);
125 void mimeview_init (MimeView
*mimeview
);
126 void mimeview_show_message (MimeView
*mimeview
,
129 gboolean
mimeview_show_part (MimeView
*mimeview
,
131 void mimeview_show_part_as_text (MimeView
*mimeview
,
133 void mimeview_destroy (MimeView
*mimeview
);
134 void mimeview_update (MimeView
*mimeview
);
135 void mimeview_clear (MimeView
*mimeview
);
137 MimeInfo
*mimeview_get_selected_part (MimeView
*mimeview
);
139 gboolean
mimeview_pass_key_press_event (MimeView
*mimeview
,
142 void mimeview_register_viewer_factory (MimeViewerFactory
*factory
);
143 void mimeview_unregister_viewer_factory (MimeViewerFactory
*factory
);
144 void mimeview_handle_cmd (MimeView
*mimeview
,
146 GdkEventButton
*event
,
148 void mimeview_select_mimepart_icon (MimeView
*mimeview
,
150 gboolean
mimeview_scroll_page (MimeView
*mimeview
,
152 void mimeview_scroll_one_line (MimeView
*mimeview
,
154 gint
mimeview_get_selected_part_num (MimeView
*mimeview
);
155 void mimeview_select_part_num (MimeView
*mimeview
,
157 gboolean mimeview_has_viewer_for_content_type
159 const gchar
*content_type
);
160 gboolean
mimeview_tree_is_empty (MimeView
*mimeview
);
161 void mimeview_save_as (MimeView
*mimeview
);
162 void mimeview_display_as_text (MimeView
*mimeview
);
163 void mimeview_launch (MimeView
*mimeview
,
166 void mimeview_open_with (MimeView
*mimeview
);
168 void mimeview_check_signature(MimeView
*mimeview
);
169 void mimeview_select_next_part(MimeView
*mimeview
);
170 void mimeview_select_prev_part(MimeView
*mimeview
);
175 #endif /* __cplusplus */
177 #endif /* __MIMEVIEW_H__ */