summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/dlg
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1999-12-12 21:41:51 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1999-12-12 21:41:51 (GMT)
commita05ac607d720727bc0d3799b7bea7a81e02ea561 (patch)
treec000d84ecf27d68dcdcbfa954b2d03e0f3566800 /Mac/Modules/dlg
parent608b3fa801303332de71ef6bad696e9a8b7b00f3 (diff)
downloadcpython-a05ac607d720727bc0d3799b7bea7a81e02ea561.zip
cpython-a05ac607d720727bc0d3799b7bea7a81e02ea561.tar.gz
cpython-a05ac607d720727bc0d3799b7bea7a81e02ea561.tar.bz2
Regenerated with CW Pro 5.2, which has MacOS 8.6 and Appearance 1.1 support.
Diffstat (limited to 'Mac/Modules/dlg')
-rw-r--r--Mac/Modules/dlg/Dlgmodule.c130
-rw-r--r--Mac/Modules/dlg/dlgscan.py6
-rw-r--r--Mac/Modules/dlg/dlgsupport.py1
3 files changed, 132 insertions, 5 deletions
diff --git a/Mac/Modules/dlg/Dlgmodule.c b/Mac/Modules/dlg/Dlgmodule.c
index 2abd785..fbbadd8 100644
--- a/Mac/Modules/dlg/Dlgmodule.c
+++ b/Mac/Modules/dlg/Dlgmodule.c
@@ -587,6 +587,106 @@ static PyObject *DlgObj_SizeDialogItem(_self, _args)
return _res;
}
+static PyObject *DlgObj_AppendDialogItemList(_self, _args)
+ DialogObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 ditlID;
+ DITLMethod method;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &ditlID,
+ &method))
+ return NULL;
+ _err = AppendDialogItemList(_self->ob_itself,
+ ditlID,
+ method);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *DlgObj_SetDialogTimeout(_self, _args)
+ DialogObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ SInt16 inButtonToPress;
+ UInt32 inSecondsToWait;
+ if (!PyArg_ParseTuple(_args, "hl",
+ &inButtonToPress,
+ &inSecondsToWait))
+ return NULL;
+ _err = SetDialogTimeout(_self->ob_itself,
+ inButtonToPress,
+ inSecondsToWait);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *DlgObj_GetDialogTimeout(_self, _args)
+ DialogObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ SInt16 outButtonToPress;
+ UInt32 outSecondsToWait;
+ UInt32 outSecondsRemaining;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDialogTimeout(_self->ob_itself,
+ &outButtonToPress,
+ &outSecondsToWait,
+ &outSecondsRemaining);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("hll",
+ outButtonToPress,
+ outSecondsToWait,
+ outSecondsRemaining);
+ return _res;
+}
+
+static PyObject *DlgObj_SetModalDialogEventMask(_self, _args)
+ DialogObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ EventMask inMask;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inMask))
+ return NULL;
+ _err = SetModalDialogEventMask(_self->ob_itself,
+ inMask);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *DlgObj_GetModalDialogEventMask(_self, _args)
+ DialogObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ EventMask outMask;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetModalDialogEventMask(_self->ob_itself,
+ &outMask);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ outMask);
+ return _res;
+}
+
static PyObject *DlgObj_GetDialogWindow(_self, _args)
DialogObject *_self;
PyObject *_args;
@@ -703,6 +803,16 @@ static PyMethodDef DlgObj_methods[] = {
"(SInt16 inItemNo, SInt16 inHoriz, SInt16 inVert) -> None"},
{"SizeDialogItem", (PyCFunction)DlgObj_SizeDialogItem, 1,
"(SInt16 inItemNo, SInt16 inWidth, SInt16 inHeight) -> None"},
+ {"AppendDialogItemList", (PyCFunction)DlgObj_AppendDialogItemList, 1,
+ "(SInt16 ditlID, DITLMethod method) -> None"},
+ {"SetDialogTimeout", (PyCFunction)DlgObj_SetDialogTimeout, 1,
+ "(SInt16 inButtonToPress, UInt32 inSecondsToWait) -> None"},
+ {"GetDialogTimeout", (PyCFunction)DlgObj_GetDialogTimeout, 1,
+ "() -> (SInt16 outButtonToPress, UInt32 outSecondsToWait, UInt32 outSecondsRemaining)"},
+ {"SetModalDialogEventMask", (PyCFunction)DlgObj_SetModalDialogEventMask, 1,
+ "(EventMask inMask) -> None"},
+ {"GetModalDialogEventMask", (PyCFunction)DlgObj_GetModalDialogEventMask, 1,
+ "() -> (EventMask outMask)"},
{"GetDialogWindow", (PyCFunction)DlgObj_GetDialogWindow, 1,
"() -> (DialogPtr _rv)"},
{"GetDialogDefaultItem", (PyCFunction)DlgObj_GetDialogDefaultItem, 1,
@@ -727,6 +837,12 @@ static PyObject *DlgObj_getattr(self, name)
#define DlgObj_setattr NULL
+#define DlgObj_compare NULL
+
+#define DlgObj_repr NULL
+
+#define DlgObj_hash NULL
+
PyTypeObject Dialog_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -738,6 +854,12 @@ PyTypeObject Dialog_Type = {
0, /*tp_print*/
(getattrfunc) DlgObj_getattr, /*tp_getattr*/
(setattrfunc) DlgObj_setattr, /*tp_setattr*/
+ (cmpfunc) DlgObj_compare, /*tp_compare*/
+ (reprfunc) DlgObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) DlgObj_hash, /*tp_hash*/
};
/* --------------------- End object type Dialog --------------------- */
@@ -1048,11 +1170,11 @@ static PyObject *Dlg_SetDialogFont(_self, _args)
PyObject *_args;
{
PyObject *_res = NULL;
- SInt16 value;
+ SInt16 fontNum;
if (!PyArg_ParseTuple(_args, "h",
- &value))
+ &fontNum))
return NULL;
- SetDialogFont(value);
+ SetDialogFont(fontNum);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
@@ -1173,7 +1295,7 @@ static PyMethodDef Dlg_methods[] = {
{"GetAlertStage", (PyCFunction)Dlg_GetAlertStage, 1,
"() -> (SInt16 _rv)"},
{"SetDialogFont", (PyCFunction)Dlg_SetDialogFont, 1,
- "(SInt16 value) -> None"},
+ "(SInt16 fontNum) -> None"},
{"ResetAlertStage", (PyCFunction)Dlg_ResetAlertStage, 1,
"() -> None"},
{"NewFeaturesDialog", (PyCFunction)Dlg_NewFeaturesDialog, 1,
diff --git a/Mac/Modules/dlg/dlgscan.py b/Mac/Modules/dlg/dlgscan.py
index 6ef502a..eb5bbfe 100644
--- a/Mac/Modules/dlg/dlgscan.py
+++ b/Mac/Modules/dlg/dlgscan.py
@@ -50,7 +50,7 @@ class MyScanner(Scanner):
'FreeDialog',
'GetStdFilterProc',
'GetDialogParent',
- # Can't find these in the CW Pro 3 libraries
+## # Can't find these in the CW Pro 3 libraries
'SetDialogMovableModal',
'GetDialogControlNotificationProc',
]
@@ -87,5 +87,9 @@ class MyScanner(Scanner):
[("ExistingDialogPtr", "*", "*")]),
]
+ def writeinitialdefs(self):
+ self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
+
+
if __name__ == "__main__":
main()
diff --git a/Mac/Modules/dlg/dlgsupport.py b/Mac/Modules/dlg/dlgsupport.py
index 526bfa4..4c44722 100644
--- a/Mac/Modules/dlg/dlgsupport.py
+++ b/Mac/Modules/dlg/dlgsupport.py
@@ -26,6 +26,7 @@ DialogItemType = Type("DialogItemType", "h")
DialogItemIndexZeroBased = Type("DialogItemIndexZeroBased", "h")
AlertType = Type("AlertType", "h")
StringPtr = Str255
+EventMask = Type("EventMask", "h")
includestuff = includestuff + """
#include <Dialogs.h>