]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/src/wx.i
aeb3c9b49cdb24b950b07cd0035d817c008ece87
[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.1"
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.2 1998/12/16 22:10:57 RD
156 // Tweaks needed to be able to build wxPython with wxGTK.
157 //
158 // Revision 1.1 1998/12/15 20:41:27 RD
159 // Changed the import semantics from "from wxPython import *" to "from
160 // wxPython.wx import *" This is for people who are worried about
161 // namespace pollution, they can use "from wxPython import wx" and then
162 // prefix all the wxPython identifiers with "wx."
163 //
164 // Added wxTaskbarIcon for wxMSW.
165 //
166 // Made the events work for wxGrid.
167 //
168 // Added wxConfig.
169 //
170 // Added wxMiniFrame for wxGTK, (untested.)
171 //
172 // Changed many of the args and return values that were pointers to gdi
173 // objects to references to reflect changes in the wxWindows API.
174 //
175 // Other assorted fixes and additions.
176 //
177 // Revision 1.9 1998/10/20 07:38:04 RD
178 // bug fix
179 //
180 // Revision 1.8 1998/10/07 07:34:35 RD
181 // Version 0.4.1 for wxGTK
182 //
183 // Revision 1.7 1998/10/02 06:40:44 RD
184 //
185 // Version 0.4 of wxPython for MSW.
186 //
187 // Revision 1.6 1998/08/27 21:59:10 RD
188 // Some chicken-and-egg problems solved for wxPython on wxGTK
189 //
190 // Revision 1.5 1998/08/27 00:00:28 RD
191 // - more tweaks
192 // - have discovered some problems but not yet discovered solutions...
193 //
194 // Revision 1.4 1998/08/18 19:48:20 RD
195 // more wxGTK compatibility things.
196 //
197 // It builds now but there are serious runtime problems...
198 //
199 // Revision 1.3 1998/08/15 07:36:53 RD
200 // - Moved the header in the .i files out of the code that gets put into
201 // the .cpp files. It caused CVS conflicts because of the RCS ID being
202 // different each time.
203 //
204 // - A few minor fixes.
205 //
206 // Revision 1.2 1998/08/14 23:36:49 RD
207 // Beginings of wxGTK compatibility
208 //
209 // Revision 1.1 1998/08/09 08:25:53 RD
210 // Initial version
211 //
212 //
213
214