-
-
Notifications
You must be signed in to change notification settings - Fork 643
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some rethinking of the braille display size filters:
* braille: Removed filter_displayNumRows. * braille.handler: removed the displayNumrows and displayNumCols handler properties. * braille: Added a filter_displayDimensions extension point which takes a namedtuple of numRows and numCols, allowing external code to dictate the number of rows and columns for the display. This should be used now in place of filter_displaySize. This stops the worry of external code changing the number of rows but forgetting to change the over all size. * braille.handler: Added a displayDimensions property which: - creates a DisplayDimensions namedtuple of the display's real numRows and numCols. - Filters this with filter_displayDimensions. - Calculates displaySize from this (multiplying the filtered numRows and numCols). - Filters this with the old filter_displaySize. - If the displaySize changes due to filtering, for backwards compatibility the DisplayDimensions numRows is set to 1 and numCols is set to the filtered displaySize. - If the DisplayDimensions have changed at all from the internal cache after all the filters and calculations, then fire the handle_displaySizechanged extension point passing displaySize, numRows and numCols. * Use displayDimensions.numrows and displayDimensions.numCols in all braille handler code in place of the removed displayNumRows and displayNumCols properties respectively. This all means that new NVDA / remote code can specify full display dimensions, but for backwards compatibility, if the old displaySize filter is used, then braille is forced to a single row with displaySize cells.
- Loading branch information
1 parent
99ef260
commit 61ba4c6
Showing
1 changed file
with
58 additions
and
61 deletions.
There are no files selected for viewing
This file contains 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