SWIGged sources for wxGTK (for unicode API changes)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-01-02 22:31:44 +00:00
parent b5ae0a9a3b
commit 250c383f08
29 changed files with 309 additions and 252 deletions

View File

@@ -388,7 +388,7 @@ static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args, PyObject *
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -466,7 +466,7 @@ static PyObject *_wrap_wxLoadFileSelector(PyObject *self, PyObject *args, PyObje
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -536,7 +536,7 @@ static PyObject *_wrap_wxSaveFileSelector(PyObject *self, PyObject *args, PyObje
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -610,7 +610,7 @@ static PyObject *_wrap_wxDirSelector(PyObject *self, PyObject *args, PyObject *k
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -682,7 +682,7 @@ static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args, PyObjec
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -753,7 +753,7 @@ static PyObject *_wrap_wxGetPasswordFromUser(PyObject *self, PyObject *args, PyO
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -840,7 +840,7 @@ static PyObject *_wrap_wxGetSingleChoice(PyObject *self, PyObject *args, PyObjec
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -1747,7 +1747,7 @@ static PyObject *_wrap_wxSysErrorMsg(PyObject *self, PyObject *args, PyObject *k
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -2513,7 +2513,7 @@ static PyObject *_wrap_wxToolTip_GetTip(PyObject *self, PyObject *args, PyObject
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -3326,7 +3326,7 @@ static PyObject *_wrap_wxTipProvider_GetTip(PyObject *self, PyObject *args, PyOb
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -3398,7 +3398,7 @@ static PyObject *_wrap_wxTipProvider_PreprocessTip(PyObject *self, PyObject *arg
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -4969,7 +4969,7 @@ static PyObject *_wrap_wxLog_GetTimestamp(PyObject *self, PyObject *args, PyObje
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -5119,7 +5119,7 @@ static PyObject *_wrap_wxLog_TimeStamp(PyObject *self, PyObject *args, PyObject
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -7006,7 +7006,7 @@ static PyObject *_wrap_wxJoystick_GetProductName(PyObject *self, PyObject *args,
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -8014,11 +8014,10 @@ static PyObject *_wrap_new_wxFileTypeInfoSequence(PyObject *self, PyObject *args
PyObject* item = PySequence_GetItem(_obj0, i);
#if wxUSE_UNICODE
PyObject* str = PyObject_Unicode(item);
_arg0->Add(PyUnicode_AsUnicode(str));
#else
PyObject* str = PyObject_Str(item);
_arg0->Add(PyString_AsString(str));
#endif
_arg0->Add(Py2wxString(str));
Py_DECREF(item);
Py_DECREF(str);
}
@@ -8203,7 +8202,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetMimeType(PyObject *self, PyObject *args
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -8238,7 +8237,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetOpenCommand(PyObject *self, PyObject *a
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -8273,7 +8272,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetPrintCommand(PyObject *self, PyObject *
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -8308,7 +8307,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetShortDesc(PyObject *self, PyObject *arg
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -8343,7 +8342,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetDescription(PyObject *self, PyObject *a
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -8439,7 +8438,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetIconFile(PyObject *self, PyObject *args
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -8513,7 +8512,7 @@ static PyObject * wxFileType_GetMimeType(wxFileType *self) {
wxString str;
if (self->GetMimeType(&str)) {
#if wxUSE_UNICODE
return PyUnicode_FromUnicode(str.c_str(), str.Len());
return PyUnicode_FromWideChar(str.c_str(), str.Len());
#else
return PyString_FromStringAndSize(str.c_str(), str.Len());
#endif
@@ -8673,7 +8672,7 @@ static PyObject * wxFileType_GetIconInfo(wxFileType *self) {
PyTuple_SetItem(tuple, 0, wxPyConstructObject(new wxIcon(icon),
wxT("wxIcon"), TRUE));
#if wxUSE_UNICODE
PyTuple_SetItem(tuple, 1, PyUnicode_FromUnicode(iconFile.c_str(), iconFile.Len()));
PyTuple_SetItem(tuple, 1, PyUnicode_FromWideChar(iconFile.c_str(), iconFile.Len()));
#else
PyTuple_SetItem(tuple, 1, PyString_FromStringAndSize(iconFile.c_str(), iconFile.Len()));
#endif
@@ -8717,7 +8716,7 @@ static PyObject * wxFileType_GetDescription(wxFileType *self) {
wxString str;
if (self->GetDescription(&str)) {
#if wxUSE_UNICODE
return PyUnicode_FromUnicode(str.c_str(), str.Len());
return PyUnicode_FromWideChar(str.c_str(), str.Len());
#else
return PyString_FromStringAndSize(str.c_str(), str.Len());
#endif
@@ -8757,7 +8756,7 @@ static PyObject * wxFileType_GetOpenCommand(wxFileType *self,const wxString & fi
wxString str;
if (self->GetOpenCommand(&str, wxFileType::MessageParameters(filename, mimetype))) {
#if wxUSE_UNICODE
return PyUnicode_FromUnicode(str.c_str(), str.Len());
return PyUnicode_FromWideChar(str.c_str(), str.Len());
#else
return PyString_FromStringAndSize(str.c_str(), str.Len());
#endif
@@ -8820,7 +8819,7 @@ static PyObject * wxFileType_GetPrintCommand(wxFileType *self,const wxString & f
wxString str;
if (self->GetPrintCommand(&str, wxFileType::MessageParameters(filename, mimetype))) {
#if wxUSE_UNICODE
return PyUnicode_FromUnicode(str.c_str(), str.Len());
return PyUnicode_FromWideChar(str.c_str(), str.Len());
#else
return PyString_FromStringAndSize(str.c_str(), str.Len());
#endif
@@ -9099,7 +9098,7 @@ static PyObject *_wrap_wxFileType_ExpandCommand(PyObject *self, PyObject *args,
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
@@ -10273,7 +10272,7 @@ static PyObject *_wrap_wxFileHistory_GetHistoryFile(PyObject *self, PyObject *ar
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif