]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/wx.i
Beginning of bitmap updates
[wxWidgets.git] / 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 %include pointer.i
29
30 %import misc.i
31 %import misc2.i
32 %import windows.i
33 %import events.i
34 %import gdi.i
35 %import mdi.i
36 %import controls.i
37 %import controls2.i
38 %import windows2.i
39 %import cmndlgs.i
40 %import stattool.i
41 %import frames.i
42 %import windows3.i
43 %import image.i
44 %import printfw.i
45 %import sizers.i
46 %import streams.i
47 %import filesys.i
48
49 %native(_wxStart) __wxStart;
50 %native(_wxSetDictionary) __wxSetDictionary;
51
52 //---------------------------------------------------------------------------
53
54
55 #define __version__ "0.0.0" // The real value is now in setup.py...
56
57 wxPoint wxPyDefaultPosition;
58 wxSize wxPyDefaultSize;
59
60 //---------------------------------------------------------------------------
61 //---------------------------------------------------------------------------
62
63 class wxPyApp : public wxEvtHandler {
64 public:
65 %addmethods {
66 wxPyApp() {
67 wxPythonApp = new wxPyApp();
68 return wxPythonApp;
69 }
70 }
71
72 ~wxPyApp();
73
74 wxString GetAppName();
75 #ifdef __WXMSW__
76 bool GetAuto3D();
77 #endif
78 wxString GetClassName();
79 bool GetExitOnFrameDelete();
80 int GetPrintMode();
81 wxWindow * GetTopWindow();
82 wxString GetVendorName();
83 bool GetUseBestVisual();
84
85 void Dispatch();
86 void ExitMainLoop();
87 bool Initialized();
88 int MainLoop();
89 bool Pending();
90 bool ProcessIdle();
91
92 void SetAppName(const wxString& name);
93 #ifdef __WXMSW__
94 void SetAuto3D(bool auto3D);
95 #endif
96 void SetClassName(const wxString& name);
97 void SetExitOnFrameDelete(bool flag);
98 void SetPrintMode(int mode);
99 void SetTopWindow(wxWindow* window);
100 void SetVendorName(const wxString& name);
101 void SetUseBestVisual(bool flag);
102 wxIcon GetStdIcon(int which);
103
104
105 };
106
107 %inline %{
108 wxPyApp* wxGetApp() {
109 return wxPythonApp;
110 }
111 %}
112
113 //----------------------------------------------------------------------
114 // this is used to cleanup after wxWindows when Python shuts down.
115
116 %inline %{
117 void wxApp_CleanUp() {
118 __wxCleanup();
119 }
120 %}
121
122 //----------------------------------------------------------------------
123 // This code gets added to the module initialization function
124 //----------------------------------------------------------------------
125
126 %{
127 extern "C" SWIGEXPORT(void) initwindowsc();
128 extern "C" SWIGEXPORT(void) initwindows2c();
129 extern "C" SWIGEXPORT(void) initeventsc();
130 extern "C" SWIGEXPORT(void) initmiscc();
131 extern "C" SWIGEXPORT(void) initmisc2c();
132 extern "C" SWIGEXPORT(void) initgdic();
133 extern "C" SWIGEXPORT(void) initmdic();
134 extern "C" SWIGEXPORT(void) initcontrolsc();
135 extern "C" SWIGEXPORT(void) initcontrols2c();
136 extern "C" SWIGEXPORT(void) initcmndlgsc();
137 extern "C" SWIGEXPORT(void) initstattoolc();
138 extern "C" SWIGEXPORT(void) initframesc();
139 extern "C" SWIGEXPORT(void) initwindows3c();
140 extern "C" SWIGEXPORT(void) initimagec();
141 extern "C" SWIGEXPORT(void) initprintfwc();
142 extern "C" SWIGEXPORT(void) initsizersc();
143 extern "C" SWIGEXPORT(void) initclip_dndc();
144 extern "C" SWIGEXPORT(void) initgridc();
145 extern "C" SWIGEXPORT(void) initutilsc();
146 extern "C" SWIGEXPORT(void) inithtmlc();
147 extern "C" SWIGEXPORT(void) inithtmlhelpc();
148 extern "C" SWIGEXPORT(void) initcalendarc();
149 extern "C" SWIGEXPORT(void) initstreamsc();
150 extern "C" SWIGEXPORT(void) initfilesysc();
151
152 extern "C" SWIGEXPORT(void) initglcanvasc();
153 extern "C" SWIGEXPORT(void) initoglc();
154 extern "C" SWIGEXPORT(void) initstc_c();
155 %}
156
157
158
159 %init %{
160
161 __wxPreStart(); // initialize the GUI toolkit, if needed.
162
163
164 // Since these modules are all linked together, initialize them now
165 // because Python won't be able to find their shared library files,
166 // (since there isn't any.)
167 initwindowsc();
168 initwindows2c();
169 initeventsc();
170 initmiscc();
171 initmisc2c();
172 initgdic();
173 initmdic();
174 initcontrolsc();
175 initcontrols2c();
176 initcmndlgsc();
177 initstattoolc();
178 initframesc();
179 initwindows3c();
180 initimagec();
181 initprintfwc();
182 initsizersc();
183 initclip_dndc();
184 initstreamsc();
185 initfilesysc();
186
187 initgridc();
188 initutilsc();
189 inithtmlc();
190 inithtmlhelpc();
191 initcalendarc();
192
193 initglcanvasc();
194 initoglc();
195 initstc_c();
196 %}
197
198 //----------------------------------------------------------------------
199 // And this gets appended to the shadow class file.
200 //----------------------------------------------------------------------
201
202 %pragma(python) include="_extras.py";
203
204