Module: Vigilem::Evdev::System::Input::Macros
- Included in:
- Vigilem::Evdev::System::Input, Vigilem::Evdev::System::Input
- Defined in:
- lib/vigilem/evdev/system/input.rb
Overview
these will be phased out and replaced by FFI
Instance Method Summary collapse
- #_s16 ⇒ Object
- #_u16 ⇒ Object
- #_u32 ⇒ Object
- #_u8 ⇒ Object
-
#EVIOCGABS(abs) ⇒ Object
/* get abs value/limits */.
-
#EVIOCGBIT(evtype, len = 255) ⇒ Object
/* get event bits */.
-
#EVIOCGEFFECTS ⇒ Object
/* Report number of effects playable at the same time */.
-
#EVIOCGID ⇒ Object
/* get device ID */.
-
#EVIOCGKEY(len) ⇒ Object
/* get global key state */.
-
#EVIOCGKEYCODE ⇒ Object
/* get keycode */.
- #EVIOCGKEYCODE_V2 ⇒ Object
-
#EVIOCGLED(len) ⇒ Object
/* get all LEDs */.
- #EVIOCGMTSLOTS(len) ⇒ Object
-
#EVIOCGNAME(len) ⇒ Object
/* get device name */.
-
#EVIOCGPHYS(len) ⇒ Object
/* get physical location */.
-
#EVIOCGPROP(len) ⇒ Object
/* get device properties */.
-
#EVIOCGRAB ⇒ Object
/* Grab/Release device */.
-
#EVIOCGREP ⇒ Object
/* get repeat settings */.
-
#EVIOCGSND(len) ⇒ Object
/* get all sounds status */.
-
#EVIOCGSW(len) ⇒ Object
/* get all switch states */.
-
#EVIOCGUNIQ(len) ⇒ Object
/* get unique identifier */.
-
#EVIOCGVERSION ⇒ Object
/* get driver version */.
-
#EVIOCREVOKE ⇒ Object
/* Revoke device access */.
-
#EVIOCRMFF ⇒ Object
/* Erase a force effect */.
-
#EVIOCSABS(abs) ⇒ Object
/* set abs value/limits */.
-
#EVIOCSCLOCKID ⇒ Object
/* Set clockid to be used for timestamps */.
-
#EVIOCSFF ⇒ Object
/* send a force effect to a force feedback device */.
-
#EVIOCSKEYCODE ⇒ Object
/* set keycode */.
- #EVIOCSKEYCODE_V2 ⇒ Object
-
#EVIOCSREP ⇒ Object
/* set repeat settings */.
- #ff_effect ⇒ Object
- #input_keymap_entry ⇒ Object
- #int ⇒ Object
- #struct_input_id ⇒ Object
- #unsigned_int_2 ⇒ Object
Instance Method Details
#_s16 ⇒ Object
92 93 94 |
# File 'lib/vigilem/evdev/system/input.rb', line 92 def _s16 @_s16 ||= 's' end |
#_u16 ⇒ Object
84 85 86 |
# File 'lib/vigilem/evdev/system/input.rb', line 84 def _u16 @_u16= 'S' end |
#_u32 ⇒ Object
88 89 90 |
# File 'lib/vigilem/evdev/system/input.rb', line 88 def _u32 @_u32 ||= 'L' end |
#_u8 ⇒ Object
80 81 82 |
# File 'lib/vigilem/evdev/system/input.rb', line 80 def _u8 @_u8 = 'C' end |
#EVIOCGABS(abs) ⇒ Object
/* get abs value/limits */
135 |
# File 'lib/vigilem/evdev/system/input.rb', line 135 def EVIOCGABS(abs); _IOR('E', 0x40 + abs, INT5);end |
#EVIOCGBIT(evtype, len = 255) ⇒ Object
/* get event bits */
134 |
# File 'lib/vigilem/evdev/system/input.rb', line 134 def EVIOCGBIT(evtype, len=255); _IOC(_IOC_READ, 'E', 0x20 + evtype, len);end |
#EVIOCGEFFECTS ⇒ Object
/* Report number of effects playable at the same time */
141 |
# File 'lib/vigilem/evdev/system/input.rb', line 141 def EVIOCGEFFECTS; _IOR('E', 0x84, int);end |
#EVIOCGID ⇒ Object
/* get device ID */
113 |
# File 'lib/vigilem/evdev/system/input.rb', line 113 def EVIOCGID; _IOR('E', 0x02, struct_input_id);end |
#EVIOCGKEY(len) ⇒ Object
/* get global key state */
129 |
# File 'lib/vigilem/evdev/system/input.rb', line 129 def EVIOCGKEY(len); _IOC(_IOC_READ, 'E', 0x18, len);end |
#EVIOCGKEYCODE ⇒ Object
/* get keycode */
117 |
# File 'lib/vigilem/evdev/system/input.rb', line 117 def EVIOCGKEYCODE; _IOR('E', 0x04, unsigned_int_2);end |
#EVIOCGKEYCODE_V2 ⇒ Object
118 |
# File 'lib/vigilem/evdev/system/input.rb', line 118 def EVIOCGKEYCODE_V2; _IOR('E', 0x04, input_keymap_entry);end |
#EVIOCGLED(len) ⇒ Object
/* get all LEDs */
130 |
# File 'lib/vigilem/evdev/system/input.rb', line 130 def EVIOCGLED(len); _IOC(_IOC_READ, 'E', 0x19, len);end |
#EVIOCGMTSLOTS(len) ⇒ Object
127 |
# File 'lib/vigilem/evdev/system/input.rb', line 127 def EVIOCGMTSLOTS(len); _IOC(_IOC_READ, 'E', 0x0a, len);end |
#EVIOCGNAME(len) ⇒ Object
/* get device name */
122 |
# File 'lib/vigilem/evdev/system/input.rb', line 122 def EVIOCGNAME(len); _IOC(_IOC_READ, 'E', 0x06, len);end |
#EVIOCGPHYS(len) ⇒ Object
/* get physical location */
123 |
# File 'lib/vigilem/evdev/system/input.rb', line 123 def EVIOCGPHYS(len); _IOC(_IOC_READ, 'E', 0x07, len);end |
#EVIOCGPROP(len) ⇒ Object
/* get device properties */
125 |
# File 'lib/vigilem/evdev/system/input.rb', line 125 def EVIOCGPROP(len); _IOC(_IOC_READ, 'E', 0x09, len);end |
#EVIOCGRAB ⇒ Object
/* Grab/Release device */
143 |
# File 'lib/vigilem/evdev/system/input.rb', line 143 def EVIOCGRAB; _IOW('E', 0x90, int);end |
#EVIOCGREP ⇒ Object
/* get repeat settings */
114 |
# File 'lib/vigilem/evdev/system/input.rb', line 114 def EVIOCGREP; _IOR('E', 0x03, unsigned_int_2);end |
#EVIOCGSND(len) ⇒ Object
/* get all sounds status */
131 |
# File 'lib/vigilem/evdev/system/input.rb', line 131 def EVIOCGSND(len); _IOC(_IOC_READ, 'E', 0x1a, len);end |
#EVIOCGSW(len) ⇒ Object
/* get all switch states */
133 |
# File 'lib/vigilem/evdev/system/input.rb', line 133 def EVIOCGSW(len); _IOC(_IOC_READ, 'E', 0x1b, len);end |
#EVIOCGUNIQ(len) ⇒ Object
/* get unique identifier */
124 |
# File 'lib/vigilem/evdev/system/input.rb', line 124 def EVIOCGUNIQ(len); _IOC(_IOC_READ, 'E', 0x08, len);end |
#EVIOCGVERSION ⇒ Object
/* get driver version */
112 |
# File 'lib/vigilem/evdev/system/input.rb', line 112 def EVIOCGVERSION; _IOR('E', 0x01, int);end |
#EVIOCREVOKE ⇒ Object
/* Revoke device access */
144 |
# File 'lib/vigilem/evdev/system/input.rb', line 144 def EVIOCREVOKE; _IOW('E', 0x91, int);end |
#EVIOCRMFF ⇒ Object
/* Erase a force effect */
140 |
# File 'lib/vigilem/evdev/system/input.rb', line 140 def EVIOCRMFF; _IOW('E', 0x81, int);end |
#EVIOCSABS(abs) ⇒ Object
/* set abs value/limits */
137 |
# File 'lib/vigilem/evdev/system/input.rb', line 137 def EVIOCSABS(abs); _IOW('E', 0xc0 + (abs), input_absinfo);end |
#EVIOCSCLOCKID ⇒ Object
/* Set clockid to be used for timestamps */
146 |
# File 'lib/vigilem/evdev/system/input.rb', line 146 def EVIOCSCLOCKID; _IOW('E', 0xa0, int);end |
#EVIOCSFF ⇒ Object
/* send a force effect to a force feedback device */
139 |
# File 'lib/vigilem/evdev/system/input.rb', line 139 def EVIOCSFF; _IOC(_IOC_WRITE, 'E', 0x80, _size_of(ff_effect));end |
#EVIOCSKEYCODE ⇒ Object
/* set keycode */
119 |
# File 'lib/vigilem/evdev/system/input.rb', line 119 def EVIOCSKEYCODE; _IOW('E', 0x04, unsigned_int_2);end |
#EVIOCSKEYCODE_V2 ⇒ Object
120 |
# File 'lib/vigilem/evdev/system/input.rb', line 120 def EVIOCSKEYCODE_V2; _IOW('E', 0x04, input_keymap_entry);end |
#EVIOCSREP ⇒ Object
/* set repeat settings */
115 |
# File 'lib/vigilem/evdev/system/input.rb', line 115 def EVIOCSREP; _IOW('E', 0x03, unsigned_int_2);end |
#ff_effect ⇒ Object
76 77 78 |
# File 'lib/vigilem/evdev/system/input.rb', line 76 def ff_effect FFEffect end |
#input_keymap_entry ⇒ Object
100 101 102 |
# File 'lib/vigilem/evdev/system/input.rb', line 100 def input_keymap_entry @input_keymap_entry ||= _u8 + _u8 + _u16 + _u32 + (_u8 * 32) end |
#int ⇒ Object
108 109 110 |
# File 'lib/vigilem/evdev/system/input.rb', line 108 def int @int ||= 'i' end |
#struct_input_id ⇒ Object
96 97 98 |
# File 'lib/vigilem/evdev/system/input.rb', line 96 def struct_input_id @struct_input_id ||= _u16 + '4' end |
#unsigned_int_2 ⇒ Object
104 105 106 |
# File 'lib/vigilem/evdev/system/input.rb', line 104 def unsigned_int_2 @unsigned_int_2 ||= 'ii' end |