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 NSTimeInterval WKGetNSURLResponseFreshnessLifetime(NSURLResponse *response);
45 NSString *WKCopyNSURLResponseStatusLine(NSURLResponse *response);
47 CFArrayRef WKCopyNSURLResponseCertificateChain(NSURLResponse *response);
49 CFStringEncoding WKGetWebDefaultCFStringEncoding(void);
51 void WKSetMetadataURL(NSString *URLString, NSString *referrer, NSString *path);
52 void WKSetNSURLConnectionDefersCallbacks(NSURLConnection *connection, BOOL defers);
54 void WKShowKeyAndMain(void);
56 OSStatus WKSyncWindowWithCGAfterMove(WindowRef);
57 unsigned WKCarbonWindowMask(void);
58 void *WKGetNativeWindowFromWindowRef(WindowRef);
59 OSType WKCarbonWindowPropertyCreator(void);
60 OSType WKCarbonWindowPropertyTag(void);
63 void WKDisableCGDeferredUpdates(void);
65 Class WKNSURLProtocolClassForRequest(NSURLRequest *request);
66 void WKSetNSURLRequestShouldContentSniff(NSMutableURLRequest *request, BOOL shouldContentSniff);
69 unsigned WKGetNSAutoreleasePoolCount(void);
72 void WKAdvanceDefaultButtonPulseAnimation(NSButtonCell *button);
74 NSString *WKMouseMovedNotification(void);
75 NSString *WKWindowWillOrderOnScreenNotification(void);
76 NSString *WKWindowWillOrderOffScreenNotification(void);
77 void WKSetNSWindowShouldPostEventNotifications(NSWindow *window, BOOL post);
79 CFTypeID WKGetAXTextMarkerTypeID(void);
80 CFTypeID WKGetAXTextMarkerRangeTypeID(void);
81 CFTypeRef WKCreateAXTextMarker(const void *bytes, size_t len);
82 BOOL WKGetBytesFromAXTextMarker(CFTypeRef textMarker, void *bytes, size_t length);
83 CFTypeRef WKCreateAXTextMarkerRange(CFTypeRef start, CFTypeRef end);
84 CFTypeRef WKCopyAXTextMarkerRangeStart(CFTypeRef range);
85 CFTypeRef WKCopyAXTextMarkerRangeEnd(CFTypeRef range);
86 void WKAccessibilityHandleFocusChanged(void);
87 AXUIElementRef WKCreateAXUIElementRef(id element);
88 void WKUnregisterUniqueIdForElement(id element);
90 NSArray *WKSpeechSynthesisGetVoiceIdentifiers(void);
91 NSString *WKSpeechSynthesisGetDefaultVoiceIdentifierForLocale(NSLocale*);
93 BOOL WKShouldBlockPlugin(NSString *bundleIdentifier, NSString *bundleVersionString);
94 BOOL WKIsPluginUpdateAvailable(NSString *bundleIdentifier);
96 // Remote Accessibility API.
97 void WKAXRegisterRemoteApp(void);
98 void WKAXInitializeElementWithPresenterPid(id, pid_t);
99 NSData *WKAXRemoteTokenForElement(id);
100 id WKAXRemoteElementForToken(NSData *);
101 void WKAXSetWindowForRemoteElement(id remoteWindow, id remoteElement);
102 void WKAXRegisterRemoteProcess(bool registerProcess, pid_t);
103 pid_t WKAXRemoteProcessIdentifier(id remoteElement);
105 void WKSetUpFontCache(void);
107 void WKSignalCFReadStreamEnd(CFReadStreamRef stream);
108 void WKSignalCFReadStreamHasBytes(CFReadStreamRef stream);
109 void WKSignalCFReadStreamError(CFReadStreamRef stream, CFStreamError *error);
111 CFReadStreamRef WKCreateCustomCFReadStream(void *(*formCreate)(CFReadStreamRef, void *),
112 void (*formFinalize)(CFReadStreamRef, void *),
113 Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *),
114 CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *),
115 Boolean (*formCanRead)(CFReadStreamRef, void *),
116 void (*formClose)(CFReadStreamRef, void *),
117 void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
118 void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
121 void WKDrawCapsLockIndicator(CGContextRef, CGRect);
123 void WKDrawFocusRing(CGContextRef context, CGColorRef color, int radius);
124 // The CG context's current path is the focus ring's path.
125 // A color of 0 means "use system focus ring color".
126 // A radius of 0 means "use default focus ring radius".
128 void WKSetDragImage(NSImage *image, NSPoint offset);
130 void WKDrawBezeledTextFieldCell(NSRect, BOOL enabled);
131 void WKDrawTextFieldCellFocusRing(NSTextFieldCell*, NSRect);
132 void WKDrawBezeledTextArea(NSRect, BOOL enabled);
133 void WKPopupMenu(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
134 void WKPopupContextMenu(NSMenu *menu, NSPoint screenLocation);
135 void WKSendUserChangeNotifications(void);
137 BOOL WKConvertNSEventToCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent);
138 void WKSendKeyEventToTSM(NSEvent *theEvent);
139 void WKCallDrawingNotification(CGrafPtr port, Rect *bounds);
142 BOOL WKGetGlyphTransformedAdvances(CGFontRef, NSFont*, CGAffineTransform *m, ATSGlyphRef *glyph, CGSize *advance);
143 NSFont *WKGetFontInLanguageForRange(NSFont *font, NSString *string, NSRange range);
144 NSFont *WKGetFontInLanguageForCharacter(NSFont *font, UniChar ch);
145 void WKSetCGFontRenderingMode(CGContextRef cgContext, NSFont *font, BOOL shouldSubpixelQuantize);
146 BOOL WKCGContextGetShouldSmoothFonts(CGContextRef cgContext);
149 void WKSetBaseCTM(CGContextRef, CGAffineTransform);
150 void WKSetPatternPhaseInUserSpace(CGContextRef, CGPoint);
151 CGAffineTransform WKGetUserToBaseCTM(CGContextRef);
153 void WKGetGlyphsForCharacters(CGFontRef, const UniChar[], CGGlyph[], size_t);
154 bool WKGetVerticalGlyphsForCharacters(CTFontRef, const UniChar[], CGGlyph[], size_t);
156 CTLineRef WKCreateCTLineWithUniCharProvider(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
158 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
160 WKCTFontTransformApplyShaping = (1 << 0),
161 WKCTFontTransformApplyPositioning = (1 << 1)
164 typedef int WKCTFontTransformOptions;
166 bool WKCTFontTransformGlyphs(CTFontRef font, CGGlyph glyphs[], CGSize advances[], CFIndex count, WKCTFontTransformOptions options);
169 CTTypesetterRef WKCreateCTTypesetterWithUniCharProviderAndOptions(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
171 CGSize WKCTRunGetInitialAdvance(CTRunRef);
173 CGContextRef WKIOSurfaceContextCreate(IOSurfaceRef, unsigned width, unsigned height, CGColorSpaceRef);
174 CGImageRef WKIOSurfaceContextCreateImage(CGContextRef context);
177 WKPatternTilingNoDistortion,
178 WKPatternTilingConstantSpacingMinimalDistortion,
179 WKPatternTilingConstantSpacing
182 CGPatternRef WKCGPatternCreateWithImageAndTransform(CGImageRef image, CGAffineTransform transform, int tiling);
183 void WKCGContextResetClip(CGContextRef);
185 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
186 bool WKCGContextDrawsWithCorrectShadowOffsets(CGContextRef);
190 NSEvent *WKCreateNSEventWithCarbonEvent(EventRef eventRef);
191 NSEvent *WKCreateNSEventWithCarbonMouseMoveEvent(EventRef inEvent, NSWindow *window);
192 NSEvent *WKCreateNSEventWithCarbonClickEvent(EventRef inEvent, WindowRef windowRef);
195 CGContextRef WKNSWindowOverrideCGContext(NSWindow *, CGContextRef);
196 void WKNSWindowRestoreCGContext(NSWindow *, CGContextRef);
198 void WKNSWindowMakeBottomCornersSquare(NSWindow *);
200 // These constants match the ones used by ThemeScrollbarArrowStyle (some of the values are private, so we can't just
201 // use that enum directly).
203 WKThemeScrollBarArrowsSingle = 0,
204 WKThemeScrollBarArrowsLowerRight = 1,
205 WKThemeScrollBarArrowsDouble = 2,
206 WKThemeScrollBarArrowsUpperLeft = 3,
207 } WKThemeScrollBarArrowStyle;
209 OSStatus WKThemeDrawTrack(const HIThemeTrackDrawInfo* inDrawInfo, CGContextRef inContext, int inArrowStyle);
212 BOOL WKCGContextIsBitmapContext(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 WKMediaControllerThemeClassic = 1,
302 WKMediaControllerThemeQuickTime = 2
303 } WKMediaControllerThemeStyle;
306 WKMediaControllerFlagDisabled = 1 << 0,
307 WKMediaControllerFlagPressed = 1 << 1,
308 WKMediaControllerFlagDrawEndCaps = 1 << 3,
309 WKMediaControllerFlagFocused = 1 << 4
310 } WKMediaControllerThemeState;
312 BOOL WKMediaControllerThemeAvailable(int themeStyle);
313 BOOL WKHitTestMediaUIPart(int part, int themeStyle, CGRect bounds, CGPoint point);
314 void WKMeasureMediaUIPart(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
315 void WKDrawMediaUIPart(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
316 void WKDrawMediaSliderTrack(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
317 NSView *WKCreateMediaUIBackgroundView(void);
320 WKMediaUIControlTimeline,
321 WKMediaUIControlSlider,
322 WKMediaUIControlPlayPauseButton,
323 WKMediaUIControlExitFullscreenButton,
324 WKMediaUIControlRewindButton,
325 WKMediaUIControlFastForwardButton,
326 WKMediaUIControlVolumeUpButton,
327 WKMediaUIControlVolumeDownButton
328 } WKMediaUIControlType;
330 NSControl *WKCreateMediaUIControl(int controlType);
332 NSArray *WKQTGetSitesInMediaDownloadCache();
333 void WKQTClearMediaDownloadCacheForSite(NSString *site);
334 void WKQTClearMediaDownloadCache();
336 mach_port_t WKInitializeRenderServer(void);
340 CALayer *WKMakeRenderLayer(uint32_t contextID);
342 typedef struct __WKSoftwareCARendererRef *WKSoftwareCARendererRef;
344 WKSoftwareCARendererRef WKSoftwareCARendererCreate(uint32_t contextID);
345 void WKSoftwareCARendererDestroy(WKSoftwareCARendererRef);
346 void WKSoftwareCARendererRender(WKSoftwareCARendererRef, CGContextRef, CGRect);
348 typedef struct __WKCAContextRef *WKCAContextRef;
350 WKCAContextRef WKCAContextMakeRemoteWithServerPort(mach_port_t port);
351 WKCAContextRef WKCAContextMakeRemoteForWindowServer(void);
352 void WKCAContextInvalidate(WKCAContextRef);
353 uint32_t WKCAContextGetContextId(WKCAContextRef);
354 void WKCAContextSetLayer(WKCAContextRef, CALayer *);
355 CALayer *WKCAContextGetLayer(WKCAContextRef);
356 void WKCAContextSetColorSpace(WKCAContextRef, CGColorSpaceRef);
357 CGColorSpaceRef WKCAContextGetColorSpace(WKCAContextRef);
358 void WKDestroyRenderingResources(void);
360 void WKCALayerEnumerateRectsBeingDrawnWithBlock(CALayer *layer, CGContextRef context, void (^block)(CGRect rect));
364 void WKCARendererAddChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
365 void WKCARendererRemoveChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
367 typedef struct __WKWindowBounceAnimationContext *WKWindowBounceAnimationContextRef;
369 WKWindowBounceAnimationContextRef WKWindowBounceAnimationContextCreate(NSWindow *window);
370 void WKWindowBounceAnimationContextDestroy(WKWindowBounceAnimationContextRef context);
371 void WKWindowBounceAnimationSetAnimationProgress(WKWindowBounceAnimationContextRef context, double animationProgress);
373 void WKWindowSetClipRect(NSWindow*, NSRect);
375 #if defined(__x86_64__)
377 CFRunLoopSourceRef WKCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t serverPort);
378 #endif // defined(__x86_64__)
380 NSUInteger WKGetInputPanelWindowStyle(void);
381 UInt8 WKGetNSEventKeyChar(NSEvent *);
383 @class CAPropertyAnimation;
384 void WKSetCAAnimationValueFunction(CAPropertyAnimation*, NSString* function);
386 unsigned WKInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
387 int WKGetHTTPPipeliningPriority(CFURLRequestRef);
388 void WKSetHTTPPipeliningMaximumPriority(int maximumPriority);
389 void WKSetHTTPPipeliningPriority(CFURLRequestRef, int priority);
390 void WKSetHTTPPipeliningMinimumFastLanePriority(int priority);
392 void WKSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
393 void WKSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
394 CFHTTPMessageRef WKCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL, CFStringRef proxyHost, CFNumberRef proxyPort);
396 void WKWindowSetAlpha(NSWindow *window, float alphaValue);
397 void WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame);
399 void WKSyncSurfaceToView(NSView *view);
401 void WKEnableSettingCursorWhenInBackground(void);
403 CFDictionaryRef WKNSURLRequestCreateSerializableRepresentation(NSURLRequest *request, CFTypeRef tokenNull);
404 NSURLRequest *WKNSURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
406 CFDictionaryRef WKNSURLResponseCreateSerializableRepresentation(NSURLResponse *response, CFTypeRef tokenNull);
407 NSURLResponse *WKNSURLResponseFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
410 ScriptCode WKGetScriptCodeFromCurrentKeyboardInputSource(void);
413 CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStore(void);
414 void WKCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostArray);
416 CFStringRef WKGetCFURLResponseMIMEType(CFURLResponseRef);
417 CFURLRef WKGetCFURLResponseURL(CFURLResponseRef);
418 CFHTTPMessageRef WKGetCFURLResponseHTTPResponse(CFURLResponseRef);
419 CFStringRef WKCopyCFURLResponseSuggestedFilename(CFURLResponseRef);
420 void WKSetCFURLResponseMIMEType(CFURLResponseRef, CFStringRef mimeType);
422 CIFormat WKCIGetRGBA8Format(void);
425 WKSandboxExtensionTypeReadOnly,
426 WKSandboxExtensionTypeReadWrite,
427 } WKSandboxExtensionType;
428 typedef struct __WKSandboxExtension *WKSandboxExtensionRef;
430 WKSandboxExtensionRef WKSandboxExtensionCreate(const char* path, WKSandboxExtensionType type);
431 void WKSandboxExtensionDestroy(WKSandboxExtensionRef sandboxExtension);
433 bool WKSandboxExtensionConsume(WKSandboxExtensionRef sandboxExtension);
434 bool WKSandboxExtensionInvalidate(WKSandboxExtensionRef sandboxExtension);
436 const char* WKSandboxExtensionGetSerializedFormat(WKSandboxExtensionRef sandboxExtension, size_t* length);
437 WKSandboxExtensionRef WKSandboxExtensionCreateFromSerializedFormat(const char* serializationFormat, size_t length);
439 OSStatus WKEnableSandboxStyleFileQuarantine(void);
441 int WKRecommendedScrollerStyle(void);
443 bool WKExecutableWasLinkedOnOrBeforeSnowLeopard(void);
445 NSRange WKExtractWordDefinitionTokenRangeFromContextualString(NSString *contextString, NSRange range, NSDictionary **options);
446 void WKShowWordDefinitionWindow(NSAttributedString *term, NSPoint screenPoint, NSDictionary *options);
447 void WKHideWordDefinitionWindow(void);
449 CFStringRef WKCopyDefaultSearchProviderDisplayName(void);
451 void WKSetCrashReportApplicationSpecificInformation(CFStringRef);
453 NSURL* WKAVAssetResolvedURL(AVAsset*);
455 NSCursor *WKCursor(const char *name);
457 dispatch_source_t WKCreateVMPressureDispatchOnMainQueue(void);
459 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
460 bool WKExecutableWasLinkedOnOrBeforeLion(void);
463 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
464 bool WKExecutableWasLinkedOnOrBeforeMountainLion(void);
467 void WKCGPathAddRoundedRect(CGMutablePathRef path, const CGAffineTransform* matrix, CGRect rect, CGFloat cornerWidth, CGFloat cornerHeight);
469 void WKCFURLRequestAllowAllPostCaching(CFURLRequestRef);
471 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
472 @class WebFilterEvaluator;
474 BOOL WKFilterIsManagedSession(void);
475 WebFilterEvaluator *WKFilterCreateInstance(NSURLResponse *);
476 BOOL WKFilterIsBuffering(WebFilterEvaluator *);
477 BOOL WKFilterWasBlocked(WebFilterEvaluator *);
478 NSData *WKFilterAddData(WebFilterEvaluator *, NSData *);
479 NSData *WKFilterDataComplete(WebFilterEvaluator *);
481 CGFloat WKNSElasticDeltaForTimeDelta(CGFloat initialPosition, CGFloat initialVelocity, CGFloat elapsedTime);
482 CGFloat WKNSElasticDeltaForReboundDelta(CGFloat delta);
483 CGFloat WKNSReboundDeltaForElasticDelta(CGFloat delta);
486 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
488 WKOcclusionNotificationTypeApplicationBecameVisible,
489 WKOcclusionNotificationTypeApplicationBecameOccluded,
490 WKOcclusionNotificationTypeApplicationWindowModificationsStarted,
491 WKOcclusionNotificationTypeApplicationWindowModificationsStopped,
492 WKOcclusionNotificationTypeWindowBecameVisible,
493 WKOcclusionNotificationTypeWindowBecameOccluded,
494 } WKOcclusionNotificationType;
496 typedef uint32_t WKWindowID;
498 typedef void (*WKOcclusionNotificationHandler)(uint32_t, void* data, uint32_t dataLength, void*, uint32_t);
500 bool WKRegisterOcclusionNotificationHandler(WKOcclusionNotificationType, WKOcclusionNotificationHandler);
501 bool WKUnregisterOcclusionNotificationHandler(WKOcclusionNotificationType, WKOcclusionNotificationHandler);
502 bool WKEnableWindowOcclusionNotifications(NSInteger windowID, bool *outCurrentOcclusionState);
505 bool WKIsJavaPlugInActive(void);
506 void WKActivateJavaPlugIn(void);
508 void WKCFNetworkSetOverrideSystemProxySettings(CFDictionaryRef);
510 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
511 bool WKIsPublicSuffix(NSString *domain);
513 CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStoreForPartition(CFStringRef partition);
514 typedef void (^CFURLCacheCopyAllPartitionNamesResultsNotification)(CFArrayRef partitionNames);
516 void WKCFURLCacheDeleteHostNamesInPersistentStoreForPartition(CFArrayRef hostArray, CFStringRef partition);
517 CFStringRef WKCachePartitionKey(void);
518 void WKCFURLCacheCopyAllPartitionNames(CFURLCacheCopyAllPartitionNamesResultsNotification resultsBlock);