diff --git a/src/EterPythonLib/PythonWindowManagerModule.cpp b/src/EterPythonLib/PythonWindowManagerModule.cpp index fcbd8571..80198849 100644 --- a/src/EterPythonLib/PythonWindowManagerModule.cpp +++ b/src/EterPythonLib/PythonWindowManagerModule.cpp @@ -3,6 +3,18 @@ #include "PythonSlotWindow.h" #include "PythonGridSlotWindow.h" +bool PyTuple_GetWindow(PyObject* poArgs, int pos, UI::CWindow ** ppRetWindow) +{ + int iHandle; + if (!PyTuple_GetInteger(poArgs, pos, &iHandle)) + return false; + if (!iHandle) + return false; + + *ppRetWindow = (UI::CWindow*)iHandle; + return true; +} + #if defined(__BL_CLIP_MASK__) PyObject* wndMgrSetClippingMaskRect(PyObject* poSelf, PyObject* poArgs) { @@ -39,18 +51,6 @@ PyObject* wndMgrSetClippingMaskWindow(PyObject* poSelf, PyObject* poArgs) } #endif -bool PyTuple_GetWindow(PyObject* poArgs, int pos, UI::CWindow ** ppRetWindow) -{ - int iHandle; - if (!PyTuple_GetInteger(poArgs, pos, &iHandle)) - return false; - if (!iHandle) - return false; - - *ppRetWindow = (UI::CWindow*)iHandle; - return true; -} - PyObject * wndMgrGetAspect(PyObject * poSelf, PyObject * poArgs) { return Py_BuildValue("f", UI::CWindowManager::Instance().GetAspect());