aboutsummaryrefslogtreecommitdiffstats
path: root/samplehomescreeninterfaceapp
diff options
context:
space:
mode:
Diffstat (limited to 'samplehomescreeninterfaceapp')
-rw-r--r--samplehomescreeninterfaceapp/samplehomescreeninterfaceapp.pro13
-rw-r--r--samplehomescreeninterfaceapp/src/main.cpp31
-rw-r--r--samplehomescreeninterfaceapp/src/sampleclass.cpp42
-rw-r--r--samplehomescreeninterfaceapp/src/sampleclass.hpp24
4 files changed, 110 insertions, 0 deletions
diff --git a/samplehomescreeninterfaceapp/samplehomescreeninterfaceapp.pro b/samplehomescreeninterfaceapp/samplehomescreeninterfaceapp.pro
new file mode 100644
index 0000000..92268a0
--- /dev/null
+++ b/samplehomescreeninterfaceapp/samplehomescreeninterfaceapp.pro
@@ -0,0 +1,13 @@
+TEMPLATE = app
+TARGET = SampleHomeScreenInterfaceApp
+CONFIG -= qt
+
+SOURCES += src/main.cpp \
+ src/sampleclass.cpp
+
+HEADERS += \
+ src/sampleclass.hpp
+
+INCLUDEPATH += $$PWD/../libhomescreen/include/
+
+LIBS += -L$$OUT_PWD/../libhomescreen -lhomescreen
diff --git a/samplehomescreeninterfaceapp/src/main.cpp b/samplehomescreeninterfaceapp/src/main.cpp
new file mode 100644
index 0000000..5b48855
--- /dev/null
+++ b/samplehomescreeninterfaceapp/src/main.cpp
@@ -0,0 +1,31 @@
+#include <iostream>
+#include "sampleclass.hpp"
+
+using namespace std;
+
+int main()
+{
+ cout << "SampleHomeScreenInterfaceApp" << endl;
+ cout << "v0.6.0" << endl;
+
+ SampleClass *sampleClass = new SampleClass();
+
+ //sRectangle test = sampleClass->getLayoutRenderAreaForSurfaceId(1);
+
+ sampleClass->hardKeyPressed(100);
+ sampleClass->hardKeyPressed(101);
+ sampleClass->hardKeyPressed(102);
+
+ /*sRectangle renderArea;
+ renderArea.x = 0;
+ renderArea.y = 1;
+ renderArea.width = 12;
+ renderArea.height = 13;
+ sampleClass->renderSurfaceToArea(1, renderArea);*/
+
+ //sampleClass->requestSurfaceIdToFullScreen(1);
+
+ delete sampleClass;
+
+ return 0;
+}
diff --git a/samplehomescreeninterfaceapp/src/sampleclass.cpp b/samplehomescreeninterfaceapp/src/sampleclass.cpp
new file mode 100644
index 0000000..a5e1fac
--- /dev/null
+++ b/samplehomescreeninterfaceapp/src/sampleclass.cpp
@@ -0,0 +1,42 @@
+#include "sampleclass.hpp"
+
+SampleClass::SampleClass() :
+ mp_libHomeScreen(0)
+{
+ mp_libHomeScreen = new LibHomeScreen();
+}
+
+SampleClass::~SampleClass()
+{
+ delete mp_libHomeScreen;
+}
+
+std::vector<int> SampleClass::getAllSurfacesOfProcess(int pid)
+{
+ return mp_libHomeScreen->getAllSurfacesOfProcess(pid);
+}
+
+void SampleClass::hardKeyPressed(int key)
+{
+ mp_libHomeScreen->hardKeyPressed(key);
+}
+
+int SampleClass::getSurfaceStatus(int surfaceId)
+{
+ return mp_libHomeScreen->getSurfaceStatus(surfaceId);
+}
+
+void SampleClass::renderSurfaceToArea(int surfaceId, int layoutArea)
+{
+ mp_libHomeScreen->renderSurfaceToArea(surfaceId, layoutArea);
+}
+
+bool SampleClass::renderAppToAreaAllowed(int appCategory, int layoutArea)
+{
+ return mp_libHomeScreen->renderAppToAreaAllowed(appCategory, layoutArea);
+}
+
+void SampleClass::requestSurfaceIdToFullScreen(int surfaceId)
+{
+ mp_libHomeScreen->requestSurfaceIdToFullScreen(surfaceId);
+}
diff --git a/samplehomescreeninterfaceapp/src/sampleclass.hpp b/samplehomescreeninterfaceapp/src/sampleclass.hpp
new file mode 100644
index 0000000..fd00afe
--- /dev/null
+++ b/samplehomescreeninterfaceapp/src/sampleclass.hpp
@@ -0,0 +1,24 @@
+#ifndef SAMPLECLASS_HPP
+#define SAMPLECLASS_HPP
+
+#include "libhomescreen.hpp"
+#include <vector>
+
+class SampleClass
+{
+public:
+ SampleClass();
+ ~SampleClass();
+
+ std::vector<int> getAllSurfacesOfProcess(int pid);
+ int getSurfaceStatus(int surfaceId);
+ void hardKeyPressed(int key);
+ void renderSurfaceToArea(int surfaceId, int layoutArea);
+ bool renderAppToAreaAllowed(int appCategory, int layoutArea);
+ void requestSurfaceIdToFullScreen(int surfaceId);
+
+private:
+ LibHomeScreen *mp_libHomeScreen;
+};
+
+#endif // SAMPLECLASS_HPP