Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 18 - QuickDraw 3D Pointing Device Manager / QuickDraw 3D Pointing Device Manager Reference
Data Structures


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;
Field Description
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-47 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-48 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.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help