Home | History | Annotate | Download | only in WebCoreSupport
      1 /*
      2  * Copyright 2006, 2007, 2008, 2009 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 #import <WebCore/WebCoreSystemInterface.h>
     32 #import <WebKitSystemInterface.h>
     33 
     34 // Needed for builds not using PCH to expose BUILDING_ macros, see bug 32753.
     35 #include <wtf/Platform.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(CopyCONNECTProxyResponse);
     48     INIT(CreateCustomCFReadStream);
     49     INIT(CreateNSURLConnectionDelegateProxy);
     50     INIT(DrawCapsLockIndicator);
     51     INIT(DrawBezeledTextArea);
     52     INIT(DrawBezeledTextFieldCell);
     53     INIT(DrawFocusRing);
     54     INIT(DrawMediaUIPart);
     55     INIT(DrawMediaSliderTrack);
     56     INIT(DrawTextFieldCellFocusRing);
     57     INIT(GetExtensionsForMIMEType);
     58     INIT(GetFontInLanguageForCharacter);
     59     INIT(GetFontInLanguageForRange);
     60     INIT(GetGlyphTransformedAdvances);
     61     INIT(GetMIMETypeForExtension);
     62     INIT(GetNSURLResponseLastModifiedDate);
     63     INIT(GetPreferredExtensionForMIMEType);
     64     INIT(GetWheelEventDeltas);
     65     INIT(HitTestMediaUIPart);
     66     INIT(InitializeMaximumHTTPConnectionCountPerHost);
     67     INIT(IsLatchingWheelEvent);
     68     INIT(MeasureMediaUIPart);
     69     INIT(MediaControllerThemeAvailable);
     70     INIT(PopupMenu);
     71     INIT(SetCGFontRenderingMode);
     72     INIT(SetCONNECTProxyAuthorizationForStream);
     73     INIT(SetCONNECTProxyForStream);
     74     INIT(SetDragImage);
     75     INIT(SetNSURLConnectionDefersCallbacks);
     76     INIT(SetNSURLRequestShouldContentSniff);
     77     INIT(SetPatternBaseCTM);
     78     INIT(SetPatternPhaseInUserSpace);
     79     INIT(GetUserToBaseCTM);
     80     INIT(SetUpFontCache);
     81     INIT(SignalCFReadStreamEnd);
     82     INIT(SignalCFReadStreamError);
     83     INIT(SignalCFReadStreamHasBytes);
     84     INIT(QTIncludeOnlyModernMediaFileTypes);
     85     INIT(QTMovieDataRate);
     86     INIT(QTMovieMaxTimeLoaded);
     87     INIT(QTMovieMaxTimeLoadedChangeNotification);
     88     INIT(QTMovieMaxTimeSeekable);
     89     INIT(QTMovieGetType);
     90     INIT(QTMovieHasClosedCaptions);
     91     INIT(QTMovieSetShowClosedCaptions);
     92     INIT(QTMovieViewSetDrawSynchronously);
     93 
     94 #ifndef BUILDING_ON_TIGER
     95     INIT(GetGlyphsForCharacters);
     96 #else
     97     INIT(ClearGlyphVector);
     98     INIT(ConvertCharToGlyphs);
     99     INIT(CopyFullFontName);
    100     INIT(GetATSStyleGroup);
    101     INIT(GetCGFontFromNSFont);
    102     INIT(GetFontMetrics);
    103     INIT(GetGlyphVectorFirstRecord);
    104     INIT(GetGlyphVectorNumGlyphs);
    105     INIT(GetGlyphVectorRecordSize);
    106     INIT(GetNSFontATSUFontId);
    107     INIT(InitializeGlyphVector);
    108     INIT(ReleaseStyleGroup);
    109     INIT(SupportsMultipartXMixedReplace);
    110 #endif
    111 
    112 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
    113     INIT(NoteOpenPanelFiles);
    114 #endif
    115 
    116     didInit = true;
    117 }
    118