-# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Events.h'
+# Generated from 'Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Events.h'
nullEvent = 0
mouseDown = 1
rightShiftKey = 0x2000
rightOptionKey = 0x4000
rightControlKey = 0x8000
+activeFlagBit = 0
+btnStateBit = 7
+cmdKeyBit = 8
+shiftKeyBit = 9
+alphaLockBit = 10
+optionKeyBit = 11
+controlKeyBit = 12
+rightShiftKeyBit = 13
+rightOptionKeyBit = 14
+rightControlKeyBit = 15
networkEvt = 10
driverEvt = 11
app1Evt = 12
-# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Sound.h'
+# Generated from 'Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Sound.h'
soundListRsrc = 'snd '
rate44khz = 0xAC440000L
dbBufferReady = 0x00000001
dbLastBuffer = 0x00000004
sysBeepDisable = 0x0000
-sysBeepEnable = 0x0001
unitTypeNoSelection = 0xFFFF
unitTypeSeconds = 0x0000
PyObject *_args;
{
PyObject *_res = NULL;
- MacOSEventMask value;
+ EventMask value;
if (!PyArg_ParseTuple(_args, "h",
&value))
return NULL;
{
PyObject *_res = NULL;
Boolean _rv;
- MacOSEventMask eventMask;
+ EventMask eventMask;
EventRecord theEvent;
if (!PyArg_ParseTuple(_args, "h",
&eventMask))
{
PyObject *_res = NULL;
Boolean _rv;
- MacOSEventMask eventMask;
+ EventMask eventMask;
EventRecord theEvent;
UInt32 sleep;
if (!PyArg_ParseTuple(_args, "hl",
{
PyObject *_res = NULL;
Boolean _rv;
- MacOSEventMask eventMask;
+ EventMask eventMask;
EventRecord theEvent;
if (!PyArg_ParseTuple(_args, "h",
&eventMask))
{
PyObject *_res = NULL;
OSErr _err;
- MacOSEventKind eventNum;
+ EventKind eventNum;
UInt32 eventMsg;
if (!PyArg_ParseTuple(_args, "hl",
&eventNum,
{
PyObject *_res = NULL;
Boolean _rv;
- MacOSEventMask mask;
+ EventMask mask;
EventRecord theEvent;
if (!PyArg_ParseTuple(_args, "h",
&mask))
{
PyObject *_res = NULL;
Boolean _rv;
- MacOSEventMask mask;
+ EventMask mask;
EventRecord theEvent;
if (!PyArg_ParseTuple(_args, "h",
&mask))
PyObject *_args;
{
PyObject *_res = NULL;
- MacOSEventMask whichMask;
- MacOSEventMask stopMask;
+ EventMask whichMask;
+ EventMask stopMask;
if (!PyArg_ParseTuple(_args, "hh",
&whichMask,
&stopMask))
{"GetCaretTime", (PyCFunction)Evt_GetCaretTime, 1,
"() -> (UInt32 _rv)"},
{"SetEventMask", (PyCFunction)Evt_SetEventMask, 1,
- "(MacOSEventMask value) -> None"},
+ "(EventMask value) -> None"},
{"GetDblTime", (PyCFunction)Evt_GetDblTime, 1,
"() -> (UInt32 _rv)"},
{"GetNextEvent", (PyCFunction)Evt_GetNextEvent, 1,
- "(MacOSEventMask eventMask) -> (Boolean _rv, EventRecord theEvent)"},
+ "(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)"},
{"WaitNextEvent", (PyCFunction)Evt_WaitNextEvent, 1,
- "(MacOSEventMask eventMask, UInt32 sleep) -> (Boolean _rv, EventRecord theEvent)"},
+ "(EventMask eventMask, UInt32 sleep) -> (Boolean _rv, EventRecord theEvent)"},
{"EventAvail", (PyCFunction)Evt_EventAvail, 1,
- "(MacOSEventMask eventMask) -> (Boolean _rv, EventRecord theEvent)"},
+ "(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)"},
{"GetMouse", (PyCFunction)Evt_GetMouse, 1,
"() -> (Point mouseLoc)"},
{"Button", (PyCFunction)Evt_Button, 1,
{"TickCount", (PyCFunction)Evt_TickCount, 1,
"() -> (UInt32 _rv)"},
{"PostEvent", (PyCFunction)Evt_PostEvent, 1,
- "(MacOSEventKind eventNum, UInt32 eventMsg) -> None"},
+ "(EventKind eventNum, UInt32 eventMsg) -> None"},
{"OSEventAvail", (PyCFunction)Evt_OSEventAvail, 1,
- "(MacOSEventMask mask) -> (Boolean _rv, EventRecord theEvent)"},
+ "(EventMask mask) -> (Boolean _rv, EventRecord theEvent)"},
{"GetOSEvent", (PyCFunction)Evt_GetOSEvent, 1,
- "(MacOSEventMask mask) -> (Boolean _rv, EventRecord theEvent)"},
+ "(EventMask mask) -> (Boolean _rv, EventRecord theEvent)"},
{"FlushEvents", (PyCFunction)Evt_FlushEvents, 1,
- "(MacOSEventMask whichMask, MacOSEventMask stopMask) -> None"},
+ "(EventMask whichMask, EventMask stopMask) -> None"},
{"SystemClick", (PyCFunction)Evt_SystemClick, 1,
"(EventRecord theEvent, WindowPtr theWindow) -> None"},
{"SystemTask", (PyCFunction)Evt_SystemTask, 1,
-# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Events.h'
+# Generated from 'Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Events.h'
f = Function(UInt32, 'GetCaretTime',
)
functions.append(f)
f = Function(void, 'SetEventMask',
- (MacOSEventMask, 'value', InMode),
+ (EventMask, 'value', InMode),
)
functions.append(f)
functions.append(f)
f = Function(Boolean, 'GetNextEvent',
- (MacOSEventMask, 'eventMask', InMode),
+ (EventMask, 'eventMask', InMode),
(EventRecord, 'theEvent', OutMode),
)
functions.append(f)
f = Function(Boolean, 'WaitNextEvent',
- (MacOSEventMask, 'eventMask', InMode),
+ (EventMask, 'eventMask', InMode),
(EventRecord, 'theEvent', OutMode),
(UInt32, 'sleep', InMode),
(RgnHandle, 'mouseRgn', InMode),
functions.append(f)
f = Function(Boolean, 'EventAvail',
- (MacOSEventMask, 'eventMask', InMode),
+ (EventMask, 'eventMask', InMode),
(EventRecord, 'theEvent', OutMode),
)
functions.append(f)
functions.append(f)
f = Function(OSErr, 'PostEvent',
- (MacOSEventKind, 'eventNum', InMode),
+ (EventKind, 'eventNum', InMode),
(UInt32, 'eventMsg', InMode),
)
functions.append(f)
f = Function(Boolean, 'OSEventAvail',
- (MacOSEventMask, 'mask', InMode),
+ (EventMask, 'mask', InMode),
(EventRecord, 'theEvent', OutMode),
)
functions.append(f)
f = Function(Boolean, 'GetOSEvent',
- (MacOSEventMask, 'mask', InMode),
+ (EventMask, 'mask', InMode),
(EventRecord, 'theEvent', OutMode),
)
functions.append(f)
f = Function(void, 'FlushEvents',
- (MacOSEventMask, 'whichMask', InMode),
- (MacOSEventMask, 'stopMask', InMode),
+ (EventMask, 'whichMask', InMode),
+ (EventMask, 'stopMask', InMode),
)
functions.append(f)
RgnHandle = FakeType("(RgnHandle)0") # XXX
KeyMap = ArrayOutputBufferType("KeyMap")
-MacOSEventKind = Type("MacOSEventKind", "h")
-MacOSEventMask = Type("MacOSEventMask", "h")
+MacOSEventKind = Type("MacOSEventKind", "h") # Old-style
+MacOSEventMask = Type("MacOSEventMask", "h") # Old-style
+EventMask = Type("EventMask", "h")
+EventKind = Type("EventKind", "h")
includestuff = includestuff + """
#include <%s>""" % MACHEADERFILE + """
PyObject *ResObj_OptNew(itself)
Handle itself;
{
- ResourceObject *it;
if (itself == NULL) {
Py_INCREF(Py_None);
return Py_None;
PyObject *_args;
{
PyObject *_res = NULL;
- NumVersion _rv;
+ long _rv;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = SndSoundManagerVersion();
- _res = Py_BuildValue("O&",
- NumVer_New, _rv);
+ _res = Py_BuildValue("l",
+ _rv);
return _res;
}
PyObject *_args;
{
PyObject *_res = NULL;
- NumVersion _rv;
+ long _rv;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = MACEVersion();
- _res = Py_BuildValue("O&",
- NumVer_New, _rv);
+ _res = Py_BuildValue("l",
+ _rv);
return _res;
}
{"SndControl", (PyCFunction)Snd_SndControl, 1,
"(short id) -> (SndCommand cmd)"},
{"SndSoundManagerVersion", (PyCFunction)Snd_SndSoundManagerVersion, 1,
- "() -> (NumVersion _rv)"},
+ "() -> (long _rv)"},
{"SndManagerStatus", (PyCFunction)Snd_SndManagerStatus, 1,
"(short theLength) -> (SMStatus theStatus)"},
{"SndGetSysBeepState", (PyCFunction)Snd_SndGetSysBeepState, 1,
{"SndSetSysBeepState", (PyCFunction)Snd_SndSetSysBeepState, 1,
"(short sysBeepState) -> None"},
{"MACEVersion", (PyCFunction)Snd_MACEVersion, 1,
- "() -> (NumVersion _rv)"},
+ "() -> (long _rv)"},
{"Comp3to1", (PyCFunction)Snd_Comp3to1, 1,
"(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)"},
{"Exp1to3", (PyCFunction)Snd_Exp1to3, 1,
-# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Sound.h'
+# Generated from 'Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Sound.h'
f = SndFunction(void, 'SetSoundVol',
(short, 'level', InMode),
)
functions.append(f)
-f = SndFunction(NumVersion, 'SndSoundManagerVersion',
+f = SndFunction(long, 'SndSoundManagerVersion',
)
functions.append(f)
)
functions.append(f)
-f = SndFunction(NumVersion, 'MACEVersion',
+f = SndFunction(long, 'MACEVersion',
)
functions.append(f)
"GetSoundVol",
"SetSoundVol",
"UnsignedFixed",
+ # Don't have the time to dig into this...
+ "Component",
]
def makerepairinstructions(self):
# Default preferences
#CREATOR = 'KAHL' # Guido's favorite text editor on the Mac
#INCLUDEDIR = "D:Development:THINK C:Mac #includes:Apple #includes:"
-CREATOR = 'MPCC' # Jack's favorite text editor on the Mac
-INCLUDEDIR = "Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:"
+CREATOR = 'CWIE' # Jack's favorite text editor on the Mac
+INCLUDEDIR = "Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:"
Error = "scantools.Error"