diff options
Diffstat (limited to 'Mac/Modules/evt/evtsupport.py')
-rw-r--r-- | Mac/Modules/evt/evtsupport.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Mac/Modules/evt/evtsupport.py b/Mac/Modules/evt/evtsupport.py index d1cc1d1..ed06b5d 100644 --- a/Mac/Modules/evt/evtsupport.py +++ b/Mac/Modules/evt/evtsupport.py @@ -74,6 +74,31 @@ execfile(INPUTFILE) for f in functions: module.add(f) ##for f in methods: object.add(f) +WaitNextEvent_body = """ +Boolean _rv; +EventMask eventMask; +EventRecord theEvent; +UInt32 sleep; +Handle mouseregion = (Handle)0; + +if (!PyArg_ParseTuple(_args, "hl|O&", + &eventMask, + &sleep, + OptResObj_Convert, &mouseregion)) + return NULL; +_rv = WaitNextEvent(eventMask, + &theEvent, + sleep, + (RgnHandle)mouseregion); +_res = Py_BuildValue("bO&", + _rv, + PyMac_BuildEventRecord, &theEvent); +return _res; +""" +f = ManualGenerator("WaitNextEvent", WaitNextEvent_body); +f.docstring = lambda: "(EventMask eventMask, UInt32 sleep [,RegionHandle]) -> (Boolean _rv, EventRecord theEvent)" +module.add(f) + # generate output (open the output file as late as possible) SetOutputFileName(OUTPUTFILE) module.generate() |