New typemaps for wxString when compiling for Python 2.0 and beyond
that allow Unicode objects to be passed as well as String objects. If a Unicode object is passed PyString_AsStringAndSize is used to convert it to a wxString using the default encoding. Fixed the generic buttons so tool tips work for them. Fixed a bug in the demo's tree control. Added a listbox to the listbox demo that shows how to find items with a patching prefix as keys are typed. Added code to the wxListCtrl demo to show how to get text from a column in report mode. Added code to the toolbar demo to clear the long help from the status bar after 2 seconds. Added wxJoystick. Fixed wxTimer so it can be used as described in the docs, either with a Notify method in a subclass, or sending an event to a wxEvtHandler object, (usually a window.) Added wxNotifyEvent.Allow() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* This file was automatically generated by :
|
||||
* Simplified Wrapper and Interface Generator (SWIG)
|
||||
* Version 1.1 (Build 810)
|
||||
* Version 1.1 (Build 883)
|
||||
*
|
||||
* Portions Copyright (c) 1995-1998
|
||||
* The University of Utah and The Regents of the University of California.
|
||||
@@ -41,6 +41,7 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void SWIG_MakePtr(char *, void *, char *);
|
||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||
@@ -59,12 +60,12 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
|
||||
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyList_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyList_New(0);
|
||||
@@ -81,23 +82,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
PyObject* o3;
|
||||
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
o2 = target;
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
@@ -2961,11 +2962,22 @@ static PyObject *_wrap_wxPyLineShape_ClearArrow(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");
|
||||
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_AsString(_obj1), PyString_Size(_obj1));
|
||||
_arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
|
||||
#endif
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
@@ -3107,11 +3119,22 @@ static PyObject *_wrap_wxPyLineShape_DeleteArrowHead(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");
|
||||
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_AsString(_obj2), PyString_Size(_obj2));
|
||||
_arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
|
||||
#endif
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
@@ -3341,11 +3364,22 @@ static PyObject *_wrap_wxPyLineShape_FindArrowHead(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");
|
||||
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_AsString(_obj2), PyString_Size(_obj2));
|
||||
_arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
|
||||
#endif
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
|
Reference in New Issue
Block a user