catch driver method calls

This commit is contained in:
chrys 2018-05-11 22:25:57 +02:00
parent 0296590f08
commit 101004a5f9

View File

@ -15,15 +15,25 @@ class screenManager():
self.env = environment self.env = environment
self.env['runtime']['settingsManager'].loadDriver(\ self.env['runtime']['settingsManager'].loadDriver(\
self.env['runtime']['settingsManager'].getSetting('screen', 'driver'), 'screenDriver') self.env['runtime']['settingsManager'].getSetting('screen', 'driver'), 'screenDriver')
self.env['runtime']['screenDriver'].getCurrScreen() self.getCurrScreen()
self.env['runtime']['screenDriver'].getCurrScreen() self.getCurrScreen()
self.env['runtime']['screenDriver'].getSessionInformation() self.getSessionInformation()
def getCurrScreen(self):
try:
self.env['runtime']['screenDriver'].getCurrScreen()
except:
pass
def getSessionInformation(self):
try:
self.env['runtime']['screenDriver'].getSessionInformation()
except:
pass
def shutdown(self): def shutdown(self):
self.env['runtime']['settingsManager'].shutdownDriver('screenDriver') self.env['runtime']['settingsManager'].shutdownDriver('screenDriver')
def hanldeScreenChange(self, eventData): def hanldeScreenChange(self, eventData):
self.env['runtime']['screenDriver'].getCurrScreen() self.getCurrScreen()
self.env['runtime']['screenDriver'].getSessionInformation() self.getSessionInformation()
if self.isScreenChange(): if self.isScreenChange():
self.changeBrailleScreen() self.changeBrailleScreen()
if not self.isSuspendingScreen(self.env['screen']['newTTY']): if not self.isSuspendingScreen(self.env['screen']['newTTY']):