Max 5 API Reference
00001 #ifndef __EXT_TYPES_H__ 00002 #define __EXT_TYPES_H__ 00003 00004 // These definitions are required by ext_qtimage.h on Windows. 00005 00006 /* 00007 #ifdef MAC_VERSION 00008 #ifdef __MOTO__ 00009 #include <Types.h> 00010 #include <Quickdraw.h> 00011 #endif // __MOTO__ 00012 #endif // MAC_VERSION 00013 */ 00014 00015 #ifdef WIN_VERSION 00016 00017 #ifdef INCLUDE_APPLE_HEADERS 00018 #include <MacTypes.h> 00019 #include <Quickdraw.h> 00020 #include <Controls.h> 00021 #else 00022 #ifndef FOUR_CHAR_CODE 00023 #define FOUR_CHAR_CODE(x) (x) 00024 #endif 00025 00026 #if C74_PRAGMA_STRUCT_PACKPUSH 00027 #pragma pack(push, 2) 00028 #elif C74_PRAGMA_STRUCT_PACK 00029 #pragma pack(2) 00030 #endif 00031 00032 00033 #ifndef nil 00034 #define nil NULL 00035 #endif 00036 00037 #ifndef __cplusplus 00038 enum { 00039 false = 0, 00040 true = 1 00041 }; 00042 #endif 00043 00044 00045 typedef unsigned char UInt8; 00046 typedef signed char SInt8; 00047 typedef unsigned short UInt16; 00048 typedef signed short SInt16; 00049 typedef unsigned long UInt32; 00050 typedef signed long SInt32; 00051 00052 typedef long Fixed; 00053 typedef Fixed * FixedPtr; 00054 typedef long Fract; 00055 typedef Fract * FractPtr; 00056 typedef unsigned long UnsignedFixed; 00057 typedef UnsignedFixed * UnsignedFixedPtr; 00058 typedef short ShortFixed; 00059 typedef ShortFixed * ShortFixedPtr; 00060 00061 typedef char * Ptr; 00062 typedef Ptr * Handle; 00063 typedef long Size; 00064 00065 typedef SInt16 OSErr; 00066 typedef SInt32 OSStatus; 00067 typedef UInt8 * BytePtr; 00068 typedef unsigned long FourCharCode; 00069 typedef FourCharCode OSType; 00070 typedef FourCharCode ResType; 00071 typedef OSType * OSTypePtr; 00072 typedef ResType * ResTypePtr; 00073 00074 typedef unsigned char Boolean; 00075 00076 typedef long ProcPtr(); 00077 00078 enum { 00079 noErr = 0 00080 }; 00081 00082 typedef unsigned char Str255[256]; 00083 typedef unsigned char Str63[64]; 00084 typedef unsigned char Str32[33]; 00085 typedef unsigned char Str31[32]; 00086 typedef unsigned char Str27[28]; 00087 typedef unsigned char Str15[16]; 00088 00089 struct Point { 00090 short v; 00091 short h; 00092 }; 00093 typedef struct Point Point; 00094 typedef Point * PointPtr; 00095 struct Rect { 00096 short top; 00097 short left; 00098 short bottom; 00099 short right; 00100 }; 00101 typedef struct Rect Rect; 00102 typedef Rect * RectPtr; 00103 struct FixedPoint { 00104 Fixed x; 00105 Fixed y; 00106 }; 00107 typedef struct FixedPoint FixedPoint; 00108 struct FixedRect { 00109 Fixed left; 00110 Fixed top; 00111 Fixed right; 00112 Fixed bottom; 00113 }; 00114 typedef struct FixedRect FixedRect; 00115 00116 typedef UInt8 Byte; 00117 typedef SInt8 SignedByte; 00118 00119 // Quickdraw Placeholders 00120 typedef struct GrafPort WindowRecord; 00121 typedef struct GrafPort* WindowPtr; 00122 typedef WindowPtr DialogPtr; 00123 typedef WindowRecord * WindowPeek; 00124 00125 struct GrafPort { 00126 long opaque; 00127 }; 00128 typedef struct GrafPort GrafPort; 00129 typedef struct GrafPort* GrafPtr; 00130 00131 struct CGrafPort { 00132 long opaque; 00133 }; 00134 typedef struct CGrafPort CGrafPort; 00135 typedef struct CGrafPort* CGrafPtr; 00136 00137 struct PixMap { 00138 long opaque; 00139 }; 00140 typedef struct PixMap PixMap; 00141 typedef struct PixMap* PixMapPtr; 00142 typedef struct PixMap** PixMapHandle; 00143 00144 struct BitMap { 00145 long opaque; 00146 }; 00147 typedef struct BitMap BitMap; 00148 typedef struct BitMap* BitMapPtr; 00149 00150 struct MacRegion { 00151 long opaque; 00152 }; 00153 typedef struct MacRegion MacRegion; 00154 typedef struct MacRegion* RgnPtr; 00155 typedef RgnPtr * RgnHandle; 00156 00157 struct RGBColor { 00158 unsigned short red; 00159 unsigned short green; 00160 unsigned short blue; 00161 }; 00162 typedef struct RGBColor RGBColor; 00163 typedef RGBColor * RGBColorPtr; 00164 00165 struct GWorld { 00166 long opaque; 00167 }; 00168 typedef struct GWorld GWorld; 00169 typedef struct GWorld * GWorldPtr; 00170 00171 00172 // Control Placeholders 00173 struct ControlRecord { 00174 long opaque; 00175 }; 00176 typedef struct ControlRecord ControlRecord; 00177 typedef ControlRecord * ControlPtr; 00178 typedef ControlPtr * ControlRef; 00179 typedef ControlRef ControlHandle; 00180 00181 // File placeholders 00182 struct FSSpec { 00183 long opaque; 00184 }; 00185 typedef struct FSSpec FSSpec; 00186 typedef FSSpec * FSSpecPtr; 00187 00188 #if C74_PRAGMA_STRUCT_PACKPUSH 00189 #pragma pack(pop) 00190 #elif C74_PRAGMA_STRUCT_PACK 00191 #pragma pack() 00192 #endif 00193 00194 00195 #endif // INCLUDE_APPLE_HEADERS 00196 00197 #endif // WIN_VERSION 00198 00199 #endif // __EXT_TYPES_H__
Copyright © 2008, Cycling '74