File: WebKitWebView.h.in

package info (click to toggle)
webkit2gtk 2.42.2-1~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 362,452 kB
  • sloc: cpp: 2,881,971; javascript: 282,447; ansic: 134,088; python: 43,789; ruby: 18,308; perl: 15,872; asm: 14,389; xml: 4,395; yacc: 2,350; sh: 2,074; java: 1,734; lex: 1,323; makefile: 288; pascal: 60
file content (896 lines) | stat: -rw-r--r-- 42,821 bytes parent folder | download | duplicates (2)
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
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
/*
 * Copyright (C) 2007 Holger Hans Peter Freyther
 * Copyright (C) 2007, 2008 Alp Toker <alp@atoker.com>
 * Copyright (C) 2008 Collabora Ltd.
 * Copyright (C) 2011, 2017 Igalia S.L.
 * Portions Copyright (c) 2011 Motorola Mobility, Inc.  All rights reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

@API_SINGLE_HEADER_CHECK@

#ifndef WebKitWebView_h
#define WebKitWebView_h

#include <@API_INCLUDE_PREFIX@/WebKitAuthenticationRequest.h>
#include <@API_INCLUDE_PREFIX@/WebKitBackForwardList.h>
#include <@API_INCLUDE_PREFIX@/WebKitContextMenu.h>
#include <@API_INCLUDE_PREFIX@/WebKitDefines.h>
#include <@API_INCLUDE_PREFIX@/WebKitEditorState.h>
#include <@API_INCLUDE_PREFIX@/WebKitFileChooserRequest.h>
#include <@API_INCLUDE_PREFIX@/WebKitFindController.h>
#include <@API_INCLUDE_PREFIX@/WebKitFormSubmissionRequest.h>
#include <@API_INCLUDE_PREFIX@/WebKitHitTestResult.h>
#include <@API_INCLUDE_PREFIX@/WebKitInputMethodContext.h>
#if !ENABLE(2022_GLIB_API)
#include <@API_INCLUDE_PREFIX@/WebKitJavascriptResult.h>
#endif
#include <@API_INCLUDE_PREFIX@/WebKitNavigationAction.h>
#include <@API_INCLUDE_PREFIX@/WebKitNotification.h>
#include <@API_INCLUDE_PREFIX@/WebKitOptionMenu.h>
#include <@API_INCLUDE_PREFIX@/WebKitPermissionRequest.h>
#include <@API_INCLUDE_PREFIX@/WebKitPermissionStateQuery.h>
#include <@API_INCLUDE_PREFIX@/WebKitPolicyDecision.h>
#include <@API_INCLUDE_PREFIX@/WebKitScriptDialog.h>
#include <@API_INCLUDE_PREFIX@/WebKitSettings.h>
#include <@API_INCLUDE_PREFIX@/WebKitURIRequest.h>
#include <@API_INCLUDE_PREFIX@/WebKitUserContentManager.h>
#include <@API_INCLUDE_PREFIX@/WebKitUserMessage.h>
#include <@API_INCLUDE_PREFIX@/WebKitWebContext.h>
#include <@API_INCLUDE_PREFIX@/WebKitWebResource.h>
#include <@API_INCLUDE_PREFIX@/WebKitWebViewSessionState.h>
#include <@API_INCLUDE_PREFIX@/WebKitWebsitePolicies.h>
#include <@API_INCLUDE_PREFIX@/WebKitWindowProperties.h>

#if ENABLE(2022_GLIB_API)
#include <@API_INCLUDE_PREFIX@/WebKitNetworkSession.h>
#endif

#if PLATFORM(GTK)
#if !ENABLE(2022_GLIB_API)
#include <JavaScriptCore/JSBase.h>
#endif
#include <webkit/WebKitColorChooserRequest.h>
#include <webkit/WebKitWebInspector.h>
#include <webkit/WebKitWebViewBase.h>
#elif PLATFORM(WPE)
#include <wpe/WebKitColor.h>
#include <wpe/WebKitRectangle.h>
#include <wpe/WebKitWebViewBackend.h>
#endif

G_BEGIN_DECLS

#define WEBKIT_TYPE_WEB_VIEW            (webkit_web_view_get_type())
#if !ENABLE(2022_GLIB_API)
#define WEBKIT_WEB_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_WEB_VIEW, WebKitWebView))
#define WEBKIT_IS_WEB_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_WEB_VIEW))
#define WEBKIT_WEB_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_WEB_VIEW, WebKitWebViewClass))
#define WEBKIT_IS_WEB_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_WEB_VIEW))
#define WEBKIT_WEB_VIEW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_WEB_VIEW, WebKitWebViewClass))
#endif

#if PLATFORM(GTK)
WEBKIT_DECLARE_DERIVABLE_TYPE (WebKitWebView, webkit_web_view, WEBKIT, WEB_VIEW, WebKitWebViewBase)
#elif PLATFORM(WPE)
WEBKIT_DECLARE_DERIVABLE_TYPE (WebKitWebView, webkit_web_view, WEBKIT, WEB_VIEW, GObject)
#else
#endif

typedef struct _WebKitPrintOperation WebKitPrintOperation;

/**
 * WebKitPolicyDecisionType:
 * @WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION: This type of policy decision
 *   is requested when WebKit is about to navigate to a new page in either the
 *   main frame or a subframe. Acceptable policy decisions are either
 *   webkit_policy_decision_use() or webkit_policy_decision_ignore(). This
 *   type of policy decision is always a #WebKitNavigationPolicyDecision.
 * @WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION: This type of policy decision
 *   is requested when WebKit is about to create a new window. Acceptable policy
 *   decisions are either webkit_policy_decision_use() or
 *   webkit_policy_decision_ignore(). This type of policy decision is always
 *   a #WebKitNavigationPolicyDecision. These decisions are useful for implementing
 *   special actions for new windows, such as forcing the new window to open
 *   in a tab when a keyboard modifier is active or handling a special
 *   target attribute on <a> elements.
 * @WEBKIT_POLICY_DECISION_TYPE_RESPONSE: This type of decision is used when WebKit has
 *   received a response for a network resource and is about to start the load.
 *   Note that these resources include all subresources of a page such as images
 *   and stylesheets as well as main documents. Appropriate policy responses to
 *   this decision are webkit_policy_decision_use(), webkit_policy_decision_ignore(),
 *   or webkit_policy_decision_download(). This type of policy decision is always
 *   a #WebKitResponsePolicyDecision. This decision is useful for forcing
 *   some types of resources to be downloaded rather than rendered in the WebView
 *   or to block the transfer of resources entirely.
 *
 * Enum values used for determining the type of a policy decision during
 * #WebKitWebView::decide-policy.
 */
