]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/src/wx.i
wxPython 2.1b1 for wxMSW (wxGTK coming soon)
[wxWidgets.git] / utils / wxPython / src / wx.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wxp.i
3 // Purpose: SWIG interface file for a python wxWindows module
4 //
5 // Author: Robin Dunn
6 //
7 // Created: 5/22/98
8 // RCS-ID: $Id$
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
12
13 %module wx
14
15
16 %{
17 #include "helpers.h"
18 %}
19
20 //----------------------------------------------------------------------
21 // This is where we include the other wrapper definition files for SWIG
22 //----------------------------------------------------------------------
23
24 %include typemaps.i
25 %include my_typemaps.i
26 %include _defs.i
27
28 %import misc.i
29 %import misc2.i
30 %import windows.i
31 %import events.i
32 %import gdi.i
33 %import mdi.i
34 %import controls.i
35 %import controls2.i
36 %import windows2.i
37 %import cmndlgs.i
38 %import stattool.i
39 %import frames.i
40 %import windows3.i
41 %import image.i
42 %import printfw.i
43
44
45 %native(_wxStart) __wxStart;
46 %native(_wxSetDictionary) __wxSetDictionary;
47
48 //---------------------------------------------------------------------------
49
50 #define __version__ "2.1b1"
51
52 wxPoint wxPyDefaultPosition;
53 wxSize wxPyDefaultSize;
54
55 //---------------------------------------------------------------------------
56 //---------------------------------------------------------------------------
57
58 class wxPyApp : public wxEvtHandler {
59 public:
60 %addmethods {
61 wxPyApp() {
62 wxPythonApp = new wxPyApp();
63 return wxPythonApp;
64 }
65 }
66
67
68 wxString GetAppName();
69 #ifdef __WXMSW__
70 bool GetAuto3D();
71 #endif
72 wxString GetClassName();
73 bool GetExitOnFrameDelete();
74 int GetPrintMode();
75 wxWindow * GetTopWindow();
76 wxString GetVendorName();
77
78 void Dispatch();
79 void ExitMainLoop();
80 bool Initialized();
81 int MainLoop();
82 bool Pending();
83
84 void SetAppName(const wxString& name);
85 #ifdef __WXMSW__
86 void SetAuto3D(bool auto3D);
87 #endif
88 void SetClassName(const wxString& name);
89 void SetExitOnFrameDelete(bool flag);
90 void SetPrintMode(int mode);
91 void SetTopWindow(wxWindow* window);
92 void SetVendorName(const wxString& name);
93
94 // This one is wxPython specific. If you override MainLoop,
95 // call this when done.
96 void AfterMainLoop();
97 };
98
99
100
101 //----------------------------------------------------------------------
102 // This code gets added to the module initialization function
103 //----------------------------------------------------------------------
104
105 %{
106 extern "C" SWIGEXPORT(void,initwindowsc)();
107 extern "C" SWIGEXPORT(void,initwindows2c)();
108 extern "C" SWIGEXPORT(void,initeventsc)();
109 extern "C" SWIGEXPORT(void,initmiscc)();
110 extern "C" SWIGEXPORT(void,initmisc2c)();
111 extern "C" SWIGEXPORT(void,initgdic)();
112 extern "C" SWIGEXPORT(void,initmdic)();
113 extern "C" SWIGEXPORT(void,initcontrolsc)();
114 extern "C" SWIGEXPORT(void,initcontrols2c)();
115 extern "C" SWIGEXPORT(void,initcmndlgsc)();
116 extern "C" SWIGEXPORT(void,initstattoolc)();
117 extern "C" SWIGEXPORT(void,initframesc)();
118 extern "C" SWIGEXPORT(void,initwindows3c)();
119 extern "C" SWIGEXPORT(void,initimagec)();
120 extern "C" SWIGEXPORT(void,initprintfwc)();
121 #ifndef SEPARATE
122 extern "C" SWIGEXPORT(void,initutilsc)();
123 extern "C" SWIGEXPORT(void,initglcanvasc)();
124 #endif
125 %}
126
127
128
129 %init %{
130
131 __wxPreStart(); // initialize the GUI toolkit, if needed.
132
133 // wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100);
134
135 // Since these modules are all linked together, initialize them now
136 // because python won't be able to find their shared library files,
137 // (since there isn't any.)
138 initwindowsc();
139 initwindows2c();
140 initeventsc();
141 initmiscc();
142 initmisc2c();
143 initgdic();
144 initmdic();
145 initcontrolsc();
146 initcontrols2c();
147 initcmndlgsc();
148 initstattoolc();
149 initframesc();
150 initwindows3c();
151 initimagec();
152 initprintfwc();
153 #ifndef SEPARATE
154 initutilsc();
155 #ifdef WITH_GLCANVAS
156 initglcanvasc();
157 #endif
158 #endif
159 %}
160
161 //----------------------------------------------------------------------
162 // And this gets appended to the shadow class file.
163 //----------------------------------------------------------------------
164
165 %pragma(python) include="_extras.py";
166
167