Conversation
|
@opencv-alalek |
modules/highgui/src/backend.hpp
Outdated
|
|
||
| virtual int waitKeyEx(int delay /*= 0*/) = 0; | ||
| virtual int pollKey() = 0; | ||
| virtual std::string currentUIFramework() = 0; |
There was a problem hiding this comment.
virtual const std::string getName() const = 0;
modules/highgui/src/window.cpp
Outdated
| { | ||
| return backend->currentUIFramework(); | ||
| } | ||
| return ""; |
There was a problem hiding this comment.
return std::string(); instead of ""
Anyway where should be large #if switch for COCOA / QT and others "builtin" backends.
Check cv::setWindowTitle implementation as reference.
|
|
||
| std::string currentUIFramework() | ||
| { | ||
| return "WIN32"; |
There was a problem hiding this comment.
should be implemented for GTK2/3 too.
| */ | ||
| CV_EXPORTS_W void destroyAllWindows(); | ||
|
|
||
| CV_EXPORTS_W std::string currentUIFramework(); |
|
Finally I wonder why not used getBuildInformation output to create a dictionnary? |
| CV_Error(Error::StsNotImplemented, "The function is not implemented with this GUI. "); | ||
| return std::string(); | ||
| #elif defined(HAVE_WIN32UI) | ||
| auto backend = getCurrentUIBackend(); |
There was a problem hiding this comment.
What is the problem with scheme similar to setWindowTitle?
Only one branch should try "plugin" interface. Other are builtins and they are pre-defined constants.
There was a problem hiding this comment.
I hope I understang plugins well
|
Added test, fixes, and rebased on 4.x branch. |
Add cv::currentUIFramework opencv#25354 issue opencv#25329 ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [ ] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
Pull Request Readiness Checklist
issue #25329
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.