TQ3ChannelSetMethod
You can define a function that QuickDraw 3D calls to set a channel of a controller.
typedef TQ3Status (*TQ3ChannelSetMethod) ( TQ3ControllerRef controllerRef, unsigned long channel, const void *data, unsigned long dataSize);
controllerRef- A reference to a controller.
channel- An index into the list of channels associated with the specified controller. This value is always greater than or equal to 0 and less than the channel count specified at the time
Q3Controller_Newwas called.data- On entry, a pointer to a buffer that contains the desired value of the specified controller channel. If this field contains the value
NULL, you should reset the specified channel to a default or inactive value.dataSize- On entry, the number of bytes of data in the specified buffer.
DESCRIPTION
YourTQ3ChannelSetMethodfunction should set the controller channel specified by thecontrollerRefandchannelparameters to the value specified by thedataparameter. ThedataSizeparameter specifies the number of bytes in the data buffer. QuickDraw 3D allocates memory for the data buffer before it calls your function and deallocates the memory after your function has returned. The maximum number of bytes that the data buffer can hold is defined by a constant:
#define kQ3ControllerSetChannelMaxDataSize 256SPECIAL CONSIDERATIONS
You need to define a channel-setting method only if you are writing a device driver for a controller. You can, however, callQ3Controller_SetChannelat any time to invoke a controller's channel-setting method.RESULT CODES
Your channel-setting method should returnkQ3Successif it is able to set the specified channel to the specified value andkQ3Failureotherwise.SEE ALSO
See the description ofQ3Controller_SetChannelon page 18-19 for information on setting a controller's channels.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help