[Mac] Add an experimental SPI for plug-ins to enter sandbox
[WebKit-https.git] / WebKitLibraries / WebKitSystemInterface.h
1 /*      
2     WebKitSystemInterface.h
3     Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4
5     Public header file.
6 */
7
8 #import <Cocoa/Cocoa.h>
9 #import <Carbon/Carbon.h>
10
11 @class AVAsset;
12 @class QTMovie;
13 @class QTMovieView;
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 typedef struct _CFURLResponse* CFURLResponseRef;
20 typedef const struct _CFURLRequest* CFURLRequestRef;
21 typedef struct _CFURLRequest* CFMutableURLRequestRef;
22
23 typedef struct _CFURLCredential* WKCFURLCredentialRef;
24 typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
25
26 typedef enum {
27     WKCertificateParseResultSucceeded  = 0,
28     WKCertificateParseResultFailed     = 1,
29     WKCertificateParseResultPKCS7      = 2,
30 } WKCertificateParseResult;
31
32 CFStringRef WKCopyCFLocalizationPreferredName(CFStringRef localization);
33 void WKSetDefaultLocalization(CFStringRef localization);
34
35 CFStringRef WKSignedPublicKeyAndChallengeString(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription);
36 WKCertificateParseResult WKAddCertificatesToKeychainFromData(const void *bytes, unsigned length);
37
38 NSString *WKGetPreferredExtensionForMIMEType(NSString *type);
39 NSArray *WKGetExtensionsForMIMEType(NSString *type);
40 NSString *WKGetMIMETypeForExtension(NSString *extension);
41
42 NSDate *WKGetNSURLResponseLastModifiedDate(NSURLResponse *response);
43 NSTimeInterval WKGetNSURLResponseFreshnessLifetime(NSURLResponse *response);
44 NSString *WKCopyNSURLResponseStatusLine(NSURLResponse *response);
45
46 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
47 CFArrayRef WKCopyNSURLResponseCertificateChain(NSURLResponse *response);
48 #endif
49
50 CFStringEncoding WKGetWebDefaultCFStringEncoding(void);
51
52 void WKSetMetadataURL(NSString *URLString, NSString *referrer, NSString *path);
53 void WKSetNSURLConnectionDefersCallbacks(NSURLConnection *connection, BOOL defers);
54
55 void WKShowKeyAndMain(void);
56 #ifndef __LP64__
57 OSStatus WKSyncWindowWithCGAfterMove(WindowRef);
58 unsigned WKCarbonWindowMask(void);
59 void *WKGetNativeWindowFromWindowRef(WindowRef);
60 OSType WKCarbonWindowPropertyCreator(void);
61 OSType WKCarbonWindowPropertyTag(void);
62 #endif
63
64 typedef id WKNSURLConnectionDelegateProxyPtr;
65
66 WKNSURLConnectionDelegateProxyPtr WKCreateNSURLConnectionDelegateProxy(void);
67
68 void WKDisableCGDeferredUpdates(void);
69
70 Class WKNSURLProtocolClassForRequest(NSURLRequest *request);
71 void WKSetNSURLRequestShouldContentSniff(NSMutableURLRequest *request, BOOL shouldContentSniff);
72
73 void WKSetCookieStoragePrivateBrowsingEnabled(BOOL enabled);
74
75 unsigned WKGetNSAutoreleasePoolCount(void);
76
77 void WKAdvanceDefaultButtonPulseAnimation(NSButtonCell *button);
78
79 NSString *WKMouseMovedNotification(void);
80 NSString *WKWindowWillOrderOnScreenNotification(void);
81 NSString *WKWindowWillOrderOffScreenNotification(void);
82 void WKSetNSWindowShouldPostEventNotifications(NSWindow *window, BOOL post);
83
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);
94
95
96 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
97 // Remote Accessibility API.
98 void WKAXRegisterRemoteApp(void);
99 void WKAXInitializeElementWithPresenterPid(id, pid_t);
100 NSData *WKAXRemoteTokenForElement(id);
101 id WKAXRemoteElementForToken(NSData *);
102 void WKAXSetWindowForRemoteElement(id remoteWindow, id remoteElement);
103 void WKAXRegisterRemoteProcess(bool registerProcess, pid_t);
104 pid_t WKAXRemoteProcessIdentifier(id remoteElement);
105 #endif
106
107 void WKSetUpFontCache(void);
108
109 void WKSignalCFReadStreamEnd(CFReadStreamRef stream);
110 void WKSignalCFReadStreamHasBytes(CFReadStreamRef stream);
111 void WKSignalCFReadStreamError(CFReadStreamRef stream, CFStreamError *error);
112
113 CFReadStreamRef WKCreateCustomCFReadStream(void *(*formCreate)(CFReadStreamRef, void *), 
114     void (*formFinalize)(CFReadStreamRef, void *), 
115     Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *), 
116     CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *), 
117     Boolean (*formCanRead)(CFReadStreamRef, void *), 
118     void (*formClose)(CFReadStreamRef, void *), 
119     void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *), 
120     void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
121     void *context);
122
123 void WKDrawCapsLockIndicator(CGContextRef, CGRect);
124
125 void WKDrawFocusRing(CGContextRef context, CGColorRef color, int radius);
126     // The CG context's current path is the focus ring's path.
127     // A color of 0 means "use system focus ring color".
128     // A radius of 0 means "use default focus ring radius".
129
130 void WKSetDragImage(NSImage *image, NSPoint offset);
131
132 void WKDrawBezeledTextFieldCell(NSRect, BOOL enabled);
133 void WKDrawTextFieldCellFocusRing(NSTextFieldCell*, NSRect);
134 void WKDrawBezeledTextArea(NSRect, BOOL enabled);
135 void WKPopupMenu(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
136 void WKPopupContextMenu(NSMenu *menu, NSPoint screenLocation);
137 void WKSendUserChangeNotifications(void);
138 #ifndef __LP64__
139 BOOL WKConvertNSEventToCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent);
140 void WKSendKeyEventToTSM(NSEvent *theEvent);
141 void WKCallDrawingNotification(CGrafPtr port, Rect *bounds);
142 #endif
143
144 BOOL WKGetGlyphTransformedAdvances(CGFontRef, NSFont*, CGAffineTransform *m, ATSGlyphRef *glyph, CGSize *advance);
145 NSFont *WKGetFontInLanguageForRange(NSFont *font, NSString *string, NSRange range);
146 NSFont *WKGetFontInLanguageForCharacter(NSFont *font, UniChar ch);
147 void WKSetCGFontRenderingMode(CGContextRef cgContext, NSFont *font);
148 BOOL WKCGContextGetShouldSmoothFonts(CGContextRef cgContext);
149
150
151 void WKSetBaseCTM(CGContextRef, CGAffineTransform);
152 void WKSetPatternPhaseInUserSpace(CGContextRef, CGPoint);
153 CGAffineTransform WKGetUserToBaseCTM(CGContextRef);
154
155 void WKGetGlyphsForCharacters(CGFontRef, const UniChar[], CGGlyph[], size_t);
156 bool WKGetVerticalGlyphsForCharacters(CTFontRef, const UniChar[], CGGlyph[], size_t);
157
158 CTLineRef WKCreateCTLineWithUniCharProvider(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
159 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
160 CTTypesetterRef WKCreateCTTypesetterWithUniCharProviderAndOptions(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
161
162 CGContextRef WKIOSurfaceContextCreate(IOSurfaceRef, unsigned width, unsigned height, CGColorSpaceRef);
163 CGImageRef WKIOSurfaceContextCreateImage(CGContextRef context);
164 #endif
165
166 typedef enum {
167     WKPatternTilingNoDistortion,
168     WKPatternTilingConstantSpacingMinimalDistortion,
169     WKPatternTilingConstantSpacing
170 } WKPatternTiling;
171
172 CGPatternRef WKCGPatternCreateWithImageAndTransform(CGImageRef image, CGAffineTransform transform, int tiling);
173 void WKCGContextResetClip(CGContextRef);
174
175 #ifndef __LP64__
176 NSEvent *WKCreateNSEventWithCarbonEvent(EventRef eventRef);
177 NSEvent *WKCreateNSEventWithCarbonMouseMoveEvent(EventRef inEvent, NSWindow *window);
178 NSEvent *WKCreateNSEventWithCarbonClickEvent(EventRef inEvent, WindowRef windowRef);
179 #endif
180
181 CGContextRef WKNSWindowOverrideCGContext(NSWindow *, CGContextRef);
182 void WKNSWindowRestoreCGContext(NSWindow *, CGContextRef);
183
184 void WKNSWindowMakeBottomCornersSquare(NSWindow *);
185
186 // These constants match the ones used by ThemeScrollbarArrowStyle (some of the values are private, so we can't just
187 // use that enum directly).
188 typedef enum {
189     WKThemeScrollBarArrowsSingle     = 0,
190     WKThemeScrollBarArrowsLowerRight = 1,
191     WKThemeScrollBarArrowsDouble     = 2,
192     WKThemeScrollBarArrowsUpperLeft  = 3,
193 } WKThemeScrollBarArrowStyle;
194
195 OSStatus WKThemeDrawTrack(const HIThemeTrackDrawInfo* inDrawInfo, CGContextRef inContext, int inArrowStyle);
196
197
198 BOOL WKCGContextIsBitmapContext(CGContextRef context);
199
200 void WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, BOOL *continuous);
201
202 BOOL WKAppVersionCheckLessThan(NSString *, int, double);
203
204 typedef enum {
205     WKMovieTypeUnknown,
206     WKMovieTypeDownload,
207     WKMovieTypeStoredStream,
208     WKMovieTypeLiveStream
209 } WKMovieType;
210
211 int WKQTMovieGetType(QTMovie* movie);
212
213 BOOL WKQTMovieHasClosedCaptions(QTMovie* movie);
214 void WKQTMovieSetShowClosedCaptions(QTMovie* movie, BOOL showClosedCaptions);
215 void WKQTMovieSelectPreferredAlternates(QTMovie* movie);
216 void WKQTMovieSelectPreferredAlternateTrackForMediaType(QTMovie* movie, NSString* mediaType);
217
218 unsigned WKQTIncludeOnlyModernMediaFileTypes(void);
219 int WKQTMovieDataRate(QTMovie* movie);
220 float WKQTMovieMaxTimeLoaded(QTMovie* movie);
221 float WKQTMovieMaxTimeSeekable(QTMovie* movie);
222 NSString *WKQTMovieMaxTimeLoadedChangeNotification(void);
223 void WKQTMovieViewSetDrawSynchronously(QTMovieView* view, BOOL sync);
224 void WKQTMovieDisableComponent(uint32_t[5]);
225 NSURL *WKQTMovieResolvedURL(QTMovie* movie);
226
227 CFStringRef WKCopyFoundationCacheDirectory(void);
228
229 #if MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
230 typedef struct __CFURLStorageSession* CFURLStorageSessionRef;
231 #else
232 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
233 #endif
234 CFURLStorageSessionRef WKCreatePrivateStorageSession(CFStringRef);
235 NSURLRequest *WKCopyRequestWithStorageSession(CFURLStorageSessionRef, NSURLRequest*);
236 NSCachedURLResponse *WKCachedResponseForRequest(CFURLStorageSessionRef, NSURLRequest*);
237 void WKSetRequestStorageSession(CFURLStorageSessionRef, CFMutableURLRequestRef);
238
239 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
240 CFHTTPCookieStorageRef WKCopyHTTPCookieStorage(CFURLStorageSessionRef);
241 unsigned WKGetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef);
242 void WKSetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef, unsigned policy);
243 NSArray *WKHTTPCookiesForURL(CFHTTPCookieStorageRef, NSURL *);
244 void WKSetHTTPCookiesForURL(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
245 void WKDeleteHTTPCookie(CFHTTPCookieStorageRef, NSHTTPCookie *);
246
247 CFHTTPCookieStorageRef WKGetDefaultHTTPCookieStorage(void);
248 WKCFURLCredentialRef WKCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef);
249 void WKSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool flag);
250 CFArrayRef WKCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef);
251 void WKCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts);
252
253 void WKSetVisibleApplicationName(CFStringRef);
254
255 typedef enum {
256     WKMediaUIPartFullscreenButton   = 0,
257     WKMediaUIPartMuteButton,
258     WKMediaUIPartPlayButton,
259     WKMediaUIPartSeekBackButton,
260     WKMediaUIPartSeekForwardButton,
261     WKMediaUIPartTimelineSlider,
262     WKMediaUIPartTimelineSliderThumb,
263     WKMediaUIPartRewindButton,
264     WKMediaUIPartSeekToRealtimeButton,
265     WKMediaUIPartShowClosedCaptionsButton,
266     WKMediaUIPartHideClosedCaptionsButton,
267     WKMediaUIPartUnMuteButton,
268     WKMediaUIPartPauseButton,
269     WKMediaUIPartBackground,
270     WKMediaUIPartCurrentTimeDisplay,
271     WKMediaUIPartTimeRemainingDisplay,
272     WKMediaUIPartStatusDisplay,
273     WKMediaUIPartControlsPanel,
274     WKMediaUIPartVolumeSliderContainer,
275     WKMediaUIPartVolumeSlider,
276     WKMediaUIPartVolumeSliderThumb,
277     WKMediaUIPartFullScreenVolumeSlider,
278     WKMediaUIPartFullScreenVolumeSliderThumb,
279 } WKMediaUIPart;
280
281 typedef enum {
282     WKMediaControllerThemeClassic   = 1,
283     WKMediaControllerThemeQuickTime = 2
284 } WKMediaControllerThemeStyle;
285
286 typedef enum {
287     WKMediaControllerFlagDisabled = 1 << 0,
288     WKMediaControllerFlagPressed = 1 << 1,
289     WKMediaControllerFlagDrawEndCaps = 1 << 3,
290     WKMediaControllerFlagFocused = 1 << 4
291 } WKMediaControllerThemeState;
292
293 BOOL WKMediaControllerThemeAvailable(int themeStyle);
294 BOOL WKHitTestMediaUIPart(int part, int themeStyle, CGRect bounds, CGPoint point);
295 void WKMeasureMediaUIPart(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
296 void WKDrawMediaUIPart(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
297 void WKDrawMediaSliderTrack(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
298 NSView *WKCreateMediaUIBackgroundView(void);
299
300 typedef enum {
301     WKMediaUIControlTimeline,
302     WKMediaUIControlSlider,
303     WKMediaUIControlPlayPauseButton,
304     WKMediaUIControlExitFullscreenButton,
305     WKMediaUIControlRewindButton,
306     WKMediaUIControlFastForwardButton,
307     WKMediaUIControlVolumeUpButton,
308     WKMediaUIControlVolumeDownButton
309 } WKMediaUIControlType;
310     
311 NSControl *WKCreateMediaUIControl(int controlType);
312
313 NSArray *WKQTGetSitesInMediaDownloadCache();
314 void WKQTClearMediaDownloadCacheForSite(NSString *site);
315 void WKQTClearMediaDownloadCache();
316     
317 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
318 mach_port_t WKInitializeRenderServer(void);
319     
320 @class CALayer;
321
322 CALayer *WKMakeRenderLayer(uint32_t contextID);
323     
324 typedef struct __WKSoftwareCARendererRef *WKSoftwareCARendererRef;
325
326 WKSoftwareCARendererRef WKSoftwareCARendererCreate(uint32_t contextID);
327 void WKSoftwareCARendererDestroy(WKSoftwareCARendererRef);
328 void WKSoftwareCARendererRender(WKSoftwareCARendererRef, CGContextRef, CGRect);
329
330 typedef struct __WKCARemoteLayerClientRef *WKCARemoteLayerClientRef;
331
332 WKCARemoteLayerClientRef WKCARemoteLayerClientMakeWithServerPort(mach_port_t port);
333 void WKCARemoteLayerClientInvalidate(WKCARemoteLayerClientRef);
334 uint32_t WKCARemoteLayerClientGetClientId(WKCARemoteLayerClientRef);
335 void WKCARemoteLayerClientSetLayer(WKCARemoteLayerClientRef, CALayer *);
336 CALayer *WKCARemoteLayerClientGetLayer(WKCARemoteLayerClientRef);
337
338 @class CARenderer;
339
340 void WKCARendererAddChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
341 void WKCARendererRemoveChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
342
343 typedef struct __WKWindowBounceAnimationContext *WKWindowBounceAnimationContextRef;
344
345 WKWindowBounceAnimationContextRef WKWindowBounceAnimationContextCreate(NSWindow *window);
346 void WKWindowBounceAnimationContextDestroy(WKWindowBounceAnimationContextRef context);
347 void WKWindowBounceAnimationSetAnimationProgress(WKWindowBounceAnimationContextRef context, double animationProgress);
348
349 void WKWindowSetClipRect(NSWindow*, NSRect);
350
351 #if defined(__x86_64__)
352 #import <mach/mig.h>
353 CFRunLoopSourceRef WKCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t serverPort);
354 #endif // defined(__x86_64__)
355
356 NSUInteger WKGetInputPanelWindowStyle(void);
357 UInt8 WKGetNSEventKeyChar(NSEvent *);
358 #endif // MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
359
360 @class CAPropertyAnimation;
361 void WKSetCAAnimationValueFunction(CAPropertyAnimation*, NSString* function);
362
363 unsigned WKInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
364 int WKGetHTTPPipeliningPriority(CFURLRequestRef);
365 void WKSetHTTPPipeliningMaximumPriority(int maximumPriority);
366 void WKSetHTTPPipeliningPriority(CFURLRequestRef, int priority);
367 void WKSetHTTPPipeliningMinimumFastLanePriority(int priority);
368
369 void WKSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
370 void WKSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
371 CFHTTPMessageRef WKCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL);
372
373 #if MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
374 typedef enum {
375     WKEventPhaseNone = 0,
376     WKEventPhaseBegan = 1,
377     WKEventPhaseChanged = 2,
378     WKEventPhaseEnded = 3,
379 } WKEventPhase;
380
381 int WKGetNSEventMomentumPhase(NSEvent *);
382 #endif
383
384 void WKWindowSetAlpha(NSWindow *window, float alphaValue);
385 void WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame);
386
387 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
388 void WKSyncSurfaceToView(NSView *view);
389
390 void WKEnableSettingCursorWhenInBackground(void);
391
392 CFDictionaryRef WKNSURLRequestCreateSerializableRepresentation(NSURLRequest *request, CFTypeRef tokenNull);
393 NSURLRequest *WKNSURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
394
395 CFDictionaryRef WKNSURLResponseCreateSerializableRepresentation(NSURLResponse *response, CFTypeRef tokenNull);
396 NSURLResponse *WKNSURLResponseFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
397
398 #ifndef __LP64__
399 ScriptCode WKGetScriptCodeFromCurrentKeyboardInputSource(void);
400 #endif
401
402 #endif
403
404 #if MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
405 CFIndex WKGetHyphenationLocationBeforeIndex(CFStringRef string, CFIndex index);
406 #endif
407
408 CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStore(void);
409 void WKCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostArray);    
410
411 CFStringRef WKGetCFURLResponseMIMEType(CFURLResponseRef);
412 CFURLRef WKGetCFURLResponseURL(CFURLResponseRef);
413 CFHTTPMessageRef WKGetCFURLResponseHTTPResponse(CFURLResponseRef);
414 CFStringRef WKCopyCFURLResponseSuggestedFilename(CFURLResponseRef);
415 void WKSetCFURLResponseMIMEType(CFURLResponseRef, CFStringRef mimeType);
416
417 CIFormat WKCIGetRGBA8Format(void);
418
419 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
420
421 typedef enum {
422     WKSandboxExtensionTypeReadOnly,
423     WKSandboxExtensionTypeWriteOnly,    
424     WKSandboxExtensionTypeReadWrite,
425 } WKSandboxExtensionType;
426 typedef struct __WKSandboxExtension *WKSandboxExtensionRef;
427
428 WKSandboxExtensionRef WKSandboxExtensionCreate(const char* path, WKSandboxExtensionType type);
429 void WKSandboxExtensionDestroy(WKSandboxExtensionRef sandboxExtension);
430
431 bool WKSandboxExtensionConsume(WKSandboxExtensionRef sandboxExtension);
432 bool WKSandboxExtensionInvalidate(WKSandboxExtensionRef sandboxExtension);
433
434 const char* WKSandboxExtensionGetSerializedFormat(WKSandboxExtensionRef sandboxExtension, size_t* length);
435 WKSandboxExtensionRef WKSandboxExtensionCreateFromSerializedFormat(const char* serializationFormat, size_t length);
436
437 OSStatus WKEnableSandboxStyleFileQuarantine(void);
438
439 bool WKEnterPluginSandbox(const char* profile, const char* parameters[], const char* readOnlyPaths[], const char* readWritePaths[]);
440
441 int WKRecommendedScrollerStyle(void);
442
443 bool WKExecutableWasLinkedOnOrBeforeSnowLeopard(void);
444
445 NSRange WKExtractWordDefinitionTokenRangeFromContextualString(NSString *contextString, NSRange range, NSDictionary **options);
446 void WKShowWordDefinitionWindow(NSAttributedString *term, NSPoint screenPoint, NSDictionary *options);
447 void WKHideWordDefinitionWindow(void);
448
449 CFStringRef WKCopyDefaultSearchProviderDisplayName(void);
450
451 NSURL* WKAVAssetResolvedURL(AVAsset*);
452
453 NSCursor *WKCursor(const char *name);
454
455 #endif
456
457 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
458
459 #import <dispatch/dispatch.h>
460
461 dispatch_source_t WKCreateVMPressureDispatchOnMainQueue(void);
462
463 #endif
464
465 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
466 NSString *WKGetMacOSXVersionString(void);
467 bool WKExecutableWasLinkedOnOrBeforeLion(void);
468 #endif
469
470 #ifdef __cplusplus
471 }
472 #endif