2 WebKitSystemInterface.h
3 Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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 typedef id WKNSURLConnectionDelegateProxyPtr;
65 WKNSURLConnectionDelegateProxyPtr WKCreateNSURLConnectionDelegateProxy(void);
67 void WKDisableCGDeferredUpdates(void);
69 Class WKNSURLProtocolClassForRequest(NSURLRequest *request);
70 void WKSetNSURLRequestShouldContentSniff(NSMutableURLRequest *request, BOOL shouldContentSniff);
72 unsigned WKGetNSAutoreleasePoolCount(void);
74 void WKAdvanceDefaultButtonPulseAnimation(NSButtonCell *button);
76 NSString *WKMouseMovedNotification(void);
77 NSString *WKWindowWillOrderOnScreenNotification(void);
78 NSString *WKWindowWillOrderOffScreenNotification(void);
79 void WKSetNSWindowShouldPostEventNotifications(NSWindow *window, BOOL post);
81 CFTypeID WKGetAXTextMarkerTypeID(void);
82 CFTypeID WKGetAXTextMarkerRangeTypeID(void);
83 CFTypeRef WKCreateAXTextMarker(const void *bytes, size_t len);
84 BOOL WKGetBytesFromAXTextMarker(CFTypeRef textMarker, void *bytes, size_t length);
85 CFTypeRef WKCreateAXTextMarkerRange(CFTypeRef start, CFTypeRef end);
86 CFTypeRef WKCopyAXTextMarkerRangeStart(CFTypeRef range);
87 CFTypeRef WKCopyAXTextMarkerRangeEnd(CFTypeRef range);
88 void WKAccessibilityHandleFocusChanged(void);
89 AXUIElementRef WKCreateAXUIElementRef(id element);
90 void WKUnregisterUniqueIdForElement(id element);
92 BOOL WKShouldBlockPlugin(NSString *bundleIdentifier, NSString *bundleVersionString);
94 // Remote Accessibility API.
95 void WKAXRegisterRemoteApp(void);
96 void WKAXInitializeElementWithPresenterPid(id, pid_t);
97 NSData *WKAXRemoteTokenForElement(id);
98 id WKAXRemoteElementForToken(NSData *);
99 void WKAXSetWindowForRemoteElement(id remoteWindow, id remoteElement);
100 void WKAXRegisterRemoteProcess(bool registerProcess, pid_t);
101 pid_t WKAXRemoteProcessIdentifier(id remoteElement);
103 void WKSetUpFontCache(void);
105 void WKSignalCFReadStreamEnd(CFReadStreamRef stream);
106 void WKSignalCFReadStreamHasBytes(CFReadStreamRef stream);
107 void WKSignalCFReadStreamError(CFReadStreamRef stream, CFStreamError *error);
109 CFReadStreamRef WKCreateCustomCFReadStream(void *(*formCreate)(CFReadStreamRef, void *),
110 void (*formFinalize)(CFReadStreamRef, void *),
111 Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *),
112 CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *),
113 Boolean (*formCanRead)(CFReadStreamRef, void *),
114 void (*formClose)(CFReadStreamRef, void *),
115 void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
116 void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
119 void WKDrawCapsLockIndicator(CGContextRef, CGRect);
121 void WKDrawFocusRing(CGContextRef context, CGColorRef color, int radius);
122 // The CG context's current path is the focus ring's path.
123 // A color of 0 means "use system focus ring color".
124 // A radius of 0 means "use default focus ring radius".
126 void WKSetDragImage(NSImage *image, NSPoint offset);
128 void WKDrawBezeledTextFieldCell(NSRect, BOOL enabled);
129 void WKDrawTextFieldCellFocusRing(NSTextFieldCell*, NSRect);
130 void WKDrawBezeledTextArea(NSRect, BOOL enabled);
131 void WKPopupMenu(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
132 void WKPopupContextMenu(NSMenu *menu, NSPoint screenLocation);
133 void WKSendUserChangeNotifications(void);
135 BOOL WKConvertNSEventToCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent);
136 void WKSendKeyEventToTSM(NSEvent *theEvent);
137 void WKCallDrawingNotification(CGrafPtr port, Rect *bounds);
140 BOOL WKGetGlyphTransformedAdvances(CGFontRef, NSFont*, CGAffineTransform *m, ATSGlyphRef *glyph, CGSize *advance);
141 NSFont *WKGetFontInLanguageForRange(NSFont *font, NSString *string, NSRange range);
142 NSFont *WKGetFontInLanguageForCharacter(NSFont *font, UniChar ch);
143 void WKSetCGFontRenderingMode(CGContextRef cgContext, NSFont *font, BOOL shouldSubpixelQuantize);
144 BOOL WKCGContextGetShouldSmoothFonts(CGContextRef cgContext);
147 void WKSetBaseCTM(CGContextRef, CGAffineTransform);
148 void WKSetPatternPhaseInUserSpace(CGContextRef, CGPoint);
149 CGAffineTransform WKGetUserToBaseCTM(CGContextRef);
151 void WKGetGlyphsForCharacters(CGFontRef, const UniChar[], CGGlyph[], size_t);
152 bool WKGetVerticalGlyphsForCharacters(CTFontRef, const UniChar[], CGGlyph[], size_t);
154 CTLineRef WKCreateCTLineWithUniCharProvider(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
156 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
158 WKCTFontTransformApplyShaping = (1 << 0),
159 WKCTFontTransformApplyPositioning = (1 << 1)
162 typedef int WKCTFontTransformOptions;
164 bool WKCTFontTransformGlyphs(CTFontRef font, CGGlyph glyphs[], CGSize advances[], CFIndex count, WKCTFontTransformOptions options);
167 CTTypesetterRef WKCreateCTTypesetterWithUniCharProviderAndOptions(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
169 CGContextRef WKIOSurfaceContextCreate(IOSurfaceRef, unsigned width, unsigned height, CGColorSpaceRef);
170 CGImageRef WKIOSurfaceContextCreateImage(CGContextRef context);
173 WKPatternTilingNoDistortion,
174 WKPatternTilingConstantSpacingMinimalDistortion,
175 WKPatternTilingConstantSpacing
178 CGPatternRef WKCGPatternCreateWithImageAndTransform(CGImageRef image, CGAffineTransform transform, int tiling);
179 void WKCGContextResetClip(CGContextRef);
181 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
182 bool WKCGContextDrawsWithCorrectShadowOffsets(CGContextRef);
186 NSEvent *WKCreateNSEventWithCarbonEvent(EventRef eventRef);
187 NSEvent *WKCreateNSEventWithCarbonMouseMoveEvent(EventRef inEvent, NSWindow *window);
188 NSEvent *WKCreateNSEventWithCarbonClickEvent(EventRef inEvent, WindowRef windowRef);
191 CGContextRef WKNSWindowOverrideCGContext(NSWindow *, CGContextRef);
192 void WKNSWindowRestoreCGContext(NSWindow *, CGContextRef);
194 void WKNSWindowMakeBottomCornersSquare(NSWindow *);
196 // These constants match the ones used by ThemeScrollbarArrowStyle (some of the values are private, so we can't just
197 // use that enum directly).
199 WKThemeScrollBarArrowsSingle = 0,
200 WKThemeScrollBarArrowsLowerRight = 1,
201 WKThemeScrollBarArrowsDouble = 2,
202 WKThemeScrollBarArrowsUpperLeft = 3,
203 } WKThemeScrollBarArrowStyle;
205 OSStatus WKThemeDrawTrack(const HIThemeTrackDrawInfo* inDrawInfo, CGContextRef inContext, int inArrowStyle);
208 BOOL WKCGContextIsBitmapContext(CGContextRef context);
210 void WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, BOOL *continuous);
212 BOOL WKAppVersionCheckLessThan(NSString *, int, double);
217 WKMovieTypeStoredStream,
218 WKMovieTypeLiveStream
221 int WKQTMovieGetType(QTMovie* movie);
223 BOOL WKQTMovieHasClosedCaptions(QTMovie* movie);
224 void WKQTMovieSetShowClosedCaptions(QTMovie* movie, BOOL showClosedCaptions);
225 void WKQTMovieSelectPreferredAlternates(QTMovie* movie);
226 void WKQTMovieSelectPreferredAlternateTrackForMediaType(QTMovie* movie, NSString* mediaType);
228 unsigned WKQTIncludeOnlyModernMediaFileTypes(void);
229 int WKQTMovieDataRate(QTMovie* movie);
230 float WKQTMovieMaxTimeLoaded(QTMovie* movie);
231 float WKQTMovieMaxTimeSeekable(QTMovie* movie);
232 NSString *WKQTMovieMaxTimeLoadedChangeNotification(void);
233 void WKQTMovieViewSetDrawSynchronously(QTMovieView* view, BOOL sync);
234 void WKQTMovieDisableComponent(uint32_t[5]);
235 NSURL *WKQTMovieResolvedURL(QTMovie* movie);
237 CFStringRef WKCopyFoundationCacheDirectory(void);
239 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
240 CFURLStorageSessionRef WKCreatePrivateStorageSession(CFStringRef);
241 NSURLRequest *WKCopyRequestWithStorageSession(CFURLStorageSessionRef, NSURLRequest*);
242 NSCachedURLResponse *WKCachedResponseForRequest(CFURLStorageSessionRef, NSURLRequest*);
243 void WKSetRequestStorageSession(CFURLStorageSessionRef, CFMutableURLRequestRef);
245 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
246 CFHTTPCookieStorageRef WKCopyHTTPCookieStorage(CFURLStorageSessionRef);
247 unsigned WKGetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef);
248 void WKSetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef, unsigned policy);
249 NSArray *WKHTTPCookies(CFHTTPCookieStorageRef);
250 NSArray *WKHTTPCookiesForURL(CFHTTPCookieStorageRef, NSURL *);
251 void WKSetHTTPCookiesForURL(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
252 void WKDeleteAllHTTPCookies(CFHTTPCookieStorageRef);
253 void WKDeleteHTTPCookie(CFHTTPCookieStorageRef, NSHTTPCookie *);
255 CFHTTPCookieStorageRef WKGetDefaultHTTPCookieStorage(void);
256 WKCFURLCredentialRef WKCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef);
257 void WKSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool flag);
258 CFArrayRef WKCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef);
259 void WKCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts);
261 void WKSetVisibleApplicationName(CFStringRef);
263 CFURLRef WKCopyBundleURLForExecutableURL(CFURLRef);
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 WKMediaControllerThemeClassic = 1,
297 WKMediaControllerThemeQuickTime = 2
298 } WKMediaControllerThemeStyle;
301 WKMediaControllerFlagDisabled = 1 << 0,
302 WKMediaControllerFlagPressed = 1 << 1,
303 WKMediaControllerFlagDrawEndCaps = 1 << 3,
304 WKMediaControllerFlagFocused = 1 << 4
305 } WKMediaControllerThemeState;
307 BOOL WKMediaControllerThemeAvailable(int themeStyle);
308 BOOL WKHitTestMediaUIPart(int part, int themeStyle, CGRect bounds, CGPoint point);
309 void WKMeasureMediaUIPart(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
310 void WKDrawMediaUIPart(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
311 void WKDrawMediaSliderTrack(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
312 NSView *WKCreateMediaUIBackgroundView(void);
315 WKMediaUIControlTimeline,
316 WKMediaUIControlSlider,
317 WKMediaUIControlPlayPauseButton,
318 WKMediaUIControlExitFullscreenButton,
319 WKMediaUIControlRewindButton,
320 WKMediaUIControlFastForwardButton,
321 WKMediaUIControlVolumeUpButton,
322 WKMediaUIControlVolumeDownButton
323 } WKMediaUIControlType;
325 NSControl *WKCreateMediaUIControl(int controlType);
327 NSArray *WKQTGetSitesInMediaDownloadCache();
328 void WKQTClearMediaDownloadCacheForSite(NSString *site);
329 void WKQTClearMediaDownloadCache();
331 mach_port_t WKInitializeRenderServer(void);
335 CALayer *WKMakeRenderLayer(uint32_t contextID);
337 typedef struct __WKSoftwareCARendererRef *WKSoftwareCARendererRef;
339 WKSoftwareCARendererRef WKSoftwareCARendererCreate(uint32_t contextID);
340 void WKSoftwareCARendererDestroy(WKSoftwareCARendererRef);
341 void WKSoftwareCARendererRender(WKSoftwareCARendererRef, CGContextRef, CGRect);
343 typedef struct __WKCARemoteLayerClientRef *WKCARemoteLayerClientRef;
345 WKCARemoteLayerClientRef WKCARemoteLayerClientMakeWithServerPort(mach_port_t port);
346 void WKCARemoteLayerClientInvalidate(WKCARemoteLayerClientRef);
347 uint32_t WKCARemoteLayerClientGetClientId(WKCARemoteLayerClientRef);
348 void WKCARemoteLayerClientSetLayer(WKCARemoteLayerClientRef, CALayer *);
349 CALayer *WKCARemoteLayerClientGetLayer(WKCARemoteLayerClientRef);
351 typedef struct __WKCAContextRef *WKCAContextRef;
353 WKCAContextRef WKCAContextMakeRemoteWithServerPort(mach_port_t port);
354 WKCAContextRef WKCAContextMakeRemoteForWindowServer(void);
355 void WKCAContextInvalidate(WKCAContextRef);
356 uint32_t WKCAContextGetContextId(WKCAContextRef);
357 void WKCAContextSetLayer(WKCAContextRef, CALayer *);
358 CALayer *WKCAContextGetLayer(WKCAContextRef);
359 void WKCAContextSetColorSpace(WKCAContextRef, CGColorSpaceRef);
360 CGColorSpaceRef WKCAContextGetColorSpace(WKCAContextRef);
362 void WKCALayerEnumerateRectsBeingDrawnWithBlock(CALayer *layer, CGContextRef context, void (^block)(CGRect rect));
366 void WKCARendererAddChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
367 void WKCARendererRemoveChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
369 typedef struct __WKWindowBounceAnimationContext *WKWindowBounceAnimationContextRef;
371 WKWindowBounceAnimationContextRef WKWindowBounceAnimationContextCreate(NSWindow *window);
372 void WKWindowBounceAnimationContextDestroy(WKWindowBounceAnimationContextRef context);
373 void WKWindowBounceAnimationSetAnimationProgress(WKWindowBounceAnimationContextRef context, double animationProgress);
375 void WKWindowSetClipRect(NSWindow*, NSRect);
377 #if defined(__x86_64__)
379 CFRunLoopSourceRef WKCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t serverPort);
380 #endif // defined(__x86_64__)
382 NSUInteger WKGetInputPanelWindowStyle(void);
383 UInt8 WKGetNSEventKeyChar(NSEvent *);
385 @class CAPropertyAnimation;
386 void WKSetCAAnimationValueFunction(CAPropertyAnimation*, NSString* function);
388 unsigned WKInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
389 int WKGetHTTPPipeliningPriority(CFURLRequestRef);
390 void WKSetHTTPPipeliningMaximumPriority(int maximumPriority);
391 void WKSetHTTPPipeliningPriority(CFURLRequestRef, int priority);
392 void WKSetHTTPPipeliningMinimumFastLanePriority(int priority);
394 void WKSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
395 void WKSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
396 CFHTTPMessageRef WKCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL);
398 void WKWindowSetAlpha(NSWindow *window, float alphaValue);
399 void WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame);
401 void WKSyncSurfaceToView(NSView *view);
403 void WKEnableSettingCursorWhenInBackground(void);
405 CFDictionaryRef WKNSURLRequestCreateSerializableRepresentation(NSURLRequest *request, CFTypeRef tokenNull);
406 NSURLRequest *WKNSURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
408 CFDictionaryRef WKNSURLResponseCreateSerializableRepresentation(NSURLResponse *response, CFTypeRef tokenNull);
409 NSURLResponse *WKNSURLResponseFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
412 ScriptCode WKGetScriptCodeFromCurrentKeyboardInputSource(void);
415 CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStore(void);
416 void WKCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostArray);
418 CFStringRef WKGetCFURLResponseMIMEType(CFURLResponseRef);
419 CFURLRef WKGetCFURLResponseURL(CFURLResponseRef);
420 CFHTTPMessageRef WKGetCFURLResponseHTTPResponse(CFURLResponseRef);
421 CFStringRef WKCopyCFURLResponseSuggestedFilename(CFURLResponseRef);
422 void WKSetCFURLResponseMIMEType(CFURLResponseRef, CFStringRef mimeType);
424 CIFormat WKCIGetRGBA8Format(void);
427 WKSandboxExtensionTypeReadOnly,
428 WKSandboxExtensionTypeWriteOnly,
429 WKSandboxExtensionTypeReadWrite,
430 } WKSandboxExtensionType;
431 typedef struct __WKSandboxExtension *WKSandboxExtensionRef;
433 WKSandboxExtensionRef WKSandboxExtensionCreate(const char* path, WKSandboxExtensionType type);
434 void WKSandboxExtensionDestroy(WKSandboxExtensionRef sandboxExtension);
436 bool WKSandboxExtensionConsume(WKSandboxExtensionRef sandboxExtension);
437 bool WKSandboxExtensionInvalidate(WKSandboxExtensionRef sandboxExtension);
439 const char* WKSandboxExtensionGetSerializedFormat(WKSandboxExtensionRef sandboxExtension, size_t* length);
440 WKSandboxExtensionRef WKSandboxExtensionCreateFromSerializedFormat(const char* serializationFormat, size_t length);
442 OSStatus WKEnableSandboxStyleFileQuarantine(void);
444 bool WKEnterPluginSandbox(const char* profile, const char* parameters[], const char* readOnlyPaths[], const char* readWritePaths[]);
446 int WKRecommendedScrollerStyle(void);
448 bool WKExecutableWasLinkedOnOrBeforeSnowLeopard(void);
450 NSRange WKExtractWordDefinitionTokenRangeFromContextualString(NSString *contextString, NSRange range, NSDictionary **options);
451 void WKShowWordDefinitionWindow(NSAttributedString *term, NSPoint screenPoint, NSDictionary *options);
452 void WKHideWordDefinitionWindow(void);
454 CFStringRef WKCopyDefaultSearchProviderDisplayName(void);
456 void WKSetCrashReportApplicationSpecificInformation(CFStringRef);
458 NSURL* WKAVAssetResolvedURL(AVAsset*);
460 NSCursor *WKCursor(const char *name);
462 dispatch_source_t WKCreateVMPressureDispatchOnMainQueue(void);
464 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
465 bool WKExecutableWasLinkedOnOrBeforeLion(void);
468 void WKCGPathAddRoundedRect(CGMutablePathRef path, const CGAffineTransform* matrix, CGRect rect, CGFloat cornerWidth, CGFloat cornerHeight);
470 void WKCFURLRequestAllowAllPostCaching(CFURLRequestRef);
472 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
473 @class WebFilterEvaluator;
475 BOOL WKFilterIsManagedSession(void);
476 WebFilterEvaluator *WKFilterCreateInstance(NSURLResponse *);
477 void WKFilterRelease(WebFilterEvaluator *);
478 BOOL WKFilterWasBlocked(WebFilterEvaluator *);
479 const char* WKFilterAddData(WebFilterEvaluator *, const char* data, int* length);
480 const char* WKFilterDataComplete(WebFilterEvaluator *, int* length);
482 CGFloat WKNSElasticDeltaForTimeDelta(CGFloat initialPosition, CGFloat initialVelocity, CGFloat elapsedTime);
483 CGFloat WKNSElasticDeltaForReboundDelta(CGFloat delta);
484 CGFloat WKNSReboundDeltaForElasticDelta(CGFloat delta);
488 WKCaptionFontStyleDefault = 0,
489 WKCaptionFontStyleMonospacedWithSerif,
490 WKCaptionFontStyleProportionalWithSerif,
491 WKCaptionFontStyleMonospacedWithoutSerif,
492 WKCaptionFontStyleProportionalWithoutSerif,
493 WKCaptionFontStyleCasual,
494 WKCaptionFontStyleCursive,
495 WKCaptionFontStyleSmallCapital,
496 WKCaptionFontStyleMax
497 } WKCaptionFontStyle;
500 WKCaptionTextEdgeStyleUndefined = 0,
501 WKCaptionTextEdgeStyleNone,
502 WKCaptionTextEdgeStyleRaised,
503 WKCaptionTextEdgeStyleDepressed,
504 WKCaptionTextEdgeStyleUniform,
505 WKCaptionTextEdgeStyleDropShadow,
506 WKCaptionTextEdgeStyleMax
507 } WKCaptionTextEdgeStyle;
509 bool WKCaptionAppearanceHasUserPreferences(void);
510 bool WKCaptionAppearanceShowCaptionsWhenAvailable(void);
511 CGColorRef WKCaptionAppearanceCopyForegroundColor(void);
512 CGColorRef WKCaptionAppearanceCopyBackgroundColor(void);
513 CGColorRef WKCaptionAppearanceCopyWindowColor(void);
514 bool WKCaptionAppearanceGetForegroundOpacity(CGFloat*);
515 bool WKCaptionAppearanceGetBackgroundOpacity(CGFloat*);
516 bool WKCaptionAppearanceGetWindowOpacity(CGFloat*);
517 CGFontRef WKCaptionAppearanceCopyFontForStyle(int fontStyle);
518 bool WKCaptionAppearanceGetRelativeCharacterSize(CGFloat*);
519 int WKCaptionAppearanceGetTextEdgeStyle(void);
520 CFStringRef WKCaptionAppearanceGetSettingsChangedNotification(void);
522 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
524 WKOcclusionNotificationTypeApplicationBecameVisible,
525 WKOcclusionNotificationTypeApplicationBecameOccluded
526 } WKOcclusionNotificationType;
528 typedef void (*WKOcclusionNotificationHandler)(uint32_t, void*, uint32_t, void*, uint32_t);
530 bool WKRegisterOcclusionNotificationHandler(WKOcclusionNotificationType, WKOcclusionNotificationHandler);
531 bool WKUnregisterOcclusionNotificationHandler(WKOcclusionNotificationType, WKOcclusionNotificationHandler);
534 WKProcessAssertionTypeVisible = (1UL << 10)
537 typedef NSUInteger WKProcessAssertionTypes;
538 id WKNSProcessInfoProcessAssertionWithTypes(WKProcessAssertionTypes);
541 bool WKIsJavaPlugInActive(void);
542 void WKActivateJavaPlugIn(void);
544 void WKCFNetworkSetOverrideSystemProxySettings(CFDictionaryRef);