prepare for remake input handling, prepare other stuff

This commit is contained in:
chrys
2016-09-02 22:13:33 +02:00
parent 7227f52ac7
commit 1887810e69
7 changed files with 13 additions and 12 deletions

View File

@ -10,14 +10,14 @@ class inputManager():
return environment
def shutdown(self, environment):
return environment
def getInput(self, environment):
def proceedInputEvent(self, environment):
environment, timeout = environment['runtime']['inputDriver'].getInput(environment)
return environment, timeout
def grabDevices(self, environment):
environment['runtime']['inputDriver'].grabDevices(environment)
def releaseDevices(self, environment):
environment['runtime']['inputDriver'].releaseDevices(environment)
environment['runtime']['inputDriver'].releaseDevices()
def isConsumeInput(self, environment):
return environment['input']['consumeKey'] and \

View File

@ -9,5 +9,6 @@ runtime = {
'inputManager': None,
'commandManager': None,
'screenManager': None,
'outputManager': None,
'debug':None,
}

View File

@ -16,6 +16,6 @@ class screenManager():
return environment
def isSuspendingScreen(self, environment):
return environment['generalInformation']['suspend'] = environment['runtime']['screenDriver'].getCurrScreen() in \
return environment['runtime']['screenDriver'].getCurrScreen() in \
environment['runtime']['settingsManager'].getSetting(environment,'screen', 'suspendingScreen').split(',')

View File

@ -184,7 +184,7 @@ class settingsManager():
spec = importlib.util.spec_from_file_location(driverName, 'input/' + driverName + '.py')
driver_mod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(driver_mod)
environment['runtime']['inputDriver'] = driver_mod.screen()
environment['runtime']['inputDriver'] = driver_mod.input()
environment['runtime']['inputDriver'].initialize(environment)
return environment