| 1 | /*
|
|---|
| 2 | ** This module is a one-trick pony: given an FSSpec it gets the aeut
|
|---|
| 3 | ** resources. It was written by Donovan Preston and slightly modified
|
|---|
| 4 | ** by Jack.
|
|---|
| 5 | **
|
|---|
| 6 | ** It should be considered a placeholder, it will probably be replaced
|
|---|
| 7 | ** by a full interface to OpenScripting.
|
|---|
| 8 | */
|
|---|
| 9 | #include "Python.h"
|
|---|
| 10 | #include "pymactoolbox.h"
|
|---|
| 11 |
|
|---|
| 12 | #include <Carbon/Carbon.h>
|
|---|
| 13 |
|
|---|
| 14 | static PyObject *
|
|---|
| 15 | PyOSA_GetAppTerminology(PyObject* self, PyObject* args)
|
|---|
| 16 | {
|
|---|
| 17 | AEDesc theDesc = {0,0};
|
|---|
| 18 | FSSpec fss;
|
|---|
| 19 | ComponentInstance defaultComponent = NULL;
|
|---|
| 20 | SInt16 defaultTerminology = 0;
|
|---|
| 21 | Boolean didLaunch = 0;
|
|---|
| 22 | OSAError err;
|
|---|
| 23 | long modeFlags = 0;
|
|---|
| 24 |
|
|---|
| 25 | if (!PyArg_ParseTuple(args, "O&|i", PyMac_GetFSSpec, &fss, &modeFlags))
|
|---|
| 26 | return NULL;
|
|---|
| 27 |
|
|---|
| 28 | defaultComponent = OpenDefaultComponent (kOSAComponentType, 'ascr');
|
|---|
|
|---|