aboutsummaryrefslogtreecommitdiffstats
path: root/WindowManager/src/windowmanager.cpp
diff options
context:
space:
mode:
authorBocklage, Jens <Jens_Bocklage@mentor.com>2016-11-08 19:46:21 +0100
committerBocklage, Jens <Jens_Bocklage@mentor.com>2016-11-08 19:46:21 +0100
commitdd8c90f87463d370c3076e13b7c6cc0e27c0d2f5 (patch)
treef5ec587cfda6ea802ebf0a87ad0fca5712968d3d /WindowManager/src/windowmanager.cpp
parentd364a5eea428db2eadbb77f3e5da7b74dc36127f (diff)
-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 <Jens_Bocklage@mentor.com>
Diffstat (limited to 'WindowManager/src/windowmanager.cpp')
-rw-r--r--WindowManager/src/windowmanager.cpp74
1 files changed, 74 insertions, 0 deletions
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<Layout>::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<Layout> 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
+}