loudtalks.py
1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#appModules/loudtalks.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2010 Peter Vagner <peter.v@datagate.sk>
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
import appModuleHandler
from NVDAObjects.IAccessible import IAccessible
import oleacc
from NVDAObjects.IAccessible.sysListView32 import ListItem
import controlTypes
from NVDAObjects.window import Window
class loudTalksLink(Window):
value = None
role = controlTypes.ROLE_LINK
class loudTalksContactListItem(ListItem):
shouldAllowIAccessibleFocusEvent = True
def _get_keyboardShortcut(self):
keyboardShortcut = super(loudTalksContactListItem,self).keyboardShortcut
if keyboardShortcut == "None":
return None
return keyboardShortcut
class AppModule(appModuleHandler.AppModule):
def chooseNVDAObjectOverlayClasses(self, obj, clsList):
if obj.role == controlTypes.ROLE_WINDOW:
return
if obj.windowClassName == "UrlStaticWndClass":
clsList.insert(0, loudTalksLink)
elif obj.windowControlID == 1009 and isinstance(obj, IAccessible) and obj.IAccessibleRole == oleacc.ROLE_SYSTEM_LISTITEM:
clsList.insert(0, loudTalksContactListItem)