add quit_fenrir and curr_screen commands

This commit is contained in:
chrys
2016-08-10 14:32:13 +02:00
parent 7b503adabc
commit ed27566474
20 changed files with 68 additions and 40 deletions

View File

@ -14,9 +14,9 @@ class command():
char_utils.getCurrentChar(environment['screenData']['newCursorReview']['x'], environment['screenData']['newCursorReview']['y'], environment['screenData']['newContentText'])
if currChar.strip(" \t\n") == '':
environment['runtime']['outputManager'].presentText(environment, "blank")
environment['runtime']['outputManager'].presentText(environment, "blank" ,interrupt=True)
else:
environment['runtime']['outputManager'].presentText(environment, currChar)
environment['runtime']['outputManager'].presentText(environment, currChar ,interrupt=True)
return environment
def setCallback(self, callback):
pass

View File

@ -14,9 +14,9 @@ class command():
line_utils.getCurrentLine(environment['screenData']['newCursorReview']['x'], environment['screenData']['newCursorReview']['y'], environment['screenData']['newContentText'])
if currLine.strip(" \t\n") == '':
environment['runtime']['outputManager'].presentText(environment, "blank")
environment['runtime']['outputManager'].presentText(environment, "blank", interrupt=True)
else:
environment['runtime']['outputManager'].presentText(environment, currLine)
environment['runtime']['outputManager'].presentText(environment, currLine, interrupt=True)
return environment
def setCallback(self, callback):
pass

View File

@ -0,0 +1,12 @@
#!/bin/python
class command():
def __init__(self):
pass
def run(self, environment):
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newContentText'],interrupt=True)
return environment
def setCallback(self, callback):
pass
def shutdown(self):
pass

View File

@ -14,9 +14,9 @@ class command():
word_utils.getCurrentWord(environment['screenData']['newCursorReview']['x'], environment['screenData']['newCursorReview']['y'], environment['screenData']['newContentText'])
if currWord.strip(" \t\n") == '':
environment['runtime']['outputManager'].presentText(environment, "blank")
environment['runtime']['outputManager'].presentText(environment, "blank", interrupt=True)
else:
environment['runtime']['outputManager'].presentText(environment, currWord)
environment['runtime']['outputManager'].presentText(environment, currWord, interrupt=True)
return environment
def setCallback(self, callback):
pass

View File

@ -6,7 +6,7 @@ class command():
def run(self, environment):
environment['screenData']['oldCursorReview'] = {'x':-1,'y':-1}
environment['screenData']['newCursorReview'] = {'x':-1,'y':-1}
environment['runtime']['outputManager'].presentText(environment, "leve review mode")
environment['runtime']['outputManager'].presentText(environment, "leve review mode", interrupt=True)
return environment
def setCallback(self, callback):
pass

View File

@ -14,9 +14,9 @@ class command():
char_utils.getNextChar(environment['screenData']['newCursorReview']['x'], environment['screenData']['newCursorReview']['y'], environment['screenData']['newContentText'])
if currChar.strip(" \t\n") == '':
environment['runtime']['outputManager'].presentText(environment, "blank")
environment['runtime']['outputManager'].presentText(environment, "blank", interrupt=True)
else:
environment['runtime']['outputManager'].presentText(environment, currChar)
environment['runtime']['outputManager'].presentText(environment, currChar, interrupt=True)
return environment
def setCallback(self, callback):
pass

View File

@ -14,9 +14,9 @@ class command():
line_utils.getNextLine(environment['screenData']['newCursorReview']['x'], environment['screenData']['newCursorReview']['y'], environment['screenData']['newContentText'])
if currLine.strip(" \t\n") == '':
environment['runtime']['outputManager'].presentText(environment, "blank")
environment['runtime']['outputManager'].presentText(environment, "blank", interrupt=True)
else:
environment['runtime']['outputManager'].presentText(environment, currLine)
environment['runtime']['outputManager'].presentText(environment, currLine, interrupt=True)
return environment
def setCallback(self, callback):
pass

View File

@ -14,9 +14,9 @@ class command():
word_utils.getNextWord(environment['screenData']['newCursorReview']['x'], environment['screenData']['newCursorReview']['y'], environment['screenData']['newContentText'])
if currWord.strip(" \t\n") == '':
environment['runtime']['outputManager'].presentText(environment, "blank")
environment['runtime']['outputManager'].presentText(environment, "blank", interrupt=True)
else:
environment['runtime']['outputManager'].presentText(environment, currWord)
environment['runtime']['outputManager'].presentText(environment, currWord, interrupt=True)
return environment
def setCallback(self, callback):
pass

View File

@ -14,9 +14,9 @@ class command():
char_utils.getPrevChar(environment['screenData']['newCursorReview']['x'], environment['screenData']['newCursorReview']['y'], environment['screenData']['newContentText'])
if currChar.strip(" \t\n") == '':
environment['runtime']['outputManager'].presentText(environment, "blank")
environment['runtime']['outputManager'].presentText(environment, "blank", interrupt=True)
else:
environment['runtime']['outputManager'].presentText(environment, currChar)
environment['runtime']['outputManager'].presentText(environment, currChar, interrupt=True)
return environment
def setCallback(self, callback):
pass

