finally blocks should not set the exception stack trace when re-throwing the exception.
[WebKit-https.git] / WebKitLibraries / WebKitSystemInterface.h
index 8b9e2db..e213742 100644 (file)
 #else
 #import <CoreImage/CoreImage.h>
 #import <CoreText/CoreText.h>
-#if !TARGET_IPHONE_SIMULATOR
-#import <IOSurface/IOSurface.h>
-#endif
 #import <WebKitSystemInterfaceIOS.h>
 #endif
 
 @class AVAsset;
 @class AVPlayer;
+@class DDActionContext;
 @class QTMovie;
 @class QTMovieView;
 
@@ -42,16 +40,9 @@ typedef enum {
     WKCertificateParseResultPKCS7      = 2,
 } WKCertificateParseResult;
 
-CFStringRef WKCopyCFLocalizationPreferredName(CFStringRef localization);
-void WKSetDefaultLocalization(CFStringRef localization);
-
 CFStringRef WKSignedPublicKeyAndChallengeString(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription);
 WKCertificateParseResult WKAddCertificatesToKeychainFromData(const void *bytes, unsigned length);
 
-NSString *WKGetPreferredExtensionForMIMEType(NSString *type);
-NSArray *WKGetExtensionsForMIMEType(NSString *type);
-NSString *WKGetMIMETypeForExtension(NSString *extension);
-
 NSDate *WKGetNSURLResponseLastModifiedDate(NSURLResponse *response);
 NSString *WKCopyNSURLResponseStatusLine(NSURLResponse *response);
 
@@ -72,10 +63,8 @@ OSType WKCarbonWindowPropertyCreator(void);
 OSType WKCarbonWindowPropertyTag(void);
 #endif
 
-void WKDisableCGDeferredUpdates(void);
 #endif
 
-Class WKNSURLProtocolClassForRequest(NSURLRequest *request);
 void WKSetNSURLRequestShouldContentSniff(NSMutableURLRequest *request, BOOL shouldContentSniff);
 
 #if !TARGET_OS_IPHONE
@@ -85,7 +74,6 @@ unsigned WKGetNSAutoreleasePoolCount(void);
 
 void WKAdvanceDefaultButtonPulseAnimation(NSButtonCell *button);
 
-NSString *WKMouseMovedNotification(void);
 NSString *WKWindowWillOrderOnScreenNotification(void);
 NSString *WKWindowWillOrderOffScreenNotification(void);
 void WKSetNSWindowShouldPostEventNotifications(NSWindow *window, BOOL post);
@@ -124,35 +112,23 @@ pid_t WKAXRemoteProcessIdentifier(id remoteElement);
 
 void WKSetUpFontCache(void);
 
-void WKSignalCFReadStreamEnd(CFReadStreamRef stream);
-void WKSignalCFReadStreamHasBytes(CFReadStreamRef stream);
-void WKSignalCFReadStreamError(CFReadStreamRef stream, CFStreamError *error);
-
-CFReadStreamRef WKCreateCustomCFReadStream(void *(*formCreate)(CFReadStreamRef, void *), 
-    void (*formFinalize)(CFReadStreamRef, void *), 
-    Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *), 
-    CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *), 
-    Boolean (*formCanRead)(CFReadStreamRef, void *), 
-    void (*formClose)(CFReadStreamRef, void *), 
-    void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *), 
-    void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
-    void *context);
-
 #if !TARGET_OS_IPHONE
 void WKDrawCapsLockIndicator(CGContextRef, CGRect);
 
+// The CG context's current path is the focus ring's path.
+// Color and radius are ignored. Older versions of WebKit expected to
+// be able to change the rendering of the system focus ring.
 void WKDrawFocusRing(CGContextRef context, CGColorRef color, int radius);
-    // The CG context's current path is the focus ring's path.
-    // A color of 0 means "use system focus ring color".
-    // A radius of 0 means "use default focus ring radius".
+bool WKDrawFocusRingAtTime(CGContextRef context, NSTimeInterval time);
+bool WKDrawCellFocusRingWithFrameAtTime(NSCell *cell, NSRect cellFrame, NSView *controlView, NSTimeInterval time);
 
 void WKSetDragImage(NSImage *image, NSPoint offset);
 
