diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-30 23:09:36 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-30 23:09:36 +0100 |
commit | 657cf32cb57257556c26f702e9e09b0edb15f350 (patch) | |
tree | 7ce5f6642a3be972c37da9822c123dd61093c9b0 /opentrack-api/opentrack-guts.h | |
parent | fde903fda58eb715147150c8dbc2e16970ab1761 (diff) |
make standalone libopentrack-api.so work
Diffstat (limited to 'opentrack-api/opentrack-guts.h')
-rw-r--r-- | opentrack-api/opentrack-guts.h | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/opentrack-api/opentrack-guts.h b/opentrack-api/opentrack-guts.h index b9c3878b..fd94ea34 100644 --- a/opentrack-api/opentrack-guts.h +++ b/opentrack-api/opentrack-guts.h @@ -1,5 +1,6 @@ #pragma once +#include <QFrame> #include <QDir> #include <QList> #include <QStringList> @@ -8,33 +9,39 @@ #include <iostream> #include <cstring> #include <QString> +#include <QApplication> #include "ftnoir_tracker_base/ftnoir_tracker_base.h" #include "facetracknoir/global-settings.h" +#include <memory> typedef ITracker* opentrack_tracker; class opentrack_meta { public: - Metadata* meta; QString path; - DynamicLibrary* lib; + std::shared_ptr<DynamicLibrary> lib; - opentrack_meta(Metadata* meta, QString& path, DynamicLibrary* lib) : - meta(meta), path(path), lib(lib) + opentrack_meta(QString& path, DynamicLibrary* lib) : + path(path), lib(lib) {} - ~opentrack_meta() +}; + +class MyFrame : public QFrame { + Q_OBJECT +public: + MyFrame(void* parent) { - delete meta; - delete lib; + create((WId) parent); } + explicit MyFrame() {} }; typedef class opentrack_ctx { public: - QDir dir; + QApplication app; char** list; QList<opentrack_meta> meta_list; - QFrame fake_frame; - opentrack_ctx(QDir& dir); + MyFrame fake_frame; + opentrack_ctx(int argc, char** argv, void* window_parent); ~opentrack_ctx(); } *opentrack; |