File: GeneralHIDDevice.schelp

package info (click to toggle)
supercollider 1%3A3.6.6~repack-2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 23,792 kB
  • ctags: 25,269
  • sloc: cpp: 177,129; lisp: 63,421; ansic: 11,297; python: 1,787; perl: 766; yacc: 311; sh: 286; lex: 181; ruby: 173; makefile: 168; xml: 13
file content (48 lines) | stat: -rw-r--r-- 1,860 bytes parent folder | download
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
class:: GeneralHIDDevice
summary:: A uniform class to an HID device
related:: Classes/HIDDeviceService, Classes/LID, Classes/GeneralHID, Classes/GeneralHIDSpec
categories:: External Control>HID

description::
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.
A GeneralHIDDevice accesses one HID device, such as a mouse, joystick or gamepad. Devices are automatically created when a building the device list with link::Classes/GeneralHID::, so it is not necessary for a user to create a new device.

See link::Classes/GeneralHID:: for a complete explanation and an example of how to access an HID device.

note::
It is advised to use this class instead of the platform specific classes: link::Classes/HIDDeviceService:: (on MacOSX) and link::Classes/LID:: (on Linux)
::

subsection::Some outstanding issues
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.

InstanceMethods::

method::isOpen
Checks whether the device is open.

method::info
Display information about the device, such as the name and vendor.

method::caps
Display information about the capabilities of the device in a readable format.

method::slots
Access to the slots of the device. See link::Classes/GeneralHIDSlot::.

method::makeGui
Make a generic gui to see the data coming in on the slots.

method::close
Closes the device.

method::grab
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.

method::ungrab
Give up exclusive access to the device (linux only).


Examples::

See link::Classes/GeneralHID::. for a complete example of using an HID device.