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 // %pragma(python) code="
21 // # This gives this module's dictionary to the C++ extension code...
22 // wxc._wxSetDictionary(vars())
25 //----------------------------------------------------------------------
26 // This is where we include the other wrapper definition files for SWIG
27 //----------------------------------------------------------------------
30 %include my_typemaps.i
55 %native(_wxStart) __wxStart;
56 %native(_wxSetDictionary) __wxSetDictionary;
58 //---------------------------------------------------------------------------
61 #define __version__ "0.0.0" // The real value is now in setup.py...
64 wxPoint wxDefaultPosition;
68 //---------------------------------------------------------------------------
69 //---------------------------------------------------------------------------
71 class wxPyApp : public wxEvtHandler {
75 wxPythonApp = new wxPyApp();
82 wxString GetAppName();
86 wxString GetClassName();
87 bool GetExitOnFrameDelete();
89 wxWindow * GetTopWindow();
90 wxString GetVendorName();
91 bool GetUseBestVisual();
100 void SetAppName(const wxString& name);
102 void SetAuto3D(bool auto3D);
104 void SetClassName(const wxString& name);
105 void SetExitOnFrameDelete(bool flag);
106 void SetPrintMode(int mode);
107 void SetTopWindow(wxWindow* window);
108 void SetVendorName(const wxString& name);
109 void SetUseBestVisual(bool flag);
110 wxIcon GetStdIcon(int which);
114 wxPyApp* wxGetApp() {
121 //----------------------------------------------------------------------
122 // this is used to cleanup after wxWindows when Python shuts down.
125 void wxApp_CleanUp() {
130 //----------------------------------------------------------------------
131 // This code gets added to the module initialization function
132 //----------------------------------------------------------------------
137 extern "C" SWIGEXPORT(void) initwindowsc();
138 extern "C" SWIGEXPORT(void) initwindows2c();
139 extern "C" SWIGEXPORT(void) initeventsc();
140 extern "C" SWIGEXPORT(void) initmiscc();
141 extern "C" SWIGEXPORT(void) initmisc2c();
142 extern "C" SWIGEXPORT(void) initgdic();
143 extern "C" SWIGEXPORT(void) initmdic();
144 extern "C" SWIGEXPORT(void) initcontrolsc();
145 extern "C" SWIGEXPORT(void) initcontrols2c();
146 extern "C" SWIGEXPORT(void) initcmndlgsc();
147 extern "C" SWIGEXPORT(void) initstattoolc();
148 extern "C" SWIGEXPORT(void) initframesc();
149 extern "C" SWIGEXPORT(void) initwindows3c();
150 extern "C" SWIGEXPORT(void) initimagec();
151 extern "C" SWIGEXPORT(void) initprintfwc();
152 extern "C" SWIGEXPORT(void) initsizersc();
153 extern "C" SWIGEXPORT(void) initclip_dndc();
154 extern "C" SWIGEXPORT(void) initstreamsc();
155 extern "C" SWIGEXPORT(void) initfilesysc();
156 extern "C" SWIGEXPORT(void) initutilsc();
160 // Export a C API in a struct. Other modules will be able to load this from
161 // the wxc module and will then have safe access to these functions, even if
162 // in another shared library.
163 static wxPyCoreAPI API = {
167 SWIG_RegisterMapping,
171 wxPyBeginAllowThreads,
173 wxPyBeginBlockThreads,
184 wxBitmap_LIST_helper,
185 wxString_LIST_helper,
186 wxAcceleratorEntry_LIST_helper,
194 wxPyCBH_setCallbackInfo,
195 wxPyCBH_findCallback,
196 wxPyCBH_callCallback,
197 wxPyCBH_callCallbackObj,
204 wxArrayString2PyList_helper,
205 wxArrayInt2PyList_helper
214 // Make our API structure a CObject so other modules can import it
216 PyObject* v = PyCObject_FromVoidPtr(&API, NULL);
217 PyDict_SetItemString(d,"wxPyCoreAPI", v);
221 __wxPreStart(); // initialize the GUI toolkit, if needed.
224 // Since these modules are all linked together, initialize them now
225 // because Python won't be able to find their shared library files,
226 // (since there isn't any.)
249 PyDict_SetItemString(d,"wxMAJOR_VERSION", PyInt_FromLong((long)wxMAJOR_VERSION ));
250 PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long)wxMINOR_VERSION ));
251 PyDict_SetItemString(d,"wxRELEASE_NUMBER", PyInt_FromLong((long)wxRELEASE_NUMBER ));
252 PyDict_SetItemString(d,"wxVERSION_NUMBER", PyInt_FromLong((long)wxVERSION_NUMBER ));
253 PyDict_SetItemString(d,"wxVERSION_STRING", PyString_FromString(wxVERSION_STRING));
258 //----------------------------------------------------------------------
259 // And this gets appended to the shadow class file.
260 //----------------------------------------------------------------------
262 %pragma(python) include="_extras.py";