diff options
Diffstat (limited to 'Source/WebKit2/Shared/API/c')
-rw-r--r-- | Source/WebKit2/Shared/API/c/WKSerializedScriptValue.h | 2 | ||||
-rw-r--r-- | Source/WebKit2/Shared/API/c/WKString.cpp | 11 | ||||
-rw-r--r-- | Source/WebKit2/Shared/API/c/WKString.h | 10 | ||||
-rw-r--r-- | Source/WebKit2/Shared/API/c/gtk/WKBaseGtk.h | 2 | ||||
-rw-r--r-- | Source/WebKit2/Shared/API/c/win/WKBaseWin.h | 2 |
5 files changed, 26 insertions, 1 deletions
diff --git a/Source/WebKit2/Shared/API/c/WKSerializedScriptValue.h b/Source/WebKit2/Shared/API/c/WKSerializedScriptValue.h index 95fc048..3f73d7a 100644 --- a/Source/WebKit2/Shared/API/c/WKSerializedScriptValue.h +++ b/Source/WebKit2/Shared/API/c/WKSerializedScriptValue.h @@ -36,7 +36,7 @@ extern "C" { WK_EXPORT WKTypeID WKSerializedScriptValueGetTypeID(); WK_EXPORT WKSerializedScriptValueRef WKSerializedScriptValueCreate(JSContextRef context, JSValueRef value, JSValueRef* exception); -WK_EXPORT JSValueRef WKSerializedScriptValueDeserialize(WKSerializedScriptValueRef scriptValue, JSContextRef constext, JSValueRef* exception); +WK_EXPORT JSValueRef WKSerializedScriptValueDeserialize(WKSerializedScriptValueRef scriptValue, JSContextRef context, JSValueRef* exception); #ifdef __cplusplus } diff --git a/Source/WebKit2/Shared/API/c/WKString.cpp b/Source/WebKit2/Shared/API/c/WKString.cpp index 0c388c6..cbac67d 100644 --- a/Source/WebKit2/Shared/API/c/WKString.cpp +++ b/Source/WebKit2/Shared/API/c/WKString.cpp @@ -47,6 +47,17 @@ bool WKStringIsEmpty(WKStringRef stringRef) return toImpl(stringRef)->isEmpty(); } +size_t WKStringGetLength(WKStringRef stringRef) +{ + return toImpl(stringRef)->length(); +} + +size_t WKStringGetCharacters(WKStringRef stringRef, WKChar* buffer, size_t bufferLength) +{ + COMPILE_ASSERT(sizeof(WKChar) == sizeof(UChar), WKStringGetCharacters_sizeof_WKChar_matches_UChar); + return (toImpl(stringRef)->getCharacters(static_cast<UChar*>(buffer), bufferLength)); +} + size_t WKStringGetMaximumUTF8CStringSize(WKStringRef stringRef) { return toImpl(stringRef)->maximumUTF8CStringSize(); diff --git a/Source/WebKit2/Shared/API/c/WKString.h b/Source/WebKit2/Shared/API/c/WKString.h index dffcab2..d1bc1ef 100644 --- a/Source/WebKit2/Shared/API/c/WKString.h +++ b/Source/WebKit2/Shared/API/c/WKString.h @@ -36,12 +36,22 @@ extern "C" { #endif +#if !defined(WIN32) && !defined(_WIN32) && !defined(__WINSCW__) \ + && !((defined(__CC_ARM) || defined(__ARMCC__)) && !defined(__linux__)) /* RVCT */ + typedef unsigned short WKChar; +#else + typedef wchar_t WKChar; +#endif + WK_EXPORT WKTypeID WKStringGetTypeID(); WK_EXPORT WKStringRef WKStringCreateWithUTF8CString(const char* string); WK_EXPORT bool WKStringIsEmpty(WKStringRef string); +WK_EXPORT size_t WKStringGetLength(WKStringRef string); +WK_EXPORT size_t WKStringGetCharacters(WKStringRef string, WKChar* buffer, size_t bufferLength); + WK_EXPORT size_t WKStringGetMaximumUTF8CStringSize(WKStringRef string); WK_EXPORT size_t WKStringGetUTF8CString(WKStringRef string, char* buffer, size_t bufferSize); diff --git a/Source/WebKit2/Shared/API/c/gtk/WKBaseGtk.h b/Source/WebKit2/Shared/API/c/gtk/WKBaseGtk.h index 8f34ed3..eb88f70 100644 --- a/Source/WebKit2/Shared/API/c/gtk/WKBaseGtk.h +++ b/Source/WebKit2/Shared/API/c/gtk/WKBaseGtk.h @@ -32,6 +32,8 @@ #error "Please #include \"WKBase.h\" instead of this file directly." #endif +#include <stdbool.h> + typedef const struct OpaqueWKView* WKViewRef; #endif /* WKBaseGtk_h */ diff --git a/Source/WebKit2/Shared/API/c/win/WKBaseWin.h b/Source/WebKit2/Shared/API/c/win/WKBaseWin.h index fdd4607..d9c13e3 100644 --- a/Source/WebKit2/Shared/API/c/win/WKBaseWin.h +++ b/Source/WebKit2/Shared/API/c/win/WKBaseWin.h @@ -32,5 +32,7 @@ typedef const struct OpaqueWKView* WKViewRef; typedef const struct OpaqueWKEditCommand* WKEditCommandRef; +typedef const struct OpaqueWKTextChecker* WKTextCheckerRef; +typedef const struct OpaqueWKGrammarDetail* WKGrammarDetailRef; #endif /* WKBaseWin_h */ |