当前位置: 首页>>代码示例>>Python>>正文


Python speech.speakObjectProperties函数代码示例

本文整理汇总了Python中speech.speakObjectProperties函数的典型用法代码示例。如果您正苦于以下问题:Python speakObjectProperties函数的具体用法?Python speakObjectProperties怎么用?Python speakObjectProperties使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了speakObjectProperties函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: event_mouseMove

	def event_mouseMove(self,x,y):
		if not self._mouseEntered and config.conf['mouse']['reportObjectRoleOnMouseEnter']:
			speech.cancelSpeech()
			speech.speakObjectProperties(self,role=True)
			speechWasCanceled=True
		else:
			speechWasCanceled=False
		self._mouseEntered=True
		try:
			info=self.makeTextInfo(textInfos.Point(x,y))
		except NotImplementedError:
			info=NVDAObjectTextInfo(self,textInfos.POSITION_FIRST)
		except LookupError:
			return
		if config.conf["reviewCursor"]["followMouse"]:
			api.setReviewPosition(info)
		info.expand(info.unit_mouseChunk)
		oldInfo=getattr(self,'_lastMouseTextInfoObject',None)
		self._lastMouseTextInfoObject=info
		if not oldInfo or info.__class__!=oldInfo.__class__ or info.compareEndPoints(oldInfo,"startToStart")!=0 or info.compareEndPoints(oldInfo,"endToEnd")!=0:
			text=info.text
			notBlank=False
			if text:
				for ch in text:
					if not ch.isspace() and ch!=u'\ufffc':
						notBlank=True
			if notBlank:
				if not speechWasCanceled:
					speech.cancelSpeech()
				speech.speakText(text)
开发者ID:atsuoishimoto,项目名称:tweetitloud,代码行数:30,代码来源:__init__.py

示例2: event_gainFocus

	def event_gainFocus(self,obj,nextHandler):
		if obj.windowClassName=="DirectUIHWND" and obj.role==controlTypes.ROLE_BUTTON and not obj.next:
			prev=obj.previous
			if prev and prev.role==controlTypes.ROLE_STATICTEXT:
				# This is for a popup message in the logon dialog.
				# Present the dialog again so the message will be reported.
				speech.speakObjectProperties(api.getForegroundObject(),name=True,role=True,description=True)
				braille.invalidateCachedFocusAncestors(1)
		nextHandler()
开发者ID:Alain-Ambazac,项目名称:nvda,代码行数:9,代码来源:logonui.py

示例3: script_navigatorObject_moveToFlatReviewAtObjectPosition

	def script_navigatorObject_moveToFlatReviewAtObjectPosition(self,gesture):
		obj=api.getNavigatorObject()
		pos=obj.flatReviewPosition
		if pos:
			api.setReviewPosition(pos)
			pos=pos.copy()
			obj=api.getNavigatorObject()
			speech.speakObjectProperties(obj,name=True,role=True)
			pos.expand(textInfos.UNIT_LINE)
			speech.speakTextInfo(pos)
		else:
			speech.speakMessage(_("No flat review for this object"))
开发者ID:atsuoishimoto,项目名称:tweetitloud,代码行数:12,代码来源:globalCommands.py

示例4: reportFocus

	def reportFocus(self):
		speech.speakObjectProperties(self,name=True,role=True)
		info=self.makeTextInfo(textInfos.POSITION_CARET)
		info.move(textInfos.UNIT_WORD,-1,endPoint="start")
		try:
			error=info._rangeObj.spellingErrors[1].text
		except:
			info.expand(textInfos.UNIT_STORY)
			speech.speakText(info.text)
			return
		speech.speakText(error)
		speech.speakSpelling(error)
开发者ID:atsuoishimoto,项目名称:tweetitloud,代码行数:12,代码来源:winword.py

示例5: event_descriptionChange

	def event_descriptionChange(self):
		if self is api.getFocusObject():
			speech.speakObjectProperties(self, description=True, reason=speech.REASON_CHANGE)
		braille.handler.handleUpdate(self)
开发者ID:atsuoishimoto,项目名称:tweetitloud,代码行数:4,代码来源:__init__.py

示例6: event_nameChange

	def event_nameChange(self):
		if self is api.getFocusObject():
			speech.speakObjectProperties(self, name=True, reason=controlTypes.REASON_CHANGE)
		braille.handler.handleUpdate(self)
开发者ID:pcguruuu,项目名称:git-git.nvaccess.org-nvda,代码行数:4,代码来源:__init__.py

示例7: event_valueChange

	def event_valueChange(self):
		focusParent=api.getFocusObject().parent
		if self==focusParent:
			speech.speakObjectProperties(self,value=True,reason=controlTypes.REASON_CHANGE)
		else:
			super(SensitiveSlider,self).event_valueChange()
开发者ID:Alain-Ambazac,项目名称:nvda,代码行数:6,代码来源:__init__.py

示例8: reportFocus

	def reportFocus(self):
		errorText=self.errorText
		speech.speakObjectProperties(self,name=True,role=True)
		if errorText:
			speech.speakText(errorText)
			speech.speakSpelling(errorText)
开发者ID:lpintes,项目名称:NVDA,代码行数:6,代码来源:winword.py

示例9: script_executeAndRead

	def script_executeAndRead(self,gesture):
		gesture.send()
		speech.speakObjectProperties(self,value=True)
开发者ID:Alain-Ambazac,项目名称:nvda,代码行数:3,代码来源:calc.py

示例10: event_typedCharacter

	def event_typedCharacter(self,ch):
		super(Display,self).event_typedCharacter(ch)
		if ch in self.calcCommandChars:
			speech.speakObjectProperties(self,value=True)
开发者ID:Alain-Ambazac,项目名称:nvda,代码行数:4,代码来源:calc.py

示例11: reportFocus

	def reportFocus(self):
		speech.speakObjectProperties(self,name=True,role=True)
开发者ID:Alain-Ambazac,项目名称:nvda,代码行数:2,代码来源:msnmsgr.py


注:本文中的speech.speakObjectProperties函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。