Q3Bitmap_Empty |
( 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.
- bitmap
- The TQ3Bitmap whose image data should be released.
Q3Bitmap_GetBit |
( TQ3Boolean ) Q3Bitmap_GetBit ( const TQ3Bitmap *theBitmap, TQ3Uns32 x, TQ3Uns32 y );
Get the status of a bit within a bitmap.
This function is not available in QD3D.
- theBitMap
- The bitmap to query.
- x
- The x coordinate of the pixel to query.
- y
- The y coordinate of the pixel to query.
Q3Bitmap_GetImageSize |
( 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.
- width
- The proposed width of the bitmap.
- height
- The proposed height of the bitmap.
Q3Bitmap_SetBit |
( TQ3Status ) Q3Bitmap_SetBit ( TQ3Bitmap *theBitmap, TQ3Uns32 x, TQ3Uns32 y, TQ3Boolean theState );
Set the status of a bit within a bitmap.
This function is not available in QD3D.
- theBitMap
- The bitmap to update.
- x
- The x coordinate of the pixel to update.
- y
- The y coordinate of the pixel to update.
- theState
- The new state for the pixel.
Q3Exit |
( TQ3Status ) Q3Exit (void);
Shuts down Quesa, and releases any resources allocated by the library.
Q3GetReleaseVersion |
( 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.
- releaseRevision
- Receives the revision of Quesa.
Q3GetVersion |
( 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.
- majorRevision
- Receives the major revision level of Quesa.
- minorRevision
- Receives the minor revision level of Quesa.
Q3Initialize |
( TQ3Status ) Q3Initialize (void);
Initialises Quesa.
Only Q3IsInitialized, Q3GetVersion, and Q3GetReleaseVersion may be
called before the Quesa library is initialised.
Q3IsInitialized |
( TQ3Boolean ) Q3IsInitialized (void);
Tests to see if Quesa has been initialised or not.
Q3ObjectHierarchy_EmptySubClassData |
( TQ3Status ) Q3ObjectHierarchy_EmptySubClassData ( TQ3SubClassData *subClassData );
Release the memory allocated by a previous call to
Q3ObjectHierarchy_GetSubClassData.
- subClassData
- The sub-class data to release.
Q3ObjectHierarchy_GetStringFromType |
( TQ3Status ) Q3ObjectHierarchy_GetStringFromType ( TQ3ObjectType objectClassType, TQ3ObjectClassNameString objectClassString );
Returns the class name string for a class identified by a class type.
- objectClassType
- The class type of the class to locate.
- objectClassString
- Receives the class name string of the class.
Q3ObjectHierarchy_GetSubClassData |
( 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.
- objectClassType
- The class type of the class to query.
- subClassData
- Receives the immediate sub-classes of the class.
Q3ObjectHierarchy_GetTypeFromString |
( TQ3Status ) Q3ObjectHierarchy_GetTypeFromString ( const TQ3ObjectClassNameString objectClassString, TQ3ObjectType *objectClassType );
Returns the class type for a class identified by a class name string.
- objectClassString
- The class name of the class to locate.
- objectClassType
- Receives the class type of the class.
Q3ObjectHierarchy_IsNameRegistered |
( TQ3Boolean ) Q3ObjectHierarchy_IsNameRegistered ( const char *objectClassName );
Check to see if a class is registered with Quesa.
- majorRevision
- The class name of the class to check.
Q3ObjectHierarchy_IsTypeRegistered |
( TQ3Boolean ) Q3ObjectHierarchy_IsTypeRegistered ( TQ3ObjectType objectClassType );
Check to see if a class is registered with Quesa.
- objectClassType
- The class type of the class to check.
Q3Object_AddElement |
( 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.
- object
- The object to update.
- theType
- The type of the element data.
- data
- The element data.
Q3Object_CleanDispose |
( 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.
- theObject
- The object to dispose (may be NULL).
Q3Object_ClearElement |
( 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.
- object
- The object to update.
- theType
- The element type to remove.
Q3Object_ContainsElement |
( 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.
- object
- The object to query.
- theType
- The type of the element data to look for.
Q3Object_Dispose |
( TQ3Status ) Q3Object_Dispose ( TQ3Object object );
Disposes of a Quesa object.
Most types of TQ3Object are reference-counted. This function
decrements the reference count of the object. When the reference count
falls to 0, the object is deleted.
When used on a non-reference-counted object such as a view or pick,
the object is deleted immediately.
- object
- The object to dispose.
Q3Object_Duplicate |
( TQ3Object ) Q3Object_Duplicate ( TQ3Object object );
Duplicates a Quesa object.
Returns a new copy of the object, with a reference count of 1.
- object
- The object to duplicate.
Q3Object_EmptyElements |
( 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.
- object
- The object to update.
Q3Object_GetElement |
( 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.
- object
- The object to query.
- theType
- The type of the element data.
- data
- Receives the element data.
Q3Object_GetLeafType |
( 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.
- object
- The object to test.
Q3Object_GetNextElementType |
( 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.
- object
- The object to query.
- theType
- Receives the next element type.
Q3Object_GetProperty |
( TQ3Status ) Q3Object_GetProperty ( TQ3Object object, TQ3ObjectType propType, TQ3Uns32 bufferSize, TQ3Uns32* actualSize, void* buffer );
Get property data from an object.
The operation fails if the property does not exist or if you provide a
buffer that is not large enough to hold the data.
If you do not know the size of the property, you may call Q3Object_GetProperty
passing NULL for the buffer to find the size of the data, then allocate your
buffer and call Q3Object_GetProperty again.
This function is not available in QD3D.
- object
- The object.
- propType
- Property type tag.
- bufferSize
- Size of provided buffer in bytes.
- actualSize
- Returns size of returned data in bytes. You may pass NULL if you do not need this information.
- buffer
- Buffer to receive the property data. May be NULL.
Q3Object_GetSet |
( 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.
- object
- The object.
- set
- Receives a set object, or NULL.
Q3Object_GetType |
( 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.
- object
- The object to test.
Q3Object_IsDrawable |
( 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.
- object
- The object to test.
Q3Object_IsType |
( 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.
- object
- The object to test.
- theType
- The type to test the object against.
Q3Object_IsWritable |
( 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.
- object
- The object to test.
Q3Object_RemoveProperty |
( TQ3Status ) Q3Object_RemoveProperty ( TQ3Object object, TQ3ObjectType propType );
Remove a property from an object.
This function is not available in QD3D.
- object
- The object.
- propType
- Property type tag.
Q3Object_SetProperty |
( TQ3Status ) Q3Object_SetProperty ( TQ3Object object, TQ3ObjectType propType, TQ3Uns32 dataSize, const void* data );
Set a property of an object. If there was already a property of the
same type, it is replaced.
Property type tags consisting of all lowercase ASCII letters are reserved
for Quesa internal use.
This function is not available in QD3D.
- object
- The object.
- propType
- Property type tag.
- dataSize
- Size in bytes of the data.
- data
- Data to copy into the property.
Q3Object_SetSet |
( 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.
- object
- The object.
- set
- A set object.
Q3Object_Submit |
( 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.
- object
- The object to submit.
- view
- The view to submit the object to.
Q3Shape_AddElement |
( TQ3Status ) Q3Shape_AddElement ( TQ3ShapeObject shape, TQ3ElementType theType, const void *data );
Add an element to a shape.
- shape
- The object to update.
- theType
- The type of the element data.
- data
- The element data.
Q3Shape_ClearElement |
( TQ3Status ) Q3Shape_ClearElement ( TQ3ShapeObject shape, TQ3ElementType theType );
Empty a shape of a particular type of element.
- shape
- The object to update.
- theType
- The element type to remove.
Q3Shape_ContainsElement |
( TQ3Boolean ) Q3Shape_ContainsElement ( TQ3ShapeObject shape, TQ3ElementType theType );
Check to see if a shape contains an element of a given type.
- shape
- The object to query.
- theType
- The type of the element data to look for.
Q3Shape_EmptyElements |
( TQ3Status ) Q3Shape_EmptyElements ( TQ3ShapeObject shape );
Empty a shape of any elements it contains.
- shape
- The object to update.
Q3Shape_GetElement |
( TQ3Status ) Q3Shape_GetElement ( TQ3ShapeObject shape, TQ3ElementType theType, void *data );
Get an element from a shape.
- shape
- The object to query.
- theType
- The type of the element data.
- data
- Receives the element data.
Q3Shape_GetNextElementType |
( 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.
- shape
- The object to query.
- theType
- Receives the next element type.
Q3Shape_GetSet |
( 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.
- shape
- The object to query.
- theSet
- Receives the set of the object, or NULL.
Q3Shape_GetType |
( 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.
- shape
- The object to test.
Q3Shape_SetSet |
( 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.
- shape
- The object to update.
- theSet
- The new set for the object.
Q3Shared_Edited |
( 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.
- sharedObject
- The object to update.
Q3Shared_GetEditIndex |
( 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.
- sharedObject
- The object to query.
Q3Shared_GetReference |
( TQ3SharedObject ) Q3Shared_GetReference ( TQ3SharedObject sharedObject );
Increment the reference count of a shared object.
- sharedObject
- The object whose reference count should be incremented.
Q3Shared_GetReferenceCount |
( 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.
- sharedObject
- The object to test.
Q3Shared_GetType |
( 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.
- sharedObject
- The object to test.
Q3Shared_IsReferenced |
( 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.
- sharedObject
- The object to test.
Q3Shared_SetEditIndex
|
( void ) Q3Shared_SetEditIndex ( TQ3SharedObject inObject, TQ3Uns32 inEditIndex );
This function should be used even more rarely than
Q3Shared_Edited. It was added to solve a specific problem:
Caching information in a custom element attached to an object
without changing the edit index of the object.
This function is not available in QD3D.
- inObject
- A shared object to update.
- inEditIndex
- New edit index.
© 1999-2008 Quesa Developers (Last Updated 5/10/2008)