Adds the ability for BubbleGtk widgets to specify both input and popup attributes.
[chromium-blink-merge.git] / third_party / apple_webkit / WebKitSystemInterface.h
blob93ace52c4c10fc7926ec07d88938718ac021b78a
1 /*
2 WebKitSystemInterface.h
3 Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
5 Public header file.
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions
9 are met:
10 1. Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12 2. Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
16 THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
17 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
20 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 #import <Cocoa/Cocoa.h>
29 #import <Carbon/Carbon.h>
31 @class AVAsset;
32 @class QTMovie;
33 @class QTMovieView;
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
39 typedef struct _CFURLResponse* CFURLResponseRef;
40 typedef const struct _CFURLRequest* CFURLRequestRef;
41 typedef struct _CFURLRequest* CFMutableURLRequestRef;
43 typedef struct _CFURLCredential* WKCFURLCredentialRef;
44 typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
46 typedef enum {
47 WKCertificateParseResultSucceeded = 0,
48 WKCertificateParseResultFailed = 1,
49 WKCertificateParseResultPKCS7 = 2,
50 } WKCertificateParseResult;
52 CFStringRef WKCopyCFLocalizationPreferredName(CFStringRef localization);
53 void WKSetDefaultLocalization(CFStringRef localization);
55 CFStringRef WKSignedPublicKeyAndChallengeString(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription);
56 WKCertificateParseResult WKAddCertificatesToKeychainFromData(const void *bytes, unsigned length);
58 NSString *WKGetPreferredExtensionForMIMEType(NSString *type);
59 NSArray *WKGetExtensionsForMIMEType(NSString *type);
60 NSString *WKGetMIMETypeForExtension(NSString *extension);
62 NSDate *WKGetNSURLResponseLastModifiedDate(NSURLResponse *response);
63 NSTimeInterval WKGetNSURLResponseFreshnessLifetime(NSURLResponse *response);
64 NSString *WKCopyNSURLResponseStatusLine(NSURLResponse *response);
66 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
67 CFArrayRef WKCopyNSURLResponseCertificateChain(NSURLResponse *response);
68 #endif
70 CFStringEncoding WKGetWebDefaultCFStringEncoding(void);
72 void WKSetMetadataURL(NSString *URLString, NSString *referrer, NSString *path);
73 void WKSetNSURLConnectionDefersCallbacks(NSURLConnection *connection, BOOL defers);
75 void WKShowKeyAndMain(void);
76 #ifndef __LP64__
77 OSStatus WKSyncWindowWithCGAfterMove(WindowRef);
78 unsigned WKCarbonWindowMask(void);
79 void *WKGetNativeWindowFromWindowRef(WindowRef);
80 OSType WKCarbonWindowPropertyCreator(void);
81 OSType WKCarbonWindowPropertyTag(void);
82 #endif
84 typedef id WKNSURLConnectionDelegateProxyPtr;
86 WKNSURLConnectionDelegateProxyPtr WKCreateNSURLConnectionDelegateProxy(void);
88 void WKDisableCGDeferredUpdates(void);
90 Class WKNSURLProtocolClassForRequest(NSURLRequest *request);
91 void WKSetNSURLRequestShouldContentSniff(NSMutableURLRequest *request, BOOL shouldContentSniff);
93 void WKSetCookieStoragePrivateBrowsingEnabled(BOOL enabled);
95 unsigned WKGetNSAutoreleasePoolCount(void);
97 void WKAdvanceDefaultButtonPulseAnimation(NSButtonCell *button);
99 NSString *WKMouseMovedNotification(void);
100 NSString *WKWindowWillOrderOnScreenNotification(void);
101 NSString *WKWindowWillOrderOffScreenNotification(void);
102 void WKSetNSWindowShouldPostEventNotifications(NSWindow *window, BOOL post);
104 CFTypeID WKGetAXTextMarkerTypeID(void);
105 CFTypeID WKGetAXTextMarkerRangeTypeID(void);
106 CFTypeRef WKCreateAXTextMarker(const void *bytes, size_t len);
107 BOOL WKGetBytesFromAXTextMarker(CFTypeRef textMarker, void *bytes, size_t length);
108 CFTypeRef WKCreateAXTextMarkerRange(CFTypeRef start, CFTypeRef end);
109 CFTypeRef WKCopyAXTextMarkerRangeStart(CFTypeRef range);
110 CFTypeRef WKCopyAXTextMarkerRangeEnd(CFTypeRef range);
111 void WKAccessibilityHandleFocusChanged(void);
112 AXUIElementRef WKCreateAXUIElementRef(id element);
113 void WKUnregisterUniqueIdForElement(id element);
116 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
117 // Remote Accessibility API.
118 void WKAXRegisterRemoteApp(void);
119 void WKAXInitializeElementWithPresenterPid(id, pid_t);
120 NSData *WKAXRemoteTokenForElement(id);
121 id WKAXRemoteElementForToken(NSData *);
122 void WKAXSetWindowForRemoteElement(id remoteWindow, id remoteElement);
123 void WKAXRegisterRemoteProcess(bool registerProcess, pid_t);
124 pid_t WKAXRemoteProcessIdentifier(id remoteElement);
125 #endif
127 void WKSetUpFontCache(void);
129 void WKSignalCFReadStreamEnd(CFReadStreamRef stream);
130 void WKSignalCFReadStreamHasBytes(CFReadStreamRef stream);
131 void WKSignalCFReadStreamError(CFReadStreamRef stream, CFStreamError *error);
133 CFReadStreamRef WKCreateCustomCFReadStream(void *(*formCreate)(CFReadStreamRef, void *),
134 void (*formFinalize)(CFReadStreamRef, void *),
135 Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *),
136 CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *),
137 Boolean (*formCanRead)(CFReadStreamRef, void *),
138 void (*formClose)(CFReadStreamRef, void *),
139 void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
140 void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
141 void *context);
143 void WKDrawCapsLockIndicator(CGContextRef, CGRect);
145 void WKDrawFocusRing(CGContextRef context, CGColorRef color, int radius);
146 // The CG context's current path is the focus ring's path.
147 // A color of 0 means "use system focus ring color".
148 // A radius of 0 means "use default focus ring radius".
150 void WKSetDragImage(NSImage *image, NSPoint offset);
152 void WKDrawBezeledTextFieldCell(NSRect, BOOL enabled);
153 void WKDrawTextFieldCellFocusRing(NSTextFieldCell*, NSRect);
154 void WKDrawBezeledTextArea(NSRect, BOOL enabled);
155 void WKPopupMenu(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
156 void WKPopupContextMenu(NSMenu *menu, NSPoint screenLocation);
157 void WKSendUserChangeNotifications(void);
158 #ifndef __LP64__
159 BOOL WKConvertNSEventToCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent);
160 void WKSendKeyEventToTSM(NSEvent *theEvent);
161 void WKCallDrawingNotification(CGrafPtr port, Rect *bounds);
162 #endif
164 BOOL WKGetGlyphTransformedAdvances(CGFontRef, NSFont*, CGAffineTransform *m, ATSGlyphRef *glyph, CGSize *advance);
165 NSFont *WKGetFontInLanguageForRange(NSFont *font, NSString *string, NSRange range);
166 NSFont *WKGetFontInLanguageForCharacter(NSFont *font, UniChar ch);
167 void WKSetCGFontRenderingMode(CGContextRef cgContext, NSFont *font);
168 BOOL WKCGContextGetShouldSmoothFonts(CGContextRef cgContext);
171 void WKSetBaseCTM(CGContextRef, CGAffineTransform);
172 void WKSetPatternPhaseInUserSpace(CGContextRef, CGPoint);
173 CGAffineTransform WKGetUserToBaseCTM(CGContextRef);
175 void WKGetGlyphsForCharacters(CGFontRef, const UniChar[], CGGlyph[], size_t);
176 bool WKGetVerticalGlyphsForCharacters(CTFontRef, const UniChar[], CGGlyph[], size_t);
178 CTLineRef WKCreateCTLineWithUniCharProvider(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
179 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
180 CTTypesetterRef WKCreateCTTypesetterWithUniCharProviderAndOptions(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
182 CGContextRef WKIOSurfaceContextCreate(IOSurfaceRef, unsigned width, unsigned height, CGColorSpaceRef);
183 CGImageRef WKIOSurfaceContextCreateImage(CGContextRef context);
184 #endif
186 typedef enum {
187 WKPatternTilingNoDistortion,
188 WKPatternTilingConstantSpacingMinimalDistortion,
189 WKPatternTilingConstantSpacing
190 } WKPatternTiling;
192 CGPatternRef WKCGPatternCreateWithImageAndTransform(CGImageRef image, CGAffineTransform transform, int tiling);
193 void WKCGContextResetClip(CGContextRef);
195 #ifndef __LP64__
196 NSEvent *WKCreateNSEventWithCarbonEvent(EventRef eventRef);
197 NSEvent *WKCreateNSEventWithCarbonMouseMoveEvent(EventRef inEvent, NSWindow *window);
198 NSEvent *WKCreateNSEventWithCarbonClickEvent(EventRef inEvent, WindowRef windowRef);
199 #endif
201 CGContextRef WKNSWindowOverrideCGContext(NSWindow *, CGContextRef);
202 void WKNSWindowRestoreCGContext(NSWindow *, CGContextRef);
204 void WKNSWindowMakeBottomCornersSquare(NSWindow *);
206 // These constants match the ones used by ThemeScrollbarArrowStyle (some of the values are private, so we can't just
207 // use that enum directly).
208 typedef enum {
209 WKThemeScrollBarArrowsSingle = 0,
210 WKThemeScrollBarArrowsLowerRight = 1,
211 WKThemeScrollBarArrowsDouble = 2,
212 WKThemeScrollBarArrowsUpperLeft = 3,
213 } WKThemeScrollBarArrowStyle;
215 OSStatus WKThemeDrawTrack(const HIThemeTrackDrawInfo* inDrawInfo, CGContextRef inContext, int inArrowStyle);
218 BOOL WKCGContextIsBitmapContext(CGContextRef context);
220 void WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, BOOL *continuous);
222 BOOL WKAppVersionCheckLessThan(NSString *, int, double);
224 typedef enum {
225 WKMovieTypeUnknown,
226 WKMovieTypeDownload,
227 WKMovieTypeStoredStream,
228 WKMovieTypeLiveStream
229 } WKMovieType;
231 int WKQTMovieGetType(QTMovie* movie);
233 BOOL WKQTMovieHasClosedCaptions(QTMovie* movie);
234 void WKQTMovieSetShowClosedCaptions(QTMovie* movie, BOOL showClosedCaptions);
235 void WKQTMovieSelectPreferredAlternates(QTMovie* movie);
236 void WKQTMovieSelectPreferredAlternateTrackForMediaType(QTMovie* movie, NSString* mediaType);
238 unsigned WKQTIncludeOnlyModernMediaFileTypes(void);
239 int WKQTMovieDataRate(QTMovie* movie);
240 float WKQTMovieMaxTimeLoaded(QTMovie* movie);
241 float WKQTMovieMaxTimeSeekable(QTMovie* movie);
242 NSString *WKQTMovieMaxTimeLoadedChangeNotification(void);
243 void WKQTMovieViewSetDrawSynchronously(QTMovieView* view, BOOL sync);
244 void WKQTMovieDisableComponent(uint32_t[5]);
245 NSURL *WKQTMovieResolvedURL(QTMovie* movie);
247 CFStringRef WKCopyFoundationCacheDirectory(void);
249 #if MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
250 typedef struct __CFURLStorageSession* CFURLStorageSessionRef;
251 #else
252 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
253 #endif
254 CFURLStorageSessionRef WKCreatePrivateStorageSession(CFStringRef);
255 NSURLRequest *WKCopyRequestWithStorageSession(CFURLStorageSessionRef, NSURLRequest*);
256 NSCachedURLResponse *WKCachedResponseForRequest(CFURLStorageSessionRef, NSURLRequest*);
257 void WKSetRequestStorageSession(CFURLStorageSessionRef, CFMutableURLRequestRef);
259 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
260 CFHTTPCookieStorageRef WKCopyHTTPCookieStorage(CFURLStorageSessionRef);
261 unsigned WKGetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef);
262 void WKSetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef, unsigned policy);
263 NSArray *WKHTTPCookiesForURL(CFHTTPCookieStorageRef, NSURL *);
264 void WKSetHTTPCookiesForURL(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
265 void WKDeleteHTTPCookie(CFHTTPCookieStorageRef, NSHTTPCookie *);
267 CFHTTPCookieStorageRef WKGetDefaultHTTPCookieStorage(void);
268 WKCFURLCredentialRef WKCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef);
269 void WKSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool flag);
270 CFArrayRef WKCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef);
271 void WKCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts);
273 void WKSetVisibleApplicationName(CFStringRef);
275 typedef enum {
276 WKMediaUIPartFullscreenButton = 0,
277 WKMediaUIPartMuteButton,
278 WKMediaUIPartPlayButton,
279 WKMediaUIPartSeekBackButton,
280 WKMediaUIPartSeekForwardButton,
281 WKMediaUIPartTimelineSlider,
282 WKMediaUIPartTimelineSliderThumb,
283 WKMediaUIPartRewindButton,
284 WKMediaUIPartSeekToRealtimeButton,
285 WKMediaUIPartShowClosedCaptionsButton,
286 WKMediaUIPartHideClosedCaptionsButton,
287 WKMediaUIPartUnMuteButton,
288 WKMediaUIPartPauseButton,
289 WKMediaUIPartBackground,
290 WKMediaUIPartCurrentTimeDisplay,
291 WKMediaUIPartTimeRemainingDisplay,
292 WKMediaUIPartStatusDisplay,
293 WKMediaUIPartControlsPanel,
294 WKMediaUIPartVolumeSliderContainer,
295 WKMediaUIPartVolumeSlider,
296 WKMediaUIPartVolumeSliderThumb
297 } WKMediaUIPart;
299 typedef enum {
300 WKMediaControllerThemeClassic = 1,
301 WKMediaControllerThemeQuickTime = 2
302 } WKMediaControllerThemeStyle;
304 typedef enum {
305 WKMediaControllerFlagDisabled = 1 << 0,
306 WKMediaControllerFlagPressed = 1 << 1,
307 WKMediaControllerFlagDrawEndCaps = 1 << 3,
308 WKMediaControllerFlagFocused = 1 << 4
309 } WKMediaControllerThemeState;
311 BOOL WKMediaControllerThemeAvailable(int themeStyle);
312 BOOL WKHitTestMediaUIPart(int part, int themeStyle, CGRect bounds, CGPoint point);
313 void WKMeasureMediaUIPart(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
314 void WKDrawMediaUIPart(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
315 void WKDrawMediaSliderTrack(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
316 NSView *WKCreateMediaUIBackgroundView(void);
318 typedef enum {
319 WKMediaUIControlTimeline,
320 WKMediaUIControlSlider,
321 WKMediaUIControlPlayPauseButton,
322 WKMediaUIControlExitFullscreenButton,
323 WKMediaUIControlRewindButton,
324 WKMediaUIControlFastForwardButton,
325 WKMediaUIControlVolumeUpButton,
326 WKMediaUIControlVolumeDownButton
327 } WKMediaUIControlType;
329 NSControl *WKCreateMediaUIControl(int controlType);
331 NSArray *WKQTGetSitesInMediaDownloadCache();
332 void WKQTClearMediaDownloadCacheForSite(NSString *site);
333 void WKQTClearMediaDownloadCache();
335 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
336 mach_port_t WKInitializeRenderServer(void);
338 @class CALayer;
340 CALayer *WKMakeRenderLayer(uint32_t contextID);
342 typedef struct __WKSoftwareCARendererRef *WKSoftwareCARendererRef;
344 WKSoftwareCARendererRef WKSoftwareCARendererCreate(uint32_t contextID);
345 void WKSoftwareCARendererDestroy(WKSoftwareCARendererRef);
346 void WKSoftwareCARendererRender(WKSoftwareCARendererRef, CGContextRef, CGRect);
348 typedef struct __WKCARemoteLayerClientRef *WKCARemoteLayerClientRef;
350 WKCARemoteLayerClientRef WKCARemoteLayerClientMakeWithServerPort(mach_port_t port);
351 void WKCARemoteLayerClientInvalidate(WKCARemoteLayerClientRef);
352 uint32_t WKCARemoteLayerClientGetClientId(WKCARemoteLayerClientRef);
353 void WKCARemoteLayerClientSetLayer(WKCARemoteLayerClientRef, CALayer *);
354 CALayer *WKCARemoteLayerClientGetLayer(WKCARemoteLayerClientRef);
356 @class CARenderer;
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 #if defined(__x86_64__)
368 #import <mach/mig.h>
369 CFRunLoopSourceRef WKCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t serverPort);
370 #endif // defined(__x86_64__)
372 NSUInteger WKGetInputPanelWindowStyle(void);
373 UInt8 WKGetNSEventKeyChar(NSEvent *);
374 #endif // MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
376 @class CAPropertyAnimation;
377 void WKSetCAAnimationValueFunction(CAPropertyAnimation*, NSString* function);
379 unsigned WKInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
380 int WKGetHTTPPipeliningPriority(CFURLRequestRef);
381 void WKSetHTTPPipeliningMaximumPriority(int maximumPriority);
382 void WKSetHTTPPipeliningPriority(CFURLRequestRef, int priority);
383 void WKSetHTTPPipeliningMinimumFastLanePriority(int priority);
385 void WKSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
386 void WKSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
387 CFHTTPMessageRef WKCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL);
389 #if MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
390 typedef enum {
391 WKEventPhaseNone = 0,
392 WKEventPhaseBegan = 1,
393 WKEventPhaseChanged = 2,
394 WKEventPhaseEnded = 3,
395 } WKEventPhase;
397 int WKGetNSEventMomentumPhase(NSEvent *);
398 #endif
400 void WKWindowSetAlpha(NSWindow *window, float alphaValue);
401 void WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame);
403 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
404 void WKSyncSurfaceToView(NSView *view);
406 void WKEnableSettingCursorWhenInBackground(void);
408 CFDictionaryRef WKNSURLRequestCreateSerializableRepresentation(NSURLRequest *request, CFTypeRef tokenNull);
409 NSURLRequest *WKNSURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
411 CFDictionaryRef WKNSURLResponseCreateSerializableRepresentation(NSURLResponse *response, CFTypeRef tokenNull);
412 NSURLResponse *WKNSURLResponseFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
414 #ifndef __LP64__
415 ScriptCode WKGetScriptCodeFromCurrentKeyboardInputSource(void);
416 #endif
418 #endif
420 #if MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
421 CFIndex WKGetHyphenationLocationBeforeIndex(CFStringRef string, CFIndex index);
422 #endif
424 CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStore(void);
425 void WKCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostArray);
427 CFStringRef WKGetCFURLResponseMIMEType(CFURLResponseRef);
428 CFURLRef WKGetCFURLResponseURL(CFURLResponseRef);
429 CFHTTPMessageRef WKGetCFURLResponseHTTPResponse(CFURLResponseRef);
430 CFStringRef WKCopyCFURLResponseSuggestedFilename(CFURLResponseRef);
431 void WKSetCFURLResponseMIMEType(CFURLResponseRef, CFStringRef mimeType);
433 CIFormat WKCIGetRGBA8Format(void);
435 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
437 typedef enum {
438 WKSandboxExtensionTypeReadOnly,
439 WKSandboxExtensionTypeWriteOnly,
440 WKSandboxExtensionTypeReadWrite,
441 } WKSandboxExtensionType;
442 typedef struct __WKSandboxExtension *WKSandboxExtensionRef;
444 WKSandboxExtensionRef WKSandboxExtensionCreate(const char* path, WKSandboxExtensionType type);
445 void WKSandboxExtensionDestroy(WKSandboxExtensionRef sandboxExtension);
447 bool WKSandboxExtensionConsume(WKSandboxExtensionRef sandboxExtension);
448 bool WKSandboxExtensionInvalidate(WKSandboxExtensionRef sandboxExtension);
450 const char* WKSandboxExtensionGetSerializedFormat(WKSandboxExtensionRef sandboxExtension, size_t* length);
451 WKSandboxExtensionRef WKSandboxExtensionCreateFromSerializedFormat(const char* serializationFormat, size_t length);
453 OSStatus WKEnableSandboxStyleFileQuarantine(void);
455 int WKRecommendedScrollerStyle(void);
457 bool WKExecutableWasLinkedOnOrBeforeSnowLeopard(void);
459 NSRange WKExtractWordDefinitionTokenRangeFromContextualString(NSString *contextString, NSRange range, NSDictionary **options);
460 void WKShowWordDefinitionWindow(NSAttributedString *term, NSPoint screenPoint, NSDictionary *options);
461 void WKHideWordDefinitionWindow(void);
463 CFStringRef WKCopyDefaultSearchProviderDisplayName(void);
465 NSURL* WKAVAssetResolvedURL(AVAsset*);
467 NSCursor *WKCursor(const char *name);
469 #endif
471 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
473 #import <dispatch/dispatch.h>
475 dispatch_source_t WKCreateVMPressureDispatchOnMainQueue(void);
477 #endif
479 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
480 NSString *WKGetMacOSXVersionString(void);
481 bool WKExecutableWasLinkedOnOrBeforeLion(void);
482 #endif
484 #ifdef __cplusplus
486 #endif