summaryrefslogtreecommitdiffhomepage
path: root/opentrack/plugin-api.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-06-16 12:34:31 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-06-16 12:35:51 +0200
commit0760fe011114fa440275b487eaf766b015f40e5b (patch)
treea0141fb291b7dc1e38d16dd0eb2c767ec93b310a /opentrack/plugin-api.hpp
parent60460f56cabe0155996adf8ba5e9f6730ef0b203 (diff)
all: split "api" into "api" and "logic"
Here, the "logic" module has all the stuff for building one's own graphical user interface. The "api" module has stuff used by other trackers. While at it, each of "api", "logic", and "compat" need their own export headers. This is because of preprocessor symbol clashes. This is all because a change in the "gui"-only dependency required a relink of all the trackers, protocols, and flters. It takes too long when building in the release configuration. With the split, only the "gui" module gets rebuilt. Since it has close to no static dependencies, it's fast enough.
Diffstat (limited to 'opentrack/plugin-api.hpp')
-rw-r--r--opentrack/plugin-api.hpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/opentrack/plugin-api.hpp b/opentrack/plugin-api.hpp
index e715780e..6cd76a16 100644
--- a/opentrack/plugin-api.hpp
+++ b/opentrack/plugin-api.hpp
@@ -13,11 +13,7 @@
#include <QFrame>
#include <QIcon>
-#ifdef BUILD_api
-# include "opentrack-compat/export.hpp"
-#else
-# include "opentrack-compat/import.hpp"
-#endif
+#include "export.hpp"
#ifndef OPENTRACK_PLUGIN_EXPORT
# ifdef _WIN32
@@ -39,7 +35,7 @@ enum Axis {
namespace plugin_api {
namespace detail {
-class OPENTRACK_EXPORT BaseDialog : public QWidget
+class OPENTRACK_API_EXPORT BaseDialog : public QWidget
{
Q_OBJECT
public:
@@ -67,7 +63,7 @@ signals:
// implement this in all plugins
// also you must link against "opentrack-api" in CMakeLists.txt to avoid vtable link errors
-struct OPENTRACK_EXPORT Metadata
+struct OPENTRACK_API_EXPORT Metadata
{
Metadata(const Metadata&) = delete;
Metadata(Metadata&&) = delete;
@@ -83,7 +79,7 @@ struct OPENTRACK_EXPORT Metadata
};
// implement this in filters
-struct OPENTRACK_EXPORT IFilter
+struct OPENTRACK_API_EXPORT IFilter
{
IFilter(const IFilter&) = delete;
IFilter(IFilter&&) = delete;
@@ -99,7 +95,7 @@ struct OPENTRACK_EXPORT IFilter
virtual void center() {}
};
-struct OPENTRACK_EXPORT IFilterDialog : public plugin_api::detail::BaseDialog
+struct OPENTRACK_API_EXPORT IFilterDialog : public plugin_api::detail::BaseDialog
{
// optional destructor
virtual ~IFilterDialog();
@@ -114,7 +110,7 @@ struct OPENTRACK_EXPORT IFilterDialog : public plugin_api::detail::BaseDialog
OPENTRACK_DECLARE_PLUGIN_INTERNAL(filter_class, IFilter, metadata_class, dialog_class, IFilterDialog)
// implement this in protocols
-struct OPENTRACK_EXPORT IProtocol
+struct OPENTRACK_API_EXPORT IProtocol
{
IProtocol(const IProtocol&) = delete;
IProtocol(IProtocol&&) = delete;
@@ -132,7 +128,7 @@ struct OPENTRACK_EXPORT IProtocol
virtual QString game_name() = 0;
};
-struct OPENTRACK_EXPORT IProtocolDialog : public plugin_api::detail::BaseDialog
+struct OPENTRACK_API_EXPORT IProtocolDialog : public plugin_api::detail::BaseDialog
{
// optional destructor
virtual ~IProtocolDialog();
@@ -147,7 +143,7 @@ struct OPENTRACK_EXPORT IProtocolDialog : public plugin_api::detail::BaseDialog
OPENTRACK_DECLARE_PLUGIN_INTERNAL(protocol_class, IProtocol, metadata_class, dialog_class, IProtocolDialog)
// implement this in trackers
-struct OPENTRACK_EXPORT ITracker
+struct OPENTRACK_API_EXPORT ITracker
{
ITracker(const ITracker&) = delete;
ITracker(ITracker&&) = delete;
@@ -162,7 +158,7 @@ struct OPENTRACK_EXPORT ITracker
virtual void data(double *data) = 0;
};
-struct OPENTRACK_EXPORT ITrackerDialog : public plugin_api::detail::BaseDialog
+struct OPENTRACK_API_EXPORT ITrackerDialog : public plugin_api::detail::BaseDialog
{
// optional destructor
virtual ~ITrackerDialog();