This repository was archived by the owner on May 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 239
Expand file tree
/
Copy pathIWebKitBrowser.cs
More file actions
415 lines (295 loc) · 12.4 KB
/
Copy pathIWebKitBrowser.cs
File metadata and controls
415 lines (295 loc) · 12.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
using System;
using System.Drawing;
using System.Drawing.Printing;
using System.Security.Cryptography.X509Certificates;
using System.Windows.Forms;
namespace WebKit
{
public interface IWebKitBrowser
{
/// <summary>
/// Occurs when the DocumentTitle property value changes.
/// </summary>
event EventHandler DocumentTitleChanged;
/// <summary>
/// Occurs when the WebKitBrowser control finishes loading a document.
/// </summary>
event WebBrowserDocumentCompletedEventHandler DocumentCompleted;
/// <summary>
/// Occurs when the WebKitBrowser control has navigated to a new document and has begun loading it.
/// </summary>
event WebBrowserNavigatedEventHandler Navigated;
/// <summary>
/// Occurs before the WebKitBrowser control navigates to a new document.
/// </summary>
event WebBrowserNavigatingEventHandler Navigating;
/// <summary>
/// Occurs when an error occurs on the current document, or when navigating to a new document.
/// </summary>
event WebKitBrowserErrorEventHandler Error;
/// <summary>
/// Occurs when the WebKitBrowser control begins a file download, before any data has been transferred.
/// </summary>
event FileDownloadBeginEventHandler DownloadBegin;
/// <summary>
/// Occurs when the WebKitBrowser control attempts to open a link in a new window.
/// </summary>
event NewWindowRequestEventHandler NewWindowRequest;
/// <summary>
/// Occurs when the WebKitBrowser control creates a new window.
/// </summary>
event NewWindowCreatedEventHandler NewWindowCreated;
/// <summary>
/// Occurs when JavaScript requests an alert panel to be displayed via the alert() function.
/// </summary>
event ShowJavaScriptAlertPanelEventHandler ShowJavaScriptAlertPanel;
/// <summary>
/// Occurs when JavaScript requests a confirm panel to be displayed via the confirm() function.
/// </summary>
event ShowJavaScriptConfirmPanelEventHandler ShowJavaScriptConfirmPanel;
/// <summary>
/// Occurs when JavaScript requests a prompt panel to be displayed via the prompt() function.
/// </summary>
event ShowJavaScriptPromptPanelEventHandler ShowJavaScriptPromptPanel;
/// <summary>
/// The current print page settings.
/// </summary>
PageSettings PageSettings { get; set; }
/// <summary>
/// Gets the title of the current document.
/// </summary>
string DocumentTitle { get; }
/// <summary>
/// Gets or sets the current Url.
/// </summary>
Uri Url { get; set; }
/// <summary>
/// Gets a value indicating whether a web page is currently being loaded.
/// </summary>
bool IsBusy { get; }
/// <summary>
/// Gets or sets the HTML content of the current document.
/// </summary>
string DocumentText { get; set; }
/// <summary>
/// Gets the currently selected text.
/// </summary>
string SelectedText { get; }
/// <summary>
/// Gets or sets the application name for the user agent.
/// </summary>
string ApplicationName { get; set; }
/// <summary>
/// Gets or sets the user agent string.
/// </summary>
string UserAgent { get; set; }
/// <summary>
/// Gets or sets the text size multiplier (1.0 is normal size).
/// </summary>
float TextSize { get; set; }
/// <summary>
/// Gets or sets whether the control can navigate to another page
/// once it's initial page has loaded.
/// </summary>
bool AllowNavigation { get; set; }
/// <summary>
/// Gets or sets whether to allow file downloads.
/// </summary>
bool AllowDownloads { get; set; }
/// <summary>
/// Gets or sets whether to allow links to be opened in a new window.
/// </summary>
bool AllowNewWindows { get; set; }
/// <summary>
/// Gets a value indicating whether a previous page in the navigation history is available.
/// </summary>
bool CanGoBack { get; }
/// <summary>
/// Gets a value indicating whether a subsequent page in the navigation history is available.
/// </summary>
bool CanGoForward { get; }
/// <summary>
/// Gets a Document representing the currently displayed page.
/// </summary>
DOM.Document Document { get; }
/// <summary>
/// Gets the current version.
/// </summary>
Version Version { get; }
/// <summary>
/// Gets or sets the scroll offset of the current page, in pixels from the origin.
/// </summary>
Point ScrollOffset { get; set; }
/// <summary>
/// Gets the visible content rectangle of the current view, in pixels.
/// </summary>
Rectangle VisibleContent { get; }
/// <summary>
/// Gets or sets a value indicating whether the context menu of the WebKitBrowser is enabled.
/// </summary>
bool WebBrowserContextMenuEnabled { get; set; }
/// <summary>
/// Gets or sets a value indicating whether JavaScript is enabled.
/// </summary>
bool ScriptingEnabled { get; set; }
/// <summary>
/// Gets or sets an object that can be accessed by JavaScript contained within the WebKitBrowser control.
/// </summary>
object ObjectForScripting { get; set; }
/// <summary>
/// Gets or sets a value indicating whether LocalStorage is enabled.
/// </summary>
bool LocalStorageEnabled { get; set; }
/// <summary>
/// Gets or sets the fully qualified path to the directory where
/// local storage database files will be stored.
/// </summary>
/// <remarks>Value must be a fully qualified directory path.</remarks>
string LocalStorageDatabaseDirectory { get; set; }
/// <summary>
/// Gets or sets a value indicating whether cross origin requests
/// from file:// URIs to other file:// URIs are allowed.
/// </summary>
bool AllowFileAccessFromFileURLs { get; set; }
/// <summary>
/// Gets or sets a value indicating how cookies are handled.
/// </summary>
CookieAcceptPolicy CookieAcceptPolicy { get; set; }
bool AllowAnimatedImages { get; set; }
X509Certificate ClientCertificate { get; set; }
/*bool AcceleratedCompositingEnabled { get; set; }
bool AllowAnimatedImageLooping { get; set; }
bool AllowContinuousSpellChecking { get; set; }
bool AllowUniversalFileAccessFromFileURLs { get; set; }
bool PluginsEnabled { get; set; }
bool AuthorAndUserStylesEnabled { get; set; }
bool DetectCacheModelAutomatically { get; set; }
bool Autosave { get; set; }
bool AVFoundationEnabled { get; set; }
object CacheModel { get; set; }
bool ContinuousSpellCheckingEnabled { get; set; }
string CursiveFontFamily { get; set; }
bool CustomDragCursorsEnabled { get; set; }
bool DatabasesEnabled { get; set; }
int DefaultFixedFontSize { get; set; }
int DefaultFontSize { get; set; }
string DefaultTextEncodingName { get; set; }
object EditableLinkBehavior { get; set; }
object EditingBehavior { get; set; }
bool NotificationsEnabled { get; set; }
string FantasyFontFamily { get; set; }
string FixedFontFamily { get; set; }
object FontSmoothing { get; set; }
float FontSmoothingContrast { get; set; }
bool GrammarCheckingEnabled { get; set; }
bool Hixie76WebSocketProtocolEnabled { get; set; }
bool HyperlinkAuditingEnabled { get; set; }
bool IconDatabaseEnabled { get; set; }
string IconDatabaseDirectory { get; set; }
bool ApplicationChromeModeEnabled { get; set; }
bool DNSPrefetchingEnabled { get; set; }
bool DOMPasteAllowed { get; set; }
bool FrameFlatteningEnabled { get; set; }
bool FullScreenEnabled { get; set; }
bool JavaEnabled { get; set; }
bool WebSecurityEnabled { get; set; }
bool XSSAuditorEnabled { get; set; }
bool JavaScriptCanAccessClipboard { get; set; }
bool JavaScriptCanOpenWindowsAutomatically { get; set; }
bool LoadImagesAutomatically { get; set; }
bool LoadSiteIconsIgnoringImageLoadingPreference { get; set; }
bool MediaPlaybackAllowsInline { get; set; }
bool MediaPlaybackRequiresUserGesture { get; set; }
bool MemoryInfoEnabled { get; set; }
int MinimumFontSize { get; set; }
int MinimumLogicalFontSize { get; set; }
bool OfflineWebApplicationCacheEnabled { get; set; }
string PictographFontFamily { get; set; }
bool PrivateBrowsingEnabled { get; set; }
string SansSerifFontFamily { get; set; }
string SerifFontFamily { get; set; }
bool DisplayCaptions { get; set; }
bool DisplaySubtitles { get; set; }
bool DisplayTextDescriptions { get; set; }
bool InvertColors { get; set; }
bool PaintNativeControls { get; set; }
bool PrintBackgrounds { get; set; }
bool HighResolutionTimersEnabled { get; set; }
bool ShowDebugBorders { get; set; }
bool ShowRepaintCounter { get; set; }
bool ShowTooltipOverTruncatedText { get; set; }
string StandardFontFamily { get; set; }
bool TabsToLinks { get; set; }
bool TextAreasAreResizable { get; set; }
bool UserStyleSheetEnabled { get; set; }
string UserStyleSheetLocation { get; set; }
bool PageCacheEnabled { get; set; }
bool ZoomsTextOnly { get; set; }*/
/// <summary>
/// Navigates to the specified Url.
/// </summary>
/// <param name="NewUrl">Url to navigate to.</param>
void Navigate(string NewUrl);
/// <summary>
/// Navigates to the previous page in the page history, if available.
/// </summary>
/// <returns>Success value.</returns>
bool GoBack();
/// <summary>
/// Navigates to the next page in the page history, if available.
/// </summary>
/// <returns>Success value.</returns>
bool GoForward();
/// <summary>
/// Reloads the current web page.
/// </summary>
void Reload();
/// <summary>
/// Reloads the current web page.
/// </summary>
/// <param name="Option">Options for reloading the page.</param>
void Reload(WebBrowserRefreshOption Option);
/// <summary>
/// Stops loading the current web page and any resources associated
/// with it.
/// </summary>
void Stop();
/// <summary>
/// Returns the result of running a script.
/// </summary>
/// <param name="Script">The script to run.</param>
/// <returns></returns>
string StringByEvaluatingJavaScriptFromString(string Script);
/// <summary>
/// Gets the underlying WebKit WebView object used by this instance of WebKitBrowser.
/// </summary>
/// <returns>The WebView object.</returns>
object GetWebView();
/// <summary>
/// Gets the script context for the WebView.
/// </summary>
/// <returns>A JSCore.JSContext object representing the script context.</returns>
object GetGlobalScriptContext();
/// <summary>
/// Prints the document using the current print and page settings.
/// </summary>
void Print();
/// <summary>
/// Displays a Page Setup dialog box with the current page and print settings.
/// </summary>
void ShowPageSetupDialog();
/// <summary>
/// Displays a Print dialog box.
/// </summary>
void ShowPrintDialog();
/// <summary>
/// Displays a Print Preview dialog box.
/// </summary>
void ShowPrintPreviewDialog();
/// <summary>
/// Gets the host.
/// </summary>
/// <value>The host.</value>
IWebKitBrowserHost Host { get; }
}
}