Added wxEntryStart, wxEntryInitGui, and wxEntryCleanup for wxPython
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -609,6 +609,28 @@ void wxApp::CleanUp()
|
|||||||
#endif
|
#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 )
|
int wxEntry( int argc, char *argv[] , bool enterLoop )
|
||||||
{
|
{
|
||||||
#ifdef __MWERKS__
|
#ifdef __MWERKS__
|
||||||
@@ -622,7 +644,7 @@ int wxEntry( int argc, char *argv[] , bool enterLoop )
|
|||||||
wxDebugContext::SetCheckpoint();
|
wxDebugContext::SetCheckpoint();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
if (!wxApp::Initialize()) {
|
if (!wxEntryStart(argc, argv)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// create the application object or ensure that one already exists
|
// 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;
|
wxTheApp->argv = argv;
|
||||||
|
|
||||||
// GUI-specific initialization, such as creating an app context.
|
// 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
|
// 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();
|
wxTheApp->OnExit();
|
||||||
|
|
||||||
wxApp::CleanUp();
|
wxEntryCleanup();
|
||||||
|
|
||||||
return retValue;
|
return retValue;
|
||||||
}
|
}
|
||||||
|
@@ -609,6 +609,28 @@ void wxApp::CleanUp()
|
|||||||
#endif
|
#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 )
|
int wxEntry( int argc, char *argv[] , bool enterLoop )
|
||||||
{
|
{
|
||||||
#ifdef __MWERKS__
|
#ifdef __MWERKS__
|
||||||
@@ -622,7 +644,7 @@ int wxEntry( int argc, char *argv[] , bool enterLoop )
|
|||||||
wxDebugContext::SetCheckpoint();
|
wxDebugContext::SetCheckpoint();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
if (!wxApp::Initialize()) {
|
if (!wxEntryStart(argc, argv)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// create the application object or ensure that one already exists
|
// 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;
|
wxTheApp->argv = argv;
|
||||||
|
|
||||||
// GUI-specific initialization, such as creating an app context.
|
// 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
|
// 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();
|
wxTheApp->OnExit();
|
||||||
|
|
||||||
wxApp::CleanUp();
|
wxEntryCleanup();
|
||||||
|
|
||||||
return retValue;
|
return retValue;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user