add dummy input driver

This commit is contained in:
chrys 2017-01-25 00:31:28 +01:00
parent 5d3c3f8732
commit 62e1819dd5

View File

@ -0,0 +1,59 @@
#!/bin/python
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
import time
from core import debug
class driver():
def __init__(self):
self._initialized = False
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getInputEvent(self):
time.sleep(0.05)
if not self._initialized:
return None
def writeEventBuffer(self):
if not self._initialized:
return
def clearEventBuffer(self):
if not self._initialized:
return
def getInputDevices(self):
if not self._initialized:
return
def getLedState(self, led = 0):
if not self._initialized:
return False
return False
def toggleLedState(self, led = 0):
if not self._initialized:
return None
def grabDevices(self):
if not self._initialized:
return None
def releaseDevices(self):
if not self._initialized:
return None
def __del__(self):
if not self._initialized:
return None
self.releaseDevices()