1 /*! @header QuesaErrors.h
2         Declares the Quesa error manager.
3  */
4 /*  NAME:
5         QuesaErrors.h
6 
7     DESCRIPTION:
8         Quesa public header.
9 
10     COPYRIGHT:
11         Copyright (c) 1999-2004, Quesa Developers. All rights reserved.
12 
13         For the current release of Quesa, please see:
14 
15             <http://www.quesa.org/>
16 
17         Redistribution and use in source and binary forms, with or without
18         modification, are permitted provided that the following conditions
19         are met:
20 
21             o Redistributions of source code must retain the above copyright
22               notice, this list of conditions and the following disclaimer.
23 
24             o Redistributions in binary form must reproduce the above
25               copyright notice, this list of conditions and the following
26               disclaimer in the documentation and/or other materials provided
27               with the distribution.
28 
29             o Neither the name of Quesa nor the names of its contributors
30               may be used to endorse or promote products derived from this
31               software without specific prior written permission.
32 
33         THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
34         "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
35         LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
36         A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
37         OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
38         SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
39         TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
40         PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
41         LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
42         NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
43         SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44     ___________________________________________________________________________
45 */
46 #ifndef QUESA_ERRORS_HDR
47 #define QUESA_ERRORS_HDR
48 //=============================================================================
49 //      Include files
50 //-----------------------------------------------------------------------------
51 #include "Quesa.h"
52 
53 // Disable QD3D header
54 #if defined(__QD3DERRORS__)
55 #error
56 #endif
57 
58 #define __QD3DERRORS__
59 
60 
61 
62 
63 
64 //=============================================================================
65 //      C++ preamble
66 //-----------------------------------------------------------------------------
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70 
71 
72 
73 
74 
75 //=============================================================================
76 //      Constants
77 //-----------------------------------------------------------------------------
78 /*!
79  *  @enum
80  *      TQ3Error
81  *  @discussion
82  *      Quesa error constants.
83  *
84  *  @constant kQ3ErrorNone                                 No error.
85  *  @constant kQ3ErrorInternalError                        Internal error.
86  *  @constant kQ3ErrorNoRecovery                           No recovery.
87  *  @constant kQ3ErrorLastFatalError                       Last fatal error.
88  *  @constant kQ3ErrorNotInitialized                       Not initialized.
89  *  @constant kQ3ErrorAlreadyInitialized                   Already initialized.
90  *  @constant kQ3ErrorUnimplemented                        Unimplemented.
91  *  @constant kQ3ErrorRegistrationFailed                   Registration failed.
92  *  @constant kQ3ErrorUnixError                            Unix error.
93  *  @constant kQ3ErrorMacintoshError                       Macintosh error.
94  *  @constant kQ3ErrorX11Error                             X11 error.
95  *  @constant kQ3ErrorMemoryLeak                           Memory leak.
96  *  @constant kQ3ErrorOutOfMemory                          Out of memory.
97  *  @constant kQ3ErrorNULLParameter                        NULL parameter.
98  *  @constant kQ3ErrorParameterOutOfRange                  Parameter out of range.
99  *  @constant kQ3ErrorInvalidParameter                     Invalid parameter.
100  *  @constant kQ3ErrorInvalidData                          Invalid data.
101  *  @constant kQ3ErrorAcceleratorAlreadySet                Accelerator already set.
102  *  @constant kQ3ErrorVector3DNotUnitLength                Vector3D not unit length.
103  *  @constant kQ3ErrorVector3DZeroLength                   Vector3D zero length.
104  *  @constant kQ3ErrorInvalidObject                        Invalid object.
105  *  @constant kQ3ErrorInvalidObjectClass                   Invalid object class.
106  *  @constant kQ3ErrorInvalidObjectType                    Invalid object type.
107  *  @constant kQ3ErrorInvalidObjectName                    Invalid object name.
108  *  @constant kQ3ErrorObjectClassInUse                     Object class in use.
109  *  @constant kQ3ErrorAccessRestricted                     Access restricted.
110  *  @constant kQ3ErrorMetaHandlerRequired                  Meta handler required.
111  *  @constant kQ3ErrorNeedRequiredMethods                  Need required methods.
112  *  @constant kQ3ErrorNoSubClassType                       No sub class type.
113  *  @constant kQ3ErrorUnknownElementType                   Unknown element type.
114  *  @constant kQ3ErrorNotSupported                         Not supported.
115  *  @constant kQ3ErrorNoExtensionsFolder                   No extensions folder.
116  *  @constant kQ3ErrorExtensionError                       Extension error.
117  *  @constant kQ3ErrorPrivateExtensionError                Private extension error.
118  *  @constant kQ3ErrorDegenerateGeometry                   Degenerate geometry detected.
119  *  @constant kQ3ErrorGeometryInsufficientNumberOfPoints   Geometry has an insufficient number of points.
120  *  @constant kQ3ErrorNoStorageSetForFile                  No storage set for file.
121  *  @constant kQ3ErrorEndOfFile                            End of file.
122  *  @constant kQ3ErrorFileCancelled                        File cancelled.
123  *  @constant kQ3ErrorInvalidMetafile                      Invalid metafile.
124  *  @constant kQ3ErrorInvalidMetafilePrimitive             Invalid metafile primitive.
125  *  @constant kQ3ErrorInvalidMetafileLabel                 Invalid metafile label.
126  *  @constant kQ3ErrorInvalidMetafileObject                Invalid metafile object.
127  *  @constant kQ3ErrorInvalidMetafileSubObject             Invalid metafile sub object.
128  *  @constant kQ3ErrorInvalidSubObjectForObject            Invalid sub object for object.
129  *  @constant kQ3ErrorUnresolvableReference                Unresolvable reference.
130  *  @constant kQ3ErrorUnknownObject                        Unknown object.
131  *  @constant kQ3ErrorStorageInUse                         Storage in use.
132  *  @constant kQ3ErrorStorageAlreadyOpen                   Storage already open.
133  *  @constant kQ3ErrorStorageNotOpen                       Storage not open.
134  *  @constant kQ3ErrorStorageIsOpen                        Storage is open.
135  *  @constant kQ3ErrorFileAlreadyOpen                      File already open.
136  *  @constant kQ3ErrorFileNotOpen                          File not open.
137  *  @constant kQ3ErrorFileIsOpen                           File is open.
138  *  @constant kQ3ErrorBeginWriteAlreadyCalled              Begin write already called.
139  *  @constant kQ3ErrorBeginWriteNotCalled                  Begin write not called.
140  *  @constant kQ3ErrorEndWriteNotCalled                    End write not called.
141  *  @constant kQ3ErrorReadStateInactive                    Read state inactive.
142  *  @constant kQ3ErrorStateUnavailable                     State unavailable.
143  *  @constant kQ3ErrorWriteStateInactive                   Write state inactive.
144  *  @constant kQ3ErrorSizeNotLongAligned                   Size not long aligned.
145  *  @constant kQ3ErrorFileModeRestriction                  File mode restriction.
146  *  @constant kQ3ErrorInvalidHexString                     Invalid hex string.
147  *  @constant kQ3ErrorWroteMoreThanSize                    Wrote more than size.
148  *  @constant kQ3ErrorWroteLessThanSize                    Wrote less than size.
149  *  @constant kQ3ErrorReadLessThanSize                     Read less than size.
150  *  @constant kQ3ErrorReadMoreThanSize                     Read more than size.
151  *  @constant kQ3ErrorNoBeginGroup                         No begin group.
152  *  @constant kQ3ErrorSizeMismatch                         Size mismatch.
153  *  @constant kQ3ErrorStringExceedsMaximumLength           String exceeds maximum length.
154  *  @constant kQ3ErrorValueExceedsMaximumSize              Value exceeds maximum size.
155  *  @constant kQ3ErrorNonUniqueLabel                       Non unique label.
156  *  @constant kQ3ErrorEndOfContainer                       End of container.
157  *  @constant kQ3ErrorUnmatchedEndGroup                    Unmatched end group.
158  *  @constant kQ3ErrorFileVersionExists                    File version exists.
159  *  @constant kQ3ErrorViewNotStarted                       View not started.
160  *  @constant kQ3ErrorViewIsStarted                        View is started.
161  *  @constant kQ3ErrorRendererNotSet                       Renderer not set.
162  *  @constant kQ3ErrorRenderingIsActive                    Rendering is active.
163  *  @constant kQ3ErrorImmediateModeUnderflow               Immediate mode underflow.
164  *  @constant kQ3ErrorDisplayNotSet                        Display not set.
165  *  @constant kQ3ErrorCameraNotSet                         Camera not set.
166  *  @constant kQ3ErrorDrawContextNotSet                    Draw context not set.
167  *  @constant kQ3ErrorNonInvertibleMatrix                  Non invertible matrix.
168  *  @constant kQ3ErrorRenderingNotStarted                  Rendering not started.
169  *  @constant kQ3ErrorPickingNotStarted                    Picking not started.
170  *  @constant kQ3ErrorBoundsNotStarted                     Bounds not started.
171  *  @constant kQ3ErrorDataNotAvailable                     Data not available.
172  *  @constant kQ3ErrorNothingToPop                         Nothing to pop.
173  *  @constant kQ3ErrorUnknownStudioType                    Unknown studio type.
174  *  @constant kQ3ErrorAlreadyRendering                     Already rendering.
175  *  @constant kQ3ErrorStartGroupRange                      Start group range.
176  *  @constant kQ3ErrorUnsupportedGeometryType              Unsupported geometry type.
177  *  @constant kQ3ErrorInvalidGeometryType                  Invalid geometry type.
178  *  @constant kQ3ErrorUnsupportedFunctionality             Unsupported functionality.
179  *  @constant kQ3ErrorInvalidPositionForGroup              Invalid position for group.
180  *  @constant kQ3ErrorInvalidObjectForGroup                Invalid object for group.
181  *  @constant kQ3ErrorInvalidObjectForPosition             Invalid object for position.
182  *  @constant kQ3ErrorScaleOfZero                          Scale of zero.
183  *  @constant kQ3ErrorBadStringType                        Bad string type.
184  *  @constant kQ3ErrorAttributeNotContained                Attribute not contained.
185  *  @constant kQ3ErrorAttributeInvalidType                 Attribute invalid type.
186  *  @constant kQ3ErrorInvalidCameraValues                  Invalid camera values.
187  *  @constant kQ3ErrorBadDrawContextType                   Bad draw context type.
188  *  @constant kQ3ErrorBadDrawContextFlag                   Bad draw context flag.
189  *  @constant kQ3ErrorBadDrawContext                       Bad draw context.
190  *  @constant kQ3ErrorUnsupportedPixelDepth                Unsupported pixel depth.
191  *  @constant kQ3ErrorController                           Controller error.
192  *  @constant kQ3ErrorTracker                              Tracker error.
193  *  @constant kQ3ErrorWin32Error                           Windows error.
194  *  @constant kQ3ErrorTypeAlreadyExistsAndHasSubclasses    Type already exists and has subclasses.
195  *  @constant kQ3ErrorTypeAlreadyExistsAndOtherClassesDependOnIt   Type already exists and other classes depend on it.
196  *  @constant kQ3ErrorTypeAlreadyExistsAndHasObjectInstances       Type already exists and has object instances.
197  *  @constant kQ3ErrorPickingLoopFailed                    Picking loop failed.
198  *  @constant kQ3ErrorRenderingLoopFailed                  Rendering loop failed.
199  *  @constant kQ3ErrorWritingLoopFailed                    Writing loop failed.
200  *  @constant kQ3ErrorBoundingLoopFailed                   Bounding loop failed.
201  *  @constant kQ3ErrorPlatformError                        Platform-specific error. Not available in QD3D.
202  *	@constant kQ3ErrorInfiniteRationalPoint                Infinite rational point. Not available in QD3D.
203  */
204 typedef enum {
205     kQ3ErrorNone                                = 0,
206     kQ3ErrorFirst                               = -28500,
207     kQ3ErrorInternalError                       = -28500,
208     kQ3ErrorNoRecovery                          = -28499,
209     kQ3ErrorLastFatalError                      = -28498,
210     kQ3ErrorNotUsedByQD3D_1                     = -28497,
211     kQ3ErrorNotUsedByQD3D_2                     = -28496,
212     kQ3ErrorNotUsedByQD3D_3                     = -28495,
213     kQ3ErrorNotUsedByQD3D_4                     = -28494,
214     kQ3ErrorNotUsedByQD3D_5                     = -28493,
215     kQ3ErrorNotUsedByQD3D_6                     = -28492,
216     kQ3ErrorNotUsedByQD3D_7                     = -28491,
217     kQ3ErrorNotInitialized                      = -28490,
218     kQ3ErrorAlreadyInitialized                  = -28489,
219     kQ3ErrorUnimplemented                       = -28488,
220     kQ3ErrorRegistrationFailed                  = -28487,
221     kQ3ErrorUnixError                           = -28486,
222     kQ3ErrorMacintoshError                      = -28485,
223     kQ3ErrorX11Error                            = -28484,
224     kQ3ErrorMemoryLeak                          = -28483,
225     kQ3ErrorOutOfMemory                         = -28482,
226     kQ3ErrorNULLParameter                       = -28481,
227     kQ3ErrorParameterOutOfRange                 = -28480,
228     kQ3ErrorInvalidParameter                    = -28479,
229     kQ3ErrorInvalidData                         = -28478,
230     kQ3ErrorAcceleratorAlreadySet               = -28477,
231     kQ3ErrorVector3DNotUnitLength               = -28476,
232     kQ3ErrorVector3DZeroLength                  = -28475,
233     kQ3ErrorInvalidObject                       = -28474,
234     kQ3ErrorInvalidObjectClass                  = -28473,
235     kQ3ErrorInvalidObjectType                   = -28472,
236     kQ3ErrorInvalidObjectName                   = -28471,
237     kQ3ErrorObjectClassInUse                    = -28470,
238     kQ3ErrorAccessRestricted                    = -28469,
239     kQ3ErrorMetaHandlerRequired                 = -28468,
240     kQ3ErrorNeedRequiredMethods                 = -28467,
241     kQ3ErrorNoSubClassType                      = -28466,
242     kQ3ErrorUnknownElementType                  = -28465,
243     kQ3ErrorNotSupported                        = -28464,
244     kQ3ErrorNoExtensionsFolder                  = -28463,
245     kQ3ErrorExtensionError                      = -28462,
246     kQ3ErrorPrivateExtensionError               = -28461,
247     kQ3ErrorDegenerateGeometry                  = -28460,
248     kQ3ErrorGeometryInsufficientNumberOfPoints  = -28459,
249     kQ3ErrorNoStorageSetForFile                 = -28458,
250     kQ3ErrorEndOfFile                           = -28457,
251     kQ3ErrorFileCancelled                       = -28456,
252     kQ3ErrorInvalidMetafile                     = -28455,
253     kQ3ErrorInvalidMetafilePrimitive            = -28454,
254     kQ3ErrorInvalidMetafileLabel                = -28453,
255     kQ3ErrorInvalidMetafileObject               = -28452,
256     kQ3ErrorInvalidMetafileSubObject            = -28451,
257     kQ3ErrorInvalidSubObjectForObject           = -28450,
258     kQ3ErrorUnresolvableReference               = -28449,
259     kQ3ErrorUnknownObject                       = -28448,
260     kQ3ErrorStorageInUse                        = -28447,
261     kQ3ErrorStorageAlreadyOpen                  = -28446,
262     kQ3ErrorStorageNotOpen                      = -28445,
263     kQ3ErrorStorageIsOpen                       = -28444,
264     kQ3ErrorFileAlreadyOpen                     = -28443,
265     kQ3ErrorFileNotOpen                         = -28442,
266     kQ3ErrorFileIsOpen                          = -28441,
267     kQ3ErrorBeginWriteAlreadyCalled             = -28440,
268     kQ3ErrorBeginWriteNotCalled                 = -28439,
269     kQ3ErrorEndWriteNotCalled                   = -28438,
270     kQ3ErrorReadStateInactive                   = -28437,
271     kQ3ErrorStateUnavailable                    = -28436,
272     kQ3ErrorWriteStateInactive                  = -28435,
273     kQ3ErrorSizeNotLongAligned                  = -28434,
274     kQ3ErrorFileModeRestriction                 = -28433,
275     kQ3ErrorInvalidHexString                    = -28432,
276     kQ3ErrorWroteMoreThanSize                   = -28431,
277     kQ3ErrorWroteLessThanSize                   = -28430,
278     kQ3ErrorReadLessThanSize                    = -28429,
279     kQ3ErrorReadMoreThanSize                    = -28428,
280     kQ3ErrorNoBeginGroup                        = -28427,
281     kQ3ErrorSizeMismatch                        = -28426,
282     kQ3ErrorStringExceedsMaximumLength          = -28425,
283     kQ3ErrorValueExceedsMaximumSize             = -28424,
284     kQ3ErrorNonUniqueLabel                      = -28423,
285     kQ3ErrorEndOfContainer                      = -28422,
286     kQ3ErrorUnmatchedEndGroup                   = -28421,
287     kQ3ErrorFileVersionExists                   = -28420,
288     kQ3ErrorViewNotStarted                      = -28419,
289     kQ3ErrorViewIsStarted                       = -28418,
290     kQ3ErrorRendererNotSet                      = -28417,
291     kQ3ErrorRenderingIsActive                   = -28416,
292     kQ3ErrorImmediateModeUnderflow              = -28415,
293     kQ3ErrorDisplayNotSet                       = -28414,
294     kQ3ErrorCameraNotSet                        = -28413,
295     kQ3ErrorDrawContextNotSet                   = -28412,
296     kQ3ErrorNonInvertibleMatrix                 = -28411,
297     kQ3ErrorRenderingNotStarted                 = -28410,
298     kQ3ErrorPickingNotStarted                   = -28409,
299     kQ3ErrorBoundsNotStarted                    = -28408,
300     kQ3ErrorDataNotAvailable                    = -28407,
301     kQ3ErrorNothingToPop                        = -28406,
302     kQ3ErrorUnknownStudioType                   = -28405,
303     kQ3ErrorAlreadyRendering                    = -28404,
304     kQ3ErrorStartGroupRange                     = -28403,
305     kQ3ErrorUnsupportedGeometryType             = -28402,
306     kQ3ErrorInvalidGeometryType                 = -28401,
307     kQ3ErrorUnsupportedFunctionality            = -28400,
308     kQ3ErrorInvalidPositionForGroup             = -28399,
309     kQ3ErrorInvalidObjectForGroup               = -28398,
310     kQ3ErrorInvalidObjectForPosition            = -28397,
311     kQ3ErrorScaleOfZero                         = -28396,
312     kQ3ErrorBadStringType                       = -28395,
313     kQ3ErrorAttributeNotContained               = -28394,
314     kQ3ErrorAttributeInvalidType                = -28393,
315     kQ3ErrorInvalidCameraValues                 = -28392,
316     kQ3ErrorBadDrawContextType                  = -28391,
317     kQ3ErrorBadDrawContextFlag                  = -28390,
318     kQ3ErrorBadDrawContext                      = -28389,
319     kQ3ErrorUnsupportedPixelDepth               = -28388,
320     kQ3ErrorController                          = -28387,
321     kQ3ErrorTracker                             = -28386,
322     kQ3ErrorWin32Error                          = -28385,
323     kQ3ErrorTypeAlreadyExistsAndHasSubclasses           = -28384,
324     kQ3ErrorTypeAlreadyExistsAndOtherClassesDependOnIt  = -28383,
325     kQ3ErrorTypeAlreadyExistsAndHasObjectInstances      = -28382,
326     kQ3ErrorPickingLoopFailed                   = -28381,
327     kQ3ErrorRenderingLoopFailed                 = -28380,
328     kQ3ErrorWritingLoopFailed                   = -28379,
329     kQ3ErrorBoundingLoopFailed                  = -28378,
330 
331 #if QUESA_ALLOW_QD3D_EXTENSIONS
332     kQ3ErrorPlatformError                       = -28377,
333     kQ3ErrorInfiniteRationalPoint				= -28376,
334 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
335 
336     kQ3ErrorLast,
337     kQ3ErrorSize32                              = 0xFFFFFFFF
338 } TQ3Error;
339 
340 
341 /*!
342  *  @enum
343  *      TQ3Warning
344  *  @discussion
345  *      Quesa warning constants.
346  *
347  *  @constant kQ3WarningNone                               No warning.
348  *  @constant kQ3WarningInternalException                  Internal exception.
349  *  @constant kQ3WarningNoObjectSupportForDuplicateMethod  No object support for duplicate method.
350  *  @constant kQ3WarningNoObjectSupportForDrawMethod       No object support for draw method.
351  *  @constant kQ3WarningNoObjectSupportForWriteMethod      No object support for write method.
352  *  @constant kQ3WarningNoObjectSupportForReadMethod       No object support for read method.
353  *  @constant kQ3WarningUnknownElementType                 Unknown element type.
354  *  @constant kQ3WarningTypeAndMethodAlreadyDefined        Type and method already defined.
355  *  @constant kQ3WarningTypeIsOutOfRange                   Type is out of range.
356  *  @constant kQ3WarningTypeHasNotBeenRegistered           Type has not been registered.
357  *  @constant kQ3WarningVector3DNotUnitLength              Vector3D not unit length.
358  *  @constant kQ3WarningInvalidSubObjectForObject          Invalid sub object for object.
359  *  @constant kQ3WarningInvalidHexString                   Invalid hex string.
360  *  @constant kQ3WarningUnknownObject                      Unknown object.
361  *  @constant kQ3WarningInvalidMetafileObject              Invalid metafile object.
362  *  @constant kQ3WarningUnmatchedBeginGroup                Unmatched begin group.
363  *  @constant kQ3WarningUnmatchedEndGroup                  Unmatched end group.
364  *  @constant kQ3WarningInvalidTableOfContents             Invalid table of contents.
365  *  @constant kQ3WarningUnresolvableReference              Unresolvable reference.
366  *  @constant kQ3WarningNoAttachMethod                     No attach method.
367  *  @constant kQ3WarningInconsistentData                   Inconsistent data.
368  *  @constant kQ3WarningReadLessThanSize                   Read less than size.
369  *  @constant kQ3WarningFilePointerResolutionFailed        File pointer resolution failed.
370  *  @constant kQ3WarningFilePointerRedefined               File pointer redefined.
371  *  @constant kQ3WarningStringExceedsMaximumLength         String exceeds maximum length.
372  *  @constant kQ3WarningLowMemory                          Low memory.
373  *  @constant kQ3WarningPossibleMemoryLeak                 Possible memory leak.
374  *  @constant kQ3WarningViewTraversalInProgress            View traversal in progress.
375  *  @constant kQ3WarningNonInvertibleMatrix                Non invertible matrix.
376  *  @constant kQ3WarningQuaternionEntriesAreZero           Quaternion entries are zero.
377  *  @constant kQ3WarningFunctionalityNotSupported          Functionality not supported.
378  *  @constant kQ3WarningInvalidPaneDimensions              Invalid pane dimensions.
379  *  @constant kQ3WarningPickParamOutside                   Pick param outside.
380  *  @constant kQ3WarningScaleEntriesAllZero                Scale entries all zero.
381  *  @constant kQ3WarningScaleContainsNegativeEntries       Scale contains negative entries.
382  *  @constant kQ3WarningParameterOutOfRange                Parameter out of range.
383  *  @constant kQ3WarningExtensionNotLoading                Extension not loading.
384  *  @constant kQ3WarningTypeAlreadyRegistered              Type already registered.
385  *  @constant kQ3WarningTypeSameVersionAlreadyRegistered   Type same version already registered.
386  *  @constant kQ3WarningTypeNewerVersionAlreadyRegistered  Type newer version already registered.
387  *  @constant kQ3WarningInvalidObjectInGroupMetafile       Invalid object in group metafile.
388  *	@constant kQ3WarningQuaternionNotNormalized            Quaternion is not normalized. Not available in QD3D.
389  *	@constant kQ3WarningNormalCanNotBeFlipped              Normal can not be flipped as they would under QD3D. Not available in QD3D.
390  *	@constant kQ3WarningTriangleNotNormalized              Triangle normal is not normalized. Not available in QD3D.
391  *	@constant kQ3WarningVertexNotNormalized                Vertex normal is not normalized. Not available in QD3D.
392  *	@constant kQ3WarningReadInfiniteFloatingPointNumber    Floating-point number read from file was
393  *                                                         infinite or NaN.  Not available in QD3D.
394  *	@constant kQ3WarningReadBadNormalVector                A supposed normal vector has components so
395  *                                                         large or small that it cannot be normalized.
396  *                                                         Not available in QD3D.
397  */
398 typedef enum {
399     kQ3WarningNone                              = 0,
400     kQ3WarningFirst                             = -28300,
401     kQ3WarningInternalException                 = -28300,
402     kQ3WarningNoObjectSupportForDuplicateMethod = -28299,
403     kQ3WarningNoObjectSupportForDrawMethod      = -28298,
404     kQ3WarningNoObjectSupportForWriteMethod     = -28297,
405     kQ3WarningNoObjectSupportForReadMethod      = -28296,
406     kQ3WarningUnknownElementType                = -28295,
407     kQ3WarningTypeAndMethodAlreadyDefined       = -28294,
408     kQ3WarningTypeIsOutOfRange                  = -28293,
409     kQ3WarningTypeHasNotBeenRegistered          = -28292,
410     kQ3WarningVector3DNotUnitLength             = -28291,
411     kQ3WarningInvalidSubObjectForObject         = -28290,
412     kQ3WarningInvalidHexString                  = -28289,
413     kQ3WarningUnknownObject                     = -28288,
414     kQ3WarningInvalidMetafileObject             = -28287,
415     kQ3WarningUnmatchedBeginGroup               = -28286,
416     kQ3WarningUnmatchedEndGroup                 = -28285,
417     kQ3WarningInvalidTableOfContents            = -28284,
418     kQ3WarningUnresolvableReference             = -28283,
419     kQ3WarningNoAttachMethod                    = -28282,
420     kQ3WarningInconsistentData                  = -28281,
421     kQ3WarningReadLessThanSize                  = -28280,
422     kQ3WarningFilePointerResolutionFailed       = -28279,
423     kQ3WarningFilePointerRedefined              = -28278,
424     kQ3WarningStringExceedsMaximumLength        = -28277,
425     kQ3WarningLowMemory                         = -28276,
426     kQ3WarningPossibleMemoryLeak                = -28275,
427     kQ3WarningViewTraversalInProgress           = -28274,
428     kQ3WarningNonInvertibleMatrix               = -28273,
429     kQ3WarningQuaternionEntriesAreZero          = -28272,
430     kQ3WarningFunctionalityNotSupported         = -28271,
431     kQ3WarningInvalidPaneDimensions             = -28270,
432     kQ3WarningPickParamOutside                  = -28269,
433     kQ3WarningScaleEntriesAllZero               = -28268,
434     kQ3WarningScaleContainsNegativeEntries      = -28267,
435     kQ3WarningParameterOutOfRange               = -28266,
436     kQ3WarningExtensionNotLoading               = -28265,
437     kQ3WarningTypeAlreadyRegistered             = -28264,
438     kQ3WarningTypeSameVersionAlreadyRegistered  = -28263,
439     kQ3WarningTypeNewerVersionAlreadyRegistered = -28262,
440     kQ3WarningInvalidObjectInGroupMetafile      = -28261,
441 
442 #if QUESA_ALLOW_QD3D_EXTENSIONS
443 	kQ3WarningQuaternionNotNormalized           = -28260,
444 	kQ3WarningNormalCanNotBeFlipped             = -28259,
445 	kQ3WarningTriangleNotNormalized             = -28258,
446 	kQ3WarningVertexNotNormalized               = -28257,
447     kQ3WarningReadInfiniteFloatingPointNumber   = -28256,
448     kQ3WarningReadBadNormalVector               = -28255,
449 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
450 
451     kQ3WarningLast,
452     kQ3WarningSize32                            = 0xFFFFFFFF
453 } TQ3Warning;
454 
455 
456 /*!
457  *  @enum
458  *      TQ3Notice
459  *  @discussion
460  *      Quesa notice constants.
461  *
462  *  @constant kQ3NoticeNone                                No notice.
463  *  @constant kQ3NoticeDataAlreadyEmpty                    Data already empty.
464  *  @constant kQ3NoticeMethodNotSupported                  Method not supported.
465  *  @constant kQ3NoticeObjectAlreadySet                    Object already set.
466  *  @constant kQ3NoticeParameterOutOfRange                 Parameter out of range.
467  *  @constant kQ3NoticeFileAliasWasChanged                 File alias was changed.
468  *  @constant kQ3NoticeMeshVertexHasNoComponent            Mesh vertex has no component.
469  *  @constant kQ3NoticeMeshInvalidVertexFacePair           Mesh invalid vertex face pair.
470  *  @constant kQ3NoticeMeshEdgeVertexDoNotCorrespond       Mesh edge vertex do not correspond.
471  *  @constant kQ3NoticeMeshEdgeIsNotBoundary               Mesh edge is not boundary.
472  *  @constant kQ3NoticeDrawContextNotSetUsingInternalDefaults      Draw context not set using internal defaults.
473  *  @constant kQ3NoticeInvalidAttenuationTypeUsingInternalDefaults Invalid attenuation type using internal defaults.
474  *  @constant kQ3NoticeBrightnessGreaterThanOne            Brightness greater than 1.0.
475  *  @constant kQ3NoticeScaleContainsZeroEntries            Scale contains zero entries.
476  *  @constant kQ3NoticeSystemAlreadyInitialized            System already initialized.
477  *  @constant kQ3NoticeViewSyncCalledAgain                 View sync called again.
478  *  @constant kQ3NoticeFileCancelled                       File cancelled.
479  *  @constant kQ3NoticeBrightnessLessThanZero              Brightness less than 0.0. Not available in QD3D.
480  */
481 typedef enum {
482     kQ3NoticeNone                               = 0,
483     kQ3NoticeFirst                              = -28100,
484     kQ3NoticeDataAlreadyEmpty                   = -28100,
485     kQ3NoticeMethodNotSupported                 = -28099,
486     kQ3NoticeObjectAlreadySet                   = -28098,
487     kQ3NoticeParameterOutOfRange                = -28097,
488     kQ3NoticeFileAliasWasChanged                = -28096,
489     kQ3NoticeMeshVertexHasNoComponent           = -28095,
490     kQ3NoticeMeshInvalidVertexFacePair          = -28094,
491     kQ3NoticeMeshEdgeVertexDoNotCorrespond      = -28093,
492     kQ3NoticeMeshEdgeIsNotBoundary              = -28092,
493     kQ3NoticeDrawContextNotSetUsingInternalDefaults         = -28091,
494     kQ3NoticeInvalidAttenuationTypeUsingInternalDefaults    = -28090,
495     kQ3NoticeBrightnessGreaterThanOne           = -28089,
496     kQ3NoticeScaleContainsZeroEntries           = -28088,
497     kQ3NoticeSystemAlreadyInitialized           = -28087,
498     kQ3NoticeViewSyncCalledAgain                = -28086,
499     kQ3NoticeFileCancelled                      = -28085,
500 
501 #if QUESA_ALLOW_QD3D_EXTENSIONS
502 	kQ3NoticeBrightnessLessThanZero             = -28084,
503 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
504 
505     kQ3NoticeLast,
506     kQ3NoticeSize32                             = 0xFFFFFFFF
507 } TQ3Notice;
508 
509 
510 
511 
512 
513 //=============================================================================
514 //      Types
515 //-----------------------------------------------------------------------------
516 /*!
517  *  @typedef
518  *      TQ3ErrorMethod
519  *  @discussion
520  *      Error Manager error callback.
521  *
522  *  @param firstError       The first error which has occurred since the last
523  *                          time the handler was invoked.
524  *  @param lastError        The most recent error which has occurred.
525  *  @param userData         The reference parameter passed to Q3Error_Register.
526  */
527 typedef Q3_CALLBACK_API_C(void,                TQ3ErrorMethod)(
528                             TQ3Error            firstError,
529                             TQ3Error            lastError,
530                             TQ3Int32            userData);
531 
532 
533 /*!
534  *  @typedef
535  *      TQ3WarningMethod
536  *  @discussion
537  *      Error Manager warning callback.
538  *
539  *  @param firstWarning     The first warning which has occurred since the last
540  *                          time the handler was invoked.
541  *  @param lastWarning      The most recent warning which has occurred.
542  *  @param userData         The reference parameter passed to Q3Warning_Register.
543  */
544 typedef Q3_CALLBACK_API_C(void,                TQ3WarningMethod)(
545                             TQ3Warning          firstWarning,
546                             TQ3Warning          lastWarning,
547                             TQ3Int32            userData);
548 
549 
550 /*!
551  *  @typedef
552  *      TQ3NoticeMethod
553  *  @discussion
554  *      Error Manager notice callback.
555  *
556  *  @param firstNotice      The first notice which has occurred since the last
557  *                          time the handler was invoked.
558  *  @param lastNotice       The most recent notice which has occurred.
559  *  @param userData         The reference parameter passed to Q3Notice_Register.
560  */
561 typedef Q3_CALLBACK_API_C(void,                TQ3NoticeMethod)(
562                             TQ3Notice           firstNotice,
563                             TQ3Notice           lastNotice,
564                             TQ3Int32            userData);
565 
566 
567 
568 
569 
570 //=============================================================================
571 //      Function prototypes
572 //-----------------------------------------------------------------------------
573 /*!
574  *  @function
575  *      Q3Error_Register
576  *  @discussion
577  *      Install a callback to handle errors.
578  *
579  *      Use this function to register an error-handling function that will be
580  *      called when Quesa detects an error condition that it can't handle.
581  *		Your callback should not call Quesa except for Error Manager routines.
582  *
583  *  @param errorPost        Callback to receive error notifications.
584  *  @param reference        Constant passed to error callback.
585  *  @result                 kQ3Success when the callback is installed.
586  */
587 Q3_EXTERN_API_C ( TQ3Status  )
588 Q3Error_Register (
589     TQ3ErrorMethod                errorPost,
590     TQ3Int32                      reference
591 );
592 
593 
594 
595 /*!
596  *  @function
597  *      Q3Warning_Register
598  *  @discussion
599  *      Install a callback to handle warnings.
600  *
601  *      Use this function to register an warning-handling function that will be
602  *      called when a Quesa routine generates a warning that it can't handle.
603  *		Your callback should not call Quesa except for Error Manager routines.
604  *
605  *  @param warningPost      Callback to receive warning notifications.
606  *  @param reference        Constant passed to warning callback.
607  *  @result                 kQ3Success when the callback is installed.
608  */
609 Q3_EXTERN_API_C ( TQ3Status  )
610 Q3Warning_Register (
611     TQ3WarningMethod              warningPost,
612     TQ3Int32                      reference
613 );
614 
615 
616 
617 /*!
618  *  @function
619  *      Q3Notice_Register
620  *  @discussion
621  *      Install a callback to handle notifications.
622  *
623  *      Use this function to register an warning-handling function that will be
624  *		called when a Quesa routine generates a notice.
625  *		This will only happen in debugging versions of Quesa.
626  *		Your callback should not call Quesa except for Error Manager routines.
627  *
628  *  @param noticePost       Routine to be called to handle notices.
629  *  @param reference        Constant passed to notice callback.
630  *  @result                 kQ3Success when the callback is installed.
631  */
632 Q3_EXTERN_API_C ( TQ3Status  )
633 Q3Notice_Register (
634     TQ3NoticeMethod               noticePost,
635     TQ3Int32                      reference
636 );
637 
638 
639 
640 /*!
641  *  @function
642  *      Q3Error_Get
643  *  @discussion
644  *      Retrieve latest error codes from Quesa.
645  *
646  *      Retrieve the most recent error code, and optionally also the oldest
647  *		unreported error code.  After this call, the next Quesa call that is not
648  *		part of the Error Manager will clear the error codes.
649  *
650  *  @param firstError       Pointer to variable to receive the oldest error code
651  *							that has not yet been reported.  May be NULL if you
652  *							don't need that information.
653  *  @result                 Most recent error code.
654  */
655 Q3_EXTERN_API_C ( TQ3Error  )
656 Q3Error_Get (
657     TQ3Error                      *firstError
658 );
659 
660 
661 
662 /*!
663  *  @function
664  *      Q3Error_IsFatalError
665  *  @discussion
666  *      Determine whether a Quesa error code is fatal.
667  *
668  *      You can call this function from an error callback or after getting
669  *      an error code with Q3Error_Get.  If the error is fatal, your application
670  *		should quit without calling any other Quesa routines.
671  *
672  *  @param error            A Quesa error code.
673  *  @result                 True if the error is fatal.
674  */
675 Q3_EXTERN_API_C ( TQ3Boolean  )
676 Q3Error_IsFatalError (
677     TQ3Error                      error
678 );
679 
680 
681 
682 /*!
683  *  @function
684  *      Q3Warning_Get
685  *	@discussion
686  *      Retrieve latest warning codes from Quesa.
687  *
688  *      Retrieve the most recent warning code, and optionally also the oldest
689  *		unreported warning code.  After this call, the next Quesa call that is not
690  *		part of the Error Manager will clear the warning codes.
691  *
692  *  @param firstWarning     Pointer to variable to receive the oldest warning code
693  *							that has not yet been reported.  May be NULL if you
694  *							don't need that information.
695  *  @result                 Most recent warning code.
696  */
697 Q3_EXTERN_API_C ( TQ3Warning  )
698 Q3Warning_Get (
699     TQ3Warning                    *firstWarning
700 );
701 
702 
703 
704 /*!
705  *  @function
706  *      Q3Notice_Get
707  *  @discussion
708  *      Retrieve latest notice codes from Quesa.
709  *
710  *      Retrieve the most recent notice code, and optionally also the oldest
711  *		unreported notice code.  After this call, the next Quesa call that is not
712  *		part of the Error Manager will clear the notice codes.
713  *
714  *  @param firstNotice      Pointer to variable to receive the oldest notice code
715  *							that has not yet been reported.  May be NULL if you
716  *							don't need that information.
717  *  @result                 Most recent notice code.
718  */
719 Q3_EXTERN_API_C ( TQ3Notice  )
720 Q3Notice_Get (
721     TQ3Notice                     *firstNotice
722 );
723 
724 
725 
726 /*!
727  *  @function
728  *      Q3Error_PlatformGet
729  *  @discussion
730  *      Gets platform-specific error codes.
731  *		This is a generalization of Q3MacintoshError_Get, and may be used in place
732  *		of Q3MacintoshError_Get on the Macintosh platform.
733  *
734  *		If an error callback or Q3Error_Get returns one of the special error codes
735  *		kQ3ErrorMacintoshError, kQ3ErrorWin32Error, kQ3ErrorUnixError,
736  *		kQ3ErrorPlatformError, you can call this function to retrieve
737  *		platform-specific error codes.
738  *		After this call, the next Quesa call that is not part of the Error Manager
739  *		will clear the platform-specific error codes.
740  *
741  *      <em>This function is not available in QD3D.</em>
742  *
743  *  @param firstErr         Pointer to variable to receive the oldest unreported
744  *							platform-specific error code.  May be NULL if you
745  *							don't need that information.
746  *  @result                 Most recent platform-specific error code.
747  */
748 #if QUESA_ALLOW_QD3D_EXTENSIONS
749 
750 Q3_EXTERN_API_C ( TQ3Uns32  )
751 Q3Error_PlatformGet (
752     TQ3Uns32                      *firstErr
753 );
754 
755 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
756 
757 
758 
759 /*!
760  *  @function
761  *      Q3Error_PlatformPost
762  *  @discussion
763  *      Posts a platform-specific error code.
764  *
765  *		Normally this would be used only by Quesa plug-ins, not by application code.
766  *
767  *      <em>This function is not available in QD3D.</em>
768  *
769  *  @param theErr           A platform-specific error code.
770  */
771 #if QUESA_ALLOW_QD3D_EXTENSIONS
772 
773 Q3_EXTERN_API_C ( void  )
774 Q3Error_PlatformPost (
775     TQ3Uns32                      theErr
776 );
777 
778 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
779 
780 
781 
782 /*!
783  *  @function
784  *      Q3Error_ToString
785  *  @discussion
786  *      Retrieve a string version of the error code.
787  *
788  *      <em>This function is not available in QD3D.</em>
789  *
790  *  @param theLanguage      Preferred language for the error string.
791  *							Currently only English is supported.
792  *  @param theError         Quesa error code.
793  *  @result                 Text version of the error code, as a NULL-terminated string.
794  */
795 #if QUESA_ALLOW_QD3D_EXTENSIONS
796 
797 Q3_EXTERN_API_C ( const char * )
798 Q3Error_ToString (
799     TQ3Language                   theLanguage,
800     TQ3Error                      theError
801 );
802 
803 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
804 
805 
806 
807 /*!
808  *  @function
809  *      Q3Warning_ToString
810  *  @discussion
811  *      Retrieve a string version of the warning code.
812  *
813  *      <em>This function is not available in QD3D.</em>
814  *
815  *  @param theLanguage      Preferred language for the warning string.
816  *							Currently only English is supported.
817  *  @param theWarning       Quesa warning code.
818  *  @result                 Text version of the warning code, as a NULL-terminated string.
819  */
820 #if QUESA_ALLOW_QD3D_EXTENSIONS
821 
822 Q3_EXTERN_API_C ( const char * )
823 Q3Warning_ToString (
824     TQ3Language                   theLanguage,
825     TQ3Warning                    theWarning
826 );
827 
828 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
829 
830 
831 
832 /*!
833  *  @function
834  *      Q3Notice_ToString
835  *  @discussion
836  *      Retrieve a string version of the notice code.
837  *
838  *      <em>This function is not available in QD3D.</em>
839  *
840  *  @param theLanguage      Preferred language for the notice string.
841  *							Currently only English is supported.
842  *  @param theWarning       Quesa notice code.
843  *  @result                 Text version of the notice code, as a NULL-terminated string.
844  */
845 #if QUESA_ALLOW_QD3D_EXTENSIONS
846 
847 Q3_EXTERN_API_C ( const char * )
848 Q3Notice_ToString (
849     TQ3Language                   theLanguage,
850     TQ3Notice                     theError
851 );
852 
853 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
854 
855 
856 
857 
858 
859 //=============================================================================
860 //      Mac OS function prototypes
861 //-----------------------------------------------------------------------------
862 #if QUESA_OS_MACINTOSH
863 
864 /*!
865  *  @function
866  *      Q3MacintoshError_Get
867  *  @discussion
868  *      Retrieve the most recent Macintosh error code, and optionally also the oldest
869  *		unreported Mac error code.  After this call, the next Quesa call that is not
870  *		part of the Error Manager will clear the error codes.
871  *
872  *		Q3Error_PlatformGet may be used in place of this function.
873  *
874  *  @param firstMacErr      Pointer to variable to receive the oldest Mac error code
875  *							that has not yet been reported.  May be NULL if you
876  *							don't need that information.
877  *  @result                 Most recent Mac error code.
878  */
879 Q3_EXTERN_API_C ( OSErr  )
880 Q3MacintoshError_Get (
881     OSErr                         *firstMacErr
882 );
883 
884 #endif // QUESA_OS_MACINTOSH
885 
886 
887 
888 
889 
890 //=============================================================================
891 //      C++ postamble
892 //-----------------------------------------------------------------------------
893 #ifdef __cplusplus
894 }
895 #endif
896 
897 #endif
898 
899 
900