+#define DEC_PYCALLBACK__DCBOOL(CBNAME) \
+ void CBNAME(wxDC& a, bool b); \
+ void base_##CBNAME(wxDC& a, bool b);
+
+
+#define IMP_PYCALLBACK__DCBOOL(CLASS, PCLASS, CBNAME) \
+ void CLASS::CBNAME(wxDC& a, bool b) { \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ m_myInst.callCallback(Py_BuildValue("(Oi)", \
+ wxPyConstructObject(&a, "wxDC"), (int)b)); \
+ else \
+ PCLASS::CBNAME(a, b); \
+ wxPySaveThread(doSave); \
+ } \
+ void CLASS::base_##CBNAME(wxDC& a, bool b) { \
+ PCLASS::CBNAME(a, b); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK__2DBL(CBNAME) \
+ void CBNAME(double a, double b); \
+ void base_##CBNAME(double a, double b);
+
+
+#define IMP_PYCALLBACK__2DBL(CLASS, PCLASS, CBNAME) \
+ void CLASS::CBNAME(double a, double b) { \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ m_myInst.callCallback(Py_BuildValue("(dd)",a,b)); \
+ else \
+ PCLASS::CBNAME(a, b); \
+ wxPySaveThread(doSave); \
+ } \
+ void CLASS::base_##CBNAME(double a, double b) { \
+ PCLASS::CBNAME(a, b); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK__2DBL2INT(CBNAME) \
+ void CBNAME(double a, double b, int c, int d); \
+ void base_##CBNAME(double a, double b, int c, int d);
+
+
+#define IMP_PYCALLBACK__2DBL2INT(CLASS, PCLASS, CBNAME) \
+ void CLASS::CBNAME(double a, double b, int c, int d) { \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ m_myInst.callCallback(Py_BuildValue("(ddii)", \
+ a,b,c,d)); \
+ else \
+ PCLASS::CBNAME(a, b, c, d); \
+ wxPySaveThread(doSave); \
+ } \
+ void CLASS::base_##CBNAME(double a, double b, int c, int d) { \
+ PCLASS::CBNAME(a, b, c, d); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK__DC4DBLBOOL(CBNAME) \
+ void CBNAME(wxDC& a, double b, double c, double d, double e, bool f); \
+ void base_##CBNAME(wxDC& a, double b, double c, double d, double e, bool f);
+
+
+#define IMP_PYCALLBACK__DC4DBLBOOL(CLASS, PCLASS, CBNAME) \
+ void CLASS::CBNAME(wxDC& a, double b, double c, double d, double e, bool f) { \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ m_myInst.callCallback(Py_BuildValue("(Oddddi)", \
+ wxPyConstructObject(&a, "wxDC"), \
+ b, c, d, e, (int)f)); \
+ else \
+ PCLASS::CBNAME(a, b, c, d, e, f); \
+ wxPySaveThread(doSave); \
+ } \
+ void CLASS::base_##CBNAME(wxDC& a, double b, double c, double d, double e, bool f) {\
+ PCLASS::CBNAME(a, b, c, d, e, f); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK_BOOL_DC4DBLBOOL(CBNAME) \
+ bool CBNAME(wxDC& a, double b, double c, double d, double e, bool f); \
+ bool base_##CBNAME(wxDC& a, double b, double c, double d, double e, bool f);
+
+
+#define IMP_PYCALLBACK_BOOL_DC4DBLBOOL(CLASS, PCLASS, CBNAME) \
+ bool CLASS::CBNAME(wxDC& a, double b, double c, double d, double e, bool f) { \
+ bool doSave = wxPyRestoreThread(); \
+ bool rval; \
+ if (m_myInst.findCallback(#CBNAME)) \
+ rval = m_myInst.callCallback(Py_BuildValue("(Oddddi)", \
+ wxPyConstructObject(&a, "wxDC"), \
+ b, c, d, e, (int)f)); \
+ else \
+ rval = PCLASS::CBNAME(a, b, c, d, e, f); \
+ wxPySaveThread(doSave); \
+ return rval; \
+ } \
+ bool CLASS::base_##CBNAME(wxDC& a, double b, double c, double d, double e, bool f) {\
+ return PCLASS::CBNAME(a, b, c, d, e, f); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK__BOOL2DBL2INT(CBNAME) \
+ void CBNAME(bool a, double b, double c, int d, int e); \
+ void base_##CBNAME(bool a, double b, double c, int d, int e);
+
+
+#define IMP_PYCALLBACK__BOOL2DBL2INT(CLASS, PCLASS, CBNAME) \
+ void CLASS::CBNAME(bool a, double b, double c, int d, int e) { \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ m_myInst.callCallback(Py_BuildValue("(idii)", \
+ (int)a,b,c,d,e)); \
+ else \
+ PCLASS::CBNAME(a, b, c, d, e); \
+ wxPySaveThread(doSave); \
+ } \
+ void CLASS::base_##CBNAME(bool a, double b, double c, int d, int e) { \
+ PCLASS::CBNAME(a, b, c, d, e); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK__DC4DBL(CBNAME) \
+ void CBNAME(wxDC& a, double b, double c, double d, double e); \
+ void base_##CBNAME(wxDC& a, double b, double c, double d, double e);
+
+
+#define IMP_PYCALLBACK__DC4DBL(CLASS, PCLASS, CBNAME) \
+ void CLASS::CBNAME(wxDC& a, double b, double c, double d, double e) { \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ m_myInst.callCallback(Py_BuildValue("(Odddd)", \
+ wxPyConstructObject(&a, "wxDC"), \
+ b, c, d, e)); \
+ else \
+ PCLASS::CBNAME(a, b, c, d, e); \
+ wxPySaveThread(doSave); \
+ } \
+ void CLASS::base_##CBNAME(wxDC& a, double b, double c, double d, double e) {\
+ PCLASS::CBNAME(a, b, c, d, e); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK__DCBOOL(CBNAME) \
+ void CBNAME(wxDC& a, bool b); \
+ void base_##CBNAME(wxDC& a, bool b);
+
+
+#define IMP_PYCALLBACK__DCBOOL(CLASS, PCLASS, CBNAME) \
+ void CLASS::CBNAME(wxDC& a, bool b) { \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ m_myInst.callCallback(Py_BuildValue("(Oi)", \
+ wxPyConstructObject(&a, "wxDC"), \
+ (int)b)); \
+ else \
+ PCLASS::CBNAME(a, b); \
+ wxPySaveThread(doSave); \
+ } \
+ void CLASS::base_##CBNAME(wxDC& a, bool b) { \
+ PCLASS::CBNAME(a, b); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK__WXCPBOOL2DBL2INT(CBNAME) \
+ void CBNAME(wxControlPoint* a, bool b, double c, double d, int e, int f); \
+ void base_##CBNAME(wxControlPoint* a, bool b, double c, double d, int e, int f);
+
+
+#define IMP_PYCALLBACK__WXCPBOOL2DBL2INT(CLASS, PCLASS, CBNAME) \
+ void CLASS::CBNAME(wxControlPoint* a, bool b, double c, double d, \
+ int e, int f) { \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ m_myInst.callCallback(Py_BuildValue("(Oiddii)", \
+ wxPyConstructObject(a, "wxPyControlPoint"), \
+ (int)b, c, d, e, f)); \
+ else \
+ PCLASS::CBNAME(a, b, c, d, e, f); \
+ wxPySaveThread(doSave); \
+ } \
+ void CLASS::base_##CBNAME(wxControlPoint* a, bool b, double c, double d, \
+ int e, int f) { \
+ PCLASS::CBNAME(a, b, c, d, e, f); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK__WXCP2DBL2INT(CBNAME) \
+ void CBNAME(wxControlPoint* a, double b, double c, int d, int e); \
+ void base_##CBNAME(wxControlPoint* a, double b, double c, int d, int e);
+
+
+#define IMP_PYCALLBACK__WXCP2DBL2INT(CLASS, PCLASS, CBNAME) \
+ void CLASS::CBNAME(wxControlPoint* a, double b, double c, int d, int e) { \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ m_myInst.callCallback(Py_BuildValue("(Oddii)", \
+ wxPyConstructObject(a, "wxPyControlPoint"), \
+ b, c, d, e)); \
+ else \
+ PCLASS::CBNAME(a, b, c, d, e); \
+ wxPySaveThread(doSave); \
+ } \
+ void CLASS::base_##CBNAME(wxControlPoint* a, double b, double c, \
+ int d, int e) { \
+ PCLASS::CBNAME(a, b, c, d, e); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK__2DBLINT(CBNAME) \
+ void CBNAME(double a, double b, int c); \
+ void base_##CBNAME(double a, double b, int c);
+
+
+#define IMP_PYCALLBACK__2DBLINT(CLASS, PCLASS, CBNAME) \
+ void CLASS::CBNAME(double a, double b, int c) { \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ m_myInst.callCallback(Py_BuildValue("(ddi)", a,b,c)); \
+ else \
+ PCLASS::CBNAME(a, b, c); \
+ wxPySaveThread(doSave); \
+ } \
+ void CLASS::base_##CBNAME(double a, double b, int c) { \
+ PCLASS::CBNAME(a, b, c); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK__BOOL2DBLINT(CBNAME) \
+ void CBNAME(bool a, double b, double c, int d); \
+ void base_##CBNAME(bool a, double b, double c, int d);
+
+
+#define IMP_PYCALLBACK__BOOL2DBLINT(CLASS, PCLASS, CBNAME) \
+ void CLASS::CBNAME(bool a, double b, double c, int d) { \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ m_myInst.callCallback(Py_BuildValue("(iddi)", (int)a,b,c,d)); \
+ else \
+ PCLASS::CBNAME(a, b, c, d); \
+ wxPySaveThread(doSave); \
+ } \
+ void CLASS::base_##CBNAME(bool a, double b, double c, int d) { \
+ PCLASS::CBNAME(a, b, c, d); \
+ }
+
+//---------------------------------------------------------------------------
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK__STRING(CBNAME) \
+ void CBNAME(const wxString& a); \
+ void base_##CBNAME(const wxString& a);
+
+
+#define IMP_PYCALLBACK__STRING(CLASS, PCLASS, CBNAME) \
+ void CLASS::CBNAME(const wxString& a) { \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ m_myInst.callCallback(Py_BuildValue("(s)", a.c_str())); \
+ else \
+ PCLASS::CBNAME(a); \
+ wxPySaveThread(doSave); \
+ } \
+ void CLASS::base_##CBNAME(const wxString& a) { \
+ PCLASS::CBNAME(a); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK_BOOL_STRING(CBNAME) \
+ bool CBNAME(const wxString& a); \
+ bool base_##CBNAME(const wxString& a);
+
+
+#define IMP_PYCALLBACK_BOOL_STRING(CLASS, PCLASS, CBNAME) \
+ bool CLASS::CBNAME(const wxString& a) { \
+ bool rval; \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ rval = m_myInst.callCallback(Py_BuildValue("(s)", a.c_str())); \
+ else \
+ rval = PCLASS::CBNAME(a); \
+ wxPySaveThread(doSave); \
+ return rval; \
+ } \
+ bool CLASS::base_##CBNAME(const wxString& a) { \
+ return PCLASS::CBNAME(a); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK_BOOL_STRINGSTRING(CBNAME) \
+ bool CBNAME(const wxString& a, const wxString& b); \
+ bool base_##CBNAME(const wxString& a, const wxString& b);
+
+
+#define IMP_PYCALLBACK_BOOL_STRINGSTRING(CLASS, PCLASS, CBNAME) \
+ bool CLASS::CBNAME(const wxString& a, const wxString& b) { \
+ bool rval; \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ rval = m_myInst.callCallback(Py_BuildValue("(ss)", \
+ a.c_str(), b.c_str())); \
+ else \
+ rval = PCLASS::CBNAME(a, b); \
+ wxPySaveThread(doSave); \
+ return rval; \
+ } \
+ bool CLASS::base_##CBNAME(const wxString& a, const wxString& b) { \
+ return PCLASS::CBNAME(a, b); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK_STRING_(CBNAME) \
+ wxString CBNAME(); \
+ wxString base_##CBNAME();
+
+
+#define IMP_PYCALLBACK_STRING_(CLASS, PCLASS, CBNAME) \
+ wxString CLASS::CBNAME() { \
+ wxString rval; \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) { \
+ PyObject* ro; \
+ ro = m_myInst.callCallbackObj(Py_BuildValue("()")); \
+ rval = PyString_AsString(PyObject_Str(ro)); \
+ } \
+ else \
+ rval = PCLASS::CBNAME(a); \
+ wxPySaveThread(doSave); \
+ return rval; \
+ } \
+ bool CLASS::base_##CBNAME(const wxString& a) { \
+ return PCLASS::CBNAME(a); \
+ }