blob: 5e12e004d6831cd43f8502d5a30291137ef396ad [file] [log] [blame]
reed@google.comac10a2d2010-12-22 21:39:39 +00001#import <UIKit/UIKit.h>
2
3#include "SkMatrix.h"
4#include "FlingState.h"
5
6#import <OpenGLES/EAGL.h>
7#import <OpenGLES/ES1/gl.h>
8#import <OpenGLES/ES1/glext.h>
9
10class SkOSWindow;
11class SkEvent;
12
13@interface SkUIView : UIView <UIAccelerometerDelegate> {
14 BOOL fRedrawRequestPending;
15 SkOSWindow* fWind;
16 SkMatrix fMatrix, fLocalMatrix;
17 bool fNeedGestureEnded;
18
19 SkMatrix fRotateMatrix;
20
21 float fFirstPinchX, fFirstPinchY;
22 bool fNeedFirstPinch;
23
24 float fZoomAroundX, fZoomAroundY;
25 bool fZoomAround;
26
27 FlingState fFlingState;
28
29 GrAnimateFloat fWarpState;
30 bool fUseWarp;
31
32 struct {
33 EAGLContext* fContext;
34 GLuint fRenderbuffer;
35 GLuint fStencilbuffer;
36 GLuint fFramebuffer;
37 GLint fWidth;
38 GLint fHeight;
39 } fGL;
40
41 UILabel* fTitleLabel;
42
43 enum Backend {
44 kGL_Backend,
45 kRaster_Backend,
46 };
47
48 // these are visible to DetailViewController
49 Backend fBackend;
50 bool fComplexClip;
51}
52
53@property (nonatomic, assign) SkOSWindow *fWind;
54@property (nonatomic, retain) UILabel* fTitleLabel;
55@property (nonatomic, assign) Backend fBackend;
56@property (nonatomic, assign) bool fComplexClip;
57@property (nonatomic, assign, setter=setWarpState) bool fUseWarp;
58
59- (void)setSkTitle:(const char*)title;
60- (void)postInvalWithRect:(const SkIRect*)rectOrNil;
61- (BOOL)onHandleEvent:(const SkEvent&)event;
62
63@end
64