1 /////////////////////////////////////////////////////////////////////////////
 
   3 // Purpose:     SWIG interface file for a python wxWindows module
 
   9 // Copyright:   (c) 1998 by Total Control Software
 
  10 // Licence:     wxWindows license
 
  11 /////////////////////////////////////////////////////////////////////////////
 
  20 //----------------------------------------------------------------------
 
  21 // This is where we include the other wrapper definition files for SWIG
 
  22 //----------------------------------------------------------------------
 
  25 %include my_typemaps.i
 
  52 %native(_wxStart)           __wxStart;
 
  53 %native(_wxSetDictionary)   __wxSetDictionary;
 
  55 //---------------------------------------------------------------------------
 
  58 #define __version__ "0.0.0"   // The real value is now in setup.py...
 
  61 wxPoint     wxDefaultPosition;
 
  65 //---------------------------------------------------------------------------
 
  66 //---------------------------------------------------------------------------
 
  68 class wxPyApp : public wxEvtHandler {
 
  72             wxPythonApp = new wxPyApp();
 
  79     wxString GetAppName();
 
  83     wxString GetClassName();
 
  84     bool GetExitOnFrameDelete();
 
  86     wxWindow * GetTopWindow();
 
  87     wxString GetVendorName();
 
  88     bool GetUseBestVisual();
 
  96     bool Yield(bool onlyIfNeeded = FALSE);
 
  98     void SetAppName(const wxString& name);
 
 100     void SetAuto3D(bool auto3D);
 
 102     void SetClassName(const wxString& name);
 
 103     void SetExitOnFrameDelete(bool flag);
 
 104     void SetPrintMode(int mode);
 
 105     void SetTopWindow(wxWindow* window);
 
 106     void SetVendorName(const wxString& name);
 
 107     void SetUseBestVisual(bool flag);
 
 111     wxPyApp* wxGetApp() {
 
 112         //return wxPythonApp;
 
 113         return (wxPyApp*)wxTheApp;
 
 118 //----------------------------------------------------------------------
 
 119 // this is used to cleanup after wxWindows when Python shuts down.
 
 122     void wxApp_CleanUp() {
 
 127 //----------------------------------------------------------------------
 
 128 // This code gets added to the module initialization function
 
 129 //----------------------------------------------------------------------
 
 134 extern "C" SWIGEXPORT(void) initwindowsc();
 
 135 extern "C" SWIGEXPORT(void) initwindows2c();
 
 136 extern "C" SWIGEXPORT(void) initeventsc();
 
 137 extern "C" SWIGEXPORT(void) initmiscc();
 
 138 extern "C" SWIGEXPORT(void) initmisc2c();
 
 139 extern "C" SWIGEXPORT(void) initgdic();
 
 140 extern "C" SWIGEXPORT(void) initmdic();
 
 141 extern "C" SWIGEXPORT(void) initcontrolsc();
 
 142 extern "C" SWIGEXPORT(void) initcontrols2c();
 
 143 extern "C" SWIGEXPORT(void) initcmndlgsc();
 
 144 extern "C" SWIGEXPORT(void) initstattoolc();
 
 145 extern "C" SWIGEXPORT(void) initframesc();
 
 146 extern "C" SWIGEXPORT(void) initwindows3c();
 
 147 extern "C" SWIGEXPORT(void) initimagec();
 
 148 extern "C" SWIGEXPORT(void) initprintfwc();
 
 149 extern "C" SWIGEXPORT(void) initsizersc();
 
 150 extern "C" SWIGEXPORT(void) initclip_dndc();
 
 151 extern "C" SWIGEXPORT(void) initstreamsc();
 
 152 extern "C" SWIGEXPORT(void) initfilesysc();
 
 153 extern "C" SWIGEXPORT(void) initutilsc();
 
 154 extern "C" SWIGEXPORT(void) initfontsc();
 
 158 // Export a C API in a struct.  Other modules will be able to load this from
 
 159 // the wxc module and will then have safe access to these functions, even if
 
 160 // in another shared library.
 
 161 static wxPyCoreAPI API = {
 
 162     (p_SWIG_MakePtr_t)SWIG_MakePtr,
 
 163     (p_SWIG_GetPtr_t)SWIG_GetPtr,
 
 164     (p_SWIG_GetPtrObj_t)SWIG_GetPtrObj,
 
 165     (p_SWIG_RegisterMapping_t)SWIG_RegisterMapping,
 
 166     (p_SWIG_addvarlink_t)SWIG_addvarlink,
 
 167     (p_SWIG_newvarlink_t)SWIG_newvarlink,
 
 169     wxPyBeginAllowThreads,
 
 171     wxPyBeginBlockThreads,
 
 186     wxBitmap_LIST_helper,
 
 187     wxString_LIST_helper,
 
 188     wxAcceleratorEntry_LIST_helper,
 
 196     wxPyCBH_setCallbackInfo,
 
 197     wxPyCBH_findCallback,
 
 198     wxPyCBH_callCallback,
 
 199     wxPyCBH_callCallbackObj,
 
 206     wxArrayString2PyList_helper,
 
 207     wxArrayInt2PyList_helper,
 
 211     wxPyOORClientData_dtor,
 
 213     wxPyCBInputStream_create
 
 222     // Make our API structure a CObject so other modules can import it
 
 224     PyObject* v = PyCObject_FromVoidPtr(&API, NULL);
 
 225     PyDict_SetItemString(d,"wxPyCoreAPI", v);
 
 229     __wxPreStart();     // initialize the GUI toolkit, if needed.
 
 232         // Since these modules are all linked together, initialize them now
 
 233         // because Python won't be able to find their shared library files,
 
 234         // (since there isn't any.)
 
 258     PyDict_SetItemString(d,"wxMAJOR_VERSION", PyInt_FromLong((long)wxMAJOR_VERSION ));
 
 259     PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long)wxMINOR_VERSION ));
 
 260     PyDict_SetItemString(d,"wxRELEASE_NUMBER", PyInt_FromLong((long)wxRELEASE_NUMBER ));
 
 261     PyDict_SetItemString(d,"wxVERSION_NUMBER", PyInt_FromLong((long)wxVERSION_NUMBER ));
 
 263     wxString tempStr(wxVERSION_STRING);
 
 264     PyDict_SetItemString(d,"wxVERSION_STRING", PyUnicode_FromUnicode(tempStr.c_str(), tempStr.Len()));
 
 266     PyDict_SetItemString(d,"wxVERSION_STRING", PyString_FromString(wxVERSION_STRING));
 
 272 //----------------------------------------------------------------------
 
 273 // And this gets appended to the shadow class file.
 
 274 //----------------------------------------------------------------------
 
 276 %pragma(python) include="_extras.py";