Adjust keyboard scrolling animator to springy and semiphysical
[WebKit-https.git] / Source / WebKit / Platform / spi / ios / UIKitSPI.h
1 /*
2  * Copyright (C) 2014-2016 Apple 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 INC. AND ITS CONTRIBUTORS ``AS IS''
14  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23  * THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 #import <UIKit/UIKit.h>
27
28 #if USE(APPLE_INTERNAL_SDK)
29
30 #import <UIKit/UIAlertController_Private.h>
31 #import <UIKit/UIApplication_Private.h>
32 #import <UIKit/UIBarButtonItem_Private.h>
33 #import <UIKit/UIBlurEffect_Private.h>
34 #import <UIKit/UICalloutBar.h>
35 #import <UIKit/UIColorEffect.h>
36 #import <UIKit/UIDatePicker_Private.h>
37 #import <UIKit/UIDevice_Private.h>
38 #import <UIKit/UIDocumentMenuViewController_Private.h>
39 #import <UIKit/UIDocumentPasswordView.h>
40 #import <UIKit/UIFont_Private.h>
41 #import <UIKit/UIGeometry_Private.h>
42 #import <UIKit/UIGestureRecognizer_Private.h>
43 #import <UIKit/UIImagePickerController_Private.h>
44 #import <UIKit/UIImage_Private.h>
45 #import <UIKit/UIInterface_Private.h>
46 #import <UIKit/UIKeyboardImpl.h>
47 #import <UIKit/UIKeyboardInputModeController.h>
48 #import <UIKit/UIKeyboardIntl.h>
49 #import <UIKit/UIKeyboard_Private.h>
50 #import <UIKit/UILongPressGestureRecognizer_Private.h>
51 #import <UIKit/UIPeripheralHost.h>
52 #import <UIKit/UIPeripheralHost_Private.h>
53 #import <UIKit/UIPickerContentView_Private.h>
54 #import <UIKit/UIPickerView_Private.h>
55 #import <UIKit/UIPresentationController_Private.h>
56 #import <UIKit/UIResponder_Private.h>
57 #import <UIKit/UIScrollView_Private.h>
58 #import <UIKit/UIStringDrawing_Private.h>
59 #import <UIKit/UITableViewCell_Private.h>
60 #import <UIKit/UITapGestureRecognizer_Private.h>
61 #import <UIKit/UITextChecker_Private.h>
62 #import <UIKit/UITextEffectsWindow.h>
63 #import <UIKit/UITextInput_Private.h>
64 #import <UIKit/UITextInteractionAssistant_Private.h>
65 #import <UIKit/UIViewControllerTransitioning_Private.h>
66 #import <UIKit/UIViewController_Private.h>
67 #import <UIKit/UIViewController_ViewService.h>
68 #import <UIKit/UIView_Private.h>
69 #import <UIKit/UIVisualEffect_Private.h>
70 #import <UIKit/UIWKSelectionAssistant.h>
71 #import <UIKit/UIWKTextInteractionAssistant.h>
72 #import <UIKit/UIWebBrowserView.h>
73 #import <UIKit/UIWebDocumentView.h>
74 #import <UIKit/UIWebFormAccessory.h>
75 #import <UIKit/UIWebGeolocationPolicyDecider.h>
76 #import <UIKit/UIWebScrollView.h>
77 #import <UIKit/UIWebTiledView.h>
78 #import <UIKit/UIWebTouchEventsGestureRecognizer.h>
79 #import <UIKit/UIWindow_Private.h>
80 #import <UIKit/_UIBackdropViewSettings.h>
81 #import <UIKit/_UIBackdropView_Private.h>
82 #import <UIKit/_UIHighlightView.h>
83 #import <UIKit/_UINavigationInteractiveTransition.h>
84 #import <UIKit/_UINavigationParallaxTransition.h>
85
86 #if HAVE(LINK_PREVIEW)
87 #import <UIKit/UIPreviewItemController.h>
88 #endif
89
90 #if ENABLE(DRAG_SUPPORT)
91 #import <UIKit/NSItemProvider+UIKitAdditions_Private.h>
92 #import <UIKit/UIItemProvider_Private.h>
93 #endif
94
95 #if ENABLE(DRAG_SUPPORT)
96 #import <UIKit/UIDragInteraction.h>
97 #import <UIKit/UIDragInteraction_Private.h>
98 #import <UIKit/UIDragItem_Private.h>
99 #import <UIKit/UIDragPreviewParameters.h>
100 #import <UIKit/UIDragPreview_Private.h>
101 #import <UIKit/UIDragSession.h>
102 #import <UIKit/UIDragging.h>
103 #import <UIKit/UIDropInteraction.h>
104 #import <UIKit/UIPreviewInteraction.h>
105 #import <UIKit/UIURLDragPreviewView.h>
106 #import <UIKit/_UITextDragCaretView.h>
107 #endif
108
109 #else // USE(APPLE_INTERNAL_SDK)
110
111 #if ENABLE(DRAG_SUPPORT)
112 #import <UIKit/NSItemProvider+UIKitAdditions.h>
113 #endif
114
115 #if HAVE(LINK_PREVIEW)
116 typedef NS_ENUM(NSInteger, UIPreviewItemType) {
117     UIPreviewItemTypeNone,
118     UIPreviewItemTypeClientCustom,
119     UIPreviewItemTypeLink,
120     UIPreviewItemTypeImage,
121     UIPreviewItemTypeText,
122     UIPreviewItemTypeAttachment,
123 };
124
125 @class UIPreviewItemController;
126
127 @protocol UIPreviewItemDelegate <NSObject>
128 - (NSDictionary *)_dataForPreviewItemController:(UIPreviewItemController *)controller atPosition:(CGPoint)position type:(UIPreviewItemType *)type;
129 @optional
130 - (BOOL)_interactionShouldBeginFromPreviewItemController:(UIPreviewItemController *)controller forPosition:(CGPoint)position;
131 - (void)_interactionStartedFromPreviewItemController:(UIPreviewItemController *)controller;
132 - (void)_interactionStoppedFromPreviewItemController:(UIPreviewItemController *)controller;
133 - (UIViewController *)_presentedViewControllerForPreviewItemController:(UIPreviewItemController *)controller;
134 - (void)_previewItemController:(UIPreviewItemController *)controller didDismissPreview:(UIViewController *)viewController committing:(BOOL)committing;
135 - (void)_previewItemController:(UIPreviewItemController *)controller commitPreview:(UIViewController *)viewController;
136 - (void)_previewItemControllerDidCancelPreview:(UIPreviewItemController *)controller;
137 - (UIImage *)_presentationSnapshotForPreviewItemController:(UIPreviewItemController *)controller;
138 - (NSArray *)_presentationRectsForPreviewItemController:(UIPreviewItemController *)controller;
139 - (CGRect)_presentationRectForPreviewItemController:(UIPreviewItemController *)controller;
140 @end
141
142 @interface UIPreviewItemController : NSObject
143 - (instancetype)initWithView:(UIView *)view;
144 @property (assign, nonatomic) id<UIPreviewItemDelegate> delegate;
145 @property (assign, nonatomic, readonly) UIPreviewItemType type;
146 @property (strong, nonatomic, readonly) NSDictionary *previewData;
147 @property (strong, nonatomic, readonly) UIGestureRecognizer *presentationGestureRecognizer;
148 @property (strong, nonatomic, readonly) UIGestureRecognizer *presentationSecondaryGestureRecognizer;
149 @end
150 #endif
151
152 @interface UIAlertController ()
153 - (void)_addActionWithTitle:(NSString *)title style:(UIAlertActionStyle)style handler:(void (^)(void))handler;
154 - (void)_addActionWithTitle:(NSString *)title style:(UIAlertActionStyle)style handler:(void (^)(void))handler shouldDismissHandler:(BOOL (^)(void))shouldDismissHandler;
155 @property (nonatomic) UIAlertControllerStyle preferredStyle;
156 @end
157
158 @interface UIApplication ()
159 - (UIInterfaceOrientation)interfaceOrientation;
160 - (void)_cancelAllTouches;
161 - (CGFloat)statusBarHeight;
162 - (BOOL)isSuspendedUnderLock;
163 @end
164
165 typedef NS_ENUM(NSInteger, UIDatePickerPrivateMode)  {
166     UIDatePickerModeYearAndMonth = 4269,
167 };
168
169 @interface UIDatePicker ()
170 @property (nonatomic, readonly, getter=_contentWidth) CGFloat contentWidth;
171 @end
172
173 @interface UIDevice ()
174 @property (nonatomic, readonly, retain) NSString *buildVersion;
175 @end
176
177 typedef enum {
178     kUIKeyboardInputRepeat                 = 1 << 0,
179     kUIKeyboardInputPopupVariant           = 1 << 1,
180     kUIKeyboardInputMultitap               = 1 << 2,
181     kUIKeyboardInputSkipCandidateSelection = 1 << 3,
182     kUIKeyboardInputDeadKey                = 1 << 4,
183     kUIKeyboardInputModifierFlagsChanged   = 1 << 5,
184     kUIKeyboardInputFlick                  = 1 << 6,
185     kUIKeyboardInputPreProcessed           = 1 << 7,
186 } UIKeyboardInputFlags;
187
188 @interface UIEvent ()
189 @property (nonatomic, readonly) UIKeyboardInputFlags _inputFlags;
190 - (void *)_hidEvent;
191 - (NSString *)_unmodifiedInput;
192 - (NSString *)_modifiedInput;
193 - (NSInteger)_modifierFlags;
194 - (BOOL)_isKeyDown;
195 @end
196
197 typedef enum {
198     UIFontTraitPlain = 0,
199     UIFontTraitItalic = 1 << 0,
200     UIFontTraitBold = 1 << 1,
201 } UIFontTrait;
202
203 @interface UIFont ()
204 + (UIFont *)fontWithFamilyName:(NSString *)familyName traits:(UIFontTrait)traits size:(CGFloat)fontSize;
205 - (UIFontTrait)traits;
206 @end
207
208 typedef enum {
209     UIAllCorners = 0xFF,
210 } UIRectCorners;
211
212 @interface UIImagePickerController ()
213 @property (nonatomic, setter=_setAllowsMultipleSelection:) BOOL _allowsMultipleSelection;
214 @end
215
216 @interface UIImage ()
217 - (id)initWithCGImage:(CGImageRef)CGImage imageOrientation:(UIImageOrientation)imageOrientation;
218 @end
219
220 @interface UIKeyCommand ()
221 @property (nonatomic, readonly) UIEvent *_triggeringEvent;
222 @end
223
224 @protocol UIKeyboardImplGeometryDelegate
225 @property (nonatomic, readwrite, getter=isMinimized) BOOL minimized;
226 - (void)prepareForImplBoundsHeightChange:(CGFloat)endDelta suppressNotification:(BOOL)suppressNotification;
227 - (void)implBoundsHeightChangeDone:(CGFloat)endDelta suppressNotification:(BOOL)suppressNotification;
228 - (BOOL)shouldSaveMinimizationState;
229 - (BOOL)canDismiss;
230 - (BOOL)isActive;
231 @end
232
233 @protocol UIKeyboardCandidateListDelegate <NSObject>
234 @optional
235 - (void)setCandidateList:(id)candidateList updateCandidateView:(BOOL)updateCandidateView;
236 - (void)candidateListAcceptCandidate:(id)candidateList;
237 - (void)candidateListSelectionDidChange:(id)candidateList;
238 - (void)candidateListShouldBeDismissed:(id)candidateList;
239 @end
240
241 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=173341
242 #ifndef _WEBKIT_UIKITSPI_UIKEYBOARD
243 #define _WEBKIT_UIKITSPI_UIKEYBOARD 1
244 @interface UIKeyboard : UIView <UIKeyboardImplGeometryDelegate>
245 @end
246 #endif
247
248 @interface UIKeyboard ()
249 + (CGSize)defaultSizeForInterfaceOrientation:(UIInterfaceOrientation)orientation;
250 - (void)activate;
251 - (void)geometryChangeDone:(BOOL)keyboardVisible;
252 - (void)prepareForGeometryChange;
253 + (BOOL)isInHardwareKeyboardMode;
254 @end
255
256 @interface UIKeyboardImpl : UIView <UIKeyboardCandidateListDelegate>
257 @end
258
259 @interface UIKeyboardImpl ()
260 + (UIKeyboardImpl *)activeInstance;
261 + (UIKeyboardImpl *)sharedInstance;
262 + (CGSize)defaultSizeForInterfaceOrientation:(UIInterfaceOrientation)orientation;
263 - (void)addInputString:(NSString *)string withFlags:(NSUInteger)flags;
264 - (void)addInputString:(NSString *)string withFlags:(NSUInteger)flags withInputManagerHint:(NSString *)hint;
265 - (BOOL)autocorrectSpellingEnabled;
266 - (void)deleteFromInput;
267 - (void)deleteFromInputWithFlags:(NSUInteger)flags;
268 - (void)replaceText:(id)replacement;
269 @property (nonatomic, readwrite, retain) UIResponder <UIKeyInput> *delegate;
270 @end
271
272 @interface UILongPressGestureRecognizer ()
273 @property (nonatomic) CFTimeInterval delay;
274 @property (nonatomic, readonly) CGPoint startPoint;
275 @property (nonatomic, assign, setter=_setRequiresQuietImpulse:) BOOL _requiresQuietImpulse;
276 @end
277
278 @interface _UIWebHighlightLongPressGestureRecognizer : UILongPressGestureRecognizer
279 @end
280
281 @interface _UIWebHighlightLongPressGestureRecognizer ()
282 - (void)cancel;
283 @end
284
285 @interface UIPeripheralHost : NSObject <UIGestureRecognizerDelegate>
286 @end
287
288 @class UIKeyboardRotationState;
289
290 @interface UIPeripheralHost ()
291 + (UIPeripheralHost *)sharedInstance;
292 + (UIPeripheralHost *)activeInstance;
293 + (CGRect)visiblePeripheralFrame;
294 - (BOOL)isOnScreen;
295 - (UIKeyboardRotationState *)rotationState;
296 @end
297
298 @interface UIPickerContentView : UIView
299 @end
300
301 @interface UIPickerContentView ()
302 +(CGFloat)_checkmarkOffset;
303 -(CGFloat)labelWidthForBounds:(CGRect)bounds;
304 @property (nonatomic, getter=isChecked) BOOL checked;
305 @property (nonatomic, readonly) UILabel *titleLabel;
306 @end
307
308 @interface UIPickerView ()
309 + (CGSize)defaultSizeForCurrentOrientation;
310 - (void)_setUsesCheckedSelection:(BOOL)usesCheckedSelection;
311 @property (nonatomic, setter=_setMagnifierEnabled:) BOOL _magnifierEnabled;
312 @end
313
314 @interface UIResponder ()
315 - (void)_handleKeyUIEvent:(UIEvent *)event;
316 - (void)_wheelChangedWithEvent:(UIEvent *)event;
317 @end
318
319 @class FBSDisplayConfiguration;
320 @interface UIScreen ()
321 @property (nonatomic, readonly, retain) FBSDisplayConfiguration *displayConfiguration;
322 @end
323
324 typedef NS_ENUM(NSInteger, UIScrollViewIndicatorInsetAdjustmentBehavior) {
325     UIScrollViewIndicatorInsetAdjustmentAutomatic,
326     UIScrollViewIndicatorInsetAdjustmentAlways,
327     UIScrollViewIndicatorInsetAdjustmentNever
328 };
329
330 @interface UIScrollView ()
331 - (void)_stopScrollingAndZoomingAnimations;
332 - (void)_zoomToCenter:(CGPoint)center scale:(CGFloat)scale duration:(CFTimeInterval)duration force:(BOOL)force;
333 - (void)_zoomToCenter:(CGPoint)center scale:(CGFloat)scale duration:(CFTimeInterval)duration;
334 - (double)_horizontalVelocity;
335 - (double)_verticalVelocity;
336 @property (nonatomic, getter=isZoomEnabled) BOOL zoomEnabled;
337 @property (nonatomic, readonly, getter=_isAnimatingZoom) BOOL isAnimatingZoom;
338 @property (nonatomic, readonly, getter=_isAnimatingScroll) BOOL isAnimatingScroll;
339 @property (nonatomic) CGFloat horizontalScrollDecelerationFactor;
340 @property (nonatomic) CGFloat verticalScrollDecelerationFactor;
341 @property (nonatomic, readonly) BOOL _isInterruptingDeceleration;
342 @property (nonatomic, getter=_contentScrollInset, setter=_setContentScrollInset:) UIEdgeInsets contentScrollInset;
343 @property (nonatomic, getter=_indicatorInsetAdjustmentBehavior, setter=_setIndicatorInsetAdjustmentBehavior:) UIScrollViewIndicatorInsetAdjustmentBehavior indicatorInsetAdjustmentBehavior;
344 #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
345 @property (nonatomic, readonly) UIEdgeInsets _systemContentInset;
346 #endif
347 @end
348
349 @interface NSString (UIKitDetails)
350 - (CGSize)_legacy_sizeWithFont:(UIFont *)font forWidth:(CGFloat)width lineBreakMode:(NSLineBreakMode)lineBreakMode;
351 - (CGSize)_legacy_sizeWithFont:(UIFont *)font minFontSize:(CGFloat)minFontSize actualFontSize:(CGFloat *)actualFontSize forWidth:(CGFloat)width lineBreakMode:(NSLineBreakMode)lineBreakMode;
352 @end
353
354 @interface UITapGestureRecognizer ()
355 @property (nonatomic, getter=_allowableSeparation, setter=_setAllowableSeparation:) CGFloat allowableSeparation;
356 @property (nonatomic, readonly) CGPoint location;
357 @property (nonatomic) CGFloat allowableMovement;
358 @property (nonatomic, readonly) CGPoint centroid;
359 @end
360
361 @class WebEvent;
362
363 typedef enum {
364     UITextShortcutConversionTypeDefault = 0,
365     UITextShortcutConversionTypeNo = 1,
366     UITextShortcutConversionTypeYes = 2,
367 } UITextShortcutConversionType;
368
369 @protocol UITextInputTraits_Private <NSObject, UITextInputTraits>
370 - (void)takeTraitsFrom:(id <UITextInputTraits>)traits;
371 @optional
372 @property (nonatomic) UITextShortcutConversionType shortcutConversionType;
373 @end
374
375 @class UITextInputArrowKeyHistory;
376
377 @protocol UITextInputPrivate <UITextInput, UITextInputTokenizer, UITextInputTraits_Private>
378 @optional
379 - (BOOL)requiresKeyEvents;
380 - (NSArray *)metadataDictionariesForDictationResults;
381 - (UIColor *)textColorForCaretSelection;
382 - (UIFont *)fontForCaretSelection;
383 - (UIView *)automaticallySelectedOverlay;
384 - (void)handleKeyWebEvent:(WebEvent *)event;
385 - (void)insertDictationResult:(NSArray *)dictationResult withCorrectionIdentifier:(id)correctionIdentifier;
386 - (void)replaceRangeWithTextWithoutClosingTyping:(UITextRange *)range replacementText:(NSString *)text;
387 - (void)setBottomBufferHeight:(CGFloat)bottomBuffer;
388 @property (nonatomic) UITextGranularity selectionGranularity;
389 @required
390 - (BOOL)hasContent;
391 - (BOOL)hasSelection;
392 - (void)selectAll;
393 @end
394
395 @interface UITextInputTraits : NSObject <UITextInputTraits, UITextInputTraits_Private, NSCopying>
396 @end
397
398 @interface UITextInteractionAssistant : NSObject
399 @end
400
401 @interface UITextInteractionAssistant ()
402 - (void)activateSelection;
403 - (void)deactivateSelection;
404 - (void)didEndScrollingOverflow;
405 - (void)selectionChanged;
406 - (void)setGestureRecognizers;
407 - (void)willStartScrollingOverflow;
408 @end
409
410 @interface UITextSuggestion : NSObject
411 @end
412
413 @protocol UITextInputSuggestionDelegate <UITextInputDelegate>
414 - (void)setSuggestions:(NSArray <UITextSuggestion*> *)suggestions;
415 @end
416
417 @interface UIViewController ()
418 + (UIViewController *)_viewControllerForFullScreenPresentationFromView:(UIView *)view;
419 + (UIViewController *)viewControllerForView:(UIView *)view;
420 @end
421
422 @interface UIViewController (ViewService)
423 - (pid_t)_hostProcessIdentifier;
424 @property (readonly) NSString *_hostApplicationBundleIdentifier;
425 @end
426
427 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000
428 @interface NSURL ()
429 @property (nonatomic, copy, setter=_setTitle:) NSString *_title;
430 @end
431 #endif
432
433 @protocol UIViewControllerContextTransitioningEx <UIViewControllerContextTransitioning>
434 - (void)__runAlongsideAnimations;
435 - (void)_interactivityDidChange:(BOOL)isInteractive;
436 @property (nonatomic, assign, setter=_setAllowUserInteraction:, getter=_allowUserInteraction) BOOL _allowUserInteraction;
437 @property (nonatomic, assign, setter=_setPercentOffset:) CGFloat _percentOffset;
438 @end
439
440 @interface _UIViewControllerTransitionContext : NSObject <UIViewControllerContextTransitioningEx>
441 @end
442
443 // FIXME: Separate the parts we are simply re-declaring from the ones we are overriding.
444 @interface _UIViewControllerTransitionContext (Details)
445 - (void) _setTransitionIsInFlight:(BOOL)flag;
446 @property (nonatomic, assign, setter=_setAllowUserInteraction:, getter=_allowUserInteraction) BOOL _allowUserInteraction;
447 @property (nonatomic, assign, setter=_setAnimator:) id <UIViewControllerAnimatedTransitioning> _animator;
448 @property (nonatomic, assign, setter=_setContainerView:) UIView *containerView;
449 @property (nonatomic, assign, setter=_setInteractor:) id <UIViewControllerInteractiveTransitioning> _interactor;
450 @property (nonatomic, assign, setter=_setPercentOffset:) CGFloat _percentOffset;
451 @property (nonatomic, copy, setter=_setCompletionHandler:)  void (^_completionHandler)(_UIViewControllerTransitionContext *context, BOOL transitionCompleted);
452 @property (nonatomic, retain, setter=_setContainerViews:) NSArray *_containerViews;
453 @end
454
455 @interface _UIViewControllerOneToOneTransitionContext : _UIViewControllerTransitionContext
456 @end
457
458 @interface _UIViewControllerOneToOneTransitionContext ()
459 @property (nonatomic, assign, setter=_setFromEndFrame:) CGRect fromEndFrame;
460 @property (nonatomic, assign, setter=_setFromStartFrame:) CGRect fromStartFrame;
461 @property (nonatomic, assign, setter=_setToEndFrame:) CGRect toEndFrame;
462 @property (nonatomic, assign, setter=_setToStartFrame:) CGRect toStartFrame;
463 @property (nonatomic, retain, setter=_setFromViewController:) UIViewController *fromViewController;
464 @property (nonatomic, retain, setter=_setToViewController:) UIViewController *toViewController;
465 @end
466
467 @protocol UIViewControllerAnimatedTransitioningEx <UIViewControllerAnimatedTransitioning>
468 - (BOOL)interactionAborted;
469 - (UINavigationControllerOperation) operation;
470 - (UIPercentDrivenInteractiveTransition *)interactionController;
471 - (void)setInteractionAborted:(BOOL)aborted;
472 - (void)setInteractionController:(UIPercentDrivenInteractiveTransition *)controller;
473 - (void)setOperation:(UINavigationControllerOperation)operation;
474 @optional
475 - (UIWindow *)window;
476 @end
477
478 typedef NS_ENUM (NSInteger, _UIBackdropMaskViewFlags) {
479     _UIBackdropMaskViewNone = 0,
480     _UIBackdropMaskViewGrayscaleTint = 1 << 0,
481     _UIBackdropMaskViewColorTint = 1 << 1,
482     _UIBackdropMaskViewFilters = 1 << 2,
483     _UIBackdropMaskViewAll = _UIBackdropMaskViewGrayscaleTint | _UIBackdropMaskViewColorTint | _UIBackdropMaskViewFilters,
484 };
485
486 @interface UIView ()
487 + (BOOL)_isInAnimationBlock;
488 - (CGSize)size;
489 - (void)setFrameOrigin:(CGPoint)origin;
490 - (void)setSize:(CGSize)size;
491 @property (nonatomic, assign, setter=_setBackdropMaskViewFlags:) NSInteger _backdropMaskViewFlags;
492 - (void)_populateArchivedSubviews:(NSMutableSet *)encodedViews;
493 #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
494 - (void)safeAreaInsetsDidChange;
495 #endif
496 @property (nonatomic, setter=_setContinuousCornerRadius:) CGFloat _continuousCornerRadius;
497 - (void)insertSubview:(UIView *)view above:(UIView *)sibling;
498 - (void)viewWillMoveToSuperview:(UIView *)newSuperview;
499 - (CGSize)convertSize:(CGSize)size toView:(UIView *)view;
500 @end
501
502 @interface UIWebSelectionView : UIView
503 @end
504
505 @interface UIWebSelectionAssistant : NSObject <UIGestureRecognizerDelegate>
506 @end
507
508 @protocol UISelectionInteractionAssistant
509 - (void)showSelectionCommands;
510 @end
511
512 @interface UIWebSelectionAssistant ()
513 - (BOOL)isSelectionGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer;
514 - (id)initWithView:(UIView *)view;
515 - (void)clearSelection;
516 - (void)didEndScrollingOrZoomingPage;
517 - (void)didEndScrollingOverflow;
518 - (void)resignedFirstResponder;
519 - (void)selectionChanged;
520 - (void)setGestureRecognizers;
521 - (void)willStartScrollingOrZoomingPage;
522 - (void)willStartScrollingOverflow;
523 #if !PLATFORM(IOSMAC)
524 @property (nonatomic, retain) UIWebSelectionView *selectionView;
525 #endif
526 @property (nonatomic, readonly) CGRect selectionFrame;
527 @end
528
529 typedef NS_ENUM(NSInteger, UIWKSelectionTouch) {
530     UIWKSelectionTouchStarted = 0,
531     UIWKSelectionTouchMoved = 1,
532     UIWKSelectionTouchEnded = 2,
533     UIWKSelectionTouchEndedMovingForward = 3,
534     UIWKSelectionTouchEndedMovingBackward = 4,
535     UIWKSelectionTouchEndedNotMoving = 5,
536 };
537
538 typedef NS_ENUM(NSInteger, UIWKSelectionFlags) {
539     UIWKNone = 0,
540     UIWKWordIsNearTap = 1,
541     UIWKPhraseBoundaryChanged = 4,
542 };
543
544 typedef NS_ENUM(NSInteger, UIWKGestureType) {
545     UIWKGestureLoupe = 0,
546     UIWKGestureOneFingerTap = 1,
547     UIWKGestureTapAndAHalf = 2,
548     UIWKGestureDoubleTap = 3,
549     UIWKGestureTapAndHalf = 4,
550     UIWKGestureDoubleTapInUneditable = 5,
551     UIWKGestureOneFingerTapInUneditable = 6,
552     UIWKGestureOneFingerTapSelectsAll = 7,
553     UIWKGestureOneFingerDoubleTap = 8,
554     UIWKGestureOneFingerTripleTap = 9,
555     UIWKGestureTwoFingerSingleTap = 10,
556     UIWKGestureTwoFingerRangedSelectGesture = 11,
557     UIWKGestureTapOnLinkWithGesture = 12,
558     UIWKGestureMakeWebSelection = 13,
559     UIWKGesturePhraseBoundary = 14,
560 };
561
562 @interface UIWKSelectionAssistant : UIWebSelectionAssistant
563 @end
564
565 @interface UIWKSelectionAssistant ()
566 - (BOOL)shouldHandleSingleTapAtPoint:(CGPoint)point;
567 - (void)selectionChangedWithGestureAt:(CGPoint)point withGesture:(UIWKGestureType)gestureType withState:(UIGestureRecognizerState)gestureState withFlags:(UIWKSelectionFlags)flags;
568 - (void)selectionChangedWithTouchAt:(CGPoint)point withSelectionTouch:(UIWKSelectionTouch)touch withFlags:(UIWKSelectionFlags)flags;
569 - (void)showDictionaryFor:(NSString *)selectedTerm fromRect:(CGRect)presentationRect;
570 - (void)showShareSheetFor:(NSString *)selectedTerm fromRect:(CGRect)presentationRect;
571 - (void)showTextServiceFor:(NSString *)selectedTerm fromRect:(CGRect)presentationRect;
572 - (void)lookup:(NSString *)textWithContext withRange:(NSRange)range fromRect:(CGRect)presentationRect;
573 @property (nonatomic, readonly) UILongPressGestureRecognizer *selectionLongPressRecognizer;
574 @end
575
576 @interface UIWKAutocorrectionRects : NSObject
577 @end
578
579 @interface UIWKAutocorrectionRects (UIWKAutocorrectionRectsDetails)
580 @property (nonatomic, assign) CGRect firstRect;
581 @property (nonatomic, assign) CGRect lastRect;
582 @end
583
584 @interface UIWKAutocorrectionContext : NSObject
585 @end
586
587 @interface UIWKAutocorrectionContext (UIWKAutocorrectionContextDetails)
588 @property (nonatomic, copy) NSString *contextBeforeSelection;
589 @property (nonatomic, copy) NSString *selectedText;
590 @property (nonatomic, copy) NSString *contextAfterSelection;
591 @property (nonatomic, copy) NSString *markedText;
592 @property (nonatomic, assign) NSRange rangeInMarkedText;
593 @end
594
595 @interface UIWKTextInteractionAssistant : UITextInteractionAssistant <UIResponderStandardEditActions>
596 @end
597
598 @interface UIWKTextInteractionAssistant ()
599 - (void)selectionChangedWithGestureAt:(CGPoint)point withGesture:(UIWKGestureType)gestureType withState:(UIGestureRecognizerState)gestureState withFlags:(UIWKSelectionFlags)flags;
600 - (void)showDictionaryFor:(NSString *)selectedTerm fromRect:(CGRect)presentationRect;
601 - (void)selectionChangedWithTouchAt:(CGPoint)point withSelectionTouch:(UIWKSelectionTouch)touch withFlags:(UIWKSelectionFlags)flags;
602 - (void)showTextStyleOptions;
603 - (void)hideTextStyleOptions;
604 - (void)lookup:(NSString *)textWithContext withRange:(NSRange)range fromRect:(CGRect)presentationRect;
605 - (void)showShareSheetFor:(NSString *)selectedTerm fromRect:(CGRect)presentationRect;
606 - (void)showTextServiceFor:(NSString *)selectedTerm fromRect:(CGRect)presentationRect;
607 - (void)scheduleReplacementsForText:(NSString *)text;
608 - (void)scheduleChineseTransliterationForText:(NSString *)text;
609
610 @property (nonatomic, readonly, assign) UILongPressGestureRecognizer *forcePressGesture;
611 @property (nonatomic, readonly, assign) UILongPressGestureRecognizer *loupeGesture;
612 @property (nonatomic, readonly, assign) UITapGestureRecognizer *singleTapGesture;
613 @end
614
615 @protocol UIWKInteractionViewProtocol
616 - (void)changeSelectionWithGestureAt:(CGPoint)point withGesture:(UIWKGestureType)gestureType withState:(UIGestureRecognizerState)state;
617 - (void)changeSelectionWithTouchAt:(CGPoint)point withSelectionTouch:(UIWKSelectionTouch)touch baseIsStart:(BOOL)baseIsStart withFlags:(UIWKSelectionFlags)flags;
618 - (void)changeSelectionWithTouchesFrom:(CGPoint)from to:(CGPoint)to withGesture:(UIWKGestureType)gestureType withState:(UIGestureRecognizerState)gestureState;
619 - (CGRect)textFirstRect;
620 - (CGRect)textLastRect;
621
622 - (void)requestAutocorrectionContextWithCompletionHandler:(void (^)(UIWKAutocorrectionContext *autocorrectionContext))completionHandler;
623
624 - (void)requestAutocorrectionRectsForString:(NSString *)input withCompletionHandler:(void (^)(UIWKAutocorrectionRects *rectsForInput))completionHandler;
625
626 - (void)applyAutocorrection:(NSString *)correction toString:(NSString *)input withCompletionHandler:(void (^)(UIWKAutocorrectionRects *rectsForCorrection))completionHandler;
627
628 - (NSString *)markedText;
629 - (BOOL)hasMarkedText;
630
631 - (BOOL)hasSelectablePositionAtPoint:(CGPoint)point;
632 #if __IPHONE_OS_VERSION_MAX_ALLOWED < 110000
633 - (BOOL)pointIsInAssistedNode:(CGPoint)point;
634 #endif
635 - (NSArray *)webSelectionRects;
636 - (void)_cancelLongPressGestureRecognizer;
637
638 @optional
639 - (void)clearSelection;
640 - (void)replaceDictatedText:(NSString *)oldText withText:(NSString *)newText;
641 - (void)requestDictationContext:(void (^)(NSString *selectedText, NSString *prefixText, NSString *postfixText))completionHandler;
642 - (BOOL)pointIsNearMarkedText:(CGPoint)point;
643 - (NSString *)selectedText;
644 - (void)replaceText:(NSString *)text withText:(NSString *)word;
645 - (void)selectWordForReplacement;
646 - (BOOL)isReplaceAllowed;
647 - (void)selectWordBackward;
648 - (UIView *)unscaledView;
649 - (CGFloat)inverseScale;
650 - (CGRect)unobscuredContentRect;
651 @end
652
653 @protocol UITextAutoscrolling
654 - (void)startAutoscroll:(CGPoint)point;
655 - (void)cancelAutoscroll;
656 - (void)scrollSelectionToVisible:(BOOL)animated;
657 @end
658
659
660 @protocol UIWebFormAccessoryDelegate;
661
662 @interface UIWebFormAccessory : UIInputView
663 @end
664
665 @interface UIWebFormAccessory ()
666 - (void)hideAutoFillButton;
667 - (void)setClearVisible:(BOOL)flag;
668 - (void)showAutoFillButtonWithTitle:(NSString *)title;
669 @property (nonatomic, retain) UIBarButtonItem *_autofill;
670 @property (nonatomic, assign) id <UIWebFormAccessoryDelegate> delegate;
671
672 @property (nonatomic, assign, getter=isNextEnabled) BOOL nextEnabled;
673 @property (nonatomic, assign, getter=isPreviousEnabled) BOOL previousEnabled;
674 - (id)initWithInputAssistantItem:(UITextInputAssistantItem *)inputAssistantItem;
675 @end
676
677 @protocol UIWebFormAccessoryDelegate
678 - (void)accessoryAutoFill;
679 - (void)accessoryClear;
680 - (void)accessoryDone;
681 - (void)accessoryTab:(BOOL)isNext;
682 @end
683
684 @interface UIWebGeolocationPolicyDecider : NSObject
685 @end
686
687 @interface UIWebGeolocationPolicyDecider ()
688 + (instancetype)sharedPolicyDecider;
689 - (void)decidePolicyForGeolocationRequestFromOrigin:(id)securityOrigin requestingURL:(NSURL *)requestingURL window:(UIWindow *)window listener:(id)listener;
690 @end
691
692 typedef enum {
693     UIWebTouchEventTouchBegin = 0,
694     UIWebTouchEventTouchChange = 1,
695     UIWebTouchEventTouchEnd = 2,
696     UIWebTouchEventTouchCancel = 3,
697 } UIWebTouchEventType;
698
699 typedef enum {
700     UIWebTouchPointTypeDirect = 0,
701     UIWebTouchPointTypeStylus
702 } UIWebTouchPointType;
703
704 struct _UIWebTouchPoint {
705     CGPoint locationInScreenCoordinates;
706     CGPoint locationInDocumentCoordinates;
707     unsigned identifier;
708     UITouchPhase phase;
709 #if __IPHONE_OS_VERSION_MIN_REQUIRED > 100000
710     CGFloat majorRadiusInScreenCoordinates;
711     CGFloat force;
712     CGFloat altitudeAngle;
713     CGFloat azimuthAngle;
714     UIWebTouchPointType touchType;
715 #endif
716 };
717
718 struct _UIWebTouchEvent {
719     UIWebTouchEventType type;
720     NSTimeInterval timestamp;
721     CGPoint locationInScreenCoordinates;
722     CGPoint locationInDocumentCoordinates;
723     CGFloat scale;
724     CGFloat rotation;
725
726     bool inJavaScriptGesture;
727
728     struct _UIWebTouchPoint* touchPoints;
729     unsigned touchPointCount;
730
731     bool isPotentialTap;
732 };
733
734 @class UIWebTouchEventsGestureRecognizer;
735
736 @protocol UIWebTouchEventsGestureRecognizerDelegate <NSObject>
737 - (BOOL)isAnyTouchOverActiveArea:(NSSet *)touches;
738 @optional
739 - (BOOL)gestureRecognizer:(UIWebTouchEventsGestureRecognizer *)gestureRecognizer shouldIgnoreWebTouchWithEvent:(UIEvent *)event;
740 @end
741
742 @interface UIWebTouchEventsGestureRecognizer : UIGestureRecognizer
743 @end
744
745 @interface UIWebTouchEventsGestureRecognizer ()
746 - (id)initWithTarget:(id)target action:(SEL)action touchDelegate:(id <UIWebTouchEventsGestureRecognizerDelegate>)delegate;
747 @property (nonatomic, getter=isDefaultPrevented) BOOL defaultPrevented;
748 @property (nonatomic, readonly) BOOL inJavaScriptGesture;
749 @property (nonatomic, readonly) CGPoint locationInWindow;
750 @property (nonatomic, readonly) UIWebTouchEventType type;
751 @property (nonatomic, readonly) const struct _UIWebTouchEvent *lastTouchEvent;
752 @end
753
754 typedef NS_ENUM(NSInteger, _UIBackdropViewStylePrivate) {
755     _UIBackdropViewStyle_Light = 2020,
756     _UIBackdropViewStyle_Dark = 2030
757 };
758
759 @interface _UIBackdropViewSettings : NSObject
760 @end
761
762 @interface _UIBackdropViewSettings ()
763 + (_UIBackdropViewSettings *)settingsForPrivateStyle:(_UIBackdropViewStylePrivate)style;
764 @property (nonatomic, assign) CGFloat scale;
765 @end
766
767 @interface _UIBackdropView : UIView
768 @end
769
770 @interface _UIBackdropView ()
771 - (instancetype)initWithPrivateStyle:(_UIBackdropViewStylePrivate)style;
772 - (instancetype)initWithSettings:(_UIBackdropViewSettings *)settings;
773 - (instancetype)initWithFrame:(CGRect)frame privateStyle:(_UIBackdropViewStylePrivate)style;
774 @property (nonatomic, strong, readonly) UIView *contentView;
775 @end
776
777 @interface _UIHighlightView : UIView
778 @end
779
780 @interface _UIHighlightView ()
781 - (void)setColor:(UIColor *)aColor;
782 - (void)setCornerRadii:(NSArray *)cornerRadii;
783 - (void)setCornerRadius:(CGFloat)aCornerRadius;
784 - (void)setFrames:(NSArray *)frames boundaryRect:(CGRect)aBoundarRect;
785 - (void)setQuads:(NSArray *)quads boundaryRect:(CGRect)aBoundaryRect;
786 @end
787
788 @interface _UINavigationParallaxTransition : NSObject <UIViewControllerAnimatedTransitioningEx>
789 @end
790
791 @interface _UINavigationParallaxTransition ()
792 - (instancetype) initWithCurrentOperation:(UINavigationControllerOperation)operation;
793 @end
794
795 @protocol _UINavigationInteractiveTransitionBaseDelegate;
796
797 @interface _UINavigationInteractiveTransitionBase : UIPercentDrivenInteractiveTransition <UIGestureRecognizerDelegate>
798 @end
799
800 @interface _UINavigationInteractiveTransitionBase ()
801 - (id)initWithGestureRecognizerView:(UIView *)gestureRecognizerView animator:(id<UIViewControllerAnimatedTransitioning>)animator delegate:(id<_UINavigationInteractiveTransitionBaseDelegate>)delegate;
802 - (void)_completeStoppedInteractiveTransition;
803 @property (nonatomic, weak) UIPanGestureRecognizer *gestureRecognizer;
804 @property (nonatomic, assign) BOOL shouldReverseTranslation;
805 @property (nonatomic, retain) _UINavigationParallaxTransition *animationController;
806 @end
807
808 @protocol _UINavigationInteractiveTransitionBaseDelegate <NSObject>
809 - (void)startInteractiveTransition:(_UINavigationInteractiveTransitionBase *)interactiveTransition;
810 - (BOOL)shouldBeginInteractiveTransition:(_UINavigationInteractiveTransitionBase *)interactiveTransition;
811 - (BOOL)interactiveTransition:(_UINavigationInteractiveTransitionBase *)interactiveTransition gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer;
812 - (BOOL)interactiveTransition:(_UINavigationInteractiveTransitionBase *)interactiveTransition gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch;
813 - (UIPanGestureRecognizer *)gestureRecognizerForInteractiveTransition:(_UINavigationInteractiveTransitionBase *)interactiveTransition WithTarget:(id)target action:(SEL)action;
814 @end
815
816 @class BKSAnimationFenceHandle;
817
818 @interface UIWindow ()
819 + (BKSAnimationFenceHandle *)_synchronizedDrawingFence;
820 + (mach_port_t)_synchronizeDrawingAcrossProcesses;
821 - (void)_setWindowResolution:(CGFloat)resolution displayIfChanged:(BOOL)displayIfChanged;
822 @end
823
824 @interface UIWebScrollView : UIScrollView
825 @end
826
827 @interface UIWebTiledView : UIView
828 @end
829
830 @class WAKWindow;
831
832 @interface UIWebTiledView ()
833 - (void)setWAKWindow:(WAKWindow *)window;
834 @end
835
836 @interface UIWebDocumentView : UIWebTiledView
837 @end
838
839 typedef enum {
840     UIEveryDocumentMask = 0xFFFFFF,
841 } UIDocumentMask;
842
843 @interface UIWebDocumentView ()
844 - (void)setDelegate:(id)delegate;
845 - (void)setAutoresizes:(BOOL)flag;
846 - (void)setMinimumSize:(CGSize)aSize;
847 - (void)setInitialScale:(float)aScale forDocumentTypes:(UIDocumentMask)aDocumentMask;
848 - (void)setViewportSize:(CGSize)aSize forDocumentTypes:(UIDocumentMask)aDocumentMask;
849 - (void)setMinimumScale:(float)aScale forDocumentTypes:(UIDocumentMask)aDocumentMask;
850 - (void)setMaximumScale:(float)aScale forDocumentTypes:(UIDocumentMask)aDocumentMask;
851 @end
852
853 @interface UIWebBrowserView : UIWebDocumentView
854 @end
855
856 @class WebView;
857
858 @interface UIWebBrowserView ()
859 - (WebView *)webView;
860 - (void)setPaused:(BOOL)paused;
861 - (void)sendScrollEventIfNecessaryWasUserScroll:(BOOL)userScroll;
862 @property (nonatomic) BOOL inputViewObeysDOMFocus;
863 @end
864
865 @interface UIDocumentMenuViewController ()
866 - (instancetype)_initIgnoringApplicationEntitlementForImportOfTypes:(NSArray *)types;
867 @end
868
869 @protocol UIDocumentPasswordViewDelegate;
870
871 @interface UIDocumentPasswordView : UIView <UITextFieldDelegate>
872 @end
873
874 @interface UIDocumentPasswordView ()
875
876 - (id)initWithDocumentName:(NSString *)documentName;
877
878 @property (nonatomic, assign) NSObject<UIDocumentPasswordViewDelegate> *passwordDelegate;
879 @property (nonatomic, readonly) UITextField *passwordField;
880
881 @end
882
883 @protocol UIDocumentPasswordViewDelegate
884
885 @required
886
887 - (void)userDidEnterPassword:(NSString *)password forPasswordView:(UIDocumentPasswordView *)passwordView;
888
889 @optional
890
891 - (void)didBeginEditingPassword:(UITextField *)passwordField inView:(UIDocumentPasswordView *)passwordView;
892 - (void)didEndEditingPassword:(UITextField *)passwordField inView:(UIDocumentPasswordView *)passwordView;
893
894 @end
895
896 @interface UIViewControllerPreviewAction : NSObject <NSCopying>
897 @end
898
899 @interface UIViewControllerPreviewAction ()
900 + (instancetype)actionWithTitle:(NSString *)title handler:(void (^)(UIViewControllerPreviewAction *action, UIViewController *previewViewController))handler;
901 @end
902
903 @interface UITextChecker ()
904 - (id)_initWithAsynchronousLoading:(BOOL)asynchronousLoading;
905 - (BOOL)_doneLoading;
906 - (NSRange)rangeOfMisspelledWordInString:(NSString *)stringToCheck range:(NSRange)range startingAt:(NSInteger)startingOffset wrap:(BOOL)wrapFlag languages:(NSArray *)languagesArray;
907 @end
908
909 @interface UIKeyboardInputMode : UITextInputMode <NSCopying>
910 @property (nonatomic, readonly, retain) NSArray <NSString *> *multilingualLanguages;
911 @property (nonatomic, readonly, retain) NSString *languageWithRegion;
912 @end
913
914 @interface UIKeyboardInputModeController : NSObject
915 @end
916
917 @interface UIKeyboardInputModeController ()
918 + (UIKeyboardInputModeController *)sharedInputModeController;
919 @property (readwrite, retain) UIKeyboardInputMode *currentInputMode;
920 @end
921
922 #if ENABLE(DRAG_SUPPORT)
923
924 @interface UIItemProvider : NSItemProvider
925 @end
926
927 WTF_EXTERN_C_BEGIN
928
929 NSTimeInterval _UIDragInteractionDefaultLiftDelay(void);
930 CGFloat UIRoundToScreenScale(CGFloat value, UIScreen *);
931
932 WTF_EXTERN_C_END
933
934 typedef NS_OPTIONS(NSUInteger, UIDragOperation)
935 {
936     UIDragOperationNone = 0,
937     UIDragOperationEvery = NSUIntegerMax,
938 };
939
940 @interface UIDragInteraction ()
941 @property (nonatomic, assign, getter=_liftDelay, setter=_setLiftDelay:) NSTimeInterval liftDelay;
942 @end
943
944 @interface UIDragItem ()
945 @property (nonatomic, strong, setter=_setPrivateLocalContext:, getter=_privateLocalContext) id privateLocalContext;
946 @end
947
948 @protocol UITextInput;
949 @interface _UITextDragCaretView : UIView
950 - (instancetype)initWithTextInputView:(UIView<UITextInput> *)textInputView;
951 -(void)insertAtPosition:(UITextPosition *)position;
952 -(void)updateToPosition:(UITextPosition *)position;
953 -(void)remove;
954 @end
955
956 @interface UICalloutBar : UIView
957 + (void)fadeSharedCalloutBar;
958 @end
959
960 @interface UIApplicationRotationFollowingWindow : UIWindow
961 @end
962 @interface UIAutoRotatingWindow : UIApplicationRotationFollowingWindow
963 @end
964
965 @interface UITextEffectsWindow : UIAutoRotatingWindow
966 + (UITextEffectsWindow *)sharedTextEffectsWindow;
967 @end
968
969 @interface UIURLDragPreviewView : UIView
970 + (instancetype)viewWithTitle:(NSString *)title URL:(NSURL *)url;
971 @end
972
973 #endif
974
975 @interface _UIVisualEffectLayerConfig : NSObject
976 + (instancetype)layerWithFillColor:(UIColor *)fillColor opacity:(CGFloat)opacity filterType:(NSString *)filterType;
977 - (void)configureLayerView:(UIView *)view;
978 @end
979
980 @interface _UIVisualEffectTintLayerConfig : _UIVisualEffectLayerConfig
981 + (instancetype)layerWithTintColor:(UIColor *)tintColor;
982 + (instancetype)layerWithTintColor:(UIColor *)tintColor filterType:(NSString *)filterType NS_AVAILABLE_IOS(9_0);
983 @end
984
985 @interface _UIVisualEffectConfig : NSObject
986 @property (nonatomic, readonly) _UIVisualEffectLayerConfig *contentConfig;
987 + (_UIVisualEffectConfig *)configWithContentConfig:(_UIVisualEffectLayerConfig *)contentConfig;
988 @end
989
990 typedef NSInteger UICompositingMode;
991
992 @interface UIVisualEffect ()
993 + (UIVisualEffect *)emptyEffect;
994 + (UIVisualEffect *)effectCombiningEffects:(NSArray<UIVisualEffect *> *)effects;
995 + (UIVisualEffect *)effectCompositingColor:(UIColor *)color withMode:(UICompositingMode)compositingMode alpha:(CGFloat)alpha;
996 @end
997
998 @interface UIColorEffect : UIVisualEffect
999 + (UIColorEffect *)colorEffectSaturate:(CGFloat)saturationAmount;
1000 @end
1001
1002 @interface UIBlurEffect ()
1003 + (UIBlurEffect *)effectWithBlurRadius:(CGFloat)blurRadius;
1004 @end
1005
1006 #endif // USE(APPLE_INTERNAL_SDK)
1007
1008 @interface UIPhysicalKeyboardEvent : UIPressesEvent
1009 @end
1010
1011 @interface UIPhysicalKeyboardEvent ()
1012 - (UIPhysicalKeyboardEvent *)_cloneEvent NS_RETURNS_RETAINED;
1013 @property (nonatomic, readonly) CFIndex _keyCode;
1014 @end
1015
1016 @interface UIColor (IPI)
1017 + (UIColor *)insertionPointColor;
1018 @end
1019
1020 @interface UIView (IPI)
1021 - (UIScrollView *)_scroller;
1022 - (CGPoint)accessibilityConvertPointFromSceneReferenceCoordinates:(CGPoint)point;
1023 - (CGRect)accessibilityConvertRectToSceneReferenceCoordinates:(CGRect)rect;
1024 - (UIRectEdge)_edgesApplyingSafeAreaInsetsToContentInset;
1025 @end
1026
1027 @interface UIScrollView (IPI)
1028 - (CGFloat)_rubberBandOffsetForOffset:(CGFloat)newOffset maxOffset:(CGFloat)maxOffset minOffset:(CGFloat)minOffset range:(CGFloat)range outside:(BOOL *)outside;
1029 - (void)_adjustForAutomaticKeyboardInfo:(NSDictionary *)info animated:(BOOL)animated lastAdjustment:(CGFloat*)lastAdjustment;
1030 - (BOOL)_isScrollingToTop;
1031 - (CGPoint)_animatedTargetOffset;
1032 - (BOOL)_canScrollX;
1033 - (BOOL)_canScrollY;
1034 - (void)_setContentOffsetWithDecelerationAnimation:(CGPoint)contentOffset;
1035 - (CGPoint)_adjustedContentOffsetForContentOffset:(CGPoint)contentOffset;
1036 @end
1037
1038 @interface UIPeripheralHost (IPI)
1039 - (void)_beginIgnoringReloadInputViews;
1040 - (int)_endIgnoringReloadInputViews;
1041 - (void)forceReloadInputViews;
1042 - (CGFloat)getVerticalOverlapForView:(UIView *)view usingKeyboardInfo:(NSDictionary *)info;
1043 @end
1044
1045 #if __has_include(<UIKit/UITextInputMultiDocument.h>)
1046 #import <UIKit/UITextInputMultiDocument.h>
1047 #else
1048 @protocol UITextInputMultiDocument <NSObject>
1049 @optional
1050 - (BOOL)_restoreFocusWithToken:(id <NSCopying, NSSecureCoding>)token;
1051 - (void)_preserveFocusWithToken:(id <NSCopying, NSSecureCoding>)token destructively:(BOOL)destructively;
1052 @end
1053 #endif
1054
1055 @interface UIResponder ()
1056 - (UIResponder *)firstResponder;
1057 @end
1058
1059 @interface _UINavigationInteractiveTransitionBase ()
1060 - (void)_stopInteractiveTransition;
1061 @end
1062
1063 #if __has_include(<UIKit/UITextAutofillSuggestion.h>)
1064 #import <UIKit/UITextAutofillSuggestion.h>
1065 #else
1066 @interface UITextAutofillSuggestion : UITextSuggestion
1067 @property (nonatomic, assign) NSString *username;
1068 @property (nonatomic, assign) NSString *password;
1069 @end
1070 #endif
1071
1072 static inline bool currentUserInterfaceIdiomIsPad()
1073 {
1074     // This inline function exists to thwart unreachable code
1075     // detection on platforms where UICurrentUserInterfaceIdiomIsPad
1076     // is defined directly to false.
1077 #if USE(APPLE_INTERNAL_SDK)
1078     return UICurrentUserInterfaceIdiomIsPad();
1079 #else
1080     return [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad;
1081 #endif
1082 }
1083
1084 WTF_EXTERN_C_BEGIN
1085
1086 BOOL UIKeyboardEnabledInputModesAllowOneToManyShortcuts(void);
1087 BOOL UIKeyboardEnabledInputModesAllowChineseTransliterationForText(NSString *);
1088
1089 extern const float UITableCellDefaultFontSize;
1090 extern const float UITableViewCellDefaultFontSize;
1091
1092 extern NSString *const _UIApplicationDidFinishSuspensionSnapshotNotification;
1093
1094 extern NSString * const UIWindowDidMoveToScreenNotification;
1095 extern NSString * const UIWindowDidRotateNotification;
1096 extern NSString * const UIWindowNewScreenUserInfoKey;
1097 extern NSString * const UIWindowWillRotateNotification;
1098
1099 extern NSString * const UIKeyboardIsLocalUserInfoKey;
1100
1101 extern UIApplication *UIApp;
1102 BOOL _UIApplicationIsExtension(void);
1103 void _UIApplicationLoadWebKit(void);
1104
1105 void UIImageDataWriteToSavedPhotosAlbum(NSData *imageData, id completionTarget, SEL completionSelector, void *contextInfo);
1106
1107 UIImage* _UIImageGetWebKitPhotoLibraryIcon(void);
1108 UIImage* _UIImageGetWebKitTakePhotoOrVideoIcon(void);
1109
1110 extern const float UIWebViewGrowsAndShrinksToFitHeight;
1111 extern const float UIWebViewScalesToFitScale;
1112 extern const float UIWebViewStandardViewportWidth;
1113
1114 extern NSString *const UIKeyInputPageUp;
1115 extern NSString *const UIKeyInputPageDown;
1116
1117 extern const NSString *UIPreviewDataLink;
1118 extern const NSString *UIPreviewDataDDResult;
1119 extern const NSString *UIPreviewDataDDContext;
1120
1121 extern const NSString *UIPreviewDataAttachmentList;
1122 extern const NSString *UIPreviewDataAttachmentIndex;
1123
1124 extern NSString * const UIPreviewDataAttachmentListSourceIsManaged;
1125
1126 UIEdgeInsets UIEdgeInsetsAdd(UIEdgeInsets lhs, UIEdgeInsets rhs, UIRectEdge);
1127
1128 WTF_EXTERN_C_END