[PATCH evemu v2 2/4] py: remove uinput reference
Benjamin Tissoires
benjamin.tissoires at gmail.com
Wed Jan 15 13:04:59 PST 2014
now that evemu manages uinput by itself, remove uinput from the python
binding where there is no use.
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires at gmail.com>
---
v2: no changes
python/evemu/__init__.py | 6 ++----
python/evemu/const.py | 1 -
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/python/evemu/__init__.py b/python/evemu/__init__.py
index 8e725c7..4f64204 100644
--- a/python/evemu/__init__.py
+++ b/python/evemu/__init__.py
@@ -55,14 +55,12 @@ class Device(object):
self._is_propfile = self._check_is_propfile(self._file)
self._libc = evemu.base.LibC()
self._libevemu = evemu.base.LibEvemu()
- self._uinput = None
self._evemu_device = self._libevemu.evemu_new(b"")
if self._is_propfile:
fs = self._libc.fdopen(self._file.fileno(), b"r")
self._libevemu.evemu_read(self._evemu_device, fs)
- self._uinput = os.open(evemu.const.UINPUT_NODE, os.O_WRONLY)
self._file = self._create_devnode()
else:
self._libevemu.evemu_extract(self._evemu_device,
@@ -71,10 +69,10 @@ class Device(object):
def __del__(self):
if hasattr(self, "_is_propfile") and self._is_propfile:
self._file.close()
- self._libevemu.evemu_destroy(self._evemu_device, self._uinput)
+ self._libevemu.evemu_destroy(self._evemu_device)
def _create_devnode(self):
- self._libevemu.evemu_create(self._evemu_device, self._uinput)
+ self._libevemu.evemu_create_managed(self._evemu_device)
return open(self._find_newest_devnode(self.name), 'r+b', buffering=0)
def _find_newest_devnode(self, target_name):
diff --git a/python/evemu/const.py b/python/evemu/const.py
index 19c507a..42eb22c 100644
--- a/python/evemu/const.py
+++ b/python/evemu/const.py
@@ -1,6 +1,5 @@
LIB = "libevemu.so"
ENCODING="iso8859-1"
-UINPUT_NODE = "/dev/uinput"
event_types = {
"EV_SYN": 0x00,
--
1.8.4.2
More information about the Input-tools
mailing list