2 * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
4 * Copyright (C) 1999-2013 Hiroyuki Yamamoto and the Claws Mail Team
5 * This file Copyright (C) 2009-2013 Salvatore De Paolis <iwkse@claws-mail.org>
6 * and the Claws Mail Team
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #ifndef FANCY_VIEWER_H
24 #define FANCY_VIEWER_H
30 #include <glib/gi18n.h>
32 #include <webkit/webkitwebview.h>
33 #include <webkit/webkitversion.h>
34 #include <webkit/webkitwebframe.h>
35 #include <webkit/webkitnetworkrequest.h>
36 #include <webkit/webkitwebnavigationaction.h>
37 #include <webkit/webkitwebpolicydecision.h>
38 #if WEBKIT_CHECK_VERSION (1,3,10)
39 #include <webkit/webkitglobals.h>
41 #include <prefs_common.h>
42 #include "common/claws.h"
43 #include "common/version.h"
44 #include "common/utils.h"
46 #include "gdk/gdkkeysyms.h"
57 #include <curl/curl.h>
58 #include <curl/curlver.h>
61 #ifdef HAVE_LIBSOUP_GNOME
62 #include <libsoup/soup-gnome.h>
65 typedef enum _NavigationMode {
71 typedef struct _FancyViewer FancyViewer;
74 MimeViewer mimeviewer;
81 GtkWidget *ev_zoom_100;
83 GtkWidget *ev_zoom_in;
85 GtkWidget *ev_zoom_out;
86 GtkWidget *stop_loading;
87 GtkWidget *ev_stop_loading;
88 /* Preferences Widgets */
89 GtkWidget *fancy_prefs;
90 GtkWidget *ev_fancy_prefs;
91 GtkWidget *fancy_prefs_menu;
93 GtkWidget *enable_images;
94 GtkWidget *enable_scripts;
95 GtkWidget *enable_plugins;
96 GtkWidget *enable_java;
97 GtkWidget *enable_remote_content;
98 GtkWidget *open_external;
99 GtkWidget *stylesheet;
102 WebKitWebSettings *settings;
104 gboolean override_prefs_images;
105 gboolean override_prefs_remote_content;
106 gboolean override_prefs_scripts;
107 gboolean override_prefs_plugins;
108 gboolean override_prefs_external;
109 gboolean override_prefs_java;
110 gchar *override_stylesheet;
112 const gchar *curlfile;
121 /* Coordinates of the last mouse click. */
126 #if WEBKIT_CHECK_VERSION(1,5,1)
127 WebKitDOMDocument *doc;
128 WebKitDOMDOMWindow *window;
129 WebKitDOMDOMSelection *selection;
130 WebKitDOMRange *range;
133 #define OPEN_INTERNAL FALSE
134 #define OPEN_EXTERNAL TRUE
136 #define GOOGLE_SEARCH "http://www.google.com/search?hl=en&q="