add support for Ayatana indicator to Notification plugin
[claws.git] / src / plugins / fancy / fancy_viewer.h
bloba52c46c627a236907d82fbcb6fa230a0addc0267
1 /*
2 * Claws Mail -- a GTK based, lightweight, and fast e-mail client
3 * == Fancy Plugin ==
4 * Copyright (C) 1999-2023 the Claws Mail Team
5 * This file Copyright (C) 2009-2023 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
26 #include <unistd.h>
27 #include <stdio.h>
29 #include <glib.h>
30 #include <glib/gi18n.h>
31 #include <gtk/gtk.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"
38 #include "mimeview.h"
39 #include "gdk/gdkkeysyms.h"
40 #include "main.h"
41 #include "plugin.h"
42 #include "menu.h"
43 #include "defs.h"
44 #include "utils.h"
45 #include "folder.h"
46 #ifdef USE_PTHREAD
47 #include <pthread.h>
48 #endif
50 #include <curl/curl.h>
51 #include <curl/curlver.h>
52 #include "filesel.h"
54 typedef enum _NavigationMode {
55 NAV_DEFAULT,
56 NAV_INNER,
57 NAV_OUTER
58 } NavigationMode;
60 typedef struct _FancyViewer FancyViewer;
61 struct _FancyViewer
63 MimeViewer mimeviewer;
64 GtkWidget *scrollwin;
65 WebKitWebView *view;
66 GtkWidget *vbox;
67 GtkWidget *l_link;
68 /* Zoom Widgets */
69 GtkWidget *zoom_100;
70 GtkWidget *ev_zoom_100;
71 GtkWidget *zoom_in;
72 GtkWidget *ev_zoom_in;
73 GtkWidget *zoom_out;
74 GtkWidget *ev_zoom_out;
75 GtkWidget *stop_loading;
76 GtkWidget *ev_stop_loading;
77 /* Preferences Widgets */
78 GtkWidget *fancy_prefs;
79 GtkWidget *ev_fancy_prefs;
80 GtkWidget *fancy_prefs_menu;
81 /* Menu Items */
82 GtkWidget *enable_images;
83 GtkWidget *enable_scripts;
84 GtkWidget *enable_plugins;
85 GtkWidget *enable_java;
86 GtkWidget *enable_remote_content;
87 GtkWidget *open_external;
88 GtkWidget *stylesheet;
90 GtkWidget *progress;
91 WebKitSettings *settings;
92 gboolean printing;
93 gboolean override_prefs_images;
94 gboolean override_prefs_remote_content;
95 gboolean override_prefs_scripts;
96 gboolean override_prefs_plugins;
97 gboolean override_prefs_external;
98 gboolean override_prefs_java;
99 gchar *override_stylesheet;
101 const gchar *curlfile;
102 FILE *stream;
104 const gchar *cur_link;
105 gchar *filename;
106 MimeInfo *to_load;
107 gulong doc_handle;
108 gint loading;
110 /* Coordinates of the last mouse click. */
111 gint click_x;
112 gint click_y;
114 /* DOM Objects */
115 WebKitDOMDocument *doc;
116 WebKitDOMDOMWindow *window;
117 WebKitDOMDOMSelection *selection;
118 WebKitDOMRange *range;
121 #define OPEN_INTERNAL FALSE
122 #define OPEN_EXTERNAL TRUE
123 #define CTRL_KEY 4
124 #define GOOGLE_SEARCH "http://www.google.com/search?hl=en&q="
126 #endif