/* Copyright 1992 by Adobe Systems, Inc. All rights reserved. */ #ifndef __PITypes__ #define __PITypes__ /* Here are the type definitions used in the interface files. */ /******************************************************************************/ // Set up the preprocessor flags to indicate the target platform. #ifdef macintosh #define Macintosh 1 #endif #ifdef THINK_C #define Macintosh 1 #endif #ifdef __MWERKS__ #define Macintosh 1 #endif #ifdef MSDOS #define MSWindows 1 #endif #ifndef Macintosh #define Macintosh 0 #endif #ifndef MSWindows #define MSWindows 0 #endif /******************************************************************************/ #if Macintosh #ifndef __PSWorld__ #include #include #include #include #include #include #include #include #include #include #endif #ifndef TRUE #define TRUE true #endif #ifndef FALSE #define FALSE false #endif #ifndef MACPASCAL #define MACPASCAL pascal #endif #ifndef WINPASCAL #define WINPASCAL #endif #if 0 #ifndef far #define far #endif #endif #ifndef huge #define huge #endif #ifndef __cplusplus #define const #endif #pragma options align=mac68k #ifndef __PSWorld__ typedef signed long int32; typedef signed short int16; typedef unsigned long unsigned32; typedef unsigned short unsigned16; typedef unsigned char unsigned8; typedef unsigned8 LookUpTable [256]; typedef struct { LookUpTable R; LookUpTable G; LookUpTable B; } RGBLookUpTable; #endif typedef struct PlatformData { short dummy; /* dummy variable required for some compilers. */ } PlatformData; #pragma options align=reset #endif /* Macintosh */ /******************************************************************************/ #if MSWindows #define MACPASCAL #define WINPASCAL pascal #ifndef __PSWorld__ #include /* Error codes. */ #define memFullErr -108 #define userCanceledErr 1 #define noErr 0 #define writErr -20 #define openErr -23 #define ioErr -36 #define nil NULL #define true TRUE #define false FALSE #ifndef __cplusplus #define const #endif typedef signed long int32; typedef signed short int16; typedef unsigned long unsigned32; typedef unsigned short unsigned16; typedef unsigned char unsigned8; typedef long Fixed; typedef long Fract; typedef long (*ProcPtr)(); typedef struct { short v; short h; } Point; typedef struct { short top; short left; short bottom; short right; } Rect; typedef struct { WORD red; /* Magnitude of red component, 16 bit significant.*/ WORD green; /* Magnitude of green component, 16 bit significant.*/ WORD blue; /* Magnitude of blue component, 16 bit significant.*/ } RGBColor; typedef LPSTR Ptr; typedef LPSTR *Handle; typedef BYTE Boolean; typedef DWORD OSType; typedef short OSErr; typedef unsigned long ResType; typedef unsigned char Str255[256]; /* first byte length of string. The string is zero terminated. */ typedef unsigned8 LookUpTable [256]; typedef struct { LookUpTable R; LookUpTable G; LookUpTable B; } RGBLookUpTable; typedef struct { short vRefNum; long parID; Str255 name; /* Pascal String, for Windows files. */ } FSSpec; #endif typedef struct PlatformData { unsigned short hwnd; /* window to own dialogs. */ } PlatformData; #endif /* Windows */ /******************************************************************************/ #ifndef __PSWorld__ #pragma options align=mac68k typedef Rect CRect; typedef struct { int32 top; int32 left; int32 bottom; int32 right; } VRect; #if Macintosh typedef char TVolumeName [32]; #else typedef char TVolumeName [256]; #endif #pragma options align=reset #endif /******************************************************************************/ #endif