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