Remove some dead code.
[WebKit-https.git] / Source / WebCore / platform / mac / WebCoreSystemInterface.mm
1 /*
2  * Copyright 2006, 2007, 2008, 2009, 2010 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 CFStringRef (*wkCopyCFLocalizationPreferredName)(CFStringRef);
33 NSString* (*wkCopyNSURLResponseStatusLine)(NSURLResponse*);
34 NSString* (*wkCreateURLPasteboardFlavorTypeName)(void);
35 NSString* (*wkCreateURLNPasteboardFlavorTypeName)(void);
36 void (*wkDrawBezeledTextFieldCell)(NSRect, BOOL enabled);
37 void (*wkDrawTextFieldCellFocusRing)(NSTextFieldCell*, NSRect);
38 void (*wkDrawCapsLockIndicator)(CGContextRef, CGRect);
39 void (*wkDrawBezeledTextArea)(NSRect, BOOL enabled);
40 void (*wkDrawFocusRing)(CGContextRef, CGColorRef, int radius);
41 NSFont* (*wkGetFontInLanguageForRange)(NSFont*, NSString*, NSRange);
42 NSFont* (*wkGetFontInLanguageForCharacter)(NSFont*, UniChar);
43 BOOL (*wkGetGlyphTransformedAdvances)(CGFontRef, NSFont*, CGAffineTransform*, ATSGlyphRef*, CGSize* advance);
44 void (*wkDrawMediaSliderTrack)(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, 
45     float duration, unsigned state);
46 BOOL (*wkHitTestMediaUIPart)(int part, int themeStyle, CGRect bounds, CGPoint point);
47 void (*wkDrawMediaUIPart)(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
48 void (*wkMeasureMediaUIPart)(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
49 BOOL (*wkMediaControllerThemeAvailable)(int themeStyle);
50 NSString* (*wkGetPreferredExtensionForMIMEType)(NSString*);
51 CFStringRef (*wkSignedPublicKeyAndChallengeString)(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription);
52 NSArray* (*wkGetExtensionsForMIMEType)(NSString*);
53 NSString* (*wkGetMIMETypeForExtension)(NSString*);
54 NSTimeInterval (*wkGetNSURLResponseCalculatedExpiration)(NSURLResponse *response);
55 NSDate *(*wkGetNSURLResponseLastModifiedDate)(NSURLResponse *response);
56 BOOL (*wkGetNSURLResponseMustRevalidate)(NSURLResponse *response);
57 void (*wkGetWheelEventDeltas)(NSEvent*, float* deltaX, float* deltaY, BOOL* continuous);
58 void (*wkPopupMenu)(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
59 unsigned (*wkQTIncludeOnlyModernMediaFileTypes)(void);
60 int (*wkQTMovieDataRate)(QTMovie*);
61 void (*wkQTMovieDisableComponent)(uint32_t[5]);
62 float (*wkQTMovieMaxTimeLoaded)(QTMovie*);
63 NSString *(*wkQTMovieMaxTimeLoadedChangeNotification)(void);
64 float (*wkQTMovieMaxTimeSeekable)(QTMovie*);
65 int (*wkQTMovieGetType)(QTMovie*);
66 BOOL (*wkQTMovieHasClosedCaptions)(QTMovie*);
67 void (*wkQTMovieSetShowClosedCaptions)(QTMovie*, BOOL);
68 void (*wkQTMovieSelectPreferredAlternates)(QTMovie*);
69 void (*wkQTMovieViewSetDrawSynchronously)(QTMovieView*, BOOL);
70 NSArray *(*wkQTGetSitesInMediaDownloadCache)();
71 void (*wkQTClearMediaDownloadCacheForSite)(NSString *site);
72 void (*wkQTClearMediaDownloadCache)();
73
74 void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
75 void (*wkSetCookieStoragePrivateBrowsingEnabled)(BOOL);
76 void (*wkSetDragImage)(NSImage*, NSPoint offset);
77 void (*wkSetPatternBaseCTM)(CGContextRef, CGAffineTransform);
78 void (*wkSetPatternPhaseInUserSpace)(CGContextRef, CGPoint point);
79 CGAffineTransform (*wkGetUserToBaseCTM)(CGContextRef);
80 void (*wkSetUpFontCache)();
81 void (*wkSignalCFReadStreamEnd)(CFReadStreamRef stream);
82 void (*wkSignalCFReadStreamHasBytes)(CFReadStreamRef stream);
83 void (*wkSignalCFReadStreamError)(CFReadStreamRef stream, CFStreamError *error);
84 CFReadStreamRef (*wkCreateCustomCFReadStream)(void *(*formCreate)(CFReadStreamRef, void *), 
85     void (*formFinalize)(CFReadStreamRef, void *), 
86     Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *), 
87     CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *), 
88     Boolean (*formCanRead)(CFReadStreamRef, void *), 
89     void (*formClose)(CFReadStreamRef, void *), 
90     void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *), 
91     void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
92     void *context);
93 void (*wkSetNSURLConnectionDefersCallbacks)(NSURLConnection *, BOOL);
94 void (*wkSetNSURLRequestShouldContentSniff)(NSMutableURLRequest *, BOOL);
95 id (*wkCreateNSURLConnectionDelegateProxy)(void);
96 unsigned (*wkInitializeMaximumHTTPConnectionCountPerHost)(unsigned preferredConnectionCount);
97 int (*wkGetHTTPPipeliningPriority)(NSURLRequest *);
98 void (*wkSetHTTPPipeliningMaximumPriority)(int priority);
99 void (*wkSetHTTPPipeliningPriority)(NSMutableURLRequest *, int priority);
100 void (*wkSetHTTPPipeliningMinimumFastLanePriority)(int priority);
101 void (*wkSetCONNECTProxyForStream)(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
102 void (*wkSetCONNECTProxyAuthorizationForStream)(CFReadStreamRef, CFStringRef proxyAuthorizationString);
103 CFHTTPMessageRef (*wkCopyCONNECTProxyResponse)(CFReadStreamRef, CFURLRef responseURL);
104
105 void (*wkGetGlyphsForCharacters)(CGFontRef, const UniChar[], CGGlyph[], size_t);
106
107 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
108 void* wkGetHyphenationLocationBeforeIndex;
109 #else
110 CFIndex (*wkGetHyphenationLocationBeforeIndex)(CFStringRef string, CFIndex index);
111 int (*wkGetNSEventMomentumPhase)(NSEvent *);
112 #endif
113
114 CTLineRef (*wkCreateCTLineWithUniCharProvider)(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
115 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
116 CTTypesetterRef (*wkCreateCTTypesetterWithUniCharProviderAndOptions)(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
117
118 CGContextRef (*wkIOSurfaceContextCreate)(IOSurfaceRef surface, unsigned width, unsigned height, CGColorSpaceRef colorSpace);
119 CGImageRef (*wkIOSurfaceContextCreateImage)(CGContextRef context);
120
121 WKScrollbarPainterRef (*wkMakeScrollbarPainter)(int controlSize, bool isHorizontal);
122 WKScrollbarPainterRef (*wkMakeScrollbarReplacementPainter)(WKScrollbarPainterRef oldPainter, int newStyle, int controlSize, bool isHorizontal);
123 void (*wkScrollbarPainterSetDelegate)(WKScrollbarPainterRef, id scrollbarPainterDelegate);
124 void (*wkScrollbarPainterPaint)(WKScrollbarPainterRef, bool enabled, double value, CGFloat proportion, CGRect frameRect);
125 void (*wkScrollbarPainterForceFlashScrollers)(WKScrollbarPainterControllerRef);
126 int (*wkScrollbarThickness)(int controlSize);
127 int (*wkScrollbarMinimumThumbLength)(WKScrollbarPainterRef);
128 int (*wkScrollbarMinimumTotalLengthNeededForThumb)(WKScrollbarPainterRef);
129 CGFloat (*wkScrollbarPainterKnobAlpha)(WKScrollbarPainterRef);
130 void (*wkSetScrollbarPainterKnobAlpha)(WKScrollbarPainterRef, CGFloat);
131 CGFloat (*wkScrollbarPainterTrackAlpha)(WKScrollbarPainterRef);
132 void (*wkSetScrollbarPainterTrackAlpha)(WKScrollbarPainterRef, CGFloat);
133 bool (*wkScrollbarPainterIsHorizontal)(WKScrollbarPainterRef);
134 CGRect (*wkScrollbarPainterKnobRect)(WKScrollbarPainterRef);
135 void (*wkScrollbarPainterSetOverlayState)(WKScrollbarPainterRef, int overlayScrollerState);
136 void (*wkSetScrollbarPainterKnobStyle)(WKScrollbarPainterRef, wkScrollerKnobStyle);
137
138 WKScrollbarPainterControllerRef (*wkMakeScrollbarPainterController)(id painterControllerDelegate);
139 void (*wkSetPainterForPainterController)(WKScrollbarPainterControllerRef, WKScrollbarPainterRef, bool isHorizontal);
140 WKScrollbarPainterRef (*wkVerticalScrollbarPainterForController)(WKScrollbarPainterControllerRef);
141 WKScrollbarPainterRef (*wkHorizontalScrollbarPainterForController)(WKScrollbarPainterControllerRef);
142 void (*wkSetScrollbarPainterControllerStyle)(WKScrollbarPainterControllerRef, int newStyle);
143 void (*wkContentAreaScrolled)(WKScrollbarPainterControllerRef);
144 void (*wkContentAreaWillPaint)(WKScrollbarPainterControllerRef);
145 void (*wkMouseEnteredContentArea)(WKScrollbarPainterControllerRef);
146 void (*wkMouseExitedContentArea)(WKScrollbarPainterControllerRef);
147 void (*wkMouseMovedInContentArea)(WKScrollbarPainterControllerRef);
148 void (*wkWillStartLiveResize)(WKScrollbarPainterControllerRef);
149 void (*wkContentAreaResized)(WKScrollbarPainterControllerRef);
150 void (*wkWillEndLiveResize)(WKScrollbarPainterControllerRef);
151 void (*wkContentAreaDidShow)(WKScrollbarPainterControllerRef);
152 void (*wkContentAreaDidHide)(WKScrollbarPainterControllerRef);
153 void (*wkDidBeginScrollGesture)(WKScrollbarPainterControllerRef);
154 void (*wkDidEndScrollGesture)(WKScrollbarPainterControllerRef);
155
156 bool (*wkScrollbarPainterUsesOverlayScrollers)(void);
157 #endif
158
159 void (*wkUnregisterUniqueIdForElement)(id element);
160 void (*wkAccessibilityHandleFocusChanged)(void);
161 CFTypeID (*wkGetAXTextMarkerTypeID)(void);
162 CFTypeID (*wkGetAXTextMarkerRangeTypeID)(void);
163 CFTypeRef (*wkCreateAXTextMarkerRange)(CFTypeRef start, CFTypeRef end);
164 CFTypeRef (*wkCopyAXTextMarkerRangeStart)(CFTypeRef range);
165 CFTypeRef (*wkCopyAXTextMarkerRangeEnd)(CFTypeRef range);
166 CFTypeRef (*wkCreateAXTextMarker)(const void *bytes, size_t len);
167 BOOL (*wkGetBytesFromAXTextMarker)(CFTypeRef textMarker, void *bytes, size_t length);
168 AXUIElementRef (*wkCreateAXUIElementRef)(id element);
169
170 CFURLStorageSessionRef (*wkCreatePrivateStorageSession)(CFStringRef);
171 NSURLRequest* (*wkCopyRequestWithStorageSession)(CFURLStorageSessionRef, NSURLRequest*);
172 CFHTTPCookieStorageRef (*wkCopyHTTPCookieStorage)(CFURLStorageSessionRef);
173 unsigned (*wkGetHTTPCookieAcceptPolicy)(CFHTTPCookieStorageRef);
174 NSArray *(*wkHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSURL *);
175 void (*wkSetHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
176 void (*wkDeleteHTTPCookie)(CFHTTPCookieStorageRef, NSHTTPCookie *);
177
178 CFStringRef (*wkGetCFURLResponseMIMEType)(CFURLResponseRef);
179 CFURLRef (*wkGetCFURLResponseURL)(CFURLResponseRef);
180 CFHTTPMessageRef (*wkGetCFURLResponseHTTPResponse)(CFURLResponseRef);
181 CFStringRef (*wkCopyCFURLResponseSuggestedFilename)(CFURLResponseRef);
182 void (*wkSetCFURLResponseMIMEType)(CFURLResponseRef, CFStringRef mimeType);