Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7e0c005

Browse files
committed
Various new standard types.
1 parent b8c6863 commit 7e0c005

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

Tools/bgen/bgen/macsupport.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,36 @@
1212
# Simple types
1313
Boolean = Type("Boolean", "b")
1414
SignedByte = Type("SignedByte", "b")
15-
ScriptCode = Type("ScriptCode", "h")
1615
Size = Type("Size", "l")
1716
Style = Type("Style", "b")
1817
StyleParameter = Type("StyleParameter", "h")
1918
CharParameter = Type("CharParameter", "h")
2019
TextEncoding = 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

2230
UInt8 = Type("UInt8", "b")
2331
SInt8 = Type("SInt8", "b")
2432
UInt16 = Type("UInt16", "H")
2533
SInt16 = Type("SInt16", "h")
2634
UInt32 = Type("UInt32", "l")
2735
SInt32 = 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
3042
ConstStr255Param = OpaqueArrayType("Str255", "PyMac_BuildStr255", "PyMac_GetStr255")
3143
Str255 = OpaqueArrayType("Str255", "PyMac_BuildStr255", "PyMac_GetStr255")
44+
StringPtr = OpaqueByValueType("StringPtr", "PyMac_BuildStr255", "BUG")
3245

3346
# File System Specifications
3447
FSSpec_ptr = OpaqueType("FSSpec", "PyMac_BuildFSSpec", "PyMac_GetFSSpec")
@@ -39,6 +52,7 @@ def OSTypeType(typename):
3952
return OpaqueByValueType(typename, "PyMac_BuildOSType", "PyMac_GetOSType")
4053
OSType = OSTypeType("OSType")
4154
ResType = OSTypeType("ResType")
55+
FourCharCode = OSTypeType("FourCharCode")
4256

4357
# Version numbers
4458
NumVersion = OpaqueByValueType("NumVersion", "PyMac_BuildNumVersion", "BUG")
@@ -56,6 +70,7 @@ def OSTypeType(typename):
5670
DialogPtr = OpaqueByValueType("DialogPtr", "DlgObj")
5771
DialogRef = DialogPtr
5872
ExistingWindowPtr = OpaqueByValueType("WindowPtr", "WinObj_WhichWindow", "BUG")
73+
# XXX This is incorrect: it returns a Window, not a Dialog!
5974
ExistingDialogPtr = OpaqueByValueType("DialogPtr", "WinObj_WhichWindow", "BUG")
6075

6176
# NULL pointer passed in as optional storage -- not present in Python version

0 commit comments

Comments
 (0)