reSWIGged

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-03-24 01:52:48 +00:00
parent f65bb0f8ab
commit 50f151d726
15 changed files with 925 additions and 376 deletions

View File

@@ -2817,6 +2817,35 @@ SWIGINTERN void wxListBox_Insert(wxListBox *self,wxString const &item,int pos,Py
} else
self->Insert(item, pos);
}
SWIGINTERN int
SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val)
{
long v = 0;
if (SWIG_AsVal_long(obj, &v) && v < 0) {
return SWIG_TypeError;
}
else if (val)
*val = (unsigned long)v;
return SWIG_OK;
}
SWIGINTERN int
SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
{
unsigned long v;
int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
if (SWIG_IsOK(res)) {
if ((v > UINT_MAX)) {
return SWIG_OverflowError;
} else {
if (val) *val = static_cast< unsigned int >(v);
}
}
return res;
}
SWIGINTERN PyObject *wxListBox_GetSelections(wxListBox *self){
wxArrayInt lst;
self->GetSelections(lst);
@@ -2845,19 +2874,6 @@ SWIGINTERN void wxListBox_SetItemFont(wxListBox *self,int item,wxFont const &f){
#endif
}
static const wxString wxPyTextCtrlNameStr(wxTextCtrlNameStr);
SWIGINTERN int
SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val)
{
long v = 0;
if (SWIG_AsVal_long(obj, &v) && v < 0) {
return SWIG_TypeError;
}
else if (val)
*val = (unsigned long)v;
return SWIG_OK;
}
SWIGINTERN void wxTextCtrl_write(wxTextCtrl *self,wxString const &text){
self->AppendText(text);
}
@@ -2885,6 +2901,13 @@ SWIG_From_size_t (size_t value)
}
SWIGINTERNINLINE PyObject *
SWIG_From_unsigned_SS_int (unsigned int value)
{
return SWIG_From_unsigned_SS_long (value);
}
#include <wx/slider.h>
@@ -3123,29 +3146,6 @@ public:
IMPLEMENT_ABSTRACT_CLASS(wxPyTreeCtrl, wxTreeCtrl);
SWIGINTERNINLINE PyObject *
SWIG_From_unsigned_SS_int (unsigned int value)
{
return SWIG_From_unsigned_SS_long (value);
}
SWIGINTERN int
SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
{
unsigned long v;
int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
if (SWIG_IsOK(res)) {
if ((v > UINT_MAX)) {
return SWIG_OverflowError;
} else {
if (val) *val = static_cast< unsigned int >(v);
}
}
return res;
}
SWIGINTERN wxPyTreeItemData *wxPyTreeCtrl_GetItemData(wxPyTreeCtrl *self,wxTreeItemId const &item){
wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item);
if (data == NULL) {
@@ -6274,6 +6274,60 @@ fail:
}
SWIGINTERN PyObject *_wrap_ComboBox_SetString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
wxComboBox *arg1 = (wxComboBox *) 0 ;
int arg2 ;
wxString *arg3 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
bool temp3 = false ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
char * kwnames[] = {
(char *) "self",(char *) "n",(char *) "string", NULL
};
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ComboBox_SetString",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxComboBox, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComboBox_SetString" "', expected argument " "1"" of type '" "wxComboBox *""'");
}
arg1 = reinterpret_cast< wxComboBox * >(argp1);
ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ComboBox_SetString" "', expected argument " "2"" of type '" "int""'");
}
arg2 = static_cast< int >(val2);
{
arg3 = wxString_in_helper(obj2);
if (arg3 == NULL) SWIG_fail;
temp3 = true;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetString(arg2,(wxString const &)*arg3);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_Py_Void();
{
if (temp3)
delete arg3;
}
return resultobj;
fail:
{
if (temp3)
delete arg3;
}
return NULL;
}
SWIGINTERN PyObject *_wrap_ComboBox_SetEditable(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
wxComboBox *arg1 = (wxComboBox *) 0 ;
@@ -9088,11 +9142,11 @@ SWIGINTERN PyObject *_wrap_ListBox_InsertItems(PyObject *SWIGUNUSEDPARM(self), P
PyObject *resultobj = 0;
wxListBox *arg1 = (wxListBox *) 0 ;
wxArrayString *arg2 = 0 ;
int arg3 ;
unsigned int arg3 ;
void *argp1 = 0 ;
int res1 = 0 ;
bool temp2 = false ;
int val3 ;
unsigned int val3 ;
int ecode3 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
@@ -9124,11 +9178,11 @@ SWIGINTERN PyObject *_wrap_ListBox_InsertItems(PyObject *SWIGUNUSEDPARM(self), P
Py_DECREF(item);
}
}
ecode3 = SWIG_AsVal_int(obj2, &val3);
ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ListBox_InsertItems" "', expected argument " "3"" of type '" "int""'");
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ListBox_InsertItems" "', expected argument " "3"" of type '" "unsigned int""'");
}
arg3 = static_cast< int >(val3);
arg3 = static_cast< unsigned int >(val3);
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->InsertItems((wxArrayString const &)*arg2,arg3);
@@ -10217,11 +10271,11 @@ fail:
SWIGINTERN PyObject *_wrap_CheckListBox_IsChecked(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
wxCheckListBox *arg1 = (wxCheckListBox *) 0 ;
int arg2 ;
unsigned int arg2 ;
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
unsigned int val2 ;
int ecode2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
@@ -10235,11 +10289,11 @@ SWIGINTERN PyObject *_wrap_CheckListBox_IsChecked(PyObject *SWIGUNUSEDPARM(self)
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CheckListBox_IsChecked" "', expected argument " "1"" of type '" "wxCheckListBox *""'");
}
arg1 = reinterpret_cast< wxCheckListBox * >(argp1);
ecode2 = SWIG_AsVal_int(obj1, &val2);
ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CheckListBox_IsChecked" "', expected argument " "2"" of type '" "int""'");
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CheckListBox_IsChecked" "', expected argument " "2"" of type '" "unsigned int""'");
}
arg2 = static_cast< int >(val2);
arg2 = static_cast< unsigned int >(val2);
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)(arg1)->IsChecked(arg2);
@@ -10258,11 +10312,11 @@ fail:
SWIGINTERN PyObject *_wrap_CheckListBox_Check(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
wxCheckListBox *arg1 = (wxCheckListBox *) 0 ;
int arg2 ;
unsigned int arg2 ;
int arg3 = (int) true ;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
unsigned int val2 ;
int ecode2 = 0 ;
int val3 ;
int ecode3 = 0 ;
@@ -10279,11 +10333,11 @@ SWIGINTERN PyObject *_wrap_CheckListBox_Check(PyObject *SWIGUNUSEDPARM(self), Py
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CheckListBox_Check" "', expected argument " "1"" of type '" "wxCheckListBox *""'");
}
arg1 = reinterpret_cast< wxCheckListBox * >(argp1);
ecode2 = SWIG_AsVal_int(obj1, &val2);
ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CheckListBox_Check" "', expected argument " "2"" of type '" "int""'");
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CheckListBox_Check" "', expected argument " "2"" of type '" "unsigned int""'");
}
arg2 = static_cast< int >(val2);
arg2 = static_cast< unsigned int >(val2);
if (obj2) {
ecode3 = SWIG_AsVal_int(obj2, &val3);
if (!SWIG_IsOK(ecode3)) {
@@ -16492,11 +16546,11 @@ fail:
SWIGINTERN PyObject *_wrap_RadioBox_EnableItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
wxRadioBox *arg1 = (wxRadioBox *) 0 ;
int arg2 ;
unsigned int arg2 ;
bool arg3 = (bool) true ;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
unsigned int val2 ;
int ecode2 = 0 ;
bool val3 ;
int ecode3 = 0 ;
@@ -16513,11 +16567,11 @@ SWIGINTERN PyObject *_wrap_RadioBox_EnableItem(PyObject *SWIGUNUSEDPARM(self), P
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RadioBox_EnableItem" "', expected argument " "1"" of type '" "wxRadioBox *""'");
}
arg1 = reinterpret_cast< wxRadioBox * >(argp1);
ecode2 = SWIG_AsVal_int(obj1, &val2);
ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_EnableItem" "', expected argument " "2"" of type '" "int""'");
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_EnableItem" "', expected argument " "2"" of type '" "unsigned int""'");
}
arg2 = static_cast< int >(val2);
arg2 = static_cast< unsigned int >(val2);
if (obj2) {
ecode3 = SWIG_AsVal_bool(obj2, &val3);
if (!SWIG_IsOK(ecode3)) {
@@ -16541,11 +16595,11 @@ fail:
SWIGINTERN PyObject *_wrap_RadioBox_ShowItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
wxRadioBox *arg1 = (wxRadioBox *) 0 ;
int arg2 ;
unsigned int arg2 ;
bool arg3 = (bool) true ;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
unsigned int val2 ;
int ecode2 = 0 ;
bool val3 ;
int ecode3 = 0 ;
@@ -16562,11 +16616,11 @@ SWIGINTERN PyObject *_wrap_RadioBox_ShowItem(PyObject *SWIGUNUSEDPARM(self), PyO
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RadioBox_ShowItem" "', expected argument " "1"" of type '" "wxRadioBox *""'");
}
arg1 = reinterpret_cast< wxRadioBox * >(argp1);
ecode2 = SWIG_AsVal_int(obj1, &val2);
ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_ShowItem" "', expected argument " "2"" of type '" "int""'");
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_ShowItem" "', expected argument " "2"" of type '" "unsigned int""'");
}
arg2 = static_cast< int >(val2);
arg2 = static_cast< unsigned int >(val2);
if (obj2) {
ecode3 = SWIG_AsVal_bool(obj2, &val3);
if (!SWIG_IsOK(ecode3)) {
@@ -16587,10 +16641,92 @@ fail:
}
SWIGINTERN PyObject *_wrap_RadioBox_IsItemEnabled(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
wxRadioBox *arg1 = (wxRadioBox *) 0 ;
unsigned int arg2 ;
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char * kwnames[] = {
(char *) "self",(char *) "n", NULL
};
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RadioBox_IsItemEnabled",kwnames,&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRadioBox, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RadioBox_IsItemEnabled" "', expected argument " "1"" of type '" "wxRadioBox const *""'");
}
arg1 = reinterpret_cast< wxRadioBox * >(argp1);
ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_IsItemEnabled" "', expected argument " "2"" of type '" "unsigned int""'");
}
arg2 = static_cast< unsigned int >(val2);
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)((wxRadioBox const *)arg1)->IsItemEnabled(arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_RadioBox_IsItemShown(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
wxRadioBox *arg1 = (wxRadioBox *) 0 ;
unsigned int arg2 ;
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char * kwnames[] = {
(char *) "self",(char *) "n", NULL
};
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RadioBox_IsItemShown",kwnames,&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRadioBox, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RadioBox_IsItemShown" "', expected argument " "1"" of type '" "wxRadioBox const *""'");
}
arg1 = reinterpret_cast< wxRadioBox * >(argp1);
ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_IsItemShown" "', expected argument " "2"" of type '" "unsigned int""'");
}
arg2 = static_cast< unsigned int >(val2);
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)((wxRadioBox const *)arg1)->IsItemShown(arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_RadioBox_GetColumnCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
wxRadioBox *arg1 = (wxRadioBox *) 0 ;
int result;
unsigned int result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject *swig_obj[1] ;
@@ -16604,11 +16740,11 @@ SWIGINTERN PyObject *_wrap_RadioBox_GetColumnCount(PyObject *SWIGUNUSEDPARM(self
arg1 = reinterpret_cast< wxRadioBox * >(argp1);
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (int)((wxRadioBox const *)arg1)->GetColumnCount();
result = (unsigned int)((wxRadioBox const *)arg1)->GetColumnCount();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_From_int(static_cast< int >(result));
resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
return resultobj;
fail:
return NULL;
@@ -16618,7 +16754,7 @@ fail:
SWIGINTERN PyObject *_wrap_RadioBox_GetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
wxRadioBox *arg1 = (wxRadioBox *) 0 ;
int result;
unsigned int result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject *swig_obj[1] ;
@@ -16632,11 +16768,11 @@ SWIGINTERN PyObject *_wrap_RadioBox_GetRowCount(PyObject *SWIGUNUSEDPARM(self),
arg1 = reinterpret_cast< wxRadioBox * >(argp1);
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (int)((wxRadioBox const *)arg1)->GetRowCount();
result = (unsigned int)((wxRadioBox const *)arg1)->GetRowCount();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_From_int(static_cast< int >(result));
resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
return resultobj;
fail:
return NULL;
@@ -40790,6 +40926,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"ComboBox_GetMark", (PyCFunction)_wrap_ComboBox_GetMark, METH_O, NULL},
{ (char *)"ComboBox_GetCurrentSelection", (PyCFunction)_wrap_ComboBox_GetCurrentSelection, METH_O, NULL},
{ (char *)"ComboBox_SetStringSelection", (PyCFunction) _wrap_ComboBox_SetStringSelection, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ComboBox_SetString", (PyCFunction) _wrap_ComboBox_SetString, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ComboBox_SetEditable", (PyCFunction) _wrap_ComboBox_SetEditable, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ComboBox_SetInsertionPointEnd", (PyCFunction)_wrap_ComboBox_SetInsertionPointEnd, METH_O, NULL},
{ (char *)"ComboBox_Remove", (PyCFunction) _wrap_ComboBox_Remove, METH_VARARGS | METH_KEYWORDS, NULL},
@@ -41037,6 +41174,8 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"RadioBox_SetString", (PyCFunction) _wrap_RadioBox_SetString, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"RadioBox_EnableItem", (PyCFunction) _wrap_RadioBox_EnableItem, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"RadioBox_ShowItem", (PyCFunction) _wrap_RadioBox_ShowItem, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"RadioBox_IsItemEnabled", (PyCFunction) _wrap_RadioBox_IsItemEnabled, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"RadioBox_IsItemShown", (PyCFunction) _wrap_RadioBox_IsItemShown, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"RadioBox_GetColumnCount", (PyCFunction)_wrap_RadioBox_GetColumnCount, METH_O, NULL},
{ (char *)"RadioBox_GetRowCount", (PyCFunction)_wrap_RadioBox_GetRowCount, METH_O, NULL},
{ (char *)"RadioBox_GetNextItem", (PyCFunction) _wrap_RadioBox_GetNextItem, METH_VARARGS | METH_KEYWORDS, NULL},