X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1fc3b23ad778b95a377066ed7c914a373dd818c0..94fd5e4dc14c5de8a0a787eda125987616ace638:/wxPython/src/gtk/_core_wrap.cpp diff --git a/wxPython/src/gtk/_core_wrap.cpp b/wxPython/src/gtk/_core_wrap.cpp index ee85e5fe70..397b3dee31 100644 --- a/wxPython/src/gtk/_core_wrap.cpp +++ b/wxPython/src/gtk/_core_wrap.cpp @@ -1256,6 +1256,23 @@ wxImage *new_wxImage(int width,int height,unsigned char *data){ memcpy(copy, data, width*height*3); return new wxImage(width, height, copy, false); } +wxImage *new_wxImage(int width,int height,unsigned char *data,unsigned char *alpha){ + // Copy the source data so the wxImage can clean it up later + unsigned char* dcopy = (unsigned char*)malloc(width*height*3); + if (dcopy == NULL) { + PyErr_NoMemory(); + return NULL; + } + memcpy(dcopy, data, width*height*3); + unsigned char* acopy = (unsigned char*)malloc(width*height); + if (acopy == NULL) { + PyErr_NoMemory(); + return NULL; + } + memcpy(acopy, alpha, width*height); + + return new wxImage(width, height, dcopy, acopy, false); + } wxSize wxImage_GetSize(wxImage *self){ wxSize size(self->GetWidth(), self->GetHeight()); return size; @@ -1539,6 +1556,42 @@ int PyApp_GetComCtl32Version(){ wxPyRaiseNotImplemented(); return 0; } wxPyApp* wxPyGetApp() { return (wxPyApp*)wxTheApp; } +SWIGSTATICINLINE(int) +SWIG_AsCharPtr(PyObject *obj, char **val) +{ + char* cptr = 0; + if (SWIG_AsCharPtrAndSize(obj, &cptr, (size_t*)(0))) { + if (val) *val = cptr; + return 1; + } + if (val) { + PyErr_SetString(PyExc_TypeError, "a char* is expected"); + } + return 0; +} + + +SWIGSTATICINLINE(PyObject *) +SWIG_FromCharPtr(const char* cptr) +{ + if (cptr) { + size_t size = strlen(cptr); + if (size > INT_MAX) { + return SWIG_NewPointerObj(swig_const_cast(cptr,char*), + SWIG_TypeQuery("char *"), 0); + } else { + if (size != 0) { + return PyString_FromStringAndSize(cptr, size); + } else { + return PyString_FromString(cptr); + } + } + } + Py_INCREF(Py_None); + return Py_None; +} + + #ifdef __WXMAC__ // A dummy class that raises an exception if used... @@ -1848,7 +1901,7 @@ void wxSizer__setOORInfo(wxSizer *self,PyObject *_self){ if (!self->GetClientObject()) self->SetClientObject(new wxPyOORClientData(_self)); } -void wxSizer_Add(wxSizer *self,PyObject *item,int proportion,int flag,int border,PyObject *userData){ +wxSizerItem *wxSizer_Add(wxSizer *self,PyObject *item,int proportion,int flag,int border,PyObject *userData){ wxPyUserData* data = NULL; bool blocked = wxPyBeginBlockThreads(); @@ -1859,14 +1912,16 @@ void wxSizer_Add(wxSizer *self,PyObject *item,int proportion,int flag,int border // Now call the real Add method if a valid item type was found if ( info.window ) - self->Add(info.window, proportion, flag, border, data); + return self->Add(info.window, proportion, flag, border, data); else if ( info.sizer ) - self->Add(info.sizer, proportion, flag, border, data); + return self->Add(info.sizer, proportion, flag, border, data); else if (info.gotSize) - self->Add(info.size.GetWidth(), info.size.GetHeight(), - proportion, flag, border, data); + return self->Add(info.size.GetWidth(), info.size.GetHeight(), + proportion, flag, border, data); + else + return NULL; } -void wxSizer_Insert(wxSizer *self,int before,PyObject *item,int proportion,int flag,int border,PyObject *userData){ +wxSizerItem *wxSizer_Insert(wxSizer *self,int before,PyObject *item,int proportion,int flag,int border,PyObject *userData){ wxPyUserData* data = NULL; bool blocked = wxPyBeginBlockThreads(); @@ -1877,14 +1932,16 @@ void wxSizer_Insert(wxSizer *self,int before,PyObject *item,int proportion,int f // Now call the real Insert method if a valid item type was found if ( info.window ) - self->Insert(before, info.window, proportion, flag, border, data); + return self->Insert(before, info.window, proportion, flag, border, data); else if ( info.sizer ) - self->Insert(before, info.sizer, proportion, flag, border, data); + return self->Insert(before, info.sizer, proportion, flag, border, data); else if (info.gotSize) - self->Insert(before, info.size.GetWidth(), info.size.GetHeight(), - proportion, flag, border, data); + return self->Insert(before, info.size.GetWidth(), info.size.GetHeight(), + proportion, flag, border, data); + else + return NULL; } -void wxSizer_Prepend(wxSizer *self,PyObject *item,int proportion,int flag,int border,PyObject *userData){ +wxSizerItem *wxSizer_Prepend(wxSizer *self,PyObject *item,int proportion,int flag,int border,PyObject *userData){ wxPyUserData* data = NULL; bool blocked = wxPyBeginBlockThreads(); @@ -1895,12 +1952,14 @@ void wxSizer_Prepend(wxSizer *self,PyObject *item,int proportion,int flag,int bo // Now call the real Prepend method if a valid item type was found if ( info.window ) - self->Prepend(info.window, proportion, flag, border, data); + return self->Prepend(info.window, proportion, flag, border, data); else if ( info.sizer ) - self->Prepend(info.sizer, proportion, flag, border, data); + return self->Prepend(info.sizer, proportion, flag, border, data); else if (info.gotSize) - self->Prepend(info.size.GetWidth(), info.size.GetHeight(), - proportion, flag, border, data); + return self->Prepend(info.size.GetWidth(), info.size.GetHeight(), + proportion, flag, border, data); + else + return NULL; } bool wxSizer_Remove(wxSizer *self,PyObject *item){ bool blocked = wxPyBeginBlockThreads(); @@ -1928,6 +1987,19 @@ bool wxSizer_Detach(wxSizer *self,PyObject *item){ else return false; } +wxSizerItem *wxSizer_GetItem(wxSizer *self,PyObject *item){ + bool blocked = wxPyBeginBlockThreads(); + wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true); + wxPyEndBlockThreads(blocked); + if ( info.window ) + return self->GetItem(info.window); + else if ( info.sizer ) + return self->GetItem(info.sizer); + else if ( info.gotPos ) + return self->GetItem(info.pos); + else + return NULL; + } void wxSizer__SetItemMinSize(wxSizer *self,PyObject *item,wxSize const &size){ bool blocked = wxPyBeginBlockThreads(); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true); @@ -2053,7 +2125,7 @@ wxGBPosition wxGBSizerItem_GetEndPos(wxGBSizerItem *self){ self->GetEndPos(row, col); return wxGBPosition(row, col); } -bool wxGridBagSizer_Add(wxGridBagSizer *self,PyObject *item,wxGBPosition const &pos,wxGBSpan const &span,int flag,int border,PyObject *userData){ +wxGBSizerItem *wxGridBagSizer_Add(wxGridBagSizer *self,PyObject *item,wxGBPosition const &pos,wxGBSpan const &span,int flag,int border,PyObject *userData){ wxPyUserData* data = NULL; bool blocked = wxPyBeginBlockThreads(); @@ -2064,13 +2136,13 @@ bool wxGridBagSizer_Add(wxGridBagSizer *self,PyObject *item,wxGBPosition const & // Now call the real Add method if a valid item type was found if ( info.window ) - return self->Add(info.window, pos, span, flag, border, data); + return (wxGBSizerItem*)self->Add(info.window, pos, span, flag, border, data); else if ( info.sizer ) - return self->Add(info.sizer, pos, span, flag, border, data); + return (wxGBSizerItem*)self->Add(info.sizer, pos, span, flag, border, data); else if (info.gotSize) - return self->Add(info.size.GetWidth(), info.size.GetHeight(), - pos, span, flag, border, data); - return false; + return (wxGBSizerItem*)self->Add(info.size.GetWidth(), info.size.GetHeight(), + pos, span, flag, border, data); + return NULL; } @@ -3662,6 +3734,35 @@ static PyObject *_wrap_new_RectPS(PyObject *, PyObject *args, PyObject *kwargs) } +static PyObject *_wrap_new_RectS(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxSize *arg1 = 0 ; + wxRect *result; + wxSize temp1 ; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "size", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_RectS",kwnames,&obj0)) goto fail; + { + arg1 = &temp1; + if ( ! wxSize_helper(obj0, &arg1)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxRect *)new wxRect((wxSize const &)*arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxRect, 1); + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_delete_Rect(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxRect *arg1 = (wxRect *) 0 ; @@ -4518,7 +4619,7 @@ static PyObject *_wrap_Rect_Intersect(PyObject *, PyObject *args, PyObject *kwar PyObject *resultobj; wxRect *arg1 = (wxRect *) 0 ; wxRect *arg2 = 0 ; - wxRect *result; + wxRect result; wxRect temp2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -4535,15 +4636,53 @@ static PyObject *_wrap_Rect_Intersect(PyObject *, PyObject *args, PyObject *kwar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - { - wxRect &_result_ref = (arg1)->Intersect((wxRect const &)*arg2); - result = (wxRect *) &_result_ref; - } + result = (arg1)->Intersect((wxRect const &)*arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxRect, 0); + { + wxRect * resultptr; + resultptr = new wxRect((wxRect &) result); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxRect, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Rect_Union(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxRect *arg1 = (wxRect *) 0 ; + wxRect *arg2 = 0 ; + wxRect result; + wxRect temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "rect", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Rect_Union",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxRect, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxRect_helper(obj1, &arg2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (arg1)->Union((wxRect const &)*arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + wxRect * resultptr; + resultptr = new wxRect((wxRect &) result); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxRect, 1); + } return resultobj; fail: return NULL; @@ -5957,6 +6096,31 @@ static PyObject *_wrap_new_InputStream(PyObject *, PyObject *args, PyObject *kwa } +static PyObject *_wrap_delete_InputStream(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxPyInputStream *arg1 = (wxPyInputStream *) 0 ; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:delete_InputStream",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyInputStream, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete arg1; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_InputStream_close(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxPyInputStream *arg1 = (wxPyInputStream *) 0 ; @@ -6616,7 +6780,7 @@ static PyObject *_wrap_FSFile_GetStream(PyObject *, PyObject *args, PyObject *kw if (result) { _ptr = new wxPyInputStream(result); } - resultobj = wxPyConstructObject(_ptr, wxT("wxPyInputStream"), true); + resultobj = wxPyConstructObject(_ptr, wxT("wxPyInputStream"), 0); } return resultobj; fail: @@ -9205,6 +9369,44 @@ static PyObject *_wrap_new_ImageFromData(PyObject *, PyObject *args, PyObject *k } +static PyObject *_wrap_new_ImageFromDataWithAlpha(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + int arg1 ; + int arg2 ; + unsigned char *arg3 = (unsigned char *) 0 ; + unsigned char *arg4 = (unsigned char *) 0 ; + wxImage *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char *kwnames[] = { + (char *) "width",(char *) "height",(char *) "data",(char *) "alpha", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:new_ImageFromDataWithAlpha",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; + arg1 = (int)SWIG_As_int(obj0); + if (PyErr_Occurred()) SWIG_fail; + arg2 = (int)SWIG_As_int(obj1); + if (PyErr_Occurred()) SWIG_fail; + if ((SWIG_ConvertPtr(obj2,(void **)(&arg3),SWIGTYPE_p_unsigned_char, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_unsigned_char, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxImage *)new_wxImage(arg1,arg2,arg3,arg4); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxImage, 1); + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Image_Create(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxImage *arg1 = (wxImage *) 0 ; @@ -9720,6 +9922,46 @@ static PyObject *_wrap_Image_ConvertAlphaToMask(PyObject *, PyObject *args, PyOb } +static PyObject *_wrap_Image_ConvertColourToAlpha(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxImage *arg1 = (wxImage *) 0 ; + unsigned char arg2 ; + unsigned char arg3 ; + unsigned char arg4 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "r",(char *) "g",(char *) "b", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Image_ConvertColourToAlpha",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxImage, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + arg2 = (unsigned char)SWIG_As_unsigned_SS_char(obj1); + if (PyErr_Occurred()) SWIG_fail; + arg3 = (unsigned char)SWIG_As_unsigned_SS_char(obj2); + if (PyErr_Occurred()) SWIG_fail; + arg4 = (unsigned char)SWIG_As_unsigned_SS_char(obj3); + if (PyErr_Occurred()) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)(arg1)->ConvertColourToAlpha(arg2,arg3,arg4); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Image_SetMaskFromImage(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxImage *arg1 = (wxImage *) 0 ; @@ -21263,6 +21505,52 @@ static PyObject *_wrap_GetApp(PyObject *, PyObject *args, PyObject *kwargs) { } +static PyObject *_wrap_SetDefaultPyEncoding(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + char *arg1 ; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "encoding", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SetDefaultPyEncoding",kwnames,&obj0)) goto fail; + if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSetDefaultPyEncoding((char const *)arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_GetDefaultPyEncoding(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + char *result; + char *kwnames[] = { + NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetDefaultPyEncoding",kwnames)) goto fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (char *)wxGetDefaultPyEncoding(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_FromCharPtr(result); + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_new_EventLoop(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxEventLoop *result; @@ -34911,6 +35199,36 @@ static PyObject *_wrap_SizerItem_GetRatio(PyObject *, PyObject *args, PyObject * } +static PyObject *_wrap_SizerItem_GetRect(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxSizerItem *arg1 = (wxSizerItem *) 0 ; + wxRect result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SizerItem_GetRect",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSizerItem, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (arg1)->GetRect(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + wxRect * resultptr; + resultptr = new wxRect((wxRect &) result); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxRect, 1); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_SizerItem_IsWindow(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxSizerItem *arg1 = (wxSizerItem *) 0 ; @@ -35491,6 +35809,7 @@ static PyObject *_wrap_Sizer_Add(PyObject *, PyObject *args, PyObject *kwargs) { int arg4 = (int) 0 ; int arg5 = (int) 0 ; PyObject *arg6 = (PyObject *) NULL ; + wxSizerItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; @@ -35522,12 +35841,12 @@ static PyObject *_wrap_Sizer_Add(PyObject *, PyObject *args, PyObject *kwargs) { } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_Add(arg1,arg2,arg3,arg4,arg5,arg6); + result = (wxSizerItem *)wxSizer_Add(arg1,arg2,arg3,arg4,arg5,arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxSizerItem, 0); return resultobj; fail: return NULL; @@ -35543,6 +35862,7 @@ static PyObject *_wrap_Sizer_Insert(PyObject *, PyObject *args, PyObject *kwargs int arg5 = (int) 0 ; int arg6 = (int) 0 ; PyObject *arg7 = (PyObject *) NULL ; + wxSizerItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; @@ -35577,12 +35897,12 @@ static PyObject *_wrap_Sizer_Insert(PyObject *, PyObject *args, PyObject *kwargs } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_Insert(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + result = (wxSizerItem *)wxSizer_Insert(arg1,arg2,arg3,arg4,arg5,arg6,arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxSizerItem, 0); return resultobj; fail: return NULL; @@ -35597,6 +35917,7 @@ static PyObject *_wrap_Sizer_Prepend(PyObject *, PyObject *args, PyObject *kwarg int arg4 = (int) 0 ; int arg5 = (int) 0 ; PyObject *arg6 = (PyObject *) NULL ; + wxSizerItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; @@ -35628,12 +35949,12 @@ static PyObject *_wrap_Sizer_Prepend(PyObject *, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_Prepend(arg1,arg2,arg3,arg4,arg5,arg6); + result = (wxSizerItem *)wxSizer_Prepend(arg1,arg2,arg3,arg4,arg5,arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxSizerItem, 0); return resultobj; fail: return NULL; @@ -35702,6 +36023,35 @@ static PyObject *_wrap_Sizer_Detach(PyObject *, PyObject *args, PyObject *kwargs } +static PyObject *_wrap_Sizer_GetItem(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxSizer *arg1 = (wxSizer *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + wxSizerItem *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "item", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Sizer_GetItem",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSizer, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + arg2 = obj1; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxSizerItem *)wxSizer_GetItem(arg1,arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxSizerItem, 0); + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Sizer__SetItemMinSize(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxSizer *arg1 = (wxSizer *) 0 ; @@ -35741,6 +36091,7 @@ static PyObject *_wrap_Sizer_AddItem(PyObject *, PyObject *args, PyObject *kwarg PyObject *resultobj; wxSizer *arg1 = (wxSizer *) 0 ; wxSizerItem *arg2 = (wxSizerItem *) 0 ; + wxSizerItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *kwnames[] = { @@ -35754,12 +36105,12 @@ static PyObject *_wrap_Sizer_AddItem(PyObject *, PyObject *args, PyObject *kwarg SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Add(arg2); + result = (wxSizerItem *)(arg1)->Add(arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxSizerItem, 0); return resultobj; fail: return NULL; @@ -35771,6 +36122,7 @@ static PyObject *_wrap_Sizer_InsertItem(PyObject *, PyObject *args, PyObject *kw wxSizer *arg1 = (wxSizer *) 0 ; size_t arg2 ; wxSizerItem *arg3 = (wxSizerItem *) 0 ; + wxSizerItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; @@ -35787,12 +36139,12 @@ static PyObject *_wrap_Sizer_InsertItem(PyObject *, PyObject *args, PyObject *kw SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Insert(arg2,arg3); + result = (wxSizerItem *)(arg1)->Insert(arg2,arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxSizerItem, 0); return resultobj; fail: return NULL; @@ -35803,6 +36155,7 @@ static PyObject *_wrap_Sizer_PrependItem(PyObject *, PyObject *args, PyObject *k PyObject *resultobj; wxSizer *arg1 = (wxSizer *) 0 ; wxSizerItem *arg2 = (wxSizerItem *) 0 ; + wxSizerItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *kwnames[] = { @@ -35816,12 +36169,12 @@ static PyObject *_wrap_Sizer_PrependItem(PyObject *, PyObject *args, PyObject *k SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Prepend(arg2); + result = (wxSizerItem *)(arg1)->Prepend(arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxSizerItem, 0); return resultobj; fail: return NULL; @@ -38351,7 +38704,7 @@ static PyObject *_wrap_GridBagSizer_Add(PyObject *, PyObject *args, PyObject *kw int arg5 = (int) 0 ; int arg6 = (int) 0 ; PyObject *arg7 = (PyObject *) NULL ; - bool result; + wxGBSizerItem *result; wxGBPosition temp3 ; wxGBSpan temp4 ; PyObject * obj0 = 0 ; @@ -38392,14 +38745,12 @@ static PyObject *_wrap_GridBagSizer_Add(PyObject *, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (bool)wxGridBagSizer_Add(arg1,arg2,(wxGBPosition const &)*arg3,(wxGBSpan const &)*arg4,arg5,arg6,arg7); + result = (wxGBSizerItem *)wxGridBagSizer_Add(arg1,arg2,(wxGBPosition const &)*arg3,(wxGBSpan const &)*arg4,arg5,arg6,arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - { - resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); - } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxGBSizerItem, 0); return resultobj; fail: return NULL; @@ -38410,7 +38761,7 @@ static PyObject *_wrap_GridBagSizer_AddItem(PyObject *, PyObject *args, PyObject PyObject *resultobj; wxGridBagSizer *arg1 = (wxGridBagSizer *) 0 ; wxGBSizerItem *arg2 = (wxGBSizerItem *) 0 ; - bool result; + wxGBSizerItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *kwnames[] = { @@ -38424,13 +38775,49 @@ static PyObject *_wrap_GridBagSizer_AddItem(PyObject *, PyObject *args, PyObject SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (bool)(arg1)->Add(arg2); + result = (wxGBSizerItem *)(arg1)->Add(arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxGBSizerItem, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_GridBagSizer_GetCellSize(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxGridBagSizer *arg1 = (wxGridBagSizer *) 0 ; + int arg2 ; + int arg3 ; + wxSize result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "row",(char *) "col", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:GridBagSizer_GetCellSize",kwnames,&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridBagSizer, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + arg2 = (int)SWIG_As_int(obj1); + if (PyErr_Occurred()) SWIG_fail; + arg3 = (int)SWIG_As_int(obj2); + if (PyErr_Occurred()) SWIG_fail; { - resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxGridBagSizer const *)arg1)->GetCellSize(arg2,arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + wxSize * resultptr; + resultptr = new wxSize((wxSize &) result); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1); } return resultobj; fail: @@ -40687,6 +41074,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"new_Rect", (PyCFunction) _wrap_new_Rect, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"new_RectPP", (PyCFunction) _wrap_new_RectPP, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"new_RectPS", (PyCFunction) _wrap_new_RectPS, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"new_RectS", (PyCFunction) _wrap_new_RectS, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"delete_Rect", (PyCFunction) _wrap_delete_Rect, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Rect_GetX", (PyCFunction) _wrap_Rect_GetX, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Rect_SetX", (PyCFunction) _wrap_Rect_SetX, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -40717,6 +41105,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Rect_OffsetXY", (PyCFunction) _wrap_Rect_OffsetXY, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Rect_Offset", (PyCFunction) _wrap_Rect_Offset, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Rect_Intersect", (PyCFunction) _wrap_Rect_Intersect, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Rect_Union", (PyCFunction) _wrap_Rect_Union, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Rect___add__", (PyCFunction) _wrap_Rect___add__, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Rect___iadd__", (PyCFunction) _wrap_Rect___iadd__, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Rect___eq__", (PyCFunction) _wrap_Rect___eq__, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -40764,6 +41153,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Point2D_Get", (PyCFunction) _wrap_Point2D_Get, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Point2D_swigregister", Point2D_swigregister, METH_VARARGS, NULL }, { (char *)"new_InputStream", (PyCFunction) _wrap_new_InputStream, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"delete_InputStream", (PyCFunction) _wrap_delete_InputStream, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"InputStream_close", (PyCFunction) _wrap_InputStream_close, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"InputStream_flush", (PyCFunction) _wrap_InputStream_flush, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"InputStream_eof", (PyCFunction) _wrap_InputStream_eof, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -40858,6 +41248,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"new_EmptyImage", (PyCFunction) _wrap_new_EmptyImage, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"new_ImageFromBitmap", (PyCFunction) _wrap_new_ImageFromBitmap, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"new_ImageFromData", (PyCFunction) _wrap_new_ImageFromData, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"new_ImageFromDataWithAlpha", (PyCFunction) _wrap_new_ImageFromDataWithAlpha, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Image_Create", (PyCFunction) _wrap_Image_Create, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Image_Destroy", (PyCFunction) _wrap_Image_Destroy, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Image_Scale", (PyCFunction) _wrap_Image_Scale, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -40872,6 +41263,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Image_HasAlpha", (PyCFunction) _wrap_Image_HasAlpha, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Image_FindFirstUnusedColour", (PyCFunction) _wrap_Image_FindFirstUnusedColour, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Image_ConvertAlphaToMask", (PyCFunction) _wrap_Image_ConvertAlphaToMask, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Image_ConvertColourToAlpha", (PyCFunction) _wrap_Image_ConvertColourToAlpha, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Image_SetMaskFromImage", (PyCFunction) _wrap_Image_SetMaskFromImage, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Image_CanRead", (PyCFunction) _wrap_Image_CanRead, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Image_GetImageCount", (PyCFunction) _wrap_Image_GetImageCount, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -41305,6 +41697,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"PostEvent", (PyCFunction) _wrap_PostEvent, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"App_CleanUp", (PyCFunction) _wrap_App_CleanUp, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"GetApp", (PyCFunction) _wrap_GetApp, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"SetDefaultPyEncoding", (PyCFunction) _wrap_SetDefaultPyEncoding, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"GetDefaultPyEncoding", (PyCFunction) _wrap_GetDefaultPyEncoding, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"new_EventLoop", (PyCFunction) _wrap_new_EventLoop, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"delete_EventLoop", (PyCFunction) _wrap_delete_EventLoop, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"EventLoop_Run", (PyCFunction) _wrap_EventLoop_Run, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -41716,6 +42110,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"SizerItem_SetRatioSize", (PyCFunction) _wrap_SizerItem_SetRatioSize, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"SizerItem_SetRatio", (PyCFunction) _wrap_SizerItem_SetRatio, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"SizerItem_GetRatio", (PyCFunction) _wrap_SizerItem_GetRatio, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"SizerItem_GetRect", (PyCFunction) _wrap_SizerItem_GetRect, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"SizerItem_IsWindow", (PyCFunction) _wrap_SizerItem_IsWindow, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"SizerItem_IsSizer", (PyCFunction) _wrap_SizerItem_IsSizer, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"SizerItem_IsSpacer", (PyCFunction) _wrap_SizerItem_IsSpacer, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -41742,6 +42137,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Sizer_Prepend", (PyCFunction) _wrap_Sizer_Prepend, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Sizer_Remove", (PyCFunction) _wrap_Sizer_Remove, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Sizer_Detach", (PyCFunction) _wrap_Sizer_Detach, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Sizer_GetItem", (PyCFunction) _wrap_Sizer_GetItem, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Sizer__SetItemMinSize", (PyCFunction) _wrap_Sizer__SetItemMinSize, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Sizer_AddItem", (PyCFunction) _wrap_Sizer_AddItem, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Sizer_InsertItem", (PyCFunction) _wrap_Sizer_InsertItem, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -41834,6 +42230,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"new_GridBagSizer", (PyCFunction) _wrap_new_GridBagSizer, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"GridBagSizer_Add", (PyCFunction) _wrap_GridBagSizer_Add, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"GridBagSizer_AddItem", (PyCFunction) _wrap_GridBagSizer_AddItem, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"GridBagSizer_GetCellSize", (PyCFunction) _wrap_GridBagSizer_GetCellSize, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"GridBagSizer_GetEmptyCellSize", (PyCFunction) _wrap_GridBagSizer_GetEmptyCellSize, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"GridBagSizer_SetEmptyCellSize", (PyCFunction) _wrap_GridBagSizer_SetEmptyCellSize, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"GridBagSizer_GetItemPosition", _wrap_GridBagSizer_GetItemPosition, METH_VARARGS, NULL },