2 WebKitSystemInterface.h
3 Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
8 #import <Cocoa/Cocoa.h>
9 #import <Carbon/Carbon.h>
10 #import <dispatch/dispatch.h>
20 typedef struct _CFURLResponse* CFURLResponseRef;
21 typedef const struct _CFURLRequest* CFURLRequestRef;
22 typedef struct _CFURLRequest* CFMutableURLRequestRef;
24 typedef struct _CFURLCredential* WKCFURLCredentialRef;
25 typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
28 WKCertificateParseResultSucceeded = 0,
29 WKCertificateParseResultFailed = 1,
30 WKCertificateParseResultPKCS7 = 2,
31 } WKCertificateParseResult;
33 CFStringRef WKCopyCFLocalizationPreferredName(CFStringRef localization);
34 void WKSetDefaultLocalization(CFStringRef localization);
36 CFStringRef WKSignedPublicKeyAndChallengeString(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription);
37 WKCertificateParseResult WKAddCertificatesToKeychainFromData(const void *bytes, unsigned length);
39 NSString *WKGetPreferredExtensionForMIMEType(NSString *type);
40 NSArray *WKGetExtensionsForMIMEType(NSString *type);
41 NSString *WKGetMIMETypeForExtension(NSString *extension);
43 NSDate *WKGetNSURLResponseLastModifiedDate(NSURLResponse *response);
44 NSString *WKCopyNSURLResponseStatusLine(NSURLResponse *response);
46 CFArrayRef WKCopyNSURLResponseCertificateChain(NSURLResponse *response);
48 CFStringEncoding WKGetWebDefaultCFStringEncoding(void);
50 void WKSetMetadataURL(NSString *URLString, NSString *referrer, NSString *path);
51 void WKSetNSURLConnectionDefersCallbacks(NSURLConnection *connection, BOOL defers);
53 void WKShowKeyAndMain(void);
55 OSStatus WKSyncWindowWithCGAfterMove(WindowRef);
56 unsigned WKCarbonWindowMask(void);
57 void *WKGetNativeWindowFromWindowRef(WindowRef);
58 OSType WKCarbonWindowPropertyCreator(void);
59 OSType WKCarbonWindowPropertyTag(void);
62 void WKDisableCGDeferredUpdates(void);
64 Class WKNSURLProtocolClassForRequest(NSURLRequest *request);
65 void WKSetNSURLRequestShouldContentSniff(NSMutableURLRequest *request, BOOL shouldContentSniff);
68 unsigned WKGetNSAutoreleasePoolCount(void);
71 void WKAdvanceDefaultButtonPulseAnimation(NSButtonCell *button);
73 NSString *WKMouseMovedNotification(void);
74 NSString *WKWindowWillOrderOnScreenNotification(void);
75 NSString *WKWindowWillOrderOffScreenNotification(void);
76 void WKSetNSWindowShouldPostEventNotifications(NSWindow *window, BOOL post);
78 CFTypeID WKGetAXTextMarkerTypeID(void);
79 CFTypeID WKGetAXTextMarkerRangeTypeID(void);
80 CFTypeRef WKCreateAXTextMarker(const void *bytes, size_t len);
81 BOOL WKGetBytesFromAXTextMarker(CFTypeRef textMarker, void *bytes, size_t length);
82 CFTypeRef WKCreateAXTextMarkerRange(CFTypeRef start, CFTypeRef end);
83 CFTypeRef WKCopyAXTextMarkerRangeStart(CFTypeRef range);
84 CFTypeRef WKCopyAXTextMarkerRangeEnd(CFTypeRef range);
85 void WKAccessibilityHandleFocusChanged(void);
86 AXUIElementRef WKCreateAXUIElementRef(id element);
87 void WKUnregisterUniqueIdForElement(id element);
89 NSArray *WKSpeechSynthesisGetVoiceIdentifiers(void);
90 NSString *WKSpeechSynthesisGetDefaultVoiceIdentifierForLocale(NSLocale*);
92 BOOL WKShouldBlockPlugin(NSString *bundleIdentifier, NSString *bundleVersionString);
93 BOOL WKIsPluginUpdateAvailable(NSString *bundleIdentifier);
95 // Remote Accessibility API.
96 void WKAXRegisterRemoteApp(void);
97 void WKAXInitializeElementWithPresenterPid(id, pid_t);
98 NSData *WKAXRemoteTokenForElement(id);
99 id WKAXRemoteElementForToken(NSData *);
100 void WKAXSetWindowForRemoteElement(id remoteWindow, id remoteElement);
101 void WKAXRegisterRemoteProcess(bool registerProcess, pid_t);
102 pid_t WKAXRemoteProcessIdentifier(id remoteElement);
104 void WKSetUpFontCache(void);
106 void WKSignalCFReadStreamEnd(CFReadStreamRef stream);
107 void WKSignalCFReadStreamHasBytes(CFReadStreamRef stream);
108 void WKSignalCFReadStreamError(CFReadStreamRef stream, CFStreamError *error);
110 CFReadStreamRef WKCreateCustomCFReadStream(void *(*formCreate)(CFReadStreamRef, void *),
111 void (*formFinalize)(CFReadStreamRef, void *),
112 Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *),
113 CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *),
114 Boolean (*formCanRead)(CFReadStreamRef, void *),
115 void (*formClose)(CFReadStreamRef, void *),
116 void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
117 void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
120 void WKDrawCapsLockIndicator(CGContextRef, CGRect);
122 void WKDrawFocusRing(CGContextRef context, CGColorRef color, int radius);
123 // The CG context's current path is the focus ring's path.
124 // A color of 0 means "use system focus ring color".
125 // A radius of 0 means "use default focus ring radius".
127 void WKSetDragImage(NSImage *image, NSPoint offset);
129 void WKDrawBezeledTextFieldCell(NSRect, BOOL enabled);
130 void WKDrawTextFieldCellFocusRing(NSTextFieldCell*, NSRect);
131 void WKDrawBezeledTextArea(NSRect, BOOL enabled);
132 void WKPopupMenu(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
133 void WKPopupContextMenu(NSMenu *menu, NSPoint screenLocation);
134 void WKSendUserChangeNotifications(void);
136 BOOL WKConvertNSEventToCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent);
137 void WKSendKeyEventToTSM(NSEvent *theEvent);
138 void WKCallDrawingNotification(CGrafPtr port, Rect *bounds);
141 BOOL WKGetGlyphTransformedAdvances(CGFontRef, NSFont*, CGAffineTransform *m, ATSGlyphRef *glyph, CGSize *advance);
142 NSFont *WKGetFontInLanguageForRange(NSFont *font, NSString *string, NSRange range);
143 NSFont *WKGetFontInLanguageForCharacter(NSFont *font, UniChar ch);
144 void WKSetCGFontRenderingMode(CGContextRef cgContext, NSFont *font, BOOL shouldSubpixelQuantize);
145 BOOL WKCGContextGetShouldSmoothFonts(CGContextRef cgContext);
148 void WKSetBaseCTM(CGContextRef, CGAffineTransform);
149 void WKSetPatternPhaseInUserSpace(CGContextRef, CGPoint);
150 CGAffineTransform WKGetUserToBaseCTM(CGContextRef);
152 void WKGetGlyphsForCharacters(CGFontRef, const UniChar[], CGGlyph[], size_t);
153 bool WKGetVerticalGlyphsForCharacters(CTFontRef, const UniChar[], CGGlyph[], size_t);
155 CTLineRef WKCreateCTLineWithUniCharProvider(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
157 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
159 WKCTFontTransformApplyShaping = (1 << 0),
160 WKCTFontTransformApplyPositioning = (1 << 1)
163 typedef int WKCTFontTransformOptions;
165 bool WKCTFontTransformGlyphs(CTFontRef font, CGGlyph glyphs[], CGSize advances[], CFIndex count, WKCTFontTransformOptions options);
168 CTTypesetterRef WKCreateCTTypesetterWithUniCharProviderAndOptions(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
170 CGSize WKCTRunGetInitialAdvance(CTRunRef);
172 CGContextRef WKIOSurfaceContextCreate(IOSurfaceRef, unsigned width, unsigned height, CGColorSpaceRef);
173 CGImageRef WKIOSurfaceContextCreateImage(CGContextRef context);
176 WKPatternTilingNoDistortion,
177 WKPatternTilingConstantSpacingMinimalDistortion,
178 WKPatternTilingConstantSpacing
181 CGPatternRef WKCGPatternCreateWithImageAndTransform(CGImageRef image, CGAffineTransform transform, int tiling);
182 void WKCGContextResetClip(CGContextRef);
184 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
185 bool WKCGContextDrawsWithCorrectShadowOffsets(CGContextRef);
189 NSEvent *WKCreateNSEventWithCarbonEvent(EventRef eventRef);
190 NSEvent *WKCreateNSEventWithCarbonMouseMoveEvent(EventRef inEvent, NSWindow *window);
191 NSEvent *WKCreateNSEventWithCarbonClickEvent(EventRef inEvent, WindowRef windowRef);
194 CGContextRef WKNSWindowOverrideCGContext(NSWindow *, CGContextRef);
195 void WKNSWindowRestoreCGContext(NSWindow *, CGContextRef);
197 void WKNSWindowMakeBottomCornersSquare(NSWindow *);
199 // These constants match the ones used by ThemeScrollbarArrowStyle (some of the values are private, so we can't just
200 // use that enum directly).
202 WKThemeScrollBarArrowsSingle = 0,
203 WKThemeScrollBarArrowsLowerRight = 1,
204 WKThemeScrollBarArrowsDouble = 2,
205 WKThemeScrollBarArrowsUpperLeft = 3,
206 } WKThemeScrollBarArrowStyle;
208 OSStatus WKThemeDrawTrack(const HIThemeTrackDrawInfo* inDrawInfo, CGContextRef inContext, int inArrowStyle);
211 BOOL WKCGContextIsBitmapContext(CGContextRef context);
212 bool WKCGContextIsPDFContext(CGContextRef context);
214 void WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, BOOL *continuous);
216 BOOL WKAppVersionCheckLessThan(NSString *, int, double);
221 WKMovieTypeStoredStream,
222 WKMovieTypeLiveStream
225 int WKQTMovieGetType(QTMovie* movie);
227 BOOL WKQTMovieHasClosedCaptions(QTMovie* movie);
228 void WKQTMovieSetShowClosedCaptions(QTMovie* movie, BOOL showClosedCaptions);
229 void WKQTMovieSelectPreferredAlternates(QTMovie* movie);
230 void WKQTMovieSelectPreferredAlternateTrackForMediaType(QTMovie* movie, NSString* mediaType);
232 unsigned WKQTIncludeOnlyModernMediaFileTypes(void);
233 int WKQTMovieDataRate(QTMovie* movie);
234 float WKQTMovieMaxTimeLoaded(QTMovie* movie);
235 float WKQTMovieMaxTimeSeekable(QTMovie* movie);
236 NSString *WKQTMovieMaxTimeLoadedChangeNotification(void);
237 void WKQTMovieViewSetDrawSynchronously(QTMovieView* view, BOOL sync);
238 void WKQTMovieDisableComponent(uint32_t[5]);
239 NSURL *WKQTMovieResolvedURL(QTMovie* movie);
241 CFStringRef WKCopyFoundationCacheDirectory(void);
243 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
244 CFURLStorageSessionRef WKCreatePrivateStorageSession(CFStringRef);
245 NSURLRequest *WKCopyRequestWithStorageSession(CFURLStorageSessionRef, NSURLRequest *);
246 NSCachedURLResponse *WKCachedResponseForRequest(CFURLStorageSessionRef, NSURLRequest *);
247 void WKSetRequestStorageSession(CFURLStorageSessionRef, CFMutableURLRequestRef);
249 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
250 CFHTTPCookieStorageRef WKCopyHTTPCookieStorage(CFURLStorageSessionRef);
251 unsigned WKGetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef);
252 void WKSetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef, unsigned policy);
253 NSArray *WKHTTPCookies(CFHTTPCookieStorageRef);
254 NSArray *WKHTTPCookiesForURL(CFHTTPCookieStorageRef, NSURL *);
255 void WKSetHTTPCookiesForURL(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
256 void WKDeleteAllHTTPCookies(CFHTTPCookieStorageRef);
257 void WKDeleteHTTPCookie(CFHTTPCookieStorageRef, NSHTTPCookie *);
259 CFHTTPCookieStorageRef WKGetDefaultHTTPCookieStorage(void);
260 WKCFURLCredentialRef WKCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef);
261 void WKSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool flag);
262 CFArrayRef WKCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef);
263 void WKCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts);
265 void WKSetVisibleApplicationName(CFStringRef);
266 void WKSetApplicationInformationItem(CFStringRef key, CFTypeRef value);
268 CFURLRef WKCopyBundleURLForExecutableURL(CFURLRef);
271 WKMediaUIPartFullscreenButton = 0,
272 WKMediaUIPartMuteButton,
273 WKMediaUIPartPlayButton,
274 WKMediaUIPartSeekBackButton,
275 WKMediaUIPartSeekForwardButton,
276 WKMediaUIPartTimelineSlider,
277 WKMediaUIPartTimelineSliderThumb,
278 WKMediaUIPartRewindButton,
279 WKMediaUIPartSeekToRealtimeButton,
280 WKMediaUIPartShowClosedCaptionsButton,
281 WKMediaUIPartHideClosedCaptionsButton,
282 WKMediaUIPartUnMuteButton,
283 WKMediaUIPartPauseButton,
284 WKMediaUIPartBackground,
285 WKMediaUIPartCurrentTimeDisplay,
286 WKMediaUIPartTimeRemainingDisplay,
287 WKMediaUIPartStatusDisplay,
288 WKMediaUIPartControlsPanel,
289 WKMediaUIPartVolumeSliderContainer,
290 WKMediaUIPartVolumeSlider,
291 WKMediaUIPartVolumeSliderThumb,
292 WKMediaUIPartFullScreenVolumeSlider,
293 WKMediaUIPartFullScreenVolumeSliderThumb,
294 WKMediaUIPartVolumeSliderMuteButton,
295 WKMediaUIPartTextTrackDisplayContainer,
296 WKMediaUIPartTextTrackDisplay,
297 WKMediaUIPartExitFullscreenButton,
301 WKMediaControllerFlagDisabled = 1 << 0,
302 WKMediaControllerFlagPressed = 1 << 1,
303 WKMediaControllerFlagDrawEndCaps = 1 << 3,
304 WKMediaControllerFlagFocused = 1 << 4
305 } WKMediaControllerThemeState;
307 BOOL WKHitTestMediaUIPart(int part, CGRect bounds, CGPoint point);
308 void WKMeasureMediaUIPart(int part, CGRect *bounds, CGSize *naturalSize);
309 void WKDrawMediaUIPart(int part, CGContextRef context, CGRect rect, unsigned state);
310 void WKDrawMediaSliderTrack(CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
311 NSView *WKCreateMediaUIBackgroundView(void);
314 WKMediaUIControlTimeline,
315 WKMediaUIControlSlider,
316 WKMediaUIControlPlayPauseButton,
317 WKMediaUIControlExitFullscreenButton,
318 WKMediaUIControlRewindButton,
319 WKMediaUIControlFastForwardButton,
320 WKMediaUIControlVolumeUpButton,
321 WKMediaUIControlVolumeDownButton
322 } WKMediaUIControlType;
324 NSControl *WKCreateMediaUIControl(int controlType);
326 NSArray *WKQTGetSitesInMediaDownloadCache();
327 void WKQTClearMediaDownloadCacheForSite(NSString *site);
328 void WKQTClearMediaDownloadCache();
330 mach_port_t WKInitializeRenderServer(void);
334 CALayer *WKMakeRenderLayer(uint32_t contextID);
336 typedef struct __WKSoftwareCARendererRef *WKSoftwareCARendererRef;
338 WKSoftwareCARendererRef WKSoftwareCARendererCreate(uint32_t contextID);
339 void WKSoftwareCARendererDestroy(WKSoftwareCARendererRef);
340 void WKSoftwareCARendererRender(WKSoftwareCARendererRef, CGContextRef, CGRect);
342 typedef struct __WKCAContextRef *WKCAContextRef;
344 WKCAContextRef WKCAContextMakeRemoteWithServerPort(mach_port_t port);
345 WKCAContextRef WKCAContextMakeRemoteForWindowServer(void);
346 void WKCAContextInvalidate(WKCAContextRef);
347 uint32_t WKCAContextGetContextId(WKCAContextRef);
348 void WKCAContextSetLayer(WKCAContextRef, CALayer *);
349 CALayer *WKCAContextGetLayer(WKCAContextRef);
350 void WKCAContextSetColorSpace(WKCAContextRef, CGColorSpaceRef);
351 CGColorSpaceRef WKCAContextGetColorSpace(WKCAContextRef);
352 void WKDestroyRenderingResources(void);
354 void WKCALayerEnumerateRectsBeingDrawnWithBlock(CALayer *layer, CGContextRef context, void (^block)(CGRect rect));
358 void WKCARendererAddChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
359 void WKCARendererRemoveChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
361 typedef struct __WKWindowBounceAnimationContext *WKWindowBounceAnimationContextRef;
363 WKWindowBounceAnimationContextRef WKWindowBounceAnimationContextCreate(NSWindow *window);
364 void WKWindowBounceAnimationContextDestroy(WKWindowBounceAnimationContextRef context);
365 void WKWindowBounceAnimationSetAnimationProgress(WKWindowBounceAnimationContextRef context, double animationProgress);
367 void WKWindowSetClipRect(NSWindow*, NSRect);
369 #if defined(__x86_64__)
371 CFRunLoopSourceRef WKCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t serverPort);
372 #endif // defined(__x86_64__)
374 NSUInteger WKGetInputPanelWindowStyle(void);
375 UInt8 WKGetNSEventKeyChar(NSEvent *);
377 @class CAPropertyAnimation;
378 void WKSetCAAnimationValueFunction(CAPropertyAnimation*, NSString* function);
380 unsigned WKInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
381 int WKGetHTTPPipeliningPriority(CFURLRequestRef);
382 void WKSetHTTPPipeliningMaximumPriority(int maximumPriority);
383 void WKSetHTTPPipeliningPriority(CFURLRequestRef, int priority);
384 void WKSetHTTPPipeliningMinimumFastLanePriority(int priority);
386 void WKSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
387 void WKSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
388 CFHTTPMessageRef WKCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL, CFStringRef proxyHost, CFNumberRef proxyPort);
390 void WKWindowSetAlpha(NSWindow *window, float alphaValue);
391 void WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame);
393 void WKSyncSurfaceToView(NSView *view);
395 void WKEnableSettingCursorWhenInBackground(void);
397 CFDictionaryRef WKNSURLRequestCreateSerializableRepresentation(NSURLRequest *request, CFTypeRef tokenNull);
398 NSURLRequest *WKNSURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
400 CFDictionaryRef WKNSURLResponseCreateSerializableRepresentation(NSURLResponse *response, CFTypeRef tokenNull);
401 NSURLResponse *WKNSURLResponseFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
404 ScriptCode WKGetScriptCodeFromCurrentKeyboardInputSource(void);
407 CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStore(void);
408 void WKCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostArray);
410 CFStringRef WKGetCFURLResponseMIMEType(CFURLResponseRef);
411 CFURLRef WKGetCFURLResponseURL(CFURLResponseRef);
412 CFHTTPMessageRef WKGetCFURLResponseHTTPResponse(CFURLResponseRef);
413 CFStringRef WKCopyCFURLResponseSuggestedFilename(CFURLResponseRef);
414 void WKSetCFURLResponseMIMEType(CFURLResponseRef, CFStringRef mimeType);
416 CIFormat WKCIGetRGBA8Format(void);
419 WKSandboxExtensionTypeReadOnly,
420 WKSandboxExtensionTypeReadWrite,
421 } WKSandboxExtensionType;
422 typedef struct __WKSandboxExtension *WKSandboxExtensionRef;
424 WKSandboxExtensionRef WKSandboxExtensionCreate(const char* path, WKSandboxExtensionType type);
425 void WKSandboxExtensionDestroy(WKSandboxExtensionRef sandboxExtension);
427 bool WKSandboxExtensionConsume(WKSandboxExtensionRef sandboxExtension);
428 bool WKSandboxExtensionInvalidate(WKSandboxExtensionRef sandboxExtension);
430 const char* WKSandboxExtensionGetSerializedFormat(WKSandboxExtensionRef sandboxExtension, size_t* length);
431 WKSandboxExtensionRef WKSandboxExtensionCreateFromSerializedFormat(const char* serializationFormat, size_t length);
433 OSStatus WKEnableSandboxStyleFileQuarantine(void);
435 int WKRecommendedScrollerStyle(void);
437 bool WKExecutableWasLinkedOnOrBeforeSnowLeopard(void);
439 NSRange WKExtractWordDefinitionTokenRangeFromContextualString(NSString *contextString, NSRange range, NSDictionary **options);
440 void WKShowWordDefinitionWindow(NSAttributedString *term, NSPoint screenPoint, NSDictionary *options);
441 void WKHideWordDefinitionWindow(void);
443 CFStringRef WKCopyDefaultSearchProviderDisplayName(void);
445 void WKSetCrashReportApplicationSpecificInformation(CFStringRef);
447 NSURL* WKAVAssetResolvedURL(AVAsset*);
449 NSCursor *WKCursor(const char *name);
451 dispatch_source_t WKCreateVMPressureDispatchOnMainQueue(void);
452 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
453 dispatch_source_t WKCreateMemoryStatusPressureCriticalDispatchOnMainQueue(void);
456 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
457 bool WKExecutableWasLinkedOnOrBeforeLion(void);
460 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
461 bool WKExecutableWasLinkedOnOrBeforeMountainLion(void);
464 void WKCGPathAddRoundedRect(CGMutablePathRef path, const CGAffineTransform* matrix, CGRect rect, CGFloat cornerWidth, CGFloat cornerHeight);
466 void WKCFURLRequestAllowAllPostCaching(CFURLRequestRef);
468 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
469 @class WebFilterEvaluator;
471 BOOL WKFilterIsManagedSession(void);
472 WebFilterEvaluator *WKFilterCreateInstance(NSURLResponse *);
473 BOOL WKFilterIsBuffering(WebFilterEvaluator *);
474 BOOL WKFilterWasBlocked(WebFilterEvaluator *);
475 NSData *WKFilterAddData(WebFilterEvaluator *, NSData *);
476 NSData *WKFilterDataComplete(WebFilterEvaluator *);
478 CGFloat WKNSElasticDeltaForTimeDelta(CGFloat initialPosition, CGFloat initialVelocity, CGFloat elapsedTime);
479 CGFloat WKNSElasticDeltaForReboundDelta(CGFloat delta);
480 CGFloat WKNSReboundDeltaForElasticDelta(CGFloat delta);
483 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
485 WKOcclusionNotificationTypeApplicationBecameVisible,
486 WKOcclusionNotificationTypeApplicationBecameOccluded,
487 WKOcclusionNotificationTypeApplicationWindowModificationsStarted,
488 WKOcclusionNotificationTypeApplicationWindowModificationsStopped,
489 WKOcclusionNotificationTypeWindowBecameVisible,
490 WKOcclusionNotificationTypeWindowBecameOccluded,
491 } WKOcclusionNotificationType;
493 typedef uint32_t WKWindowID;
495 typedef void (*WKOcclusionNotificationHandler)(uint32_t, void* data, uint32_t dataLength, void*, uint32_t);
497 bool WKRegisterOcclusionNotificationHandler(WKOcclusionNotificationType, WKOcclusionNotificationHandler);
498 bool WKUnregisterOcclusionNotificationHandler(WKOcclusionNotificationType, WKOcclusionNotificationHandler);
499 bool WKEnableWindowOcclusionNotifications(NSInteger windowID, bool *outCurrentOcclusionState);
502 void WKCFNetworkSetOverrideSystemProxySettings(CFDictionaryRef);
504 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
505 bool WKIsPublicSuffix(NSString *domain);
507 CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStoreForPartition(CFStringRef partition);
508 typedef void (^CFURLCacheCopyAllPartitionNamesResultsNotification)(CFArrayRef partitionNames);
510 void WKCFURLCacheDeleteHostNamesInPersistentStoreForPartition(CFArrayRef hostArray, CFStringRef partition);
511 CFStringRef WKCachePartitionKey(void);
512 void WKCFURLCacheCopyAllPartitionNames(CFURLCacheCopyAllPartitionNamesResultsNotification resultsBlock);