mirror of
https://github.com/opencv/opencv.git
synced 2025-06-22 03:22:10 +08:00
Merge pull request #13073 from alalek:cleanup_carbon
This commit is contained in:
commit
35c7cab742
@ -220,7 +220,6 @@ OCV_OPTION(BUILD_ITT "Build Intel ITT from source" NOT MIN
|
|||||||
# ===================================================
|
# ===================================================
|
||||||
OCV_OPTION(WITH_1394 "Include IEEE1394 support" ON IF (NOT ANDROID AND NOT IOS AND NOT WINRT) )
|
OCV_OPTION(WITH_1394 "Include IEEE1394 support" ON IF (NOT ANDROID AND NOT IOS AND NOT WINRT) )
|
||||||
OCV_OPTION(WITH_AVFOUNDATION "Use AVFoundation for Video I/O (iOS/Mac)" ON IF APPLE)
|
OCV_OPTION(WITH_AVFOUNDATION "Use AVFoundation for Video I/O (iOS/Mac)" ON IF APPLE)
|
||||||
OCV_OPTION(WITH_CARBON "Use Carbon for UI instead of Cocoa (OBSOLETE)" OFF IF APPLE )
|
|
||||||
OCV_OPTION(WITH_CAROTENE "Use NVidia carotene acceleration library for ARM platform" ON IF (ARM OR AARCH64) AND NOT IOS AND NOT (CMAKE_VERSION VERSION_LESS "2.8.11"))
|
OCV_OPTION(WITH_CAROTENE "Use NVidia carotene acceleration library for ARM platform" ON IF (ARM OR AARCH64) AND NOT IOS AND NOT (CMAKE_VERSION VERSION_LESS "2.8.11"))
|
||||||
OCV_OPTION(WITH_CPUFEATURES "Use cpufeatures Android library" ON IF ANDROID)
|
OCV_OPTION(WITH_CPUFEATURES "Use cpufeatures Android library" ON IF ANDROID)
|
||||||
OCV_OPTION(WITH_VTK "Include VTK library support (and build opencv_viz module eiher)" ON IF (NOT ANDROID AND NOT IOS AND NOT WINRT AND NOT CMAKE_CROSSCOMPILING) )
|
OCV_OPTION(WITH_VTK "Include VTK library support (and build opencv_viz module eiher)" ON IF (NOT ANDROID AND NOT IOS AND NOT WINRT AND NOT CMAKE_CROSSCOMPILING) )
|
||||||
@ -1157,12 +1156,8 @@ if(WITH_WIN32UI)
|
|||||||
status(" Win32 UI:" HAVE_WIN32UI THEN YES ELSE NO)
|
status(" Win32 UI:" HAVE_WIN32UI THEN YES ELSE NO)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(HAVE_COCOA) # APPLE
|
||||||
if(WITH_CARBON)
|
status(" Cocoa:" YES)
|
||||||
status(" Carbon:" YES)
|
|
||||||
else()
|
|
||||||
status(" Cocoa:" YES)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_GTK OR HAVE_GTK)
|
if(WITH_GTK OR HAVE_GTK)
|
||||||
|
@ -80,11 +80,9 @@ if(WITH_OPENGL)
|
|||||||
endif()
|
endif()
|
||||||
endif(WITH_OPENGL)
|
endif(WITH_OPENGL)
|
||||||
|
|
||||||
# --- Carbon & Cocoa ---
|
# --- Cocoa ---
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
if(WITH_CARBON)
|
if(NOT IOS AND CV_CLANG)
|
||||||
set(HAVE_CARBON YES)
|
|
||||||
elseif(NOT IOS AND CV_CLANG)
|
|
||||||
set(HAVE_COCOA YES)
|
set(HAVE_COCOA YES)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -31,9 +31,6 @@
|
|||||||
/* V4L2 capturing support */
|
/* V4L2 capturing support */
|
||||||
#cmakedefine HAVE_CAMV4L2
|
#cmakedefine HAVE_CAMV4L2
|
||||||
|
|
||||||
/* Carbon windowing environment */
|
|
||||||
#cmakedefine HAVE_CARBON
|
|
||||||
|
|
||||||
/* AMD's Basic Linear Algebra Subprograms Library*/
|
/* AMD's Basic Linear Algebra Subprograms Library*/
|
||||||
#cmakedefine HAVE_CLAMDBLAS
|
#cmakedefine HAVE_CLAMDBLAS
|
||||||
|
|
||||||
|
@ -120,9 +120,6 @@ elseif(HAVE_WIN32UI)
|
|||||||
list(APPEND highgui_srcs ${CMAKE_CURRENT_LIST_DIR}/src/window_w32.cpp)
|
list(APPEND highgui_srcs ${CMAKE_CURRENT_LIST_DIR}/src/window_w32.cpp)
|
||||||
elseif(HAVE_GTK OR HAVE_GTK3)
|
elseif(HAVE_GTK OR HAVE_GTK3)
|
||||||
list(APPEND highgui_srcs ${CMAKE_CURRENT_LIST_DIR}/src/window_gtk.cpp)
|
list(APPEND highgui_srcs ${CMAKE_CURRENT_LIST_DIR}/src/window_gtk.cpp)
|
||||||
elseif(HAVE_CARBON)
|
|
||||||
list(APPEND highgui_srcs ${CMAKE_CURRENT_LIST_DIR}/src/window_carbon.cpp)
|
|
||||||
list(APPEND HIGHGUI_LIBRARIES "-framework Carbon" "-framework QuickTime")
|
|
||||||
elseif(HAVE_COCOA)
|
elseif(HAVE_COCOA)
|
||||||
list(APPEND highgui_srcs ${CMAKE_CURRENT_LIST_DIR}/src/window_cocoa.mm)
|
list(APPEND highgui_srcs ${CMAKE_CURRENT_LIST_DIR}/src/window_cocoa.mm)
|
||||||
list(APPEND HIGHGUI_LIBRARIES "-framework Cocoa")
|
list(APPEND HIGHGUI_LIBRARIES "-framework Cocoa")
|
||||||
|
@ -86,18 +86,15 @@
|
|||||||
//Yannick Verdie 2010, Max Kostin 2015
|
//Yannick Verdie 2010, Max Kostin 2015
|
||||||
void cvSetModeWindow_W32(const char* name, double prop_value);
|
void cvSetModeWindow_W32(const char* name, double prop_value);
|
||||||
void cvSetModeWindow_GTK(const char* name, double prop_value);
|
void cvSetModeWindow_GTK(const char* name, double prop_value);
|
||||||
void cvSetModeWindow_CARBON(const char* name, double prop_value);
|
|
||||||
void cvSetModeWindow_COCOA(const char* name, double prop_value);
|
void cvSetModeWindow_COCOA(const char* name, double prop_value);
|
||||||
void cvSetModeWindow_WinRT(const char* name, double prop_value);
|
void cvSetModeWindow_WinRT(const char* name, double prop_value);
|
||||||
|
|
||||||
CvRect cvGetWindowRect_W32(const char* name);
|
CvRect cvGetWindowRect_W32(const char* name);
|
||||||
CvRect cvGetWindowRect_GTK(const char* name);
|
CvRect cvGetWindowRect_GTK(const char* name);
|
||||||
CvRect cvGetWindowRect_CARBON(const char* name);
|
|
||||||
CvRect cvGetWindowRect_COCOA(const char* name);
|
CvRect cvGetWindowRect_COCOA(const char* name);
|
||||||
|
|
||||||
double cvGetModeWindow_W32(const char* name);
|
double cvGetModeWindow_W32(const char* name);
|
||||||
double cvGetModeWindow_GTK(const char* name);
|
double cvGetModeWindow_GTK(const char* name);
|
||||||
double cvGetModeWindow_CARBON(const char* name);
|
|
||||||
double cvGetModeWindow_COCOA(const char* name);
|
double cvGetModeWindow_COCOA(const char* name);
|
||||||
double cvGetModeWindow_WinRT(const char* name);
|
double cvGetModeWindow_WinRT(const char* name);
|
||||||
|
|
||||||
|
@ -61,8 +61,6 @@ CV_IMPL void cvSetWindowProperty(const char* name, int prop_id, double prop_valu
|
|||||||
cvSetModeWindow_W32(name,prop_value);
|
cvSetModeWindow_W32(name,prop_value);
|
||||||
#elif defined (HAVE_GTK)
|
#elif defined (HAVE_GTK)
|
||||||
cvSetModeWindow_GTK(name,prop_value);
|
cvSetModeWindow_GTK(name,prop_value);
|
||||||
#elif defined (HAVE_CARBON)
|
|
||||||
cvSetModeWindow_CARBON(name,prop_value);
|
|
||||||
#elif defined (HAVE_COCOA)
|
#elif defined (HAVE_COCOA)
|
||||||
cvSetModeWindow_COCOA(name,prop_value);
|
cvSetModeWindow_COCOA(name,prop_value);
|
||||||
#elif defined (WINRT)
|
#elif defined (WINRT)
|
||||||
@ -103,8 +101,6 @@ CV_IMPL double cvGetWindowProperty(const char* name, int prop_id)
|
|||||||
return cvGetModeWindow_W32(name);
|
return cvGetModeWindow_W32(name);
|
||||||
#elif defined (HAVE_GTK)
|
#elif defined (HAVE_GTK)
|
||||||
return cvGetModeWindow_GTK(name);
|
return cvGetModeWindow_GTK(name);
|
||||||
#elif defined (HAVE_CARBON)
|
|
||||||
return cvGetModeWindow_CARBON(name);
|
|
||||||
#elif defined (HAVE_COCOA)
|
#elif defined (HAVE_COCOA)
|
||||||
return cvGetModeWindow_COCOA(name);
|
return cvGetModeWindow_COCOA(name);
|
||||||
#elif defined (WINRT)
|
#elif defined (WINRT)
|
||||||
@ -176,8 +172,6 @@ cv::Rect cvGetWindowImageRect(const char* name)
|
|||||||
return cvGetWindowRect_W32(name);
|
return cvGetWindowRect_W32(name);
|
||||||
#elif defined (HAVE_GTK)
|
#elif defined (HAVE_GTK)
|
||||||
return cvGetWindowRect_GTK(name);
|
return cvGetWindowRect_GTK(name);
|
||||||
#elif defined (HAVE_CARBON)
|
|
||||||
return cvGetWindowRect_CARBON(name);
|
|
||||||
#elif defined (HAVE_COCOA)
|
#elif defined (HAVE_COCOA)
|
||||||
return cvGetWindowRect_COCOA(name);
|
return cvGetWindowRect_COCOA(name);
|
||||||
#else
|
#else
|
||||||
@ -582,7 +576,6 @@ int cv::createButton(const String&, ButtonCallback, void*, int , bool )
|
|||||||
#if defined (HAVE_WIN32UI) // see window_w32.cpp
|
#if defined (HAVE_WIN32UI) // see window_w32.cpp
|
||||||
#elif defined (HAVE_GTK) // see window_gtk.cpp
|
#elif defined (HAVE_GTK) // see window_gtk.cpp
|
||||||
#elif defined (HAVE_COCOA) // see window_cocoa.mm
|
#elif defined (HAVE_COCOA) // see window_cocoa.mm
|
||||||
#elif defined (HAVE_CARBON) // see window_carbon.cpp
|
|
||||||
#elif defined (HAVE_QT) // see window_QT.cpp
|
#elif defined (HAVE_QT) // see window_QT.cpp
|
||||||
#elif defined (WINRT) && !defined (WINRT_8_0) // see window_winrt.cpp
|
#elif defined (WINRT) && !defined (WINRT_8_0) // see window_winrt.cpp
|
||||||
|
|
||||||
@ -598,14 +591,14 @@ int cv::createButton(const String&, ButtonCallback, void*, int , bool )
|
|||||||
void cv::setWindowTitle(const String&, const String&)
|
void cv::setWindowTitle(const String&, const String&)
|
||||||
{
|
{
|
||||||
CV_Error(Error::StsNotImplemented, "The function is not implemented. "
|
CV_Error(Error::StsNotImplemented, "The function is not implemented. "
|
||||||
"Rebuild the library with Windows, GTK+ 2.x or Carbon support. "
|
"Rebuild the library with Windows, GTK+ 2.x or Cocoa support. "
|
||||||
"If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script");
|
"If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script");
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CV_NO_GUI_ERROR(funcname) \
|
#define CV_NO_GUI_ERROR(funcname) \
|
||||||
cv::error(cv::Error::StsError, \
|
cv::error(cv::Error::StsError, \
|
||||||
"The function is not implemented. " \
|
"The function is not implemented. " \
|
||||||
"Rebuild the library with Windows, GTK+ 2.x or Carbon support. "\
|
"Rebuild the library with Windows, GTK+ 2.x or Cocoa support. "\
|
||||||
"If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script", \
|
"If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script", \
|
||||||
funcname, __FILE__, __LINE__)
|
funcname, __FILE__, __LINE__)
|
||||||
|
|
||||||
|
@ -1039,7 +1039,7 @@ void GuiReceiver::showImage(QString name, void* arr)
|
|||||||
{
|
{
|
||||||
QPointer<CvWindow> w = icvFindWindowByName(name);
|
QPointer<CvWindow> w = icvFindWindowByName(name);
|
||||||
|
|
||||||
if (!w) //as observed in the previous implementation (W32, GTK or Carbon), create a new window is the pointer returned is null
|
if (!w) //as observed in the previous implementation (W32, GTK), create a new window is the pointer returned is null
|
||||||
{
|
{
|
||||||
cvNamedWindow(name.toLatin1().data());
|
cvNamedWindow(name.toLatin1().data());
|
||||||
w = icvFindWindowByName(name);
|
w = icvFindWindowByName(name);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
namespace opencv_test { namespace {
|
namespace opencv_test { namespace {
|
||||||
|
|
||||||
#if defined HAVE_GTK || defined HAVE_QT || defined HAVE_WIN32UI || defined HAVE_CARBON || defined HAVE_COCOA
|
#if defined HAVE_GTK || defined HAVE_QT || defined HAVE_WIN32UI || defined HAVE_COCOA
|
||||||
|
|
||||||
class CV_HighGuiOnlyGuiTest : public cvtest::BaseTest
|
class CV_HighGuiOnlyGuiTest : public cvtest::BaseTest
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user