]> git.saurik.com Git - iphone-api.git/blob - WebCore/WAKView.h
Adding the WebCore headers (for Cydget).
[iphone-api.git] / WebCore / WAKView.h
1 //
2 // WAKView.h
3 //
4 // Copyright (C) 2005, 2006, 2007, 2008, Apple Inc. All rights reserved.
5 //
6 #import <Foundation/Foundation.h>
7 #import <CoreGraphics/CoreGraphics.h>
8
9 #import "WAKResponder.h"
10 #import "WKView.h"
11
12 #ifndef NSRect
13 #define NSRect CGRect
14 #endif
15 #define NSPoint CGPoint
16 #define NSSize CGSize
17
18 extern NSString *WAKViewFrameSizeDidChangeNotification;
19 extern NSString *WAKViewDidScrollNotification;
20
21 @class WAKWindow;
22
23 @interface WAKView : WAKResponder
24 {
25 WKViewContext viewContext;
26 WKViewRef viewRef;
27
28 NSMutableSet *subviewReferences; // This array is only used to keep WAKViews alive.
29 // The actual subviews are maintained by the WKView.
30 }
31
32 + (WAKView *)focusView;
33
34 - (id)initWithFrame:(CGRect)rect;
35
36 - (WAKWindow *)window;
37
38 - (NSRect)bounds;
39 - (NSRect)frame;
40
41 - (void)setFrame:(NSRect)frameRect;
42 - (void)setFrameSize:(NSSize)newSize;
43 - (void)setBoundsSize:(NSSize)size;
44 - (void)frameSizeChanged;
45
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;
53
54 - (void)viewDidMoveToWindow;
55
56 - (void)lockFocus;
57 - (void)unlockFocus;
58
59 - (void)setNeedsDisplay:(BOOL)flag;
60 - (void)setNeedsDisplayInRect:(CGRect)invalidRect;
61 - (BOOL)needsDisplay;
62 - (void)display;
63 - (void)displayIfNeeded;
64 - (void)displayRect:(NSRect)rect;
65 - (void)displayRectIgnoringOpacity:(NSRect)rect;
66 - (void)drawRect:(CGRect)rect;
67 - (void)viewWillDraw;
68
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;
75
76 - (BOOL)needsPanelToBecomeKey;
77
78 - (BOOL)scrollRectToVisible:(NSRect)aRect;
79 - (void)scrollPoint:(NSPoint)aPoint;
80 - (NSRect)visibleRect;
81
82 - (void)setHidden:(BOOL)flag;
83
84 - (void)setNextKeyView:(WAKView *)aView;
85 - (WAKView *)nextKeyView;
86 - (WAKView *)nextValidKeyView;
87 - (WAKView *)previousKeyView;
88 - (WAKView *)previousValidKeyView;
89
90 - (void)invalidateGState;
91 - (void)releaseGState;
92
93 - (void)setAutoresizingMask:(unsigned int)mask;
94 - (unsigned int)autoresizingMask;
95 - (BOOL)inLiveResize;
96
97 - (BOOL)mouse:(NSPoint)aPoint inRect:(NSRect)aRect;
98
99 - (void)setNeedsLayout:(BOOL)flag;
100 - (void)layout;
101 - (void)layoutIfNeeded;
102
103 - (void)setScale:(float)scale;
104 - (float)scale;
105
106 - (void)_setDrawsOwnDescendants:(BOOL)draw;
107
108 @end