-void WKDrawBezeledTextFieldCell(NSRect, BOOL enabled);
-void WKDrawTextFieldCellFocusRing(NSTextFieldCell*, NSRect);
 void WKDrawBezeledTextArea(NSRect, BOOL enabled);
-void WKPopupMenu(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
+
+void WKPopupMenu(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*, NSControlSize controlSize, bool usesCustomAppearance);
 void WKPopupContextMenu(NSMenu *menu, NSPoint screenLocation);
+void WKSetDDActionContextIsForActionMenu(DDActionContext *actionContext);
 void WKSendUserChangeNotifications(void);
 #ifndef __LP64__
 BOOL WKConvertNSEventToCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent);
@@ -160,7 +136,6 @@ void WKSendKeyEventToTSM(NSEvent *theEvent);
 void WKCallDrawingNotification(CGrafPtr port, Rect *bounds);
 #endif
 
-BOOL WKGetGlyphTransformedAdvances(CGFontRef, NSFont*, CGAffineTransform *m, ATSGlyphRef *glyph, CGSize *advance);
 NSFont *WKGetFontInLanguageForRange(NSFont *font, NSString *string, NSRange range);
 NSFont *WKGetFontInLanguageForCharacter(NSFont *font, UniChar ch);
 void WKSetCGFontRenderingMode(CGContextRef cgContext, NSFont *font, BOOL shouldSubpixelQuantize);
@@ -194,6 +169,8 @@ CTTypesetterRef WKCreateCTTypesetterWithUniCharProviderAndOptions(const UniChar*
 CGSize WKCTRunGetInitialAdvance(CTRunRef);
 
 #if (TARGET_OS_IPHONE && TARGET_OS_EMBEDDED) || MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+typedef struct __IOSurface *IOSurfaceRef;
+
 CGContextRef WKIOSurfaceContextCreate(IOSurfaceRef, unsigned width, unsigned height, CGColorSpaceRef);
 CGImageRef WKIOSurfaceContextCreateImage(CGContextRef context);
 #endif
@@ -221,18 +198,6 @@ NSEvent *WKCreateNSEventWithCarbonClickEvent(EventRef inEvent, WindowRef windowR
 CGContextRef WKNSWindowOverrideCGContext(NSWindow *, CGContextRef);
 void WKNSWindowRestoreCGContext(NSWindow *, CGContextRef);
 
-void WKNSWindowMakeBottomCornersSquare(NSWindow *);
-
-// These constants match the ones used by ThemeScrollbarArrowStyle (some of the values are private, so we can't just
-// use that enum directly).
-typedef enum {
-    WKThemeScrollBarArrowsSingle     = 0,
-    WKThemeScrollBarArrowsLowerRight = 1,
-    WKThemeScrollBarArrowsDouble     = 2,
-    WKThemeScrollBarArrowsUpperLeft  = 3,
-} WKThemeScrollBarArrowStyle;
-
-OSStatus WKThemeDrawTrack(const HIThemeTrackDrawInfo* inDrawInfo, CGContextRef inContext, int inArrowStyle);
 #endif
 
 
@@ -256,10 +221,8 @@ int WKQTMovieGetType(QTMovie* movie);
 BOOL WKQTMovieHasClosedCaptions(QTMovie* movie);
 void WKQTMovieSetShowClosedCaptions(QTMovie* movie, BOOL showClosedCaptions);
 void WKQTMovieSelectPreferredAlternates(QTMovie* movie);
-void WKQTMovieSelectPreferredAlternateTrackForMediaType(QTMovie* movie, NSString* mediaType);
 
 unsigned WKQTIncludeOnlyModernMediaFileTypes(void);
-int WKQTMovieDataRate(QTMovie* movie);
 float WKQTMovieMaxTimeLoaded(QTMovie* movie);
 float WKQTMovieMaxTimeSeekable(QTMovie* movie);
 NSString *WKQTMovieMaxTimeLoadedChangeNotification(void);
@@ -289,8 +252,6 @@ void WKDeleteHTTPCookie(CFHTTPCookieStorageRef, NSHTTPCookie *);
 CFHTTPCookieStorageRef WKGetDefaultHTTPCookieStorage(void);
 WKCFURLCredentialRef WKCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef);
 void WKSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool flag);
