WebKitSystemInterface.h revision a94275402997c11dd2e778633dacf4b7e630a35d
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;
38563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef const struct __CFData* CFDataRef;
39563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef const struct __CFString* CFStringRef;
40a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef double CFTimeInterval;
41563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct CGColor* CGColorRef;
42563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct CGContext* CGContextRef;
43563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef unsigned short CGFontIndex;
44563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct CGFont* CGFontRef;
45563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef CGFontIndex CGGlyph;
46563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef wchar_t UChar;
47563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct _CFURLResponse* CFURLResponseRef;
48563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct OpaqueCFHTTPCookieStorage*  CFHTTPCookieStorageRef;
49563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct _CFURLRequest* CFMutableURLRequestRef;
50563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef const struct _CFURLRequest* CFURLRequestRef;
51643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef struct __CFHTTPMessage* CFHTTPMessageRef;
52643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef const struct __CFNumber* CFNumberRef;
53643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef struct __CFReadStream* CFReadStreamRef;
54643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef const struct __CFURL* CFURLRef;
55643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
56692e5dbf12901edacf14812a6fae25462920af42Steve Blocktypedef struct tagLOGFONTW LOGFONTW;
57692e5dbf12901edacf14812a6fae25462920af42Steve Blocktypedef LOGFONTW LOGFONT;
58a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef struct _CACFLayer *CACFLayerRef;
59a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef struct __CVBuffer *CVBufferRef;
60a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef CVBufferRef CVImageBufferRef;
61a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef CVImageBufferRef CVPixelBufferRef;
62a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef struct _CAImageQueue *CAImageQueueRef;
63a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef unsigned long CFTypeID;
64a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef struct _CFURLCredential* WKCFURLCredentialRef;
65563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
66563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetFontSmoothingLevel(int type);
67563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkint wkGetFontSmoothingLevel();
68563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetFontSmoothingContrast(CGFloat);
69563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCGFloat wkGetFontSmoothingContrast();
70692e5dbf12901edacf14812a6fae25462920af42Steve Blockvoid wkSystemFontSmoothingChanged();
71563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkuint32_t wkSetFontSmoothingStyle(CGContextRef cg, bool fontAllowsSmoothing);
72563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkRestoreFontSmoothingStyle(CGContextRef cg, uint32_t oldStyle);
73563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetCGContextFontRenderingStyle(CGContextRef, bool isSystemFont, bool isPrinterFont, bool usePlatformNativeGlyphs);
74563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkGetGlyphAdvances(CGFontRef, const CGAffineTransform&, bool isSystemFont, bool isPrinterFont, CGGlyph, CGSize& advance);
75563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkGetGlyphs(CGFontRef, const UChar[], CGGlyph[], size_t count);
76563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetUpFontCache(size_t s);
77563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
78563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetPatternBaseCTM(CGContextRef, CGAffineTransform);
79563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetPatternPhaseInUserSpace(CGContextRef, CGPoint phasePoint);
80d0825bca7fe65beaee391d30da42e937db621564Steve BlockCGAffineTransform wkGetUserToBaseCTM(CGContextRef);
81563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
82563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkDrawFocusRing(CGContextRef, CGColorRef, float radius);
83563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
84563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFDictionaryRef wkGetSSLCertificateInfo(CFURLResponseRef);
85563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid* wkGetSSLPeerCertificateData(CFDictionaryRef);
86a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid* wkGetSSLCertificateChainContext(CFDictionaryRef);
87563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFHTTPCookieStorageRef wkGetDefaultHTTPCookieStorage();
88563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool);
89563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFStringRef wkCopyFoundationCacheDirectory();
90563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetClientCertificateInSSLProperties(CFMutableDictionaryRef, CFDataRef);
91563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
92563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFArrayRef wkCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef);
93563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts);
94563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
950bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochunsigned wkInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
960bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch
97643ca7872b450ea4efacab6188849e5aac2ba161Steve Blockvoid wkSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
98643ca7872b450ea4efacab6188849e5aac2ba161Steve Blockvoid wkSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
99643ca7872b450ea4efacab6188849e5aac2ba161Steve BlockCFHTTPMessageRef wkCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL);
100643ca7872b450ea4efacab6188849e5aac2ba161Steve Block
101a94275402997c11dd2e778633dacf4b7e630a35dBen MurdochWKCFURLCredentialRef wkCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef protectionSpace);
102643ca7872b450ea4efacab6188849e5aac2ba161Steve Block
1030bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben MurdochCFStringRef wkCFNetworkErrorGetLocalizedDescription(CFIndex errorCode);
1040bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch
105a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
106a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochenum wkCAImageQueueFlags {
107a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueAsync = 1U << 0,
108a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueFill = 1U << 1,
109a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueProtected = 1U << 2,
110a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueUseCleanAperture = 1U << 3,
111a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueUseAspectRatio = 1U << 4,
112a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueLowQualityColor = 1U << 5,
113a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch};
114a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
115a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochenum wkWKCAImageQueueImageType {
116a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueNil = 1,
117a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueSurface,
118a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueBuffer,
119a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueIOSurface,
120a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch};
121a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
122a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochenum wkWKCAImageQueueImageFlags {
123a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueOpaque = 1U << 0,
124a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueFlush = 1U << 1,
125a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueWillFlush = 1U << 2,
126a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueFlipped = 1U << 3,
127a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch    kWKCAImageQueueWaitGPU = 1U << 4,
128a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch};
129a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
130a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef void (*wkCAImageQueueReleaseCallback)(unsigned int type, uint64_t id, void *info);
131a94275402997c11dd2e778633dacf4b7e630a35dBen MurdochCAImageQueueRef wkCAImageQueueCreate(uint32_t width, uint32_t height, uint32_t capacity);
132a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCAImageQueueInvalidate(CAImageQueueRef iq);
133a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochsize_t wkCAImageQueueCollect(CAImageQueueRef iq);
134a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochbool wkCAImageQueueInsertImage(CAImageQueueRef iq, CFTimeInterval t, unsigned int type, uint64_t id, uint32_t flags, wkCAImageQueueReleaseCallback release, void *info);
135a94275402997c11dd2e778633dacf4b7e630a35dBen 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);
136a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCAImageQueueSetFlags(CAImageQueueRef iq, uint32_t mask, uint32_t flags);
137a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochuint32_t wkCAImageQueueGetFlags(CAImageQueueRef iq);
138a94275402997c11dd2e778633dacf4b7e630a35dBen MurdochCFTypeID wkCAImageQueueGetTypeID(void);
139a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
140a94275402997c11dd2e778633dacf4b7e630a35dBen MurdochWKCACFContext* wkCACFContextCreate();
141a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCACFContextDestroy(WKCACFContext*);
142a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
143a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCACFContextSetLayer(WKCACFContext*, CACFLayerRef);
144a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCACFContextFlush(WKCACFContext*);
145a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
146a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCACFContextInitializeD3DDevice(WKCACFContext*, IDirect3DDevice9*);
147a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCACFContextReleaseD3DResources(WKCACFContext*);
148a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
149a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochbool wkCACFContextBeginUpdate(WKCACFContext*, void* buffer, size_t bufferSize, CFTimeInterval time, const CGRect& bounds, const CGRect dirtyRects[], size_t dirtyRectCount);
150a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCACFContextRenderUpdate(WKCACFContext*);
151a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCACFContextFinishUpdate(WKCACFContext*);
152a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCACFContextAddUpdateRect(WKCACFContext*, const CGRect&);
153a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
154a94275402997c11dd2e778633dacf4b7e630a35dBen MurdochWKCACFUpdateRectEnumerator* wkCACFContextCopyUpdateRectEnumerator(WKCACFContext*);
155a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochconst CGRect* wkCACFUpdateRectEnumeratorNextRect(WKCACFUpdateRectEnumerator*);
156a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid wkCACFUpdateRectEnumeratorRelease(WKCACFUpdateRectEnumerator*);
157a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
15868513a70bcd92384395513322f1b801e7bf9c729Steve Blocktypedef enum {
15968513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartFullscreenButton   = 0,
16068513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartMuteButton,
16168513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartPlayButton,
16268513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartSeekBackButton,
16368513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartSeekForwardButton,
16468513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartTimelineSlider,
16568513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartTimelineSliderThumb,
16668513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartRewindButton,
16768513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartSeekToRealtimeButton,
16868513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartShowClosedCaptionsButton,
16968513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartHideClosedCaptionsButton,
17068513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartUnMuteButton,
17168513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartPauseButton,
17268513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartBackground,
17368513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartCurrentTimeDisplay,
17468513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartTimeRemainingDisplay,
17568513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartStatusDisplay,
17668513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartControlsPanel,
17768513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartVolumeSliderContainer,
17868513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartVolumeSlider,
17968513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaUIPartVolumeSliderThumb
18068513a70bcd92384395513322f1b801e7bf9c729Steve Block} WKMediaUIPart;
18168513a70bcd92384395513322f1b801e7bf9c729Steve Block
18268513a70bcd92384395513322f1b801e7bf9c729Steve Blocktypedef enum {
18368513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaControllerThemeClassic   = 1,
18468513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaControllerThemeQuickTime = 2
18568513a70bcd92384395513322f1b801e7bf9c729Steve Block} WKMediaControllerThemeStyle;
18668513a70bcd92384395513322f1b801e7bf9c729Steve Block
18768513a70bcd92384395513322f1b801e7bf9c729Steve Blocktypedef enum {
18868513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaControllerFlagDisabled = 1 << 0,
18968513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaControllerFlagPressed = 1 << 1,
19068513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaControllerFlagDrawEndCaps = 1 << 3,
19168513a70bcd92384395513322f1b801e7bf9c729Steve Block    WKMediaControllerFlagFocused = 1 << 4
19268513a70bcd92384395513322f1b801e7bf9c729Steve Block} WKMediaControllerThemeState;
19368513a70bcd92384395513322f1b801e7bf9c729Steve Block
194a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch#ifdef __cplusplus
195a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochextern "C" {
196a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch#endif
197a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
19868513a70bcd92384395513322f1b801e7bf9c729Steve Blockbool WKMediaControllerThemeAvailable(int themeStyle);
19968513a70bcd92384395513322f1b801e7bf9c729Steve Blockbool WKHitTestMediaUIPart(int part, int themeStyle, CGRect bounds, CGPoint point);
20068513a70bcd92384395513322f1b801e7bf9c729Steve Blockvoid WKMeasureMediaUIPart(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
20168513a70bcd92384395513322f1b801e7bf9c729Steve Blockvoid WKDrawMediaUIPart(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
20268513a70bcd92384395513322f1b801e7bf9c729Steve Blockvoid WKDrawMediaSliderTrack(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
20368513a70bcd92384395513322f1b801e7bf9c729Steve Block
204a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch#ifdef __cplusplus
205a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch}
206a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch#endif
207a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
208563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#endif // WebKitSystemInterface_h
209