Home | History | Annotate | Download | only in mac
      1 /*
      2  * Copyright 2006, 2007, 2008 Apple Computer, 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 COMPUTER, 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 COMPUTER, 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 #import <Foundation/Foundation.h>
     29 
     30 void (*wkAdvanceDefaultButtonPulseAnimation)(NSButtonCell *);
     31 BOOL (*wkCGContextGetShouldSmoothFonts)(CGContextRef);
     32 NSString* (*wkCreateURLPasteboardFlavorTypeName)(void);
     33 NSString* (*wkCreateURLNPasteboardFlavorTypeName)(void);
     34 void (*wkDrawBezeledTextFieldCell)(NSRect, BOOL enabled);
     35 void (*wkDrawTextFieldCellFocusRing)(NSTextFieldCell*, NSRect);
     36 void (*wkDrawCapsLockIndicator)(CGContextRef, CGRect);
     37 void (*wkDrawBezeledTextArea)(NSRect, BOOL enabled);
     38 void (*wkDrawFocusRing)(CGContextRef, CGColorRef, int radius);
     39 NSFont* (*wkGetFontInLanguageForRange)(NSFont*, NSString*, NSRange);
     40 NSFont* (*wkGetFontInLanguageForCharacter)(NSFont*, UniChar);
     41 BOOL (*wkGetGlyphTransformedAdvances)(CGFontRef, NSFont*, CGAffineTransform*, ATSGlyphRef*, CGSize* advance);
     42 void (*wkDrawMediaSliderTrack)(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime,
     43     float duration, unsigned state);
     44 BOOL (*wkHitTestMediaUIPart)(int part, int themeStyle, CGRect bounds, CGPoint point);
     45 void (*wkDrawMediaUIPart)(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
     46 void (*wkMeasureMediaUIPart)(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
     47 BOOL (*wkMediaControllerThemeAvailable)(int themeStyle);
     48 NSString* (*wkGetPreferredExtensionForMIMEType)(NSString*);
     49 NSArray* (*wkGetExtensionsForMIMEType)(NSString*);
     50 NSString* (*wkGetMIMETypeForExtension)(NSString*);
     51 NSTimeInterval (*wkGetNSURLResponseCalculatedExpiration)(NSURLResponse *response);
     52 NSDate *(*wkGetNSURLResponseLastModifiedDate)(NSURLResponse *response);
     53 BOOL (*wkGetNSURLResponseMustRevalidate)(NSURLResponse *response);
     54 void (*wkGetWheelEventDeltas)(NSEvent*, float* deltaX, float* deltaY, BOOL* continuous);
     55 void (*wkPopupMenu)(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
     56 unsigned (*wkQTIncludeOnlyModernMediaFileTypes)(void);
     57 int (*wkQTMovieDataRate)(QTMovie*);
     58 float (*wkQTMovieMaxTimeLoaded)(QTMovie*);
     59 NSString *(*wkQTMovieMaxTimeLoadedChangeNotification)(void);
     60 float (*wkQTMovieMaxTimeSeekable)(QTMovie*);
     61 int (*wkQTMovieGetType)(QTMovie* movie);
     62 BOOL (*wkQTMovieHasClosedCaptions)(QTMovie* movie);
     63 void (*wkQTMovieSetShowClosedCaptions)(QTMovie* movie, BOOL showClosedCaptions);
     64 void (*wkQTMovieViewSetDrawSynchronously)(QTMovieView*, BOOL);
     65 void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
     66 void (*wkSetDragImage)(NSImage*, NSPoint offset);
     67 void (*wkSetPatternBaseCTM)(CGContextRef, CGAffineTransform);
     68 void (*wkSetPatternPhaseInUserSpace)(CGContextRef, CGPoint point);
     69 CGAffineTransform (*wkGetUserToBaseCTM)(CGContextRef);
     70 void (*wkSetUpFontCache)();
     71 void (*wkSignalCFReadStreamEnd)(CFReadStreamRef stream);
     72 void (*wkSignalCFReadStreamHasBytes)(CFReadStreamRef stream);
     73 void (*wkSignalCFReadStreamError)(CFReadStreamRef stream, CFStreamError *error);
     74 CFReadStreamRef (*wkCreateCustomCFReadStream)(void *(*formCreate)(CFReadStreamRef, void *),
     75     void (*formFinalize)(CFReadStreamRef, void *),
     76     Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *),
     77     CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *),
     78     Boolean (*formCanRead)(CFReadStreamRef, void *),
     79     void (*formClose)(CFReadStreamRef, void *),
     80     void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
     81     void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
     82     void *context);
     83 void (*wkSetNSURLConnectionDefersCallbacks)(NSURLConnection *, BOOL);
     84 void (*wkSetNSURLRequestShouldContentSniff)(NSMutableURLRequest *, BOOL);
     85 id (*wkCreateNSURLConnectionDelegateProxy)(void);
     86 unsigned (*wkInitializeMaximumHTTPConnectionCountPerHost)(unsigned preferredConnectionCount);
     87 void (*wkSetCONNECTProxyForStream)(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
     88 void (*wkSetCONNECTProxyAuthorizationForStream)(CFReadStreamRef, CFStringRef proxyAuthorizationString);
     89 CFHTTPMessageRef (*wkCopyCONNECTProxyResponse)(CFReadStreamRef, CFURLRef responseURL);
     90 BOOL (*wkIsLatchingWheelEvent)(NSEvent *);
     91 
     92 #ifndef BUILDING_ON_TIGER
     93 void (*wkGetGlyphsForCharacters)(CGFontRef, const UniChar[], CGGlyph[], size_t);
     94 #else
     95 void (*wkClearGlyphVector)(void* glyphs);
     96 OSStatus (*wkConvertCharToGlyphs)(void* styleGroup, const UniChar*, unsigned numCharacters, void* glyphs);
     97 CFStringRef (*wkCopyFullFontName)(CGFontRef font);
     98 OSStatus (*wkGetATSStyleGroup)(ATSUStyle, void** styleGroup);
     99 CGFontRef (*wkGetCGFontFromNSFont)(NSFont*);
    100 void (*wkGetFontMetrics)(CGFontRef, int* ascent, int* descent, int* lineGap, unsigned* unitsPerEm);
    101 ATSLayoutRecord* (*wkGetGlyphVectorFirstRecord)(void* glyphVector);
    102 void* wkGetGlyphsForCharacters;
    103 int (*wkGetGlyphVectorNumGlyphs)(void* glyphVector);
    104 size_t (*wkGetGlyphVectorRecordSize)(void* glyphVector);
    105 OSStatus (*wkInitializeGlyphVector)(int count, void* glyphs);
    106 void (*wkReleaseStyleGroup)(void* group);
    107 ATSUFontID (*wkGetNSFontATSUFontId)(NSFont*);
    108 BOOL (*wkSupportsMultipartXMixedReplace)(NSMutableURLRequest *);
    109 #endif
    110 
    111 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
    112 NSMutableArray *(*wkNoteOpenPanelFiles)(NSArray *);
    113 #else
    114 void* wkNoteOpenPanelFiles;
    115 #endif
    116