add horizontal and vertical announcements

This commit is contained in:
chrys 2016-07-15 15:56:47 +02:00
parent a93c60f75b
commit e2668f1467
4 changed files with 47 additions and 1 deletions

9
TODO
View File

@ -16,13 +16,20 @@ ToDos in Priority order:
enable_disable_speech #enable, disable speech
enable_disable_braile #enable, disable braile
enable_disable_sound #enable, disable sound
set_area_mark
reset_area_marks
toggle_highlighted_mode
- implement onInput commands
read_line_if_cursor_change_vertical (needed if you arrow up and down, we want to announce the line)
read_char_if_cursur_change_horizontal (needed if you arrow left and right, we want to announce the char under the cursor)
echo_char (echos the last char on pressing space or return)
echo_word (echos the last word on pressing space or return)
- implement onScreenChange commands
read highlighted text mode
window mode (define a area and just read that changes)
- default soundIcon theme (soundfiles)
- autostart systemd
- implement braille

View File

@ -4,6 +4,10 @@ class command():
def __init__(self):
pass
def run(self, environment):
return environment
if environment['screenData']['newCursor'] != environment['screenData']['oldCursor']:
print(environment['screenData']['newCursor'] != environment['screenData']['oldCursor'])
return environment
if environment['screenData']['newDelta'] != environment['screenData']['oldDelta'] or \
environment['screenData']['newTTY'] != environment['screenData']['oldTTY']:
environment['runtime']['outputManager'].speakText(environment, environment['screenData']['newDelta'], Interrupt=False)

View File

@ -0,0 +1,18 @@
#!/bin/python
class command():
def __init__(self):
pass
def run(self, environment):
if environment['screenData']['newCursor']['x'] == environment['screenData']['oldCursor']['x'] or\
environment['screenData']['newCursor']['y'] != environment['screenData']['oldCursor']['y']:
return environment
if environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']][environment['screenData']['newCursor']['x']].replace(" ","").replace("\n","").replace("\t","") == '':
environment['runtime']['outputManager'].speakText(environment, "blank")
else:
environment['runtime']['outputManager'].speakText(environment, environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']][environment['screenData']['newCursor']['x']])
return environment
def setCallback(self, callback):
pass
def shutdown(self):
pass

View File

@ -0,0 +1,17 @@
#!/bin/python
class command():
def __init__(self):
pass
def run(self, environment):
if environment['screenData']['newCursor']['y'] == environment['screenData']['oldCursor']['y']:
return environment
if environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']].replace(" ","").replace("\n","").replace("\t","") == '':
environment['runtime']['outputManager'].speakText(environment, "blank")
else:
environment['runtime']['outputManager'].speakText(environment, environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']])
return environment
def setCallback(self, callback):
pass
def shutdown(self):
pass