Wrong icon to restore to windowed mode in full screen video panel
[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     WKMediaUIPartVolumeSliderMuteButton,
280     WKMediaUIPartTextTrackDisplayContainer,
281     WKMediaUIPartTextTrackDisplay,
282     WKMediaUIPartExitFullscreenButton,
283 } WKMediaUIPart;
284
285 typedef enum {
286     WKMediaControllerThemeClassic   = 1,
287     WKMediaControllerThemeQuickTime = 2
288 } WKMediaControllerThemeStyle;
289
290 typedef enum {
291     WKMediaControllerFlagDisabled = 1 << 0,
292     WKMediaControllerFlagPressed = 1 << 1,
293     WKMediaControllerFlagDrawEndCaps = 1 << 3,
294     WKMediaControllerFlagFocused = 1 << 4
295 } WKMediaControllerThemeState;
296
297 BOOL WKMediaControllerThemeAvailable(int themeStyle);
298 BOOL WKHitTestMediaUIPart(int part, int themeStyle, CGRect bounds, CGPoint point);
299 void WKMeasureMediaUIPart(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
300 void WKDrawMediaUIPart(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
301 void WKDrawMediaSliderTrack(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
302 NSView *WKCreateMediaUIBackgroundView(void);
303
304 typedef enum {
305     WKMediaUIControlTimeline,
306     WKMediaUIControlSlider,
307     WKMediaUIControlPlayPauseButton,
308     WKMediaUIControlExitFullscreenButton,
309     WKMediaUIControlRewindButton,
310     WKMediaUIControlFastForwardButton,
311     WKMediaUIControlVolumeUpButton,
312     WKMediaUIControlVolumeDownButton
313 } WKMediaUIControlType;
314     
315 NSControl *WKCreateMediaUIControl(int controlType);
316
317 NSArray *WKQTGetSitesInMediaDownloadCache();
318 void WKQTClearMediaDownloadCacheForSite(NSString *site);
319 void WKQTClearMediaDownloadCache();
320     
321 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
322 mach_port_t WKInitializeRenderServer(void);
323     
324 @class CALayer;
325
326 CALayer *WKMakeRenderLayer(uint32_t contextID);
327     
328 typedef struct __WKSoftwareCARendererRef *WKSoftwareCARendererRef;
329
330 WKSoftwareCARendererRef WKSoftwareCARendererCreate(uint32_t contextID);
331 void WKSoftwareCARendererDestroy(WKSoftwareCARendererRef);
332 void WKSoftwareCARendererRender(WKSoftwareCARendererRef, CGContextRef, CGRect);
333
334 typedef struct __WKCARemoteLayerClientRef *WKCARemoteLayerClientRef;
335
336 WKCARemoteLayerClientRef WKCARemoteLayerClientMakeWithServerPort(mach_port_t port);
337 void WKCARemoteLayerClientInvalidate(WKCARemoteLayerClientRef);
338 uint32_t WKCARemoteLayerClientGetClientId(WKCARemoteLayerClientRef);
339 void WKCARemoteLayerClientSetLayer(WKCARemoteLayerClientRef, CALayer *);
340 CALayer *WKCARemoteLayerClientGetLayer(WKCARemoteLayerClientRef);
341
342 typedef struct __WKCAContextRef *WKCAContextRef;
343
344 WKCAContextRef WKCAContextMakeRemoteWithServerPort(mach_port_t port);
345 WKCAContextRef WKCAContextMakeRemoteForWindowServer(void);
346 void WKCAContextInvalidate(WKCAContextRef);
347 uint32_t WKCAContextGetContextId(WKCAContextRef);
348 void WKCAContextSetLayer(WKCAContextRef, CALayer *);
349 CALayer *WKCAContextGetLayer(WKCAContextRef);
350
351 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
352 void WKCALayerEnumerateRectsBeingDrawnWithBlock(CALayer *layer, CGContextRef context, void (^block)(CGRect rect));
353 #endif
354
355 @class CARenderer;
356
357 void WKCARendererAddChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
358 void WKCARendererRemoveChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
359
360 typedef struct __WKWindowBounceAnimationContext *WKWindowBounceAnimationContextRef;
361
362 WKWindowBounceAnimationContextRef WKWindowBounceAnimationContextCreate(NSWindow *window);
363 void WKWindowBounceAnimationContextDestroy(WKWindowBounceAnimationContextRef context);
364 void WKWindowBounceAnimationSetAnimationProgress(WKWindowBounceAnimationContextRef context, double animationProgress);
365
366 void WKWindowSetClipRect(NSWindow*, NSRect);
367
368 #if defined(__x86_64__)
369 #import <mach/mig.h>
370 CFRunLoopSourceRef WKCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t serverPort);
371 #endif // defined(__x86_64__)
372
373 NSUInteger WKGetInputPanelWindowStyle(void);
374 UInt8 WKGetNSEventKeyChar(NSEvent *);
375 #endif // MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
376
377 @class CAPropertyAnimation;
378 void WKSetCAAnimationValueFunction(CAPropertyAnimation*, NSString* function);
379
380 unsigned WKInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
381 int WKGetHTTPPipeliningPriority(CFURLRequestRef);
382 void WKSetHTTPPipeliningMaximumPriority(int maximumPriority);
383 void WKSetHTTPPipeliningPriority(CFURLRequestRef, int priority);
384 void WKSetHTTPPipeliningMinimumFastLanePriority(int priority);
385
386 void WKSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
387 void WKSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
388 CFHTTPMessageRef WKCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL);
389
390 #if MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
391 typedef enum {
392     WKEventPhaseNone = 0,
393     WKEventPhaseBegan = 1,
394     WKEventPhaseChanged = 2,
395     WKEventPhaseEnded = 3,
396 } WKEventPhase;
397
398 int WKGetNSEventMomentumPhase(NSEvent *);
399 #endif
400
401 void WKWindowSetAlpha(NSWindow *window, float alphaValue);
402 void WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame);
403
404 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
405 void WKSyncSurfaceToView(NSView *view);
406
407 void WKEnableSettingCursorWhenInBackground(void);
408
409 CFDictionaryRef WKNSURLRequestCreateSerializableRepresentation(NSURLRequest *request, CFTypeRef tokenNull);
410 NSURLRequest *WKNSURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
411
412 CFDictionaryRef WKNSURLResponseCreateSerializableRepresentation(NSURLResponse *response, CFTypeRef tokenNull);
413 NSURLResponse *WKNSURLResponseFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
414
415 #ifndef __LP64__
416 ScriptCode WKGetScriptCodeFromCurrentKeyboardInputSource(void);
417 #endif
418
419 #endif
420
421 #if MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
422 CFIndex WKGetHyphenationLocationBeforeIndex(CFStringRef string, CFIndex index);
423 #endif
424
425 CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStore(void);
426 void WKCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostArray);    
427
428 CFStringRef WKGetCFURLResponseMIMEType(CFURLResponseRef);
429 CFURLRef WKGetCFURLResponseURL(CFURLResponseRef);
430 CFHTTPMessageRef WKGetCFURLResponseHTTPResponse(CFURLResponseRef);
431 CFStringRef WKCopyCFURLResponseSuggestedFilename(CFURLResponseRef);
432 void WKSetCFURLResponseMIMEType(CFURLResponseRef, CFStringRef mimeType);
433
434 CIFormat WKCIGetRGBA8Format(void);
435
436 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
437
438 typedef enum {
439     WKSandboxExtensionTypeReadOnly,
440     WKSandboxExtensionTypeWriteOnly,    
441     WKSandboxExtensionTypeReadWrite,
442 } WKSandboxExtensionType;
443 typedef struct __WKSandboxExtension *WKSandboxExtensionRef;
444
445 WKSandboxExtensionRef WKSandboxExtensionCreate(const char* path, WKSandboxExtensionType type);
446 void WKSandboxExtensionDestroy(WKSandboxExtensionRef sandboxExtension);
447
448 bool WKSandboxExtensionConsume(WKSandboxExtensionRef sandboxExtension);
449 bool WKSandboxExtensionInvalidate(WKSandboxExtensionRef sandboxExtension);
450
451 const char* WKSandboxExtensionGetSerializedFormat(WKSandboxExtensionRef sandboxExtension, size_t* length);
452 WKSandboxExtensionRef WKSandboxExtensionCreateFromSerializedFormat(const char* serializationFormat, size_t length);
453
454 OSStatus WKEnableSandboxStyleFileQuarantine(void);
455
456 bool WKEnterPluginSandbox(const char* profile, const char* parameters[], const char* readOnlyPaths[], const char* readWritePaths[]);
457
458 int WKRecommendedScrollerStyle(void);
459
460 bool WKExecutableWasLinkedOnOrBeforeSnowLeopard(void);
461
462 NSRange WKExtractWordDefinitionTokenRangeFromContextualString(NSString *contextString, NSRange range, NSDictionary **options);
463 void WKShowWordDefinitionWindow(NSAttributedString *term, NSPoint screenPoint, NSDictionary *options);
464 void WKHideWordDefinitionWindow(void);
465
466 CFStringRef WKCopyDefaultSearchProviderDisplayName(void);
467
468 NSURL* WKAVAssetResolvedURL(AVAsset*);
469
470 NSCursor *WKCursor(const char *name);
471
472 #endif
473
474 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
475
476 #import <dispatch/dispatch.h>
477
478 dispatch_source_t WKCreateVMPressureDispatchOnMainQueue(void);
479
480 #endif
481
482 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
483 NSString *WKGetMacOSXVersionString(void);
484 bool WKExecutableWasLinkedOnOrBeforeLion(void);
485 #endif
486
487 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
488 void WKCGPathAddRoundedRect(CGMutablePathRef path, const CGAffineTransform* matrix, CGRect rect, CGFloat cornerWidth, CGFloat cornerHeight);
489 #endif
490
491 #ifdef __cplusplus
492 }
493 #endif