epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2011 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame] | 7 | #import <OpenGLES/EAGL.h> |
| 8 | #import <OpenGLES/ES1/gl.h> |
| 9 | #import <OpenGLES/ES1/glext.h> |
| 10 | #import <OpenGLES/ES2/gl.h> |
| 11 | #import <OpenGLES/ES2/glext.h> |
yangsu@google.com | 2ba30c0 | 2011-07-19 15:17:44 +0000 | [diff] [blame] | 12 | #import <QuartzCore/QuartzCore.h> |
| 13 | #import <UIKit/UIKit.h> |
yangsu@google.com | 688823f | 2011-08-30 19:14:13 +0000 | [diff] [blame] | 14 | #include "SkWindow.h" |
yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame] | 15 | class SkOSWindow; |
| 16 | class SkEvent; |
yangsu@google.com | 5987045 | 2011-08-02 13:20:22 +0000 | [diff] [blame] | 17 | @class SkUIView; |
| 18 | |
| 19 | @protocol SkUIViewOptionsDelegate <NSObject> |
| 20 | @optional |
| 21 | // Called when the view needs to handle adding an SkOSMenu |
| 22 | - (void) view:(SkUIView*)view didAddMenu:(const SkOSMenu*)menu; |
| 23 | - (void) view:(SkUIView*)view didUpdateMenu:(const SkOSMenu*)menu; |
| 24 | @end |
| 25 | |
| 26 | @interface SkUIView : UIView { |
yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame] | 27 | UINavigationItem* fTitleItem; |
yangsu@google.com | 5987045 | 2011-08-02 13:20:22 +0000 | [diff] [blame] | 28 | SkOSWindow* fWind; |
yangsu@google.com | 5987045 | 2011-08-02 13:20:22 +0000 | [diff] [blame] | 29 | id<SkUIViewOptionsDelegate> fOptionsDelegate; |
yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame] | 30 | } |
| 31 | |
yangsu@google.com | 5987045 | 2011-08-02 13:20:22 +0000 | [diff] [blame] | 32 | @property (nonatomic, readonly) SkOSWindow *fWind; |
yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame] | 33 | @property (nonatomic, retain) UINavigationItem* fTitleItem; |
yangsu@google.com | 5987045 | 2011-08-02 13:20:22 +0000 | [diff] [blame] | 34 | @property (nonatomic, assign) id<SkUIViewOptionsDelegate> fOptionsDelegate; |
yangsu@google.com | 2ba30c0 | 2011-07-19 15:17:44 +0000 | [diff] [blame] | 35 | |
yangsu@google.com | 688823f | 2011-08-30 19:14:13 +0000 | [diff] [blame] | 36 | - (id)initWithDefaults; |
| 37 | - (void)setUpWindow; |
yangsu@google.com | 2ba30c0 | 2011-07-19 15:17:44 +0000 | [diff] [blame] | 38 | - (void)forceRedraw; |
yangsu@google.com | 688823f | 2011-08-30 19:14:13 +0000 | [diff] [blame] | 39 | - (void)drawInRaster; |
yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame] | 40 | |
| 41 | - (void)setSkTitle:(const char*)title; |
yangsu@google.com | 5987045 | 2011-08-02 13:20:22 +0000 | [diff] [blame] | 42 | - (void)onAddMenu:(const SkOSMenu*)menu; |
| 43 | - (void)onUpdateMenu:(const SkOSMenu*)menu; |
yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame] | 44 | - (void)postInvalWithRect:(const SkIRect*)rectOrNil; |
| 45 | - (BOOL)onHandleEvent:(const SkEvent&)event; |
rmistry@google.com | bda03db | 2012-08-14 20:27:54 +0000 | [diff] [blame^] | 46 | @end |
| 47 | |