#ifndef WAKWindow_h
#define WAKWindow_h
#if TARGET_OS_IPHONE
#import "WAKAppKitStubs.h"
#import "WAKResponder.h"
#import "WAKView.h"
#import "WKContentObservation.h"
#import <CoreGraphics/CoreGraphics.h>
#import <Foundation/Foundation.h>
@class CALayer;
@class WebEvent;
#ifdef __cplusplus
namespace WebCore {
class LegacyTileCache;
}
typedef WebCore::LegacyTileCache LegacyTileCache;
#else
typedef struct LegacyTileCache LegacyTileCache;
#endif
typedef enum {
kWAKWindowTilingModeNormal,
kWAKWindowTilingModeMinimal,
kWAKWindowTilingModePanning,
kWAKWindowTilingModeZooming,
kWAKWindowTilingModeDisabled,
kWAKWindowTilingModeScrollToTop,
} WAKWindowTilingMode;
typedef enum {
kWAKTilingDirectionUp,
kWAKTilingDirectionDown,
kWAKTilingDirectionLeft,
kWAKTilingDirectionRight,
} WAKTilingDirection;
extern NSString * const WAKWindowScreenScaleDidChangeNotification;
extern NSString * const WAKWindowVisibilityDidChangeNotification;
WEBCORE_EXPORT @interface WAKWindow : WAKResponder
{
CALayer* _hostLayer;
LegacyTileCache* _tileCache;
CGRect _frozenVisibleRect;
CALayer *_rootLayer;
CGSize _screenSize;
CGSize _availableScreenSize;
CGFloat _screenScale;
CGRect _frame;
WAKView *_contentView;
WAKView *_responderView;
WAKView *_nextResponder;
BOOL _visible;
BOOL _isInSnapshottingPaint;
BOOL _useOrientationDependentFontAntialiasing;
BOOL _entireWindowVisibleForTesting;
}
@property (nonatomic, assign) BOOL useOrientationDependentFontAntialiasing;
@property (nonatomic) CGImageRef contentReplacementImage;
- (id)initWithLayer:(CALayer *)hostLayer;
- (id)initWithFrame:(CGRect)frame;
- (CALayer*)hostLayer;
- (void)setContentView:(WAKView *)aView;
- (WAKView *)contentView;
- (void)close;
- (WAKView *)firstResponder;
- (NSPoint)convertBaseToScreen:(NSPoint)aPoint;
- (NSPoint)convertScreenToBase:(NSPoint)aPoint;
- (NSRect)convertRectToScreen:(NSRect)aRect;
- (NSRect)convertRectFromScreen:(NSRect)aRect;
- (BOOL)isKeyWindow;
- (void)makeKeyWindow;
- (BOOL)isVisible;
- (void)setVisible:(BOOL)visible;
- (NSSelectionDirection)keyViewSelectionDirection;
- (BOOL)makeFirstResponder:(NSResponder *)aResponder;
- (WAKView *)_newFirstResponderAfterResigning;
- (void)setFrame:(NSRect)frameRect display:(BOOL)flag;
- (CGRect)frame;
- (void)setContentRect:(CGRect)rect;
- (void)setScreenSize:(CGSize)size;
- (CGSize)screenSize;
- (void)setAvailableScreenSize:(CGSize)size;
- (CGSize)availableScreenSize;
- (void)setScreenScale:(CGFloat)scale;
- (CGFloat)screenScale;
- (void)setRootLayer:(CALayer *)layer;
- (CALayer *)rootLayer;
- (void)sendEvent:(WebEvent *)anEvent;
- (void)sendEventSynchronously:(WebEvent *)anEvent;
- (void)sendMouseMoveEvent:(WebEvent *)anEvent contentChange:(WKContentChange *)aContentChange;
- (void)setIsInSnapshottingPaint:(BOOL)isInSnapshottingPaint;
- (BOOL)isInSnapshottingPaint;
- (CGRect)exposedScrollViewRect;
- (void)setExposedScrollViewRect:(CGRect)exposedScrollViewRect;
- (void)setEntireWindowVisibleForTesting:(BOOL)entireWindowVisible;
- (void)layoutTiles;
- (void)layoutTilesNow;
- (void)layoutTilesNowForRect:(CGRect)rect;
- (void)setNeedsDisplay;
- (void)setNeedsDisplayInRect:(CGRect)rect;
- (BOOL)tilesOpaque;
- (void)setTilesOpaque:(BOOL)opaque;
- (CGRect)visibleRect;
- (CGRect)extendedVisibleRect;
- (void)removeAllNonVisibleTiles;
- (void)removeAllTiles;
- (void)removeForegroundTiles;
- (void)setTilingMode:(WAKWindowTilingMode)mode;
- (WAKWindowTilingMode)tilingMode;
- (void)setTilingDirection:(WAKTilingDirection)tilingDirection;
- (WAKTilingDirection)tilingDirection;
- (BOOL)hasPendingDraw;
- (void)displayRect:(NSRect)rect;
- (void)setZoomedOutTileScale:(float)scale;
- (float)zoomedOutTileScale;
- (void)setCurrentTileScale:(float)scale;
- (float)currentTileScale;
- (void)setKeepsZoomedOutTiles:(BOOL)keepsZoomedOutTiles;
- (BOOL)keepsZoomedOutTiles;
- (LegacyTileCache *)tileCache;
- (void)setTileControllerShouldUseLowScaleTiles:(BOOL)lowScaleTiles;
- (void)dumpTiles;
- (void)setTileBordersVisible:(BOOL)visible;
- (void)setTilePaintCountsVisible:(BOOL)visible;
- (void)setAcceleratedDrawingEnabled:(BOOL)enabled;
- (void)freezeVisibleRect;
- (void)unfreezeVisibleRect;
- (void)willRotate;
- (void)didRotate;
- (BOOL)useOrientationDependentFontAntialiasing;
- (void)setUseOrientationDependentFontAntialiasing:(BOOL)aa;
+ (BOOL)hasLandscapeOrientation;
+ (void)setOrientationProvider:(id)provider;
+ (WebEvent *)currentEvent;
- (NSString *)recursiveDescription;
@end
#endif // TARGET_OS_IPHONE
#endif // WAKWindow_h