Exemplo n.º 1
0
	def event_NVDAObject_init(self,obj):
		#The root document of HTML Metro Apps must be treeted as an application. 
		if isinstance(obj,Body) and obj.windowClassName=="Internet Explorer_Server":
			try:
				paccParent=obj.IAccessibleObject.accParent.accParent
				identity=IAccessibleHandler.getIAccIdentity(paccParent,0)
			except (COMError,AttributeError):
				identity=None
			if identity:
				windowHandle=identity.get('windowHandle')
				if windowHandle and winUser.getClassName(windowHandle)=="Web Platform Embedding":
					obj.role=controlTypes.ROLE_APPLICATION
 def event_NVDAObject_init(self, obj):
     #The root document of HTML Metro Apps must be treeted as an application.
     if isinstance(
             obj,
             Body) and obj.windowClassName == "Internet Explorer_Server":
         try:
             paccParent = obj.IAccessibleObject.accParent.accParent
             identity = IAccessibleHandler.getIAccIdentity(paccParent, 0)
         except (COMError, AttributeError):
             identity = None
         if identity:
             windowHandle = identity.get('windowHandle')
             if windowHandle and winUser.getClassName(
                     windowHandle) == "Web Platform Embedding":
                 obj.role = controlTypes.ROLE_APPLICATION