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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user