/[eiffelstudio]/branches/eth/eve/Src/library/web_browser/spec/include/webkit/webkitwebview.h
ViewVC logotype

Contents of /branches/eth/eve/Src/library/web_browser/spec/include/webkit/webkitwebview.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 92937 - (show annotations)
Fri Sep 13 05:26:42 2013 UTC (6 years, 1 month ago) by jasonw
File MIME type: text/plain
File size: 6942 byte(s)
<<Merged from trunk#92936.>>
1 /*
2 * Copyright (C) 2007 Holger Hans Peter Freyther
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20 #ifndef WEBKIT_WEB_VIEW_H
21 #define WEBKIT_WEB_VIEW_H
22
23 #include <gtk/gtk.h>
24 #include <JavaScriptCore/JSBase.h>
25
26 #include "webkitdefines.h"
27 #include "webkitwebsettings.h"
28
29 G_BEGIN_DECLS
30
31 #define WEBKIT_TYPE_WEB_VIEW (webkit_web_view_get_type())
32 #define WEBKIT_WEB_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_WEB_VIEW, WebKitWebView))
33 #define WEBKIT_WEB_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_WEB_VIEW, WebKitWebViewClass))
34 #define WEBKIT_IS_WEB_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_WEB_VIEW))
35 #define WEBKIT_IS_WEB_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_WEB_VIEW))
36 #define WEBKIT_WEB_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_WEB_VIEW, WebKitWebViewClass))
37
38
39 typedef enum {
40 WEBKIT_NAVIGATION_RESPONSE_ACCEPT,
41 WEBKIT_NAVIGATION_RESPONSE_IGNORE,
42 WEBKIT_NAVIGATION_RESPONSE_DOWNLOAD
43 } WebKitNavigationResponse;
44
45 typedef enum
46 {
47 WEBKIT_WEB_VIEW_TARGET_INFO_HTML = - 1,
48 WEBKIT_WEB_VIEW_TARGET_INFO_TEXT = - 2
49 } WebKitWebViewTargetInfo;
50
51 struct _WebKitWebView {
52 GtkContainer parent;
53 };
54
55 struct _WebKitWebViewClass {
56 GtkContainerClass parent;
57
58 /*
59 * default handler/virtual methods
60 * DISCUSS: create_web_view needs a request and should we make this a signal with default handler? this would
61 * require someone doing a g_signal_stop_emission_by_name
62 * WebUIDelegate has nothing for create_frame, WebPolicyDelegate as well...
63 */
64 WebKitWebView* (*create_web_view) (WebKitWebView* web_view);
65
66 /*
67 * TODO: FIXME: Create something like WebPolicyDecisionListener_Protocol instead
68 */
69 WebKitNavigationResponse (*navigation_requested) (WebKitWebView* web_view, WebKitWebFrame* frame, WebKitNetworkRequest* request);
70
71 void (*window_object_cleared) (WebKitWebView* web_view, WebKitWebFrame* frame, JSGlobalContextRef context, JSObjectRef window_object);
72 gchar* (*choose_file) (WebKitWebView* web_view, WebKitWebFrame* frame, const gchar* old_file);
73 gboolean (*script_alert) (WebKitWebView* web_view, WebKitWebFrame* frame, const gchar* alert_message);
74 gboolean (*script_confirm) (WebKitWebView* web_view, WebKitWebFrame* frame, const gchar* confirm_message, gboolean* did_confirm);
75 gboolean (*script_prompt) (WebKitWebView* web_view, WebKitWebFrame* frame, const gchar* message, const gchar* default_value, gchar** value);
76 gboolean (*console_message) (WebKitWebView* web_view, const gchar* message, unsigned int line_number, const gchar* source_id);
77 void (*select_all) (WebKitWebView* web_view);
78 void (*cut_clipboard) (WebKitWebView* web_view);
79 void (*copy_clipboard) (WebKitWebView* web_view);
80 void (*paste_clipboard) (WebKitWebView* web_view);
81
82 /*
83 * internal
84 */
85 void (*set_scroll_adjustments) (WebKitWebView*, GtkAdjustment*, GtkAdjustment*);
86 };
87
88 WEBKIT_API GType
89 webkit_web_view_get_type (void);
90
91 WEBKIT_API GtkWidget*
92 webkit_web_view_new (void);
93
94 WEBKIT_OBSOLETE_API gboolean
95 webkit_web_view_can_go_backward (WebKitWebView* web_view);
96
97 WEBKIT_API gboolean
98 webkit_web_view_can_go_back (WebKitWebView* web_view);
99
100 WEBKIT_API gboolean
101 webkit_web_view_can_go_back_or_forward (WebKitWebView* web_view, gint steps);
102
103 WEBKIT_API gboolean
104 webkit_web_view_can_go_forward (WebKitWebView* web_view);
105
106 WEBKIT_OBSOLETE_API void
107 webkit_web_view_go_backward (WebKitWebView* web_view);
108
109 WEBKIT_API void
110 webkit_web_view_go_back (WebKitWebView* web_view);
111
112 WEBKIT_API void
113 webkit_web_view_go_back_or_forward (WebKitWebView* web_view, gint steps);
114
115 WEBKIT_API void
116 webkit_web_view_go_forward (WebKitWebView* web_view);
117
118 WEBKIT_API void
119 webkit_web_view_stop_loading (WebKitWebView* web_view);
120
121 WEBKIT_API void
122 webkit_web_view_open (WebKitWebView* web_view, const gchar* uri);
123
124 WEBKIT_API void
125 webkit_web_view_reload (WebKitWebView *web_view);
126
127 WEBKIT_API void
128 webkit_web_view_load_string (WebKitWebView* web_view, const gchar* content, const gchar* content_mime_type, const gchar* content_encoding, const gchar* base_uri);
129
130 WEBKIT_API void
131 webkit_web_view_load_html_string (WebKitWebView* web_view, const gchar* content, const gchar* base_uri);
132
133 WEBKIT_API gboolean
134 webkit_web_view_search_text (WebKitWebView* web_view, const gchar* string, gboolean case_sensitive, gboolean forward, gboolean wrap);
135
136 WEBKIT_API guint
137 webkit_web_view_mark_text_matches (WebKitWebView* web_view, const gchar* string, gboolean case_sensitive, guint limit);
138
139 WEBKIT_API void
140 webkit_web_view_set_highlight_text_matches (WebKitWebView* web_view, gboolean highlight);
141
142 WEBKIT_API void
143 webkit_web_view_unmark_text_matches (WebKitWebView* web_view);
144
145 WEBKIT_API WebKitWebFrame*
146 webkit_web_view_get_main_frame (WebKitWebView* web_view);
147
148 WEBKIT_API void
149 webkit_web_view_execute_script (WebKitWebView* web_view, const gchar* script);
150
151 WEBKIT_API gboolean
152 webkit_web_view_can_cut_clipboard (WebKitWebView* web_view);
153
154 WEBKIT_API gboolean
155 webkit_web_view_can_copy_clipboard (WebKitWebView* web_view);
156
157 WEBKIT_API gboolean
158 webkit_web_view_can_paste_clipboard (WebKitWebView* web_view);
159
160 WEBKIT_API void
161 webkit_web_view_cut_clipboard (WebKitWebView* web_view);
162
163 WEBKIT_API void
164 webkit_web_view_copy_clipboard (WebKitWebView* web_view);
165
166 WEBKIT_API void
167 webkit_web_view_paste_clipboard (WebKitWebView* web_view);
168
169 WEBKIT_API void
170 webkit_web_view_delete_selection (WebKitWebView* web_view);
171
172 WEBKIT_API gboolean
173 webkit_web_view_has_selection (WebKitWebView* web_view);
174
175 WEBKIT_API void
176 webkit_web_view_select_all (WebKitWebView* web_view);
177
178 WEBKIT_API gboolean
179 webkit_web_view_get_editable (WebKitWebView* web_view);
180
181 WEBKIT_API void
182 webkit_web_view_set_editable (WebKitWebView* web_view, gboolean flag);
183
184 WEBKIT_API GtkTargetList*
185 webkit_web_view_get_copy_target_list (WebKitWebView* web_view);
186
187 WEBKIT_API GtkTargetList*
188 webkit_web_view_get_paste_target_list (WebKitWebView* web_view);
189
190 WEBKIT_API void
191 webkit_web_view_set_settings (WebKitWebView* web_view, WebKitWebSettings* settings);
192
193 WEBKIT_API WebKitWebSettings*
194 webkit_web_view_get_settings (WebKitWebView* web_view);
195
196 G_END_DECLS
197
198 #endif

Properties

Name Value
svn:eol-style native
svn:keywords Author Date ID Revision

  ViewVC Help
Powered by ViewVC 1.1.23