Exemple #1
0
	def event_stateChange(self):
		# iTunes has indicated that a page has died and been replaced by a new one.
		focus = api.getFocusObject()
		if not winUser.isDescendantWindow(self.windowHandle, focus.windowHandle):
			return
		# The new page has the same event params, so we must bypass NVDA's IAccessible caching.
		obj = NVDAObjects.IAccessible.getNVDAObjectFromEvent(focus.windowHandle, winUser.OBJID_CLIENT, 0)
		if not obj:
			return
		if focus.treeInterceptor:
			speech.cancelSpeech()
			treeInterceptorHandler.killTreeInterceptor(focus.treeInterceptor)
		eventHandler.queueEvent("gainFocus",obj)
	def event_stateChange(self):
		# iTunes has indicated that a page has died and been replaced by a new one.
		# #5191: This is actually fired on the "iTunesWebViewControl" parent,
		# but AccessibleObjectFromEvent on this window returns the WebKit document as of iTunes 12.
		focus = api.getFocusObject()
		if self.windowHandle != focus.windowHandle:
			return
		# The new page has the same event params, so we must bypass NVDA's IAccessible caching.
		obj = NVDAObjects.IAccessible.getNVDAObjectFromEvent(focus.windowHandle, winUser.OBJID_CLIENT, 0)
		if not obj:
			return
		if focus.treeInterceptor:
			speech.cancelSpeech()
			treeInterceptorHandler.killTreeInterceptor(focus.treeInterceptor)
		eventHandler.queueEvent("gainFocus",obj)
Exemple #3
0
 def event_stateChange(self):
     # iTunes has indicated that a page has died and been replaced by a new one.
     focus = api.getFocusObject()
     if not winUser.isDescendantWindow(self.windowHandle,
                                       focus.windowHandle):
         return
     # The new page has the same event params, so we must bypass NVDA's IAccessible caching.
     obj = NVDAObjects.IAccessible.getNVDAObjectFromEvent(
         focus.windowHandle, winUser.OBJID_CLIENT, 0)
     if not obj:
         return
     if focus.treeInterceptor:
         speech.cancelSpeech()
         treeInterceptorHandler.killTreeInterceptor(focus.treeInterceptor)
     eventHandler.queueEvent("gainFocus", obj)
Exemple #4
0
	def event_stateChange(self,obj,nextHandler):
		if not self.isAlive:
			return treeInterceptorHandler.killTreeInterceptor(self)
		return nextHandler()
Exemple #5
0
	def event_stateChange(self,obj,nextHandler):
		if not self.isAlive:
			return treeInterceptorHandler.killTreeInterceptor(self)
		return nextHandler()