#if TARGET_OS_IPHONE
#import <CoreGraphics/CoreGraphics.h>
#import <WebKitLegacy/WebFrame.h>
#import <WebKitLegacy/WebVisiblePosition.h>
@class DOMRange;
@class DOMVisiblePosition;
typedef enum {
WebTextSelectionStateNone,
WebTextSelectionStateCaret,
WebTextSelectionStateRange,
} WebTextSelectionState;
typedef enum {
WebTextSmartExtendDirectionNone,
WebTextSmartExtendDirectionLeft,
WebTextSmartExtendDirectionRight,
} WebTextSmartExtendDirection;
@interface WebFrame (WebFrameIOS)
- (void)moveSelectionToPoint:(CGPoint)point;
- (void)clearSelection;
- (BOOL)hasSelection;
- (WebTextSelectionState)selectionState;
- (CGRect)caretRectForPosition:(WebVisiblePosition *)position;
- (CGRect)closestCaretRectInMarkedTextRangeForPoint:(CGPoint)point;
- (void)collapseSelection;
- (NSArray *)selectionRects;
- (NSArray *)selectionRectsForRange:(DOMRange *)domRange;
- (DOMRange *)wordAtPoint:(CGPoint)point;
- (WebVisiblePosition *)webVisiblePositionForPoint:(CGPoint)point;
- (void)setRangedSelectionBaseToCurrentSelection;
- (void)setRangedSelectionBaseToCurrentSelectionStart;
- (void)setRangedSelectionBaseToCurrentSelectionEnd;
- (void)clearRangedSelectionInitialExtent;
- (void)setRangedSelectionInitialExtentToCurrentSelectionStart;
- (void)setRangedSelectionInitialExtentToCurrentSelectionEnd;
- (BOOL)setRangedSelectionExtentPoint:(CGPoint)extentPoint baseIsStart:(BOOL)baseIsStart allowFlipping:(BOOL)allowFlipping;
- (BOOL)setSelectionWithBasePoint:(CGPoint)basePoint extentPoint:(CGPoint)extentPoint baseIsStart:(BOOL)baseIsStart;
- (BOOL)setSelectionWithBasePoint:(CGPoint)basePoint extentPoint:(CGPoint)extentPoint baseIsStart:(BOOL)baseIsStart allowFlipping:(BOOL)allowFlipping;
- (void)setSelectionWithFirstPoint:(CGPoint)firstPoint secondPoint:(CGPoint)secondPoint;
- (void)ensureRangedSelectionContainsInitialStartPoint:(CGPoint)initialStartPoint initialEndPoint:(CGPoint)initialEndPoint;
- (void)smartExtendRangedSelection:(WebTextSmartExtendDirection)direction;
- (void)aggressivelyExpandSelectionToWordContainingCaretSelection;
- (WKWritingDirection)selectionBaseWritingDirection;
- (void)toggleBaseWritingDirection;
- (void)setBaseWritingDirection:(WKWritingDirection)direction;
- (void)moveSelectionToStart;
- (void)moveSelectionToEnd;
- (void)setSelectionGranularity:(WebTextGranularity)granularity;
- (void)setRangedSelectionWithExtentPoint:(CGPoint)point;
- (WebVisiblePosition *)startPosition;
- (WebVisiblePosition *)endPosition;
- (BOOL)renderedCharactersExceed:(NSUInteger)threshold;
- (CGImageRef)imageForNode:(DOMNode *)node allowDownsampling:(BOOL)allowDownsampling drawContentBehindTransparentNodes:(BOOL)drawContentBehindTransparentNodes;
- (WebVisiblePosition *)previousUnperturbedDictationResultBoundaryFromPosition:(WebVisiblePosition *)position;
- (WebVisiblePosition *)nextUnperturbedDictationResultBoundaryFromPosition:(WebVisiblePosition *)position;
- (CGRect)elementRectAtPoint:(CGPoint)point;
@end
#endif // TARGET_OS_IPHONE