summaryrefslogtreecommitdiffstats
path: root/Mac/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Modules')
-rw-r--r--Mac/Modules/dlg/_Dlgmodule.c12
-rw-r--r--Mac/Modules/dlg/dlgscan.py7
2 files changed, 14 insertions, 5 deletions
diff --git a/Mac/Modules/dlg/_Dlgmodule.c b/Mac/Modules/dlg/_Dlgmodule.c
index c4e3ed8..3e0bc6d 100644
--- a/Mac/Modules/dlg/_Dlgmodule.c
+++ b/Mac/Modules/dlg/_Dlgmodule.c
@@ -14,9 +14,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -502,7 +502,9 @@ static PyObject *DlgObj_StdFilterProc(DialogObject *_self, PyObject *_args)
#ifndef StdFilterProc
PyMac_PRECHECK(StdFilterProc);
#endif
- if (!PyArg_ParseTuple(_args, ""))
+ if (!PyArg_ParseTuple(_args, "O&h",
+ PyMac_GetEventRecord, &event,
+ &itemHit))
return NULL;
_rv = StdFilterProc(_self->ob_itself,
&event,
@@ -903,7 +905,7 @@ static PyMethodDef DlgObj_methods[] = {
{"RemoveDialogItems", (PyCFunction)DlgObj_RemoveDialogItems, 1,
PyDoc_STR("(DialogItemIndex itemNo, DialogItemIndex amountToRemove, Boolean disposeItemData) -> None")},
{"StdFilterProc", (PyCFunction)DlgObj_StdFilterProc, 1,
- PyDoc_STR("() -> (Boolean _rv, EventRecord event, DialogItemIndex itemHit)")},
+ PyDoc_STR("(EventRecord event, DialogItemIndex itemHit) -> (Boolean _rv, EventRecord event, DialogItemIndex itemHit)")},
{"SetDialogDefaultItem", (PyCFunction)DlgObj_SetDialogDefaultItem, 1,
PyDoc_STR("(DialogItemIndex newItem) -> None")},
{"SetDialogCancelItem", (PyCFunction)DlgObj_SetDialogCancelItem, 1,
diff --git a/Mac/Modules/dlg/dlgscan.py b/Mac/Modules/dlg/dlgscan.py
index 9567419..3710d5d 100644
--- a/Mac/Modules/dlg/dlgscan.py
+++ b/Mac/Modules/dlg/dlgscan.py
@@ -99,6 +99,13 @@ class MyScanner(Scanner):
[("ExistingWindowPtr", "*", "*")]),
([("WindowPtr", "*", "ReturnMode")],
[("ExistingWindowPtr", "*", "*")]),
+
+ # StdFilterProc
+ ([('EventRecord', 'event', 'OutMode'),
+ ('DialogItemIndex', 'itemHit', 'OutMode')],
+ [('EventRecord', 'event', 'InOutMode'),
+ ('DialogItemIndex', 'itemHit', 'InOutMode')])
+
]
def writeinitialdefs(self):