Updated Spanish translation
[evolution.git] / e-util / e-web-view.h
blob545c3bbc68de103b74e2030b22ff690363db3255
1 /*
2 * e-web-view.h
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 /* This is intended to serve as a common base class for all HTML viewing
19 * needs in Evolution.
21 * This class handles basic tasks like mouse hovers over links, clicked
22 * links, and servicing URI requests asynchronously via GIO. */
24 #if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION)
25 #error "Only <e-util/e-util.h> should be included directly."
26 #endif
28 #ifndef E_WEB_VIEW_H
29 #define E_WEB_VIEW_H
31 #include <webkit/webkit.h>
32 #include <e-util/e-activity.h>
34 /* Standard GObject macros */
35 #define E_TYPE_WEB_VIEW \
36 (e_web_view_get_type ())
37 #define E_WEB_VIEW(obj) \
38 (G_TYPE_CHECK_INSTANCE_CAST \
39 ((obj), E_TYPE_WEB_VIEW, EWebView))
40 #define E_WEB_VIEW_CLASS(cls) \
41 (G_TYPE_CHECK_CLASS_CAST \
42 ((cls), E_TYPE_WEB_VIEW, EWebViewClass))
43 #define E_IS_WEB_VIEW(obj) \
44 (G_TYPE_CHECK_INSTANCE_TYPE \
45 ((obj), E_TYPE_WEB_VIEW))
46 #define E_IS_WEB_VIEW_CLASS(cls) \
47 (G_TYPE_CHECK_CLASS_TYPE \
48 ((cls), E_TYPE_WEB_VIEW))
49 #define E_WEB_VIEW_GET_CLASS(obj) \
50 (G_TYPE_INSTANCE_GET_CLASS \
51 ((obj), E_TYPE_WEB_VIEW, EWebViewClass))
53 G_BEGIN_DECLS
55 typedef struct _EWebView EWebView;
56 typedef struct _EWebViewClass EWebViewClass;
57 typedef struct _EWebViewPrivate EWebViewPrivate;
59 struct _EWebView {
60 WebKitWebView parent;
61 EWebViewPrivate *priv;
64 struct _EWebViewClass {
65 WebKitWebViewClass parent_class;
67 /* Methods */
68 GtkWidget * (*create_plugin_widget) (EWebView *web_view,
69 const gchar *mime_type,
70 const gchar *uri,
71 GHashTable *param);
72 void (*hovering_over_link) (EWebView *web_view,
73 const gchar *title,
74 const gchar *uri);
75 void (*link_clicked) (EWebView *web_view,
76 const gchar *uri);
77 void (*load_string) (EWebView *web_view,
78 const gchar *load_string);
79 void (*load_uri) (EWebView *web_view,
80 const gchar *load_uri);
81 gchar * (*redirect_uri) (EWebView *web_view,
82 const gchar *uri);
83 gchar * (*suggest_filename) (EWebView *web_view,
84 const gchar *uri);
85 void (*set_fonts) (EWebView *web_view,
86 PangoFontDescription **monospace,
87 PangoFontDescription **variable_width);
89 /* Signals */
90 void (*new_activity) (EWebView *web_view,
91 EActivity *activity);
92 gboolean (*popup_event) (EWebView *web_view,
93 const gchar *uri);
94 void (*status_message) (EWebView *web_view,
95 const gchar *status_message);
96 void (*stop_loading) (EWebView *web_view);
97 void (*update_actions) (EWebView *web_view);
98 gboolean (*process_mailto) (EWebView *web_view,
99 const gchar *mailto_uri);
102 GType e_web_view_get_type (void) G_GNUC_CONST;
103 GtkWidget * e_web_view_new (void);
104 void e_web_view_clear (EWebView *web_view);
105 void e_web_view_load_string (EWebView *web_view,
106 const gchar *string);
107 void e_web_view_load_uri (EWebView *web_view,
108 const gchar *uri);
109 gchar * e_web_view_redirect_uri (EWebView *web_view,
110 const gchar *uri);
111 gchar * e_web_view_suggest_filename (EWebView *web_view,
112 const gchar *uri);
113 void e_web_view_reload (EWebView *web_view);
114 gchar * e_web_view_get_html (EWebView *web_view);
115 gboolean e_web_view_get_caret_mode (EWebView *web_view);
116 void e_web_view_set_caret_mode (EWebView *web_view,
117 gboolean caret_mode);
118 GtkTargetList * e_web_view_get_copy_target_list (EWebView *web_view);
119 gboolean e_web_view_get_disable_printing (EWebView *web_view);
120 void e_web_view_set_disable_printing (EWebView *web_view,
121 gboolean disable_printing);
122 gboolean e_web_view_get_disable_save_to_disk
123 (EWebView *web_view);
124 void e_web_view_set_disable_save_to_disk
125 (EWebView *web_view,
126 gboolean disable_save_to_disk);
127 gboolean e_web_view_get_editable (EWebView *web_view);
128 void e_web_view_set_editable (EWebView *web_view,
129 gboolean editable);
130 gboolean e_web_view_get_inline_spelling (EWebView *web_view);
131 void e_web_view_set_inline_spelling (EWebView *web_view,
132 gboolean inline_spelling);
133 gboolean e_web_view_get_magic_links (EWebView *web_view);
134 void e_web_view_set_magic_links (EWebView *web_view,
135 gboolean magic_links);
136 gboolean e_web_view_get_magic_smileys (EWebView *web_view);
137 void e_web_view_set_magic_smileys (EWebView *web_view,
138 gboolean magic_smileys);
139 const gchar * e_web_view_get_selected_uri (EWebView *web_view);
140 void e_web_view_set_selected_uri (EWebView *web_view,
141 const gchar *selected_uri);
142 const gchar * e_web_view_get_cursor_image_src (EWebView *web_view);
143 void e_web_view_set_cursor_image_src (EWebView *web_view,
144 const gchar *src_uri);
145 GtkAction * e_web_view_get_open_proxy (EWebView *web_view);
146 void e_web_view_set_open_proxy (EWebView *web_view,
147 GtkAction *open_proxy);
148 GtkTargetList * e_web_view_get_paste_target_list
149 (EWebView *web_view);
150 GtkAction * e_web_view_get_print_proxy (EWebView *web_view);
151 void e_web_view_set_print_proxy (EWebView *web_view,
152 GtkAction *print_proxy);
153 GtkAction * e_web_view_get_save_as_proxy (EWebView *web_view);
154 void e_web_view_set_save_as_proxy (EWebView *web_view,
155 GtkAction *save_as_proxy);
156 void e_web_view_add_highlight (EWebView *web_view,
157 const gchar *highlight);
158 void e_web_view_clear_highlights (EWebView *web_view);
159 void e_web_view_update_highlights (EWebView *web_view);
160 GtkAction * e_web_view_get_action (EWebView *web_view,
161 const gchar *action_name);
162 GtkActionGroup *e_web_view_get_action_group (EWebView *web_view,
163 const gchar *group_name);
164 void e_web_view_copy_clipboard (EWebView *web_view);
165 void e_web_view_cut_clipboard (EWebView *web_view);
166 gboolean e_web_view_is_selection_active (EWebView *web_view);
167 void e_web_view_paste_clipboard (EWebView *web_view);
168 gboolean e_web_view_scroll_forward (EWebView *web_view);
169 gboolean e_web_view_scroll_backward (EWebView *web_view);
170 void e_web_view_select_all (EWebView *web_view);
171 void e_web_view_unselect_all (EWebView *web_view);
172 void e_web_view_zoom_100 (EWebView *web_view);
173 void e_web_view_zoom_in (EWebView *web_view);
174 void e_web_view_zoom_out (EWebView *web_view);
175 GtkUIManager * e_web_view_get_ui_manager (EWebView *web_view);
176 GtkWidget * e_web_view_get_popup_menu (EWebView *web_view);
177 void e_web_view_show_popup_menu (EWebView *web_view);
178 EActivity * e_web_view_new_activity (EWebView *web_view);
179 void e_web_view_status_message (EWebView *web_view,
180 const gchar *status_message);
181 void e_web_view_stop_loading (EWebView *web_view);
182 void e_web_view_update_actions (EWebView *web_view);
183 gchar * e_web_view_get_selection_html (EWebView *web_view);
184 void e_web_view_update_fonts (EWebView *web_view);
185 void e_web_view_cursor_image_copy (EWebView *web_view);
186 void e_web_view_cursor_image_save (EWebView *web_view);
187 void e_web_view_request (EWebView *web_view,
188 const gchar *uri,
189 GCancellable *cancellable,
190 GAsyncReadyCallback callback,
191 gpointer user_data);
192 GInputStream * e_web_view_request_finish (EWebView *web_view,
193 GAsyncResult *result,
194 GError **error);
195 void e_web_view_install_request_handler
196 (EWebView *web_view,
197 GType handler_type);
198 void e_web_view_create_and_add_css_style_sheet
199 (WebKitDOMDocument* document,
200 const gchar *style_sheet_id);
201 void e_web_view_add_css_rule_into_style_sheet
202 (EWebView *web_view,
203 const gchar *style_sheet_id,
204 const gchar *selector,
205 const gchar *style);
206 const gchar * e_web_view_get_citation_color_for_level
207 (gint level);
208 G_END_DECLS
210 #endif /* E_WEB_VIEW_H */