return (code != -1) ? (code & 0xff) : -1;
}
-// NOTE: cv::pollKey has no C API equivalent. it is implemented in each backend source file.
+#if defined(HAVE_WIN32UI)
+// pollKey() implemented in window_w32.cpp
+#elif defined(HAVE_GTK) || defined(HAVE_COCOA) || defined(HAVE_QT) || (defined (WINRT) && !defined (WINRT_8_0))
+// pollKey() fallback implementation
+int cv::pollKey()
+{
+ CV_TRACE_FUNCTION();
+ // fallback. please implement a proper polling function
+ return cvWaitKey(1);
+}
+#endif
int cv::createTrackbar(const String& trackbarName, const String& winName,
int* value, int count, TrackbarCallback callback,
CV_NO_GUI_ERROR("cvCreateButton");
}
+int cv::pollKey()
+{
+ CV_NO_GUI_ERROR("cv::pollKey()");
+}
#endif
}
-int cv::pollKey()
-{
- CV_TRACE_FUNCTION();
- // fallback. please implement a proper polling function
- return cvWaitKey(1);
-}
-
//Yannick Verdie
//This function is experimental and some functions (such as cvSet/getWindowProperty will not work)
//We recommend not using this function for now
return returnCode;
}
-int cv::pollKey()
-{
- CV_TRACE_FUNCTION();
- // fallback. please implement a proper polling function
- return cvWaitKey(1);
-}
-
CvRect cvGetWindowRect_COCOA( const char* name )
{
CvRect result = cvRect(-1, -1, -1, -1);
/********************************** Not YET implemented API ****************************************************/
-int cv::pollKey()
-{
- CV_TRACE_FUNCTION();
- CV_WINRT_NO_GUI_ERROR("cvPollKey");
-
- // TODO: implement appropriate logic here
-}
-
CV_IMPL int cvWaitKey(int delay)
{
CV_WINRT_NO_GUI_ERROR("cvWaitKey");