Move definitions for magnification.dll to winBindings#18958
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Moves Windows Magnification API bindings from the screenCurtain module to a new dedicated winBindings.magnification module to improve code organization and reusability. This refactoring maintains backward compatibility through deprecation handling.
- Extracts magnification API bindings to a dedicated module in
winBindings - Updates screen curtain implementation to use the new module
- Adds deprecation handling for moved symbols
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| source/winBindings/magnification.py | New module containing magnification API bindings with proper documentation |
| source/visionEnhancementProviders/screenCurtain.py | Updated to use new magnification module with deprecation handling |
| tests/unit/test_visionEnhancementProviders/test_magnificationAPI.py | Updated imports to use new magnification module |
| source/NVDAHelper/localLib.py | Minor cleanup of function argument type definition |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
seanbudd
approved these changes
Sep 22, 2025
seanbudd
approved these changes
Sep 22, 2025
# Conflicts: # user_docs/en/changes.md
seanbudd
approved these changes
Sep 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
None
Summary of the issue:
Screen curtain defined ctypes bindings to magnification.dll from the Windows API.
Description of user facing changes:
None.
Description of developer facing changes:
Moved definitions to
winBindings.magnification.Description of development approach:
Move definitions to
source/winBindings/magnification.py. Remove fromMagnificationclass. Add deprecation handling code. Tidy definitions to not use so many temporary definitions.Note that these definitions use ctypes' function prototype syntax. This was carried across from the old definitions. We plan to move to this syntax anyway.
Testing strategy:
Ran from source. Tried enabling temporary and regular screen curtain. Tried importing deprecated symbols.
Known issues with pull request:
None
Code Review Checklist: