// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
-%module _core
+%module(package="wx") _core
%{
#include "wx/wxPython/wxPython_int.h"
%native(_wxPySetDictionary) __wxPySetDictionary;
%native(_wxPyFixStockObjects) __wxPyFixStockObjects;
+
%pythoncode {
%#// Give a reference to the dictionary of this module to the C++ extension
%#// code.
%#// be used here.
import sys as _sys
wx = _sys.modules[__name__]
-}
+}
#endif
+%pythoncode {
+%#----------------------------------------------------------------------------
+
+def _deprecated(callable, msg=None):
+ """
+ Create a wrapper function that will raise a DeprecationWarning
+ before calling the callable.
+ """
+ if msg is None:
+ msg = "%s is deprecated" % callable
+ def deprecatedWrapper(*args, **kwargs):
+ import warnings
+ warnings.warn(msg, DeprecationWarning, stacklevel=2)
+ return callable(*args, **kwargs)
+ deprecatedWrapper.__doc__ = msg
+ return deprecatedWrapper
+
+
+%#----------------------------------------------------------------------------
+}
+
//---------------------------------------------------------------------------
// Include all the files that make up the core module
MAKE_CONST_WXSTRING(EmptyString);
+%include _swigtype.i
+
%include _obj.i
%include _gdicmn.i
%include _streams.i
%include _evthandler.i
%include _event.i
%include _app.i
+%include _evtloop.i
%include _accel.i
%include _window.i
%include _validator.i