Ejemplo n.º 1
0
Archivo: Window.cpp Proyecto: A600/xbmc
    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);
    }
Ejemplo n.º 2
0
  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;
  }
Ejemplo n.º 3
0
  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;
  }
Ejemplo n.º 4
0
Archivo: Window.cpp Proyecto: A600/xbmc
 void Window::setFocusId(int iControlId)
 {
   TRACE;
   CGUIMessage msg = CGUIMessage(GUI_MSG_SETFOCUS,iWindowId,iControlId);
   g_windowManager.SendThreadMessage(msg, iWindowId);
 }