]> git.saurik.com Git - wxWidgets.git/blame - utils/wxPython/src/wxp.i
GTK version of the SWIG-generated files
[wxWidgets.git] / utils / wxPython / src / wxp.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
03e9bead
RD
13%module wxp
14
15
16%{
7bf85405
RD
17
18#ifdef __WXMSW__
19#include <windows.h>
20#undef FindWindow
21#undef GetCharWidth
22#undef LoadAccelerators
23#endif
24
25
26#include "helpers.h"
27%}
28
29//----------------------------------------------------------------------
30// This is where we include the other wrapper definition files for SWIG
31//----------------------------------------------------------------------
32
33%include typemaps.i
34%include my_typemaps.i
35%include _defs.i
36
37%import misc.i
38%import windows.i
39%import events.i
40%import gdi.i
41%import mdi.i
42%import controls.i
43%import controls2.i
44%import windows2.i
45%import cmndlgs.i
46
47
48
49%native(_wxStart) __wxStart;
50%native(_wxSetDictionary) __wxSetDictionary;
51
52//---------------------------------------------------------------------------
53
853b255a 54#define __version__ "0.3.1"
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
71
72 wxString GetAppName();
853b255a 73#ifdef __WXMSW__
7bf85405 74 bool GetAuto3D();
853b255a 75#endif
7bf85405
RD
76 wxString GetClassName();
77 bool GetExitOnFrameDelete();
78 int GetPrintMode();
79 wxWindow * GetTopWindow();
80 wxString GetVendorName();
81
82 void Dispatch();
83 void ExitMainLoop();
84 bool Initialized();
85 int MainLoop();
86 bool Pending();
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
98 // This one is wxPython specific. If you override MainLoop,
99 // call this when done.
100 void AfterMainLoop();
101};
102
103
104//---------------------------------------------------------------------------
105//---------------------------------------------------------------------------
106
107
108%{
109#ifdef __WXMSW__ // If building for win32...
110extern HINSTANCE wxhInstance;
111
112BOOL WINAPI DllMain(
113 HINSTANCE hinstDLL, // handle to DLL module
114 DWORD fdwReason, // reason for calling function
115 LPVOID lpvReserved // reserved
116 )
117{
118 wxhInstance = hinstDLL;
119 return 1;
120}
121#endif
122
123%}
124
125
126
127
128//----------------------------------------------------------------------
129// This code gets added to the module initialization function
130//----------------------------------------------------------------------
131
132%{
133extern "C" SWIGEXPORT(void,initwindowsc)();
134extern "C" SWIGEXPORT(void,initwindows2c)();
135extern "C" SWIGEXPORT(void,initeventsc)();
136extern "C" SWIGEXPORT(void,initmiscc)();
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)();
142
143%}
144
145%init %{
146 // We don't want to run the wxEntry or OnInit yet, so we just do the
147 // beginings of what it would have done... See __wxStart() for the
148 // rest.
149#ifdef __WXMSW__
150 wxApp::Initialize((WXHINSTANCE)wxhInstance);
151#endif
7bf85405
RD
152
153
154// wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100);
155
156 // Since these modules are all linked together, initialize them now
157 // because python won't be able to find their shared library files,
158 // (since there isn't any.)
159 initwindowsc();
160 initwindows2c();
161 initeventsc();
162 initmiscc();
163 initgdic();
164 initmdic();
165 initcontrolsc();
166 initcontrols2c();
167 initcmndlgsc();
168%}
169
170//----------------------------------------------------------------------
171// And this gets appended to the shadow class file.
172//----------------------------------------------------------------------
173
174%pragma(python) include="_extras.py";
175
176
177/////////////////////////////////////////////////////////////////////////////
178//
179// $Log$
fb5e0af0
RD
180// Revision 1.4 1998/08/18 19:48:20 RD
181// more wxGTK compatibility things.
182//
183// It builds now but there are serious runtime problems...
184//
03e9bead
RD
185// Revision 1.3 1998/08/15 07:36:53 RD
186// - Moved the header in the .i files out of the code that gets put into
187// the .cpp files. It caused CVS conflicts because of the RCS ID being
188// different each time.
189//
190// - A few minor fixes.
191//
853b255a
RD
192// Revision 1.2 1998/08/14 23:36:49 RD
193// Beginings of wxGTK compatibility
194//
7bf85405
RD
195// Revision 1.1 1998/08/09 08:25:53 RD
196// Initial version
197//
198//
199
200