typedef enum {
    WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION,
    WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION,
    WEBKIT_POLICY_DECISION_TYPE_RESPONSE,
} WebKitPolicyDecisionType;

/**
 * WebKitLoadEvent:
 * @WEBKIT_LOAD_STARTED: A new load request has been made.
 * No data has been received yet, empty structures have
 * been allocated to perform the load; the load may still
 * fail due to transport issues such as not being able to
 * resolve a name, or connect to a port.
 * @WEBKIT_LOAD_REDIRECTED: A provisional data source received
 * a server redirect.
 * @WEBKIT_LOAD_COMMITTED: The content started arriving for a page load.
 * The necessary transport requirements are established, and the
 * load is being performed.
 * @WEBKIT_LOAD_FINISHED: Load completed. All resources are done loading
 * or there was an error during the load operation.
 *
 * Enum values used to denote the different events that happen during a
 * #WebKitWebView load operation.
 */
typedef enum {
    WEBKIT_LOAD_STARTED,
    WEBKIT_LOAD_REDIRECTED,
    WEBKIT_LOAD_COMMITTED,
    WEBKIT_LOAD_FINISHED
} WebKitLoadEvent;

/**
 * WebKitSaveMode:
 * @WEBKIT_SAVE_MODE_MHTML: Save the current page using the MHTML format.
 *
 * Enum values to specify the different ways in which a #WebKitWebView
 * can save its current web page into a self-contained file.
 */
typedef enum {
    WEBKIT_SAVE_MODE_MHTML
} WebKitSaveMode;

/**
 * WebKitInsecureContentEvent:
 * @WEBKIT_INSECURE_CONTENT_RUN: Insecure content has been detected by
 * trying to execute any kind of logic (e.g. a script) from an
 * untrusted source.
 * @WEBKIT_INSECURE_CONTENT_DISPLAYED: Insecure content has been
 * detected by trying to display any kind of resource (e.g. an image)
 * from an untrusted source.
 *
 * Enum values used to denote the different events which can trigger
 * the detection of insecure content.
 */
typedef enum {
    WEBKIT_INSECURE_CONTENT_RUN,
    WEBKIT_INSECURE_CONTENT_DISPLAYED
} WebKitInsecureContentEvent;

