|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef UI_PLUGIN_API_HPP
|
|
|
#define UI_PLUGIN_API_HPP
|
|
|
|
|
|
#include <opencv2/core/cvdef.h>
|
|
|
#include <opencv2/core/llapi/llapi.h>
|
|
|
|
|
|
#include "backend.hpp"
|
|
|
|
|
|
#if !defined(BUILD_PLUGIN)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define API_VERSION 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define ABI_VERSION 0
|
|
|
|
|
|
#else
|
|
|
|
|
|
#if !defined(ABI_VERSION) || !defined(API_VERSION)
|
|
|
#error "Plugin must define ABI_VERSION and API_VERSION before including plugin_api.hpp"
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|
|
typedef cv::highgui_backend::UIBackend* CvPluginUIBackend;
|
|
|
|
|
|
struct OpenCV_UI_Plugin_API_v0_0_api_entries
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CvResult (CV_API_CALL *getInstance)(CV_OUT CvPluginUIBackend* handle) CV_NOEXCEPT;
|
|
|
};
|
|
|
|
|
|
typedef struct OpenCV_UI_Plugin_API_v0
|
|
|
{
|
|
|
OpenCV_API_Header api_header;
|
|
|
struct OpenCV_UI_Plugin_API_v0_0_api_entries v0;
|
|
|
} OpenCV_UI_Plugin_API_v0;
|
|
|
|
|
|
#if ABI_VERSION == 0 && API_VERSION == 0
|
|
|
typedef OpenCV_UI_Plugin_API_v0 OpenCV_UI_Plugin_API;
|
|
|
#else
|
|
|
#error "Not supported configuration: check ABI_VERSION/API_VERSION"
|
|
|
#endif
|
|
|
|
|
|
#ifdef BUILD_PLUGIN
|
|
|
extern "C" {
|
|
|
|
|
|
CV_PLUGIN_EXPORTS
|
|
|
const OpenCV_UI_Plugin_API* CV_API_CALL opencv_ui_plugin_init_v0
|
|
|
(int requested_abi_version, int requested_api_version, void* reserved ) CV_NOEXCEPT;
|
|
|
|
|
|
}
|
|
|
#else
|
|
|
typedef const OpenCV_UI_Plugin_API* (CV_API_CALL *FN_opencv_ui_plugin_init_t)
|
|
|
(int requested_abi_version, int requested_api_version, void* reserved );
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|