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