diff --git a/wxPython/src/gtk/windows.cpp b/wxPython/src/gtk/windows.cpp index 2e4f52e322..65ec36cf3b 100644 --- a/wxPython/src/gtk/windows.cpp +++ b/wxPython/src/gtk/windows.cpp @@ -161,6 +161,10 @@ IMP_PYCALLBACK_BOOL_(wxPyValidator, wxValidator, TransferFromWindow); IMPLEMENT_DYNAMIC_CLASS(wxPyValidator, wxValidator); + wxWindow* wxWindow_FindFocus() { + return wxWindow::FindFocus(); + } + int wxWindow_NewControlId() { return wxWindow::NewControlId(); } @@ -208,6 +212,30 @@ static PyObject *_wrap_wxValidator_SetBellOnError(PyObject *self, PyObject *args return _resultobj; } +static PyObject *_wrap_wxWindow_FindFocus(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWindow_FindFocus",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxWindow_FindFocus(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + static PyObject *_wrap_wxWindow_NewControlId(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _result; @@ -9245,6 +9273,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_PrevControlId", (PyCFunction) _wrap_wxWindow_PrevControlId, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_NextControlId", (PyCFunction) _wrap_wxWindow_NextControlId, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_NewControlId", (PyCFunction) _wrap_wxWindow_NewControlId, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_FindFocus", (PyCFunction) _wrap_wxWindow_FindFocus, METH_VARARGS | METH_KEYWORDS }, { "wxValidator_SetBellOnError", (PyCFunction) _wrap_wxValidator_SetBellOnError, METH_VARARGS | METH_KEYWORDS }, { "wxValidator_IsSilent", (PyCFunction) _wrap_wxValidator_IsSilent, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } diff --git a/wxPython/src/gtk/windows.py b/wxPython/src/gtk/windows.py index 5875117f15..0f59d6a1f4 100644 --- a/wxPython/src/gtk/windows.py +++ b/wxPython/src/gtk/windows.py @@ -978,6 +978,11 @@ wxValidator_IsSilent = windowsc.wxValidator_IsSilent wxValidator_SetBellOnError = windowsc.wxValidator_SetBellOnError +def wxWindow_FindFocus(*_args, **_kwargs): + val = apply(windowsc.wxWindow_FindFocus,_args,_kwargs) + if val: val = wxWindowPtr(val) + return val + wxWindow_NewControlId = windowsc.wxWindow_NewControlId wxWindow_NextControlId = windowsc.wxWindow_NextControlId diff --git a/wxPython/src/windows.i b/wxPython/src/windows.i index b5ac973683..e5e7c12050 100644 --- a/wxPython/src/windows.i +++ b/wxPython/src/windows.i @@ -446,7 +446,6 @@ def wxDLG_SZE(win, size_width, height=None): return win.ConvertDialogSizeToPixels(wxSize(size_width, height)) " -#ifdef __WXMSW__ %inline %{ wxWindow* wxWindow_FindFocus() { return wxWindow::FindFocus(); @@ -454,6 +453,7 @@ def wxDLG_SZE(win, size_width, height=None): %} +#ifdef __WXMSW__ %inline %{ wxWindow* wxWindow_FromHWND(unsigned long hWnd) { wxWindow* win = new wxWindow;