Source/WebCore: [WebKit2] Changing the cookie accept policy in Private Browsing doesn...
[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 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 #ifndef BUILDING_ON_LEOPARD
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
96 #if !defined(BUILDING_ON_LEOPARD)
97 // Remote Accessibility API.
98 void WKAXRegisterRemoteApp(void);
99 void WKAXInitializeElementWithPresenterPid(id, pid_t);
100 NSData *WKAXRemoteTokenForElement(id);
101 id WKAXRemoteElementForToken(NSData *);
102 void WKAXSetWindowForRemoteElement(id remoteWindow, id remoteElement);
103 void WKAXRegisterRemoteProcess(bool registerProcess, pid_t);
104 pid_t WKAXRemoteProcessIdentifier(id remoteElement);
105 #endif
106
107 void WKSetUpFontCache(void);
108
109 void WKSignalCFReadStreamEnd(CFReadStreamRef stream);
110 void WKSignalCFReadStreamHasBytes(CFReadStreamRef stream);
111 void WKSignalCFReadStreamError(CFReadStreamRef stream, CFStreamError *error);
112
113 CFReadStreamRef WKCreateCustomCFReadStream(void *(*formCreate)(CFReadStreamRef, void *), 
114     void (*formFinalize)(CFReadStreamRef, void *), 
115     Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *), 
116     CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *), 
117     Boolean (*formCanRead)(CFReadStreamRef, void *), 
118     void (*formClose)(CFReadStreamRef, void *), 
119     void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *), 
120     void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
121     void *context);
122
123 void WKDrawCapsLockIndicator(CGContextRef, CGRect);
124
125 void WKDrawFocusRing(CGContextRef context, CGColorRef color, int radius);
126     // The CG context's current path is the focus ring's path.
127     // A color of 0 means "use system focus ring color".
128     // A radius of 0 means "use default focus ring radius".
129
130 void WKSetDragImage(NSImage *image, NSPoint offset);
131
132 void WKDrawBezeledTextFieldCell(NSRect, BOOL enabled);
133 void WKDrawTextFieldCellFocusRing(NSTextFieldCell*, NSRect);
134 void WKDrawBezeledTextArea(NSRect, BOOL enabled);
135 void WKPopupMenu(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
136 void WKPopupContextMenu(NSMenu *menu, NSPoint screenLocation);
137 void WKSendUserChangeNotifications(void);
138 #ifndef __LP64__
139 BOOL WKConvertNSEventToCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent);
140 void WKSendKeyEventToTSM(NSEvent *theEvent);
141 void WKCallDrawingNotification(CGrafPtr port, Rect *bounds);
142 #endif
143
144 BOOL WKGetGlyphTransformedAdvances(CGFontRef, NSFont*, CGAffineTransform *m, ATSGlyphRef *glyph, CGSize *advance);
145 NSFont *WKGetFontInLanguageForRange(NSFont *font, NSString *string, NSRange range);
146 NSFont *WKGetFontInLanguageForCharacter(NSFont *font, UniChar ch);
147 void WKSetCGFontRenderingMode(CGContextRef cgContext, NSFont *font);
148 BOOL WKCGContextGetShouldSmoothFonts(CGContextRef cgContext);
149
150
151 void WKSetPatternBaseCTM(CGContextRef, CGAffineTransform);
152 void WKSetPatternPhaseInUserSpace(CGContextRef, CGPoint);
153 CGAffineTransform WKGetUserToBaseCTM(CGContextRef);
154
155 void WKGetGlyphsForCharacters(CGFontRef, const UniChar[], CGGlyph[], size_t);
156
157 CTLineRef WKCreateCTLineWithUniCharProvider(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
158 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
159 CTTypesetterRef WKCreateCTTypesetterWithUniCharProviderAndOptions(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
160
161 CGContextRef WKIOSurfaceContextCreate(IOSurfaceRef, unsigned width, unsigned height, CGColorSpaceRef);
162 CGImageRef WKIOSurfaceContextCreateImage(CGContextRef context);
163 #endif
164
165 #ifndef __LP64__
166 NSEvent *WKCreateNSEventWithCarbonEvent(EventRef eventRef);
167 NSEvent *WKCreateNSEventWithCarbonMouseMoveEvent(EventRef inEvent, NSWindow *window);
168 NSEvent *WKCreateNSEventWithCarbonClickEvent(EventRef inEvent, WindowRef windowRef);
169 #endif
170
171 CGContextRef WKNSWindowOverrideCGContext(NSWindow *, CGContextRef);
172 void WKNSWindowRestoreCGContext(NSWindow *, CGContextRef);
173
174 void WKNSWindowMakeBottomCornersSquare(NSWindow *);
175
176 // These constants match the ones used by ThemeScrollbarArrowStyle (some of the values are private, so we can't just
177 // use that enum directly).
178 typedef enum {
179     WKThemeScrollBarArrowsSingle     = 0,
180     WKThemeScrollBarArrowsLowerRight = 1,
181     WKThemeScrollBarArrowsDouble     = 2,
182     WKThemeScrollBarArrowsUpperLeft  = 3,
183 } WKThemeScrollBarArrowStyle;
184
185 OSStatus WKThemeDrawTrack(const HIThemeTrackDrawInfo* inDrawInfo, CGContextRef inContext, int inArrowStyle);
186
187
188 BOOL WKCGContextIsBitmapContext(CGContextRef context);
189
190 void WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, BOOL *continuous);
191
192 BOOL WKAppVersionCheckLessThan(NSString *, int, double);
193
194 typedef enum {
195     WKMovieTypeUnknown,
196     WKMovieTypeDownload,
197     WKMovieTypeStoredStream,
198     WKMovieTypeLiveStream
199 } WKMovieType;
200
201 int WKQTMovieGetType(QTMovie* movie);
202
203 BOOL WKQTMovieHasClosedCaptions(QTMovie* movie);
204 void WKQTMovieSetShowClosedCaptions(QTMovie* movie, BOOL showClosedCaptions);
205 void WKQTMovieSelectPreferredAlternates(QTMovie* movie);
206 void WKQTMovieSelectPreferredAlternateTrackForMediaType(QTMovie* movie, NSString* mediaType);
207
208 unsigned WKQTIncludeOnlyModernMediaFileTypes(void);
209 int WKQTMovieDataRate(QTMovie* movie);
210 float WKQTMovieMaxTimeLoaded(QTMovie* movie);
211 float WKQTMovieMaxTimeSeekable(QTMovie* movie);
212 NSString *WKQTMovieMaxTimeLoadedChangeNotification(void);
213 void WKQTMovieViewSetDrawSynchronously(QTMovieView* view, BOOL sync);
214 void WKQTMovieDisableComponent(uint32_t[5]);
215 NSURL *WKQTMovieResolvedURL(QTMovie* movie);
216
217 CFStringRef WKCopyFoundationCacheDirectory(void);
218
219 #if defined(BUILDING_ON_SNOW_LEOPARD) || defined(BUILDING_ON_LEOPARD)
220 typedef struct __CFURLStorageSession* CFURLStorageSessionRef;
221 #else
222 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
223 #endif
224 CFURLStorageSessionRef WKCreatePrivateStorageSession(CFStringRef);
225 NSURLRequest *WKCopyRequestWithStorageSession(CFURLStorageSessionRef, NSURLRequest*);
226 NSCachedURLResponse *WKCachedResponseForRequest(CFURLStorageSessionRef, NSURLRequest*);
227 void WKSetRequestStorageSession(CFURLStorageSessionRef, CFMutableURLRequestRef);
228
229 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
230 CFHTTPCookieStorageRef WKCopyHTTPCookieStorage(CFURLStorageSessionRef);
231 unsigned WKGetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef);
232 void WKSetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef, unsigned policy);
233 NSArray *WKHTTPCookiesForURL(CFHTTPCookieStorageRef, NSURL *);
234 void WKSetHTTPCookiesForURL(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
235 void WKDeleteHTTPCookie(CFHTTPCookieStorageRef, NSHTTPCookie *);
236
237 CFHTTPCookieStorageRef WKGetDefaultHTTPCookieStorage(void);
238 WKCFURLCredentialRef WKCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef);
239 void WKSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool flag);
240 CFArrayRef WKCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef);
241 void WKCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts);
242
243 void WKSetVisibleApplicationName(CFStringRef);
244
245 typedef enum {
246     WKMediaUIPartFullscreenButton   = 0,
247     WKMediaUIPartMuteButton,
248     WKMediaUIPartPlayButton,
249     WKMediaUIPartSeekBackButton,
250     WKMediaUIPartSeekForwardButton,
251     WKMediaUIPartTimelineSlider,
252     WKMediaUIPartTimelineSliderThumb,
253     WKMediaUIPartRewindButton,
254     WKMediaUIPartSeekToRealtimeButton,
255     WKMediaUIPartShowClosedCaptionsButton,
256     WKMediaUIPartHideClosedCaptionsButton,
257     WKMediaUIPartUnMuteButton,
258     WKMediaUIPartPauseButton,
259     WKMediaUIPartBackground,
260     WKMediaUIPartCurrentTimeDisplay,
261     WKMediaUIPartTimeRemainingDisplay,
262     WKMediaUIPartStatusDisplay,
263     WKMediaUIPartControlsPanel,
264     WKMediaUIPartVolumeSliderContainer,
265     WKMediaUIPartVolumeSlider,
266     WKMediaUIPartVolumeSliderThumb
267 } WKMediaUIPart;
268
269 typedef enum {
270     WKMediaControllerThemeClassic   = 1,
271     WKMediaControllerThemeQuickTime = 2
272 } WKMediaControllerThemeStyle;
273
274 typedef enum {
275     WKMediaControllerFlagDisabled = 1 << 0,
276     WKMediaControllerFlagPressed = 1 << 1,
277     WKMediaControllerFlagDrawEndCaps = 1 << 3,
278     WKMediaControllerFlagFocused = 1 << 4
279 } WKMediaControllerThemeState;
280
281 BOOL WKMediaControllerThemeAvailable(int themeStyle);
282 BOOL WKHitTestMediaUIPart(int part, int themeStyle, CGRect bounds, CGPoint point);
283 void WKMeasureMediaUIPart(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
284 void WKDrawMediaUIPart(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
285 void WKDrawMediaSliderTrack(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
286 NSView *WKCreateMediaUIBackgroundView(void);
287
288 typedef enum {
289     WKMediaUIControlTimeline,
290     WKMediaUIControlSlider,
291     WKMediaUIControlPlayPauseButton,
292     WKMediaUIControlExitFullscreenButton,
293     WKMediaUIControlRewindButton,
294     WKMediaUIControlFastForwardButton,
295     WKMediaUIControlVolumeUpButton,
296     WKMediaUIControlVolumeDownButton
297 } WKMediaUIControlType;
298     
299 NSControl *WKCreateMediaUIControl(int controlType);
300
301 NSArray *WKQTGetSitesInMediaDownloadCache();
302 void WKQTClearMediaDownloadCacheForSite(NSString *site);
303 void WKQTClearMediaDownloadCache();
304     
305 #ifndef BUILDING_ON_LEOPARD
306 mach_port_t WKInitializeRenderServer(void);
307     
308 @class CALayer;
309
310 CALayer *WKMakeRenderLayer(uint32_t contextID);
311     
312 typedef struct __WKSoftwareCARendererRef *WKSoftwareCARendererRef;
313
314 WKSoftwareCARendererRef WKSoftwareCARendererCreate(uint32_t contextID);
315 void WKSoftwareCARendererDestroy(WKSoftwareCARendererRef);
316 void WKSoftwareCARendererRender(WKSoftwareCARendererRef, CGContextRef, CGRect);
317
318 typedef struct __WKCARemoteLayerClientRef *WKCARemoteLayerClientRef;
319
320 WKCARemoteLayerClientRef WKCARemoteLayerClientMakeWithServerPort(mach_port_t port);
321 void WKCARemoteLayerClientInvalidate(WKCARemoteLayerClientRef);
322 uint32_t WKCARemoteLayerClientGetClientId(WKCARemoteLayerClientRef);
323 void WKCARemoteLayerClientSetLayer(WKCARemoteLayerClientRef, CALayer *);
324 CALayer *WKCARemoteLayerClientGetLayer(WKCARemoteLayerClientRef);
325
326 @class CARenderer;
327
328 void WKCARendererAddChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
329 void WKCARendererRemoveChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
330
331 typedef struct __WKWindowBounceAnimationContext *WKWindowBounceAnimationContextRef;
332
333 WKWindowBounceAnimationContextRef WKWindowBounceAnimationContextCreate(NSWindow *window);
334 void WKWindowBounceAnimationContextDestroy(WKWindowBounceAnimationContextRef context);
335 void WKWindowBounceAnimationSetAnimationProgress(WKWindowBounceAnimationContextRef context, double animationProgress);
336
337 #if defined(__x86_64__)
338 #import <mach/mig.h>
339 CFRunLoopSourceRef WKCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t serverPort);
340 #endif // defined(__x86_64__)
341
342 NSUInteger WKGetInputPanelWindowStyle(void);
343 UInt8 WKGetNSEventKeyChar(NSEvent *);
344 #endif // !defined(BUILDING_ON_LEOPARD)
345
346 @class CAPropertyAnimation;
347 void WKSetCAAnimationValueFunction(CAPropertyAnimation*, NSString* function);
348
349 unsigned WKInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
350 int WKGetHTTPPipeliningPriority(CFURLRequestRef);
351 void WKSetHTTPPipeliningMaximumPriority(int maximumPriority);
352 void WKSetHTTPPipeliningPriority(CFURLRequestRef, int priority);
353 void WKSetHTTPPipeliningMinimumFastLanePriority(int priority);
354
355 void WKSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
356 void WKSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
357 CFHTTPMessageRef WKCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL);
358
359 #if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
360 typedef enum {
361     WKEventPhaseNone = 0,
362     WKEventPhaseBegan = 1,
363     WKEventPhaseChanged = 2,
364     WKEventPhaseEnded = 3,
365 } WKEventPhase;
366
367 int WKGetNSEventMomentumPhase(NSEvent *);
368 #endif
369
370 void WKWindowSetAlpha(NSWindow *window, float alphaValue);
371 void WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame);
372
373 #ifndef BUILDING_ON_LEOPARD
374 void WKSyncSurfaceToView(NSView *view);
375
376 void WKEnableSettingCursorWhenInBackground(void);
377
378 CFDictionaryRef WKNSURLRequestCreateSerializableRepresentation(NSURLRequest *request, CFTypeRef tokenNull);
379 NSURLRequest *WKNSURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
380
381 CFDictionaryRef WKNSURLResponseCreateSerializableRepresentation(NSURLResponse *response, CFTypeRef tokenNull);
382 NSURLResponse *WKNSURLResponseFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
383
384 #ifndef __LP64__
385 ScriptCode WKGetScriptCodeFromCurrentKeyboardInputSource(void);
386 #endif
387
388 #endif
389
390 #if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
391 CFIndex WKGetHyphenationLocationBeforeIndex(CFStringRef string, CFIndex index);
392 #endif
393
394 CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStore(void);
395 void WKCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostArray);    
396
397 CFStringRef WKGetCFURLResponseMIMEType(CFURLResponseRef);
398 CFURLRef WKGetCFURLResponseURL(CFURLResponseRef);
399 CFHTTPMessageRef WKGetCFURLResponseHTTPResponse(CFURLResponseRef);
400 CFStringRef WKCopyCFURLResponseSuggestedFilename(CFURLResponseRef);
401 void WKSetCFURLResponseMIMEType(CFURLResponseRef, CFStringRef mimeType);
402
403 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
404
405 typedef enum {
406     WKSandboxExtensionTypeReadOnly,
407     WKSandboxExtensionTypeWriteOnly,    
408     WKSandboxExtensionTypeReadWrite,
409 } WKSandboxExtensionType;
410 typedef struct __WKSandboxExtension *WKSandboxExtensionRef;
411
412 WKSandboxExtensionRef WKSandboxExtensionCreate(const char* path, WKSandboxExtensionType type);
413 void WKSandboxExtensionDestroy(WKSandboxExtensionRef sandboxExtension);
414
415 bool WKSandboxExtensionConsume(WKSandboxExtensionRef sandboxExtension);
416 bool WKSandboxExtensionInvalidate(WKSandboxExtensionRef sandboxExtension);
417
418 const char* WKSandboxExtensionGetSerializedFormat(WKSandboxExtensionRef sandboxExtension, size_t* length);
419 WKSandboxExtensionRef WKSandboxExtensionCreateFromSerializedFormat(const char* serializationFormat, size_t length);
420
421 typedef struct __WKScrollbarPainter *WKScrollbarPainterRef;
422 typedef struct __WKScrollbarPainterController *WKScrollbarPainterControllerRef;
423
424 WKScrollbarPainterRef WKMakeScrollbarPainter(int controlSize, bool isHorizontal);
425 WKScrollbarPainterRef WKMakeScrollbarReplacementPainter(WKScrollbarPainterRef oldPainter, int newStyle, int controlSize, bool isHorizontal);
426 void WKScrollbarPainterSetDelegate(WKScrollbarPainterRef, id scrollbarPainterDelegate);
427 void WKScrollbarPainterSetEnabled(WKScrollbarPainterRef scrollbarPainter, bool enabled);
428 void WKScrollbarPainterPaint(WKScrollbarPainterRef, bool enabled, double value, CGFloat proportion, CGRect frameRect);
429 void WKScrollbarPainterForceFlashScrollers(WKScrollbarPainterControllerRef);
430 int WKScrollbarThickness(int controlSize);
431 int WKScrollbarMinimumThumbLength(WKScrollbarPainterRef);
432 int WKScrollbarMinimumTotalLengthNeededForThumb(WKScrollbarPainterRef);
433 CGFloat WKScrollbarPainterKnobAlpha(WKScrollbarPainterRef);
434 void WKSetScrollbarPainterKnobAlpha(WKScrollbarPainterRef, CGFloat);
435 CGFloat WKScrollbarPainterTrackAlpha(WKScrollbarPainterRef);
436 void WKSetScrollbarPainterTrackAlpha(WKScrollbarPainterRef, CGFloat);
437 bool WKScrollbarPainterIsHorizontal(WKScrollbarPainterRef);
438 CGRect WKScrollbarPainterKnobRect(WKScrollbarPainterRef);
439 void WKScrollbarPainterSetOverlayState(WKScrollbarPainterRef, int overlayScrollerState);
440
441 // The wk* to WK* renaming does not apply to enums. The way to
442 // circumvent this is to define the enum anonymously twice using
443 // the two prefixes. (See WebCoreSystemInterface.h)
444 enum {
445     WKScrollerKnobStyleDefault = 0,
446     WKScrollerKnobStyleDark = 1,
447     WKScrollerKnobStyleLight = 2
448 };
449 typedef uint32 WKScrollerKnobStyle;
450 void WKSetScrollbarPainterKnobStyle(WKScrollbarPainterRef, WKScrollerKnobStyle);
451
452 WKScrollbarPainterControllerRef WKMakeScrollbarPainterController(id painterControllerDelegate);
453 void WKSetPainterForPainterController(WKScrollbarPainterControllerRef, WKScrollbarPainterRef, bool isHorizontal);
454 WKScrollbarPainterRef WKVerticalScrollbarPainterForController(WKScrollbarPainterControllerRef);
455 WKScrollbarPainterRef WKHorizontalScrollbarPainterForController(WKScrollbarPainterControllerRef);
456 int WKScrollbarPainterControllerStyle(WKScrollbarPainterControllerRef);
457 void WKSetScrollbarPainterControllerStyle(WKScrollbarPainterControllerRef, int newStyle);
458 void WKContentAreaScrolled(WKScrollbarPainterControllerRef);
459 void WKContentAreaWillPaint(WKScrollbarPainterControllerRef);
460 void WKMouseEnteredContentArea(WKScrollbarPainterControllerRef);
461 void WKMouseExitedContentArea(WKScrollbarPainterControllerRef);
462 void WKMouseMovedInContentArea(WKScrollbarPainterControllerRef);
463 void WKWillStartLiveResize(WKScrollbarPainterControllerRef);
464 void WKContentAreaResized(WKScrollbarPainterControllerRef);
465 void WKWillEndLiveResize(WKScrollbarPainterControllerRef);
466 void WKContentAreaDidShow(WKScrollbarPainterControllerRef);
467 void WKContentAreaDidHide(WKScrollbarPainterControllerRef);
468 void WKDidBeginScrollGesture(WKScrollbarPainterControllerRef);
469 void WKDidEndScrollGesture(WKScrollbarPainterControllerRef);
470
471 bool WKScrollbarPainterUsesOverlayScrollers(void);
472
473 bool WKExecutableWasLinkedOnOrBeforeSnowLeopard(void);
474
475 NSRange WKExtractWordDefinitionTokenRangeFromContextualString(NSString *contextString, NSRange range, NSDictionary **options);
476 void WKShowWordDefinitionWindow(NSAttributedString *term, NSPoint screenPoint, NSDictionary *options);
477 void WKHideWordDefinitionWindow(void);
478
479 CFStringRef WKCopyDefaultSearchProviderDisplayName(void);
480
481 NSURL* WKAVAssetResolvedURL(AVAsset*);
482
483 NSCursor *WKCursor(const char *name);
484
485 #endif
486
487 #ifdef __cplusplus
488 }
489 #endif