blob: cd959f1b9ae800037157bad8400668dd7a929ab6 [file] [log] [blame]
#import <QuartzCore/QuartzCore.h>
#import <Cocoa/Cocoa.h>
#include "SampleApp.h"
class SkEvent;
class SkOSWindow;
@class SkNSView;
@protocol SkNSViewOptionsDelegate <NSObject>
@optional
// Called when the view needs to handle adding an SkOSMenu
- (void) view:(SkNSView*)view didAddMenu:(const SkOSMenu*)menu;
- (void) view:(SkNSView*)view didUpdateMenu:(const SkOSMenu*)menu;
@end
@interface SkNSView : NSView {
BOOL fRedrawRequestPending;
NSString* fTitle;
SkOSWindow* fWind;
NSOpenGLContext* fGLContext;
id<SkNSViewOptionsDelegate> fOptionsDelegate;
}
@property (nonatomic, readonly) SkOSWindow *fWind;
@property (nonatomic, retain) NSString* fTitle;
@property (nonatomic, retain) NSOpenGLContext* fGLContext;
@property (nonatomic, assign) id<SkNSViewOptionsDelegate> fOptionsDelegate;
- (id)initWithMyDefaults;
- (void)setSkTitle:(const char*)title;
- (void)onAddMenu:(const SkOSMenu*)menu;
- (void)onUpdateMenu:(const SkOSMenu*)menu;
- (void)postInvalWithRect:(const SkIRect*)rectOrNil;
- (BOOL)onHandleEvent:(const SkEvent&)event;
- (void)attachGL;
- (void)detachGL;
- (void)presentGL;
@end