Updated accessible_output2. Add mac and a better linux support

This commit is contained in:
2015-11-03 04:38:59 -06:00
parent 6a4a3cc94e
commit fe9f724673
22 changed files with 174 additions and 1261 deletions

View File

@@ -1,15 +1,21 @@
from __future__ import absolute_import
import os
import platform
import ctypes
from platform_utils import paths
from libloader import load_library
from base import Output
from .base import Output
class NVDA(Output):
"""Supports The NVDA screen reader"""
name = "NVDA"
lib32 = 'nvdaControllerClient32.dll'
lib64 = 'nvdaControllerClient64.dll'
argtypes = {
'nvdaController_brailleMessage': (ctypes.c_wchar_p,),
'nvdaController_speakText': (ctypes.c_wchar_p,),
}
def is_active(self):
try:
@@ -18,12 +24,12 @@ class NVDA(Output):
return False
def braille(self, text, **options):
self.lib.nvdaController_brailleMessage(unicode(text))
self.lib.nvdaController_brailleMessage(text)
def speak(self, text, interrupt=False):
if interrupt:
self.silence()
self.lib.nvdaController_speakText(unicode(text))
self.lib.nvdaController_speakText(text)
def silence(self):
self.lib.nvdaController_cancelSpeech()