Magnifier implementation (#19228)
Closes #12539
Summary of the issue:
This pull request introduces a new NVDA magnifier feature, including docked and lens magnifier modes, color filter support, and a set of global commands for controlling magnification. The changes add new classes for handling magnifier windows, provide optimized color filtering, and implement keyboard shortcuts for toggling magnification, zooming, cycling modes, and color filters.
Description of user facing changes:
Implemented new script commands in globalCommands.py for starting/stopping the magnifier, zooming in/out, cycling color filters, toggling fullscreen mode, cycling magnifier types, and spotlighting the magnifier window, each with descriptive messages and gestures.
Description of developer facing changes:
No significant changes.
A new displayChanged extension point under winAPI._displayTracking, which notifies handlers of display configuration changes.
Description of development approach:
Introduced the main magnifier module with initialization, activation, and shutdown logic in __init__.py, supporting only full-screen magnification for now.
Added a FullScreenMagnifier class implementing full-screen magnification, handling zoom, color filters, mouse centering, and spotlight mode, interfacing with the Windows Magnification API.
Implemented keyboard command handlers for toggling the magnifier, zooming, cycling color filters, changing full-screen modes, and starting spotlight mode in commands.py.
Added a configuration module (config.py) to manage default zoom level, color filter, full-screen mode, and mouse centering settings, with utilities for retrieving and setting these values.