nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
Other
2.07k stars 626 forks source link

General result handling in ContentRecog #11555

Open ShubhamJain7 opened 3 years ago

ShubhamJain7 commented 3 years ago

Is your feature request related to a problem? Please describe.

The contentRecog module is currently only used by the OCR and so some of the code is written only to that end. The OCR presents its recognition result in a virtual window using the contentRecog/recogUi/RecogResultNVDAObject class whose instance is created and set to focus in by contentRecog/recogUi/_recogOnResult. contentRecog/recogUi/_recogOnResult is also, in part, responsible in ensuring multiple recognition processes aren't being run at the same time. This system works well for the OCR but is very limiting for use with any other recognizers that might want to present results differently.

Describe the solution you'd like

A more general approach where the author of the content recognition feature can define how to present recognition results while the the contentRecog module is only responsible for running and maintaining recognition processes.

Adriani90 commented 1 month ago

I think this would probably improve significantly the flexibility of OCR results presentation. cc: @LeonarddeR