Reviewed by NOBODY (OOPS!).
[WebKit-https.git] / WebKitLibraries / WebKitSystemInterface.h
1 /*      
2     WebKitSystemInterface.h
3     Copyright (C) 2005 Apple Computer, Inc. All rights reserved.    
4     
5     Public header file.
6 */
7
8 #import <Cocoa/Cocoa.h>
9
10 typedef enum {
11     WKCertificateParseResultSucceeded  = 0,
12     WKCertificateParseResultFailed     = 1,
13     WKCertificateParseResultPKCS7      = 2,
14 } WKCertificateParseResult;
15
16 CFStringRef WKCopyCFLocalizationPreferredName(CFStringRef localization);
17 CFStringRef WKSignedPublicKeyAndChallengeString(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription);
18 WKCertificateParseResult WKAddCertificatesToKeychainFromData(const void *bytes, unsigned length);
19
20 NSString *WKGetPreferredExtensionForMIMEType(NSString *type);
21 NSArray *WKGetExtensionsForMIMEType(NSString *type);
22 NSString *WKGetMIMETypeForExtension(NSString *extension);
23
24 NSDate *WKGetNSURLResponseLastModifiedDate(NSURLResponse *response);
25 NSTimeInterval WKGetNSURLResponseFreshnessLifetime(NSURLResponse *response);
26 NSTimeInterval WKGetNSURLResponseCalculatedExpiration(NSURLResponse *response);
27 BOOL WKGetNSURLResponseMustRevalidate(NSURLResponse *response);
28
29 CFStringEncoding WKGetWebDefaultCFStringEncoding(void);
30
31 float WKSecondsSinceLastInputEvent();
32 CGColorSpaceRef WKCreateUncorrectedRGBColorSpace();
33 CGColorSpaceRef WKCreateUncorrectedGrayColorSpace();
34 CFStringRef WKPreferRGB32Key();
35
36 void WKSetNSURLConnectionDefersCallbacks(NSURLConnection *connection, BOOL defers);
37 float WKSecondsSinceLastInputEvent(void);
38
39 void WKShowKeyAndMain(void);
40 OSStatus WKSyncWindowWithCGAfterMove(WindowRef);
41 unsigned WKCarbonWindowMask(void);
42 void *WKGetNativeWindowFromWindowRef(WindowRef);
43 OSType WKCarbonWindowPropertyCreator(void);
44 OSType WKCarbonWindowPropertyTag(void);
45
46 typedef id WKNSURLConnectionDelegateProxyPtr;
47
48 WKNSURLConnectionDelegateProxyPtr WKCreateNSURLConnectionDelegateProxy();
49
50 void WKDisableCGDeferredUpdates();
51
52 Class WKNSURLProtocolClassForReqest(NSURLRequest *request);
53
54 unsigned WKGetNSAutoreleasePoolCount();
55
56 NSString *WKMouseMovedNotification();
57 BOOL WKMouseIsDown();
58 void WKSetNSWindowShouldPostEventNotifications(NSWindow *window, BOOL post);
59
60 CFTypeID WKGetAXTextMarkerTypeID();
61 CFTypeID WKGetAXTextMarkerRangeTypeID();
62 CFTypeRef WKCreateAXTextMarker(const void *bytes, size_t len);
63 BOOL WKGetBytesFromAXTextMarker(CFTypeRef textMarker, void *bytes, size_t length);
64 CFTypeRef WKCreateAXTextMarkerRange(CFTypeRef start, CFTypeRef end);
65 CFTypeRef WKCopyAXTextMarkerRangeStart(CFTypeRef range);
66 CFTypeRef WKCopyAXTextMarkerRangeEnd(CFTypeRef range);
67 void WKAccessibilityHandleFocusChanged();
68 AXUIElementRef WKCreateAXUIElementRef(id element);
69 void WKUnregisterUniqueIdForElement(id element);
70
71 BOOL WKFontSmoothingModeIsLCD(int mode);
72 void WKSetUpFontCache(size_t s);
73
74 void WKSignalCFReadStreamEnd(CFReadStreamRef stream);
75 void WKSignalCFReadStreamHasBytes(CFReadStreamRef stream);
76 void WKSignalCFReadStreamError(CFReadStreamRef stream, CFStreamError *error);
77
78 CFReadStreamRef WKCreateCustomCFReadStream(void *(*formCreate)(CFReadStreamRef, void *), 
79                                                                                    void (*formFinalize)(CFReadStreamRef, void *), 
80                                                                                    Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *), 
81                                                                                    CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *), 
82                                                                                    Boolean (*formCanRead)(CFReadStreamRef, void *), 
83                                                                                    void (*formClose)(CFReadStreamRef, void *), 
84                                                                                    void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *), 
85                                                                                    void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
86                                                                                    void *context);