[DEV] correct the interface of the MacOs context

This commit is contained in:
Edouard DUPIN 2015-05-18 21:15:50 +02:00
parent 935d9cd4a6
commit 21ad90fd15
3 changed files with 14 additions and 5 deletions

View File

@ -183,6 +183,7 @@ int ewol::run(ewol::context::Application* _application, int _argc, const char *_
}
int32_t retValue = interface->Run();
EWOL_INFO("Stop running");
delete(interface);
interface = nullptr;
return retValue;

View File

@ -12,8 +12,7 @@
#import <ewol/context/MacOs/OpenglView.h>
#import <ewol/context/MacOs/Windows.h>
#import <ewol/context/MacOs/AppDelegate.h>
#import <ewol/debug.h>
int mm_main(int argc, const char *argv[]) {
[NSAutoreleasePool new];
@ -90,6 +89,7 @@ int mm_main(int argc, const char *argv[]) {
int mm_run(void) {
[NSApp run];
EWOL_INFO("END of application");
// return no error
return 0;
}

View File

@ -24,6 +24,9 @@
- (id)init {
id windowsID = [super init];
//[NSApp setDelegate: self];
EWOL_DEBUG("INIT ...");
// set the windows at a specific position :
[windowsID cascadeTopLeftFromPoint:NSMakePoint(50,50)];
@ -68,13 +71,13 @@
+ (void)dealloc {
EWOL_DEBUG("FREE ...");
EWOL_ERROR("FREE ...");
//[_window release];
[super dealloc];
}
+ (void)performClose:(id)sender {
EWOL_DEBUG("perform close ...");
EWOL_ERROR("perform close ...");
}
@ -420,7 +423,12 @@ static ewol::key::Special guiKeyBoardMode;
}
}
- (void)close {
EWOL_ERROR("close:");
// TODO: add check of close request ...
[super close];
[NSApp terminate:self];
}
@end