#if PLATFORM(GTK)
/**
 * WebKitSnapshotOptions:
 * @WEBKIT_SNAPSHOT_OPTIONS_NONE: Do not include any special options.
 * @WEBKIT_SNAPSHOT_OPTIONS_INCLUDE_SELECTION_HIGHLIGHTING: Whether to include in the
 * snapshot the highlight of the selected content.
 * @WEBKIT_SNAPSHOT_OPTIONS_TRANSPARENT_BACKGROUND: Do not fill the background with white before
 * rendering the snapshot. Since 2.8
 *
 * Enum values used to specify options when taking a snapshot
 * from a #WebKitWebView.
 */
typedef enum {
  WEBKIT_SNAPSHOT_OPTIONS_NONE = 0,
  WEBKIT_SNAPSHOT_OPTIONS_INCLUDE_SELECTION_HIGHLIGHTING = 1 << 0,
  WEBKIT_SNAPSHOT_OPTIONS_TRANSPARENT_BACKGROUND = 1 << 1,
} WebKitSnapshotOptions;

/**
 * WebKitSnapshotRegion:
 * @WEBKIT_SNAPSHOT_REGION_VISIBLE: Specifies a snapshot only for the area that is
 * visible in the webview
 * @WEBKIT_SNAPSHOT_REGION_FULL_DOCUMENT: A snapshot of the entire document.
 *
 * Enum values used to specify the region from which to get a #WebKitWebView
 * snapshot
 */
typedef enum {
  WEBKIT_SNAPSHOT_REGION_VISIBLE = 0,
  WEBKIT_SNAPSHOT_REGION_FULL_DOCUMENT,
} WebKitSnapshotRegion;
#endif

/**
 * WebKitWebProcessTerminationReason:
 * @WEBKIT_WEB_PROCESS_CRASHED: the web process crashed.
 * @WEBKIT_WEB_PROCESS_EXCEEDED_MEMORY_LIMIT: the web process exceeded the memory limit.
 * @WEBKIT_WEB_PROCESS_TERMINATED_BY_API: the web process termination was requested by an API call. Since: 2.34
 *
 * Enum values used to specify the reason why the web process terminated abnormally.
 *
 * Since: 2.20
 */
typedef enum {
    WEBKIT_WEB_PROCESS_CRASHED,
    WEBKIT_WEB_PROCESS_EXCEEDED_MEMORY_LIMIT,
    WEBKIT_WEB_PROCESS_TERMINATED_BY_API
} WebKitWebProcessTerminationReason;

/**
 * WebKitMediaCaptureState:
 * @WEBKIT_MEDIA_CAPTURE_STATE_NONE: Media capture is disabled.
 * @WEBKIT_MEDIA_CAPTURE_STATE_ACTIVE: Media capture is active.
 * @WEBKIT_MEDIA_CAPTURE_STATE_MUTED: Media capture is muted.
 *
 * Enum values used to specify the capture state of a media device.
 *
 * Since: 2.34
 */
typedef enum {
    WEBKIT_MEDIA_CAPTURE_STATE_NONE,
    WEBKIT_MEDIA_CAPTURE_STATE_ACTIVE,
    WEBKIT_MEDIA_CAPTURE_STATE_MUTED,
} WebKitMediaCaptureState;

/**
 * WebKitWebExtensionMode:
 * @WEBKIT_WEB_EXTENSION_MODE_NONE: Not for an extension.
 * @WEBKIT_WEB_EXTENSION_MODE_MANIFESTV2: For a ManifestV2 extension.
 * @WEBKIT_WEB_EXTENSION_MODE_MANIFESTV3: For a ManifestV3 extension.
 *
 * Enum values used for setting if a #WebKitWebView is intended for
 * WebExtensions.
 *
 * Since: 2.38
 */
typedef enum {
    WEBKIT_WEB_EXTENSION_MODE_NONE,
    WEBKIT_WEB_EXTENSION_MODE_MANIFESTV2,
    WEBKIT_WEB_EXTENSION_MODE_MANIFESTV3,
} WebKitWebExtensionMode;

#if PLATFORM(WPE)
/**
 * WebKitFrameDisplayedCallback:
 * @web_view: a #WebKitWebView
 * @user_data: user data
 *
 * Callback to be called when a frame is displayed in a #WebKitWebView.
 *
 * Since: 2.24
 */
typedef void (* WebKitFrameDisplayedCallback) (WebKitWebView *web_view,
                                               gpointer       user_data);
#endif

struct _WebKitWebViewClass {
#if PLATFORM(GTK)
    WebKitWebViewBaseClass parent;
#elif PLATFORM(WPE)
    GObjectClass parent;
#endif

