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>
25 @class DDActionContext;
33 typedef struct _CFURLResponse* CFURLResponseRef;
34 typedef const struct _CFURLRequest* CFURLRequestRef;
35 typedef struct _CFURLRequest* CFMutableURLRequestRef;
37 typedef struct _CFURLCredential* WKCFURLCredentialRef;
38 typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
41 WKCertificateParseResultSucceeded = 0,
42 WKCertificateParseResultFailed = 1,
43 WKCertificateParseResultPKCS7 = 2,
44 } WKCertificateParseResult;
46 CFStringRef WKSignedPublicKeyAndChallengeString(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription);
47 WKCertificateParseResult WKAddCertificatesToKeychainFromData(const void *bytes, unsigned length);
49 NSDate *WKGetNSURLResponseLastModifiedDate(NSURLResponse *response);
50 NSString *WKCopyNSURLResponseStatusLine(NSURLResponse *response);
52 CFArrayRef WKCopyNSURLResponseCertificateChain(NSURLResponse *response);
54 CFStringEncoding WKGetWebDefaultCFStringEncoding(void);
56 void WKSetMetadataURL(NSString *URLString, NSString *referrer, NSString *path);
57 void WKSetNSURLConnectionDefersCallbacks(NSURLConnection *connection, BOOL defers);
60 void WKShowKeyAndMain(void);
62 OSStatus WKSyncWindowWithCGAfterMove(WindowRef);
63 unsigned WKCarbonWindowMask(void);
64 void *WKGetNativeWindowFromWindowRef(WindowRef);
65 OSType WKCarbonWindowPropertyCreator(void);
66 OSType WKCarbonWindowPropertyTag(void);
71 void WKSetNSURLRequestShouldContentSniff(NSMutableURLRequest *request, BOOL shouldContentSniff);
75 unsigned WKGetNSAutoreleasePoolCount(void);
78 void WKAdvanceDefaultButtonPulseAnimation(NSButtonCell *button);
80 NSString *WKWindowWillOrderOnScreenNotification(void);
81 NSString *WKWindowWillOrderOffScreenNotification(void);
82 void WKSetNSWindowShouldPostEventNotifications(NSWindow *window, BOOL post);
84 CFTypeID WKGetAXTextMarkerTypeID(void);
85 CFTypeID WKGetAXTextMarkerRangeTypeID(void);
86 CFTypeRef WKCreateAXTextMarker(const void *bytes, size_t len);
87 BOOL WKGetBytesFromAXTextMarker(CFTypeRef textMarker, void *bytes, size_t length);
88 CFTypeRef WKCreateAXTextMarkerRange(CFTypeRef start, CFTypeRef end);
89 CFTypeRef WKCopyAXTextMarkerRangeStart(CFTypeRef range);
90 CFTypeRef WKCopyAXTextMarkerRangeEnd(CFTypeRef range);
91 void WKAccessibilityHandleFocusChanged(void);
92 AXUIElementRef WKCreateAXUIElementRef(id element);
93 void WKUnregisterUniqueIdForElement(id element);
95 NSArray *WKSpeechSynthesisGetVoiceIdentifiers(void);
96 NSString *WKSpeechSynthesisGetDefaultVoiceIdentifierForLocale(NSLocale*);
99 BOOL WKShouldBlockPlugin(NSString *bundleIdentifier, NSString *bundleVersionString);
100 BOOL WKIsPluginUpdateAvailable(NSString *bundleIdentifier);
102 BOOL WKShouldBlockWebGL();
103 BOOL WKShouldSuggestBlockingWebGL();
105 // Remote Accessibility API.
106 #if !TARGET_OS_IPHONE
107 void WKAXRegisterRemoteApp(void);
108 void WKAXInitializeElementWithPresenterPid(id, pid_t);
109 NSData *WKAXRemoteTokenForElement(id);
110 id WKAXRemoteElementForToken(NSData *);
111 void WKAXSetWindowForRemoteElement(id remoteWindow, id remoteElement);
112 void WKAXRegisterRemoteProcess(bool registerProcess, pid_t);
113 pid_t WKAXRemoteProcessIdentifier(id remoteElement);
116 void WKSetUpFontCache(void);
118 #if !TARGET_OS_IPHONE
119 void WKDrawCapsLockIndicator(CGContextRef, CGRect);
121 // The CG context's current path is the focus ring's path.
122 // Color and radius are ignored. Older versions of WebKit expected to
123 // be able to change the rendering of the system focus ring.
124 void WKDrawFocusRing(CGContextRef context, CGColorRef color, int radius);
125 bool WKDrawFocusRingAtTime(CGContextRef context, NSTimeInterval time);
126 bool WKDrawCellFocusRingWithFrameAtTime(NSCell *cell, NSRect cellFrame, NSView *controlView, NSTimeInterval time);
128 void WKSetDragImage(NSImage *image, NSPoint offset);
130 void WKDrawBezeledTextArea(NSRect, BOOL enabled);
132 void WKPopupMenu(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*, NSControlSize controlSize, bool usesCustomAppearance);
133 void WKPopupContextMenu(NSMenu *menu, NSPoint screenLocation);
134 void WKSetDDActionContextIsForActionMenu(DDActionContext *actionContext);
135 void WKSendUserChangeNotifications(void);
137 BOOL WKConvertNSEventToCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent);
138 void WKSendKeyEventToTSM(NSEvent *theEvent);
139 void WKCallDrawingNotification(CGrafPtr port, Rect *bounds);
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);
147 BOOL WKCGContextGetShouldSmoothFonts(CGContextRef cgContext);
150 void WKSetBaseCTM(CGContextRef, CGAffineTransform);
151 void WKSetPatternPhaseInUserSpace(CGContextRef, CGPoint);
152 CGAffineTransform WKGetUserToBaseCTM(CGContextRef);
154 void WKGetGlyphsForCharacters(CGFontRef, const UniChar[], CGGlyph[], size_t);
155 bool WKGetVerticalGlyphsForCharacters(CTFontRef, const UniChar[], CGGlyph[], size_t);
157 CTLineRef WKCreateCTLineWithUniCharProvider(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
159 #if TARGET_OS_IPHONE || MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
161 WKCTFontTransformApplyShaping = (1 << 0),
162 WKCTFontTransformApplyPositioning = (1 << 1)
165 typedef int WKCTFontTransformOptions;
167 bool WKCTFontTransformGlyphs(CTFontRef font, CGGlyph glyphs[], CGSize advances[], CFIndex count, WKCTFontTransformOptions options);
168 #endif // TARGET_OS_IPHONE || MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
170 CTTypesetterRef WKCreateCTTypesetterWithUniCharProviderAndOptions(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
172 CGSize WKCTRunGetInitialAdvance(CTRunRef);
174 #if (TARGET_OS_IPHONE && TARGET_OS_EMBEDDED) || MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
175 CGContextRef WKIOSurfaceContextCreate(IOSurfaceRef, unsigned width, unsigned height, CGColorSpaceRef);
176 CGImageRef WKIOSurfaceContextCreateImage(CGContextRef context);
180 WKPatternTilingNoDistortion,
181 WKPatternTilingConstantSpacingMinimalDistortion,
182 WKPatternTilingConstantSpacing
185 CGPatternRef WKCGPatternCreateWithImageAndTransform(CGImageRef image, CGAffineTransform transform, int tiling);
186 void WKCGContextResetClip(CGContextRef);
188 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
189 bool WKCGContextDrawsWithCorrectShadowOffsets(CGContextRef);
192 #if !TARGET_OS_IPHONE
194 NSEvent *WKCreateNSEventWithCarbonEvent(EventRef eventRef);
195 NSEvent *WKCreateNSEventWithCarbonMouseMoveEvent(EventRef inEvent, NSWindow *window);
196 NSEvent *WKCreateNSEventWithCarbonClickEvent(EventRef inEvent, WindowRef windowRef);
199 CGContextRef WKNSWindowOverrideCGContext(NSWindow *, CGContextRef);
200 void WKNSWindowRestoreCGContext(NSWindow *, CGContextRef);
205 BOOL WKCGContextIsBitmapContext(CGContextRef context);
206 bool WKCGContextIsPDFContext(CGContextRef context);
208 #if !TARGET_OS_IPHONE
209 void WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, BOOL *continuous);
211 BOOL WKAppVersionCheckLessThan(NSString *, int, double);
216 WKMovieTypeStoredStream,
217 WKMovieTypeLiveStream
220 int WKQTMovieGetType(QTMovie* movie);
222 BOOL WKQTMovieHasClosedCaptions(QTMovie* movie);
223 void WKQTMovieSetShowClosedCaptions(QTMovie* movie, BOOL showClosedCaptions);
224 void WKQTMovieSelectPreferredAlternates(QTMovie* movie);
226 unsigned WKQTIncludeOnlyModernMediaFileTypes(void);
227 float WKQTMovieMaxTimeLoaded(QTMovie* movie);
228 float WKQTMovieMaxTimeSeekable(QTMovie* movie);
229 NSString *WKQTMovieMaxTimeLoadedChangeNotification(void);
230 void WKQTMovieViewSetDrawSynchronously(QTMovieView* view, BOOL sync);
231 void WKQTMovieDisableComponent(uint32_t[5]);
232 NSURL *WKQTMovieResolvedURL(QTMovie* movie);
235 CFStringRef WKCopyFoundationCacheDirectory(void);
237 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
238 CFURLStorageSessionRef WKCreatePrivateStorageSession(CFStringRef);
239 NSURLRequest *WKCopyRequestWithStorageSession(CFURLStorageSessionRef, NSURLRequest *);
240 NSCachedURLResponse *WKCachedResponseForRequest(CFURLStorageSessionRef, NSURLRequest *);
241 void WKSetRequestStorageSession(CFURLStorageSessionRef, CFMutableURLRequestRef);
243 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
244 CFHTTPCookieStorageRef WKCopyHTTPCookieStorage(CFURLStorageSessionRef);
245 unsigned WKGetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef);
246 void WKSetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef, unsigned policy);
247 NSArray *WKHTTPCookies(CFHTTPCookieStorageRef);
248 NSArray *WKHTTPCookiesForURL(CFHTTPCookieStorageRef, NSURL *, NSURL *);
249 void WKSetHTTPCookiesForURL(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
250 void WKDeleteAllHTTPCookies(CFHTTPCookieStorageRef);
251 void WKDeleteHTTPCookie(CFHTTPCookieStorageRef, NSHTTPCookie *);
253 CFHTTPCookieStorageRef WKGetDefaultHTTPCookieStorage(void);
254 WKCFURLCredentialRef WKCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef);
255 void WKSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool flag);
257 #if !TARGET_OS_IPHONE
258 void WKSetVisibleApplicationName(CFStringRef);
259 void WKSetApplicationInformationItem(CFStringRef key, CFTypeRef value);
262 CFURLRef WKCopyBundleURLForExecutableURL(CFURLRef);
264 #if !TARGET_OS_IPHONE
266 WKMediaUIPartFullscreenButton = 0,
267 WKMediaUIPartMuteButton,
268 WKMediaUIPartPlayButton,
269 WKMediaUIPartSeekBackButton,
270 WKMediaUIPartSeekForwardButton,
271 WKMediaUIPartTimelineSlider,
272 WKMediaUIPartTimelineSliderThumb,
273 WKMediaUIPartRewindButton,
274 WKMediaUIPartSeekToRealtimeButton,
275 WKMediaUIPartShowClosedCaptionsButton,
276 WKMediaUIPartHideClosedCaptionsButton,
277 WKMediaUIPartUnMuteButton,
278 WKMediaUIPartPauseButton,
279 WKMediaUIPartBackground,
280 WKMediaUIPartCurrentTimeDisplay,
281 WKMediaUIPartTimeRemainingDisplay,
282 WKMediaUIPartStatusDisplay,
283 WKMediaUIPartControlsPanel,
284 WKMediaUIPartVolumeSliderContainer,
285 WKMediaUIPartVolumeSlider,
286 WKMediaUIPartVolumeSliderThumb,
287 WKMediaUIPartFullScreenVolumeSlider,
288 WKMediaUIPartFullScreenVolumeSliderThumb,
289 WKMediaUIPartVolumeSliderMuteButton,
290 WKMediaUIPartTextTrackDisplayContainer,
291 WKMediaUIPartTextTrackDisplay,
292 WKMediaUIPartExitFullscreenButton,
296 WKMediaControllerFlagDisabled = 1 << 0,
297 WKMediaControllerFlagPressed = 1 << 1,
298 WKMediaControllerFlagDrawEndCaps = 1 << 3,
299 WKMediaControllerFlagFocused = 1 << 4
300 } WKMediaControllerThemeState;
302 BOOL WKHitTestMediaUIPart(int part, CGRect bounds, CGPoint point);
303 void WKMeasureMediaUIPart(int part, CGRect *bounds, CGSize *naturalSize);
304 void WKDrawMediaUIPart(int part, CGContextRef context, CGRect rect, unsigned state);
305 void WKDrawMediaSliderTrack(CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
306 NSView *WKCreateMediaUIBackgroundView(void);
309 WKMediaUIControlTimeline,
310 WKMediaUIControlSlider,
311 WKMediaUIControlPlayPauseButton,
312 WKMediaUIControlExitFullscreenButton,
313 WKMediaUIControlRewindButton,
314 WKMediaUIControlFastForwardButton,
315 WKMediaUIControlVolumeUpButton,
316 WKMediaUIControlVolumeDownButton
317 } WKMediaUIControlType;
319 NSControl *WKCreateMediaUIControl(int controlType);
321 NSArray *WKQTGetSitesInMediaDownloadCache();
322 void WKQTClearMediaDownloadCacheForSite(NSString *site);
323 void WKQTClearMediaDownloadCache();
325 mach_port_t WKInitializeRenderServer(void);
330 CALayer *WKMakeRenderLayer(uint32_t contextID);
332 #if !TARGET_OS_IPHONE
333 typedef struct __WKSoftwareCARendererRef *WKSoftwareCARendererRef;
335 WKSoftwareCARendererRef WKSoftwareCARendererCreate(uint32_t contextID);
336 void WKSoftwareCARendererDestroy(WKSoftwareCARendererRef);
337 void WKSoftwareCARendererRender(WKSoftwareCARendererRef, CGContextRef, CGRect);
340 typedef struct __WKCAContextRef *WKCAContextRef;
342 WKCAContextRef WKCAContextMakeRemoteWithServerPort(mach_port_t port);
343 #if !TARGET_OS_IPHONE
344 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));
356 #if !TARGET_OS_IPHONE
357 typedef struct __WKWindowBounceAnimationContext *WKWindowBounceAnimationContextRef;
359 WKWindowBounceAnimationContextRef WKWindowBounceAnimationContextCreate(NSWindow *window);
360 void WKWindowBounceAnimationContextDestroy(WKWindowBounceAnimationContextRef context);
361 void WKWindowBounceAnimationSetAnimationProgress(WKWindowBounceAnimationContextRef context, double animationProgress);
363 void WKWindowSetClipRect(NSWindow*, NSRect);
365 #if defined(__x86_64__)
367 CFRunLoopSourceRef WKCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t serverPort);
370 NSUInteger WKGetInputPanelWindowStyle(void);
371 UInt8 WKGetNSEventKeyChar(NSEvent *);
374 unsigned WKInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
375 int WKGetHTTPRequestPriority(CFURLRequestRef);
376 void WKSetHTTPRequestMaximumPriority(int maximumPriority);
377 void WKSetHTTPRequestPriority(CFURLRequestRef, int priority);
378 void WKSetHTTPRequestMinimumFastLanePriority(int priority);
379 void WKHTTPRequestEnablePipelining(CFURLRequestRef);
381 void WKSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
382 void WKSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
383 CFHTTPMessageRef WKCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL, CFStringRef proxyHost, CFNumberRef proxyPort);
385 #if !TARGET_OS_IPHONE
386 void WKWindowSetAlpha(NSWindow *window, float alphaValue);
387 void WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame);
389 void WKEnableSettingCursorWhenInBackground(void);
392 CFDictionaryRef WKNSURLRequestCreateSerializableRepresentation(NSURLRequest *request, CFTypeRef tokenNull);
393 NSURLRequest *WKNSURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
394 CFDictionaryRef WKCFURLRequestCreateSerializableRepresentation(CFURLRequestRef cfRequest, CFTypeRef tokenNull);
395 CFURLRequestRef WKCreateCFURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
397 CFDictionaryRef WKNSURLResponseCreateSerializableRepresentation(NSURLResponse *response, CFTypeRef tokenNull);
398 NSURLResponse *WKNSURLResponseFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
400 #if !TARGET_OS_IPHONE && !defined(__LP64__)
401 ScriptCode WKGetScriptCodeFromCurrentKeyboardInputSource(void);
404 CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStore(void);
405 void WKCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostArray);
407 CFStringRef WKGetCFURLResponseMIMEType(CFURLResponseRef);
408 CFURLRef WKGetCFURLResponseURL(CFURLResponseRef);
409 CFHTTPMessageRef WKGetCFURLResponseHTTPResponse(CFURLResponseRef);
410 CFStringRef WKCopyCFURLResponseSuggestedFilename(CFURLResponseRef);
411 void WKSetCFURLResponseMIMEType(CFURLResponseRef, CFStringRef mimeType);
414 WKSandboxExtensionTypeReadOnly,
415 WKSandboxExtensionTypeReadWrite,
416 } WKSandboxExtensionType;
417 typedef struct __WKSandboxExtension *WKSandboxExtensionRef;
419 WKSandboxExtensionRef WKSandboxExtensionCreate(const char* path, WKSandboxExtensionType type);
420 void WKSandboxExtensionDestroy(WKSandboxExtensionRef sandboxExtension);
422 bool WKSandboxExtensionConsume(WKSandboxExtensionRef sandboxExtension);
423 bool WKSandboxExtensionInvalidate(WKSandboxExtensionRef sandboxExtension);
425 const char* WKSandboxExtensionGetSerializedFormat(WKSandboxExtensionRef sandboxExtension, size_t* length);
426 WKSandboxExtensionRef WKSandboxExtensionCreateFromSerializedFormat(const char* serializationFormat, size_t length);
428 #if !TARGET_OS_IPHONE
429 OSStatus WKEnableSandboxStyleFileQuarantine(void);
431 int WKRecommendedScrollerStyle(void);
433 bool WKExecutableWasLinkedOnOrBeforeSnowLeopard(void);
435 NSRange WKExtractWordDefinitionTokenRangeFromContextualString(NSString *contextString, NSRange range, NSDictionary **options);
436 void WKShowWordDefinitionWindow(NSAttributedString *term, NSPoint screenPoint, NSDictionary *options);
437 void WKHideWordDefinitionWindow(void);
440 #if !TARGET_OS_IPHONE
441 CFStringRef WKCopyDefaultSearchProviderDisplayName(void);
444 void WKSetCrashReportApplicationSpecificInformation(CFStringRef);
446 #if !TARGET_OS_IPHONE
447 NSCursor *WKCursor(const char *name);
450 dispatch_source_t WKCreateVMPressureDispatchOnMainQueue(void);
451 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
452 dispatch_source_t WKCreateMemoryStatusPressureCriticalDispatchOnMainQueue(void);
455 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
456 bool WKExecutableWasLinkedOnOrBeforeLion(void);
459 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
460 bool WKExecutableWasLinkedOnOrBeforeMountainLion(void);
463 void WKCGPathAddRoundedRect(CGMutablePathRef path, const CGAffineTransform* matrix, CGRect rect, CGFloat cornerWidth, CGFloat cornerHeight);
465 void WKCFURLRequestAllowAllPostCaching(CFURLRequestRef);
467 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
468 CGFloat WKNSElasticDeltaForTimeDelta(CGFloat initialPosition, CGFloat initialVelocity, CGFloat elapsedTime);
469 CGFloat WKNSElasticDeltaForReboundDelta(CGFloat delta);
470 CGFloat WKNSReboundDeltaForElasticDelta(CGFloat delta);
473 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
475 WKOcclusionNotificationTypeApplicationBecameVisible,
476 WKOcclusionNotificationTypeApplicationBecameOccluded,
477 WKOcclusionNotificationTypeApplicationWindowModificationsStarted,
478 WKOcclusionNotificationTypeApplicationWindowModificationsStopped,
479 WKOcclusionNotificationTypeWindowBecameVisible,
480 WKOcclusionNotificationTypeWindowBecameOccluded,
481 } WKOcclusionNotificationType;
483 typedef uint32_t WKWindowID;
485 typedef void (*WKOcclusionNotificationHandler)(uint32_t, void* data, uint32_t dataLength, void*, uint32_t);
487 bool WKRegisterOcclusionNotificationHandler(WKOcclusionNotificationType, WKOcclusionNotificationHandler);
488 bool WKUnregisterOcclusionNotificationHandler(WKOcclusionNotificationType, WKOcclusionNotificationHandler);
489 bool WKEnableWindowOcclusionNotifications(NSInteger windowID, bool *outCurrentOcclusionState);
492 void WKCFNetworkSetOverrideSystemProxySettings(CFDictionaryRef);
494 #if TARGET_OS_IPHONE || MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
495 bool WKIsPublicSuffix(NSString *domain);
497 CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStoreForPartition(CFStringRef partition);
498 typedef void (^CFURLCacheCopyAllPartitionNamesResultsNotification)(CFArrayRef partitionNames);
500 void WKCFURLCacheDeleteHostNamesInPersistentStoreForPartition(CFArrayRef hostArray, CFStringRef partition);
501 CFStringRef WKCachePartitionKey(void);
502 void WKCFURLCacheCopyAllPartitionNames(CFURLCacheCopyAllPartitionNamesResultsNotification resultsBlock);
506 WKExternalPlaybackTypeNone,
507 WKExternalPlaybackTypeAirPlay,
508 WKExternalPlaybackTypeTVOut,
509 } WKExternalPlaybackType;
511 int WKExernalDeviceTypeForPlayer(AVPlayer *);
512 NSString *WKExernalDeviceDisplayNameForPlayer(AVPlayer *);
514 bool WKQueryDecoderAvailability(void);