supernova: fixes for boost-1.49 and gcc-4.7
[supercollider.git] / Help / Control / GeneralHIDSlot.html
blob380deee47d41c9ddee667752dcbd5d5d502d6249
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta http-equiv="Content-Style-Type" content="text/css">
6 <title></title>
7 <meta name="Generator" content="Cocoa HTML Writer">
8 <meta name="CocoaVersion" content="824.42">
9 <style type="text/css">
10 p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
11 p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
12 p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
13 p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
14 p.p5 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; min-height: 12.0px}
15 p.p6 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica}
16 p.p7 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica; min-height: 14.0px}
17 p.p8 {margin: 0.0px 0.0px 0.0px 85.0px; text-indent: -85.0px; font: 12.0px Helvetica}
18 p.p9 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; color: #623924}
19 p.p10 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco}
20 p.p11 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica}
21 p.p12 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica; min-height: 17.0px}
22 p.p13 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #623924}
23 p.p14 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
24 span.s1 {font: 18.0px Helvetica}
25 span.s2 {color: #1b34d9}
26 span.s3 {color: #142fe0}
27 span.s4 {color: #000000}
28 span.s5 {color: #303b89}
29 span.s6 {color: #623924}
30 span.s7 {font: 12.0px Helvetica; color: #000000}
31 span.s8 {color: #1427a2}
32 span.Apple-tab-span {white-space:pre}
33 </style>
34 </head>
35 <body>
36 <p class="p1"><span class="s1"><b>GeneralHIDSlot<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></span><b>
37 A uniform class to a slot of an HID device.
38 </b><span class="s1"><b><span class="Apple-tab-span"> </span></b></span></p>
39 <p class="p2"><br></p>
40 <p class="p1"><b>Inherits from: </b><a href="../Core/Object.html"><span class="s2"><b>Object</b></span></a></p>
41 <p class="p3"><br></p>
42 <p class="p1">GeneralHID is a cross platform wrapper for accessing HID devices. Currently the MacOSX and Linux HID support has been wrapped. Some of the code is inspired by the GUI wrapper.</p>
43 <p class="p1">A GeneralHIDSlot accesses one specific capability of a device, such as a button, an axis or an LED. Its value can be retrieved, an action can be set to be performed when data comes in, and the slot can be mapped to a control bus to use the value directly on the server. Slots are automatically created when a device is opened, so it is not necessary for a user to create a new slot.</p>
44 <p class="p2"><br></p>
45 <p class="p1"><b>See </b> <a href="GeneralHID.html"><span class="s2">GeneralHID</span></a> for a complete explanation and an example of how to access an HID device.</p>
47 <p class="p1"><b>It is advised to use this class instead of the platform specific classes:</b> <a href="HIDDeviceService.html"><span class="s2">HIDDeviceService</span> (on MacOSX)</a> and <a href="../Linux/LID.html"><span class="s2">LID</span> (on Linux)</a></p>
49 <p class="p2"><br></p>
50 <p class="p4"><b>Some outstanding issues</b></p>
51 <p class="p2"><br></p>
52 <p class="p1">This class is not completely finished yet. Common slot numbers across platforms are not yet guaranteed. On Windows there is not yet a proper implementation available.
53 </p>
54 <p class="p2"><br></p>
55 <p class="p11"><b>Accessing Instance and Class Variables</b></p>
56 <p class="p6"><b><span class="Apple-tab-span"> </span>debug_( arg onoff )</b></p>
57 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Turns on debugging for the slot.</p>
58 <p class="p7"><span class="Apple-tab-span"> </span></p>
60 <p class="p6"><b><span class="Apple-tab-span"> </span>value</b></p>
61 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Get the current value of the slot.</p>
62 <p class="p7"><span class="Apple-tab-span"> </span></p>
64 <p class="p6"><b><span class="Apple-tab-span"> </span>value_(arg val)</b></p>
65 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Set the current value of the slot to val. This is only sensible when the slot represents an LED on the device.</p>
66 <p class="p7"><span class="Apple-tab-span"> </span></p>
68 <p class="p6"><b><span class="Apple-tab-span"> </span>rawValue</b></p>
69 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Return the unscaled value of the slot.</p>
70 <p class="p7"><span class="Apple-tab-span"> </span></p>
72 <p class="p6"><b><span class="Apple-tab-span"> </span>action_(arg function)</b></p>
73 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Assign a function to the slot. The function has as an argument the slot.</p>
74 <p class="p7"><span class="Apple-tab-span"> </span></p>
76 <p class="p6"><b><span class="Apple-tab-span"> </span>createBus( arg server )</b></p>
77 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Create a control bus on the specified server, and map the incoming values to this bus.</p>
78 <p class="p7"><span class="Apple-tab-span"> </span></p>
80 <p class="p6"><b><span class="Apple-tab-span"> </span>bus</b></p>
81 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Returns the bus to which this slot is mapped, if a bus has been created.</p>
82 <p class="p7"><span class="Apple-tab-span"> </span></p>
84 <p class="p6"><b><span class="Apple-tab-span"> </span>freeBus</b></p>
85 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Free the bus on the server.</p>
86 <p class="p7"><span class="Apple-tab-span"> </span></p>
88 <p class="p6"><b><span class="Apple-tab-span"> </span>kr</b></p>
89 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>JITLib support. This calls .createBus, and returns an In.kr on the bus for you.</p>
90 <p class="p7"><span class="Apple-tab-span"> </span></p>
92 <p class="p11"><b>Example</b></p>
93 <p class="p1"><b>See </b> <a href="GeneralHID.html"><span class="s2">GeneralHID</span></a> for a complete example of using an HID device.</p>
95 </body>
96 </html>