From 5d4133915fa92768b689508acbbcac174c2a5710 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 29 Jan 2002 01:27:33 +0000 Subject: [PATCH] SWIG updates for wxGTK git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/gtk/html.cpp | 111 ++++++++++++++++------------------- wxPython/src/gtk/html.py | 11 +++- wxPython/src/gtk/misc.cpp | 25 ++++++++ wxPython/src/gtk/misc.py | 2 + wxPython/src/gtk/misc2.cpp | 18 ++++-- wxPython/src/gtk/misc2.py | 18 ++++-- wxPython/src/gtk/windows.cpp | 38 ++++++++++++ wxPython/src/gtk/windows.py | 3 + wxPython/src/gtk/wx.cpp | 2 - wxPython/src/gtk/wx.py | 2 - 10 files changed, 152 insertions(+), 78 deletions(-) diff --git a/wxPython/src/gtk/html.cpp b/wxPython/src/gtk/html.cpp index 58bb4c1891..b1014b8dbb 100644 --- a/wxPython/src/gtk/html.cpp +++ b/wxPython/src/gtk/html.cpp @@ -206,10 +206,14 @@ public: void OnLinkClicked(const wxHtmlLinkInfo& link); void base_OnLinkClicked(const wxHtmlLinkInfo& link); + wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type, + const wxString& url, + wxString *redirect) const; + DEC_PYCALLBACK__STRING(OnSetTitle); DEC_PYCALLBACK__CELLINTINT(OnCellMouseHover); DEC_PYCALLBACK__CELLINTINTME(OnCellClicked); - DEC_PYCALLBACK_BOOL_STRING(OnOpeningURL); +// DEC_PYCALLBACK_BOOL_STRING(OnOpeningURL); PYPRIVATE; }; @@ -217,7 +221,7 @@ IMPLEMENT_ABSTRACT_CLASS( wxPyHtmlWindow, wxHtmlWindow ); IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle); IMP_PYCALLBACK__CELLINTINT(wxPyHtmlWindow, wxHtmlWindow, OnCellMouseHover); IMP_PYCALLBACK__CELLINTINTME(wxPyHtmlWindow, wxHtmlWindow, OnCellClicked); -IMP_PYCALLBACK_BOOL_STRING(wxPyHtmlWindow, wxHtmlWindow, OnOpeningURL); +// IMP_PYCALLBACK_BOOL_STRING(wxPyHtmlWindow, wxHtmlWindow, OnOpeningURL); void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) { @@ -237,6 +241,40 @@ void wxPyHtmlWindow::base_OnLinkClicked(const wxHtmlLinkInfo& link) { } +wxHtmlOpeningStatus wxPyHtmlWindow::OnOpeningURL(wxHtmlURLType type, + const wxString& url, + wxString *redirect) const { + bool found; + wxHtmlOpeningStatus rval; + wxPyBeginBlockThreads(); + if ((found = wxPyCBH_findCallback(m_myInst, "OnOpeningURL"))) { + PyObject* ro; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(is)", type, url.c_str())); + if (PyString_Check(ro) +#if PYTHON_API_VERSION >= 1009 + || PyUnicode_Check(ro) +#endif + ) { + PyObject* str = PyObject_Str(ro); + *redirect = PyString_AsString(str); + Py_DECREF(str); + rval = wxHTML_REDIRECT; + } + else { + PyObject* num = PyNumber_Int(ro); + rval = (wxHtmlOpeningStatus)PyInt_AsLong(num); + Py_DECREF(num); + } + Py_DECREF(ro); + } + wxPyEndBlockThreads(); + if (! found) + rval = wxHtmlWindow::OnOpeningURL(type, url, redirect); + return rval; +} + + + void wxHtmlWindow_AddFilter(wxHtmlFilter *filter) { wxHtmlWindow::AddFilter(filter); } @@ -1268,58 +1306,6 @@ static PyObject *_wrap_wxHtmlParser_PopTagHandler(PyObject *self, PyObject *args return _resultobj; } -#define wxHtmlParser_CanOpenURL(_swigobj,_swigarg0) (_swigobj->CanOpenURL(_swigarg0)) -static PyObject *_wrap_wxHtmlParser_CanOpenURL(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxHtmlParser * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","url", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlParser_CanOpenURL",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlParser_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlParser_CanOpenURL. Expected _wxHtmlParser_p."); - return NULL; - } - } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif -} -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxHtmlParser_CanOpenURL(_arg0,*_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - static void *SwigwxHtmlWinParserTowxHtmlParser(void *ptr) { wxHtmlWinParser *src; wxHtmlParser *dest; @@ -1495,7 +1481,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetCharWidth(PyObject *self, PyObject *ar #define wxHtmlWinParser_GetWindow(_swigobj) (_swigobj->GetWindow()) static PyObject *_wrap_wxHtmlWinParser_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxWindow * _result; + wxHtmlWindow * _result; wxHtmlWinParser * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -1512,7 +1498,7 @@ static PyObject *_wrap_wxHtmlWinParser_GetWindow(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxHtmlWinParser_GetWindow(_arg0); + _result = (wxHtmlWindow *)wxHtmlWinParser_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4178,7 +4164,7 @@ static PyObject *_wrap_new_wxHtmlWindow(PyObject *self, PyObject *args, PyObject int _arg1 = (int ) -1; wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; wxSize * _arg3 = (wxSize *) &wxDefaultSize; - int _arg4 = (int ) wxHW_SCROLLBAR_AUTO; + int _arg4 = (int ) (wxHW_SCROLLBAR_AUTO); char * _arg5 = (char *) "htmlWindow"; PyObject * _argo0 = 0; wxPoint temp; @@ -4261,7 +4247,7 @@ static PyObject *_wrap_wxHtmlWindow_Create(PyObject *self, PyObject *args, PyObj int _arg2 = (int ) -1; wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; - int _arg5 = (int ) wxHW_SCROLLBAR_AUTO; + int _arg5 = (int ) (wxHW_SCROLLBAR_AUTO); char * _arg6 = (char *) "htmlWindow"; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -6633,7 +6619,6 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlWinParser_GetDC", (PyCFunction) _wrap_wxHtmlWinParser_GetDC, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWinParser_SetDC", (PyCFunction) _wrap_wxHtmlWinParser_SetDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlWinParser", (PyCFunction) _wrap_new_wxHtmlWinParser, METH_VARARGS | METH_KEYWORDS }, - { "wxHtmlParser_CanOpenURL", (PyCFunction) _wrap_wxHtmlParser_CanOpenURL, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlParser_PopTagHandler", (PyCFunction) _wrap_wxHtmlParser_PopTagHandler, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlParser_PushTagHandler", (PyCFunction) _wrap_wxHtmlParser_PushTagHandler, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlParser_GetSource", (PyCFunction) _wrap_wxHtmlParser_GetSource, METH_VARARGS | METH_KEYWORDS }, @@ -6828,6 +6813,14 @@ SWIGEXPORT(void) inithtmlc() { PyDict_SetItemString(d,"wxHTML_COND_ISANCHOR", PyInt_FromLong((long) wxHTML_COND_ISANCHOR)); PyDict_SetItemString(d,"wxHTML_COND_ISIMAGEMAP", PyInt_FromLong((long) wxHTML_COND_ISIMAGEMAP)); PyDict_SetItemString(d,"wxHTML_COND_USER", PyInt_FromLong((long) wxHTML_COND_USER)); + PyDict_SetItemString(d,"wxHW_SCROLLBAR_NEVER", PyInt_FromLong((long) wxHW_SCROLLBAR_NEVER)); + PyDict_SetItemString(d,"wxHW_SCROLLBAR_AUTO", PyInt_FromLong((long) wxHW_SCROLLBAR_AUTO)); + PyDict_SetItemString(d,"wxHTML_OPEN", PyInt_FromLong((long) wxHTML_OPEN)); + PyDict_SetItemString(d,"wxHTML_BLOCK", PyInt_FromLong((long) wxHTML_BLOCK)); + PyDict_SetItemString(d,"wxHTML_REDIRECT", PyInt_FromLong((long) wxHTML_REDIRECT)); + PyDict_SetItemString(d,"wxHTML_URL_PAGE", PyInt_FromLong((long) wxHTML_URL_PAGE)); + PyDict_SetItemString(d,"wxHTML_URL_IMAGE", PyInt_FromLong((long) wxHTML_URL_IMAGE)); + PyDict_SetItemString(d,"wxHTML_URL_OTHER", PyInt_FromLong((long) wxHTML_URL_OTHER)); PyDict_SetItemString(d,"wxPAGE_ODD", PyInt_FromLong((long) wxPAGE_ODD)); PyDict_SetItemString(d,"wxPAGE_EVEN", PyInt_FromLong((long) wxPAGE_EVEN)); PyDict_SetItemString(d,"wxPAGE_ALL", PyInt_FromLong((long) wxPAGE_ALL)); diff --git a/wxPython/src/gtk/html.py b/wxPython/src/gtk/html.py index 76baf4423d..1f0283d745 100644 --- a/wxPython/src/gtk/html.py +++ b/wxPython/src/gtk/html.py @@ -145,9 +145,6 @@ class wxHtmlParserPtr(wxObjectPtr): def PopTagHandler(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlParser_PopTagHandler,(self,) + _args, _kwargs) return val - def CanOpenURL(self, *_args, **_kwargs): - val = apply(htmlc.wxHtmlParser_CanOpenURL,(self,) + _args, _kwargs) - return val def __repr__(self): return "" % (self.this,) class wxHtmlParser(wxHtmlParserPtr): @@ -756,6 +753,14 @@ wxHTML_INDENT_ALL = htmlc.wxHTML_INDENT_ALL wxHTML_COND_ISANCHOR = htmlc.wxHTML_COND_ISANCHOR wxHTML_COND_ISIMAGEMAP = htmlc.wxHTML_COND_ISIMAGEMAP wxHTML_COND_USER = htmlc.wxHTML_COND_USER +wxHW_SCROLLBAR_NEVER = htmlc.wxHW_SCROLLBAR_NEVER +wxHW_SCROLLBAR_AUTO = htmlc.wxHW_SCROLLBAR_AUTO +wxHTML_OPEN = htmlc.wxHTML_OPEN +wxHTML_BLOCK = htmlc.wxHTML_BLOCK +wxHTML_REDIRECT = htmlc.wxHTML_REDIRECT +wxHTML_URL_PAGE = htmlc.wxHTML_URL_PAGE +wxHTML_URL_IMAGE = htmlc.wxHTML_URL_IMAGE +wxHTML_URL_OTHER = htmlc.wxHTML_URL_OTHER wxPAGE_ODD = htmlc.wxPAGE_ODD wxPAGE_EVEN = htmlc.wxPAGE_EVEN wxPAGE_ALL = htmlc.wxPAGE_ALL diff --git a/wxPython/src/gtk/misc.cpp b/wxPython/src/gtk/misc.cpp index 6d8549ef7a..61ae1ababa 100644 --- a/wxPython/src/gtk/misc.cpp +++ b/wxPython/src/gtk/misc.cpp @@ -819,6 +819,30 @@ static PyObject *_wrap_wxGetHomeDir(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } +static PyObject *_wrap_wxGetUserHome(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char * _arg0 = (char *) ""; + char *_kwnames[] = { "user", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|s:wxGetUserHome",_kwnames,&_arg0)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxGetUserHome(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + static PyObject *_wrap_wxGetAccelFromString(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxAcceleratorEntry * _result; @@ -4148,6 +4172,7 @@ static PyMethodDef misccMethods[] = { { "wxObject_Destroy", (PyCFunction) _wrap_wxObject_Destroy, METH_VARARGS | METH_KEYWORDS }, { "wxObject_GetClassName", (PyCFunction) _wrap_wxObject_GetClassName, METH_VARARGS | METH_KEYWORDS }, { "wxGetAccelFromString", (PyCFunction) _wrap_wxGetAccelFromString, METH_VARARGS | METH_KEYWORDS }, + { "wxGetUserHome", (PyCFunction) _wrap_wxGetUserHome, METH_VARARGS | METH_KEYWORDS }, { "wxGetHomeDir", (PyCFunction) _wrap_wxGetHomeDir, METH_VARARGS | METH_KEYWORDS }, { "wxGetUserName", (PyCFunction) _wrap_wxGetUserName, METH_VARARGS | METH_KEYWORDS }, { "wxGetUserId", (PyCFunction) _wrap_wxGetUserId, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/misc.py b/wxPython/src/gtk/misc.py index f772fb509d..d8acff0fb4 100644 --- a/wxPython/src/gtk/misc.py +++ b/wxPython/src/gtk/misc.py @@ -601,6 +601,8 @@ wxGetUserName = miscc.wxGetUserName wxGetHomeDir = miscc.wxGetHomeDir +wxGetUserHome = miscc.wxGetUserHome + def wxGetAccelFromString(*_args, **_kwargs): val = apply(miscc.wxGetAccelFromString,_args,_kwargs) if val: val = wxAcceleratorEntryPtr(val) diff --git a/wxPython/src/gtk/misc2.cpp b/wxPython/src/gtk/misc2.cpp index e64b5da432..48403e401e 100644 --- a/wxPython/src/gtk/misc2.cpp +++ b/wxPython/src/gtk/misc2.cpp @@ -10559,6 +10559,7 @@ SWIGEXPORT(void) initmisc2c() { PyDict_SetItemString(d,"wxSYS_DEFAULT_GUI_FONT", PyInt_FromLong((long) wxSYS_DEFAULT_GUI_FONT)); PyDict_SetItemString(d,"wxSYS_COLOUR_SCROLLBAR", PyInt_FromLong((long) wxSYS_COLOUR_SCROLLBAR)); PyDict_SetItemString(d,"wxSYS_COLOUR_BACKGROUND", PyInt_FromLong((long) wxSYS_COLOUR_BACKGROUND)); + PyDict_SetItemString(d,"wxSYS_COLOUR_DESKTOP", PyInt_FromLong((long) wxSYS_COLOUR_DESKTOP)); PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVECAPTION)); PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTION)); PyDict_SetItemString(d,"wxSYS_COLOUR_MENU", PyInt_FromLong((long) wxSYS_COLOUR_MENU)); @@ -10573,22 +10574,27 @@ SWIGEXPORT(void) initmisc2c() { PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHT)); PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHTTEXT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHTTEXT)); PyDict_SetItemString(d,"wxSYS_COLOUR_BTNFACE", PyInt_FromLong((long) wxSYS_COLOUR_BTNFACE)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DFACE", PyInt_FromLong((long) wxSYS_COLOUR_3DFACE)); PyDict_SetItemString(d,"wxSYS_COLOUR_BTNSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_BTNSHADOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DSHADOW)); PyDict_SetItemString(d,"wxSYS_COLOUR_GRAYTEXT", PyInt_FromLong((long) wxSYS_COLOUR_GRAYTEXT)); PyDict_SetItemString(d,"wxSYS_COLOUR_BTNTEXT", PyInt_FromLong((long) wxSYS_COLOUR_BTNTEXT)); PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTIONTEXT)); PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHIGHLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHILIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHIGHLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHILIGHT)); PyDict_SetItemString(d,"wxSYS_COLOUR_3DDKSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DDKSHADOW)); PyDict_SetItemString(d,"wxSYS_COLOUR_3DLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DLIGHT)); PyDict_SetItemString(d,"wxSYS_COLOUR_INFOTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INFOTEXT)); PyDict_SetItemString(d,"wxSYS_COLOUR_INFOBK", PyInt_FromLong((long) wxSYS_COLOUR_INFOBK)); PyDict_SetItemString(d,"wxSYS_COLOUR_LISTBOX", PyInt_FromLong((long) wxSYS_COLOUR_LISTBOX)); - PyDict_SetItemString(d,"wxSYS_COLOUR_DESKTOP", PyInt_FromLong((long) wxSYS_COLOUR_DESKTOP)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DFACE", PyInt_FromLong((long) wxSYS_COLOUR_3DFACE)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DSHADOW)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHIGHLIGHT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHILIGHT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHILIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_HOTLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_HOTLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_GRADIENTACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_GRADIENTACTIVECAPTION)); + PyDict_SetItemString(d,"wxSYS_COLOUR_GRADIENTINACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_GRADIENTINACTIVECAPTION)); + PyDict_SetItemString(d,"wxSYS_COLOUR_MENUHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_MENUHILIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_MENUBAR", PyInt_FromLong((long) wxSYS_COLOUR_MENUBAR)); + PyDict_SetItemString(d,"wxSYS_COLOUR_MAX", PyInt_FromLong((long) wxSYS_COLOUR_MAX)); PyDict_SetItemString(d,"wxSYS_MOUSE_BUTTONS", PyInt_FromLong((long) wxSYS_MOUSE_BUTTONS)); PyDict_SetItemString(d,"wxSYS_BORDER_X", PyInt_FromLong((long) wxSYS_BORDER_X)); PyDict_SetItemString(d,"wxSYS_BORDER_Y", PyInt_FromLong((long) wxSYS_BORDER_Y)); diff --git a/wxPython/src/gtk/misc2.py b/wxPython/src/gtk/misc2.py index 0b6b64c9a2..ca7c61f44d 100644 --- a/wxPython/src/gtk/misc2.py +++ b/wxPython/src/gtk/misc2.py @@ -1210,6 +1210,7 @@ wxSYS_SYSTEM_FIXED_FONT = misc2c.wxSYS_SYSTEM_FIXED_FONT wxSYS_DEFAULT_GUI_FONT = misc2c.wxSYS_DEFAULT_GUI_FONT wxSYS_COLOUR_SCROLLBAR = misc2c.wxSYS_COLOUR_SCROLLBAR wxSYS_COLOUR_BACKGROUND = misc2c.wxSYS_COLOUR_BACKGROUND +wxSYS_COLOUR_DESKTOP = misc2c.wxSYS_COLOUR_DESKTOP wxSYS_COLOUR_ACTIVECAPTION = misc2c.wxSYS_COLOUR_ACTIVECAPTION wxSYS_COLOUR_INACTIVECAPTION = misc2c.wxSYS_COLOUR_INACTIVECAPTION wxSYS_COLOUR_MENU = misc2c.wxSYS_COLOUR_MENU @@ -1224,22 +1225,27 @@ wxSYS_COLOUR_APPWORKSPACE = misc2c.wxSYS_COLOUR_APPWORKSPACE wxSYS_COLOUR_HIGHLIGHT = misc2c.wxSYS_COLOUR_HIGHLIGHT wxSYS_COLOUR_HIGHLIGHTTEXT = misc2c.wxSYS_COLOUR_HIGHLIGHTTEXT wxSYS_COLOUR_BTNFACE = misc2c.wxSYS_COLOUR_BTNFACE +wxSYS_COLOUR_3DFACE = misc2c.wxSYS_COLOUR_3DFACE wxSYS_COLOUR_BTNSHADOW = misc2c.wxSYS_COLOUR_BTNSHADOW +wxSYS_COLOUR_3DSHADOW = misc2c.wxSYS_COLOUR_3DSHADOW wxSYS_COLOUR_GRAYTEXT = misc2c.wxSYS_COLOUR_GRAYTEXT wxSYS_COLOUR_BTNTEXT = misc2c.wxSYS_COLOUR_BTNTEXT wxSYS_COLOUR_INACTIVECAPTIONTEXT = misc2c.wxSYS_COLOUR_INACTIVECAPTIONTEXT wxSYS_COLOUR_BTNHIGHLIGHT = misc2c.wxSYS_COLOUR_BTNHIGHLIGHT +wxSYS_COLOUR_BTNHILIGHT = misc2c.wxSYS_COLOUR_BTNHILIGHT +wxSYS_COLOUR_3DHIGHLIGHT = misc2c.wxSYS_COLOUR_3DHIGHLIGHT +wxSYS_COLOUR_3DHILIGHT = misc2c.wxSYS_COLOUR_3DHILIGHT wxSYS_COLOUR_3DDKSHADOW = misc2c.wxSYS_COLOUR_3DDKSHADOW wxSYS_COLOUR_3DLIGHT = misc2c.wxSYS_COLOUR_3DLIGHT wxSYS_COLOUR_INFOTEXT = misc2c.wxSYS_COLOUR_INFOTEXT wxSYS_COLOUR_INFOBK = misc2c.wxSYS_COLOUR_INFOBK wxSYS_COLOUR_LISTBOX = misc2c.wxSYS_COLOUR_LISTBOX -wxSYS_COLOUR_DESKTOP = misc2c.wxSYS_COLOUR_DESKTOP -wxSYS_COLOUR_3DFACE = misc2c.wxSYS_COLOUR_3DFACE -wxSYS_COLOUR_3DSHADOW = misc2c.wxSYS_COLOUR_3DSHADOW -wxSYS_COLOUR_3DHIGHLIGHT = misc2c.wxSYS_COLOUR_3DHIGHLIGHT -wxSYS_COLOUR_3DHILIGHT = misc2c.wxSYS_COLOUR_3DHILIGHT -wxSYS_COLOUR_BTNHILIGHT = misc2c.wxSYS_COLOUR_BTNHILIGHT +wxSYS_COLOUR_HOTLIGHT = misc2c.wxSYS_COLOUR_HOTLIGHT +wxSYS_COLOUR_GRADIENTACTIVECAPTION = misc2c.wxSYS_COLOUR_GRADIENTACTIVECAPTION +wxSYS_COLOUR_GRADIENTINACTIVECAPTION = misc2c.wxSYS_COLOUR_GRADIENTINACTIVECAPTION +wxSYS_COLOUR_MENUHILIGHT = misc2c.wxSYS_COLOUR_MENUHILIGHT +wxSYS_COLOUR_MENUBAR = misc2c.wxSYS_COLOUR_MENUBAR +wxSYS_COLOUR_MAX = misc2c.wxSYS_COLOUR_MAX wxSYS_MOUSE_BUTTONS = misc2c.wxSYS_MOUSE_BUTTONS wxSYS_BORDER_X = misc2c.wxSYS_BORDER_X wxSYS_BORDER_Y = misc2c.wxSYS_BORDER_Y diff --git a/wxPython/src/gtk/windows.cpp b/wxPython/src/gtk/windows.cpp index 1125965c40..a2c523cc7c 100644 --- a/wxPython/src/gtk/windows.cpp +++ b/wxPython/src/gtk/windows.cpp @@ -3260,6 +3260,43 @@ static PyObject *_wrap_wxWindow_PushEventHandler(PyObject *self, PyObject *args, return _resultobj; } +#define wxWindow_RemoveEventHandler(_swigobj,_swigarg0) (_swigobj->RemoveEventHandler(_swigarg0)) +static PyObject *_wrap_wxWindow_RemoveEventHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0; + wxEvtHandler * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","handler", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_RemoveEventHandler",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_RemoveEventHandler. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_RemoveEventHandler. Expected _wxEvtHandler_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxWindow_RemoveEventHandler(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxWindow_PopupMenuXY(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PopupMenu(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxWindow_PopupMenuXY(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -10120,6 +10157,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_Raise", (PyCFunction) _wrap_wxWindow_Raise, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_PopupMenu", (PyCFunction) _wrap_wxWindow_PopupMenu, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_PopupMenuXY", (PyCFunction) _wrap_wxWindow_PopupMenuXY, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_RemoveEventHandler", (PyCFunction) _wrap_wxWindow_RemoveEventHandler, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_PushEventHandler", (PyCFunction) _wrap_wxWindow_PushEventHandler, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_PopEventHandler", (PyCFunction) _wrap_wxWindow_PopEventHandler, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Move", (PyCFunction) _wrap_wxWindow_Move, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/windows.py b/wxPython/src/gtk/windows.py index e28009f14d..44f24ba967 100644 --- a/wxPython/src/gtk/windows.py +++ b/wxPython/src/gtk/windows.py @@ -328,6 +328,9 @@ class wxWindowPtr(wxEvtHandlerPtr): def PushEventHandler(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_PushEventHandler,(self,) + _args, _kwargs) return val + def RemoveEventHandler(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_RemoveEventHandler,(self,) + _args, _kwargs) + return val def PopupMenuXY(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_PopupMenuXY,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/gtk/wx.cpp b/wxPython/src/gtk/wx.cpp index a4c8ae0aae..4cea9f009f 100644 --- a/wxPython/src/gtk/wx.cpp +++ b/wxPython/src/gtk/wx.cpp @@ -2137,8 +2137,6 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxNB_MULTILINE", PyInt_FromLong((long) wxNB_MULTILINE)); PyDict_SetItemString(d,"wxLI_HORIZONTAL", PyInt_FromLong((long) wxLI_HORIZONTAL)); PyDict_SetItemString(d,"wxLI_VERTICAL", PyInt_FromLong((long) wxLI_VERTICAL)); - PyDict_SetItemString(d,"wxHW_SCROLLBAR_NEVER", PyInt_FromLong((long) wxHW_SCROLLBAR_NEVER)); - PyDict_SetItemString(d,"wxHW_SCROLLBAR_AUTO", PyInt_FromLong((long) wxHW_SCROLLBAR_AUTO)); PyDict_SetItemString(d,"wxJOYSTICK1", PyInt_FromLong((long) wxJOYSTICK1)); PyDict_SetItemString(d,"wxJOYSTICK2", PyInt_FromLong((long) wxJOYSTICK2)); PyDict_SetItemString(d,"wxJOY_BUTTON1", PyInt_FromLong((long) wxJOY_BUTTON1)); diff --git a/wxPython/src/gtk/wx.py b/wxPython/src/gtk/wx.py index e0014fee67..20061d061e 100644 --- a/wxPython/src/gtk/wx.py +++ b/wxPython/src/gtk/wx.py @@ -425,8 +425,6 @@ wxNB_BOTTOM = wxc.wxNB_BOTTOM wxNB_MULTILINE = wxc.wxNB_MULTILINE wxLI_HORIZONTAL = wxc.wxLI_HORIZONTAL wxLI_VERTICAL = wxc.wxLI_VERTICAL -wxHW_SCROLLBAR_NEVER = wxc.wxHW_SCROLLBAR_NEVER -wxHW_SCROLLBAR_AUTO = wxc.wxHW_SCROLLBAR_AUTO wxJOYSTICK1 = wxc.wxJOYSTICK1 wxJOYSTICK2 = wxc.wxJOYSTICK2 wxJOY_BUTTON1 = wxc.wxJOY_BUTTON1 -- 2.45.2