Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d40f3c6

Browse files
committed
New universal headers
1 parent 7321514 commit d40f3c6

10 files changed

Lines changed: 58 additions & 46 deletions

File tree

Mac/Lib/toolbox/Events.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Events.h'
1+
# Generated from 'Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Events.h'
22

33
nullEvent = 0
44
mouseDown = 1
@@ -39,6 +39,16 @@
3939
rightShiftKey = 0x2000
4040
rightOptionKey = 0x4000
4141
rightControlKey = 0x8000
42+
activeFlagBit = 0
43+
btnStateBit = 7
44+
cmdKeyBit = 8
45+
shiftKeyBit = 9
46+
alphaLockBit = 10
47+
optionKeyBit = 11
48+
controlKeyBit = 12
49+
rightShiftKeyBit = 13
50+
rightOptionKeyBit = 14
51+
rightControlKeyBit = 15
4252
networkEvt = 10
4353
driverEvt = 11
4454
app1Evt = 12

Mac/Lib/toolbox/Sound.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Sound.h'
1+
# Generated from 'Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Sound.h'
22

33
soundListRsrc = 'snd '
44
rate44khz = 0xAC440000L
@@ -98,6 +98,5 @@
9898
dbBufferReady = 0x00000001
9999
dbLastBuffer = 0x00000004
100100
sysBeepDisable = 0x0000
101-
sysBeepEnable = 0x0001
102101
unitTypeNoSelection = 0xFFFF
103102
unitTypeSeconds = 0x0000

