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