diff options
Diffstat (limited to 'Mac/Modules')
-rw-r--r-- | Mac/Modules/dlg/dlgscan.py | 4 | ||||
-rw-r--r-- | Mac/Modules/dlg/dlgsupport.py | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Mac/Modules/dlg/dlgscan.py b/Mac/Modules/dlg/dlgscan.py index 6738828..b56edfd 100644 --- a/Mac/Modules/dlg/dlgscan.py +++ b/Mac/Modules/dlg/dlgscan.py @@ -63,6 +63,10 @@ class MyScanner(Scanner): ([("void", "*", "OutMode"), ("long", "*", "InMode"), ("long", "*", "OutMode")], [("VarVarOutBuffer", "*", "InOutMode")]), + + # GetDialogItem return handle is optional + ([("Handle", "item", "OutMode")], + [("OptHandle", "item", "OutMode")]), # NewDialog ETC. ([("void", "*", "OutMode")], diff --git a/Mac/Modules/dlg/dlgsupport.py b/Mac/Modules/dlg/dlgsupport.py index 8761ea8..0b5f082 100644 --- a/Mac/Modules/dlg/dlgsupport.py +++ b/Mac/Modules/dlg/dlgsupport.py @@ -13,6 +13,12 @@ from macsupport import * DialogPtr = OpaqueByValueType("DialogPtr", "DlgObj") DialogRef = DialogPtr +# XXXX There must be a more elegant way to do this. An OptHandle is +# either a handle or None (in case NULL is passed in). This is needed +# for GetDialogItem(). +OptHandle = OpaqueByValueType("Handle", "ResObj") +OptHandle.new = "ResObj_OptNew" + ModalFilterProcPtr = InputOnlyType("PyObject*", "O") ModalFilterProcPtr.passInput = lambda name: "NewModalFilterProc(Dlg_PassFilterProc(%s))" % name ModalFilterUPP = ModalFilterProcPtr |