summaryrefslogtreecommitdiffstats
path: root/Source/WebKit2/Shared/API
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/Shared/API')
-rw-r--r--Source/WebKit2/Shared/API/c/WKArray.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/WKBase.h12
-rw-r--r--Source/WebKit2/Shared/API/c/WKCertificateInfo.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/WKData.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/WKDictionary.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/WKError.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/WKGraphicsContext.cpp37
-rw-r--r--Source/WebKit2/Shared/API/c/WKGraphicsContext.h41
-rw-r--r--Source/WebKit2/Shared/API/c/WKImage.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/WKMutableArray.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/WKMutableDictionary.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/WKNumber.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/WKSecurityOrigin.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/WKSerializedScriptValue.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/WKSharedAPICast.h14
-rw-r--r--Source/WebKit2/Shared/API/c/WKString.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/WKType.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/WKURL.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/WKURLRequest.cpp6
-rw-r--r--Source/WebKit2/Shared/API/c/WKURLRequest.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKURLResponse.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/WKUserContentURLPattern.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/cf/WKStringCF.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/cf/WKURLCF.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/cf/WKURLRequestCF.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/cf/WKURLResponseCF.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.cpp38
-rw-r--r--Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.h42
-rw-r--r--Source/WebKit2/Shared/API/c/cg/WKImageCG.cpp1
-rw-r--r--Source/WebKit2/Shared/API/c/gtk/WKBaseGtk.h37
-rw-r--r--Source/WebKit2/Shared/API/c/gtk/WKGraphicsContextGtk.cpp38
-rw-r--r--Source/WebKit2/Shared/API/c/gtk/WKGraphicsContextGtk.h43
-rw-r--r--Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.mm7
-rw-r--r--Source/WebKit2/Shared/API/c/mac/WKURLRequestNS.mm7
-rw-r--r--Source/WebKit2/Shared/API/c/mac/WKURLResponseNS.mm7
-rw-r--r--Source/WebKit2/Shared/API/c/win/WKCertificateInfoWin.cpp1
37 files changed, 342 insertions, 12 deletions
diff --git a/Source/WebKit2/Shared/API/c/WKArray.cpp b/Source/WebKit2/Shared/API/c/WKArray.cpp
index 9e20b7e..3cc98b8 100644
--- a/Source/WebKit2/Shared/API/c/WKArray.cpp
+++ b/Source/WebKit2/Shared/API/c/WKArray.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKArray.h"
#include "ImmutableArray.h"
diff --git a/Source/WebKit2/Shared/API/c/WKBase.h b/Source/WebKit2/Shared/API/c/WKBase.h
index f906f9f..1db647a 100644
--- a/Source/WebKit2/Shared/API/c/WKBase.h
+++ b/Source/WebKit2/Shared/API/c/WKBase.h
@@ -1,5 +1,6 @@
/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
+ * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -32,6 +33,10 @@
#include <WebKit2/WKBaseWin.h>
#endif
+#if defined(BUILDING_GTK__)
+#include <WebKit2/WKBaseGtk.h>
+#endif
+
/* WebKit2 shared types */
typedef uint32_t WKTypeID;
@@ -49,6 +54,7 @@ typedef const struct OpaqueWKContextMenuItem* WKContextMenuItemRef;
typedef const struct OpaqueWKData* WKDataRef;
typedef const struct OpaqueWKDouble* WKDoubleRef;
typedef const struct OpaqueWKError* WKErrorRef;
+typedef const struct OpaqueWKGraphicsContext* WKGraphicsContextRef;
typedef const struct OpaqueWKImage* WKImageRef;
typedef const struct OpaqueWKSecurityOrigin* WKSecurityOriginRef;
typedef const struct OpaqueWKSerializedScriptValue* WKSerializedScriptValueRef;
@@ -92,6 +98,8 @@ typedef const struct OpaqueWKBundleBackForwardListItem* WKBundleBackForwardListI
typedef const struct OpaqueWKBundleDOMCSSStyleDeclaration* WKBundleCSSStyleDeclarationRef;
typedef const struct OpaqueWKBundleFrame* WKBundleFrameRef;
typedef const struct OpaqueWKBundleHitTestResult* WKBundleHitTestResultRef;
+typedef const struct OpaqueWKBundleInspector* WKBundleInspectorRef;
+typedef const struct OpaqueWKBundleNavigationAction* WKBundleNavigationActionRef;
typedef const struct OpaqueWKBundleNodeHandle* WKBundleNodeHandleRef;
typedef const struct OpaqueWKBundlePage* WKBundlePageRef;
typedef const struct OpaqueWKBundlePageGroup* WKBundlePageGroupRef;
@@ -99,8 +107,6 @@ typedef const struct OpaqueWKBundlePageOverlay* WKBundlePageOverlayRef;
typedef const struct OpaqueWKBundleRangeHandle* WKBundleRangeHandleRef;
typedef const struct OpaqueWKBundleScriptWorld* WKBundleScriptWorldRef;
-/* These rules should stay the same as in JavaScriptCore/API/JSBase.h */
-
#undef WK_EXPORT
#if defined(WK_NO_EXPORT)
#define WK_EXPORT
diff --git a/Source/WebKit2/Shared/API/c/WKCertificateInfo.cpp b/Source/WebKit2/Shared/API/c/WKCertificateInfo.cpp
index c5a3ad9..45ec627 100644
--- a/Source/WebKit2/Shared/API/c/WKCertificateInfo.cpp
+++ b/Source/WebKit2/Shared/API/c/WKCertificateInfo.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKCertificateInfo.h"
#include "WebCertificateInfo.h"
diff --git a/Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp b/Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp
index a4eaa53..c04aab1 100644
--- a/Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp
+++ b/Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKContextMenuItem.h"
#include "MutableArray.h"
diff --git a/Source/WebKit2/Shared/API/c/WKData.cpp b/Source/WebKit2/Shared/API/c/WKData.cpp
index aefe795..b8253aa 100644
--- a/Source/WebKit2/Shared/API/c/WKData.cpp
+++ b/Source/WebKit2/Shared/API/c/WKData.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKData.h"
#include "WebData.h"
diff --git a/Source/WebKit2/Shared/API/c/WKDictionary.cpp b/Source/WebKit2/Shared/API/c/WKDictionary.cpp
index 6b336bf..dc423de 100644
--- a/Source/WebKit2/Shared/API/c/WKDictionary.cpp
+++ b/Source/WebKit2/Shared/API/c/WKDictionary.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKDictionary.h"
#include "ImmutableArray.h"
diff --git a/Source/WebKit2/Shared/API/c/WKError.cpp b/Source/WebKit2/Shared/API/c/WKError.cpp
index 395cf3a..148bd62 100644
--- a/Source/WebKit2/Shared/API/c/WKError.cpp
+++ b/Source/WebKit2/Shared/API/c/WKError.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKError.h"
#include "WebError.h"
diff --git a/Source/WebKit2/Shared/API/c/WKGraphicsContext.cpp b/Source/WebKit2/Shared/API/c/WKGraphicsContext.cpp
new file mode 100644
index 0000000..5d80dfa
--- /dev/null
+++ b/Source/WebKit2/Shared/API/c/WKGraphicsContext.cpp
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WKGraphicsContext.h"
+
+#include "WKSharedAPICast.h"
+#include "WebGraphicsContext.h"
+
+using namespace WebKit;
+
+WKTypeID WKGraphicsContextGetTypeID()
+{
+ return toAPI(WebGraphicsContext::APIType);
+}
diff --git a/Source/WebKit2/Shared/API/c/WKGraphicsContext.h b/Source/WebKit2/Shared/API/c/WKGraphicsContext.h
new file mode 100644
index 0000000..c9d0a52
--- /dev/null
+++ b/Source/WebKit2/Shared/API/c/WKGraphicsContext.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WKGraphicsContext_h
+#define WKGraphicsContext_h
+
+#include <WebKit2/WKBase.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+WK_EXPORT WKTypeID WKGraphicsContextGetTypeID();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* WKGraphicsContext_h */
diff --git a/Source/WebKit2/Shared/API/c/WKImage.cpp b/Source/WebKit2/Shared/API/c/WKImage.cpp
index 0bf21df..23278b3 100644
--- a/Source/WebKit2/Shared/API/c/WKImage.cpp
+++ b/Source/WebKit2/Shared/API/c/WKImage.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKImage.h"
#include "WKSharedAPICast.h"
diff --git a/Source/WebKit2/Shared/API/c/WKMutableArray.cpp b/Source/WebKit2/Shared/API/c/WKMutableArray.cpp
index 56bd72f..1ae65c1 100644
--- a/Source/WebKit2/Shared/API/c/WKMutableArray.cpp
+++ b/Source/WebKit2/Shared/API/c/WKMutableArray.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKMutableArray.h"
#include "MutableArray.h"
diff --git a/Source/WebKit2/Shared/API/c/WKMutableDictionary.cpp b/Source/WebKit2/Shared/API/c/WKMutableDictionary.cpp
index df9f5a7..0d96ca1 100644
--- a/Source/WebKit2/Shared/API/c/WKMutableDictionary.cpp
+++ b/Source/WebKit2/Shared/API/c/WKMutableDictionary.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKMutableDictionary.h"
#include "MutableDictionary.h"
diff --git a/Source/WebKit2/Shared/API/c/WKNumber.cpp b/Source/WebKit2/Shared/API/c/WKNumber.cpp
index 4a413e1..f2cf0f8 100644
--- a/Source/WebKit2/Shared/API/c/WKNumber.cpp
+++ b/Source/WebKit2/Shared/API/c/WKNumber.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKNumber.h"
#include "WKAPICast.h"
diff --git a/Source/WebKit2/Shared/API/c/WKSecurityOrigin.cpp b/Source/WebKit2/Shared/API/c/WKSecurityOrigin.cpp
index 761cbf8..ef51335 100644
--- a/Source/WebKit2/Shared/API/c/WKSecurityOrigin.cpp
+++ b/Source/WebKit2/Shared/API/c/WKSecurityOrigin.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKSecurityOrigin.h"
#include "WKAPICast.h"
diff --git a/Source/WebKit2/Shared/API/c/WKSerializedScriptValue.cpp b/Source/WebKit2/Shared/API/c/WKSerializedScriptValue.cpp
index 4c642f0..f45c388 100644
--- a/Source/WebKit2/Shared/API/c/WKSerializedScriptValue.cpp
+++ b/Source/WebKit2/Shared/API/c/WKSerializedScriptValue.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKSerializedScriptValue.h"
#include "WKSerializedScriptValuePrivate.h"
diff --git a/Source/WebKit2/Shared/API/c/WKSharedAPICast.h b/Source/WebKit2/Shared/API/c/WKSharedAPICast.h
index 6dc80e8..ac3b420 100644
--- a/Source/WebKit2/Shared/API/c/WKSharedAPICast.h
+++ b/Source/WebKit2/Shared/API/c/WKSharedAPICast.h
@@ -41,6 +41,8 @@
#include "WebNumber.h"
#include "WebString.h"
#include "WebURL.h"
+#include "WebURLRequest.h"
+#include "WebURLResponse.h"
#include <WebCore/ContextMenuItem.h>
#include <WebCore/FloatRect.h>
#include <WebCore/FrameLoaderTypes.h>
@@ -56,6 +58,7 @@ class MutableDictionary;
class WebCertificateInfo;
class WebContextMenuItem;
class WebData;
+class WebGraphicsContext;
class WebImage;
class WebSecurityOrigin;
class WebSerializedScriptValue;
@@ -78,6 +81,7 @@ WK_ADD_API_MAPPING(WKDataRef, WebData)
WK_ADD_API_MAPPING(WKDictionaryRef, ImmutableDictionary)
WK_ADD_API_MAPPING(WKDoubleRef, WebDouble)
WK_ADD_API_MAPPING(WKErrorRef, WebError)
+WK_ADD_API_MAPPING(WKGraphicsContextRef, WebGraphicsContext)
WK_ADD_API_MAPPING(WKImageRef, WebImage)
WK_ADD_API_MAPPING(WKMutableArrayRef, MutableArray)
WK_ADD_API_MAPPING(WKMutableDictionaryRef, MutableDictionary)
@@ -172,6 +176,16 @@ inline ProxyingRefPtr<WebError> toAPI(const WebCore::ResourceError& error)
return ProxyingRefPtr<WebError>(WebError::create(error));
}
+inline ProxyingRefPtr<WebURLRequest> toAPI(const WebCore::ResourceRequest& request)
+{
+ return ProxyingRefPtr<WebURLRequest>(WebURLRequest::create(request));
+}
+
+inline ProxyingRefPtr<WebURLResponse> toAPI(const WebCore::ResourceResponse& response)
+{
+ return ProxyingRefPtr<WebURLResponse>(WebURLResponse::create(response));
+}
+
/* Geometry conversions */
inline WebCore::FloatRect toFloatRect(const WKRect& wkRect)
diff --git a/Source/WebKit2/Shared/API/c/WKString.cpp b/Source/WebKit2/Shared/API/c/WKString.cpp
index 14f40fa..72841a4 100644
--- a/Source/WebKit2/Shared/API/c/WKString.cpp
+++ b/Source/WebKit2/Shared/API/c/WKString.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKString.h"
#include "WKStringPrivate.h"
diff --git a/Source/WebKit2/Shared/API/c/WKType.cpp b/Source/WebKit2/Shared/API/c/WKType.cpp
index a499737..f0e4ea8 100644
--- a/Source/WebKit2/Shared/API/c/WKType.cpp
+++ b/Source/WebKit2/Shared/API/c/WKType.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKType.h"
#include "APIObject.h"
diff --git a/Source/WebKit2/Shared/API/c/WKURL.cpp b/Source/WebKit2/Shared/API/c/WKURL.cpp
index 0060b34..6b7e567 100644
--- a/Source/WebKit2/Shared/API/c/WKURL.cpp
+++ b/Source/WebKit2/Shared/API/c/WKURL.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKURL.h"
#include "WKAPICast.h"
diff --git a/Source/WebKit2/Shared/API/c/WKURLRequest.cpp b/Source/WebKit2/Shared/API/c/WKURLRequest.cpp
index 6ea66ec..433db05 100644
--- a/Source/WebKit2/Shared/API/c/WKURLRequest.cpp
+++ b/Source/WebKit2/Shared/API/c/WKURLRequest.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKURLRequest.h"
#include "WKAPICast.h"
@@ -41,3 +42,8 @@ WKURLRequestRef WKURLRequestCreateWithWKURL(WKURLRef url)
{
return toAPI(WebURLRequest::create(KURL(KURL(), toImpl(url)->string())).leakRef());
}
+
+WKURLRef WKURLRequestCopyURL(WKURLRequestRef requestRef)
+{
+ return toCopiedURLAPI(toImpl(requestRef)->url());
+}
diff --git a/Source/WebKit2/Shared/API/c/WKURLRequest.h b/Source/WebKit2/Shared/API/c/WKURLRequest.h
index d78968d..7d146f2 100644
--- a/Source/WebKit2/Shared/API/c/WKURLRequest.h
+++ b/Source/WebKit2/Shared/API/c/WKURLRequest.h
@@ -36,6 +36,8 @@ WK_EXPORT WKTypeID WKURLRequestGetTypeID();
WK_EXPORT WKURLRequestRef WKURLRequestCreateWithWKURL(WKURLRef);
+WK_EXPORT WKURLRef WKURLRequestCopyURL(WKURLRequestRef);
+
#ifdef __cplusplus
}
#endif
diff --git a/Source/WebKit2/Shared/API/c/WKURLResponse.cpp b/Source/WebKit2/Shared/API/c/WKURLResponse.cpp
index 12537bd..7d8d68b 100644
--- a/Source/WebKit2/Shared/API/c/WKURLResponse.cpp
+++ b/Source/WebKit2/Shared/API/c/WKURLResponse.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKURLResponse.h"
#include "WKAPICast.h"
diff --git a/Source/WebKit2/Shared/API/c/WKUserContentURLPattern.cpp b/Source/WebKit2/Shared/API/c/WKUserContentURLPattern.cpp
index 3eb24c4..f09610f 100644
--- a/Source/WebKit2/Shared/API/c/WKUserContentURLPattern.cpp
+++ b/Source/WebKit2/Shared/API/c/WKUserContentURLPattern.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKUserContentURLPattern.h"
#include "WKAPICast.h"
diff --git a/Source/WebKit2/Shared/API/c/cf/WKStringCF.cpp b/Source/WebKit2/Shared/API/c/cf/WKStringCF.cpp
index b89110e..9a49e5a 100644
--- a/Source/WebKit2/Shared/API/c/cf/WKStringCF.cpp
+++ b/Source/WebKit2/Shared/API/c/cf/WKStringCF.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKStringCF.h"
#include "WKAPICast.h"
diff --git a/Source/WebKit2/Shared/API/c/cf/WKURLCF.cpp b/Source/WebKit2/Shared/API/c/cf/WKURLCF.cpp
index a4627ce..e1d4ee7 100644
--- a/Source/WebKit2/Shared/API/c/cf/WKURLCF.cpp
+++ b/Source/WebKit2/Shared/API/c/cf/WKURLCF.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKURLCF.h"
#include "WKAPICast.h"
diff --git a/Source/WebKit2/Shared/API/c/cf/WKURLRequestCF.cpp b/Source/WebKit2/Shared/API/c/cf/WKURLRequestCF.cpp
index 98c801a..7422fd2 100644
--- a/Source/WebKit2/Shared/API/c/cf/WKURLRequestCF.cpp
+++ b/Source/WebKit2/Shared/API/c/cf/WKURLRequestCF.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKURLRequestCF.h"
#include "WKAPICast.h"
diff --git a/Source/WebKit2/Shared/API/c/cf/WKURLResponseCF.cpp b/Source/WebKit2/Shared/API/c/cf/WKURLResponseCF.cpp
index 36d3f00..42473c8 100644
--- a/Source/WebKit2/Shared/API/c/cf/WKURLResponseCF.cpp
+++ b/Source/WebKit2/Shared/API/c/cf/WKURLResponseCF.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKURLResponseCF.h"
#include "WKAPICast.h"
diff --git a/Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.cpp b/Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.cpp
new file mode 100644
index 0000000..aa7a77e
--- /dev/null
+++ b/Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.cpp
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#include "config.h"
+#include "WKGraphicsContextCG.h"
+
+#include "WKSharedAPICast.h"
+#include "WebGraphicsContext.h"
+
+using namespace WebKit;
+
+CGContextRef WKGraphicsContextGetCGContext(WKGraphicsContextRef graphicsContextRef)
+{
+ return toImpl(graphicsContextRef)->platformContext();
+}
diff --git a/Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.h b/Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.h
new file mode 100644
index 0000000..06e9df0
--- /dev/null
+++ b/Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WKGraphicsContextCG_h
+#define WKGraphicsContextCG_h
+
+#include <CoreGraphics/CGContext.h>
+#include <WebKit2/WKBase.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+WK_EXPORT CGContextRef WKGraphicsContextGetCGContext(WKGraphicsContextRef graphicsContext);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* WKGraphicsContextCG_h */
diff --git a/Source/WebKit2/Shared/API/c/cg/WKImageCG.cpp b/Source/WebKit2/Shared/API/c/cg/WKImageCG.cpp
index 34a8bf1..61b5f17 100644
--- a/Source/WebKit2/Shared/API/c/cg/WKImageCG.cpp
+++ b/Source/WebKit2/Shared/API/c/cg/WKImageCG.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKImageCG.h"
#include "ShareableBitmap.h"
diff --git a/Source/WebKit2/Shared/API/c/gtk/WKBaseGtk.h b/Source/WebKit2/Shared/API/c/gtk/WKBaseGtk.h
new file mode 100644
index 0000000..8f34ed3
--- /dev/null
+++ b/Source/WebKit2/Shared/API/c/gtk/WKBaseGtk.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved.
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WKBaseGtk_h
+#define WKBaseGtk_h
+
+#ifndef WKBase_h
+#error "Please #include \"WKBase.h\" instead of this file directly."
+#endif
+
+typedef const struct OpaqueWKView* WKViewRef;
+
+#endif /* WKBaseGtk_h */
diff --git a/Source/WebKit2/Shared/API/c/gtk/WKGraphicsContextGtk.cpp b/Source/WebKit2/Shared/API/c/gtk/WKGraphicsContextGtk.cpp
new file mode 100644
index 0000000..69695f1
--- /dev/null
+++ b/Source/WebKit2/Shared/API/c/gtk/WKGraphicsContextGtk.cpp
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2011 Igalia SL All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#include "config.h"
+#include "WKGraphicsContextGtk.h"
+
+#include "WKSharedAPICast.h"
+#include "WebGraphicsContext.h"
+
+using namespace WebKit;
+
+cairo_t* WKGraphicsContextGetGtkContext(WKGraphicsContextRef graphicsContextRef)
+{
+ return toImpl(graphicsContextRef)->platformContext();
+}
diff --git a/Source/WebKit2/Shared/API/c/gtk/WKGraphicsContextGtk.h b/Source/WebKit2/Shared/API/c/gtk/WKGraphicsContextGtk.h
new file mode 100644
index 0000000..25fcfc4
--- /dev/null
+++ b/Source/WebKit2/Shared/API/c/gtk/WKGraphicsContextGtk.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2011 Igalia SL All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WKGraphicsContextGtk_h
+#define WKGraphicsContextGtk_h
+
+#include <WebKit2/WKBase.h>
+
+#include <cairo.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+WK_EXPORT cairo_t* WKGraphicsContextGetGtkContext(WKGraphicsContextRef);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* WKGraphicsContextGtk_h */
diff --git a/Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.mm b/Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.mm
index 2ffc1f5..a2f348d 100644
--- a/Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.mm
+++ b/Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.mm
@@ -23,10 +23,11 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "WKCertificateInfoMac.h"
+#import "config.h"
+#import "WKCertificateInfoMac.h"
-#include "WKAPICast.h"
-#include "WebCertificateInfo.h"
+#import "WKAPICast.h"
+#import "WebCertificateInfo.h"
using namespace WebKit;
diff --git a/Source/WebKit2/Shared/API/c/mac/WKURLRequestNS.mm b/Source/WebKit2/Shared/API/c/mac/WKURLRequestNS.mm
index 7cc69fa..081bbd7 100644
--- a/Source/WebKit2/Shared/API/c/mac/WKURLRequestNS.mm
+++ b/Source/WebKit2/Shared/API/c/mac/WKURLRequestNS.mm
@@ -23,10 +23,11 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "WKURLRequestNS.h"
+#import "config.h"
+#import "WKURLRequestNS.h"
-#include "WKAPICast.h"
-#include "WebURLRequest.h"
+#import "WKAPICast.h"
+#import "WebURLRequest.h"
using namespace WebKit;
diff --git a/Source/WebKit2/Shared/API/c/mac/WKURLResponseNS.mm b/Source/WebKit2/Shared/API/c/mac/WKURLResponseNS.mm
index 79b874d..f19883e 100644
--- a/Source/WebKit2/Shared/API/c/mac/WKURLResponseNS.mm
+++ b/Source/WebKit2/Shared/API/c/mac/WKURLResponseNS.mm
@@ -23,10 +23,11 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "WKURLResponseNS.h"
+#import "config.h"
+#import "WKURLResponseNS.h"
-#include "WKAPICast.h"
-#include "WebURLResponse.h"
+#import "WKAPICast.h"
+#import "WebURLResponse.h"
using namespace WebKit;
diff --git a/Source/WebKit2/Shared/API/c/win/WKCertificateInfoWin.cpp b/Source/WebKit2/Shared/API/c/win/WKCertificateInfoWin.cpp
index f4c7bb2..ada20ef 100644
--- a/Source/WebKit2/Shared/API/c/win/WKCertificateInfoWin.cpp
+++ b/Source/WebKit2/Shared/API/c/win/WKCertificateInfoWin.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WKCertificateInfoWin.h"
#include "WKAPICast.h"