diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-12-17 11:46:50 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-12-17 11:46:50 (GMT) |
commit | ec982e2739f6d7992d530c0940965f6eeb73a467 (patch) | |
tree | f7890909acc362ff9b2a450133fa796d8f68021f /Mac/Modules/evt/_Evtmodule.c | |
parent | 564980bd86017c8ab3b94f6c2be7259c87d9de05 (diff) | |
download | cpython-ec982e2739f6d7992d530c0940965f6eeb73a467.zip cpython-ec982e2739f6d7992d530c0940965f6eeb73a467.tar.gz cpython-ec982e2739f6d7992d530c0940965f6eeb73a467.tar.bz2 |
TickCount moved to a different header file. We manually added it back in here, for conveninece.
Diffstat (limited to 'Mac/Modules/evt/_Evtmodule.c')
-rw-r--r-- | Mac/Modules/evt/_Evtmodule.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Mac/Modules/evt/_Evtmodule.c b/Mac/Modules/evt/_Evtmodule.c index 4afc049..7a977da 100644 --- a/Mac/Modules/evt/_Evtmodule.c +++ b/Mac/Modules/evt/_Evtmodule.c @@ -5,8 +5,12 @@ +#ifdef _WIN32 +#include "pywintoolbox.h" +#else #include "macglue.h" #include "pymactoolbox.h" +#endif /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ @@ -455,6 +459,18 @@ static PyObject *Evt_LMSetKbdType(PyObject *_self, PyObject *_args) return _res; } +static PyObject *Evt_TickCount(PyObject *_self, PyObject *_args) +{ + PyObject *_res = NULL; + UInt32 _rv; + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _rv = TickCount(); + _res = Py_BuildValue("l", + _rv); + return _res; +} + static PyObject *Evt_WaitNextEvent(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -566,6 +582,8 @@ static PyMethodDef Evt_methods[] = { "() -> (UInt8 _rv)"}, {"LMSetKbdType", (PyCFunction)Evt_LMSetKbdType, 1, "(UInt8 value) -> None"}, + {"TickCount", (PyCFunction)Evt_TickCount, 1, + "() -> (UInt32 _rv)"}, {"WaitNextEvent", (PyCFunction)Evt_WaitNextEvent, 1, "(EventMask eventMask, UInt32 sleep [,RegionHandle]) -> (Boolean _rv, EventRecord theEvent)"}, {NULL, NULL, 0} |