diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1998-09-17 15:28:58 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1998-09-17 15:28:58 (GMT) |
commit | 91b5bedf1cf35911e5b7e92af0bf4626dbd90da9 (patch) | |
tree | 54a2b8ce0a4ae881bb99d7c6f04e36a0bbafe115 /Mac/Modules/evt/evtsupport.py | |
parent | 6442116029f3ecd5768c798ac6931f32c8e73abc (diff) | |
download | cpython-91b5bedf1cf35911e5b7e92af0bf4626dbd90da9.zip cpython-91b5bedf1cf35911e5b7e92af0bf4626dbd90da9.tar.gz cpython-91b5bedf1cf35911e5b7e92af0bf4626dbd90da9.tar.bz2 |
Added optional mouseregion parameter to WaitNextEvent (which is now
manually generated).
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() |