| 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 | BOOL WKShouldBlockPlugin(NSString *bundleIdentifier, NSString *bundleVersionString); |
|---|
| 96 | |
|---|
| 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); |
|---|
| 106 | #endif |
|---|
| 107 | |
|---|
| 108 | void WKSetUpFontCache(void); |
|---|
| 109 | |
|---|
| 110 | void WKSignalCFReadStreamEnd(CFReadStreamRef stream); |
|---|
| 111 | void WKSignalCFReadStreamHasBytes(CFReadStreamRef stream); |
|---|
| 112 | void WKSignalCFReadStreamError(CFReadStreamRef stream, CFStreamError *error); |
|---|
| 113 | |
|---|
| 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 *), |
|---|
| 122 | void *context); |
|---|
| 123 | |
|---|
| 124 | void WKDrawCapsLockIndicator(CGContextRef, CGRect); |
|---|
| 125 | |
|---|
| 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". |
|---|
| 130 | |
|---|
| 131 | void WKSetDragImage(NSImage *image, NSPoint offset); |
|---|
| 132 | |
|---|
| 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); |
|---|
| 139 | #ifndef __LP64__ |
|---|
| 140 | BOOL WKConvertNSEventToCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent); |
|---|
| 141 | void WKSendKeyEventToTSM(NSEvent *theEvent); |
|---|
| 142 | void WKCallDrawingNotification(CGrafPtr port, Rect *bounds); |
|---|
| 143 | #endif |
|---|
| 144 | |
|---|
| 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); |
|---|
| 150 | |
|---|
| 151 | |
|---|
| 152 | void WKSetBaseCTM(CGContextRef, CGAffineTransform); |
|---|
| 153 | void WKSetPatternPhaseInUserSpace(CGContextRef, CGPoint); |
|---|
| 154 | CGAffineTransform WKGetUserToBaseCTM(CGContextRef); |
|---|
| 155 | |
|---|
| 156 | void WKGetGlyphsForCharacters(CGFontRef, const UniChar[], CGGlyph[], size_t); |
|---|
| 157 | bool WKGetVerticalGlyphsForCharacters(CTFontRef, const UniChar[], CGGlyph[], size_t); |
|---|
| 158 | |
|---|
| 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); |
|---|
| 162 | |
|---|
| 163 | CGContextRef WKIOSurfaceContextCreate(IOSurfaceRef, unsigned width, unsigned height, CGColorSpaceRef); |
|---|
| 164 | CGImageRef WKIOSurfaceContextCreateImage(CGContextRef context); |
|---|
| 165 | #endif |
|---|
| 166 | |
|---|
| 167 | typedef enum { |
|---|
| 168 | WKPatternTilingNoDistortion, |
|---|
| 169 | WKPatternTilingConstantSpacingMinimalDistortion, |
|---|
| 170 | WKPatternTilingConstantSpacing |
|---|
| 171 | } WKPatternTiling; |
|---|
| 172 | |
|---|
| 173 | CGPatternRef WKCGPatternCreateWithImageAndTransform(CGImageRef image, CGAffineTransform transform, int tiling); |
|---|
| 174 | void WKCGContextResetClip(CGContextRef); |
|---|
| 175 | |
|---|
| 176 | #ifndef __LP64__ |
|---|
| 177 | NSEvent *WKCreateNSEventWithCarbonEvent(EventRef eventRef); |
|---|
| 178 | NSEvent *WKCreateNSEventWithCarbonMouseMoveEvent(EventRef inEvent, NSWindow *window); |
|---|
| 179 | NSEvent *WKCreateNSEventWithCarbonClickEvent(EventRef inEvent, WindowRef windowRef); |
|---|
| 180 | #endif |
|---|
| 181 | |
|---|
| 182 | CGContextRef WKNSWindowOverrideCGContext(NSWindow *, CGContextRef); |
|---|
| 183 | void WKNSWindowRestoreCGContext(NSWindow *, CGContextRef); |
|---|
| 184 | |
|---|
| 185 | void WKNSWindowMakeBottomCornersSquare(NSWindow *); |
|---|
| 186 | |
|---|
| 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). |
|---|
| 189 | typedef enum { |
|---|
| 190 | WKThemeScrollBarArrowsSingle = 0, |
|---|
| 191 | WKThemeScrollBarArrowsLowerRight = 1, |
|---|
| 192 | WKThemeScrollBarArrowsDouble = 2, |
|---|
| 193 | WKThemeScrollBarArrowsUpperLeft = 3, |
|---|
| 194 | } WKThemeScrollBarArrowStyle; |
|---|
| 195 | |
|---|
| 196 | OSStatus WKThemeDrawTrack(const HIThemeTrackDrawInfo* inDrawInfo, CGContextRef inContext, int inArrowStyle); |
|---|
| 197 | |
|---|
| 198 | |
|---|
| 199 | BOOL WKCGContextIsBitmapContext(CGContextRef context); |
|---|
| 200 | |
|---|
| 201 | void WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, BOOL *continuous); |
|---|
| 202 | |
|---|
| 203 | BOOL WKAppVersionCheckLessThan(NSString *, int, double); |
|---|
| 204 | |
|---|
| 205 | typedef enum { |
|---|
| 206 | WKMovieTypeUnknown, |
|---|
| 207 | WKMovieTypeDownload, |
|---|
| 208 | WKMovieTypeStoredStream, |
|---|
| 209 | WKMovieTypeLiveStream |
|---|
| 210 | } WKMovieType; |
|---|
| 211 | |
|---|
| 212 | int WKQTMovieGetType(QTMovie* movie); |
|---|
| 213 | |
|---|
| 214 | BOOL WKQTMovieHasClosedCaptions(QTMovie* movie); |
|---|
| 215 | void WKQTMovieSetShowClosedCaptions(QTMovie* movie, BOOL showClosedCaptions); |
|---|
| 216 | void WKQTMovieSelectPreferredAlternates(QTMovie* movie); |
|---|
| 217 | void WKQTMovieSelectPreferredAlternateTrackForMediaType(QTMovie* movie, NSString* mediaType); |
|---|
| 218 | |
|---|
| 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); |
|---|
| 227 | |
|---|
| 228 | CFStringRef WKCopyFoundationCacheDirectory(void); |
|---|
| 229 | |
|---|
| 230 | #if MAC_OS_X_VERSION_MIN_REQUIRED <= 1060 |
|---|
| 231 | typedef struct __CFURLStorageSession* CFURLStorageSessionRef; |
|---|
| 232 | #else |
|---|
| 233 | typedef const struct __CFURLStorageSession* CFURLStorageSessionRef; |
|---|
| 234 | #endif |
|---|
| 235 | CFURLStorageSessionRef WKCreatePrivateStorageSession(CFStringRef); |
|---|
| 236 | NSURLRequest *WKCopyRequestWithStorageSession(CFURLStorageSessionRef, NSURLRequest*); |
|---|
| 237 | NSCachedURLResponse *WKCachedResponseForRequest(CFURLStorageSessionRef, NSURLRequest*); |
|---|
| 238 | void WKSetRequestStorageSession(CFURLStorageSessionRef, CFMutableURLRequestRef); |
|---|
| 239 | |
|---|
| 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 *); |
|---|
| 247 | |
|---|
| 248 | CFHTTPCookieStorageRef WKGetDefaultHTTPCookieStorage(void); |
|---|
| 249 | WKCFURLCredentialRef WKCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef); |
|---|
| 250 | void WKSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool flag); |
|---|
| 251 | CFArrayRef WKCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef); |
|---|
| 252 | void WKCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts); |
|---|
| 253 | |
|---|
| 254 | void WKSetVisibleApplicationName(CFStringRef); |
|---|
| 255 | |
|---|
| 256 | typedef enum { |
|---|
| 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, |
|---|
| 284 | } WKMediaUIPart; |
|---|
| 285 | |
|---|
| 286 | typedef enum { |
|---|
| 287 | WKMediaControllerThemeClassic = 1, |
|---|
| 288 | WKMediaControllerThemeQuickTime = 2 |
|---|
| 289 | } WKMediaControllerThemeStyle; |
|---|
| 290 | |
|---|
| 291 | typedef enum { |
|---|
| 292 | WKMediaControllerFlagDisabled = 1 << 0, |
|---|
| 293 | WKMediaControllerFlagPressed = 1 << 1, |
|---|
| 294 | WKMediaControllerFlagDrawEndCaps = 1 << 3, |
|---|
| 295 | WKMediaControllerFlagFocused = 1 << 4 |
|---|
| 296 | } WKMediaControllerThemeState; |
|---|
| 297 | |
|---|
| 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); |
|---|
| 304 | |
|---|
| 305 | typedef enum { |
|---|
| 306 | WKMediaUIControlTimeline, |
|---|
| 307 | WKMediaUIControlSlider, |
|---|
| 308 | WKMediaUIControlPlayPauseButton, |
|---|
| 309 | WKMediaUIControlExitFullscreenButton, |
|---|
| 310 | WKMediaUIControlRewindButton, |
|---|
| 311 | WKMediaUIControlFastForwardButton, |
|---|
| 312 | WKMediaUIControlVolumeUpButton, |
|---|
| 313 | WKMediaUIControlVolumeDownButton |
|---|
| 314 | } WKMediaUIControlType; |
|---|
| 315 | |
|---|
| 316 | NSControl *WKCreateMediaUIControl(int controlType); |
|---|
| 317 | |
|---|
| 318 | NSArray *WKQTGetSitesInMediaDownloadCache(); |
|---|
| 319 | void WKQTClearMediaDownloadCacheForSite(NSString *site); |
|---|
| 320 | void WKQTClearMediaDownloadCache(); |
|---|
| 321 | |
|---|
| 322 | #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 |
|---|
| 323 | mach_port_t WKInitializeRenderServer(void); |
|---|
| 324 | |
|---|
| 325 | @class CALayer; |
|---|
| 326 | |
|---|
| 327 | CALayer *WKMakeRenderLayer(uint32_t contextID); |
|---|
| 328 | |
|---|
| 329 | typedef struct __WKSoftwareCARendererRef *WKSoftwareCARendererRef; |
|---|
| 330 | |
|---|
| 331 | WKSoftwareCARendererRef WKSoftwareCARendererCreate(uint32_t contextID); |
|---|
| 332 | void WKSoftwareCARendererDestroy(WKSoftwareCARendererRef); |
|---|
| 333 | void WKSoftwareCARendererRender(WKSoftwareCARendererRef, CGContextRef, CGRect); |
|---|
| 334 | |
|---|
| 335 | typedef struct __WKCARemoteLayerClientRef *WKCARemoteLayerClientRef; |
|---|
| 336 | |
|---|
| 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); |
|---|
| 342 | |
|---|
| 343 | typedef struct __WKCAContextRef *WKCAContextRef; |
|---|
| 344 | |
|---|
| 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); |
|---|
| 351 | |
|---|
| 352 | #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 |
|---|
| 353 | void WKCALayerEnumerateRectsBeingDrawnWithBlock(CALayer *layer, CGContextRef context, void (^block)(CGRect rect)); |
|---|
| 354 | #endif |
|---|
| 355 | |
|---|
| 356 | @class CARenderer; |
|---|
| 357 | |
|---|
| 358 | void WKCARendererAddChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context); |
|---|
| 359 | void WKCARendererRemoveChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context); |
|---|
| 360 | |
|---|
| 361 | typedef struct __WKWindowBounceAnimationContext *WKWindowBounceAnimationContextRef; |
|---|
| 362 | |
|---|
| 363 | WKWindowBounceAnimationContextRef WKWindowBounceAnimationContextCreate(NSWindow *window); |
|---|
| 364 | void WKWindowBounceAnimationContextDestroy(WKWindowBounceAnimationContextRef context); |
|---|
| 365 | void WKWindowBounceAnimationSetAnimationProgress(WKWindowBounceAnimationContextRef context, double animationProgress); |
|---|
| 366 | |
|---|
| 367 | void WKWindowSetClipRect(NSWindow*, NSRect); |
|---|
| 368 | |
|---|
| 369 | #if defined(__x86_64__) |
|---|
| 370 | #import <mach/mig.h> |
|---|
| 371 | CFRunLoopSourceRef WKCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t serverPort); |
|---|
| 372 | #endif // defined(__x86_64__) |
|---|
| 373 | |
|---|
| 374 | NSUInteger WKGetInputPanelWindowStyle(void); |
|---|
| 375 | UInt8 WKGetNSEventKeyChar(NSEvent *); |
|---|
| 376 | #endif // MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 |
|---|
| 377 | |
|---|
| 378 | @class CAPropertyAnimation; |
|---|
| 379 | void WKSetCAAnimationValueFunction(CAPropertyAnimation*, NSString* function); |
|---|
| 380 | |
|---|
| 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); |
|---|
| 386 | |
|---|
| 387 | void WKSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort); |
|---|
| 388 | void WKSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString); |
|---|
| 389 | CFHTTPMessageRef WKCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL); |
|---|
| 390 | |
|---|
| 391 | #if MAC_OS_X_VERSION_MIN_REQUIRED <= 1060 |
|---|
| 392 | typedef enum { |
|---|
| 393 | WKEventPhaseNone = 0, |
|---|
| 394 | WKEventPhaseBegan = 1, |
|---|
| 395 | WKEventPhaseChanged = 2, |
|---|
| 396 | WKEventPhaseEnded = 3, |
|---|
| 397 | } WKEventPhase; |
|---|
| 398 | |
|---|
| 399 | int WKGetNSEventMomentumPhase(NSEvent *); |
|---|
| 400 | #endif |
|---|
| 401 | |
|---|
| 402 | void WKWindowSetAlpha(NSWindow *window, float alphaValue); |
|---|
| 403 | void WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame); |
|---|
| 404 | |
|---|
| 405 | #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 |
|---|
| 406 | void WKSyncSurfaceToView(NSView *view); |
|---|
| 407 | |
|---|
| 408 | void WKEnableSettingCursorWhenInBackground(void); |
|---|
| 409 | |
|---|
| 410 | CFDictionaryRef WKNSURLRequestCreateSerializableRepresentation(NSURLRequest *request, CFTypeRef tokenNull); |
|---|
| 411 | NSURLRequest *WKNSURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull); |
|---|
| 412 | |
|---|
| 413 | CFDictionaryRef WKNSURLResponseCreateSerializableRepresentation(NSURLResponse *response, CFTypeRef tokenNull); |
|---|
| 414 | NSURLResponse *WKNSURLResponseFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull); |
|---|
| 415 | |
|---|
| 416 | #ifndef __LP64__ |
|---|
| 417 | ScriptCode WKGetScriptCodeFromCurrentKeyboardInputSource(void); |
|---|
| 418 | #endif |
|---|
| 419 | |
|---|
| 420 | #endif |
|---|
| 421 | |
|---|
| 422 | #if MAC_OS_X_VERSION_MIN_REQUIRED <= 1060 |
|---|
| 423 | CFIndex WKGetHyphenationLocationBeforeIndex(CFStringRef string, CFIndex index); |
|---|
| 424 | #endif |
|---|
| 425 | |
|---|
| 426 | CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStore(void); |
|---|
| 427 | void WKCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostArray); |
|---|
| 428 | |
|---|
| 429 | CFStringRef WKGetCFURLResponseMIMEType(CFURLResponseRef); |
|---|
| 430 | CFURLRef WKGetCFURLResponseURL(CFURLResponseRef); |
|---|
| 431 | CFHTTPMessageRef WKGetCFURLResponseHTTPResponse(CFURLResponseRef); |
|---|
| 432 | CFStringRef WKCopyCFURLResponseSuggestedFilename(CFURLResponseRef); |
|---|
| 433 | void WKSetCFURLResponseMIMEType(CFURLResponseRef, CFStringRef mimeType); |
|---|
| 434 | |
|---|
| 435 | CIFormat WKCIGetRGBA8Format(void); |
|---|
| 436 | |
|---|
| 437 | #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 |
|---|
| 438 | |
|---|
| 439 | typedef enum { |
|---|
| 440 | WKSandboxExtensionTypeReadOnly, |
|---|
| 441 | WKSandboxExtensionTypeWriteOnly, |
|---|
| 442 | WKSandboxExtensionTypeReadWrite, |
|---|
| 443 | } WKSandboxExtensionType; |
|---|
| 444 | typedef struct __WKSandboxExtension *WKSandboxExtensionRef; |
|---|
| 445 | |
|---|
| 446 | WKSandboxExtensionRef WKSandboxExtensionCreate(const char* path, WKSandboxExtensionType type); |
|---|
| 447 | void WKSandboxExtensionDestroy(WKSandboxExtensionRef sandboxExtension); |
|---|
| 448 | |
|---|
| 449 | bool WKSandboxExtensionConsume(WKSandboxExtensionRef sandboxExtension); |
|---|
| 450 | bool WKSandboxExtensionInvalidate(WKSandboxExtensionRef sandboxExtension); |
|---|
| 451 | |
|---|
| 452 | const char* WKSandboxExtensionGetSerializedFormat(WKSandboxExtensionRef sandboxExtension, size_t* length); |
|---|
| 453 | WKSandboxExtensionRef WKSandboxExtensionCreateFromSerializedFormat(const char* serializationFormat, size_t length); |
|---|
| 454 | |
|---|
| 455 | OSStatus WKEnableSandboxStyleFileQuarantine(void); |
|---|
| 456 | |
|---|
| 457 | bool WKEnterPluginSandbox(const char* profile, const char* parameters[], const char* readOnlyPaths[], const char* readWritePaths[]); |
|---|
| 458 | |
|---|
| 459 | int WKRecommendedScrollerStyle(void); |
|---|
| 460 | |
|---|
| 461 | bool WKExecutableWasLinkedOnOrBeforeSnowLeopard(void); |
|---|
| 462 | |
|---|
| 463 | NSRange WKExtractWordDefinitionTokenRangeFromContextualString(NSString *contextString, NSRange range, NSDictionary **options); |
|---|
| 464 | void WKShowWordDefinitionWindow(NSAttributedString *term, NSPoint screenPoint, NSDictionary *options); |
|---|
| 465 | void WKHideWordDefinitionWindow(void); |
|---|
| 466 | |
|---|
| 467 | CFStringRef WKCopyDefaultSearchProviderDisplayName(void); |
|---|
| 468 | |
|---|
| 469 | NSURL* WKAVAssetResolvedURL(AVAsset*); |
|---|
| 470 | |
|---|
| 471 | NSCursor *WKCursor(const char *name); |
|---|
| 472 | |
|---|
| 473 | #endif |
|---|
| 474 | |
|---|
| 475 | #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 |
|---|
| 476 | |
|---|
| 477 | #import <dispatch/dispatch.h> |
|---|
| 478 | |
|---|
| 479 | dispatch_source_t WKCreateVMPressureDispatchOnMainQueue(void); |
|---|
| 480 | |
|---|
| 481 | #endif |
|---|
| 482 | |
|---|
| 483 | #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 |
|---|
| 484 | NSString *WKGetMacOSXVersionString(void); |
|---|
| 485 | bool WKExecutableWasLinkedOnOrBeforeLion(void); |
|---|
| 486 | #endif |
|---|
| 487 | |
|---|
| 488 | #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 |
|---|
| 489 | void WKCGPathAddRoundedRect(CGMutablePathRef path, const CGAffineTransform* matrix, CGRect rect, CGFloat cornerWidth, CGFloat cornerHeight); |
|---|
| 490 | #endif |
|---|
| 491 | |
|---|
| 492 | #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 |
|---|
| 493 | void WKCFURLRequestAllowAllPostCaching(CFURLRequestRef); |
|---|
| 494 | #endif |
|---|
| 495 | |
|---|
| 496 | #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 |
|---|
| 497 | @class WebFilterEvaluator; |
|---|
| 498 | |
|---|
| 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); |
|---|
| 505 | #endif |
|---|
| 506 | |
|---|
| 507 | #ifdef __cplusplus |
|---|
| 508 | } |
|---|
| 509 | #endif |
|---|