Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
2 /*
3 * Copyright 2011 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
9 #import <QuartzCore/QuartzCore.h>
10 #import <Cocoa/Cocoa.h>
11 #import "SkWindow.h"
12 class SkEvent;
13 @class SkNSView;
15 @protocol SkNSViewOptionsDelegate <NSObject>
16 @optional
17 // Called when the view needs to handle adding an SkOSMenu
18 - (void) view:(SkNSView*)view didAddMenu:(const SkOSMenu*)menu;
19 - (void) view:(SkNSView*)view didUpdateMenu:(const SkOSMenu*)menu;
20 @end
22 @interface SkNSView : NSView {
23 BOOL fRedrawRequestPending;
25 NSString* fTitle;
26 SkOSWindow* fWind;
27 #if SK_SUPPORT_GPU
28 NSOpenGLContext* fGLContext;
29 #endif
30 id<SkNSViewOptionsDelegate> fOptionsDelegate;
31 }
33 @property (nonatomic, readonly) SkOSWindow *fWind;
34 @property (nonatomic, retain) NSString* fTitle;
35 #if SK_SUPPORT_GPU
36 @property (nonatomic, retain) NSOpenGLContext* fGLContext;
37 #endif
38 @property (nonatomic, assign) id<SkNSViewOptionsDelegate> fOptionsDelegate;
40 - (id)initWithDefaults;
41 - (void)setUpWindow;
42 - (void)resizeSkView:(NSSize)newSize;
43 - (void)setSkTitle:(const char*)title;
44 - (void)onAddMenu:(const SkOSMenu*)menu;
45 - (void)onUpdateMenu:(const SkOSMenu*)menu;
46 - (void)postInvalWithRect:(const SkIRect*)rectOrNil;
47 - (BOOL)onHandleEvent:(const SkEvent&)event;
49 - (bool)attach:(SkOSWindow::SkBackEndTypes)attachType withMSAASampleCount:(int) sampleCount andGetInfo:(SkOSWindow::AttachmentInfo*) info;
50 - (void)detach;
51 - (void)present;
52 @end