Unreviewed, rolling out r191902.
[WebKit-https.git] / Source / WebCore / platform / ios / WebCoreSystemInterfaceIOS.mm
1 /*
2  * Copyright 2006, 2007, 2008 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24  */
25
26 #import "config.h"
27 #import "WebCoreSystemInterface.h"
28
29 WEBCORE_EXPORT void (*wkCALayerEnumerateRectsBeingDrawnWithBlock)(CALayer *, CGContextRef context, void (^block)(CGRect rect));
30 WEBCORE_EXPORT BOOL (*wkCGContextGetShouldSmoothFonts)(CGContextRef);
31 WEBCORE_EXPORT CGPatternRef (*wkCGPatternCreateWithImageAndTransform)(CGImageRef, CGAffineTransform, int);
32 WEBCORE_EXPORT void (*wkClearGlyphVector)(void* glyphs);
33 WEBCORE_EXPORT OSStatus (*wkConvertCharToGlyphs)(void* styleGroup, const UniChar*, unsigned numCharacters, void* glyphs);
34 WEBCORE_EXPORT NSDate *(*wkGetNSURLResponseLastModifiedDate)(NSURLResponse *response);
35 WEBCORE_EXPORT bool (*wkCGContextIsPDFContext)(CGContextRef);
36 WEBCORE_EXPORT NSString* (*wkCopyNSURLResponseStatusLine)(NSURLResponse*);
37 WEBCORE_EXPORT void (*wkSetNSURLRequestShouldContentSniff)(NSMutableURLRequest *, BOOL);
38 WEBCORE_EXPORT id (*wkCreateNSURLConnectionDelegateProxy)(void);
39 WEBCORE_EXPORT unsigned (*wkInitializeMaximumHTTPConnectionCountPerHost)(unsigned preferredConnectionCount);
40 WEBCORE_EXPORT int (*wkGetHTTPRequestPriority)(CFURLRequestRef);
41 WEBCORE_EXPORT void (*wkSetHTTPRequestMaximumPriority)(int priority);
42 WEBCORE_EXPORT void (*wkSetHTTPRequestPriority)(CFURLRequestRef, int priority);
43 WEBCORE_EXPORT void (*wkSetHTTPRequestMinimumFastLanePriority)(int priority);
44 WEBCORE_EXPORT void (*wkHTTPRequestEnablePipelining)(CFURLRequestRef);
45 WEBCORE_EXPORT void (*wkSetCONNECTProxyForStream)(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
46 WEBCORE_EXPORT void (*wkSetCONNECTProxyAuthorizationForStream)(CFReadStreamRef, CFStringRef proxyAuthorizationString);
47 WEBCORE_EXPORT void (*wkSetCookieStoragePrivateBrowsingEnabled)(BOOL);
48 WEBCORE_EXPORT CFHTTPMessageRef (*wkCopyCONNECTProxyResponse)(CFReadStreamRef, CFURLRef responseURL, CFStringRef proxyHost, CFNumberRef proxyPort);
49 WEBCORE_EXPORT bool (*wkExecutableWasLinkedOnOrAfterIOSVersion)(int);
50 WEBCORE_EXPORT int (*wkGetDeviceClass)(void);
51 WEBCORE_EXPORT CGSize (*wkGetScreenSize)(void);
52 WEBCORE_EXPORT CGSize (*wkGetAvailableScreenSize)(void);
53 WEBCORE_EXPORT void (*wkSetLayerContentsScale)(CALayer *);
54 WEBCORE_EXPORT float (*wkGetScreenScaleFactor)(void);
55 WEBCORE_EXPORT bool (*wkIsGB18030ComplianceRequired)(void);
56 WEBCORE_EXPORT void (*wkCFURLRequestAllowAllPostCaching)(CFURLRequestRef);
57 WEBCORE_EXPORT CFArrayRef (*wkCopyNSURLResponseCertificateChain)(NSURLResponse*);
58 WEBCORE_EXPORT CFStringEncoding (*wkGetWebDefaultCFStringEncoding)(void);
59
60 #if USE(CFNETWORK)
61 WEBCORE_EXPORT CFHTTPCookieStorageRef (*wkGetDefaultHTTPCookieStorage)();
62 WEBCORE_EXPORT WKCFURLCredentialRef (*wkCopyCredentialFromCFPersistentStorage)(CFURLProtectionSpaceRef protectionSpace);
63 WEBCORE_EXPORT void (*wkSetCFURLRequestShouldContentSniff)(CFMutableURLRequestRef, bool);
64 WEBCORE_EXPORT void (*wkSetRequestStorageSession)(CFURLStorageSessionRef, CFMutableURLRequestRef);
65 #endif
66
67 WEBCORE_EXPORT CFURLStorageSessionRef (*wkCreatePrivateStorageSession)(CFStringRef);
68 WEBCORE_EXPORT NSURLRequest* (*wkCopyRequestWithStorageSession)(CFURLStorageSessionRef, NSURLRequest*);
69 WEBCORE_EXPORT CFHTTPCookieStorageRef (*wkCopyHTTPCookieStorage)(CFURLStorageSessionRef);
70 WEBCORE_EXPORT unsigned (*wkGetHTTPCookieAcceptPolicy)(CFHTTPCookieStorageRef);
71 WEBCORE_EXPORT void (*wkSetHTTPCookieAcceptPolicy)(CFHTTPCookieStorageRef, unsigned);
72 WEBCORE_EXPORT NSArray *(*wkHTTPCookies)(CFHTTPCookieStorageRef);
73 WEBCORE_EXPORT NSArray *(*wkHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSURL *, NSURL *);
74 WEBCORE_EXPORT void (*wkSetHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
75 WEBCORE_EXPORT void (*wkDeleteAllHTTPCookies)(CFHTTPCookieStorageRef);
76 WEBCORE_EXPORT void (*wkDeleteHTTPCookie)(CFHTTPCookieStorageRef, NSHTTPCookie *);
77
78 WEBCORE_EXPORT CFStringRef (*wkGetCFURLResponseMIMEType)(CFURLResponseRef);
79 WEBCORE_EXPORT CFURLRef (*wkGetCFURLResponseURL)(CFURLResponseRef);
80 WEBCORE_EXPORT CFHTTPMessageRef (*wkGetCFURLResponseHTTPResponse)(CFURLResponseRef);
81 WEBCORE_EXPORT CFStringRef (*wkCopyCFURLResponseSuggestedFilename)(CFURLResponseRef);
82 WEBCORE_EXPORT void (*wkSetCFURLResponseMIMEType)(CFURLResponseRef, CFStringRef mimeType);
83
84 WEBCORE_EXPORT void(*wkDestroyRenderingResources)(void);
85
86 WEBCORE_EXPORT bool (*wkCaptionAppearanceHasUserPreferences)(void);
87 WEBCORE_EXPORT bool (*wkCaptionAppearanceShowCaptionsWhenAvailable)(void);
88 WEBCORE_EXPORT CGColorRef(*wkCaptionAppearanceCopyForegroundColor)(void);
89 WEBCORE_EXPORT CGColorRef(*wkCaptionAppearanceCopyBackgroundColor)(void);
90 WEBCORE_EXPORT CGColorRef(*wkCaptionAppearanceCopyWindowColor)(void);
91 WEBCORE_EXPORT bool(*wkCaptionAppearanceGetForegroundOpacity)(CGFloat*);
92 WEBCORE_EXPORT bool(*wkCaptionAppearanceGetBackgroundOpacity)(CGFloat*);
93 WEBCORE_EXPORT bool(*wkCaptionAppearanceGetWindowOpacity)(CGFloat*);
94 WEBCORE_EXPORT CGFontRef(*wkCaptionAppearanceCopyFontForStyle)(int);
95 WEBCORE_EXPORT bool(*wkCaptionAppearanceGetRelativeCharacterSize)(CGFloat*);
96 WEBCORE_EXPORT int(*wkCaptionAppearanceGetTextEdgeStyle)(void);
97 WEBCORE_EXPORT CFStringRef(*wkCaptionAppearanceGetSettingsChangedNotification)(void);
98
99 #if ENABLE(PUBLIC_SUFFIX_LIST)
100 WEBCORE_EXPORT bool (*wkIsPublicSuffix)(NSString *host);
101 #endif
102
103 #if ENABLE(CACHE_PARTITIONING)
104 WEBCORE_EXPORT CFStringRef (*wkCachePartitionKey)(void);
105 #endif
106
107 WEBCORE_EXPORT CFStringRef (*wkGetUserAgent)(void);
108 WEBCORE_EXPORT CFStringRef (*wkGetDeviceName)(void);
109 WEBCORE_EXPORT CFStringRef (*wkGetOSNameForUserAgent)(void);
110 WEBCORE_EXPORT CFStringRef (*wkGetPlatformNameForNavigator)(void);
111 WEBCORE_EXPORT CFStringRef (*wkGetVendorNameForNavigator)(void);
112
113 WEBCORE_EXPORT bool (*wkIsOptimizedFullscreenSupported)(void);
114
115 WEBCORE_EXPORT int (*wkExernalDeviceTypeForPlayer)(AVPlayer *);
116 WEBCORE_EXPORT NSString *(*wkExernalDeviceDisplayNameForPlayer)(AVPlayer *);
117
118 WEBCORE_EXPORT bool (*wkQueryDecoderAvailability)(void);