1 /*! @header QuesaIO.h
2         Declares the Quesa IO objects.
3  */
4 /*  NAME:
5         QuesaIO.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_IO_HDR
47 #define QUESA_IO_HDR
48 //=============================================================================
49 //      Include files
50 //-----------------------------------------------------------------------------
51 #include "Quesa.h"
52 
53 #include "QuesaDrawContext.h"
54 #include "QuesaView.h"
55 #include "QuesaRenderer.h"
56 
57 // Disable QD3D header
58 #ifdef __QD3DIO__
59 #error
60 #endif
61 
62 #define __QD3DIO__
63 
64 
65 
66 
67 
68 //=============================================================================
69 //      C++ preamble
70 //-----------------------------------------------------------------------------
71 #ifdef __cplusplus
72 extern "C" {
73 #endif
74 
75 
76 
77 
78 
79 //=============================================================================
80 //      Constants
81 //-----------------------------------------------------------------------------
82 /*!
83  *  @enum
84  *      TQ3FileModeMasks
85  *  @discussion
86  *      Mode masks for file operations.
87  *
88  *  @constant kQ3FileModeNormal      Normal file mode.
89  *  @constant kQ3FileModeStream      Stream mode.
90  *  @constant kQ3FileModeDatabase    Database mode.
91  *  @constant kQ3FileModeText        Text mode.
92  *  @constant kQ3FileModeSwap        Binary mode with byte order swapped (not present in QD3D).
93  */
94 typedef enum TQ3FileModeMasks {
95     kQ3FileModeNormal                           = 0,
96     kQ3FileModeStream                           = (1 << 0),
97     kQ3FileModeDatabase                         = (1 << 1),
98     kQ3FileModeText                             = (1 << 2),
99 #if QUESA_ALLOW_QD3D_EXTENSIONS
100     kQ3FileModeSwap                             = (1 << 3),
101 #endif
102     kQ3FileModeSize32                           = 0xFFFFFFFF
103 } TQ3FileModeMasks;
104 
105 
106 /*!
107  *  @enum
108  *      TQ3FileReadGroupStateMasks
109  *  @discussion
110  *      Read group state masks.
111  *
112  *  @constant kQ3FileReadWholeGroup          Read the whole group.
113  *  @constant kQ3FileReadObjectsInGroup      Read objects in the group.
114  *  @constant kQ3FileCurrentlyInsideGroup    Currently inside a group.
115  */
116 typedef enum TQ3FileReadGroupStateMasks {
117     kQ3FileReadWholeGroup                       = 0,
118     kQ3FileReadObjectsInGroup                   = (1 << 0),
119     kQ3FileCurrentlyInsideGroup                 = (1 << 1),
120     kQ3FileReadGroupStateSize32                 = 0xFFFFFFFF
121 } TQ3FileReadGroupStateMasks;
122 
123 
124 // File format types
125 enum {
126     kQ3ObjectTypeFileFormat                                 = Q3_OBJECT_TYPE('F', 'F', 'm', 't'),
127         kQ3FileFormatTypeReader                             = Q3_OBJECT_TYPE('F', 'm', 't', 'R'),
128             kQ3FFormatReaderType3DMFBin                     = Q3_OBJECT_TYPE('F', 'r', 'b', 'i'),
129             kQ3FFormatReaderType3DMFBinSwapped              = Q3_OBJECT_TYPE('F', 'r', 'b', 's'),
130             kQ3FFormatReaderType3DMFText                    = Q3_OBJECT_TYPE('F', 'r', 't', 'x'),
131 
132         kQ3FileFormatTypeWriter                             = Q3_OBJECT_TYPE('F', 'm', 't', 'W'),
133             kQ3FFormatWriterType3DMFStreamBin               = Q3_OBJECT_TYPE('F', 'w', 's', 'b'),
134             kQ3FFormatWriterType3DMFStreamBinSwap           = Q3_OBJECT_TYPE('F', 'w', 's', 'w'),
135             kQ3FFormatWriterType3DMFStreamText              = Q3_OBJECT_TYPE('F', 'w', 's', 't'),
136             kQ3FFormatWriterType3DMFNormalBin               = Q3_OBJECT_TYPE('F', 'w', 'n', 'b'),
137             kQ3FFormatWriterType3DMFNormalBinSwap           = Q3_OBJECT_TYPE('F', 'w', 'n', 'w'),
138             kQ3FFormatWriterType3DMFNormalText              = Q3_OBJECT_TYPE('F', 'w', 'n', 't'),
139             kQ3FFormatWriterType3DMFDatabaseBin             = Q3_OBJECT_TYPE('F', 'w', 'd', 'b'),
140             kQ3FFormatWriterType3DMFDatabaseBinSwap         = Q3_OBJECT_TYPE('F', 'w', 'd', 'w'),
141             kQ3FFormatWriterType3DMFDatabaseText            = Q3_OBJECT_TYPE('F', 'w', 'd', 't'),
142             kQ3FFormatWriterType3DMFDatabaseStreamBin       = Q3_OBJECT_TYPE('F', 'd', 's', 'b'),
143             kQ3FFormatWriterType3DMFDatabaseStreamBinSwap   = Q3_OBJECT_TYPE('F', 'd', 's', 'w'),
144             kQ3FFormatWriterType3DMFDatabaseStreamText      = Q3_OBJECT_TYPE('F', 'd', 's', 't')
145 };
146 
147 
148 // File format methods
149 enum {
150     // Common
151     kQ3XMethodTypeFFormatClose                  = Q3_METHOD_TYPE('F', 'c', 'l', 's'),
152     kQ3XMethodTypeFFormatGetFormatType          = Q3_METHOD_TYPE('F', 'g', 'f', 't'),
153 
154     // Read
155     kQ3XMethodTypeFFormatCanRead                = Q3_METHOD_TYPE('F', 'i', 'l', 'F'),
156     kQ3XMethodTypeFFormatReadHeader             = Q3_METHOD_TYPE('F', 'r', 'h', 'd'),
157     kQ3XMethodTypeFFormatReadObject             = Q3_METHOD_TYPE('F', 'r', 'o', 'b'),
158     kQ3XMethodTypeFFormatSkipObject             = Q3_METHOD_TYPE('F', 's', 'o', 'b'),
159     kQ3XMethodTypeFFormatGetNextType            = Q3_METHOD_TYPE('F', 'g', 'n', 't'),
160 
161     // Used for Q3XXX_ReadMethods, no strict need to override to implement a new format
162     kQ3XMethodTypeFFormatFloat32Read            = Q3_METHOD_TYPE('F', 'f', '3', 'r'),
163     kQ3XMethodTypeFFormatFloat32ReadArray       = Q3_METHOD_TYPE('F', 'f', '3', 'A'),
164     kQ3XMethodTypeFFormatFloat64Read            = Q3_METHOD_TYPE('F', 'f', '6', 'r'),
165     kQ3XMethodTypeFFormatInt8Read               = Q3_METHOD_TYPE('F', 'i', '8', 'r'),
166     kQ3XMethodTypeFFormatInt8ReadArray     		= Q3_METHOD_TYPE('F', 'i', '8', 'A'),
167     kQ3XMethodTypeFFormatInt16Read              = Q3_METHOD_TYPE('F', 'i', '1', 'r'),
168     kQ3XMethodTypeFFormatInt16ReadArray     	= Q3_METHOD_TYPE('F', 'i', '1', 'A'),
169     kQ3XMethodTypeFFormatInt32Read              = Q3_METHOD_TYPE('F', 'i', '3', 'r'),
170     kQ3XMethodTypeFFormatInt32ReadArray     	= Q3_METHOD_TYPE('F', 'i', '3', 'A'),
171     kQ3XMethodTypeFFormatInt64Read              = Q3_METHOD_TYPE('F', 'i', '6', 'r'),
172     kQ3XMethodTypeFFormatStringRead             = Q3_METHOD_TYPE('F', 's', 't', 'r'),
173     kQ3XMethodTypeFFormatRawRead                = Q3_METHOD_TYPE('F', 'r', 'w', 'r'),
174 
175     // Write
176     kQ3XMethodTypeFFormatSubmitGroup            = Q3_METHOD_TYPE('F', 'w', 'g', 'r'),
177     kQ3XMethodTypeFFormatSubmitObject           = Q3_METHOD_TYPE('F', 'w', 'o', 'b'),
178 
179     // Used for Q3XXX_WriteMethods, no strict need to override to implement a new format
180     kQ3XMethodTypeFFormatFloat32Write           = Q3_METHOD_TYPE('F', 'f', '3', 'w'),
181     kQ3XMethodTypeFFormatFloat64Write           = Q3_METHOD_TYPE('F', 'f', '6', 'w'),
182     kQ3XMethodTypeFFormatInt8Write              = Q3_METHOD_TYPE('F', 'i', '8', 'w'),
183     kQ3XMethodTypeFFormatInt16Write             = Q3_METHOD_TYPE('F', 'i', '1', 'w'),
184     kQ3XMethodTypeFFormatInt32Write             = Q3_METHOD_TYPE('F', 'i', '3', 'w'),
185     kQ3XMethodTypeFFormatInt64Write             = Q3_METHOD_TYPE('F', 'i', '6', 'w'),
186     kQ3XMethodTypeFFormatStringWrite            = Q3_METHOD_TYPE('F', 's', 't', 'w'),
187     kQ3XMethodTypeFFormatRawWrite               = Q3_METHOD_TYPE('F', 'r', 'w', 'w')
188 };
189 
190 
191 // Object 3DMF I/O methods
192 enum {
193     // Version
194     kQ3XMethodTypeObjectFileVersion             = Q3_METHOD_TYPE('v', 'e', 'r', 's'),
195 
196     // Write
197     kQ3XMethodTypeObjectTraverse                = Q3_METHOD_TYPE('t', 'r', 'v', 's'),
198     kQ3XMethodTypeObjectTraverseData            = Q3_METHOD_TYPE('t', 'r', 'v', 'd'),
199     kQ3XMethodTypeObjectWrite                   = Q3_METHOD_TYPE('w', 'r', 'i', 't'),
200 
201     // Read
202     kQ3XMethodTypeObjectReadData                = Q3_METHOD_TYPE('r', 'd', 'd', 't'),
203     kQ3XMethodTypeObjectRead                    = Q3_METHOD_TYPE('r', 'e', 'a', 'd'),
204  #if QUESA_ALLOW_QD3D_EXTENSIONS
205     kQ3XMethodTypeObjectReadDefault             = Q3_METHOD_TYPE('r', 'd', 'd', 'f'),
206  #endif
207     kQ3XMethodTypeObjectAttach                  = Q3_METHOD_TYPE('a', 't', 't', 'c')
208 };
209 
210 
211 
212 
213 
214 //=============================================================================
215 //      Types
216 //-----------------------------------------------------------------------------
217 // File types
218 typedef TQ3Uns32                                TQ3FileMode;
219 typedef TQ3Uns32                                TQ3FileVersion;
220 typedef TQ3Uns32                                TQ3FileReadGroupState;
221 typedef TQ3Object                               TQ3FileFormatObject;
222 
223 
224 // Method types - 3DMF write
225 /*!
226  *	@typedef	TQ3XObjectTraverseMethod
227  *	@abstract	Traversal method (<code>kQ3XMethodTypeObjectTraverse</code>) for a
228  *				custom element or attribute.
229  *	@discussion
230  *		Writing of 3DMF data is done in two phases:  traversal, which figures out which
231  *		objects are to be written and how much space each will use, and the actual
232  *		writing.  Two phases are necessary because the start of a container includes
233  *		the total length of the container, but this cannot be known without asking
234  *		each member of the container.
235  *
236  *		Typically, this method will call <code>Q3XView_SubmitWriteData</code> to
237  *		specify the immediate object data, and then call <code>Q3Object_Submit</code>
238  *		for each child object.
239  *
240  *	@param		object		The object to traverse.
241  *	@param		data		The object's instance data.  In the case of a custom element,
242  *							this is the internal form of the element data.
243  *	@param		view		A view object.
244  *	result		Success or failure of the operation.
245 */
246 typedef Q3_CALLBACK_API_C(TQ3Status,               TQ3XObjectTraverseMethod)       (TQ3Object object, void *data, TQ3ViewObject view);
247 
248 
249 /*!
250  *	@typedef	TQ3XObjectTraverseDataMethod
251  *	@discussion
252  *		This is the custom object method of type <code>kQ3XMethodTypeObjectTraverseData</code>.
253  *		The QuickDraw 3D documention mentions this method, but does not explain how it
254  *		differs from <code>TQ3XObjectTraverseMethod</code>.  Quesa does not use it.
255  */
256 typedef Q3_CALLBACK_API_C(TQ3Status,               TQ3XObjectTraverseDataMethod)   (TQ3Object object, void *data, TQ3ViewObject view);
257 
258 
259 /*!
260  *	@typedef	TQ3XObjectWriteMethod
261  *	@abstract	Object method of type <code>kQ3XMethodTypeObjectWrite</code> for a
262  *				custom element or attribute.
263  *	@discussion
264  *		Writing of 3DMF data is done in two phases:  traversal, which figures out which
265  *		objects are to be written and how much space each will use, and the actual
266  *		writing.  Two phases are necessary because the start of a container includes
267  *		the total length of the container, but this cannot be known without asking
268  *		each member of the container.
269  *
270  *		This method will write the object's instance data using functions such as
271  *		<code>Q3Float32_Write</code>.  An class with no instance data other than
272  *		child objects does not need to provide this method.
273  *
274  *	@param		data		Instance data to write.  This will be the data passed to
275  *							<code>Q3XView_SubmitWriteData</code> by the traversal method.
276  *	@param		theFile		A file object.
277  *	@result		Success or failure of the operation.
278  */
279 typedef Q3_CALLBACK_API_C(TQ3Status,               TQ3XObjectWriteMethod)          (const void *data, TQ3FileObject theFile);
280 
281 
282 /*!
283  *  @typedef
284  *      TQ3XDataDeleteMethod
285  *  @discussion
286  *      Delete method.
287  *
288  *  @param delete           The data to delete.
289  */
290 typedef Q3_CALLBACK_API_C(void,                    TQ3XDataDeleteMethod)           (void *data);
291 
292 
293 /*!
294  *  @typedef
295  *      TQ3XObjectReadMethod
296  *  @discussion
297  *      Read method.
298  *
299  *  @param theFile          The file to read.
300  *	@result                 The object(s) read from the file.
301  */
302 typedef Q3_CALLBACK_API_C(TQ3Object,               TQ3XObjectReadMethod)           (TQ3FileObject theFile);
303 
304 
305 /*!
306  *	@typedef	TQ3XObjectReadDataMethod
307  *	@abstract	Object method of type <code>kQ3XMethodTypeObjectReadData</code> for a
308  *				custom element or attribute.
309  *	@discussion
310  *		The method normally reads the element's data using functions such as
311  *		<code>Q3Float32_Read</code> and <code>Q3File_ReadObject</code> (for child objects),
312  *		then adds the element data to its parent set.
313  *	@param		parentObject		Set object to receive the new element or attribute.
314  *	@param		theFile				A file object.
315  *	@result		Success or failure of the operation.
316  */
317 typedef Q3_CALLBACK_API_C(TQ3Status,               TQ3XObjectReadDataMethod)       (TQ3Object parentObject, TQ3FileObject theFile);
318 
319 
320 #if QUESA_ALLOW_QD3D_EXTENSIONS
321 /*!
322  *  @typedef
323  *      TQ3XObjectReadDefaultMethod
324  *  @discussion
325  *      Read method for default geometries (geometries represented with no data in 3DMF files).
326  *
327  *      <em>This method is not available in QD3D.</em>
328  *
329  *	@param		theFile				A file object.
330  *	@result                 The new default object.
331  */
332 typedef Q3_CALLBACK_API_C(TQ3Object,               TQ3XObjectReadDefaultMethod)    (TQ3FileObject theFile);
333 #endif
334 
335 /*!
336  *  @typedef
337  *      TQ3XObjectAttachMethod
338  *  @discussion
339  *      Attach method.
340  *
341  *  @param childObject      The child object.
342  *  @param parentObject     The parent object.
343  *  @result                 Success or failure of the callback.
344  */
345 typedef Q3_CALLBACK_API_C(TQ3Status,               TQ3XObjectAttachMethod)         (TQ3Object childObject, TQ3Object parentObject);
346 
347 
348 /*!
349  *  @typedef
350  *      TQ3XFFormatCloseMethod
351  *  @discussion
352  *      Close method.
353  *
354  *  @param format           The format to close.
355  *  @param abort            Closing due to an abort.
356  *  @result                 Success or failure of the callback.
357  */
358 typedef Q3_CALLBACK_API_C(TQ3Status,               TQ3XFFormatCloseMethod)         (TQ3FileFormatObject format, TQ3Boolean abort);
359 
360 
361 /*!
362  *  @typedef
363  *      TQ3XFFormatGetFormatTypeMethod
364  *  @discussion
365  *      Get the format type for a file.
366  *
367  *  @param theFile          The file to query.
368  *  @result                 The file format.
369  */
370 typedef Q3_CALLBACK_API_C(TQ3FileMode,             TQ3XFFormatGetFormatTypeMethod) (TQ3FileObject theFile);
371 
372 
373 /*!
374  *	@typedef	TQ3XFFormatCanReadMethod
375  *	@abstract	Returns whether the called FileFormat is able to read the given storage.
376  *	@discussion
377  *				This method is called for every subclass of kQ3FileFormatTypeReader from Q3File_OpenRead.
378  *              Once found a FileFormat that returns something other than kQ3ObjectTypeInvalid in the theFileFormatFound
379  *				parameter the search stops.
380  *
381  *	@param		storage					Storage Object - positioned at zero - that contains the model to read.
382  *	@param		theFileFormatFound		returns the signature of the FileFormat able to read this file
383  *										or kQ3ObjectTypeInvalid.
384  *	@result		Success or failure of the operation.
385  */
386 typedef Q3_CALLBACK_API_C(TQ3Boolean,              TQ3XFFormatCanReadMethod)       (TQ3StorageObject storage, TQ3ObjectType* theFileFormatFound);
387 
388 
389 /*!
390  *  @typedef
391  *      TQ3XFFormatReadHeaderMethod
392  *  @discussion
393  *      Read the header from a file.
394  *
395  *  @param theFile          The file to process.
396  *  @result                 Success or failure of the operation.
397  */
398 typedef Q3_CALLBACK_API_C(TQ3Status,               TQ3XFFormatReadHeaderMethod)    (TQ3FileObject theFile);
399 
400 
401 /*!
402  *  @typedef
403  *      TQ3XFFormatReadObjectMethod
404  *  @discussion
405  *      Read an object from a file.
406  *
407  *  @param theFile          The file to process.
408  *  @result                 Success or failure of the operation.
409  */
410 typedef Q3_CALLBACK_API_C(TQ3Object,               TQ3XFFormatReadObjectMethod)    (TQ3FileObject theFile);
411 
412 
413 /*!
414  *  @typedef
415  *      TQ3XFFormatSkipObjectMethod
416  *  @discussion
417  *      Skip an object in a file.
418  *
419  *  @param theFile          The file to process.
420  *  @result                 Success or failure of the operation.
421  */
422 typedef Q3_CALLBACK_API_C(TQ3Status,               TQ3XFFormatSkipObjectMethod)    (TQ3FileObject theFile);
423 
424 
425 /*!
426  *  @typedef
427  *      TQ3XFFormatGetNextTypeMethod
428  *  @discussion
429  *      Get the next type from a file.
430  *
431  *  @param theFile          The file to process.
432  *  @result                 The next type in the file.
433  */
434 typedef Q3_CALLBACK_API_C(TQ3ObjectType,           TQ3XFFormatGetNextTypeMethod)   (TQ3FileObject theFile);
435 
436 
437 /*!
438  *  @typedef
439  *      TQ3XFileFormatSubmitObjectMethod
440  *  @discussion
441  *      Submit an object to a file.
442  *
443  *  @param theView              The view being submitted to.
444  *  @param fileFormatPrivate    File-format specific data.
445  *  @param theObject            The object to submit.
446  *  @param objectType           The type of theObject.
447  *  @param objectData           The data for theObject.
448  *  @result                     Success or failure of the operation.
449  */
450 typedef Q3_CALLBACK_API_C(TQ3Status,           TQ3XFileFormatSubmitObjectMethod)(
451                             TQ3ViewObject       theView,
452                             void                *fileFormatPrivate,
453                             TQ3Object			theObject,
454 							TQ3ObjectType		objectType,
455 							const void			*objectData);
456 
457 
458 /*!
459  *  @typedef
460  *      TQ3XFFormatFloat32ReadMethod
461  *  @discussion
462  *      Read a 32-bit float from a file.
463  *
464  *  @param format           The file format.
465  *  @param data             Receives the data being read.
466  *  @result                 Success or failure of the operation.
467  */
468 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatFloat32ReadMethod)      (TQ3FileFormatObject format, TQ3Float32* data);
469 
470 
471 /*!
472  *  @typedef
473  *      TQ3XFFormatFloat32ReadArrayMethod
474  *  @discussion
475  *      Read an array of 32-bit floats from a file.
476  *
477  *  @param format           The file format.
478  *  @param numFloats        The number of floats to read.
479  *  @param data             Receives the data being read.
480  *  @result                 Success or failure of the operation.
481  */
482 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatFloat32ReadArrayMethod) (TQ3FileFormatObject format, TQ3Uns32 numFloats, TQ3Float32* data);
483 
484 
485 /*!
486  *  @typedef
487  *      TQ3XFFormatFloat64ReadMethod
488  *  @discussion
489  *      Read a 64-bit float from a file.
490  *
491  *  @param format           The file format.
492  *  @param data             Receives the data being read.
493  *  @result                 Success or failure of the operation.
494  */
495 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatFloat64ReadMethod)      (TQ3FileFormatObject format, TQ3Float64* data);
496 
497 
498 /*!
499  *  @typedef
500  *      TQ3XFFormatInt8ReadMethod
501  *  @discussion
502  *      Read an 8-bit integer from a file.
503  *
504  *  @param format           The file format.
505  *  @param data             Receives the data being read.
506  *  @result                 Success or failure of the operation.
507  */
508 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatInt8ReadMethod)         (TQ3FileFormatObject format, TQ3Int8* data);
509 
510 
511 /*!
512  *  @typedef
513  *      TQ3XFFormatInt8ReadArrayMethod
514  *  @discussion
515  *      Read an array of 8-bit integers from a file.
516  *
517  *  @param format           The file format.
518  *  @param numNums          The number of numbers to read.
519  *  @param data             Receives the data being read.
520  *  @result                 Success or failure of the operation.
521  */
522 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatInt8ReadArrayMethod)    (TQ3FileFormatObject format, TQ3Uns32 numNums, TQ3Int8* data);
523 
524 
525 /*!
526  *  @typedef
527  *      TQ3XFFormatInt16ReadMethod
528  *  @discussion
529  *      Read a 16-bit integer from a file.
530  *
531  *  @param format           The file format.
532  *  @param data             Receives the data being read.
533  *  @result                 Success or failure of the operation.
534  */
535 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatInt16ReadMethod)        (TQ3FileFormatObject format, TQ3Int16* data);
536 
537 
538 /*!
539  *  @typedef
540  *      TQ3XFFormatInt16ReadArrayMethod
541  *  @discussion
542  *      Read an array of 16-bit integers from a file.
543  *
544  *  @param format           The file format.
545  *  @param numNums          The number of numbers to read.
546  *  @param data             Receives the data being read.
547  *  @result                 Success or failure of the operation.
548  */
549 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatInt16ReadArrayMethod)   (TQ3FileFormatObject format, TQ3Uns32 numNums, TQ3Int16* data);
550 
551 
552 /*!
553  *  @typedef
554  *      TQ3XFFormatInt32ReadMethod
555  *  @discussion
556  *      Read a 32-bit integer from a file.
557  *
558  *  @param format           The file format.
559  *  @param data             Receives the data being read.
560  *  @result                 Success or failure of the operation.
561  */
562 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatInt32ReadMethod)        (TQ3FileFormatObject format, TQ3Int32* data);
563 
564 
565 /*!
566  *  @typedef
567  *      TQ3XFFormatInt32ReadArrayMethod
568  *  @discussion
569  *      Read an array of 32-bit integers from a file.
570  *
571  *  @param format           The file format.
572  *  @param numNums          The number of numbers to read.
573  *  @param data             Receives the data being read.
574  *  @result                 Success or failure of the operation.
575  */
576 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatInt32ReadArrayMethod)   (TQ3FileFormatObject format, TQ3Uns32 numNums, TQ3Int32* data);
577 
578 
579 /*!
580  *  @typedef
581  *      TQ3XFFormatInt64ReadMethod
582  *  @discussion
583  *      Read a 64-bit integer from a file.
584  *
585  *  @param format           The file format.
586  *  @param data             Receives the data being read.
587  *  @result                 Success or failure of the operation.
588  */
589 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatInt64ReadMethod)        (TQ3FileFormatObject format, TQ3Int64* data);
590 
591 
592 /*!
593  *  @typedef
594  *      TQ3XFFormatStringReadMethod
595  *  @discussion
596  *      Read a string from a file.
597  *
598  *  @param format           The file format.
599  *  @param data             Receives the data being read.
600  *  @param length           Receives the number of bytes read.
601  *  @result                 Success or failure of the operation.
602  */
603 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatStringReadMethod)       (TQ3FileFormatObject format, char* data, TQ3Uns32 *length);
604 
605 
606 /*!
607  *  @typedef
608  *      TQ3XFFormatRawReadMethod
609  *  @discussion
610  *      Read a block of data from a file.
611  *
612  *  @param format           The file format.
613  *  @param data             Receives the data being read.
614  *  @param length           Receives the number of bytes read.
615  *  @result                 Success or failure of the operation.
616  */
617 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatRawReadMethod)          (TQ3FileFormatObject format, unsigned char* data, TQ3Uns32 length);
618 
619 
620 /*!
621  *  @typedef
622  *      TQ3XFFormatFloat32WriteMethod
623  *  @discussion
624  *      Write a 32-bit float to a file.
625  *
626  *  @param format           The file format.
627  *  @param data             The data to write.
628  *  @result                 Success or failure of the operation.
629  */
630 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatFloat32WriteMethod)(TQ3FileFormatObject format, const TQ3Float32 *data);
631 
632 
633 /*!
634  *  @typedef
635  *      TQ3XFFormatFloat64WriteMethod
636  *  @discussion
637  *      Write a 64-bit float to a file.
638  *
639  *  @param format           The file format.
640  *  @param data             The data to write.
641  *  @result                 Success or failure of the operation.
642  */
643 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatFloat64WriteMethod)(TQ3FileFormatObject format, const TQ3Float64 *data);
644 
645 
646 /*!
647  *  @typedef
648  *      TQ3XFFormatInt8WriteMethod
649  *  @discussion
650  *      Write a 8-bit integer to a file.
651  *
652  *  @param format           The file format.
653  *  @param data             The data to write.
654  *  @result                 Success or failure of the operation.
655  */
656 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatInt8WriteMethod)   (TQ3FileFormatObject format, const TQ3Int8 *data);
657 
658 
659 /*!
660  *  @typedef
661  *      TQ3XFFormatInt16WriteMethod
662  *  @discussion
663  *      Write a 16-bit integer to a file.
664  *
665  *  @param format           The file format.
666  *  @param data             The data to write.
667  *  @result                 Success or failure of the operation.
668  */
669 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatInt16WriteMethod)  (TQ3FileFormatObject format, const TQ3Int16 *data);
670 
671 
672 /*!
673  *  @typedef
674  *      TQ3XFFormatInt32WriteMethod
675  *  @discussion
676  *      Write a 32-bit integer to a file.
677  *
678  *  @param format           The file format.
679  *  @param data             The data to write.
680  *  @result                 Success or failure of the operation.
681  */
682 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatInt32WriteMethod)  (TQ3FileFormatObject format, const TQ3Int32 *data);
683 
684 
685 /*!
686  *  @typedef
687  *      TQ3XFFormatInt64WriteMethod
688  *  @discussion
689  *      Write a 64-bit integer to a file.
690  *
691  *  @param format           The file format.
692  *  @param data             The data to write.
693  *  @result                 Success or failure of the operation.
694  */
695 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatInt64WriteMethod)  (TQ3FileFormatObject format, const TQ3Int64 *data);
696 
697 
698 /*!
699  *  @typedef
700  *      TQ3XFFormatStringWriteMethod
701  *  @discussion
702  *      Write a C-string to a file.
703  *
704  *  @param format           The file format.
705  *  @param data             The data to write.
706  *  @result                 Success or failure of the operation.
707  */
708 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatStringWriteMethod) (TQ3FileFormatObject format, const char* data);
709 
710 
711 /*!
712  *  @typedef
713  *      TQ3XFFormatRawWriteMethod
714  *  @discussion
715  *      Write a block of data to a file.
716  *
717  *  @param format           The file format.
718  *  @param data             The data to write.
719  *  @param length           The number of bytes to write.
720  *  @result                 Success or failure of the operation.
721  */
722 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3XFFormatRawWriteMethod)    (TQ3FileFormatObject format, const unsigned char* data, TQ3Uns32 length);
723 
724 
725 /*!
726  *  @typedef
727  *      TQ3FileIdleMethod
728  *  @discussion
729  *      Idle callback for reading/writing.
730  *
731  *  @param theFile          The file being process.
732  *  @param idlerData        Application-specific data.
733  *  @result                 Success or failure of the operation.
734  */
735 typedef Q3_CALLBACK_API_C(TQ3Status, TQ3FileIdleMethod) (TQ3FileObject theFile, const void *idlerData);
736 
737 
738 /*!
739  *  @struct
740  *      TQ3FFormatBaseData
741  *  @discussion
742  *      Common data for FileFormat objects.
743  *
744  *      This must be the first field in any derived structures.
745  *
746  *      The baseDataVersion, storage, currentStoragePosition, and logicalEOF fields
747  *      are initialised automatically by Quesa. Remaining fields must be initialised
748  *      by the importer.
749  *
750  *  @field baseDataVersion           The base data version.
751  *  @field storage                   The storage object.
752  *  @field currentStoragePosition    The current position within the storage object.
753  *  @field logicalEOF                The number of bytes in the storage object.
754  */
755 typedef struct TQ3FFormatBaseData {
756     // Initialised by Quesa
757     TQ3Uns32                                    baseDataVersion;
758     TQ3StorageObject                            storage;
759     TQ3Uns32                                    currentStoragePosition;
760     TQ3Uns32                                    logicalEOF;
761 
762 
763     // Initialised by the importer
764     TQ3FileVersion                              fileVersion;
765     TQ3Boolean                                  noMoreObjects;
766     TQ3Endian                                   byteOrder;
767     TQ3Boolean                                  readInGroup;
768     TQ3Int32                                    groupDeepCounter;
769     TQ3Uns32                                    *reserved1;
770     TQ3Uns32                                    *reserved2;
771     TQ3Uns32                                    *reserved3;
772 } TQ3FFormatBaseData;
773 
774 
775 /*!
776  *  @struct
777  *      TQ3UnknownTextData
778  *  @discussion
779  *      Unknown text data.
780  *
781  *  @field objectName        The name of the object.
782  *  @field contents          The data for the object.
783  */
784 typedef struct TQ3UnknownTextData {
785     char                                        *objectName;
786     char                                        *contents;
787 } TQ3UnknownTextData;
788 
789 
790 /*!
791  *  @struct
792  *      TQ3UnknownBinaryData
793  *  @discussion
794  *      Unknown binary data.
795  *
796  *  @field objectType        The type of the object.
797  *  @field size              The size of the object data.
798  *  @field byteOrder         The byte order of the object data.
799  *  @field contents          The data for the object.
800  */
801 typedef struct TQ3UnknownBinaryData {
802     TQ3ObjectType                               objectType;
803     TQ3Size                                     size;
804     TQ3Endian                                   byteOrder;
805     char                                        *contents;
806 } TQ3UnknownBinaryData;
807 
808 
809 
810 
811 
812 //=============================================================================
813 //      Macros
814 //-----------------------------------------------------------------------------
815 // Version
816 #define Q3FileVersion(_major, _minor)                   \
817         (TQ3FileVersion) ((((TQ3Uns32) _major & 0xFFFF) << 16) | ((TQ3Uns32) _major & 0xFFFF))
818 
819 #define kQ3FileVersionCurrent                           Q3FileVersion(1, 6)
820 
821 
822 
823 
824 
825 //=============================================================================
826 //      Function prototypes
827 //-----------------------------------------------------------------------------
828 /*!
829  *  @function
830  *      Q3XView_SubmitWriteData
831  *  @discussion
832  *      Submit data to a view for writing.
833  *
834  *  @param view             The view being submitted to.
835  *  @param size             The number of bytes pointed to by data.
836  *  @param data             The data to submit for writing.
837  *  @param deleteData       Delete callback to dispose of the data.
838  *  @result                 Success or failure of the operation.
839  */
840 Q3_EXTERN_API_C ( TQ3Status  )
841 Q3XView_SubmitWriteData (
842     TQ3ViewObject                 view,
843     TQ3Size                       size,
844     void                          *data,
845     TQ3XDataDeleteMethod          deleteData
846 );
847 
848 
849 
850 /*!
851  *  @function
852  *      Q3XView_SubmitSubObjectData
853  *  @discussion
854  *      Submit a sub-object to a view for writing.
855  *
856  *  @param view             The view being submitted to.
857  *  @param objectClass      The class of the object being submitted.
858  *  @param size             The number of bytes pointed to by data.
859  *  @param data             The data for the object.
860  *  @param deleteData       Delete callback to dispose of the data.
861  *  @result                 Success or failure of the operation.
862  */
863 Q3_EXTERN_API_C ( TQ3Status  )
864 Q3XView_SubmitSubObjectData (
865     TQ3ViewObject                 view,
866     TQ3XObjectClass               objectClass,
867     TQ3Uns32                      size,
868     void                          *data,
869     TQ3XDataDeleteMethod          deleteData
870 );
871 
872 
873 
874 /*!
875  *  @function
876  *      Q3File_New
877  *  @discussion
878  *      Create a new file object.
879  *
880  *  @result                 The new file object.
881  */
882 Q3_EXTERN_API_C ( TQ3FileObject  )
883 Q3File_New (
884     void
885 );
886 
887 
888 
889 /*!
890  *  @function
891  *      Q3File_GetStorage
892  *  @discussion
893  *      Get the storage object for a file.
894  *
895  *  @param theFile          The file to query.
896  *  @param storage          Receives the storage object for the file.
897  *  @result                 Success or failure of the operation.
898  */
899 Q3_EXTERN_API_C ( TQ3Status  )
900 Q3File_GetStorage (
901     TQ3FileObject                 theFile,
902     TQ3StorageObject              *storage
903 );
904 
905 
906 
907 /*!
908  *  @function
909  *      Q3File_SetStorage
910  *  @discussion
911  *      Set the storage objectfor a file.
912  *
913  *  @param theFile          The file to query.
914  *  @param storage          The new storage object for the file.
915  *  @result                 Success or failure of the operation.
916  */
917 Q3_EXTERN_API_C ( TQ3Status  )
918 Q3File_SetStorage (
919     TQ3FileObject                 theFile,
920     TQ3StorageObject              storage
921 );
922 
923 
924 
925 /*!
926  *  @function
927  *      Q3File_OpenRead
928  *  @discussion
929  *      Open a file object for reading.
930  *
931  *		Associate a FileFormat object with the File
932  *
933  *      The file object must already have a storage object associated
934  *      with it, and must not already be open.
935  *
936  *  @param theFile          The file object.
937  *  @param mode             Receives a combination of TQ3FileModeMasks values if the file is a 3DMF file,
938  *							otherway it receives the choosed file format signature.
939  *                          Pass NULL if you don't need this information.
940  *  @result                 Success or failure of the operation.
941  */
942 Q3_EXTERN_API_C ( TQ3Status  )
943 Q3File_OpenRead (
944     TQ3FileObject                 theFile,
945     TQ3FileMode                   *mode
946 );
947 
948 
949 
950 /*!
951  *  @function
952  *      Q3File_OpenWrite
953  *  @discussion
954  *      Open a file object for writing.
955  *
956  *      The file object must have a storage object associated with it,
957  *      and must not already be open.
958  *
959  *		Currently, Quesa ignores the mode parameter and writes in binary stream mode.
960  *
961  *  @param theFile          The file object.
962  *  @param mode             A combination of TQ3FileModeMasks values, or the file format class signature.
963  *  @result                 Success or failure of the operation.
964  */
965 Q3_EXTERN_API_C ( TQ3Status  )
966 Q3File_OpenWrite (
967     TQ3FileObject                 theFile,
968     TQ3FileMode                   mode
969 );
970 
971 
972 
973 /*!
974  *  @function
975  *      Q3File_IsOpen
976  *  @discussion
977  *      Determines whether a file object is open.
978  *
979  *  @param theFile          The file object.
980  *  @param isOpen           Receives kQ3True if the file is open.
981  *  @result                 Success or failure of the operation.
982  */
983 Q3_EXTERN_API_C ( TQ3Status  )
984 Q3File_IsOpen (
985     TQ3FileObject                 theFile,
986     TQ3Boolean                    *isOpen
987 );
988 
989 
990 
991 /*!
992  *  @function
993  *      Q3File_GetMode
994  *  @discussion
995  *      Determine the mode of an open file object.
996  *
997  *  @param theFile          The file object.
998  *  @param mode             Receives the current mode mask.
999  *  @result                 Success or failure of the operation.
1000  */
1001 Q3_EXTERN_API_C ( TQ3Status  )
1002 Q3File_GetMode (
1003     TQ3FileObject                 theFile,
1004     TQ3FileMode                   *mode
1005 );
1006 
1007 
1008 
1009 /*!
1010  *  @function
1011  *      Q3File_GetVersion
1012  *  @discussion
1013  *      Get the file format version of an open file.
1014  *
1015  *  @param theFile          The file object.
1016  *  @param version          Receives the file format version.
1017  *  @result                 Success or failure of the operation.
1018  */
1019 Q3_EXTERN_API_C ( TQ3Status  )
1020 Q3File_GetVersion (
1021     TQ3FileObject                 theFile,
1022     TQ3FileVersion                *version
1023 );
1024 
1025 
1026 
1027 /*!
1028  *  @function
1029  *      Q3File_Close
1030  *  @discussion
1031  *      Close a file object.
1032  *
1033  *      When a file object is deleted (i.e., its last reference is disposed),
1034  *      it is automatically closed, therefore you may not need to call
1035  *		Q3File_Close.
1036  *
1037  *  @param theFile          The file object.
1038  *  @result                 Success or failure of the operation.
1039  */
1040 Q3_EXTERN_API_C ( TQ3Status  )
1041 Q3File_Close (
1042     TQ3FileObject                 theFile
1043 );
1044 
1045 
1046 
1047 /*!
1048  *  @function
1049  *      Q3File_Cancel
1050  *  @discussion
1051  *      Cancel a read/write operation on a file.
1052  *
1053  *  @param theFile          The file to cancel the current read/write operation for.
1054  *  @result                 Success or failure of the operation.
1055  */
1056 Q3_EXTERN_API_C ( TQ3Status  )
1057 Q3File_Cancel (
1058     TQ3FileObject                 theFile
1059 );
1060 
1061 
1062 
1063 /*!
1064  *  @function
1065  *      Q3View_StartWriting
1066  *  @discussion
1067  *      Start a writing loop.
1068  *
1069  *  @param view             The view to start writing to.
1070  *  @param theFile          The file to start writing to.
1071  *  @result                 Success or failure of the operation.
1072  */
1073 Q3_EXTERN_API_C ( TQ3Status  )
1074 Q3View_StartWriting (
1075     TQ3ViewObject                 view,
1076     TQ3FileObject                 theFile
1077 );
1078 
1079 
1080 
1081 /*!
1082  *  @function
1083  *      Q3View_EndWriting
1084  *  @discussion
1085  *      End a writing loop.
1086  *
1087  *  @param view             The view to end writing to.
1088  *  @result                 Success or failure of the writing loop.
1089  *                          Note that the result is a TQ3ViewStatus, not a TQ3Status.
1090  */
1091 Q3_EXTERN_API_C ( TQ3ViewStatus  )
1092 Q3View_EndWriting (
1093     TQ3ViewObject                 view
1094 );
1095 
1096 
1097 
1098 /*!
1099  *  @function
1100  *      Q3File_GetNextObjectType
1101  *  @discussion
1102  *      Get the type of the next object in a file.
1103  *
1104  *  @param theFile          The file to query.
1105  *  @result                 The type of the next object in the file.
1106  */
1107 Q3_EXTERN_API_C ( TQ3ObjectType  )
1108 Q3File_GetNextObjectType (
1109     TQ3FileObject                 theFile
1110 );
1111 
1112 
1113 
1114 /*!
1115  *  @function
1116  *      Q3File_IsNextObjectOfType
1117  *  @discussion
1118  *      Test the type of the next object in a file.
1119  *
1120  *  @param theFile          The file to query.
1121  *  @param ofType           The type to compare against.
1122  *  @result                 Does the next object match the specified type?
1123  */
1124 Q3_EXTERN_API_C ( TQ3Boolean  )
1125 Q3File_IsNextObjectOfType (
1126     TQ3FileObject                 theFile,
1127     TQ3ObjectType                 ofType
1128 );
1129 
1130 
1131 
1132 /*!
1133  *  @function
1134  *      Q3File_ReadObject
1135  *  @discussion
1136  *      Read an object from a 3DMF file.
1137  *
1138  *      The file must already be open for reading.
1139  *      the typical usage of this function and any special requirements.
1140  *
1141  *  @param theFile          The file object.
1142  *  @result                 The new object, or NULL on failure.
1143  */
1144 Q3_EXTERN_API_C ( TQ3Object  )
1145 Q3File_ReadObject (
1146     TQ3FileObject                 theFile
1147 );
1148 
1149 
1150 
1151 /*!
1152  *  @function
1153  *      Q3File_SkipObject
1154  *  @discussion
1155  *      Skip the next object in a file.
1156  *
1157  *  @param theFile          The file to process.
1158  *  @result                 Success or failure of the operation.
1159  */
1160 Q3_EXTERN_API_C ( TQ3Status  )
1161 Q3File_SkipObject (
1162     TQ3FileObject                 theFile
1163 );
1164 
1165 
1166 
1167 /*!
1168  *  @function
1169  *      Q3File_IsEndOfData
1170  *  @discussion
1171  *      Has the end of the data within a file been reached?
1172  *
1173  *  @param theFile          The file to query.
1174  *  @result                 Has the end of the data been reached?
1175  */
1176 Q3_EXTERN_API_C ( TQ3Boolean  )
1177 Q3File_IsEndOfData (
1178     TQ3FileObject                 theFile
1179 );
1180 
1181 
1182 
1183 /*!
1184  *  @function
1185  *      Q3File_IsEndOfContainer
1186  *  @discussion
1187  *      Has the end of the current container in a file been reached?
1188  *
1189  *  @param theFile          The file to query.
1190  *  @param rootObject       The root object in the container.
1191  *  @result                 Has the end of the container been reached?
1192  */
1193 Q3_EXTERN_API_C ( TQ3Boolean  )
1194 Q3File_IsEndOfContainer (
1195     TQ3FileObject                 theFile,
1196     TQ3Object                     rootObject
1197 );
1198 
1199 
1200 
1201 /*!
1202  *  @function
1203  *      Q3File_IsEndOfFile
1204  *  @discussion
1205  *      Has the end of a file been reached?
1206  *
1207  *  @param theFile          The file to query.
1208  *  @result                 Has the end of the file been reached?
1209  */
1210 Q3_EXTERN_API_C ( TQ3Boolean  )
1211 Q3File_IsEndOfFile (
1212     TQ3FileObject                 theFile
1213 );
1214 
1215 
1216 
1217 /*!
1218  *  @function
1219  *      Q3File_MarkAsExternalReference
1220  *  @discussion
1221  *      Mark an object within a file as being an external reference.
1222  *
1223  *  @param theFile          The file to update.
1224  *  @param sharedObject     The object to mark as external.
1225  *  @result                 Success or failure of the operation.
1226  */
1227 Q3_EXTERN_API_C ( TQ3Status  )
1228 Q3File_MarkAsExternalReference (
1229     TQ3FileObject                 theFile,
1230     TQ3SharedObject               sharedObject
1231 );
1232 
1233 
1234 
1235 /*!
1236  *  @function
1237  *      Q3File_GetExternalReferences
1238  *  @discussion
1239  *      Get the external references of a file.
1240  *
1241  *  @param theFile          The file to query.
1242  *  @result                 The external objects within the file.
1243  */
1244 Q3_EXTERN_API_C ( TQ3GroupObject  )
1245 Q3File_GetExternalReferences (
1246     TQ3FileObject                 theFile
1247 );
1248 
1249 
1250 
1251 /*!
1252  *  @function
1253  *      Q3Shared_ClearEditTracking
1254  *  @discussion
1255  *      Clear the edit tracking state of a shared object.
1256  *
1257  *  @param sharedObject     The shared object to update.
1258  *  @result                 Success or failure of the operation.
1259  */
1260 Q3_EXTERN_API_C ( TQ3Status  )
1261 Q3Shared_ClearEditTracking (
1262     TQ3SharedObject               sharedObject
1263 );
1264 
1265 
1266 
1267 /*!
1268  *  @function
1269  *      Q3Shared_GetEditTrackingState
1270  *  @discussion
1271  *      Get the edit tracking state of a shared object.
1272  *
1273  *  @param sharedObject     The shared object to update.
1274  *  @result                 the current edit tracking state of the object.
1275  */
1276 Q3_EXTERN_API_C ( TQ3Boolean  )
1277 Q3Shared_GetEditTrackingState (
1278     TQ3SharedObject               sharedObject
1279 );
1280 
1281 
1282 
1283 /*!
1284  *  @function
1285  *      Q3File_SetReadInGroup
1286  *  @discussion
1287  *      Set the group reading state for a file.
1288  *
1289  *  @param theFile          The file to update.
1290  *  @param readGroupState   The new group reading state for the file.
1291  *  @result                 Success or failure of the operation.
1292  */
1293 Q3_EXTERN_API_C ( TQ3Status  )
1294 Q3File_SetReadInGroup (
1295     TQ3FileObject                 theFile,
1296     TQ3FileReadGroupState         readGroupState
1297 );
1298 
1299 
1300 
1301 /*!
1302  *  @function
1303  *      Q3File_GetReadInGroup
1304  *  @discussion
1305  *      Get the group reading state for a file.
1306  *
1307  *  @param theFile          The file to query.
1308  *  @param readGroupState   Receives the group reading state for the file.
1309  *  @result                 Success or failure of the operation.
1310  */
1311 Q3_EXTERN_API_C ( TQ3Status  )
1312 Q3File_GetReadInGroup (
1313     TQ3FileObject                 theFile,
1314     TQ3FileReadGroupState         *readGroupState
1315 );
1316 
1317 
1318 
1319 /*!
1320  *  @function
1321  *      Q3File_SetIdleMethod
1322  *  @discussion
1323  *      Set the idle method for a file.
1324  *
1325  *  @param theFile          The file to update.
1326  *  @param idle             The idle callback.
1327  *  @param idleData         Application-specific data for the idle callback.
1328  *  @result                 Success or failure of the operation.
1329  */
1330 Q3_EXTERN_API_C ( TQ3Status  )
1331 Q3File_SetIdleMethod (
1332     TQ3FileObject                 theFile,
1333     TQ3FileIdleMethod             idle,
1334     const void                    *idleData
1335 );
1336 
1337 
1338 
1339 /*!
1340  *  @function
1341  *      Q3NewLine_Write
1342  *  @discussion
1343  *      Write a newline to a file.
1344  *
1345  *  @param theFile          The file to write to.
1346  *  @result                 Success or failure of the operation.
1347  */
1348 Q3_EXTERN_API_C ( TQ3Status  )
1349 Q3NewLine_Write (
1350     TQ3FileObject                 theFile
1351 );
1352 
1353 
1354 
1355 /*!
1356  *  @function
1357  *      Q3Uns8_Read
1358  *  @discussion
1359  *      Read a TQ3Uns8 from a file.
1360  *
1361  *  @param data             Receives the data read from the file.
1362  *  @param theFile          The file to read from.
1363  *  @result                 Success or failure of the operation.
1364  */
1365 Q3_EXTERN_API_C ( TQ3Status  )
1366 Q3Uns8_Read (
1367     TQ3Uns8                       *data,
1368     TQ3FileObject                 theFile
1369 );
1370 
1371 
1372 
1373 /*!
1374  *  @function
1375  *      Q3Uns8_Write
1376  *  @discussion
1377  *      Write a TQ3Uns8 to a file.
1378  *
1379  *  @param data             The data to write to the file.
1380  *  @param theFile          The file to write to.
1381  *  @result                 Success or failure of the operation.
1382  */
1383 Q3_EXTERN_API_C ( TQ3Status  )
1384 Q3Uns8_Write (
1385     TQ3Uns8                       data,
1386     TQ3FileObject                 theFile
1387 );
1388 
1389 
1390 
1391 /*!
1392  *  @function
1393  *      Q3Uns16_Read
1394  *  @discussion
1395  *      Read a TQ3Uns16 from a file.
1396  *
1397  *  @param data             Receives the data read from the file.
1398  *  @param theFile          The file to read from.
1399  */
1400 Q3_EXTERN_API_C ( TQ3Status  )
1401 Q3Uns16_Read (
1402     TQ3Uns16                      *data,
1403     TQ3FileObject                 theFile
1404 );
1405 
1406 
1407 
1408 /*!
1409  *  @function
1410  *      Q3Uns16_Write
1411  *  @discussion
1412  *      Write a TQ3Uns16 to a file.
1413  *
1414  *  @param data             The data to write to the file.
1415  *  @param theFile          The file to write to.
1416  *  @result                 Success or failure of the operation.
1417  */
1418 Q3_EXTERN_API_C ( TQ3Status  )
1419 Q3Uns16_Write (
1420     TQ3Uns16                      data,
1421     TQ3FileObject                 theFile
1422 );
1423 
1424 
1425 
1426 /*!
1427  *  @function
1428  *      Q3Uns32_Read
1429  *  @discussion
1430  *      Read a TQ3Uns32 from a file.
1431  *
1432  *  @param data             Receives the data read from the file.
1433  *  @param theFile          The file to read from.
1434  */
1435 Q3_EXTERN_API_C ( TQ3Status  )
1436 Q3Uns32_Read (
1437     TQ3Uns32                      *data,
1438     TQ3FileObject                 theFile
1439 );
1440 
1441 
1442 
1443 /*!
1444  *  @function
1445  *      Q3Uns32_Write
1446  *  @discussion
1447  *      Write a TQ3Uns32 to a file.
1448  *
1449  *  @param data             The data to write to the file.
1450  *  @param theFile          The file to write to.
1451  *  @result                 Success or failure of the operation.
1452  */
1453 Q3_EXTERN_API_C ( TQ3Status  )
1454 Q3Uns32_Write (
1455     TQ3Uns32                      data,
1456     TQ3FileObject                 theFile
1457 );
1458 
1459 
1460 
1461 /*!
1462  *  @function
1463  *      Q3Int8_Read
1464  *  @discussion
1465  *      Read a TQ3Int8 from a file.
1466  *
1467  *  @param data             Receives the data read from the file.
1468  *  @param theFile          The file to read from.
1469  */
1470 Q3_EXTERN_API_C ( TQ3Status  )
1471 Q3Int8_Read (
1472     TQ3Int8                       *data,
1473     TQ3FileObject                 theFile
1474 );
1475 
1476 
1477 
1478 /*!
1479  *  @function
1480  *      Q3Int8_Write
1481  *  @discussion
1482  *      Write a TQ3Int8 to a file.
1483  *
1484  *  @param data             The data to write to the file.
1485  *  @param theFile          The file to write to.
1486  *  @result                 Success or failure of the operation.
1487  */
1488 Q3_EXTERN_API_C ( TQ3Status  )
1489 Q3Int8_Write (
1490     TQ3Int8                       data,
1491     TQ3FileObject                 theFile
1492 );
1493 
1494 
1495 
1496 /*!
1497  *  @function
1498  *      Q3Int16_Read
1499  *  @discussion
1500  *      Read a TQ3Int16 from a file.
1501  *
1502  *  @param data             Receives the data read from the file.
1503  *  @param theFile          The file to read from.
1504  */
1505 Q3_EXTERN_API_C ( TQ3Status  )
1506 Q3Int16_Read (
1507     TQ3Int16                      *data,
1508     TQ3FileObject                 theFile
1509 );
1510 
1511 
1512 
1513 /*!
1514  *  @function
1515  *      Q3Int16_Write
1516  *  @discussion
1517  *      Write a TQ3Int16 to a file.
1518  *
1519  *  @param data             The data to write to the file.
1520  *  @param theFile          The file to write to.
1521  *  @result                 Success or failure of the operation.
1522  */
1523 Q3_EXTERN_API_C ( TQ3Status  )
1524 Q3Int16_Write (
1525     TQ3Int16                      data,
1526     TQ3FileObject                 theFile
1527 );
1528 
1529 
1530 
1531 /*!
1532  *  @function
1533  *      Q3Int32_Read
1534  *  @discussion
1535  *      Read a TQ3Int32 from a file.
1536  *
1537  *  @param data             Receives the data read from the file.
1538  *  @param theFile          The file to read from.
1539  */
1540 Q3_EXTERN_API_C ( TQ3Status  )
1541 Q3Int32_Read (
1542     TQ3Int32                      *data,
1543     TQ3FileObject                 theFile
1544 );
1545 
1546 
1547 
1548 /*!
1549  *  @function
1550  *      Q3Int32_Write
1551  *  @discussion
1552  *      Write a TQ3Int32 to a file.
1553  *
1554  *  @param data             The data to write to the file.
1555  *  @param theFile          The file to write to.
1556  *  @result                 Success or failure of the operation.
1557  */
1558 Q3_EXTERN_API_C ( TQ3Status  )
1559 Q3Int32_Write (
1560     TQ3Int32                      data,
1561     TQ3FileObject                 theFile
1562 );
1563 
1564 
1565 
1566 /*!
1567  *  @function
1568  *      Q3Uns64_Read
1569  *  @discussion
1570  *      Read a TQ3Uns64 from a file.
1571  *
1572  *  @param data             Receives the data read from the file.
1573  *  @param theFile          The file to read from.
1574  */
1575 Q3_EXTERN_API_C ( TQ3Status  )
1576 Q3Uns64_Read (
1577     TQ3Uns64                      *data,
1578     TQ3FileObject                 theFile
1579 );
1580 
1581 
1582 
1583 /*!
1584  *  @function
1585  *      Q3Uns64_Write
1586  *  @discussion
1587  *      Write a TQ3Uns64 to a file.
1588  *
1589  *  @param data             The data to write to the file.
1590  *  @param theFile          The file to write to.
1591  *  @result                 Success or failure of the operation.
1592  */
1593 Q3_EXTERN_API_C ( TQ3Status  )
1594 Q3Uns64_Write (
1595     TQ3Uns64                      data,
1596     TQ3FileObject                 theFile
1597 );
1598 
1599 
1600 
1601 /*!
1602  *  @function
1603  *      Q3Int64_Read
1604  *  @discussion
1605  *      Read a TQ3Int64 from a file.
1606  *
1607  *  @param data             Receives the data read from the file.
1608  *  @param theFile          The file to read from.
1609  */
1610 Q3_EXTERN_API_C ( TQ3Status  )
1611 Q3Int64_Read (
1612     TQ3Int64                      *data,
1613     TQ3FileObject                 theFile
1614 );
1615 
1616 
1617 
1618 /*!
1619  *  @function
1620  *      Q3Int64_Write
1621  *  @discussion
1622  *      Write a TQ3Int64 to a file.
1623  *
1624  *  @param data             The data to write to the file.
1625  *  @param theFile          The file to write to.
1626  *  @result                 Success or failure of the operation.
1627  */
1628 Q3_EXTERN_API_C ( TQ3Status  )
1629 Q3Int64_Write (
1630     TQ3Int64                      data,
1631     TQ3FileObject                 theFile
1632 );
1633 
1634 
1635 
1636 /*!
1637  *  @function
1638  *      Q3Float32_Read
1639  *  @discussion
1640  *      Read a TQ3Float32 from a file.
1641  *
1642  *  @param data             Receives the data read from the file.
1643  *  @param theFile          The file to read from.
1644  */
1645 Q3_EXTERN_API_C ( TQ3Status  )
1646 Q3Float32_Read (
1647     TQ3Float32                    *data,
1648     TQ3FileObject                 theFile
1649 );
1650 
1651 
1652 
1653 /*!
1654  *  @function
1655  *      Q3Float32_Write
1656  *  @discussion
1657  *      Write a TQ3Float32 to a file.
1658  *
1659  *  @param data             The data to write to the file.
1660  *  @param theFile          The file to write to.
1661  *  @result                 Success or failure of the operation.
1662  */
1663 Q3_EXTERN_API_C ( TQ3Status  )
1664 Q3Float32_Write (
1665     TQ3Float32                    data,
1666     TQ3FileObject                 theFile
1667 );
1668 
1669 
1670 
1671 /*!
1672  *  @function
1673  *      Q3Float64_Read
1674  *  @discussion
1675  *      Read a TQ3Float64 from a file.
1676  *
1677  *  @param data             Receives the data read from the file.
1678  *  @param theFile          The file to read from.
1679  */
1680 Q3_EXTERN_API_C ( TQ3Status  )
1681 Q3Float64_Read (
1682     TQ3Float64                    *data,
1683     TQ3FileObject                 theFile
1684 );
1685 
1686 
1687 
1688 /*!
1689  *  @function
1690  *      Q3Float64_Write
1691  *  @discussion
1692  *      Write a TQ3Float64 to a file.
1693  *
1694  *  @param data             The data to write to the file.
1695  *  @param theFile          The file to write to.
1696  *  @result                 Success or failure of the operation.
1697  */
1698 Q3_EXTERN_API_C ( TQ3Status  )
1699 Q3Float64_Write (
1700     TQ3Float64                    data,
1701     TQ3FileObject                 theFile
1702 );
1703 
1704 
1705 
1706 /*!
1707  *  @function
1708  *      Q3Size_Pad
1709  *  @discussion
1710  *      Pad a number of bytes to be long-word aligned.
1711  *
1712  *      In other words, this rounds a number up to a multiple of 4.
1713  *
1714  *  @param size             An unsigned integer.
1715  *  @result                 Next multiple of 4.
1716  */
1717 Q3_EXTERN_API_C ( TQ3Size  )
1718 Q3Size_Pad (
1719     TQ3Size                       size
1720 );
1721 
1722 
1723 
1724 /*!
1725  *  @function
1726  *      Q3String_Read
1727  *  @discussion
1728  *      Read a C string from a file.
1729  *
1730  *		Note that the length parameter is an output-only parameter.  That is,
1731  *		this function does not know the size of your buffer, it simply
1732  *		assumes that you have allocated <code>kQ3StringMaximumLength</code> bytes.
1733  *
1734  *      If you pass NULL for the buffer, <code>Q3String_Read</code> will still
1735  *		find the length of the string, but will leave the file object's position
1736  *		at the beginning of the string.
1737  *
1738  *		If it reads a string of length at least <code>kQ3StringMaximumLength</code>,
1739  *		and you have passed a non-NULL buffer, then Quesa will post the warning
1740  *		<code>kQ3WarningStringExceedsMaximumLength</code>.
1741  *
1742  *  @param data             Buffer to receive string data, of size
1743  *							<code>kQ3StringMaximumLength</code>, or NULL.
1744  *  @param length           Receives length in bytes of string data that was read,
1745  *							not including the terminating NUL character.
1746  *  @param theFile          A file object.
1747  *  @result                 Success or failure of the operation.
1748  */
1749 Q3_EXTERN_API_C ( TQ3Status  )
1750 Q3String_Read (
1751     char                          *data,
1752     TQ3Uns32                      *length,
1753     TQ3FileObject                 theFile
1754 );
1755 
1756 
1757 
1758 /*!
1759  *	@function
1760  *		Q3String_ReadUnlimited
1761  *	@discussion
1762  *		Read a NUL-terminated string (C string) from a file.
1763  *
1764  *		Unlike the QD3D function <code>Q3String_Read</code>, this function is not
1765  *      limited to reading at most <code>kQ3StringMaximumLength</code> bytes. Note that
1766  *		the length parameter is an input-output parameter.
1767  *
1768  *      If you pass NULL for the buffer, <code>Q3String_ReadUnlimited</code> will still
1769  *		find the length of the string, but will leave the file object's position
1770  *		at the beginning of the string.  Therefore, you can read a string of
1771  *		unknown size as follows:
1772  *
1773  *		<blockquote><pre><code>
1774  *		Q3String_Read( NULL, &stringSize, theFile );
1775  *		stringSize += 1;	// make room for terminal NUL byte
1776  *		buffer = Q3Memory_Allocate( stringSize );
1777  *		Q3String_Read( buffer, &stringSize, theFile );
1778  *		</code></pre></blockquote>
1779  *
1780  *		If you passed a non-NULL buffer that was not big enough for the whole string,
1781  *		Quesa posts <code>kQ3WarningStringExceedsMaximumLength</code>.
1782  *
1783  *      <em>This function is not available in QD3D.</em>
1784  *
1785  *	@param	data			Buffer to receive string data, or NULL.
1786  *	@param	ioLength		Pass the size of your buffer.  Receives the number of
1787  *							bytes of string data found in the file, not including
1788  *							the terminal NUL byte, even if it did not all fit in the
1789  *							buffer.
1790  *	@param	theFile         A file object.
1791  *  @result                 Success or failure of the operation.
1792  */
1793 #if QUESA_ALLOW_QD3D_EXTENSIONS
1794 Q3_EXTERN_API_C ( TQ3Status  )
1795 Q3String_ReadUnlimited(
1796     char                          *data,
1797     TQ3Uns32                      *ioLength,
1798     TQ3FileObject                 theFile
1799 );
1800 #endif
1801 
1802 
1803 
1804 /*!
1805  *  @function
1806  *      Q3String_Write
1807  *  @discussion
1808  *      Write a NUL-terminated string (C string) to a file.
1809  *
1810  *      This writes a NUL-terminated string to a file, and if necessary writes
1811  *      up to 3 more pad bytes.  If the string's length, including the terminal
1812  *		NUL byte, exceeds <code>kQ3StringMaximumLength</code>, then the error
1813  *		<code>kQ3ErrorStringExceedsMaximumLength</code> will be posted and
1814  *		<code>kQ3StringMaximumLength</code> bytes will be written.
1815  *
1816  *  @param data             A NUL-terminated string.
1817  *  @param theFile          A file object.
1818  *  @result                 Success or failure of the operation.
1819  */
1820 Q3_EXTERN_API_C ( TQ3Status  )
1821 Q3String_Write (
1822     const char                    *data,
1823     TQ3FileObject                 theFile
1824 );
1825 
1826 
1827 
1828 /*!
1829  *	@function
1830  *		Q3String_WriteUnlimited
1831  *	@discussion
1832  *		Write a NUL-terminated string (C string) to a file.  If necessary it writes
1833  *		up to 3 more pad bytes to make the total number of bytes a multiple of 4.
1834  *
1835  *		<em>This function is not available in QuickDraw 3D</em>.
1836  *
1837  *  @param data             A NUL-terminated string.
1838  *  @param theFile          A file object.
1839  *  @result                 Success or failure of the operation.
1840  */
1841 #if QUESA_ALLOW_QD3D_EXTENSIONS
1842 Q3_EXTERN_API_C ( TQ3Status  )
1843 Q3String_WriteUnlimited (
1844     const char                    *data,
1845     TQ3FileObject                 theFile
1846 );
1847 #endif
1848 
1849 
1850 
1851 /*!
1852  *  @function
1853  *      Q3RawData_Read
1854  *  @discussion
1855  *      Read a block of data from a file.
1856  *
1857  *  @param data             Receives the data read from the file.
1858  *  @param size             The number of bytes to read.
1859  *  @param theFile          The file to read from.
1860  *  @result                 Success or failure of the operation.
1861  */
1862 Q3_EXTERN_API_C ( TQ3Status  )
1863 Q3RawData_Read (
1864     unsigned char                 *data,
1865     TQ3Uns32                      size,
1866     TQ3FileObject                 theFile
1867 );
1868 
1869 
1870 
1871 /*!
1872  *  @function
1873  *      Q3RawData_Write
1874  *  @discussion
1875  *      Write a block of data to a file.
1876  *
1877  *  @param data             The data to write to the file.
1878  *  @param size             The number of bytes to write.
1879  *  @param theFile          The file to write to.
1880  *  @result                 Success or failure of the operation.
1881  */
1882 Q3_EXTERN_API_C ( TQ3Status  )
1883 Q3RawData_Write (
1884     const unsigned char           *data,
1885     TQ3Uns32                      size,
1886     TQ3FileObject                 theFile
1887 );
1888 
1889 
1890 
1891 /*!
1892  *  @function
1893  *      Q3Point2D_Read
1894  *  @discussion
1895  *      Read a TQ3Point2D from a file.
1896  *
1897  *  @param point2D          Receives the point read from the file.
1898  *  @param theFile          The file to read from.
1899  *  @result                 Success or failure of the operation.
1900  */
1901 Q3_EXTERN_API_C ( TQ3Status  )
1902 Q3Point2D_Read (
1903     TQ3Point2D                    *point2D,
1904     TQ3FileObject                 theFile
1905 );
1906 
1907 
1908 
1909 /*!
1910  *  @function
1911  *      Q3Point2D_Write
1912  *  @discussion
1913  *      Write a TQ3Point2D to a file.
1914  *
1915  *  @param point2D          The point to write to the file.
1916  *  @param theFile          The file to write to.
1917  *  @result                 Success or failure of the operation.
1918  */
1919 Q3_EXTERN_API_C ( TQ3Status  )
1920 Q3Point2D_Write (
1921     const TQ3Point2D              *point2D,
1922     TQ3FileObject                 theFile
1923 );
1924 
1925 
1926 
1927 /*!
1928  *  @function
1929  *      Q3Point3D_Read
1930  *  @discussion
1931  *      Read a TQ3Point3D from a file.
1932  *
1933  *  @param point3D          Receives the point read from the file.
1934  *  @param theFile          The file to read from.
1935  *  @result                 Success or failure of the operation.
1936  */
1937 Q3_EXTERN_API_C ( TQ3Status  )
1938 Q3Point3D_Read (
1939     TQ3Point3D                    *point3D,
1940     TQ3FileObject                 theFile
1941 );
1942 
1943 
1944 
1945 /*!
1946  *  @function
1947  *      Q3Point3D_Write
1948  *  @discussion
1949  *      Write a TQ3Point3D to a file.
1950  *
1951  *  @param point3D          The point to write to the file.
1952  *  @param theFile          The file to write to.
1953  *  @result                 Success or failure of the operation.
1954  */
1955 Q3_EXTERN_API_C ( TQ3Status  )
1956 Q3Point3D_Write (
1957     const TQ3Point3D              *point3D,
1958     TQ3FileObject                 theFile
1959 );
1960 
1961 
1962 
1963 /*!
1964  *  @function
1965  *      Q3RationalPoint3D_Read
1966  *  @discussion
1967  *      Read a TQ3RationalPoint3D from a file.
1968  *
1969  *  @param point3D          Receives the point read from the file.
1970  *  @param theFile          The file to read from.
1971  *  @result                 Success or failure of the operation.
1972  */
1973 Q3_EXTERN_API_C ( TQ3Status  )
1974 Q3RationalPoint3D_Read (
1975     TQ3RationalPoint3D            *point3D,
1976     TQ3FileObject                 theFile
1977 );
1978 
1979 
1980 
1981 /*!
1982  *  @function
1983  *      Q3RationalPoint3D_Write
1984  *  @discussion
1985  *      Write a TQ3RationalPoint3D to a file.
1986  *
1987  *  @param point3D          The point to write to the file.
1988  *  @param theFile          The file to write to.
1989  *  @result                 Success or failure of the operation.
1990  */
1991 Q3_EXTERN_API_C ( TQ3Status  )
1992 Q3RationalPoint3D_Write (
1993     const TQ3RationalPoint3D      *point3D,
1994     TQ3FileObject                 theFile
1995 );
1996 
1997 
1998 
1999 /*!
2000  *  @function
2001  *      Q3RationalPoint4D_Read
2002  *  @discussion
2003  *      Read a TQ3RationalPoint4D from a file.
2004  *
2005  *  @param point4D          Receives the point read from the file.
2006  *  @param theFile          The file to read from.
2007  *  @result                 Success or failure of the operation.
2008  */
2009 Q3_EXTERN_API_C ( TQ3Status  )
2010 Q3RationalPoint4D_Read (
2011     TQ3RationalPoint4D            *point4D,
2012     TQ3FileObject                 theFile
2013 );
2014 
2015 
2016 
2017 /*!
2018  *  @function
2019  *      Q3RationalPoint4D_Write
2020  *  @discussion
2021  *      Write a TQ3RationalPoint4D to a file.
2022  *
2023  *  @param point4D          The point to write to the file.
2024  *  @param theFile          The file to write to.
2025  *  @result                 Success or failure of the operation.
2026  */
2027 Q3_EXTERN_API_C ( TQ3Status  )
2028 Q3RationalPoint4D_Write (
2029     const TQ3RationalPoint4D      *point4D,
2030     TQ3FileObject                 theFile
2031 );
2032 
2033 
2034 
2035 /*!
2036  *  @function
2037  *      Q3Vector2D_Read
2038  *  @discussion
2039  *      Read a TQ3Vector2D from a file.
2040  *
2041  *  @param vector2D         Receives the vector read from the file.
2042  *  @param theFile          The file to read from.
2043  *  @result                 Success or failure of the operation.
2044  */
2045 Q3_EXTERN_API_C ( TQ3Status  )
2046 Q3Vector2D_Read (
2047     TQ3Vector2D                   *vector2D,
2048     TQ3FileObject                 theFile
2049 );
2050 
2051 
2052 
2053 /*!
2054  *  @function
2055  *      Q3Vector2D_Write
2056  *  @discussion
2057  *      Write a TQ3Vector2D to a file.
2058  *
2059  *  @param vector2D         The vector to write to the file.
2060  *  @param theFile          The file to write to.
2061  *  @result                 Success or failure of the operation.
2062  */
2063 Q3_EXTERN_API_C ( TQ3Status  )
2064 Q3Vector2D_Write (
2065     const TQ3Vector2D             *vector2D,
2066     TQ3FileObject                 theFile
2067 );
2068 
2069 
2070 
2071 /*!
2072  *  @function
2073  *      Q3Vector3D_Read
2074  *  @discussion
2075  *      Read a TQ3Vector3D from a file.
2076  *
2077  *  @param vector3D         Receives the vector read from the file.
2078  *  @param theFile          The file to read from.
2079  *  @result                 Success or failure of the operation.
2080  */
2081 Q3_EXTERN_API_C ( TQ3Status  )
2082 Q3Vector3D_Read (
2083     TQ3Vector3D                   *vector3D,
2084     TQ3FileObject                 theFile
2085 );
2086 
2087 
2088 
2089 /*!
2090  *  @function
2091  *      Q3Vector3D_Write
2092  *  @discussion
2093  *      Write a TQ3Vector3D to a file.
2094  *
2095  *  @param vector3D         The vector to write to the file.
2096  *  @param theFile          The file to write to.
2097  *  @result                 Success or failure of the operation.
2098  */
2099 Q3_EXTERN_API_C ( TQ3Status  )
2100 Q3Vector3D_Write (
2101     const TQ3Vector3D             *vector3D,
2102     TQ3FileObject                 theFile
2103 );
2104 
2105 
2106 
2107 /*!
2108  *  @function
2109  *      Q3Matrix4x4_Read
2110  *  @discussion
2111  *      Read a TQ3Matrix4x4 from a file.
2112  *
2113  *  @param matrix4x4        Receives the matrix read from the file.
2114  *  @param theFile          The file to read from.
2115  *  @result                 Success or failure of the operation.
2116  */
2117 Q3_EXTERN_API_C ( TQ3Status  )
2118 Q3Matrix4x4_Read (
2119     TQ3Matrix4x4                  *matrix4x4,
2120     TQ3FileObject                 theFile
2121 );
2122 
2123 
2124 
2125 /*!
2126  *  @function
2127  *      Q3Matrix4x4_Write
2128  *  @discussion
2129  *      Write a TQ3Matrix4x4 to a file.
2130  *
2131  *  @param matrix4x4        The matrix to write to the file.
2132  *  @param theFile          The file to write to.
2133  *  @result                 Success or failure of the operation.
2134  */
2135 Q3_EXTERN_API_C ( TQ3Status  )
2136 Q3Matrix4x4_Write (
2137     const TQ3Matrix4x4            *matrix4x4,
2138     TQ3FileObject                 theFile
2139 );
2140 
2141 
2142 
2143 /*!
2144  *  @function
2145  *      Q3Tangent2D_Read
2146  *  @discussion
2147  *      Read a TQ3Tangent2D from a file.
2148  *
2149  *  @param tangent2D        Receives the tangent read from the file.
2150  *  @param theFile          The file to read from.
2151  *  @result                 Success or failure of the operation.
2152  */
2153 Q3_EXTERN_API_C ( TQ3Status  )
2154 Q3Tangent2D_Read (
2155     TQ3Tangent2D                  *tangent2D,
2156     TQ3FileObject                 theFile
2157 );
2158 
2159 
2160 
2161 /*!
2162  *  @function
2163  *      Q3Tangent2D_Write
2164  *  @discussion
2165  *      Write a TQ3Tangent2D to a file.
2166  *
2167  *  @param tangent2D        The tangent to write to the file.
2168  *  @param theFile          The file to write to.
2169  *  @result                 Success or failure of the operation.
2170  */
2171 Q3_EXTERN_API_C ( TQ3Status  )
2172 Q3Tangent2D_Write (
2173     const TQ3Tangent2D            *tangent2D,
2174     TQ3FileObject                 theFile
2175 );
2176 
2177 
2178 
2179 /*!
2180  *  @function
2181  *      Q3Tangent3D_Read
2182  *  @discussion
2183  *      Read a TQ3Tangent3D from a file.
2184  *
2185  *  @param tangent3D        Receives the tangent read from the file.
2186  *  @param theFile          The file to read from.
2187  *  @result                 Success or failure of the operation.
2188  */
2189 Q3_EXTERN_API_C ( TQ3Status  )
2190 Q3Tangent3D_Read (
2191     TQ3Tangent3D                  *tangent3D,
2192     TQ3FileObject                 theFile
2193 );
2194 
2195 
2196 
2197 /*!
2198  *  @function
2199  *      Q3Tangent3D_Write
2200  *  @discussion
2201  *      Write a TQ3Tangent3D to a file.
2202  *
2203  *  @param tangent3D        The tangent to write to the file.
2204  *  @param theFile          The file to write to.
2205  *  @result                 Success or failure of the operation.
2206  */
2207 Q3_EXTERN_API_C ( TQ3Status  )
2208 Q3Tangent3D_Write (
2209     const TQ3Tangent3D            *tangent3D,
2210     TQ3FileObject                 theFile
2211 );
2212 
2213 
2214 
2215 /*!
2216  *  @function
2217  *      Q3Comment_Write
2218  *  @discussion
2219  *      Write a comment to a file.
2220  *
2221  *  @param comment          The comment to write to the file.
2222  *  @param theFile          The file to write to.
2223  *  @result                 Success or failure of the operation.
2224  */
2225 Q3_EXTERN_API_C ( TQ3Status  )
2226 Q3Comment_Write (
2227     char                          *comment,
2228     TQ3FileObject                 theFile
2229 );
2230 
2231 
2232 
2233 /*!
2234  *  @function
2235  *      Q3Unknown_GetType
2236  *  @discussion
2237  *      Get the type of an unknown object.
2238  *
2239  *  @param unknownObject    The object to query.
2240  *  @result                 The type of the object.
2241  */
2242 Q3_EXTERN_API_C ( TQ3ObjectType  )
2243 Q3Unknown_GetType (
2244     TQ3UnknownObject              unknownObject
2245 );
2246 
2247 
2248 
2249 /*!
2250  *  @function
2251  *      Q3Unknown_GetDirtyState
2252  *  @discussion
2253  *      Get the dirty state of an unknown object.
2254  *
2255  *  @param unknownObject    The object to query.
2256  *  @param isDirty          Receives the dirty state of the object.
2257  *  @result                 Success or failure of the operation.
2258  */
2259 Q3_EXTERN_API_C ( TQ3Status  )
2260 Q3Unknown_GetDirtyState (
2261     TQ3UnknownObject              unknownObject,
2262     TQ3Boolean                    *isDirty
2263 );
2264 
2265 
2266 
2267 /*!
2268  *  @function
2269  *      Q3Unknown_SetDirtyState
2270  *  @discussion
2271  *      Set the dirty state for an unknown object.
2272  *
2273  *  @param unknownObject    The object to update.
2274  *  @param isDirty          The new dirty state of the object.
2275  *  @result                 Success or failure of the operation.
2276  */
2277 Q3_EXTERN_API_C ( TQ3Status  )
2278 Q3Unknown_SetDirtyState (
2279     TQ3UnknownObject              unknownObject,
2280     TQ3Boolean                    isDirty
2281 );
2282 
2283 
2284 
2285 /*!
2286  *  @function
2287  *      Q3UnknownText_GetData
2288  *  @discussion
2289  *      Get the data from an unknown text object.
2290  *
2291  *  @param unknownObject    The object to query.
2292  *  @param unknownTextData  Receives the text data from the object.
2293  *  @result                 Success or failure of the operation.
2294  */
2295 Q3_EXTERN_API_C ( TQ3Status  )
2296 Q3UnknownText_GetData (
2297     TQ3UnknownObject              unknownObject,
2298     TQ3UnknownTextData            *unknownTextData
2299 );
2300 
2301 
2302 
2303 /*!
2304  *  @function
2305  *      Q3UnknownText_EmptyData
2306  *  @discussion
2307  *      Release the data of an unknown text object.
2308  *
2309  *  @param unknownTextData  The text data to release.
2310  *  @result                 Success or failure of the operation.
2311  */
2312 Q3_EXTERN_API_C ( TQ3Status  )
2313 Q3UnknownText_EmptyData (
2314     TQ3UnknownTextData            *unknownTextData
2315 );
2316 
2317 
2318 
2319 /*!
2320  *  @function
2321  *      Q3UnknownBinary_GetData
2322  *  @discussion
2323  *      Get the data from an unknown binary object.
2324  *
2325  *  @param unknownObject        The object to query.
2326  *  @param unknownBinaryData    Receives the binary data from the object.
2327  *  @result                     Success or failure of the operation.
2328  */
2329 Q3_EXTERN_API_C ( TQ3Status  )
2330 Q3UnknownBinary_GetData (
2331     TQ3UnknownObject              unknownObject,
2332     TQ3UnknownBinaryData          *unknownBinaryData
2333 );
2334 
2335 
2336 
2337 /*!
2338  *  @function
2339  *      Q3UnknownBinary_EmptyData
2340  *  @discussion
2341  *      Release the data of an unknown binary object.
2342  *
2343  *  @param unknownBinaryData    The binary data to release.
2344  *  @result                     Success or failure of the operation.
2345  */
2346 Q3_EXTERN_API_C ( TQ3Status  )
2347 Q3UnknownBinary_EmptyData (
2348     TQ3UnknownBinaryData          *unknownBinaryData
2349 );
2350 
2351 
2352 
2353 /*!
2354  *  @function
2355  *      Q3UnknownBinary_GetTypeString
2356  *  @discussion
2357  *      Get the type string of an unknown binary object.
2358  *
2359  *  @param unknownObject    The object to query.
2360  *  @param typeString       Receives the type string from the object.
2361  *  @result                 Success or failure of the operation.
2362  */
2363 Q3_EXTERN_API_C ( TQ3Status  )
2364 Q3UnknownBinary_GetTypeString (
2365     TQ3UnknownObject              unknownObject,
2366     char                          **typeString
2367 );
2368 
2369 
2370 
2371 /*!
2372  *  @function
2373  *      Q3UnknownBinary_EmptyTypeString
2374  *  @discussion
2375  *      Release the type string of an unknown binary object.
2376  *
2377  *  @param typeString       The type string to release.
2378  *  @result                 Success or failure of the operation.
2379  */
2380 Q3_EXTERN_API_C ( TQ3Status  )
2381 Q3UnknownBinary_EmptyTypeString (
2382     char                          **typeString
2383 );
2384 
2385 
2386 
2387 /*!
2388  *  @function
2389  *      Q3ViewHints_New
2390  *  @discussion
2391  *      Create a new view hints object.
2392  *
2393  *  @param view             The view the view hints should be based on.
2394  *  @result                 The new view hints object.
2395  */
2396 Q3_EXTERN_API_C ( TQ3ViewHintsObject  )
2397 Q3ViewHints_New (
2398     TQ3ViewObject                 view
2399 );
2400 
2401 
2402 
2403 /*!
2404  *  @function
2405  *      Q3ViewHints_SetRenderer
2406  *  @discussion
2407  *      Set the renderer for a view hints object.
2408  *
2409  *  @param viewHints        The view hints to update.
2410  *  @param renderer         The new renderer for the view hints.
2411  *  @result                 Success or failure of the operation.
2412  */
2413 Q3_EXTERN_API_C ( TQ3Status  )
2414 Q3ViewHints_SetRenderer (
2415     TQ3ViewHintsObject            viewHints,
2416     TQ3RendererObject             renderer
2417 );
2418 
2419 
2420 
2421 /*!
2422  *  @function
2423  *      Q3ViewHints_GetRenderer
2424  *  @discussion
2425  *      Get the renderer from a view hints object.
2426  *
2427  *  @param viewHints        The view hints to query.
2428  *  @param renderer         Receives the renderer from the view hints.
2429  *  @result                 Success or failure of the operation.
2430  */
2431 Q3_EXTERN_API_C ( TQ3Status  )
2432 Q3ViewHints_GetRenderer (
2433     TQ3ViewHintsObject            viewHints,
2434     TQ3RendererObject             *renderer
2435 );
2436 
2437 
2438 
2439 /*!
2440  *  @function
2441  *      Q3ViewHints_SetCamera
2442  *  @discussion
2443  *      Set the camera for a view hints object.
2444  *
2445  *  @param viewHints        The view hints to update.
2446  *  @param camera           The new camera for the view hints.
2447  *  @result                 Success or failure of the operation.
2448  */
2449 Q3_EXTERN_API_C ( TQ3Status  )
2450 Q3ViewHints_SetCamera (
2451     TQ3ViewHintsObject            viewHints,
2452     TQ3CameraObject               camera
2453 );
2454 
2455 
2456 
2457 /*!
2458  *  @function
2459  *      Q3ViewHints_GetCamera
2460  *  @discussion
2461  *      Get the camera from a view hints object.
2462  *
2463  *  @param viewHints        The view hints to query.
2464  *  @param camera           Receives the camera from the view hints.
2465  *  @result                 Success or failure of the operation.
2466  */
2467 Q3_EXTERN_API_C ( TQ3Status  )
2468 Q3ViewHints_GetCamera (
2469     TQ3ViewHintsObject            viewHints,
2470     TQ3CameraObject               *camera
2471 );
2472 
2473 
2474 
2475 /*!
2476  *  @function
2477  *      Q3ViewHints_SetLightGroup
2478  *  @discussion
2479  *      Set the light group for a view hints object.
2480  *
2481  *  @param viewHints        The view hints to update.
2482  *  @param lightGroup       The new light group for the view hints.
2483  *  @result                 Success or failure of the operation.
2484  */
2485 Q3_EXTERN_API_C ( TQ3Status  )
2486 Q3ViewHints_SetLightGroup (
2487     TQ3ViewHintsObject            viewHints,
2488     TQ3GroupObject                lightGroup
2489 );
2490 
2491 
2492 
2493 /*!
2494  *  @function
2495  *      Q3ViewHints_GetLightGroup
2496  *  @discussion
2497  *      Get the light group from a view hints object.
2498  *
2499  *  @param viewHints        The view hints to query.
2500  *  @param lightGroup       Receives the light group from the view hints.
2501  *  @result                 Success or failure of the operation.
2502  */
2503 Q3_EXTERN_API_C ( TQ3Status  )
2504 Q3ViewHints_GetLightGroup (
2505     TQ3ViewHintsObject            viewHints,
2506     TQ3GroupObject                *lightGroup
2507 );
2508 
2509 
2510 
2511 /*!
2512  *  @function
2513  *      Q3ViewHints_SetAttributeSet
2514  *  @discussion
2515  *      Set the attribute set for a view hints object.
2516  *
2517  *  @param viewHints        The view hints to update.
2518  *  @param attributeSet     The new attribute set for the view hints.
2519  *  @result                 Success or failure of the operation.
2520  */
2521 Q3_EXTERN_API_C ( TQ3Status  )
2522 Q3ViewHints_SetAttributeSet (
2523     TQ3ViewHintsObject            viewHints,
2524     TQ3AttributeSet               attributeSet
2525 );
2526 
2527 
2528 
2529 /*!
2530  *  @function
2531  *      Q3ViewHints_GetAttributeSet
2532  *  @discussion
2533  *      Get the attribute set from a view hints object.
2534  *
2535  *  @param viewHints        The view hints to query.
2536  *  @param attributeSet     Receives the attribute set from the view hints.
2537  *  @result                 Success or failure of the operation.
2538  */
2539 Q3_EXTERN_API_C ( TQ3Status  )
2540 Q3ViewHints_GetAttributeSet (
2541     TQ3ViewHintsObject            viewHints,
2542     TQ3AttributeSet               *attributeSet
2543 );
2544 
2545 
2546 
2547 /*!
2548  *  @function
2549  *      Q3ViewHints_SetDimensionsState
2550  *  @discussion
2551  *      Set the dimension state of a view hints object.
2552  *
2553  *  @param viewHints        The view hints to update.
2554  *  @param isValid          The new dimension state for the view hints.
2555  *  @result                 Success or failure of the operation.
2556  */
2557 Q3_EXTERN_API_C ( TQ3Status  )
2558 Q3ViewHints_SetDimensionsState (
2559     TQ3ViewHintsObject            viewHints,
2560     TQ3Boolean                    isValid
2561 );
2562 
2563 
2564 
2565 /*!
2566  *  @function
2567  *      Q3ViewHints_GetDimensionsState
2568  *  @discussion
2569  *      Get the dimension state of a view hints object.
2570  *
2571  *  @param viewHints        The view hints to query.
2572  *  @param isValid          Receives the dimension state from the view hints.
2573  *  @result                 Success or failure of the operation.
2574  */
2575 Q3_EXTERN_API_C ( TQ3Status  )
2576 Q3ViewHints_GetDimensionsState (
2577     TQ3ViewHintsObject            viewHints,
2578     TQ3Boolean                    *isValid
2579 );
2580 
2581 
2582 
2583 /*!
2584  *  @function
2585  *      Q3ViewHints_SetDimensions
2586  *  @discussion
2587  *      Set the dimensions of a view hints object.
2588  *
2589  *  @param viewHints        The view hints to update.
2590  *  @param width            The new width for the view hints.
2591  *  @param height           The new height for the view hints.
2592  *  @result                 Success or failure of the operation.
2593  */
2594 Q3_EXTERN_API_C ( TQ3Status  )
2595 Q3ViewHints_SetDimensions (
2596     TQ3ViewHintsObject            viewHints,
2597     TQ3Uns32                      width,
2598     TQ3Uns32                      height
2599 );
2600 
2601 
2602 
2603 /*!
2604  *  @function
2605  *      Q3ViewHints_GetDimensions
2606  *  @discussion
2607  *      Get the dimensions of a view hints object.
2608  *
2609  *  @param viewHints        The view hints to query.
2610  *  @param width            Receives the width from the view hints.
2611  *  @param height           Receives the height from the view hints.
2612  *  @result                 Success or failure of the operation.
2613  */
2614 Q3_EXTERN_API_C ( TQ3Status  )
2615 Q3ViewHints_GetDimensions (
2616     TQ3ViewHintsObject            viewHints,
2617     TQ3Uns32                      *width,
2618     TQ3Uns32                      *height
2619 );
2620 
2621 
2622 
2623 /*!
2624  *  @function
2625  *      Q3ViewHints_SetMaskState
2626  *  @discussion
2627  *      Set the mask state of a view hints object.
2628  *
2629  *  @param viewHints        The view hints to update.
2630  *  @param isValid          The new mask state for the view hints.
2631  *  @result                 Success or failure of the operation.
2632  */
2633 Q3_EXTERN_API_C ( TQ3Status  )
2634 Q3ViewHints_SetMaskState (
2635     TQ3ViewHintsObject            viewHints,
2636     TQ3Boolean                    isValid
2637 );
2638 
2639 
2640 
2641 /*!
2642  *  @function
2643  *      Q3ViewHints_GetMaskState
2644  *  @discussion
2645  *      Get the mask state from a view hints object.
2646  *
2647  *  @param viewHints        The view hints to query.
2648  *  @param isValid          Receives the mask state from the view hints.
2649  *  @result                 Success or failure of the operation.
2650  */
2651 Q3_EXTERN_API_C ( TQ3Status  )
2652 Q3ViewHints_GetMaskState (
2653     TQ3ViewHintsObject            viewHints,
2654     TQ3Boolean                    *isValid
2655 );
2656 
2657 
2658 
2659 /*!
2660  *  @function
2661  *      Q3ViewHints_SetMask
2662  *  @discussion
2663  *      Set the mask of a view hints object.
2664  *
2665  *  @param viewHints        The view hints to update.
2666  *  @param mask             The new mask for the view hints.
2667  *  @result                 Success or failure of the operation.
2668  */
2669 Q3_EXTERN_API_C ( TQ3Status  )
2670 Q3ViewHints_SetMask (
2671     TQ3ViewHintsObject            viewHints,
2672     const TQ3Bitmap               *mask
2673 );
2674 
2675 
2676 
2677 /*!
2678  *  @function
2679  *      Q3ViewHints_GetMask
2680  *  @discussion
2681  *      Get the mask from a view hints object.
2682  *
2683  *  @param viewHints        The view hints to query.
2684  *  @param mask             Receives the mask from the view hints.
2685  *  @result                 Success or failure of the operation.
2686  */
2687 Q3_EXTERN_API_C ( TQ3Status  )
2688 Q3ViewHints_GetMask (
2689     TQ3ViewHintsObject            viewHints,
2690     TQ3Bitmap                     *mask
2691 );
2692 
2693 
2694 
2695 /*!
2696  *  @function
2697  *      Q3ViewHints_SetClearImageMethod
2698  *  @discussion
2699  *      Set the clear image method of a view hints object.
2700  *
2701  *  @param viewHints        The view hints to update.
2702  *  @param clearMethod      The new clear image method for the view hints.
2703  *  @result                 Success or failure of the operation.
2704  */
2705 Q3_EXTERN_API_C ( TQ3Status  )
2706 Q3ViewHints_SetClearImageMethod (
2707     TQ3ViewHintsObject            viewHints,
2708     TQ3DrawContextClearImageMethod clearMethod
2709 );
2710 
2711 
2712 
2713 /*!
2714  *  @function
2715  *      Q3ViewHints_GetClearImageMethod
2716  *  @discussion
2717  *      Get the clear image method from a view hints object.
2718  *
2719  *  @param viewHints        The view hints to query.
2720  *  @param clearMethod      Receives the clear image method from the view hints.
2721  *  @result                 Success or failure of the operation.
2722  */
2723 Q3_EXTERN_API_C ( TQ3Status  )
2724 Q3ViewHints_GetClearImageMethod (
2725     TQ3ViewHintsObject            viewHints,
2726     TQ3DrawContextClearImageMethod *clearMethod
2727 );
2728 
2729 
2730 
2731 /*!
2732  *  @function
2733  *      Q3ViewHints_SetClearImageColor
2734  *  @discussion
2735  *      Set the clear image color of a view hints object.
2736  *
2737  *  @param viewHints        The view hints to update.
2738  *  @param color            The new clear image color for the view hints.
2739  *  @result                 Success or failure of the operation.
2740  */
2741 Q3_EXTERN_API_C ( TQ3Status  )
2742 Q3ViewHints_SetClearImageColor (
2743     TQ3ViewHintsObject            viewHints,
2744     const TQ3ColorARGB            *color
2745 );
2746 
2747 
2748 
2749 /*!
2750  *  @function
2751  *      Q3ViewHints_GetClearImageColor
2752  *  @discussion
2753  *      Get the clear image color from a view hints object.
2754  *
2755  *  @param viewHints        The view hints to query.
2756  *  @param color            Receives the clear image color from the view hints.
2757  *  @result                 Success or failure of the operation.
2758  */
2759 Q3_EXTERN_API_C ( TQ3Status  )
2760 Q3ViewHints_GetClearImageColor (
2761     TQ3ViewHintsObject            viewHints,
2762     TQ3ColorARGB                  *color
2763 );
2764 
2765 
2766 
2767 /*!
2768  *  @function
2769  *      Q3File_GetFileFormat
2770  *  @discussion
2771  *      Get the file format used to process a file.
2772  *
2773  *      <em>This function is not available in QD3D.</em>
2774  *
2775  *  @param theFile          The file to query.
2776  *  @result                 The file format used to process the file.
2777  */
2778 #if QUESA_ALLOW_QD3D_EXTENSIONS
2779 
2780 Q3_EXTERN_API_C ( TQ3FileFormatObject  )
2781 Q3File_GetFileFormat (
2782     TQ3FileObject                 theFile
2783 );
2784 
2785 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
2786 
2787 
2788 
2789 /*!
2790  *  @function
2791  *      Q3FileFormat_NewFromType
2792  *  @discussion
2793  *      Create a new file format object.
2794  *
2795  *      <em>This function is not available in QD3D.</em>
2796  *
2797  *  @param fformatObjectType    The type of the file format.
2798  *  @result                     The new file format object.
2799  */
2800 #if QUESA_ALLOW_QD3D_EXTENSIONS
2801 
2802 Q3_EXTERN_API_C ( TQ3FileFormatObject  )
2803 Q3FileFormat_NewFromType (
2804     TQ3ObjectType                 fformatObjectType
2805 );
2806 
2807 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
2808 
2809 
2810 
2811 /*!
2812  *  @function
2813  *      Q3FileFormat_GetType
2814  *  @discussion
2815  *      Get the type of a file format.
2816  *
2817  *      <em>This function is not available in QD3D.</em>
2818  *
2819  *  @param format           The file format to query.
2820  *  @result                 The type of the file format.
2821  */
2822 #if QUESA_ALLOW_QD3D_EXTENSIONS
2823 
2824 Q3_EXTERN_API_C ( TQ3ObjectType  )
2825 Q3FileFormat_GetType (
2826     TQ3FileFormatObject           format
2827 );
2828 
2829 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
2830 
2831 
2832 
2833 /*!
2834  *  @function
2835  *      Q3FileFormat_HasModalConfigure
2836  *  @discussion
2837  *      Does a file format have a modal configure dialog?
2838  *
2839  *      <em>This function is not available in QD3D.</em>
2840  *
2841  *  @param format           The file format to query.
2842  *  @result                 Does the file format have a modal configure dialog?
2843  */
2844 #if QUESA_ALLOW_QD3D_EXTENSIONS
2845 
2846 Q3_EXTERN_API_C ( TQ3Boolean  )
2847 Q3FileFormat_HasModalConfigure (
2848     TQ3FileFormatObject           format
2849 );
2850 
2851 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
2852 
2853 
2854 
2855 /*!
2856  *  @function
2857  *      Q3FileFormat_ModalConfigure
2858  *  @discussion
2859  *      Invoke a file format's modal configure dialog.
2860  *
2861  *      If the file format provides a user interface for adjusting its preferences,
2862  *      a modal configure dialog can be displayed by this function.
2863  *
2864  *      The cancel/accept state of the dialog is returned through the cancelled
2865  *      parameter.
2866  *
2867  *      After a configure dialog has been accepted, the current preferences
2868  *      should be retrieved with Q3FileFormat_GetConfigurationData and stored by
2869  *      the application for later recall.
2870  *
2871  *      <em>This function is not available in QD3D.</em>
2872  *
2873  *  @param format           The file format whose configure dialog is to be displayed.
2874  *  @param dialogAnchor     Platform-specific dialog data.
2875  *  @param cancelled        Receives the OK/Cancel state of the dialog.
2876  *  @result                 Success or failure of the operation.
2877  */
2878 #if QUESA_ALLOW_QD3D_EXTENSIONS
2879 
2880 Q3_EXTERN_API_C ( TQ3Status  )
2881 Q3FileFormat_ModalConfigure (
2882     TQ3FileFormatObject           format,
2883     TQ3DialogAnchor               dialogAnchor,
2884     TQ3Boolean                    *canceled
2885 );
2886 
2887 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
2888 
2889 
2890 
2891 /*!
2892  *  @function
2893  *      Q3FileFormatClass_GetFormatNameString
2894  *  @discussion
2895  *      Get the user-visible name of a file format.
2896  *
2897  *      The user visible name is suitable for display in a menu or window.
2898  *
2899  *      <em>This function is not available in QD3D.</em>
2900  *
2901  *  @param formatClassType      The class type of the file format to query.
2902  *  @param formatClassString    Receives the name of the file format.
2903  *  @result                     Success or failure of the operation.
2904  */
2905 #if QUESA_ALLOW_QD3D_EXTENSIONS
2906 
2907 Q3_EXTERN_API_C ( TQ3Status  )
2908 Q3FileFormatClass_GetFormatNameString (
2909     TQ3ObjectType                 formatClassType,
2910     TQ3ObjectClassNameString      formatClassString
2911 );
2912 
2913 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
2914 
2915 
2916 
2917 /*!
2918  *  @function
2919  *      Q3FileFormat_GetConfigurationData
2920  *  @discussion
2921  *      Get the configuration data for a file format.
2922  *
2923  *      Configuration data should be saved by the application in a manner appropriate
2924  *      for the current platform (e.g., the Registry on Windows or a .plist file on
2925  *      the Mac), tagging it with the file format's type for later identification.
2926  *
2927  *      If dataBuffer is NULL, the size of data required to store the configuration
2928  *      data will be returned in actualDataSize.
2929  *
2930  *      Otherwise bufferSize should be set to the number of bytes pointed to by
2931  *      dataBuffer, and actualDataSize will receive the number of bytes written to
2932  *      dataBuffer.
2933  *
2934  *      <em>This function is not available in QD3D.</em>
2935  *
2936  *  @param format           The file format to query.
2937  *  @param dataBuffer       Receives the file format configuration data. May be NULL.
2938  *  @param bufferSize       The number of bytes pointed to by dataBuffer. May be 0.
2939  *  @param actualDataSize   Receives the number of bytes required for, or written to, dataBuffer.
2940  */
2941 #if QUESA_ALLOW_QD3D_EXTENSIONS
2942 
2943 Q3_EXTERN_API_C ( TQ3Status  )
2944 Q3FileFormat_GetConfigurationData (
2945     TQ3FileFormatObject           format,
2946     unsigned char                 *dataBuffer,
2947     TQ3Uns32                      bufferSize,
2948     TQ3Uns32                      *actualDataSize
2949 );
2950 
2951 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
2952 
2953 
2954 
2955 /*!
2956  *  @function
2957  *      Q3FileFormat_SetConfigurationData
2958  *  @discussion
2959  *      Set the configuration data for a file format.
2960  *
2961  *      The configuration must have been obtained with a previous call to
2962  *      Q3FileFormat_GetConfigurationData.
2963  *
2964  *      <em>This function is not available in QD3D.</em>
2965  *
2966  *  @param format           The file format to update.
2967  *  @param dataBuffer       The configuration data for the file format.
2968  *  @param bufferSize       The number of bytes pointed to by dataBuffer.
2969  *  @result                 Success or failure of the operation.
2970  */
2971 #if QUESA_ALLOW_QD3D_EXTENSIONS
2972 
2973 Q3_EXTERN_API_C ( TQ3Status  )
2974 Q3FileFormat_SetConfigurationData (
2975     TQ3RendererObject             format,
2976     unsigned char                 *dataBuffer,
2977     TQ3Uns32                      bufferSize
2978 );
2979 
2980 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
2981 
2982 
2983 
2984 
2985 
2986 //=============================================================================
2987 //      Binary reading utilities
2988 //-----------------------------------------------------------------------------
2989 /*!
2990  *  @function
2991  *      Q3FileFormat_GenericReadBinary_8
2992  *  @discussion
2993  *      Read a TQ3Int8 from a file format.
2994  *
2995  *      <em>This function is not available in QD3D.</em>
2996  *
2997  *  @param format           The file format to read with.
2998  *  @param data             Receives the data read from the file format.
2999  *  @result                 Success or failure of the operation.
3000  */
3001 #if QUESA_ALLOW_QD3D_EXTENSIONS
3002 
3003 Q3_EXTERN_API_C ( TQ3Status  )
3004 Q3FileFormat_GenericReadBinary_8 (
3005     TQ3FileFormatObject           format,
3006     TQ3Int8                       *data
3007 );
3008 
3009 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3010 
3011 
3012 
3013 /*!
3014  *  @function
3015  *      Q3FileFormat_GenericReadBinary_16
3016  *  @discussion
3017  *      Read a TQ3Int16 from a file format.
3018  *
3019  *      <em>This function is not available in QD3D.</em>
3020  *
3021  *  @param format           The file format to read with.
3022  *  @param data             Receives the data read from the file format.
3023  *  @result                 Success or failure of the operation.
3024  */
3025 #if QUESA_ALLOW_QD3D_EXTENSIONS
3026 
3027 Q3_EXTERN_API_C ( TQ3Status  )
3028 Q3FileFormat_GenericReadBinary_16 (
3029     TQ3FileFormatObject           format,
3030     TQ3Int16                      *data
3031 );
3032 
3033 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3034 
3035 
3036 
3037 /*!
3038  *  @function
3039  *      Q3FileFormat_GenericReadBinary_32
3040  *  @discussion
3041  *      Read a TQ3Int32 from a file format.
3042  *
3043  *      <em>This function is not available in QD3D.</em>
3044  *
3045  *  @param format           The file format to read with.
3046  *  @param data             Receives the data read from the file format.
3047  *  @result                 Success or failure of the operation.
3048  */
3049 #if QUESA_ALLOW_QD3D_EXTENSIONS
3050 
3051 Q3_EXTERN_API_C ( TQ3Status  )
3052 Q3FileFormat_GenericReadBinary_32 (
3053     TQ3FileFormatObject           format,
3054     TQ3Int32                      *data
3055 );
3056 
3057 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3058 
3059 
3060 
3061 /*!
3062  *  @function
3063  *      Q3FileFormat_GenericReadBinary_64
3064  *  @discussion
3065  *      Read a TQ3Int64 from a file format.
3066  *
3067  *      <em>This function is not available in QD3D.</em>
3068  *
3069  *  @param format           The file format to read with.
3070  *  @param data             Receives the data read from the file format.
3071  *  @result                 Success or failure of the operation.
3072  */
3073 #if QUESA_ALLOW_QD3D_EXTENSIONS
3074 
3075 Q3_EXTERN_API_C ( TQ3Status  )
3076 Q3FileFormat_GenericReadBinary_64 (
3077     TQ3FileFormatObject           format,
3078     TQ3Int64                      *data
3079 );
3080 
3081 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3082 
3083 
3084 
3085 /*!
3086  *  @function
3087  *      Q3FileFormat_GenericReadBinary_String
3088  *  @discussion
3089  *      Read a string from a file format.
3090  *
3091  *      <em>This function is not available in QD3D.</em>
3092  *
3093  *  @param format           The file format to read with.
3094  *  @param data             Receives the data read from the file format.
3095  *  @param length           Receives the number of bytes written to data.
3096  *  @result                 Success or failure of the operation.
3097  */
3098 #if QUESA_ALLOW_QD3D_EXTENSIONS
3099 
3100 Q3_EXTERN_API_C ( TQ3Status  )
3101 Q3FileFormat_GenericReadBinary_String (
3102     TQ3FileFormatObject           format,
3103     char                          *data,
3104     TQ3Uns32                      *length
3105 );
3106 
3107 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3108 
3109 
3110 
3111 /*!
3112  *  @function
3113  *      Q3FileFormat_GenericReadBinary_Raw
3114  *  @discussion
3115  *      Read a block of data from a file format.
3116  *
3117  *      <em>This function is not available in QD3D.</em>
3118  *
3119  *  @param format           The file format to read with.
3120  *  @param data             Receives the data read from the file format.
3121  *  @param length           The number of bytes to read from the file format.
3122  *  @result                 Success or failure of the operation.
3123  */
3124 #if QUESA_ALLOW_QD3D_EXTENSIONS
3125 
3126 Q3_EXTERN_API_C ( TQ3Status  )
3127 Q3FileFormat_GenericReadBinary_Raw (
3128     TQ3FileFormatObject           format,
3129     unsigned char                 *data,
3130     TQ3Uns32                      length
3131 );
3132 
3133 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3134 
3135 
3136 
3137 
3138 
3139 //=============================================================================
3140 //      Swapped binary reading utilities
3141 //-----------------------------------------------------------------------------
3142 /*!
3143  *  @function
3144  *      Q3FileFormat_GenericReadBinSwap_16
3145  *  @discussion
3146  *      Read and endian swap a TQ3Int16 from a file format.
3147  *
3148  *      <em>This function is not available in QD3D.</em>
3149  *
3150  *  @param format           The file format to read with.
3151  *  @param data             Receives the data read from the file format.
3152  *  @result                 Success or failure of the operation.
3153  */
3154 #if QUESA_ALLOW_QD3D_EXTENSIONS
3155 
3156 Q3_EXTERN_API_C ( TQ3Status  )
3157 Q3FileFormat_GenericReadBinSwap_16 (
3158     TQ3FileFormatObject           format,
3159     TQ3Int16                      *data
3160 );
3161 
3162 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3163 
3164 
3165 
3166 /*!
3167  *  @function
3168  *      Q3FileFormat_GenericReadBinSwap_32
3169  *  @discussion
3170  *      Read and endian swap a TQ3Int32 from a file format.
3171  *
3172  *      <em>This function is not available in QD3D.</em>
3173  *
3174  *  @param format           The file format to read with.
3175  *  @param data             Receives the data read from the file format.
3176  *  @result                 Success or failure of the operation.
3177  */
3178 #if QUESA_ALLOW_QD3D_EXTENSIONS
3179 
3180 Q3_EXTERN_API_C ( TQ3Status  )
3181 Q3FileFormat_GenericReadBinSwap_32 (
3182     TQ3FileFormatObject           format,
3183     TQ3Int32                      *data
3184 );
3185 
3186 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3187 
3188 
3189 
3190 /*!
3191  *  @function
3192  *      Q3FileFormat_GenericReadBinSwap_64
3193  *  @discussion
3194  *      Read and endian swap a TQ3Int64 from a file format.
3195  *
3196  *      <em>This function is not available in QD3D.</em>
3197  *
3198  *  @param format           The file format to read with.
3199  *  @param data             Receives the data read from the file format.
3200  *  @result                 Success or failure of the operation.
3201  */
3202 #if QUESA_ALLOW_QD3D_EXTENSIONS
3203 
3204 Q3_EXTERN_API_C ( TQ3Status  )
3205 Q3FileFormat_GenericReadBinSwap_64 (
3206     TQ3FileFormatObject           format,
3207     TQ3Int64                      *data
3208 );
3209 
3210 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3211 
3212 
3213 
3214 
3215 
3216 //=============================================================================
3217 //      Text reading utilities
3218 //-----------------------------------------------------------------------------
3219 /*!
3220  *  @function
3221  *      Q3FileFormat_GenericReadText_SkipBlanks
3222  *  @discussion
3223  *      Read and discard whitespace from a file format.
3224  *
3225  *      <em>This function is not available in QD3D.</em>
3226  *
3227  *  @param format           The file format to read with.
3228  *  @result                 Success or failure of the operation.
3229  */
3230 #if QUESA_ALLOW_QD3D_EXTENSIONS
3231 
3232 Q3_EXTERN_API_C ( TQ3Status  )
3233 Q3FileFormat_GenericReadText_SkipBlanks (
3234     TQ3FileFormatObject           format
3235 );
3236 
3237 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3238 
3239 
3240 
3241 /*!
3242  *  @function
3243  *      Q3FileFormat_GenericReadText_ReadUntilChars
3244  *  @discussion
3245  *      Read until characters have been found from a file format.
3246  *
3247  *      <em>This function is not available in QD3D.</em>
3248  *
3249  *  @param format           The file format to read with.
3250  *  @param buffer           The buffer to read to.
3251  *  @param chars            The list of "stop" characters.
3252  *  @param numChars         The number of characters in chars.
3253  *  @param blanks           Should reading stop on any characters < 0x20.
3254  *  @param foundChar        The character which caused reading to stop.
3255  *  @param maxLen           The maximum number of characters to read.
3256  *  @param charsRead        Receives the number of characters read.
3257  *  @result                 Success or failure of the operation.
3258  */
3259 #if QUESA_ALLOW_QD3D_EXTENSIONS
3260 
3261 Q3_EXTERN_API_C ( TQ3Status  )
3262 Q3FileFormat_GenericReadText_ReadUntilChars (
3263     TQ3FileFormatObject           format,
3264     char                          *buffer,
3265     char                          *chars,
3266     TQ3Uns32                      numChars,
3267     TQ3Boolean                    blanks,
3268     TQ3Int32                      *foundChar,
3269     TQ3Uns32                      maxLen,
3270     TQ3Uns32                      *charsRead
3271 );
3272 
3273 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3274 
3275 
3276 
3277 
3278 
3279 //=============================================================================
3280 //      Binary writing utilities
3281 //-----------------------------------------------------------------------------
3282 /*!
3283  *  @function
3284  *      Q3FileFormat_GenericWriteBinary_8
3285  *  @discussion
3286  *      Write a TQ3Int8 to a file format.
3287  *
3288  *      <em>This function is not available in QD3D.</em>
3289  *
3290  *  @param format           The file format to write with.
3291  *  @param data             The data to write to the file format.
3292  *  @result                 Success or failure of the operation.
3293  */
3294 #if QUESA_ALLOW_QD3D_EXTENSIONS
3295 
3296 Q3_EXTERN_API_C ( TQ3Status  )
3297 Q3FileFormat_GenericWriteBinary_8 (
3298     TQ3FileFormatObject           format,
3299     const TQ3Int8                 *data
3300 );
3301 
3302 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3303 
3304 
3305 
3306 /*!
3307  *  @function
3308  *      Q3FileFormat_GenericWriteBinary_16
3309  *  @discussion
3310  *      Write a TQ3Int16 to a file format.
3311  *
3312  *      <em>This function is not available in QD3D.</em>
3313  *
3314  *  @param format           The file format to write with.
3315  *  @param data             The data to write to the file format.
3316  *  @result                 Success or failure of the operation.
3317  */
3318 #if QUESA_ALLOW_QD3D_EXTENSIONS
3319 
3320 Q3_EXTERN_API_C ( TQ3Status  )
3321 Q3FileFormat_GenericWriteBinary_16 (
3322     TQ3FileFormatObject           format,
3323     const TQ3Int16                *data
3324 );
3325 
3326 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3327 
3328 
3329 
3330 /*!
3331  *  @function
3332  *      Q3FileFormat_GenericWriteBinary_32
3333  *  @discussion
3334  *      Write a TQ3Int32 to a file format.
3335  *
3336  *      <em>This function is not available in QD3D.</em>
3337  *
3338  *  @param format           The file format to write with.
3339  *  @param data             The data to write to the file format.
3340  *  @result                 Success or failure of the operation.
3341  */
3342 #if QUESA_ALLOW_QD3D_EXTENSIONS
3343 
3344 Q3_EXTERN_API_C ( TQ3Status  )
3345 Q3FileFormat_GenericWriteBinary_32 (
3346     TQ3FileFormatObject           format,
3347     const TQ3Int32                *data
3348 );
3349 
3350 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3351 
3352 
3353 
3354 /*!
3355  *  @function
3356  *      Q3FileFormat_GenericWriteBinary_64
3357  *  @discussion
3358  *      Write a TQ3Int64 to a file format.
3359  *
3360  *      <em>This function is not available in QD3D.</em>
3361  *
3362  *  @param format           The file format to write with.
3363  *  @param data             The data to write to the file format.
3364  *  @result                 Success or failure of the operation.
3365  */
3366 #if QUESA_ALLOW_QD3D_EXTENSIONS
3367 
3368 Q3_EXTERN_API_C ( TQ3Status  )
3369 Q3FileFormat_GenericWriteBinary_64 (
3370     TQ3FileFormatObject           format,
3371     const TQ3Int64                *data
3372 );
3373 
3374 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3375 
3376 
3377 
3378 /*!
3379  *  @function
3380  *      Q3FileFormat_GenericWriteBinary_String
3381  *  @discussion
3382  *      Write a string to a file format.
3383  *
3384  *      <em>This function is not available in QD3D.</em>
3385  *
3386  *  @param format           The file format to write with.
3387  *  @param data             The data to write to the file format.
3388  *  @param length           The number of bytes to write.
3389  *  @result                 Success or failure of the operation.
3390  */
3391 #if QUESA_ALLOW_QD3D_EXTENSIONS
3392 
3393 Q3_EXTERN_API_C ( TQ3Status  )
3394 Q3FileFormat_GenericWriteBinary_String (
3395     TQ3FileFormatObject           format,
3396     const char                    *data,
3397     TQ3Uns32                      *length
3398 );
3399 
3400 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3401 
3402 
3403 
3404 /*!
3405  *  @function
3406  *      Q3FileFormat_GenericWriteBinary_Raw
3407  *  @discussion
3408  *      Write a block of data to a file format.
3409  *
3410  *      <em>This function is not available in QD3D.</em>
3411  *
3412  *  @param format           The file format to write with.
3413  *  @param data             The data to write to the file format.
3414  *  @param length           The number of bytes to write.
3415  *  @result                 Success or failure of the operation.
3416  */
3417 #if QUESA_ALLOW_QD3D_EXTENSIONS
3418 
3419 Q3_EXTERN_API_C ( TQ3Status  )
3420 Q3FileFormat_GenericWriteBinary_Raw (
3421     TQ3FileFormatObject           format,
3422     const unsigned char           *data,
3423     TQ3Uns32                      length
3424 );
3425 
3426 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3427 
3428 
3429 
3430 
3431 
3432 //=============================================================================
3433 //      Swapped binary writing utilities
3434 //-----------------------------------------------------------------------------
3435 /*!
3436  *  @function
3437  *      Q3FileFormat_GenericWriteBinSwap_16
3438  *  @discussion
3439  *      Endian swap and write a TQ3Int16 to a file format.
3440  *
3441  *      <em>This function is not available in QD3D.</em>
3442  *
3443  *  @param format           The file format to write with.
3444  *  @param data             The data to write to the file format.
3445  *  @result                 Success or failure of the operation.
3446  */
3447 #if QUESA_ALLOW_QD3D_EXTENSIONS
3448 
3449 Q3_EXTERN_API_C ( TQ3Status  )
3450 Q3FileFormat_GenericWriteBinSwap_16 (
3451     TQ3FileFormatObject           format,
3452     const TQ3Int16                *data
3453 );
3454 
3455 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3456 
3457 
3458 
3459 /*!
3460  *  @function
3461  *      Q3FileFormat_GenericWriteBinSwap_32
3462  *  @discussion
3463  *      Endian swap and write a TQ3Int32 to a file format.
3464  *
3465  *      <em>This function is not available in QD3D.</em>
3466  *
3467  *  @param format           The file format to write with.
3468  *  @param data             The data to write to the file format.
3469  *  @result                 Success or failure of the operation.
3470  */
3471 #if QUESA_ALLOW_QD3D_EXTENSIONS
3472 
3473 Q3_EXTERN_API_C ( TQ3Status  )
3474 Q3FileFormat_GenericWriteBinSwap_32 (
3475     TQ3FileFormatObject           format,
3476     const TQ3Int32                *data
3477 );
3478 
3479 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3480 
3481 
3482 
3483 /*!
3484  *  @function
3485  *      Q3FileFormat_GenericWriteBinSwap_64
3486  *  @discussion
3487  *      Endian swap and write a TQ3Int64 to a file format.
3488  *
3489  *      <em>This function is not available in QD3D.</em>
3490  *
3491  *  @param format           The file format to write with.
3492  *  @param data             The data to write to the file format.
3493  *  @result                 Success or failure of the operation.
3494  */
3495 #if QUESA_ALLOW_QD3D_EXTENSIONS
3496 
3497 Q3_EXTERN_API_C ( TQ3Status  )
3498 Q3FileFormat_GenericWriteBinSwap_64 (
3499     TQ3FileFormatObject           format,
3500     const TQ3Int64                *data
3501 );
3502 
3503 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3504 
3505 
3506 
3507 /*!
3508  *  @function
3509  *      Q3Float32_ReadArray
3510  *  @discussion
3511  *      Read an array of 32-bit floating point numbers from a file object.
3512  *
3513  *      Calling this function has somewhat less overhead than calling
3514  *      Q3Float32_Read repeatedly.
3515  *
3516  *      <em>This function is not available in QD3D.</em>
3517  *
3518  *  @param	numFloats		Number of numbers to read.
3519  *  @param	floatArray		Address of array to receive the numbers.
3520  *	@param	theFile			A file object.
3521  *  @result    Success or failure of the operation.
3522  */
3523 #if QUESA_ALLOW_QD3D_EXTENSIONS
3524 
3525 Q3_EXTERN_API_C ( TQ3Status  )
3526 Q3Float32_ReadArray (
3527 	TQ3Uns32					numFloats,
3528 	TQ3Float32*					floatArray,
3529 	TQ3FileObject            	theFile
3530 );
3531 
3532 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3533 
3534 
3535 
3536 /*!
3537  *  @function
3538  *      Q3Uns32_ReadArray
3539  *  @discussion
3540  *      Read an array of 32-bit unsigned integers from a file object.
3541  *
3542  *      Calling this function has somewhat less overhead than calling
3543  *      Q3Uns32_Read repeatedly.
3544  *
3545  *      <em>This function is not available in QD3D.</em>
3546  *
3547  *  @param	numNums			Number of numbers to read.
3548  *  @param	intArray		Address of array to receive the numbers.
3549  *	@param	theFile			A file object.
3550  *  @result    Success or failure of the operation.
3551  */
3552 #if QUESA_ALLOW_QD3D_EXTENSIONS
3553 
3554 Q3_EXTERN_API_C ( TQ3Status  )
3555 Q3Uns32_ReadArray (
3556 	TQ3Uns32					numNums,
3557 	TQ3Uns32*					intArray,
3558 	TQ3FileObject            	theFile
3559 );
3560 
3561 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3562 
3563 
3564 
3565 /*!
3566  *  @function
3567  *      Q3Uns16_ReadArray
3568  *  @discussion
3569  *      Read an array of 16-bit unsigned integers from a file object.
3570  *
3571  *      Calling this function has somewhat less overhead than calling
3572  *      Q3Uns16_Read repeatedly.
3573  *
3574  *      <em>This function is not available in QD3D.</em>
3575  *
3576  *  @param	numNums			Number of numbers to read.
3577  *  @param	intArray		Address of array to receive the numbers.
3578  *	@param	theFile			A file object.
3579  *  @result    Success or failure of the operation.
3580  */
3581 #if QUESA_ALLOW_QD3D_EXTENSIONS
3582 
3583 Q3_EXTERN_API_C ( TQ3Status  )
3584 Q3Uns16_ReadArray (
3585 	TQ3Uns32					numNums,
3586 	TQ3Uns16*					intArray,
3587 	TQ3FileObject            	theFile
3588 );
3589 
3590 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3591 
3592 
3593 
3594 /*!
3595  *  @function
3596  *      Q3Uns8_ReadArray
3597  *  @discussion
3598  *      Read an array of 8-bit unsigned integers from a file object.
3599  *
3600  *      Calling this function has somewhat less overhead than calling
3601  *      Q3Uns8_Read repeatedly.
3602  *
3603  *      <em>This function is not available in QD3D.</em>
3604  *
3605  *  @param	numNums			Number of numbers to read.
3606  *  @param	intArray		Address of array to receive the numbers.
3607  *	@param	theFile			A file object.
3608  *  @result                 Success or failure of the operation.
3609  */
3610 #if QUESA_ALLOW_QD3D_EXTENSIONS
3611 
3612 Q3_EXTERN_API_C ( TQ3Status  )
3613 Q3Uns8_ReadArray (
3614 	TQ3Uns32					numNums,
3615 	TQ3Uns8*					intArray,
3616 	TQ3FileObject            	theFile
3617 );
3618 
3619 #endif // QUESA_ALLOW_QD3D_EXTENSIONS
3620 
3621 
3622 
3623 
3624 
3625 //=============================================================================
3626 //      C++ postamble
3627 //-----------------------------------------------------------------------------
3628 #ifdef __cplusplus
3629 }
3630 #endif
3631 
3632 #endif
3633 
3634 
3635