• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  */
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>
12 #import <QuartzCore/QuartzCore.h>
13 #import <UIKit/UIKit.h>
14 #include "SkOSWindow_ios.h"
15 
16 class SkEvent;
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:(SkOSMenu*)menu;
24 @end
25 
26 @interface SkUIView : UIView  {
27     UINavigationItem* fTitleItem;
28     SkOSWindow* fWind;
29     id<SkUIViewOptionsDelegate> fOptionsDelegate;
30 }
31 
32 @property (nonatomic, readonly) SkOSWindow *fWind;
33 @property (nonatomic, retain) UINavigationItem* fTitleItem;
34 @property (nonatomic, assign) id<SkUIViewOptionsDelegate> fOptionsDelegate;
35 
36 - (id)initWithDefaults;
37 - (void)setUpWindow;
38 - (void)forceRedraw;
39 - (void)drawInRaster;
40 
41 - (void)setSkTitle:(const char*)title;
42 - (void)onAddMenu:(const SkOSMenu*)menu;
43 - (void)onUpdateMenu:(SkOSMenu*)menu;
44 - (void)postInvalWithRect:(const SkIRect*)rectOrNil;
45 - (BOOL)onHandleEvent:(const SkEvent&)event;
46 - (void)getAttachmentInfo:(SkOSWindow::AttachmentInfo*)info;
47 
48 @end
49