1563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark/*
2563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    WebKitSystemInterface.h
381bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch    Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
5563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    Public header file.
6563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark*/
7563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
8563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#import <Cocoa/Cocoa.h>
9563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#import <Carbon/Carbon.h>
10563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
11563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark@class QTMovie;
12563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark@class QTMovieView;
13563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
14563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#ifdef __cplusplus
15563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkextern "C" {
16563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#endif
17563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
182bde8e466a4451c7319e3a072d118917957d6554Steve Blocktypedef struct _CFURLResponse* CFURLResponseRef;
192bde8e466a4451c7319e3a072d118917957d6554Steve Block
20563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef enum {
21563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    WKCertificateParseResultSucceeded  = 0,
22563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    WKCertificateParseResultFailed     = 1,
23563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    WKCertificateParseResultPKCS7      = 2,
24563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark} WKCertificateParseResult;
25563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
26563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFStringRef WKCopyCFLocalizationPreferredName(CFStringRef localization);
2781bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKSetDefaultLocalization(CFStringRef localization);
2881bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch
29563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFStringRef WKSignedPublicKeyAndChallengeString(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription);
30563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkWKCertificateParseResult WKAddCertificatesToKeychainFromData(const void *bytes, unsigned length);
31563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
32563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkNSString *WKGetPreferredExtensionForMIMEType(NSString *type);
33563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkNSArray *WKGetExtensionsForMIMEType(NSString *type);
34563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkNSString *WKGetMIMETypeForExtension(NSString *extension);
35563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
36545e470e52f0ac6a3a072bf559c796b42c6066b6Ben MurdochNSDate *WKGetNSURLResponseLastModifiedDate(NSURLResponse *response);
37545e470e52f0ac6a3a072bf559c796b42c6066b6Ben MurdochNSTimeInterval WKGetNSURLResponseFreshnessLifetime(NSURLResponse *response);
38545e470e52f0ac6a3a072bf559c796b42c6066b6Ben MurdochNSString *WKCopyNSURLResponseStatusLine(NSURLResponse *response);
39563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
4068513a70bcd92384395513322f1b801e7bf9c729Steve Block#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
41a94275402997c11dd2e778633dacf4b7e630a35dBen MurdochCFArrayRef WKCopyNSURLResponseCertificateChain(NSURLResponse *response);
4268513a70bcd92384395513322f1b801e7bf9c729Steve Block#endif
4368513a70bcd92384395513322f1b801e7bf9c729Steve Block
44563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFStringEncoding WKGetWebDefaultCFStringEncoding(void);
45563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
46563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKSetMetadataURL(NSString *URLString, NSString *referrer, NSString *path);
47563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKSetNSURLConnectionDefersCallbacks(NSURLConnection *connection, BOOL defers);
48563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
49563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKShowKeyAndMain(void);
50563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#ifndef __LP64__
51563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkOSStatus WKSyncWindowWithCGAfterMove(WindowRef);
52563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkunsigned WKCarbonWindowMask(void);
53563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid *WKGetNativeWindowFromWindowRef(WindowRef);
54563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkOSType WKCarbonWindowPropertyCreator(void);
55563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkOSType WKCarbonWindowPropertyTag(void);
56563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#endif
57563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
58563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef id WKNSURLConnectionDelegateProxyPtr;
59563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
60563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkWKNSURLConnectionDelegateProxyPtr WKCreateNSURLConnectionDelegateProxy(void);
61563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
62563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKDisableCGDeferredUpdates(void);
63563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
64563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkClass WKNSURLProtocolClassForRequest(NSURLRequest *request);
65563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKSetNSURLRequestShouldContentSniff(NSMutableURLRequest *request, BOOL shouldContentSniff);
66563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
67e14391e94c850b8bd03680c23b38978db68687a8John Reckvoid WKSetCookieStoragePrivateBrowsingEnabled(BOOL enabled);
68e14391e94c850b8bd03680c23b38978db68687a8John Reck
69563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkunsigned WKGetNSAutoreleasePoolCount(void);
70563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
71563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKAdvanceDefaultButtonPulseAnimation(NSButtonCell *button);
72563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
73563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkNSString *WKMouseMovedNotification(void);
74563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkNSString *WKWindowWillOrderOnScreenNotification(void);
752bde8e466a4451c7319e3a072d118917957d6554Steve BlockNSString *WKWindowWillOrderOffScreenNotification(void);
76563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKSetNSWindowShouldPostEventNotifications(NSWindow *window, BOOL post);
77563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
78563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFTypeID WKGetAXTextMarkerTypeID(void);
79563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFTypeID WKGetAXTextMarkerRangeTypeID(void);
80563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFTypeRef WKCreateAXTextMarker(const void *bytes, size_t len);
81563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkBOOL WKGetBytesFromAXTextMarker(CFTypeRef textMarker, void *bytes, size_t length);
82563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFTypeRef WKCreateAXTextMarkerRange(CFTypeRef start, CFTypeRef end);
83563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFTypeRef WKCopyAXTextMarkerRangeStart(CFTypeRef range);
84563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFTypeRef WKCopyAXTextMarkerRangeEnd(CFTypeRef range);
85563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKAccessibilityHandleFocusChanged(void);
86563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkAXUIElementRef WKCreateAXUIElementRef(id element);
87563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKUnregisterUniqueIdForElement(id element);
88563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
89cad810f21b803229eb11403f9209855525a25d57Steve Block
90cad810f21b803229eb11403f9209855525a25d57Steve Block#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
91cad810f21b803229eb11403f9209855525a25d57Steve Block// Remote Accessibility API.
92cad810f21b803229eb11403f9209855525a25d57Steve Blockvoid WKAXRegisterRemoteApp(void);
93cad810f21b803229eb11403f9209855525a25d57Steve Blockvoid WKAXInitializeElementWithPresenterPid(id, pid_t);
9481bc750723a18f21cd17d1b173cd2a4dda9cea6eBen MurdochNSData *WKAXRemoteTokenForElement(id);
9581bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochid WKAXRemoteElementForToken(NSData *);
9681bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKAXSetWindowForRemoteElement(id remoteWindow, id remoteElement);
9781bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKAXRegisterRemoteProcess(bool registerProcess, pid_t);
9881bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochpid_t WKAXRemoteProcessIdentifier(id remoteElement);
99cad810f21b803229eb11403f9209855525a25d57Steve Block#endif
100cad810f21b803229eb11403f9209855525a25d57Steve Block
101563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKSetUpFontCache(void);
102563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
103563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKSignalCFReadStreamEnd(CFReadStreamRef stream);
104563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKSignalCFReadStreamHasBytes(CFReadStreamRef stream);
105563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKSignalCFReadStreamError(CFReadStreamRef stream, CFStreamError *error);
106563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
107563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFReadStreamRef WKCreateCustomCFReadStream(void *(*formCreate)(CFReadStreamRef, void *),
108563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    void (*formFinalize)(CFReadStreamRef, void *),
109563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *),
110563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *),
111563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    Boolean (*formCanRead)(CFReadStreamRef, void *),
112563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    void (*formClose)(CFReadStreamRef, void *),
113563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
114563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
115563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    void *context);
116563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
117563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKDrawCapsLockIndicator(CGContextRef, CGRect);
118563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
119563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKDrawFocusRing(CGContextRef context, CGColorRef color, int radius);
120563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    // The CG context's current path is the focus ring's path.
121563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    // A color of 0 means "use system focus ring color".
122563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    // A radius of 0 means "use default focus ring radius".
123563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
124563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKSetDragImage(NSImage *image, NSPoint offset);
125563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
126563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKDrawBezeledTextFieldCell(NSRect, BOOL enabled);
127563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKDrawTextFieldCellFocusRing(NSTextFieldCell*, NSRect);
128563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKDrawBezeledTextArea(NSRect, BOOL enabled);
129563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKPopupMenu(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
130ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddbBen Murdochvoid WKPopupContextMenu(NSMenu *menu, NSPoint screenLocation);
131563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKSendUserChangeNotifications(void);
132563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#ifndef __LP64__
133563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkBOOL WKConvertNSEventToCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent);
134563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKSendKeyEventToTSM(NSEvent *theEvent);
135563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKCallDrawingNotification(CGrafPtr port, Rect *bounds);
136563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#endif
137563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
138563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkBOOL WKGetGlyphTransformedAdvances(CGFontRef, NSFont*, CGAffineTransform *m, ATSGlyphRef *glyph, CGSize *advance);
139563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkNSFont *WKGetFontInLanguageForRange(NSFont *font, NSString *string, NSRange range);
140563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkNSFont *WKGetFontInLanguageForCharacter(NSFont *font, UniChar ch);
141563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKSetCGFontRenderingMode(CGContextRef cgContext, NSFont *font);
142563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkBOOL WKCGContextGetShouldSmoothFonts(CGContextRef cgContext);
143563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
144563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#ifdef BUILDING_ON_TIGER
145563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark// CGFontGetAscent, CGFontGetDescent, CGFontGetLeading and CGFontGetUnitsPerEm were not available until Leopard
146563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKGetFontMetrics(CGFontRef font, int *ascent, int *descent, int *lineGap, unsigned *unitsPerEm);
147563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark// CTFontCopyGraphicsFont was not available until Leopard
148563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCGFontRef WKGetCGFontFromNSFont(NSFont *font);
149563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark// CTFontGetPlatformFont was not available until Leopard
150563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkATSUFontID WKGetNSFontATSUFontId(NSFont *font);
151563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark// CGFontCopyFullName was not available until Leopard
152563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFStringRef WKCopyFullFontName(CGFontRef font);
153563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#endif
154563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
155563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKSetPatternBaseCTM(CGContextRef, CGAffineTransform);
156563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKSetPatternPhaseInUserSpace(CGContextRef, CGPoint);
157d0825bca7fe65beaee391d30da42e937db621564Steve BlockCGAffineTransform WKGetUserToBaseCTM(CGContextRef);
158563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
159563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#ifndef BUILDING_ON_TIGER
160563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKGetGlyphsForCharacters(CGFontRef, const UniChar[], CGGlyph[], size_t);
161563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#else
162563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef void *WKGlyphVectorRef;
163f05b935882198ccf7d81675736e3aeb089c5113aBen MurdochOSStatus WKConvertCharToGlyphs(void *styleGroup, const UniChar* characters, unsigned numCharacters, WKGlyphVectorRef glyphs);
164563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkOSStatus WKGetATSStyleGroup(ATSUStyle fontStyle, void **styleGroup);
165563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKReleaseStyleGroup(void *group);
166563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkOSStatus WKInitializeGlyphVector(int count, WKGlyphVectorRef glyphs);
167563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKClearGlyphVector(WKGlyphVectorRef glyphs);
168563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
169563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkint WKGetGlyphVectorNumGlyphs(WKGlyphVectorRef glyphVector);
170563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkATSLayoutRecord *WKGetGlyphVectorFirstRecord(WKGlyphVectorRef glyphVector);
171563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarksize_t WKGetGlyphVectorRecordSize(WKGlyphVectorRef glyphVector);
172563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#endif
173563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
174e14391e94c850b8bd03680c23b38978db68687a8John ReckCTLineRef WKCreateCTLineWithUniCharProvider(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
175e14391e94c850b8bd03680c23b38978db68687a8John Reck#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
176e14391e94c850b8bd03680c23b38978db68687a8John ReckCTTypesetterRef WKCreateCTTypesetterWithUniCharProviderAndOptions(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
177f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch
178f05b935882198ccf7d81675736e3aeb089c5113aBen MurdochCGContextRef WKIOSurfaceContextCreate(IOSurfaceRef, unsigned width, unsigned height, CGColorSpaceRef);
179f05b935882198ccf7d81675736e3aeb089c5113aBen MurdochCGImageRef WKIOSurfaceContextCreateImage(CGContextRef context);
180e14391e94c850b8bd03680c23b38978db68687a8John Reck#endif
181e14391e94c850b8bd03680c23b38978db68687a8John Reck
182563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#ifndef __LP64__
183563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkNSEvent *WKCreateNSEventWithCarbonEvent(EventRef eventRef);
184563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkNSEvent *WKCreateNSEventWithCarbonMouseMoveEvent(EventRef inEvent, NSWindow *window);
185563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkNSEvent *WKCreateNSEventWithCarbonClickEvent(EventRef inEvent, WindowRef windowRef);
186563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#endif
187563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
188563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCGContextRef WKNSWindowOverrideCGContext(NSWindow *, CGContextRef);
189563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKNSWindowRestoreCGContext(NSWindow *, CGContextRef);
190563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
191563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKNSWindowMakeBottomCornersSquare(NSWindow *);
192563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
193563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark// These constants match the ones used by ThemeScrollbarArrowStyle (some of the values are private, so we can't just
194563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark// use that enum directly).
195563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef enum {
196563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    WKThemeScrollBarArrowsSingle     = 0,
197563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    WKThemeScrollBarArrowsLowerRight = 1,
198563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    WKThemeScrollBarArrowsDouble     = 2,
199563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    WKThemeScrollBarArrowsUpperLeft  = 3,
200563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark} WKThemeScrollBarArrowStyle;
201563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
202563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkOSStatus WKThemeDrawTrack(const HIThemeTrackDrawInfo* inDrawInfo, CGContextRef inContext, int inArrowStyle);
203563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
204563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#ifdef BUILDING_ON_TIGER
205563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark// WKSupportsMultipartXMixedReplace is not required on Leopard as multipart/x-mixed-replace is always handled by NSURLRequest
206563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkBOOL WKSupportsMultipartXMixedReplace(NSMutableURLRequest *request);
207563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#endif
208563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
209563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkBOOL WKCGContextIsBitmapContext(CGContextRef context);
210563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
211545e470e52f0ac6a3a072bf559c796b42c6066b6Ben Murdochvoid WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, BOOL *continuous);
212563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
213563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkBOOL WKAppVersionCheckLessThan(NSString *, int, double);
214563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
2150bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochtypedef enum {
2160bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch    WKMovieTypeUnknown,
2170bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch    WKMovieTypeDownload,
2180bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch    WKMovieTypeStoredStream,
2190bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch    WKMovieTypeLiveStream
2200bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch} WKMovieType;
2210bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch
2220bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochint WKQTMovieGetType(QTMovie* movie);
2230bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch
224643ca7872b450ea4efacab6188849e5aac2ba161Steve BlockBOOL WKQTMovieHasClosedCaptions(QTMovie* movie);
225643ca7872b450ea4efacab6188849e5aac2ba161Steve Blockvoid WKQTMovieSetShowClosedCaptions(QTMovie* movie, BOOL showClosedCaptions);
226dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Blockvoid WKQTMovieSelectPreferredAlternates(QTMovie* movie);
227dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Blockvoid WKQTMovieSelectPreferredAlternateTrackForMediaType(QTMovie* movie, NSString* mediaType);
228643ca7872b450ea4efacab6188849e5aac2ba161Steve Block
2290bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochunsigned WKQTIncludeOnlyModernMediaFileTypes(void);
230563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkint WKQTMovieDataRate(QTMovie* movie);
231563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkfloat WKQTMovieMaxTimeLoaded(QTMovie* movie);
2320bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochfloat WKQTMovieMaxTimeSeekable(QTMovie* movie);
2330bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben MurdochNSString *WKQTMovieMaxTimeLoadedChangeNotification(void);
234563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKQTMovieViewSetDrawSynchronously(QTMovieView* view, BOOL sync);
2355ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid WKQTMovieDisableComponent(uint32_t[5]);
236563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
237563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFStringRef WKCopyFoundationCacheDirectory(void);
238563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
23981bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochtypedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
24081bc750723a18f21cd17d1b173cd2a4dda9cea6eBen MurdochCFURLStorageSessionRef WKCreatePrivateStorageSession(CFStringRef);
24181bc750723a18f21cd17d1b173cd2a4dda9cea6eBen MurdochNSURLRequest *WKCopyRequestWithStorageSession(CFURLStorageSessionRef, NSURLRequest*);
24281bc750723a18f21cd17d1b173cd2a4dda9cea6eBen MurdochNSCachedURLResponse *WKCachedResponseForRequest(CFURLStorageSessionRef, NSURLRequest*);
24381bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch
24481bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochtypedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
2452bde8e466a4451c7319e3a072d118917957d6554Steve BlockCFHTTPCookieStorageRef WKCopyHTTPCookieStorage(CFURLStorageSessionRef);
24681bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochunsigned WKGetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef);
24781bc750723a18f21cd17d1b173cd2a4dda9cea6eBen MurdochNSArray *WKHTTPCookiesForURL(CFHTTPCookieStorageRef, NSURL *);
24881bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKSetHTTPCookiesForURL(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
24981bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKDeleteHTTPCookie(CFHTTPCookieStorageRef, NSHTTPCookie *);
25081bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch
25168513a70bcd92384395513322f1b801e7bf9c729Steve Blockvoid WKSetVisibleApplicationName(CFStringRef);
25268513a70bcd92384395513322f1b801e7bf9c729Steve Block
253563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef enum {
254563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    WKMediaUIPartFullscreenButton   = 0,
2550bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch    WKMediaUIPartMuteButton,
2560bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch    WKMediaUIPartPlayButton,
2570bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch    WKMediaUIPartSeekBackButton,
2580bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch    WKMediaUIPartSeekForwardButton,
259dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch    WKMediaUIPartTimelineSlider,
260dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch    WKMediaUIPartTimelineSliderThumb,
2610bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch    WKMediaUIPartRewindButton,
2620bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch    WKMediaUIPartSeekToRealtimeButton,
263643ca7872b450ea4efacab6188849e5aac2ba161Steve Block    WKMediaUIPartShowClosedCaptionsButton,
264643ca7872b450ea4efacab6188849e5aac2ba161Steve Block    WKMediaUIPartHideClosedCaptionsButton,
2650bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch    WKMediaUIPartUnMuteButton,
2660bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch    WKMediaUIPartPauseButton,
2670bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch    WKMediaUIPartBackground,
2680bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch    WKMediaUIPartCurrentTimeDisplay,
269dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch    WKMediaUIPartTimeRemainingDisplay,
270dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch    WKMediaUIPartStatusDisplay,
271dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch    WKMediaUIPartControlsPanel,
272dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch    WKMediaUIPartVolumeSliderContainer,
273dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch    WKMediaUIPartVolumeSlider,
274dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch    WKMediaUIPartVolumeSliderThumb
275563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark} WKMediaUIPart;
276563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
277563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef enum {
278563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    WKMediaControllerThemeClassic   = 1,
279231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block    WKMediaControllerThemeQuickTime = 2
280563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark} WKMediaControllerThemeStyle;
281563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
2820bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochtypedef enum {
2830bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch    WKMediaControllerFlagDisabled = 1 << 0,
2840bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch    WKMediaControllerFlagPressed = 1 << 1,
2850bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch    WKMediaControllerFlagDrawEndCaps = 1 << 3,
286d0825bca7fe65beaee391d30da42e937db621564Steve Block    WKMediaControllerFlagFocused = 1 << 4
2870bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch} WKMediaControllerThemeState;
2880bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch
289643ca7872b450ea4efacab6188849e5aac2ba161Steve BlockBOOL WKMediaControllerThemeAvailable(int themeStyle);
290563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkBOOL WKHitTestMediaUIPart(int part, int themeStyle, CGRect bounds, CGPoint point);
291563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKMeasureMediaUIPart(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
2920bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochvoid WKDrawMediaUIPart(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
2930bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochvoid WKDrawMediaSliderTrack(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
294231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve BlockNSView *WKCreateMediaUIBackgroundView(void);
295231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block
296231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Blocktypedef enum {
297231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block    WKMediaUIControlTimeline,
298231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block    WKMediaUIControlSlider,
299231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block    WKMediaUIControlPlayPauseButton,
300231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block    WKMediaUIControlExitFullscreenButton,
301231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block    WKMediaUIControlRewindButton,
302231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block    WKMediaUIControlFastForwardButton,
303231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block    WKMediaUIControlVolumeUpButton,
304231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block    WKMediaUIControlVolumeDownButton
305231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block} WKMediaUIControlType;
306231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block
307231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve BlockNSControl *WKCreateMediaUIControl(int controlType);
308563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
309ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24Steve Block#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
310563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkmach_port_t WKInitializeRenderServer(void);
311563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
312563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark@class CALayer;
313563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
314563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCALayer *WKMakeRenderLayer(uint32_t contextID);
315563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
316563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct __WKSoftwareCARendererRef *WKSoftwareCARendererRef;
317563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
318563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkWKSoftwareCARendererRef WKSoftwareCARendererCreate(uint32_t contextID);
319563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKSoftwareCARendererDestroy(WKSoftwareCARendererRef);
320563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKSoftwareCARendererRender(WKSoftwareCARendererRef, CGContextRef, CGRect);
321563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
32206ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsentypedef struct __WKCARemoteLayerClientRef *WKCARemoteLayerClientRef;
32306ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen
32406ea8e899e48f1f2f396b70e63fae369f2f23232Kristian MonsenWKCARemoteLayerClientRef WKCARemoteLayerClientMakeWithServerPort(mach_port_t port);
32506ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsenvoid WKCARemoteLayerClientInvalidate(WKCARemoteLayerClientRef);
32606ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsenuint32_t WKCARemoteLayerClientGetClientId(WKCARemoteLayerClientRef);
32706ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsenvoid WKCARemoteLayerClientSetLayer(WKCARemoteLayerClientRef, CALayer *);
32806ea8e899e48f1f2f396b70e63fae369f2f23232Kristian MonsenCALayer *WKCARemoteLayerClientGetLayer(WKCARemoteLayerClientRef);
32906ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen
3302fc2651226baac27029e38c9d6ef883fa32084dbSteve Block@class CARenderer;
3312fc2651226baac27029e38c9d6ef883fa32084dbSteve Block
3322fc2651226baac27029e38c9d6ef883fa32084dbSteve Blockvoid WKCARendererAddChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
3332fc2651226baac27029e38c9d6ef883fa32084dbSteve Blockvoid WKCARendererRemoveChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
3342fc2651226baac27029e38c9d6ef883fa32084dbSteve Block
335e14391e94c850b8bd03680c23b38978db68687a8John Recktypedef struct __WKWindowBounceAnimationContext *WKWindowBounceAnimationContextRef;
336e14391e94c850b8bd03680c23b38978db68687a8John Reck
337e14391e94c850b8bd03680c23b38978db68687a8John ReckWKWindowBounceAnimationContextRef WKWindowBounceAnimationContextCreate(NSWindow *window);
338e14391e94c850b8bd03680c23b38978db68687a8John Reckvoid WKWindowBounceAnimationContextDestroy(WKWindowBounceAnimationContextRef context);
339e14391e94c850b8bd03680c23b38978db68687a8John Reckvoid WKWindowBounceAnimationSetAnimationProgress(WKWindowBounceAnimationContextRef context, double animationProgress);
340e14391e94c850b8bd03680c23b38978db68687a8John Reck
341ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24Steve Block#if defined(__x86_64__)
342563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#import <mach/mig.h>
343563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFRunLoopSourceRef WKCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t serverPort);
344f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#endif // defined(__x86_64__)
345563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
3460bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben MurdochNSUInteger WKGetInputPanelWindowStyle(void);
3470bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben MurdochUInt8 WKGetNSEventKeyChar(NSEvent *);
348ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24Steve Block#endif // !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
349563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
350563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark@class CAPropertyAnimation;
351563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid WKSetCAAnimationValueFunction(CAPropertyAnimation*, NSString* function);
352563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
3530bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochunsigned WKInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
3542fc2651226baac27029e38c9d6ef883fa32084dbSteve Blockint WKGetHTTPPipeliningPriority(NSURLRequest *);
3552daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdochvoid WKSetHTTPPipeliningMaximumPriority(int maximumPriority);
3562fc2651226baac27029e38c9d6ef883fa32084dbSteve Blockvoid WKSetHTTPPipeliningPriority(NSMutableURLRequest *, int priority);
3572daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdochvoid WKSetHTTPPipeliningMinimumFastLanePriority(int priority);
3580bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch
359643ca7872b450ea4efacab6188849e5aac2ba161Steve Blockvoid WKSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
360643ca7872b450ea4efacab6188849e5aac2ba161Steve Blockvoid WKSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
361643ca7872b450ea4efacab6188849e5aac2ba161Steve BlockCFHTTPMessageRef WKCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL);
362643ca7872b450ea4efacab6188849e5aac2ba161Steve Block
3632daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
3642daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdochtypedef enum {
3652daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch    WKEventPhaseNone = 0,
3662daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch    WKEventPhaseBegan = 1,
3672daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch    WKEventPhaseChanged = 2,
3682daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch    WKEventPhaseEnded = 3,
3692daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch} WKEventPhase;
3702daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch
3712daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdochint WKGetNSEventMomentumPhase(NSEvent *);
3722daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch#endif
373231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block
374231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block#ifndef BUILDING_ON_TIGER
375231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Blockvoid WKWindowSetAlpha(NSWindow *window, float alphaValue);
376231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Blockvoid WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame);
377231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block#endif
378d0825bca7fe65beaee391d30da42e937db621564Steve Block
379d0825bca7fe65beaee391d30da42e937db621564Steve Block#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
380dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Blockvoid WKSyncSurfaceToView(NSView *view);
381f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch
382f05b935882198ccf7d81675736e3aeb089c5113aBen Murdochvoid WKEnableSettingCursorWhenInBackground(void);
383f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch
384f05b935882198ccf7d81675736e3aeb089c5113aBen MurdochCFDictionaryRef WKNSURLRequestCreateSerializableRepresentation(NSURLRequest *request, CFTypeRef tokenNull);
385f05b935882198ccf7d81675736e3aeb089c5113aBen MurdochNSURLRequest *WKNSURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
386f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch
387f05b935882198ccf7d81675736e3aeb089c5113aBen MurdochCFDictionaryRef WKNSURLResponseCreateSerializableRepresentation(NSURLResponse *response, CFTypeRef tokenNull);
388f05b935882198ccf7d81675736e3aeb089c5113aBen MurdochNSURLResponse *WKNSURLResponseFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
389f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch
390f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#ifndef __LP64__
391f05b935882198ccf7d81675736e3aeb089c5113aBen MurdochScriptCode WKGetScriptCodeFromCurrentKeyboardInputSource(void);
392f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#endif
393f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch
394d0825bca7fe65beaee391d30da42e937db621564Steve Block#endif
395d0825bca7fe65beaee391d30da42e937db621564Steve Block
39606ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
39706ea8e899e48f1f2f396b70e63fae369f2f23232Kristian MonsenCFIndex WKGetHyphenationLocationBeforeIndex(CFStringRef string, CFIndex index);
39806ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen#endif
39906ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen
40081bc750723a18f21cd17d1b173cd2a4dda9cea6eBen MurdochCFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStore(void);
40181bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostArray);
40281bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch
4032bde8e466a4451c7319e3a072d118917957d6554Steve BlockCFStringRef WKGetCFURLResponseMIMEType(CFURLResponseRef);
4042bde8e466a4451c7319e3a072d118917957d6554Steve BlockCFURLRef WKGetCFURLResponseURL(CFURLResponseRef);
4052bde8e466a4451c7319e3a072d118917957d6554Steve BlockCFHTTPMessageRef WKGetCFURLResponseHTTPResponse(CFURLResponseRef);
4062bde8e466a4451c7319e3a072d118917957d6554Steve BlockCFStringRef WKCopyCFURLResponseSuggestedFilename(CFURLResponseRef);
4072bde8e466a4451c7319e3a072d118917957d6554Steve Blockvoid WKSetCFURLResponseMIMEType(CFURLResponseRef, CFStringRef mimeType);
4082bde8e466a4451c7319e3a072d118917957d6554Steve Block
409f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
410f05b935882198ccf7d81675736e3aeb089c5113aBen Murdochtypedef enum {
411f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    WKSandboxExtensionTypeReadOnly,
412f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    WKSandboxExtensionTypeWriteOnly,
413f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    WKSandboxExtensionTypeReadWrite,
414f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch} WKSandboxExtensionType;
415f05b935882198ccf7d81675736e3aeb089c5113aBen Murdochtypedef struct __WKSandboxExtension *WKSandboxExtensionRef;
416f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch
417f05b935882198ccf7d81675736e3aeb089c5113aBen MurdochWKSandboxExtensionRef WKSandboxExtensionCreate(const char* path, WKSandboxExtensionType type);
418f05b935882198ccf7d81675736e3aeb089c5113aBen Murdochvoid WKSandboxExtensionDestroy(WKSandboxExtensionRef sandboxExtension);
419f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch
420f05b935882198ccf7d81675736e3aeb089c5113aBen Murdochbool WKSandboxExtensionConsume(WKSandboxExtensionRef sandboxExtension);
421f05b935882198ccf7d81675736e3aeb089c5113aBen Murdochbool WKSandboxExtensionInvalidate(WKSandboxExtensionRef sandboxExtension);
422f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch
423f05b935882198ccf7d81675736e3aeb089c5113aBen Murdochconst char* WKSandboxExtensionGetSerializedFormat(WKSandboxExtensionRef sandboxExtension, size_t* length);
424f05b935882198ccf7d81675736e3aeb089c5113aBen MurdochWKSandboxExtensionRef WKSandboxExtensionCreateFromSerializedFormat(const char* serializationFormat, size_t length);
425f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch
4262fc2651226baac27029e38c9d6ef883fa32084dbSteve Blocktypedef struct __WKScrollbarPainter *WKScrollbarPainterRef;
4272bde8e466a4451c7319e3a072d118917957d6554Steve Blocktypedef struct __WKScrollbarPainterController *WKScrollbarPainterControllerRef;
4282bde8e466a4451c7319e3a072d118917957d6554Steve Block
4292fc2651226baac27029e38c9d6ef883fa32084dbSteve BlockWKScrollbarPainterRef WKMakeScrollbarPainter(int controlSize, bool isHorizontal);
43081bc750723a18f21cd17d1b173cd2a4dda9cea6eBen MurdochWKScrollbarPainterRef WKMakeScrollbarReplacementPainter(WKScrollbarPainterRef oldPainter, int newStyle, int controlSize, bool isHorizontal);
43181bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKScrollbarPainterSetDelegate(WKScrollbarPainterRef, id scrollbarPainterDelegate);
4322fc2651226baac27029e38c9d6ef883fa32084dbSteve Blockvoid WKScrollbarPainterPaint(WKScrollbarPainterRef, bool enabled, double value, CGFloat proportion, CGRect frameRect);
4332bde8e466a4451c7319e3a072d118917957d6554Steve Blockvoid WKScrollbarPainterForceFlashScrollers(WKScrollbarPainterControllerRef);
4342fc2651226baac27029e38c9d6ef883fa32084dbSteve Blockint WKScrollbarThickness(int controlSize);
4352fc2651226baac27029e38c9d6ef883fa32084dbSteve Blockint WKScrollbarMinimumThumbLength(WKScrollbarPainterRef);
4362fc2651226baac27029e38c9d6ef883fa32084dbSteve Blockint WKScrollbarMinimumTotalLengthNeededForThumb(WKScrollbarPainterRef);
43781bc750723a18f21cd17d1b173cd2a4dda9cea6eBen MurdochCGFloat WKScrollbarPainterKnobAlpha(WKScrollbarPainterRef);
43881bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKSetScrollbarPainterKnobAlpha(WKScrollbarPainterRef, CGFloat);
43981bc750723a18f21cd17d1b173cd2a4dda9cea6eBen MurdochCGFloat WKScrollbarPainterTrackAlpha(WKScrollbarPainterRef);
44081bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKSetScrollbarPainterTrackAlpha(WKScrollbarPainterRef, CGFloat);
44181bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochbool WKScrollbarPainterIsHorizontal(WKScrollbarPainterRef);
44281bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKScrollbarPainterSetOverlayState(WKScrollbarPainterRef, int overlayScrollerState);
44381bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch
44481bc750723a18f21cd17d1b173cd2a4dda9cea6eBen MurdochWKScrollbarPainterControllerRef WKMakeScrollbarPainterController(id painterControllerDelegate);
44581bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKSetPainterForPainterController(WKScrollbarPainterControllerRef, WKScrollbarPainterRef, bool isHorizontal);
44681bc750723a18f21cd17d1b173cd2a4dda9cea6eBen MurdochWKScrollbarPainterRef WKVerticalScrollbarPainterForController(WKScrollbarPainterControllerRef);
44781bc750723a18f21cd17d1b173cd2a4dda9cea6eBen MurdochWKScrollbarPainterRef WKHorizontalScrollbarPainterForController(WKScrollbarPainterControllerRef);
44881bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKSetScrollbarPainterControllerStyle(WKScrollbarPainterControllerRef, int newStyle);
44981bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKContentAreaScrolled(WKScrollbarPainterControllerRef);
45081bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKContentAreaWillPaint(WKScrollbarPainterControllerRef);
45181bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKMouseEnteredContentArea(WKScrollbarPainterControllerRef);
45281bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKMouseExitedContentArea(WKScrollbarPainterControllerRef);
45381bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKMouseMovedInContentArea(WKScrollbarPainterControllerRef);
45481bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKWillStartLiveResize(WKScrollbarPainterControllerRef);
45581bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKContentAreaResized(WKScrollbarPainterControllerRef);
45681bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKWillEndLiveResize(WKScrollbarPainterControllerRef);
45781bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKContentAreaDidShow(WKScrollbarPainterControllerRef);
45881bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid WKContentAreaDidHide(WKScrollbarPainterControllerRef);
45981bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch
46081bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochbool WKScrollbarPainterUsesOverlayScrollers(void);
4612fc2651226baac27029e38c9d6ef883fa32084dbSteve Block
4622daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben MurdochNSRange WKExtractWordDefinitionTokenRangeFromContextualString(NSString *contextString, NSRange range, NSDictionary **options);
4632daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdochvoid WKShowWordDefinitionWindow(NSAttributedString *term, NSPoint screenPoint, NSDictionary *options);
4642daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdochvoid WKHideWordDefinitionWindow(void);
4652daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch
466f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#endif
467f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch
468563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#ifdef __cplusplus
469563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark}
470563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#endif
471