Esempio n. 1
0
	def event_NVDAObject_init(self, obj):
		if not isinstance(obj, Window):
			return
		role = obj.role
		if role == controlTypes.ROLE_WINDOW:
			return
		wclass = Window.normalizeWindowClassName(obj.windowClassName)

		if wclass == "Window.8" and role == controlTypes.ROLE_PANE:
			# optimisation: There are quite a lot of these, so let's not instantiate parent NVDAObjects unnecessarily.
			parentWindow = winUser.getAncestor(obj.windowHandle, winUser.GA_PARENT)
			if parentWindow and Window.normalizeWindowClassName(winUser.getClassName(parentWindow)) == "SysTabControl32":
				obj.role = controlTypes.ROLE_PROPERTYPAGE

		elif wclass == "SysTabControl32":
			obj.isPresentableFocusAncestor = False
Esempio n. 2
0
    def event_NVDAObject_init(self, obj):
        if not isinstance(obj, Window):
            return
        role = obj.role
        if role == controlTypes.ROLE_WINDOW:
            return
        wclass = Window.normalizeWindowClassName(obj.windowClassName)

        if wclass == "Window.8" and role == controlTypes.ROLE_PANE:
            # optimisation: There are quite a lot of these, so let's not instantiate parent NVDAObjects unnecessarily.
            parentWindow = winUser.getAncestor(obj.windowHandle,
                                               winUser.GA_PARENT)
            if parentWindow and Window.normalizeWindowClassName(
                    winUser.getClassName(parentWindow)) == "SysTabControl32":
                obj.role = controlTypes.ROLE_PROPERTYPAGE

        elif wclass == "SysTabControl32":
            obj.isPresentableFocusAncestor = False