1 /////////////////////////////////////////////////////////////////////////////
 
   3 // Purpose:     SWIG interface file for the CORE wxPython classes and stuff.
 
   7 // Created:     22-May-1998
 
   9 // Copyright:   (c) 1998 by Total Control Software
 
  10 // Licence:     wxWindows license
 
  11 /////////////////////////////////////////////////////////////////////////////
 
  13 %module(package="wx") _core
 
  16 #include "wx/wxPython/wxPython_int.h"
 
  17 #include "wx/wxPython/pyclasses.h"
 
  18 #include "wx/wxPython/twoitem.h"
 
  22 //---------------------------------------------------------------------------
 
  26 %include my_typemaps.i
 
  30 %native(_wxPySetDictionary)   __wxPySetDictionary;
 
  34 %#// Give a reference to the dictionary of this module to the C++ extension
 
  36 _core_._wxPySetDictionary(vars())
 
  38 %#// A little trick to make 'wx' be a reference to this module so wx.Names can
 
  41 wx = _sys.modules[__name__]
 
  48 %#----------------------------------------------------------------------------
 
  50 def _deprecated(callable, msg=None):
 
  52     Create a wrapper function that will raise a DeprecationWarning
 
  53     before calling the callable.
 
  56         msg = "%s is deprecated" % callable
 
  57     def deprecatedWrapper(*args, **kwargs):
 
  59         warnings.warn(msg, DeprecationWarning, stacklevel=2)
 
  60         return callable(*args, **kwargs)
 
  61     deprecatedWrapper.__doc__ = msg
 
  62     return deprecatedWrapper
 
  65 %#----------------------------------------------------------------------------
 
  69 //---------------------------------------------------------------------------
 
  70 // Include all the files that make up the core module
 
  72 // wxObject, functions and other base stuff
 
  75 MAKE_CONST_WXSTRING(EmptyString);
 
  86 // Events, event handlers, base Windows and such
 
  87 %include _evthandler.i
 
 101 %include _constraints.i
 
 104 %pythoncode "_core_ex.py"
 
 106 //---------------------------------------------------------------------------
 
 107 // This code gets added to the module initialization function
 
 110     // Initialize threading, some globals and such
 
 114     // Although these are defined in __version__ they need to be here too so
 
 115     // that an assert can be done to ensure that the wxPython and the wxWindows
 
 117     PyDict_SetItemString(d,"MAJOR_VERSION", PyInt_FromLong((long)wxMAJOR_VERSION ));
 
 118     PyDict_SetItemString(d,"MINOR_VERSION", PyInt_FromLong((long)wxMINOR_VERSION ));
 
 119     PyDict_SetItemString(d,"RELEASE_VERSION", PyInt_FromLong((long)wxRELEASE_NUMBER ));
 
 122 //---------------------------------------------------------------------------