本文整理汇总了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)
示例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()
示例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"))
示例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)
示例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)
示例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)
示例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()
示例8: reportFocus
def reportFocus(self):
errorText=self.errorText
speech.speakObjectProperties(self,name=True,role=True)
if errorText:
speech.speakText(errorText)
speech.speakSpelling(errorText)
示例9: script_executeAndRead
def script_executeAndRead(self,gesture):
gesture.send()
speech.speakObjectProperties(self,value=True)
示例10: event_typedCharacter
def event_typedCharacter(self,ch):
super(Display,self).event_typedCharacter(ch)
if ch in self.calcCommandChars:
speech.speakObjectProperties(self,value=True)
示例11: reportFocus
def reportFocus(self):
speech.speakObjectProperties(self,name=True,role=True)