[pywin32-checkins] pywin32/Pythonwin win32uiole.cpp,1.5,1.6
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2006-08-10 10:11:30
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26800 Modified Files: win32uiole.cpp Log Message: Add AfxOleInit, SetMessagePendingDelay, EnableNotRespondingDialog and EnableBusyDialog to the win32uiole module. Index: win32uiole.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uiole.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** win32uiole.cpp 28 Jan 2005 22:40:01 -0000 1.5 --- win32uiole.cpp 10 Aug 2006 10:11:06 -0000 1.6 *************** *** 98,103 **** --- 98,150 ---- } + // @pymethod |win32uiole|SetMessagePendingDelay| + static PyObject *win32uiole_SetMessagePendingDelay(PyObject *self, PyObject *args) + { + // @pyparm int|delay|| + int delay; + if (!PyArg_ParseTuple(args, "i", &delay)) + return NULL; + AfxOleGetMessageFilter()->SetMessagePendingDelay(delay); + Py_INCREF(Py_None); + return Py_None; + } + + // @pymethod |win32uiole|EnableNotRespondingDialog| + static PyObject *win32uiole_EnableNotRespondingDialog(PyObject *self, PyObject *args) + { + // @pyparm bool|enabled|| + int enabled; + if (!PyArg_ParseTuple(args, "i", &enabled)) + return NULL; + AfxOleGetMessageFilter()->EnableNotRespondingDialog(enabled); + Py_INCREF(Py_None); + return Py_None; + } + + // @pymethod |win32uiole|EnableBusyDialog| + static PyObject *win32uiole_EnableBusyDialog(PyObject *self, PyObject *args) + { + // @pyparm bool|enabled|| + int enabled; + if (!PyArg_ParseTuple(args, "i", &enabled)) + return NULL; + AfxOleGetMessageFilter()->EnableBusyDialog(enabled); + Py_INCREF(Py_None); + return Py_None; + } + + // @pymethod |win32uiole|AfxOleInit| + static PyObject *win32uiole_AfxOleInit(PyObject *self, PyObject *args) + { + // @pyparm bool|enabled|| + if (!PyArg_ParseTuple(args, "")) + return NULL; + BOOL rc = AfxOleInit(); + return PyBool_FromLong(rc); + } + // @module win32uiole|A module, encapsulating the Microsoft Foundation Classes OLE functionality. static struct PyMethodDef uiole_functions[] = { + {"AfxOleInit", win32uiole_AfxOleInit, 1}, // @pymeth AfxOleInit| {"CreateInsertDialog", PyCOleInsertDialog::create, 1}, // @pymeth CreateInsertDialog|Creates a InsertObject dialog. {"CreateOleClientItem", PyCOleClientItem_Create, 1}, // @pymeth CreateOleClientItem|Creates a <o PyCOleClientItem> object. *************** *** 107,110 **** --- 154,160 ---- {"OleGetUserCtrl", win32uiole_get_user_ctrl, 1}, // @pymeth OleGetUserCtrl|Retrieves the current user-control flag. {"OleSetUserCtrl", win32uiole_set_user_ctrl, 1}, // @pymeth OleSetUserCtrl|Sets the current user-control flag. + {"SetMessagePendingDelay", win32uiole_SetMessagePendingDelay, 1}, // @pymeth SetMessagePendingDelay| + {"EnableNotRespondingDialog", win32uiole_EnableNotRespondingDialog, 1}, // @pymeth EnableNotRespondingDialog| + {"EnableBusyDialog", win32uiole_EnableBusyDialog, 1}, // @pymeth EnableNotRespondingDialog| {NULL, NULL} }; |