From 92b002a4c8152c837ca42c1c190a7ccda4f866e9 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 2 Nov 2001 03:59:02 +0000 Subject: [PATCH] Added wxEntryStart, wxEntryInitGui, and wxEntryCleanup for wxPython git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/app.cpp | 28 +++++++++++++++++++++++++--- src/mac/carbon/app.cpp | 28 +++++++++++++++++++++++++--- 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/src/mac/app.cpp b/src/mac/app.cpp index 28a3bc352d..eafd5536c6 100644 --- a/src/mac/app.cpp +++ b/src/mac/app.cpp @@ -609,6 +609,28 @@ void wxApp::CleanUp() #endif } +//---------------------------------------------------------------------- +// wxEntry +//---------------------------------------------------------------------- + +int wxEntryStart( int argc, char *argv[] ) +{ + return wxApp::Initialize(); +} + + +int wxEntryInitGui() +{ + return wxTheApp->OnInitGui(); +} + + +void wxEntryCleanup() +{ + wxApp::CleanUp(); +} + + int wxEntry( int argc, char *argv[] , bool enterLoop ) { #ifdef __MWERKS__ @@ -622,7 +644,7 @@ int wxEntry( int argc, char *argv[] , bool enterLoop ) wxDebugContext::SetCheckpoint(); #endif #endif - if (!wxApp::Initialize()) { + if (!wxEntryStart(argc, argv)) { return 0; } // create the application object or ensure that one already exists @@ -647,7 +669,7 @@ int wxEntry( int argc, char *argv[] , bool enterLoop ) wxTheApp->argv = argv; // GUI-specific initialization, such as creating an app context. - wxTheApp->OnInitGui(); + wxEntryInitGui(); // we could try to get the open apple events here to adjust argc and argv better @@ -689,7 +711,7 @@ int wxEntry( int argc, char *argv[] , bool enterLoop ) wxTheApp->OnExit(); - wxApp::CleanUp(); + wxEntryCleanup(); return retValue; } diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index 28a3bc352d..eafd5536c6 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -609,6 +609,28 @@ void wxApp::CleanUp() #endif } +//---------------------------------------------------------------------- +// wxEntry +//---------------------------------------------------------------------- + +int wxEntryStart( int argc, char *argv[] ) +{ + return wxApp::Initialize(); +} + + +int wxEntryInitGui() +{ + return wxTheApp->OnInitGui(); +} + + +void wxEntryCleanup() +{ + wxApp::CleanUp(); +} + + int wxEntry( int argc, char *argv[] , bool enterLoop ) { #ifdef __MWERKS__ @@ -622,7 +644,7 @@ int wxEntry( int argc, char *argv[] , bool enterLoop ) wxDebugContext::SetCheckpoint(); #endif #endif - if (!wxApp::Initialize()) { + if (!wxEntryStart(argc, argv)) { return 0; } // create the application object or ensure that one already exists @@ -647,7 +669,7 @@ int wxEntry( int argc, char *argv[] , bool enterLoop ) wxTheApp->argv = argv; // GUI-specific initialization, such as creating an app context. - wxTheApp->OnInitGui(); + wxEntryInitGui(); // we could try to get the open apple events here to adjust argc and argv better @@ -689,7 +711,7 @@ int wxEntry( int argc, char *argv[] , bool enterLoop ) wxTheApp->OnExit(); - wxApp::CleanUp(); + wxEntryCleanup(); return retValue; } -- 2.45.2