ebiten/ui/cocoa/ebiten_controller.c

28 lines
705 B
C
Raw Normal View History

2013-10-12 20:17:51 +02:00
// -*- objc -*-
#import "ebiten_controller.h"
@implementation EbitenController {
}
- (void)applicationDidFinishLaunching:(NSNotification*)aNotification {
(void)aNotification;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(windowClosing:)
name:NSWindowWillCloseNotification
object:nil];
2013-10-12 20:17:51 +02:00
}
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:
(NSApplication*)theApplication {
(void)theApplication;
return YES;
}
- (void)windowClosing:(NSNotification*)aNotification {
(void)aNotification;
[NSApp terminate:nil];
}
2013-10-12 20:17:51 +02:00
@end