]>
Commit | Line | Data |
---|---|---|
7bf85405 RD |
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 | ||
b8b8dda7 | 13 | %module wx |
03e9bead RD |
14 | |
15 | ||
16 | %{ | |
7bf85405 RD |
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 | |
9c039d08 RD |
37 | %import stattool.i |
38 | %import frames.i | |
08127323 | 39 | %import windows3.i |
b8b8dda7 RD |
40 | #ifndef SEPARATE |
41 | %import utils.i | |
42 | #endif | |
7bf85405 RD |
43 | |
44 | ||
45 | %native(_wxStart) __wxStart; | |
46 | %native(_wxSetDictionary) __wxSetDictionary; | |
47 | ||
48 | //--------------------------------------------------------------------------- | |
49 | ||
62abd41e | 50 | #define __version__ "2.0b6" |
7bf85405 | 51 | |
853b255a RD |
52 | wxPoint wxPyDefaultPosition; |
53 | wxSize wxPyDefaultSize; | |
7bf85405 RD |
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(); | |
853b255a | 69 | #ifdef __WXMSW__ |
7bf85405 | 70 | bool GetAuto3D(); |
853b255a | 71 | #endif |
7bf85405 RD |
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); | |
853b255a | 85 | #ifdef __WXMSW__ |
7bf85405 | 86 | void SetAuto3D(bool auto3D); |
853b255a | 87 | #endif |
7bf85405 RD |
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 | ||
7bf85405 RD |
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)(); | |
9c039d08 RD |
115 | extern "C" SWIGEXPORT(void,initstattoolc)(); |
116 | extern "C" SWIGEXPORT(void,initframesc)(); | |
08127323 | 117 | extern "C" SWIGEXPORT(void,initwindows3c)(); |
0699c864 RD |
118 | #ifndef SEPARATE |
119 | extern "C" SWIGEXPORT(void,initutilsc)(); | |
120 | #endif | |
121 | %} | |
08127323 | 122 | |
7bf85405 | 123 | |
7bf85405 RD |
124 | |
125 | %init %{ | |
7bf85405 | 126 | |
0d6f9504 | 127 | __wxPreStart(); // initialize the GUI toolkit, if needed. |
7bf85405 RD |
128 | |
129 | // wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100); | |
130 | ||
131 | // Since these modules are all linked together, initialize them now | |
132 | // because python won't be able to find their shared library files, | |
133 | // (since there isn't any.) | |
134 | initwindowsc(); | |
135 | initwindows2c(); | |
136 | initeventsc(); | |
137 | initmiscc(); | |
138 | initgdic(); | |
139 | initmdic(); | |
140 | initcontrolsc(); | |
141 | initcontrols2c(); | |
142 | initcmndlgsc(); | |
9c039d08 RD |
143 | initstattoolc(); |
144 | initframesc(); | |
08127323 | 145 | initwindows3c(); |
b8b8dda7 RD |
146 | #ifndef SEPARATE |
147 | initutilsc(); | |
148 | #endif | |
7bf85405 RD |
149 | %} |
150 | ||
151 | //---------------------------------------------------------------------- | |
152 | // And this gets appended to the shadow class file. | |
153 | //---------------------------------------------------------------------- | |
154 | ||
155 | %pragma(python) include="_extras.py"; | |
156 | ||
157 | ||
158 | ///////////////////////////////////////////////////////////////////////////// | |
159 | // | |
160 | // $Log$ | |
62abd41e RD |
161 | // Revision 1.8 1999/03/05 07:22:32 RD |
162 | // Minor wxPython changes for wxWin 2.0 | |
163 | // | |
0699c864 | 164 | // Revision 1.7 1999/02/25 07:08:37 RD |
62abd41e | 165 | // |
0699c864 RD |
166 | // wxPython version 2.0b5 |
167 | // | |
af309447 RD |
168 | // Revision 1.6 1999/02/20 09:03:04 RD |
169 | // Added wxWindow_FromHWND(hWnd) for wxMSW to construct a wxWindow from a | |
170 | // window handle. If you can get the window handle into the python code, | |
171 | // it should just work... More news on this later. | |
172 | // | |
173 | // Added wxImageList, wxToolTip. | |
174 | // | |
175 | // Re-enabled wxConfig.DeleteAll() since it is reportedly fixed for the | |
176 | // wxRegConfig class. | |
177 | // | |
178 | // As usual, some bug fixes, tweaks, etc. | |
179 | // | |
73c5ed36 | 180 | // Revision 1.5 1999/02/01 00:10:41 RD |
af309447 | 181 | // |
73c5ed36 RD |
182 | // Added the missing EVT_LIST_ITEM_SELECTED and friends. |
183 | // | |
08127323 | 184 | // Revision 1.4 1999/01/30 07:30:16 RD |
73c5ed36 | 185 | // |
08127323 RD |
186 | // Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc. |
187 | // | |
188 | // Various cleanup, tweaks, minor additions, etc. to maintain | |
189 | // compatibility with the current wxWindows. | |
190 | // | |
c95e68d8 | 191 | // Revision 1.3 1998/12/17 17:52:21 RD |
08127323 | 192 | // |
c95e68d8 RD |
193 | // wxPython 0.5.2 |
194 | // Minor fixes and SWIG code generation for RR's changes. MSW and GTK | |
195 | // versions are much closer now! | |
196 | // | |
105e45b9 | 197 | // Revision 1.2 1998/12/16 22:10:57 RD |
c95e68d8 | 198 | // |
105e45b9 RD |
199 | // Tweaks needed to be able to build wxPython with wxGTK. |
200 | // | |
b8b8dda7 RD |
201 | // Revision 1.1 1998/12/15 20:41:27 RD |
202 | // Changed the import semantics from "from wxPython import *" to "from | |
203 | // wxPython.wx import *" This is for people who are worried about | |
204 | // namespace pollution, they can use "from wxPython import wx" and then | |
205 | // prefix all the wxPython identifiers with "wx." | |
206 | // | |
207 | // Added wxTaskbarIcon for wxMSW. | |
208 | // | |
209 | // Made the events work for wxGrid. | |
210 | // | |
211 | // Added wxConfig. | |
212 | // | |
213 | // Added wxMiniFrame for wxGTK, (untested.) | |
214 | // | |
215 | // Changed many of the args and return values that were pointers to gdi | |
216 | // objects to references to reflect changes in the wxWindows API. | |
217 | // | |
218 | // Other assorted fixes and additions. | |
219 | // | |
4d1d77e8 RD |
220 | // Revision 1.9 1998/10/20 07:38:04 RD |
221 | // bug fix | |
222 | // | |
b26e2dc4 RD |
223 | // Revision 1.8 1998/10/07 07:34:35 RD |
224 | // Version 0.4.1 for wxGTK | |
225 | // | |
9c039d08 | 226 | // Revision 1.7 1998/10/02 06:40:44 RD |
b26e2dc4 | 227 | // |
9c039d08 RD |
228 | // Version 0.4 of wxPython for MSW. |
229 | // | |
0d6f9504 RD |
230 | // Revision 1.6 1998/08/27 21:59:10 RD |
231 | // Some chicken-and-egg problems solved for wxPython on wxGTK | |
232 | // | |
21f4bf45 RD |
233 | // Revision 1.5 1998/08/27 00:00:28 RD |
234 | // - more tweaks | |
235 | // - have discovered some problems but not yet discovered solutions... | |
236 | // | |
fb5e0af0 RD |
237 | // Revision 1.4 1998/08/18 19:48:20 RD |
238 | // more wxGTK compatibility things. | |
239 | // | |
240 | // It builds now but there are serious runtime problems... | |
241 | // | |
03e9bead RD |
242 | // Revision 1.3 1998/08/15 07:36:53 RD |
243 | // - Moved the header in the .i files out of the code that gets put into | |
244 | // the .cpp files. It caused CVS conflicts because of the RCS ID being | |
245 | // different each time. | |
246 | // | |
247 | // - A few minor fixes. | |
248 | // | |
853b255a RD |
249 | // Revision 1.2 1998/08/14 23:36:49 RD |
250 | // Beginings of wxGTK compatibility | |
251 | // | |
7bf85405 RD |
252 | // Revision 1.1 1998/08/09 08:25:53 RD |
253 | // Initial version | |
254 | // | |
255 | // | |
256 | ||
257 |