]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/src/wxp.i
*** empty log message ***
[wxWidgets.git] / utils / wxPython / src / wxp.i
index d7ea8705173fc0f9b6b249a10e966c2504fbfbd9..b997b0c89b1d421019a7d6918acbed262d5478cc 100644 (file)
@@ -1,5 +1,3 @@
-%module wxp
-%{
 /////////////////////////////////////////////////////////////////////////////
 // Name:        wxp.i
 // Purpose:     SWIG interface file for a python wxWindows module
 /////////////////////////////////////////////////////////////////////////////
 // Name:        wxp.i
 // Purpose:     SWIG interface file for a python wxWindows module
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
-
-#ifdef __WXMSW__
-#include <windows.h>
-#undef FindWindow
-#undef GetCharWidth
-#undef LoadAccelerators
-#endif
+%module wxp
 
 
 
 
+%{
 #include "helpers.h"
 %}
 
 #include "helpers.h"
 %}
 
@@ -99,29 +92,6 @@ public:
 };
 
 
 };
 
 
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-
-%{
-#ifdef __WXMSW__             // If building for win32...
-extern HINSTANCE wxhInstance;
-
-BOOL WINAPI DllMain(
-    HINSTANCE   hinstDLL,    // handle to DLL module
-    DWORD       fdwReason,   // reason for calling function
-    LPVOID      lpvReserved  // reserved
-   )
-{
-    wxhInstance = hinstDLL;
-    return 1;
-}
-#endif
-
-%}
-
-
-
 
 //----------------------------------------------------------------------
 // This code gets added to the module initialization function
 
 //----------------------------------------------------------------------
 // This code gets added to the module initialization function
@@ -141,16 +111,8 @@ extern "C" SWIGEXPORT(void,initcmndlgsc)();
 %}
 
 %init %{
 %}
 
 %init %{
-        // We don't want to run the wxEntry or OnInit yet, so we just do the
-        // beginings of what it would have done...  See __wxStart() for the
-        // rest.
-#ifdef __WXMSW__
-    wxApp::Initialize((WXHINSTANCE)wxhInstance);
-#endif
-#ifdef __WXGTK__
-    wxApp::CommonInit();
-#endif
 
 
+    __wxPreStart();     // initialize the GUI toolkit, if needed.
 
 //    wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100);
 
 
 //    wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100);
 
@@ -178,6 +140,25 @@ extern "C" SWIGEXPORT(void,initcmndlgsc)();
 /////////////////////////////////////////////////////////////////////////////
 //
 // $Log$
 /////////////////////////////////////////////////////////////////////////////
 //
 // $Log$
+// Revision 1.6  1998/08/27 21:59:10  RD
+// Some chicken-and-egg problems solved for wxPython on wxGTK
+//
+// Revision 1.5  1998/08/27 00:00:28  RD
+// - more tweaks
+// - have discovered some problems but not yet discovered solutions...
+//
+// Revision 1.4  1998/08/18 19:48:20  RD
+// more wxGTK compatibility things.
+//
+// It builds now but there are serious runtime problems...
+//
+// Revision 1.3  1998/08/15 07:36:53  RD
+// - Moved the header in the .i files out of the code that gets put into
+// the .cpp files.  It caused CVS conflicts because of the RCS ID being
+// different each time.
+//
+// - A few minor fixes.
+//
 // Revision 1.2  1998/08/14 23:36:49  RD
 // Beginings of wxGTK compatibility
 //
 // Revision 1.2  1998/08/14 23:36:49  RD
 // Beginings of wxGTK compatibility
 //