#import "SampleAppDelegate.h"
+
+#include "SkApplication.h"
+
@implementation SampleAppDelegate
@synthesize fWindow, fView, fOptions;
NSRect frame = NSMakeRect(fWindow.frame.origin.x, fWindow.frame.origin.y, 768, 1024);
[fWindow setFrame:frame display:YES animate:YES];
}
+
+- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {
+ application_term();
+ return NSTerminateNow;
+}
+
@end
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
application_init();
int retVal = NSApplicationMain(argc, (const char **)argv);
+
+#if 0
+ // we don't expect NSApplicationMain to return. See our applicationShouldTerminate handler.
application_term();
[pool release];
+#endif
return retVal;
}