TQ3Status
Q3Bitmap_Empty (
TQ3Bitmap *bitmap
);
Release the memory used by a TQ3Bitmap.
Should be used to release the data used by TQ3Bitmaps returned by
Quesa. You should not call Q3Bitmap_Empty on TQ3Bitmaps whose
image data was allocated by you.
Result: Success or failure of the operation.
Name Description bitmap The TQ3Bitmap whose image data should be released.
TQ3Uns32
Q3Bitmap_GetImageSize (
TQ3Uns32 width,
TQ3Uns32 height
);
Determine how much image data would be required for a TQ3Bitmap.
Returns the smallest block of memory that could hold a bitmap
with the specified dimensions.
Result: The number of bytes needed for the bitmap.
Name Description width The proposed width of the bitmap. height The proposed height of the bitmap.
TQ3Status
Q3Exit (
void
);
Shuts down Quesa, and releases any resources allocated by the library.
TQ3Status
Q3GetReleaseVersion (
TQ3Uns32 *releaseRevision
);
Returns the revision of the installed Quesa software in the format of the
first four bytes of a Macintosh 'vers' resource.
The four bytes contain 1) the major revision level, 2) the minor revision,
3) the development stage, and 4) the prerelease revision level, respectively.
The three revision levels are each represented in binary coded decimal.
The development stage can be development (0x20), alpha (0x40), beta (0x60)
or release (0x80).
For example, if the revision is 1.61a23 (= 1.6.1a23), returns 0x01614023.
For more information, see the description of the 'vers' resource
in the book Inside Macintosh: Macintosh Toolbox Essentials.
Note that unlike QD3D, Quesa allows Q3GetReleaseVersion to be called
outside of a Q3Initialize/Q3Exit block.
Result: Success or failure of the operation.
Name Description releaseRevision Receives the revision of Quesa.
TQ3Status
Q3GetVersion (
TQ3Uns32 *majorRevision,
TQ3Uns32 *minorRevision
);
Returns the major and minor revision levels of the installed
Quesa software.
For example, if the revision is 1.6a23 (= 1.6.0a23), returns 1
as the major revision level and 6 as the minor revision level:
The final 0 in the minor revision level is omitted.
If the revision is 1.61a23 (= 1.6.1a23), returns 1 as the major
revision level and 61 as the minor revision level.
Note that unlike QD3D, Quesa allows Q3GetVersion to be called
outside of a Q3Initialize/Q3Exit block.
Result: Success or failure of the operation.
Name Description majorRevision Receives the major revision level of Quesa. minorRevision Receives the minor revision level of Quesa.
TQ3Status
Q3Initialize (
void
);
Initialises Quesa.
Only Q3IsInitialized, Q3GetVersion, and Q3GetReleaseVersion may be
called before the Quesa library is initialised.
TQ3Boolean
Q3IsInitialized (
void
);
Tests to see if Quesa has been initialised or not.
TQ3Status
Q3ObjectHierarchy_EmptySubClassData (
TQ3SubClassData *subClassData
);
Release the memory allocated by a previous call to
Q3ObjectHierarchy_GetSubClassData.
Result: Success or failure of the operation.
Name Description subClassData The sub-class data to release.
TQ3Status
Q3ObjectHierarchy_GetStringFromType (
TQ3ObjectType objectClassType,
TQ3ObjectClassNameString objectClassString
);
Returns the class name string for a class identified by a class type.
Result: Success or failure of the operation.
Name Description objectClassType The class type of the class to locate. objectClassString Receives the class name string of the class.
TQ3Status
Q3ObjectHierarchy_GetSubClassData (
TQ3ObjectType objectClassType,
TQ3SubClassData *subClassData
);
Return the immediate sub-classes of a class.
The data returned must be released with a subsequent call to
Q3ObjectHierarchy_EmptySubClassData.
Result: Success or failure of the operation.
Name Description objectClassType The class type of the class to query. subClassData Receives the immediate sub-classes of the class.
TQ3Status
Q3ObjectHierarchy_GetTypeFromString (
const TQ3ObjectClassNameString objectClassString,
TQ3ObjectType *objectClassType
);
Returns the class type for a class identified by a class name string.
Result: Success or failure of the operation.
Name Description objectClassString The class name of the class to locate. objectClassType Receives the class type of the class.
TQ3Boolean
Q3ObjectHierarchy_IsNameRegistered (
const char *objectClassName
);
Check to see if a class is registered with Quesa.
Result: True or false as the class is registered or not.
Name Description majorRevision The class name of the class to check.
TQ3Boolean
Q3ObjectHierarchy_IsTypeRegistered (
TQ3ObjectType objectClassType
);
Check to see if a class is registered with Quesa.
Result: True or false as the class is registered or not.
Name Description objectClassType The class type of the class to check.
TQ3Status
Q3Object_AddElement (
TQ3Object object,
TQ3ElementType theType,
const void *data
);
Add an element to an object.
Same as Q3Shape_AddElement, except that the object is not
required to be a shape or set.
If the object is Shared, this operation will increment the object's edit index.
This function is not available in QD3D.
Result: Success or failure of the operation.
Name Description object The object to update. theType The type of the element data. data The element data.
TQ3Status
Q3Object_CleanDispose (
TQ3Object *theObject
);
Cleanly disposes of a Quesa object.
If theObject is not NULL, invokes Q3Object_Dispose to decrement the object
reference count then clears the supplied pointer to prevent stale references.
Equivalent to:
if (theObject != NULL)
{
Q3Object_Dispose(theObject);
theObject = NULL;
}
This function is not available in QD3D.
Result: Success or failure of the operation.
Name Description theObject The object to dispose (may be NULL).
TQ3Status
Q3Object_ClearElement (
TQ3Object object,
TQ3ElementType theType
);
Empty an object of a particular type of element.
Same as Q3Shape_ClearElement, except that the object is not
required to be a shape or set.
If the object is Shared, this operation will increment the object's edit index.
This function is not available in QD3D.
Result: Success or failure of the operation.
Name Description object The object to update. theType The element type to remove.
TQ3Boolean
Q3Object_ContainsElement (
TQ3Object object,
TQ3ElementType theType
);
Check to see if an object contains an element of a given type.
Same as Q3Shape_ContainsElement, except that the object is not
required to be a shape or set.
This function is not available in QD3D.
Result: Success or failure of the operation.
Name Description object The object to query. theType The type of the element data to look for.
TQ3Status
Q3Object_Dispose (
TQ3Object object
);
Disposes of a Quesa object.
Since TQ3Objects are reference counted, this function decrements the
reference count of the object. When the reference count falls to 0,
the object is disposed of.
Result: Success or failure of the operation.
Name Description object The object to dispose.
TQ3Object
Q3Object_Duplicate (
TQ3Object object
);
Duplicates a Quesa object.
Returns a new copy of the object, with a reference count of 1.
Result: A new copy of the object.
Name Description object The object to duplicate.
TQ3Status
Q3Object_EmptyElements (
TQ3Object object
);
Empty an object of any elements it contains.
Same as Q3Shape_EmptyElements, except that the object is not
required to be a shape or set.
If the object is Shared, this operation will increment the object's edit index.
This function is not available in QD3D.
Result: Success or failure of the operation.
Name Description object The object to update.
TQ3Status
Q3Object_GetElement (
TQ3Object object,
TQ3ElementType theType,
void *data
);
Get an element from an object.
Same as Q3Shape_GetElement, except that the object is not
required to be a shape or set.
This function is not available in QD3D.
Result: Success or failure of the operation.
Name Description object The object to query. theType The type of the element data. data Receives the element data.
TQ3ObjectType
Q3Object_GetLeafType (
TQ3Object object
);
Returns the leaf type of an object.
Returns the most specific type that can be identified from the object
(e.g., a camera object may have a leaf type of kQ3CameraTypeViewAngleAspect).
Returns kQ3ObjectTypeInvalid if the object type is unknown.
Result: The leaf type of the object.
Name Description object The object to test.
TQ3Status
Q3Object_GetNextElementType (
TQ3Object object,
TQ3ElementType *theType
);
Iterate through the element types in an object.
Same as Q3Shape_GetNextElementType, except that the object is not
required to be a shape or set.
Pass in kQ3ElementTypeNone to start iterating through the element
types in the object, and pass back the returned value to obtain
the next type. The type is set to kQ3ElementTypeNone if there are no more
elements in the shape.
This function is not available in QD3D.
Result: Success or failure of the operation.
Name Description object The object to query. theType Receives the next element type.
TQ3Status
Q3Object_GetSet (
TQ3Object object,
TQ3SetObject* set
);
Get the element set of an object. This is not the same as the set
returned by Q3Shape_GetSet.
This function is primarily for the use of file format plug-ins.
Most applications will not need it.
This function is not available in QD3D.
Result: Success or failure of the operation.
Name Description object The object. set Receives a set object, or NULL.
TQ3ObjectType
Q3Object_GetType (
TQ3Object object
);
Returns the top level type of an object.
Returns kQ3ObjectTypeElement, kQ3ObjectTypePick, kQ3ObjectTypeShared,
or kQ3ObjectTypeView. Returns kQ3ObjectTypeInvalid if the object type
is unknown.
Result: The top level type of the object.
Name Description object The object to test.
TQ3Boolean
Q3Object_IsDrawable (
TQ3Object object
);
Tests to see if an object is drawable.
Only drawable objects may be submitted to a view's rendering loop.
Result: True or false as the object is drawable or not.
Name Description object The object to test.
TQ3Boolean
Q3Object_IsType (
TQ3Object object,
TQ3ObjectType theType
);
Tests to see if an object belongs to a given type.
Examines both the object supplied and its parents. E.g., a camera object
would return true for a type of kQ3CameraTypeViewAngleAspect,
kQ3ShapeTypeCamera, kQ3SharedTypeShape, and kQ3ObjectTypeShared but would
return false for kQ3ObjectTypePick.
Result: True or false as the object belongs to the type or not.
Name Description object The object to test. theType The type to test the object against.
TQ3Boolean
Q3Object_IsWritable (
TQ3Object object,
TQ3FileObject theFile
);
Tests to see if an object is writable.
Only drawable objects may be submitted to a view's writing loop.
Result: True or false as the object is writable or not.
Name Description object The object to test.
TQ3Status
Q3Object_SetSet (
TQ3Object object,
TQ3SetObject set
);
Assign to the element set of an object, disposing any previous set.
This is not the same as the set element that is
changed by Q3Shape_SetSet.
This function is primarily for the use of file format plug-ins.
Most applications will not need it.
This function is not available in QD3D.
Result: A set object, or NULL.
Name Description object The object. set A set object.
TQ3Status
Q3Object_Submit (
TQ3Object object,
TQ3ViewObject view
);
Submit an object to a view.
The object is submitted to the view's current processing loop,
e.g., for rendering, picking, or writing to a file.
Result: Success or failure of the operation.
Name Description object The object to submit. view The view to submit the object to.
TQ3Status
Q3Shape_AddElement (
TQ3ShapeObject shape,
TQ3ElementType theType,
const void *data
);
Add an element to a shape.
Result: Success or failure of the operation.
Name Description shape The object to update. theType The type of the element data. data The element data.
TQ3Status
Q3Shape_ClearElement (
TQ3ShapeObject shape,
TQ3ElementType theType
);
Empty a shape of a particular type of element.
Result: Success or failure of the operation.
Name Description shape The object to update. theType The element type to remove.
TQ3Boolean
Q3Shape_ContainsElement (
TQ3ShapeObject shape,
TQ3ElementType theType
);
Check to see if a shape contains an element of a given type.
Result: Success or failure of the operation.
Name Description shape The object to query. theType The type of the element data to look for.
TQ3Status
Q3Shape_EmptyElements (
TQ3ShapeObject shape
);
Empty a shape of any elements it contains.
Result: Success or failure of the operation.
Name Description shape The object to update.
TQ3Status
Q3Shape_GetElement (
TQ3ShapeObject shape,
TQ3ElementType theType,
void *data
);
Get an element from a shape.
Result: Success or failure of the operation.
Name Description shape The object to query. theType The type of the element data. data Receives the element data.
TQ3Status
Q3Shape_GetNextElementType (
TQ3ShapeObject shape,
TQ3ElementType *theType
);
Iterate through the element types in a shape.
Pass in kQ3ElementTypeNone to start iterating through the element
types in the shape, and pass back the returned value to obtain
the next type. Is set to kQ3ElementTypeNone if there are no more
elements in the shape.
Result: Success or failure of the operation.
Name Description shape The object to query. theType Receives the next element type.
TQ3Status
Q3Shape_GetSet (
TQ3ShapeObject shape,
TQ3SetObject *theSet
);
Get the set element currently associated with a shape.
The function call Q3Shape_GetSet( o, &s ) is equivalent to
Q3Shape_GetElement( o, kQ3ElementTypeSet, &s ).
Note that this is not the same as the attribute set of a geometry object,
nor is in the internal set which holds elements on an object. That is,
after adding elements or attributes to an object, this function may still
return the NULL set.
Result: Success or failure of the operation.
Name Description shape The object to query. theSet Receives the set of the object, or NULL.
TQ3ObjectType
Q3Shape_GetType (
TQ3ShapeObject shape
);
Get the type of a shape object.
Returns kQ3ObjectTypeInvalid if the object is not a shape object or
the type can not be determined. Returns a kQ3ShapeTypeXXXX value
for shape objects.
Result: The type of the shape object.
Name Description shape The object to test.
TQ3Status
Q3Shape_SetSet (
TQ3ShapeObject shape,
TQ3SetObject theSet
);
Set the set element currently associated with a shape.
The function call Q3Shape_SetSet( o, s ) is equivalent to
Q3Shape_SetElement( o, kQ3ElementTypeSet, &s ).
Note that this is not the same as the attribute set of a geometry object.
Result: Success or failure of the operation.
Name Description shape The object to update. theSet The new set for the object.
TQ3Status
Q3Shared_Edited (
TQ3SharedObject sharedObject
);
Change the edit index of a shared object.
Editing a shared object will change its edit index automatically: this
function is typically used for shared plug-in objects who need to indicate
to Quesa that their private data has changed.
Result: Success or failure of the operation.
Name Description sharedObject The object to update.
TQ3Uns32
Q3Shared_GetEditIndex (
TQ3SharedObject sharedObject
);
Get the edit index of a shared object.
An edit index is a unique number associated with a shared object, which
changes each time the object is edited. By testing this number, you
can determine when an object has been edited.
Result: The current edit index of the object.
Name Description sharedObject The object to query.
TQ3SharedObject
Q3Shared_GetReference (
TQ3SharedObject sharedObject
);
Increment the reference count of a shared object.
Result: The object whose reference count has been incremented.
Name Description sharedObject The object whose reference count should be incremented.
TQ3Uns32 Q3Shared_GetReferenceCount ( TQ3SharedObject sharedObject );
Return the reference count of a shared object.
This function should be used only for debugging. If you are
tempted to use it for something else, then you probably don't
understand the correct way to work with reference-counted objects.
This function is not available in QD3D.
Result: Reference count.
Name Description sharedObject The object to test.
TQ3ObjectType
Q3Shared_GetType (
TQ3SharedObject sharedObject
);
Get the type of a shared object.
Returns kQ3ObjectTypeInvalid if the object is not a shared object or
the type can not be determined. Returns a kQ3SharedTypeXXXX value
for shared objects.
Result: The type of the shared object.
Name Description sharedObject The object to test.
TQ3Boolean
Q3Shared_IsReferenced (
TQ3SharedObject sharedObject
);
Determine if a shared object has more than one reference to it.
Returns kQ3True if the object has more than one reference to it. Will
return kQ3False if the object a reference count of one.
Result: True or false as the object has more than one reference.
Name Description sharedObject The object to test.
Copyright © 1999-2003 Quesa Developers last updated on 8/10/2003