Mac/Modules/evt/Evtmodule.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static PyObject *Evt_SetEventMask(_self, _args)
5959
PyObject *_args;
6060
{
6161
PyObject *_res = NULL;
62-
MacOSEventMask value;
62+
EventMask value;
6363
if (!PyArg_ParseTuple(_args, "h",
6464
&value))
6565
return NULL;
@@ -89,7 +89,7 @@ static PyObject *Evt_GetNextEvent(_self, _args)
8989
{
9090
PyObject *_res = NULL;
9191
Boolean _rv;
92-
MacOSEventMask eventMask;
92+
EventMask eventMask;
9393
EventRecord theEvent;
9494
if (!PyArg_ParseTuple(_args, "h",
9595
&eventMask))
@@ -108,7 +108,7 @@ static PyObject *Evt_WaitNextEvent(_self, _args)
108108
{
109109
PyObject *_res = NULL;
110110
Boolean _rv;
111-
MacOSEventMask eventMask;
111+
EventMask eventMask;
112112
EventRecord theEvent;
113113
UInt32 sleep;
114114
if (!PyArg_ParseTuple(_args, "hl",
@@ -131,7 +131,7 @@ static PyObject *Evt_EventAvail(_self, _args)
131131
{
132132
PyObject *_res = NULL;
133133
Boolean _rv;
134-
MacOSEventMask eventMask;
134+
EventMask eventMask;
135135
EventRecord theEvent;
136136
if (!PyArg_ParseTuple(_args, "h",
137137
&eventMask))
@@ -235,7 +235,7 @@ static PyObject *Evt_PostEvent(_self, _args)
235235
{
236236
PyObject *_res = NULL;
237237
OSErr _err;
238-
MacOSEventKind eventNum;
238+
EventKind eventNum;
239239
UInt32 eventMsg;
240240
if (!PyArg_ParseTuple(_args, "hl",
241241
&eventNum,
@@ -255,7 +255,7 @@ static PyObject *Evt_OSEventAvail(_self, _args)
255255
{
256256
PyObject *_res = NULL;
257257
Boolean _rv;
258-
MacOSEventMask mask;
258+
EventMask mask;
259259
EventRecord theEvent;
260260
if (!PyArg_ParseTuple(_args, "h",
261261
&mask))
@@ -274,7 +274,7 @@ static PyObject *Evt_GetOSEvent(_self, _args)
274274
{
275275
PyObject *_res = NULL;
276276
Boolean _rv;
277-
MacOSEventMask mask;
277+
EventMask mask;
278278
EventRecord theEvent;
279279
if (!PyArg_ParseTuple(_args, "h",
280280
&mask))
@@ -292,8 +292,8 @@ static PyObject *Evt_FlushEvents(_self, _args)
292292
PyObject *_args;
293293
{
294294
PyObject *_res = NULL;
295-
MacOSEventMask whichMask;
296-
MacOSEventMask stopMask;
295+
EventMask whichMask;
296+
EventMask stopMask;
297297
if (!PyArg_ParseTuple(_args, "hh",
298298
&whichMask,
299299
&stopMask))
@@ -356,15 +356,15 @@ static PyMethodDef Evt_methods[] = {
356356
{"GetCaretTime", (PyCFunction)Evt_GetCaretTime, 1,
357357
"() -> (UInt32 _rv)"},
358358
{"SetEventMask", (PyCFunction)Evt_SetEventMask, 1,
359-
"(MacOSEventMask value) -> None"},
359+
"(EventMask value) -> None"},
360360
{"GetDblTime", (PyCFunction)Evt_GetDblTime, 1,
361361
"() -> (UInt32 _rv)"},
362362
{"GetNextEvent", (PyCFunction)Evt_GetNextEvent, 1,
363-
"(MacOSEventMask eventMask) -> (Boolean _rv, EventRecord theEvent)"},
363+
"(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)"},
364364
{"WaitNextEvent", (PyCFunction)Evt_WaitNextEvent, 1,
365-
"(MacOSEventMask eventMask, UInt32 sleep) -> (Boolean _rv, EventRecord theEvent)"},
365+
"(EventMask eventMask, UInt32 sleep) -> (Boolean _rv, EventRecord theEvent)"},
366366
{"EventAvail", (PyCFunction)Evt_EventAvail, 1,
367-
"(MacOSEventMask eventMask) -> (Boolean _rv, EventRecord theEvent)"},
367+
"(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)"},
368368
{"GetMouse", (PyCFunction)Evt_GetMouse, 1,
369369
"() -> (Point mouseLoc)"},
370370
{"Button", (PyCFunction)Evt_Button, 1,
@@ -378,13 +378,13 @@ static PyMethodDef Evt_methods[] = {
378378
{"TickCount", (PyCFunction)Evt_TickCount, 1,
379379
"() -> (UInt32 _rv)"},
380380
{"PostEvent", (PyCFunction)Evt_PostEvent, 1,
381-
"(MacOSEventKind eventNum, UInt32 eventMsg) -> None"},
381+
"(EventKind eventNum, UInt32 eventMsg) -> None"},
382382
{"OSEventAvail", (PyCFunction)Evt_OSEventAvail, 1,
383-
"(MacOSEventMask mask) -> (Boolean _rv, EventRecord theEvent)"},
383+
"(EventMask mask) -> (Boolean _rv, EventRecord theEvent)"},
384384
{"GetOSEvent", (PyCFunction)Evt_GetOSEvent, 1,
385-
"(MacOSEventMask mask) -> (Boolean _rv, EventRecord theEvent)"},
385+
"(EventMask mask) -> (Boolean _rv, EventRecord theEvent)"},
386386
{"FlushEvents", (PyCFunction)Evt_FlushEvents, 1,
387-
"(MacOSEventMask whichMask, MacOSEventMask stopMask) -> None"},
387+
"(EventMask whichMask, EventMask stopMask) -> None"},
388388
{"SystemClick", (PyCFunction)Evt_SystemClick, 1,
389389
"(EventRecord theEvent, WindowPtr theWindow) -> None"},
390390
{"SystemTask", (PyCFunction)Evt_SystemTask, 1,

Mac/Modules/evt/evtgen.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Events.h'
1+
# Generated from 'Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Events.h'
22

33
f = Function(UInt32, 'GetCaretTime',
44
)
55
functions.append(f)
66

77
f = Function(void, 'SetEventMask',
8-
(MacOSEventMask, 'value', InMode),
8+
(EventMask, 'value', InMode),
99
)
1010
functions.append(f)
1111

@@ -14,21 +14,21 @@
1414
functions.append(f)
1515

1616
f = Function(Boolean, 'GetNextEvent',
17-
(MacOSEventMask, 'eventMask', InMode),
17+
(EventMask, 'eventMask', InMode),
1818
(EventRecord, 'theEvent', OutMode),
1919
)
2020
functions.append(f)
2121

2222
f = Function(Boolean, 'WaitNextEvent',
23-
(MacOSEventMask, 'eventMask', InMode),
23+
(EventMask, 'eventMask', InMode),
2424
(EventRecord, 'theEvent', OutMode),
2525
(UInt32, 'sleep', InMode),
2626
(RgnHandle, 'mouseRgn', InMode),
2727
)
2828
functions.append(f)
2929

3030
f = Function(Boolean, 'EventAvail',
31-
(MacOSEventMask, 'eventMask', InMode),
31+
(EventMask, 'eventMask', InMode),
3232
(EventRecord, 'theEvent', OutMode),
3333
)
3434
functions.append(f)
@@ -60,26 +60,26 @@
6060
functions.append(f)
6161

6262
f = Function(OSErr, 'PostEvent',
63-
(MacOSEventKind, 'eventNum', InMode),
63+
(EventKind, 'eventNum', InMode),
6464
(UInt32, 'eventMsg', InMode),
6565
)
6666
functions.append(f)
6767

6868
f = Function(Boolean, 'OSEventAvail',
69-
(MacOSEventMask, 'mask', InMode),
69+
(EventMask, 'mask', InMode),
7070
(EventRecord, 'theEvent', OutMode),
7171
)
7272
functions.append(f)
7373

7474
f = Function(Boolean, 'GetOSEvent',
75-
(MacOSEventMask, 'mask', InMode),
75+
(EventMask, 'mask', InMode),
7676
(EventRecord, 'theEvent', OutMode),
7777
)
7878
functions.append(f)
7979

8080
f = Function(void, 'FlushEvents',
81-
(MacOSEventMask, 'whichMask', InMode),
82-
(MacOSEventMask, 'stopMask', InMode),
81+
(EventMask, 'whichMask', InMode),
82+
(EventMask, 'stopMask', InMode),
8383
)
8484
functions.append(f)
8585

Mac/Modules/evt/evtsupport.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@
2727
RgnHandle = FakeType("(RgnHandle)0") # XXX
2828

2929
KeyMap = ArrayOutputBufferType("KeyMap")
30-
MacOSEventKind = Type("MacOSEventKind", "h")
31-
MacOSEventMask = Type("MacOSEventMask", "h")
30+
MacOSEventKind = Type("MacOSEventKind", "h") # Old-style
31+
MacOSEventMask = Type("MacOSEventMask", "h") # Old-style
32+
EventMask = Type("EventMask", "h")
33+
EventKind = Type("EventKind", "h")
3234

3335
includestuff = includestuff + """
3436
#include <%s>""" % MACHEADERFILE + """

Mac/Modules/res/Resmodule.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,6 @@ static PyMethodDef Res_methods[] = {
13361336
PyObject *ResObj_OptNew(itself)
13371337
Handle itself;
13381338
{
1339-
ResourceObject *it;
13401339
if (itself == NULL) {
13411340
Py_INCREF(Py_None);
13421341
return Py_None;

Mac/Modules/snd/Sndmodule.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -414,12 +414,12 @@ static PyObject *Snd_SndSoundManagerVersion(_self, _args)
414414
PyObject *_args;
415415
{
416416
PyObject *_res = NULL;
417-
NumVersion _rv;
417+
long _rv;
418418
if (!PyArg_ParseTuple(_args, ""))
419419
return NULL;
420420
_rv = SndSoundManagerVersion();
421-
_res = Py_BuildValue("O&",
422-
NumVer_New, _rv);
421+
_res = Py_BuildValue("l",
422+
_rv);
423423
return _res;
424424
}
425425

@@ -479,12 +479,12 @@ static PyObject *Snd_MACEVersion(_self, _args)
479479
PyObject *_args;
480480
{
481481
PyObject *_res = NULL;
482-
NumVersion _rv;
482+
long _rv;
483483
if (!PyArg_ParseTuple(_args, ""))
484484
return NULL;
485485
_rv = MACEVersion();
486-
_res = Py_BuildValue("O&",
487-
NumVer_New, _rv);
486+
_res = Py_BuildValue("l",
487+
_rv);
488488
return _res;
489489
}
490490

@@ -759,15 +759,15 @@ static PyMethodDef Snd_methods[] = {
759759
{"SndControl", (PyCFunction)Snd_SndControl, 1,
760760
"(short id) -> (SndCommand cmd)"},
761761
{"SndSoundManagerVersion", (PyCFunction)Snd_SndSoundManagerVersion, 1,
762-
"() -> (NumVersion _rv)"},
762+
"() -> (long _rv)"},
763763
{"SndManagerStatus", (PyCFunction)Snd_SndManagerStatus, 1,
764764
"(short theLength) -> (SMStatus theStatus)"},
765765
{"SndGetSysBeepState", (PyCFunction)Snd_SndGetSysBeepState, 1,
766766
"() -> (short sysBeepState)"},
767767
{"SndSetSysBeepState", (PyCFunction)Snd_SndSetSysBeepState, 1,
768768
"(short sysBeepState) -> None"},
769769
{"MACEVersion", (PyCFunction)Snd_MACEVersion, 1,
770-
"() -> (NumVersion _rv)"},
770+
"() -> (long _rv)"},
771771
{"Comp3to1", (PyCFunction)Snd_Comp3to1, 1,
772772
"(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)"},
773773
{"Exp1to3", (PyCFunction)Snd_Exp1to3, 1,

Mac/Modules/snd/sndgen.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated from 'Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:Sound.h'
1+
# Generated from 'Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Sound.h'
22

33
f = SndFunction(void, 'SetSoundVol',
44
(short, 'level', InMode),
@@ -44,7 +44,7 @@
4444
)
4545
functions.append(f)
4646

47-
f = SndFunction(NumVersion, 'SndSoundManagerVersion',
47+
f = SndFunction(long, 'SndSoundManagerVersion',
4848
)
4949
functions.append(f)
5050

@@ -94,7 +94,7 @@
9494
)
9595
functions.append(f)
9696

97-
f = SndFunction(NumVersion, 'MACEVersion',
97+
f = SndFunction(long, 'MACEVersion',
9898
)
9999
functions.append(f)
100100

Mac/Modules/snd/sndscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ def makeblacklisttypes(self):
5454
"GetSoundVol",
5555
"SetSoundVol",
5656
"UnsignedFixed",
57+
# Don't have the time to dig into this...
58+
"Component",
5759
]
5860

5961
def makerepairinstructions(self):

Tools/bgen/bgen/scantools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
# Default preferences
3030
#CREATOR = 'KAHL' # Guido's favorite text editor on the Mac
3131
#INCLUDEDIR = "D:Development:THINK C:Mac #includes:Apple #includes:"
32-
CREATOR = 'MPCC' # Jack's favorite text editor on the Mac
33-
INCLUDEDIR = "Sap:CodeWarrior6:Metrowerks C/C++:Headers:Universal Headers 2.0.1f:"
32+
CREATOR = 'CWIE' # Jack's favorite text editor on the Mac
33+
INCLUDEDIR = "Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:"
3434

3535

3636
Error = "scantools.Error"

0 commit comments

Comments
 (0)