[EFL] Add ewk_network.cpp|h files.
[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 NSArray *WKHTTPCookiesForURL(CFHTTPCookieStorageRef, NSURL *);
233 void WKSetHTTPCookiesForURL(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
234 void WKDeleteHTTPCookie(CFHTTPCookieStorageRef, NSHTTPCookie *);
235
236 CFHTTPCookieStorageRef WKGetDefaultHTTPCookieStorage(void);
237 WKCFURLCredentialRef WKCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef);
238 void WKSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool flag);
239 CFArrayRef WKCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef);
240 void WKCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts);
241
242 void WKSetVisibleApplicationName(CFStringRef);
243
244 typedef enum {
245     WKMediaUIPartFullscreenButton   = 0,
246     WKMediaUIPartMuteButton,
247     WKMediaUIPartPlayButton,
248     WKMediaUIPartSeekBackButton,
249     WKMediaUIPartSeekForwardButton,
250     WKMediaUIPartTimelineSlider,
251     WKMediaUIPartTimelineSliderThumb,
252     WKMediaUIPartRewindButton,
253     WKMediaUIPartSeekToRealtimeButton,
254     WKMediaUIPartShowClosedCaptionsButton,
255     WKMediaUIPartHideClosedCaptionsButton,
256     WKMediaUIPartUnMuteButton,
257     WKMediaUIPartPauseButton,
258     WKMediaUIPartBackground,
259     WKMediaUIPartCurrentTimeDisplay,
260     WKMediaUIPartTimeRemainingDisplay,
261     WKMediaUIPartStatusDisplay,
262     WKMediaUIPartControlsPanel,
263     WKMediaUIPartVolumeSliderContainer,
264     WKMediaUIPartVolumeSlider,
265     WKMediaUIPartVolumeSliderThumb
266 } WKMediaUIPart;
267
268 typedef enum {
269     WKMediaControllerThemeClassic   = 1,
270     WKMediaControllerThemeQuickTime = 2
271 } WKMediaControllerThemeStyle;
272
273 typedef enum {
274     WKMediaControllerFlagDisabled = 1 << 0,
275     WKMediaControllerFlagPressed = 1 << 1,
276     WKMediaControllerFlagDrawEndCaps = 1 << 3,
277     WKMediaControllerFlagFocused = 1 << 4
278 } WKMediaControllerThemeState;
279
280 BOOL WKMediaControllerThemeAvailable(int themeStyle);
281 BOOL WKHitTestMediaUIPart(int part, int themeStyle, CGRect bounds, CGPoint point);
282 void WKMeasureMediaUIPart(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
283 void WKDrawMediaUIPart(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
284 void WKDrawMediaSliderTrack(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
285 NSView *WKCreateMediaUIBackgroundView(void);
286
287 typedef enum {
288     WKMediaUIControlTimeline,
289     WKMediaUIControlSlider,
290     WKMediaUIControlPlayPauseButton,
291     WKMediaUIControlExitFullscreenButton,
292     WKMediaUIControlRewindButton,
293     WKMediaUIControlFastForwardButton,
294     WKMediaUIControlVolumeUpButton,
295     WKMediaUIControlVolumeDownButton
296 } WKMediaUIControlType;
297     
298 NSControl *WKCreateMediaUIControl(int controlType);
299
300 NSArray *WKQTGetSitesInMediaDownloadCache();
301 void WKQTClearMediaDownloadCacheForSite(NSString *site);
302 void WKQTClearMediaDownloadCache();
303     
304 #ifndef BUILDING_ON_LEOPARD
305 mach_port_t WKInitializeRenderServer(void);
306     
307 @class CALayer;
308
309 CALayer *WKMakeRenderLayer(uint32_t contextID);
310     
311 typedef struct __WKSoftwareCARendererRef *WKSoftwareCARendererRef;
312
313 WKSoftwareCARendererRef WKSoftwareCARendererCreate(uint32_t contextID);
314 void WKSoftwareCARendererDestroy(WKSoftwareCARendererRef);
315 void WKSoftwareCARendererRender(WKSoftwareCARendererRef, CGContextRef, CGRect);
316
317 typedef struct __WKCARemoteLayerClientRef *WKCARemoteLayerClientRef;
318
319 WKCARemoteLayerClientRef WKCARemoteLayerClientMakeWithServerPort(mach_port_t port);
320 void WKCARemoteLayerClientInvalidate(WKCARemoteLayerClientRef);
321 uint32_t WKCARemoteLayerClientGetClientId(WKCARemoteLayerClientRef);
322 void WKCARemoteLayerClientSetLayer(WKCARemoteLayerClientRef, CALayer *);
323 CALayer *WKCARemoteLayerClientGetLayer(WKCARemoteLayerClientRef);
324
325 @class CARenderer;
326
327 void WKCARendererAddChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
328 void WKCARendererRemoveChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
329
330 typedef struct __WKWindowBounceAnimationContext *WKWindowBounceAnimationContextRef;
331
332 WKWindowBounceAnimationContextRef WKWindowBounceAnimationContextCreate(NSWindow *window);
333 void WKWindowBounceAnimationContextDestroy(WKWindowBounceAnimationContextRef context);
334 void WKWindowBounceAnimationSetAnimationProgress(WKWindowBounceAnimationContextRef context, double animationProgress);
335
336 #if defined(__x86_64__)
337 #import <mach/mig.h>
338 CFRunLoopSourceRef WKCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t serverPort);
339 #endif // defined(__x86_64__)
340
341 NSUInteger WKGetInputPanelWindowStyle(void);
342 UInt8 WKGetNSEventKeyChar(NSEvent *);
343 #endif // !defined(BUILDING_ON_LEOPARD)
344
345 @class CAPropertyAnimation;
346 void WKSetCAAnimationValueFunction(CAPropertyAnimation*, NSString* function);
347
348 unsigned WKInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
349 int WKGetHTTPPipeliningPriority(CFURLRequestRef);
350 void WKSetHTTPPipeliningMaximumPriority(int maximumPriority);
351 void WKSetHTTPPipeliningPriority(CFURLRequestRef, int priority);
352 void WKSetHTTPPipeliningMinimumFastLanePriority(int priority);
353
354 void WKSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
355 void WKSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
356 CFHTTPMessageRef WKCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL);
357
358 #if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
359 typedef enum {
360     WKEventPhaseNone = 0,
361     WKEventPhaseBegan = 1,
362     WKEventPhaseChanged = 2,
363     WKEventPhaseEnded = 3,
364 } WKEventPhase;
365
366 int WKGetNSEventMomentumPhase(NSEvent *);
367 #endif
368
369 void WKWindowSetAlpha(NSWindow *window, float alphaValue);
370 void WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame);
371
372 #ifndef BUILDING_ON_LEOPARD
373 void WKSyncSurfaceToView(NSView *view);
374
375 void WKEnableSettingCursorWhenInBackground(void);
376
377 CFDictionaryRef WKNSURLRequestCreateSerializableRepresentation(NSURLRequest *request, CFTypeRef tokenNull);
378 NSURLRequest *WKNSURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
379
380 CFDictionaryRef WKNSURLResponseCreateSerializableRepresentation(NSURLResponse *response, CFTypeRef tokenNull);
381 NSURLResponse *WKNSURLResponseFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
382
383 #ifndef __LP64__
384 ScriptCode WKGetScriptCodeFromCurrentKeyboardInputSource(void);
385 #endif
386
387 #endif
388
389 #if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
390 CFIndex WKGetHyphenationLocationBeforeIndex(CFStringRef string, CFIndex index);
391 #endif
392
393 CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStore(void);
394 void WKCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostArray);    
395
396 CFStringRef WKGetCFURLResponseMIMEType(CFURLResponseRef);
397 CFURLRef WKGetCFURLResponseURL(CFURLResponseRef);
398 CFHTTPMessageRef WKGetCFURLResponseHTTPResponse(CFURLResponseRef);
399 CFStringRef WKCopyCFURLResponseSuggestedFilename(CFURLResponseRef);
400 void WKSetCFURLResponseMIMEType(CFURLResponseRef, CFStringRef mimeType);
401
402 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
403
404 typedef enum {
405     WKSandboxExtensionTypeReadOnly,
406     WKSandboxExtensionTypeWriteOnly,    
407     WKSandboxExtensionTypeReadWrite,
408 } WKSandboxExtensionType;
409 typedef struct __WKSandboxExtension *WKSandboxExtensionRef;
410
411 WKSandboxExtensionRef WKSandboxExtensionCreate(const char* path, WKSandboxExtensionType type);
412 void WKSandboxExtensionDestroy(WKSandboxExtensionRef sandboxExtension);
413
414 bool WKSandboxExtensionConsume(WKSandboxExtensionRef sandboxExtension);
415 bool WKSandboxExtensionInvalidate(WKSandboxExtensionRef sandboxExtension);
416
417 const char* WKSandboxExtensionGetSerializedFormat(WKSandboxExtensionRef sandboxExtension, size_t* length);
418 WKSandboxExtensionRef WKSandboxExtensionCreateFromSerializedFormat(const char* serializationFormat, size_t length);
419
420 typedef struct __WKScrollbarPainter *WKScrollbarPainterRef;
421 typedef struct __WKScrollbarPainterController *WKScrollbarPainterControllerRef;
422
423 WKScrollbarPainterRef WKMakeScrollbarPainter(int controlSize, bool isHorizontal);
424 WKScrollbarPainterRef WKMakeScrollbarReplacementPainter(WKScrollbarPainterRef oldPainter, int newStyle, int controlSize, bool isHorizontal);
425 void WKScrollbarPainterSetDelegate(WKScrollbarPainterRef, id scrollbarPainterDelegate);
426 void WKScrollbarPainterSetEnabled(WKScrollbarPainterRef scrollbarPainter, bool enabled);
427 void WKScrollbarPainterPaint(WKScrollbarPainterRef, bool enabled, double value, CGFloat proportion, CGRect frameRect);
428 void WKScrollbarPainterForceFlashScrollers(WKScrollbarPainterControllerRef);
429 int WKScrollbarThickness(int controlSize);
430 int WKScrollbarMinimumThumbLength(WKScrollbarPainterRef);
431 int WKScrollbarMinimumTotalLengthNeededForThumb(WKScrollbarPainterRef);
432 CGFloat WKScrollbarPainterKnobAlpha(WKScrollbarPainterRef);
433 void WKSetScrollbarPainterKnobAlpha(WKScrollbarPainterRef, CGFloat);
434 CGFloat WKScrollbarPainterTrackAlpha(WKScrollbarPainterRef);
435 void WKSetScrollbarPainterTrackAlpha(WKScrollbarPainterRef, CGFloat);
436 bool WKScrollbarPainterIsHorizontal(WKScrollbarPainterRef);
437 CGRect WKScrollbarPainterKnobRect(WKScrollbarPainterRef);
438 void WKScrollbarPainterSetOverlayState(WKScrollbarPainterRef, int overlayScrollerState);
439
440 // The wk* to WK* renaming does not apply to enums. The way to
441 // circumvent this is to define the enum anonymously twice using
442 // the two prefixes. (See WebCoreSystemInterface.h)
443 enum {
444     WKScrollerKnobStyleDefault = 0,
445     WKScrollerKnobStyleDark = 1,
446     WKScrollerKnobStyleLight = 2
447 };
448 typedef uint32 WKScrollerKnobStyle;
449 void WKSetScrollbarPainterKnobStyle(WKScrollbarPainterRef, WKScrollerKnobStyle);
450
451 WKScrollbarPainterControllerRef WKMakeScrollbarPainterController(id painterControllerDelegate);
452 void WKSetPainterForPainterController(WKScrollbarPainterControllerRef, WKScrollbarPainterRef, bool isHorizontal);
453 WKScrollbarPainterRef WKVerticalScrollbarPainterForController(WKScrollbarPainterControllerRef);
454 WKScrollbarPainterRef WKHorizontalScrollbarPainterForController(WKScrollbarPainterControllerRef);
455 int WKScrollbarPainterControllerStyle(WKScrollbarPainterControllerRef);
456 void WKSetScrollbarPainterControllerStyle(WKScrollbarPainterControllerRef, int newStyle);
457 void WKContentAreaScrolled(WKScrollbarPainterControllerRef);
458 void WKContentAreaWillPaint(WKScrollbarPainterControllerRef);
459 void WKMouseEnteredContentArea(WKScrollbarPainterControllerRef);
460 void WKMouseExitedContentArea(WKScrollbarPainterControllerRef);
461 void WKMouseMovedInContentArea(WKScrollbarPainterControllerRef);
462 void WKWillStartLiveResize(WKScrollbarPainterControllerRef);
463 void WKContentAreaResized(WKScrollbarPainterControllerRef);
464 void WKWillEndLiveResize(WKScrollbarPainterControllerRef);
465 void WKContentAreaDidShow(WKScrollbarPainterControllerRef);
466 void WKContentAreaDidHide(WKScrollbarPainterControllerRef);
467 void WKDidBeginScrollGesture(WKScrollbarPainterControllerRef);
468 void WKDidEndScrollGesture(WKScrollbarPainterControllerRef);
469
470 bool WKScrollbarPainterUsesOverlayScrollers(void);
471
472 bool WKExecutableWasLinkedOnOrBeforeSnowLeopard(void);
473
474 NSRange WKExtractWordDefinitionTokenRangeFromContextualString(NSString *contextString, NSRange range, NSDictionary **options);
475 void WKShowWordDefinitionWindow(NSAttributedString *term, NSPoint screenPoint, NSDictionary *options);
476 void WKHideWordDefinitionWindow(void);
477
478 CFStringRef WKCopyDefaultSearchProviderDisplayName(void);
479
480 NSURL* WKAVAssetResolvedURL(AVAsset*);
481
482 NSCursor *WKCursor(const char *name);
483
484 #endif
485
486 #ifdef __cplusplus
487 }
488 #endif