initial import
[vuplus_webkit] / Source / WebKit2 / Shared / API / c / WKBase.h
1 /*
2  * Copyright (C) 2010, 2011 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 <stdint.h>
31
32 #if defined(WIN32) || defined(_WIN32)
33 #include <WebKit2/WKBaseWin.h>
34 #endif
35
36 #if defined(BUILDING_GTK__)
37 #include <WebKit2/WKBaseGtk.h>
38 #endif
39
40 /* WebKit2 shared types */
41
42 typedef uint32_t WKTypeID;
43 typedef const void* WKTypeRef;
44
45 typedef const struct OpaqueWKArray* WKArrayRef;
46 typedef struct OpaqueWKArray* WKMutableArrayRef;
47
48 typedef const struct OpaqueWKDictionary* WKDictionaryRef;
49 typedef struct OpaqueWKDictionary* WKMutableDictionaryRef;
50
51 typedef const struct OpaqueWKBoolean* WKBooleanRef;
52 typedef const struct OpaqueWKCertificateInfo* WKCertificateInfoRef;
53 typedef const struct OpaqueWKContextMenuItem* WKContextMenuItemRef;
54 typedef const struct OpaqueWKData* WKDataRef;
55 typedef const struct OpaqueWKDouble* WKDoubleRef;
56 typedef const struct OpaqueWKError* WKErrorRef;
57 typedef const struct OpaqueWKGraphicsContext* WKGraphicsContextRef;
58 typedef const struct OpaqueWKImage* WKImageRef;
59 typedef const struct OpaqueWKSecurityOrigin* WKSecurityOriginRef;
60 typedef const struct OpaqueWKSerializedScriptValue* WKSerializedScriptValueRef;
61 typedef const struct OpaqueWKString* WKStringRef;
62 typedef const struct OpaqueWKUInt64* WKUInt64Ref;
63 typedef const struct OpaqueWKURL* WKURLRef;
64 typedef const struct OpaqueWKURLRequest* WKURLRequestRef;
65 typedef const struct OpaqueWKURLResponse* WKURLResponseRef;
66 typedef const struct OpaqueWKUserContentURLPattern* WKUserContentURLPatternRef;
67
68 /* WebKit2 main API types */
69
70 typedef const struct OpaqueWKApplicationCacheManager* WKApplicationCacheManagerRef;
71 typedef const struct OpaqueWKAuthenticationChallenge* WKAuthenticationChallengeRef;
72 typedef const struct OpaqueWKAuthenticationDecisionListener* WKAuthenticationDecisionListenerRef;
73 typedef const struct OpaqueWKBackForwardList* WKBackForwardListRef;
74 typedef const struct OpaqueWKBackForwardListItem* WKBackForwardListItemRef;
75 typedef const struct OpaqueWKResourceCacheManager* WKResourceCacheManagerRef;
76 typedef const struct OpaqueWKContext* WKContextRef;
77 typedef const struct OpaqueWKCookieManager* WKCookieManagerRef;
78 typedef const struct OpaqueWKCredential* WKCredentialRef;
79 typedef const struct OpaqueWKDatabaseManager* WKDatabaseManagerRef;
80 typedef const struct OpaqueWKDownload* WKDownloadRef;
81 typedef const struct OpaqueWKFormSubmissionListener* WKFormSubmissionListenerRef;
82 typedef const struct OpaqueWKFrame* WKFrameRef;
83 typedef const struct OpaqueWKFramePolicyListener* WKFramePolicyListenerRef;
84 typedef const struct OpaqueWKGeolocationManager* WKGeolocationManagerRef;
85 typedef const struct OpaqueWKGeolocationPermissionRequest* WKGeolocationPermissionRequestRef;
86 typedef const struct OpaqueWKGeolocationPosition* WKGeolocationPositionRef;
87 typedef const struct OpaqueWKIconDatabase* WKIconDatabaseRef;
88 typedef const struct OpaqueWKInspector* WKInspectorRef;
89 typedef const struct OpaqueWKKeyValueStorageManager* WKKeyValueStorageManagerRef;
90 typedef const struct OpaqueWKMediaCacheManager* WKMediaCacheManagerRef;
91 typedef const struct OpaqueWKNavigationData* WKNavigationDataRef;
92 typedef const struct OpaqueWKOpenPanelParameters* WKOpenPanelParametersRef;
93 typedef const struct OpaqueWKOpenPanelResultListener* WKOpenPanelResultListenerRef;
94 typedef const struct OpaqueWKPage* WKPageRef;
95 typedef const struct OpaqueWKPageGroup* WKPageGroupRef;
96 typedef const struct OpaqueWKPluginSiteDataManager* WKPluginSiteDataManagerRef;
97 typedef const struct OpaqueWKPreferences* WKPreferencesRef;
98 typedef const struct OpaqueWKProtectionSpace* WKProtectionSpaceRef;
99
100 /* WebKit2 Bundle types */
101
102 typedef const struct OpaqueWKBundle* WKBundleRef;
103 typedef const struct OpaqueWKBundleBackForwardList* WKBundleBackForwardListRef;
104 typedef const struct OpaqueWKBundleBackForwardListItem* WKBundleBackForwardListItemRef;
105 typedef const struct OpaqueWKBundleDOMCSSStyleDeclaration* WKBundleCSSStyleDeclarationRef;
106 typedef const struct OpaqueWKBundleFrame* WKBundleFrameRef;
107 typedef const struct OpaqueWKBundleHitTestResult* WKBundleHitTestResultRef;
108 typedef const struct OpaqueWKBundleInspector* WKBundleInspectorRef;
109 typedef const struct OpaqueWKBundleNavigationAction* WKBundleNavigationActionRef;
110 typedef const struct OpaqueWKBundleNodeHandle* WKBundleNodeHandleRef;
111 typedef const struct OpaqueWKBundlePage* WKBundlePageRef;
112 typedef const struct OpaqueWKBundlePageGroup* WKBundlePageGroupRef;
113 typedef const struct OpaqueWKBundlePageOverlay* WKBundlePageOverlayRef;
114 typedef const struct OpaqueWKBundleRangeHandle* WKBundleRangeHandleRef;
115 typedef const struct OpaqueWKBundleScriptWorld* WKBundleScriptWorldRef;
116
117 #undef WK_EXPORT
118 #if defined(WK_NO_EXPORT)
119 #define WK_EXPORT
120 #elif defined(__GNUC__) && !defined(__CC_ARM) && !defined(__ARMCC__)
121 #define WK_EXPORT __attribute__((visibility("default")))
122 #elif defined(WIN32) || defined(_WIN32) || defined(_WIN32_WCE) || defined(__CC_ARM) || defined(__ARMCC__)
123 #if BUILDING_WEBKIT
124 #define WK_EXPORT __declspec(dllexport)
125 #else
126 #define WK_EXPORT __declspec(dllimport)
127 #endif
128 #else /* !defined(WK_NO_EXPORT) */
129 #define WK_EXPORT
130 #endif /* defined(WK_NO_EXPORT) */
131
132 #endif /* WKBase_h */