2011-07-28 14:26:00 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2011 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
2011-07-17 14:42:08 +00:00
|
|
|
#import <OpenGLES/EAGL.h>
|
|
|
|
#import <OpenGLES/ES1/gl.h>
|
|
|
|
#import <OpenGLES/ES1/glext.h>
|
|
|
|
#import <OpenGLES/ES2/gl.h>
|
|
|
|
#import <OpenGLES/ES2/glext.h>
|
2011-07-19 15:17:44 +00:00
|
|
|
#import <QuartzCore/QuartzCore.h>
|
|
|
|
#import <UIKit/UIKit.h>
|
2013-03-05 20:06:05 +00:00
|
|
|
#include "SkOSWindow_ios.h"
|
|
|
|
|
2011-07-17 14:42:08 +00:00
|
|
|
class SkEvent;
|
2011-08-02 13:20:22 +00:00
|
|
|
@class SkUIView;
|
2011-07-17 14:42:08 +00:00
|
|
|
|
2011-08-02 13:20:22 +00:00
|
|
|
@protocol SkUIViewOptionsDelegate <NSObject>
|
|
|
|
@optional
|
|
|
|
// Called when the view needs to handle adding an SkOSMenu
|
|
|
|
- (void) view:(SkUIView*)view didAddMenu:(const SkOSMenu*)menu;
|
2012-09-20 15:45:41 +00:00
|
|
|
- (void) view:(SkUIView*)view didUpdateMenu:(SkOSMenu*)menu;
|
2011-08-02 13:20:22 +00:00
|
|
|
@end
|
2011-07-17 14:42:08 +00:00
|
|
|
|
2011-08-02 13:20:22 +00:00
|
|
|
@interface SkUIView : UIView {
|
2011-07-17 14:42:08 +00:00
|
|
|
UINavigationItem* fTitleItem;
|
2011-08-02 13:20:22 +00:00
|
|
|
SkOSWindow* fWind;
|
|
|
|
id<SkUIViewOptionsDelegate> fOptionsDelegate;
|
2011-07-17 14:42:08 +00:00
|
|
|
}
|
|
|
|
|
2011-08-02 13:20:22 +00:00
|
|
|
@property (nonatomic, readonly) SkOSWindow *fWind;
|
2011-07-17 14:42:08 +00:00
|
|
|
@property (nonatomic, retain) UINavigationItem* fTitleItem;
|
2011-08-02 13:20:22 +00:00
|
|
|
@property (nonatomic, assign) id<SkUIViewOptionsDelegate> fOptionsDelegate;
|
2011-07-19 15:17:44 +00:00
|
|
|
|
2011-08-30 19:14:13 +00:00
|
|
|
- (id)initWithDefaults;
|
|
|
|
- (void)setUpWindow;
|
2011-07-19 15:17:44 +00:00
|
|
|
- (void)forceRedraw;
|
2011-08-30 19:14:13 +00:00
|
|
|
- (void)drawInRaster;
|
2011-07-17 14:42:08 +00:00
|
|
|
|
|
|
|
- (void)setSkTitle:(const char*)title;
|
2011-08-02 13:20:22 +00:00
|
|
|
- (void)onAddMenu:(const SkOSMenu*)menu;
|
2012-09-20 15:45:41 +00:00
|
|
|
- (void)onUpdateMenu:(SkOSMenu*)menu;
|
2011-07-17 14:42:08 +00:00
|
|
|
- (void)postInvalWithRect:(const SkIRect*)rectOrNil;
|
|
|
|
- (BOOL)onHandleEvent:(const SkEvent&)event;
|
2013-03-05 20:06:05 +00:00
|
|
|
- (void)getAttachmentInfo:(SkOSWindow::AttachmentInfo*)info;
|
|
|
|
|
2012-08-14 20:27:54 +00:00
|
|
|
@end
|