]> granicus.if.org Git - python/commitdiff
Made to work under carbon.
authorJack Jansen <jack.jansen@cwi.nl>
Tue, 20 Jun 2000 07:42:23 +0000 (07:42 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Tue, 20 Jun 2000 07:42:23 +0000 (07:42 +0000)
Mac/Modules/evt/Evtmodule.c
Mac/Modules/evt/evtscan.py
Mac/Modules/macconfig.c

index 71858f606beac6f8055835edfa4202b90c0b24cd..a8dcc9e42f5d2a421243c729cb2ce4826af975f4 100644 (file)
@@ -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}
index 0a3ede0c381179a48385ca321759d2c30b724178..597cf9b4fad843104139e3b9c4d7063f79774102 100644 (file)
@@ -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",
index 021e096b8aa2596e0cda72fff94477dace5fc279..74f7c15627a83fc36b8c4c74c8b4db9acc0b8fc8 100644 (file)
@@ -96,7 +96,6 @@ extern void initmactcp();
 #define USE_CORE_TOOLBOX
 #endif
 extern void initApp();
-extern void initEvt();
 extern void initFm();
 extern void initHelp();
 extern void initIcn();
@@ -113,6 +112,7 @@ extern void initDrag();
 extern void initAE();
 extern void initCtl();
 extern void initDlg();
+extern void initEvt();
 extern void initMenu();
 extern void initQd();
 extern void initRes();
@@ -160,6 +160,7 @@ extern void initthread();
 extern void initcPickle();
 extern void initcStringIO();
 extern void init_codecs();
+extern void init_locale();
 /* -- ADDMODULE MARKER 1 -- */
 
 extern void PyMarshal_Init();
@@ -208,6 +209,7 @@ struct _inittab _PyImport_Inittab[] = {
        {"AE", initAE},
        {"Ctl", initCtl},
        {"Dlg", initDlg},
+       {"Evt", initEvt},
        {"Menu", initMenu},
        {"Nav", initNav},
        {"Qd", initQd},
@@ -216,7 +218,6 @@ struct _inittab _PyImport_Inittab[] = {
 #endif
 #ifdef USE_TOOLBOX
        {"App", initApp},
-       {"Evt", initEvt},
        {"Fm", initFm},
        {"Icn", initIcn},
        {"List", initList},
@@ -270,6 +271,7 @@ struct _inittab _PyImport_Inittab[] = {
        {"cPickle",     initcPickle},
        {"cStringIO",   initcStringIO},
        {"_codecs", init_codecs},
+       {"_locale", init_locale},
 
 /* -- ADDMODULE MARKER 2 -- */