summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/qt/qtsupport.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2004-01-11 22:27:42 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2004-01-11 22:27:42 (GMT)
commitae57b7f8437693cd27eb4b1a1ceea2008fc37f48 (patch)
tree318a362d0814f99c998a82b240f80502cf5254bd /Mac/Modules/qt/qtsupport.py
parent7e6bbe15162b7307174645e9c4eb2809931b1800 (diff)
downloadcpython-ae57b7f8437693cd27eb4b1a1ceea2008fc37f48.zip
cpython-ae57b7f8437693cd27eb4b1a1ceea2008fc37f48.tar.gz
cpython-ae57b7f8437693cd27eb4b1a1ceea2008fc37f48.tar.bz2
Added support for APIs in QuickTimeMusic.h. This one is a bit dodgy:
the header file seems to be hand-written and missing the "const" keywords for input parameters passed by reference.
Diffstat (limited to 'Mac/Modules/qt/qtsupport.py')
-rw-r--r--Mac/Modules/qt/qtsupport.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/Mac/Modules/qt/qtsupport.py b/Mac/Modules/qt/qtsupport.py
index c2dd024..098d30d 100644
--- a/Mac/Modules/qt/qtsupport.py
+++ b/Mac/Modules/qt/qtsupport.py
@@ -88,6 +88,16 @@ QtTimeRecord_Convert(PyObject *v, TimeRecord *p_itself)
return 1;
}
+static int
+QtMusicMIDIPacket_Convert(PyObject *v, MusicMIDIPacket *p_itself)
+{
+ int dummy;
+
+ if( !PyArg_ParseTuple(v, "hls#", &p_itself->length, &p_itself->reserved, p_itself->data, dummy) )
+ return 0;
+ return 1;
+}
+
"""
@@ -143,6 +153,10 @@ ComponentInstance = OpaqueByValueType('ComponentInstance', 'CmpInstObj')
MediaHandler = OpaqueByValueType('MediaHandler', 'CmpInstObj')
DataHandler = OpaqueByValueType('DataHandler', 'CmpInstObj')
SGChannel = OpaqueByValueType('SGChannel', 'CmpInstObj')
+TunePlayer = OpaqueByValueType('TunePlayer', 'CmpInstObj')
+MusicComponent = OpaqueByValueType('MusicComponent', 'CmpInstObj')
+NoteAllocator = OpaqueByValueType('NoteAllocator', 'CmpInstObj')
+QTMIDIComponent = OpaqueByValueType('QTMIDIComponent', 'CmpInstObj')
ConstFSSpecPtr = FSSpec_ptr
GrafPtr = OpaqueByValueType("GrafPtr", "GrafObj")
@@ -164,6 +178,9 @@ VdigBufferRecListHandle = OpaqueByValueType("VdigBufferRecListHandle", "ResObj")
VDCompressionListHandle = OpaqueByValueType("VDCompressionListHandle", "ResObj")
TimeCodeDescriptionHandle = OpaqueByValueType("TimeCodeDescriptionHandle", "ResObj")
DataHFileTypeOrderingHandle = OpaqueByValueType("DataHFileTypeOrderingHandle", "ResObj")
+QTMIDIPortListHandle = OpaqueByValueType("QTMIDIPortListHandle", "ResObj")
+GenericKnobDescriptionListHandle = OpaqueByValueType("GenericKnobDescriptionListHandle", "ResObj")
+InstrumentInfoListHandle = OpaqueByValueType("InstrumentInfoListHandle", "ResObj")
# Silly Apple, passing an OStype by reference...
OSType_ptr = OpaqueType("OSType", "PyMac_BuildOSType", "PyMac_GetOSType")
# And even sillier: passing floats by address
@@ -173,6 +190,8 @@ RGBColor = OpaqueType("RGBColor", "QdRGB")
RGBColor_ptr = RGBColor
TimeRecord = OpaqueType("TimeRecord", "QtTimeRecord")
TimeRecord_ptr = TimeRecord
+MusicMIDIPacket = OpaqueType("MusicMIDIPacket", "QtMusicMIDIPacket")
+MusicMIDIPacket_ptr = MusicMIDIPacket
# Non-opaque types, mostly integer-ish
TimeValue = Type("TimeValue", "l")
@@ -200,11 +219,16 @@ CodecType = OSTypeType("CodecType")
GWorldPtr = OpaqueByValueType("GWorldPtr", "GWorldObj")
QTFloatSingle = Type("QTFloatSingle", "f")
CodecQ = Type("CodecQ", "l")
+MusicController = Type("MusicController", "l")
# Could-not-be-bothered-types (NewMovieFromFile)
dummyshortptr = FakeType('(short *)0')
dummyStringPtr = FakeType('(StringPtr)0')
+# Not-quite-sure-this-is-okay types
+AtomicInstrument = OpaqueByValueType("AtomicInstrument", "ResObj")
+AtomicInstrumentPtr = InputOnlyType("AtomicInstrumentPtr", "s")
+
# XXXX Need to override output_tp_newBody() to allow for None initializer.
class QtGlobalObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
def outputCheckNewArg(self):