This file is indexed.

/usr/share/SuperCollider/HelpSource/Classes/HIDProto.schelp is in supercollider-common 1:3.8.0~repack-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
TITLE:: HIDProto
summary:: Prototype HID device to match with HIDFunc
categories:: External Control>HID
related::  Classes/HIDFunc, Classes/HIDdef, Classes/HIDElementProto, Classes/HID, Classes/HIDInfo, Guides/Working_with_HID

DESCRIPTION::
Human input devices can be used as controllers for making music. This class can be used in conjunction with link::Classes/HIDFunc:: or link::Classes/HIDdef:: to match incoming messages with a particular link::Classes/HID:: device.

HIDProto has all the variables that specify an HID device. The more of these variables you specify, the more need to be matched when filtering the incoming HID data.

CLASSMETHODS::

METHOD:: new
Create a new instance of HIDProto.


METHOD:: newType
Create a new instance of HIDProto based on usage and usagePage of the device.

ARGUMENT:: uName
Name of the usage id

ARGUMENT:: pName
Name of the usage page id

returns::  an HIDProto

METHOD:: newProduct
Create a new instance of HIDProto based on the product information.

ARGUMENT:: pName
The product name to match.

ARGUMENT:: vName
The vendor name to match.

returns:: an HIDProto


METHOD:: newFromDict
Create a new instance of HIDProto based on an IdentityDictionary with a set of parameters to match.

ARGUMENT:: dict
An IdentityDictionary with a set of parameters to match. The keys in the dictionary should be one of the instance variables of HIDProto.

returns:: an HIDProto


INSTANCEMETHODS::

PRIVATE:: init

SUBSECTION:: Instance variables that can be used to match a device

METHOD:: id
The device id that should be matched. This is dependent on the order of opening HID devices.

METHOD:: productName
The product name to match (see also link::Classes/HIDInfo::).

METHOD:: vendorName
The vendor name to match (see also link::Classes/HIDInfo::).

METHOD:: productID
The product id to match (see also link::Classes/HIDInfo::).

METHOD:: vendorID
The vendor id to match (see also link::Classes/HIDInfo::).

METHOD:: interfaceNumber
The interface number to match (see also link::Classes/HIDInfo::).

METHOD:: releaseNumber
The release number to match (see also link::Classes/HIDInfo::).


METHOD:: serialNumber
The serial number to match (see also link::Classes/HIDInfo::).

METHOD:: path
The path to match (see also link::Classes/HIDInfo::).



METHOD:: usage
The usage ID of the device to match (see also link::Classes/HIDInfo::).

METHOD:: usagePage
The usage page ID of the device to match (see also link::Classes/HIDInfo::).

METHOD:: usageName
The usage name of the device to match (see also link::Classes/HIDInfo::).

METHOD:: pageName
The page name of the device to match (see also link::Classes/HIDInfo::).


SUBSECTION:: Methods to match

METHOD:: matches
Match the argument with the template.

ARGUMENT:: hid
An instance of HID.

returns:: a Boolean indicating whether the incoming HID matches the template

METHOD:: shouldMatch
The variables that should be matched when filtering

returns:: a Set with variable names.

SUBSECTION:: Methods to add matching parameters


METHOD:: addTypeMatch
Add a match for usage name and usage page name of the device.

ARGUMENT:: uName
The usage name to match

ARGUMENT:: pName
The page name to match

METHOD:: addProductMatch
Add a match for product name and vendor name of the device.

ARGUMENT:: pName
The product name to match

ARGUMENT:: vName
The vendor name to match


METHOD:: addDictionaryMatch
Add an IdentityDictionary with a set of parameters to match. The keys in the dictionary should be one of the instance variables of HIDProto.


ARGUMENT:: dict
An IdentityDictionary with a set of parameters to match.


EXAMPLES::

code::
b = HIDProto.newFromDict( ( path: "/dev/hidraw2" ) );

a = HIDFunc.usage( { |...args| args.postln; }, \X, deviceInfo: b );
a.free

b = HIDProto.newType( \Mouse, \GenericDesktop );

a = HIDFunc.usage( { |...args| args.postln; }, \X, deviceInfo: b );
a.free;

b = HIDProto.newProduct( "USB Mouse", "Logitech" );

a = HIDFunc.usage( { |...args| args.postln; }, \X, deviceInfo: b );
a.free;
::