    /*< public >*/
    void       (* load_changed)                (WebKitWebView               *web_view,
                                                WebKitLoadEvent              load_event);
    gboolean   (* load_failed)                 (WebKitWebView               *web_view,
                                                WebKitLoadEvent              load_event,
                                                const gchar                 *failing_uri,
                                                GError                      *error);

#if PLATFORM(GTK)
    GtkWidget *(* create)                      (WebKitWebView               *web_view,
                                                WebKitNavigationAction      *navigation_action);
#elif PLATFORM(WPE)
    WebKitWebView *(* create)                  (WebKitWebView               *web_view,
                                                WebKitNavigationAction      *navigation_action);
#endif

    void       (* ready_to_show)               (WebKitWebView               *web_view);
    void       (* run_as_modal)                (WebKitWebView               *web_view);
    void       (* close)                       (WebKitWebView               *web_view);

    gboolean   (* script_dialog)               (WebKitWebView               *web_view,
                                                WebKitScriptDialog          *dialog)  ;

    gboolean   (* decide_policy)               (WebKitWebView               *web_view,
                                                WebKitPolicyDecision        *decision,
                                                WebKitPolicyDecisionType     type);
    gboolean   (* permission_request)          (WebKitWebView               *web_view,
                                                WebKitPermissionRequest     *permission_request);
    void       (* mouse_target_changed)        (WebKitWebView               *web_view,
                                                WebKitHitTestResult         *hit_test_result,
                                                guint                        modifiers);

#if PLATFORM(GTK)
    gboolean   (* print)                       (WebKitWebView               *web_view,
                                                WebKitPrintOperation        *print_operation);
#endif

    void       (* resource_load_started)       (WebKitWebView               *web_view,
                                                WebKitWebResource           *resource,
                                                WebKitURIRequest            *request);
    gboolean   (* enter_fullscreen)            (WebKitWebView               *web_view);
    gboolean   (* leave_fullscreen)            (WebKitWebView               *web_view);
    gboolean   (* run_file_chooser)            (WebKitWebView               *web_view,
                                                WebKitFileChooserRequest    *request);

    gboolean   (* context_menu)                (WebKitWebView               *web_view,
                                                WebKitContextMenu           *context_menu,
#if !ENABLE(2022_GLIB_API)
#if PLATFORM(GTK)
                                                GdkEvent                    *event,
#elif PLATFORM(WPE)
                                                void                        *event,
#endif
#endif
                                                WebKitHitTestResult         *hit_test_result);

    void       (* context_menu_dismissed)      (WebKitWebView               *web_view);
    void       (* submit_form)                 (WebKitWebView               *web_view,
                                                WebKitFormSubmissionRequest *request);
    void       (* insecure_content_detected)   (WebKitWebView               *web_view,
                                                WebKitInsecureContentEvent   event);
    gboolean   (* web_process_crashed)         (WebKitWebView               *web_view);

    gboolean   (* authenticate)                (WebKitWebView               *web_view,
                                                WebKitAuthenticationRequest *request);
    gboolean   (* load_failed_with_tls_errors) (WebKitWebView               *web_view,
                                                const gchar                 *failing_uri,
                                                GTlsCertificate             *certificate,
                                                GTlsCertificateFlags         errors);
    gboolean   (* show_notification)           (WebKitWebView               *web_view,
                                                WebKitNotification          *notification);

#if PLATFORM(GTK)
    gboolean   (* run_color_chooser)           (WebKitWebView               *web_view,
                                                WebKitColorChooserRequest   *request);
    gboolean   (* show_option_menu)            (WebKitWebView               *web_view,
                                                WebKitOptionMenu            *menu,
#if !USE(GTK4)
                                                GdkEvent                    *event,
#endif
                                                GdkRectangle                *rectangle);
#endif

    void       (* web_process_terminated)      (WebKitWebView               *web_view,
                                                WebKitWebProcessTerminationReason reason);
    gboolean   (* user_message_received)       (WebKitWebView               *web_view,
                                                WebKitUserMessage           *message);

#if PLATFORM(WPE)
    gboolean   (* show_option_menu)            (WebKitWebView               *web_view,
                                                WebKitOptionMenu            *menu,
                                                WebKitRectangle             *rectangle);
#endif

