1212# Simple types
1313Boolean = Type ("Boolean" , "b" )
1414SignedByte = Type ("SignedByte" , "b" )
15- ScriptCode = Type ("ScriptCode" , "h" )
1615Size = Type ("Size" , "l" )
1716Style = Type ("Style" , "b" )
1817StyleParameter = Type ("StyleParameter" , "h" )
1918CharParameter = Type ("CharParameter" , "h" )
2019TextEncoding = Type ("TextEncoding" , "l" )
20+ ByteCount = Type ("ByteCount" , "l" )
21+ Duration = Type ("Duration" , "l" )
22+ ByteOffset = Type ("ByteOffset" , "l" )
23+ OptionBits = Type ("OptionBits" , "l" )
24+ ItemCount = Type ("ItemCount" , "l" )
25+ PBVersion = Type ("PBVersion" , "l" )
26+ ScriptCode = Type ("ScriptCode" , "h" )
27+ LangCode = Type ("LangCode" , "h" )
28+ RegionCode = Type ("RegionCode" , "h" )
2129
2230UInt8 = Type ("UInt8" , "b" )
2331SInt8 = Type ("SInt8" , "b" )
2432UInt16 = Type ("UInt16" , "H" )
2533SInt16 = Type ("SInt16" , "h" )
2634UInt32 = Type ("UInt32" , "l" )
2735SInt32 = Type ("SInt32" , "l" )
36+ Float32 = Type ("Float32" , "f" )
37+
38+ wide = OpaqueByValueType ("wide" , "PyMac_Buildwide" , "PyMac_Getwide" )
39+ wide_ptr = OpaqueType ("wide" , "PyMac_Buildwide" , "PyMac_Getwide" )
2840
2941# Pascal strings
3042ConstStr255Param = OpaqueArrayType ("Str255" , "PyMac_BuildStr255" , "PyMac_GetStr255" )
3143Str255 = OpaqueArrayType ("Str255" , "PyMac_BuildStr255" , "PyMac_GetStr255" )
44+ StringPtr = OpaqueByValueType ("StringPtr" , "PyMac_BuildStr255" , "BUG" )
3245
3346# File System Specifications
3447FSSpec_ptr = OpaqueType ("FSSpec" , "PyMac_BuildFSSpec" , "PyMac_GetFSSpec" )
@@ -39,6 +52,7 @@ def OSTypeType(typename):
3952 return OpaqueByValueType (typename , "PyMac_BuildOSType" , "PyMac_GetOSType" )
4053OSType = OSTypeType ("OSType" )
4154ResType = OSTypeType ("ResType" )
55+ FourCharCode = OSTypeType ("FourCharCode" )
4256
4357# Version numbers
4458NumVersion = OpaqueByValueType ("NumVersion" , "PyMac_BuildNumVersion" , "BUG" )
@@ -56,6 +70,7 @@ def OSTypeType(typename):
5670DialogPtr = OpaqueByValueType ("DialogPtr" , "DlgObj" )
5771DialogRef = DialogPtr
5872ExistingWindowPtr = OpaqueByValueType ("WindowPtr" , "WinObj_WhichWindow" , "BUG" )
73+ # XXX This is incorrect: it returns a Window, not a Dialog!
5974ExistingDialogPtr = OpaqueByValueType ("DialogPtr" , "WinObj_WhichWindow" , "BUG" )
6075
6176# NULL pointer passed in as optional storage -- not present in Python version
0 commit comments