|
Mac OS 9
|
Basic Macintosh data types. More...
#include <ConditionalMacros.h>Go to the source code of this file.
Data Structures | |
| struct | wide |
| struct | UnsignedWide |
| struct | Float80 |
| struct | Float96 |
| struct | Float32Point |
| struct | Point |
| struct | Rect |
| struct | FixedPoint |
| struct | FixedRect |
| struct | TimeRecord |
| struct | NumVersion |
| union | NumVersionVariant |
| struct | VersRec |
Macros | |
| #define | NULL 0L |
| #define | nil NULL |
| #define | kInvalidID 0 |
| #define | StrLength(string) (*(unsigned char *)(string)) |
Typedefs | |
| typedef unsigned char | UInt8 |
| typedef signed char | SInt8 |
| typedef unsigned short | UInt16 |
| typedef signed short | SInt16 |
| typedef unsigned long | UInt32 |
| typedef signed long | SInt32 |
| typedef struct wide | wide |
| typedef struct UnsignedWide | UnsignedWide |
| typedef wide | SInt64 |
| typedef UnsignedWide | UInt64 |
| typedef long | Fixed |
| typedef Fixed * | FixedPtr |
| typedef long | Fract |
| typedef Fract * | FractPtr |
| typedef unsigned long | UnsignedFixed |
| typedef UnsignedFixed * | UnsignedFixedPtr |
| typedef short | ShortFixed |
| typedef ShortFixed * | ShortFixedPtr |
| typedef float | Float32 |
| typedef double | Float64 |
| typedef struct Float80 | Float80 |
| typedef struct Float96 | Float96 |
| typedef struct Float32Point | Float32Point |
| typedef char * | Ptr |
| typedef Ptr * | Handle |
| typedef long | Size |
| typedef SInt16 | OSErr |
| typedef SInt32 | OSStatus |
| typedef void * | LogicalAddress |
| typedef const void * | ConstLogicalAddress |
| typedef void * | PhysicalAddress |
| typedef UInt8 * | BytePtr |
| typedef UInt32 | ByteCount |
| typedef UInt32 | ByteOffset |
| typedef SInt32 | Duration |
| typedef UnsignedWide | AbsoluteTime |
| typedef UInt32 | OptionBits |
| typedef UInt32 | ItemCount |
| typedef UInt32 | PBVersion |
| typedef SInt16 | ScriptCode |
| typedef SInt16 | LangCode |
| typedef SInt16 | RegionCode |
| typedef unsigned long | FourCharCode |
| typedef FourCharCode | OSType |
| typedef FourCharCode | ResType |
| typedef OSType * | OSTypePtr |
| typedef ResType * | ResTypePtr |
| typedef unsigned char | Boolean |
| typedef ProcPtr | UniversalProcPtr |
| typedef ProcPtr * | ProcHandle |
| typedef UniversalProcPtr * | UniversalProcHandle |
| typedef UInt32 | UnicodeScalarValue |
| typedef UInt32 | UTF32Char |
| typedef UInt16 | UniChar |
| typedef UInt16 | UTF16Char |
| typedef UInt8 | UTF8Char |
| typedef UniChar * | UniCharPtr |
| typedef UInt32 | UniCharCount |
| typedef UniCharCount * | UniCharCountPtr |
| typedef unsigned char | Str255[256] |
| typedef unsigned char | Str63[64] |
| typedef unsigned char | Str32[33] |
| typedef unsigned char | Str31[32] |
| typedef unsigned char | Str27[28] |
| typedef unsigned char | Str15[16] |
| typedef unsigned char | Str32Field[34] |
| typedef Str255 | StrFileName |
| typedef unsigned char * | StringPtr |
| typedef StringPtr * | StringHandle |
| typedef const unsigned char * | ConstStringPtr |
| typedef const unsigned char * | ConstStr255Param |
| typedef const unsigned char * | ConstStr63Param |
| typedef const unsigned char * | ConstStr32Param |
| typedef const unsigned char * | ConstStr31Param |
| typedef const unsigned char * | ConstStr27Param |
| typedef const unsigned char * | ConstStr15Param |
| typedef ConstStr255Param | ConstStrFileNameParam |
| typedef struct Point | Point |
| typedef Point * | PointPtr |
| typedef struct Rect | Rect |
| typedef Rect * | RectPtr |
| typedef struct FixedPoint | FixedPoint |
| typedef struct FixedRect | FixedRect |
| typedef short | CharParameter |
| typedef unsigned char | Style |
| typedef short | StyleParameter |
| typedef Style | StyleField |
| typedef long | TimeValue |
| typedef long | TimeScale |
| typedef wide | CompTimeValue |
| typedef SInt64 | TimeValue64 |
| typedef struct TimeBaseRecord * | TimeBase |
| typedef struct TimeRecord | TimeRecord |
| typedef struct NumVersion | NumVersion |
| typedef union NumVersionVariant | NumVersionVariant |
| typedef NumVersionVariant * | NumVersionVariantPtr |
| typedef NumVersionVariantPtr * | NumVersionVariantHandle |
| typedef struct VersRec | VersRec |
| typedef VersRec * | VersRecPtr |
| typedef VersRecPtr * | VersRecHndl |
| typedef UInt8 | Byte |
| typedef SInt8 | SignedByte |
| typedef wide * | WidePtr |
| typedef UnsignedWide * | UnsignedWidePtr |
| typedef Float80 | extended80 |
| typedef Float96 | extended96 |
| typedef SInt8 | VHSelect |
Enumerations | |
| enum | { false = 0 , true = 1 } |
| enum | { noErr = 0 } |
| enum | { kNilOptions = 0 } |
| enum | { kVariableLengthArray = 1 } |
| enum | { kUnknownType } |
| enum | { normal = 0 , bold = 1 , italic = 2 , underline = 4 , outline = 8 , shadow = 0x10 , condense = 0x20 , extend = 0x40 } |
| enum | { developStage = 0x20 , alphaStage = 0x40 , betaStage = 0x60 , finalStage = 0x80 } |
Functions | |
| typedef | CALLBACK_API_C (long, ProcPtr)() |
| typedef | CALLBACK_API (void, Register68kProcPtr)() |
Variables | |
| The DebugStr function does the same | thing |
| Invoke the debugging program. More... | |
| The DebugStr function does the same but passes a string to the debugger(which then displays the message) .Remember that Debugger will crash the system with an ID 12 System Error if no debugger is installed when it is invoked.This is the real reason why not to ship with debug traps in your code - most end users do not have debuggers installed.</pre > *@par Copyright The Debugger function also activates the | debugger |
| Invoke the debugging program; pass string to display. More... | |
| feature You can issue Macsbug commands from inside your program by embedding the commands in a pascal | string |
| feature You can issue Macsbug commands from inside your program by embedding the commands in a pascal prefixing each command with | the |
| character For | example |
| hs | |
| g | |
| Would toggle heap scrambling You can use this for any Macsbug command such as logging | files |
| Would toggle heap scrambling You can use this for any Macsbug command such as logging toggling heap scrambling and doing heap displays during execution of your program for later review</pre > *par | Copyright |
Basic Macintosh data types.
For bug reports, consult the following page on the World Wide Web:
http://developer.apple.com/bugreporter/
| #define NULL 0L |
in case int is 16-bits, make sure NULL is 32-bits
| #define StrLength | ( | string | ) | (*(unsigned char *)(string)) |
TARGET_OS_MAC
| typedef unsigned char Boolean |
!TYPE_BOOL
| typedef long Fixed |
TYPE_LONGLONG
| typedef ProcPtr* ProcHandle |
TARGET_OS_MAC && TARGET_RT_MAC_CFM
| typedef unsigned char Str32Field[34] |
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.
| typedef Str255 StrFileName |
QuickTime 3.0: The type StrFileName is used to make MacOS structs work cross-platform. For example FSSpec or SFReply previously contained a Str63 field. They now contain a StrFileName field which is the same when targeting the MacOS but is a 256 char buffer for Win32 and unix, allowing them to contain long file names.
| typedef unsigned char* StringPtr |
TARGET_OS_MAC
| anonymous enum |
The identifiers "true" and "false" are becoming keywords in C++ and work with the new built-in type "bool" "Boolean" will remain an unsigned char for compatibility with source code written before "bool" existed.
| The DebugStr function does the same but passes a string to the debugger (which then displays the message) .Remember that Debugger will crash the system with an ID 12 System Error if no debugger is installed when it is invoked.This is the real reason why not to ship with debug traps in your code - most end users do not have debuggers installed.</ pre> * @par Copyright The Debugger function also activates the debugger |
Invoke the debugging program; pass string to display.
DebugStr can be inserted at any point in your program to break into the debugger, passing the address of a string to be displayed.
none
Be sure to remove this function before shipping your application! A typical setup for C programmers is to use the preprocessor: #define DEBUGGING TRUE /* in header file
| The DebugStr function does the same thing |
Invoke the debugging program.
Debugger can be inserted at any point in your program to break into the debugger.
none
Be sure to remove this function before shipping your application! A typical setup for C programmers is to use the preprocessor: #define DEBUGGING TRUE /* in header file