    gboolean   (* query_permission_state)      (WebKitWebView               *web_view,
                                                WebKitPermissionStateQuery  *query);

#if PLATFORM(WPE) && !ENABLE(2022_GLIB_API)
    /*< private >*/
    void (*_webkit_reserved0) (void);
    void (*_webkit_reserved1) (void);
    void (*_webkit_reserved2) (void);
    void (*_webkit_reserved3) (void);
    void (*_webkit_reserved4) (void);
#endif

#if ENABLE(2022_GLIB_API)
    /*< private >*/
    void (*_webkit_reserved0)  (void);
    void (*_webkit_reserved1)  (void);
    void (*_webkit_reserved2)  (void);
    void (*_webkit_reserved3)  (void);
    void (*_webkit_reserved4)  (void);
    void (*_webkit_reserved5)  (void);
    void (*_webkit_reserved6)  (void);
    void (*_webkit_reserved7)  (void);
    void (*_webkit_reserved8)  (void);
    void (*_webkit_reserved9)  (void);
    void (*_webkit_reserved10) (void);
    void (*_webkit_reserved11) (void);
    void (*_webkit_reserved12) (void);
    void (*_webkit_reserved13) (void);
    void (*_webkit_reserved14) (void);
    void (*_webkit_reserved15) (void);
    void (*_webkit_reserved16) (void);
    void (*_webkit_reserved17) (void);
    void (*_webkit_reserved18) (void);
    void (*_webkit_reserved19) (void);
    void (*_webkit_reserved20) (void);
    void (*_webkit_reserved21) (void);
    void (*_webkit_reserved22) (void);
    void (*_webkit_reserved23) (void);
    void (*_webkit_reserved24) (void);
    void (*_webkit_reserved25) (void);
    void (*_webkit_reserved26) (void);
    void (*_webkit_reserved27) (void);
    void (*_webkit_reserved28) (void);
    void (*_webkit_reserved29) (void);
    void (*_webkit_reserved30) (void);
#endif
};

#if PLATFORM(GTK)
WEBKIT_API GtkWidget *
webkit_web_view_new                                  (void);

#if !ENABLE(2022_GLIB_API)
WEBKIT_API GtkWidget *
webkit_web_view_new_with_related_view                (WebKitWebView             *web_view);

WEBKIT_API GtkWidget *
webkit_web_view_new_with_context                     (WebKitWebContext          *context);

WEBKIT_API GtkWidget *
webkit_web_view_new_with_settings                    (WebKitSettings            *settings);

WEBKIT_API GtkWidget *
webkit_web_view_new_with_user_content_manager        (WebKitUserContentManager  *user_content_manager);
#endif
#endif

#if PLATFORM(WPE)
WEBKIT_API WebKitWebView *
webkit_web_view_new                                  (WebKitWebViewBackend      *backend);

#if !ENABLE(2022_GLIB_API)
WEBKIT_API WebKitWebView *
webkit_web_view_new_with_related_view                (WebKitWebViewBackend      *backend,
                                                      WebKitWebView             *web_view);

WEBKIT_API WebKitWebView *
webkit_web_view_new_with_context                     (WebKitWebViewBackend      *backend,
                                                      WebKitWebContext          *context);

WEBKIT_API WebKitWebView *
webkit_web_view_new_with_settings                    (WebKitWebViewBackend      *backend,
                                                      WebKitSettings            *settings);

WEBKIT_API WebKitWebView *
webkit_web_view_new_with_user_content_manager        (WebKitWebViewBackend      *backend,
                                                      WebKitUserContentManager  *user_content_manager);
#endif

WEBKIT_API WebKitWebViewBackend *
webkit_web_view_get_backend                          (WebKitWebView             *web_view);
#endif

#if !ENABLE(2022_GLIB_API)
WEBKIT_API gboolean
webkit_web_view_is_ephemeral                         (WebKitWebView             *web_view);
#endif

WEBKIT_API gboolean
webkit_web_view_is_controlled_by_automation          (WebKitWebView             *web_view);

WEBKIT_API WebKitAutomationBrowsingContextPresentation
webkit_web_view_get_automation_presentation_type     (WebKitWebView             *web_view);

#if ENABLE(2022_GLIB_API)
WEBKIT_API WebKitNetworkSession *
webkit_web_view_get_network_session                  (WebKitWebView             *web_view);
#else
WEBKIT_API WebKitWebsiteDataManager *
webkit_web_view_get_website_data_manager             (WebKitWebView             *web_view);
#endif

