nvda
905a7eca - Move Windows API bindings out of hwPortUtils (#18571)

Commit
1 year ago
Move Windows API bindings out of hwPortUtils (#18571) Part of #16304 Related to #18207 Summary of the issue: `hwPortUtils` had a lot of ctypes bindings. Description of user facing changes: None Description of developer facing changes: Almost all of these bindings have been moved to the `winBindings` subpackage. Description of development approach: Used VS Code's refactoring tools to move the ctypes code. Used the Microsoft Learn pages and the header files in the Windows 10 SDK to add type information. Testing strategy: Tested connecting a Brailleedge 40 via USB and Bluetooth with automatic detection. Used `dir(hwPortUtils)` to find all symbols accessible from `hwPortUtils` without this PR. Manually filtered the list to exclude transitive imports. Ran NVDA from source with this PR checked out and made sure that: * All of the identified symbols could still be imported; and * All of the symbols moved by this PR log a deprecation warning on access. Known issues with pull request: The definition of `SP_DEVICE_INTERFACE_DETAIL_DATA_W` has not been moved, as its definition relies on variables in its closure.
Author
Parents
Loading