]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/wx.i
An attempt at make the wxCSConv class useful. Uses iconv under Unix,
[wxWidgets.git] / 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
2f90df85 45%import sizers.i
7bf85405
RD
46
47
48%native(_wxStart) __wxStart;
49%native(_wxSetDictionary) __wxSetDictionary;
50
51//---------------------------------------------------------------------------
52
2f90df85 53
b1462dfa 54#define __version__ "0.0.0" // The real value is now in build.py...
7bf85405 55
853b255a
RD
56wxPoint wxPyDefaultPosition;
57wxSize wxPyDefaultSize;
7bf85405
RD
58
59//---------------------------------------------------------------------------
60//---------------------------------------------------------------------------
61
62class wxPyApp : public wxEvtHandler {
63public:
64 %addmethods {
65 wxPyApp() {
66 wxPythonApp = new wxPyApp();
67 return wxPythonApp;
68 }
69 }
70
8bf5d46e 71 ~wxPyApp();
7bf85405
RD
72
73 wxString GetAppName();
853b255a 74#ifdef __WXMSW__
7bf85405 75 bool GetAuto3D();
853b255a 76#endif
7bf85405
RD
77 wxString GetClassName();
78 bool GetExitOnFrameDelete();
79 int GetPrintMode();
80 wxWindow * GetTopWindow();
81 wxString GetVendorName();
f6bcfd97 82 bool GetUseBestVisual();
7bf85405
RD
83
84 void Dispatch();
85 void ExitMainLoop();
86 bool Initialized();
87 int MainLoop();
88 bool Pending();
8bf5d46e 89 bool ProcessIdle();
7bf85405
RD
90
91 void SetAppName(const wxString& name);
853b255a 92#ifdef __WXMSW__
7bf85405 93 void SetAuto3D(bool auto3D);
853b255a 94#endif
7bf85405
RD
95 void SetClassName(const wxString& name);
96 void SetExitOnFrameDelete(bool flag);
97 void SetPrintMode(int mode);
98 void SetTopWindow(wxWindow* window);
99 void SetVendorName(const wxString& name);
f6bcfd97 100 void SetUseBestVisual(bool flag);
8bf5d46e
RD
101 wxIcon GetStdIcon(int which);
102
103
104};
105
106
107//----------------------------------------------------------------------
b1462dfa 108// this is used to cleanup after wxWindows when Python shuts down.
8bf5d46e 109
b1462dfa
RD
110%inline %{
111 void wxApp_CleanUp() {
7ff49f0c 112 __wxCleanup();
b1462dfa 113 }
8bf5d46e
RD
114%}
115
7bf85405
RD
116//----------------------------------------------------------------------
117// This code gets added to the module initialization function
118//----------------------------------------------------------------------
119
120%{
1d99702e
RD
121extern "C" SWIGEXPORT(void) initwindowsc();
122extern "C" SWIGEXPORT(void) initwindows2c();
123extern "C" SWIGEXPORT(void) initeventsc();
124extern "C" SWIGEXPORT(void) initmiscc();
125extern "C" SWIGEXPORT(void) initmisc2c();
126extern "C" SWIGEXPORT(void) initgdic();
127extern "C" SWIGEXPORT(void) initmdic();
128extern "C" SWIGEXPORT(void) initcontrolsc();
129extern "C" SWIGEXPORT(void) initcontrols2c();
130extern "C" SWIGEXPORT(void) initcmndlgsc();
131extern "C" SWIGEXPORT(void) initstattoolc();
132extern "C" SWIGEXPORT(void) initframesc();
133extern "C" SWIGEXPORT(void) initwindows3c();
134extern "C" SWIGEXPORT(void) initimagec();
135extern "C" SWIGEXPORT(void) initprintfwc();
2f90df85 136extern "C" SWIGEXPORT(void) initsizersc();
b1462dfa 137extern "C" SWIGEXPORT(void) initclip_dndc();
f6bcfd97
BP
138extern "C" SWIGEXPORT(void) initgridc();
139extern "C" SWIGEXPORT(void) initutilsc();
140extern "C" SWIGEXPORT(void) inithtmlc();
141extern "C" SWIGEXPORT(void) inithtmlhelpc();
142extern "C" SWIGEXPORT(void) initcalendarc();
0699c864 143%}
08127323 144
7bf85405 145
7bf85405
RD
146
147%init %{
7bf85405 148
0d6f9504 149 __wxPreStart(); // initialize the GUI toolkit, if needed.
7bf85405 150
7bf85405
RD
151
152 // Since these modules are all linked together, initialize them now
f6bcfd97 153 // because Python won't be able to find their shared library files,
7bf85405
RD
154 // (since there isn't any.)
155 initwindowsc();
156 initwindows2c();
157 initeventsc();
158 initmiscc();
bb0054cd 159 initmisc2c();
7bf85405
RD
160 initgdic();
161 initmdic();
162 initcontrolsc();
163 initcontrols2c();
164 initcmndlgsc();
9c039d08
RD
165 initstattoolc();
166 initframesc();
08127323 167 initwindows3c();
cf694132 168 initimagec();
bb0054cd 169 initprintfwc();
2f90df85 170 initsizersc();
b1462dfa 171 initclip_dndc();
f6bcfd97
BP
172
173 initgridc();
174 initutilsc();
175 inithtmlc();
176 inithtmlhelpc();
177 initcalendarc();
7bf85405
RD
178%}
179
180//----------------------------------------------------------------------
181// And this gets appended to the shadow class file.
182//----------------------------------------------------------------------
183
184%pragma(python) include="_extras.py";
185
186