summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Modules/evt/Evtmodule.c30
-rw-r--r--Mac/Modules/evt/evtscan.py10
-rw-r--r--Mac/Modules/macconfig.c6
3 files changed, 44 insertions, 2 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",
diff --git a/Mac/Modules/macconfig.c b/Mac/Modules/macconfig.c
index 021e096..74f7c15 100644
--- a/Mac/Modules/macconfig.c
+++ b/Mac/Modules/macconfig.c
@@ -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 -- */