View File

@ -14,9 +14,9 @@ class command():
line_utils.getPrevLine(environment['screenData']['newCursorReview']['x'], environment['screenData']['newCursorReview']['y'], environment['screenData']['newContentText'])
if currLine.strip(" \t\n") == '':
environment['runtime']['outputManager'].presentText(environment, "blank")
environment['runtime']['outputManager'].presentText(environment, "blank", interrupt=True)
else:
environment['runtime']['outputManager'].presentText(environment, currLine)
environment['runtime']['outputManager'].presentText(environment, currLine, interrupt=True)
return environment
def setCallback(self, callback):
pass

View File

@ -14,9 +14,9 @@ class command():
word_utils.getPrevWord(environment['screenData']['newCursorReview']['x'], environment['screenData']['newCursorReview']['y'], environment['screenData']['newContentText'])
if currWord.strip(" \t\n") == '':
environment['runtime']['outputManager'].presentText(environment, "blank")
environment['runtime']['outputManager'].presentText(environment, "blank", interrupt=True)
else:
environment['runtime']['outputManager'].presentText(environment, currWord)
environment['runtime']['outputManager'].presentText(environment, currWord, interrupt=True)
return environment
def setCallback(self, callback):
pass

View File

@ -0,0 +1,12 @@
#!/bin/python
class command():
def __init__(self):
pass
def run(self, environment):
environment['generalInformation']['running'] = False
return environment
def setCallback(self, callback):
pass
def shutdown(self):
pass

View File

@ -7,9 +7,9 @@ class command():
environment = environment['runtime']['settingsManager'].setSetting(environment, 'speech', 'autoReadIncomming', str(not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'autoReadIncomming')))
if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'autoReadIncomming'):
environment['runtime']['outputManager'].presentText(environment, "autoread enabled",soundIconName='', interrupt=True)
environment['runtime']['outputManager'].presentText(environment, "autoread enabled", soundIconName='', interrupt=True)
else:
environment['runtime']['outputManager'].presentText(environment, "autoread disabled",soundIconName='', interrupt=True)
environment['runtime']['outputManager'].presentText(environment, "autoread disabled", soundIconName='', interrupt=True)
return environment
def setCallback(self, callback):
pass

View File

@ -6,10 +6,10 @@ class command():
def run(self, environment):
if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'braille', 'enabled'):
environment['runtime']['outputManager'].presentText(environment, "braille disabled",soundIconName='BrailleOff', interrupt=True)
environment['runtime']['outputManager'].presentText(environment, "braille disabled", soundIconName='BrailleOff', interrupt=True)
environment = environment['runtime']['settingsManager'].setSetting(environment, 'braille', 'enabled', str(not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'braille', 'enabled')))
if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'braille', 'enabled'):
environment['runtime']['outputManager'].presentText(environment, "braille enabled",soundIconName='BrailleOn', interrupt=True)
environment['runtime']['outputManager'].presentText(environment, "braille enabled", soundIconName='BrailleOn', interrupt=True)
return environment
def setCallback(self, callback):
pass

View File

@ -6,10 +6,10 @@ class command():
def run(self, environment):
if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'sound', 'enabled'):
environment['runtime']['outputManager'].presentText(environment, "sound disabled",soundIconName='SoundOff', interrupt=True)
environment['runtime']['outputManager'].presentText(environment, "sound disabled", soundIconName='SoundOff', interrupt=True)
environment = environment['runtime']['settingsManager'].setSetting(environment, 'sound', 'enabled', str(not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'sound', 'enabled')))
if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'sound', 'enabled'):
environment['runtime']['outputManager'].presentText(environment, "sound enabled",soundIconName='SoundOn', interrupt=True)
environment['runtime']['outputManager'].presentText(environment, "sound enabled", soundIconName='SoundOn', interrupt=True)
return environment
def setCallback(self, callback):
pass

View File

@ -6,10 +6,10 @@ class command():
def run(self, environment):
if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'enabled'):
environment['runtime']['outputManager'].presentText(environment, "speech disabled",soundIconName='SpeechOff', interrupt=True)
environment['runtime']['outputManager'].presentText(environment, "speech disabled", soundIconName='SpeechOff', interrupt=True)
environment = environment['runtime']['settingsManager'].setSetting(environment, 'speech', 'enabled', str(not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'enabled')))
if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'enabled'):
environment['runtime']['outputManager'].presentText(environment, "speech enabled",soundIconName='SpeechOn', interrupt=True)
environment['runtime']['outputManager'].presentText(environment, "speech enabled", soundIconName='SpeechOn', interrupt=True)
return environment
def setCallback(self, callback):
pass