From d359a38002a9a577fcd7c16ca3ed0f2e874bded7 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sun, 19 Nov 2006 01:12:25 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/gtk/_core.py | 14 +++---- wxPython/src/gtk/_core_wrap.cpp | 72 ++++++++++++++++----------------- wxPython/src/gtk/combo.py | 8 ++-- wxPython/src/gtk/combo_wrap.cpp | 48 ++++++++-------------- wxPython/src/mac/_core.py | 14 +++---- wxPython/src/mac/_core_wrap.cpp | 72 ++++++++++++++++----------------- wxPython/src/mac/combo.py | 8 ++-- wxPython/src/mac/combo_wrap.cpp | 48 ++++++++-------------- wxPython/src/msw/_core.py | 14 +++---- wxPython/src/msw/_core_wrap.cpp | 72 ++++++++++++++++----------------- wxPython/src/msw/combo.py | 8 ++-- wxPython/src/msw/combo_wrap.cpp | 48 ++++++++-------------- 12 files changed, 189 insertions(+), 237 deletions(-) diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index ad1b0401e2..244f6cde11 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -11374,7 +11374,7 @@ class ItemContainer(object): def Insert(*args, **kwargs): """ - Insert(self, String item, unsigned int pos, PyObject clientData=None) -> int + Insert(self, String item, int pos, PyObject clientData=None) -> int Insert an item into the control before the item at the ``pos`` index, optionally associating some data object with the item. @@ -11391,7 +11391,7 @@ class ItemContainer(object): def Delete(*args, **kwargs): """ - Delete(self, unsigned int n) + Delete(self, int n) Deletes the item at the zero-based index 'n' from the control. Note that it is an error (signalled by a `wx.PyAssertionError` exception if @@ -11402,7 +11402,7 @@ class ItemContainer(object): def GetClientData(*args, **kwargs): """ - GetClientData(self, unsigned int n) -> PyObject + GetClientData(self, int n) -> PyObject Returns the client data associated with the given item, (if any.) """ @@ -11410,7 +11410,7 @@ class ItemContainer(object): def SetClientData(*args, **kwargs): """ - SetClientData(self, unsigned int n, PyObject clientData) + SetClientData(self, int n, PyObject clientData) Associate the given client data with the item at position n. """ @@ -11418,7 +11418,7 @@ class ItemContainer(object): def GetCount(*args, **kwargs): """ - GetCount(self) -> unsigned int + GetCount(self) -> int Returns the number of items in the control. """ @@ -11434,7 +11434,7 @@ class ItemContainer(object): def GetString(*args, **kwargs): """ - GetString(self, unsigned int n) -> String + GetString(self, int n) -> String Returns the label of the item with the given index. """ @@ -11446,7 +11446,7 @@ class ItemContainer(object): def SetString(*args, **kwargs): """ - SetString(self, unsigned int n, String s) + SetString(self, int n, String s) Sets the label for the given item. """ diff --git a/wxPython/src/gtk/_core_wrap.cpp b/wxPython/src/gtk/_core_wrap.cpp index fb58a9db3f..938349ff2f 100644 --- a/wxPython/src/gtk/_core_wrap.cpp +++ b/wxPython/src/gtk/_core_wrap.cpp @@ -3998,14 +3998,14 @@ SWIGINTERN int wxItemContainer_Append(wxItemContainer *self,wxString const &item } else return self->Append(item); } -SWIGINTERN int wxItemContainer_Insert(wxItemContainer *self,wxString const &item,unsigned int pos,PyObject *clientData=NULL){ +SWIGINTERN int wxItemContainer_Insert(wxItemContainer *self,wxString const &item,int pos,PyObject *clientData=NULL){ if (clientData) { wxPyClientData* data = new wxPyClientData(clientData); return self->Insert(item, pos, data); } else return self->Insert(item, pos); } -SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,unsigned int n){ +SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,int n){ wxPyClientData* data = (wxPyClientData*)self->GetClientObject(n); if (data) { Py_INCREF(data->m_obj); @@ -4015,7 +4015,7 @@ SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,unsigne return Py_None; } } -SWIGINTERN void wxItemContainer_SetClientData(wxItemContainer *self,unsigned int n,PyObject *clientData){ +SWIGINTERN void wxItemContainer_SetClientData(wxItemContainer *self,int n,PyObject *clientData){ wxPyClientData* data = new wxPyClientData(clientData); self->SetClientObject(n, data); } @@ -47690,13 +47690,13 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Insert(PyObject *SWIGUNUSEDPARM(self), PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; wxString *arg2 = 0 ; - unsigned int arg3 ; + int arg3 ; PyObject *arg4 = (PyObject *) NULL ; int result; void *argp1 = 0 ; int res1 = 0 ; bool temp2 = false ; - unsigned int val3 ; + int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -47717,11 +47717,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Insert(PyObject *SWIGUNUSEDPARM(self), if (arg2 == NULL) SWIG_fail; temp2 = true; } - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ItemContainer_Insert" "', expected argument " "3"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ItemContainer_Insert" "', expected argument " "3"" of type '" "int""'"); } - arg3 = static_cast< unsigned int >(val3); + arg3 = static_cast< int >(val3); if (obj3) { arg4 = obj3; } @@ -47776,10 +47776,10 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_Delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int arg2 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -47793,11 +47793,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Delete(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_Delete" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_Delete" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_Delete" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Delete(arg2); @@ -47814,11 +47814,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetClientData(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int arg2 ; + int arg2 ; PyObject *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -47832,11 +47832,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetClientData(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_GetClientData" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetClientData" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetClientData" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (PyObject *)wxItemContainer_GetClientData(arg1,arg2); @@ -47853,11 +47853,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_SetClientData(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int arg2 ; + int arg2 ; PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -47872,11 +47872,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_SetClientData(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_SetClientData" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetClientData" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetClientData" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); arg3 = obj2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -47894,7 +47894,7 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int result; + int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -47908,11 +47908,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetCount(PyObject *SWIGUNUSEDPARM(self) arg1 = reinterpret_cast< wxItemContainer * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (unsigned int)((wxItemContainer const *)arg1)->GetCount(); + result = (int)((wxItemContainer const *)arg1)->GetCount(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; @@ -47952,11 +47952,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int arg2 ; + int arg2 ; wxString result; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -47970,11 +47970,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetString(PyObject *SWIGUNUSEDPARM(self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_GetString" "', expected argument " "1"" of type '" "wxItemContainer const *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetString" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetString" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = ((wxItemContainer const *)arg1)->GetString(arg2); @@ -48027,11 +48027,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_SetString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int arg2 ; + int arg2 ; wxString *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; bool temp3 = false ; PyObject * obj0 = 0 ; @@ -48047,11 +48047,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_SetString(PyObject *SWIGUNUSEDPARM(self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_SetString" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetString" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetString" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); { arg3 = wxString_in_helper(obj2); if (arg3 == NULL) SWIG_fail; diff --git a/wxPython/src/gtk/combo.py b/wxPython/src/gtk/combo.py index 7191c102ed..c9ed717e85 100644 --- a/wxPython/src/gtk/combo.py +++ b/wxPython/src/gtk/combo.py @@ -2,7 +2,7 @@ # Don't modify this file, modify the SWIG interface instead. """ -ComboCtrl class that can have any type ofconst wxBitmap& bitmap, popup widget, and also an +ComboCtrl class that can have any type of popup widget, and also an owner-drawn combobox control. """ @@ -958,7 +958,7 @@ class BitmapComboBox(OwnerDrawnComboBox): def GetItemBitmap(*args, **kwargs): """ - GetItemBitmap(self, unsigned int n) -> Bitmap + GetItemBitmap(self, int n) -> Bitmap Returns the image of the item with the given index. """ @@ -966,7 +966,7 @@ class BitmapComboBox(OwnerDrawnComboBox): def Insert(*args, **kwargs): """ - Insert(self, String item, Bitmap bitmap, unsigned int pos, PyObject clientData=None) -> int + Insert(self, String item, Bitmap bitmap, int pos, PyObject clientData=None) -> int Insert an item into the control before the item at the ``pos`` index, optionally associating some data object with the item. @@ -975,7 +975,7 @@ class BitmapComboBox(OwnerDrawnComboBox): def SetItemBitmap(*args, **kwargs): """ - SetItemBitmap(self, unsigned int n, Bitmap bitmap) + SetItemBitmap(self, int n, Bitmap bitmap) Sets the image for the given item. """ diff --git a/wxPython/src/gtk/combo_wrap.cpp b/wxPython/src/gtk/combo_wrap.cpp index 06aa806dd6..08d823217c 100644 --- a/wxPython/src/gtk/combo_wrap.cpp +++ b/wxPython/src/gtk/combo_wrap.cpp @@ -3074,23 +3074,7 @@ SWIGINTERN int wxBitmapComboBox_Append(wxBitmapComboBox *self,wxString const &it } else return self->Append(item, bitmap); } - -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 int wxBitmapComboBox_Insert(wxBitmapComboBox *self,wxString const &item,wxBitmap const &bitmap,unsigned int pos,PyObject *clientData=NULL){ +SWIGINTERN int wxBitmapComboBox_Insert(wxBitmapComboBox *self,wxString const &item,wxBitmap const &bitmap,int pos,PyObject *clientData=NULL){ if (clientData) { wxPyClientData* data = new wxPyClientData(clientData); return self->Insert(item, bitmap, pos, data); @@ -7097,11 +7081,11 @@ fail: SWIGINTERN PyObject *_wrap_BitmapComboBox_GetItemBitmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxBitmapComboBox *arg1 = (wxBitmapComboBox *) 0 ; - unsigned int arg2 ; + int arg2 ; wxBitmap result; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -7115,11 +7099,11 @@ SWIGINTERN PyObject *_wrap_BitmapComboBox_GetItemBitmap(PyObject *SWIGUNUSEDPARM SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BitmapComboBox_GetItemBitmap" "', expected argument " "1"" of type '" "wxBitmapComboBox const *""'"); } arg1 = reinterpret_cast< wxBitmapComboBox * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BitmapComboBox_GetItemBitmap" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BitmapComboBox_GetItemBitmap" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = ((wxBitmapComboBox const *)arg1)->GetItemBitmap(arg2); @@ -7138,7 +7122,7 @@ SWIGINTERN PyObject *_wrap_BitmapComboBox_Insert(PyObject *SWIGUNUSEDPARM(self), wxBitmapComboBox *arg1 = (wxBitmapComboBox *) 0 ; wxString *arg2 = 0 ; wxBitmap *arg3 = 0 ; - unsigned int arg4 ; + int arg4 ; PyObject *arg5 = (PyObject *) NULL ; int result; void *argp1 = 0 ; @@ -7146,7 +7130,7 @@ SWIGINTERN PyObject *_wrap_BitmapComboBox_Insert(PyObject *SWIGUNUSEDPARM(self), bool temp2 = false ; void *argp3 = 0 ; int res3 = 0 ; - unsigned int val4 ; + int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -7176,11 +7160,11 @@ SWIGINTERN PyObject *_wrap_BitmapComboBox_Insert(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BitmapComboBox_Insert" "', expected argument " "3"" of type '" "wxBitmap const &""'"); } arg3 = reinterpret_cast< wxBitmap * >(argp3); - ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); + ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BitmapComboBox_Insert" "', expected argument " "4"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BitmapComboBox_Insert" "', expected argument " "4"" of type '" "int""'"); } - arg4 = static_cast< unsigned int >(val4); + arg4 = static_cast< int >(val4); if (obj4) { arg5 = obj4; } @@ -7208,11 +7192,11 @@ fail: SWIGINTERN PyObject *_wrap_BitmapComboBox_SetItemBitmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxBitmapComboBox *arg1 = (wxBitmapComboBox *) 0 ; - unsigned int arg2 ; + int arg2 ; wxBitmap *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; @@ -7229,11 +7213,11 @@ SWIGINTERN PyObject *_wrap_BitmapComboBox_SetItemBitmap(PyObject *SWIGUNUSEDPARM SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BitmapComboBox_SetItemBitmap" "', expected argument " "1"" of type '" "wxBitmapComboBox *""'"); } arg1 = reinterpret_cast< wxBitmapComboBox * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BitmapComboBox_SetItemBitmap" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BitmapComboBox_SetItemBitmap" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_wxBitmap, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BitmapComboBox_SetItemBitmap" "', expected argument " "3"" of type '" "wxBitmap const &""'"); diff --git a/wxPython/src/mac/_core.py b/wxPython/src/mac/_core.py index ad1b0401e2..244f6cde11 100644 --- a/wxPython/src/mac/_core.py +++ b/wxPython/src/mac/_core.py @@ -11374,7 +11374,7 @@ class ItemContainer(object): def Insert(*args, **kwargs): """ - Insert(self, String item, unsigned int pos, PyObject clientData=None) -> int + Insert(self, String item, int pos, PyObject clientData=None) -> int Insert an item into the control before the item at the ``pos`` index, optionally associating some data object with the item. @@ -11391,7 +11391,7 @@ class ItemContainer(object): def Delete(*args, **kwargs): """ - Delete(self, unsigned int n) + Delete(self, int n) Deletes the item at the zero-based index 'n' from the control. Note that it is an error (signalled by a `wx.PyAssertionError` exception if @@ -11402,7 +11402,7 @@ class ItemContainer(object): def GetClientData(*args, **kwargs): """ - GetClientData(self, unsigned int n) -> PyObject + GetClientData(self, int n) -> PyObject Returns the client data associated with the given item, (if any.) """ @@ -11410,7 +11410,7 @@ class ItemContainer(object): def SetClientData(*args, **kwargs): """ - SetClientData(self, unsigned int n, PyObject clientData) + SetClientData(self, int n, PyObject clientData) Associate the given client data with the item at position n. """ @@ -11418,7 +11418,7 @@ class ItemContainer(object): def GetCount(*args, **kwargs): """ - GetCount(self) -> unsigned int + GetCount(self) -> int Returns the number of items in the control. """ @@ -11434,7 +11434,7 @@ class ItemContainer(object): def GetString(*args, **kwargs): """ - GetString(self, unsigned int n) -> String + GetString(self, int n) -> String Returns the label of the item with the given index. """ @@ -11446,7 +11446,7 @@ class ItemContainer(object): def SetString(*args, **kwargs): """ - SetString(self, unsigned int n, String s) + SetString(self, int n, String s) Sets the label for the given item. """ diff --git a/wxPython/src/mac/_core_wrap.cpp b/wxPython/src/mac/_core_wrap.cpp index 3d6e2fc8e4..2da13f47c2 100644 --- a/wxPython/src/mac/_core_wrap.cpp +++ b/wxPython/src/mac/_core_wrap.cpp @@ -3997,14 +3997,14 @@ SWIGINTERN int wxItemContainer_Append(wxItemContainer *self,wxString const &item } else return self->Append(item); } -SWIGINTERN int wxItemContainer_Insert(wxItemContainer *self,wxString const &item,unsigned int pos,PyObject *clientData=NULL){ +SWIGINTERN int wxItemContainer_Insert(wxItemContainer *self,wxString const &item,int pos,PyObject *clientData=NULL){ if (clientData) { wxPyClientData* data = new wxPyClientData(clientData); return self->Insert(item, pos, data); } else return self->Insert(item, pos); } -SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,unsigned int n){ +SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,int n){ wxPyClientData* data = (wxPyClientData*)self->GetClientObject(n); if (data) { Py_INCREF(data->m_obj); @@ -4014,7 +4014,7 @@ SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,unsigne return Py_None; } } -SWIGINTERN void wxItemContainer_SetClientData(wxItemContainer *self,unsigned int n,PyObject *clientData){ +SWIGINTERN void wxItemContainer_SetClientData(wxItemContainer *self,int n,PyObject *clientData){ wxPyClientData* data = new wxPyClientData(clientData); self->SetClientObject(n, data); } @@ -47689,13 +47689,13 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Insert(PyObject *SWIGUNUSEDPARM(self), PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; wxString *arg2 = 0 ; - unsigned int arg3 ; + int arg3 ; PyObject *arg4 = (PyObject *) NULL ; int result; void *argp1 = 0 ; int res1 = 0 ; bool temp2 = false ; - unsigned int val3 ; + int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -47716,11 +47716,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Insert(PyObject *SWIGUNUSEDPARM(self), if (arg2 == NULL) SWIG_fail; temp2 = true; } - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ItemContainer_Insert" "', expected argument " "3"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ItemContainer_Insert" "', expected argument " "3"" of type '" "int""'"); } - arg3 = static_cast< unsigned int >(val3); + arg3 = static_cast< int >(val3); if (obj3) { arg4 = obj3; } @@ -47775,10 +47775,10 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_Delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int arg2 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -47792,11 +47792,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Delete(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_Delete" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_Delete" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_Delete" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Delete(arg2); @@ -47813,11 +47813,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetClientData(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int arg2 ; + int arg2 ; PyObject *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -47831,11 +47831,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetClientData(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_GetClientData" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetClientData" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetClientData" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (PyObject *)wxItemContainer_GetClientData(arg1,arg2); @@ -47852,11 +47852,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_SetClientData(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int arg2 ; + int arg2 ; PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -47871,11 +47871,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_SetClientData(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_SetClientData" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetClientData" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetClientData" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); arg3 = obj2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -47893,7 +47893,7 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int result; + int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -47907,11 +47907,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetCount(PyObject *SWIGUNUSEDPARM(self) arg1 = reinterpret_cast< wxItemContainer * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (unsigned int)((wxItemContainer const *)arg1)->GetCount(); + result = (int)((wxItemContainer const *)arg1)->GetCount(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; @@ -47951,11 +47951,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int arg2 ; + int arg2 ; wxString result; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -47969,11 +47969,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetString(PyObject *SWIGUNUSEDPARM(self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_GetString" "', expected argument " "1"" of type '" "wxItemContainer const *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetString" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetString" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = ((wxItemContainer const *)arg1)->GetString(arg2); @@ -48026,11 +48026,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_SetString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int arg2 ; + int arg2 ; wxString *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; bool temp3 = false ; PyObject * obj0 = 0 ; @@ -48046,11 +48046,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_SetString(PyObject *SWIGUNUSEDPARM(self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_SetString" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetString" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetString" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); { arg3 = wxString_in_helper(obj2); if (arg3 == NULL) SWIG_fail; diff --git a/wxPython/src/mac/combo.py b/wxPython/src/mac/combo.py index 7191c102ed..c9ed717e85 100644 --- a/wxPython/src/mac/combo.py +++ b/wxPython/src/mac/combo.py @@ -2,7 +2,7 @@ # Don't modify this file, modify the SWIG interface instead. """ -ComboCtrl class that can have any type ofconst wxBitmap& bitmap, popup widget, and also an +ComboCtrl class that can have any type of popup widget, and also an owner-drawn combobox control. """ @@ -958,7 +958,7 @@ class BitmapComboBox(OwnerDrawnComboBox): def GetItemBitmap(*args, **kwargs): """ - GetItemBitmap(self, unsigned int n) -> Bitmap + GetItemBitmap(self, int n) -> Bitmap Returns the image of the item with the given index. """ @@ -966,7 +966,7 @@ class BitmapComboBox(OwnerDrawnComboBox): def Insert(*args, **kwargs): """ - Insert(self, String item, Bitmap bitmap, unsigned int pos, PyObject clientData=None) -> int + Insert(self, String item, Bitmap bitmap, int pos, PyObject clientData=None) -> int Insert an item into the control before the item at the ``pos`` index, optionally associating some data object with the item. @@ -975,7 +975,7 @@ class BitmapComboBox(OwnerDrawnComboBox): def SetItemBitmap(*args, **kwargs): """ - SetItemBitmap(self, unsigned int n, Bitmap bitmap) + SetItemBitmap(self, int n, Bitmap bitmap) Sets the image for the given item. """ diff --git a/wxPython/src/mac/combo_wrap.cpp b/wxPython/src/mac/combo_wrap.cpp index d11c4fc580..cfe14bceb3 100644 --- a/wxPython/src/mac/combo_wrap.cpp +++ b/wxPython/src/mac/combo_wrap.cpp @@ -3074,23 +3074,7 @@ SWIGINTERN int wxBitmapComboBox_Append(wxBitmapComboBox *self,wxString const &it } else return self->Append(item, bitmap); } - -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 int wxBitmapComboBox_Insert(wxBitmapComboBox *self,wxString const &item,wxBitmap const &bitmap,unsigned int pos,PyObject *clientData=NULL){ +SWIGINTERN int wxBitmapComboBox_Insert(wxBitmapComboBox *self,wxString const &item,wxBitmap const &bitmap,int pos,PyObject *clientData=NULL){ if (clientData) { wxPyClientData* data = new wxPyClientData(clientData); return self->Insert(item, bitmap, pos, data); @@ -7097,11 +7081,11 @@ fail: SWIGINTERN PyObject *_wrap_BitmapComboBox_GetItemBitmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxBitmapComboBox *arg1 = (wxBitmapComboBox *) 0 ; - unsigned int arg2 ; + int arg2 ; wxBitmap result; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -7115,11 +7099,11 @@ SWIGINTERN PyObject *_wrap_BitmapComboBox_GetItemBitmap(PyObject *SWIGUNUSEDPARM SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BitmapComboBox_GetItemBitmap" "', expected argument " "1"" of type '" "wxBitmapComboBox const *""'"); } arg1 = reinterpret_cast< wxBitmapComboBox * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BitmapComboBox_GetItemBitmap" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BitmapComboBox_GetItemBitmap" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = ((wxBitmapComboBox const *)arg1)->GetItemBitmap(arg2); @@ -7138,7 +7122,7 @@ SWIGINTERN PyObject *_wrap_BitmapComboBox_Insert(PyObject *SWIGUNUSEDPARM(self), wxBitmapComboBox *arg1 = (wxBitmapComboBox *) 0 ; wxString *arg2 = 0 ; wxBitmap *arg3 = 0 ; - unsigned int arg4 ; + int arg4 ; PyObject *arg5 = (PyObject *) NULL ; int result; void *argp1 = 0 ; @@ -7146,7 +7130,7 @@ SWIGINTERN PyObject *_wrap_BitmapComboBox_Insert(PyObject *SWIGUNUSEDPARM(self), bool temp2 = false ; void *argp3 = 0 ; int res3 = 0 ; - unsigned int val4 ; + int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -7176,11 +7160,11 @@ SWIGINTERN PyObject *_wrap_BitmapComboBox_Insert(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BitmapComboBox_Insert" "', expected argument " "3"" of type '" "wxBitmap const &""'"); } arg3 = reinterpret_cast< wxBitmap * >(argp3); - ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); + ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BitmapComboBox_Insert" "', expected argument " "4"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BitmapComboBox_Insert" "', expected argument " "4"" of type '" "int""'"); } - arg4 = static_cast< unsigned int >(val4); + arg4 = static_cast< int >(val4); if (obj4) { arg5 = obj4; } @@ -7208,11 +7192,11 @@ fail: SWIGINTERN PyObject *_wrap_BitmapComboBox_SetItemBitmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxBitmapComboBox *arg1 = (wxBitmapComboBox *) 0 ; - unsigned int arg2 ; + int arg2 ; wxBitmap *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; @@ -7229,11 +7213,11 @@ SWIGINTERN PyObject *_wrap_BitmapComboBox_SetItemBitmap(PyObject *SWIGUNUSEDPARM SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BitmapComboBox_SetItemBitmap" "', expected argument " "1"" of type '" "wxBitmapComboBox *""'"); } arg1 = reinterpret_cast< wxBitmapComboBox * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BitmapComboBox_SetItemBitmap" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BitmapComboBox_SetItemBitmap" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_wxBitmap, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BitmapComboBox_SetItemBitmap" "', expected argument " "3"" of type '" "wxBitmap const &""'"); diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index f1b2555834..4e41401967 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -11378,7 +11378,7 @@ class ItemContainer(object): def Insert(*args, **kwargs): """ - Insert(self, String item, unsigned int pos, PyObject clientData=None) -> int + Insert(self, String item, int pos, PyObject clientData=None) -> int Insert an item into the control before the item at the ``pos`` index, optionally associating some data object with the item. @@ -11395,7 +11395,7 @@ class ItemContainer(object): def Delete(*args, **kwargs): """ - Delete(self, unsigned int n) + Delete(self, int n) Deletes the item at the zero-based index 'n' from the control. Note that it is an error (signalled by a `wx.PyAssertionError` exception if @@ -11406,7 +11406,7 @@ class ItemContainer(object): def GetClientData(*args, **kwargs): """ - GetClientData(self, unsigned int n) -> PyObject + GetClientData(self, int n) -> PyObject Returns the client data associated with the given item, (if any.) """ @@ -11414,7 +11414,7 @@ class ItemContainer(object): def SetClientData(*args, **kwargs): """ - SetClientData(self, unsigned int n, PyObject clientData) + SetClientData(self, int n, PyObject clientData) Associate the given client data with the item at position n. """ @@ -11422,7 +11422,7 @@ class ItemContainer(object): def GetCount(*args, **kwargs): """ - GetCount(self) -> unsigned int + GetCount(self) -> int Returns the number of items in the control. """ @@ -11438,7 +11438,7 @@ class ItemContainer(object): def GetString(*args, **kwargs): """ - GetString(self, unsigned int n) -> String + GetString(self, int n) -> String Returns the label of the item with the given index. """ @@ -11450,7 +11450,7 @@ class ItemContainer(object): def SetString(*args, **kwargs): """ - SetString(self, unsigned int n, String s) + SetString(self, int n, String s) Sets the label for the given item. """ diff --git a/wxPython/src/msw/_core_wrap.cpp b/wxPython/src/msw/_core_wrap.cpp index 1ab0ed448b..575b236c67 100644 --- a/wxPython/src/msw/_core_wrap.cpp +++ b/wxPython/src/msw/_core_wrap.cpp @@ -3982,14 +3982,14 @@ SWIGINTERN int wxItemContainer_Append(wxItemContainer *self,wxString const &item } else return self->Append(item); } -SWIGINTERN int wxItemContainer_Insert(wxItemContainer *self,wxString const &item,unsigned int pos,PyObject *clientData=NULL){ +SWIGINTERN int wxItemContainer_Insert(wxItemContainer *self,wxString const &item,int pos,PyObject *clientData=NULL){ if (clientData) { wxPyClientData* data = new wxPyClientData(clientData); return self->Insert(item, pos, data); } else return self->Insert(item, pos); } -SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,unsigned int n){ +SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,int n){ wxPyClientData* data = (wxPyClientData*)self->GetClientObject(n); if (data) { Py_INCREF(data->m_obj); @@ -3999,7 +3999,7 @@ SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,unsigne return Py_None; } } -SWIGINTERN void wxItemContainer_SetClientData(wxItemContainer *self,unsigned int n,PyObject *clientData){ +SWIGINTERN void wxItemContainer_SetClientData(wxItemContainer *self,int n,PyObject *clientData){ wxPyClientData* data = new wxPyClientData(clientData); self->SetClientObject(n, data); } @@ -47715,13 +47715,13 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Insert(PyObject *SWIGUNUSEDPARM(self), PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; wxString *arg2 = 0 ; - unsigned int arg3 ; + int arg3 ; PyObject *arg4 = (PyObject *) NULL ; int result; void *argp1 = 0 ; int res1 = 0 ; bool temp2 = false ; - unsigned int val3 ; + int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -47742,11 +47742,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Insert(PyObject *SWIGUNUSEDPARM(self), if (arg2 == NULL) SWIG_fail; temp2 = true; } - ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ItemContainer_Insert" "', expected argument " "3"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ItemContainer_Insert" "', expected argument " "3"" of type '" "int""'"); } - arg3 = static_cast< unsigned int >(val3); + arg3 = static_cast< int >(val3); if (obj3) { arg4 = obj3; } @@ -47801,10 +47801,10 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_Delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int arg2 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -47818,11 +47818,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Delete(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_Delete" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_Delete" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_Delete" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Delete(arg2); @@ -47839,11 +47839,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetClientData(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int arg2 ; + int arg2 ; PyObject *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -47857,11 +47857,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetClientData(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_GetClientData" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetClientData" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetClientData" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (PyObject *)wxItemContainer_GetClientData(arg1,arg2); @@ -47878,11 +47878,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_SetClientData(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int arg2 ; + int arg2 ; PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -47897,11 +47897,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_SetClientData(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_SetClientData" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetClientData" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetClientData" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); arg3 = obj2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -47919,7 +47919,7 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int result; + int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -47933,11 +47933,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetCount(PyObject *SWIGUNUSEDPARM(self) arg1 = reinterpret_cast< wxItemContainer * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (unsigned int)((wxItemContainer const *)arg1)->GetCount(); + result = (int)((wxItemContainer const *)arg1)->GetCount(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; @@ -47977,11 +47977,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int arg2 ; + int arg2 ; wxString result; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -47995,11 +47995,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetString(PyObject *SWIGUNUSEDPARM(self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_GetString" "', expected argument " "1"" of type '" "wxItemContainer const *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetString" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetString" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = ((wxItemContainer const *)arg1)->GetString(arg2); @@ -48052,11 +48052,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_SetString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - unsigned int arg2 ; + int arg2 ; wxString *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; bool temp3 = false ; PyObject * obj0 = 0 ; @@ -48072,11 +48072,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_SetString(PyObject *SWIGUNUSEDPARM(self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_SetString" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetString" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetString" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); { arg3 = wxString_in_helper(obj2); if (arg3 == NULL) SWIG_fail; diff --git a/wxPython/src/msw/combo.py b/wxPython/src/msw/combo.py index 7191c102ed..c9ed717e85 100644 --- a/wxPython/src/msw/combo.py +++ b/wxPython/src/msw/combo.py @@ -2,7 +2,7 @@ # Don't modify this file, modify the SWIG interface instead. """ -ComboCtrl class that can have any type ofconst wxBitmap& bitmap, popup widget, and also an +ComboCtrl class that can have any type of popup widget, and also an owner-drawn combobox control. """ @@ -958,7 +958,7 @@ class BitmapComboBox(OwnerDrawnComboBox): def GetItemBitmap(*args, **kwargs): """ - GetItemBitmap(self, unsigned int n) -> Bitmap + GetItemBitmap(self, int n) -> Bitmap Returns the image of the item with the given index. """ @@ -966,7 +966,7 @@ class BitmapComboBox(OwnerDrawnComboBox): def Insert(*args, **kwargs): """ - Insert(self, String item, Bitmap bitmap, unsigned int pos, PyObject clientData=None) -> int + Insert(self, String item, Bitmap bitmap, int pos, PyObject clientData=None) -> int Insert an item into the control before the item at the ``pos`` index, optionally associating some data object with the item. @@ -975,7 +975,7 @@ class BitmapComboBox(OwnerDrawnComboBox): def SetItemBitmap(*args, **kwargs): """ - SetItemBitmap(self, unsigned int n, Bitmap bitmap) + SetItemBitmap(self, int n, Bitmap bitmap) Sets the image for the given item. """ diff --git a/wxPython/src/msw/combo_wrap.cpp b/wxPython/src/msw/combo_wrap.cpp index 06aa806dd6..08d823217c 100644 --- a/wxPython/src/msw/combo_wrap.cpp +++ b/wxPython/src/msw/combo_wrap.cpp @@ -3074,23 +3074,7 @@ SWIGINTERN int wxBitmapComboBox_Append(wxBitmapComboBox *self,wxString const &it } else return self->Append(item, bitmap); } - -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 int wxBitmapComboBox_Insert(wxBitmapComboBox *self,wxString const &item,wxBitmap const &bitmap,unsigned int pos,PyObject *clientData=NULL){ +SWIGINTERN int wxBitmapComboBox_Insert(wxBitmapComboBox *self,wxString const &item,wxBitmap const &bitmap,int pos,PyObject *clientData=NULL){ if (clientData) { wxPyClientData* data = new wxPyClientData(clientData); return self->Insert(item, bitmap, pos, data); @@ -7097,11 +7081,11 @@ fail: SWIGINTERN PyObject *_wrap_BitmapComboBox_GetItemBitmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxBitmapComboBox *arg1 = (wxBitmapComboBox *) 0 ; - unsigned int arg2 ; + int arg2 ; wxBitmap result; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -7115,11 +7099,11 @@ SWIGINTERN PyObject *_wrap_BitmapComboBox_GetItemBitmap(PyObject *SWIGUNUSEDPARM SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BitmapComboBox_GetItemBitmap" "', expected argument " "1"" of type '" "wxBitmapComboBox const *""'"); } arg1 = reinterpret_cast< wxBitmapComboBox * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BitmapComboBox_GetItemBitmap" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BitmapComboBox_GetItemBitmap" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = ((wxBitmapComboBox const *)arg1)->GetItemBitmap(arg2); @@ -7138,7 +7122,7 @@ SWIGINTERN PyObject *_wrap_BitmapComboBox_Insert(PyObject *SWIGUNUSEDPARM(self), wxBitmapComboBox *arg1 = (wxBitmapComboBox *) 0 ; wxString *arg2 = 0 ; wxBitmap *arg3 = 0 ; - unsigned int arg4 ; + int arg4 ; PyObject *arg5 = (PyObject *) NULL ; int result; void *argp1 = 0 ; @@ -7146,7 +7130,7 @@ SWIGINTERN PyObject *_wrap_BitmapComboBox_Insert(PyObject *SWIGUNUSEDPARM(self), bool temp2 = false ; void *argp3 = 0 ; int res3 = 0 ; - unsigned int val4 ; + int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -7176,11 +7160,11 @@ SWIGINTERN PyObject *_wrap_BitmapComboBox_Insert(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BitmapComboBox_Insert" "', expected argument " "3"" of type '" "wxBitmap const &""'"); } arg3 = reinterpret_cast< wxBitmap * >(argp3); - ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); + ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BitmapComboBox_Insert" "', expected argument " "4"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BitmapComboBox_Insert" "', expected argument " "4"" of type '" "int""'"); } - arg4 = static_cast< unsigned int >(val4); + arg4 = static_cast< int >(val4); if (obj4) { arg5 = obj4; } @@ -7208,11 +7192,11 @@ fail: SWIGINTERN PyObject *_wrap_BitmapComboBox_SetItemBitmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxBitmapComboBox *arg1 = (wxBitmapComboBox *) 0 ; - unsigned int arg2 ; + int arg2 ; wxBitmap *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + int val2 ; int ecode2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; @@ -7229,11 +7213,11 @@ SWIGINTERN PyObject *_wrap_BitmapComboBox_SetItemBitmap(PyObject *SWIGUNUSEDPARM SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BitmapComboBox_SetItemBitmap" "', expected argument " "1"" of type '" "wxBitmapComboBox *""'"); } arg1 = reinterpret_cast< wxBitmapComboBox * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BitmapComboBox_SetItemBitmap" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BitmapComboBox_SetItemBitmap" "', expected argument " "2"" of type '" "int""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< int >(val2); res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_wxBitmap, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BitmapComboBox_SetItemBitmap" "', expected argument " "3"" of type '" "wxBitmap const &""'"); -- 2.45.2