]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/src/wx.i
Added the missing EVT_LIST_ITEM_SELECTED and friends.
[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 %import windows3.i
40 #ifndef SEPARATE
41 %import utils.i
42 #endif
43
44
45 %native(_wxStart) __wxStart;
46 %native(_wxSetDictionary) __wxSetDictionary;
47
48 //---------------------------------------------------------------------------
49
50 #define __version__ "0.5.4"
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,initgdic)();
111 extern "C" SWIGEXPORT(void,initmdic)();
112 extern "C" SWIGEXPORT(void,initcontrolsc)();
113 extern "C" SWIGEXPORT(void,initcontrols2c)();
114 extern "C" SWIGEXPORT(void,initcmndlgsc)();
115 extern "C" SWIGEXPORT(void,initstattoolc)();
116 extern "C" SWIGEXPORT(void,initframesc)();
117 extern "C" SWIGEXPORT(void,initutilsc)();
118 extern "C" SWIGEXPORT(void,initwindows3c)();
119
120
121 %}
122
123 %init %{
124
125 __wxPreStart(); // initialize the GUI toolkit, if needed.
126
127 // wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100);
128
129 // Since these modules are all linked together, initialize them now
130 // because python won't be able to find their shared library files,
131 // (since there isn't any.)
132 initwindowsc();
133 initwindows2c();
134 initeventsc();
135 initmiscc();
136 initgdic();
137 initmdic();
138 initcontrolsc();
139 initcontrols2c();
140 initcmndlgsc();
141 initstattoolc();
142 initframesc();
143 initwindows3c();
144 #ifndef SEPARATE
145 initutilsc();
146 #endif
147 %}
148
149 //----------------------------------------------------------------------
150 // And this gets appended to the shadow class file.
151 //----------------------------------------------------------------------
152
153 %pragma(python) include="_extras.py";
154
155
156 /////////////////////////////////////////////////////////////////////////////
157 //
158 // $Log$
159 // Revision 1.5 1999/02/01 00:10:41 RD
160 // Added the missing EVT_LIST_ITEM_SELECTED and friends.
161 //
162 // Revision 1.4 1999/01/30 07:30:16 RD
163 //
164 // Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
165 //
166 // Various cleanup, tweaks, minor additions, etc. to maintain
167 // compatibility with the current wxWindows.
168 //
169 // Revision 1.3 1998/12/17 17:52:21 RD
170 //
171 // wxPython 0.5.2
172 // Minor fixes and SWIG code generation for RR's changes. MSW and GTK
173 // versions are much closer now!
174 //
175 // Revision 1.2 1998/12/16 22:10:57 RD
176 //
177 // Tweaks needed to be able to build wxPython with wxGTK.
178 //
179 // Revision 1.1 1998/12/15 20:41:27 RD
180 // Changed the import semantics from "from wxPython import *" to "from
181 // wxPython.wx import *" This is for people who are worried about
182 // namespace pollution, they can use "from wxPython import wx" and then
183 // prefix all the wxPython identifiers with "wx."
184 //
185 // Added wxTaskbarIcon for wxMSW.
186 //
187 // Made the events work for wxGrid.
188 //
189 // Added wxConfig.
190 //
191 // Added wxMiniFrame for wxGTK, (untested.)
192 //
193 // Changed many of the args and return values that were pointers to gdi
194 // objects to references to reflect changes in the wxWindows API.
195 //
196 // Other assorted fixes and additions.
197 //
198 // Revision 1.9 1998/10/20 07:38:04 RD
199 // bug fix
200 //
201 // Revision 1.8 1998/10/07 07:34:35 RD
202 // Version 0.4.1 for wxGTK
203 //
204 // Revision 1.7 1998/10/02 06:40:44 RD
205 //
206 // Version 0.4 of wxPython for MSW.
207 //
208 // Revision 1.6 1998/08/27 21:59:10 RD
209 // Some chicken-and-egg problems solved for wxPython on wxGTK
210 //
211 // Revision 1.5 1998/08/27 00:00:28 RD
212 // - more tweaks
213 // - have discovered some problems but not yet discovered solutions...
214 //
215 // Revision 1.4 1998/08/18 19:48:20 RD
216 // more wxGTK compatibility things.
217 //
218 // It builds now but there are serious runtime problems...
219 //
220 // Revision 1.3 1998/08/15 07:36:53 RD
221 // - Moved the header in the .i files out of the code that gets put into
222 // the .cpp files. It caused CVS conflicts because of the RCS ID being
223 // different each time.
224 //
225 // - A few minor fixes.
226 //
227 // Revision 1.2 1998/08/14 23:36:49 RD
228 // Beginings of wxGTK compatibility
229 //
230 // Revision 1.1 1998/08/09 08:25:53 RD
231 // Initial version
232 //
233 //
234
235