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