Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

GSEvent: Availability.h; JavaScriptCore: Partially updated to match A…

…pple's version. PhotoLibrary. CPMIGServerSource. SpringBoardServices: Lots of procedures.
  • Loading branch information...
commit 4002e0042ff046f79eef250050f3e32192e0e6d4 1 parent f44d46e
@kennytm kennytm authored
Showing with 5,979 additions and 129 deletions.
  1. +1 −0  AppSupport/AppSupport.h
  2. +58 −0 AppSupport/CPMIGServerSource.h
  3. +63 −0 CoreFoundation/CFLogUtilities.h
  4. +15 −14 GraphicsServices/GSEvent.h
  5. +33 −15 JavaScriptCore/JSBase.h
  6. +61 −6 JavaScriptCore/JSContextRef.h
  7. +83 −34 JavaScriptCore/JSObjectRef.h
  8. +15 −14 JavaScriptCore/JSStringRef.h
  9. +5 −6 JavaScriptCore/JSStringRefCF.h
  10. +30 −29 JavaScriptCore/JSValueRef.h
  11. +1 −0  JavaScriptCore/JavaScript.h
  12. +763 −0 JavaScriptCore/WebKitAvailability.h
  13. +18 −0 PhotoLibrary/CLLocationManagerDelegate.h
  14. +34 −0 PhotoLibrary/MLPhoto.h
  15. +15 −0 PhotoLibrary/MLPhotoAlbum.h
  16. +14 −0 PhotoLibrary/MLPhotoBakedThumbnailsDelegate.h
  17. +14 −0 PhotoLibrary/MLPhotoDCFDirectory.h
  18. +22 −0 PhotoLibrary/MLPhotoDCFFileGroup.h
  19. +14 −0 PhotoLibrary/NSArray.h
  20. +15 −0 PhotoLibrary/NSFileManager.h
  21. +32 −0 PhotoLibrary/NSObject.h
  22. +14 −0 PhotoLibrary/NSString.h
  23. +76 −0 PhotoLibrary/PLAlbumScrollView.h
  24. +21 −0 PhotoLibrary/PLAlbumScrollViewDelegate.h
  25. +71 −0 PhotoLibrary/PLAlbumView.h
  26. +31 −0 PhotoLibrary/PLAlbumViewController.h
  27. +380 −0 PhotoLibrary/PLAlbumsController.h
  28. +26 −0 PhotoLibrary/PLAudio.h
  29. +26 −0 PhotoLibrary/PLAudioInternal.h
  30. +35 −0 PhotoLibrary/PLCachedVideoFilesManager.h
  31. +47 −0 PhotoLibrary/PLCameraAlbum.h
  32. +44 −0 PhotoLibrary/PLCameraButton.h
  33. +20 −0 PhotoLibrary/PLCameraButtonBar.h
  34. +125 −0 PhotoLibrary/PLCameraController.h
  35. +21 −0 PhotoLibrary/PLCameraControllerDelegate.h
  36. +35 −0 PhotoLibrary/PLCameraElapsedTimeView.h
  37. +27 −0 PhotoLibrary/PLCameraFocusView.h
  38. +61 −0 PhotoLibrary/PLCameraImage.h
  39. +47 −0 PhotoLibrary/PLCameraImageWellView.h
  40. +29 −0 PhotoLibrary/PLCameraLockdownPTPCommunicator.h
  41. +54 −0 PhotoLibrary/PLCameraVideoSwitch.h
  42. +160 −0 PhotoLibrary/PLCameraView.h
  43. +21 −0 PhotoLibrary/PLCameraViewController.h
  44. +23 −0 PhotoLibrary/PLCropLCDLayer.h
  45. +92 −0 PhotoLibrary/PLCropOverlay.h
  46. +62 −0 PhotoLibrary/PLCropOverlayBottomBar.h
  47. +17 −0 PhotoLibrary/PLCropOverlayBottomBarButton.h
  48. +20 −0 PhotoLibrary/PLCropOverlayCropView.h
  49. +54 −0 PhotoLibrary/PLDataArrayInputStream.h
  50. +13 −0 PhotoLibrary/PLDataArrayInputStreamProgressDelegate.h
  51. +30 −0 PhotoLibrary/PLDiskController.h
  52. +29 −0 PhotoLibrary/PLEmptyAlbumView.h
  53. +15 −0 PhotoLibrary/PLHighlightingTableView.h
  54. +31 −0 PhotoLibrary/PLHopAnimation.h
  55. +25 −0 PhotoLibrary/PLImage.h
  56. +18 −0 PhotoLibrary/PLImageCountCell.h
  57. +29 −0 PhotoLibrary/PLImageInternal.h
  58. +22 −0 PhotoLibrary/PLImageLoader.h
  59. +69 −0 PhotoLibrary/PLImageScrollView.h
  60. +14 −0 PhotoLibrary/PLImageScrollViewDelegate.h
  61. +56 −0 PhotoLibrary/PLImageTile.h
  62. +33 −0 PhotoLibrary/PLImageTileView.h
  63. +94 −0 PhotoLibrary/PLImageView.h
  64. +19 −0 PhotoLibrary/PLImageViewTile.h
  65. +36 −0 PhotoLibrary/PLImageWriter.h
  66. +14 −0 PhotoLibrary/PLImageWriterDelegate.h
  67. +26 −0 PhotoLibrary/PLItem.h
  68. +21 −0 PhotoLibrary/PLItemView.h
  69. +22 −0 PhotoLibrary/PLLibraryController.h
  70. +28 −0 PhotoLibrary/PLLibraryTableViewCell.h
  71. +39 −0 PhotoLibrary/PLLibraryView.h
  72. +45 −0 PhotoLibrary/PLLibraryViewController.h
  73. +44 −0 PhotoLibrary/PLLocationController.h
  74. +19 −0 PhotoLibrary/PLMessageUIProxy.h
  75. +35 −0 PhotoLibrary/PLMobileMeHelper.h
  76. +20 −0 PhotoLibrary/PLMoviePlayerController.h
  77. +29 −0 PhotoLibrary/PLPhotoLibrary.h
  78. +74 −0 PhotoLibrary/PLPhotoPicker.h
  79. +15 −0 PhotoLibrary/PLPhotoScrollerAlbum.h
  80. +15 −0 PhotoLibrary/PLPhotoScrollerNavigationItem.h
  81. +52 −0 PhotoLibrary/PLPhotoScrollerViewController.h
  82. +20 −0 PhotoLibrary/PLPhotoToolbar.h
  83. +19 −0 PhotoLibrary/PLPhotosButtonBar.h
  84. +31 −0 PhotoLibrary/PLPhotosDefaults.h
  85. +19 −0 PhotoLibrary/PLPhotosMusicPlayer.h
  86. +17 −0 PhotoLibrary/PLPhotosNavigationItem.h
  87. +15 −0 PhotoLibrary/PLPortraitAlertSheet.h
  88. +36 −0 PhotoLibrary/PLPreviewView.h
  89. +28 −0 PhotoLibrary/PLProgressView.h
  90. +62 −0 PhotoLibrary/PLPublishingAgent.h
  91. +14 −0 PhotoLibrary/PLRotationView.h
  92. +20 −0 PhotoLibrary/PLStoreAnimationView.h
  93. +20 −0 PhotoLibrary/PLSyncProgressView.h
  94. +24 −0 PhotoLibrary/PLSynchronousFileValidator.h
  95. +17 −0 PhotoLibrary/PLTVOutImageTile.h
  96. +19 −0 PhotoLibrary/PLTVOutImageTileView.h
  97. +40 −0 PhotoLibrary/PLTableViewEditableCell.h
  98. +17 −0 PhotoLibrary/PLTableViewEditableTagCell.h
  99. +24 −0 PhotoLibrary/PLTextView.h
  100. +65 −0 PhotoLibrary/PLThumbnailTableCell.h
  101. +25 −0 PhotoLibrary/PLToolbar.h
  102. +18 −0 PhotoLibrary/PLTransitionContainerView.h
  103. +16 −0 PhotoLibrary/PLTrimNavigationButton.h
  104. +20 −0 PhotoLibrary/PLUIAlbumViewController.h
  105. +43 −0 PhotoLibrary/PLUICameraViewController.h
  106. +83 −0 PhotoLibrary/PLUIController.h
  107. +45 −0 PhotoLibrary/PLUIEditVideoViewController.h
  108. +71 −0 PhotoLibrary/PLUIImageViewController.h
  109. +21 −0 PhotoLibrary/PLUILibraryViewController.h
  110. +15 −0 PhotoLibrary/PLUISavedPhotosAlbumViewController.h
  111. +30 −0 PhotoLibrary/PLVideo.h
  112. +23 −0 PhotoLibrary/PLVideoEditingOverlayView.h
  113. +35 −0 PhotoLibrary/PLVideoFileGroup.h
  114. +39 −0 PhotoLibrary/PLVideoInternal.h
  115. +46 −0 PhotoLibrary/PLVideoRemaker.h
  116. +41 −0 PhotoLibrary/PLVideoThumbnailGenerator.h
  117. +192 −0 PhotoLibrary/PLVideoView.h
  118. +33 −0 PhotoLibrary/PLVideoViewDelegate.h
  119. +138 −0 PhotoLibrary/PhotoLibrary-Structs.h
  120. +132 −0 PhotoLibrary/PhotoLibrary.h
  121. +20 −0 PhotoLibrary/TPCameraPushButton.h
  122. +15 −0 PhotoLibrary/TrimVideoNavigationItem.h
  123. +20 −0 PhotoLibrary/UIActionSheetDelegate.h
  124. +19 −0 PhotoLibrary/UIApplication.h
  125. +21 −0 PhotoLibrary/UIImagePickerCameraViewController.h
  126. +17 −0 PhotoLibrary/UIImagePickerControllerDelegate.h
  127. +20 −0 PhotoLibrary/UIModalViewDelegate.h
  128. +18 −0 PhotoLibrary/UIMovieScrubberDataSource.h
  129. +23 −0 PhotoLibrary/UIMovieScrubberDelegate.h
  130. +16 −0 PhotoLibrary/UINavigationControllerDelegate.h
  131. +24 −0 PhotoLibrary/UIScrollViewDelegate.h
  132. +25 −0 PhotoLibrary/UITableViewDataSource.h
  133. +34 −0 PhotoLibrary/UITableViewDelegate.h
  134. +22 −0 PhotoLibrary/UITextFieldDelegate.h
  135. +22 −0 PhotoLibrary/UITextViewDelegate.h
  136. +19 −0 PhotoLibrary/UIToolbarDelegate.h
  137. +16 −0 PhotoLibrary/UIView.h
  138. +20 −0 PhotoLibrary/UIViewController.h
  139. +54 −6 SpringBoardServices/SpringBoardServices.h
  140. +5 −5 UIKit/UIImage2.h
