mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-08-27 02:09:22 +00:00
Putting all the code from the current master branch of TWBlue
This commit is contained in:
23
src/accessible_output2/outputs/system_access.py
Normal file
23
src/accessible_output2/outputs/system_access.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from base import Output
|
||||
|
||||
class SystemAccess (Output):
|
||||
"""Supports System Access and System Access Mobile"""
|
||||
|
||||
name = "System Access"
|
||||
lib32 = 'saapi32.dll'
|
||||
priority = 99
|
||||
|
||||
def braille(self, text, **options):
|
||||
self.lib.SA_BrlShowTextW(unicode(text))
|
||||
|
||||
def speak(self, text, interrupt=False):
|
||||
if self.is_active():
|
||||
self.dll.SA_SayW(unicode(text))
|
||||
|
||||
def is_active(self):
|
||||
try:
|
||||
return self.dll.SA_IsRunning()
|
||||
except:
|
||||
return False
|
||||
|
||||
output_class = SystemAccess
|
Reference in New Issue
Block a user