mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Rather massive changes:
- Make the stuff run on Jack's machine (and hopefully all machines) in stead of Guido's only (addpack stuff) - Use the Universal Headers in stead of the Think headers - Fixed the test programs to use the new routine names
This commit is contained in:
parent
f301dcac73
commit
c7cfb95559
7 changed files with 165 additions and 359 deletions
|
@ -7,7 +7,7 @@ can have (without having to rely on Apple's implementation).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import addpack
|
import addpack
|
||||||
addpack.addpack('Demo')
|
addpack.addpack('Tools')
|
||||||
addpack.addpack('bgen')
|
addpack.addpack('bgen')
|
||||||
addpack.addpack('ae')
|
addpack.addpack('ae')
|
||||||
addpack.addpack('evt')
|
addpack.addpack('evt')
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Generated from 'D:Development:THINK C:Mac #includes:Apple #includes:AppleEvents.h'
|
# Generated from 'Moes:CW5 GOLD \304:Metrowerks C/C++ \304:Headers \304:Universal Headers 2.0a3 \304:AppleEvents.h'
|
||||||
|
|
||||||
typeBoolean = 'bool'
|
typeBoolean = 'bool'
|
||||||
typeChar = 'TEXT'
|
typeChar = 'TEXT'
|
||||||
|
@ -28,6 +28,8 @@ typeKeyword = 'keyw'
|
||||||
typeSectionH = 'sect'
|
typeSectionH = 'sect'
|
||||||
typeWildCard = '****'
|
typeWildCard = '****'
|
||||||
typeApplSignature = 'sign'
|
typeApplSignature = 'sign'
|
||||||
|
typeQDRectangle = 'qdrt'
|
||||||
|
typeFixed = 'fixd'
|
||||||
typeSessionID = 'ssid'
|
typeSessionID = 'ssid'
|
||||||
typeTargetID = 'targ'
|
typeTargetID = 'targ'
|
||||||
typeProcessSerialNumber = 'psn '
|
typeProcessSerialNumber = 'psn '
|
||||||
|
@ -79,26 +81,24 @@ kAnyTransactionID = 0
|
||||||
kAEDefaultTimeout = -1
|
kAEDefaultTimeout = -1
|
||||||
kNoTimeOut = -2
|
kNoTimeOut = -2
|
||||||
kAENoDispatch = 0
|
kAENoDispatch = 0
|
||||||
kAEUseStandardDispatch = -1
|
kAEUseStandardDispatch = 0xFFFFFFFF
|
||||||
errAECoercionFail = -1700
|
kAEDoNotIgnoreHandler = 0x00000000
|
||||||
errAEDescNotFound = -1701
|
kAEIgnoreAppPhacHandler = 0x00000001
|
||||||
errAECorruptData = -1702
|
kAEIgnoreAppEventHandler = 0x00000002
|
||||||
errAEWrongDataType = -1703
|
kAEIgnoreSysPhacHandler = 0x00000004
|
||||||
errAENotAEDesc = -1704
|
kAEIgnoreSysEventHandler = 0x00000008
|
||||||
errAEBadListItem = -1705
|
kAEIngoreBuiltInEventHandler = 0x00000010
|
||||||
errAENewerVersion = -1706
|
kAEDontDisposeOnResume = 0x80000000
|
||||||
errAENotAppleEvent = -1707
|
kAEInteractWithSelf = 0
|
||||||
errAEEventNotHandled = -1708
|
kAEInteractWithLocal = 1
|
||||||
errAEReplyNotValid = -1709
|
kAEInteractWithAll = 2
|
||||||
errAEUnknownSendMode = -1710
|
kAEUnknownSource = 0
|
||||||
errAEWaitCanceled = -1711
|
kAEDirectCall = 1
|
||||||
errAETimeout = -1712
|
kAESameProcess = 2
|
||||||
errAENoUserInteraction = -1713
|
kAELocalProcess = 3
|
||||||
errAENotASpecialFunction = -1714
|
kAERemoteProcess = 4
|
||||||
errAEParamMissed = -1715
|
kAEDataArray = 0
|
||||||
errAEUnknownAddressType = -1716
|
kAEPackedArray = 1
|
||||||
errAEHandlerNotFound = -1717
|
kAEHandleArray = 2
|
||||||
errAEReplyNotArrived = -1718
|
kAEDescArray = 3
|
||||||
errAEIllegalIndex = -1719
|
kAEKeyDescArray = 4
|
||||||
errAEUnknownObjectType = -1731
|
|
||||||
errAERecordingIsAlreadyOn = -1732
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ def pack(x, forcetype = None):
|
||||||
if t == DictionaryType:
|
if t == DictionaryType:
|
||||||
record = AE.AECreateList('', 1)
|
record = AE.AECreateList('', 1)
|
||||||
for key, value in x.items():
|
for key, value in x.items():
|
||||||
record.AEPutKeyDesc(key, pack(value))
|
record.AEPutParamDesc(key, pack(value))
|
||||||
return record
|
return record
|
||||||
if t == InstanceType and hasattr(x, '__aepack__'):
|
if t == InstanceType and hasattr(x, '__aepack__'):
|
||||||
return x.__aepack__()
|
return x.__aepack__()
|
||||||
|
|
|
@ -62,7 +62,7 @@ AEEventHandlerUPP upp_GenericEventHandler;
|
||||||
|
|
||||||
static pascal Boolean AEIdleProc(EventRecord *theEvent, long *sleepTime, RgnHandle *mouseRgn)
|
static pascal Boolean AEIdleProc(EventRecord *theEvent, long *sleepTime, RgnHandle *mouseRgn)
|
||||||
{
|
{
|
||||||
(void) PyMac_Idle();
|
PyMac_Yield();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,55 +164,6 @@ static PyObject *AEDesc_AECountItems(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *AEDesc_AEPutPtr(_self, _args)
|
|
||||||
AEDescObject *_self;
|
|
||||||
PyObject *_args;
|
|
||||||
{
|
|
||||||
PyObject *_res = NULL;
|
|
||||||
OSErr _err;
|
|
||||||
long index;
|
|
||||||
DescType typeCode;
|
|
||||||
char *dataPtr__in__;
|
|
||||||
long dataPtr__len__;
|
|
||||||
int dataPtr__in_len__;
|
|
||||||
if (!PyArg_ParseTuple(_args, "lO&s#",
|
|
||||||
&index,
|
|
||||||
PyMac_GetOSType, &typeCode,
|
|
||||||
&dataPtr__in__, &dataPtr__in_len__))
|
|
||||||
return NULL;
|
|
||||||
dataPtr__len__ = dataPtr__in_len__;
|
|
||||||
_err = AEPutPtr(&_self->ob_itself,
|
|
||||||
index,
|
|
||||||
typeCode,
|
|
||||||
dataPtr__in__, dataPtr__len__);
|
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
|
||||||
Py_INCREF(Py_None);
|
|
||||||
_res = Py_None;
|
|
||||||
dataPtr__error__: ;
|
|
||||||
return _res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *AEDesc_AEPutDesc(_self, _args)
|
|
||||||
AEDescObject *_self;
|
|
||||||
PyObject *_args;
|
|
||||||
{
|
|
||||||
PyObject *_res = NULL;
|
|
||||||
OSErr _err;
|
|
||||||
long index;
|
|
||||||
AEDesc theAEDesc;
|
|
||||||
if (!PyArg_ParseTuple(_args, "lO&",
|
|
||||||
&index,
|
|
||||||
AEDesc_Convert, &theAEDesc))
|
|
||||||
return NULL;
|
|
||||||
_err = AEPutDesc(&_self->ob_itself,
|
|
||||||
index,
|
|
||||||
&theAEDesc);
|
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
|
||||||
Py_INCREF(Py_None);
|
|
||||||
_res = Py_None;
|
|
||||||
return _res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *AEDesc_AEGetNthPtr(_self, _args)
|
static PyObject *AEDesc_AEGetNthPtr(_self, _args)
|
||||||
AEDescObject *_self;
|
AEDescObject *_self;
|
||||||
PyObject *_args;
|
PyObject *_args;
|
||||||
|
@ -302,174 +253,6 @@ static PyObject *AEDesc_AESizeOfNthItem(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *AEDesc_AEDeleteItem(_self, _args)
|
|
||||||
AEDescObject *_self;
|
|
||||||
PyObject *_args;
|
|
||||||
{
|
|
||||||
PyObject *_res = NULL;
|
|
||||||
OSErr _err;
|
|
||||||
long index;
|
|
||||||
if (!PyArg_ParseTuple(_args, "l",
|
|
||||||
&index))
|
|
||||||
return NULL;
|
|
||||||
_err = AEDeleteItem(&_self->ob_itself,
|
|
||||||
index);
|
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
|
||||||
Py_INCREF(Py_None);
|
|
||||||
_res = Py_None;
|
|
||||||
return _res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *AEDesc_AEPutKeyPtr(_self, _args)
|
|
||||||
AEDescObject *_self;
|
|
||||||
PyObject *_args;
|
|
||||||
{
|
|
||||||
PyObject *_res = NULL;
|
|
||||||
OSErr _err;
|
|
||||||
AEKeyword theAEKeyword;
|
|
||||||
DescType typeCode;
|
|
||||||
char *dataPtr__in__;
|
|
||||||
long dataPtr__len__;
|
|
||||||
int dataPtr__in_len__;
|
|
||||||
if (!PyArg_ParseTuple(_args, "O&O&s#",
|
|
||||||
PyMac_GetOSType, &theAEKeyword,
|
|
||||||
PyMac_GetOSType, &typeCode,
|
|
||||||
&dataPtr__in__, &dataPtr__in_len__))
|
|
||||||
return NULL;
|
|
||||||
dataPtr__len__ = dataPtr__in_len__;
|
|
||||||
_err = AEPutKeyPtr(&_self->ob_itself,
|
|
||||||
theAEKeyword,
|
|
||||||
typeCode,
|
|
||||||
dataPtr__in__, dataPtr__len__);
|
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
|
||||||
Py_INCREF(Py_None);
|
|
||||||
_res = Py_None;
|
|
||||||
dataPtr__error__: ;
|
|
||||||
return _res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *AEDesc_AEPutKeyDesc(_self, _args)
|
|
||||||
AEDescObject *_self;
|
|
||||||
PyObject *_args;
|
|
||||||
{
|
|
||||||
PyObject *_res = NULL;
|
|
||||||
OSErr _err;
|
|
||||||
AEKeyword theAEKeyword;
|
|
||||||
AEDesc theAEDesc;
|
|
||||||
if (!PyArg_ParseTuple(_args, "O&O&",
|
|
||||||
PyMac_GetOSType, &theAEKeyword,
|
|
||||||
AEDesc_Convert, &theAEDesc))
|
|
||||||
return NULL;
|
|
||||||
_err = AEPutKeyDesc(&_self->ob_itself,
|
|
||||||
theAEKeyword,
|
|
||||||
&theAEDesc);
|
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
|
||||||
Py_INCREF(Py_None);
|
|
||||||
_res = Py_None;
|
|
||||||
return _res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *AEDesc_AEGetKeyPtr(_self, _args)
|
|
||||||
AEDescObject *_self;
|
|
||||||
PyObject *_args;
|
|
||||||
{
|
|
||||||
PyObject *_res = NULL;
|
|
||||||
OSErr _err;
|
|
||||||
AEKeyword theAEKeyword;
|
|
||||||
DescType desiredType;
|
|
||||||
DescType typeCode;
|
|
||||||
char *dataPtr__out__;
|
|
||||||
long dataPtr__len__;
|
|
||||||
int dataPtr__in_len__;
|
|
||||||
if (!PyArg_ParseTuple(_args, "O&O&i",
|
|
||||||
PyMac_GetOSType, &theAEKeyword,
|
|
||||||
PyMac_GetOSType, &desiredType,
|
|
||||||
&dataPtr__in_len__))
|
|
||||||
return NULL;
|
|
||||||
if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
|
|
||||||
{
|
|
||||||
PyErr_NoMemory();
|
|
||||||
goto dataPtr__error__;
|
|
||||||
}
|
|
||||||
dataPtr__len__ = dataPtr__in_len__;
|
|
||||||
_err = AEGetKeyPtr(&_self->ob_itself,
|
|
||||||
theAEKeyword,
|
|
||||||
desiredType,
|
|
||||||
&typeCode,
|
|
||||||
dataPtr__out__, dataPtr__len__, &dataPtr__len__);
|
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
|
||||||
_res = Py_BuildValue("O&s#",
|
|
||||||
PyMac_BuildOSType, typeCode,
|
|
||||||
dataPtr__out__, (int)dataPtr__len__);
|
|
||||||
free(dataPtr__out__);
|
|
||||||
dataPtr__error__: ;
|
|
||||||
return _res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *AEDesc_AEGetKeyDesc(_self, _args)
|
|
||||||
AEDescObject *_self;
|
|
||||||
PyObject *_args;
|
|
||||||
{
|
|
||||||
PyObject *_res = NULL;
|
|
||||||
OSErr _err;
|
|
||||||
AEKeyword theAEKeyword;
|
|
||||||
DescType desiredType;
|
|
||||||
AEDesc result;
|
|
||||||
if (!PyArg_ParseTuple(_args, "O&O&",
|
|
||||||
PyMac_GetOSType, &theAEKeyword,
|
|
||||||
PyMac_GetOSType, &desiredType))
|
|
||||||
return NULL;
|
|
||||||
_err = AEGetKeyDesc(&_self->ob_itself,
|
|
||||||
theAEKeyword,
|
|
||||||
desiredType,
|
|
||||||
&result);
|
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
|
||||||
_res = Py_BuildValue("O&",
|
|
||||||
AEDesc_New, &result);
|
|
||||||
return _res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *AEDesc_AESizeOfKeyDesc(_self, _args)
|
|
||||||
AEDescObject *_self;
|
|
||||||
PyObject *_args;
|
|
||||||
{
|
|
||||||
PyObject *_res = NULL;
|
|
||||||
OSErr _err;
|
|
||||||
AEKeyword theAEKeyword;
|
|
||||||
DescType typeCode;
|
|
||||||
Size dataSize;
|
|
||||||
if (!PyArg_ParseTuple(_args, "O&",
|
|
||||||
PyMac_GetOSType, &theAEKeyword))
|
|
||||||
return NULL;
|
|
||||||
_err = AESizeOfKeyDesc(&_self->ob_itself,
|
|
||||||
theAEKeyword,
|
|
||||||
&typeCode,
|
|
||||||
&dataSize);
|
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
|
||||||
_res = Py_BuildValue("O&l",
|
|
||||||
PyMac_BuildOSType, typeCode,
|
|
||||||
dataSize);
|
|
||||||
return _res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *AEDesc_AEDeleteKeyDesc(_self, _args)
|
|
||||||
AEDescObject *_self;
|
|
||||||
PyObject *_args;
|
|
||||||
{
|
|
||||||
PyObject *_res = NULL;
|
|
||||||
OSErr _err;
|
|
||||||
AEKeyword theAEKeyword;
|
|
||||||
if (!PyArg_ParseTuple(_args, "O&",
|
|
||||||
PyMac_GetOSType, &theAEKeyword))
|
|
||||||
return NULL;
|
|
||||||
_err = AEDeleteKeyDesc(&_self->ob_itself,
|
|
||||||
theAEKeyword);
|
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
|
||||||
Py_INCREF(Py_None);
|
|
||||||
_res = Py_None;
|
|
||||||
return _res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *AEDesc_AEPutParamPtr(_self, _args)
|
static PyObject *AEDesc_AEPutParamPtr(_self, _args)
|
||||||
AEDescObject *_self;
|
AEDescObject *_self;
|
||||||
PyObject *_args;
|
PyObject *_args;
|
||||||
|
@ -817,19 +600,33 @@ static PyObject *AEDesc_AEResumeTheCurrentEvent(_self, _args)
|
||||||
PyObject *_res = NULL;
|
PyObject *_res = NULL;
|
||||||
OSErr _err;
|
OSErr _err;
|
||||||
AppleEvent reply;
|
AppleEvent reply;
|
||||||
AEEventHandlerUPP dispatcher__proc__ = upp_GenericEventHandler;
|
long handlerRefcon;
|
||||||
PyObject *dispatcher;
|
if (!PyArg_ParseTuple(_args, "O&l",
|
||||||
if (!PyArg_ParseTuple(_args, "O&O",
|
|
||||||
AEDesc_Convert, &reply,
|
AEDesc_Convert, &reply,
|
||||||
&dispatcher))
|
&handlerRefcon))
|
||||||
return NULL;
|
return NULL;
|
||||||
_err = AEResumeTheCurrentEvent(&_self->ob_itself,
|
_err = AEResumeTheCurrentEvent(&_self->ob_itself,
|
||||||
&reply,
|
&reply,
|
||||||
dispatcher__proc__, (long)dispatcher);
|
upp_GenericEventHandler,
|
||||||
|
handlerRefcon);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_res = Py_None;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *AEDesc_AEGetTheCurrentEvent(_self, _args)
|
||||||
|
AEDescObject *_self;
|
||||||
|
PyObject *_args;
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSErr _err;
|
||||||
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
|
return NULL;
|
||||||
|
_err = AEGetTheCurrentEvent(&_self->ob_itself);
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
_res = Py_None;
|
_res = Py_None;
|
||||||
Py_INCREF(dispatcher); /* XXX leak, but needed */
|
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -855,30 +652,12 @@ static PyMethodDef AEDesc_methods[] = {
|
||||||
"() -> (AEDesc result)"},
|
"() -> (AEDesc result)"},
|
||||||
{"AECountItems", (PyCFunction)AEDesc_AECountItems, 1,
|
{"AECountItems", (PyCFunction)AEDesc_AECountItems, 1,
|
||||||
"() -> (long theCount)"},
|
"() -> (long theCount)"},
|
||||||
{"AEPutPtr", (PyCFunction)AEDesc_AEPutPtr, 1,
|
|
||||||
"(long index, DescType typeCode, Buffer dataPtr) -> None"},
|
|
||||||
{"AEPutDesc", (PyCFunction)AEDesc_AEPutDesc, 1,
|
|
||||||
"(long index, AEDesc theAEDesc) -> None"},
|
|
||||||
{"AEGetNthPtr", (PyCFunction)AEDesc_AEGetNthPtr, 1,
|
{"AEGetNthPtr", (PyCFunction)AEDesc_AEGetNthPtr, 1,
|
||||||
"(long index, DescType desiredType, Buffer dataPtr) -> (AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr)"},
|
"(long index, DescType desiredType, Buffer dataPtr) -> (AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr)"},
|
||||||
{"AEGetNthDesc", (PyCFunction)AEDesc_AEGetNthDesc, 1,
|
{"AEGetNthDesc", (PyCFunction)AEDesc_AEGetNthDesc, 1,
|
||||||
"(long index, DescType desiredType) -> (AEKeyword theAEKeyword, AEDesc result)"},
|
"(long index, DescType desiredType) -> (AEKeyword theAEKeyword, AEDesc result)"},
|
||||||
{"AESizeOfNthItem", (PyCFunction)AEDesc_AESizeOfNthItem, 1,
|
{"AESizeOfNthItem", (PyCFunction)AEDesc_AESizeOfNthItem, 1,
|
||||||
"(long index) -> (DescType typeCode, Size dataSize)"},
|
"(long index) -> (DescType typeCode, Size dataSize)"},
|
||||||
{"AEDeleteItem", (PyCFunction)AEDesc_AEDeleteItem, 1,
|
|
||||||
"(long index) -> None"},
|
|
||||||
{"AEPutKeyPtr", (PyCFunction)AEDesc_AEPutKeyPtr, 1,
|
|
||||||
"(AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr) -> None"},
|
|
||||||
{"AEPutKeyDesc", (PyCFunction)AEDesc_AEPutKeyDesc, 1,
|
|
||||||
"(AEKeyword theAEKeyword, AEDesc theAEDesc) -> None"},
|
|
||||||
{"AEGetKeyPtr", (PyCFunction)AEDesc_AEGetKeyPtr, 1,
|
|
||||||
"(AEKeyword theAEKeyword, DescType desiredType, Buffer dataPtr) -> (DescType typeCode, Buffer dataPtr)"},
|
|
||||||
{"AEGetKeyDesc", (PyCFunction)AEDesc_AEGetKeyDesc, 1,
|
|
||||||
"(AEKeyword theAEKeyword, DescType desiredType) -> (AEDesc result)"},
|
|
||||||
{"AESizeOfKeyDesc", (PyCFunction)AEDesc_AESizeOfKeyDesc, 1,
|
|
||||||
"(AEKeyword theAEKeyword) -> (DescType typeCode, Size dataSize)"},
|
|
||||||
{"AEDeleteKeyDesc", (PyCFunction)AEDesc_AEDeleteKeyDesc, 1,
|
|
||||||
"(AEKeyword theAEKeyword) -> None"},
|
|
||||||
{"AEPutParamPtr", (PyCFunction)AEDesc_AEPutParamPtr, 1,
|
{"AEPutParamPtr", (PyCFunction)AEDesc_AEPutParamPtr, 1,
|
||||||
"(AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr) -> None"},
|
"(AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr) -> None"},
|
||||||
{"AEPutParamDesc", (PyCFunction)AEDesc_AEPutParamDesc, 1,
|
{"AEPutParamDesc", (PyCFunction)AEDesc_AEPutParamDesc, 1,
|
||||||
|
@ -908,7 +687,9 @@ static PyMethodDef AEDesc_methods[] = {
|
||||||
{"AESuspendTheCurrentEvent", (PyCFunction)AEDesc_AESuspendTheCurrentEvent, 1,
|
{"AESuspendTheCurrentEvent", (PyCFunction)AEDesc_AESuspendTheCurrentEvent, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
{"AEResumeTheCurrentEvent", (PyCFunction)AEDesc_AEResumeTheCurrentEvent, 1,
|
{"AEResumeTheCurrentEvent", (PyCFunction)AEDesc_AEResumeTheCurrentEvent, 1,
|
||||||
"(AppleEvent reply, EventHandler dispatcher) -> None"},
|
"(AppleEvent reply, long handlerRefcon) -> None"},
|
||||||
|
{"AEGetTheCurrentEvent", (PyCFunction)AEDesc_AEGetTheCurrentEvent, 1,
|
||||||
|
"() -> None"},
|
||||||
{"AESetTheCurrentEvent", (PyCFunction)AEDesc_AESetTheCurrentEvent, 1,
|
{"AESetTheCurrentEvent", (PyCFunction)AEDesc_AESetTheCurrentEvent, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
{NULL, NULL, 0}
|
{NULL, NULL, 0}
|
||||||
|
@ -1040,6 +821,76 @@ static PyObject *AE_AECreateList(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *AE_AEPutPtr(_self, _args)
|
||||||
|
PyObject *_self;
|
||||||
|
PyObject *_args;
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSErr _err;
|
||||||
|
AEDescList theAEDescList;
|
||||||
|
long index;
|
||||||
|
DescType typeCode;
|
||||||
|
char *dataPtr__in__;
|
||||||
|
long dataPtr__len__;
|
||||||
|
int dataPtr__in_len__;
|
||||||
|
if (!PyArg_ParseTuple(_args, "lO&s#",
|
||||||
|
&index,
|
||||||
|
PyMac_GetOSType, &typeCode,
|
||||||
|
&dataPtr__in__, &dataPtr__in_len__))
|
||||||
|
return NULL;
|
||||||
|
dataPtr__len__ = dataPtr__in_len__;
|
||||||
|
_err = AEPutPtr(&theAEDescList,
|
||||||
|
index,
|
||||||
|
typeCode,
|
||||||
|
dataPtr__in__, dataPtr__len__);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
AEDesc_New, &theAEDescList);
|
||||||
|
dataPtr__error__: ;
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *AE_AEPutDesc(_self, _args)
|
||||||
|
PyObject *_self;
|
||||||
|
PyObject *_args;
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSErr _err;
|
||||||
|
AEDescList theAEDescList;
|
||||||
|
long index;
|
||||||
|
AEDesc theAEDesc;
|
||||||
|
if (!PyArg_ParseTuple(_args, "lO&",
|
||||||
|
&index,
|
||||||
|
AEDesc_Convert, &theAEDesc))
|
||||||
|
return NULL;
|
||||||
|
_err = AEPutDesc(&theAEDescList,
|
||||||
|
index,
|
||||||
|
&theAEDesc);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
AEDesc_New, &theAEDescList);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *AE_AEDeleteItem(_self, _args)
|
||||||
|
PyObject *_self;
|
||||||
|
PyObject *_args;
|
||||||
|
{
|
||||||
|
PyObject *_res = NULL;
|
||||||
|
OSErr _err;
|
||||||
|
AEDescList theAEDescList;
|
||||||
|
long index;
|
||||||
|
if (!PyArg_ParseTuple(_args, "l",
|
||||||
|
&index))
|
||||||
|
return NULL;
|
||||||
|
_err = AEDeleteItem(&theAEDescList,
|
||||||
|
index);
|
||||||
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
|
_res = Py_BuildValue("O&",
|
||||||
|
AEDesc_New, &theAEDescList);
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *AE_AECreateAppleEvent(_self, _args)
|
static PyObject *AE_AECreateAppleEvent(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
PyObject *_args;
|
PyObject *_args;
|
||||||
|
@ -1088,22 +939,6 @@ static PyObject *AE_AEProcessAppleEvent(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *AE_AEGetTheCurrentEvent(_self, _args)
|
|
||||||
PyObject *_self;
|
|
||||||
PyObject *_args;
|
|
||||||
{
|
|
||||||
PyObject *_res = NULL;
|
|
||||||
OSErr _err;
|
|
||||||
AppleEvent theAppleEvent;
|
|
||||||
if (!PyArg_ParseTuple(_args, ""))
|
|
||||||
return NULL;
|
|
||||||
_err = AEGetTheCurrentEvent(&theAppleEvent);
|
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
|
||||||
_res = Py_BuildValue("O&",
|
|
||||||
AEDesc_New, &theAppleEvent);
|
|
||||||
return _res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject *AE_AEGetInteractionAllowed(_self, _args)
|
static PyObject *AE_AEGetInteractionAllowed(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
PyObject *_args;
|
PyObject *_args;
|
||||||
|
@ -1164,21 +999,20 @@ static PyObject *AE_AEInstallEventHandler(_self, _args)
|
||||||
OSErr _err;
|
OSErr _err;
|
||||||
AEEventClass theAEEventClass;
|
AEEventClass theAEEventClass;
|
||||||
AEEventID theAEEventID;
|
AEEventID theAEEventID;
|
||||||
AEEventHandlerUPP handler__proc__ = upp_GenericEventHandler;
|
long handlerRefcon;
|
||||||
PyObject *handler;
|
if (!PyArg_ParseTuple(_args, "O&O&l",
|
||||||
if (!PyArg_ParseTuple(_args, "O&O&O",
|
|
||||||
PyMac_GetOSType, &theAEEventClass,
|
PyMac_GetOSType, &theAEEventClass,
|
||||||
PyMac_GetOSType, &theAEEventID,
|
PyMac_GetOSType, &theAEEventID,
|
||||||
&handler))
|
&handlerRefcon))
|
||||||
return NULL;
|
return NULL;
|
||||||
_err = AEInstallEventHandler(theAEEventClass,
|
_err = AEInstallEventHandler(theAEEventClass,
|
||||||
theAEEventID,
|
theAEEventID,
|
||||||
handler__proc__, (long)handler,
|
upp_GenericEventHandler,
|
||||||
|
handlerRefcon,
|
||||||
0);
|
0);
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
_res = Py_None;
|
_res = Py_None;
|
||||||
Py_INCREF(handler); /* XXX leak, but needed */
|
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1230,12 +1064,16 @@ static PyMethodDef AE_methods[] = {
|
||||||
"(DescType typeCode, Buffer dataPtr, DescType toType) -> (AEDesc result)"},
|
"(DescType typeCode, Buffer dataPtr, DescType toType) -> (AEDesc result)"},
|
||||||
{"AECreateList", (PyCFunction)AE_AECreateList, 1,
|
{"AECreateList", (PyCFunction)AE_AECreateList, 1,
|
||||||
"(Buffer factoringPtr, Boolean isRecord) -> (AEDescList resultList)"},
|
"(Buffer factoringPtr, Boolean isRecord) -> (AEDescList resultList)"},
|
||||||
|
{"AEPutPtr", (PyCFunction)AE_AEPutPtr, 1,
|
||||||
|
"(long index, DescType typeCode, Buffer dataPtr) -> (AEDescList theAEDescList)"},
|
||||||
|
{"AEPutDesc", (PyCFunction)AE_AEPutDesc, 1,
|
||||||
|
"(long index, AEDesc theAEDesc) -> (AEDescList theAEDescList)"},
|
||||||
|
{"AEDeleteItem", (PyCFunction)AE_AEDeleteItem, 1,
|
||||||
|
"(long index) -> (AEDescList theAEDescList)"},
|
||||||
{"AECreateAppleEvent", (PyCFunction)AE_AECreateAppleEvent, 1,
|
{"AECreateAppleEvent", (PyCFunction)AE_AECreateAppleEvent, 1,
|
||||||
"(AEEventClass theAEEventClass, AEEventID theAEEventID, AEAddressDesc target, short returnID, long transactionID) -> (AppleEvent result)"},
|
"(AEEventClass theAEEventClass, AEEventID theAEEventID, AEAddressDesc target, short returnID, long transactionID) -> (AppleEvent result)"},
|
||||||
{"AEProcessAppleEvent", (PyCFunction)AE_AEProcessAppleEvent, 1,
|
{"AEProcessAppleEvent", (PyCFunction)AE_AEProcessAppleEvent, 1,
|
||||||
"(EventRecord theEventRecord) -> None"},
|
"(EventRecord theEventRecord) -> None"},
|
||||||
{"AEGetTheCurrentEvent", (PyCFunction)AE_AEGetTheCurrentEvent, 1,
|
|
||||||
"() -> (AppleEvent theAppleEvent)"},
|
|
||||||
{"AEGetInteractionAllowed", (PyCFunction)AE_AEGetInteractionAllowed, 1,
|
{"AEGetInteractionAllowed", (PyCFunction)AE_AEGetInteractionAllowed, 1,
|
||||||
"() -> (AEInteractAllowed level)"},
|
"() -> (AEInteractAllowed level)"},
|
||||||
{"AESetInteractionAllowed", (PyCFunction)AE_AESetInteractionAllowed, 1,
|
{"AESetInteractionAllowed", (PyCFunction)AE_AESetInteractionAllowed, 1,
|
||||||
|
@ -1243,7 +1081,7 @@ static PyMethodDef AE_methods[] = {
|
||||||
{"AEInteractWithUser", (PyCFunction)AE_AEInteractWithUser, 1,
|
{"AEInteractWithUser", (PyCFunction)AE_AEInteractWithUser, 1,
|
||||||
"(long timeOutInTicks) -> None"},
|
"(long timeOutInTicks) -> None"},
|
||||||
{"AEInstallEventHandler", (PyCFunction)AE_AEInstallEventHandler, 1,
|
{"AEInstallEventHandler", (PyCFunction)AE_AEInstallEventHandler, 1,
|
||||||
"(AEEventClass theAEEventClass, AEEventID theAEEventID, EventHandler handler) -> None"},
|
"(AEEventClass theAEEventClass, AEEventID theAEEventID, long handlerRefcon) -> None"},
|
||||||
{"AERemoveEventHandler", (PyCFunction)AE_AERemoveEventHandler, 1,
|
{"AERemoveEventHandler", (PyCFunction)AE_AERemoveEventHandler, 1,
|
||||||
"(AEEventClass theAEEventClass, AEEventID theAEEventID) -> None"},
|
"(AEEventClass theAEEventClass, AEEventID theAEEventID) -> None"},
|
||||||
{"AEManagerInfo", (PyCFunction)AE_AEManagerInfo, 1,
|
{"AEManagerInfo", (PyCFunction)AE_AEManagerInfo, 1,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Generated from 'D:Development:THINK C:Mac #includes:Apple #includes:AppleEvents.h'
|
# Generated from 'Moes:CW5 GOLD \304:Metrowerks C/C++ \304:Headers \304:Universal Headers 2.0a3 \304:AppleEvents.h'
|
||||||
|
|
||||||
f = AEFunction(OSErr, 'AECreateDesc',
|
f = AEFunction(OSErr, 'AECreateDesc',
|
||||||
(DescType, 'typeCode', InMode),
|
(DescType, 'typeCode', InMode),
|
||||||
|
@ -41,20 +41,20 @@ f = AEMethod(OSErr, 'AECountItems',
|
||||||
)
|
)
|
||||||
aedescmethods.append(f)
|
aedescmethods.append(f)
|
||||||
|
|
||||||
f = AEMethod(OSErr, 'AEPutPtr',
|
f = AEFunction(OSErr, 'AEPutPtr',
|
||||||
(AEDescList_ptr, 'theAEDescList', InMode),
|
(AEDescList, 'theAEDescList', OutMode),
|
||||||
(long, 'index', InMode),
|
(long, 'index', InMode),
|
||||||
(DescType, 'typeCode', InMode),
|
(DescType, 'typeCode', InMode),
|
||||||
(InBuffer, 'dataPtr', InMode),
|
(InBuffer, 'dataPtr', InMode),
|
||||||
)
|
)
|
||||||
aedescmethods.append(f)
|
functions.append(f)
|
||||||
|
|
||||||
f = AEMethod(OSErr, 'AEPutDesc',
|
f = AEFunction(OSErr, 'AEPutDesc',
|
||||||
(AEDescList_ptr, 'theAEDescList', InMode),
|
(AEDescList, 'theAEDescList', OutMode),
|
||||||
(long, 'index', InMode),
|
(long, 'index', InMode),
|
||||||
(AEDesc_ptr, 'theAEDesc', InMode),
|
(AEDesc_ptr, 'theAEDesc', InMode),
|
||||||
)
|
)
|
||||||
aedescmethods.append(f)
|
functions.append(f)
|
||||||
|
|
||||||
f = AEMethod(OSErr, 'AEGetNthPtr',
|
f = AEMethod(OSErr, 'AEGetNthPtr',
|
||||||
(AEDescList_ptr, 'theAEDescList', InMode),
|
(AEDescList_ptr, 'theAEDescList', InMode),
|
||||||
|
@ -83,57 +83,11 @@ f = AEMethod(OSErr, 'AESizeOfNthItem',
|
||||||
)
|
)
|
||||||
aedescmethods.append(f)
|
aedescmethods.append(f)
|
||||||
|
|
||||||
f = AEMethod(OSErr, 'AEDeleteItem',
|
f = AEFunction(OSErr, 'AEDeleteItem',
|
||||||
(AEDescList_ptr, 'theAEDescList', InMode),
|
(AEDescList, 'theAEDescList', OutMode),
|
||||||
(long, 'index', InMode),
|
(long, 'index', InMode),
|
||||||
)
|
)
|
||||||
aedescmethods.append(f)
|
functions.append(f)
|
||||||
|
|
||||||
f = AEMethod(OSErr, 'AEPutKeyPtr',
|
|
||||||
(AERecord_ptr, 'theAERecord', InMode),
|
|
||||||
(AEKeyword, 'theAEKeyword', InMode),
|
|
||||||
(DescType, 'typeCode', InMode),
|
|
||||||
(InBuffer, 'dataPtr', InMode),
|
|
||||||
)
|
|
||||||
aedescmethods.append(f)
|
|
||||||
|
|
||||||
f = AEMethod(OSErr, 'AEPutKeyDesc',
|
|
||||||
(AERecord_ptr, 'theAERecord', InMode),
|
|
||||||
(AEKeyword, 'theAEKeyword', InMode),
|
|
||||||
(AEDesc_ptr, 'theAEDesc', InMode),
|
|
||||||
)
|
|
||||||
aedescmethods.append(f)
|
|
||||||
|
|
||||||
f = AEMethod(OSErr, 'AEGetKeyPtr',
|
|
||||||
(AERecord_ptr, 'theAERecord', InMode),
|
|
||||||
(AEKeyword, 'theAEKeyword', InMode),
|
|
||||||
(DescType, 'desiredType', InMode),
|
|
||||||
(DescType, 'typeCode', OutMode),
|
|
||||||
(VarVarOutBuffer, 'dataPtr', InOutMode),
|
|
||||||
)
|
|
||||||
aedescmethods.append(f)
|
|
||||||
|
|
||||||
f = AEMethod(OSErr, 'AEGetKeyDesc',
|
|
||||||
(AERecord_ptr, 'theAERecord', InMode),
|
|
||||||
(AEKeyword, 'theAEKeyword', InMode),
|
|
||||||
(DescType, 'desiredType', InMode),
|
|
||||||
(AEDesc, 'result', OutMode),
|
|
||||||
)
|
|
||||||
aedescmethods.append(f)
|
|
||||||
|
|
||||||
f = AEMethod(OSErr, 'AESizeOfKeyDesc',
|
|
||||||
(AERecord_ptr, 'theAERecord', InMode),
|
|
||||||
(AEKeyword, 'theAEKeyword', InMode),
|
|
||||||
(DescType, 'typeCode', OutMode),
|
|
||||||
(Size, 'dataSize', OutMode),
|
|
||||||
)
|
|
||||||
aedescmethods.append(f)
|
|
||||||
|
|
||||||
f = AEMethod(OSErr, 'AEDeleteKeyDesc',
|
|
||||||
(AERecord_ptr, 'theAERecord', InMode),
|
|
||||||
(AEKeyword, 'theAEKeyword', InMode),
|
|
||||||
)
|
|
||||||
aedescmethods.append(f)
|
|
||||||
|
|
||||||
f = AEMethod(OSErr, 'AEPutParamPtr',
|
f = AEMethod(OSErr, 'AEPutParamPtr',
|
||||||
(AppleEvent_ptr, 'theAppleEvent', InMode),
|
(AppleEvent_ptr, 'theAppleEvent', InMode),
|
||||||
|
@ -237,8 +191,8 @@ f = AEMethod(OSErr, 'AESend',
|
||||||
(AESendMode, 'sendMode', InMode),
|
(AESendMode, 'sendMode', InMode),
|
||||||
(AESendPriority, 'sendPriority', InMode),
|
(AESendPriority, 'sendPriority', InMode),
|
||||||
(long, 'timeOutInTicks', InMode),
|
(long, 'timeOutInTicks', InMode),
|
||||||
(IdleProcPtr, 'idleProc', InMode),
|
(AEIdleUPP, 'idleProc', InMode),
|
||||||
(EventFilterProcPtr, 'filterProc', InMode),
|
(AEFilterUPP, 'filterProc', InMode),
|
||||||
)
|
)
|
||||||
aedescmethods.append(f)
|
aedescmethods.append(f)
|
||||||
|
|
||||||
|
@ -260,14 +214,15 @@ aedescmethods.append(f)
|
||||||
f = AEMethod(OSErr, 'AEResumeTheCurrentEvent',
|
f = AEMethod(OSErr, 'AEResumeTheCurrentEvent',
|
||||||
(AppleEvent_ptr, 'theAppleEvent', InMode),
|
(AppleEvent_ptr, 'theAppleEvent', InMode),
|
||||||
(AppleEvent_ptr, 'reply', InMode),
|
(AppleEvent_ptr, 'reply', InMode),
|
||||||
(EventHandler, 'dispatcher', InMode),
|
(AEEventHandlerUPP, 'dispatcher', InMode),
|
||||||
|
(long, 'handlerRefcon', InMode),
|
||||||
)
|
)
|
||||||
aedescmethods.append(f)
|
aedescmethods.append(f)
|
||||||
|
|
||||||
f = AEFunction(OSErr, 'AEGetTheCurrentEvent',
|
f = AEMethod(OSErr, 'AEGetTheCurrentEvent',
|
||||||
(AppleEvent, 'theAppleEvent', OutMode),
|
(AppleEvent_ptr, 'theAppleEvent', InMode),
|
||||||
)
|
)
|
||||||
functions.append(f)
|
aedescmethods.append(f)
|
||||||
|
|
||||||
f = AEMethod(OSErr, 'AESetTheCurrentEvent',
|
f = AEMethod(OSErr, 'AESetTheCurrentEvent',
|
||||||
(AppleEvent_ptr, 'theAppleEvent', InMode),
|
(AppleEvent_ptr, 'theAppleEvent', InMode),
|
||||||
|
@ -287,14 +242,15 @@ functions.append(f)
|
||||||
f = AEFunction(OSErr, 'AEInteractWithUser',
|
f = AEFunction(OSErr, 'AEInteractWithUser',
|
||||||
(long, 'timeOutInTicks', InMode),
|
(long, 'timeOutInTicks', InMode),
|
||||||
(NMRecPtr, 'nmReqPtr', InMode),
|
(NMRecPtr, 'nmReqPtr', InMode),
|
||||||
(IdleProcPtr, 'idleProc', InMode),
|
(AEIdleUPP, 'idleProc', InMode),
|
||||||
)
|
)
|
||||||
functions.append(f)
|
functions.append(f)
|
||||||
|
|
||||||
f = AEFunction(OSErr, 'AEInstallEventHandler',
|
f = AEFunction(OSErr, 'AEInstallEventHandler',
|
||||||
(AEEventClass, 'theAEEventClass', InMode),
|
(AEEventClass, 'theAEEventClass', InMode),
|
||||||
(AEEventID, 'theAEEventID', InMode),
|
(AEEventID, 'theAEEventID', InMode),
|
||||||
(EventHandler, 'handler', InMode),
|
(AEEventHandlerUPP, 'handler', InMode),
|
||||||
|
(long, 'handlerRefcon', InMode),
|
||||||
(AlwaysFalse, 'isSysHandler', InMode),
|
(AlwaysFalse, 'isSysHandler', InMode),
|
||||||
)
|
)
|
||||||
functions.append(f)
|
functions.append(f)
|
||||||
|
@ -302,7 +258,7 @@ functions.append(f)
|
||||||
f = AEFunction(OSErr, 'AERemoveEventHandler',
|
f = AEFunction(OSErr, 'AERemoveEventHandler',
|
||||||
(AEEventClass, 'theAEEventClass', InMode),
|
(AEEventClass, 'theAEEventClass', InMode),
|
||||||
(AEEventID, 'theAEEventID', InMode),
|
(AEEventID, 'theAEEventID', InMode),
|
||||||
(EventHandlerProcPtr, 'handler', InMode),
|
(AEEventHandlerUPP, 'handler', InMode),
|
||||||
(AlwaysFalse, 'isSysHandler', InMode),
|
(AlwaysFalse, 'isSysHandler', InMode),
|
||||||
)
|
)
|
||||||
functions.append(f)
|
functions.append(f)
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
# Then run aesupport to generate AEmodule.c.
|
# Then run aesupport to generate AEmodule.c.
|
||||||
0# (Should learn how to tell the compiler to compile it as well.)
|
0# (Should learn how to tell the compiler to compile it as well.)
|
||||||
|
|
||||||
|
import addpack
|
||||||
|
addpack.addpack(':Tools:bgen:bgen')
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import string
|
import string
|
||||||
|
@ -46,6 +48,8 @@ class AppleEventsScanner(Scanner):
|
||||||
return [
|
return [
|
||||||
"ProcPtr",
|
"ProcPtr",
|
||||||
"AEArrayType",
|
"AEArrayType",
|
||||||
|
"AECoercionHandlerUPP",
|
||||||
|
"UniversalProcPtr",
|
||||||
]
|
]
|
||||||
|
|
||||||
def makerepairinstructions(self):
|
def makerepairinstructions(self):
|
||||||
|
@ -65,6 +69,9 @@ class AppleEventsScanner(Scanner):
|
||||||
([("void", "*", "OutMode"), ("Size", "*", "InMode"),
|
([("void", "*", "OutMode"), ("Size", "*", "InMode"),
|
||||||
("Size", "*", "OutMode")],
|
("Size", "*", "OutMode")],
|
||||||
[("VarVarOutBuffer", "*", "InOutMode")]),
|
[("VarVarOutBuffer", "*", "InOutMode")]),
|
||||||
|
|
||||||
|
([("AppleEvent", "theAppleEvent", "OutMode")],
|
||||||
|
[("AppleEvent_ptr", "*", "InMode")]),
|
||||||
]
|
]
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
# It execs the file aegen.py which contain the function definitions
|
# It execs the file aegen.py which contain the function definitions
|
||||||
# (aegen.py was generated by aescan.py, scanning the <AppleEvents.h> header file).
|
# (aegen.py was generated by aescan.py, scanning the <AppleEvents.h> header file).
|
||||||
|
|
||||||
|
import addpack
|
||||||
|
addpack.addpack(':Tools:bgen:bgen')
|
||||||
|
|
||||||
from macsupport import *
|
from macsupport import *
|
||||||
|
|
||||||
|
@ -65,9 +67,12 @@ EventHandlerNoRefCon = EHNoRefConType()
|
||||||
|
|
||||||
|
|
||||||
IdleProcPtr = FakeType("upp_AEIdleProc")
|
IdleProcPtr = FakeType("upp_AEIdleProc")
|
||||||
|
AEIdleUPP = IdleProcPtr
|
||||||
EventFilterProcPtr = FakeType("(AEFilterUPP)0")
|
EventFilterProcPtr = FakeType("(AEFilterUPP)0")
|
||||||
|
AEFilterUPP = EventFilterProcPtr
|
||||||
NMRecPtr = FakeType("(NMRecPtr)0")
|
NMRecPtr = FakeType("(NMRecPtr)0")
|
||||||
EventHandlerProcPtr = FakeType("upp_GenericEventHandler")
|
EventHandlerProcPtr = FakeType("upp_GenericEventHandler")
|
||||||
|
AEEventHandlerUPP = EventHandlerProcPtr
|
||||||
AlwaysFalse = FakeType("0")
|
AlwaysFalse = FakeType("0")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue