PyObject* wndMgrSetSlotPosition(PyObject* poSelf, PyObject* poArgs)
{
UI::CWindow* pWin;
int iSlotIndex;
int x, y;
if (!PyTuple_GetWindow(poArgs, 0, &pWin))
return Py_BuildException();
if (!PyTuple_GetInteger(poArgs, 1, &iSlotIndex))
return Py_BuildException();
if (!PyTuple_GetInteger(poArgs, 2, &x))
return Py_BuildException();
if (!PyTuple_GetInteger(poArgs, 3, &y))
return Py_BuildException();
UI::CSlotWindow* pSlotWin = dynamic_cast<UI::CSlotWindow*>(pWin);
if (!pSlotWin)
return Py_BuildValue("i", 0);
bool ok = pSlotWin->SetSlotPosition(iSlotIndex, x, y);
return Py_BuildValue("i", ok ? 1 : 0);
}
{ "SetSlotPosition", wndMgrSetSlotPosition, METH_VARARGS },