source: trunk/essentials/dev-lang/python/Mac/Modules/OSATerminology.c@ 3314

Last change on this file since 3314 was 3225, checked in by bird, 19 years ago

Python 2.5

File size: 2.3 KB
Line 
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
14static PyObject *
15PyOSA_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');