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

Add cv::setWindowTitle to highgui

This commit is contained in:
Andrey Kamaev
2014-11-18 02:27:02 +03:00
parent 1744098438
commit f4ba8b13c7
8 changed files with 118 additions and 9 deletions
+17
View File
@@ -833,6 +833,23 @@ void cvSetModeWindow_CARBON( const char* name, double prop_value)//Yannick Verdi
__END__;
}
void cv::setWindowTitle(const String& winname, const String& title)
{
CvWindow* window = icvFindWindowByName(winname.c_str());
if (!window)
{
namedWindow(winname);
window = icvFindWindowByName(winname.c_str());
}
if (!window)
CV_Error(Error::StsNullPtr, "NULL window");
if (noErr != SetWindowTitleWithCFString(window->window, CFStringCreateWithCString(NULL, title.c_str(), kCFStringEncodingASCII)))
CV_Error_(Error::StsError, ("Failed to set \"%s\" window title to \"%s\"", winname.c_str(), title.c_str()));
}
CV_IMPL int cvNamedWindow( const char* name, int flags )
{
int result = 0;