From 657cf32cb57257556c26f702e9e09b0edb15f350 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 30 Oct 2013 23:09:36 +0100 Subject: make standalone libopentrack-api.so work --- opentrack-api/opentrack-guts.h | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'opentrack-api/opentrack-guts.h') 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 #include #include #include @@ -8,33 +9,39 @@ #include #include #include +#include #include "ftnoir_tracker_base/ftnoir_tracker_base.h" #include "facetracknoir/global-settings.h" +#include typedef ITracker* opentrack_tracker; class opentrack_meta { public: - Metadata* meta; QString path; - DynamicLibrary* lib; + std::shared_ptr 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 meta_list; - QFrame fake_frame; - opentrack_ctx(QDir& dir); + MyFrame fake_frame; + opentrack_ctx(int argc, char** argv, void* window_parent); ~opentrack_ctx(); } *opentrack; -- cgit v1.2.3