summaryrefslogtreecommitdiff
path: root/src/applicationmanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/applicationmanager.h')
-rw-r--r--src/applicationmanager.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/applicationmanager.h b/src/applicationmanager.h
new file mode 100644
index 0000000..b4568f0
--- /dev/null
+++ b/src/applicationmanager.h
@@ -0,0 +1,43 @@
+#ifndef APPLICATIONMANAGER_H
+#define APPLICATIONMANAGER_H
+
+#include <QObject>
+
+class ApplicationManager : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QObject *currentSurface READ currentSurface WRITE setCurrentSurface NOTIFY currentSurfaceChanged)
+ Q_PROPERTY(bool isHome READ isHome WRITE setIsHome NOTIFY isHomeChanged)
+ Q_PROPERTY(QString virtualkeyboard READ virtualkeyboard CONSTANT)
+
+ QObject *m_currentSurface {nullptr};
+ bool m_isHome;
+
+public:
+ explicit ApplicationManager(QObject *parent = nullptr);
+
+ bool isHome() const;
+
+public slots:
+ QObject *currentSurface() const;
+ void setCurrentSurface(QObject *newCurrentSurface);
+
+ int count();
+ QString applicationName(int id);
+ int applicationPid(int id);
+ int applicationFocus(int id);
+ int currentApplicationPid();
+ void hideApplicationPid(qint64 pid);
+ void raiseApplicationPid(qint64 pid);
+ void backHome();
+ void setIsHome(bool isHome);
+
+ QString virtualkeyboard();
+
+signals:
+ void currentSurfaceChanged();
+ void gotoHome();
+ void isHomeChanged(bool isHome);
+};
+
+#endif // APPLICATIONMANAGER_H