]> git.saurik.com Git - wxWidgets.git/blame - utils/wxPython/src/wx.i
fixed somebody's poorly done StreamSize-->GetSize transition
[wxWidgets.git] / utils / wxPython / src / wx.i
CommitLineData
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
b8b8dda7 13%module wx
03e9bead
RD
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
8bf5d46e
RD
28%include pointer.i
29
7bf85405 30%import misc.i
bb0054cd 31%import misc2.i
7bf85405
RD
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
9c039d08
RD
40%import stattool.i
41%import frames.i
08127323 42%import windows3.i
cf694132 43%import image.i
bb0054cd 44%import printfw.i
7bf85405
RD
45
46
47%native(_wxStart) __wxStart;
48%native(_wxSetDictionary) __wxSetDictionary;
49
50//---------------------------------------------------------------------------
51
8bf5d46e 52#define __version__ "2.1b2"
7bf85405 53
853b255a
RD
54wxPoint wxPyDefaultPosition;
55wxSize wxPyDefaultSize;
7bf85405
RD
56
57//---------------------------------------------------------------------------
58//---------------------------------------------------------------------------
59
60class wxPyApp : public wxEvtHandler {
61public:
62 %addmethods {
63 wxPyApp() {
64 wxPythonApp = new wxPyApp();
65 return wxPythonApp;
66 }
67 }
68
8bf5d46e 69 ~wxPyApp();
7bf85405
RD
70
71 wxString GetAppName();
853b255a 72#ifdef __WXMSW__
7bf85405 73 bool GetAuto3D();
853b255a 74#endif
7bf85405
RD
75 wxString GetClassName();
76 bool GetExitOnFrameDelete();
77 int GetPrintMode();
78 wxWindow * GetTopWindow();
79 wxString GetVendorName();
80
81 void Dispatch();
82 void ExitMainLoop();
83 bool Initialized();
84 int MainLoop();
85 bool Pending();
8bf5d46e 86 bool ProcessIdle();
7bf85405
RD
87
88 void SetAppName(const wxString& name);
853b255a 89#ifdef __WXMSW__
7bf85405 90 void SetAuto3D(bool auto3D);
853b255a 91#endif
7bf85405
RD
92 void SetClassName(const wxString& name);
93 void SetExitOnFrameDelete(bool flag);
94 void SetPrintMode(int mode);
95 void SetTopWindow(wxWindow* window);
96 void SetVendorName(const wxString& name);
97
8bf5d46e
RD
98 wxIcon GetStdIcon(int which);
99
100
101};
102
103
104//----------------------------------------------------------------------
105// An instance of this object is created in the main wx module. As long
106// as there are no extra references to it then when the wx module is being
107// unloaded from memory then this object's destructor will be called. When
108// it is then we'll use that as a signal to clean up wxWindows
109
110%{
111class __wxPyCleanup {
112public:
113 __wxPyCleanup() { }
114 ~__wxPyCleanup() { wxApp::CleanUp(); }
115};
116%}
117
118// now to swigify it...
119class __wxPyCleanup {
120public:
121 __wxPyCleanup();
122 ~__wxPyCleanup();
7bf85405
RD
123};
124
125
7bf85405
RD
126
127//----------------------------------------------------------------------
128// This code gets added to the module initialization function
129//----------------------------------------------------------------------
130
131%{
132extern "C" SWIGEXPORT(void,initwindowsc)();
133extern "C" SWIGEXPORT(void,initwindows2c)();
134extern "C" SWIGEXPORT(void,initeventsc)();
135extern "C" SWIGEXPORT(void,initmiscc)();
bb0054cd 136extern "C" SWIGEXPORT(void,initmisc2c)();
7bf85405
RD
137extern "C" SWIGEXPORT(void,initgdic)();
138extern "C" SWIGEXPORT(void,initmdic)();
139extern "C" SWIGEXPORT(void,initcontrolsc)();
140extern "C" SWIGEXPORT(void,initcontrols2c)();
141extern "C" SWIGEXPORT(void,initcmndlgsc)();
9c039d08
RD
142extern "C" SWIGEXPORT(void,initstattoolc)();
143extern "C" SWIGEXPORT(void,initframesc)();
08127323 144extern "C" SWIGEXPORT(void,initwindows3c)();
cf694132 145extern "C" SWIGEXPORT(void,initimagec)();
bb0054cd 146extern "C" SWIGEXPORT(void,initprintfwc)();
0699c864
RD
147#ifndef SEPARATE
148extern "C" SWIGEXPORT(void,initutilsc)();
8bf5d46e 149//extern "C" SWIGEXPORT(void,initoglc)();
cf694132 150extern "C" SWIGEXPORT(void,initglcanvasc)();
0699c864
RD
151#endif
152%}
08127323 153
7bf85405 154
7bf85405
RD
155
156%init %{
7bf85405 157
0d6f9504 158 __wxPreStart(); // initialize the GUI toolkit, if needed.
7bf85405 159
7bf85405
RD
160
161 // Since these modules are all linked together, initialize them now
162 // because python won't be able to find their shared library files,
163 // (since there isn't any.)
164 initwindowsc();
165 initwindows2c();
166 initeventsc();
167 initmiscc();
bb0054cd 168 initmisc2c();
7bf85405
RD
169 initgdic();
170 initmdic();
171 initcontrolsc();
172 initcontrols2c();
173 initcmndlgsc();
9c039d08
RD
174 initstattoolc();
175 initframesc();
08127323 176 initwindows3c();
cf694132 177 initimagec();
bb0054cd 178 initprintfwc();
b8b8dda7
RD
179#ifndef SEPARATE
180 initutilsc();
8bf5d46e 181// initoglc();
cf694132
RD
182#ifdef WITH_GLCANVAS
183 initglcanvasc();
184#endif
b8b8dda7 185#endif
7bf85405
RD
186%}
187
188//----------------------------------------------------------------------
189// And this gets appended to the shadow class file.
190//----------------------------------------------------------------------
191
192%pragma(python) include="_extras.py";
193
194