1563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark/*
2563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * Copyright (C) 2007, 2008, 2009 Apple Inc.  All rights reserved.
3563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark *
4563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * Redistribution and use in source and binary forms, with or without
5563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * modification, are permitted provided that the following conditions
6563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * are met:
7563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * 1. Redistributions of source code must retain the above copyright
8563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark *    notice, this list of conditions and the following disclaimer.
9563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * 2. Redistributions in binary form must reproduce the above copyright
10563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark *    notice, this list of conditions and the following disclaimer in the
11563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark *    documentation and/or other materials provided with the distribution.
12563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark *
13563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark */
25563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
26563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#ifndef WebKitSystemInterface_h
27563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#define WebKitSystemInterface_h
28563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
29563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkstruct CGAffineTransform;
30563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkstruct CGPoint;
3168513a70bcd92384395513322f1b801e7bf9c729Steve Blockstruct CGRect;
32563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkstruct CGSize;
33a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochstruct IDirect3DDevice9;
34a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochstruct WKCACFContext;
35a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochstruct WKCACFUpdateRectEnumerator;
36563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
37a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef struct _CACFLayer* CACFLayerRef;
382fc2651226baac27029e38c9d6ef883fa32084dbSteve Blocktypedef const struct __CFArray* CFArrayRef;
39563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef const struct __CFData* CFDataRef;
40563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef const struct __CFString* CFStringRef;
41a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef double CFTimeInterval;
42563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct CGColor* CGColorRef;
43563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct CGContext* CGContextRef;
44563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef unsigned short CGFontIndex;
45563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct CGFont* CGFontRef;
46563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef CGFontIndex CGGlyph;
47563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef wchar_t UChar;
48563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct _CFURLResponse* CFURLResponseRef;
49563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct OpaqueCFHTTPCookieStorage*  CFHTTPCookieStorageRef;
502fc2651226baac27029e38c9d6ef883fa32084dbSteve Blocktypedef struct __CFDictionary* CFMutableDictionaryRef;
51563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct _CFURLRequest* CFMutableURLRequestRef;
52563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef const struct _CFURLRequest* CFURLRequestRef;
53643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef struct __CFHTTPMessage* CFHTTPMessageRef;
54643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef const struct __CFNumber* CFNumberRef;
55643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef struct __CFReadStream* CFReadStreamRef;
56643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef const struct __CFURL* CFURLRef;
57643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
58692e5dbf12901edacf14812a6fae25462920af42Steve Blocktypedef struct tagLOGFONTW LOGFONTW;
59692e5dbf12901edacf14812a6fae25462920af42Steve Blocktypedef LOGFONTW LOGFONT;
60a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef struct _CACFLayer *CACFLayerRef;
61a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef struct __CVBuffer *CVBufferRef;
62a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef CVBufferRef CVImageBufferRef;
63a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef CVImageBufferRef CVPixelBufferRef;
64a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef struct _CAImageQueue *CAImageQueueRef;
65a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef unsigned long CFTypeID;
66a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef struct _CFURLCredential* WKCFURLCredentialRef;
6781bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochtypedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
6881bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochtypedef const struct _CFURLCache* CFURLCacheRef;
69563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
70563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetFontSmoothingLevel(int type);
71563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkint wkGetFontSmoothingLevel();
72563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetFontSmoothingContrast(CGFloat);
73563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCGFloat wkGetFontSmoothingContrast();
74692e5dbf12901edacf14812a6fae25462920af42Steve Blockvoid wkSystemFontSmoothingChanged();
75563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkuint32_t wkSetFontSmoothingStyle(CGContextRef cg, bool fontAllowsSmoothing);
76563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkRestoreFontSmoothingStyle(CGContextRef cg, uint32_t oldStyle);
77563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetCGContextFontRenderingStyle(CGContextRef, bool isSystemFont, bool isPrinterFont, bool usePlatformNativeGlyphs);
78563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkGetGlyphAdvances(CGFontRef, const CGAffineTransform&, bool isSystemFont, bool isPrinterFont, CGGlyph, CGSize& advance);
79563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkGetGlyphs(CGFontRef, const UChar[], CGGlyph[], size_t count);
80563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetUpFontCache(size_t s);
81563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
82563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetPatternBaseCTM(CGContextRef, CGAffineTransform);
83563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetPatternPhaseInUserSpace(CGContextRef, CGPoint phasePoint);
84d0825bca7fe65beaee391d30da42e937db621564Steve BlockCGAffineTransform wkGetUserToBaseCTM(CGContextRef);
85563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
86563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkDrawFocusRing(CGContextRef, CGColorRef, float radius);
87563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
88563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFDictionaryRef wkGetSSLCertificateInfo(CFURLResponseRef);
892bde8e466a4451c7319e3a072d118917957d6554Steve BlockCFDataRef wkGetSSLPeerCertificateData(CFDictionaryRef);
902bde8e466a4451c7319e3a072d118917957d6554Steve Blockvoid* wkGetSSLPeerCertificateDataBytePtr(CFDictionaryRef);
912bde8e466a4451c7319e3a072d118917957d6554Steve Blockvoid wkSetSSLPeerCertificateData(CFMutableDictionaryRef, CFDataRef);
92a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid* wkGetSSLCertificateChainContext(CFDictionaryRef);
93563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFHTTPCookieStorageRef wkGetDefaultHTTPCookieStorage();
942bde8e466a4451c7319e3a072d118917957d6554Steve BlockCFHTTPCookieStorageRef wkCreateInMemoryHTTPCookieStorage();
95563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool);
96563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFStringRef wkCopyFoundationCacheDirectory();
97563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetClientCertificateInSSLProperties(CFMutableDictionaryRef, CFDataRef);
98563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
99563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFArrayRef wkCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef);
100563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts);
101563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
10281bc750723a18f21cd17d1b173cd2a4dda9cea6eBen MurdochCFURLStorageSessionRef wkCreatePrivateStorageSession(CFStringRef identifier);
10381bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid wkSetRequestStorageSession(CFURLStorageSessionRef, CFMutableURLRequestRef);
10481bc750723a18f21cd17d1b173cd2a4dda9cea6eBen MurdochCFURLCacheRef wkCopyURLCache(CFURLStorageSessionRef);
1052bde8e466a4451c7319e3a072d118917957d6554Steve BlockCFHTTPCookieStorageRef wkCopyHTTPCookieStorage(CFURLStorageSessionRef);
10681bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch
10781bc750723a18f21cd17d1b173cd2a4dda9cea6eBen MurdochCFArrayRef wkCFURLCacheCopyAllHostNamesInPersistentStore();
10881bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdochvoid wkCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostNames);
10981bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch
1100bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochunsigned wkInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
1110bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch
112643ca7872b450ea4efacab6188849e5aac2ba161Steve Blockvoid wkSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
113643ca7872b450ea4efacab6188849e5aac2ba161Steve Blockvoid wkSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
114643ca7872b450ea4efacab6188849e5aac2ba161Steve BlockCFHTTPMessageRef wkCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL);
115643ca7872b450ea4efacab6188849e5aac2ba161Steve Block
116a94275402997c11dd2e778633dacf4b7e630a35dBen MurdochWKCFURLCredentialRef wkCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef protectionSpace);
117643ca7872b450ea4efacab6188849e5aac2ba161Steve Block
1180bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben MurdochCFStringRef wkCFNetworkErrorGetLocalizedDescription(CFIndex errorCode);
1190bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch
120a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
121a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochenum wkCAImageQueueFlags {
122a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueAsync = 1U << 0,
123a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueFill = 1U << 1,
124a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueProtected = 1U << 2,
125a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueUseCleanAperture = 1U << 3,
126a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueUseAspectRatio = 1U << 4,
127a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueLowQualityColor = 1U << 5,
128a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch};
129a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
130a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochenum wkWKCAImageQueueImageType {
131a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueNil = 1,
132a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueSurface,
133a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueBuffer,
134a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueIOSurface,
135a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch};
136a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
137a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochenum wkWKCAImageQueueImageFlags {
138a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueOpaque = 1U << 0,
139a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueFlush = 1U << 1,
140a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueWillFlush = 1U << 2,
141a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueFlipped = 1U << 3,
142a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueWaitGPU = 1U << 4,
143a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch};
144a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
145a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef void (*wkCAImageQueueReleaseCallback)(unsigned int type, uint64_t id, void *info);
146a94275402997c11dd2e778633dacf4b7e630a35dBen MurdochCAImageQueueRef wkCAImageQueueCreate(uint32_t width, uint32_t height, uint32_t capacity);
147a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCAImageQueueInvalidate(CAImageQueueRef iq);
148a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochsize_t wkCAImageQueueCollect(CAImageQueueRef iq);
149a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochbool wkCAImageQueueInsertImage(CAImageQueueRef iq, CFTimeInterval t, unsigned int type, uint64_t id, uint32_t flags, wkCAImageQueueReleaseCallback release, void *info);
150a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochuint64_t wkCAImageQueueRegisterPixelBuffer(CAImageQueueRef iq, void *data, size_t data_size, size_t rowbytes, size_t width, size_t height, OSType pixel_format, CFDictionaryRef attachments, uint32_t flags);
151a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCAImageQueueSetFlags(CAImageQueueRef iq, uint32_t mask, uint32_t flags);
152a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochuint32_t wkCAImageQueueGetFlags(CAImageQueueRef iq);
153a94275402997c11dd2e778633dacf4b7e630a35dBen MurdochCFTypeID wkCAImageQueueGetTypeID(void);
154a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
155a94275402997c11dd2e778633dacf4b7e630a35dBen MurdochWKCACFContext* wkCACFContextCreate();
156a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCACFContextDestroy(WKCACFContext*);
157a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
158a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCACFContextSetLayer(WKCACFContext*, CACFLayerRef);
159a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCACFContextFlush(WKCACFContext*);
160a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
161f05b935882198ccf7d81675736e3aeb089c5113aBen MurdochCFTimeInterval wkCACFContextGetLastCommitTime(WKCACFContext*);
162cad810f21b803229eb11403f9209855525a25d57Steve BlockCFTimeInterval wkCACFContextGetNextUpdateTime(WKCACFContext*);
163cad810f21b803229eb11403f9209855525a25d57Steve Block
164cad810f21b803229eb11403f9209855525a25d57Steve Blockvoid* wkCACFContextGetUserData(WKCACFContext*);
165cad810f21b803229eb11403f9209855525a25d57Steve Blockvoid wkCACFContextSetUserData(WKCACFContext*, void*);
166cad810f21b803229eb11403f9209855525a25d57Steve Block
167cad810f21b803229eb11403f9209855525a25d57Steve Blockvoid* wkCACFLayerGetContextUserData(CACFLayerRef);
168f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch
16965f03d4f644ce73618e5f4f50dd694b26f55ae12Ben Murdochvoid wkCACFContextSetD3DDevice(WKCACFContext*, IDirect3DDevice9*);
170a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCACFContextReleaseD3DResources(WKCACFContext*);
171a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
172a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochbool wkCACFContextBeginUpdate(WKCACFContext*, void* buffer, size_t bufferSize, CFTimeInterval time, const CGRect& bounds, const CGRect dirtyRects[], size_t dirtyRectCount);
173a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCACFContextRenderUpdate(WKCACFContext*);
174a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCACFContextFinishUpdate(WKCACFContext*);
175a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCACFContextAddUpdateRect(WKCACFContext*, const CGRect&);
176a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
177a94275402997c11dd2e778633dacf4b7e630a35dBen MurdochWKCACFUpdateRectEnumerator* wkCACFContextCopyUpdateRectEnumerator(WKCACFContext*);
178a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochconst CGRect* wkCACFUpdateRectEnumeratorNextRect(WKCACFUpdateRectEnumerator*);
179a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCACFUpdateRectEnumeratorRelease(WKCACFUpdateRectEnumerator*);
180a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
181f05b935882198ccf7d81675736e3aeb089c5113aBen MurdochCFDictionaryRef wkCFURLRequestCreateSerializableRepresentation(CFURLRequestRef cfRequest, CFTypeRef tokenNull);
182f05b935882198ccf7d81675736e3aeb089c5113aBen MurdochCFURLRequestRef wkCFURLRequestCreateFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
183f05b935882198ccf7d81675736e3aeb089c5113aBen MurdochCFDictionaryRef wkCFURLResponseCreateSerializableRepresentation(CFURLResponseRef cfResponse, CFTypeRef tokenNull);
184f05b935882198ccf7d81675736e3aeb089c5113aBen MurdochCFURLResponseRef wkCFURLResponseCreateFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
185f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch
1862fc2651226baac27029e38c9d6ef883fa32084dbSteve Blocktypedef void (*wkQuickTimeMIMETypeCallBack)(const char* mimeType);
1872fc2651226baac27029e38c9d6ef883fa32084dbSteve Blockvoid wkGetQuickTimeMIMETypeList(wkQuickTimeMIMETypeCallBack);
1882fc2651226baac27029e38c9d6ef883fa32084dbSteve Block
18968513a70bcd92384395513322f1b801e7bf9c729Steve Blocktypedef enum {
19068513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartFullscreenButton   = 0,
19168513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartMuteButton,
19268513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartPlayButton,
19368513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartSeekBackButton,
19468513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartSeekForwardButton,
19568513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartTimelineSlider,
19668513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartTimelineSliderThumb,
19768513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartRewindButton,
19868513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartSeekToRealtimeButton,
19968513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartShowClosedCaptionsButton,
20068513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartHideClosedCaptionsButton,
20168513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartUnMuteButton,
20268513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartPauseButton,
20368513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartBackground,
20468513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartCurrentTimeDisplay,
20568513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartTimeRemainingDisplay,
20668513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartStatusDisplay,
20768513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartControlsPanel,
20868513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartVolumeSliderContainer,
20968513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartVolumeSlider,
21068513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartVolumeSliderThumb
21168513a70bcd92384395513322f1b801e7bf9c729Steve Block} WKMediaUIPart;
21268513a70bcd92384395513322f1b801e7bf9c729Steve Block
21368513a70bcd92384395513322f1b801e7bf9c729Steve Blocktypedef enum {
21468513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaControllerThemeClassic   = 1,
21568513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaControllerThemeQuickTime = 2
21668513a70bcd92384395513322f1b801e7bf9c729Steve Block} WKMediaControllerThemeStyle;
21768513a70bcd92384395513322f1b801e7bf9c729Steve Block
21868513a70bcd92384395513322f1b801e7bf9c729Steve Blocktypedef enum {
21968513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaControllerFlagDisabled = 1 << 0,
22068513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaControllerFlagPressed = 1 << 1,
22168513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaControllerFlagDrawEndCaps = 1 << 3,
22268513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaControllerFlagFocused = 1 << 4
22368513a70bcd92384395513322f1b801e7bf9c729Steve Block} WKMediaControllerThemeState;
22468513a70bcd92384395513322f1b801e7bf9c729Steve Block
225a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch#ifdef __cplusplus
226a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochextern "C" {
227a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch#endif
228a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
22968513a70bcd92384395513322f1b801e7bf9c729Steve Blockbool WKMediaControllerThemeAvailable(int themeStyle);
23068513a70bcd92384395513322f1b801e7bf9c729Steve Blockbool WKHitTestMediaUIPart(int part, int themeStyle, CGRect bounds, CGPoint point);
23168513a70bcd92384395513322f1b801e7bf9c729Steve Blockvoid WKMeasureMediaUIPart(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
23268513a70bcd92384395513322f1b801e7bf9c729Steve Blockvoid WKDrawMediaUIPart(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
23368513a70bcd92384395513322f1b801e7bf9c729Steve Blockvoid WKDrawMediaSliderTrack(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
23468513a70bcd92384395513322f1b801e7bf9c729Steve Block
235a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch#ifdef __cplusplus
236a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch}
237a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch#endif
238a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
239563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#endif // WebKitSystemInterface_h
240