18 Data Structures

18 Controller Data Structure

You use a controller data structure to specify information when creating a new controller object. A controller data structure is defined by the TQ3ControllerData data type.

typedef struct TQ3ControllerData {
 char         *signature;
 unsigned long         valueCount;
 unsigned long         channelCount;
 TQ3ChannelGetMethod         channelGetMethod;
 TQ3ChannelSetMethod         channelSetMethod;
} TQ3ControllerData;
signature The controller's signature. A signature is a null-terminated C string that uniquely identifies the manufacturer and model of a controller device. You are responsible for defining your controller's signature.
valueCount The number of values supported by the controller.
channelCount The number of channels supported by the controller. If the value in this field is greater than 0, you may define optional routines that get and set those channels.
channelGetMethod A pointer to a controller's channel-getting method. See page 18-49 for information on this method. This field is valid only if the value in the channelCount field is greater than 0. You may, however, pass NULL in this field if the controller cannot report the current channels.
channelSetMethod A pointer to a controller's channel-setting method. See page 18-50 for information on this method. This field is valid only if the value in the channelCount field is greater than 0. You may, however, pass NULL in this field if the controller cannot set the channels.

3D Graphics Programming with QuickDraw 3D - 21 OCT 1995

© Apple Computer, Inc.

Let us know what you think of these prototype pages.

Generated with Harlequin WebMaker