From 794c5cb151d633aa13a4f74292713544c6ccf381 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 8 May 2001 00:13:42 +0000 Subject: [PATCH] updated generated sources for wxMSW git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/glcanvas/msw/glcanvas.cpp | 8 +- wxPython/src/msw/calendar.cpp | 8 +- wxPython/src/msw/clip_dnd.cpp | 16 +- wxPython/src/msw/cmndlgs.cpp | 32 +- wxPython/src/msw/controls.cpp | 70 +-- wxPython/src/msw/controls2.cpp | 36 +- wxPython/src/msw/events.cpp | 10 +- wxPython/src/msw/filesys.cpp | 58 ++- wxPython/src/msw/frames.cpp | 16 +- wxPython/src/msw/gdi.cpp | 38 +- wxPython/src/msw/grid.cpp | 52 +- wxPython/src/msw/html.cpp | 554 ++++++++++++++------- wxPython/src/msw/html.py | 46 +- wxPython/src/msw/htmlhelp.cpp | 83 +-- wxPython/src/msw/htmlhelp.py | 22 +- wxPython/src/msw/image.cpp | 34 +- wxPython/src/msw/mdi.cpp | 12 +- wxPython/src/msw/misc.cpp | 14 +- wxPython/src/msw/misc2.cpp | 54 +- wxPython/src/msw/printfw.cpp | 28 +- wxPython/src/msw/sizers.cpp | 6 +- wxPython/src/msw/stattool.cpp | 34 +- wxPython/src/msw/streams.cpp | 8 +- wxPython/src/msw/utils.cpp | 70 +-- wxPython/src/msw/windows.cpp | 72 +-- wxPython/src/msw/windows2.cpp | 14 +- wxPython/src/msw/windows3.cpp | 8 +- wxPython/src/msw/wx.cpp | 12 +- 28 files changed, 846 insertions(+), 569 deletions(-) diff --git a/wxPython/contrib/glcanvas/msw/glcanvas.cpp b/wxPython/contrib/glcanvas/msw/glcanvas.cpp index 25cf0ed7d6..83697d41df 100644 --- a/wxPython/contrib/glcanvas/msw/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/msw/glcanvas.cpp @@ -109,7 +109,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif #ifdef __cplusplus extern "C" { #endif @@ -697,6 +701,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStaticLine","_class_wxStaticLine",0}, { "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0}, { "_wxBrush","_class_wxBrush",0}, + { "_wxToggleButton","_class_wxToggleButton",0}, { "_wxMiniFrame","_class_wxMiniFrame",0}, { "_class_wxNotebookEvent","_wxNotebookEvent",0}, { "_class_wxPyPrintout","_wxPyPrintout",0}, @@ -1027,6 +1032,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, { "_class_wxTipProvider","_wxTipProvider",0}, + { "_class_wxToggleButton","_wxToggleButton",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, diff --git a/wxPython/src/msw/calendar.cpp b/wxPython/src/msw/calendar.cpp index 30959a379b..5c459652aa 100644 --- a/wxPython/src/msw/calendar.cpp +++ b/wxPython/src/msw/calendar.cpp @@ -104,7 +104,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif #ifdef __cplusplus extern "C" { #endif @@ -1751,6 +1755,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDataObject","_wxDataObject",0}, { "_wxStaticLine","_class_wxStaticLine",0}, { "_wxBrush","_class_wxBrush",0}, + { "_wxToggleButton","_class_wxToggleButton",0}, { "_wxDataFormat","_class_wxDataFormat",0}, { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, { "_wxShowEvent","_class_wxShowEvent",0}, @@ -1987,6 +1992,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, + { "_class_wxToggleButton","_wxToggleButton",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxDateSpan","_wxDateSpan",0}, { "_class_wxShowEvent","_wxShowEvent",0}, diff --git a/wxPython/src/msw/clip_dnd.cpp b/wxPython/src/msw/clip_dnd.cpp index f59ab4755c..4b931192c3 100644 --- a/wxPython/src/msw/clip_dnd.cpp +++ b/wxPython/src/msw/clip_dnd.cpp @@ -106,7 +106,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif // An alternate constructor... wxDataFormat* wxCustomDataFormat(const wxString &id) { return new wxDataFormat(id); @@ -347,7 +351,7 @@ static PyObject *_wrap_wxCustomDataFormat(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -1184,7 +1188,7 @@ static PyObject *_wrap_new_wxTextDataObject(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -1299,7 +1303,7 @@ static PyObject *_wrap_wxTextDataObject_SetText(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1368,7 +1372,7 @@ static PyObject *_wrap_new_wxPyTextDataObject(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -1747,7 +1751,7 @@ static PyObject *_wrap_wxFileDataObject_AddFile(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) diff --git a/wxPython/src/msw/cmndlgs.cpp b/wxPython/src/msw/cmndlgs.cpp index 0ed1c6dde9..a9c5cf54c2 100644 --- a/wxPython/src/msw/cmndlgs.cpp +++ b/wxPython/src/msw/cmndlgs.cpp @@ -107,7 +107,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif #ifdef __cplusplus extern "C" { #endif @@ -683,7 +687,7 @@ static PyObject *_wrap_wxDirDialog_SetMessage(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -734,7 +738,7 @@ static PyObject *_wrap_wxDirDialog_SetPath(PyObject *self, PyObject *args, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1106,7 +1110,7 @@ static PyObject *_wrap_wxFileDialog_SetDirectory(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1157,7 +1161,7 @@ static PyObject *_wrap_wxFileDialog_SetFilename(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1236,7 +1240,7 @@ static PyObject *_wrap_wxFileDialog_SetMessage(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1287,7 +1291,7 @@ static PyObject *_wrap_wxFileDialog_SetPath(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1366,7 +1370,7 @@ static PyObject *_wrap_wxFileDialog_SetWildcard(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1569,7 +1573,7 @@ static PyObject *_wrap_new_wxSingleChoiceDialog(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1587,7 +1591,7 @@ static PyObject *_wrap_new_wxSingleChoiceDialog(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1896,7 +1900,7 @@ static PyObject *_wrap_wxTextEntryDialog_SetValue(PyObject *self, PyObject *args #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2691,7 +2695,7 @@ static PyObject *_wrap_new_wxProgressDialog(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -2709,7 +2713,7 @@ static PyObject *_wrap_new_wxProgressDialog(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -3017,6 +3021,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDataObject","_wxDataObject",0}, { "_wxStaticLine","_class_wxStaticLine",0}, { "_wxBrush","_class_wxBrush",0}, + { "_wxToggleButton","_class_wxToggleButton",0}, { "_wxMiniFrame","_class_wxMiniFrame",0}, { "_wxDataFormat","_class_wxDataFormat",0}, { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, @@ -3288,6 +3293,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, + { "_class_wxToggleButton","_wxToggleButton",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, { "_wxRegion","_class_wxRegion",0}, diff --git a/wxPython/src/msw/controls.cpp b/wxPython/src/msw/controls.cpp index eae334bd2d..2b3f5b7712 100644 --- a/wxPython/src/msw/controls.cpp +++ b/wxPython/src/msw/controls.cpp @@ -120,7 +120,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif wxSize wxButton_GetDefaultSize() { return wxButton::GetDefaultSize(); @@ -333,7 +337,7 @@ static PyObject *_wrap_wxControl_SetLabel(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -421,7 +425,7 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1102,7 +1106,7 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1343,7 +1347,7 @@ static PyObject *_wrap_wxChoice_Append(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1422,7 +1426,7 @@ static PyObject *_wrap_wxChoice_FindString(PyObject *self, PyObject *args, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1674,7 +1678,7 @@ static PyObject *_wrap_wxChoice_SetStringSelection(PyObject *self, PyObject *arg #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1843,7 +1847,7 @@ static PyObject *_wrap_wxComboBox_Append(PyObject *self, PyObject *args, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2004,7 +2008,7 @@ static PyObject *_wrap_wxComboBox_FindString(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2288,7 +2292,7 @@ static PyObject *_wrap_wxComboBox_Replace(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -2480,7 +2484,7 @@ static PyObject *_wrap_wxComboBox_SetValue(PyObject *self, PyObject *args, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2875,7 +2879,7 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -3057,7 +3061,7 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -3157,7 +3161,7 @@ static PyObject *_wrap_wxStaticText_SetLabel(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -3317,7 +3321,7 @@ static PyObject *_wrap_wxListBox_Append(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -3452,7 +3456,7 @@ static PyObject *_wrap_wxListBox_FindString(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -3810,7 +3814,7 @@ static PyObject *_wrap_wxListBox_SetFirstItemStr(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -3893,7 +3897,7 @@ static PyObject *_wrap_wxListBox_SetString(PyObject *self, PyObject *args, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -3946,7 +3950,7 @@ static PyObject *_wrap_wxListBox_SetStringSelection(PyObject *self, PyObject *ar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -4646,7 +4650,7 @@ static PyObject *_wrap_wxTextCtrl_LoadFile(PyObject *self, PyObject *args, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -4802,7 +4806,7 @@ static PyObject *_wrap_wxTextCtrl_Replace(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -4854,7 +4858,7 @@ static PyObject *_wrap_wxTextCtrl_SaveFile(PyObject *self, PyObject *args, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5018,7 +5022,7 @@ static PyObject *_wrap_wxTextCtrl_SetValue(PyObject *self, PyObject *args, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5097,7 +5101,7 @@ static PyObject *_wrap_wxTextCtrl_WriteText(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5148,7 +5152,7 @@ static PyObject *_wrap_wxTextCtrl_AppendText(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5493,7 +5497,7 @@ static PyObject *_wrap_wxTextCtrl_write(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -6255,7 +6259,7 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -6410,7 +6414,7 @@ static PyObject *_wrap_wxRadioBox_FindString(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -6613,7 +6617,7 @@ static PyObject *_wrap_wxRadioBox_SetItemLabel(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -6692,7 +6696,7 @@ static PyObject *_wrap_wxRadioBox_SetStringSelection(PyObject *self, PyObject *a #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -6841,7 +6845,7 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -7854,7 +7858,7 @@ static PyObject *_wrap_new_wxToggleButton(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -7986,7 +7990,7 @@ static PyObject *_wrap_wxToggleButton_SetLabel(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) diff --git a/wxPython/src/msw/controls2.cpp b/wxPython/src/msw/controls2.cpp index efc2ff1a38..d564344390 100644 --- a/wxPython/src/msw/controls2.cpp +++ b/wxPython/src/msw/controls2.cpp @@ -108,7 +108,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif int wxCALLBACK wxPyListCtrl_SortItems(long item1, long item2, long funcPtr) { int retval = 0; @@ -776,7 +780,7 @@ static PyObject *_wrap_wxListItem_SetText(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1715,7 +1719,7 @@ static PyObject *_wrap_wxListItem_m_text_set(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -3258,7 +3262,7 @@ static PyObject *_wrap_wxListCtrl_FindItem(PyObject *self, PyObject *args, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -4005,7 +4009,7 @@ static PyObject *_wrap_wxListCtrl_InsertColumn(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -4093,7 +4097,7 @@ static PyObject *_wrap_wxListCtrl_InsertStringItem(PyObject *self, PyObject *arg #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -4175,7 +4179,7 @@ static PyObject *_wrap_wxListCtrl_InsertImageStringItem(PyObject *self, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -4432,7 +4436,7 @@ static PyObject *_wrap_wxListCtrl_SetStringItem(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -4608,7 +4612,7 @@ static PyObject *_wrap_wxListCtrl_SetItemText(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -5765,7 +5769,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemText(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -6770,7 +6774,7 @@ static PyObject *_wrap_wxTreeCtrl_AddRoot(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -6843,7 +6847,7 @@ static PyObject *_wrap_wxTreeCtrl_PrependItem(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -6925,7 +6929,7 @@ static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -6999,7 +7003,7 @@ static PyObject *_wrap_wxTreeCtrl_InsertItemBefore(PyObject *self, PyObject *arg #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -7072,7 +7076,7 @@ static PyObject *_wrap_wxTreeCtrl_AppendItem(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -8334,6 +8338,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDataObject","_wxDataObject",0}, { "_wxStaticLine","_class_wxStaticLine",0}, { "_wxBrush","_class_wxBrush",0}, + { "_wxToggleButton","_class_wxToggleButton",0}, { "_wxDataFormat","_class_wxDataFormat",0}, { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, { "_wxShowEvent","_class_wxShowEvent",0}, @@ -8574,6 +8579,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, + { "_class_wxToggleButton","_wxToggleButton",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxShowEvent","_wxShowEvent",0}, { "_wxPyDropTarget","_class_wxPyDropTarget",0}, diff --git a/wxPython/src/msw/events.cpp b/wxPython/src/msw/events.cpp index 782920488a..7b969c5acf 100644 --- a/wxPython/src/msw/events.cpp +++ b/wxPython/src/msw/events.cpp @@ -104,7 +104,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif #ifdef __cplusplus extern "C" { #endif @@ -972,7 +976,7 @@ static PyObject *_wrap_wxCommandEvent_SetString(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5483,7 +5487,7 @@ static PyObject *_wrap_wxUpdateUIEvent_SetText(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) diff --git a/wxPython/src/msw/filesys.cpp b/wxPython/src/msw/filesys.cpp index bbd8a83a11..775f5ce65e 100644 --- a/wxPython/src/msw/filesys.cpp +++ b/wxPython/src/msw/filesys.cpp @@ -107,7 +107,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif // wxPyFileSystemHandler will be the Python class wxFileSystemHandler and handling // the callback functions @@ -192,7 +196,7 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxImage(PyObject *self, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -243,7 +247,7 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxBitmap(PyObject *self, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -293,7 +297,7 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_Data(PyObject *self, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -361,7 +365,7 @@ static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kw #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -379,7 +383,7 @@ static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kw #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -397,7 +401,7 @@ static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kw #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -713,7 +717,7 @@ static PyObject *_wrap_wxFileSystemHandler_CanOpen(PyObject *self, PyObject *arg #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -774,7 +778,7 @@ static PyObject *_wrap_wxFileSystemHandler_OpenFile(PyObject *self, PyObject *ar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -832,7 +836,7 @@ static PyObject *_wrap_wxFileSystemHandler_FindFirst(PyObject *self, PyObject *a #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -920,7 +924,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetProtocol(PyObject *self, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -976,7 +980,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetLeftLocation(PyObject *self, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1032,7 +1036,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetAnchor(PyObject *self, PyObject *a #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1088,7 +1092,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetRightLocation(PyObject *self, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1144,7 +1148,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetMimeTypeFromExt(PyObject *self, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1226,7 +1230,7 @@ static PyObject *_wrap_wxFileSystem_ChangePathTo(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1312,7 +1316,7 @@ static PyObject *_wrap_wxFileSystem_OpenFile(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1370,7 +1374,7 @@ static PyObject *_wrap_wxFileSystem_FindFirst(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1534,7 +1538,7 @@ static PyObject *_wrap_wxInternetFSHandler_CanOpen(PyObject *self, PyObject *arg #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1595,7 +1599,7 @@ static PyObject *_wrap_wxInternetFSHandler_OpenFile(PyObject *self, PyObject *ar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1685,7 +1689,7 @@ static PyObject *_wrap_wxZipFSHandler_CanOpen(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1746,7 +1750,7 @@ static PyObject *_wrap_wxZipFSHandler_OpenFile(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1804,7 +1808,7 @@ static PyObject *_wrap_wxZipFSHandler_FindFirst(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1914,7 +1918,7 @@ static PyObject *_wrap_wxMemoryFSHandler_RemoveFile(PyObject *self, PyObject *ar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -1966,7 +1970,7 @@ static PyObject *_wrap_wxMemoryFSHandler_CanOpen(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2027,7 +2031,7 @@ static PyObject *_wrap_wxMemoryFSHandler_OpenFile(PyObject *self, PyObject *args #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -2085,7 +2089,7 @@ static PyObject *_wrap_wxMemoryFSHandler_FindFirst(PyObject *self, PyObject *arg #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) diff --git a/wxPython/src/msw/frames.cpp b/wxPython/src/msw/frames.cpp index a6c26bb5dd..15f357916d 100644 --- a/wxPython/src/msw/frames.cpp +++ b/wxPython/src/msw/frames.cpp @@ -104,7 +104,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif #ifdef __cplusplus extern "C" { #endif @@ -158,7 +162,7 @@ static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwa #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -784,7 +788,7 @@ static PyObject *_wrap_wxFrame_SetStatusText(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -883,7 +887,7 @@ static PyObject *_wrap_wxFrame_SetTitle(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1151,7 +1155,7 @@ static PyObject *_wrap_new_wxMiniFrame(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1320,6 +1324,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDataObject","_wxDataObject",0}, { "_wxStaticLine","_class_wxStaticLine",0}, { "_wxBrush","_class_wxBrush",0}, + { "_wxToggleButton","_class_wxToggleButton",0}, { "_wxMiniFrame","_class_wxMiniFrame",0}, { "_wxDataFormat","_class_wxDataFormat",0}, { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, @@ -1541,6 +1546,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, + { "_class_wxToggleButton","_wxToggleButton",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxShowEvent","_wxShowEvent",0}, diff --git a/wxPython/src/msw/gdi.cpp b/wxPython/src/msw/gdi.cpp index c9e747215c..99647881d8 100644 --- a/wxPython/src/msw/gdi.cpp +++ b/wxPython/src/msw/gdi.cpp @@ -108,7 +108,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif static wxString wxPyEmptyStr(""); // Implementations of some alternate "constructors" @@ -549,7 +553,7 @@ static PyObject *_wrap_wxNamedColour(PyObject *self, PyObject *args, PyObject *k #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -1322,7 +1326,7 @@ static PyObject *_wrap_new_wxBitmap(PyObject *self, PyObject *args, PyObject *kw #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -1475,7 +1479,7 @@ static PyObject *_wrap_wxBitmap_LoadFile(PyObject *self, PyObject *args, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1529,7 +1533,7 @@ static PyObject *_wrap_wxBitmap_SaveFile(PyObject *self, PyObject *args, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2161,7 +2165,7 @@ static PyObject *_wrap_new_wxIcon(PyObject *self, PyObject *args, PyObject *kwar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -2246,7 +2250,7 @@ static PyObject *_wrap_wxIcon_LoadFile(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2610,7 +2614,7 @@ static PyObject *_wrap_new_wxCursor(PyObject *self, PyObject *args, PyObject *kw #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -3282,7 +3286,7 @@ static PyObject *_wrap_wxFont_SetFaceName(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -3937,7 +3941,7 @@ static PyObject *_wrap_wxColourDatabase_FindColour(PyObject *self, PyObject *arg #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -4038,7 +4042,7 @@ static PyObject *_wrap_wxColourDatabase_Append(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5781,7 +5785,7 @@ static PyObject *_wrap_wxDC_DrawRotatedText(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5910,7 +5914,7 @@ static PyObject *_wrap_wxDC_DrawText(PyObject *self, PyObject *args, PyObject *k #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -6659,7 +6663,7 @@ static PyObject *_wrap_wxDC_GetTextExtent(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -6742,7 +6746,7 @@ static PyObject *_wrap_wxDC_GetFullTextExtent(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -7632,7 +7636,7 @@ static PyObject *_wrap_wxDC_StartDoc(PyObject *self, PyObject *args, PyObject *k #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -8399,7 +8403,7 @@ static PyObject *_wrap_new_wxMetaFileDC(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) diff --git a/wxPython/src/msw/grid.cpp b/wxPython/src/msw/grid.cpp index b78053e68d..aacc18c923 100644 --- a/wxPython/src/msw/grid.cpp +++ b/wxPython/src/msw/grid.cpp @@ -104,7 +104,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif #define PYCALLBACK_GCA_INTINT(PCLASS, CBNAME) \ wxGridCellAttr* CBNAME(int a, int b) { \ @@ -889,7 +893,7 @@ static PyObject *_wrap_wxGridCellRenderer_SetParameters(PyObject *self, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1223,7 +1227,7 @@ static PyObject *_wrap_wxPyGridCellRenderer_base_SetParameters(PyObject *self, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1631,7 +1635,7 @@ static PyObject *_wrap_wxGridCellEditor_SetParameters(PyObject *self, PyObject * #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2549,7 +2553,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_SetParameters(PyObject *self, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -4332,7 +4336,7 @@ static PyObject *_wrap_wxGridTableBase_SetValue(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -4420,7 +4424,7 @@ static PyObject *_wrap_wxGridTableBase_CanGetValueAs(PyObject *self, PyObject *a #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -4473,7 +4477,7 @@ static PyObject *_wrap_wxGridTableBase_CanSetValueAs(PyObject *self, PyObject *a #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -4968,7 +4972,7 @@ static PyObject *_wrap_wxGridTableBase_SetRowLabelValue(PyObject *self, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -5020,7 +5024,7 @@ static PyObject *_wrap_wxGridTableBase_SetColLabelValue(PyObject *self, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -5380,7 +5384,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_CanGetValueAs(PyObject *self, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -5433,7 +5437,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_CanSetValueAs(PyObject *self, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -5749,7 +5753,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_SetRowLabelValue(PyObject *self, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -5801,7 +5805,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_SetColLabelValue(PyObject *self, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -7211,7 +7215,7 @@ static PyObject *_wrap_wxGrid_DrawTextRectangle(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -7269,7 +7273,7 @@ static PyObject *_wrap_wxGrid_StringToLines(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -9031,7 +9035,7 @@ static PyObject *_wrap_wxGrid_SetRowLabelValue(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -9083,7 +9087,7 @@ static PyObject *_wrap_wxGrid_SetColLabelValue(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -9617,7 +9621,7 @@ static PyObject *_wrap_wxGrid_SetColFormatCustom(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -11036,7 +11040,7 @@ static PyObject *_wrap_wxGrid_SetCellValue(PyObject *self, PyObject *args, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -11531,7 +11535,7 @@ static PyObject *_wrap_wxGrid_RegisterDataType(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -11670,7 +11674,7 @@ static PyObject *_wrap_wxGrid_GetDefaultEditorForType(PyObject *self, PyObject * #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -11728,7 +11732,7 @@ static PyObject *_wrap_wxGrid_GetDefaultRendererForType(PyObject *self, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -13198,6 +13202,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDataObject","_wxDataObject",0}, { "_wxStaticLine","_class_wxStaticLine",0}, { "_wxBrush","_class_wxBrush",0}, + { "_wxToggleButton","_class_wxToggleButton",0}, { "_class_wxGridTableMessage","_wxGridTableMessage",0}, { "_wxDataFormat","_class_wxDataFormat",0}, { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, @@ -13522,6 +13527,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, + { "_class_wxToggleButton","_wxToggleButton",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxShowEvent","_wxShowEvent",0}, { "_wxPyDropTarget","_class_wxPyDropTarget",0}, diff --git a/wxPython/src/msw/html.cpp b/wxPython/src/msw/html.cpp index 4f7ef1c2b6..a31bf87815 100644 --- a/wxPython/src/msw/html.cpp +++ b/wxPython/src/msw/html.cpp @@ -111,7 +111,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif class wxPyHtmlTagHandler : public wxHtmlTagHandler { public: @@ -309,7 +313,7 @@ static PyObject *_wrap_new_wxHtmlLinkInfo(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -328,7 +332,7 @@ static PyObject *_wrap_new_wxHtmlLinkInfo(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -497,6 +501,78 @@ static PyObject *_wrap_wxHtmlLinkInfo_GetHtmlCell(PyObject *self, PyObject *args return _resultobj; } +#define wxHtmlLinkInfo_SetEvent(_swigobj,_swigarg0) (_swigobj->SetEvent(_swigarg0)) +static PyObject *_wrap_wxHtmlLinkInfo_SetEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlLinkInfo * _arg0; + wxMouseEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","e", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlLinkInfo_SetEvent",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlLinkInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlLinkInfo_SetEvent. Expected _wxHtmlLinkInfo_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlLinkInfo_SetEvent. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlLinkInfo_SetEvent(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlLinkInfo_SetHtmlCell(_swigobj,_swigarg0) (_swigobj->SetHtmlCell(_swigarg0)) +static PyObject *_wrap_wxHtmlLinkInfo_SetHtmlCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlLinkInfo * _arg0; + wxHtmlCell * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","e", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlLinkInfo_SetHtmlCell",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlLinkInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlLinkInfo_SetHtmlCell. Expected _wxHtmlLinkInfo_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlLinkInfo_SetHtmlCell. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlLinkInfo_SetHtmlCell(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxHtmlTag_GetName(_swigobj) (_swigobj->GetName()) static PyObject *_wrap_wxHtmlTag_GetName(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -553,7 +629,7 @@ static PyObject *_wrap_wxHtmlTag_HasParam(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -605,7 +681,7 @@ static PyObject *_wrap_wxHtmlTag_GetParam(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -899,7 +975,7 @@ static PyObject *_wrap_wxHtmlParser_Parse(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -955,7 +1031,7 @@ static PyObject *_wrap_wxHtmlParser_InitParser(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1136,7 +1212,7 @@ static PyObject *_wrap_wxHtmlParser_PushTagHandler(PyObject *self, PyObject *arg #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1424,7 +1500,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetFonts(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1442,7 +1518,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetFonts(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -2115,7 +2191,7 @@ static PyObject *_wrap_wxHtmlWinParser_SetLink(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -3768,148 +3844,6 @@ static PyObject *_wrap_new_wxHtmlWidgetCell(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define new_HtmlHistoryItem(_swigarg0,_swigarg1) (new HtmlHistoryItem(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_HtmlHistoryItem(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - HtmlHistoryItem * _result; - char * _arg0; - char * _arg1; - char *_kwnames[] = { "p","a", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"ss:new_HtmlHistoryItem",_kwnames,&_arg0,&_arg1)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (HtmlHistoryItem *)new_HtmlHistoryItem(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_HtmlHistoryItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define HtmlHistoryItem_GetPos(_swigobj) (_swigobj->GetPos()) -static PyObject *_wrap_HtmlHistoryItem_GetPos(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - HtmlHistoryItem * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:HtmlHistoryItem_GetPos",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_HtmlHistoryItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of HtmlHistoryItem_GetPos. Expected _HtmlHistoryItem_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )HtmlHistoryItem_GetPos(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define HtmlHistoryItem_SetPos(_swigobj,_swigarg0) (_swigobj->SetPos(_swigarg0)) -static PyObject *_wrap_HtmlHistoryItem_SetPos(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - HtmlHistoryItem * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","p", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:HtmlHistoryItem_SetPos",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_HtmlHistoryItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of HtmlHistoryItem_SetPos. Expected _HtmlHistoryItem_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - HtmlHistoryItem_SetPos(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define HtmlHistoryItem_GetPage(_swigobj) (_swigobj->GetPage()) -static PyObject *_wrap_HtmlHistoryItem_GetPage(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - HtmlHistoryItem * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:HtmlHistoryItem_GetPage",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_HtmlHistoryItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of HtmlHistoryItem_GetPage. Expected _HtmlHistoryItem_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - const wxString & _result_ref = HtmlHistoryItem_GetPage(_arg0); - _result = (wxString *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} - return _resultobj; -} - -#define HtmlHistoryItem_GetAnchor(_swigobj) (_swigobj->GetAnchor()) -static PyObject *_wrap_HtmlHistoryItem_GetAnchor(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - HtmlHistoryItem * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:HtmlHistoryItem_GetAnchor",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_HtmlHistoryItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of HtmlHistoryItem_GetAnchor. Expected _HtmlHistoryItem_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - const wxString & _result_ref = HtmlHistoryItem_GetAnchor(_arg0); - _result = (wxString *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} - return _resultobj; -} - static void *SwigwxPyHtmlWindowTowxScrolledWindow(void *ptr) { wxPyHtmlWindow *src; wxScrolledWindow *dest; @@ -4039,12 +3973,13 @@ static PyObject *_wrap_wxHtmlWindow_SetPage(PyObject *self, PyObject *args, PyOb PyObject * _resultobj; bool _result; wxPyHtmlWindow * _arg0; - char * _arg1; + wxString * _arg1; PyObject * _argo0 = 0; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","source", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxHtmlWindow_SetPage",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWindow_SetPage",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4053,12 +3988,34 @@ static PyObject *_wrap_wxHtmlWindow_SetPage(PyObject *self, PyObject *args, PyOb return NULL; } } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxHtmlWindow_SetPage(_arg0,_arg1); + _result = (bool )wxHtmlWindow_SetPage(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} return _resultobj; } @@ -4067,12 +4024,13 @@ static PyObject *_wrap_wxHtmlWindow_LoadPage(PyObject *self, PyObject *args, PyO PyObject * _resultobj; bool _result; wxPyHtmlWindow * _arg0; - char * _arg1; + wxString * _arg1; PyObject * _argo0 = 0; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","location", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxHtmlWindow_LoadPage",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWindow_LoadPage",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4081,12 +4039,34 @@ static PyObject *_wrap_wxHtmlWindow_LoadPage(PyObject *self, PyObject *args, PyO return NULL; } } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxHtmlWindow_LoadPage(_arg0,_arg1); + _result = (bool )wxHtmlWindow_LoadPage(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} return _resultobj; } @@ -4122,6 +4102,70 @@ static PyObject *_wrap_wxHtmlWindow_GetOpenedPage(PyObject *self, PyObject *args return _resultobj; } +#define wxHtmlWindow_GetOpenedAnchor(_swigobj) (_swigobj->GetOpenedAnchor()) +static PyObject *_wrap_wxHtmlWindow_GetOpenedAnchor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyHtmlWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWindow_GetOpenedAnchor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_GetOpenedAnchor. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxHtmlWindow_GetOpenedAnchor(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxHtmlWindow_GetOpenedPageTitle(_swigobj) (_swigobj->GetOpenedPageTitle()) +static PyObject *_wrap_wxHtmlWindow_GetOpenedPageTitle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyHtmlWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWindow_GetOpenedPageTitle",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_GetOpenedPageTitle. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxHtmlWindow_GetOpenedPageTitle(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + #define wxHtmlWindow_SetRelatedFrame(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRelatedFrame(_swigarg0,_swigarg1)) static PyObject *_wrap_wxHtmlWindow_SetRelatedFrame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4254,7 +4298,7 @@ static PyObject *_wrap_wxHtmlWindow_SetFonts(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -4272,7 +4316,7 @@ static PyObject *_wrap_wxHtmlWindow_SetFonts(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -4311,12 +4355,13 @@ static PyObject *_wrap_wxHtmlWindow_SetFonts(PyObject *self, PyObject *args, PyO static PyObject *_wrap_wxHtmlWindow_SetTitle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyHtmlWindow * _arg0; - char * _arg1; + wxString * _arg1; PyObject * _argo0 = 0; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","title", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxHtmlWindow_SetTitle",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWindow_SetTitle",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4325,13 +4370,35 @@ static PyObject *_wrap_wxHtmlWindow_SetTitle(PyObject *self, PyObject *args, PyO return NULL; } } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} { wxPy_BEGIN_ALLOW_THREADS; - wxHtmlWindow_SetTitle(_arg0,_arg1); + wxHtmlWindow_SetTitle(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} return _resultobj; } @@ -4368,13 +4435,14 @@ static PyObject *_wrap_wxHtmlWindow_ReadCustomization(PyObject *self, PyObject * PyObject * _resultobj; wxPyHtmlWindow * _arg0; wxConfigBase * _arg1; - char * _arg2 = (char *) ""; + wxString * _arg2 = (wxString *) &wxEmptyString; PyObject * _argo0 = 0; PyObject * _argo1 = 0; + PyObject * _obj2 = 0; char *_kwnames[] = { "self","cfg","path", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|s:wxHtmlWindow_ReadCustomization",_kwnames,&_argo0,&_argo1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxHtmlWindow_ReadCustomization",_kwnames,&_argo0,&_argo1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4390,13 +4458,36 @@ static PyObject *_wrap_wxHtmlWindow_ReadCustomization(PyObject *self, PyObject * return NULL; } } + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} { wxPy_BEGIN_ALLOW_THREADS; - wxHtmlWindow_ReadCustomization(_arg0,_arg1,_arg2); + wxHtmlWindow_ReadCustomization(_arg0,_arg1,*_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} return _resultobj; } @@ -4405,13 +4496,14 @@ static PyObject *_wrap_wxHtmlWindow_WriteCustomization(PyObject *self, PyObject PyObject * _resultobj; wxPyHtmlWindow * _arg0; wxConfigBase * _arg1; - char * _arg2 = (char *) ""; + wxString * _arg2 = (wxString *) &wxEmptyString; PyObject * _argo0 = 0; PyObject * _argo1 = 0; + PyObject * _obj2 = 0; char *_kwnames[] = { "self","cfg","path", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|s:wxHtmlWindow_WriteCustomization",_kwnames,&_argo0,&_argo1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxHtmlWindow_WriteCustomization",_kwnames,&_argo0,&_argo1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4427,13 +4519,36 @@ static PyObject *_wrap_wxHtmlWindow_WriteCustomization(PyObject *self, PyObject return NULL; } } + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} { wxPy_BEGIN_ALLOW_THREADS; - wxHtmlWindow_WriteCustomization(_arg0,_arg1,_arg2); + wxHtmlWindow_WriteCustomization(_arg0,_arg1,*_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} return _resultobj; } @@ -4491,6 +4606,60 @@ static PyObject *_wrap_wxHtmlWindow_HistoryForward(PyObject *self, PyObject *arg return _resultobj; } +#define wxHtmlWindow_HistoryCanBack(_swigobj) (_swigobj->HistoryCanBack()) +static PyObject *_wrap_wxHtmlWindow_HistoryCanBack(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyHtmlWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWindow_HistoryCanBack",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_HistoryCanBack. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlWindow_HistoryCanBack(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlWindow_HistoryCanForward(_swigobj) (_swigobj->HistoryCanForward()) +static PyObject *_wrap_wxHtmlWindow_HistoryCanForward(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyHtmlWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWindow_HistoryCanForward",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_HistoryCanForward. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlWindow_HistoryCanForward(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxHtmlWindow_HistoryClear(_swigobj) (_swigobj->HistoryClear()) static PyObject *_wrap_wxHtmlWindow_HistoryClear(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4795,7 +4964,7 @@ static PyObject *_wrap_wxHtmlDCRenderer_SetHtmlText(PyObject *self, PyObject *ar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -4814,7 +4983,7 @@ static PyObject *_wrap_wxHtmlDCRenderer_SetHtmlText(PyObject *self, PyObject *ar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -4966,7 +5135,7 @@ static PyObject *_wrap_wxHtmlPrintout_SetHtmlText(PyObject *self, PyObject *args #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -4985,7 +5154,7 @@ static PyObject *_wrap_wxHtmlPrintout_SetHtmlText(PyObject *self, PyObject *args #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -5041,7 +5210,7 @@ static PyObject *_wrap_wxHtmlPrintout_SetHtmlFile(PyObject *self, PyObject *args #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5093,7 +5262,7 @@ static PyObject *_wrap_wxHtmlPrintout_SetHeader(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5145,7 +5314,7 @@ static PyObject *_wrap_wxHtmlPrintout_SetFooter(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5290,7 +5459,7 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PreviewFile(PyObject *self, PyObject * #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5343,7 +5512,7 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PreviewText(PyObject *self, PyObject * #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5362,7 +5531,7 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PreviewText(PyObject *self, PyObject * #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -5417,7 +5586,7 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PrintFile(PyObject *self, PyObject *ar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5470,7 +5639,7 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PrintText(PyObject *self, PyObject *ar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5489,7 +5658,7 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PrintText(PyObject *self, PyObject *ar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -5599,7 +5768,7 @@ static PyObject *_wrap_wxHtmlEasyPrinting_SetHeader(PyObject *self, PyObject *ar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5651,7 +5820,7 @@ static PyObject *_wrap_wxHtmlEasyPrinting_SetFooter(PyObject *self, PyObject *ar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5778,6 +5947,8 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlWindow_GetParser", (PyCFunction) _wrap_wxHtmlWindow_GetParser, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_GetInternalRepresentation", (PyCFunction) _wrap_wxHtmlWindow_GetInternalRepresentation, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_HistoryClear", (PyCFunction) _wrap_wxHtmlWindow_HistoryClear, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_HistoryCanForward", (PyCFunction) _wrap_wxHtmlWindow_HistoryCanForward, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_HistoryCanBack", (PyCFunction) _wrap_wxHtmlWindow_HistoryCanBack, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_HistoryForward", (PyCFunction) _wrap_wxHtmlWindow_HistoryForward, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_HistoryBack", (PyCFunction) _wrap_wxHtmlWindow_HistoryBack, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_WriteCustomization", (PyCFunction) _wrap_wxHtmlWindow_WriteCustomization, METH_VARARGS | METH_KEYWORDS }, @@ -5788,16 +5959,13 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlWindow_SetRelatedStatusBar", (PyCFunction) _wrap_wxHtmlWindow_SetRelatedStatusBar, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_GetRelatedFrame", (PyCFunction) _wrap_wxHtmlWindow_GetRelatedFrame, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_SetRelatedFrame", (PyCFunction) _wrap_wxHtmlWindow_SetRelatedFrame, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_GetOpenedPageTitle", (PyCFunction) _wrap_wxHtmlWindow_GetOpenedPageTitle, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_GetOpenedAnchor", (PyCFunction) _wrap_wxHtmlWindow_GetOpenedAnchor, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_GetOpenedPage", (PyCFunction) _wrap_wxHtmlWindow_GetOpenedPage, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_LoadPage", (PyCFunction) _wrap_wxHtmlWindow_LoadPage, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_SetPage", (PyCFunction) _wrap_wxHtmlWindow_SetPage, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow__setSelf", (PyCFunction) _wrap_wxHtmlWindow__setSelf, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlWindow", (PyCFunction) _wrap_new_wxHtmlWindow, METH_VARARGS | METH_KEYWORDS }, - { "HtmlHistoryItem_GetAnchor", (PyCFunction) _wrap_HtmlHistoryItem_GetAnchor, METH_VARARGS | METH_KEYWORDS }, - { "HtmlHistoryItem_GetPage", (PyCFunction) _wrap_HtmlHistoryItem_GetPage, METH_VARARGS | METH_KEYWORDS }, - { "HtmlHistoryItem_SetPos", (PyCFunction) _wrap_HtmlHistoryItem_SetPos, METH_VARARGS | METH_KEYWORDS }, - { "HtmlHistoryItem_GetPos", (PyCFunction) _wrap_HtmlHistoryItem_GetPos, METH_VARARGS | METH_KEYWORDS }, - { "new_HtmlHistoryItem", (PyCFunction) _wrap_new_HtmlHistoryItem, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlWidgetCell", (PyCFunction) _wrap_new_wxHtmlWidgetCell, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlColourCell", (PyCFunction) _wrap_new_wxHtmlColourCell, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContainerCell_GetFirstCell", (PyCFunction) _wrap_wxHtmlContainerCell_GetFirstCell, METH_VARARGS | METH_KEYWORDS }, @@ -5894,6 +6062,8 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlTag_GetParam", (PyCFunction) _wrap_wxHtmlTag_GetParam, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlTag_HasParam", (PyCFunction) _wrap_wxHtmlTag_HasParam, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlTag_GetName", (PyCFunction) _wrap_wxHtmlTag_GetName, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlLinkInfo_SetHtmlCell", (PyCFunction) _wrap_wxHtmlLinkInfo_SetHtmlCell, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlLinkInfo_SetEvent", (PyCFunction) _wrap_wxHtmlLinkInfo_SetEvent, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlLinkInfo_GetHtmlCell", (PyCFunction) _wrap_wxHtmlLinkInfo_GetHtmlCell, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlLinkInfo_GetEvent", (PyCFunction) _wrap_wxHtmlLinkInfo_GetEvent, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlLinkInfo_GetTarget", (PyCFunction) _wrap_wxHtmlLinkInfo_GetTarget, METH_VARARGS | METH_KEYWORDS }, @@ -5941,7 +6111,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, - { "_class_HtmlHistoryItem","_HtmlHistoryItem",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, { "_class_wxMenuBar","_wxMenuBar",0}, @@ -6063,6 +6232,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0}, { "_class_wxHtmlPrintout","_wxHtmlPrintout",0}, { "_wxBrush","_class_wxBrush",0}, + { "_wxToggleButton","_class_wxToggleButton",0}, { "_wxMiniFrame","_class_wxMiniFrame",0}, { "_class_wxNotebookEvent","_wxNotebookEvent",0}, { "_class_wxPyPrintout","_class_wxHtmlPrintout",SwigwxHtmlPrintoutTowxPyPrintout}, @@ -6426,6 +6596,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, { "_class_wxTipProvider","_wxTipProvider",0}, + { "_class_wxToggleButton","_wxToggleButton",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, @@ -6457,7 +6628,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyHtmlWinTagHandler","_wxPyHtmlWinTagHandler",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, { "_class_wxLogNull","_wxLogNull",0}, - { "_HtmlHistoryItem","_class_HtmlHistoryItem",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, diff --git a/wxPython/src/msw/html.py b/wxPython/src/msw/html.py index 27fd7f1071..de3a8c5792 100644 --- a/wxPython/src/msw/html.py +++ b/wxPython/src/msw/html.py @@ -59,6 +59,12 @@ class wxHtmlLinkInfoPtr : val = apply(htmlc.wxHtmlLinkInfo_GetHtmlCell,(self,) + _args, _kwargs) if val: val = wxHtmlCellPtr(val) return val + def SetEvent(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlLinkInfo_SetEvent,(self,) + _args, _kwargs) + return val + def SetHtmlCell(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlLinkInfo_SetHtmlCell,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxHtmlLinkInfo(wxHtmlLinkInfoPtr): @@ -480,32 +486,6 @@ class wxHtmlWidgetCell(wxHtmlWidgetCellPtr): -class HtmlHistoryItemPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetPos(self, *_args, **_kwargs): - val = apply(htmlc.HtmlHistoryItem_GetPos,(self,) + _args, _kwargs) - return val - def SetPos(self, *_args, **_kwargs): - val = apply(htmlc.HtmlHistoryItem_SetPos,(self,) + _args, _kwargs) - return val - def GetPage(self, *_args, **_kwargs): - val = apply(htmlc.HtmlHistoryItem_GetPage,(self,) + _args, _kwargs) - return val - def GetAnchor(self, *_args, **_kwargs): - val = apply(htmlc.HtmlHistoryItem_GetAnchor,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class HtmlHistoryItem(HtmlHistoryItemPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(htmlc.new_HtmlHistoryItem,_args,_kwargs) - self.thisown = 1 - - - - class wxHtmlWindowPtr(wxScrolledWindowPtr): def __init__(self,this): self.this = this @@ -522,6 +502,12 @@ class wxHtmlWindowPtr(wxScrolledWindowPtr): def GetOpenedPage(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWindow_GetOpenedPage,(self,) + _args, _kwargs) return val + def GetOpenedAnchor(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow_GetOpenedAnchor,(self,) + _args, _kwargs) + return val + def GetOpenedPageTitle(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow_GetOpenedPageTitle,(self,) + _args, _kwargs) + return val def SetRelatedFrame(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWindow_SetRelatedFrame,(self,) + _args, _kwargs) return val @@ -553,6 +539,12 @@ class wxHtmlWindowPtr(wxScrolledWindowPtr): def HistoryForward(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWindow_HistoryForward,(self,) + _args, _kwargs) return val + def HistoryCanBack(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow_HistoryCanBack,(self,) + _args, _kwargs) + return val + def HistoryCanForward(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow_HistoryCanForward,(self,) + _args, _kwargs) + return val def HistoryClear(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWindow_HistoryClear,(self,) + _args, _kwargs) return val @@ -742,6 +734,6 @@ wx.wxHtmlWinTagHandlerPtr = wxHtmlWinTagHandlerPtr wx.wxHtmlCellPtr = wxHtmlCellPtr wx.wxHtmlContainerCellPtr = wxHtmlContainerCellPtr wx.wxHtmlWidgetCellPtr = wxHtmlWidgetCellPtr -wx.HtmlHistoryItemPtr = HtmlHistoryItemPtr wx.wxHtmlWindowPtr = wxHtmlWindowPtr wx.wxHtmlLinkInfoPtr = wxHtmlLinkInfoPtr + diff --git a/wxPython/src/msw/htmlhelp.cpp b/wxPython/src/msw/htmlhelp.cpp index 78156bd7e4..2deb42701e 100644 --- a/wxPython/src/msw/htmlhelp.cpp +++ b/wxPython/src/msw/htmlhelp.cpp @@ -109,7 +109,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif #ifdef __cplusplus extern "C" { #endif @@ -490,7 +494,7 @@ static PyObject *_wrap_new_wxHtmlBookRecord(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -508,7 +512,7 @@ static PyObject *_wrap_new_wxHtmlBookRecord(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -526,7 +530,7 @@ static PyObject *_wrap_new_wxHtmlBookRecord(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1300,7 +1304,7 @@ static PyObject *_wrap_wxHtmlHelpData_SetTempDir(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1352,7 +1356,7 @@ static PyObject *_wrap_wxHtmlHelpData_AddBook(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1403,7 +1407,7 @@ static PyObject *_wrap_wxHtmlHelpData_FindPageByName(PyObject *self, PyObject *a #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1679,7 +1683,7 @@ static PyObject *_wrap_new_wxHtmlHelpFrame(PyObject *self, PyObject *args, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1776,7 +1780,7 @@ static PyObject *_wrap_wxHtmlHelpFrame_SetTitleFormat(PyObject *self, PyObject * #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1827,7 +1831,7 @@ static PyObject *_wrap_wxHtmlHelpFrame_Display(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1961,7 +1965,7 @@ static PyObject *_wrap_wxHtmlHelpFrame_KeywordSearch(PyObject *self, PyObject *a #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2021,7 +2025,7 @@ static PyObject *_wrap_wxHtmlHelpFrame_UseConfig(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -2082,7 +2086,7 @@ static PyObject *_wrap_wxHtmlHelpFrame_ReadCustomization(PyObject *self, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -2143,7 +2147,7 @@ static PyObject *_wrap_wxHtmlHelpFrame_WriteCustomization(PyObject *self, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -2179,19 +2183,20 @@ static void *SwigwxHtmlHelpControllerTowxEvtHandler(void *ptr) { return (void *) dest; } -#define new_wxHtmlHelpController() (new wxHtmlHelpController()) +#define new_wxHtmlHelpController(_swigarg0) (new wxHtmlHelpController(_swigarg0)) static PyObject *_wrap_new_wxHtmlHelpController(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxHtmlHelpController * _result; - char *_kwnames[] = { NULL }; + int _arg0 = (int ) (wxHF_DEFAULTSTYLE); + char *_kwnames[] = { "style", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxHtmlHelpController",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:new_wxHtmlHelpController",_kwnames,&_arg0)) return NULL; { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxHtmlHelpController *)new_wxHtmlHelpController(); + _result = (wxHtmlHelpController *)new_wxHtmlHelpController(_arg0); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -2254,7 +2259,7 @@ static PyObject *_wrap_wxHtmlHelpController_SetTitleFormat(PyObject *self, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2305,7 +2310,7 @@ static PyObject *_wrap_wxHtmlHelpController_SetTempDir(PyObject *self, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2358,7 +2363,7 @@ static PyObject *_wrap_wxHtmlHelpController_AddBook(PyObject *self, PyObject *ar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2408,7 +2413,7 @@ static PyObject *_wrap_wxHtmlHelpController_Display(PyObject *self, PyObject *ar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2542,7 +2547,7 @@ static PyObject *_wrap_wxHtmlHelpController_KeywordSearch(PyObject *self, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2602,7 +2607,7 @@ static PyObject *_wrap_wxHtmlHelpController_UseConfig(PyObject *self, PyObject * #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -2663,7 +2668,7 @@ static PyObject *_wrap_wxHtmlHelpController_ReadCustomization(PyObject *self, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -2724,7 +2729,7 @@ static PyObject *_wrap_wxHtmlHelpController_WriteCustomization(PyObject *self, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -2897,7 +2902,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, - { "_class_HtmlHistoryItem","_HtmlHistoryItem",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, { "_class_wxMenuBar","_wxMenuBar",0}, @@ -3019,6 +3023,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0}, { "_class_wxHtmlPrintout","_wxHtmlPrintout",0}, { "_wxBrush","_class_wxBrush",0}, + { "_wxToggleButton","_class_wxToggleButton",0}, { "_wxMiniFrame","_class_wxMiniFrame",0}, { "_class_wxNotebookEvent","_wxNotebookEvent",0}, { "_class_wxPyPrintout","_wxPyPrintout",0}, @@ -3371,6 +3376,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, { "_class_wxTipProvider","_wxTipProvider",0}, + { "_class_wxToggleButton","_wxToggleButton",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, @@ -3401,7 +3407,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyHtmlWinTagHandler","_wxPyHtmlWinTagHandler",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, { "_class_wxLogNull","_wxLogNull",0}, - { "_HtmlHistoryItem","_class_HtmlHistoryItem",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, @@ -3461,19 +3466,15 @@ SWIGEXPORT(void) inithtmlhelpc() { SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("htmlhelpc", htmlhelpcMethods); d = PyModule_GetDict(m); - PyDict_SetItemString(d,"wxID_HTML_PANEL", PyInt_FromLong((long) wxID_HTML_PANEL)); - PyDict_SetItemString(d,"wxID_HTML_BACK", PyInt_FromLong((long) wxID_HTML_BACK)); - PyDict_SetItemString(d,"wxID_HTML_FORWARD", PyInt_FromLong((long) wxID_HTML_FORWARD)); - PyDict_SetItemString(d,"wxID_HTML_TREECTRL", PyInt_FromLong((long) wxID_HTML_TREECTRL)); - PyDict_SetItemString(d,"wxID_HTML_INDEXPAGE", PyInt_FromLong((long) wxID_HTML_INDEXPAGE)); - PyDict_SetItemString(d,"wxID_HTML_INDEXLIST", PyInt_FromLong((long) wxID_HTML_INDEXLIST)); - PyDict_SetItemString(d,"wxID_HTML_NOTEBOOK", PyInt_FromLong((long) wxID_HTML_NOTEBOOK)); - PyDict_SetItemString(d,"wxID_HTML_SEARCHPAGE", PyInt_FromLong((long) wxID_HTML_SEARCHPAGE)); - PyDict_SetItemString(d,"wxID_HTML_SEARCHTEXT", PyInt_FromLong((long) wxID_HTML_SEARCHTEXT)); - PyDict_SetItemString(d,"wxID_HTML_SEARCHLIST", PyInt_FromLong((long) wxID_HTML_SEARCHLIST)); - PyDict_SetItemString(d,"wxID_HTML_SEARCHBUTTON", PyInt_FromLong((long) wxID_HTML_SEARCHBUTTON)); - PyDict_SetItemString(d,"wxID_HTML_SEARCHCHOICE", PyInt_FromLong((long) wxID_HTML_SEARCHCHOICE)); - PyDict_SetItemString(d,"wxID_HTML_HELPFRAME", PyInt_FromLong((long) wxID_HTML_HELPFRAME)); + PyDict_SetItemString(d,"wxHF_TOOLBAR", PyInt_FromLong((long) wxHF_TOOLBAR)); + PyDict_SetItemString(d,"wxHF_FLATTOOLBAR", PyInt_FromLong((long) wxHF_FLATTOOLBAR)); + PyDict_SetItemString(d,"wxHF_CONTENTS", PyInt_FromLong((long) wxHF_CONTENTS)); + PyDict_SetItemString(d,"wxHF_INDEX", PyInt_FromLong((long) wxHF_INDEX)); + PyDict_SetItemString(d,"wxHF_SEARCH", PyInt_FromLong((long) wxHF_SEARCH)); + PyDict_SetItemString(d,"wxHF_BOOKMARKS", PyInt_FromLong((long) wxHF_BOOKMARKS)); + PyDict_SetItemString(d,"wxHF_OPENFILES", PyInt_FromLong((long) wxHF_OPENFILES)); + PyDict_SetItemString(d,"wxHF_PRINT", PyInt_FromLong((long) wxHF_PRINT)); + PyDict_SetItemString(d,"wxHF_DEFAULTSTYLE", PyInt_FromLong((long) wxHF_DEFAULTSTYLE)); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/msw/htmlhelp.py b/wxPython/src/msw/htmlhelp.py index 848ed85489..ebf6df5f8c 100644 --- a/wxPython/src/msw/htmlhelp.py +++ b/wxPython/src/msw/htmlhelp.py @@ -347,16 +347,12 @@ class wxHtmlHelpController(wxHtmlHelpControllerPtr): #-------------- VARIABLE WRAPPERS ------------------ -wxID_HTML_PANEL = htmlhelpc.wxID_HTML_PANEL -wxID_HTML_BACK = htmlhelpc.wxID_HTML_BACK -wxID_HTML_FORWARD = htmlhelpc.wxID_HTML_FORWARD -wxID_HTML_TREECTRL = htmlhelpc.wxID_HTML_TREECTRL -wxID_HTML_INDEXPAGE = htmlhelpc.wxID_HTML_INDEXPAGE -wxID_HTML_INDEXLIST = htmlhelpc.wxID_HTML_INDEXLIST -wxID_HTML_NOTEBOOK = htmlhelpc.wxID_HTML_NOTEBOOK -wxID_HTML_SEARCHPAGE = htmlhelpc.wxID_HTML_SEARCHPAGE -wxID_HTML_SEARCHTEXT = htmlhelpc.wxID_HTML_SEARCHTEXT -wxID_HTML_SEARCHLIST = htmlhelpc.wxID_HTML_SEARCHLIST -wxID_HTML_SEARCHBUTTON = htmlhelpc.wxID_HTML_SEARCHBUTTON -wxID_HTML_SEARCHCHOICE = htmlhelpc.wxID_HTML_SEARCHCHOICE -wxID_HTML_HELPFRAME = htmlhelpc.wxID_HTML_HELPFRAME +wxHF_TOOLBAR = htmlhelpc.wxHF_TOOLBAR +wxHF_FLATTOOLBAR = htmlhelpc.wxHF_FLATTOOLBAR +wxHF_CONTENTS = htmlhelpc.wxHF_CONTENTS +wxHF_INDEX = htmlhelpc.wxHF_INDEX +wxHF_SEARCH = htmlhelpc.wxHF_SEARCH +wxHF_BOOKMARKS = htmlhelpc.wxHF_BOOKMARKS +wxHF_OPENFILES = htmlhelpc.wxHF_OPENFILES +wxHF_PRINT = htmlhelpc.wxHF_PRINT +wxHF_DEFAULTSTYLE = htmlhelpc.wxHF_DEFAULTSTYLE diff --git a/wxPython/src/msw/image.cpp b/wxPython/src/msw/image.cpp index f624b68718..ec14d9e611 100644 --- a/wxPython/src/msw/image.cpp +++ b/wxPython/src/msw/image.cpp @@ -104,7 +104,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif wxImage* wxEmptyImage(int width=0, int height=0) { if (width == 0 && height == 0) @@ -176,7 +180,7 @@ static PyObject *_wrap_wxImageFromMime(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -194,7 +198,7 @@ static PyObject *_wrap_wxImageFromMime(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -476,7 +480,7 @@ static PyObject *_wrap_wxImageHandler_SetName(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -527,7 +531,7 @@ static PyObject *_wrap_wxImageHandler_SetExtension(PyObject *self, PyObject *arg #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -606,7 +610,7 @@ static PyObject *_wrap_wxImageHandler_SetMimeType(PyObject *self, PyObject *args #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -882,7 +886,7 @@ static PyObject *_wrap_new_wxImage(PyObject *self, PyObject *args, PyObject *kwa #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -1228,7 +1232,7 @@ static PyObject *_wrap_wxImage_CanRead(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -1280,7 +1284,7 @@ static PyObject *_wrap_wxImage_LoadFile(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1333,7 +1337,7 @@ static PyObject *_wrap_wxImage_LoadMimeFile(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1351,7 +1355,7 @@ static PyObject *_wrap_wxImage_LoadMimeFile(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1407,7 +1411,7 @@ static PyObject *_wrap_wxImage_SaveFile(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1460,7 +1464,7 @@ static PyObject *_wrap_wxImage_SaveMimeFile(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1478,7 +1482,7 @@ static PyObject *_wrap_wxImage_SaveMimeFile(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -2180,7 +2184,7 @@ static PyObject *_wrap_wxImage_RemoveHandler(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) diff --git a/wxPython/src/msw/mdi.cpp b/wxPython/src/msw/mdi.cpp index 7cb58aaa51..2f6b75c5b2 100644 --- a/wxPython/src/msw/mdi.cpp +++ b/wxPython/src/msw/mdi.cpp @@ -103,7 +103,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif #ifdef __cplusplus extern "C" { #endif @@ -165,7 +169,7 @@ static PyObject *_wrap_new_wxMDIParentFrame(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -611,7 +615,7 @@ static PyObject *_wrap_new_wxMDIChildFrame(PyObject *self, PyObject *args, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -906,6 +910,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDataObject","_wxDataObject",0}, { "_wxStaticLine","_class_wxStaticLine",0}, { "_wxBrush","_class_wxBrush",0}, + { "_wxToggleButton","_class_wxToggleButton",0}, { "_wxMiniFrame","_class_wxMiniFrame",0}, { "_wxDataFormat","_class_wxDataFormat",0}, { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, @@ -1136,6 +1141,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, + { "_class_wxToggleButton","_wxToggleButton",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxShowEvent","_wxShowEvent",0}, diff --git a/wxPython/src/msw/misc.cpp b/wxPython/src/msw/misc.cpp index e0dba8635c..15cfa106e8 100644 --- a/wxPython/src/msw/misc.cpp +++ b/wxPython/src/msw/misc.cpp @@ -106,7 +106,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif static wxString wxPyEmptyStr(""); @@ -431,7 +435,7 @@ static PyObject *_wrap_wxShell(PyObject *self, PyObject *args, PyObject *kwargs) #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -658,7 +662,7 @@ static PyObject *_wrap_wxStripMenuCodes(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -837,7 +841,7 @@ static PyObject *_wrap_wxGetAccelFromString(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -4763,7 +4767,7 @@ static PyObject *_wrap_new_wxBusyInfo(PyObject *self, PyObject *args, PyObject * #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) diff --git a/wxPython/src/msw/misc2.cpp b/wxPython/src/msw/misc2.cpp index f8a752bb47..305787d2bd 100644 --- a/wxPython/src/msw/misc2.cpp +++ b/wxPython/src/msw/misc2.cpp @@ -112,7 +112,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif static wxString wxPyEmptyStr(""); @@ -281,7 +285,7 @@ static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -300,7 +304,7 @@ static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -319,7 +323,7 @@ static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -387,7 +391,7 @@ static PyObject *_wrap_wxGetPasswordFromUser(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -406,7 +410,7 @@ static PyObject *_wrap_wxGetPasswordFromUser(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -425,7 +429,7 @@ static PyObject *_wrap_wxGetPasswordFromUser(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -499,7 +503,7 @@ static PyObject *_wrap_wxGetSingleChoice(PyObject *self, PyObject *args, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -517,7 +521,7 @@ static PyObject *_wrap_wxGetSingleChoice(PyObject *self, PyObject *args, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -606,7 +610,7 @@ static PyObject *_wrap_wxGetSingleChoiceIndex(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -624,7 +628,7 @@ static PyObject *_wrap_wxGetSingleChoiceIndex(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -702,7 +706,7 @@ static PyObject *_wrap_wxMessageBox(PyObject *self, PyObject *args, PyObject *kw #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -721,7 +725,7 @@ static PyObject *_wrap_wxMessageBox(PyObject *self, PyObject *args, PyObject *kw #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -785,7 +789,7 @@ static PyObject *_wrap_wxGetNumberFromUser(PyObject *self, PyObject *args, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -803,7 +807,7 @@ static PyObject *_wrap_wxGetNumberFromUser(PyObject *self, PyObject *args, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -821,7 +825,7 @@ static PyObject *_wrap_wxGetNumberFromUser(PyObject *self, PyObject *args, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1151,7 +1155,7 @@ static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -1208,7 +1212,7 @@ static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -1829,7 +1833,7 @@ static PyObject *_wrap_wxCreateFileTipProvider(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -1933,7 +1937,7 @@ static PyObject *_wrap_wxDragString(PyObject *self, PyObject *args, PyObject *kw #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -2278,7 +2282,7 @@ static PyObject *_wrap_wxExecute(PyObject *self, PyObject *args, PyObject *kwarg #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -2328,7 +2332,7 @@ static PyObject *_wrap_new_wxToolTip(PyObject *self, PyObject *args, PyObject *k #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -2384,7 +2388,7 @@ static PyObject *_wrap_wxToolTip_SetTip(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -4441,7 +4445,7 @@ static PyObject *_wrap_wxLog_AddTraceMask(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -4482,7 +4486,7 @@ static PyObject *_wrap_wxLog_RemoveTraceMask(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) diff --git a/wxPython/src/msw/printfw.cpp b/wxPython/src/msw/printfw.cpp index dbdde56fc9..760162925c 100644 --- a/wxPython/src/msw/printfw.cpp +++ b/wxPython/src/msw/printfw.cpp @@ -107,7 +107,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif @@ -584,7 +588,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterName(PyObject *self, PyObject *args #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1071,7 +1075,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterCommand(PyObject *self, PyObject *a #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1122,7 +1126,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterOptions(PyObject *self, PyObject *a #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1173,7 +1177,7 @@ static PyObject *_wrap_wxPrintData_SetPreviewCommand(PyObject *self, PyObject *a #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1224,7 +1228,7 @@ static PyObject *_wrap_wxPrintData_SetFilename(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1275,7 +1279,7 @@ static PyObject *_wrap_wxPrintData_SetFontMetricPath(PyObject *self, PyObject *a #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1574,7 +1578,7 @@ static PyObject *_wrap_new_wxPrinterDC2(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -1592,7 +1596,7 @@ static PyObject *_wrap_new_wxPrinterDC2(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1610,7 +1614,7 @@ static PyObject *_wrap_new_wxPrinterDC2(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -5049,7 +5053,7 @@ static PyObject *_wrap_new_wxPreviewFrame(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -5389,6 +5393,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDataObject","_wxDataObject",0}, { "_wxStaticLine","_class_wxStaticLine",0}, { "_wxBrush","_class_wxBrush",0}, + { "_wxToggleButton","_class_wxToggleButton",0}, { "_wxMiniFrame","_class_wxMiniFrame",0}, { "_class_wxPyPrintout","_wxPyPrintout",0}, { "_wxDataFormat","_class_wxDataFormat",0}, @@ -5641,6 +5646,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, + { "_class_wxToggleButton","_wxToggleButton",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, { "_wxRegion","_class_wxRegion",0}, diff --git a/wxPython/src/msw/sizers.cpp b/wxPython/src/msw/sizers.cpp index 49b88ac2ac..a61b0aa9c1 100644 --- a/wxPython/src/msw/sizers.cpp +++ b/wxPython/src/msw/sizers.cpp @@ -103,7 +103,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif class wxPySizer : public wxSizer { DECLARE_DYNAMIC_CLASS(wxPySizer); diff --git a/wxPython/src/msw/stattool.cpp b/wxPython/src/msw/stattool.cpp index 60f0af1d9d..cd2b60447e 100644 --- a/wxPython/src/msw/stattool.cpp +++ b/wxPython/src/msw/stattool.cpp @@ -105,7 +105,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif static wxString wxPyEmptyStr(""); #ifdef __cplusplus @@ -387,7 +391,7 @@ static PyObject *_wrap_wxStatusBar_SetStatusText(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1085,7 +1089,7 @@ static PyObject *_wrap_wxToolBarToolBase_SetShortHelp(PyObject *self, PyObject * #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1136,7 +1140,7 @@ static PyObject *_wrap_wxToolBarToolBase_SetLongHelp(PyObject *self, PyObject *a #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1454,7 +1458,7 @@ static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj6) && !PyUnicode_Check(_obj6)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj6, &tmpPtr, &tmpSize) == -1) @@ -1473,7 +1477,7 @@ static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj7) && !PyUnicode_Check(_obj7)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj7, &tmpPtr, &tmpSize) == -1) @@ -1552,7 +1556,7 @@ static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *arg #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -1571,7 +1575,7 @@ static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *arg #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj4) && !PyUnicode_Check(_obj4)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj4, &tmpPtr, &tmpSize) == -1) @@ -1669,7 +1673,7 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj7) && !PyUnicode_Check(_obj7)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj7, &tmpPtr, &tmpSize) == -1) @@ -1688,7 +1692,7 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj8) && !PyUnicode_Check(_obj8)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj8, &tmpPtr, &tmpSize) == -1) @@ -1768,7 +1772,7 @@ static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject * #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj4) && !PyUnicode_Check(_obj4)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj4, &tmpPtr, &tmpSize) == -1) @@ -1787,7 +1791,7 @@ static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject * #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj5) && !PyUnicode_Check(_obj5)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj5, &tmpPtr, &tmpSize) == -1) @@ -2372,7 +2376,7 @@ static PyObject *_wrap_wxToolBarBase_SetToolShortHelp(PyObject *self, PyObject * #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -2457,7 +2461,7 @@ static PyObject *_wrap_wxToolBarBase_SetToolLongHelp(PyObject *self, PyObject *a #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -3384,6 +3388,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDataObject","_wxDataObject",0}, { "_wxStaticLine","_class_wxStaticLine",0}, { "_wxBrush","_class_wxBrush",0}, + { "_wxToggleButton","_class_wxToggleButton",0}, { "_wxDataFormat","_class_wxDataFormat",0}, { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, { "_wxShowEvent","_class_wxShowEvent",0}, @@ -3621,6 +3626,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, + { "_class_wxToggleButton","_wxToggleButton",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxShowEvent","_wxShowEvent",0}, { "_wxPyDropTarget","_class_wxPyDropTarget",0}, diff --git a/wxPython/src/msw/streams.cpp b/wxPython/src/msw/streams.cpp index bc7024b5b5..cbe4f57642 100644 --- a/wxPython/src/msw/streams.cpp +++ b/wxPython/src/msw/streams.cpp @@ -105,7 +105,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif // C++ // definitions of wxStringPtrList and wxPyInputStream #include @@ -708,7 +712,7 @@ static PyObject *_wrap_wxOutputStream_write(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) diff --git a/wxPython/src/msw/utils.cpp b/wxPython/src/msw/utils.cpp index 89dafb96f9..3919ada737 100644 --- a/wxPython/src/msw/utils.cpp +++ b/wxPython/src/msw/utils.cpp @@ -106,7 +106,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif static wxString wxPyEmptyStr(""); @@ -384,7 +388,7 @@ static PyObject *_wrap_wxConfigBase_DeleteEntry(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -436,7 +440,7 @@ static PyObject *_wrap_wxConfigBase_DeleteGroup(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -487,7 +491,7 @@ static PyObject *_wrap_wxConfigBase_Exists(PyObject *self, PyObject *args, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -868,7 +872,7 @@ static PyObject *_wrap_wxConfigBase_HasEntry(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -919,7 +923,7 @@ static PyObject *_wrap_wxConfigBase_HasGroup(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1026,7 +1030,7 @@ static PyObject *_wrap_wxConfigBase_Read(PyObject *self, PyObject *args, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1045,7 +1049,7 @@ static PyObject *_wrap_wxConfigBase_Read(PyObject *self, PyObject *args, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1106,7 +1110,7 @@ static PyObject *_wrap_wxConfigBase_ReadInt(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1158,7 +1162,7 @@ static PyObject *_wrap_wxConfigBase_ReadFloat(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1238,7 +1242,7 @@ static PyObject *_wrap_wxConfigBase_SetPath(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1319,7 +1323,7 @@ static PyObject *_wrap_wxConfigBase_SetAppName(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1370,7 +1374,7 @@ static PyObject *_wrap_wxConfigBase_SetVendorName(PyObject *self, PyObject *args #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1479,7 +1483,7 @@ static PyObject *_wrap_wxConfigBase_Write(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1497,7 +1501,7 @@ static PyObject *_wrap_wxConfigBase_Write(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1553,7 +1557,7 @@ static PyObject *_wrap_wxConfigBase_WriteInt(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1605,7 +1609,7 @@ static PyObject *_wrap_wxConfigBase_WriteFloat(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1656,7 +1660,7 @@ static PyObject *_wrap_wxConfigBase_GetEntryType(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1709,7 +1713,7 @@ static PyObject *_wrap_wxConfigBase_RenameEntry(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1727,7 +1731,7 @@ static PyObject *_wrap_wxConfigBase_RenameEntry(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1784,7 +1788,7 @@ static PyObject *_wrap_wxConfigBase_RenameGroup(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1802,7 +1806,7 @@ static PyObject *_wrap_wxConfigBase_RenameGroup(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1857,7 +1861,7 @@ static PyObject *_wrap_wxConfigBase_ExpandEnvVars(PyObject *self, PyObject *args #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1921,7 +1925,7 @@ static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args, PyObject *kw #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -1940,7 +1944,7 @@ static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args, PyObject *kw #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1959,7 +1963,7 @@ static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args, PyObject *kw #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1978,7 +1982,7 @@ static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args, PyObject *kw #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -2082,7 +2086,7 @@ static PyObject *_wrap_new_wxFileConfig(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -2101,7 +2105,7 @@ static PyObject *_wrap_new_wxFileConfig(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2120,7 +2124,7 @@ static PyObject *_wrap_new_wxFileConfig(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -2139,7 +2143,7 @@ static PyObject *_wrap_new_wxFileConfig(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -2457,7 +2461,7 @@ static PyObject *_wrap_wxDateTime_GetAmPmStrings(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -2475,7 +2479,7 @@ static PyObject *_wrap_wxDateTime_GetAmPmStrings(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) diff --git a/wxPython/src/msw/windows.cpp b/wxPython/src/msw/windows.cpp index 1417838505..5f3784f7fa 100644 --- a/wxPython/src/msw/windows.cpp +++ b/wxPython/src/msw/windows.cpp @@ -104,7 +104,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif static wxString wxPyEmptyStr(""); @@ -1513,7 +1517,7 @@ static PyObject *_wrap_wxWindow_FindWindowByName(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2041,7 +2045,7 @@ static PyObject *_wrap_wxWindow_SetLabel(PyObject *self, PyObject *args, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2433,7 +2437,7 @@ static PyObject *_wrap_wxWindow_GetTextExtent(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2516,7 +2520,7 @@ static PyObject *_wrap_wxWindow_GetFullTextExtent(PyObject *self, PyObject *args #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -3040,7 +3044,7 @@ static PyObject *_wrap_wxWindow_LoadFromResource(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -4017,7 +4021,7 @@ static PyObject *_wrap_wxWindow_SetName(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -4473,7 +4477,7 @@ static PyObject *_wrap_wxWindow_SetTitle(PyObject *self, PyObject *args, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -4812,7 +4816,7 @@ static PyObject *_wrap_wxWindow_SetToolTipString(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5445,7 +5449,7 @@ static PyObject *_wrap_new_wxDialog(PyObject *self, PyObject *args, PyObject *kw #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -5715,7 +5719,7 @@ static PyObject *_wrap_wxDialog_SetTitle(PyObject *self, PyObject *args, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -5880,7 +5884,7 @@ static PyObject *_wrap_wxDialog_CreateTextSizer(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -6735,7 +6739,7 @@ static PyObject *_wrap_new_wxMenu(PyObject *self, PyObject *args, PyObject *kwar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -6795,7 +6799,7 @@ static PyObject *_wrap_wxMenu_Append(PyObject *self, PyObject *args, PyObject *k #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -6814,7 +6818,7 @@ static PyObject *_wrap_wxMenu_Append(PyObject *self, PyObject *args, PyObject *k #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -6874,7 +6878,7 @@ static PyObject *_wrap_wxMenu_AppendMenu(PyObject *self, PyObject *args, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -6900,7 +6904,7 @@ static PyObject *_wrap_wxMenu_AppendMenu(PyObject *self, PyObject *args, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj4) && !PyUnicode_Check(_obj4)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj4, &tmpPtr, &tmpSize) == -1) @@ -7164,7 +7168,7 @@ static PyObject *_wrap_wxMenu_FindItem(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -7281,7 +7285,7 @@ static PyObject *_wrap_wxMenu_SetTitle(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -7366,7 +7370,7 @@ static PyObject *_wrap_wxMenu_SetLabel(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -7451,7 +7455,7 @@ static PyObject *_wrap_wxMenu_SetHelpString(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -8183,7 +8187,7 @@ static PyObject *_wrap_wxMenuBar_Append(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -8244,7 +8248,7 @@ static PyObject *_wrap_wxMenuBar_Insert(PyObject *self, PyObject *args, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -8368,7 +8372,7 @@ static PyObject *_wrap_wxMenuBar_Replace(PyObject *self, PyObject *args, PyObjec #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -8491,7 +8495,7 @@ static PyObject *_wrap_wxMenuBar_SetLabelTop(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -8578,7 +8582,7 @@ static PyObject *_wrap_wxMenuBar_FindMenuItem(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -8596,7 +8600,7 @@ static PyObject *_wrap_wxMenuBar_FindMenuItem(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -8804,7 +8808,7 @@ static PyObject *_wrap_wxMenuBar_SetLabel(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -8889,7 +8893,7 @@ static PyObject *_wrap_wxMenuBar_SetHelpString(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -8983,7 +8987,7 @@ static PyObject *_wrap_new_wxMenuItem(PyObject *self, PyObject *args, PyObject * #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -9002,7 +9006,7 @@ static PyObject *_wrap_new_wxMenuItem(PyObject *self, PyObject *args, PyObject * #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -9186,7 +9190,7 @@ static PyObject *_wrap_wxMenuItem_SetText(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -9594,7 +9598,7 @@ static PyObject *_wrap_wxMenuItem_SetHelp(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -9736,7 +9740,7 @@ static PyObject *_wrap_wxMenuItem_GetLabelFromText(PyObject *self, PyObject *arg #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) diff --git a/wxPython/src/msw/windows2.cpp b/wxPython/src/msw/windows2.cpp index d9fa9bae4e..05281e7c2a 100644 --- a/wxPython/src/msw/windows2.cpp +++ b/wxPython/src/msw/windows2.cpp @@ -111,7 +111,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif #ifdef __cplusplus extern "C" { #endif @@ -465,7 +469,7 @@ static PyObject *_wrap_wxNotebook_SetPageText(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -867,7 +871,7 @@ static PyObject *_wrap_wxNotebook_AddPage(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -931,7 +935,7 @@ static PyObject *_wrap_wxNotebook_InsertPage(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -2206,6 +2210,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDataObject","_wxDataObject",0}, { "_wxStaticLine","_class_wxStaticLine",0}, { "_wxBrush","_class_wxBrush",0}, + { "_wxToggleButton","_class_wxToggleButton",0}, { "_class_wxNotebookEvent","_wxNotebookEvent",0}, { "_wxDataFormat","_class_wxDataFormat",0}, { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, @@ -2439,6 +2444,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, + { "_class_wxToggleButton","_wxToggleButton",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxSplitterWindow","_wxSplitterWindow",0}, { "_class_wxShowEvent","_wxShowEvent",0}, diff --git a/wxPython/src/msw/windows3.cpp b/wxPython/src/msw/windows3.cpp index f2373175ee..16ce77dd90 100644 --- a/wxPython/src/msw/windows3.cpp +++ b/wxPython/src/msw/windows3.cpp @@ -105,7 +105,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif #ifdef __cplusplus extern "C" { #endif @@ -1834,6 +1838,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStaticLine","_class_wxStaticLine",0}, { "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0}, { "_wxBrush","_class_wxBrush",0}, + { "_wxToggleButton","_class_wxToggleButton",0}, { "_class_wxNotebookEvent","_wxNotebookEvent",0}, { "_wxMiniFrame","_class_wxMiniFrame",0}, { "_wxDataFormat","_class_wxDataFormat",0}, @@ -2083,6 +2088,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, + { "_class_wxToggleButton","_wxToggleButton",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxSplitterWindow","_wxSplitterWindow",0}, diff --git a/wxPython/src/msw/wx.cpp b/wxPython/src/msw/wx.cpp index a3a80ea265..20c5cc2b37 100644 --- a/wxPython/src/msw/wx.cpp +++ b/wxPython/src/msw/wx.cpp @@ -103,7 +103,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif #include @@ -1423,7 +1427,7 @@ static PyObject *_wrap_wxPyApp_SetAppName(PyObject *self, PyObject *args, PyObje #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1504,7 +1508,7 @@ static PyObject *_wrap_wxPyApp_SetClassName(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1649,7 +1653,7 @@ static PyObject *_wrap_wxPyApp_SetVendorName(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) -- 2.45.2