2 WebKitSystemInterface.h
3 Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
8 #import <Foundation/Foundation.h>
9 #import <dispatch/dispatch.h>
12 #import <AppKit/AppKit.h>
13 #import <Carbon/Carbon.h>
15 #import <CoreImage/CoreImage.h>
16 #import <CoreText/CoreText.h>
17 #if !TARGET_IPHONE_SIMULATOR
18 #import <IOSurface/IOSurface.h>
20 #import <WebKitSystemInterfaceIOS.h>
31 typedef struct _CFURLResponse* CFURLResponseRef;
32 typedef const struct _CFURLRequest* CFURLRequestRef;
33 typedef struct _CFURLRequest* CFMutableURLRequestRef;
35 typedef struct _CFURLCredential* WKCFURLCredentialRef;
36 typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
39 WKCertificateParseResultSucceeded = 0,
40 WKCertificateParseResultFailed = 1,
41 WKCertificateParseResultPKCS7 = 2,
42 } WKCertificateParseResult;
44 CFStringRef WKCopyCFLocalizationPreferredName(CFStringRef localization);
45 void WKSetDefaultLocalization(CFStringRef localization);
47 CFStringRef WKSignedPublicKeyAndChallengeString(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription);
48 WKCertificateParseResult WKAddCertificatesToKeychainFromData(const void *bytes, unsigned length);
50 NSString *WKGetPreferredExtensionForMIMEType(NSString *type);
51 NSArray *WKGetExtensionsForMIMEType(NSString *type);
52 NSString *WKGetMIMETypeForExtension(NSString *extension);
54 NSDate *WKGetNSURLResponseLastModifiedDate(NSURLResponse *response);
55 NSString *WKCopyNSURLResponseStatusLine(NSURLResponse *response);
57 CFArrayRef WKCopyNSURLResponseCertificateChain(NSURLResponse *response);
59 CFStringEncoding WKGetWebDefaultCFStringEncoding(void);
61 void WKSetMetadataURL(NSString *URLString, NSString *referrer, NSString *path);
62 void WKSetNSURLConnectionDefersCallbacks(NSURLConnection *connection, BOOL defers);
65 void WKShowKeyAndMain(void);
67 OSStatus WKSyncWindowWithCGAfterMove(WindowRef);
68 unsigned WKCarbonWindowMask(void);
69 void *WKGetNativeWindowFromWindowRef(WindowRef);
70 OSType WKCarbonWindowPropertyCreator(void);
71 OSType WKCarbonWindowPropertyTag(void);
74 void WKDisableCGDeferredUpdates(void);
77 Class WKNSURLProtocolClassForRequest(NSURLRequest *request);
78 void WKSetNSURLRequestShouldContentSniff(NSMutableURLRequest *request, BOOL shouldContentSniff);
82 unsigned WKGetNSAutoreleasePoolCount(void);
85 void WKAdvanceDefaultButtonPulseAnimation(NSButtonCell *button);
87 NSString *WKMouseMovedNotification(void);
88 NSString *WKWindowWillOrderOnScreenNotification(void);
89 NSString *WKWindowWillOrderOffScreenNotification(void);
90 void WKSetNSWindowShouldPostEventNotifications(NSWindow *window, BOOL post);
92 CFTypeID WKGetAXTextMarkerTypeID(void);
93 CFTypeID WKGetAXTextMarkerRangeTypeID(void);
94 CFTypeRef WKCreateAXTextMarker(const void *bytes, size_t len);
95 BOOL WKGetBytesFromAXTextMarker(CFTypeRef textMarker, void *bytes, size_t length);
96 CFTypeRef WKCreateAXTextMarkerRange(CFTypeRef start, CFTypeRef end);
97 CFTypeRef WKCopyAXTextMarkerRangeStart(CFTypeRef range);
98 CFTypeRef WKCopyAXTextMarkerRangeEnd(CFTypeRef range);
99 void WKAccessibilityHandleFocusChanged(void);
100 AXUIElementRef WKCreateAXUIElementRef(id element);
101 void WKUnregisterUniqueIdForElement(id element);
103 NSArray *WKSpeechSynthesisGetVoiceIdentifiers(void);
104 NSString *WKSpeechSynthesisGetDefaultVoiceIdentifierForLocale(NSLocale*);
107 BOOL WKShouldBlockPlugin(NSString *bundleIdentifier, NSString *bundleVersionString);
108 BOOL WKIsPluginUpdateAvailable(NSString *bundleIdentifier);
110 // Remote Accessibility API.
111 void WKAXRegisterRemoteApp(void);
112 void WKAXInitializeElementWithPresenterPid(id, pid_t);
113 NSData *WKAXRemoteTokenForElement(id);
114 id WKAXRemoteElementForToken(NSData *);
115 void WKAXSetWindowForRemoteElement(id remoteWindow, id remoteElement);
116 void WKAXRegisterRemoteProcess(bool registerProcess, pid_t);
117 pid_t WKAXRemoteProcessIdentifier(id remoteElement);
119 void WKSetUpFontCache(void);
121 void WKSignalCFReadStreamEnd(CFReadStreamRef stream);
122 void WKSignalCFReadStreamHasBytes(CFReadStreamRef stream);
123 void WKSignalCFReadStreamError(CFReadStreamRef stream, CFStreamError *error);
125 CFReadStreamRef WKCreateCustomCFReadStream(void *(*formCreate)(CFReadStreamRef, void *),
126 void (*formFinalize)(CFReadStreamRef, void *),
127 Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *),
128 CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *),
129 Boolean (*formCanRead)(CFReadStreamRef, void *),
130 void (*formClose)(CFReadStreamRef, void *),
131 void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
132 void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
135 #if !TARGET_OS_IPHONE
136 void WKDrawCapsLockIndicator(CGContextRef, CGRect);
138 void WKDrawFocusRing(CGContextRef context, CGColorRef color, int radius);
139 // The CG context's current path is the focus ring's path.
140 // A color of 0 means "use system focus ring color".
141 // A radius of 0 means "use default focus ring radius".
143 void WKSetDragImage(NSImage *image, NSPoint offset);
145 void WKDrawBezeledTextFieldCell(NSRect, BOOL enabled);
146 void WKDrawTextFieldCellFocusRing(NSTextFieldCell*, NSRect);
147 void WKDrawBezeledTextArea(NSRect, BOOL enabled);
148 void WKPopupMenu(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
149 void WKPopupContextMenu(NSMenu *menu, NSPoint screenLocation);
150 void WKSendUserChangeNotifications(void);
152 BOOL WKConvertNSEventToCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent);
153 void WKSendKeyEventToTSM(NSEvent *theEvent);
154 void WKCallDrawingNotification(CGrafPtr port, Rect *bounds);
157 BOOL WKGetGlyphTransformedAdvances(CGFontRef, NSFont*, CGAffineTransform *m, ATSGlyphRef *glyph, CGSize *advance);
158 NSFont *WKGetFontInLanguageForRange(NSFont *font, NSString *string, NSRange range);
159 NSFont *WKGetFontInLanguageForCharacter(NSFont *font, UniChar ch);
160 void WKSetCGFontRenderingMode(CGContextRef cgContext, NSFont *font, BOOL shouldSubpixelQuantize);
163 BOOL WKCGContextGetShouldSmoothFonts(CGContextRef cgContext);
166 void WKSetBaseCTM(CGContextRef, CGAffineTransform);
167 void WKSetPatternPhaseInUserSpace(CGContextRef, CGPoint);
168 CGAffineTransform WKGetUserToBaseCTM(CGContextRef);
170 void WKGetGlyphsForCharacters(CGFontRef, const UniChar[], CGGlyph[], size_t);
171 bool WKGetVerticalGlyphsForCharacters(CTFontRef, const UniChar[], CGGlyph[], size_t);
173 CTLineRef WKCreateCTLineWithUniCharProvider(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
175 #if TARGET_OS_IPHONE || MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
177 WKCTFontTransformApplyShaping = (1 << 0),
178 WKCTFontTransformApplyPositioning = (1 << 1)
181 typedef int WKCTFontTransformOptions;
183 bool WKCTFontTransformGlyphs(CTFontRef font, CGGlyph glyphs[], CGSize advances[], CFIndex count, WKCTFontTransformOptions options);
184 #endif // TARGET_OS_IPHONE || MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
186 CTTypesetterRef WKCreateCTTypesetterWithUniCharProviderAndOptions(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
188 CGSize WKCTRunGetInitialAdvance(CTRunRef);
190 #if (TARGET_OS_IPHONE && TARGET_OS_EMBEDDED) || MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
191 CGContextRef WKIOSurfaceContextCreate(IOSurfaceRef, unsigned width, unsigned height, CGColorSpaceRef);
192 CGImageRef WKIOSurfaceContextCreateImage(CGContextRef context);
196 WKPatternTilingNoDistortion,
197 WKPatternTilingConstantSpacingMinimalDistortion,
198 WKPatternTilingConstantSpacing
201 CGPatternRef WKCGPatternCreateWithImageAndTransform(CGImageRef image, CGAffineTransform transform, int tiling);
202 void WKCGContextResetClip(CGContextRef);
204 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
205 bool WKCGContextDrawsWithCorrectShadowOffsets(CGContextRef);
208 #if !TARGET_OS_IPHONE
210 NSEvent *WKCreateNSEventWithCarbonEvent(EventRef eventRef);
211 NSEvent *WKCreateNSEventWithCarbonMouseMoveEvent(EventRef inEvent, NSWindow *window);
212 NSEvent *WKCreateNSEventWithCarbonClickEvent(EventRef inEvent, WindowRef windowRef);
215 CGContextRef WKNSWindowOverrideCGContext(NSWindow *, CGContextRef);
216 void WKNSWindowRestoreCGContext(NSWindow *, CGContextRef);
218 void WKNSWindowMakeBottomCornersSquare(NSWindow *);
220 // These constants match the ones used by ThemeScrollbarArrowStyle (some of the values are private, so we can't just
221 // use that enum directly).
223 WKThemeScrollBarArrowsSingle = 0,
224 WKThemeScrollBarArrowsLowerRight = 1,
225 WKThemeScrollBarArrowsDouble = 2,
226 WKThemeScrollBarArrowsUpperLeft = 3,
227 } WKThemeScrollBarArrowStyle;
229 OSStatus WKThemeDrawTrack(const HIThemeTrackDrawInfo* inDrawInfo, CGContextRef inContext, int inArrowStyle);
233 BOOL WKCGContextIsBitmapContext(CGContextRef context);
234 bool WKCGContextIsPDFContext(CGContextRef context);
236 #if !TARGET_OS_IPHONE
237 void WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, BOOL *continuous);
239 BOOL WKAppVersionCheckLessThan(NSString *, int, double);
244 WKMovieTypeStoredStream,
245 WKMovieTypeLiveStream
248 int WKQTMovieGetType(QTMovie* movie);
250 BOOL WKQTMovieHasClosedCaptions(QTMovie* movie);
251 void WKQTMovieSetShowClosedCaptions(QTMovie* movie, BOOL showClosedCaptions);
252 void WKQTMovieSelectPreferredAlternates(QTMovie* movie);
253 void WKQTMovieSelectPreferredAlternateTrackForMediaType(QTMovie* movie, NSString* mediaType);
255 unsigned WKQTIncludeOnlyModernMediaFileTypes(void);
256 int WKQTMovieDataRate(QTMovie* movie);
257 float WKQTMovieMaxTimeLoaded(QTMovie* movie);
258 float WKQTMovieMaxTimeSeekable(QTMovie* movie);
259 NSString *WKQTMovieMaxTimeLoadedChangeNotification(void);
260 void WKQTMovieViewSetDrawSynchronously(QTMovieView* view, BOOL sync);
261 void WKQTMovieDisableComponent(uint32_t[5]);
262 NSURL *WKQTMovieResolvedURL(QTMovie* movie);
265 CFStringRef WKCopyFoundationCacheDirectory(void);
267 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
268 CFURLStorageSessionRef WKCreatePrivateStorageSession(CFStringRef);
269 NSURLRequest *WKCopyRequestWithStorageSession(CFURLStorageSessionRef, NSURLRequest *);
270 NSCachedURLResponse *WKCachedResponseForRequest(CFURLStorageSessionRef, NSURLRequest *);
271 void WKSetRequestStorageSession(CFURLStorageSessionRef, CFMutableURLRequestRef);
273 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
274 CFHTTPCookieStorageRef WKCopyHTTPCookieStorage(CFURLStorageSessionRef);
275 unsigned WKGetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef);
276 void WKSetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef, unsigned policy);
277 NSArray *WKHTTPCookies(CFHTTPCookieStorageRef);
278 NSArray *WKHTTPCookiesForURL(CFHTTPCookieStorageRef, NSURL *, NSURL *);
279 void WKSetHTTPCookiesForURL(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
280 void WKDeleteAllHTTPCookies(CFHTTPCookieStorageRef);
281 void WKDeleteHTTPCookie(CFHTTPCookieStorageRef, NSHTTPCookie *);
283 CFHTTPCookieStorageRef WKGetDefaultHTTPCookieStorage(void);
284 WKCFURLCredentialRef WKCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef);
285 void WKSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool flag);
286 CFArrayRef WKCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef);
287 void WKCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts);
289 #if !TARGET_OS_IPHONE
290 void WKSetVisibleApplicationName(CFStringRef);
291 void WKSetApplicationInformationItem(CFStringRef key, CFTypeRef value);
294 CFURLRef WKCopyBundleURLForExecutableURL(CFURLRef);
296 #if !TARGET_OS_IPHONE
298 WKMediaUIPartFullscreenButton = 0,
299 WKMediaUIPartMuteButton,
300 WKMediaUIPartPlayButton,
301 WKMediaUIPartSeekBackButton,
302 WKMediaUIPartSeekForwardButton,
303 WKMediaUIPartTimelineSlider,
304 WKMediaUIPartTimelineSliderThumb,
305 WKMediaUIPartRewindButton,
306 WKMediaUIPartSeekToRealtimeButton,
307 WKMediaUIPartShowClosedCaptionsButton,
308 WKMediaUIPartHideClosedCaptionsButton,
309 WKMediaUIPartUnMuteButton,
310 WKMediaUIPartPauseButton,
311 WKMediaUIPartBackground,
312 WKMediaUIPartCurrentTimeDisplay,
313 WKMediaUIPartTimeRemainingDisplay,
314 WKMediaUIPartStatusDisplay,
315 WKMediaUIPartControlsPanel,
316 WKMediaUIPartVolumeSliderContainer,
317 WKMediaUIPartVolumeSlider,
318 WKMediaUIPartVolumeSliderThumb,
319 WKMediaUIPartFullScreenVolumeSlider,
320 WKMediaUIPartFullScreenVolumeSliderThumb,
321 WKMediaUIPartVolumeSliderMuteButton,
322 WKMediaUIPartTextTrackDisplayContainer,
323 WKMediaUIPartTextTrackDisplay,
324 WKMediaUIPartExitFullscreenButton,
328 WKMediaControllerFlagDisabled = 1 << 0,
329 WKMediaControllerFlagPressed = 1 << 1,
330 WKMediaControllerFlagDrawEndCaps = 1 << 3,
331 WKMediaControllerFlagFocused = 1 << 4
332 } WKMediaControllerThemeState;
334 BOOL WKHitTestMediaUIPart(int part, CGRect bounds, CGPoint point);
335 void WKMeasureMediaUIPart(int part, CGRect *bounds, CGSize *naturalSize);
336 void WKDrawMediaUIPart(int part, CGContextRef context, CGRect rect, unsigned state);
337 void WKDrawMediaSliderTrack(CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
338 NSView *WKCreateMediaUIBackgroundView(void);
341 WKMediaUIControlTimeline,
342 WKMediaUIControlSlider,
343 WKMediaUIControlPlayPauseButton,
344 WKMediaUIControlExitFullscreenButton,
345 WKMediaUIControlRewindButton,
346 WKMediaUIControlFastForwardButton,
347 WKMediaUIControlVolumeUpButton,
348 WKMediaUIControlVolumeDownButton
349 } WKMediaUIControlType;
351 NSControl *WKCreateMediaUIControl(int controlType);
353 NSArray *WKQTGetSitesInMediaDownloadCache();
354 void WKQTClearMediaDownloadCacheForSite(NSString *site);
355 void WKQTClearMediaDownloadCache();
357 mach_port_t WKInitializeRenderServer(void);
362 CALayer *WKMakeRenderLayer(uint32_t contextID);
364 #if !TARGET_OS_IPHONE
365 typedef struct __WKSoftwareCARendererRef *WKSoftwareCARendererRef;
367 WKSoftwareCARendererRef WKSoftwareCARendererCreate(uint32_t contextID);
368 void WKSoftwareCARendererDestroy(WKSoftwareCARendererRef);
369 void WKSoftwareCARendererRender(WKSoftwareCARendererRef, CGContextRef, CGRect);
372 typedef struct __WKCAContextRef *WKCAContextRef;
374 WKCAContextRef WKCAContextMakeRemoteWithServerPort(mach_port_t port);
375 #if !TARGET_OS_IPHONE
376 WKCAContextRef WKCAContextMakeRemoteForWindowServer(void);
378 void WKCAContextInvalidate(WKCAContextRef);
379 uint32_t WKCAContextGetContextId(WKCAContextRef);
380 void WKCAContextSetLayer(WKCAContextRef, CALayer *);
381 CALayer *WKCAContextGetLayer(WKCAContextRef);
382 void WKCAContextSetColorSpace(WKCAContextRef, CGColorSpaceRef);
383 CGColorSpaceRef WKCAContextGetColorSpace(WKCAContextRef);
384 void WKDestroyRenderingResources(void);
386 void WKCALayerEnumerateRectsBeingDrawnWithBlock(CALayer *layer, CGContextRef context, void (^block)(CGRect rect));
390 void WKCARendererAddChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
391 void WKCARendererRemoveChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
393 #if !TARGET_OS_IPHONE
394 typedef struct __WKWindowBounceAnimationContext *WKWindowBounceAnimationContextRef;
396 WKWindowBounceAnimationContextRef WKWindowBounceAnimationContextCreate(NSWindow *window);
397 void WKWindowBounceAnimationContextDestroy(WKWindowBounceAnimationContextRef context);
398 void WKWindowBounceAnimationSetAnimationProgress(WKWindowBounceAnimationContextRef context, double animationProgress);
400 void WKWindowSetClipRect(NSWindow*, NSRect);
402 #if defined(__x86_64__)
404 CFRunLoopSourceRef WKCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t serverPort);
407 NSUInteger WKGetInputPanelWindowStyle(void);
408 UInt8 WKGetNSEventKeyChar(NSEvent *);
411 @class CAPropertyAnimation;
412 void WKSetCAAnimationValueFunction(CAPropertyAnimation*, NSString* function);
414 unsigned WKInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
415 int WKGetHTTPRequestPriority(CFURLRequestRef);
416 void WKSetHTTPRequestMaximumPriority(int maximumPriority);
417 void WKSetHTTPRequestPriority(CFURLRequestRef, int priority);
418 void WKSetHTTPRequestMinimumFastLanePriority(int priority);
419 void WKHTTPRequestEnablePipelining(CFURLRequestRef);
421 void WKSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
422 void WKSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
423 CFHTTPMessageRef WKCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL, CFStringRef proxyHost, CFNumberRef proxyPort);
425 #if !TARGET_OS_IPHONE
426 void WKWindowSetAlpha(NSWindow *window, float alphaValue);
427 void WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame);
429 void WKSyncSurfaceToView(NSView *view);
431 void WKEnableSettingCursorWhenInBackground(void);
434 CFDictionaryRef WKNSURLRequestCreateSerializableRepresentation(NSURLRequest *request, CFTypeRef tokenNull);
435 NSURLRequest *WKNSURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
437 CFDictionaryRef WKNSURLResponseCreateSerializableRepresentation(NSURLResponse *response, CFTypeRef tokenNull);
438 NSURLResponse *WKNSURLResponseFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
440 #if !TARGET_OS_IPHONE && !defined(__LP64__)
441 ScriptCode WKGetScriptCodeFromCurrentKeyboardInputSource(void);
444 CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStore(void);
445 void WKCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostArray);
447 CFStringRef WKGetCFURLResponseMIMEType(CFURLResponseRef);
448 CFURLRef WKGetCFURLResponseURL(CFURLResponseRef);
449 CFHTTPMessageRef WKGetCFURLResponseHTTPResponse(CFURLResponseRef);
450 CFStringRef WKCopyCFURLResponseSuggestedFilename(CFURLResponseRef);
451 void WKSetCFURLResponseMIMEType(CFURLResponseRef, CFStringRef mimeType);
453 CIFormat WKCIGetRGBA8Format(void);
455 #if !TARGET_OS_IPHONE
457 WKSandboxExtensionTypeReadOnly,
458 WKSandboxExtensionTypeReadWrite,
459 } WKSandboxExtensionType;
460 typedef struct __WKSandboxExtension *WKSandboxExtensionRef;
462 WKSandboxExtensionRef WKSandboxExtensionCreate(const char* path, WKSandboxExtensionType type);
463 void WKSandboxExtensionDestroy(WKSandboxExtensionRef sandboxExtension);
465 bool WKSandboxExtensionConsume(WKSandboxExtensionRef sandboxExtension);
466 bool WKSandboxExtensionInvalidate(WKSandboxExtensionRef sandboxExtension);
468 const char* WKSandboxExtensionGetSerializedFormat(WKSandboxExtensionRef sandboxExtension, size_t* length);
469 WKSandboxExtensionRef WKSandboxExtensionCreateFromSerializedFormat(const char* serializationFormat, size_t length);
471 OSStatus WKEnableSandboxStyleFileQuarantine(void);
473 int WKRecommendedScrollerStyle(void);
475 bool WKExecutableWasLinkedOnOrBeforeSnowLeopard(void);
477 NSRange WKExtractWordDefinitionTokenRangeFromContextualString(NSString *contextString, NSRange range, NSDictionary **options);
478 void WKShowWordDefinitionWindow(NSAttributedString *term, NSPoint screenPoint, NSDictionary *options);
479 void WKHideWordDefinitionWindow(void);
482 #if !TARGET_OS_IPHONE
483 CFStringRef WKCopyDefaultSearchProviderDisplayName(void);
486 void WKSetCrashReportApplicationSpecificInformation(CFStringRef);
488 NSURL* WKAVAssetResolvedURL(AVAsset*);
490 #if !TARGET_OS_IPHONE
491 NSCursor *WKCursor(const char *name);
494 dispatch_source_t WKCreateVMPressureDispatchOnMainQueue(void);
495 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
496 dispatch_source_t WKCreateMemoryStatusPressureCriticalDispatchOnMainQueue(void);
499 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
500 bool WKExecutableWasLinkedOnOrBeforeLion(void);
503 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
504 bool WKExecutableWasLinkedOnOrBeforeMountainLion(void);
507 void WKCGPathAddRoundedRect(CGMutablePathRef path, const CGAffineTransform* matrix, CGRect rect, CGFloat cornerWidth, CGFloat cornerHeight);
509 void WKCFURLRequestAllowAllPostCaching(CFURLRequestRef);
511 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
512 CGFloat WKNSElasticDeltaForTimeDelta(CGFloat initialPosition, CGFloat initialVelocity, CGFloat elapsedTime);
513 CGFloat WKNSElasticDeltaForReboundDelta(CGFloat delta);
514 CGFloat WKNSReboundDeltaForElasticDelta(CGFloat delta);
517 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
519 WKOcclusionNotificationTypeApplicationBecameVisible,
520 WKOcclusionNotificationTypeApplicationBecameOccluded,
521 WKOcclusionNotificationTypeApplicationWindowModificationsStarted,
522 WKOcclusionNotificationTypeApplicationWindowModificationsStopped,
523 WKOcclusionNotificationTypeWindowBecameVisible,
524 WKOcclusionNotificationTypeWindowBecameOccluded,
525 } WKOcclusionNotificationType;
527 typedef uint32_t WKWindowID;
529 typedef void (*WKOcclusionNotificationHandler)(uint32_t, void* data, uint32_t dataLength, void*, uint32_t);
531 bool WKRegisterOcclusionNotificationHandler(WKOcclusionNotificationType, WKOcclusionNotificationHandler);
532 bool WKUnregisterOcclusionNotificationHandler(WKOcclusionNotificationType, WKOcclusionNotificationHandler);
533 bool WKEnableWindowOcclusionNotifications(NSInteger windowID, bool *outCurrentOcclusionState);
536 void WKCFNetworkSetOverrideSystemProxySettings(CFDictionaryRef);
538 #if TARGET_OS_IPHONE || MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
539 bool WKIsPublicSuffix(NSString *domain);
541 CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStoreForPartition(CFStringRef partition);
542 typedef void (^CFURLCacheCopyAllPartitionNamesResultsNotification)(CFArrayRef partitionNames);
544 void WKCFURLCacheDeleteHostNamesInPersistentStoreForPartition(CFArrayRef hostArray, CFStringRef partition);
545 CFStringRef WKCachePartitionKey(void);
546 void WKCFURLCacheCopyAllPartitionNames(CFURLCacheCopyAllPartitionNamesResultsNotification resultsBlock);