Repository navigation
Expand file tree
/
Copy pathWebKitSystemInterface.h
More file actions
517 lines (397 loc) · 19.9 KB
/
Copy pathWebKitSystemInterface.h
File metadata and controls
517 lines (397 loc) · 19.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
/*
WebKitSystemInterface.h
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
Public header file.
*/
#import <Foundation/Foundation.h>
#import <dispatch/dispatch.h>
#if !TARGET_OS_IPHONE
#import <AppKit/AppKit.h>
#import <Carbon/Carbon.h>
#else
#import <CoreImage/CoreImage.h>
#import <CoreText/CoreText.h>
#import <WebKitSystemInterfaceIOS.h>
#endif
@class AVAsset;
@class AVPlayer;
@class DDActionContext;
@class QTMovie;
@class QTMovieView;
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _CFURLResponse* CFURLResponseRef;
typedef const struct _CFURLRequest* CFURLRequestRef;
typedef struct _CFURLRequest* CFMutableURLRequestRef;
typedef struct _CFURLCredential* WKCFURLCredentialRef;
typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
typedef enum {
WKCertificateParseResultSucceeded = 0,
WKCertificateParseResultFailed = 1,
WKCertificateParseResultPKCS7 = 2,
} WKCertificateParseResult;
CFStringRef WKSignedPublicKeyAndChallengeString(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription);
WKCertificateParseResult WKAddCertificatesToKeychainFromData(const void *bytes, unsigned length);
NSDate *WKGetNSURLResponseLastModifiedDate(NSURLResponse *response);
NSString *WKCopyNSURLResponseStatusLine(NSURLResponse *response);
CFArrayRef WKCopyNSURLResponseCertificateChain(NSURLResponse *response);
CFStringEncoding WKGetWebDefaultCFStringEncoding(void);
void WKSetMetadataURL(NSString *URLString, NSString *referrer, NSString *path);
void WKSetNSURLConnectionDefersCallbacks(NSURLConnection *connection, BOOL defers);
#if !TARGET_OS_IPHONE
void WKShowKeyAndMain(void);
#ifndef __LP64__
OSStatus WKSyncWindowWithCGAfterMove(WindowRef);
unsigned WKCarbonWindowMask(void);
void *WKGetNativeWindowFromWindowRef(WindowRef);
OSType WKCarbonWindowPropertyCreator(void);
OSType WKCarbonWindowPropertyTag(void);
#endif
#endif
void WKSetNSURLRequestShouldContentSniff(NSMutableURLRequest *request, BOOL shouldContentSniff);
#if !TARGET_OS_IPHONE
#ifndef __LP64__
unsigned WKGetNSAutoreleasePoolCount(void);
#endif
void WKAdvanceDefaultButtonPulseAnimation(NSButtonCell *button);
NSString *WKWindowWillOrderOnScreenNotification(void);
NSString *WKWindowWillOrderOffScreenNotification(void);
void WKSetNSWindowShouldPostEventNotifications(NSWindow *window, BOOL post);
CFTypeID WKGetAXTextMarkerTypeID(void);
CFTypeID WKGetAXTextMarkerRangeTypeID(void);
CFTypeRef WKCreateAXTextMarker(const void *bytes, size_t len);
BOOL WKGetBytesFromAXTextMarker(CFTypeRef textMarker, void *bytes, size_t length);
CFTypeRef WKCreateAXTextMarkerRange(CFTypeRef start, CFTypeRef end);
CFTypeRef WKCopyAXTextMarkerRangeStart(CFTypeRef range);
CFTypeRef WKCopyAXTextMarkerRangeEnd(CFTypeRef range);
void WKAccessibilityHandleFocusChanged(void);
AXUIElementRef WKCreateAXUIElementRef(id element);
void WKUnregisterUniqueIdForElement(id element);
NSArray *WKSpeechSynthesisGetVoiceIdentifiers(void);
NSString *WKSpeechSynthesisGetDefaultVoiceIdentifierForLocale(NSLocale*);
#endif
BOOL WKShouldBlockPlugin(NSString *bundleIdentifier, NSString *bundleVersionString);
BOOL WKIsPluginUpdateAvailable(NSString *bundleIdentifier);
BOOL WKShouldBlockWebGL();
BOOL WKShouldSuggestBlockingWebGL();
// Remote Accessibility API.
#if !TARGET_OS_IPHONE
void WKAXRegisterRemoteApp(void);
void WKAXInitializeElementWithPresenterPid(id, pid_t);
NSData *WKAXRemoteTokenForElement(id);
id WKAXRemoteElementForToken(NSData *);
void WKAXSetWindowForRemoteElement(id remoteWindow, id remoteElement);
void WKAXRegisterRemoteProcess(bool registerProcess, pid_t);
pid_t WKAXRemoteProcessIdentifier(id remoteElement);
#endif
void WKSetUpFontCache(void);
#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);
bool WKDrawFocusRingAtTime(CGContextRef context, NSTimeInterval time);
bool WKDrawCellFocusRingWithFrameAtTime(NSCell *cell, NSRect cellFrame, NSView *controlView, NSTimeInterval time);
void WKSetDragImage(NSImage *image, NSPoint offset);
void WKDrawBezeledTextArea(NSRect, BOOL enabled);
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);
void WKSendKeyEventToTSM(NSEvent *theEvent);
void WKCallDrawingNotification(CGrafPtr port, Rect *bounds);
#endif
NSFont *WKGetFontInLanguageForRange(NSFont *font, NSString *string, NSRange range);
NSFont *WKGetFontInLanguageForCharacter(NSFont *font, UniChar ch);
void WKSetCGFontRenderingMode(CGContextRef cgContext, NSFont *font, BOOL shouldSubpixelQuantize);
#endif
BOOL WKCGContextGetShouldSmoothFonts(CGContextRef cgContext);
void WKSetBaseCTM(CGContextRef, CGAffineTransform);
void WKSetPatternPhaseInUserSpace(CGContextRef, CGPoint);
CGAffineTransform WKGetUserToBaseCTM(CGContextRef);
void WKGetGlyphsForCharacters(CGFontRef, const UniChar[], CGGlyph[], size_t);
bool WKGetVerticalGlyphsForCharacters(CTFontRef, const UniChar[], CGGlyph[], size_t);
CTLineRef WKCreateCTLineWithUniCharProvider(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
#if TARGET_OS_IPHONE || MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
enum {
WKCTFontTransformApplyShaping = (1 << 0),
WKCTFontTransformApplyPositioning = (1 << 1)
};
typedef int WKCTFontTransformOptions;
bool WKCTFontTransformGlyphs(CTFontRef font, CGGlyph glyphs[], CGSize advances[], CFIndex count, WKCTFontTransformOptions options);
#endif // TARGET_OS_IPHONE || MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
CTTypesetterRef WKCreateCTTypesetterWithUniCharProviderAndOptions(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
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
typedef enum {
WKPatternTilingNoDistortion,
WKPatternTilingConstantSpacingMinimalDistortion,
WKPatternTilingConstantSpacing
} WKPatternTiling;
CGPatternRef WKCGPatternCreateWithImageAndTransform(CGImageRef image, CGAffineTransform transform, int tiling);
void WKCGContextResetClip(CGContextRef);
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
bool WKCGContextDrawsWithCorrectShadowOffsets(CGContextRef);
#endif
#if !TARGET_OS_IPHONE
#ifndef __LP64__
NSEvent *WKCreateNSEventWithCarbonEvent(EventRef eventRef);
NSEvent *WKCreateNSEventWithCarbonMouseMoveEvent(EventRef inEvent, NSWindow *window);
NSEvent *WKCreateNSEventWithCarbonClickEvent(EventRef inEvent, WindowRef windowRef);
#endif
CGContextRef WKNSWindowOverrideCGContext(NSWindow *, CGContextRef);
void WKNSWindowRestoreCGContext(NSWindow *, CGContextRef);
#endif
BOOL WKCGContextIsBitmapContext(CGContextRef context);
bool WKCGContextIsPDFContext(CGContextRef context);
#if !TARGET_OS_IPHONE
void WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, BOOL *continuous);
BOOL WKAppVersionCheckLessThan(NSString *, int, double);
typedef enum {
WKMovieTypeUnknown,
WKMovieTypeDownload,
WKMovieTypeStoredStream,
WKMovieTypeLiveStream
} WKMovieType;
int WKQTMovieGetType(QTMovie* movie);
BOOL WKQTMovieHasClosedCaptions(QTMovie* movie);
void WKQTMovieSetShowClosedCaptions(QTMovie* movie, BOOL showClosedCaptions);
void WKQTMovieSelectPreferredAlternates(QTMovie* movie);
unsigned WKQTIncludeOnlyModernMediaFileTypes(void);
float WKQTMovieMaxTimeLoaded(QTMovie* movie);
float WKQTMovieMaxTimeSeekable(QTMovie* movie);
NSString *WKQTMovieMaxTimeLoadedChangeNotification(void);
void WKQTMovieViewSetDrawSynchronously(QTMovieView* view, BOOL sync);
void WKQTMovieDisableComponent(uint32_t[5]);
NSURL *WKQTMovieResolvedURL(QTMovie* movie);
#endif
CFStringRef WKCopyFoundationCacheDirectory(void);
typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
CFURLStorageSessionRef WKCreatePrivateStorageSession(CFStringRef);
NSURLRequest *WKCopyRequestWithStorageSession(CFURLStorageSessionRef, NSURLRequest *);
NSCachedURLResponse *WKCachedResponseForRequest(CFURLStorageSessionRef, NSURLRequest *);
void WKSetRequestStorageSession(CFURLStorageSessionRef, CFMutableURLRequestRef);
typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
CFHTTPCookieStorageRef WKCopyHTTPCookieStorage(CFURLStorageSessionRef);
unsigned WKGetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef);
void WKSetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef, unsigned policy);
NSArray *WKHTTPCookies(CFHTTPCookieStorageRef);
NSArray *WKHTTPCookiesForURL(CFHTTPCookieStorageRef, NSURL *, NSURL *);
void WKSetHTTPCookiesForURL(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
void WKDeleteAllHTTPCookies(CFHTTPCookieStorageRef);
void WKDeleteHTTPCookie(CFHTTPCookieStorageRef, NSHTTPCookie *);
CFHTTPCookieStorageRef WKGetDefaultHTTPCookieStorage(void);
WKCFURLCredentialRef WKCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef);
void WKSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool flag);
#if !TARGET_OS_IPHONE
void WKSetVisibleApplicationName(CFStringRef);
void WKSetApplicationInformationItem(CFStringRef key, CFTypeRef value);
#endif
CFURLRef WKCopyBundleURLForExecutableURL(CFURLRef);
#if !TARGET_OS_IPHONE
typedef enum {
WKMediaUIPartFullscreenButton = 0,
WKMediaUIPartMuteButton,
WKMediaUIPartPlayButton,
WKMediaUIPartSeekBackButton,
WKMediaUIPartSeekForwardButton,
WKMediaUIPartTimelineSlider,
WKMediaUIPartTimelineSliderThumb,
WKMediaUIPartRewindButton,
WKMediaUIPartSeekToRealtimeButton,
WKMediaUIPartShowClosedCaptionsButton,
WKMediaUIPartHideClosedCaptionsButton,
WKMediaUIPartUnMuteButton,
WKMediaUIPartPauseButton,
WKMediaUIPartBackground,
WKMediaUIPartCurrentTimeDisplay,
WKMediaUIPartTimeRemainingDisplay,
WKMediaUIPartStatusDisplay,
WKMediaUIPartControlsPanel,
WKMediaUIPartVolumeSliderContainer,
WKMediaUIPartVolumeSlider,
WKMediaUIPartVolumeSliderThumb,
WKMediaUIPartFullScreenVolumeSlider,
WKMediaUIPartFullScreenVolumeSliderThumb,
WKMediaUIPartVolumeSliderMuteButton,
WKMediaUIPartTextTrackDisplayContainer,
WKMediaUIPartTextTrackDisplay,
WKMediaUIPartExitFullscreenButton,
} WKMediaUIPart;
typedef enum {
WKMediaControllerFlagDisabled = 1 << 0,
WKMediaControllerFlagPressed = 1 << 1,
WKMediaControllerFlagDrawEndCaps = 1 << 3,
WKMediaControllerFlagFocused = 1 << 4
} WKMediaControllerThemeState;
BOOL WKHitTestMediaUIPart(int part, CGRect bounds, CGPoint point);
void WKMeasureMediaUIPart(int part, CGRect *bounds, CGSize *naturalSize);
void WKDrawMediaUIPart(int part, CGContextRef context, CGRect rect, unsigned state);
void WKDrawMediaSliderTrack(CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
NSView *WKCreateMediaUIBackgroundView(void);
typedef enum {
WKMediaUIControlTimeline,
WKMediaUIControlSlider,
WKMediaUIControlPlayPauseButton,
WKMediaUIControlExitFullscreenButton,
WKMediaUIControlRewindButton,
WKMediaUIControlFastForwardButton,
WKMediaUIControlVolumeUpButton,
WKMediaUIControlVolumeDownButton
} WKMediaUIControlType;
NSControl *WKCreateMediaUIControl(int controlType);
NSArray *WKQTGetSitesInMediaDownloadCache();
void WKQTClearMediaDownloadCacheForSite(NSString *site);
void WKQTClearMediaDownloadCache();
mach_port_t WKInitializeRenderServer(void);
#endif
@class CALayer;
CALayer *WKMakeRenderLayer(uint32_t contextID);
#if !TARGET_OS_IPHONE
typedef struct __WKSoftwareCARendererRef *WKSoftwareCARendererRef;
WKSoftwareCARendererRef WKSoftwareCARendererCreate(uint32_t contextID);
void WKSoftwareCARendererDestroy(WKSoftwareCARendererRef);
void WKSoftwareCARendererRender(WKSoftwareCARendererRef, CGContextRef, CGRect);
#endif
typedef struct __WKCAContextRef *WKCAContextRef;
WKCAContextRef WKCAContextMakeRemoteWithServerPort(mach_port_t port);
#if !TARGET_OS_IPHONE
WKCAContextRef WKCAContextMakeRemoteForWindowServer(void);
#endif
void WKCAContextInvalidate(WKCAContextRef);
uint32_t WKCAContextGetContextId(WKCAContextRef);
void WKCAContextSetLayer(WKCAContextRef, CALayer *);
CALayer *WKCAContextGetLayer(WKCAContextRef);
void WKCAContextSetColorSpace(WKCAContextRef, CGColorSpaceRef);
CGColorSpaceRef WKCAContextGetColorSpace(WKCAContextRef);
void WKDestroyRenderingResources(void);
void WKCALayerEnumerateRectsBeingDrawnWithBlock(CALayer *layer, CGContextRef context, void (^block)(CGRect rect));
#if !TARGET_OS_IPHONE
typedef struct __WKWindowBounceAnimationContext *WKWindowBounceAnimationContextRef;
WKWindowBounceAnimationContextRef WKWindowBounceAnimationContextCreate(NSWindow *window);
void WKWindowBounceAnimationContextDestroy(WKWindowBounceAnimationContextRef context);
void WKWindowBounceAnimationSetAnimationProgress(WKWindowBounceAnimationContextRef context, double animationProgress);
void WKWindowSetClipRect(NSWindow*, NSRect);
#if defined(__x86_64__)
#import <mach/mig.h>
CFRunLoopSourceRef WKCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t serverPort);
#endif
NSUInteger WKGetInputPanelWindowStyle(void);
UInt8 WKGetNSEventKeyChar(NSEvent *);
#endif
unsigned WKInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
int WKGetHTTPRequestPriority(CFURLRequestRef);
void WKSetHTTPRequestMaximumPriority(int maximumPriority);
void WKSetHTTPRequestPriority(CFURLRequestRef, int priority);
void WKSetHTTPRequestMinimumFastLanePriority(int priority);
void WKHTTPRequestEnablePipelining(CFURLRequestRef);
void WKSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
void WKSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
CFHTTPMessageRef WKCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL, CFStringRef proxyHost, CFNumberRef proxyPort);
#if !TARGET_OS_IPHONE
void WKWindowSetAlpha(NSWindow *window, float alphaValue);
void WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame);
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);
#if !TARGET_OS_IPHONE && !defined(__LP64__)
ScriptCode WKGetScriptCodeFromCurrentKeyboardInputSource(void);
#endif
CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStore(void);
void WKCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostArray);
CFStringRef WKGetCFURLResponseMIMEType(CFURLResponseRef);
CFURLRef WKGetCFURLResponseURL(CFURLResponseRef);
CFHTTPMessageRef WKGetCFURLResponseHTTPResponse(CFURLResponseRef);
CFStringRef WKCopyCFURLResponseSuggestedFilename(CFURLResponseRef);
void WKSetCFURLResponseMIMEType(CFURLResponseRef, CFStringRef mimeType);
typedef enum {
WKSandboxExtensionTypeReadOnly,
WKSandboxExtensionTypeReadWrite,
} WKSandboxExtensionType;
typedef struct __WKSandboxExtension *WKSandboxExtensionRef;
WKSandboxExtensionRef WKSandboxExtensionCreate(const char* path, WKSandboxExtensionType type);
void WKSandboxExtensionDestroy(WKSandboxExtensionRef sandboxExtension);
bool WKSandboxExtensionConsume(WKSandboxExtensionRef sandboxExtension);
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);
bool WKExecutableWasLinkedOnOrBeforeSnowLeopard(void);
NSRange WKExtractWordDefinitionTokenRangeFromContextualString(NSString *contextString, NSRange range, NSDictionary **options);
void WKShowWordDefinitionWindow(NSAttributedString *term, NSPoint screenPoint, NSDictionary *options);
void WKHideWordDefinitionWindow(void);
#endif
#if !TARGET_OS_IPHONE
CFStringRef WKCopyDefaultSearchProviderDisplayName(void);
#endif
void WKSetCrashReportApplicationSpecificInformation(CFStringRef);
#if !TARGET_OS_IPHONE
NSCursor *WKCursor(const char *name);
#endif
dispatch_source_t WKCreateVMPressureDispatchOnMainQueue(void);
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
dispatch_source_t WKCreateMemoryStatusPressureCriticalDispatchOnMainQueue(void);
#endif
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
bool WKExecutableWasLinkedOnOrBeforeLion(void);
#endif
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
bool WKExecutableWasLinkedOnOrBeforeMountainLion(void);
#endif
void WKCGPathAddRoundedRect(CGMutablePathRef path, const CGAffineTransform* matrix, CGRect rect, CGFloat cornerWidth, CGFloat cornerHeight);
void WKCFURLRequestAllowAllPostCaching(CFURLRequestRef);
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
CGFloat WKNSElasticDeltaForTimeDelta(CGFloat initialPosition, CGFloat initialVelocity, CGFloat elapsedTime);
CGFloat WKNSElasticDeltaForReboundDelta(CGFloat delta);
CGFloat WKNSReboundDeltaForElasticDelta(CGFloat delta);
#endif
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
typedef enum {
WKOcclusionNotificationTypeApplicationBecameVisible,
WKOcclusionNotificationTypeApplicationBecameOccluded,
WKOcclusionNotificationTypeApplicationWindowModificationsStarted,
WKOcclusionNotificationTypeApplicationWindowModificationsStopped,
WKOcclusionNotificationTypeWindowBecameVisible,
WKOcclusionNotificationTypeWindowBecameOccluded,
} WKOcclusionNotificationType;
typedef uint32_t WKWindowID;
typedef void (*WKOcclusionNotificationHandler)(uint32_t, void* data, uint32_t dataLength, void*, uint32_t);
bool WKRegisterOcclusionNotificationHandler(WKOcclusionNotificationType, WKOcclusionNotificationHandler);
bool WKUnregisterOcclusionNotificationHandler(WKOcclusionNotificationType, WKOcclusionNotificationHandler);
bool WKEnableWindowOcclusionNotifications(NSInteger windowID, bool *outCurrentOcclusionState);
#endif
void WKCFNetworkSetOverrideSystemProxySettings(CFDictionaryRef);
#if TARGET_OS_IPHONE || MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
bool WKIsPublicSuffix(NSString *domain);
CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStoreForPartition(CFStringRef partition);
typedef void (^CFURLCacheCopyAllPartitionNamesResultsNotification)(CFArrayRef partitionNames);
void WKCFURLCacheDeleteHostNamesInPersistentStoreForPartition(CFArrayRef hostArray, CFStringRef partition);
CFStringRef WKCachePartitionKey(void);
void WKCFURLCacheCopyAllPartitionNames(CFURLCacheCopyAllPartitionNamesResultsNotification resultsBlock);
#endif
typedef enum {
WKExternalPlaybackTypeNone,
WKExternalPlaybackTypeAirPlay,
WKExternalPlaybackTypeTVOut,
} WKExternalPlaybackType;
int WKExernalDeviceTypeForPlayer(AVPlayer *);
NSString *WKExernalDeviceDisplayNameForPlayer(AVPlayer *);
bool WKQueryDecoderAvailability(void);
#ifdef __cplusplus
}
#endif