diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2000-06-20 07:42:23 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2000-06-20 07:42:23 (GMT) |
commit | abf17032a45c5253fd7f5211cc5b4b0409721699 (patch) | |
tree | 902df0050f214754c8ab976f2c3ec4178cdb710a /Mac/Modules/evt | |
parent | fd78de3a744e833982ea7390c99faae8b81a751c (diff) | |
download | cpython-abf17032a45c5253fd7f5211cc5b4b0409721699.zip cpython-abf17032a45c5253fd7f5211cc5b4b0409721699.tar.gz cpython-abf17032a45c5253fd7f5211cc5b4b0409721699.tar.bz2 |
Made to work under carbon.
Diffstat (limited to 'Mac/Modules/evt')
-rw-r--r-- | Mac/Modules/evt/Evtmodule.c | 30 | ||||
-rw-r--r-- | Mac/Modules/evt/evtscan.py | 10 |
2 files changed, 40 insertions, 0 deletions
diff --git a/Mac/Modules/evt/Evtmodule.c b/Mac/Modules/evt/Evtmodule.c index 71858f6..a8dcc9e 100644 --- a/Mac/Modules/evt/Evtmodule.c +++ b/Mac/Modules/evt/Evtmodule.c @@ -234,6 +234,8 @@ static PyObject *Evt_PostEvent(_self, _args) return _res; } +#ifndef TARGET_API_MAC_CARBON + static PyObject *Evt_OSEventAvail(_self, _args) PyObject *_self; PyObject *_args; @@ -252,6 +254,9 @@ static PyObject *Evt_OSEventAvail(_self, _args) PyMac_BuildEventRecord, &theEvent); return _res; } +#endif + +#ifndef TARGET_API_MAC_CARBON static PyObject *Evt_GetOSEvent(_self, _args) PyObject *_self; @@ -271,6 +276,7 @@ static PyObject *Evt_GetOSEvent(_self, _args) PyMac_BuildEventRecord, &theEvent); return _res; } +#endif static PyObject *Evt_FlushEvents(_self, _args) PyObject *_self; @@ -290,6 +296,8 @@ static PyObject *Evt_FlushEvents(_self, _args) return _res; } +#ifndef TARGET_API_MAC_CARBON + static PyObject *Evt_SystemClick(_self, _args) PyObject *_self; PyObject *_args; @@ -307,6 +315,9 @@ static PyObject *Evt_SystemClick(_self, _args) _res = Py_None; return _res; } +#endif + +#ifndef TARGET_API_MAC_CARBON static PyObject *Evt_SystemTask(_self, _args) PyObject *_self; @@ -320,6 +331,9 @@ static PyObject *Evt_SystemTask(_self, _args) _res = Py_None; return _res; } +#endif + +#ifndef TARGET_API_MAC_CARBON static PyObject *Evt_SystemEvent(_self, _args) PyObject *_self; @@ -336,6 +350,7 @@ static PyObject *Evt_SystemEvent(_self, _args) _rv); return _res; } +#endif static PyObject *Evt_WaitNextEvent(_self, _args) PyObject *_self; @@ -390,18 +405,33 @@ static PyMethodDef Evt_methods[] = { "(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)"}, {"PostEvent", (PyCFunction)Evt_PostEvent, 1, "(EventKind eventNum, UInt32 eventMsg) -> None"}, + +#ifndef TARGET_API_MAC_CARBON {"OSEventAvail", (PyCFunction)Evt_OSEventAvail, 1, "(EventMask mask) -> (Boolean _rv, EventRecord theEvent)"}, +#endif + +#ifndef TARGET_API_MAC_CARBON {"GetOSEvent", (PyCFunction)Evt_GetOSEvent, 1, "(EventMask mask) -> (Boolean _rv, EventRecord theEvent)"}, +#endif {"FlushEvents", (PyCFunction)Evt_FlushEvents, 1, "(EventMask whichMask, EventMask stopMask) -> None"}, + +#ifndef TARGET_API_MAC_CARBON {"SystemClick", (PyCFunction)Evt_SystemClick, 1, "(EventRecord theEvent, WindowPtr theWindow) -> None"}, +#endif + +#ifndef TARGET_API_MAC_CARBON {"SystemTask", (PyCFunction)Evt_SystemTask, 1, "() -> None"}, +#endif + +#ifndef TARGET_API_MAC_CARBON {"SystemEvent", (PyCFunction)Evt_SystemEvent, 1, "(EventRecord theEvent) -> (Boolean _rv)"}, +#endif {"WaitNextEvent", (PyCFunction)Evt_WaitNextEvent, 1, "(EventMask eventMask, UInt32 sleep [,RegionHandle]) -> (Boolean _rv, EventRecord theEvent)"}, {NULL, NULL, 0} diff --git a/Mac/Modules/evt/evtscan.py b/Mac/Modules/evt/evtscan.py index 0a3ede0..597cf9b 100644 --- a/Mac/Modules/evt/evtscan.py +++ b/Mac/Modules/evt/evtscan.py @@ -35,6 +35,16 @@ class MyScanner(Scanner): listname = "methods" return classname, listname + def makegreylist(self): + return [ + ('#ifndef TARGET_API_MAC_CARBON', [ + 'SystemEvent', + 'SystemTask', + 'SystemClick', + 'GetOSEvent', + 'OSEventAvail', + ])] + def makeblacklistnames(self): return [ "KeyTranslate", |