1/*
2 * Copyright (C) 2010-2017 Apple Inc. All rights reserved.
3 * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
18 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
24 * THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#ifndef WKBase_h
28#define WKBase_h
29
30#include <WebKit/WKDeclarationSpecifiers.h>
31#include <stdint.h>
32
33#if defined(BUILDING_GTK__)
34#include <WebKit/WKBaseGtk.h>
35#elif defined(BUILDING_WPE__)
36#include <WebKit/WKBaseWPE.h>
37#elif defined(__APPLE__)
38#include <WebKit/WKBaseMac.h>
39#elif defined(_WIN32)
40#include <WebKit/WKBaseWin.h>
41#endif
42
43/* WebKit2 shared types */
44
45typedef uint32_t WKTypeID;
46typedef const void* WKTypeRef;
47
48typedef const struct OpaqueWKArray* WKArrayRef;
49typedef struct OpaqueWKArray* WKMutableArrayRef;
50
51typedef const struct OpaqueWKDictionary* WKDictionaryRef;
52typedef struct OpaqueWKDictionary* WKMutableDictionaryRef;
53
54typedef const struct OpaqueWKBoolean* WKBooleanRef;
55typedef const struct OpaqueWKCertificateInfo* WKCertificateInfoRef;
56typedef const struct OpaqueWKConnection* WKConnectionRef;
57typedef const struct OpaqueWKContextMenuItem* WKContextMenuItemRef;
58typedef const struct OpaqueWKData* WKDataRef;
59typedef const struct OpaqueWKDouble* WKDoubleRef;
60typedef const struct OpaqueWKError* WKErrorRef;
61typedef const struct OpaqueWKGraphicsContext* WKGraphicsContextRef;
62typedef const struct OpaqueWKImage* WKImageRef;
63typedef const struct OpaqueWKPointRef* WKPointRef;
64typedef const struct OpaqueWKRectRef* WKRectRef;
65typedef const struct OpaqueWKRenderLayer* WKRenderLayerRef;
66typedef const struct OpaqueWKRenderObject* WKRenderObjectRef;
67typedef const struct OpaqueWKSecurityOrigin* WKSecurityOriginRef;
68typedef const struct OpaqueWKSerializedScriptValue* WKSerializedScriptValueRef;
69typedef const struct OpaqueWKSizeRef* WKSizeRef;
70typedef const struct OpaqueWKString* WKStringRef;
71typedef const struct OpaqueWKUInt64* WKUInt64Ref;
72typedef const struct OpaqueWKURL* WKURLRef;
73typedef const struct OpaqueWKURLRequest* WKURLRequestRef;
74typedef const struct OpaqueWKURLResponse* WKURLResponseRef;
75typedef const struct OpaqueWKUserContentURLPattern* WKUserContentURLPatternRef;
76typedef const struct OpaqueWKWebArchive* WKWebArchiveRef;
77typedef const struct OpaqueWKWebArchiveResource* WKWebArchiveResourceRef;
78
79/* WebKit2 main API types */
80
81typedef const struct OpaqueWKApplicationCacheManager* WKApplicationCacheManagerRef;
82typedef const struct OpaqueWKAuthenticationChallenge* WKAuthenticationChallengeRef;
83typedef const struct OpaqueWKAuthenticationDecisionListener* WKAuthenticationDecisionListenerRef;
84typedef const struct OpaqueWKBackForwardList* WKBackForwardListRef;
85typedef const struct OpaqueWKBackForwardListItem* WKBackForwardListItemRef;
86typedef const struct OpaqueWKResourceCacheManager* WKResourceCacheManagerRef;
87typedef const struct OpaqueWKColorPickerResultListener* WKColorPickerResultListenerRef;
88typedef const struct OpaqueWKContext* WKContextRef;
89typedef const struct OpaqueWKContextConfiguration* WKContextConfigurationRef;
90typedef const struct OpaqueWKContextMenuListener* WKContextMenuListenerRef;
91typedef const struct OpaqueWKCookieManager* WKCookieManagerRef;
92typedef const struct OpaqueWKCredential* WKCredentialRef;
93typedef const struct OpaqueWKDownload* WKDownloadRef;
94typedef const struct OpaqueWKFormSubmissionListener* WKFormSubmissionListenerRef;
95typedef const struct OpaqueWKFrameHandle* WKFrameHandleRef;
96typedef const struct OpaqueWKFrameInfo* WKFrameInfoRef;
97typedef const struct OpaqueWKFrame* WKFrameRef;
98typedef const struct OpaqueWKFramePolicyListener* WKFramePolicyListenerRef;
99typedef const struct OpaqueWKGeolocationManager* WKGeolocationManagerRef;
100typedef const struct OpaqueWKGeolocationPermissionRequest* WKGeolocationPermissionRequestRef;
101typedef const struct OpaqueWKGeolocationPosition* WKGeolocationPositionRef;
102typedef const struct OpaqueWKGrammarDetail* WKGrammarDetailRef;
103typedef const struct OpaqueWKHitTestResult* WKHitTestResultRef;
104typedef const struct OpaqueWKIconDatabase* WKIconDatabaseRef;
105typedef const struct OpaqueWKInspector* WKInspectorRef;
106typedef const struct OpaqueWKKeyValueStorageManager* WKKeyValueStorageManagerRef;
107typedef const struct OpaqueWKMediaSessionFocusManager* WKMediaSessionFocusManagerRef;
108typedef const struct OpaqueWKMediaSessionMetadata* WKMediaSessionMetadataRef;
109typedef const struct OpaqueWKNavigationAction* WKNavigationActionRef;
110typedef const struct OpaqueWKNavigationData* WKNavigationDataRef;
111typedef const struct OpaqueWKNavigation* WKNavigationRef;
112typedef const struct OpaqueWKNavigationResponse* WKNavigationResponseRef;
113typedef const struct OpaqueWKNotification* WKNotificationRef;
114typedef const struct OpaqueWKNotificationManager* WKNotificationManagerRef;
115typedef const struct OpaqueWKNotificationPermissionRequest* WKNotificationPermissionRequestRef;
116typedef const struct OpaqueWKNotificationProvider* WKNotificationProviderRef;
117typedef const struct OpaqueWKOpenPanelParameters* WKOpenPanelParametersRef;
118typedef const struct OpaqueWKOpenPanelResultListener* WKOpenPanelResultListenerRef;
119typedef const struct OpaqueWKPage* WKPageRef;
120typedef const struct OpaqueWKPageConfiguration* WKPageConfigurationRef;
121typedef const struct OpaqueWKPageGroup* WKPageGroupRef;
122typedef const struct OpaqueWKPreferences* WKPreferencesRef;
123typedef const struct OpaqueWKProtectionSpace* WKProtectionSpaceRef;
124typedef const struct OpaqueWKPageRunBeforeUnloadConfirmPanelResultListener* WKPageRunBeforeUnloadConfirmPanelResultListenerRef;
125typedef const struct OpaqueWKPageRunJavaScriptAlertResultListener* WKPageRunJavaScriptAlertResultListenerRef;
126typedef const struct OpaqueWKPageRunJavaScriptConfirmResultListener* WKPageRunJavaScriptConfirmResultListenerRef;
127typedef const struct OpaqueWKPageRunJavaScriptPromptResultListener* WKPageRunJavaScriptPromptResultListenerRef;
128typedef const struct OpaqueWKPageRequestStorageAccessConfirmResultListener* WKPageRequestStorageAccessConfirmResultListenerRef;
129typedef const struct OpaqueWKResourceLoadStatisticsManager* WKResourceLoadStatisticsManagerRef;
130typedef const struct OpaqueWKTextChecker* WKTextCheckerRef;
131typedef const struct OpaqueWKSession* WKSessionRef;
132typedef const struct OpaqueWKSessionState* WKSessionStateRef;
133typedef const struct OpaqueWKUserContentController* WKUserContentControllerRef;
134typedef const struct OpaqueWKUserContentExtensionStore* WKUserContentExtensionStoreRef;
135typedef const struct OpaqueWKUserContentFilter* WKUserContentFilterRef;
136typedef const struct OpaqueWKUserMediaPermissionCheck* WKUserMediaPermissionCheckRef;
137typedef const struct OpaqueWKUserMediaPermissionRequest* WKUserMediaPermissionRequestRef;
138typedef const struct OpaqueWKUserScript* WKUserScriptRef;
139typedef const struct OpaqueWKViewportAttributes* WKViewportAttributesRef;
140typedef const struct OpaqueWKWebsiteDataStore* WKWebsiteDataStoreRef;
141typedef const struct OpaqueWKWebsitePolicies* WKWebsitePoliciesRef;
142typedef const struct OpaqueWKWindowFeatures* WKWindowFeaturesRef;
143
144/* WebKit2 Bundle types */
145
146typedef const struct OpaqueWKBundle* WKBundleRef;
147typedef const struct OpaqueWKBundleBackForwardList* WKBundleBackForwardListRef;
148typedef const struct OpaqueWKBundleBackForwardListItem* WKBundleBackForwardListItemRef;
149typedef const struct OpaqueWKBundleDOMCSSStyleDeclaration* WKBundleCSSStyleDeclarationRef;
150typedef const struct OpaqueWKBundleDOMWindowExtension* WKBundleDOMWindowExtensionRef;
151typedef const struct OpaqueWKBundleFileHandle* WKBundleFileHandleRef;
152typedef const struct OpaqueWKBundleFrame* WKBundleFrameRef;
153typedef const struct OpaqueWKBundleHitTestResult* WKBundleHitTestResultRef;
154typedef const struct OpaqueWKBundleInspector* WKBundleInspectorRef;
155typedef const struct OpaqueWKBundleNavigationAction* WKBundleNavigationActionRef;
156typedef const struct OpaqueWKBundleNodeHandle* WKBundleNodeHandleRef;
157typedef const struct OpaqueWKBundlePage* WKBundlePageRef;
158typedef const struct OpaqueWKBundlePageBanner* WKBundlePageBannerRef;
159typedef const struct OpaqueWKBundlePageGroup* WKBundlePageGroupRef;
160typedef const struct OpaqueWKBundlePageOverlay* WKBundlePageOverlayRef;
161typedef const struct OpaqueWKBundleRangeHandle* WKBundleRangeHandleRef;
162typedef const struct OpaqueWKBundleScriptWorld* WKBundleScriptWorldRef;
163
164#endif /* WKBase_h */
165