X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03e37cd5425d87764bba6d344021451e1fd891e1..5e4ca4a83789f804948ff9b217f1ac1c5bdac9d5:/wxPython/src/gtk/_core_wrap.cpp diff --git a/wxPython/src/gtk/_core_wrap.cpp b/wxPython/src/gtk/_core_wrap.cpp index e6a5339a7e..9c538f75f8 100644 --- a/wxPython/src/gtk/_core_wrap.cpp +++ b/wxPython/src/gtk/_core_wrap.cpp @@ -1342,15 +1342,13 @@ int PyApp_GetComCtl32Version(){ wxPyRaiseNotImplemented(); return 0; } } - wxPyApp* wxGetApp() { - return (wxPyApp*)wxTheApp; - } + wxPyApp* wxPyGetApp() { return (wxPyApp*)wxTheApp; } static const wxString wxPyPanelNameStr(wxPanelNameStr); wxVisualAttributes *new_wxVisualAttributes(){ return new wxVisualAttributes; } -void delete_wxVisualAttributes(wxVisualAttributes *self){} +void delete_wxVisualAttributes(wxVisualAttributes *self){ delete self; } PyObject *wxWindow_GetChildren(wxWindow *self){ wxWindowList& list = self->GetChildren(); return wxPy_ConvertList(&list); @@ -1647,6 +1645,19 @@ bool wxSizer_Remove(wxSizer *self,PyObject *item){ else return False; } +bool wxSizer_Detach(wxSizer *self,PyObject *item){ + bool blocked = wxPyBeginBlockThreads(); + wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True); + wxPyEndBlockThreads(blocked); + if ( info.window ) + return self->Detach(info.window); + else if ( info.sizer ) + return self->Detach(info.sizer); + else if ( info.gotPos ) + return self->Detach(info.pos); + else + return False; + } void wxSizer__SetItemMinSize(wxSizer *self,PyObject *item,wxSize const &size){ bool blocked = wxPyBeginBlockThreads(); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True); @@ -11264,27 +11275,6 @@ static PyObject * Image_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } -static PyObject *_wrap_InitAllImageHandlers(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - char *kwnames[] = { - NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":InitAllImageHandlers",kwnames)) goto fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxInitAllImageHandlers(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - static int _wrap_NullImage_set(PyObject *_val) { PyErr_SetString(PyExc_TypeError,"Variable NullImage is read-only."); return 1; @@ -20764,7 +20754,7 @@ static PyObject *_wrap_GetApp(PyObject *self, PyObject *args, PyObject *kwargs) if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetApp",kwnames)) goto fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxPyApp *)wxGetApp(); + result = (wxPyApp *)wxPyGetApp(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -26936,7 +26926,7 @@ static PyObject *_wrap_Window_SetScrollbar(PyObject *self, PyObject *args, PyObj PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; char *kwnames[] = { - (char *) "self",(char *) "orientation",(char *) "pos",(char *) "thumbvisible",(char *) "range",(char *) "refresh", NULL + (char *) "self",(char *) "orientation",(char *) "position",(char *) "thumbSize",(char *) "range",(char *) "refresh", NULL }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|O:Window_SetScrollbar",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; @@ -34715,6 +34705,37 @@ static PyObject *_wrap_Sizer_Remove(PyObject *self, PyObject *args, PyObject *kw } +static PyObject *_wrap_Sizer_Detach(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxSizer *arg1 = (wxSizer *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "item", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Sizer_Detach",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 = (bool)wxSizer_Detach(arg1,arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Sizer__SetItemMinSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxSizer *arg1 = (wxSizer *) 0 ; @@ -40417,7 +40438,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"Image_ConvertToBitmap", (PyCFunction) _wrap_Image_ConvertToBitmap, METH_VARARGS | METH_KEYWORDS }, { (char *)"Image_ConvertToMonoBitmap", (PyCFunction) _wrap_Image_ConvertToMonoBitmap, METH_VARARGS | METH_KEYWORDS }, { (char *)"Image_swigregister", Image_swigregister, METH_VARARGS }, - { (char *)"InitAllImageHandlers", (PyCFunction) _wrap_InitAllImageHandlers, METH_VARARGS | METH_KEYWORDS }, { (char *)"new_BMPHandler", (PyCFunction) _wrap_new_BMPHandler, METH_VARARGS | METH_KEYWORDS }, { (char *)"BMPHandler_swigregister", BMPHandler_swigregister, METH_VARARGS }, { (char *)"new_ICOHandler", (PyCFunction) _wrap_new_ICOHandler, METH_VARARGS | METH_KEYWORDS }, @@ -41206,6 +41226,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Sizer_Insert", (PyCFunction) _wrap_Sizer_Insert, METH_VARARGS | METH_KEYWORDS }, { (char *)"Sizer_Prepend", (PyCFunction) _wrap_Sizer_Prepend, METH_VARARGS | METH_KEYWORDS }, { (char *)"Sizer_Remove", (PyCFunction) _wrap_Sizer_Remove, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Sizer_Detach", (PyCFunction) _wrap_Sizer_Detach, METH_VARARGS | METH_KEYWORDS }, { (char *)"Sizer__SetItemMinSize", (PyCFunction) _wrap_Sizer__SetItemMinSize, METH_VARARGS | METH_KEYWORDS }, { (char *)"Sizer_AddItem", (PyCFunction) _wrap_Sizer_AddItem, METH_VARARGS | METH_KEYWORDS }, { (char *)"Sizer_InsertItem", (PyCFunction) _wrap_Sizer_InsertItem, METH_VARARGS | METH_KEYWORDS },