Functions



HIDCloseReportDescriptor

Abstract: Disposes of the memory the parser allocated for the HIDOpenReportDescriptor function.
extern OSStatus HIDCloseReportDescriptor(HIDPreparsedDataRef preparsedDataRef);

Parameters

NameDescription
hidReportDescriptorContains a pointer to the actual HID report descriptor from the USB device's firmware
preparsedDataRefPreparsed data reference for the report that is returned by the HIDOpenReportDescriptor function. After making a call to the HIDCloseReportDescriptor function, the preparsedDataRef is invalid and should not be used.
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDGetButtonCaps

Abstract: Returns the button capabilities structures for a HID device based on the given preparsed data.
extern OSStatus HIDGetButtonCaps(HIDReportType reportType,
 HIDButtonCapsPtr buttonCaps,
 UInt32 * buttonCapsSize,
 HIDPreparsedDataRef preparsedDataRef);

Parameters

NameDescription
reportTypeSpecifies the type of report for which to retrieve the scaled value. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport
buttonCapsPoints to a caller-allocated buffer that will contain, on return, an array of HIDButtonCaps structures. The structures contain information for all buttons that meet the search criteria
buttonCapsSizeContains the size of the buttonCaps array passed in to the function and is set to the number of elements actually placed in the array after the call completes.
preparsedDataRefPreparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDGetButtons

Abstract: The HIDGetButtons function takes a report from a HID device and gets the current state of the buttons in that report.
extern OSStatus HIDGetButtons(HIDReportType reportType,
 UInt32 collection,
 HIDUsageAndPagePtr usageList,
 UInt32 * usageListSize,
 HIDPreparsedDataRef preparsedDataRef,
 void * report,
 ByteCount reportLength);

Parameters

NameDescription
reportTypeSpecifies the type of report, provided in the report parameter, from which to retrieve the buttons. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport or kHIDFeatureReport
collectionOptionally specifies the link collection identifier used to retrieve only specific button states. If this value is non-zero, only the buttons that are part of the given collection are returned.
usageListOn return, points to a caller-allocated buffer that contains the usages of all the buttons that are pressed.
usageListSizeIs the size, in array elements, of the buffer provided in the usageList parameter. On return, this parameter contains the number of button states that were set by this routine. If the error kHIDBufferToSmallErr was returned, this parameter contains the number of array elements required to hold all button data requested. The maximum number of buttons that can ever be returned for a given type of report can be obtained by calling the HIDMaxUsageListLength function.
preparsedDataRefPreparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function
reportPoints to the caller-allocated buffer that contains the device report data.
reportLengthSpecifies the length, in bytes, of the report data provided in the report parameter.
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDGetButtonsOnPage

Abstract: Retrieves the button stat information for buttons on a specified usage page.
extern OSStatus HIDGetButtonsOnPage(HIDReportType reportType,
 HIDUsage usagePage,
 UInt32 collection,
 HIDUsage * usageList,
 UInt32 * usageListSize,
 HIDPreparsedDataRef preparsedDataRef,
 void * report,
 ByteCount reportLength);

Parameters

NameDescription
reportTypeSpecifies the type of report, provided in the report parameter, from which to retrieve the buttons. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport or kHIDFeatureReport.
usagePageSpecifies the usage page of the buttons for which to retrieve the current state.
collectionOptionally specifies the link collection identifier used to retrieve only specific button states. If this value is non-zero, only the buttons that are part of the given collection are returned.
usageListOn return, points to a caller-allocated buffer that contains the usages of all the buttons that are perssed and belong to the usage page specified in the usagePage parameter.
usageListSizeIs the size, in array elements, of the buffer provided in the usageList parameter. On return, this parameter contains the number of button states that were set by this routine. If the error kHIDBufferTooSmallErr was returned, this parameter contains the number of array elements required to hold all button data requested. The maximum number of buttons that can ever be returned for a given type of report can be obtained by calling the HIDMaxUsageListLength function.
preparsedDataRefPreparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function
reportPoints to the caller-allocated buffer that contains the device report data
reportLengthSpecifies the size, in bytes, of the report data provided in the report parameter
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDGetCaps

Abstract: Returns the capabilities of a HID device based on the given preparsed data.
extern OSStatus HIDGetCaps(HIDPreparsedDataRef preparsedDataRef,
 HIDCapsPtr capabilities);

Parameters

NameDescription
preparsedDataRefPreparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function
capabilitiesPoints to a caller allocated buffer, that upon return contains the parsed capability information for this HID device.
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDGetCollectionNodes

