diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1995-11-30 15:03:59 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1995-11-30 15:03:59 (GMT) |
commit | cb4eaadd688d1ebce9ec46334966d8bb0f0fd199 (patch) | |
tree | 5d1067c6a8d16d00f1fe9cfb77e7b35cb085edfd /Mac/Modules/qt/qtscan.py | |
parent | b996856d12ac43ea6c1cb3697083f5d331de8e15 (diff) | |
download | cpython-cb4eaadd688d1ebce9ec46334966d8bb0f0fd199.zip cpython-cb4eaadd688d1ebce9ec46334966d8bb0f0fd199.tar.gz cpython-cb4eaadd688d1ebce9ec46334966d8bb0f0fd199.tar.bz2 |
QuickTime support (not yet functional)
Diffstat (limited to 'Mac/Modules/qt/qtscan.py')
-rw-r--r-- | Mac/Modules/qt/qtscan.py | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/Mac/Modules/qt/qtscan.py b/Mac/Modules/qt/qtscan.py new file mode 100644 index 0000000..4a715d6 --- /dev/null +++ b/Mac/Modules/qt/qtscan.py @@ -0,0 +1,78 @@ +# Scan an Apple header file, generating a Python file of generator calls. + +import addpack +addpack.addpack(':tools:bgen:bgen') +from scantools import Scanner + +LONG = "QuickTime" +SHORT = "qt" +OBJECT = "Movie" + +def main(): + input = "Movies.h" + output = SHORT + "gen.py" + defsoutput = LONG + ".py" + scanner = MyScanner(input, output, defsoutput) + scanner.scan() + scanner.close() + print "=== Done scanning and generating, now importing the generated code... ===" + exec "import " + SHORT + "support" + print "=== Done. It's up to you to compile it now! ===" + +class MyScanner(Scanner): + + def destination(self, type, name, arglist): + classname = "Function" + listname = "functions" + if arglist: + t, n, m = arglist[0] + if t == OBJECT and m == "InMode": + classname = "Method" + listname = "methods" + return classname, listname + + def makeblacklistnames(self): + return [ + "DisposeMovie", # Done on python-object disposal + "GetMovieCreationTime", # type "unsigned long" in C, inparseable + "GetMovieModificationTime", # Ditto + ] + + def makeblacklisttypes(self): + return [ + "MoviesErrorUPP", + "Track", # XXXX To be done in the future + "Media", + "UserData", + "TimeBase", + "QTCallBack", + "Component", + "TimeRecord", + "TimeRecord_ptr", + "TrackEditState", + "MovieEditState", + "MoviePreviewCallOutUPP", + "CGrafPtr", + "GDHandle", + "MovieDrawingCompleteUPP", + "PixMapHandle", + "MatrixRecord", + "MatrixRecord_ptr", + "QTCallBackUPP", + "TextMediaUPP", + "MovieProgressUPP", + "MovieRgnCoverUPP", + "MCActionFilterUPP", + "MCActionFilterWithRefConUPP", + "SampleDescription", + "SoundDescription", + "TextDescription", + "MusicDescription", + ] + + def makerepairinstructions(self): + return [ + ] + +if __name__ == "__main__": + main() |