#import <Cocoa/Cocoa.h>
#import <stdio.h>
int main() {
NSApplicationLoad();
// This allows us to manage memory
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
/* This creates a window object
* It is 100 x 30 pixels and has its origin at 40, 40
* It has a title bar, can be closed and resizable
* and it is not deferred
*/
NSWindow *window = [[NSWindow alloc] initWithContentRect: NSMakeRect(40.0, 40.0, 100.0, 30.0)
styleMask: ( NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask )
backing: NSBackingStoreBuffered
defer: NO];
// This displays the window to the screen
[window makeKeyAndOrderFront: nil];
getchar();
[window release];
[pool release];
return 0;
}