git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12257 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
+//----------------------------------------------------------------------
+// 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__
 int wxEntry( int argc, char *argv[] , bool enterLoop )
 {
 #ifdef __MWERKS__
     wxDebugContext::SetCheckpoint();
 #endif
 #endif
     wxDebugContext::SetCheckpoint();
 #endif
 #endif
-    if (!wxApp::Initialize()) {
+    if (!wxEntryStart(argc, argv)) {
         return 0;
     }
    // create the application object or ensure that one already exists
         return 0;
     }
    // create the application object or ensure that one already exists
   wxTheApp->argv = argv;
 
   // GUI-specific initialization, such as creating an app context.
   wxTheApp->argv = argv;
 
   // GUI-specific initialization, such as creating an app context.
 
   // 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
 
 
+//----------------------------------------------------------------------
+// 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__
 int wxEntry( int argc, char *argv[] , bool enterLoop )
 {
 #ifdef __MWERKS__
     wxDebugContext::SetCheckpoint();
 #endif
 #endif
     wxDebugContext::SetCheckpoint();
 #endif
 #endif
-    if (!wxApp::Initialize()) {
+    if (!wxEntryStart(argc, argv)) {
         return 0;
     }
    // create the application object or ensure that one already exists
         return 0;
     }
    // create the application object or ensure that one already exists
   wxTheApp->argv = argv;
 
   // GUI-specific initialization, such as creating an app context.
   wxTheApp->argv = argv;
 
   // GUI-specific initialization, such as creating an app context.
 
   // 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