2 WebKitSystemInterface.h
3 Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
8 #import <Cocoa/Cocoa.h>
9 #import <Carbon/Carbon.h>
19 typedef struct _CFURLResponse* CFURLResponseRef;
20 typedef const struct _CFURLRequest* CFURLRequestRef;
21 typedef struct _CFURLRequest* CFMutableURLRequestRef;
23 typedef struct _CFURLCredential* WKCFURLCredentialRef;
24 typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
27 WKCertificateParseResultSucceeded = 0,
28 WKCertificateParseResultFailed = 1,
29 WKCertificateParseResultPKCS7 = 2,
30 } WKCertificateParseResult;
32 CFStringRef WKCopyCFLocalizationPreferredName(CFStringRef localization);
33 void WKSetDefaultLocalization(CFStringRef localization);
35 CFStringRef WKSignedPublicKeyAndChallengeString(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription);
36 WKCertificateParseResult WKAddCertificatesToKeychainFromData(const void *bytes, unsigned length);
38 NSString *WKGetPreferredExtensionForMIMEType(NSString *type);
39 NSArray *WKGetExtensionsForMIMEType(NSString *type);
40 NSString *WKGetMIMETypeForExtension(NSString *extension);
42 NSDate *WKGetNSURLResponseLastModifiedDate(NSURLResponse *response);
43 NSTimeInterval WKGetNSURLResponseFreshnessLifetime(NSURLResponse *response);
44 NSString *WKCopyNSURLResponseStatusLine(NSURLResponse *response);
46 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
47 CFArrayRef WKCopyNSURLResponseCertificateChain(NSURLResponse *response);
50 CFStringEncoding WKGetWebDefaultCFStringEncoding(void);
52 void WKSetMetadataURL(NSString *URLString, NSString *referrer, NSString *path);
53 void WKSetNSURLConnectionDefersCallbacks(NSURLConnection *connection, BOOL defers);
55 void WKShowKeyAndMain(void);
57 OSStatus WKSyncWindowWithCGAfterMove(WindowRef);
58 unsigned WKCarbonWindowMask(void);
59 void *WKGetNativeWindowFromWindowRef(WindowRef);
60 OSType WKCarbonWindowPropertyCreator(void);
61 OSType WKCarbonWindowPropertyTag(void);
64 typedef id WKNSURLConnectionDelegateProxyPtr;
66 WKNSURLConnectionDelegateProxyPtr WKCreateNSURLConnectionDelegateProxy(void);
68 void WKDisableCGDeferredUpdates(void);
70 Class WKNSURLProtocolClassForRequest(NSURLRequest *request);
71 void WKSetNSURLRequestShouldContentSniff(NSMutableURLRequest *request, BOOL shouldContentSniff);
73 void WKSetCookieStoragePrivateBrowsingEnabled(BOOL enabled);
75 unsigned WKGetNSAutoreleasePoolCount(void);
77 void WKAdvanceDefaultButtonPulseAnimation(NSButtonCell *button);
79 NSString *WKMouseMovedNotification(void);
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 BOOL WKShouldBlockPlugin(NSString *bundleIdentifier, NSString *bundleVersionString);
97 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
98 // Remote Accessibility API.
99 void WKAXRegisterRemoteApp(void);
100 void WKAXInitializeElementWithPresenterPid(id, pid_t);
101 NSData *WKAXRemoteTokenForElement(id);
102 id WKAXRemoteElementForToken(NSData *);
103 void WKAXSetWindowForRemoteElement(id remoteWindow, id remoteElement);
104 void WKAXRegisterRemoteProcess(bool registerProcess, pid_t);
105 pid_t WKAXRemoteProcessIdentifier(id remoteElement);
108 void WKSetUpFontCache(void);
110 void WKSignalCFReadStreamEnd(CFReadStreamRef stream);
111 void WKSignalCFReadStreamHasBytes(CFReadStreamRef stream);
112 void WKSignalCFReadStreamError(CFReadStreamRef stream, CFStreamError *error);
114 CFReadStreamRef WKCreateCustomCFReadStream(void *(*formCreate)(CFReadStreamRef, void *),
115 void (*formFinalize)(CFReadStreamRef, void *),
116 Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *),
117 CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *),
118 Boolean (*formCanRead)(CFReadStreamRef, void *),
119 void (*formClose)(CFReadStreamRef, void *),
120 void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
121 void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
124 void WKDrawCapsLockIndicator(CGContextRef, CGRect);
126 void WKDrawFocusRing(CGContextRef context, CGColorRef color, int radius);
127 // The CG context's current path is the focus ring's path.
128 // A color of 0 means "use system focus ring color".
129 // A radius of 0 means "use default focus ring radius".
131 void WKSetDragImage(NSImage *image, NSPoint offset);
133 void WKDrawBezeledTextFieldCell(NSRect, BOOL enabled);
134 void WKDrawTextFieldCellFocusRing(NSTextFieldCell*, NSRect);
135 void WKDrawBezeledTextArea(NSRect, BOOL enabled);
136 void WKPopupMenu(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
137 void WKPopupContextMenu(NSMenu *menu, NSPoint screenLocation);
138 void WKSendUserChangeNotifications(void);
140 BOOL WKConvertNSEventToCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent);
141 void WKSendKeyEventToTSM(NSEvent *theEvent);
142 void WKCallDrawingNotification(CGrafPtr port, Rect *bounds);
145 BOOL WKGetGlyphTransformedAdvances(CGFontRef, NSFont*, CGAffineTransform *m, ATSGlyphRef *glyph, CGSize *advance);
146 NSFont *WKGetFontInLanguageForRange(NSFont *font, NSString *string, NSRange range);
147 NSFont *WKGetFontInLanguageForCharacter(NSFont *font, UniChar ch);
148 void WKSetCGFontRenderingMode(CGContextRef cgContext, NSFont *font);
149 BOOL WKCGContextGetShouldSmoothFonts(CGContextRef cgContext);
152 void WKSetBaseCTM(CGContextRef, CGAffineTransform);
153 void WKSetPatternPhaseInUserSpace(CGContextRef, CGPoint);
154 CGAffineTransform WKGetUserToBaseCTM(CGContextRef);
156 void WKGetGlyphsForCharacters(CGFontRef, const UniChar[], CGGlyph[], size_t);
157 bool WKGetVerticalGlyphsForCharacters(CTFontRef, const UniChar[], CGGlyph[], size_t);
159 CTLineRef WKCreateCTLineWithUniCharProvider(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
160 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
161 CTTypesetterRef WKCreateCTTypesetterWithUniCharProviderAndOptions(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
163 CGContextRef WKIOSurfaceContextCreate(IOSurfaceRef, unsigned width, unsigned height, CGColorSpaceRef);
164 CGImageRef WKIOSurfaceContextCreateImage(CGContextRef context);
168 WKPatternTilingNoDistortion,
169 WKPatternTilingConstantSpacingMinimalDistortion,
170 WKPatternTilingConstantSpacing
173 CGPatternRef WKCGPatternCreateWithImageAndTransform(CGImageRef image, CGAffineTransform transform, int tiling);
174 void WKCGContextResetClip(CGContextRef);
177 NSEvent *WKCreateNSEventWithCarbonEvent(EventRef eventRef);
178 NSEvent *WKCreateNSEventWithCarbonMouseMoveEvent(EventRef inEvent, NSWindow *window);
179 NSEvent *WKCreateNSEventWithCarbonClickEvent(EventRef inEvent, WindowRef windowRef);
182 CGContextRef WKNSWindowOverrideCGContext(NSWindow *, CGContextRef);
183 void WKNSWindowRestoreCGContext(NSWindow *, CGContextRef);
185 void WKNSWindowMakeBottomCornersSquare(NSWindow *);
187 // These constants match the ones used by ThemeScrollbarArrowStyle (some of the values are private, so we can't just
188 // use that enum directly).
190 WKThemeScrollBarArrowsSingle = 0,
191 WKThemeScrollBarArrowsLowerRight = 1,
192 WKThemeScrollBarArrowsDouble = 2,
193 WKThemeScrollBarArrowsUpperLeft = 3,
194 } WKThemeScrollBarArrowStyle;
196 OSStatus WKThemeDrawTrack(const HIThemeTrackDrawInfo* inDrawInfo, CGContextRef inContext, int inArrowStyle);
199 BOOL WKCGContextIsBitmapContext(CGContextRef context);
201 void WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, BOOL *continuous);
203 BOOL WKAppVersionCheckLessThan(NSString *, int, double);
208 WKMovieTypeStoredStream,
209 WKMovieTypeLiveStream
212 int WKQTMovieGetType(QTMovie* movie);
214 BOOL WKQTMovieHasClosedCaptions(QTMovie* movie);
215 void WKQTMovieSetShowClosedCaptions(QTMovie* movie, BOOL showClosedCaptions);
216 void WKQTMovieSelectPreferredAlternates(QTMovie* movie);
217 void WKQTMovieSelectPreferredAlternateTrackForMediaType(QTMovie* movie, NSString* mediaType);
219 unsigned WKQTIncludeOnlyModernMediaFileTypes(void);
220 int WKQTMovieDataRate(QTMovie* movie);
221 float WKQTMovieMaxTimeLoaded(QTMovie* movie);
222 float WKQTMovieMaxTimeSeekable(QTMovie* movie);
223 NSString *WKQTMovieMaxTimeLoadedChangeNotification(void);
224 void WKQTMovieViewSetDrawSynchronously(QTMovieView* view, BOOL sync);
225 void WKQTMovieDisableComponent(uint32_t[5]);
226 NSURL *WKQTMovieResolvedURL(QTMovie* movie);
228 CFStringRef WKCopyFoundationCacheDirectory(void);
230 #if MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
231 typedef struct __CFURLStorageSession* CFURLStorageSessionRef;
233 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
235 CFURLStorageSessionRef WKCreatePrivateStorageSession(CFStringRef);
236 NSURLRequest *WKCopyRequestWithStorageSession(CFURLStorageSessionRef, NSURLRequest*);
237 NSCachedURLResponse *WKCachedResponseForRequest(CFURLStorageSessionRef, NSURLRequest*);
238 void WKSetRequestStorageSession(CFURLStorageSessionRef, CFMutableURLRequestRef);
240 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
241 CFHTTPCookieStorageRef WKCopyHTTPCookieStorage(CFURLStorageSessionRef);
242 unsigned WKGetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef);
243 void WKSetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef, unsigned policy);
244 NSArray *WKHTTPCookiesForURL(CFHTTPCookieStorageRef, NSURL *);
245 void WKSetHTTPCookiesForURL(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
246 void WKDeleteHTTPCookie(CFHTTPCookieStorageRef, NSHTTPCookie *);
248 CFHTTPCookieStorageRef WKGetDefaultHTTPCookieStorage(void);
249 WKCFURLCredentialRef WKCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef);
250 void WKSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool flag);
251 CFArrayRef WKCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef);
252 void WKCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts);
254 void WKSetVisibleApplicationName(CFStringRef);
257 WKMediaUIPartFullscreenButton = 0,
258 WKMediaUIPartMuteButton,
259 WKMediaUIPartPlayButton,
260 WKMediaUIPartSeekBackButton,
261 WKMediaUIPartSeekForwardButton,
262 WKMediaUIPartTimelineSlider,
263 WKMediaUIPartTimelineSliderThumb,
264 WKMediaUIPartRewindButton,
265 WKMediaUIPartSeekToRealtimeButton,
266 WKMediaUIPartShowClosedCaptionsButton,
267 WKMediaUIPartHideClosedCaptionsButton,
268 WKMediaUIPartUnMuteButton,
269 WKMediaUIPartPauseButton,
270 WKMediaUIPartBackground,
271 WKMediaUIPartCurrentTimeDisplay,
272 WKMediaUIPartTimeRemainingDisplay,
273 WKMediaUIPartStatusDisplay,
274 WKMediaUIPartControlsPanel,
275 WKMediaUIPartVolumeSliderContainer,
276 WKMediaUIPartVolumeSlider,
277 WKMediaUIPartVolumeSliderThumb,
278 WKMediaUIPartFullScreenVolumeSlider,
279 WKMediaUIPartFullScreenVolumeSliderThumb,
280 WKMediaUIPartVolumeSliderMuteButton,
281 WKMediaUIPartTextTrackDisplayContainer,
282 WKMediaUIPartTextTrackDisplay,
283 WKMediaUIPartExitFullscreenButton,
287 WKMediaControllerThemeClassic = 1,
288 WKMediaControllerThemeQuickTime = 2
289 } WKMediaControllerThemeStyle;
292 WKMediaControllerFlagDisabled = 1 << 0,
293 WKMediaControllerFlagPressed = 1 << 1,
294 WKMediaControllerFlagDrawEndCaps = 1 << 3,
295 WKMediaControllerFlagFocused = 1 << 4
296 } WKMediaControllerThemeState;
298 BOOL WKMediaControllerThemeAvailable(int themeStyle);
299 BOOL WKHitTestMediaUIPart(int part, int themeStyle, CGRect bounds, CGPoint point);
300 void WKMeasureMediaUIPart(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
301 void WKDrawMediaUIPart(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
302 void WKDrawMediaSliderTrack(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
303 NSView *WKCreateMediaUIBackgroundView(void);
306 WKMediaUIControlTimeline,
307 WKMediaUIControlSlider,
308 WKMediaUIControlPlayPauseButton,
309 WKMediaUIControlExitFullscreenButton,
310 WKMediaUIControlRewindButton,
311 WKMediaUIControlFastForwardButton,
312 WKMediaUIControlVolumeUpButton,
313 WKMediaUIControlVolumeDownButton
314 } WKMediaUIControlType;
316 NSControl *WKCreateMediaUIControl(int controlType);
318 NSArray *WKQTGetSitesInMediaDownloadCache();
319 void WKQTClearMediaDownloadCacheForSite(NSString *site);
320 void WKQTClearMediaDownloadCache();
322 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
323 mach_port_t WKInitializeRenderServer(void);
327 CALayer *WKMakeRenderLayer(uint32_t contextID);
329 typedef struct __WKSoftwareCARendererRef *WKSoftwareCARendererRef;
331 WKSoftwareCARendererRef WKSoftwareCARendererCreate(uint32_t contextID);
332 void WKSoftwareCARendererDestroy(WKSoftwareCARendererRef);
333 void WKSoftwareCARendererRender(WKSoftwareCARendererRef, CGContextRef, CGRect);
335 typedef struct __WKCARemoteLayerClientRef *WKCARemoteLayerClientRef;
337 WKCARemoteLayerClientRef WKCARemoteLayerClientMakeWithServerPort(mach_port_t port);
338 void WKCARemoteLayerClientInvalidate(WKCARemoteLayerClientRef);
339 uint32_t WKCARemoteLayerClientGetClientId(WKCARemoteLayerClientRef);
340 void WKCARemoteLayerClientSetLayer(WKCARemoteLayerClientRef, CALayer *);
341 CALayer *WKCARemoteLayerClientGetLayer(WKCARemoteLayerClientRef);
343 typedef struct __WKCAContextRef *WKCAContextRef;
345 WKCAContextRef WKCAContextMakeRemoteWithServerPort(mach_port_t port);
346 WKCAContextRef WKCAContextMakeRemoteForWindowServer(void);
347 void WKCAContextInvalidate(WKCAContextRef);
348 uint32_t WKCAContextGetContextId(WKCAContextRef);
349 void WKCAContextSetLayer(WKCAContextRef, CALayer *);
350 CALayer *WKCAContextGetLayer(WKCAContextRef);
352 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
353 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 *);
376 #endif // MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
378 @class CAPropertyAnimation;
379 void WKSetCAAnimationValueFunction(CAPropertyAnimation*, NSString* function);
381 unsigned WKInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
382 int WKGetHTTPPipeliningPriority(CFURLRequestRef);
383 void WKSetHTTPPipeliningMaximumPriority(int maximumPriority);
384 void WKSetHTTPPipeliningPriority(CFURLRequestRef, int priority);
385 void WKSetHTTPPipeliningMinimumFastLanePriority(int priority);
387 void WKSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
388 void WKSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
389 CFHTTPMessageRef WKCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL);
391 #if MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
393 WKEventPhaseNone = 0,
394 WKEventPhaseBegan = 1,
395 WKEventPhaseChanged = 2,
396 WKEventPhaseEnded = 3,
399 int WKGetNSEventMomentumPhase(NSEvent *);
402 void WKWindowSetAlpha(NSWindow *window, float alphaValue);
403 void WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame);
405 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
406 void WKSyncSurfaceToView(NSView *view);
408 void WKEnableSettingCursorWhenInBackground(void);
410 CFDictionaryRef WKNSURLRequestCreateSerializableRepresentation(NSURLRequest *request, CFTypeRef tokenNull);
411 NSURLRequest *WKNSURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
413 CFDictionaryRef WKNSURLResponseCreateSerializableRepresentation(NSURLResponse *response, CFTypeRef tokenNull);
414 NSURLResponse *WKNSURLResponseFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
417 ScriptCode WKGetScriptCodeFromCurrentKeyboardInputSource(void);
422 #if MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
423 CFIndex WKGetHyphenationLocationBeforeIndex(CFStringRef string, CFIndex index);
426 CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStore(void);
427 void WKCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostArray);
429 CFStringRef WKGetCFURLResponseMIMEType(CFURLResponseRef);
430 CFURLRef WKGetCFURLResponseURL(CFURLResponseRef);
431 CFHTTPMessageRef WKGetCFURLResponseHTTPResponse(CFURLResponseRef);
432 CFStringRef WKCopyCFURLResponseSuggestedFilename(CFURLResponseRef);
433 void WKSetCFURLResponseMIMEType(CFURLResponseRef, CFStringRef mimeType);
435 CIFormat WKCIGetRGBA8Format(void);
437 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
440 WKSandboxExtensionTypeReadOnly,
441 WKSandboxExtensionTypeWriteOnly,
442 WKSandboxExtensionTypeReadWrite,
443 } WKSandboxExtensionType;
444 typedef struct __WKSandboxExtension *WKSandboxExtensionRef;
446 WKSandboxExtensionRef WKSandboxExtensionCreate(const char* path, WKSandboxExtensionType type);
447 void WKSandboxExtensionDestroy(WKSandboxExtensionRef sandboxExtension);
449 bool WKSandboxExtensionConsume(WKSandboxExtensionRef sandboxExtension);
450 bool WKSandboxExtensionInvalidate(WKSandboxExtensionRef sandboxExtension);
452 const char* WKSandboxExtensionGetSerializedFormat(WKSandboxExtensionRef sandboxExtension, size_t* length);
453 WKSandboxExtensionRef WKSandboxExtensionCreateFromSerializedFormat(const char* serializationFormat, size_t length);
455 OSStatus WKEnableSandboxStyleFileQuarantine(void);
457 bool WKEnterPluginSandbox(const char* profile, const char* parameters[], const char* readOnlyPaths[], const char* readWritePaths[]);
459 int WKRecommendedScrollerStyle(void);
461 bool WKExecutableWasLinkedOnOrBeforeSnowLeopard(void);
463 NSRange WKExtractWordDefinitionTokenRangeFromContextualString(NSString *contextString, NSRange range, NSDictionary **options);
464 void WKShowWordDefinitionWindow(NSAttributedString *term, NSPoint screenPoint, NSDictionary *options);
465 void WKHideWordDefinitionWindow(void);
467 CFStringRef WKCopyDefaultSearchProviderDisplayName(void);
469 NSURL* WKAVAssetResolvedURL(AVAsset*);
471 NSCursor *WKCursor(const char *name);
475 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
477 #import <dispatch/dispatch.h>
479 dispatch_source_t WKCreateVMPressureDispatchOnMainQueue(void);
483 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
484 NSString *WKGetMacOSXVersionString(void);
485 bool WKExecutableWasLinkedOnOrBeforeLion(void);
488 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
489 void WKCGPathAddRoundedRect(CGMutablePathRef path, const CGAffineTransform* matrix, CGRect rect, CGFloat cornerWidth, CGFloat cornerHeight);
492 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
493 void WKCFURLRequestAllowAllPostCaching(CFURLRequestRef);
496 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
497 @class WebFilterEvaluator;
499 BOOL WKFilterIsManagedSession(void);
500 WebFilterEvaluator *WKFilterCreateInstance(NSURLResponse *);
501 void WKFilterRelease(WebFilterEvaluator *);
502 BOOL WKFilterWasBlocked(WebFilterEvaluator *);
503 const char* WKFilterAddData(WebFilterEvaluator *, const char* data, int* length);
504 const char* WKFilterDataComplete(WebFilterEvaluator *, int* length);