1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
7 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
8 <title>SuperCollider Help - GeneralHIDDevice
</title>
11 <meta name=
"Generator" content=
"Cocoa HTML Writer">
13 <meta name=
"CocoaVersion" content=
"824.42">
15 <style type=
"text/css">
16 p
.p1
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
}
17 p
.p2
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
; min-height: 14.0px}
18 p
.p3
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; min-height: 12.0px}
19 p
.p4
{margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica
}
20 p
.p5
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco
; min-height: 12.0px}
21 p
.p6
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica
}
22 p
.p7
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica
; min-height: 14.0px}
23 p
.p8
{margin: 0.0px 0.0px 0.0px 85.0px; text-indent: -85.0px; font: 12.0px Helvetica
}
24 p
.p9
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco
; color: #623924}
25 p
.p10
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco
}
26 p
.p11
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica
}
27 p
.p12
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica
; min-height: 17.0px}
28 p
.p13
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #623924}
29 p
.p14
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
}
30 span
.s1
{font: 18.0px Helvetica
}
31 span
.s2
{color: #1b34d9}
32 span
.s3
{color: #142fe0}
33 span
.s4
{color: #000000}
34 span
.s5
{color: #303b89}
35 span
.s6
{color: #623924}
36 span
.s7
{font: 12.0px Helvetica
; color: #000000}
37 span
.s8
{color: #1427a2}
38 span
.Apple-tab-span
{white-space:pre
}
45 <p class=
"p1"><span class=
"s1"><b>GeneralHIDDevice
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b></span><b>
46 A uniform class to an HID device.
47 </b><span class=
"s1"><b><span class=
"Apple-tab-span"> </span></b></span></p>
53 <p class=
"p1"><b>Inherits from:
</b><a href=
"../Core/Object.html"><span class=
"s2"><b>Object
</b></span></a></p>
59 <p class=
"p1">GeneralHID is a cross platform wrapper for
60 accessing HID devices. Currently the MacOSX and Linux HID support has
61 been wrapped. Some of the code is inspired by the GUI wrapper.
</p>
63 <p class=
"p1">A GeneralHIDDevice accesses one HID device,
64 such as a mouse, joystick or gamepad. Devices are automatically created
65 when a building the device list with
<span class=
"s2">GeneralHID
</span>,
66 so it is not necessary for a user to create a new device.
</p>
72 <p class=
"p1"><b>See
</b> <a href=
"GeneralHID.html"><span class=
"s2">GeneralHID
</span></a>
73 for a complete explanation and an example of how to access an HID
76 <p class=
"p1"><b>It is advised to use this class
77 instead of the platform specific classes:
</b> <a href=
"HIDDeviceService.html"><span class=
"s2">HIDDeviceService
</span>
78 (on MacOSX)
</a> and
<a href=
"../Linux/LID.html"><span class=
"s2">LID
</span> (on Linux)
</a></p>
84 <p class=
"p4"><b>Some outstanding issues
</b></p>
90 <p class=
"p1">This class is not completely finished yet.
91 Common slot numbers across platforms are not yet guaranteed. On Windows
92 there is not yet a proper implementation available.
99 <p class=
"p11"><b>Accessing Instance and Class
102 <p class=
"p6"><b><span class=
"Apple-tab-span"><br>
103 </span>open( arg device )
</b></p>
105 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>Opens the device; the
106 device should be an item got from the device list.
</p>
108 <p class=
"p7"><span class=
"Apple-tab-span"> </span></p>
110 <p class=
"p6"><b><span class=
"Apple-tab-span"><br>
111 </span>isOpen
</b></p>
113 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>Checks whether the
116 <p class=
"p7"><span class=
"Apple-tab-span"> </span></p>
118 <p class=
"p6"><b><span class=
"Apple-tab-span"><br>
121 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>Display information
122 about the device, such as the name and vendor.
</p>
124 <p class=
"p7"><span class=
"Apple-tab-span"> </span></p>
126 <p class=
"p6"><b><span class=
"Apple-tab-span"><br>
129 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>Display information
130 about the capabilities of the device in a readable format.
</p>
132 <p class=
"p7"><span class=
"Apple-tab-span"> </span></p>
134 <p class=
"p6"><b><span class=
"Apple-tab-span"><br>
137 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>Access to the slots of
138 the device. See
<a href=
"GeneralHIDSlot.html"><span class=
"s2">GeneralHIDSlot
</span>.
</a></p>
140 <p class=
"p7"><span class=
"Apple-tab-span"> </span></p>
142 <p class=
"p6"><b><span class=
"Apple-tab-span"><br>
143 </span>makeGui
</b></p>
145 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>Make a generic gui to see the data coming in on the slots.
</p>
147 <p class=
"p7"><span class=
"Apple-tab-span"> </span></p>
149 <p class=
"p6"><b><span class=
"Apple-tab-span"><br>
152 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>Closes the device.
</p>
154 <p class=
"p6"><b><span class=
"Apple-tab-span"></span></b></p>
156 <p class=
"p6"><b><span class=
"Apple-tab-span"><br>
159 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> Get exclusive access to the device (linux only). Be careful with this when it is the only keyboard, as you will have no way to get back control
</span></p>
161 <p class=
"p7"><span class=
"Apple-tab-span"> </span></p>
163 <p class=
"p6"><b><span class=
"Apple-tab-span"><br>
164 </span>ungrab
</b></p>
166 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> Give up exclusive access to the device (linux only).
</span></p>
168 <p class=
"p6"><br></p>
170 <p class=
"p7"><span class=
"Apple-tab-span"> </span></p>
172 <p class=
"p11"><b>Example
</b></p>
174 <p class=
"p1"><b>See
</b> <a href=
"GeneralHID.html"><span class=
"s2">GeneralHID
</span></a>
175 for a complete example of using an HID device.
</p>