1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-28 23:03:03 +04:00

Merge pull request #14872 from AhiyaHiya:feature/topmost_window

* Added mechanism to set/toggle NORMAL window to TOPMOST window.

* highgui: remove unnecessary/legacy code
This commit is contained in:
Jaime
2019-09-05 06:55:17 -04:00
committed by Alexander Alekhin
parent 4ffb5b62ea
commit fafada28eb
5 changed files with 138 additions and 1 deletions
+23
View File
@@ -42,6 +42,7 @@
#include "precomp.hpp"
#include <map>
#include "opencv2/core/opengl.hpp"
#include "opencv2/core/utils/logger.hpp"
// in later times, use this file as a dispatcher to implementations like cvcap.cpp
@@ -83,6 +84,16 @@ CV_IMPL void cvSetWindowProperty(const char* name, int prop_id, double prop_valu
#endif
break;
case cv::WND_PROP_TOPMOST:
#if defined(HAVE_WIN32UI)
cvSetPropTopmost_W32(name, (prop_value != 0 ? true : false));
#elif defined(HAVE_COCOA)
cvSetPropTopmost_COCOA(name, (prop_value != 0 ? true : false));
#else
CV_LOG_WARNING(NULL, "Property WND_PROP_TOPMOST is not supported on current GUI backend");
#endif
break;
default:;
}
}
@@ -162,6 +173,18 @@ CV_IMPL double cvGetWindowProperty(const char* name, int prop_id)
return -1;
#endif
break;
case cv::WND_PROP_TOPMOST:
#if defined(HAVE_WIN32UI)
return cvGetPropTopmost_W32(name);
#elif defined(HAVE_COCOA)
return cvGetPropTopmost_COCOA(name);
#else
CV_LOG_WARNING(NULL, "Property WND_PROP_TOPMOST is not supported on current GUI backend");
return -1;
#endif
break;
default:
return -1;
}