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