diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-05-12 22:25:16 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-05-12 22:25:16 (GMT) |
commit | 69a07fbd9b2c1e2d203532d4babbc6d874d389ee (patch) | |
tree | 822d06c6602339d309b30584ca0bfd05f5b56edc /Mac/Modules/OSATerminology.c | |
parent | a005b34f14fd4548c84886244b68d2c34e75edbd (diff) | |
download | cpython-69a07fbd9b2c1e2d203532d4babbc6d874d389ee.zip cpython-69a07fbd9b2c1e2d203532d4babbc6d874d389ee.tar.gz cpython-69a07fbd9b2c1e2d203532d4babbc6d874d389ee.tar.bz2 |
Remove the Mac modules
Diffstat (limited to 'Mac/Modules/OSATerminology.c')
-rw-r--r-- | Mac/Modules/OSATerminology.c | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/Mac/Modules/OSATerminology.c b/Mac/Modules/OSATerminology.c deleted file mode 100644 index 85ad425..0000000 --- a/Mac/Modules/OSATerminology.c +++ /dev/null @@ -1,93 +0,0 @@ -/* -** This module is a one-trick pony: given an FSSpec it gets the aeut -** resources. It was written by Donovan Preston and slightly modified -** by Jack. -** -** It should be considered a placeholder, it will probably be replaced -** by a full interface to OpenScripting. -*/ -#include "Python.h" -#include "pymactoolbox.h" - -#include <Carbon/Carbon.h> - -static PyObject * -PyOSA_GetAppTerminology(PyObject* self, PyObject* args) -{ - AEDesc theDesc = {0,0}; - FSSpec fss; - ComponentInstance defaultComponent = NULL; - SInt16 defaultTerminology = 0; - Boolean didLaunch = 0; - OSAError err; - long modeFlags = 0; - - if (!PyArg_ParseTuple(args, "O&|i", PyMac_GetFSSpec, &fss, &modeFlags)) - return NULL; - - defaultComponent = OpenDefaultComponent (kOSAComponentType, 'ascr'); - err = GetComponentInstanceError (defaultComponent); - if (err) return PyMac_Error(err); - err = OSAGetAppTerminology ( - defaultComponent, - modeFlags, - &fss, - defaultTerminology, - &didLaunch, - &theDesc - ); - if (err) return PyMac_Error(err); - return Py_BuildValue("O&i", AEDesc_New, &theDesc, didLaunch); -} - -static PyObject * -PyOSA_GetSysTerminology(PyObject* self, PyObject* args) -{ - AEDesc theDesc = {0,0}; - FSSpec fss; - ComponentInstance defaultComponent = NULL; - SInt16 defaultTerminology = 0; - Boolean didLaunch = 0; - OSAError err; - long modeFlags = 0; - - if (!PyArg_ParseTuple(args, "O&|i", PyMac_GetFSSpec, &fss, &modeFlags)) - return NULL; - - defaultComponent = OpenDefaultComponent (kOSAComponentType, 'ascr'); - err = GetComponentInstanceError (defaultComponent); - if (err) return PyMac_Error(err); - err = OSAGetAppTerminology ( - defaultComponent, - modeFlags, - &fss, - defaultTerminology, - &didLaunch, - &theDesc - ); - if (err) return PyMac_Error(err); - return Py_BuildValue("O&i", AEDesc_New, &theDesc, didLaunch); -} - -/* - * List of methods defined in the module - */ -static struct PyMethodDef OSATerminology_methods[] = -{ - {"GetAppTerminology", - (PyCFunction) PyOSA_GetAppTerminology, - METH_VARARGS, - "Get an applications terminology, as an AEDesc object."}, - {"GetSysTerminology", - (PyCFunction) PyOSA_GetSysTerminology, - METH_VARARGS, - "Get an applications system terminology, as an AEDesc object."}, - {NULL, (PyCFunction) NULL, 0, NULL} -}; - - -void -initOSATerminology(void) -{ - Py_InitModule("OSATerminology", OSATerminology_methods); -}
\ No newline at end of file |