OSDN Git Service

PowerPoint appModule: Listen for COM events from PowerPoint in order to track the...
authorMichael Curran <mick@kulgan.net>
Thu, 10 Jan 2013 05:14:04 +0000 (15:14 +1000)
committerMichael Curran <mick@kulgan.net>
Thu, 10 Jan 2013 05:14:04 +0000 (15:14 +1000)
commit0d08e1c637ff30967a540a051f499ef55909ebe9
tree9e6bd8cdd158a8ac13597eeb2a5e2a31b93c0861
parent8984f3549be7dc56ca3b2f89cf7370341107f1bf
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.
source/appModules/powerpnt.py