From: Robin Dunn Date: Fri, 7 Jan 2000 19:46:28 +0000 (+0000) Subject: bug fix for OnLinkClicked callback X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/95837b4d96d6267f3901e193cf1941d96fd1a472?ds=inline bug fix for OnLinkClicked callback git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/utils/wxPython/modules/html/_extras.py b/utils/wxPython/modules/html/_extras.py index 3e0ee4f7d9..382a84ced0 100644 --- a/utils/wxPython/modules/html/_extras.py +++ b/utils/wxPython/modules/html/_extras.py @@ -11,4 +11,4 @@ wx.wxHtmlContainerCellPtr = wxHtmlContainerCellPtr wx.wxHtmlWidgetCellPtr = wxHtmlWidgetCellPtr wx.HtmlHistoryItemPtr = HtmlHistoryItemPtr wx.wxHtmlWindowPtr = wxHtmlWindowPtr -wx.wxHtmlLinkInfoPtr = wxHtmlLinkInfo +wx.wxHtmlLinkInfoPtr = wxHtmlLinkInfoPtr diff --git a/utils/wxPython/modules/html/html.cpp b/utils/wxPython/modules/html/html.cpp index 98438c6218..274ba736e2 100644 --- a/utils/wxPython/modules/html/html.cpp +++ b/utils/wxPython/modules/html/html.cpp @@ -221,6 +221,7 @@ public: PYPRIVATE; }; + IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle); void wxPyHtmlWindow::OnLinkClicked(wxHtmlLinkInfo* link) { @@ -4406,6 +4407,42 @@ static PyObject *_wrap_wxHtmlWindow_GetParser(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxHtmlWindow_base_OnLinkClicked(_swigobj,_swigarg0) (_swigobj->base_OnLinkClicked(_swigarg0)) +static PyObject *_wrap_wxHtmlWindow_base_OnLinkClicked(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWindow * _arg0; + wxHtmlLinkInfo * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","link", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWindow_base_OnLinkClicked",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_base_OnLinkClicked. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlLinkInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWindow_base_OnLinkClicked. Expected _wxHtmlLinkInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWindow_base_OnLinkClicked(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxHtmlWindow_base_OnSetTitle(_swigobj,_swigarg0) (_swigobj->base_OnSetTitle(_swigarg0)) static PyObject *_wrap_wxHtmlWindow_base_OnSetTitle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5421,6 +5458,7 @@ static PyMethodDef htmlcMethods[] = { { "delete_wxHtmlDCRenderer", (PyCFunction) _wrap_delete_wxHtmlDCRenderer, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlDCRenderer", (PyCFunction) _wrap_new_wxHtmlDCRenderer, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_base_OnSetTitle", (PyCFunction) _wrap_wxHtmlWindow_base_OnSetTitle, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_base_OnLinkClicked", (PyCFunction) _wrap_wxHtmlWindow_base_OnLinkClicked, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_GetParser", (PyCFunction) _wrap_wxHtmlWindow_GetParser, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_GetInternalRepresentation", (PyCFunction) _wrap_wxHtmlWindow_GetInternalRepresentation, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_HistoryClear", (PyCFunction) _wrap_wxHtmlWindow_HistoryClear, METH_VARARGS | METH_KEYWORDS }, diff --git a/utils/wxPython/modules/html/html.i b/utils/wxPython/modules/html/html.i index 5d38cf911e..1a6d43415c 100644 --- a/utils/wxPython/modules/html/html.i +++ b/utils/wxPython/modules/html/html.i @@ -417,6 +417,7 @@ public: PYPRIVATE; }; + IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle); void wxPyHtmlWindow::OnLinkClicked(wxHtmlLinkInfo* link) { @@ -435,6 +436,7 @@ void wxPyHtmlWindow::base_OnLinkClicked(wxHtmlLinkInfo* link) { %} + %name(wxHtmlWindow) class wxPyHtmlWindow : public wxScrolledWindow { public: wxPyHtmlWindow(wxWindow *parent, int id = -1, @@ -467,6 +469,7 @@ public: wxHtmlWinParser* GetParser(); + void base_OnLinkClicked(wxHtmlLinkInfo* link); void base_OnSetTitle(const char* title); }; diff --git a/utils/wxPython/modules/html/html.py b/utils/wxPython/modules/html/html.py index 9361004286..86629d17ca 100644 --- a/utils/wxPython/modules/html/html.py +++ b/utils/wxPython/modules/html/html.py @@ -552,6 +552,9 @@ class wxHtmlWindowPtr(wxScrolledWindowPtr): val = apply(htmlc.wxHtmlWindow_GetParser,(self,) + _args, _kwargs) if val: val = wxHtmlWinParserPtr(val) return val + def base_OnLinkClicked(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow_base_OnLinkClicked,(self,) + _args, _kwargs) + return val def base_OnSetTitle(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWindow_base_OnSetTitle,(self,) + _args, _kwargs) return val @@ -732,4 +735,4 @@ wx.wxHtmlContainerCellPtr = wxHtmlContainerCellPtr wx.wxHtmlWidgetCellPtr = wxHtmlWidgetCellPtr wx.HtmlHistoryItemPtr = HtmlHistoryItemPtr wx.wxHtmlWindowPtr = wxHtmlWindowPtr -wx.wxHtmlLinkInfoPtr = wxHtmlLinkInfo +wx.wxHtmlLinkInfoPtr = wxHtmlLinkInfoPtr