]>
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 | ||
03e9bead RD |
13 | %module wxp |
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 | |
7bf85405 RD |
39 | |
40 | ||
41 | ||
42 | %native(_wxStart) __wxStart; | |
43 | %native(_wxSetDictionary) __wxSetDictionary; | |
44 | ||
45 | //--------------------------------------------------------------------------- | |
46 | ||
4d1d77e8 | 47 | #define __version__ "0.4.2" |
7bf85405 | 48 | |
853b255a RD |
49 | wxPoint wxPyDefaultPosition; |
50 | wxSize wxPyDefaultSize; | |
7bf85405 RD |
51 | |
52 | //--------------------------------------------------------------------------- | |
53 | //--------------------------------------------------------------------------- | |
54 | ||
55 | class wxPyApp : public wxEvtHandler { | |
56 | public: | |
57 | %addmethods { | |
58 | wxPyApp() { | |
59 | wxPythonApp = new wxPyApp(); | |
60 | return wxPythonApp; | |
61 | } | |
62 | } | |
63 | ||
64 | ||
65 | wxString GetAppName(); | |
853b255a | 66 | #ifdef __WXMSW__ |
7bf85405 | 67 | bool GetAuto3D(); |
853b255a | 68 | #endif |
7bf85405 RD |
69 | wxString GetClassName(); |
70 | bool GetExitOnFrameDelete(); | |
71 | int GetPrintMode(); | |
72 | wxWindow * GetTopWindow(); | |
73 | wxString GetVendorName(); | |
74 | ||
75 | void Dispatch(); | |
76 | void ExitMainLoop(); | |
77 | bool Initialized(); | |
78 | int MainLoop(); | |
79 | bool Pending(); | |
80 | ||
81 | void SetAppName(const wxString& name); | |
853b255a | 82 | #ifdef __WXMSW__ |
7bf85405 | 83 | void SetAuto3D(bool auto3D); |
853b255a | 84 | #endif |
7bf85405 RD |
85 | void SetClassName(const wxString& name); |
86 | void SetExitOnFrameDelete(bool flag); | |
87 | void SetPrintMode(int mode); | |
88 | void SetTopWindow(wxWindow* window); | |
89 | void SetVendorName(const wxString& name); | |
90 | ||
91 | // This one is wxPython specific. If you override MainLoop, | |
92 | // call this when done. | |
93 | void AfterMainLoop(); | |
94 | }; | |
95 | ||
96 | ||
7bf85405 RD |
97 | |
98 | //---------------------------------------------------------------------- | |
99 | // This code gets added to the module initialization function | |
100 | //---------------------------------------------------------------------- | |
101 | ||
102 | %{ | |
103 | extern "C" SWIGEXPORT(void,initwindowsc)(); | |
104 | extern "C" SWIGEXPORT(void,initwindows2c)(); | |
105 | extern "C" SWIGEXPORT(void,initeventsc)(); | |
106 | extern "C" SWIGEXPORT(void,initmiscc)(); | |
107 | extern "C" SWIGEXPORT(void,initgdic)(); | |
108 | extern "C" SWIGEXPORT(void,initmdic)(); | |
109 | extern "C" SWIGEXPORT(void,initcontrolsc)(); | |
110 | extern "C" SWIGEXPORT(void,initcontrols2c)(); | |
111 | extern "C" SWIGEXPORT(void,initcmndlgsc)(); | |
9c039d08 RD |
112 | extern "C" SWIGEXPORT(void,initstattoolc)(); |
113 | extern "C" SWIGEXPORT(void,initframesc)(); | |
7bf85405 RD |
114 | |
115 | %} | |
116 | ||
117 | %init %{ | |
7bf85405 | 118 | |
0d6f9504 | 119 | __wxPreStart(); // initialize the GUI toolkit, if needed. |
7bf85405 RD |
120 | |
121 | // wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100); | |
122 | ||
123 | // Since these modules are all linked together, initialize them now | |
124 | // because python won't be able to find their shared library files, | |
125 | // (since there isn't any.) | |
126 | initwindowsc(); | |
127 | initwindows2c(); | |
128 | initeventsc(); | |
129 | initmiscc(); | |
130 | initgdic(); | |
131 | initmdic(); | |
132 | initcontrolsc(); | |
133 | initcontrols2c(); | |
134 | initcmndlgsc(); | |
9c039d08 RD |
135 | initstattoolc(); |
136 | initframesc(); | |
137 | ||
7bf85405 RD |
138 | %} |
139 | ||
140 | //---------------------------------------------------------------------- | |
141 | // And this gets appended to the shadow class file. | |
142 | //---------------------------------------------------------------------- | |
143 | ||
144 | %pragma(python) include="_extras.py"; | |
145 | ||
146 | ||
147 | ///////////////////////////////////////////////////////////////////////////// | |
148 | // | |
149 | // $Log$ | |
4d1d77e8 RD |
150 | // Revision 1.9 1998/10/20 07:38:04 RD |
151 | // bug fix | |
152 | // | |
b26e2dc4 RD |
153 | // Revision 1.8 1998/10/07 07:34:35 RD |
154 | // Version 0.4.1 for wxGTK | |
155 | // | |
9c039d08 | 156 | // Revision 1.7 1998/10/02 06:40:44 RD |
b26e2dc4 | 157 | // |
9c039d08 RD |
158 | // Version 0.4 of wxPython for MSW. |
159 | // | |
0d6f9504 RD |
160 | // Revision 1.6 1998/08/27 21:59:10 RD |
161 | // Some chicken-and-egg problems solved for wxPython on wxGTK | |
162 | // | |
21f4bf45 RD |
163 | // Revision 1.5 1998/08/27 00:00:28 RD |
164 | // - more tweaks | |
165 | // - have discovered some problems but not yet discovered solutions... | |
166 | // | |
fb5e0af0 RD |
167 | // Revision 1.4 1998/08/18 19:48:20 RD |
168 | // more wxGTK compatibility things. | |
169 | // | |
170 | // It builds now but there are serious runtime problems... | |
171 | // | |
03e9bead RD |
172 | // Revision 1.3 1998/08/15 07:36:53 RD |
173 | // - Moved the header in the .i files out of the code that gets put into | |
174 | // the .cpp files. It caused CVS conflicts because of the RCS ID being | |
175 | // different each time. | |
176 | // | |
177 | // - A few minor fixes. | |
178 | // | |
853b255a RD |
179 | // Revision 1.2 1998/08/14 23:36:49 RD |
180 | // Beginings of wxGTK compatibility | |
181 | // | |
7bf85405 RD |
182 | // Revision 1.1 1998/08/09 08:25:53 RD |
183 | // Initial version | |
184 | // | |
185 | // | |
186 | ||
187 |