3
* This program is free software; you can redistribute it and/or
4
* modify it under the terms of the GNU Lesser General Public
5
* License as published by the Free Software Foundation; either
6
* version 2 of the License, or (at your option) version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
* Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public
14
* License along with the program; if not, see <http://www.gnu.org/licenses/>
17
* Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
22
Concrete class for formatting mails to displayed html
25
#ifndef _EM_FORMAT_WEBKIT_DISPLAY_H
26
#define _EM_FORMAT_WEBKIT_DISPLAY_H
28
#include "em-format-webkit.h"
29
#include <misc/e-attachment.h>
31
typedef struct _EMFormatWebKitDisplay EMFormatWebKitDisplay;
32
typedef struct _EMFormatWebKitDisplayClass EMFormatWebKitDisplayClass;
34
struct _CamelMimePart;
36
struct _EMFormatWebKitDisplay {
37
EMFormatWebKit formathtml;
39
struct _EMFormatWebKitDisplayPrivate *priv;
41
struct _ESearchingTokenizer *search_tok;
43
unsigned int animate:1;
44
unsigned int caret_mode:1;
48
#define EM_FORMAT_WEBKIT_DISPLAY_SEARCH_PRIMARY (0)
49
#define EM_FORMAT_WEBKIT_DISPLAY_SEARCH_SECONDARY (1)
50
#define EM_FORMAT_WEBKIT_DISPLAY_SEARCH_ICASE (1<<8)
52
struct _EMFormatWebKitDisplayClass {
53
EMFormatWebKitClass formathtml_class;
55
/* a link clicked normally */
56
void (*link_clicked)(EMFormatWebKitDisplay *efwd, const char *uri);
57
/* a part or a link button pressed event */
58
int (*popup_event)(EMFormatWebKitDisplay *efwd, GdkEventButton *event, const char *uri, struct _CamelMimePart *part);
59
/* the mouse is over a link */
60
void (*on_url)(EMFormatWebKitDisplay *efwd, const char *uri);
63
GType em_format_webkit_display_get_type(void);
64
EMFormatWebKitDisplay *em_format_webkit_display_new(void);
66
void em_format_webkit_display_goto_anchor(EMFormatWebKitDisplay *efwd, const char *name);
68
void em_format_webkit_display_set_animate(EMFormatWebKitDisplay *efwd, gboolean state);
69
void em_format_webkit_display_set_caret_mode(EMFormatWebKitDisplay *efwd, gboolean state);
71
void em_format_webkit_display_set_search(EMFormatWebKitDisplay *efwd, int type, GSList *strings);
72
void em_format_webkit_display_search(EMFormatWebKitDisplay *efwd);
73
void em_format_webkit_display_search_with (EMFormatWebKitDisplay *efwd, char *word);
74
void em_format_webkit_display_search_close (EMFormatWebKitDisplay *efwd);
76
GtkWidget *em_format_webkit_get_search_dialog (EMFormatWebKitDisplay *efwd);
78
void em_format_webkit_display_cut (EMFormatWebKitDisplay *efwd);
79
void em_format_webkit_display_copy (EMFormatWebKitDisplay *efwd);
80
void em_format_webkit_display_paste (EMFormatWebKitDisplay *efwd);
82
void em_format_webkit_display_zoom_in (EMFormatWebKitDisplay *efwd);
83
void em_format_webkit_display_zoom_out (EMFormatWebKitDisplay *efwd);
84
void em_format_webkit_display_zoom_reset (EMFormatWebKitDisplay *efwd);
86
gboolean em_format_webkit_display_popup_menu (EMFormatWebKitDisplay *efwd);
89
struct _EPopupExtension;
90
void em_format_webkit_display_set_popup(EMFormatWebKitDisplay *, struct _EPopupExtension *);
92
#endif /* !_EM_FORMAT_WEBKIT_DISPLAY_H */