From dd8c90f87463d370c3076e13b7c6cc0e27c0d2f5 Mon Sep 17 00:00:00 2001 From: "Bocklage, Jens" Date: Tue, 8 Nov 2016 19:46:21 +0100 Subject: -Make the SampleNav app yellow. -Preparation for the new ApplicationFramework binding. The App Framework provides more information. --Adding afm D-Bus-interface introspection --Updating the AppInfo datatype to hold the new data: The application info consists of: string id; string version; int width; int height; string name; string description; string shortname; string author; string iconPath; -When pressing the AppLauncher Button or the Settings Button, the app layer is hidden. --Therefore, shideLayer and showLayer is introduced in the WindowManager API -If an application does not create its surface instantly, the HomeScreen retries to show the surface related to the pid. -New WindowManager function deleteLayoutById -Implement the complete HomeScreen API in the libhomescreen Signed-off-by: Bocklage, Jens --- WindowManager/src/windowmanager.cpp | 74 +++++++++++++++++++++++++++++++++++++ WindowManager/src/windowmanager.hpp | 3 ++ 2 files changed, 77 insertions(+) (limited to 'WindowManager') diff --git a/WindowManager/src/windowmanager.cpp b/WindowManager/src/windowmanager.cpp index ed38c49..48f8d38 100644 --- a/WindowManager/src/windowmanager.cpp +++ b/WindowManager/src/windowmanager.cpp @@ -413,6 +413,37 @@ int WindowManager::addLayout(int layoutId, const QString &layoutName, const QLis return WINDOWMANAGER_NO_ERROR; } +int WindowManager::deleteLayoutById(int layoutId) +{ + qDebug("-=[deleteLayoutById]=-"); + qDebug("layoutId: %d", layoutId); + int result = WINDOWMANAGER_NO_ERROR; + + if (m_currentLayout == layoutId) + { + result = WINDOWMANAGER_ERROR_ID_IN_USE; + } + else + { + QList::iterator i = m_layouts.begin(); + result = WINDOWMANAGER_ERROR_ID_IN_USE; + while (i != m_layouts.constEnd()) + { + if (i->id == layoutId) + { + m_layouts.erase(i); + result = WINDOWMANAGER_NO_ERROR; + break; + } + + ++i; + } + } + + return result; +} + + QList WindowManager::getAllLayouts() { qDebug("-=[getAllLayouts]=-"); @@ -483,6 +514,27 @@ QString WindowManager::getLayoutName(int layoutId) return result; } +void WindowManager::hideLayer(int layer) +{ + qDebug("-=[hideLayer]=-"); + qDebug("layer %d", layer); + +#ifdef __arm__ + if (0 == layer) + { + ilm_layerSetVisibility(WINDOWMANAGER_LAYER_POPUP, ILM_FALSE); + } + if (1 == layer) + { + ilm_layerSetVisibility(WINDOWMANAGER_LAYER_APPLICATIONS, ILM_FALSE); + } + if (2 == layer) + { + ilm_layerSetVisibility(WINDOWMANAGER_LAYER_HOMESCREEN, ILM_FALSE); + } + ilm_commitChanges(); +#endif +} int WindowManager::setLayoutById(int layoutId) { @@ -536,3 +588,25 @@ int WindowManager::setSurfaceToLayoutArea(int surfaceId, int layoutAreaId) return result; } + +void WindowManager::showLayer(int layer) +{ + qDebug("-=[showLayer]=-"); + qDebug("layer %d", layer); + +#ifdef __arm__ + if (0 == layer) + { + ilm_layerSetVisibility(WINDOWMANAGER_LAYER_POPUP, ILM_TRUE); + } + if (1 == layer) + { + ilm_layerSetVisibility(WINDOWMANAGER_LAYER_APPLICATIONS, ILM_TRUE); + } + if (2 == layer) + { + ilm_layerSetVisibility(WINDOWMANAGER_LAYER_HOMESCREEN, ILM_TRUE); + } + ilm_commitChanges(); +#endif +} diff --git a/WindowManager/src/windowmanager.hpp b/WindowManager/src/windowmanager.hpp index 6c11760..5b0a552 100644 --- a/WindowManager/src/windowmanager.hpp +++ b/WindowManager/src/windowmanager.hpp @@ -92,14 +92,17 @@ public: // PROPERTIES public Q_SLOTS: // METHODS int addLayout(int layoutId, const QString &layoutName, const QList &surfaceAreas); + int deleteLayoutById(int layoutId); QList getAllLayouts(); QList getAllSurfacesOfProcess(int pid); QList getAvailableLayouts(int numberOfAppSurfaces); QList getAvailableSurfaces(); QString getLayoutName(int layoutId); + void hideLayer(int layer); int setLayoutById(int layoutId); int setLayoutByName(const QString &layoutName); int setSurfaceToLayoutArea(int surfaceId, int layoutAreaId); + void showLayer(int layer); }; -- cgit 1.2.3-korg