View
1  AppSupport/AppSupport.h
@@ -30,3 +30,4 @@
#import "PEPServiceConfiguration.h"
#import "InvocationTrampoline.h"
#import "CPDistributedMessagingCallout.h"
+#import "CPMIGServerSource.h"
View
58 AppSupport/CPMIGServerSource.h
@@ -0,0 +1,58 @@
+/*
+
+CPMIGServerSource.h ... Convenient function to receive Mach MIG messages.
+
+Copyright (c) 2009 KennyTM~ <kennytm@gmail.com>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+* 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.
+* Neither the name of the KennyTM~ nor the names of its contributors may be
+ used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT OWNER OR 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 APPSUPPORT_CPMIGSERVERSOURCE_H
+#define APPSUPPORT_CPMIGSERVERSOURCE_H
+
+#if __cplusplus
+extern "C" {
+#endif
+
+#include <CoreFoundation/CoreFoundation.h>
+#include <Availability.h> // for __OSX_AVAILABLE_STARTING.
+#include <mach/mig.h>
+
+ typedef CFRunLoopSourceRef CPMIGServerSourceRef;
+
+ CPMIGServerSourceRef CPCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t receivePort, CFIndex order);
+ CPMIGServerSourceRef CPCreateMIGServerSourceWithContext(mig_subsystem_t subsystem, mach_port_t receivePort, CFIndex order, void* context) __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_2_1);
+
+ mach_port_t CPGetMachPortForMIGServerSource(CPMIGServerSourceRef source);
+ void* CPGetContextForCalloutCurrentMIGServerSource(CPMIGServerSourceRef source) __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_2_1); ///< BUG: The context source is shared among the whole thread.
+
+ CPMIGServerSourceRef CPSHCreateMIGServerSource(void* unused1, CFIndex order, mig_subsystem_t subsystem, void* unused2, mach_port_t receivePort) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_NA, __MAC_NA, __IPHONE_2_0, __IPHONE_3_0);
+
+#if __cplusplus
+}
+#endif
+
+#endif
View
63 CoreFoundation/CFLogUtilities.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2009 Apple Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/* CFLogUtilities.h
+ Copyright (c) 2004-2009, Apple Inc. All rights reserved.
+*/
+
+/*
+ APPLE SPI: NOT TO BE USED OUTSIDE APPLE!
+*/
+
+#if !defined(__COREFOUNDATION_CFLOGUTILITIES__)
+#define __COREFOUNDATION_CFLOGUTILITIES__ 1
+
+#include <CoreFoundation/CFBase.h>
+#include <CoreFoundation/CFString.h>
+
+CF_EXTERN_C_BEGIN
+
+
+enum { // Legal level values for CFLog()
+ kCFLogLevelEmergency = 0,
+ kCFLogLevelAlert = 1,
+ kCFLogLevelCritical = 2,
+ kCFLogLevelError = 3,
+ kCFLogLevelWarning = 4,
+ kCFLogLevelNotice = 5,
+ kCFLogLevelInfo = 6,
+ kCFLogLevelDebug = 7,
+};
+
+CF_EXPORT void CFLog(int32_t level, CFStringRef format, ...);
+/* Passing in a level value which is outside the range of 0-7 will cause the the call to do nothing.
+ CFLog() logs the message using the asl.h API, and uses the level parameter as the log level.
+ Note that the asl subsystem ignores some log levels by default.
+ CFLog() is not fast, and is not going to be guaranteed to be fast.
+ Even "no-op" CFLogs are not necessarily fast.
+ If you care about performance, you shouldn't be logging.
+*/
+
+CF_EXTERN_C_END
+
+#endif /* ! __COREFOUNDATION_CFLOGUTILITIES__ */
+
View
29 GraphicsServices/GSEvent.h
@@ -37,6 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <mach/message.h>
#include <CoreFoundation/CoreFoundation.h>
#include <CoreGraphics/CoreGraphics.h>
+#include <Availability.h>
#if __cplusplus
extern "C" {
@@ -213,25 +214,25 @@ extern "C" {
GSEventRef GSEventCopy(GSEventRef event);
GSEventRef GSEventCreateWithEventRecord(const GSEventRecord* record);
- GSEventRef GSEventCreateWithTypeAndLocation(GSEventType type, CGPoint location);
- GSEventRef GSEventCreateWithPlist(CFDictionaryRef dictionary);
+ GSEventRef GSEventCreateWithTypeAndLocation(GSEventType type, CGPoint location) __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
+ GSEventRef GSEventCreateWithPlist(CFDictionaryRef dictionary) __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_2_2);
- const GSEventRecord* GSEventRecordGetRecordDataWithPlist(CFDictionaryRef plist);
- void GSEventRecordGetRecordWithPlist(GSEventRef event_to_fill, CFDictionaryRef plist);
- CFDictionaryRef GSEventCreatePlistRepresentation(GSEventRef event);
+ const GSEventRecord* GSEventRecordGetRecordDataWithPlist(CFDictionaryRef plist) __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_2_2);
+ void GSEventRecordGetRecordWithPlist(GSEventRef event_to_fill, CFDictionaryRef plist) __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_2_2);
+ CFDictionaryRef GSEventCreatePlistRepresentation(GSEventRef event) __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_2_2);
Boolean GSEventShouldRouteToFrontMost(GSEventRef event);
void GSEventRemoveShouldRouteToFrontMost(GSEventRef event);
GSEventType GSEventGetType(GSEventRef event);
GSEventSubType GSEventGetSubType(GSEventRef event);
- int GSEventGetWindowContextId(GSEventRef event);
+ int GSEventGetWindowContextId(GSEventRef event) __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
CGPoint GSEventGetLocationInWindow(GSEventRef event);
CGPoint GSEventGetOuterMostPathPosition(GSEventRef event);
CGPoint GSEventGetInnerMostPathPosition(GSEventRef event);
CFAbsoluteTime GSEventGetTimestamp(GSEventRef event);
GSWindowRef GSEventGetWindow(GSEventRef event);
- unsigned GSEventGetSenderPID(GSEventRef event);
+ unsigned GSEventGetSenderPID(GSEventRef event) __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
const GSEventRecord* _GSEventGetGSEventRecord(GSEventRef event);
@@ -243,7 +244,7 @@ extern "C" {
#pragma mark Event queue processing
Boolean GSEventQueueContainsMouseEvent();
- mach_port_t GSGetPurpleApplicationPort();
+ mach_port_t GSGetPurpleApplicationPort() __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
Boolean GSGetTimeEventHandling();
void GSSetTimeEventHandling(Boolean enable);
@@ -254,7 +255,7 @@ extern "C" {
mach_port_name_t GSRegisterPurpleNamedPort(const char* service_name);
mach_port_name_t GSCopyPurpleNamedPort(const char* service_name);
- mach_port_name_t GSGetPurpleSystemEventPort();
+ mach_port_name_t GSGetPurpleSystemEventPort() __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
void GSEventPopRunLoopMode(CFStringRef mode); ///< Stop the event run loop, and remove "mode" from the run loop mode stack if it is at the top.
void GSEventPushRunLoopMode(CFStringRef mode); ///< Stop the event run loop and push "mode" to the top of run loop mode stack.
@@ -268,7 +269,7 @@ extern "C" {
#pragma mark -
#pragma mark Sending events
void GSSendEvent(const GSEventRecord* record, mach_port_t port);
- void GSSendSimpleEvent(GSEventType type, mach_port_t port); ///< This calls GSSendEvent with an empty record.
+ void GSSendSimpleEvent(GSEventType type, mach_port_t port) __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0); ///< This calls GSSendEvent with an empty record.
void GSSendSystemEvent(const GSEventRecord* record); ///< Send event to the PurpleSystemEventPort.
#pragma mark -
@@ -279,7 +280,7 @@ extern "C" {
/// Register a callback function that will be called when PurpleEventCallback() is called.
void GSEventRegisterEventCallBack(void(*callback)(GSEventRef event));
void GSEventRegisterFindWindowCallBack(int(*callback)(CGPoint position));
- void GSEventRegisterTransformToWindowCoordsCallBack(void*);
+ void GSEventRegisterTransformToWindowCoordsCallBack(void*) __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
#pragma mark -
#pragma mark Touch events
@@ -287,8 +288,8 @@ extern "C" {
GSPathInfo GSEventGetPathInfoAtIndex(GSEventRef event, CFIndex index);
void GSEventSetPathInfoAtIndex(GSEventRef event, GSPathInfo pathInfo, CFIndex index);
- void GSEventSetHandInfoScale(GSEventRef event, CGFloat denominator);
- void GSEventChangeHandInfoToCancel(GSEventRef event);
+ void GSEventSetHandInfoScale(GSEventRef event, CGFloat denominator) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_NA,__MAC_NA,__IPHONE_2_0,__IPHONE_3_1);
+ void GSEventChangeHandInfoToCancel(GSEventRef event) __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
void GSEventDisableHandEventCoalescing(Boolean disableHandCoalescing);
@@ -357,7 +358,7 @@ extern "C" {
void GSSendApplicationSuspendedSettingsUpdatedEvent(int x, int y, CFStringRef suspendedDefaultPNG, CFStringRef roleID);
void GSSendApplicationSuspendedEvent(int x, int y, CFStringRef suspendedDefaultPNG, CFStringRef roleID);
- void GSEventFinishedActivating(Boolean b);
+ void GSEventFinishedActivating(Boolean b) __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
void GSEventSendApplicationOpenURL(CFURLRef url, mach_port_t port);
View
48 JavaScriptCore/JSBase.h
@@ -1,4 +1,3 @@
-// -*- mode: c++; c-basic-offset: 4 -*-
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
*
@@ -27,17 +26,22 @@
#ifndef JSBase_h
#define JSBase_h
+#ifndef __cplusplus
#include <stdbool.h>
+#endif
/* JavaScript engine interface */
+/*! @typedef JSContextGroupRef A group that associates JavaScript contexts with one another. Contexts in the same group may share and exchange JavaScript objects. */
+typedef const struct OpaqueJSContextGroup* JSContextGroupRef;
+
/*! @typedef JSContextRef A JavaScript execution context. Holds the global object and other execution state. */
typedef const struct OpaqueJSContext* JSContextRef;
/*! @typedef JSGlobalContextRef A global JavaScript execution context. A JSGlobalContext is a JSContext. */
typedef struct OpaqueJSContext* JSGlobalContextRef;
-/*! @typedef JSString A UTF16 character buffer. The fundamental string representation in JavaScript. */
+/*! @typedef JSStringRef A UTF16 character buffer. The fundamental string representation in JavaScript. */
typedef struct OpaqueJSString* JSStringRef;
/*! @typedef JSClassRef A JavaScript class. Used with JSObjectMake to construct objects with custom behavior. */
@@ -58,6 +62,21 @@ typedef const struct OpaqueJSValue* JSValueRef;
/*! @typedef JSObjectRef A JavaScript object. A JSObject is a JSValue. */
typedef struct OpaqueJSValue* JSObjectRef;
+/* JavaScript symbol exports */
+
+#undef JS_EXPORT
+#if defined(__GNUC__)
+ #define JS_EXPORT __attribute__((visibility("default")))
+#elif defined(WIN32) || defined(_WIN32)
+ /*
+ * TODO: Export symbols with JS_EXPORT when using MSVC.
+ * See http://bugs.webkit.org/show_bug.cgi?id=16227
+ */
+ #define JS_EXPORT
+#else
+ #define JS_EXPORT
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -65,7 +84,7 @@ extern "C" {
/* Script Evaluation */
/*!
-@function
+@function JSEvaluateScript
@abstract Evaluates a string of JavaScript.
@param ctx The execution context to use.
@param script A JSString containing the script to evaluate.
@@ -75,7 +94,7 @@ extern "C" {
@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
@result The JSValue that results from evaluating script, or NULL if an exception is thrown.
*/
-JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
+JS_EXPORT JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
/*!
@function JSCheckScriptSyntax
@@ -87,26 +106,25 @@ JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef th
@param exception A pointer to a JSValueRef in which to store a syntax error exception, if any. Pass NULL if you do not care to store a syntax error exception.
@result true if the script is syntactically correct, otherwise false.
*/
-bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
+JS_EXPORT bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
/*!
-@function
+@function JSGarbageCollect
@abstract Performs a JavaScript garbage collection.
-@param ctx This parameter is currently unused. Pass NULL.
+@param ctx The execution context to use.
@discussion JavaScript values that are on the machine stack, in a register,
protected by JSValueProtect, set as the global object of an execution context,
- or reachable from any such value will not be collected.
-
+ or reachable from any such value will not be collected.
+
During JavaScript execution, you are not required to call this function; the
- JavaScript engine will garbage collect as needed. One place you may want to call
- this function, however, is after releasing the last reference to a JSGlobalContextRef.
- At that point, a garbage collection can free the objects still referenced by the
- JSGlobalContextRef's global object, along with the global object itself.
+ JavaScript engine will garbage collect as needed. JavaScript values created
+ within a context group are automatically destroyed when the last reference
+ to the context group is released.
*/
-void JSGarbageCollect(JSContextRef ctx);
+JS_EXPORT void JSGarbageCollect(JSContextRef ctx);
#ifdef __cplusplus
}
#endif
-#endif // JSBase_h
+#endif /* JSBase_h */
View
67 JavaScriptCore/JSContextRef.h
@@ -1,4 +1,3 @@
-// -*- mode: c++; c-basic-offset: 4 -*-
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
*
@@ -29,8 +28,11 @@
#include <JavaScriptCore/JSObjectRef.h>
#include <JavaScriptCore/JSValueRef.h>
+#include <JavaScriptCore/WebKitAvailability.h>
+#ifndef __cplusplus
#include <stdbool.h>
+#endif
#ifdef __cplusplus
extern "C" {
@@ -38,14 +40,59 @@ extern "C" {
/*!
@function
+@abstract Creates a JavaScript context group.
+@discussion A JSContextGroup associates JavaScript contexts with one another.
+ Contexts in the same group may share and exchange JavaScript objects. Sharing and/or exchanging
+ JavaScript objects between contexts in different groups will produce undefined behavior.
+ When objects from the same context group are used in multiple threads, explicit
+ synchronization is required.
+@result The created JSContextGroup.
+*/
+JS_EXPORT JSContextGroupRef JSContextGroupCreate() AVAILABLE_AFTER_WEBKIT_VERSION_3_1;
+
+/*!
+@function
+@abstract Retains a JavaScript context group.
+@param group The JSContextGroup to retain.
+@result A JSContextGroup that is the same as group.
+*/
+JS_EXPORT JSContextGroupRef JSContextGroupRetain(JSContextGroupRef group) AVAILABLE_AFTER_WEBKIT_VERSION_3_1;
+
+/*!
+@function
+@abstract Releases a JavaScript context group.
+@param group The JSContextGroup to release.
+*/
+JS_EXPORT void JSContextGroupRelease(JSContextGroupRef group) AVAILABLE_AFTER_WEBKIT_VERSION_3_1;
+
+/*!
+@function
@abstract Creates a global JavaScript execution context.
@discussion JSGlobalContextCreate allocates a global object and populates it with all the
built-in JavaScript objects, such as Object, Function, String, and Array.
+
+ In WebKit version 4.0 and later, the context is created in a unique context group.
+ Therefore, scripts may execute in it concurrently with scripts executing in other contexts.
+ However, you may not use values created in the context in other contexts.
@param globalObjectClass The class to use when creating the global object. Pass
NULL to use the default object class.
@result A JSGlobalContext with a global object of class globalObjectClass.
*/
-JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass);
+JS_EXPORT JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass) AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER;
+
+/*!
+@function
+@abstract Creates a global JavaScript execution context in the context group provided.
+@discussion JSGlobalContextCreateInGroup allocates a global object and populates it with
+ all the built-in JavaScript objects, such as Object, Function, String, and Array.
+@param globalObjectClass The class to use when creating the global object. Pass
+ NULL to use the default object class.
+@param group The context group to use. The created global context retains the group.
+ Pass NULL to create a unique group for the context.
+@result A JSGlobalContext with a global object of class globalObjectClass and a context
+ group equal to group.
+*/
+JS_EXPORT JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClassRef globalObjectClass) AVAILABLE_AFTER_WEBKIT_VERSION_3_1;
/*!
@function
@@ -53,14 +100,14 @@ JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass);
@param ctx The JSGlobalContext to retain.
@result A JSGlobalContext that is the same as ctx.
*/
-JSGlobalContextRef JSGlobalContextRetain(JSGlobalContextRef ctx);
+JS_EXPORT JSGlobalContextRef JSGlobalContextRetain(JSGlobalContextRef ctx);
/*!
@function
@abstract Releases a global JavaScript execution context.
@param ctx The JSGlobalContext to release.
*/
-void JSGlobalContextRelease(JSGlobalContextRef ctx);
+JS_EXPORT void JSGlobalContextRelease(JSGlobalContextRef ctx);
/*!
@function
@@ -68,10 +115,18 @@ void JSGlobalContextRelease(JSGlobalContextRef ctx);
@param ctx The JSContext whose global object you want to get.
@result ctx's global object.
*/
-JSObjectRef JSContextGetGlobalObject(JSContextRef ctx);
+JS_EXPORT JSObjectRef JSContextGetGlobalObject(JSContextRef ctx);
+
+/*!
+@function
+@abstract Gets the context group to which a JavaScript execution context belongs.
+@param ctx The JSContext whose group you want to get.
+@result ctx's group.
+*/
+JS_EXPORT JSContextGroupRef JSContextGetGroup(JSContextRef ctx) AVAILABLE_AFTER_WEBKIT_VERSION_3_1;
#ifdef __cplusplus
}
#endif
-#endif // JSContextRef_h
+#endif /* JSContextRef_h */
View
117 JavaScriptCore/JSObjectRef.h
@@ -1,6 +1,6 @@
-// -*- mode: c++; c-basic-offset: 4 -*-
/*
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Kelvin W Sherlock (ksherlock@gmail.com)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -29,9 +29,12 @@
#include <JavaScriptCore/JSBase.h>
#include <JavaScriptCore/JSValueRef.h>
+#include <JavaScriptCore/WebKitAvailability.h>
+#ifndef __cplusplus
#include <stdbool.h>
-#include <stddef.h> // for size_t
+#endif
+#include <stddef.h> /* for size_t */
#ifdef __cplusplus
extern "C" {
@@ -186,7 +189,7 @@ typedef bool
@param accumulator A JavaScript property name accumulator in which to accumulate the names of object's properties.
@discussion If you named your function GetPropertyNames, you would declare it like this:
-void GetPropertyNames(JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef accumulator);
+void GetPropertyNames(JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames);
Property name accumulators are used by JSObjectCopyPropertyNames and JavaScript for...in loops.
@@ -338,7 +341,7 @@ Standard JavaScript practice calls for storing function objects in prototypes, s
A NULL callback specifies that the default object callback should substitute, except in the case of hasProperty, where it specifies that getProperty should substitute.
*/
typedef struct {
- int version; // current (and only) version is 0
+ int version; /* current (and only) version is 0 */
JSClassAttributes attributes;
const char* className;
@@ -368,7 +371,7 @@ typedef struct {
JSClassDefinition definition = kJSClassDefinitionEmpty;
definition.finalize = Finalize;
*/
-extern const JSClassDefinition kJSClassDefinitionEmpty;
+JS_EXPORT extern const JSClassDefinition kJSClassDefinitionEmpty;
/*!
@function
@@ -376,7 +379,7 @@ extern const JSClassDefinition kJSClassDefinitionEmpty;
@param definition A JSClassDefinition that defines the class.
@result A JSClass with the given definition. Ownership follows the Create Rule.
*/
-JSClassRef JSClassCreate(const JSClassDefinition* definition);
+JS_EXPORT JSClassRef JSClassCreate(const JSClassDefinition* definition);
/*!
@function
@@ -384,14 +387,14 @@ JSClassRef JSClassCreate(const JSClassDefinition* definition);
@param jsClass The JSClass to retain.
@result A JSClass that is the same as jsClass.
*/
-JSClassRef JSClassRetain(JSClassRef jsClass);
+JS_EXPORT JSClassRef JSClassRetain(JSClassRef jsClass);
/*!
@function
@abstract Releases a JavaScript class.
@param jsClass The JSClass to release.
*/
-void JSClassRelease(JSClassRef jsClass);
+JS_EXPORT void JSClassRelease(JSClassRef jsClass);
/*!
@function
@@ -404,7 +407,7 @@ void JSClassRelease(JSClassRef jsClass);
data is set on the created object before the intialize methods in its class chain are called. This enables the initialize methods to retrieve and manipulate data through JSObjectGetPrivate.
*/
-JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data);
+JS_EXPORT JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data);
/*!
@function
@@ -414,7 +417,7 @@ JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data);
@param callAsFunction The JSObjectCallAsFunctionCallback to invoke when the function is called.
@result A JSObject that is a function. The object's prototype will be the default function prototype.
*/
-JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name, JSObjectCallAsFunctionCallback callAsFunction);
+JS_EXPORT JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name, JSObjectCallAsFunctionCallback callAsFunction);
/*!
@function
@@ -425,7 +428,53 @@ JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name,
@result A JSObject that is a constructor. The object's prototype will be the default object prototype.
@discussion The default object constructor takes no arguments and constructs an object of class jsClass with no private data.
*/
-JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObjectCallAsConstructorCallback callAsConstructor);
+JS_EXPORT JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObjectCallAsConstructorCallback callAsConstructor);
+
+/*!
+ @function
+ @abstract Creates a JavaScript Array object.
+ @param ctx The execution context to use.
+ @param argumentCount An integer count of the number of arguments in arguments.
+ @param arguments A JSValue array of data to populate the Array with. Pass NULL if argumentCount is 0.
+ @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
+ @result A JSObject that is an Array.
+ @discussion The behavior of this function does not exactly match the behavior of the built-in Array constructor. Specifically, if one argument
+ is supplied, this function returns an array with one element.
+ */
+JS_EXPORT JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) AVAILABLE_AFTER_WEBKIT_VERSION_3_1;
+
+/*!
+ @function
+ @abstract Creates a JavaScript Date object, as if by invoking the built-in Date constructor.
+ @param ctx The execution context to use.
+ @param argumentCount An integer count of the number of arguments in arguments.
+ @param arguments A JSValue array of arguments to pass to the Date Constructor. Pass NULL if argumentCount is 0.
+ @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
+ @result A JSObject that is a Date.
+ */
+JS_EXPORT JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) AVAILABLE_AFTER_WEBKIT_VERSION_3_1;
+
+/*!
+ @function
+ @abstract Creates a JavaScript Error object, as if by invoking the built-in Error constructor.
+ @param ctx The execution context to use.
+ @param argumentCount An integer count of the number of arguments in arguments.
+ @param arguments A JSValue array of arguments to pass to the Error Constructor. Pass NULL if argumentCount is 0.
+ @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
+ @result A JSObject that is a Error.
+ */
+JS_EXPORT JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) AVAILABLE_AFTER_WEBKIT_VERSION_3_1;
+
+/*!
+ @function
+ @abstract Creates a JavaScript RegExp object, as if by invoking the built-in RegExp constructor.
+ @param ctx The execution context to use.
+ @param argumentCount An integer count of the number of arguments in arguments.
+ @param arguments A JSValue array of arguments to pass to the RegExp Constructor. Pass NULL if argumentCount is 0.
+ @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
+ @result A JSObject that is a RegExp.
+ */
+JS_EXPORT JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) AVAILABLE_AFTER_WEBKIT_VERSION_3_1;
/*!
@function
@@ -441,7 +490,7 @@ JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObje
@result A JSObject that is a function, or NULL if either body or parameterNames contains a syntax error. The object's prototype will be the default function prototype.
@discussion Use this method when you want to execute a script repeatedly, to avoid the cost of re-parsing the script before each execution.
*/
-JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
+JS_EXPORT JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception);
/*!
@function
@@ -450,7 +499,7 @@ JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned pa
@param object A JSObject whose prototype you want to get.
@result A JSValue that is the object's prototype.
*/
-JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object);
+JS_EXPORT JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object);
/*!
@function
@@ -459,7 +508,7 @@ JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object);
@param object The JSObject whose prototype you want to set.
@param value A JSValue to set as the object's prototype.
*/
-void JSObjectSetPrototype(JSContextRef ctx, JSObjectRef object, JSValueRef value);
+JS_EXPORT void JSObjectSetPrototype(JSContextRef ctx, JSObjectRef object, JSValueRef value);
/*!
@function
@@ -468,7 +517,7 @@ void JSObjectSetPrototype(JSContextRef ctx, JSObjectRef object, JSValueRef value
@param propertyName A JSString containing the property's name.
@result true if the object has a property whose name matches propertyName, otherwise false.
*/
-bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName);
+JS_EXPORT bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName);
/*!
@function
@@ -479,7 +528,7 @@ bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef prope
@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
@result The property's value if object has the property, otherwise the undefined value.
*/
-JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);
+JS_EXPORT JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);
/*!
@function
@@ -491,7 +540,7 @@ JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef
@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
@param attributes A logically ORed set of JSPropertyAttributes to give to the property.
*/
-void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes, JSValueRef* exception);
+JS_EXPORT void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes, JSValueRef* exception);
/*!
@function
@@ -502,7 +551,7 @@ void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef prope
@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
@result true if the delete operation succeeds, otherwise false (for example, if the property has the kJSPropertyAttributeDontDelete attribute set).
*/
-bool JSObjectDeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);
+JS_EXPORT bool JSObjectDeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);
/*!
@function
@@ -514,7 +563,7 @@ bool JSObjectDeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef pr
@result The property's value if object has the property, otherwise the undefined value.
@discussion Calling JSObjectGetPropertyAtIndex is equivalent to calling JSObjectGetProperty with a string containing propertyIndex, but JSObjectGetPropertyAtIndex provides optimized access to numeric properties.
*/
-JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef* exception);
+JS_EXPORT JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef* exception);
/*!
@function
@@ -526,7 +575,7 @@ JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsi
@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
@discussion Calling JSObjectSetPropertyAtIndex is equivalent to calling JSObjectSetProperty with a string containing propertyIndex, but JSObjectSetPropertyAtIndex provides optimized access to numeric properties.
*/
-void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef value, JSValueRef* exception);
+JS_EXPORT void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef value, JSValueRef* exception);
/*!
@function
@@ -534,7 +583,7 @@ void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned p
@param object A JSObject whose private data you want to get.
@result A void* that is the object's private data, if the object has private data, otherwise NULL.
*/
-void* JSObjectGetPrivate(JSObjectRef object);
+JS_EXPORT void* JSObjectGetPrivate(JSObjectRef object);
/*!
@function
@@ -544,7 +593,7 @@ void* JSObjectGetPrivate(JSObjectRef object);
@result true if object can store private data, otherwise false.
@discussion The default object class does not allocate storage for private data. Only objects created with a non-NULL JSClass can store private data.
*/
-bool JSObjectSetPrivate(JSObjectRef object, void* data);
+JS_EXPORT bool JSObjectSetPrivate(JSObjectRef object, void* data);
/*!
@function
@@ -553,7 +602,7 @@ bool JSObjectSetPrivate(JSObjectRef object, void* data);
@param object The JSObject to test.
@result true if the object can be called as a function, otherwise false.
*/
-bool JSObjectIsFunction(JSContextRef ctx, JSObjectRef object);
+JS_EXPORT bool JSObjectIsFunction(JSContextRef ctx, JSObjectRef object);
/*!
@function
@@ -566,7 +615,7 @@ bool JSObjectIsFunction(JSContextRef ctx, JSObjectRef object);
@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
@result The JSValue that results from calling object as a function, or NULL if an exception is thrown or object is not a function.
*/
-JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
+JS_EXPORT JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
/*!
@function
@@ -575,7 +624,7 @@ JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObject
@param object The JSObject to test.
@result true if the object can be called as a constructor, otherwise false.
*/
-bool JSObjectIsConstructor(JSContextRef ctx, JSObjectRef object);
+JS_EXPORT bool JSObjectIsConstructor(JSContextRef ctx, JSObjectRef object);
/*!
@function
@@ -587,16 +636,16 @@ bool JSObjectIsConstructor(JSContextRef ctx, JSObjectRef object);
@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
@result The JSObject that results from calling object as a constructor, or NULL if an exception is thrown or object is not a constructor.
*/
-JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
+JS_EXPORT JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
/*!
@function
@abstract Gets the names of an object's enumerable properties.
@param ctx The execution context to use.
@param object The object whose property names you want to get.
-@result A JSPropertyNameArray containing the names object's enumerable properties.
+@result A JSPropertyNameArray containing the names object's enumerable properties. Ownership follows the Create Rule.
*/
-JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef object);
+JS_EXPORT JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef object);
/*!
@function
@@ -604,14 +653,14 @@ JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef o
@param array The JSPropertyNameArray to retain.
@result A JSPropertyNameArray that is the same as array.
*/
-JSPropertyNameArrayRef JSPropertyNameArrayRetain(JSPropertyNameArrayRef array);
+JS_EXPORT JSPropertyNameArrayRef JSPropertyNameArrayRetain(JSPropertyNameArrayRef array);
/*!
@function
@abstract Releases a JavaScript property name array.
@param array The JSPropetyNameArray to release.
*/
-void JSPropertyNameArrayRelease(JSPropertyNameArrayRef array);
+JS_EXPORT void JSPropertyNameArrayRelease(JSPropertyNameArrayRef array);
/*!
@function
@@ -619,7 +668,7 @@ void JSPropertyNameArrayRelease(JSPropertyNameArrayRef array);
@param array The array from which to retrieve the count.
@result An integer count of the number of names in array.
*/
-size_t JSPropertyNameArrayGetCount(JSPropertyNameArrayRef array);
+JS_EXPORT size_t JSPropertyNameArrayGetCount(JSPropertyNameArrayRef array);
/*!
@function
@@ -628,7 +677,7 @@ size_t JSPropertyNameArrayGetCount(JSPropertyNameArrayRef array);
@param index The index of the property name to retrieve.
@result A JSStringRef containing the property name.
*/
-JSStringRef JSPropertyNameArrayGetNameAtIndex(JSPropertyNameArrayRef array, size_t index);
+JS_EXPORT JSStringRef JSPropertyNameArrayGetNameAtIndex(JSPropertyNameArrayRef array, size_t index);
/*!
@function
@@ -636,10 +685,10 @@ JSStringRef JSPropertyNameArrayGetNameAtIndex(JSPropertyNameArrayRef array, size
@param accumulator The accumulator object to which to add the property name.
@param propertyName The property name to add.
*/
-void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef accumulator, JSStringRef propertyName);
+JS_EXPORT void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef accumulator, JSStringRef propertyName);
#ifdef __cplusplus
}
#endif
-#endif // JSObjectRef_h
+#endif /* JSObjectRef_h */
View
29 JavaScriptCore/JSStringRef.h
@@ -1,4 +1,3 @@
-// -*- mode: c++; c-basic-offset: 4 -*-
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
*
@@ -29,18 +28,20 @@
#include <JavaScriptCore/JSValueRef.h>
+#ifndef __cplusplus
#include <stdbool.h>
-#include <stddef.h> // for size_t
+#endif
+#include <stddef.h> /* for size_t */
#ifdef __cplusplus
extern "C" {
#endif
+#if !defined(WIN32) && !defined(_WIN32)
/*!
@typedef JSChar
@abstract A Unicode character.
*/
-#if !defined(WIN32) && !defined(_WIN32)
typedef unsigned short JSChar;
#else
typedef wchar_t JSChar;
@@ -53,14 +54,14 @@ extern "C" {
@param numChars The number of characters to copy from the buffer pointed to by chars.
@result A JSString containing chars. Ownership follows the Create Rule.
*/
-JSStringRef JSStringCreateWithCharacters(const JSChar* chars, size_t numChars);
+JS_EXPORT JSStringRef JSStringCreateWithCharacters(const JSChar* chars, size_t numChars);
/*!
@function
@abstract Creates a JavaScript string from a null-terminated UTF8 string.
@param string The null-terminated UTF8 string to copy into the new JSString.
@result A JSString containing string. Ownership follows the Create Rule.
*/
-JSStringRef JSStringCreateWithUTF8CString(const char* string);
+JS_EXPORT JSStringRef JSStringCreateWithUTF8CString(const char* string);
/*!
@function
@@ -68,13 +69,13 @@ JSStringRef JSStringCreateWithUTF8CString(const char* string);
@param string The JSString to retain.
@result A JSString that is the same as string.
*/
-JSStringRef JSStringRetain(JSStringRef string);
+JS_EXPORT JSStringRef JSStringRetain(JSStringRef string);
/*!
@function
@abstract Releases a JavaScript string.
@param string The JSString to release.
*/
-void JSStringRelease(JSStringRef string);
+JS_EXPORT void JSStringRelease(JSStringRef string);
/*!
@function
@@ -82,7 +83,7 @@ void JSStringRelease(JSStringRef string);
@param string The JSString whose length (in Unicode characters) you want to know.
@result The number of Unicode characters stored in string.
*/
-size_t JSStringGetLength(JSStringRef string);
+JS_EXPORT size_t JSStringGetLength(JSStringRef string);
/*!
@function
@abstract Returns a pointer to the Unicode character buffer that
@@ -91,7 +92,7 @@ size_t JSStringGetLength(JSStringRef string);
@result A pointer to the Unicode character buffer that serves as string's
backing store, which will be deallocated when string is deallocated.
*/
-const JSChar* JSStringGetCharactersPtr(JSStringRef string);
+JS_EXPORT const JSChar* JSStringGetCharactersPtr(JSStringRef string);
/*!
@function
@@ -103,7 +104,7 @@ const JSChar* JSStringGetCharactersPtr(JSStringRef string);
null-terminated UTF8 string. The number of bytes that the conversion actually ends
up requiring could be less than this, but never more.
*/
-size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string);
+JS_EXPORT size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string);
/*!
@function
@abstract Converts a JavaScript string into a null-terminated UTF8 string,
@@ -117,7 +118,7 @@ size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string);
@param bufferSize The size of the external buffer in bytes.
@result The number of bytes written into buffer (including the null-terminator byte).
*/
-size_t JSStringGetUTF8CString(JSStringRef string, char* buffer, size_t bufferSize);
+JS_EXPORT size_t JSStringGetUTF8CString(JSStringRef string, char* buffer, size_t bufferSize);
/*!
@function
@@ -126,7 +127,7 @@ size_t JSStringGetUTF8CString(JSStringRef string, char* buffer, size_t bufferSiz
@param b The second JSString to test.
@result true if the two strings match, otherwise false.
*/
-bool JSStringIsEqual(JSStringRef a, JSStringRef b);
+JS_EXPORT bool JSStringIsEqual(JSStringRef a, JSStringRef b);
/*!
@function
@abstract Tests whether a JavaScript string matches a null-terminated UTF8 string.
@@ -134,10 +135,10 @@ bool JSStringIsEqual(JSStringRef a, JSStringRef b);
@param b The null-terminated UTF8 string to test.
@result true if the two strings match, otherwise false.
*/
-bool JSStringIsEqualToUTF8CString(JSStringRef a, const char* b);
+JS_EXPORT bool JSStringIsEqualToUTF8CString(JSStringRef a, const char* b);
#ifdef __cplusplus
}
#endif
-#endif // JSStringRef_h
+#endif /* JSStringRef_h */
View
11 JavaScriptCore/JSStringRefCF.h
@@ -1,4 +1,3 @@
-// -*- mode: c++; c-basic-offset: 4 -*-
/*
* Copyright (C) 2006, 2007 Apple Computer, Inc. All rights reserved.
*
@@ -34,7 +33,7 @@
extern "C" {
#endif
-// CFString convenience methods
+/* CFString convenience methods */
/*!
@function
@@ -44,7 +43,7 @@ extern "C" {
@param string The CFString to copy into the new JSString.
@result A JSString containing string. Ownership follows the Create Rule.
*/
-JSStringRef JSStringCreateWithCFString(CFStringRef string);
+JS_EXPORT JSStringRef JSStringCreateWithCFString(CFStringRef string);
/*!
@function
@abstract Creates a CFString from a JavaScript string.
@@ -52,10 +51,10 @@ JSStringRef JSStringCreateWithCFString(CFStringRef string);
@param string The JSString to copy into the new CFString.
@result A CFString containing string. Ownership follows the Create Rule.
*/
-CFStringRef JSStringCopyCFString(CFAllocatorRef alloc, JSStringRef string);
-
+JS_EXPORT CFStringRef JSStringCopyCFString(CFAllocatorRef alloc, JSStringRef string);
+
#ifdef __cplusplus
}
#endif
-#endif // JSStringRefCF_h
+#endif /* JSStringRefCF_h */
View
59 JavaScriptCore/JSValueRef.h
@@ -1,4 +1,3 @@
-// -*- mode: c++; c-basic-offset: 4 -*-
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
*
@@ -29,7 +28,9 @@
#include <JavaScriptCore/JSBase.h>
+#ifndef __cplusplus
#include <stdbool.h>
+#endif
/*!
@enum JSType
@@ -61,7 +62,7 @@ extern "C" {
@param value The JSValue whose type you want to obtain.
@result A value of type JSType that identifies value's type.
*/
-JSType JSValueGetType(JSContextRef ctx, JSValueRef value);
+JS_EXPORT JSType JSValueGetType(JSContextRef ctx, JSValueRef value);
/*!
@function
@@ -70,7 +71,7 @@ JSType JSValueGetType(JSContextRef ctx, JSValueRef value);
@param value The JSValue to test.
@result true if value's type is the undefined type, otherwise false.
*/
-bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value);
+JS_EXPORT bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value);
/*!
@function
@@ -79,7 +80,7 @@ bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value);
@param value The JSValue to test.
@result true if value's type is the null type, otherwise false.
*/
-bool JSValueIsNull(JSContextRef ctx, JSValueRef value);
+JS_EXPORT bool JSValueIsNull(JSContextRef ctx, JSValueRef value);
/*!
@function
@@ -88,7 +89,7 @@ bool JSValueIsNull(JSContextRef ctx, JSValueRef value);
@param value The JSValue to test.
@result true if value's type is the boolean type, otherwise false.
*/
-bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value);
+JS_EXPORT bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value);
/*!
@function
@@ -97,7 +98,7 @@ bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value);
@param value The JSValue to test.
@result true if value's type is the number type, otherwise false.
*/
-bool JSValueIsNumber(JSContextRef ctx, JSValueRef value);
+JS_EXPORT bool JSValueIsNumber(JSContextRef ctx, JSValueRef value);
/*!
@function
@@ -106,7 +107,7 @@ bool JSValueIsNumber(JSContextRef ctx, JSValueRef value);
@param value The JSValue to test.
@result true if value's type is the string type, otherwise false.
*/
-bool JSValueIsString(JSContextRef ctx, JSValueRef value);
+JS_EXPORT bool JSValueIsString(JSContextRef ctx, JSValueRef value);
/*!
@function
@@ -115,7 +116,7 @@ bool JSValueIsString(JSContextRef ctx, JSValueRef value);
@param value The JSValue to test.
@result true if value's type is the object type, otherwise false.
*/
-bool JSValueIsObject(JSContextRef ctx, JSValueRef value);
+JS_EXPORT bool JSValueIsObject(JSContextRef ctx, JSValueRef value);
/*!
@function
@@ -125,9 +126,9 @@ bool JSValueIsObject(JSContextRef ctx, JSValueRef value);
@param jsClass The JSClass to test against.
@result true if value is an object and has jsClass in its class chain, otherwise false.
*/
-bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsClass);
+JS_EXPORT bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsClass);
-// Comparing values
+/* Comparing values */
/*!
@function
@@ -138,7 +139,7 @@ bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsCla
@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
@result true if the two values are equal, false if they are not equal or an exception is thrown.
*/
-bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* exception);
+JS_EXPORT bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* exception);
/*!
@function
@@ -148,20 +149,20 @@ bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* ex
@param b The second value to test.
@result true if the two values are strict equal, otherwise false.
*/
-bool JSValueIsStrictEqual(JSContextRef ctx, JSValueRef a, JSValueRef b);
+JS_EXPORT bool JSValueIsStrictEqual(JSContextRef ctx, JSValueRef a, JSValueRef b);
/*!
@function
@abstract Tests whether a JavaScript value is an object constructed by a given constructor, as compared by the JS instanceof operator.
@param ctx The execution context to use.
@param value The JSValue to test.
-@param object The constructor to test against.
+@param constructor The constructor to test against.
@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
@result true if value is an object constructed by constructor, as compared by the JS instanceof operator, otherwise false.
*/
-bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObjectRef constructor, JSValueRef* exception);
+JS_EXPORT bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObjectRef constructor, JSValueRef* exception);
-// Creating values
+/* Creating values */
/*!
@function
@@ -169,7 +170,7 @@ bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObject
@param ctx The execution context to use.
@result The unique undefined value.
*/
-JSValueRef JSValueMakeUndefined(JSContextRef ctx);
+JS_EXPORT JSValueRef JSValueMakeUndefined(JSContextRef ctx);
/*!
@function
@@ -177,7 +178,7 @@ JSValueRef JSValueMakeUndefined(JSContextRef ctx);
@param ctx The execution context to use.
@result The unique null value.
*/
-JSValueRef JSValueMakeNull(JSContextRef ctx);
+JS_EXPORT JSValueRef JSValueMakeNull(JSContextRef ctx);
/*!
@function
@@ -186,7 +187,7 @@ JSValueRef JSValueMakeNull(JSContextRef ctx);
@param boolean The bool to assign to the newly created JSValue.
@result A JSValue of the boolean type, representing the value of boolean.
*/
-JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool boolean);
+JS_EXPORT JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool boolean);
/*!
@function
@@ -195,7 +196,7 @@ JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool boolean);
@param number The double to assign to the newly created JSValue.
@result A JSValue of the number type, representing the value of number.
*/
-JSValueRef JSValueMakeNumber(JSContextRef ctx, double number);
+JS_EXPORT JSValueRef JSValueMakeNumber(JSContextRef ctx, double number);
/*!
@function
@@ -205,9 +206,9 @@ JSValueRef JSValueMakeNumber(JSContextRef ctx, double number);
newly created JSValue retains string, and releases it upon garbage collection.
@result A JSValue of the string type, representing the value of string.
*/
-JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string);
+JS_EXPORT JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string);
-// Converting to primitive values
+/* Converting to primitive values */
/*!
@function
@@ -216,7 +217,7 @@ JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string);
@param value The JSValue to convert.
@result The boolean result of conversion.
*/
-bool JSValueToBoolean(JSContextRef ctx, JSValueRef value);
+JS_EXPORT bool JSValueToBoolean(JSContextRef ctx, JSValueRef value);
/*!
@function
@@ -226,7 +227,7 @@ bool JSValueToBoolean(JSContextRef ctx, JSValueRef value);
@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
@result The numeric result of conversion, or NaN if an exception is thrown.
*/
-double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception);
+JS_EXPORT double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception);
/*!
@function
@@ -236,7 +237,7 @@ double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception
@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
@result A JSString with the result of conversion, or NULL if an exception is thrown. Ownership follows the Create Rule.
*/
-JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* exception);
+JS_EXPORT JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* exception);
/*!
@function
@@ -246,9 +247,9 @@ JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef*
@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
@result The JSObject result of conversion, or NULL if an exception is thrown.
*/
-JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exception);
+JS_EXPORT JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exception);
-// Garbage collection
+/* Garbage collection */
/*!
@function
@abstract Protects a JavaScript value from garbage collection.
@@ -258,7 +259,7 @@ JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exce
A value may be protected multiple times and must be unprotected an equal number of times before becoming eligible for garbage collection.
*/
-void JSValueProtect(JSContextRef ctx, JSValueRef value);
+JS_EXPORT void JSValueProtect(JSContextRef ctx, JSValueRef value);
/*!
@function
@@ -268,10 +269,10 @@ void JSValueProtect(JSContextRef ctx, JSValueRef value);
@discussion A value may be protected multiple times and must be unprotected an
equal number of times before becoming eligible for garbage collection.
*/
-void JSValueUnprotect(JSContextRef ctx, JSValueRef value);
+JS_EXPORT void JSValueUnprotect(JSContextRef ctx, JSValueRef value);
#ifdef __cplusplus
}
#endif
-#endif // JSValueRef_h
+#endif /* JSValueRef_h */
View
1  JavaScriptCore/JavaScript.h
View
763 JavaScriptCore/WebKitAvailability.h
@@ -0,0 +1,763 @@
+/*
+ * Copyright (C) 2008 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. ``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
+ * 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 __WebKitAvailability__
+#define __WebKitAvailability__
+
+/* The structure of this header is based on AvailabilityMacros.h. The major difference is that the availability
+ macros are defined in terms of WebKit version numbers rather than Mac OS X system version numbers, as WebKit
+ releases span multiple versions of Mac OS X.
+*/
+
+#define WEBKIT_VERSION_1_0 0x0100
+#define WEBKIT_VERSION_1_1 0x0110
+#define WEBKIT_VERSION_1_2 0x0120
+#define WEBKIT_VERSION_1_3 0x0130
+#define WEBKIT_VERSION_2_0 0x0200
+#define WEBKIT_VERSION_3_0 0x0300
+#define WEBKIT_VERSION_3_1 0x0310
+#define WEBKIT_VERSION_LATEST 0x9999
+
+#ifdef __APPLE__
+#import <AvailabilityMacros.h>
+#else
+/*
+ * For non-Mac platforms, require the newest version.
+ */
+#define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_LATEST
+/*
+ * only certain compilers support __attribute__((deprecated))
+ */
+#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
+ #define DEPRECATED_ATTRIBUTE __attribute__((deprecated))
+#else
+ #define DEPRECATED_ATTRIBUTE
+#endif
+#endif
+
+/* The versions of GCC that shipped with Xcode prior to 3.0 (GCC build number < 5400) did not support attributes on methods.
+ If we are building with one of these versions, we need to omit the attribute. We achieve this by wrapping the annotation
+ in WEBKIT_OBJC_METHOD_ANNOTATION, which will remove the annotation when an old version of GCC is in use and will otherwise
+ expand to the annotation. The same is needed for protocol methods.
+*/
+#if defined(__APPLE_CC__) && __APPLE_CC__ < 5400
+ #define WEBKIT_OBJC_METHOD_ANNOTATION(ANNOTATION)
+#else
+ #define WEBKIT_OBJC_METHOD_ANNOTATION(ANNOTATION) ANNOTATION
+#endif
+
+
+/* If minimum WebKit version is not specified, assume the version that shipped with the target Mac OS X version */
+#ifndef WEBKIT_VERSION_MIN_REQUIRED
+ #if !defined(MAC_OS_X_VERSION_10_2) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_2
+ #error WebKit was not available prior to Mac OS X 10.2
+ #elif !defined(MAC_OS_X_VERSION_10_3) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3
+ /* WebKit 1.0 is the only version available on Mac OS X 10.2. */
+ #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_1_0
+ #elif !defined(MAC_OS_X_VERSION_10_4) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4
+ /* WebKit 1.1 is the version that shipped on Mac OS X 10.3. */
+ #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_1_1
+ #elif !defined(MAC_OS_X_VERSION_10_5) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
+ /* WebKit 2.0 is the version that shipped on Mac OS X 10.4. */
+ #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_2_0
+ #elif !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6
+ /* WebKit 3.0 is the version that shipped on Mac OS X 10.5. */
+ #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_3_0
+ #else
+ #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_LATEST
+ #endif
+#endif
+
+
+/* If maximum WebKit version is not specified, assume largerof(latest, minimum) */
+#ifndef WEBKIT_VERSION_MAX_ALLOWED
+ #if WEBKIT_VERSION_MIN_REQUIRED > WEBKIT_VERSION_LATEST
+ #define WEBKIT_VERSION_MAX_ALLOWED WEBKIT_VERSION_MIN_REQUIRED
+ #else
+ #define WEBKIT_VERSION_MAX_ALLOWED WEBKIT_VERSION_LATEST
+ #endif
+#endif
+
+
+/* Sanity check the configured values */
+#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_MIN_REQUIRED
+ #error WEBKIT_VERSION_MAX_ALLOWED must be >= WEBKIT_VERSION_MIN_REQUIRED
+#endif
+#if WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_0
+ #error WEBKIT_VERSION_MIN_REQUIRED must be >= WEBKIT_VERSION_1_0
+#endif
+
+
+
+
+
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER
+ *
+ * Used on functions introduced in WebKit 1.0
+ */
+#define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on functions introduced in WebKit 1.0,
+ * and deprecated in WebKit 1.0
+ */
+#define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
+
+/*
+ * DEPRECATED_IN_WEBKIT_VERSION_1_0_AND_LATER
+ *
+ * Used on types deprecated in WebKit 1.0
+ */
+#define DEPRECATED_IN_WEBKIT_VERSION_1_0_AND_LATER DEPRECATED_ATTRIBUTE
+
+
+
+
+
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER
+ *
+ * Used on declarations introduced in WebKit 1.1
+ */
+#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_1_1
+ #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER UNAVAILABLE_ATTRIBUTE
+#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_1
+ #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER WEAK_IMPORT_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in WebKit 1.1,
+ * and deprecated in WebKit 1.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_1
+ #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_1
+ *
+ * Used on declarations introduced in WebKit 1.0,
+ * but later deprecated in WebKit 1.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_1
+ #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_1 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_1 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_WEBKIT_VERSION_1_1_AND_LATER
+ *
+ * Used on types deprecated in WebKit 1.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_1
+ #define DEPRECATED_IN_WEBKIT_VERSION_1_1_AND_LATER DEPRECATED_ATTRIBUTE
+#else
+ #define DEPRECATED_IN_WEBKIT_VERSION_1_1_AND_LATER
+#endif
+
+
+
+
+
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER
+ *
+ * Used on declarations introduced in WebKit 1.2
+ */
+#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_1_2
+ #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER UNAVAILABLE_ATTRIBUTE
+#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_2
+ #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER WEAK_IMPORT_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in WebKit 1.2,
+ * and deprecated in WebKit 1.2
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2
+ #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2
+ *
+ * Used on declarations introduced in WebKit 1.0,
+ * but later deprecated in WebKit 1.2
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2
+ #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2
+ *
+ * Used on declarations introduced in WebKit 1.1,
+ * but later deprecated in WebKit 1.2
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2
+ #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_WEBKIT_VERSION_1_2_AND_LATER
+ *
+ * Used on types deprecated in WebKit 1.2
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2
+ #define DEPRECATED_IN_WEBKIT_VERSION_1_2_AND_LATER DEPRECATED_ATTRIBUTE
+#else
+ #define DEPRECATED_IN_WEBKIT_VERSION_1_2_AND_LATER
+#endif
+
+
+
+
+
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER
+ *
+ * Used on declarations introduced in WebKit 1.3
+ */
+#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_1_3
+ #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER UNAVAILABLE_ATTRIBUTE
+#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_3
+ #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER WEAK_IMPORT_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in WebKit 1.3,
+ * and deprecated in WebKit 1.3
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3
+ #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3
+ *
+ * Used on declarations introduced in WebKit 1.0,
+ * but later deprecated in WebKit 1.3
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3
+ #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3
+ *
+ * Used on declarations introduced in WebKit 1.1,
+ * but later deprecated in WebKit 1.3
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3
+ #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3
+ *
+ * Used on declarations introduced in WebKit 1.2,
+ * but later deprecated in WebKit 1.3
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3
+ #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_WEBKIT_VERSION_1_3_AND_LATER
+ *
+ * Used on types deprecated in WebKit 1.3
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3
+ #define DEPRECATED_IN_WEBKIT_VERSION_1_3_AND_LATER DEPRECATED_ATTRIBUTE
+#else
+ #define DEPRECATED_IN_WEBKIT_VERSION_1_3_AND_LATER
+#endif
+
+
+
+
+
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER
+ *
+ * Used on declarations introduced in WebKit 2.0
+ */
+#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_2_0
+ #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER UNAVAILABLE_ATTRIBUTE
+#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_2_0
+ #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER WEAK_IMPORT_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in WebKit 2.0,
+ * and deprecated in WebKit 2.0
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0
+ #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0
+ *
+ * Used on declarations introduced in WebKit 1.0,
+ * but later deprecated in WebKit 2.0
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0
+ #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0
+ *
+ * Used on declarations introduced in WebKit 1.1,
+ * but later deprecated in WebKit 2.0
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0
+ #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0
+ *
+ * Used on declarations introduced in WebKit 1.2,
+ * but later deprecated in WebKit 2.0
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0
+ #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0
+ *
+ * Used on declarations introduced in WebKit 1.3,
+ * but later deprecated in WebKit 2.0
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0
+ #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_WEBKIT_VERSION_2_0_AND_LATER
+ *
+ * Used on types deprecated in WebKit 2.0
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0
+ #define DEPRECATED_IN_WEBKIT_VERSION_2_0_AND_LATER DEPRECATED_ATTRIBUTE
+#else
+ #define DEPRECATED_IN_WEBKIT_VERSION_2_0_AND_LATER
+#endif
+
+
+
+
+
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER
+ *
+ * Used on declarations introduced in WebKit 3.0
+ */
+#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_3_0
+ #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER UNAVAILABLE_ATTRIBUTE
+#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_3_0
+ #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER WEAK_IMPORT_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in WebKit 3.0,
+ * and deprecated in WebKit 3.0
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0
+ #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0
+ *
+ * Used on declarations introduced in WebKit 1.0,
+ * but later deprecated in WebKit 3.0
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0
+ #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0
+ *
+ * Used on declarations introduced in WebKit 1.1,
+ * but later deprecated in WebKit 3.0
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0
+ #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0
+ *
+ * Used on declarations introduced in WebKit 1.2,
+ * but later deprecated in WebKit 3.0
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0
+ #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0
+ *
+ * Used on declarations introduced in WebKit 1.3,
+ * but later deprecated in WebKit 3.0
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0
+ #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0
+ *
+ * Used on declarations introduced in WebKit 2.0,
+ * but later deprecated in WebKit 3.0
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0
+ #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_WEBKIT_VERSION_3_0_AND_LATER
+ *
+ * Used on types deprecated in WebKit 3.0
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0
+ #define DEPRECATED_IN_WEBKIT_VERSION_3_0_AND_LATER DEPRECATED_ATTRIBUTE
+#else
+ #define DEPRECATED_IN_WEBKIT_VERSION_3_0_AND_LATER
+#endif
+
+
+
+
+
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER
+ *
+ * Used on declarations introduced in WebKit 3.1
+ */
+#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_3_1
+ #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER UNAVAILABLE_ATTRIBUTE
+#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_3_1
+ #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER WEAK_IMPORT_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in WebKit 3.1,
+ * and deprecated in WebKit 3.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1
+ #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1
+ *
+ * Used on declarations introduced in WebKit 1.0,
+ * but later deprecated in WebKit 3.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1
+ #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1
+ *
+ * Used on declarations introduced in WebKit 1.1,
+ * but later deprecated in WebKit 3.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1
+ #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1
+ *
+ * Used on declarations introduced in WebKit 1.2,
+ * but later deprecated in WebKit 3.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1
+ #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1
+ *
+ * Used on declarations introduced in WebKit 1.3,
+ * but later deprecated in WebKit 3.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1
+ #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1
+ *
+ * Used on declarations introduced in WebKit 2.0,
+ * but later deprecated in WebKit 3.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1
+ #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1
+ *
+ * Used on declarations introduced in WebKit 3.0,
+ * but later deprecated in WebKit 3.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1
+ #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_WEBKIT_VERSION_3_1_AND_LATER
+ *
+ * Used on types deprecated in WebKit 3.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1
+ #define DEPRECATED_IN_WEBKIT_VERSION_3_1_AND_LATER DEPRECATED_ATTRIBUTE
+#else
+ #define DEPRECATED_IN_WEBKIT_VERSION_3_1_AND_LATER
+#endif
+
+
+
+
+
+
+/*
+ * AVAILABLE_AFTER_WEBKIT_VERSION_3_1
+ *
+ * Used on declarations introduced after WebKit 3.1
+ */
+#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_LATEST
+ #define AVAILABLE_AFTER_WEBKIT_VERSION_3_1 UNAVAILABLE_ATTRIBUTE
+#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_LATEST
+ #define AVAILABLE_AFTER_WEBKIT_VERSION_3_1 WEAK_IMPORT_ATTRIBUTE
+#else
+ #define AVAILABLE_AFTER_WEBKIT_VERSION_3_1
+#endif
+
+/*
+ * AVAILABLE_AFTER_WEBKIT_VERSION_3_1_BUT_DEPRECATED
+ *
+ * Used on declarations introduced after WebKit 3.1,
+ * and deprecated after WebKit 3.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST
+ #define AVAILABLE_AFTER_WEBKIT_VERSION_3_1_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_AFTER_WEBKIT_VERSION_3_1_BUT_DEPRECATED AVAILABLE_AFTER_WEBKIT_VERSION_3_1
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1
+ *
+ * Used on declarations introduced in WebKit 1.0,
+ * but later deprecated after WebKit 3.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST
+ #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1
+ *
+ * Used on declarations introduced in WebKit 1.1,
+ * but later deprecated after WebKit 3.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST
+ #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1
+ *
+ * Used on declarations introduced in WebKit 1.2,
+ * but later deprecated after WebKit 3.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST
+ #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1
+ *
+ * Used on declarations introduced in WebKit 1.3,
+ * but later deprecated after WebKit 3.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST
+ #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1
+ *
+ * Used on declarations introduced in WebKit 2.0,
+ * but later deprecated after WebKit 3.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST
+ #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1
+ *
+ * Used on declarations introduced in WebKit 3.0,
+ * but later deprecated after WebKit 3.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST
+ #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1
+ *
+ * Used on declarations introduced in WebKit 3.1,
+ * but later deprecated after WebKit 3.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST
+ #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE
+#else
+ #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_AFTER_WEBKIT_VERSION_3_1
+ *
+ * Used on types deprecated after WebKit 3.1
+ */
+#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST
+ #define DEPRECATED_AFTER_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE
+#else
+ #define DEPRECATED_AFTER_WEBKIT_VERSION_3_1
+#endif
+
+
+#endif /* __WebKitAvailability__ */
View
18 PhotoLibrary/CLLocationManagerDelegate.h
@@ -0,0 +1,18 @@
+/**
+ * This header is generated by class-dump-z 0.2-0.
+ * class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3.
+ *
+ * Source: /System/Library/PrivateFrameworks/PhotoLibrary.framework/PhotoLibrary
+ */
+
+#import "NSObject.h"
+
+
+@protocol CLLocationManagerDelegate <NSObject>
+@optional
+-(void)locationManager:(id)manager didUpdateToLocation:(id)location fromLocation:(id)location3;
+-(void)locationManager:(id)manager didUpdateHeading:(id)heading;
+-(BOOL)locationManagerShouldDisplayHeadingCalibration:(id)locationManager;
+-(void)locationManager:(id)manager didFailWithError:(id)error;
+@end
+
View
34 PhotoLibrary/MLPhoto.h
@@ -0,0 +1,34 @@
+/**
+ * This header is generated by class-dump-z 0.2-0.
+ * class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3.
+ *
+ * Source: /System/Library/PrivateFrameworks/PhotoLibrary.framework/PhotoLibrary
+ */
+
+#import "PhotoLibrary-Structs.h"
+#import <MusicLibrary/MLPhoto.h>
+
+
+@interface MLPhoto (PhotosAdditions)
++(CGImageRef)createAndSaveIconForWallpaperImage:(id)wallpaperImage;
++(CGImageRef)createUnrotatedImageWithSize:(CGSize)size originalImage:(CGImageRef)image imageOrientation:(int)orientation;
+-(id)thumbnailImage;
+-(CGImageRef)createThumbnailCGImageRef;
+-(CGImageRef)createFullScreenCGImageRef:(int*)ref properties:(const CFDictionaryRef*)properties;
+-(CGImageRef)createFullSizeCGImageRefForImagePickerClient:(int*)imagePickerClient;
+-(CGImageRef)createFullSizeCGImageRef:(int*)ref;
+-(CGImageRef)createLowResolutionFullScreenCGImageRef;
+-(BOOL)hasFullSizeImage;
+-(CFDataRef)createEmailImageDataWithLargeImage:(id)largeImage imageToAnimate:(CGImageRef*)animate scaledImage:(CGImageRef*)image maximumSize:(CGSize)size;
+-(void)copyToPasteboard;
+@end
+
+@interface MLPhoto (VideoAdditions)
+-(id)previewFrameImageFromDatabase;