yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame] | 1 | #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.com | 2ba30c0 | 2011-07-19 15:17:44 +0000 | [diff] [blame^] | 6 | #import <QuartzCore/QuartzCore.h> |
| 7 | #import <UIKit/UIKit.h> |
yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame] | 8 | #include "SkMatrix.h" |
| 9 | #include "FlingState.h" |
| 10 | #include "SampleApp.h" |
| 11 | #include "SkiOSDeviceManager.h" |
| 12 | class SkOSWindow; |
| 13 | class SkEvent; |
| 14 | struct 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.com | 2ba30c0 | 2011-07-19 15:17:44 +0000 | [diff] [blame^] | 30 | |
yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame] | 31 | FPSState* fFPSState; |
| 32 | NSString* fTitle; |
| 33 | UINavigationItem* fTitleItem; |
| 34 | SkOSWindow* fWind; |
yangsu@google.com | 2ba30c0 | 2011-07-19 15:17:44 +0000 | [diff] [blame^] | 35 | CALayer* fRasterLayer; |
| 36 | CAEAGLLayer* fGLLayer; |
yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame] | 37 | |
| 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.com | 2ba30c0 | 2011-07-19 15:17:44 +0000 | [diff] [blame^] | 44 | @property (nonatomic, retain) CALayer* fRasterLayer; |
| 45 | @property (nonatomic, retain) CAEAGLLayer* fGLLayer; |
| 46 | |
| 47 | - (void)forceRedraw; |
yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame] | 48 | |
| 49 | - (void)setSkTitle:(const char*)title; |
| 50 | - (void)postInvalWithRect:(const SkIRect*)rectOrNil; |
| 51 | - (BOOL)onHandleEvent:(const SkEvent&)event; |
yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame] | 52 | @end |
| 53 | |