1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
|
/*
File: QD3DErrors.h
Contains: Error API and error codes
Version: Technology: Quickdraw 3D 1.6
Release: QuickTime 7.3
Copyright: (c) 2007 (c) 1995-1998 by Apple Computer, Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
*/
#ifndef __QD3DERRORS__
#define __QD3DERRORS__
#ifndef __QD3D__
#include <QD3D.h>
#endif
#if TARGET_OS_MAC
#ifndef __MACTYPES__
#include <MacTypes.h>
#endif
#endif /* TARGET_OS_MAC */
#if PRAGMA_ONCE
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_IMPORT
#pragma import on
#endif
#if PRAGMA_STRUCT_ALIGN
#pragma options align=power
#elif PRAGMA_STRUCT_PACKPUSH
#pragma pack(push, 2)
#elif PRAGMA_STRUCT_PACK
#pragma pack(2)
#endif
#if PRAGMA_ENUM_ALWAYSINT
#if defined(__fourbyteints__) && !__fourbyteints__
#define __QD3DERRORS__RESTORE_TWOBYTEINTS
#pragma fourbyteints on
#endif
#pragma enumsalwaysint on
#elif PRAGMA_ENUM_OPTIONS
#pragma option enum=int
#elif PRAGMA_ENUM_PACK
#if __option(pack_enums)
#define __QD3DERRORS__RESTORE_PACKED_ENUMS
#pragma options(!pack_enums)
#endif
#endif
/******************************************************************************
** **
** Error Types and Codes **
** **
*****************************************************************************/
enum TQ3Error {
kQ3ErrorNone = 0, /* Fatal Errors */
kQ3ErrorInternalError = -28500,
kQ3ErrorNoRecovery = -28499,
kQ3ErrorLastFatalError = -28498, /* System Errors */
kQ3ErrorNotInitialized = -28490,
kQ3ErrorAlreadyInitialized = -28489,
kQ3ErrorUnimplemented = -28488,
kQ3ErrorRegistrationFailed = -28487, /* OS Errors */
kQ3ErrorUnixError = -28486,
kQ3ErrorMacintoshError = -28485,
kQ3ErrorX11Error = -28484, /* Memory Errors */
kQ3ErrorMemoryLeak = -28483,
kQ3ErrorOutOfMemory = -28482, /* Parameter errors */
kQ3ErrorNULLParameter = -28481,
kQ3ErrorParameterOutOfRange = -28480,
kQ3ErrorInvalidParameter = -28479,
kQ3ErrorInvalidData = -28478,
kQ3ErrorAcceleratorAlreadySet = -28477,
kQ3ErrorVector3DNotUnitLength = -28476,
kQ3ErrorVector3DZeroLength = -28475, /* Object Errors */
kQ3ErrorInvalidObject = -28474,
kQ3ErrorInvalidObjectClass = -28473,
kQ3ErrorInvalidObjectType = -28472,
kQ3ErrorInvalidObjectName = -28471,
kQ3ErrorObjectClassInUse = -28470,
kQ3ErrorAccessRestricted = -28469,
kQ3ErrorMetaHandlerRequired = -28468,
kQ3ErrorNeedRequiredMethods = -28467,
kQ3ErrorNoSubClassType = -28466,
kQ3ErrorUnknownElementType = -28465,
kQ3ErrorNotSupported = -28464, /* Extension Errors */
kQ3ErrorNoExtensionsFolder = -28463,
kQ3ErrorExtensionError = -28462,
kQ3ErrorPrivateExtensionError = -28461, /* Geometry Errors */
kQ3ErrorDegenerateGeometry = -28460,
kQ3ErrorGeometryInsufficientNumberOfPoints = -28459, /* IO Errors */
kQ3ErrorNoStorageSetForFile = -28458,
kQ3ErrorEndOfFile = -28457,
kQ3ErrorFileCancelled = -28456,
kQ3ErrorInvalidMetafile = -28455,
kQ3ErrorInvalidMetafilePrimitive = -28454,
kQ3ErrorInvalidMetafileLabel = -28453,
kQ3ErrorInvalidMetafileObject = -28452,
kQ3ErrorInvalidMetafileSubObject = -28451,
kQ3ErrorInvalidSubObjectForObject = -28450,
kQ3ErrorUnresolvableReference = -28449,
kQ3ErrorUnknownObject = -28448,
kQ3ErrorStorageInUse = -28447,
kQ3ErrorStorageAlreadyOpen = -28446,
kQ3ErrorStorageNotOpen = -28445,
kQ3ErrorStorageIsOpen = -28444,
kQ3ErrorFileAlreadyOpen = -28443,
kQ3ErrorFileNotOpen = -28442,
kQ3ErrorFileIsOpen = -28441,
kQ3ErrorBeginWriteAlreadyCalled = -28440,
kQ3ErrorBeginWriteNotCalled = -28439,
kQ3ErrorEndWriteNotCalled = -28438,
kQ3ErrorReadStateInactive = -28437,
kQ3ErrorStateUnavailable = -28436,
kQ3ErrorWriteStateInactive = -28435,
kQ3ErrorSizeNotLongAligned = -28434,
kQ3ErrorFileModeRestriction = -28433,
kQ3ErrorInvalidHexString = -28432,
kQ3ErrorWroteMoreThanSize = -28431,
kQ3ErrorWroteLessThanSize = -28430,
kQ3ErrorReadLessThanSize = -28429,
kQ3ErrorReadMoreThanSize = -28428,
kQ3ErrorNoBeginGroup = -28427,
kQ3ErrorSizeMismatch = -28426,
kQ3ErrorStringExceedsMaximumLength = -28425,
kQ3ErrorValueExceedsMaximumSize = -28424,
kQ3ErrorNonUniqueLabel = -28423,
kQ3ErrorEndOfContainer = -28422,
kQ3ErrorUnmatchedEndGroup = -28421,
kQ3ErrorFileVersionExists = -28420, /* View errors */
kQ3ErrorViewNotStarted = -28419,
kQ3ErrorViewIsStarted = -28418,
kQ3ErrorRendererNotSet = -28417,
kQ3ErrorRenderingIsActive = -28416,
kQ3ErrorImmediateModeUnderflow = -28415,
kQ3ErrorDisplayNotSet = -28414,
kQ3ErrorCameraNotSet = -28413,
kQ3ErrorDrawContextNotSet = -28412,
kQ3ErrorNonInvertibleMatrix = -28411,
kQ3ErrorRenderingNotStarted = -28410,
kQ3ErrorPickingNotStarted = -28409,
kQ3ErrorBoundsNotStarted = -28408,
kQ3ErrorDataNotAvailable = -28407,
kQ3ErrorNothingToPop = -28406, /* Renderer Errors */
kQ3ErrorUnknownStudioType = -28405,
kQ3ErrorAlreadyRendering = -28404,
kQ3ErrorStartGroupRange = -28403,
kQ3ErrorUnsupportedGeometryType = -28402,
kQ3ErrorInvalidGeometryType = -28401,
kQ3ErrorUnsupportedFunctionality = -28400, /* Group Errors */
kQ3ErrorInvalidPositionForGroup = -28399,
kQ3ErrorInvalidObjectForGroup = -28398,
kQ3ErrorInvalidObjectForPosition = -28397, /* Transform Errors */
kQ3ErrorScaleOfZero = -28396, /* String Errors */
kQ3ErrorBadStringType = -28395, /* Attribute Errors */
kQ3ErrorAttributeNotContained = -28394,
kQ3ErrorAttributeInvalidType = -28393, /* Camera Errors */
kQ3ErrorInvalidCameraValues = -28392, /* DrawContext Errors */
kQ3ErrorBadDrawContextType = -28391,
kQ3ErrorBadDrawContextFlag = -28390,
kQ3ErrorBadDrawContext = -28389,
kQ3ErrorUnsupportedPixelDepth = -28388, /* Controller Errors */
kQ3ErrorController = -28387, /* Tracker Errors */
kQ3ErrorTracker = -28386, /* Another OS Error */
kQ3ErrorWin32Error = -28385, /* Object Errors */
kQ3ErrorTypeAlreadyExistsAndHasSubclasses = -28384,
kQ3ErrorTypeAlreadyExistsAndOtherClassesDependOnIt = -28383,
kQ3ErrorTypeAlreadyExistsAndHasObjectInstances = -28382, /* submit loop errors: if you ever get one of these check the previous*/
/* error posted, it may be kQ3ErrorOutOfMemory. If so you *may* be able*/
/* to recover by freeing up some memory and trying again*/
kQ3ErrorPickingLoopFailed = -28381,
kQ3ErrorRenderingLoopFailed = -28380,
kQ3ErrorWritingLoopFailed = -28379,
kQ3ErrorBoundingLoopFailed = -28378
};
typedef enum TQ3Error TQ3Error;
enum TQ3Warning {
kQ3WarningNone = 0, /* General System */
kQ3WarningInternalException = -28300, /* Object Warnings */
kQ3WarningNoObjectSupportForDuplicateMethod = -28299,
kQ3WarningNoObjectSupportForDrawMethod = -28298,
kQ3WarningNoObjectSupportForWriteMethod = -28297,
kQ3WarningNoObjectSupportForReadMethod = -28296,
kQ3WarningUnknownElementType = -28295,
kQ3WarningTypeAndMethodAlreadyDefined = -28294,
kQ3WarningTypeIsOutOfRange = -28293,
kQ3WarningTypeHasNotBeenRegistered = -28292, /* Parameter Warnings */
kQ3WarningVector3DNotUnitLength = -28291, /* IO Warnings */
kQ3WarningInvalidSubObjectForObject = -28290,
kQ3WarningInvalidHexString = -28289,
kQ3WarningUnknownObject = -28288,
kQ3WarningInvalidMetafileObject = -28287,
kQ3WarningUnmatchedBeginGroup = -28286,
kQ3WarningUnmatchedEndGroup = -28285,
kQ3WarningInvalidTableOfContents = -28284,
kQ3WarningUnresolvableReference = -28283,
kQ3WarningNoAttachMethod = -28282,
kQ3WarningInconsistentData = -28281,
kQ3WarningReadLessThanSize = -28280,
kQ3WarningFilePointerResolutionFailed = -28279,
kQ3WarningFilePointerRedefined = -28278,
kQ3WarningStringExceedsMaximumLength = -28277, /* Memory Warnings */
kQ3WarningLowMemory = -28276,
kQ3WarningPossibleMemoryLeak = -28275, /* View Warnings */
kQ3WarningViewTraversalInProgress = -28274,
kQ3WarningNonInvertibleMatrix = -28273, /* Quaternion Warning */
kQ3WarningQuaternionEntriesAreZero = -28272, /* Renderer Warning */
kQ3WarningFunctionalityNotSupported = -28271, /* DrawContext Warning */
kQ3WarningInvalidPaneDimensions = -28270, /* Pick Warning */
kQ3WarningPickParamOutside = -28269, /* Scale Warnings */
kQ3WarningScaleEntriesAllZero = -28268,
kQ3WarningScaleContainsNegativeEntries = -28267, /* Generic Warnings */
kQ3WarningParameterOutOfRange = -28266, /* Extension Warnings */
kQ3WarningExtensionNotLoading = -28265, /* Object Warnings */
kQ3WarningTypeAlreadyRegistered = -28264,
kQ3WarningTypeSameVersionAlreadyRegistered = -28263,
kQ3WarningTypeNewerVersionAlreadyRegistered = -28262, /* Invalid Group Object */
kQ3WarningInvalidObjectInGroupMetafile = -28261
};
typedef enum TQ3Warning TQ3Warning;
enum TQ3Notice {
kQ3NoticeNone = 0,
kQ3NoticeDataAlreadyEmpty = -28100,
kQ3NoticeMethodNotSupported = -28099,
kQ3NoticeObjectAlreadySet = -28098,
kQ3NoticeParameterOutOfRange = -28097,
kQ3NoticeFileAliasWasChanged = -28096,
kQ3NoticeMeshVertexHasNoComponent = -28095,
kQ3NoticeMeshInvalidVertexFacePair = -28094,
kQ3NoticeMeshEdgeVertexDoNotCorrespond = -28093,
kQ3NoticeMeshEdgeIsNotBoundary = -28092,
kQ3NoticeDrawContextNotSetUsingInternalDefaults = -28091,
kQ3NoticeInvalidAttenuationTypeUsingInternalDefaults = -28090,
kQ3NoticeBrightnessGreaterThanOne = -28089,
kQ3NoticeScaleContainsZeroEntries = -28088,
kQ3NoticeSystemAlreadyInitialized = -28087,
kQ3NoticeViewSyncCalledAgain = -28086,
kQ3NoticeFileCancelled = -28085
};
typedef enum TQ3Notice TQ3Notice;
typedef CALLBACK_API_C( void , TQ3ErrorMethod )(TQ3Error firstError, TQ3Error lastError, long reference);
typedef CALLBACK_API_C( void , TQ3WarningMethod )(TQ3Warning firstWarning, TQ3Warning lastWarning, long reference);
typedef CALLBACK_API_C( void , TQ3NoticeMethod )(TQ3Notice firstNotice, TQ3Notice lastNotice, long reference);
/******************************************************************************
** **
** Error Routines **
** **
*****************************************************************************/
#if CALL_NOT_IN_CARBON
/*
* Q3Error_Register()
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API_C( TQ3Status )
Q3Error_Register(
TQ3ErrorMethod errorPost,
long reference);
/*
* Q3Warning_Register()
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API_C( TQ3Status )
Q3Warning_Register(
TQ3WarningMethod warningPost,
long reference);
/*
* Q3Notice_Register()
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API_C( TQ3Status )
Q3Notice_Register(
TQ3NoticeMethod noticePost,
long reference);
/*
* Getting error codes -
* Clears error type on next entry into system (except all of these
* error calls), and returns the last error, and optionally the
* first error. The parameter to these "_Get" calls may be NULL.
*/
/*
* Q3Error_Get()
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API_C( TQ3Error )
Q3Error_Get(TQ3Error * firstError);
/*
* Q3Error_IsFatalError()
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API_C( TQ3Boolean )
Q3Error_IsFatalError(TQ3Error error);
/*
* Q3Warning_Get()
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API_C( TQ3Warning )
Q3Warning_Get(TQ3Warning * firstWarning);
/*
* Q3Notice_Get()
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API_C( TQ3Notice )
Q3Notice_Get(TQ3Notice * firstNotice);
#endif /* CALL_NOT_IN_CARBON */
#if TARGET_OS_MAC
#if CALL_NOT_IN_CARBON
/*
* Q3MacintoshError_Get()
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API_C( OSErr )
Q3MacintoshError_Get(OSErr * firstMacErr);
#endif /* CALL_NOT_IN_CARBON */
#endif /* TARGET_OS_MAC */
#if PRAGMA_ENUM_ALWAYSINT
#pragma enumsalwaysint reset
#ifdef __QD3DERRORS__RESTORE_TWOBYTEINTS
#pragma fourbyteints off
#endif
#elif PRAGMA_ENUM_OPTIONS
#pragma option enum=reset
#elif defined(__QD3DERRORS__RESTORE_PACKED_ENUMS)
#pragma options(pack_enums)
#endif
#if PRAGMA_STRUCT_ALIGN
#pragma options align=reset
#elif PRAGMA_STRUCT_PACKPUSH
#pragma pack(pop)
#elif PRAGMA_STRUCT_PACK
#pragma pack()
#endif
#ifdef PRAGMA_IMPORT_OFF
#pragma import off
#elif PRAGMA_IMPORT
#pragma import reset
#endif
#ifdef __cplusplus
}
#endif
#endif /* __QD3DERRORS__ */
|