Abstract: Returns an array of HIDCollectionNode structures that describe the relationships and layout of the link collections within this top level collection.
extern OSStatus HIDGetCollectionNodes(HIDCollectionNodePtr collectionNodes,
 UInt32 * collectionNodesSize,
 HIDPreparsedDataRef preparsedDataRef);

The length of the buffer required, in array elements, for an entire collection node array is found in the HIDCaps structure member numberCollectionNodes. You obtain the HIDCaps information by calling the HIDGetCaps function. For information on the relationships of link collections described by the data returned from this routine, see the descripton of the HIDCollectionNode structure.

Parameters

NameDescription
collectionNodesPoints to a caller-allocated array of HIDCollectionNode structures in which this routine returns an entry for each collection within the top level collection. A collection is a group of corresponding HID descriptors containing input, output, and feature items that have some common relationship to one another. For example, a pointer collection contains items for x and y position data, and button data.
collectionNodesSizeOn input, specifies the length in array elements of the buffer provided at collectionNodes. On output, this parameter is set to the number of entries in the collectionNodes array that were initialized.
preparsedDataRefPreparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDGetScaledUsageValue

Abstract: The HIDGetScaledUsageValue function returns the capabilities for all buttons for a given top level collection.
extern OSStatus HIDGetScaledUsageValue(HIDReportType reportType,
 HIDUsage usagePage,
 UInt32 collection,
 HIDUsage usage,
 SInt32 * usageValue,
 HIDPreparsedDataRef preparsedDataRef,
 void * report,
 ByteCount reportLength);

Clients who which to obtain all capabilities for a usage that contains multiple data items for a single usage that corresponds to a HID byte array, must call the HIDGetUsageValueArray function.

Parameters

NameDescription
reportTypeSpecifies the type of report for which to retrieve the scaled value. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport.
usagePageSpecifies the usage page of the value to be retrieved.
collectionOptionally specifies the link collection identifier of the value to be retrieved.
usageSpecifies the usage of the scaled value to be retrieved.
usageValuePoints to a variable, that on return from this routine holds the scaled value retrieved from the device report.
preparsedDataRefPreparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function
reportPoints to the caller-allocated buffer that contains the device report data
reportLengthSpecifies the length, in bytes, of the report data provided at report
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDGetSpecificButtonCaps

Abstract: Retrieves the capabilities for all buttons in a specific type of report that meet the search criteria.
extern OSStatus HIDGetSpecificButtonCaps(HIDReportType reportType,
 HIDUsage usagePage,
 UInt32 collection,
 HIDUsage usage,
 HIDButtonCapsPtr buttonCaps,
 UInt32 * buttonCapsSize,
 HIDPreparsedDataRef preparsedDataRef);

The HIDGetSpecificButtonCaps function retrieves capability data for buttons that meet a given search criteria, as opposed to the HIDGetButtonCaps function which returns the capability data for all buttons on the device. Calling this routine specifying zero for usagePage, usage and collection is equivalent to calling the HIDGetButtonCaps function.

Parameters

NameDescription
reportTypeSpecifies the type of report for which to retrieve the button capabilities. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport.
usagePageSpecifies a usage page identifier to use as a search criteria. If this parameter is non-zero, then only buttons that specify this usage page will be retrieved.
collectionSpecifies a link collection identifier to use as a search criteria. If this parameter is non-zero, then only buttons that are part of the specified link collection are retrieved.
usageSpecifies a usage identifier to use as a search criteria. If this parameter is non-zero, then only buttons that match the value specified are retrieved.
buttonCapsPoints to a caller-allocated buffer that will contain, on return, an array of HIDButtonCaps structures. The structures contain information for all buttons that meet the search criteria.
buttonCapsLengthOn input, specifies the length, in array elements, of the buffer provided in the buttonCaps parameter. On output, this parameter is set to the actual number of elements that were returned by the function call, in the buffer provided in the buttonCaps parameter, if the routine completed without error. The correct length necessary to retrieve the button capabilities can be found in the capability data returned for the device by the HIDGetCaps function.
preparsedDataRefPreparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDGetSpecificValueCaps

Abstract: Retrieves the capabilities for all values in a specific type of report that meet the search criteria.
extern OSStatus HIDGetSpecificValueCaps(HIDReportType reportType,
 HIDUsage usagePage,
 UInt32 collection,
 HIDUsage usage,
 HIDValueCapsPtr valueCaps,
 UInt32 * valueCapsSize,
 HIDPreparsedDataRef preparsedDataRef);

The HIDGetSpecificValueCaps function retrieves capability data for values that meet given search criteria, as opposed to the HIDGetValueCaps function, which returns the capability data for all values on the device. Calling this routine with a value of zero for usagePage, usage and collection parameters is equivalent to calling the HIDGetValueCaps function.

