From 21ad90fd15a0e7cf71216f8b6c2e0f1535b259b1 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Mon, 18 May 2015 21:15:50 +0200 Subject: [PATCH] [DEV] correct the interface of the MacOs context --- ewol/context/MacOs/Context.cpp | 1 + ewol/context/MacOs/Interface.mm | 4 ++-- ewol/context/MacOs/Windows.mm | 14 +++++++++++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ewol/context/MacOs/Context.cpp b/ewol/context/MacOs/Context.cpp index 0326576d..f5f478a7 100644 --- a/ewol/context/MacOs/Context.cpp +++ b/ewol/context/MacOs/Context.cpp @@ -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; diff --git a/ewol/context/MacOs/Interface.mm b/ewol/context/MacOs/Interface.mm index adfa77bf..db28e5e0 100644 --- a/ewol/context/MacOs/Interface.mm +++ b/ewol/context/MacOs/Interface.mm @@ -12,8 +12,7 @@ #import #import #import - - +#import 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; } diff --git a/ewol/context/MacOs/Windows.mm b/ewol/context/MacOs/Windows.mm index d04c4290..13f23e37 100644 --- a/ewol/context/MacOs/Windows.mm +++ b/ewol/context/MacOs/Windows.mm @@ -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