| Trees | Indices | Help |
|---|
|
|
1 #appModules/logonui.py 2 #A part of NonVisual Desktop Access (NVDA) 3 #This file is covered by the GNU General Public License. 4 #See the file COPYING for more details. 5 #Copyright (C) 2009-2011 James Teh <jamie@jantrid.net>, Michael Curran <mick@kulgan.net> 6 7 import speech 8 import api 9 import braille 10 import controlTypes 11 from NVDAObjects.IAccessible import IAccessible 12 from NVDAObjects.behaviors import Dialog 13 import appModuleHandler 14 import eventHandler 15 16 """App module for the Windows Logon screen 17 """ 1820 21 role = controlTypes.ROLE_DIALOG 22 isPresentableFocusAncestor = True 233425 child = self.firstChild 26 if child and controlTypes.STATE_FOCUSED in child.states and not eventHandler.isPendingEvents("gainFocus"): 27 # UIA reports that focus is on the top level pane, even when it's actually on the frame below. 28 # This causes us to incorrectly use UIA for the top level pane, which causes this pane to be spoken again when the focus moves. 29 # Therefore, bounce the focus to the correct object. 30 eventHandler.queueEvent("gainFocus", child) 31 return 32 33 return super(LogonDialog, self).event_gainFocus()36 405942 # Focus automatically jumps to the password field when a user is selected. This field has no name. 43 # This means that the new selected user is not reported. 44 # However, the selected user name is the name of the window object for this field. 45 try: 46 self.parent.invalidateCache() 47 return self.parent.name 48 except: 49 return super(XPPasswordField, self).name5052 # The up and down arrow keys change the selected user, but there's no reliable NVDA event for detecting this. 53 oldName = self.name 54 gesture.send() 55 self.invalidateCache() 56 if oldName == self.name or controlTypes.STATE_FOCUSED not in self.states: 57 return 58 self.event_gainFocus()619063 if obj.windowClassName == "NativeHWNDHost" and obj.parent and not obj.parent.parent: 64 # This is the top level pane of the XP logon screen. 65 # Make sure it is always presented. 66 obj.isPresentableFocusAncestor = True6769 windowClass = obj.windowClassName 70 71 if windowClass == "AUTHUI.DLL: LogonUI Logon Window" and obj.parent and obj.parent.parent and not obj.parent.parent.parent: 72 clsList.insert(0, LogonDialog) 73 return 74 75 if windowClass == "Edit" and not obj.name: 76 parent = obj.parent 77 if parent and parent.role == controlTypes.ROLE_WINDOW: 78 clsList.insert(0, XPPasswordField) 79 return8082 if obj.windowClassName=="DirectUIHWND" and obj.role==controlTypes.ROLE_BUTTON and not obj.next: 83 prev=obj.previous 84 if prev and prev.role==controlTypes.ROLE_STATICTEXT: 85 # This is for a popup message in the logon dialog. 86 # Present the dialog again so the message will be reported. 87 speech.speakObjectProperties(api.getForegroundObject(),name=True,role=True,description=True) 88 braille.invalidateCachedFocusAncestors(1) 89 nextHandler()
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Fri Nov 18 17:46:09 2011 | http://epydoc.sourceforge.net |