]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/core.i
wxPageSetupDialog no longer derives from wxDialog
[wxWidgets.git] / wxPython / src / core.i
CommitLineData
d14a1e28
RD
1/////////////////////////////////////////////////////////////////////////////
2// Name: core.i
3// Purpose: SWIG interface file for the CORE wxPython classes and stuff.
4//
5// Author: Robin Dunn
6//
7// Created: 22-May-1998
8// RCS-ID: $Id$
9// Copyright: (c) 1998 by Total Control Software
10// Licence: wxWindows license
11/////////////////////////////////////////////////////////////////////////////
12
b2eb030f 13%module(package="wx") _core
d14a1e28
RD
14
15%{
16#include "wx/wxPython/wxPython_int.h"
17#include "wx/wxPython/pyclasses.h"
18%}
19
20
21//---------------------------------------------------------------------------
22
23#ifndef SWIGXML
24%include typemaps.i
25%include my_typemaps.i
26
27%include _core_api.i
54f9ee45 28%include __core_rename.i
d14a1e28 29
d14a1e28 30%native(_wxPySetDictionary) __wxPySetDictionary;
9e58eb56 31%native(_wxPyFixStockObjects) __wxPyFixStockObjects;
d14a1e28 32
61863841 33
d14a1e28
RD
34%pythoncode {
35%#// Give a reference to the dictionary of this module to the C++ extension
36%#// code.
54f9ee45 37_core_._wxPySetDictionary(vars())
d14a1e28
RD
38
39%#// A little trick to make 'wx' be a reference to this module so wx.Names can
40%#// be used here.
41import sys as _sys
42wx = _sys.modules[__name__]
d14a1e28 43
dce2bd22 44}
d14a1e28
RD
45#endif
46
d14a1e28 47
dce2bd22
RD
48%pythoncode {
49%#----------------------------------------------------------------------------
50
51def _deprecated(callable, msg=None):
52 """
53 Create a wrapper function that will raise a DeprecationWarning
54 before calling the callable.
55 """
56 if msg is None:
57 msg = "%s is deprecated" % callable
58 def deprecatedWrapper(*args, **kwargs):
59 import warnings
60 warnings.warn(msg, DeprecationWarning, stacklevel=2)
61 return callable(*args, **kwargs)
62 deprecatedWrapper.__doc__ = msg
63 return deprecatedWrapper
64
65
66%#----------------------------------------------------------------------------
67}
68
d14a1e28
RD
69
70//---------------------------------------------------------------------------
71// Include all the files that make up the core module
72
73// wxObject, functions and other base stuff
74%include _defs.i
64e8a1f0
RD
75
76MAKE_CONST_WXSTRING(EmptyString);
77
d14a1e28
RD
78%include _obj.i
79%include _gdicmn.i
80%include _streams.i
81%include _filesys.i
82%include _image.i
83
84
85// Events, event handlers, base Windows and such
86%include _evthandler.i
87%include _event.i
88%include _app.i
96d49f0e 89%include _evtloop.i
1e0c8722 90%include _accel.i
d14a1e28
RD
91%include _window.i
92%include _validator.i
93%include _menu.i
94%include _control.i
95
96
97// Layout
98%include _sizers.i
99%include _gbsizer.i
100%include _constraints.i
101
102
103%pythoncode "_core_ex.py"
104
105//---------------------------------------------------------------------------
106// This code gets added to the module initialization function
107
108%init %{
109 // Initialize threading, some globals and such
110 __wxPyPreStart(d);
111
112
113 // Although these are defined in __version__ they need to be here too so
114 // that an assert can be done to ensure that the wxPython and the wxWindows
115 // versions match.
116 PyDict_SetItemString(d,"MAJOR_VERSION", PyInt_FromLong((long)wxMAJOR_VERSION ));
117 PyDict_SetItemString(d,"MINOR_VERSION", PyInt_FromLong((long)wxMINOR_VERSION ));
118 PyDict_SetItemString(d,"RELEASE_VERSION", PyInt_FromLong((long)wxRELEASE_NUMBER ));
119%}
120
121//---------------------------------------------------------------------------