File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change
1
+ #import < Cocoa/Cocoa.h>
2
+
3
+ @interface FlippedView : NSView
4
+
5
+ - (BOOL )isFlipped ;
6
+
7
+ @end
Original file line number Diff line number Diff line change
1
+ #import " flippedview.h"
2
+
3
+ @implementation FlippedView
4
+
5
+ - (BOOL ) isFlipped
6
+ {
7
+ return YES ;
8
+ }
9
+
10
+ @end
Original file line number Diff line number Diff line change 1
1
#import " window.h"
2
2
#import " windowdelegate.h"
3
+ #import " flippedview.h"
3
4
#include " _cgo_export.h"
4
5
5
6
WindowDelegate *gocoa_windowDelegate = nil ;
11
12
styleMask: (NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskResizable | NSWindowStyleMaskMiniaturizable)
12
13
backing: NSBackingStoreBuffered
13
14
defer: NO ];
15
+ [window setContentView: [[FlippedView alloc ] initWithFrame: windowRect]];
14
16
[window setTitle: [NSString stringWithUTF8String: title]];
15
17
[window autorelease ];
16
18
27
29
styleMask: (NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskResizable | NSWindowStyleMaskMiniaturizable)
28
30
backing: NSBackingStoreBuffered
29
31
defer: NO ];
32
+ [window setContentView: [[FlippedView alloc ] initWithFrame: windowRect]];
30
33
[window setTitle: [NSString stringWithUTF8String: title]];
31
34
[window autorelease ];
32
35
CGFloat xPos = NSWidth ([[window screen ] frame ])/2 - NSWidth ([window frame ])/2 ;
You can’t perform that action at this time.
0 commit comments