Fixed somtimes focus ring is shown twice.
[framework/web/webkit-efl.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 CFArrayRef WKCopyNSURLResponseCertificateChain(NSURLResponse *response);
47
48 CFStringEncoding WKGetWebDefaultCFStringEncoding(void);
49
50 void WKSetMetadataURL(NSString *URLString, NSString *referrer, NSString *path);
51 void WKSetNSURLConnectionDefersCallbacks(NSURLConnection *connection, BOOL defers);
52
53 void WKShowKeyAndMain(void);
54 #ifndef __LP64__
55 OSStatus WKSyncWindowWithCGAfterMove(WindowRef);
56 unsigned WKCarbonWindowMask(void);
57 void *WKGetNativeWindowFromWindowRef(WindowRef);
58 OSType WKCarbonWindowPropertyCreator(void);
59 OSType WKCarbonWindowPropertyTag(void);
60 #endif
61
62 typedef id WKNSURLConnectionDelegateProxyPtr;
63
64 WKNSURLConnectionDelegateProxyPtr WKCreateNSURLConnectionDelegateProxy(void);
65
66 void WKDisableCGDeferredUpdates(void);
67
68 Class WKNSURLProtocolClassForRequest(NSURLRequest *request);
69 void WKSetNSURLRequestShouldContentSniff(NSMutableURLRequest *request, BOOL shouldContentSniff);
70
71 void WKSetCookieStoragePrivateBrowsingEnabled(BOOL enabled);
72
73 unsigned WKGetNSAutoreleasePoolCount(void);
74
75 void WKAdvanceDefaultButtonPulseAnimation(NSButtonCell *button);
76
77 NSString *WKMouseMovedNotification(void);
78 NSString *WKWindowWillOrderOnScreenNotification(void);
79 NSString *WKWindowWillOrderOffScreenNotification(void);
80 void WKSetNSWindowShouldPostEventNotifications(NSWindow *window, BOOL post);
81
82 CFTypeID WKGetAXTextMarkerTypeID(void);
83 CFTypeID WKGetAXTextMarkerRangeTypeID(void);
84 CFTypeRef WKCreateAXTextMarker(const void *bytes, size_t len);
85 BOOL WKGetBytesFromAXTextMarker(CFTypeRef textMarker, void *bytes, size_t length);
86 CFTypeRef WKCreateAXTextMarkerRange(CFTypeRef start, CFTypeRef end);
87 CFTypeRef WKCopyAXTextMarkerRangeStart(CFTypeRef range);
88 CFTypeRef WKCopyAXTextMarkerRangeEnd(CFTypeRef range);
89 void WKAccessibilityHandleFocusChanged(void);
90 AXUIElementRef WKCreateAXUIElementRef(id element);
91 void WKUnregisterUniqueIdForElement(id element);
92
93 BOOL WKShouldBlockPlugin(NSString *bundleIdentifier, NSString *bundleVersionString);
94
95 // Remote Accessibility API.
96 void WKAXRegisterRemoteApp(void);
97 void WKAXInitializeElementWithPresenterPid(id, pid_t);
98 NSData *WKAXRemoteTokenForElement(id);
99 id WKAXRemoteElementForToken(NSData *);
100 void WKAXSetWindowForRemoteElement(id remoteWindow, id remoteElement);
101 void WKAXRegisterRemoteProcess(bool registerProcess, pid_t);
102 pid_t WKAXRemoteProcessIdentifier(id remoteElement);
103
104 void WKSetUpFontCache(void);
105
106 void WKSignalCFReadStreamEnd(CFReadStreamRef stream);
107 void WKSignalCFReadStreamHasBytes(CFReadStreamRef stream);
108 void WKSignalCFReadStreamError(CFReadStreamRef stream, CFStreamError *error);
109
110 CFReadStreamRef WKCreateCustomCFReadStream(void *(*formCreate)(CFReadStreamRef, void *), 
111     void (*formFinalize)(CFReadStreamRef, void *), 
112     Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *), 
113     CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *), 
114     Boolean (*formCanRead)(CFReadStreamRef, void *), 
115     void (*formClose)(CFReadStreamRef, void *), 
116     void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *), 
117     void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
118     void *context);
119
120 void WKDrawCapsLockIndicator(CGContextRef, CGRect);
121
122 void WKDrawFocusRing(CGContextRef context, CGColorRef color, int radius);
123     // The CG context's current path is the focus ring's path.
124     // A color of 0 means "use system focus ring color".
125     // A radius of 0 means "use default focus ring radius".
126
127 void WKSetDragImage(NSImage *image, NSPoint offset);
128
129 void WKDrawBezeledTextFieldCell(NSRect, BOOL enabled);
130 void WKDrawTextFieldCellFocusRing(NSTextFieldCell*, NSRect);
131 void WKDrawBezeledTextArea(NSRect, BOOL enabled);
132 void WKPopupMenu(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
133 void WKPopupContextMenu(NSMenu *menu, NSPoint screenLocation);
134 void WKSendUserChangeNotifications(void);
135 #ifndef __LP64__
136 BOOL WKConvertNSEventToCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent);
137 void WKSendKeyEventToTSM(NSEvent *theEvent);
138 void WKCallDrawingNotification(CGrafPtr port, Rect *bounds);
139 #endif
140
141 BOOL WKGetGlyphTransformedAdvances(CGFontRef, NSFont*, CGAffineTransform *m, ATSGlyphRef *glyph, CGSize *advance);
142 NSFont *WKGetFontInLanguageForRange(NSFont *font, NSString *string, NSRange range);
143 NSFont *WKGetFontInLanguageForCharacter(NSFont *font, UniChar ch);
144 void WKSetCGFontRenderingMode(CGContextRef cgContext, NSFont *font);
145 BOOL WKCGContextGetShouldSmoothFonts(CGContextRef cgContext);
146
147
148 void WKSetBaseCTM(CGContextRef, CGAffineTransform);
149 void WKSetPatternPhaseInUserSpace(CGContextRef, CGPoint);
150 CGAffineTransform WKGetUserToBaseCTM(CGContextRef);
151
152 void WKGetGlyphsForCharacters(CGFontRef, const UniChar[], CGGlyph[], size_t);
153 bool WKGetVerticalGlyphsForCharacters(CTFontRef, const UniChar[], CGGlyph[], size_t);
154
155 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 >= 1070
157 CTTypesetterRef WKCreateCTTypesetterWithUniCharProviderAndOptions(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
158
159 CGContextRef WKIOSurfaceContextCreate(IOSurfaceRef, unsigned width, unsigned height, CGColorSpaceRef);
160 CGImageRef WKIOSurfaceContextCreateImage(CGContextRef context);
161 #endif
162
163 typedef enum {
164     WKPatternTilingNoDistortion,
165     WKPatternTilingConstantSpacingMinimalDistortion,
166     WKPatternTilingConstantSpacing
167 } WKPatternTiling;
168
169 CGPatternRef WKCGPatternCreateWithImageAndTransform(CGImageRef image, CGAffineTransform transform, int tiling);
170 void WKCGContextResetClip(CGContextRef);
171
172 #ifndef __LP64__
173 NSEvent *WKCreateNSEventWithCarbonEvent(EventRef eventRef);
174 NSEvent *WKCreateNSEventWithCarbonMouseMoveEvent(EventRef inEvent, NSWindow *window);
175 NSEvent *WKCreateNSEventWithCarbonClickEvent(EventRef inEvent, WindowRef windowRef);
176 #endif
177
178 CGContextRef WKNSWindowOverrideCGContext(NSWindow *, CGContextRef);
179 void WKNSWindowRestoreCGContext(NSWindow *, CGContextRef);
180
181 void WKNSWindowMakeBottomCornersSquare(NSWindow *);
182
183 // These constants match the ones used by ThemeScrollbarArrowStyle (some of the values are private, so we can't just
184 // use that enum directly).
185 typedef enum {
186     WKThemeScrollBarArrowsSingle     = 0,
187     WKThemeScrollBarArrowsLowerRight = 1,
188     WKThemeScrollBarArrowsDouble     = 2,
189     WKThemeScrollBarArrowsUpperLeft  = 3,
190 } WKThemeScrollBarArrowStyle;
191
192 OSStatus WKThemeDrawTrack(const HIThemeTrackDrawInfo* inDrawInfo, CGContextRef inContext, int inArrowStyle);
193
194
195 BOOL WKCGContextIsBitmapContext(CGContextRef context);
196
197 void WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, BOOL *continuous);
198
199 BOOL WKAppVersionCheckLessThan(NSString *, int, double);
200
201 typedef enum {
202     WKMovieTypeUnknown,
203     WKMovieTypeDownload,
204     WKMovieTypeStoredStream,
205     WKMovieTypeLiveStream
206 } WKMovieType;
207
208 int WKQTMovieGetType(QTMovie* movie);
209
210 BOOL WKQTMovieHasClosedCaptions(QTMovie* movie);
211 void WKQTMovieSetShowClosedCaptions(QTMovie* movie, BOOL showClosedCaptions);
212 void WKQTMovieSelectPreferredAlternates(QTMovie* movie);
213 void WKQTMovieSelectPreferredAlternateTrackForMediaType(QTMovie* movie, NSString* mediaType);
214
215 unsigned WKQTIncludeOnlyModernMediaFileTypes(void);
216 int WKQTMovieDataRate(QTMovie* movie);
217 float WKQTMovieMaxTimeLoaded(QTMovie* movie);
218 float WKQTMovieMaxTimeSeekable(QTMovie* movie);
219 NSString *WKQTMovieMaxTimeLoadedChangeNotification(void);
220 void WKQTMovieViewSetDrawSynchronously(QTMovieView* view, BOOL sync);
221 void WKQTMovieDisableComponent(uint32_t[5]);
222 NSURL *WKQTMovieResolvedURL(QTMovie* movie);
223
224 CFStringRef WKCopyFoundationCacheDirectory(void);
225
226 #if MAC_OS_X_VERSION_MIN_REQUIRED == 1060
227 typedef struct __CFURLStorageSession* CFURLStorageSessionRef;
228 #else
229 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
230 #endif
231 CFURLStorageSessionRef WKCreatePrivateStorageSession(CFStringRef);
232 NSURLRequest *WKCopyRequestWithStorageSession(CFURLStorageSessionRef, NSURLRequest*);
233 NSCachedURLResponse *WKCachedResponseForRequest(CFURLStorageSessionRef, NSURLRequest*);
234 void WKSetRequestStorageSession(CFURLStorageSessionRef, CFMutableURLRequestRef);
235
236 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
237 CFHTTPCookieStorageRef WKCopyHTTPCookieStorage(CFURLStorageSessionRef);
238 unsigned WKGetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef);
239 void WKSetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef, unsigned policy);
240 NSArray *WKHTTPCookiesForURL(CFHTTPCookieStorageRef, NSURL *);
241 void WKSetHTTPCookiesForURL(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
242 void WKDeleteHTTPCookie(CFHTTPCookieStorageRef, NSHTTPCookie *);
243
244 CFHTTPCookieStorageRef WKGetDefaultHTTPCookieStorage(void);
245 WKCFURLCredentialRef WKCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef);
246 void WKSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool flag);
247 CFArrayRef WKCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef);
248 void WKCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts);
249
250 void WKSetVisibleApplicationName(CFStringRef);
251
252 typedef enum {
253     WKMediaUIPartFullscreenButton   = 0,
254     WKMediaUIPartMuteButton,
255     WKMediaUIPartPlayButton,
256     WKMediaUIPartSeekBackButton,
257     WKMediaUIPartSeekForwardButton,
258     WKMediaUIPartTimelineSlider,
259     WKMediaUIPartTimelineSliderThumb,
260     WKMediaUIPartRewindButton,
261     WKMediaUIPartSeekToRealtimeButton,
262     WKMediaUIPartShowClosedCaptionsButton,
263     WKMediaUIPartHideClosedCaptionsButton,
264     WKMediaUIPartUnMuteButton,
265     WKMediaUIPartPauseButton,
266     WKMediaUIPartBackground,
267     WKMediaUIPartCurrentTimeDisplay,
268     WKMediaUIPartTimeRemainingDisplay,
269     WKMediaUIPartStatusDisplay,
270     WKMediaUIPartControlsPanel,
271     WKMediaUIPartVolumeSliderContainer,
272     WKMediaUIPartVolumeSlider,
273     WKMediaUIPartVolumeSliderThumb,
274     WKMediaUIPartFullScreenVolumeSlider,
275     WKMediaUIPartFullScreenVolumeSliderThumb,
276     WKMediaUIPartVolumeSliderMuteButton,
277     WKMediaUIPartTextTrackDisplayContainer,
278     WKMediaUIPartTextTrackDisplay,
279     WKMediaUIPartExitFullscreenButton,
280 } WKMediaUIPart;
281
282 typedef enum {
283     WKMediaControllerThemeClassic   = 1,
284     WKMediaControllerThemeQuickTime = 2
285 } WKMediaControllerThemeStyle;
286
287 typedef enum {
288     WKMediaControllerFlagDisabled = 1 << 0,
289     WKMediaControllerFlagPressed = 1 << 1,
290     WKMediaControllerFlagDrawEndCaps = 1 << 3,
291     WKMediaControllerFlagFocused = 1 << 4
292 } WKMediaControllerThemeState;
293
294 BOOL WKMediaControllerThemeAvailable(int themeStyle);
295 BOOL WKHitTestMediaUIPart(int part, int themeStyle, CGRect bounds, CGPoint point);
296 void WKMeasureMediaUIPart(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
297 void WKDrawMediaUIPart(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
298 void WKDrawMediaSliderTrack(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
299 NSView *WKCreateMediaUIBackgroundView(void);
300
301 typedef enum {
302     WKMediaUIControlTimeline,
303     WKMediaUIControlSlider,
304     WKMediaUIControlPlayPauseButton,
305     WKMediaUIControlExitFullscreenButton,
306     WKMediaUIControlRewindButton,
307     WKMediaUIControlFastForwardButton,
308     WKMediaUIControlVolumeUpButton,
309     WKMediaUIControlVolumeDownButton
310 } WKMediaUIControlType;
311     
312 NSControl *WKCreateMediaUIControl(int controlType);
313
314 NSArray *WKQTGetSitesInMediaDownloadCache();
315 void WKQTClearMediaDownloadCacheForSite(NSString *site);
316 void WKQTClearMediaDownloadCache();
317     
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 typedef struct __WKCAContextRef *WKCAContextRef;
339
340 WKCAContextRef WKCAContextMakeRemoteWithServerPort(mach_port_t port);
341 WKCAContextRef WKCAContextMakeRemoteForWindowServer(void);
342 void WKCAContextInvalidate(WKCAContextRef);
343 uint32_t WKCAContextGetContextId(WKCAContextRef);
344 void WKCAContextSetLayer(WKCAContextRef, CALayer *);
345 CALayer *WKCAContextGetLayer(WKCAContextRef);
346 void WKCAContextSetColorSpace(WKCAContextRef, CGColorSpaceRef);
347 CGColorSpaceRef WKCAContextGetColorSpace(WKCAContextRef);
348
349 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
350 void WKCALayerEnumerateRectsBeingDrawnWithBlock(CALayer *layer, CGContextRef context, void (^block)(CGRect rect));
351 #endif
352
353 @class CARenderer;
354
355 void WKCARendererAddChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
356 void WKCARendererRemoveChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
357
358 typedef struct __WKWindowBounceAnimationContext *WKWindowBounceAnimationContextRef;
359
360 WKWindowBounceAnimationContextRef WKWindowBounceAnimationContextCreate(NSWindow *window);
361 void WKWindowBounceAnimationContextDestroy(WKWindowBounceAnimationContextRef context);
362 void WKWindowBounceAnimationSetAnimationProgress(WKWindowBounceAnimationContextRef context, double animationProgress);
363
364 void WKWindowSetClipRect(NSWindow*, NSRect);
365
366 #if defined(__x86_64__)
367 #import <mach/mig.h>
368 CFRunLoopSourceRef WKCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t serverPort);
369 #endif // defined(__x86_64__)
370
371 NSUInteger WKGetInputPanelWindowStyle(void);
372 UInt8 WKGetNSEventKeyChar(NSEvent *);
373
374 @class CAPropertyAnimation;
375 void WKSetCAAnimationValueFunction(CAPropertyAnimation*, NSString* function);
376
377 unsigned WKInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
378 int WKGetHTTPPipeliningPriority(CFURLRequestRef);
379 void WKSetHTTPPipeliningMaximumPriority(int maximumPriority);
380 void WKSetHTTPPipeliningPriority(CFURLRequestRef, int priority);
381 void WKSetHTTPPipeliningMinimumFastLanePriority(int priority);
382
383 void WKSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
384 void WKSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
385 CFHTTPMessageRef WKCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL);
386
387 #if MAC_OS_X_VERSION_MIN_REQUIRED == 1060
388 typedef enum {
389     WKEventPhaseNone = 0,
390     WKEventPhaseBegan = 1,
391     WKEventPhaseChanged = 2,
392     WKEventPhaseEnded = 3,
393 } WKEventPhase;
394
395 int WKGetNSEventMomentumPhase(NSEvent *);
396 #endif
397
398 void WKWindowSetAlpha(NSWindow *window, float alphaValue);
399 void WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame);
400
401 void WKSyncSurfaceToView(NSView *view);
402
403 void WKEnableSettingCursorWhenInBackground(void);
404
405 CFDictionaryRef WKNSURLRequestCreateSerializableRepresentation(NSURLRequest *request, CFTypeRef tokenNull);
406 NSURLRequest *WKNSURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
407
408 CFDictionaryRef WKNSURLResponseCreateSerializableRepresentation(NSURLResponse *response, CFTypeRef tokenNull);
409 NSURLResponse *WKNSURLResponseFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
410
411 #ifndef __LP64__
412 ScriptCode WKGetScriptCodeFromCurrentKeyboardInputSource(void);
413 #endif
414
415 #if MAC_OS_X_VERSION_MIN_REQUIRED == 1060
416 CFIndex WKGetHyphenationLocationBeforeIndex(CFStringRef string, CFIndex index);
417 #endif
418
419 CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStore(void);
420 void WKCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostArray);    
421
422 CFStringRef WKGetCFURLResponseMIMEType(CFURLResponseRef);
423 CFURLRef WKGetCFURLResponseURL(CFURLResponseRef);
424 CFHTTPMessageRef WKGetCFURLResponseHTTPResponse(CFURLResponseRef);
425 CFStringRef WKCopyCFURLResponseSuggestedFilename(CFURLResponseRef);
426 void WKSetCFURLResponseMIMEType(CFURLResponseRef, CFStringRef mimeType);
427
428 CIFormat WKCIGetRGBA8Format(void);
429
430 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
431
432 typedef enum {
433     WKSandboxExtensionTypeReadOnly,
434     WKSandboxExtensionTypeWriteOnly,    
435     WKSandboxExtensionTypeReadWrite,
436 } WKSandboxExtensionType;
437 typedef struct __WKSandboxExtension *WKSandboxExtensionRef;
438
439 WKSandboxExtensionRef WKSandboxExtensionCreate(const char* path, WKSandboxExtensionType type);
440 void WKSandboxExtensionDestroy(WKSandboxExtensionRef sandboxExtension);
441
442 bool WKSandboxExtensionConsume(WKSandboxExtensionRef sandboxExtension);
443 bool WKSandboxExtensionInvalidate(WKSandboxExtensionRef sandboxExtension);
444
445 const char* WKSandboxExtensionGetSerializedFormat(WKSandboxExtensionRef sandboxExtension, size_t* length);
446 WKSandboxExtensionRef WKSandboxExtensionCreateFromSerializedFormat(const char* serializationFormat, size_t length);
447
448 OSStatus WKEnableSandboxStyleFileQuarantine(void);
449
450 bool WKEnterPluginSandbox(const char* profile, const char* parameters[], const char* readOnlyPaths[], const char* readWritePaths[]);
451
452 int WKRecommendedScrollerStyle(void);
453
454 bool WKExecutableWasLinkedOnOrBeforeSnowLeopard(void);
455
456 NSRange WKExtractWordDefinitionTokenRangeFromContextualString(NSString *contextString, NSRange range, NSDictionary **options);
457 void WKShowWordDefinitionWindow(NSAttributedString *term, NSPoint screenPoint, NSDictionary *options);
458 void WKHideWordDefinitionWindow(void);
459
460 CFStringRef WKCopyDefaultSearchProviderDisplayName(void);
461
462 NSURL* WKAVAssetResolvedURL(AVAsset*);
463
464 NSCursor *WKCursor(const char *name);
465
466 #endif
467
468 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
469
470 #import <dispatch/dispatch.h>
471
472 dispatch_source_t WKCreateVMPressureDispatchOnMainQueue(void);
473
474 #endif
475
476 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
477 NSString *WKGetMacOSXVersionString(void);
478 bool WKExecutableWasLinkedOnOrBeforeLion(void);
479 #endif
480
481 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
482 void WKCGPathAddRoundedRect(CGMutablePathRef path, const CGAffineTransform* matrix, CGRect rect, CGFloat cornerWidth, CGFloat cornerHeight);
483 #endif
484
485 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
486 void WKCFURLRequestAllowAllPostCaching(CFURLRequestRef);
487 #endif
488
489 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
490 @class WebFilterEvaluator;
491
492 BOOL WKFilterIsManagedSession(void);
493 WebFilterEvaluator *WKFilterCreateInstance(NSURLResponse *);
494 void WKFilterRelease(WebFilterEvaluator *);
495 BOOL WKFilterWasBlocked(WebFilterEvaluator *);
496 const char* WKFilterAddData(WebFilterEvaluator *, const char* data, int* length);
497 const char* WKFilterDataComplete(WebFilterEvaluator *, int* length);
498
499 CGFloat WKNSElasticDeltaForTimeDelta(CGFloat initialPosition, CGFloat initialVelocity, CGFloat elapsedTime);
500 CGFloat WKNSElasticDeltaForReboundDelta(CGFloat delta);
501 CGFloat WKNSReboundDeltaForElasticDelta(CGFloat delta);
502 #endif
503
504 #ifdef __cplusplus
505 }
506 #endif