diff options
Diffstat (limited to 'Mac/Modules/ae/aescan.py')
-rw-r--r-- | Mac/Modules/ae/aescan.py | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/Mac/Modules/ae/aescan.py b/Mac/Modules/ae/aescan.py index 4317195..620a91c 100644 --- a/Mac/Modules/ae/aescan.py +++ b/Mac/Modules/ae/aescan.py @@ -19,7 +19,7 @@ def main(): input = "AERegistry.h" output = "@dummy-registry.py" defsoutput = TOOLBOXDIR + "AERegistry.py" - scanner = AppleEventsScanner(input, output, defsoutput) + scanner = AppleEventsRegScanner(input, output, defsoutput) scanner.scan() scanner.close() print "=== Scanning AEObjects.h for defines ===" @@ -32,11 +32,19 @@ def main(): scanner = AppleEventsScanner(input, output, defsoutput) scanner.scan() scanner.close() - print "=== Scanning AppleEvents.py ===" + print "=== Scanning AEDataModel.h ===" + input = "AEDataModel.h" + output = "aedatamodelgen.py" + defsoutput = TOOLBOXDIR + "AEDataModel.py" + scanner = AppleEventsScanner(input, output, defsoutput) + + scanner.scan() + scanner.close() + print "=== Scanning AppleEvents.h ===" input = "AppleEvents.h" output = "aegen.py" defsoutput = TOOLBOXDIR + "AppleEvents.py" - scanner = AppleEventsScanner(input, output, defsoutput) + scanner = AppleEventsRegScanner(input, output, defsoutput) scanner.scan() scanner.close() print "=== Done Scanning and Generating, now doing 'import aesupport' ===" @@ -102,5 +110,13 @@ class AppleEventsScanner(Scanner): [("AEDescList_ptr", "*", "InMode")]), ] + def writeinitialdefs(self): + self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n") + +class AppleEventsRegScanner(AppleEventsScanner): + def writeinitialdefs(self): + self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n") + self.defsfile.write("from AEDataModel import *\n") + if __name__ == "__main__": main() |