Mercurial > hg > asa
annotate app_wrapper/main.mm @ 1:2ca5d7440b5c tip
added README
author | Fiore Martin <f.martin@qmul.ac.uk> |
---|---|
date | Fri, 26 Feb 2016 16:11:20 +0000 |
parents | 3004dd663202 |
children |
rev | line source |
---|---|
f@0 | 1 #import <Cocoa/Cocoa.h> |
f@0 | 2 #include "swell.h" |
f@0 | 3 |
f@0 | 4 int main(int argc, char *argv[]) |
f@0 | 5 { |
f@0 | 6 return NSApplicationMain(argc, (const char **) argv); |
f@0 | 7 } |
f@0 | 8 |
f@0 | 9 void CenterWindow(HWND hwnd) |
f@0 | 10 { |
f@0 | 11 if (!hwnd) return; |
f@0 | 12 |
f@0 | 13 id turd=(id)hwnd; |
f@0 | 14 |
f@0 | 15 if ([turd isKindOfClass:[NSView class]]) |
f@0 | 16 { |
f@0 | 17 NSWindow *w = [turd window]; |
f@0 | 18 [w center]; |
f@0 | 19 } |
f@0 | 20 if ([turd isKindOfClass:[NSWindow class]]) |
f@0 | 21 { |
f@0 | 22 [turd center]; |
f@0 | 23 } |
f@0 | 24 } |
f@0 | 25 |