2016-09-23 03:35:22 -04:00
|
|
|
#!/bin/python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
# Fenrir TTY screen reader
|
|
|
|
# By Chrys, Storm Dragon, and contributers.
|
|
|
|
|
|
|
|
from core import debug
|
|
|
|
|
|
|
|
class applicationManager():
|
|
|
|
def __init__(self):
|
|
|
|
pass
|
|
|
|
def initialize(self, environment):
|
|
|
|
self.env = environment
|
|
|
|
def shutdown(self):
|
|
|
|
pass
|
|
|
|
def getCurrentApplication(self):
|
2016-09-23 03:45:33 -04:00
|
|
|
currApp = self.environment['screenData']['newApplication'].upper()
|
|
|
|
if not currApp:
|
|
|
|
currApp == 'DEFAULT'
|
|
|
|
if currApp == '':
|
|
|
|
currApp == 'DEFAULT'
|
2016-09-23 03:35:22 -04:00
|
|
|
def getPrevApplication(self):
|
2016-09-23 03:45:33 -04:00
|
|
|
prevApp = self.environment['screenData']['oldApplication'].upper()
|
|
|
|
if not prevApp:
|
|
|
|
prevApp == 'DEFAULT'
|
|
|
|
if prevApp == '':
|
|
|
|
prevApp == 'DEFAULT'
|
2016-09-23 03:35:22 -04:00
|
|
|
def isApplicationChange(self):
|
2016-09-23 03:45:33 -04:00
|
|
|
return self.environment['screenData']['oldApplication'] != self.environment['screenData']['newApplication']
|