Added support for GetDialogWindow and other accessor functions
diff --git a/Mac/Modules/dlg/Dlgmodule.c b/Mac/Modules/dlg/Dlgmodule.c
index c0297f3..5949ea1 100644
--- a/Mac/Modules/dlg/Dlgmodule.c
+++ b/Mac/Modules/dlg/Dlgmodule.c
@@ -479,6 +479,75 @@
 	return _res;
 }
 
+static PyObject *DlgObj_GetDialogWindow(_self, _args)
+	DialogObject *_self;
+	PyObject *_args;
+{
+	PyObject *_res = NULL;
+	DialogPtr _rv;
+	if (!PyArg_ParseTuple(_args, ""))
+		return NULL;
+	_rv = GetDialogWindow(_self->ob_itself);
+	_res = Py_BuildValue("O&",
+	                     WinObj_WhichWindow, _rv);
+	return _res;
+}
+
+static PyObject *DlgObj_GetDialogDefaultItem(_self, _args)
+	DialogObject *_self;
+	PyObject *_args;
+{
+	PyObject *_res = NULL;
+	SInt16 _rv;
+	if (!PyArg_ParseTuple(_args, ""))
+		return NULL;
+	_rv = GetDialogDefaultItem(_self->ob_itself);
+	_res = Py_BuildValue("h",
+	                     _rv);
+	return _res;
+}
+
+static PyObject *DlgObj_GetDialogCancelItem(_self, _args)
+	DialogObject *_self;
+	PyObject *_args;
+{
+	PyObject *_res = NULL;
+	SInt16 _rv;
+	if (!PyArg_ParseTuple(_args, ""))
+		return NULL;
+	_rv = GetDialogCancelItem(_self->ob_itself);
+	_res = Py_BuildValue("h",
+	                     _rv);
+	return _res;
+}
+
+static PyObject *DlgObj_GetDialogKeyboardFocusItem(_self, _args)
+	DialogObject *_self;
+	PyObject *_args;
+{
+	PyObject *_res = NULL;
+	SInt16 _rv;
+	if (!PyArg_ParseTuple(_args, ""))
+		return NULL;
+	_rv = GetDialogKeyboardFocusItem(_self->ob_itself);
+	_res = Py_BuildValue("h",
+	                     _rv);
+	return _res;
+}
+
+static PyObject *DlgObj_SetGrafPortOfDialog(_self, _args)
+	DialogObject *_self;
+	PyObject *_args;
+{
+	PyObject *_res = NULL;
+	if (!PyArg_ParseTuple(_args, ""))
+		return NULL;
+	SetGrafPortOfDialog(_self->ob_itself);
+	Py_INCREF(Py_None);
+	_res = Py_None;
+	return _res;
+}
+
 static PyMethodDef DlgObj_methods[] = {
 	{"DrawDialog", (PyCFunction)DlgObj_DrawDialog, 1,
 	 "() -> None"},
@@ -518,6 +587,16 @@
 	 "(short newItem) -> None"},
 	{"SetDialogTracksCursor", (PyCFunction)DlgObj_SetDialogTracksCursor, 1,
 	 "(Boolean tracks) -> None"},
+	{"GetDialogWindow", (PyCFunction)DlgObj_GetDialogWindow, 1,
+	 "() -> (DialogPtr _rv)"},
+	{"GetDialogDefaultItem", (PyCFunction)DlgObj_GetDialogDefaultItem, 1,
+	 "() -> (SInt16 _rv)"},
+	{"GetDialogCancelItem", (PyCFunction)DlgObj_GetDialogCancelItem, 1,
+	 "() -> (SInt16 _rv)"},
+	{"GetDialogKeyboardFocusItem", (PyCFunction)DlgObj_GetDialogKeyboardFocusItem, 1,
+	 "() -> (SInt16 _rv)"},
+	{"SetGrafPortOfDialog", (PyCFunction)DlgObj_SetGrafPortOfDialog, 1,
+	 "() -> None"},
 	{NULL, NULL, 0}
 };
 
diff --git a/Mac/Modules/dlg/dlgsupport.py b/Mac/Modules/dlg/dlgsupport.py
index ca4e0df..14bef36 100644
--- a/Mac/Modules/dlg/dlgsupport.py
+++ b/Mac/Modules/dlg/dlgsupport.py
@@ -129,6 +129,20 @@
 for f in functions: module.add(f)
 for f in methods: object.add(f)
 
+# Some methods that are currently macro's in C, but will be real routines
+# in MacOS 8.
+
+f = Method(ExistingDialogPtr, 'GetDialogWindow', (DialogRef, 'dialog', InMode))
+object.add(f)
+f = Method(SInt16, 'GetDialogDefaultItem', (DialogRef, 'dialog', InMode))
+object.add(f)
+f = Method(SInt16, 'GetDialogCancelItem', (DialogRef, 'dialog', InMode))
+object.add(f)
+f = Method(SInt16, 'GetDialogKeyboardFocusItem', (DialogRef, 'dialog', InMode))
+object.add(f)
+f = Method(void, 'SetGrafPortOfDialog', (DialogRef, 'dialog', InMode))
+object.add(f)
+
 # generate output
 SetOutputFileName('Dlgmodule.c')
 module.generate()