00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __ASTypes__
00023 #define __ASTypes__
00024
00025
00026
00027
00028
00029 #ifndef __ASConfig__
00030 #include "ASConfig.h"
00031 #endif
00032 #include "AIBasicTypes.h"
00033
00034 #ifdef WIN_ENV
00035 #include "AIWinDef.h"
00036 #endif
00037
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041
00042
00043
00044 #ifdef WIN_ENV
00045 #pragma pack(push, 8)
00046 #endif
00047
00048
00049
00050
00051
00052
00053
00054 #ifndef __cplusplus
00055 #ifndef true
00056 #define true 1
00057 #endif
00058
00059 #ifndef false
00060 #define false 0
00061 #endif
00062 #endif // __cplusplus
00063
00064 #ifdef TRUE
00065 #undef TRUE
00066 #endif
00067 #define TRUE true
00068
00069 #ifdef FALSE
00070 #undef FALSE
00071 #endif
00072 #define FALSE false
00073
00074
00076 #define kNoErr 0
00077
00078 #define kOutOfMemoryErr '!MEM'
00079
00080 #define kBadParameterErr 'PARM'
00081
00082 #define kNotImplementedErr '!IMP'
00083
00084 #define kCantHappenErr 'CANT'
00085
00086
00087
00088
00089 #ifndef NULL
00090
00091 #ifdef MAC_ENV
00092 #if !defined(__cplusplus) && (defined(__SC__) || defined(THINK_C))
00093 #define NULL ((void *) 0)
00094 #else
00095 #define NULL 0
00096 #endif
00097 #endif
00098
00099 #ifdef WIN_ENV
00100 #ifdef __cplusplus
00101 #define NULL 0
00102 #else
00103 #define NULL ((void *)0)
00104 #endif
00105 #endif
00106
00107 #endif
00108
00109
00110
00111
00112 #ifndef nil
00113 #define nil NULL
00114 #endif
00115
00116
00117
00118
00119 #ifndef AMPAPI
00120 #ifdef MAC_ENV
00121 #define ASAPI
00122 #endif
00123 #ifdef WIN_ENV
00124 #define ASAPI
00125 #endif
00126 #endif
00127
00128
00129
00130
00131 #define ASCAPI
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141 #ifndef _H_CoreExpT
00142
00143 typedef signed char ASInt8;
00145 typedef signed short ASInt16;
00146
00147
00148
00149
00150 #ifndef __TREAT_ASINT32_AS_INT__
00151
00152 typedef ai::int32 ASInt32;
00153 #else
00154 typedef signed int ASInt32;
00155 #endif
00156
00157 #endif
00158
00159 typedef unsigned char ASUInt8;
00161 typedef unsigned short ASUInt16;
00163 typedef ai::uint32 ASUInt32;
00164
00166 typedef ai::int32 ASErr;
00167
00168
00169
00170 typedef unsigned char ASByte;
00171 typedef ASByte* ASBytePtr;
00172
00173
00175 typedef ASUInt16 ASUnicode;
00176
00177
00179 typedef void* ASPtr;
00181 typedef void** ASHandle;
00182
00183
00185 typedef ASInt32 ASFract;
00187 typedef float ASReal;
00188
00189 #ifndef _AS_FIXED_TYPE_
00190 #define _AS_FIXED_TYPE_ 1
00191
00193 typedef ASInt32 ASFixed;
00195 typedef struct _t_ASFixedPoint {
00196 ASFixed h, v;
00197 } ASFixedPoint, *ASFixedPointP;
00198
00200 typedef struct _t_ASFixedRect {
00201 ASFixed left, top, right, bottom;
00202 } ASFixedRect, *ASFixedRectP;
00203
00205 typedef struct _t_ASFixedMatrix {
00206 ASFixed a, b, c, d, tx, ty;
00207 } ASFixedMatrix, *ASFixedMatrixP;
00208
00209 #endif
00210
00212 typedef struct _t_ASRealPoint {
00213 ASReal h, v;
00214 } ASRealPoint;
00215
00217 typedef struct _t_ASRealRect {
00218 ASReal left, top, right, bottom;
00219 } ASRealRect;
00220
00222 typedef struct _t_ASRealMatrix {
00223 ASReal a, b, c, d, tx, ty;
00224 void Init()
00225 {
00226 a = 0.0; b = 1.0;
00227 c = 1.0; d = 0.0;
00228 tx = 0.0; ty = 0.0;
00229 }
00230 } ASRealMatrix;
00231
00234 typedef struct ASAccess* ASAccessRef;
00235
00236
00237
00238
00239
00240
00241
00242
00243 #ifdef MAC_ENV
00244
00245 typedef short ASSize;
00246
00248 typedef unsigned char ASBoolean;
00249 #endif
00250
00251 #ifdef WIN_ENV
00252
00253 typedef int ASBoolean;
00254
00256 typedef ai::int32 ASSize;
00257 #endif
00258
00259
00260
00261
00262
00263
00264
00265 #if defined(MAC_ENV) && !__LP64__
00266 #pragma options align=mac68k
00267 #endif
00268
00269
00270 #ifdef MAC_ENV
00271
00273 typedef struct MacPort_t* AIPortRef;
00274
00276 typedef struct MacWindow_t* AIWindowRef;
00277
00279 typedef struct MacDialog_t* AIDialogRef;
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291 #endif
00292
00293
00294 #ifdef WIN_ENV
00295
00297 typedef HDC ASPortRef;
00298
00300 typedef HWND ASWindowRef;
00301
00303 typedef HWND ASDialogRef;
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315 #endif
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333 #if defined(MAC_ENV) && !__LP64__
00334 #pragma options align=reset
00335 #endif
00336 #ifdef WIN_ENV
00337 #pragma pack(pop)
00338 #endif
00339
00340
00341
00342
00343
00344
00345
00346 #ifdef __cplusplus
00347 }
00348 #endif
00349
00350
00351 #endif