blob: 35f8622aee166b11b57a0311a425c318a08f0164 [file] [log] [blame]
yangsu@google.comc5aeccd2011-07-17 14:42:08 +00001#import <OpenGLES/EAGL.h>
2#import <OpenGLES/ES1/gl.h>
3#import <OpenGLES/ES1/glext.h>
4#import <OpenGLES/ES2/gl.h>
5#import <OpenGLES/ES2/glext.h>
yangsu@google.com2ba30c02011-07-19 15:17:44 +00006#import <QuartzCore/QuartzCore.h>
7#import <UIKit/UIKit.h>
yangsu@google.comc5aeccd2011-07-17 14:42:08 +00008#include "SkMatrix.h"
9#include "FlingState.h"
10#include "SampleApp.h"
11#include "SkiOSDeviceManager.h"
12class SkOSWindow;
13class SkEvent;
14struct FPSState;
15@interface SkUIView : UIView <UIAccelerometerDelegate> {
16 BOOL fRedrawRequestPending;
17 SkMatrix fMatrix;
18
19 float fZoomAroundX, fZoomAroundY;
20 bool fZoomAround;
21
22 struct {
23 EAGLContext* fContext;
24 GLuint fRenderbuffer;
25 GLuint fStencilbuffer;
26 GLuint fFramebuffer;
27 GLint fWidth;
28 GLint fHeight;
29 } fGL;
yangsu@google.com2ba30c02011-07-19 15:17:44 +000030
yangsu@google.comc5aeccd2011-07-17 14:42:08 +000031 FPSState* fFPSState;
32 NSString* fTitle;
33 UINavigationItem* fTitleItem;
34 SkOSWindow* fWind;
yangsu@google.com2ba30c02011-07-19 15:17:44 +000035 CALayer* fRasterLayer;
36 CAEAGLLayer* fGLLayer;
yangsu@google.comc5aeccd2011-07-17 14:42:08 +000037
38 SkiOSDeviceManager* fDevManager;
39}
40
41@property (nonatomic, assign) SkOSWindow *fWind;
42@property (nonatomic, retain) UINavigationItem* fTitleItem;
43@property (nonatomic, copy) NSString* fTitle;
yangsu@google.com2ba30c02011-07-19 15:17:44 +000044@property (nonatomic, retain) CALayer* fRasterLayer;
45@property (nonatomic, retain) CAEAGLLayer* fGLLayer;
46
47- (void)forceRedraw;
yangsu@google.comc5aeccd2011-07-17 14:42:08 +000048
49- (void)setSkTitle:(const char*)title;
50- (void)postInvalWithRect:(const SkIRect*)rectOrNil;
51- (BOOL)onHandleEvent:(const SkEvent&)event;
yangsu@google.comc5aeccd2011-07-17 14:42:08 +000052@end
53