Parameters

NameDescription
reportTypeSpecifies the type of report for which to retrieve the value capabilities. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport or kHIDFeatureReport.
usagePageSpecifies a usage page identifier to use as a search criteria. If this parameter is non-zero, then only values that specify this usage page will be retrieved.
collectionSpecifies a link collection identifier to use as a search criteria. If this parameter is non-zero, then only values that are part of this link collection will be retrieved.
usageSpecifies a usage identifier to use as a search criteria. If this parameter is non-zero, then only values that specify this usage will be retrieved.
valueCapsPoints to a caller-allocated buffer that will contain, on return, an array of HIDValueCaps structures that contain information for all values that meet the search criteria.
valueCapsLengthSpecifies the length on input, in array elements, of the buffer provided in the valueCaps parameter. On output, this parameter is set to the actual number of elements that were returned by this function call, in the buffer provided in the valueCaps parameter, if the routine completed without error. The correct length necessary to retrieve the value capabilities can be found in the capability data returned for the device from the HIDGetCaps function.
preparsedDataRefPreparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDGetUsageValue

Abstract: The HIDGetUsageValue function returns a value from a device data report given a selected search criteria.
extern OSStatus HIDGetUsageValue(HIDReportType reportType,
 HIDUsage usagePage,
 UInt32 collection,
 HIDUsage usage,
 SInt32 * usageValue,
 HIDPreparsedDataRef preparsedDataRef,
 void * report,
 ByteCount reportLength);

The HIDGetUsageValue function does not sign the value. To have the sign bit automatically applied, use the HIDGetScaledUsageValue function instead. For manually assigning the sign bit, the position of the sign bit can be found in the HIDValueCaps structure for this value. Clients who wish to obtain all data for a usage that contains multiple data items for a single usage, corresponding to a HID byte array, must call the HIDGetUsageValueArray function instead.

Parameters

NameDescription
reportTypeSpecifies the type of report, provided in report, from which to retrieve the value. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport.
usagePageSpecifies the usage page of the value to retrieve.
collectionOptionally specifies the link collection identifier of the value to be retrieved.
usageSpecifies the usage of the value to be retrieved.
usageValuePoints to a variable, that on return from this routine holds the value retrieved from the device report.
preparsedDataRefPreparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function
reportPoints to the caller-allocated buffer that contains the device report data.
reportLengthSpecifies the size, in bytes, of the report data provided in the report parameter.
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDGetUsageValueArray

Abstract: The HIDGetUsageValueArray function returns a value from a device data report given a selected search criteria.
extern OSStatus HIDGetUsageValueArray(HIDReportType reportType,
 HIDUsage usagePage,
 UInt32 collection,
 HIDUsage usage,
 Byte * usageValueBuffer,
 ByteCount usageValueBufferSize,
 HIDPreparsedDataRef preparsedDataRef,
 void * report,
 ByteCount reportLength);

When the HIDGetUsageValueArray function retrieves the data, it fills in the buffer in little-endian order beginning with the least significant bit of the data for this usage. The data is filled in without regard to byte alignment and is shifted such that the least significant bit is placed as the 1st bit of the given buffer.

Parameters

NameDescription
reportTypeSpecifies the type of report, provided in report, from which to retrieve the value. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport.
usagePageSpecifies the usage page of the data to be retrieved.
collectionOptionally specifies the link collection identifier of the data to be retrieved.
usageSpecifies the usage identifier of the value to be retrieved.
usageValueBufferPoints to a caller-allocated buffer that contains, on output, the data from the device. The correct length for this buffer can be found by multiplying the reportCount and bitSize fields of the HIDValueCaps structure for the value and rounding the resulting value up to the nearest byte.
usageValueBufferSizeSpecifies the size, in bytes, of the buffer in the usageValueBuffer parameter.
preparsedDataRefPreparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function
reportPoints to the caller-allocated buffer that contains the device report data.
reportLengthSpecifies the size, in bytes, of the report data provided in report.
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDGetValueCaps

Abstract: The HIDGetValueCaps function retrieves the capabilities for all values for a specified top level collection.
extern OSStatus HIDGetValueCaps(HIDReportType reportType,
 HIDValueCapsPtr valueCaps,
 UInt32 * valueCapsSize,
 HIDPreparsedDataRef preparsedDataRef);

The HIDGetValueCaps function retrieves the capability data for all values in a top level collection without regard for the usage, usage page or collection of the value. To retrieve value capabilities for a specific usage, usage page or collection, use the HIDGetSpecificValueCaps function.

Parameters

