]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/src/wx.i
Some slight cleanup and reorganization
[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 %import windows3.i
40 %import image.i
41
42
43 %native(_wxStart) __wxStart;
44 %native(_wxSetDictionary) __wxSetDictionary;
45
46 //---------------------------------------------------------------------------
47
48 #define __version__ "2.0b9"
49
50 wxPoint wxPyDefaultPosition;
51 wxSize wxPyDefaultSize;
52
53 //---------------------------------------------------------------------------
54 //---------------------------------------------------------------------------
55
56 class wxPyApp : public wxEvtHandler {
57 public:
58 %addmethods {
59 wxPyApp() {
60 wxPythonApp = new wxPyApp();
61 return wxPythonApp;
62 }
63 }
64
65
66 wxString GetAppName();
67 #ifdef __WXMSW__
68 bool GetAuto3D();
69 #endif
70 wxString GetClassName();
71 bool GetExitOnFrameDelete();
72 int GetPrintMode();
73 wxWindow * GetTopWindow();
74 wxString GetVendorName();
75
76 void Dispatch();
77 void ExitMainLoop();
78 bool Initialized();
79 int MainLoop();
80 bool Pending();
81
82 void SetAppName(const wxString& name);
83 #ifdef __WXMSW__
84 void SetAuto3D(bool auto3D);
85 #endif
86 void SetClassName(const wxString& name);
87 void SetExitOnFrameDelete(bool flag);
88 void SetPrintMode(int mode);
89 void SetTopWindow(wxWindow* window);
90 void SetVendorName(const wxString& name);
91
92 // This one is wxPython specific. If you override MainLoop,
93 // call this when done.
94 void AfterMainLoop();
95 };
96
97
98
99 //----------------------------------------------------------------------
100 // This code gets added to the module initialization function
101 //----------------------------------------------------------------------
102
103 %{
104 extern "C" SWIGEXPORT(void,initwindowsc)();
105 extern "C" SWIGEXPORT(void,initwindows2c)();
106 extern "C" SWIGEXPORT(void,initeventsc)();
107 extern "C" SWIGEXPORT(void,initmiscc)();
108 extern "C" SWIGEXPORT(void,initgdic)();
109 extern "C" SWIGEXPORT(void,initmdic)();
110 extern "C" SWIGEXPORT(void,initcontrolsc)();
111 extern "C" SWIGEXPORT(void,initcontrols2c)();
112 extern "C" SWIGEXPORT(void,initcmndlgsc)();
113 extern "C" SWIGEXPORT(void,initstattoolc)();
114 extern "C" SWIGEXPORT(void,initframesc)();
115 extern "C" SWIGEXPORT(void,initwindows3c)();
116 extern "C" SWIGEXPORT(void,initimagec)();
117 #ifndef SEPARATE
118 extern "C" SWIGEXPORT(void,initutilsc)();
119 extern "C" SWIGEXPORT(void,initglcanvasc)();
120 #endif
121 %}
122
123
124
125 %init %{
126
127 __wxPreStart(); // initialize the GUI toolkit, if needed.
128
129 // wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100);
130
131 // Since these modules are all linked together, initialize them now
132 // because python won't be able to find their shared library files,
133 // (since there isn't any.)
134 initwindowsc();
135 initwindows2c();
136 initeventsc();
137 initmiscc();
138 initgdic();
139 initmdic();
140 initcontrolsc();
141 initcontrols2c();
142 initcmndlgsc();
143 initstattoolc();
144 initframesc();
145 initwindows3c();
146 initimagec();
147 #ifndef SEPARATE
148 initutilsc();
149 #ifdef WITH_GLCANVAS
150 initglcanvasc();
151 #endif
152 #endif
153 %}
154
155 //----------------------------------------------------------------------
156 // And this gets appended to the shadow class file.
157 //----------------------------------------------------------------------
158
159 %pragma(python) include="_extras.py";
160
161