當前位置: 首頁>>代碼示例>>Python>>正文


Python IAccessibleHandler.accNavigate方法代碼示例

本文整理匯總了Python中IAccessibleHandler.accNavigate方法的典型用法代碼示例。如果您正苦於以下問題:Python IAccessibleHandler.accNavigate方法的具體用法?Python IAccessibleHandler.accNavigate怎麽用?Python IAccessibleHandler.accNavigate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在IAccessibleHandler的用法示例。


在下文中一共展示了IAccessibleHandler.accNavigate方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _get_parent

# 需要導入模塊: import IAccessibleHandler [as 別名]
# 或者: from IAccessibleHandler import accNavigate [as 別名]
	def _get_parent(self):
		#Special code to support Mozilla node_child_of relation (for comboboxes)
		res=IAccessibleHandler.accNavigate(self.IAccessibleObject,self.IAccessibleChildID,IAccessibleHandler.NAVRELATION_NODE_CHILD_OF)
		if res and res!=(self.IAccessibleObject,self.IAccessibleChildID):
			newObj=IAccessible(IAccessibleObject=res[0],IAccessibleChildID=res[1])
			if newObj:
				return newObj
		return super(Mozilla,self).parent
開發者ID:atsuoishimoto,項目名稱:tweetitloud,代碼行數:10,代碼來源:mozilla.py

示例2: _get_parent

# 需要導入模塊: import IAccessibleHandler [as 別名]
# 或者: from IAccessibleHandler import accNavigate [as 別名]
	def _get_parent(self):
		#Special code to support Mozilla node_child_of relation (for comboboxes)
		res=IAccessibleHandler.accNavigate(self.IAccessibleObject,self.IAccessibleChildID,IAccessibleHandler.NAVRELATION_NODE_CHILD_OF)
		if res and res!=(self.IAccessibleObject,self.IAccessibleChildID):
			#Gecko can sometimes give back a broken application node with a windowHandle of 0
			#The application node is annoying, even if it wasn't broken
			#So only use the node_child_of object if it has a valid IAccessible2 windowHandle
			try:
				windowHandle=res[0].windowHandle
			except (COMError,AttributeError):
				windowHandle=None
			if windowHandle:
				newObj=IAccessible(windowHandle=windowHandle,IAccessibleObject=res[0],IAccessibleChildID=res[1])
				if newObj:
					return newObj
		return super(Mozilla,self).parent
開發者ID:Alain-Ambazac,項目名稱:nvda,代碼行數:18,代碼來源:mozilla.py

示例3: _get_parent

# 需要導入模塊: import IAccessibleHandler [as 別名]
# 或者: from IAccessibleHandler import accNavigate [as 別名]
 def _get_parent(self):
     parent = super(GeckoPluginWindowRoot, self).parent
     if parent.IAccessibleRole == oleacc.ROLE_SYSTEM_CLIENT:
         # Skip the window wrapping the plugin window,
         # which doesn't expose a Gecko accessible in Gecko >= 11.
         parent = parent.parent.parent
     ver = getGeckoVersion(parent)
     if ver and ver.major != 1:
         res = IAccessibleHandler.accNavigate(parent.IAccessibleObject, 0, IAccessibleHandler.NAVRELATION_EMBEDS)
         if res:
             obj = IAccessible(IAccessibleObject=res[0], IAccessibleChildID=res[1])
             if obj:
                 if controlTypes.STATE_OFFSCREEN not in obj.states:
                     return obj
                 else:
                     log.debugWarning("NAVRELATION_EMBEDS returned an offscreen document, name %r" % obj.name)
             else:
                 log.debugWarning("NAVRELATION_EMBEDS returned an invalid object")
         else:
             log.debugWarning("NAVRELATION_EMBEDS failed")
     return parent
開發者ID:daisymax,項目名稱:nvda,代碼行數:23,代碼來源:mozilla.py

示例4: appliesTo

# 需要導入模塊: import IAccessibleHandler [as 別名]
# 或者: from IAccessibleHandler import accNavigate [as 別名]
 def appliesTo(cls, obj):
     return obj.childCount > 0 and not IAccessibleHandler.accNavigate(
         obj.IAccessibleObject, obj.IAccessibleChildID, oleacc.NAVDIR_FIRSTCHILD
     )
開發者ID:RKelson93,項目名稱:nvda,代碼行數:6,代碼來源:msOffice.py


注:本文中的IAccessibleHandler.accNavigate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。