NameDescription
reportTypeSpecifies the type of report for which to retrieve the value capabilities. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport.
valueCapsOn return, points to a caller-allocated buffer that contains an array of HIDValueCaps structures containing information for all values in the top level collection.
valueCapsSizeOn input, specifies the size in array elements of the buffer provided in the valueCaps parameter. On output, this parameter is set to the actual number of elements that were returned in the buffer provided in the valueCaps parameter, if the function completed without error. The correct length necessary to retrieve the value capabilities can be found in the capability data returned for the device by the HIDGetCaps function.
preparsedDataRefPreparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDMaxUsageListLength

Abstract: The HIDMaxUsageListLength function returns the maximum number of buttons that can be returned from a given report type for the top level collection.
extern UInt32 HIDMaxUsageListLength(HIDReportType reportType,
 HIDUsage usagePage,
 HIDPreparsedDataRef preparsedDataRef);

Parameters

NameDescription
reportTypeSpecifies the type of report for which to get a maximum usage count. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport.
usagePageOptionally specifies the usage page identifier to use as a search criteria. If this parameter is zero, the function returns the number of buttons for the entire top-level collection regardless of the actual value of the usage page.
preparsedDataRefPreparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDOpenReportDescriptor

Abstract: The HIDOpenReportDescriptor function allocates the memory the parser needs to handle the given report descriptor, and then parses the report descriptor.
extern OSStatus HIDOpenReportDescriptor(void * hidReportDescriptor,
 ByteCount descriptorLength,
 HIDPreparsedDataRef * preparsedDataRef,
 UInt32 flags);

When the parsed information is no longer needed, clients should call the HIDCloseReportDescriptor function.

Parameters

NameDescription
hidReportDescriptorContains a pointer to the actual HID report descriptor from the USB device's firmware
descriptorLengthThe length of the HID report descriptor
preparsedDataRefPreparsed data reference to be used for subsequent function calls
flagsFlags for this runction are kHIDFlag_StrictErrorChecking = 0x00000001
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDSetButton

Abstract: The HIDSetButton function takes a report from a HID device and sets the current state of the specified button in that report.
extern OSStatus HIDSetButton(HIDReportType reportType,
 HIDUsage usagePage,
 UInt32 collection,
 HIDUsage usage,
 HIDPreparsedDataRef preparsedDataRef,
 void * report,
 ByteCount reportLength);

Parameters

NameDescription
reportTypeSpecifies the type of report. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport.
usagePageSpecifies the usage page identifier of the value to be set in the report.
collectionOptionally specifies the link collection identifier to distinguish between buttons. If this parameter is zero, it is ignored.
usagePoints to a caller-allocated buffer that contains the button data to be set in the report in the report parameter.
preparsedDataRefPreparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function
reportPoints to the caller-allocated buffer that contains the device report data.
reportLengthSpecifies the size, in bytes, of the report data provided in the report parameter.
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDSetButtons

Abstract: The HIDSetButtons function takes a report from a HID device and returns the current state of the buttons in that report.
extern OSStatus HIDSetButtons(HIDReportType reportType,
 HIDUsage usagePage,
 UInt32 collection,
 HIDUsage * usageList,
 UInt32 * usageListSize,
 HIDPreparsedDataRef preparsedDataRef,
 void * report,
 ByteCount reportLength);

Parameters

NameDescription
reportTypeSpecifies the type of repor. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport.
usagePageSpecifies the usage page identifier of the value to be set in the report.
collectionOptionally specifies the link collection identifier to distinguish between buttons. If this parameter is zero, it is ignored.
usageListPoints to a caller-allocated buffer that contains an array of button data to be set in the report in the report parameter.
usageListSizeSpecifies the size, in array elements, of the buffer provided in the usageList parameter. If an error is returned by a call to this function, the usageListLength parameter contains the location in the array provided in the usageList parameter where the error was encountered. All array entries encountered prior to the error location were successfully set in the report provided in the report parameter.
preparsedDataRefPreparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function
reportPoints to the caller-allocated buffer that contains the device report data.
reportLengthSpecifies the size, in bytes, of the report data provided in the report parameter.
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDSetScaledUsageValue

Abstract: The HIDSetScaledUsageValue function takes a signed physical (scaled) number and converts it to the logical, or device representation and inserts it in a given report.
extern OSStatus HIDSetScaledUsageValue(HIDReportType reportType,
 HIDUsage usagePage,
 UInt32 collection,
 HIDUsage usage,
 SInt32 usageValue,
 HIDPreparsedDataRef preparsedDataRef,
 void * report,
 ByteCount reportLength);

The HIDSetScaledUsageValue function automatically handles the setting of the signed bit in the data to be sent to the device.

