Mac OS 9
QD3DSet.h
Go to the documentation of this file.
1 
19 #ifndef __QD3DSET__
20 #define __QD3DSET__
21 
22 #ifndef __QD3D__
23 #include <QD3D.h>
24 #endif
25 
26 #if PRAGMA_ONCE
27 #pragma once
28 #endif
29 
30 #ifdef __cplusplus
31 extern "C"
32 {
33 #endif
34 
35 #if PRAGMA_IMPORT
36 #pragma import on
37 #endif
38 
39 #if PRAGMA_STRUCT_ALIGN
40 #pragma options align = power
41 #elif PRAGMA_STRUCT_PACKPUSH
42 #pragma pack(push, 2)
43 #elif PRAGMA_STRUCT_PACK
44 #pragma pack(2)
45 #endif
46 
47 #if PRAGMA_ENUM_ALWAYSINT
48 #if defined(__fourbyteints__) && !__fourbyteints__
49 #define __QD3DSET__RESTORE_TWOBYTEINTS
50 #pragma fourbyteints on
51 #endif
52 #pragma enumsalwaysint on
53 #elif PRAGMA_ENUM_OPTIONS
54 #pragma option enum =int
55 #elif PRAGMA_ENUM_PACK
56 #if __option(pack_enums)
57 #define __QD3DSET__RESTORE_PACKED_ENUMS
58 #pragma options(!pack_enums)
59 #endif
60 #endif
61 
62 /******************************************************************************
63  ** **
64  ** Set Routines **
65  ** **
66  *****************************************************************************/
67 #if CALL_NOT_IN_CARBON
76  TQ3SetObject
77  Q3Set_New(void);
78 
88  Q3Set_GetType(TQ3SetObject theSet);
89 
98  TQ3Status
99  Q3Set_Add(TQ3SetObject theSet, TQ3ElementType theType, const void *data);
100 
109  TQ3Status
110  Q3Set_Get(TQ3SetObject theSet, TQ3ElementType theType, void *data);
111 
120  TQ3Boolean
121  Q3Set_Contains(TQ3SetObject theSet, TQ3ElementType theType);
122 
131  TQ3Status
132  Q3Set_Clear(TQ3SetObject theSet, TQ3ElementType theType);
133 
142  TQ3Status
143  Q3Set_Empty(TQ3SetObject target);
144 
159  TQ3Status
160  Q3Set_GetNextElementType(TQ3SetObject theSet, TQ3ElementType *theType);
161 
162 /******************************************************************************
163  ** **
164  ** Attribute Types **
165  ** **
166  *****************************************************************************/
174 #endif /* CALL_NOT_IN_CARBON */
175 
177  {
178  /* Data Type */
179  kQ3AttributeTypeNone = 0, /* --------- */
180  kQ3AttributeTypeSurfaceUV = 1, /* TQ3Param2D */
181  kQ3AttributeTypeShadingUV = 2, /* TQ3Param2D */
182  kQ3AttributeTypeNormal = 3, /* TQ3Vector3D */
183  kQ3AttributeTypeAmbientCoefficient = 4, /* float */
184  kQ3AttributeTypeDiffuseColor = 5, /* TQ3ColorRGB */
185  kQ3AttributeTypeSpecularColor = 6, /* TQ3ColorRGB */
186  kQ3AttributeTypeSpecularControl = 7, /* float */
187  kQ3AttributeTypeTransparencyColor = 8, /* TQ3ColorRGB */
188  kQ3AttributeTypeSurfaceTangent = 9, /* TQ3Tangent2D */
189  kQ3AttributeTypeHighlightState = 10, /* TQ3Switch */
190  kQ3AttributeTypeSurfaceShader = 11, /* TQ3SurfaceShaderObject */
191  kQ3AttributeTypeNumTypes = 12
192  };
194 
195  typedef TQ3ElementType TQ3AttributeType;
196 /******************************************************************************
197  ** **
198  ** Attribute Drawing **
199  ** **
200  *****************************************************************************/
201 #if CALL_NOT_IN_CARBON
210  TQ3Status
211  Q3Attribute_Submit(TQ3AttributeType attributeType, const void *data,
212  TQ3ViewObject view);
213 
214  /******************************************************************************
215  ** **
216  ** AttributeSet Routines **
217  ** **
218  *****************************************************************************/
229 
238  TQ3Status
239  Q3AttributeSet_Add(TQ3AttributeSet attributeSet, TQ3AttributeType theType,
240  const void *data);
241 
250  TQ3Boolean
252  TQ3AttributeType attributeType);
253 
262  TQ3Status
263  Q3AttributeSet_Get(TQ3AttributeSet attributeSet, TQ3AttributeType theType,
264  void *data);
265 
274  TQ3Status
275  Q3AttributeSet_Clear(TQ3AttributeSet attributeSet, TQ3AttributeType theType);
276 
285  TQ3Status
287 
302  TQ3Status
304  TQ3AttributeType *theType);
305 
314  TQ3Status
315  Q3AttributeSet_Submit(TQ3AttributeSet attributeSet, TQ3ViewObject view);
316 
330  TQ3Status
332  TQ3AttributeSet result);
333 
334 /******************************************************************************
335  ** **
336  ** Custom Element Registration **
337  ** **
338  *****************************************************************************/
381 #endif /* CALL_NOT_IN_CARBON */
382 
383 #define kQ3XMethodTypeElementCopyAdd Q3_METHOD_TYPE('e', 'c', 'p', 'a')
384 #define kQ3XMethodTypeElementCopyReplace Q3_METHOD_TYPE('e', 'c', 'p', 'r')
385 #define kQ3XMethodTypeElementCopyGet Q3_METHOD_TYPE('e', 'c', 'p', 'g')
386 #define kQ3XMethodTypeElementCopyDuplicate Q3_METHOD_TYPE('e', 'c', 'p', 'd')
387 #define kQ3XMethodTypeElementDelete Q3_METHOD_TYPE('e', 'd', 'e', 'l')
388  typedef CALLBACK_API_C(TQ3Status,
389  TQ3XElementCopyAddMethod)(const void *fromAPIElement,
390  void *toInternalElement);
391  typedef CALLBACK_API_C(TQ3Status,
392  TQ3XElementCopyReplaceMethod)(const void *fromAPIElement,
393  void *ontoInternalElement);
394  typedef CALLBACK_API_C(TQ3Status, TQ3XElementCopyGetMethod)(
395  const void *fromInternalElement, void *toAPIElement);
396  typedef CALLBACK_API_C(TQ3Status, TQ3XElementCopyDuplicateMethod)(
397  const void *fromInternalElement, void *toInternalElement);
398  typedef CALLBACK_API_C(TQ3Status,
399  TQ3XElementDeleteMethod)(void *internalElement);
400 #if CALL_NOT_IN_CARBON
409  TQ3XObjectClass
410  Q3XElementClass_Register(TQ3ElementType *elementType, const char *name,
411  unsigned long sizeOfElement,
412  TQ3XMetaHandler metaHandler);
413 
422  TQ3Status
424  unsigned long *sizeOfElement);
425 
426 #endif /* CALL_NOT_IN_CARBON */
427 
428 /******************************************************************************
429  ** **
430  ** Custom Attribute Registration **
431  ** **
432  *****************************************************************************/
433 #define kQ3XMethodTypeAttributeInherit Q3_METHOD_TYPE('i', 'n', 'h', 't')
434  typedef TQ3Boolean TQ3XAttributeInheritMethod;
435 /* return kQ3True or kQ3False in your metahandler */
436 #define kQ3XMethodTypeAttributeCopyInherit Q3_METHOD_TYPE('a', 'c', 'p', 'i')
437  typedef CALLBACK_API_C(TQ3Status, TQ3XAttributeCopyInheritMethod)(
438  const void *fromInternalAttribute, void *toInternalAttribute);
439 #if CALL_NOT_IN_CARBON
448  TQ3XObjectClass
449  Q3XAttributeClass_Register(TQ3AttributeType *attributeType,
450  const char *creatorName, unsigned long sizeOfElement,
451  TQ3XMetaHandler metaHandler);
452 
453 #endif /* CALL_NOT_IN_CARBON */
454 
458 #define kQ3XMethodTypeAttributeDefault Q3_METHOD_TYPE('a', 's', 'd', 'f')
459  typedef CALLBACK_API_C(TQ3Status,
460  TQ3XAttributeDefaultMethod)(void *internalElement);
461 #define kQ3XMethodTypeAttributeIsDefault Q3_METHOD_TYPE('a', 'i', 'd', 'f')
462  typedef CALLBACK_API_C(TQ3Boolean,
463  TQ3XAttributeIsDefaultMethod)(void *internalElement);
464 
465 #if PRAGMA_ENUM_ALWAYSINT
466 #pragma enumsalwaysint reset
467 #ifdef __QD3DSET__RESTORE_TWOBYTEINTS
468 #pragma fourbyteints off
469 #endif
470 #elif PRAGMA_ENUM_OPTIONS
471 #pragma option enum =reset
472 #elif defined(__QD3DSET__RESTORE_PACKED_ENUMS)
473 #pragma options(pack_enums)
474 #endif
475 
476 #if PRAGMA_STRUCT_ALIGN
477 #pragma options align = reset
478 #elif PRAGMA_STRUCT_PACKPUSH
479 #pragma pack(pop)
480 #elif PRAGMA_STRUCT_PACK
481 #pragma pack()
482 #endif
483 
484 #ifdef PRAGMA_IMPORT_OFF
485 #pragma import off
486 #elif PRAGMA_IMPORT
487 #pragma import reset
488 #endif
489 
490 #ifdef __cplusplus
491 }
492 #endif
493 
494 #endif /* __QD3DSET__ */
TQ3Status Q3Set_Clear(TQ3SetObject theSet, TQ3ElementType theType)
TQ3Status Q3AttributeSet_Submit(TQ3AttributeSet attributeSet, TQ3ViewObject view)
TQ3XObjectClass Q3XElementClass_Register(TQ3ElementType *elementType, const char *name, unsigned long sizeOfElement, TQ3XMetaHandler metaHandler)
TQ3Status Q3Set_Empty(TQ3SetObject target)
TQ3Status Q3AttributeSet_Inherit(TQ3AttributeSet parent, TQ3AttributeSet child, TQ3AttributeSet result)
TQ3Status Q3AttributeSet_Clear(TQ3AttributeSet attributeSet, TQ3AttributeType theType)
TQ3Status Q3Set_GetNextElementType(TQ3SetObject theSet, TQ3ElementType *theType)
TQ3AttributeSet Q3AttributeSet_New(void)
TQ3Status Q3XElementType_GetElementSize(TQ3ElementType elementType, unsigned long *sizeOfElement)
TQ3AttributeTypes
Definition: QD3DSet.h:177
TQ3Status Q3AttributeSet_Add(TQ3AttributeSet attributeSet, TQ3AttributeType theType, const void *data)
TQ3ObjectType Q3Set_GetType(TQ3SetObject theSet)
TQ3Status Q3Attribute_Submit(TQ3AttributeType attributeType, const void *data, TQ3ViewObject view)
TQ3Status Q3Set_Add(TQ3SetObject theSet, TQ3ElementType theType, const void *data)
TQ3SetObject Q3Set_New(void)
TQ3Status Q3AttributeSet_GetNextAttributeType(TQ3AttributeSet source, TQ3AttributeType *theType)
TQ3Status Q3Set_Get(TQ3SetObject theSet, TQ3ElementType theType, void *data)
TQ3Boolean Q3Set_Contains(TQ3SetObject theSet, TQ3ElementType theType)
TQ3XObjectClass Q3XAttributeClass_Register(TQ3AttributeType *attributeType, const char *creatorName, unsigned long sizeOfElement, TQ3XMetaHandler metaHandler)
TQ3Status Q3AttributeSet_Get(TQ3AttributeSet attributeSet, TQ3AttributeType theType, void *data)
TQ3Boolean Q3AttributeSet_Contains(TQ3AttributeSet attributeSet, TQ3AttributeType attributeType)
TQ3Status Q3AttributeSet_Empty(TQ3AttributeSet target)
Base types for Quickdraw 3D.
TQ3SetObject TQ3AttributeSet
Definition: QD3D.h:197
long TQ3ObjectType
Definition: QD3D.h:152
long TQ3ElementType
Definition: QD3D.h:684