-CFArrayRef WKCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef);
-void WKCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts);
 
 #if !TARGET_OS_IPHONE
 void WKSetVisibleApplicationName(CFStringRef);
@@ -391,11 +352,6 @@ void WKDestroyRenderingResources(void);
 
 void WKCALayerEnumerateRectsBeingDrawnWithBlock(CALayer *layer, CGContextRef context, void (^block)(CGRect rect));
 
-@class CARenderer;
-
-void WKCARendererAddChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
-void WKCARendererRemoveChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
-
 #if !TARGET_OS_IPHONE
 typedef struct __WKWindowBounceAnimationContext *WKWindowBounceAnimationContextRef;
 
@@ -414,9 +370,6 @@ NSUInteger WKGetInputPanelWindowStyle(void);
 UInt8 WKGetNSEventKeyChar(NSEvent *);
 #endif
 
-@class CAPropertyAnimation;
-void WKSetCAAnimationValueFunction(CAPropertyAnimation*, NSString* function);
-
 unsigned WKInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
 int WKGetHTTPRequestPriority(CFURLRequestRef);
 void WKSetHTTPRequestMaximumPriority(int maximumPriority);
@@ -432,13 +385,13 @@ CFHTTPMessageRef WKCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseUR
 void WKWindowSetAlpha(NSWindow *window, float alphaValue);
 void WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame);
 
-void WKSyncSurfaceToView(NSView *view);
-
 void WKEnableSettingCursorWhenInBackground(void);
 #endif
 
 CFDictionaryRef WKNSURLRequestCreateSerializableRepresentation(NSURLRequest *request, CFTypeRef tokenNull);
 NSURLRequest *WKNSURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
+CFDictionaryRef WKCFURLRequestCreateSerializableRepresentation(CFURLRequestRef cfRequest, CFTypeRef tokenNull);
+CFURLRequestRef WKCreateCFURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
 
 CFDictionaryRef WKNSURLResponseCreateSerializableRepresentation(NSURLResponse *response, CFTypeRef tokenNull);
 NSURLResponse *WKNSURLResponseFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
@@ -456,9 +409,6 @@ CFHTTPMessageRef WKGetCFURLResponseHTTPResponse(CFURLResponseRef);
 CFStringRef WKCopyCFURLResponseSuggestedFilename(CFURLResponseRef);
 void WKSetCFURLResponseMIMEType(CFURLResponseRef, CFStringRef mimeType);
 
-CIFormat WKCIGetRGBA8Format(void);
-
-#if !TARGET_OS_IPHONE
 typedef enum {
     WKSandboxExtensionTypeReadOnly,
     WKSandboxExtensionTypeReadWrite,
@@ -474,6 +424,7 @@ bool WKSandboxExtensionInvalidate(WKSandboxExtensionRef sandboxExtension);
 const char* WKSandboxExtensionGetSerializedFormat(WKSandboxExtensionRef sandboxExtension, size_t* length);
 WKSandboxExtensionRef WKSandboxExtensionCreateFromSerializedFormat(const char* serializationFormat, size_t length);
 
+#if !TARGET_OS_IPHONE
 OSStatus WKEnableSandboxStyleFileQuarantine(void);
 
 int WKRecommendedScrollerStyle(void);
@@ -491,8 +442,6 @@ CFStringRef WKCopyDefaultSearchProviderDisplayName(void);
 
 void WKSetCrashReportApplicationSpecificInformation(CFStringRef);
 
-NSURL* WKAVAssetResolvedURL(AVAsset*);
-
 #if !TARGET_OS_IPHONE
 NSCursor *WKCursor(const char *name);
 #endif
@@ -561,6 +510,8 @@ typedef enum {
 int WKExernalDeviceTypeForPlayer(AVPlayer *);
 NSString *WKExernalDeviceDisplayNameForPlayer(AVPlayer *);
 
+bool WKQueryDecoderAvailability(void);
+
 #ifdef __cplusplus
 }
 #endif