def processGenericWinEvent(eventID, window, objectID, childID): """Converts the win event to an NVDA event, Checks to see if this NVDAObject equals the current focus. If all goes well, then the event is queued and we return True @param eventID: a win event ID (type) @type eventID: integer @param window: a win event's window handle @type window: integer @param objectID: a win event's object ID @type objectID: integer @param childID: a win event's child ID @type childID: integer @returns: True if the event was processed, False otherwise. @rtype: boolean """ # Notify appModuleHandler of this new window appModuleHandler.update(winUser.getWindowThreadProcessID(window)[0]) # Handle particular events for the special MSAA caret object just as if they were for the focus object focus = eventHandler.lastQueuedFocusObject if focus and objectID == winUser.OBJID_CARET and eventID in ( winUser.EVENT_OBJECT_LOCATIONCHANGE, winUser.EVENT_OBJECT_SHOW): NVDAEvent = ("caret", focus) else: NVDAEvent = winEventToNVDAEvent(eventID, window, objectID, childID) if not NVDAEvent: return False if NVDAEvent[0] == "nameChange" and objectID == winUser.OBJID_CURSOR: mouseHandler.updateMouseShape(NVDAEvent[1].name) return if NVDAEvent[1] == focus: NVDAEvent = (NVDAEvent[0], focus) eventHandler.queueEvent(*NVDAEvent) return True
def processGenericWinEvent(eventID,window,objectID,childID): """Converts the win event to an NVDA event, Checks to see if this NVDAObject equals the current focus. If all goes well, then the event is queued and we return True @param eventID: a win event ID (type) @type eventID: integer @param window: a win event's window handle @type window: integer @param objectID: a win event's object ID @type objectID: integer @param childID: a win event's child ID @type childID: integer @returns: True if the event was processed, False otherwise. @rtype: boolean """ #Notify appModuleHandler of this new window appModuleHandler.update(winUser.getWindowThreadProcessID(window)[0]) #Handle particular events for the special MSAA caret object just as if they were for the focus object focus=eventHandler.lastQueuedFocusObject if focus and objectID==winUser.OBJID_CARET and eventID in (winUser.EVENT_OBJECT_LOCATIONCHANGE,winUser.EVENT_OBJECT_SHOW): NVDAEvent=("caret",focus) else: NVDAEvent=winEventToNVDAEvent(eventID,window,objectID,childID) if not NVDAEvent: return False if NVDAEvent[0]=="nameChange" and objectID==winUser.OBJID_CURSOR: mouseHandler.updateMouseShape(NVDAEvent[1].name) return if NVDAEvent[1]==focus: NVDAEvent=(NVDAEvent[0],focus) eventHandler.queueEvent(*NVDAEvent) return True