void Window::setFocus(Control* pControl) throw (WindowException) { TRACE; if(pControl == NULL) throw WindowException("Object should be of type Control"); CGUIMessage msg = CGUIMessage(GUI_MSG_SETFOCUS,pControl->iParentId, pControl->iControlId); g_windowManager.SendThreadMessage(msg, pControl->iParentId); }
PyObject* Window_SetFocusId(Window *self, PyObject *args) { int iControlId; if (!PyArg_ParseTuple(args, (char*)"i", &iControlId)) return NULL; CGUIMessage msg = CGUIMessage(GUI_MSG_SETFOCUS,self->iWindowId,iControlId); g_windowManager.SendThreadMessage(msg, self->iWindowId); Py_INCREF(Py_None); return Py_None; }
PyObject* Window_SetFocus(Window *self, PyObject *args) { Control* pControl; if (!PyArg_ParseTuple(args, (char*)"O", &pControl)) return NULL; // type checking, object should be of type Control if(!Control_Check(pControl)) { PyErr_SetString(PyExc_TypeError, "Object should be of type Control"); return NULL; } CGUIMessage msg = CGUIMessage(GUI_MSG_SETFOCUS,pControl->iParentId, pControl->iControlId); g_windowManager.SendThreadMessage(msg, pControl->iParentId); Py_INCREF(Py_None); return Py_None; }
void Window::setFocusId(int iControlId) { TRACE; CGUIMessage msg = CGUIMessage(GUI_MSG_SETFOCUS,iWindowId,iControlId); g_windowManager.SendThreadMessage(msg, iWindowId); }