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
QuickDraw 3D Pointing Device Manager Routines / Creating and Managing Controllers


Q3Controller_GetValues

You can use the Q3Controller_GetValues function to get the list of values of a controller.

TQ3Status Q3Controller_GetValues (
TQ3ControllerRef controllerRef, 
unsigned long valueCount, 
float *values, 
TQ3Boolean *changed, 
unsigned long *serialNumber);
controllerRef
A reference to a controller.
valueCount
The number of elements in the array pointed to by the values parameter.
values
On entry, a pointer to an array of controller values. The size of the array is determined by the number of elements in the array (as specified by the valueCount parameter) and the size of a controller value (which is controller-dependent).
changed
On exit, a Boolean value that indicates whether the specified array of values was changed (kQ3True) or not (kQ3False).
serialNumber
On entry, a controller serial number, or NULL.
DESCRIPTION
The Q3Controller_GetValues function returns, in the values parameter, a pointer to an array that contains the current values for the controller specified in the controllerRef parameter. The valueCount parameter specifies the number of elements in the array (which you must already have allocated). Q3Controller_GetValues might fill in fewer elements if the controller does not support the specified number of values.

If the value of the serialNumber parameter is NULL, Q3Controller_GetValues fills in the values array and returns the value kQ3True in the changed parameter. Otherwise, the value specified in the serialNumber parameter is compared with the controller's current serial number. If the two serial numbers are identical, Q3Controller_GetValues leaves the values array and the serialNumber parameter unchanged and returns the value kQ3False in the changed parameter. If the two serial number differ, Q3Controller_GetValues fills in the values array, updates the serialNumber parameter, and returns the value kQ3True in the changed parameter.

If the specified controller is inactive, the values array and the changed parameter are unchanged.


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