d3b1b8938fa29b9d8f5cde6899ffc98a5c958b3c
[WebKit-https.git] / Source / WebKit / mac / WebCoreSupport / WebSystemInterface.mm
1 /*
2  * Copyright 2006, 2007, 2008, 2009, 2010, 2011 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  *
8  * 1.  Redistributions of source code must retain the above copyright
9  *     notice, this list of conditions and the following disclaimer. 
10  * 2.  Redistributions in binary form must reproduce the above copyright
11  *     notice, this list of conditions and the following disclaimer in the
12  *     documentation and/or other materials provided with the distribution. 
13  * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
14  *     its contributors may be used to endorse or promote products derived
15  *     from this software without specific prior written permission. 
16  *
17  * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
18  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20  * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28
29 #import "WebSystemInterface.h"
30
31 // Needed for builds not using PCH to expose BUILDING_ macros, see bug 32753.
32 #include <wtf/Platform.h>
33
34 #import <WebCore/WebCoreSystemInterface.h>
35 #import <WebKitSystemInterface.h>
36
37 #define INIT(function) wk##function = WK##function
38
39 void InitWebCoreSystemInterface(void)
40 {
41     static bool didInit;
42     if (didInit)
43         return;
44
45     INIT(AdvanceDefaultButtonPulseAnimation);
46     INIT(CGContextGetShouldSmoothFonts);
47     INIT(CopyCFLocalizationPreferredName);
48     INIT(CopyCONNECTProxyResponse);
49     INIT(CopyNSURLResponseStatusLine);
50     INIT(CreateCustomCFReadStream);
51     INIT(CreateNSURLConnectionDelegateProxy);
52     INIT(DrawCapsLockIndicator);
53     INIT(DrawBezeledTextArea);
54     INIT(DrawBezeledTextFieldCell);
55     INIT(DrawFocusRing);
56     INIT(DrawMediaUIPart);
57     INIT(DrawMediaSliderTrack);
58     INIT(DrawTextFieldCellFocusRing);
59     INIT(GetExtensionsForMIMEType);
60     INIT(GetFontInLanguageForCharacter);
61     INIT(GetFontInLanguageForRange);
62     INIT(GetGlyphTransformedAdvances);
63     INIT(GetHTTPPipeliningPriority);
64     INIT(GetMIMETypeForExtension);
65     INIT(GetNSURLResponseLastModifiedDate);
66     INIT(SignedPublicKeyAndChallengeString);
67     INIT(GetPreferredExtensionForMIMEType);
68     INIT(GetWheelEventDeltas);
69     INIT(HitTestMediaUIPart);
70     INIT(InitializeMaximumHTTPConnectionCountPerHost);
71     INIT(MeasureMediaUIPart);
72     INIT(CreateMediaUIBackgroundView);
73     INIT(CreateMediaUIControl);
74     INIT(WindowSetAlpha);
75     INIT(WindowSetScaledFrame);
76     INIT(MediaControllerThemeAvailable);
77     INIT(PopupMenu);
78     INIT(SetCGFontRenderingMode);
79     INIT(SetCONNECTProxyAuthorizationForStream);
80     INIT(SetCONNECTProxyForStream);
81     INIT(SetCookieStoragePrivateBrowsingEnabled);
82     INIT(SetDragImage);
83     INIT(SetHTTPPipeliningMaximumPriority);
84     INIT(SetHTTPPipeliningPriority);
85     INIT(SetHTTPPipeliningMinimumFastLanePriority);
86     INIT(SetNSURLConnectionDefersCallbacks);
87     INIT(SetNSURLRequestShouldContentSniff);
88     INIT(SetPatternBaseCTM);
89     INIT(SetPatternPhaseInUserSpace);
90     INIT(GetUserToBaseCTM);
91     INIT(SetUpFontCache);
92     INIT(SignalCFReadStreamEnd);
93     INIT(SignalCFReadStreamError);
94     INIT(SignalCFReadStreamHasBytes);
95     INIT(QTIncludeOnlyModernMediaFileTypes);
96     INIT(QTMovieDataRate);
97     INIT(QTMovieDisableComponent);
98     INIT(QTMovieMaxTimeLoaded);
99     INIT(QTMovieMaxTimeLoadedChangeNotification);
100     INIT(QTMovieMaxTimeSeekable);
101     INIT(QTMovieGetType);
102     INIT(QTMovieHasClosedCaptions);
103     INIT(QTMovieResolvedURL);
104     INIT(QTMovieSetShowClosedCaptions);
105     INIT(QTMovieSelectPreferredAlternates);
106     INIT(QTMovieViewSetDrawSynchronously);
107     INIT(QTGetSitesInMediaDownloadCache);
108     INIT(QTClearMediaDownloadCacheForSite);
109     INIT(QTClearMediaDownloadCache);
110
111     INIT(GetGlyphsForCharacters);
112
113 #if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
114     INIT(GetHyphenationLocationBeforeIndex);
115     INIT(GetNSEventMomentumPhase);
116 #endif
117
118     INIT(CreateCTLineWithUniCharProvider);
119
120 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
121     INIT(IOSurfaceContextCreate);
122     INIT(IOSurfaceContextCreateImage);
123     INIT(CreateCTTypesetterWithUniCharProviderAndOptions);
124     INIT(MakeScrollbarPainter);
125     INIT(ScrollbarPainterSetDelegate);
126     INIT(ScrollbarPainterPaint);
127     INIT(ScrollbarPainterForceFlashScrollers);
128     INIT(ScrollbarThickness);
129     INIT(ScrollbarMinimumThumbLength);
130     INIT(ScrollbarMinimumTotalLengthNeededForThumb);
131     INIT(ScrollbarPainterKnobAlpha);
132     INIT(SetScrollbarPainterKnobAlpha);
133     INIT(ScrollbarPainterTrackAlpha);
134     INIT(SetScrollbarPainterTrackAlpha);
135     INIT(ScrollbarPainterIsHorizontal);
136     INIT(ScrollbarPainterKnobRect);
137     INIT(ScrollbarPainterSetOverlayState);
138     INIT(SetScrollbarPainterKnobStyle);
139     INIT(MakeScrollbarPainterController);
140     INIT(MakeScrollbarReplacementPainter);
141     INIT(SetPainterForPainterController);
142     INIT(VerticalScrollbarPainterForController);
143     INIT(HorizontalScrollbarPainterForController);
144     INIT(ScrollbarPainterControllerStyle);
145     INIT(SetScrollbarPainterControllerStyle);
146     INIT(ContentAreaScrolled);
147     INIT(ContentAreaWillPaint);
148     INIT(MouseEnteredContentArea);
149     INIT(MouseExitedContentArea);
150     INIT(MouseMovedInContentArea);
151     INIT(WillStartLiveResize);
152     INIT(ContentAreaResized);
153     INIT(WillEndLiveResize);
154     INIT(ContentAreaDidShow);
155     INIT(ContentAreaDidHide);
156     INIT(DidBeginScrollGesture);
157     INIT(DidEndScrollGesture);
158     INIT(ScrollbarPainterUsesOverlayScrollers);
159     INIT(ExecutableWasLinkedOnOrBeforeSnowLeopard);
160     INIT(CopyDefaultSearchProviderDisplayName);
161     INIT(AVAssetResolvedURL);
162     INIT(Cursor);
163 #endif
164
165     INIT(GetAXTextMarkerTypeID);
166     INIT(GetAXTextMarkerRangeTypeID);
167     INIT(CreateAXTextMarker);
168     INIT(GetBytesFromAXTextMarker);
169     INIT(CreateAXTextMarkerRange);
170     INIT(CopyAXTextMarkerRangeStart);
171     INIT(CopyAXTextMarkerRangeEnd);
172     INIT(AccessibilityHandleFocusChanged);
173     INIT(CreateAXUIElementRef);
174     INIT(UnregisterUniqueIdForElement);
175     INIT(CreatePrivateStorageSession);
176     INIT(CopyRequestWithStorageSession);
177     INIT(CopyHTTPCookieStorage);
178     INIT(GetHTTPCookieAcceptPolicy);
179     INIT(HTTPCookiesForURL);
180     INIT(SetHTTPCookiesForURL);
181     INIT(DeleteHTTPCookie);
182
183     INIT(GetCFURLResponseMIMEType);
184     INIT(GetCFURLResponseURL);
185     INIT(GetCFURLResponseHTTPResponse);
186     INIT(CopyCFURLResponseSuggestedFilename);
187     INIT(SetCFURLResponseMIMEType);
188
189     didInit = true;
190 }