summaryrefslogtreecommitdiffhomepage
path: root/opentrack-api/opentrack-guts.h
blob: c8e3309a001f2af564367f52627138d952fb011b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#pragma once

#include <QFrame>
#include <QDir>
#include <QList>
#include <QStringList>
#include <QDebug>
#include <QIcon>
#include <QShowEvent>
#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:
    QString path;
    std::shared_ptr<DynamicLibrary> lib;

    opentrack_meta(QString& path, DynamicLibrary* lib) :
        path(path), lib(lib)
    {}
};

class MyFrame : public QFrame {
    Q_OBJECT
public:
    MyFrame(void* parent)
    {
        if (parent == (void*) -1)
        {
            show();
            setVisible(false);
            hide();
        }
        else
        {
            create((WId) parent);
        }
    }
    explicit MyFrame() {}
};

typedef class opentrack_ctx {
public:
    QApplication app;
    char** list;
    QList<opentrack_meta> meta_list;
    MyFrame fake_frame;
    opentrack_ctx(int argc, char** argv, void* window_parent);
    ~opentrack_ctx();
} *opentrack;