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
54 %native(_wxStart) __wxStart;
55 %native(_wxSetDictionary) __wxSetDictionary;
57 //---------------------------------------------------------------------------
60 #define __version__ "0.0.0" // The real value is now in setup.py...
63 wxPoint wxDefaultPosition;
67 //---------------------------------------------------------------------------
68 //---------------------------------------------------------------------------
70 class wxPyApp : public wxEvtHandler {
74 wxPythonApp = new wxPyApp();
81 wxString GetAppName();
85 wxString GetClassName();
86 bool GetExitOnFrameDelete();
88 wxWindow * GetTopWindow();
89 wxString GetVendorName();
90 bool GetUseBestVisual();
99 void SetAppName(const wxString& name);
101 void SetAuto3D(bool auto3D);
103 void SetClassName(const wxString& name);
104 void SetExitOnFrameDelete(bool flag);
105 void SetPrintMode(int mode);
106 void SetTopWindow(wxWindow* window);
107 void SetVendorName(const wxString& name);
108 void SetUseBestVisual(bool flag);
109 wxIcon GetStdIcon(int which);
115 wxPyApp* wxGetApp() {
122 //----------------------------------------------------------------------
123 // this is used to cleanup after wxWindows when Python shuts down.
126 void wxApp_CleanUp() {
131 //----------------------------------------------------------------------
132 // This code gets added to the module initialization function
133 //----------------------------------------------------------------------
138 extern "C" SWIGEXPORT(void) initwindowsc();
139 extern "C" SWIGEXPORT(void) initwindows2c();
140 extern "C" SWIGEXPORT(void) initeventsc();
141 extern "C" SWIGEXPORT(void) initmiscc();
142 extern "C" SWIGEXPORT(void) initmisc2c();
143 extern "C" SWIGEXPORT(void) initgdic();
144 extern "C" SWIGEXPORT(void) initmdic();
145 extern "C" SWIGEXPORT(void) initcontrolsc();
146 extern "C" SWIGEXPORT(void) initcontrols2c();
147 extern "C" SWIGEXPORT(void) initcmndlgsc();
148 extern "C" SWIGEXPORT(void) initstattoolc();
149 extern "C" SWIGEXPORT(void) initframesc();
150 extern "C" SWIGEXPORT(void) initwindows3c();
151 extern "C" SWIGEXPORT(void) initimagec();
152 extern "C" SWIGEXPORT(void) initprintfwc();
153 extern "C" SWIGEXPORT(void) initsizersc();
154 extern "C" SWIGEXPORT(void) initclip_dndc();
155 extern "C" SWIGEXPORT(void) initstreamsc();
156 extern "C" SWIGEXPORT(void) initfilesysc();
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 wxPyBeginBlockThreads,
182 wxBitmap_LIST_helper,
183 wxString_LIST_helper,
184 wxAcceleratorEntry_LIST_helper,
192 wxPyCBH_setCallbackInfo,
193 wxPyCBH_findCallback,
194 wxPyCBH_callCallback,
195 wxPyCBH_callCallbackObj,
202 wxArrayString2PyList_helper
211 // Make our API structure a CObject so other modules can import it
213 PyObject* v = PyCObject_FromVoidPtr(&API, NULL);
214 PyDict_SetItemString(d,"wxPyCoreAPI", v);
218 __wxPreStart(); // initialize the GUI toolkit, if needed.
221 // Since these modules are all linked together, initialize them now
222 // because Python won't be able to find their shared library files,
223 // (since there isn't any.)
245 PyDict_SetItemString(d,"wxMAJOR_VERSION", PyInt_FromLong((long)wxMAJOR_VERSION ));
246 PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long)wxMINOR_VERSION ));
247 PyDict_SetItemString(d,"wxRELEASE_NUMBER", PyInt_FromLong((long)wxRELEASE_NUMBER ));
248 PyDict_SetItemString(d,"wxVERSION_NUMBER", PyInt_FromLong((long)wxVERSION_NUMBER ));
249 PyDict_SetItemString(d,"wxVERSION_STRING", PyString_FromString(wxVERSION_STRING));
254 //----------------------------------------------------------------------
255 // And this gets appended to the shadow class file.
256 //----------------------------------------------------------------------
258 %pragma(python) include="_extras.py";