1. PyObject * wndMgrSetUnusableSlot(PyObject * poSelf, PyObject * poArgs)
  2. {
  3. UI::CWindow * pWin;
  4. if (!PyTuple_GetWindow(poArgs, 0, &pWin))
  5. return Py_BuildException();
  6. int iSlotIndex;
  7. if (!PyTuple_GetInteger(poArgs, 1, &iSlotIndex))
  8. return Py_BuildException();
  9. if (!pWin->IsType(UI::CSlotWindow::Type()))
  10. return Py_BuildException();
  11. UI::CSlotWindow * pSlotWin = (UI::CSlotWindow *)pWin;
  12. pSlotWin->SetUnusableSlot(iSlotIndex);
  13. return Py_BuildNone();
  14. }
  15. PyObject * wndMgrSetUsableSlot(PyObject * poSelf, PyObject * poArgs)
  16. {
  17. UI::CWindow * pWin;
  18. if (!PyTuple_GetWindow(poArgs, 0, &pWin))
  19. return Py_BuildException();
  20. int iSlotIndex;
  21. if (!PyTuple_GetInteger(poArgs, 1, &iSlotIndex))
  22. return Py_BuildException();
  23. if (!pWin->IsType(UI::CSlotWindow::Type()))
  24. return Py_BuildException();
  25. UI::CSlotWindow * pSlotWin = (UI::CSlotWindow *)pWin;
  26. pSlotWin->SetUsableSlot(iSlotIndex);
  27. return Py_BuildNone();
  28. }