Package appModules :: Module firefox
[hide private]
[frames] | no frames]

Source Code for Module appModules.firefox

 1  #appModules/firefox.py 
 2  #A part of NonVisual Desktop Access (NVDA) 
 3  #Copyright (C) 2006-2008 NVDA Contributors <http://www.nvda-project.org/> 
 4  #This file is covered by the GNU General Public License. 
 5  #See the file COPYING for more details. 
 6   
 7  import appModuleHandler 
 8  import controlTypes 
 9  import api 
10  import speech 
11  import winUser 
12   
13 -class AppModule(appModuleHandler.AppModule):
14
15 - def event_stateChange(self, obj, nextHandler):
16 if obj.role == controlTypes.ROLE_DOCUMENT and controlTypes.STATE_BUSY in obj.states and winUser.isWindowVisible(obj.windowHandle) and obj.isInForeground: 17 statusBar = api.getStatusBar() 18 if statusBar: 19 statusText = api.getStatusBarText(statusBar) 20 speech.cancelSpeech() 21 speech.speakMessage(controlTypes.speechStateLabels[controlTypes.STATE_BUSY]) 22 speech.speakMessage(statusText) 23 return 24 nextHandler()
25 26 event_gainFocus = event_stateChange
27