]>
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 | |
b8b8dda7 RD |
39 | #ifndef SEPARATE |
40 | %import utils.i | |
41 | #endif | |
7bf85405 RD |
42 | |
43 | ||
44 | %native(_wxStart) __wxStart; | |
45 | %native(_wxSetDictionary) __wxSetDictionary; | |
46 | ||
47 | //--------------------------------------------------------------------------- | |
48 | ||
c95e68d8 | 49 | #define __version__ "0.5.2" |
7bf85405 | 50 | |
853b255a RD |
51 | wxPoint wxPyDefaultPosition; |
52 | wxSize wxPyDefaultSize; | |
7bf85405 RD |
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(); | |
853b255a | 68 | #ifdef __WXMSW__ |
7bf85405 | 69 | bool GetAuto3D(); |
853b255a | 70 | #endif |
7bf85405 RD |
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); | |
853b255a | 84 | #ifdef __WXMSW__ |
7bf85405 | 85 | void SetAuto3D(bool auto3D); |
853b255a | 86 | #endif |
7bf85405 RD |
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 | ||
7bf85405 RD |
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)(); | |
9c039d08 RD |
114 | extern "C" SWIGEXPORT(void,initstattoolc)(); |
115 | extern "C" SWIGEXPORT(void,initframesc)(); | |
b8b8dda7 | 116 | extern "C" SWIGEXPORT(void,initutilsc)(); |
7bf85405 RD |
117 | |
118 | %} | |
119 | ||
120 | %init %{ | |
7bf85405 | 121 | |
0d6f9504 | 122 | __wxPreStart(); // initialize the GUI toolkit, if needed. |
7bf85405 RD |
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(); | |
9c039d08 RD |
138 | initstattoolc(); |
139 | initframesc(); | |
b8b8dda7 RD |
140 | #ifndef SEPARATE |
141 | initutilsc(); | |
142 | #endif | |
7bf85405 RD |
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$ | |
c95e68d8 RD |
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 | // | |
105e45b9 | 160 | // Revision 1.2 1998/12/16 22:10:57 RD |
c95e68d8 | 161 | // |
105e45b9 RD |
162 | // Tweaks needed to be able to build wxPython with wxGTK. |
163 | // | |
b8b8dda7 RD |
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 | // | |
4d1d77e8 RD |
183 | // Revision 1.9 1998/10/20 07:38:04 RD |
184 | // bug fix | |
185 | // | |
b26e2dc4 RD |
186 | // Revision 1.8 1998/10/07 07:34:35 RD |
187 | // Version 0.4.1 for wxGTK | |
188 | // | |
9c039d08 | 189 | // Revision 1.7 1998/10/02 06:40:44 RD |
b26e2dc4 | 190 | // |
9c039d08 RD |
191 | // Version 0.4 of wxPython for MSW. |
192 | // | |
0d6f9504 RD |
193 | // Revision 1.6 1998/08/27 21:59:10 RD |
194 | // Some chicken-and-egg problems solved for wxPython on wxGTK | |
195 | // | |
21f4bf45 RD |
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 | // | |
fb5e0af0 RD |
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 | // | |
03e9bead RD |
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 | // | |
853b255a RD |
212 | // Revision 1.2 1998/08/14 23:36:49 RD |
213 | // Beginings of wxGTK compatibility | |
214 | // | |
7bf85405 RD |
215 | // Revision 1.1 1998/08/09 08:25:53 RD |
216 | // Initial version | |
217 | // | |
218 | // | |
219 | ||
220 |