Mac OS 9
MacTypes.h File Reference

Basic Macintosh data types. More...

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 FixedFixedPtr
 
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 StringPtrStringHandle
 
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 PointPointPtr
 
typedef struct Rect Rect
 
typedef RectRectPtr
 
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 NumVersionVariantNumVersionVariantPtr
 
typedef NumVersionVariantPtrNumVersionVariantHandle
 
typedef struct VersRec VersRec
 
typedef VersRecVersRecPtr
 
typedef VersRecPtrVersRecHndl
 
typedef UInt8 Byte
 
typedef SInt8 SignedByte
 
typedef wideWidePtr
 
typedef UnsignedWideUnsignedWidePtr
 
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
 

Detailed Description

Basic Macintosh data types.

Introduced In: Mac OS 9
Avaliable From: Universal Interfaces 3.4.1
Copyright: © 1985-2001 by Apple Computer, Inc., all rights reserved.

For bug reports, consult the following page on the World Wide Web:

http://developer.apple.com/bugreporter/

Macro Definition Documentation

◆ NULL

#define NULL   0L

in case int is 16-bits, make sure NULL is 32-bits

◆ StrLength

#define StrLength (   string)    (*(unsigned char *)(string))

TARGET_OS_MAC

Typedef Documentation

◆ Boolean

typedef unsigned char Boolean

!TYPE_BOOL

◆ Fixed

typedef long Fixed

TYPE_LONGLONG

◆ ProcHandle

typedef ProcPtr* ProcHandle

TARGET_OS_MAC && TARGET_RT_MAC_CFM

◆ SInt64

typedef wide SInt64

TARGET_RT_BIG_ENDIAN

◆ Str32Field

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.

◆ StrFileName

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.

◆ StringPtr

typedef unsigned char* StringPtr

TARGET_OS_MAC

Enumeration Type Documentation

◆ anonymous enum

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.

◆ anonymous enum

anonymous enum

TARGET_RT_BIG_ENDIAN

Enumerator
developStage 

Version Release Stage Codes

Variable Documentation

◆ debugger

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.
Returns
none
Note
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 

◆ thing

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.
Returns
none
Note
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