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 <webkit2/webkit2.h>
33 #include <webkitdom/webkitdom.h>
34 #include <prefs_common.h>
35 #include "common/claws.h"
36 #include "common/version.h"
37 #include "common/utils.h"
39 #include "gdk/gdkkeysyms.h"
50 #include <curl/curl.h>
51 #include <curl/curlver.h>
54 #ifdef HAVE_LIBSOUP_GNOME
55 #include <libsoup/soup-gnome.h>
58 typedef enum _NavigationMode
{
64 typedef struct _FancyViewer FancyViewer
;
67 MimeViewer mimeviewer
;
74 GtkWidget
*ev_zoom_100
;
76 GtkWidget
*ev_zoom_in
;
78 GtkWidget
*ev_zoom_out
;
79 GtkWidget
*stop_loading
;
80 GtkWidget
*ev_stop_loading
;
81 /* Preferences Widgets */
82 GtkWidget
*fancy_prefs
;
83 GtkWidget
*ev_fancy_prefs
;
84 GtkWidget
*fancy_prefs_menu
;
86 GtkWidget
*enable_images
;
87 GtkWidget
*enable_scripts
;
88 GtkWidget
*enable_plugins
;
89 GtkWidget
*enable_java
;
90 GtkWidget
*enable_remote_content
;
91 GtkWidget
*open_external
;
92 GtkWidget
*stylesheet
;
95 WebKitSettings
*settings
;
96 WebKitNetworkProxySettings
*no_remote_content_proxy_settings
;
98 gboolean override_prefs_images
;
99 gboolean override_prefs_remote_content
;
100 gboolean override_prefs_scripts
;
101 gboolean override_prefs_plugins
;
102 gboolean override_prefs_external
;
103 gboolean override_prefs_java
;
104 gchar
*override_stylesheet
;
106 const gchar
*curlfile
;
109 const gchar
*cur_link
;
115 /* Coordinates of the last mouse click. */
120 WebKitDOMDocument
*doc
;
121 WebKitDOMDOMWindow
*window
;
122 WebKitDOMDOMSelection
*selection
;
123 WebKitDOMRange
*range
;
126 #define OPEN_INTERNAL FALSE
127 #define OPEN_EXTERNAL TRUE
129 #define GOOGLE_SEARCH "http://www.google.com/search?hl=en&q="