fenrir/src/fenrir-package/core/applicationManager.py

32 lines
928 B
Python
Raw Normal View History

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 20:45:12 -04:00
currApp = self.env['screenData']['newApplication'].upper()
2016-09-23 03:45:33 -04:00
if not currApp:
currApp == 'DEFAULT'
if currApp == '':
2016-09-23 20:45:12 -04:00
currApp == 'DEFAULT'
return currApp
2016-09-23 03:35:22 -04:00
def getPrevApplication(self):
2016-09-23 20:45:12 -04:00
prevApp = self.env['screenData']['oldApplication'].upper()
2016-09-23 03:45:33 -04:00
if not prevApp:
prevApp == 'DEFAULT'
if prevApp == '':
prevApp == 'DEFAULT'
2016-09-23 20:45:12 -04:00
return prevApp
2016-09-23 03:35:22 -04:00
def isApplicationChange(self):
2016-09-23 20:45:12 -04:00
return self.env['screenData']['oldApplication'] != self.env['screenData']['newApplication']