4 // Copyright (C) 2005, 2006, 2007, 2008, Apple Inc. All rights reserved.
6 #import <Foundation/Foundation.h>
7 #import <CoreGraphics/CoreGraphics.h>
9 #import "WAKResponder.h"
15 #define NSPoint CGPoint
18 extern NSString
*WAKViewFrameSizeDidChangeNotification
;
19 extern NSString
*WAKViewDidScrollNotification
;
23 @interface WAKView
: WAKResponder
25 WKViewContext viewContext
;
28 NSMutableSet
*subviewReferences
; // This array is only used to keep WAKViews alive.
29 // The actual subviews are maintained by the WKView.
32 + (WAKView
*)focusView
;
34 - (id
)initWithFrame
:(CGRect
)rect
;
36 - (WAKWindow
*)window
;
41 - (void)setFrame
:(NSRect
)frameRect
;
42 - (void)setFrameSize
:(NSSize
)newSize
;
43 - (void)setBoundsSize
:(NSSize
)size
;
44 - (void)frameSizeChanged
;
46 - (NSArray
*)subviews
;
47 - (WAKView
*)superview
;
48 - (void)addSubview
:(WAKView
*)subview
;
49 - (void)willRemoveSubview
:(WAKView
*)subview
;
50 - (void)removeFromSuperview
;
51 - (BOOL
)isDescendantOf
:(WAKView
*)aView
;
52 - (WAKView
*)lastScrollableAncestor
;
54 - (void)viewDidMoveToWindow
;
59 - (void)setNeedsDisplay
:(BOOL
)flag
;
60 - (void)setNeedsDisplayInRect
:(CGRect
)invalidRect
;
63 - (void)displayIfNeeded
;
64 - (void)displayRect
:(NSRect
)rect
;
65 - (void)displayRectIgnoringOpacity
:(NSRect
)rect
;
66 - (void)drawRect
:(CGRect
)rect
;
69 - (WAKView
*)hitTest
:(NSPoint
)point
;
70 - (NSPoint
)convertPoint
:(NSPoint
)point fromView
:(WAKView
*)aView
;
71 - (NSPoint
)convertPoint
:(NSPoint
)point toView
:(WAKView
*)aView
;
72 - (NSSize
)convertSize
:(NSSize
)size toView
:(WAKView
*)aView
;
73 - (NSRect
)convertRect
:(NSRect
)rect fromView
:(WAKView
*)aView
;
74 - (NSRect
)convertRect
:(NSRect
)rect toView
:(WAKView
*)aView
;
76 - (BOOL
)needsPanelToBecomeKey
;
78 - (BOOL
)scrollRectToVisible
:(NSRect
)aRect
;
79 - (void)scrollPoint
:(NSPoint
)aPoint
;
80 - (NSRect
)visibleRect
;
82 - (void)setHidden
:(BOOL
)flag
;
84 - (void)setNextKeyView
:(WAKView
*)aView
;
85 - (WAKView
*)nextKeyView
;
86 - (WAKView
*)nextValidKeyView
;
87 - (WAKView
*)previousKeyView
;
88 - (WAKView
*)previousValidKeyView
;
90 - (void)invalidateGState
;
91 - (void)releaseGState
;
93 - (void)setAutoresizingMask
:(unsigned int)mask
;
94 - (unsigned int)autoresizingMask
;
97 - (BOOL
)mouse
:(NSPoint
)aPoint inRect
:(NSRect
)aRect
;
99 - (void)setNeedsLayout
:(BOOL
)flag
;
101 - (void)layoutIfNeeded
;
103 - (void)setScale
:(float)scale
;
106 - (void)_setDrawsOwnDescendants
:(BOOL
)draw
;