00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00023 #ifndef __PITypes__
00024 #define __PITypes__
00025
00026 #pragma once
00027
00028 #include "SPTypes.h"
00029
00030
00031
00032
00033
00034 #ifndef MSWindows
00035 #define MSWindows (MSDOS || WIN32)
00036 #endif
00037
00038 #if defined(__APPLE_CC__)
00039 #define Macintosh 1
00040 #endif
00041
00042 #ifndef Macintosh
00043 #if (defined(macintosh) || defined(__MC68K__) || defined(__MACH__) || defined (__POWERPC__) || defined(THINK_C)) && !MSWindows
00044 #define Macintosh 1
00045 #else
00046 #define Macintosh 0
00047 #endif
00048 #endif
00049
00050 #ifndef MacintoshOS
00051 #define MacintoshOS (Macintosh)
00052 #endif
00053
00054 #ifndef Macintosh68K
00055 #define Macintosh68K (MacintoshOS && m68k)
00056 #endif
00057
00058 #ifndef MacintoshPPC
00059 #define MacintoshPPC (MacintoshOS && defined(__POWERPC__)) // DRSWAT
00060 #endif
00061
00062 #if defined (__BORLANDC__)
00063 #pragma option -a-
00064 #endif
00065
00066
00067
00068
00069
00070 #ifdef MAC_ENV
00071 #undef MAC_ENV
00072 #endif
00073
00074 #ifdef WIN_ENV
00075 #undef WIN_ENV
00076 #endif
00077
00078 #if Macintosh
00079 #define MAC_ENV 1
00080 #endif
00081
00082 #if MSWindows
00083 #define WIN_ENV 1
00084 #if WIN32
00085 #define WINNT_ENV 1
00086 #endif
00087 #endif
00088
00089
00090
00091
00092
00093 #ifndef START_C_INCLUDE
00094 #ifdef __cplusplus
00095 #define START_C_INCLUDE extern "C" {
00096 #define END_C_INCLUDE }
00097 #else
00098 #define START_C_INCLUDE
00099 #define END_C_INCLUDE
00100 #endif
00101 #endif
00102
00103 #ifndef START_C_CODE
00104 #ifdef __cplusplus
00105 #define START_C_CODE extern "C" {
00106 #define END_C_CODE }
00107 #else
00108 #define START_C_CODE
00109 #define END_C_CODE
00110 #endif
00111 #endif
00112
00113
00114
00115 #if Macintosh
00116
00117 #ifndef __PSWorld__
00118 #include <CoreServices/CoreServices.h>
00119 #include <ApplicationServices/ApplicationServices.h>
00120 #endif
00121
00122 #ifndef TRUE
00123 #define TRUE true
00124 #endif
00125
00126 #ifndef FALSE
00127 #define FALSE false
00128 #endif
00129
00130 #ifndef MACPASCAL
00131 #define MACPASCAL pascal
00132 #endif
00133
00134 #ifndef __MWERKS__
00135 #ifndef far
00136 #define far
00137 #endif
00138 #endif
00139
00140 #ifndef huge
00141 #define huge
00142 #endif
00143
00144 #ifndef __PSWorld__
00145
00146 #include "PSIntTypes.h"
00147
00148 #ifndef PSHALFFLOAT
00149 #define PSHALFFLOAT 1
00150 typedef uint16 PSHalfFloat;
00151 #endif
00152
00153 #ifndef OTHER_AGM_BASIC_H
00154 #define OTHER_AGM_BASIC_H "PITypes.h"
00155 #endif
00156
00157 #endif
00158
00159 typedef struct PlatformData {
00160
00161 int16 dummy;
00162
00163 } PlatformData;
00164
00165 #endif
00166
00167
00168
00169
00170
00171 #ifndef nativeFloat // DRSWAT - get rid of redefined warning in GCC
00172 #define nativeFloat real64
00173 #endif
00174
00175
00176
00177 #if MSWindows
00178
00179 #define MACPASCAL
00180
00181 #ifndef __PSWorld__
00182 #if defined(WINVER)
00183 #undef WINVER
00184 #endif
00185 #define WINVER 0x500
00186 #include <windows.h>
00187
00188
00189 #define noErr 0
00190
00191 #define userCanceledErr (-128)
00192 #define coercedParamErr 2
00193
00194 #define readErr (-19)
00195 #define writErr (-20)
00196 #define openErr (-23)
00197 #define dskFulErr (-34)
00198 #define ioErr (-36)
00199 #define eofErr (-39) // Also - end of descriptor error.
00200 #define fnfErr (-43)
00201 #define vLckdErr (-46)
00202 #define fLckdErr (-45)
00203 #define paramErr (-50)
00204 #define memFullErr (-108)
00205 #define nilHandleErr (-109)
00206 #define memWZErr (-111)
00207
00208
00209 #define nil NULL
00210
00211 #ifndef TRUE
00212 #define TRUE 1
00213 #endif
00214
00215 #ifndef FALSE
00216 #define FALSE 0
00217 #endif
00218
00219 #ifndef true
00220 #define true TRUE
00221 #endif
00222
00223 #ifndef false
00224 #define false FALSE
00225 #endif
00226
00227 #include "PSIntTypes.h"
00228
00229 typedef int32 Fixed;
00230 typedef int32 Fract;
00231 typedef int32 (*ProcPtr)();
00232
00233 #ifndef __TYPES__
00234 #ifndef __GEOMETRY__
00235 typedef struct Point
00236 {
00237 int16 v;
00238 int16 h;
00239 } Point;
00240
00241 typedef struct Rect
00242 {
00243 int16 top;
00244 int16 left;
00245 int16 bottom;
00246 int16 right;
00247 } Rect;
00248 #endif
00249 #endif
00250
00251 #ifndef __QUICKDRAW__
00252 typedef struct
00253 {
00254 WORD red;
00255 WORD green;
00256 WORD blue;
00257 } RGBColor;
00258 #endif
00259
00260 #ifndef __OCE__
00261 typedef uint32 DescType;
00262 #endif
00263
00264 typedef LPSTR Ptr;
00265 typedef LPSTR *Handle;
00266 typedef BYTE Boolean;
00267 typedef uint32 OSType;
00268 typedef int16 OSErr;
00269 typedef uint32 ResType;
00270
00271 typedef unsigned char Str255[256];
00272 typedef const unsigned char *ConstStr255Param;
00273
00274
00275
00276
00277
00278
00279
00280 #ifndef _FSSPEC_
00281 #define _FSSPEC_ 1
00282
00283 typedef struct
00284 {
00285 int16 vRefNum;
00286 int16 padding;
00287 int32 parID;
00288 Str255 name;
00289 } FSSpec;
00290
00291 #endif
00292 #endif //_FSSPEC_
00293
00294 typedef struct PlatformData {
00295
00296 intptr_t hwnd;
00297
00298 } PlatformData;
00299
00300 int16 ShowAlert (int16 stringID);
00301
00302 #endif
00303
00304
00305
00306
00307 typedef uint16 Character;
00308
00309
00310
00311
00312
00313
00314 typedef unsigned8 PILookUpTable [256];
00315
00316 #ifndef __PSWorld__
00317
00318 #ifndef __PSWorldEnums__
00319
00320
00321
00322 typedef PILookUpTable LookUpTable;
00323
00324 typedef unsigned16 LookUpTable8x16 [256];
00325
00327 typedef struct
00328 {
00329 LookUpTable R;
00330 LookUpTable G;
00331 LookUpTable B;
00332 } RGBLookUpTable;
00333
00335 typedef struct
00336 {
00337 RGBLookUpTable clut;
00338 int32 count;
00339 int32 transparentIndex;
00340 } ColorTableInfo;
00341
00342 #endif // __PSWorldEnums__
00343
00344
00345
00346 #ifndef __GEOMETRY__
00347
00348 #ifndef USING_MFC
00349
00350 typedef Rect CRect;
00351
00352 #endif
00353
00354 #endif
00355
00356 #ifndef __UGEOMETRY__
00357
00358 typedef struct
00359 {
00360 int32 top;
00361 int32 left;
00362 int32 bottom;
00363 int32 right;
00364 } VRect;
00365
00367 typedef struct VPoint
00368 {
00369 int32 v;
00370 int32 h;
00371 } VPoint;
00372
00373 #endif
00374
00375 #ifndef __UMath__
00376
00378 typedef struct FloatPoint
00379 {
00380 nativeFloat y, x;
00381 } FloatPoint;
00382
00384 typedef struct FloatRect
00385 {
00386 nativeFloat top, left, bottom, right;
00387 } FloatRect;
00388
00389 #endif
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401 enum DisplayByteOrder {
00402 displayOrderIndexed = 0,
00403 displayOrderURGB = 1,
00404 displayOrderUBGR = 2,
00405 displayOrderRGBU = 3,
00406 displayOrderBGRU = 4,
00407 displayOrderRGBPacked = 5,
00408 displayOrderBGRPacked = 6
00409 };
00410
00411 #endif
00412
00413
00414
00416 typedef struct
00417 {
00418 unsigned8 c;
00419 unsigned8 m;
00420 unsigned8 y;
00421 unsigned8 k;
00422 } CMYKtuple;
00423
00425 typedef struct
00426 {
00427 unsigned8 alpha;
00428 unsigned8 r;
00429 unsigned8 g;
00430 unsigned8 b;
00431 } RGBtuple;
00432
00434 typedef struct
00435 {
00436 unsigned8 alpha;
00437 unsigned8 h;
00438 unsigned8 s;
00439 unsigned8 l;
00440 } HSLtuple;
00441
00443 typedef struct
00444 {
00445 unsigned8 alpha;
00446 unsigned8 h;
00447 unsigned8 s;
00448 unsigned8 b;
00449 } HSBtuple;
00450
00452 typedef struct
00453 {
00454 unsigned8 alpha;
00455 unsigned8 L;
00456 unsigned8 a;
00457 unsigned8 b;
00458 } LABtuple;
00459
00461 typedef struct
00462 {
00463 unsigned16 alpha;
00464 unsigned16 r;
00465 unsigned16 g;
00466 unsigned16 b;
00467 } RGB16tuple;
00468
00470 typedef struct
00471 {
00472 unsigned16 c;
00473 unsigned16 m;
00474 unsigned16 y;
00475 unsigned16 k;
00476 } CMYK16tuple;
00477
00479 typedef struct
00480 {
00481 unsigned16 alpha;
00482 unsigned16 L;
00483 unsigned16 a;
00484 unsigned16 b;
00485 } LAB16tuple;
00486
00488 typedef struct
00489 {
00490 unsigned8 alpha;
00491 unsigned8 padding;
00492 unsigned16 X;
00493 unsigned16 Y;
00494 unsigned16 Z;
00495 } XYZ16tuple;
00496
00497 typedef unsigned8 inverseCLUT [32][32][32];
00498 typedef unsigned32 histogram3 [][32][32];
00499
00500 typedef int16 HueSatTable [1536];
00501 typedef PILookUpTable HueSatMaps[4];
00502
00503
00504 #ifndef __UMonitor__
00505 typedef int16 Short3by3 [3] [3];
00506 #endif
00507
00509 typedef struct PIFloatPoint
00510 {
00511 real64 y;
00512 real64 x;
00513 } PIFloatPoint;
00514
00516 typedef struct PIFloatRect
00517 {
00518 real64 top;
00519 real64 left;
00520 real64 bottom;
00521 real64 right;
00522 } PIFloatRect;
00523
00524
00525
00526
00527
00528
00529
00530
00531
00532
00533
00543 typedef struct PIAffineMatrix
00544 {
00545 real64 xx, xy, yx, yy, tx, ty;
00546 } PIAffineMatrix;
00547
00548
00549
00550 #if defined (__BORLANDC__)
00551 #pragma option -a.
00552 #endif
00553
00554
00555 #endif