Crate MacTypes_sys

source ·
Expand description

The MacTypes-sys library provides bindings to the MacTypes.h header on MacOS. This library defines base types used in both Carbon and legacy Cocoa APIs.

Structs

80 bit MacOS float: 1 sign bit, 15 exponent bits, 1 integer bit, 63 fraction bits.
96 bit 68881 float: 1 sign bit, 15 exponent bits, 16 pad bits, 1 integer bit, 63 fraction bits.
Packed BCD version representation (e.g. “4.2.1a3” is 0x04214003).
2D Quickdraw coordinate, range: -32K to +32K.
Type for unique process identifier.
Rectangular Quickdraw area.
Package of TimeBase, duration, and scale.
Contents of a vers resource.

Constants

Version Release Stage Code.
Version Release Stage Code.
Version Release Stage Code.
Version Release Stage Code.
KernelID: NULL is for pointers as kInvalidID is for ID’s
OptionBits: all flags false
OSErr: function performed properly - no error.
“????” QuickTime 3.0: default unknown ResType or OSType
Array bounds: variable length array

Functions

Get the length of a pascal string.

Type Definitions

64-bit clock.
Mac OS historic type, sizeof(Boolean)==1.
The size of an array of bytes.
An offset into an array of bytes.
Pointer to an array of bytes.
Char when used as a parameter (historical 68K convention).
64-bit count of units (always a struct).
Address in the clients virtual address space that will only be read.
For function parameters only - means string is const.
For function parameters only - means string is const.
For function parameters only - means string is const.
For function parameters only - means string is const.
For function parameters only - means string is const.
For function parameters only - means string is const.
Pointer to a read-only pascal string.
32-bit millisecond timer for drivers.
16-bit signed integer plus 16-bit fraction.
A pointer to a Fixed.
32 bit IEEE float: 1 sign bit, 8 exponent bits, 23 fraction bits.
64 bit IEEE float: 1 sign bit, 11 exponent bits, 52 fraction bits.
A 32-bit value made by packing four 1 byte characters together.
2-bit signed integer plus 30-bit fraction.
A pointer to a Fract.
Pointer to a master pointer to a relocatable block.
32-bit iteration count.
A particular language (e.g. English), as represented using a particular ScriptCode.
Address in the clients virtual address space.
16-bit result error code.
32-bit result error code.
A FourCharCode used in the OS and file system (e.g. creator).
A pointer to an OSType.
Standard 32-bit set of bit flags.
RefCon Types
Real address as used on the hardware bus.
Pointer to a ProcPtr.
Generic pointer to a function.
Pointer to a non-relocatable block.
Designates a language as used in a particular region (e.g. British vs American English) together with other region-dependent characteristics (e.g. date format).
Pointer to a 68K function that expects parameters in registers.
A FourCharCode used to tag resources (e.g. DLOG).
A pointer to a ResType.
8-bit signed integer.
16-bit signed integer.
32-bit signed integer.
64-bit signed integer.
RefCon Types
A particular set of written characters (e.g. Roman vs Cyrillic) and their encoding.
8-bit signed integer plus 8-bit fraction.
A pointer to a ShortFixed.
Pascal string holding up to 15 bytes
Pascal string holding up to 27 bytes
Pascal string holding up to 31 bytes
The type Str32 is used in many AppleTalk based data structures. It holds up to 32 one byte chars. The problem is that with the length byte it is 33 bytes long. This can cause weird alignment problems in structures. To fix this the type Str32Field has been created. It should only be used to hold 32 chars, but it is 34 bytes long so that there are no alignment problems.
Pascal string holding up to 63 bytes
Pascal string holding up to 255 bytes
QuickTime 3.0:
Pointer to a StringPtr.
Pointer to a pascal string.
Quickdraw font rendering styles.
Style when used as a field (historical 68K convention).
Style when used as a parameter (historical 68K convention).
An opaque reference to a time base.
Units per second.
Count of units.
64-bit count of units (long long or struct).
8-bit unsigned integer.
16-bit unsigned integer.
32-bit unsigned integer.
64-bit unsigned integer.
RefCon Types
An 8-bit code value in UTF-8 format. UnicodeScalarValues 0-0x7F are expressed in UTF-8 format using one UTF8Char with the same value. UnicodeScalarValues above 0x7F are expressed in UTF-8 format using 2-4 UTF8Chars, all with values in the range 0x80-0xF4 (UnicodeScalarValues 0x100-0xFFFF use two or three UTF8Chars, UnicodeScalarValues 0x10000-0x10FFFF use four UTF8Chars).
A 16-bit Unicode code value in the default UTF-16 format. UnicodeScalarValues 0-0xFFFF are expressed in UTF-16 format using a single UTF16Char with the same value. UnicodeScalarValues 0x10000-0x10FFFF are expressed in UTF-16 format using a pair of UTF16Chars - one in the high surrogate range (0xD800-0xDBFF) followed by one in the low surrogate range (0xDC00-0xDFFF). All of the characters defined in Unicode versions through 3.0 are in the range 0-0xFFFF and can be expressed using a single UTF16Char, thus the term “Unicode character” generally refers to a UniChar = UTF16Char.
A complete Unicode character in UTF-32 format, with values from 0 through 0x10FFFF (excluding the surrogate range 0xD800-0xDFFF and certain disallowed values).
A 16-bit Unicode code value in the default UTF-16 format. UnicodeScalarValues 0-0xFFFF are expressed in UTF-16 format using a single UTF16Char with the same value. UnicodeScalarValues 0x10000-0x10FFFF are expressed in UTF-16 format using a pair of UTF16Chars - one in the high surrogate range (0xD800-0xDBFF) followed by one in the low surrogate range (0xDC00-0xDFFF). All of the characters defined in Unicode versions through 3.0 are in the range 0-0xFFFF and can be expressed using a single UTF16Char, thus the term “Unicode character” generally refers to a UniChar = UTF16Char.
A count of UTF-16 code values in an array or buffer.
A pointer to a UniCharCount.
A pointer to an array of UniChars.
A complete Unicode character in UTF-32 format, with values from 0 through 0x10FFFF (excluding the surrogate range 0xD800-0xDFFF and certain disallowed values).
Pointer to a UniversalProcPtr.
Pointer to classic 68K code or a RoutineDescriptor.
16-bit unsigned integer plus 16-bit fraction.
A pointer to an UnsignedFixed.
Resource Handle containing a VersRec.
Pointer to a VersRecPtr.
The number of bytes in a block (signed for historical reasons).

Unions

NumVersionVariant is a wrapper so NumVersion can be accessed as a 32-bit value.