Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30330/win32/src
Modified Files:
win32consolemodule.cpp
Log Message:
Add GetNumberOfConsoleInputEvents
Index: win32consolemodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32consolemodule.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** win32consolemodule.cpp 20 Sep 2005 05:24:46 -0000 1.5
--- win32consolemodule.cpp 28 Sep 2005 02:19:06 -0000 1.6
***************
*** 795,798 ****
--- 795,799 ----
static PyObject *PyReadConsoleInput(PyObject *self, PyObject *args, PyObject *kwargs);
static PyObject *PyPeekConsoleInput(PyObject *self, PyObject *args, PyObject *kwargs);
+ static PyObject *PyGetNumberOfConsoleInputEvents(PyObject *self, PyObject *args);
};
***************
*** 888,892 ****
// @pymeth PeekConsoleInput|Returns pending input records without removing them from the input queue
{"PeekConsoleInput", (PyCFunction)PyConsoleScreenBuffer::PyPeekConsoleInput, METH_VARARGS|METH_KEYWORDS,
! "Returns pending input records without removing them from the input queue"},
{NULL}
};
--- 889,896 ----
// @pymeth PeekConsoleInput|Returns pending input records without removing them from the input queue
{"PeekConsoleInput", (PyCFunction)PyConsoleScreenBuffer::PyPeekConsoleInput, METH_VARARGS|METH_KEYWORDS,
! "Returns pending input records without removing them from the input queue"},
! // @pymethod GetNumberOfConsoleInputEvents|Returns the number of unread records in the input queue
! {"GetNumberOfConsoleInputEvents", PyConsoleScreenBuffer::PyGetNumberOfConsoleInputEvents, METH_VARARGS,
! "Returns the number of unread records in the input queue"},
{NULL}
};
***************
*** 1500,1503 ****
--- 1504,1518 ----
}
+ // @pymethod int|PyConsoleScreenBuffer|GetNumberOfConsoleInputEvents|Returns the number of unread records in the input queue
+ PyObject *PyConsoleScreenBuffer::PyGetNumberOfConsoleInputEvents(PyObject *self, PyObject *args)
+ {
+ if (!PyArg_ParseTuple(args, ":GetNumberOfConsoleInputEvents"))
+ return NULL;
+ DWORD nbrofevents;
+ if (!GetNumberOfConsoleInputEvents(((PyConsoleScreenBuffer *)self)->m_handle, &nbrofevents))
+ return PyWin_SetAPIError("GetNumberOfConsoleInputEvents");
+ return PyLong_FromUnsignedLong(nbrofevents);
+ }
+
|