Merged wxPython 2.2.2 over to the main branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* FILE : msw/controls2.cpp
|
||||
* FILE : src/msw/controls2.cpp
|
||||
*
|
||||
* This file was automatically generated by :
|
||||
* Simplified Wrapper and Interface Generator (SWIG)
|
||||
@@ -27,19 +27,20 @@
|
||||
# define SWIGEXPORT(a) __declspec(dllexport) a
|
||||
# else
|
||||
# if defined(__BORLANDC__)
|
||||
# define SWIGEXPORT(a) a _export
|
||||
# define SWIGEXPORT(a) a _export
|
||||
# else
|
||||
# define SWIGEXPORT(a) a
|
||||
# define SWIGEXPORT(a) a
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# define SWIGEXPORT(a) a
|
||||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "Python.h"
|
||||
extern void SWIG_MakePtr(char *, void *, char *);
|
||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||
@@ -62,13 +63,12 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
|
||||
static PyObject* l_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 (!PyList_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyList_New(0);
|
||||
@@ -85,23 +85,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;
|
||||
@@ -132,15 +132,15 @@ extern wxValidator wxPyDefaultValidator;
|
||||
class wxPyTreeItemData : public wxTreeItemData {
|
||||
public:
|
||||
wxPyTreeItemData(PyObject* obj = NULL) {
|
||||
if (obj == NULL)
|
||||
if (obj == NULL)
|
||||
obj = Py_None;
|
||||
Py_INCREF(obj);
|
||||
m_obj = obj;
|
||||
Py_INCREF(obj);
|
||||
m_obj = obj;
|
||||
}
|
||||
|
||||
~wxPyTreeItemData() {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
Py_DECREF(m_obj);
|
||||
Py_DECREF(m_obj);
|
||||
wxPySaveThread(doSave);
|
||||
}
|
||||
|
||||
@@ -150,7 +150,9 @@ public:
|
||||
}
|
||||
|
||||
void SetData(PyObject* obj) {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
Py_DECREF(m_obj);
|
||||
wxPySaveThread(doSave);
|
||||
m_obj = obj;
|
||||
Py_INCREF(obj);
|
||||
}
|
||||
@@ -1970,6 +1972,14 @@ static PyObject *_wrap_wxListItem_m_width_get(PyObject *self, PyObject *args, Py
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxListEventTowxNotifyEvent(void *ptr) {
|
||||
wxListEvent *src;
|
||||
wxNotifyEvent *dest;
|
||||
src = (wxListEvent *) ptr;
|
||||
dest = (wxNotifyEvent *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
static void *SwigwxListEventTowxCommandEvent(void *ptr) {
|
||||
wxListEvent *src;
|
||||
wxCommandEvent *dest;
|
||||
@@ -3862,8 +3872,8 @@ static PyObject *_wrap_wxListCtrl_HitTest(PyObject *self, PyObject *args, PyObje
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxListCtrl_InsertColumnWith(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertColumn(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxListCtrl_InsertColumnWith(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
#define wxListCtrl_InsertColumnInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertColumn(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxListCtrl_InsertColumnInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
long _result;
|
||||
wxListCtrl * _arg0;
|
||||
@@ -3874,25 +3884,25 @@ static PyObject *_wrap_wxListCtrl_InsertColumnWith(PyObject *self, PyObject *arg
|
||||
char *_kwnames[] = { "self","col","info", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OlO:wxListCtrl_InsertColumnWith",_kwnames,&_argo0,&_arg1,&_argo2))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OlO:wxListCtrl_InsertColumnInfo",_kwnames,&_argo0,&_arg1,&_argo2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertColumnWith. Expected _wxListCtrl_p.");
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertColumnInfo. Expected _wxListCtrl_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo2) {
|
||||
if (_argo2 == Py_None) { _arg2 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxListItem_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_InsertColumnWith. Expected _wxListItem_p.");
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_InsertColumnInfo. Expected _wxListItem_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (long )wxListCtrl_InsertColumnWith(_arg0,_arg1,*_arg2);
|
||||
_result = (long )wxListCtrl_InsertColumnInfo(_arg0,_arg1,*_arg2);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} _resultobj = Py_BuildValue("l",_result);
|
||||
@@ -4678,7 +4688,7 @@ static PyObject *_wrap_wxTreeItemId_IsOk(PyObject *self, PyObject *args, PyObjec
|
||||
}
|
||||
|
||||
static int wxTreeItemId___cmp__(wxTreeItemId *self,wxTreeItemId * other) {
|
||||
if (! other) return 0;
|
||||
if (! other) return -1;
|
||||
return *self != *other;
|
||||
}
|
||||
static PyObject *_wrap_wxTreeItemId___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
@@ -5780,7 +5790,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemData(PyObject *self, PyObject *args, Py
|
||||
static void wxPyTreeCtrl_SetItemData(wxPyTreeCtrl *self,const wxTreeItemId & item,wxPyTreeItemData * data) {
|
||||
data->SetId(item); // set the id
|
||||
self->SetItemData(item, data);
|
||||
}
|
||||
}
|
||||
static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxPyTreeCtrl * _arg0;
|
||||
@@ -5833,7 +5843,7 @@ static PyObject * wxPyTreeCtrl_GetPyData(wxPyTreeCtrl *self,const wxTreeItemId &
|
||||
self->SetItemData(item, data);
|
||||
}
|
||||
return data->GetData();
|
||||
}
|
||||
}
|
||||
static PyObject *_wrap_wxTreeCtrl_GetPyData(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
PyObject * _result;
|
||||
@@ -5879,7 +5889,7 @@ static void wxPyTreeCtrl_SetPyData(wxPyTreeCtrl *self,const wxTreeItemId & item
|
||||
self->SetItemData(item, data);
|
||||
} else
|
||||
data->SetData(obj);
|
||||
}
|
||||
}
|
||||
static PyObject *_wrap_wxTreeCtrl_SetPyData(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxPyTreeCtrl * _arg0;
|
||||
@@ -6167,8 +6177,8 @@ static PyObject * wxPyTreeCtrl_GetSelections(wxPyTreeCtrl *self) {
|
||||
size_t num, x;
|
||||
num = self->GetSelections(array);
|
||||
for (x=0; x < num; x++) {
|
||||
PyObject* item = wxPyConstructObject((void*)&array.Item(x),
|
||||
"wxTreeItemId");
|
||||
wxTreeItemId *tii = new wxTreeItemId(array.Item(x));
|
||||
PyObject* item = wxPyConstructObject((void*)tii, "wxTreeItemId", TRUE);
|
||||
PyList_Append(rval, item);
|
||||
}
|
||||
wxPySaveThread(doSave);
|
||||
@@ -7871,7 +7881,7 @@ static PyMethodDef controls2cMethods[] = {
|
||||
{ "wxListCtrl_InsertStringItem", (PyCFunction) _wrap_wxListCtrl_InsertStringItem, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxListCtrl_InsertItem", (PyCFunction) _wrap_wxListCtrl_InsertItem, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxListCtrl_InsertColumn", (PyCFunction) _wrap_wxListCtrl_InsertColumn, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxListCtrl_InsertColumnWith", (PyCFunction) _wrap_wxListCtrl_InsertColumnWith, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxListCtrl_InsertColumnInfo", (PyCFunction) _wrap_wxListCtrl_InsertColumnInfo, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxListCtrl_HitTest", (PyCFunction) _wrap_wxListCtrl_HitTest, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxListCtrl_GetTopItem", (PyCFunction) _wrap_wxListCtrl_GetTopItem, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxListCtrl_SetTextColour", (PyCFunction) _wrap_wxListCtrl_SetTextColour, METH_VARARGS | METH_KEYWORDS },
|
||||
@@ -8021,6 +8031,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxPrintQuality","_uint",0},
|
||||
{ "_wxPrintQuality","_EBool",0},
|
||||
{ "_wxPrintQuality","_size_t",0},
|
||||
{ "_wxPrintQuality","_time_t",0},
|
||||
{ "_class_wxCustomDataObject","_wxCustomDataObject",0},
|
||||
{ "_wxSpinCtrl","_class_wxSpinCtrl",0},
|
||||
{ "_class_wxRegionIterator","_wxRegionIterator",0},
|
||||
@@ -8037,6 +8048,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxCursor","_class_wxCursor",0},
|
||||
{ "_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent},
|
||||
{ "_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent},
|
||||
{ "_wxNotifyEvent","_class_wxListEvent",SwigwxListEventTowxNotifyEvent},
|
||||
{ "_wxNotifyEvent","_wxListEvent",SwigwxListEventTowxNotifyEvent},
|
||||
{ "_wxNotifyEvent","_class_wxNotifyEvent",0},
|
||||
{ "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0},
|
||||
{ "_wxMask","_class_wxMask",0},
|
||||
@@ -8064,6 +8077,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxSpinEvent","_class_wxSpinEvent",0},
|
||||
{ "_size_t","_wxCoord",0},
|
||||
{ "_size_t","_wxPrintQuality",0},
|
||||
{ "_size_t","_time_t",0},
|
||||
{ "_size_t","_unsigned_int",0},
|
||||
{ "_size_t","_int",0},
|
||||
{ "_size_t","_wxWindowID",0},
|
||||
@@ -8097,6 +8111,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxShowEvent","_class_wxShowEvent",0},
|
||||
{ "_uint","_wxCoord",0},
|
||||
{ "_uint","_wxPrintQuality",0},
|
||||
{ "_uint","_time_t",0},
|
||||
{ "_uint","_size_t",0},
|
||||
{ "_uint","_unsigned_int",0},
|
||||
{ "_uint","_int",0},
|
||||
@@ -8129,6 +8144,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0},
|
||||
{ "_class_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent},
|
||||
{ "_class_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent},
|
||||
{ "_class_wxNotifyEvent","_class_wxListEvent",SwigwxListEventTowxNotifyEvent},
|
||||
{ "_class_wxNotifyEvent","_wxListEvent",SwigwxListEventTowxNotifyEvent},
|
||||
{ "_class_wxNotifyEvent","_wxNotifyEvent",0},
|
||||
{ "_class_wxValidator","_wxValidator",0},
|
||||
{ "_class_wxPyEvent","_wxPyEvent",0},
|
||||
@@ -8232,6 +8249,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxListBox","_wxListBox",0},
|
||||
{ "_unsigned_int","_wxCoord",0},
|
||||
{ "_unsigned_int","_wxPrintQuality",0},
|
||||
{ "_unsigned_int","_time_t",0},
|
||||
{ "_unsigned_int","_size_t",0},
|
||||
{ "_unsigned_int","_uint",0},
|
||||
{ "_unsigned_int","_wxWindowID",0},
|
||||
@@ -8255,6 +8273,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0},
|
||||
{ "_wxWindowID","_wxCoord",0},
|
||||
{ "_wxWindowID","_wxPrintQuality",0},
|
||||
{ "_wxWindowID","_time_t",0},
|
||||
{ "_wxWindowID","_size_t",0},
|
||||
{ "_wxWindowID","_EBool",0},
|
||||
{ "_wxWindowID","_uint",0},
|
||||
@@ -8264,6 +8283,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxScrollWinEvent","_wxScrollWinEvent",0},
|
||||
{ "_int","_wxCoord",0},
|
||||
{ "_int","_wxPrintQuality",0},
|
||||
{ "_int","_time_t",0},
|
||||
{ "_int","_size_t",0},
|
||||
{ "_int","_EBool",0},
|
||||
{ "_int","_uint",0},
|
||||
@@ -8275,6 +8295,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxListEvent","_wxListEvent",0},
|
||||
{ "_class_wxSpinEvent","_wxSpinEvent",0},
|
||||
{ "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0},
|
||||
{ "_time_t","_wxCoord",0},
|
||||
{ "_time_t","_wxPrintQuality",0},
|
||||
{ "_time_t","_unsigned_int",0},
|
||||
{ "_time_t","_int",0},
|
||||
{ "_time_t","_wxWindowID",0},
|
||||
{ "_time_t","_uint",0},
|
||||
{ "_time_t","_size_t",0},
|
||||
{ "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0},
|
||||
{ "_wxButton","_class_wxButton",0},
|
||||
{ "_wxSize","_class_wxSize",0},
|
||||
@@ -8310,6 +8337,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxCoord","_uint",0},
|
||||
{ "_wxCoord","_EBool",0},
|
||||
{ "_wxCoord","_size_t",0},
|
||||
{ "_wxCoord","_time_t",0},
|
||||
{ "_wxCoord","_wxPrintQuality",0},
|
||||
{ "_wxEraseEvent","_class_wxEraseEvent",0},
|
||||
{ "_wxDataObjectComposite","_class_wxDataObjectComposite",0},
|
||||
|
Reference in New Issue
Block a user