3d8bae76d7f4d84ac0717076532e4fb14fbf1271
[WebKit-https.git] / Source / WebKit2 / WebProcess / WebCoreSupport / mac / WebSystemInterface.mm
1 /*
2  * Copyright (C) 2006, 2007, 2008, 2009, 2010 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. AND ITS CONTRIBUTORS ``AS IS''
14  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23  * THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 #import "WebSystemInterface.h"
27
28 #import <WebCore/WebCoreSystemInterface.h>
29 #import <WebKitSystemInterface.h>
30
31 #define INIT(function) wk##function = WK##function
32
33 void InitWebCoreSystemInterface(void)
34 {
35     static dispatch_once_t initOnce;
36     
37     dispatch_once(&initOnce, ^{
38         INIT(AdvanceDefaultButtonPulseAnimation);
39         INIT(CopyCFLocalizationPreferredName);
40         INIT(CGContextGetShouldSmoothFonts);
41         INIT(CopyCONNECTProxyResponse);
42         INIT(CopyNSURLResponseStatusLine);
43         INIT(CreateCTLineWithUniCharProvider);
44         INIT(CreateCustomCFReadStream);
45         INIT(CreateNSURLConnectionDelegateProxy);
46         INIT(DrawBezeledTextArea);
47         INIT(DrawBezeledTextFieldCell);
48         INIT(DrawCapsLockIndicator);
49         INIT(DrawFocusRing);
50         INIT(DrawMediaSliderTrack);
51         INIT(DrawMediaUIPart);
52         INIT(DrawTextFieldCellFocusRing);
53         INIT(GetExtensionsForMIMEType);
54         INIT(GetFontInLanguageForCharacter);
55         INIT(GetFontInLanguageForRange);
56         INIT(GetGlyphTransformedAdvances);
57         INIT(GetGlyphsForCharacters);
58         INIT(GetMIMETypeForExtension);
59         INIT(GetNSURLResponseLastModifiedDate);
60         INIT(GetPreferredExtensionForMIMEType);
61         INIT(GetUserToBaseCTM);
62         INIT(GetWheelEventDeltas);
63         INIT(HitTestMediaUIPart);
64         INIT(InitializeMaximumHTTPConnectionCountPerHost);
65         INIT(IsLatchingWheelEvent);
66         INIT(MeasureMediaUIPart);
67         INIT(MediaControllerThemeAvailable);
68         INIT(PopupMenu);
69         INIT(QTIncludeOnlyModernMediaFileTypes);
70         INIT(QTMovieDataRate);
71         INIT(QTMovieDisableComponent);
72         INIT(QTMovieGetType);
73         INIT(QTMovieHasClosedCaptions);
74         INIT(QTMovieMaxTimeLoaded);
75         INIT(QTMovieMaxTimeLoadedChangeNotification);
76         INIT(QTMovieMaxTimeSeekable);
77         INIT(QTMovieSelectPreferredAlternates);
78         INIT(QTMovieSetShowClosedCaptions);
79         INIT(QTMovieViewSetDrawSynchronously);
80         INIT(SetCGFontRenderingMode);
81         INIT(SetCONNECTProxyAuthorizationForStream);
82         INIT(SetCONNECTProxyForStream);
83         INIT(SetCookieStoragePrivateBrowsingEnabled);
84         INIT(SetDragImage);
85         INIT(SetNSURLConnectionDefersCallbacks);
86         INIT(SetNSURLRequestShouldContentSniff);
87         INIT(SetPatternBaseCTM);
88         INIT(SetPatternPhaseInUserSpace);
89         INIT(SetUpFontCache);
90         INIT(SignalCFReadStreamEnd);
91         INIT(SignalCFReadStreamError);
92         INIT(SignalCFReadStreamHasBytes);
93
94 #if !defined(BUILDING_ON_SNOW_LEOPARD)
95         INIT(CreateCTTypesetterWithUniCharProviderAndOptions);
96         INIT(MakeScrollbarPainter);
97         INIT(ScrollbarPainterPaint);
98         INIT(ScrollbarThickness);
99         INIT(ScrollbarMinimumThumbLength);
100         INIT(ScrollbarMinimumTotalLengthNeededForThumb);
101 #else
102         INIT(GetHyphenationLocationBeforeIndex);
103 #endif
104     });
105 }