From 1fc3b23ad778b95a377066ed7c914a373dd818c0 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 7 Oct 2004 20:22:46 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/gtk/_controls.py | 5 ++++- wxPython/src/gtk/_controls_wrap.cpp | 10 ++++++---- wxPython/src/gtk/_core.py | 19 +++++++++++++++++++ wxPython/src/gtk/_core_wrap.cpp | 25 +++++++++++++++++++++++++ wxPython/wxPython/_core.py | 1 + 5 files changed, 55 insertions(+), 5 deletions(-) diff --git a/wxPython/src/gtk/_controls.py b/wxPython/src/gtk/_controls.py index 04eff1e534..b560eae01f 100644 --- a/wxPython/src/gtk/_controls.py +++ b/wxPython/src/gtk/_controls.py @@ -4302,6 +4302,9 @@ EVT_LIST_COL_DRAGGING = wx.PyEventBinder(wxEVT_COMMAND_LIST_COL_DRAGGING EVT_LIST_COL_END_DRAG = wx.PyEventBinder(wxEVT_COMMAND_LIST_COL_END_DRAG , 1) EVT_LIST_ITEM_FOCUSED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_FOCUSED , 1) +EVT_LIST_GET_INFO = wx._deprecated(EVT_LIST_GET_INFO) +EVT_LIST_SET_INFO = wx._deprecated(EVT_LIST_SET_INFO) + #--------------------------------------------------------------------------- class ListCtrl(_core.Control): @@ -4390,7 +4393,7 @@ class ListCtrl(_core.Control): return _controls_.ListCtrl_SetItemState(*args, **kwargs) def SetItemImage(*args, **kwargs): - """SetItemImage(self, long item, int image, int selImage) -> bool""" + """SetItemImage(self, long item, int image, int selImage=-1) -> bool""" return _controls_.ListCtrl_SetItemImage(*args, **kwargs) def GetItemText(*args, **kwargs): diff --git a/wxPython/src/gtk/_controls_wrap.cpp b/wxPython/src/gtk/_controls_wrap.cpp index 094fa27ed9..164b628151 100644 --- a/wxPython/src/gtk/_controls_wrap.cpp +++ b/wxPython/src/gtk/_controls_wrap.cpp @@ -22244,7 +22244,7 @@ static PyObject *_wrap_ListCtrl_SetItemImage(PyObject *, PyObject *args, PyObjec wxPyListCtrl *arg1 = (wxPyListCtrl *) 0 ; long arg2 ; int arg3 ; - int arg4 ; + int arg4 = (int) -1 ; bool result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -22254,15 +22254,17 @@ static PyObject *_wrap_ListCtrl_SetItemImage(PyObject *, PyObject *args, PyObjec (char *) "self",(char *) "item",(char *) "image",(char *) "selImage", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:ListCtrl_SetItemImage",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:ListCtrl_SetItemImage",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyListCtrl, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; arg2 = (long)SWIG_As_long(obj1); if (PyErr_Occurred()) SWIG_fail; arg3 = (int)SWIG_As_int(obj2); if (PyErr_Occurred()) SWIG_fail; - arg4 = (int)SWIG_As_int(obj3); - if (PyErr_Occurred()) SWIG_fail; + if (obj3) { + arg4 = (int)SWIG_As_int(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->SetItemImage(arg2,arg3,arg4); diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index 9175a2d718..e7181d1f6b 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -4761,6 +4761,16 @@ class PyApp(EvtHandler): """ return _core_.PyApp_WakeUpIdle(*args, **kwargs) + def IsMainLoopRunning(*args, **kwargs): + """ + IsMainLoopRunning() -> bool + + Returns True if we're running the main loop, i.e. if the events can + currently be dispatched. + """ + return _core_.PyApp_IsMainLoopRunning(*args, **kwargs) + + IsMainLoopRunning = staticmethod(IsMainLoopRunning) def MainLoop(*args, **kwargs): """ MainLoop(self) -> int @@ -4987,6 +4997,15 @@ class PyAppPtr(PyApp): self.__class__ = PyApp _core_.PyApp_swigregister(PyAppPtr) +def PyApp_IsMainLoopRunning(*args, **kwargs): + """ + PyApp_IsMainLoopRunning() -> bool + + Returns True if we're running the main loop, i.e. if the events can + currently be dispatched. + """ + return _core_.PyApp_IsMainLoopRunning(*args, **kwargs) + def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs): """PyApp_GetMacSupportPCMenuShortcuts() -> bool""" return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) diff --git a/wxPython/src/gtk/_core_wrap.cpp b/wxPython/src/gtk/_core_wrap.cpp index 6ba1957c00..ee85e5fe70 100644 --- a/wxPython/src/gtk/_core_wrap.cpp +++ b/wxPython/src/gtk/_core_wrap.cpp @@ -20215,6 +20215,30 @@ static PyObject *_wrap_PyApp_WakeUpIdle(PyObject *, PyObject *args, PyObject *kw } +static PyObject *_wrap_PyApp_IsMainLoopRunning(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + bool result; + char *kwnames[] = { + NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":PyApp_IsMainLoopRunning",kwnames)) goto fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)wxPyApp::IsMainLoopRunning(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_PyApp_MainLoop(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxPyApp *arg1 = (wxPyApp *) 0 ; @@ -41241,6 +41265,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"PyApp_ProcessPendingEvents", (PyCFunction) _wrap_PyApp_ProcessPendingEvents, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"PyApp_Yield", (PyCFunction) _wrap_PyApp_Yield, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"PyApp_WakeUpIdle", (PyCFunction) _wrap_PyApp_WakeUpIdle, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"PyApp_IsMainLoopRunning", (PyCFunction) _wrap_PyApp_IsMainLoopRunning, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"PyApp_MainLoop", (PyCFunction) _wrap_PyApp_MainLoop, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"PyApp_Exit", (PyCFunction) _wrap_PyApp_Exit, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"PyApp_ExitMainLoop", (PyCFunction) _wrap_PyApp_ExitMainLoop, METH_VARARGS | METH_KEYWORDS, NULL }, diff --git a/wxPython/wxPython/_core.py b/wxPython/wxPython/_core.py index 79e2e713ea..35f0431e65 100644 --- a/wxPython/wxPython/_core.py +++ b/wxPython/wxPython/_core.py @@ -945,6 +945,7 @@ wxPRINT_WINDOWS = wx._core.PRINT_WINDOWS wxPRINT_POSTSCRIPT = wx._core.PRINT_POSTSCRIPT wxPyApp = wx._core.PyApp wxPyAppPtr = wx._core.PyAppPtr +wxPyApp_IsMainLoopRunning = wx._core.PyApp_IsMainLoopRunning wxPyApp_GetMacSupportPCMenuShortcuts = wx._core.PyApp_GetMacSupportPCMenuShortcuts wxPyApp_GetMacAboutMenuItemId = wx._core.PyApp_GetMacAboutMenuItemId wxPyApp_GetMacPreferencesMenuItemId = wx._core.PyApp_GetMacPreferencesMenuItemId -- 2.45.2