コード例 #1
0
ファイル: itunes.py プロジェクト: lpintes/NVDA
	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)
コード例 #2
0
	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)
コード例 #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)
コード例 #4
0
ファイル: gecko_ia2.py プロジェクト: MarcoZehe/nvda
	def event_stateChange(self,obj,nextHandler):
		if not self.isAlive:
			return treeInterceptorHandler.killTreeInterceptor(self)
		return nextHandler()
コード例 #5
0
ファイル: gecko_ia2.py プロジェクト: sdokowe/nvda
	def event_stateChange(self,obj,nextHandler):
		if not self.isAlive:
			return treeInterceptorHandler.killTreeInterceptor(self)
		return nextHandler()