WEBKIT_API WebKitWebContext *
webkit_web_view_get_context                          (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_try_close                            (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_load_uri                             (WebKitWebView             *web_view,
                                                      const gchar               *uri);

WEBKIT_API void
webkit_web_view_load_html                            (WebKitWebView             *web_view,
                                                      const gchar               *content,
                                                      const gchar               *base_uri);
WEBKIT_API void
webkit_web_view_load_alternate_html                  (WebKitWebView             *web_view,
                                                      const gchar               *content,
                                                      const gchar               *content_uri,
                                                      const gchar               *base_uri);
WEBKIT_API void
webkit_web_view_load_plain_text                      (WebKitWebView             *web_view,
                                                      const gchar               *plain_text);

WEBKIT_API void
webkit_web_view_load_bytes                           (WebKitWebView             *web_view,
                                                      GBytes                    *bytes,
                                                      const gchar               *mime_type,
                                                      const gchar               *encoding,
                                                      const gchar               *base_uri);

WEBKIT_API void
webkit_web_view_load_request                         (WebKitWebView             *web_view,
                                                      WebKitURIRequest          *request);

WEBKIT_API void
webkit_web_view_stop_loading                         (WebKitWebView             *web_view);

WEBKIT_API gboolean
webkit_web_view_is_loading                           (WebKitWebView             *web_view);

WEBKIT_API gboolean
webkit_web_view_is_playing_audio                     (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_set_is_muted                         (WebKitWebView             *web_view,
                                                      gboolean                   muted);

WEBKIT_API gboolean
webkit_web_view_get_is_muted                         (WebKitWebView             *web_view);

WEBKIT_API guint64
webkit_web_view_get_page_id                          (WebKitWebView             *web_view);

WEBKIT_API const gchar *
webkit_web_view_get_title                            (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_reload                               (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_reload_bypass_cache                  (WebKitWebView             *web_view);

WEBKIT_API gdouble
webkit_web_view_get_estimated_load_progress          (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_go_back                              (WebKitWebView             *web_view);

WEBKIT_API gboolean
webkit_web_view_can_go_back                          (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_go_forward                           (WebKitWebView             *web_view);

WEBKIT_API gboolean
webkit_web_view_can_go_forward                       (WebKitWebView             *web_view);

WEBKIT_API WebKitBackForwardList *
webkit_web_view_get_back_forward_list                (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_go_to_back_forward_list_item         (WebKitWebView             *web_view,
                                                      WebKitBackForwardListItem *list_item);
WEBKIT_API const gchar *
webkit_web_view_get_uri                              (WebKitWebView             *web_view);

#if PLATFORM(GTK)
#if USE(GTK4)
WEBKIT_API GdkTexture *
webkit_web_view_get_favicon                          (WebKitWebView             *web_view);
#else
WEBKIT_API cairo_surface_t *
webkit_web_view_get_favicon                          (WebKitWebView             *web_view);
#endif
#endif

WEBKIT_API const gchar *
webkit_web_view_get_custom_charset                   (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_set_custom_charset                   (WebKitWebView             *web_view,
                                                      const gchar               *charset);

WEBKIT_API void
webkit_web_view_set_settings                         (WebKitWebView             *web_view,
                                                      WebKitSettings            *settings);

WEBKIT_API WebKitSettings *
webkit_web_view_get_settings                         (WebKitWebView             *web_view);

WEBKIT_API WebKitWindowProperties *
webkit_web_view_get_window_properties                (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_set_zoom_level                       (WebKitWebView             *web_view,
                                                      gdouble                    zoom_level);
WEBKIT_API gdouble
webkit_web_view_get_zoom_level                       (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_can_execute_editing_command          (WebKitWebView             *web_view,
                                                      const gchar               *command,
                                                      GCancellable              *cancellable,
                                                      GAsyncReadyCallback        callback,
                                                      gpointer                   user_data);

WEBKIT_API gboolean
webkit_web_view_can_execute_editing_command_finish   (WebKitWebView             *web_view,
                                                      GAsyncResult              *result,
                                                      GError                   **error);

WEBKIT_API void
webkit_web_view_execute_editing_command              (WebKitWebView             *web_view,
                                                      const gchar               *command);

WEBKIT_API void
webkit_web_view_execute_editing_command_with_argument(WebKitWebView             *web_view,
                                                      const char                *command,
                                                      const char                *argument);

WEBKIT_API WebKitFindController *
webkit_web_view_get_find_controller                  (WebKitWebView             *web_view);

#if PLATFORM(GTK) && !ENABLE(2022_GLIB_API)
WEBKIT_DEPRECATED JSGlobalContextRef
webkit_web_view_get_javascript_global_context        (WebKitWebView             *web_view);
#endif

WEBKIT_API void
webkit_web_view_evaluate_javascript                  (WebKitWebView             *web_view,
                                                      const char                *script,
                                                      gssize                     length,
                                                      const char                *world_name,
                                                      const char                *source_uri,
                                                      GCancellable              *cancellable,
                                                      GAsyncReadyCallback        callback,
                                                      gpointer                   user_data);

WEBKIT_API JSCValue *
webkit_web_view_evaluate_javascript_finish           (WebKitWebView             *web_view,
                                                      GAsyncResult              *result,
                                                      GError                   **error);

WEBKIT_API void
webkit_web_view_call_async_javascript_function       (WebKitWebView             *web_view,
                                                      const char                *body,
                                                      gssize                     length,
                                                      GVariant                  *arguments,
                                                      const char                *world_name,
                                                      const char                *source_uri,
                                                      GCancellable              *cancellable,
                                                      GAsyncReadyCallback        callback,
                                                      gpointer                   user_data);

WEBKIT_API JSCValue *
webkit_web_view_call_async_javascript_function_finish(WebKitWebView             *web_view,
                                                      GAsyncResult              *result,
                                                      GError                   **error);

#if !ENABLE(2022_GLIB_API)
WEBKIT_DEPRECATED_FOR(webkit_web_view_evaluate_javascript) void
webkit_web_view_run_javascript                       (WebKitWebView             *web_view,
                                                      const gchar               *script,
                                                      GCancellable              *cancellable,
                                                      GAsyncReadyCallback        callback,
                                                      gpointer                   user_data);
WEBKIT_DEPRECATED_FOR(webkit_web_view_evaluate_javascript_finish) WebKitJavascriptResult *
webkit_web_view_run_javascript_finish                (WebKitWebView             *web_view,
                                                      GAsyncResult              *result,
                                                      GError                   **error);

WEBKIT_DEPRECATED_FOR(webkit_web_view_evaluate_javascript) void
webkit_web_view_run_javascript_in_world              (WebKitWebView             *web_view,
                                                      const gchar               *script,
                                                      const gchar               *world_name,
                                                      GCancellable              *cancellable,
                                                      GAsyncReadyCallback        callback,
                                                      gpointer                   user_data);
WEBKIT_DEPRECATED_FOR(webkit_web_view_evaluate_javascript_finish) WebKitJavascriptResult *
webkit_web_view_run_javascript_in_world_finish       (WebKitWebView             *web_view,
                                                      GAsyncResult              *result,
                                                      GError                   **error);

WEBKIT_DEPRECATED_FOR(webkit_web_view_call_async_javascript_function) void
webkit_web_view_run_async_javascript_function_in_world (WebKitWebView           *web_view,
                                                        const gchar             *body,
                                                        GVariant                *arguments,
                                                        const char              *world_name,
                                                        GCancellable            *cancellable,
                                                        GAsyncReadyCallback      callback,
                                                        gpointer                 user_data);

WEBKIT_DEPRECATED_FOR(webkit_web_view_evaluate_javascript) void
webkit_web_view_run_javascript_from_gresource        (WebKitWebView             *web_view,
                                                      const gchar               *resource,
                                                      GCancellable              *cancellable,
                                                      GAsyncReadyCallback        callback,
                                                      gpointer                   user_data);

WEBKIT_DEPRECATED_FOR(webkit_web_view_evaluate_javascript_finish) WebKitJavascriptResult *
webkit_web_view_run_javascript_from_gresource_finish (WebKitWebView             *web_view,
                                                      GAsyncResult              *result,
                                                      GError                   **error);
#endif

WEBKIT_API WebKitWebResource *
webkit_web_view_get_main_resource                    (WebKitWebView             *web_view);

#if PLATFORM(GTK)
WEBKIT_API WebKitWebInspector *
webkit_web_view_get_inspector                        (WebKitWebView             *web_view);
#endif

WEBKIT_API gboolean
webkit_web_view_can_show_mime_type                   (WebKitWebView             *web_view,
                                                      const gchar               *mime_type);

WEBKIT_API void
webkit_web_view_save                                 (WebKitWebView             *web_view,
                                                      WebKitSaveMode             save_mode,
                                                      GCancellable              *cancellable,
                                                      GAsyncReadyCallback        callback,
                                                      gpointer                   user_data);

WEBKIT_API GInputStream *
webkit_web_view_save_finish                          (WebKitWebView             *web_view,
                                                      GAsyncResult              *result,
                                                      GError                   **error);

WEBKIT_API void
webkit_web_view_save_to_file                         (WebKitWebView             *web_view,
                                                      GFile                     *file,
                                                      WebKitSaveMode             save_mode,
                                                      GCancellable              *cancellable,
                                                      GAsyncReadyCallback        callback,
                                                      gpointer                   user_data);

WEBKIT_API gboolean
webkit_web_view_save_to_file_finish                  (WebKitWebView             *web_view,
                                                      GAsyncResult              *result,
                                                      GError                   **error);

WEBKIT_API WebKitDownload *
webkit_web_view_download_uri                         (WebKitWebView             *web_view,
                                                      const char                *uri);

WEBKIT_API gboolean
webkit_web_view_get_tls_info                         (WebKitWebView             *web_view,
                                                      GTlsCertificate          **certificate,
                                                      GTlsCertificateFlags      *errors);

#if PLATFORM(GTK)
WEBKIT_API void
webkit_web_view_get_snapshot                         (WebKitWebView             *web_view,
                                                      WebKitSnapshotRegion       region,
                                                      WebKitSnapshotOptions      options,
                                                      GCancellable              *cancellable,
                                                      GAsyncReadyCallback        callback,
                                                      gpointer                   user_data);
#if USE(GTK4)
WEBKIT_API GdkTexture *
webkit_web_view_get_snapshot_finish                  (WebKitWebView             *web_view,
                                                      GAsyncResult              *result,
                                                      GError                   **error);
#else
WEBKIT_API cairo_surface_t *
webkit_web_view_get_snapshot_finish                  (WebKitWebView             *web_view,
                                                      GAsyncResult              *result,
                                                      GError                   **error);
#endif
#endif

WEBKIT_API WebKitUserContentManager *
webkit_web_view_get_user_content_manager             (WebKitWebView             *web_view);

#if PLATFORM(GTK)
WEBKIT_API void
webkit_web_view_set_background_color                 (WebKitWebView             *web_view,
                                                      const GdkRGBA             *rgba);

WEBKIT_API void
webkit_web_view_get_background_color                 (WebKitWebView             *web_view,
                                                      GdkRGBA                   *rgba);
#endif

#if PLATFORM(WPE)
WEBKIT_API void
webkit_web_view_set_background_color                 (WebKitWebView               *web_view,
                                                      WebKitColor                 *color);
WEBKIT_API void
webkit_web_view_get_background_color                 (WebKitWebView               *web_view,
                                                      WebKitColor                 *color);
#endif

WEBKIT_API gboolean
webkit_web_view_is_editable                          (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_set_editable                         (WebKitWebView             *web_view,
                                                      gboolean                  editable);

WEBKIT_API WebKitEditorState *
webkit_web_view_get_editor_state                     (WebKitWebView             *web_view);

WEBKIT_API WebKitWebViewSessionState *
webkit_web_view_get_session_state                    (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_restore_session_state                (WebKitWebView             *web_view,
                                                      WebKitWebViewSessionState *state);

#if PLATFORM(WPE)
WEBKIT_API guint
webkit_web_view_add_frame_displayed_callback         (WebKitWebView               *web_view,
                                                      WebKitFrameDisplayedCallback callback,
                                                      gpointer                     user_data,
                                                      GDestroyNotify               destroy_notify);

WEBKIT_API void
webkit_web_view_remove_frame_displayed_callback      (WebKitWebView               *web_view,
                                                      guint                        id);
#endif

WEBKIT_API void
webkit_web_view_send_message_to_page                 (WebKitWebView             *web_view,
                                                      WebKitUserMessage         *message,
                                                      GCancellable              *cancellable,
                                                      GAsyncReadyCallback        callback,
                                                      gpointer                   user_data);

WEBKIT_API WebKitUserMessage *
webkit_web_view_send_message_to_page_finish          (WebKitWebView             *web_view,
                                                      GAsyncResult              *result,
                                                      GError                   **error);

WEBKIT_API void
webkit_web_view_set_input_method_context             (WebKitWebView             *web_view,
                                                      WebKitInputMethodContext  *context);

WEBKIT_API WebKitInputMethodContext *
webkit_web_view_get_input_method_context             (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_set_cors_allowlist                   (WebKitWebView             *web_view,
                                                      const gchar * const       *allowlist);

WEBKIT_API WebKitWebsitePolicies *
webkit_web_view_get_website_policies                 (WebKitWebView             *web_view);

WEBKIT_API gboolean
webkit_web_view_get_is_web_process_responsive        (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_terminate_web_process                (WebKitWebView             *web_view);

WEBKIT_API WebKitMediaCaptureState
webkit_web_view_get_camera_capture_state             (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_set_camera_capture_state             (WebKitWebView             *web_view,
                                                      WebKitMediaCaptureState    state);

WEBKIT_API WebKitMediaCaptureState
webkit_web_view_get_microphone_capture_state         (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_set_microphone_capture_state         (WebKitWebView             *web_view,
                                                      WebKitMediaCaptureState    state);

WEBKIT_API WebKitMediaCaptureState
webkit_web_view_get_display_capture_state            (WebKitWebView             *web_view);

WEBKIT_API void
webkit_web_view_set_display_capture_state            (WebKitWebView             *web_view,
                                                      WebKitMediaCaptureState    state);

WEBKIT_API WebKitWebExtensionMode
webkit_web_view_get_web_extension_mode               (WebKitWebView             *web_view);

WEBKIT_API const gchar*
webkit_web_view_get_default_content_security_policy  (WebKitWebView             *web_view);

G_END_DECLS

#endif