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