]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/src/wx.i
Now compiles with /GX- on MSW.
[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 windows.i
30 %import events.i
31 %import gdi.i
32 %import mdi.i
33 %import controls.i
34 %import controls2.i
35 %import windows2.i
36 %import cmndlgs.i
37 %import stattool.i
38 %import frames.i
39 #ifndef SEPARATE
40 %import utils.i
41 #endif
42
43
44 %native(_wxStart) __wxStart;
45 %native(_wxSetDictionary) __wxSetDictionary;
46
47 //---------------------------------------------------------------------------
48
49 #define __version__ "0.5.2"
50
51 wxPoint wxPyDefaultPosition;
52 wxSize wxPyDefaultSize;
53
54 //---------------------------------------------------------------------------
55 //---------------------------------------------------------------------------
56
57 class wxPyApp : public wxEvtHandler {
58 public:
59 %addmethods {
60 wxPyApp() {
61 wxPythonApp = new wxPyApp();
62 return wxPythonApp;
63 }
64 }
65
66
67 wxString GetAppName();
68 #ifdef __WXMSW__
69 bool GetAuto3D();
70 #endif
71 wxString GetClassName();
72 bool GetExitOnFrameDelete();
73 int GetPrintMode();
74 wxWindow * GetTopWindow();
75 wxString GetVendorName();
76
77 void Dispatch();
78 void ExitMainLoop();
79 bool Initialized();
80 int MainLoop();
81 bool Pending();
82
83 void SetAppName(const wxString& name);
84 #ifdef __WXMSW__
85 void SetAuto3D(bool auto3D);
86 #endif
87 void SetClassName(const wxString& name);
88 void SetExitOnFrameDelete(bool flag);
89 void SetPrintMode(int mode);
90 void SetTopWindow(wxWindow* window);
91 void SetVendorName(const wxString& name);
92
93 // This one is wxPython specific. If you override MainLoop,
94 // call this when done.
95 void AfterMainLoop();
96 };
97
98
99
100 //----------------------------------------------------------------------
101 // This code gets added to the module initialization function
102 //----------------------------------------------------------------------
103
104 %{
105 extern "C" SWIGEXPORT(void,initwindowsc)();
106 extern "C" SWIGEXPORT(void,initwindows2c)();
107 extern "C" SWIGEXPORT(void,initeventsc)();
108 extern "C" SWIGEXPORT(void,initmiscc)();
109 extern "C" SWIGEXPORT(void,initgdic)();
110 extern "C" SWIGEXPORT(void,initmdic)();
111 extern "C" SWIGEXPORT(void,initcontrolsc)();
112 extern "C" SWIGEXPORT(void,initcontrols2c)();
113 extern "C" SWIGEXPORT(void,initcmndlgsc)();
114 extern "C" SWIGEXPORT(void,initstattoolc)();
115 extern "C" SWIGEXPORT(void,initframesc)();
116 extern "C" SWIGEXPORT(void,initutilsc)();
117
118 %}
119
120 %init %{
121
122 __wxPreStart(); // initialize the GUI toolkit, if needed.
123
124 // wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100);
125
126 // Since these modules are all linked together, initialize them now
127 // because python won't be able to find their shared library files,
128 // (since there isn't any.)
129 initwindowsc();
130 initwindows2c();
131 initeventsc();
132 initmiscc();
133 initgdic();
134 initmdic();
135 initcontrolsc();
136 initcontrols2c();
137 initcmndlgsc();
138 initstattoolc();
139 initframesc();
140 #ifndef SEPARATE
141 initutilsc();
142 #endif
143 %}
144
145 //----------------------------------------------------------------------
146 // And this gets appended to the shadow class file.
147 //----------------------------------------------------------------------
148
149 %pragma(python) include="_extras.py";
150
151
152 /////////////////////////////////////////////////////////////////////////////
153 //
154 // $Log$
155 // Revision 1.3 1998/12/17 17:52:21 RD
156 // wxPython 0.5.2
157 // Minor fixes and SWIG code generation for RR's changes. MSW and GTK
158 // versions are much closer now!
159 //
160 // Revision 1.2 1998/12/16 22:10:57 RD
161 //
162 // Tweaks needed to be able to build wxPython with wxGTK.
163 //
164 // Revision 1.1 1998/12/15 20:41:27 RD
165 // Changed the import semantics from "from wxPython import *" to "from
166 // wxPython.wx import *" This is for people who are worried about
167 // namespace pollution, they can use "from wxPython import wx" and then
168 // prefix all the wxPython identifiers with "wx."
169 //
170 // Added wxTaskbarIcon for wxMSW.
171 //
172 // Made the events work for wxGrid.
173 //
174 // Added wxConfig.
175 //
176 // Added wxMiniFrame for wxGTK, (untested.)
177 //
178 // Changed many of the args and return values that were pointers to gdi
179 // objects to references to reflect changes in the wxWindows API.
180 //
181 // Other assorted fixes and additions.
182 //
183 // Revision 1.9 1998/10/20 07:38:04 RD
184 // bug fix
185 //
186 // Revision 1.8 1998/10/07 07:34:35 RD
187 // Version 0.4.1 for wxGTK
188 //
189 // Revision 1.7 1998/10/02 06:40:44 RD
190 //
191 // Version 0.4 of wxPython for MSW.
192 //
193 // Revision 1.6 1998/08/27 21:59:10 RD
194 // Some chicken-and-egg problems solved for wxPython on wxGTK
195 //
196 // Revision 1.5 1998/08/27 00:00:28 RD
197 // - more tweaks
198 // - have discovered some problems but not yet discovered solutions...
199 //
200 // Revision 1.4 1998/08/18 19:48:20 RD
201 // more wxGTK compatibility things.
202 //
203 // It builds now but there are serious runtime problems...
204 //
205 // Revision 1.3 1998/08/15 07:36:53 RD
206 // - Moved the header in the .i files out of the code that gets put into
207 // the .cpp files. It caused CVS conflicts because of the RCS ID being
208 // different each time.
209 //
210 // - A few minor fixes.
211 //
212 // Revision 1.2 1998/08/14 23:36:49 RD
213 // Beginings of wxGTK compatibility
214 //
215 // Revision 1.1 1998/08/09 08:25:53 RD
216 // Initial version
217 //
218 //
219
220