summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_pt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-16 11:29:59 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-16 11:29:59 +0200
commitb0b7c2b0e1762a7c0058e7f507a3b7cc9a03daf6 (patch)
tree246864539eba1669fc19a2007038dfb692a04788 /ftnoir_tracker_pt
parentdfbe00cb1d9ce4cb52448cf4c1d577fe7b1eaad7 (diff)
all: use macros for symbol exposure
Diffstat (limited to 'ftnoir_tracker_pt')
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt.cpp7
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt.h6
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp4
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt_dll.cpp20
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt_dll.h24
5 files changed, 9 insertions, 52 deletions
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
index 5b9ec8b6..85ce0ad2 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
@@ -214,11 +214,12 @@ void Tracker_PT::data(THeadPoseData *data)
//-----------------------------------------------------------------------------
#ifdef OPENTRACK_API
-extern "C" OPENTRACK_EXPORT ITracker* GetConstructor()
+#include "ftnoir_tracker_pt_dialog.h"
+OPENTRACK_DECLARE_TRACKER(Tracker_PT, TrackerDialog_PT, TrackerDll)
#else
#pragma comment(linker, "/export:GetTracker=_GetTracker@0")
OPENTRACK_EXPORT ITrackerPtr __stdcall GetTracker()
-#endif
{
- return new Tracker_PT;
+ return new Tracker_PT;
}
+#endif
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.h b/ftnoir_tracker_pt/ftnoir_tracker_pt.h
index d0764933..21da9a2c 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt.h
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.h
@@ -83,6 +83,10 @@ private:
static constexpr double deg2rad = 3.14159265/180.0;
};
-#undef VideoWidget
+class TrackerDll : public Metadata
+{
+ QString name() { return QString("PointTracker 1.1"); }
+ QIcon icon() { return QIcon(":/Resources/Logo_IR.png"); }
+};
#endif // FTNOIR_TRACKER_PT_H
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp
index 5b17df5b..70511a3f 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp
@@ -190,7 +190,3 @@ void TrackerDialog_PT::unregister_tracker()
//ui.center_button->setEnabled(false);
}
-extern "C" OPENTRACK_EXPORT ITrackerDialog* GetDialog( )
-{
- return new TrackerDialog_PT;
-}
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.cpp
deleted file mode 100644
index 1aaa1bf9..00000000
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright (c) 2012 Patrick Ruoff
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- */
-
-#include "ftnoir_tracker_pt_dll.h"
-#include <QIcon>
-
-#ifdef OPENTRACK_API
-# include "opentrack/plugin-api.hpp"
-extern "C" OPENTRACK_EXPORT Metadata* GetMetadata()
-#else
-# pragma comment(linker, "/export:GetTrackerDll=_GetTrackerDll@0")
-OPENTRACK_EXPORT ITrackerDllPtr __stdcall GetTrackerDll()
-#endif
-{
- return new TrackerDll;
-}
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.h b/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.h
deleted file mode 100644
index 9579d46c..00000000
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dll.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright (c) 2012 Patrick Ruoff
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- */
-
-#if defined(OPENTRACK_API)
-# include "opentrack/plugin-api.hpp"
-#else
-# include "../ftnoir_tracker_base/ftnoir_tracker_base.h"
-#endif
-
-//-----------------------------------------------------------------------------
-class TrackerDll :
-#if defined(OPENTRACK_API)
- public Metadata
-#else
- public ITrackerDll
-#endif
-{
- QString name() { return QString("PointTracker 1.1"); }
- QIcon icon() { return QIcon(":/Resources/Logo_IR.png"); }
-};