]> granicus.if.org Git - python/commitdiff
Fixed the bugs in the constant definitions, and in the code to test
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 15 Aug 2002 22:05:58 +0000 (22:05 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 15 Aug 2002 22:05:58 +0000 (22:05 +0000)
them.
The FutureWarnings are still there, until a way has been found to
say "I know what I'm doing here when I say 0xff000000".

Mac/Modules/ctl/ctlscan.py
Mac/Modules/drag/dragscan.py
Mac/Modules/mlte/mltescan.py
Mac/Modules/scrap/scrapscan.py

index 25250091e3a8966fc6710f05445ee723736e2f87..eb6d789025dd7900089eac2e241e8a8a4f963bb6 100644 (file)
@@ -34,14 +34,14 @@ class MyScanner(Scanner):
 
        def writeinitialdefs(self):
                self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-               self.defsfile.write("from TextEdit import *\n")
-               self.defsfile.write("from QuickDraw import *\n")
-               self.defsfile.write("from Dragconst import *\n")
-               self.defsfile.write("from CarbonEvents import *\n")
-               self.defsfile.write("from Appearance import *\n")
+               self.defsfile.write("from Carbon.TextEdit import *\n")
+               self.defsfile.write("from Carbon.QuickDraw import *\n")
+               self.defsfile.write("from Carbon.Dragconst import *\n")
+               self.defsfile.write("from Carbon.CarbonEvents import *\n")
+               self.defsfile.write("from Carbon.Appearance import *\n")
                self.defsfile.write("kDataBrowserItemAnyState = -1\n")
                self.defsfile.write("kControlBevelButtonCenterPopupGlyphTag = -1\n")
-               self.defsfile.write("kDataBrowserClientPropertyFlagsMask = 0xFF << 24  # kDataBrowserClientPropertyFlagsOffset\n")
+               self.defsfile.write("kDataBrowserClientPropertyFlagsMask = 0xFF000000\n")
                self.defsfile.write("\n")
 
        def makeblacklistnames(self):
index e305e04bd580205fd70adf0b8f87873d231d2a47..158cfffeb078efa6ad3c7066d791f475b22d03de 100644 (file)
@@ -45,8 +45,8 @@ class MyScanner(Scanner):
 
        def writeinitialdefs(self):
                self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-               self.defsfile.write("from TextEdit import *\n")
-               self.defsfile.write("from QuickDraw import *\n")
+               self.defsfile.write("from Carbon.TextEdit import *\n")
+               self.defsfile.write("from Carbon.QuickDraw import *\n")
                self.defsfile.write("\n")
                # Defines unparseable in Drag.h
                self.defsfile.write(MISSING_DEFINES)
index 980a98e97c693c535e5116da883513003b868d52..f6c93e208aa090599dfcd24d38160b6ad6f534f7 100644 (file)
@@ -50,6 +50,8 @@ kTXNUseCurrentSelection = 0xFFFFFFFF
 kTXNStartOffset = 0
 kTXNEndOffset = 0x7FFFFFFF
 MovieFileType = FOUR_CHAR_CODE('moov')
+kTXNUseEncodingWordRulesMask = 0x80000000
+kTXNFontSizeAttributeSize = 4
 """)
 
        def makeblacklistnames(self):
@@ -72,6 +74,8 @@ MovieFileType = FOUR_CHAR_CODE('moov')
                        "kTXNQDFontStyleAttributeSize",
                        "kTXNQDFontColorAttributeSize",
                        "kTXNTextEncodingAttributeSize",
+                       "kTXNUseEncodingWordRulesMask",
+                       "kTXNFontSizeAttributeSize",
                        "status",
                        "justification",
                        ]
index b54d09d4f45050b5bb4035ca10e51d75ec93e7b5..379ded3c01bd05c0369894b4801258cf6e7b0264 100644 (file)
@@ -19,8 +19,8 @@ def main():
        scanner = MyScanner(input, output, defsoutput)
        scanner.scan()
        scanner.close()
-       print "=== Testing definitions output code ==="
-       execfile(defsoutput, {}, {})
+##     print "=== Testing definitions output code ==="
+##     execfile(defsoutput, {}, {})
        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! ==="