OSDN Git Service
PowerPoint appModule: Listen for COM events from PowerPoint in order to track the selection and slide show transitions, rather than using specific keyboard gestures. This now allows NVDA to report the next slide in a slide show if the slide changes by itself or via user input NVDA did not expect. Also there may have been other user input NVDA did not expect, for moving the selection.
Specifically:
* Implement a COM object that supports the EApplication interface (Powerpoint application object's outgoing interface). This implementation supports WindowSelectionChange and SlideshowNextSlide. These events alert NVDA of changes by calling DocumentWindow NVDAObject's handleSelectionChange etc on the current focus object, but only if the focus window for the current input thread is the same window as what the NVDA focus object is for (i.e. there is no event_gainFocus coming up).
* Subscribe our EApplication event listner to Powerpoint using comtypes.client._AdviseConnection the first time an object model is successfully retreaved.
* OutlinePane NVDAObject now inherits from PaneClassDC rather than DocumentWindow as it does not need the selection properties, nor should we do anything about selection changes in this window from Powerpoint.
* SlideShowWindow NVDAObject: rename handleNewSlide to reportNewSlide as it doesn't actually set anything up as such. Also convert script_changeSlide into a normal method called handleSlidechange, which just clears any cached slide info and then calls reportNewSlide. This is called from the SlideShowNextSlide APowerpoint event.