summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/dlg
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Modules/dlg')
-rw-r--r--Mac/Modules/dlg/Dlgmodule.c13
-rw-r--r--Mac/Modules/dlg/dlggen.py2
-rw-r--r--Mac/Modules/dlg/dlgsupport.py8
3 files changed, 15 insertions, 8 deletions
diff --git a/Mac/Modules/dlg/Dlgmodule.c b/Mac/Modules/dlg/Dlgmodule.c
index 49f6553..93de3e9 100644
--- a/Mac/Modules/dlg/Dlgmodule.c
+++ b/Mac/Modules/dlg/Dlgmodule.c
@@ -14,11 +14,14 @@
#include <Controls.h>
extern PyObject *ResObj_New(Handle);
-extern PyObject *ResObj_OptNew(Handle);
extern int ResObj_Convert(PyObject *, Handle *);
+extern PyObject *OptResObj_New(Handle);
+extern int OptResObj_Convert(PyObject *, Handle *);
extern PyObject *WinObj_New(WindowPtr);
extern int WinObj_Convert(PyObject *, WindowPtr *);
+extern PyTypeObject Window_Type;
+#define WinObj_Check(x) ((x)->ob_type == &Window_Type)
extern PyObject *DlgObj_New(DialogPtr);
extern int DlgObj_Convert(PyObject *, DialogPtr *);
@@ -31,6 +34,12 @@ extern int MenuObj_Convert(PyObject *, MenuHandle *);
extern PyObject *CtlObj_New(ControlHandle);
extern int CtlObj_Convert(PyObject *, ControlHandle *);
+extern PyObject *GrafObj_New(GrafPtr);
+extern int GrafObj_Convert(PyObject *, GrafPtr *);
+
+extern PyObject *BMObj_New(BitMapPtr);
+extern int BMObj_Convert(PyObject *, BitMapPtr *);
+
extern PyObject *WinObj_WhichWindow(WindowPtr);
#include <Dialogs.h>
@@ -192,7 +201,7 @@ static PyObject *DlgObj_GetDialogItem(_self, _args)
&box);
_res = Py_BuildValue("hO&O&",
itemType,
- ResObj_OptNew, item,
+ OptResObj_New, item,
PyMac_BuildRect, &box);
return _res;
}
diff --git a/Mac/Modules/dlg/dlggen.py b/Mac/Modules/dlg/dlggen.py
index 4319520..3c1e669 100644
--- a/Mac/Modules/dlg/dlggen.py
+++ b/Mac/Modules/dlg/dlggen.py
@@ -1,4 +1,4 @@
-# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Dialogs.h'
+# Generated from 'Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Dialogs.h'
f = Function(DialogRef, 'NewDialog',
(NullStorage, 'wStorage', InMode),
diff --git a/Mac/Modules/dlg/dlgsupport.py b/Mac/Modules/dlg/dlgsupport.py
index 0b5f082..cd255ef 100644
--- a/Mac/Modules/dlg/dlgsupport.py
+++ b/Mac/Modules/dlg/dlgsupport.py
@@ -13,11 +13,9 @@ 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"
+# An OptHandle is either a handle or None (in case NULL is passed in).
+# This is needed for GetDialogItem().
+OptHandle = OpaqueByValueType("Handle", "OptResObj")
ModalFilterProcPtr = InputOnlyType("PyObject*", "O")
ModalFilterProcPtr.passInput = lambda name: "NewModalFilterProc(Dlg_PassFilterProc(%s))" % name