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
49 %native(_wxStart) __wxStart;
50 %native(_wxSetDictionary) __wxSetDictionary;
52 //---------------------------------------------------------------------------
55 #define __version__ "0.0.0" // The real value is now in setup.py...
58 wxPoint wxDefaultPosition;
62 //---------------------------------------------------------------------------
63 //---------------------------------------------------------------------------
65 class wxPyApp : public wxEvtHandler {
69 wxPythonApp = new wxPyApp();
76 wxString GetAppName();
80 wxString GetClassName();
81 bool GetExitOnFrameDelete();
83 wxWindow * GetTopWindow();
84 wxString GetVendorName();
85 bool GetUseBestVisual();
94 void SetAppName(const wxString& name);
96 void SetAuto3D(bool auto3D);
98 void SetClassName(const wxString& name);
99 void SetExitOnFrameDelete(bool flag);
100 void SetPrintMode(int mode);
101 void SetTopWindow(wxWindow* window);
102 void SetVendorName(const wxString& name);
103 void SetUseBestVisual(bool flag);
104 wxIcon GetStdIcon(int which);
110 wxPyApp* wxGetApp() {
115 //----------------------------------------------------------------------
116 // this is used to cleanup after wxWindows when Python shuts down.
119 void wxApp_CleanUp() {
124 //----------------------------------------------------------------------
125 // This code gets added to the module initialization function
126 //----------------------------------------------------------------------
131 extern "C" SWIGEXPORT(void) initwindowsc();
132 extern "C" SWIGEXPORT(void) initwindows2c();
133 extern "C" SWIGEXPORT(void) initeventsc();
134 extern "C" SWIGEXPORT(void) initmiscc();
135 extern "C" SWIGEXPORT(void) initmisc2c();
136 extern "C" SWIGEXPORT(void) initgdic();
137 extern "C" SWIGEXPORT(void) initmdic();
138 extern "C" SWIGEXPORT(void) initcontrolsc();
139 extern "C" SWIGEXPORT(void) initcontrols2c();
140 extern "C" SWIGEXPORT(void) initcmndlgsc();
141 extern "C" SWIGEXPORT(void) initstattoolc();
142 extern "C" SWIGEXPORT(void) initframesc();
143 extern "C" SWIGEXPORT(void) initwindows3c();
144 extern "C" SWIGEXPORT(void) initimagec();
145 extern "C" SWIGEXPORT(void) initprintfwc();
146 extern "C" SWIGEXPORT(void) initsizersc();
147 extern "C" SWIGEXPORT(void) initclip_dndc();
148 extern "C" SWIGEXPORT(void) initstreamsc();
149 extern "C" SWIGEXPORT(void) initfilesysc();
153 // Export a C API in a struct. Other modules will be able to load this from
154 // the wxc module and will then have safe access to these functions, even if
155 // in another shared library.
156 static wxPyCoreAPI API = {
160 SWIG_RegisterMapping,
164 wxPyBeginBlockThreads,
175 wxBitmap_LIST_helper,
176 wxString_LIST_helper,
177 wxAcceleratorEntry_LIST_helper,
186 wxPyCBH_findCallback,
187 wxPyCBH_callCallback,
188 wxPyCBH_callCallbackObj,
202 // Make our API structure a CObject so other modules can import it
204 PyObject* v = PyCObject_FromVoidPtr(&API, NULL);
205 PyDict_SetItemString(d,"wxPyCoreAPI", v);
209 __wxPreStart(); // initialize the GUI toolkit, if needed.
212 // Since these modules are all linked together, initialize them now
213 // because Python won't be able to find their shared library files,
214 // (since there isn't any.)
236 PyDict_SetItemString(d,"wxMAJOR_VERSION", PyInt_FromLong((long)wxMAJOR_VERSION ));
237 PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long)wxMINOR_VERSION ));
238 PyDict_SetItemString(d,"wxRELEASE_NUMBER", PyInt_FromLong((long)wxRELEASE_NUMBER ));
239 PyDict_SetItemString(d,"wxVERSION_NUMBER", PyInt_FromLong((long)wxVERSION_NUMBER ));
240 PyDict_SetItemString(d,"wxVERSION_STRING", PyString_FromString(wxVERSION_STRING));
245 //----------------------------------------------------------------------
246 // And this gets appended to the shadow class file.
247 //----------------------------------------------------------------------
249 %pragma(python) include="_extras.py";