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; 31563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkstruct CGSize; 32563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 33563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef const struct __CFData* CFDataRef; 34563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef const struct __CFString* CFStringRef; 35563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct CGColor* CGColorRef; 36563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct CGContext* CGContextRef; 37563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef unsigned short CGFontIndex; 38563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct CGFont* CGFontRef; 39563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef CGFontIndex CGGlyph; 40563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef wchar_t UChar; 41563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct _CFURLResponse* CFURLResponseRef; 42563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef; 43563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef struct _CFURLRequest* CFMutableURLRequestRef; 44563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarktypedef const struct _CFURLRequest* CFURLRequestRef; 45643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef struct _CFURLCredential* CFURLCredentialRef; 46643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef struct __CFHTTPMessage* CFHTTPMessageRef; 47643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef const struct __CFNumber* CFNumberRef; 48643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef struct __CFReadStream* CFReadStreamRef; 49643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef const struct __CFURL* CFURLRef; 50643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef; 51563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 52563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetFontSmoothingLevel(int type); 53563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkint wkGetFontSmoothingLevel(); 54563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetFontSmoothingContrast(CGFloat); 55563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCGFloat wkGetFontSmoothingContrast(); 56563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkuint32_t wkSetFontSmoothingStyle(CGContextRef cg, bool fontAllowsSmoothing); 57563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkRestoreFontSmoothingStyle(CGContextRef cg, uint32_t oldStyle); 58563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetCGContextFontRenderingStyle(CGContextRef, bool isSystemFont, bool isPrinterFont, bool usePlatformNativeGlyphs); 59563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkGetGlyphAdvances(CGFontRef, const CGAffineTransform&, bool isSystemFont, bool isPrinterFont, CGGlyph, CGSize& advance); 60563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkGetGlyphs(CGFontRef, const UChar[], CGGlyph[], size_t count); 61d0825bca7fe65beaee391d30da42e937db621564Steve Blockbool wkCanCreateCGFontWithLOGFONT(); 62563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetFontPlatformInfo(CGFontRef, LOGFONT*, void(*)(void*)); 63563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetUpFontCache(size_t s); 64563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkAddFontsInDirectory(CFStringRef); 65563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkAddFontsAtPath(CFStringRef); 66231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Blockvoid wkAddFontsFromRegistry(); 67231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Blockvoid wkAddFontsFromPlist(CFPropertyListRef); 68231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve BlockCFPropertyListRef wkCreateFontsPlist(); 69563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 70563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetPatternBaseCTM(CGContextRef, CGAffineTransform); 71563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetPatternPhaseInUserSpace(CGContextRef, CGPoint phasePoint); 72d0825bca7fe65beaee391d30da42e937db621564Steve BlockCGAffineTransform wkGetUserToBaseCTM(CGContextRef); 73563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 74563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkDrawFocusRing(CGContextRef, CGColorRef, float radius); 75563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 76563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFDictionaryRef wkGetSSLCertificateInfo(CFURLResponseRef); 77563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid* wkGetSSLPeerCertificateData(CFDictionaryRef); 78563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFHTTPCookieStorageRef wkGetDefaultHTTPCookieStorage(); 79563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool); 80563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFStringRef wkCopyFoundationCacheDirectory(); 81563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkSetClientCertificateInSSLProperties(CFMutableDictionaryRef, CFDataRef); 82563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 83563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkCFArrayRef wkCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef); 84563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkvoid wkCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts); 85563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 860bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochunsigned wkInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount); 870bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch 88643ca7872b450ea4efacab6188849e5aac2ba161Steve Blockvoid wkSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort); 89643ca7872b450ea4efacab6188849e5aac2ba161Steve Blockvoid wkSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString); 90643ca7872b450ea4efacab6188849e5aac2ba161Steve BlockCFHTTPMessageRef wkCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL); 91643ca7872b450ea4efacab6188849e5aac2ba161Steve Block 92d0825bca7fe65beaee391d30da42e937db621564Steve BlockCFURLCredentialRef wkCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef protectionSpace); 93643ca7872b450ea4efacab6188849e5aac2ba161Steve Block 940bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben MurdochCFStringRef wkCFNetworkErrorGetLocalizedDescription(CFIndex errorCode); 950bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch 96563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#endif // WebKitSystemInterface_h 97