Parameters

NameDescription
reportTypeSpecifies the type of report. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport.
usagePageSpecifies the usage page identifier of the value to be set in the report.
collectionOptionally specifies the link collection identifier to distinguish between values that have the same usage page and usage identifiers. If this parameter is zero, it will be ignored.
usageSpecifies the usage identifier of the value to be set in the report.
usageValueSpecifies the physical, or scaled, value to be set in the value for the given report.
preparsedDataRefPreparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function
reportPoints to the caller-allocated buffer that contains the device report data.
Specifiesthe length, in bytes of the report data specified in the report parameter.
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDSetUsageValue

Abstract: The HIDSetUsageValue function sets a value in a give report.
extern OSStatus HIDSetUsageValue(HIDReportType reportType,
 HIDUsage usagePage,
 UInt32 collection,
 HIDUsage usage,
 SInt32 usageValue,
 HIDPreparsedDataRef preparsedDataRef,
 void * report,
 ByteCount reportLength);

The HIDSetUsageVlaue function does not automatically handle the sign bit. Clients must either manually set the sign bit, at the position provided in the HIDValueCaps structure for this value, or call the HIDSetScaledUsageValue function.

Parameters

NameDescription
reportTypeSpecifies the type of report. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport.
usagePageSpecifies the usage page identifier of the value to be set in the report.
collectionOptionally specifies the link collection identifier to distinguish between values that have the same usage page and usage identifiers. If this parameter is zero, it is ignored.
usageSpecifies the usage identifier of the value to be set in the report.
usageValueSpecifies the data that is to be set in the value for the given report.
preparsedDataRefPreparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function
reportPoints to the caller-allocated buffer that contains the device report data.
reportLengthSpecifies the size, in bytes, of the report data provided in the report parameter.
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDSetUsageValueArray

Abstract: The HIDSetUsageValueArray function sets an array of values in a given report.
extern OSStatus HIDSetUsageValueArray(HIDReportType reportType,
 HIDUsage usagePage,
 UInt32 collection,
 HIDUsage usage,
 Byte * usageValueBuffer,
 ByteCount usageValueBufferLength,
 HIDPreparsedDataRef preparsedDataRef,
 void * report,
 ByteCount reportLength);

The HIDSetUsageValue function does not automatically handle the sign bit. Clients must either manually set the sign bit, at the position provided in the HIDValueCaps structure for this value, or call the HIDSetScaledUsageValue function.

Parameters

NameDescription
reportTypeSpecifies the type of report. This parameter must be one of the following: kHIDInputReport, kHIDOutputReport, or kHIDFeatureReport.
usagePageSpecifies the usage page identifier of the value to be set in the report.
collectionOptionally specifies the link collection identifier to distinguish between values that have the same usage page and usage identifiers. If this parameter is zero, it is ignored.
usageSpecifies the usage identifier of the value to be set in the report.
usageValueBufferPoints to a caller-allocated buffer that contains, on output, the data from the device. The correct length for this buffer can be found by multiplying the reportCount and bitSize fields of the HIDValueCaps structure for this value and rounding the resulting value up to the nearest byte.
usageValueBufferLengthSpecifies the size, in bytes, of the buffer in the usageValueBuffer parameter.
preparsedDataRefPreparsed data reference for the report that is retuned by the HIDOpenReportDescriptor function
reportPoints to the caller-allocated buffer that contains the device report data.
reportLengthSpecifies the size, in bytes, of the report data provided in the report parameter.
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

HIDUsageListDifference

Abstract: The HIDUsageListDifference function compares and provides the differences between two lists of buttons.
extern OSStatus HIDUsageListDifference(HIDUsage * previousUsageList,
 HIDUsage * currentUsageList,
 HIDUsage * breakUsageList,
 HIDUsage * makeUsageList,
 UInt32 usageListsSize);

Parameters

NameDescription
previousUsageListPoints to the older button list to be used for comparison.
currentUsageListPoints to the newer button list to be used for comparison.
breakUsageListOn return, points to a caller-allocated buffer that contains the buttons set in the older list, specified in the previousUsageList parameter, but not set in the new list, specified in the currentUsageList parameter.
makeUsageListOn return, points to a caller-allocated buffer that contains the buttons set in the new list, specified in the currentUsageList parameter, but not set in the old list, specified in the previousUsageList parameter.
usageListsLengthSpecifies the length, in array elements, of the buffers provided in the currentUsageList and previousUssageList parameters.
Result: OSStatus Returns an error code if an error was encountered or noErr on success.

© 2000 Apple Computer, Inc. — (Last Updated 2/23/2000)