diff options
author | Bocklage, Jens <Jens_Bocklage@mentor.com> | 2016-11-08 19:46:21 +0100 |
---|---|---|
committer | Bocklage, Jens <Jens_Bocklage@mentor.com> | 2016-11-08 19:46:21 +0100 |
commit | dd8c90f87463d370c3076e13b7c6cc0e27c0d2f5 (patch) | |
tree | f5ec587cfda6ea802ebf0a87ad0fca5712968d3d /libhomescreen | |
parent | d364a5eea428db2eadbb77f3e5da7b74dc36127f (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 'libhomescreen')
-rw-r--r-- | libhomescreen/include/libhomescreen.hpp | 4 | ||||
-rw-r--r-- | libhomescreen/src/libhomescreen.cpp | 60 |
2 files changed, 64 insertions, 0 deletions
diff --git a/libhomescreen/include/libhomescreen.hpp b/libhomescreen/include/libhomescreen.hpp index db6ca2d..c028617 100644 --- a/libhomescreen/include/libhomescreen.hpp +++ b/libhomescreen/include/libhomescreen.hpp @@ -1,6 +1,8 @@ #ifndef LIBHOMESCREEN_HPP #define LIBHOMESCREEN_HPP +#include <list> + // forward declarations struct _LibHomeScreenHomescreen; typedef struct _LibHomeScreenHomescreen LibHomeScreenHomescreen; @@ -20,7 +22,9 @@ public: ~LibHomeScreen(); // these are representing the D-Bus methods: + std::list<int> getAllSurfacesOfProcess(int pid); sRectangle getLayoutRenderAreaForSurfaceId(int surfaceId); + int getSurfaceStatus(int surfaceId); void hardKeyPressed(int key); void renderSurfaceToArea(int surfaceId, const sRectangle &renderArea); void requestSurfaceIdToFullScreen(int surfaceId); diff --git a/libhomescreen/src/libhomescreen.cpp b/libhomescreen/src/libhomescreen.cpp index 39af1c3..03e95d6 100644 --- a/libhomescreen/src/libhomescreen.cpp +++ b/libhomescreen/src/libhomescreen.cpp @@ -29,6 +29,44 @@ LibHomeScreen::~LibHomeScreen() g_object_unref(mp_libHomeScreenHomescreen_Proxy); } +std::list<int> LibHomeScreen::getAllSurfacesOfProcess(int pid) +{ + std::list<int> result; + + GError *err = NULL; + + GVariant *out_surfaceIds; + + lib_home_screen_homescreen_call_get_all_surfaces_of_process_sync( + mp_libHomeScreenHomescreen_Proxy, + pid, + &out_surfaceIds, + NULL, + &err); + + if (NULL != err) + { + fprintf(stderr, "Unable to call getAllSurfacesOfProcess: %s\n", err->message); + } + + + GVariant *element; + GVariantIter iter; + int i; + + if (g_variant_iter_init(&iter, out_surfaceIds)) + { + while ((element = g_variant_iter_next_value(&iter)) != NULL) + { + g_variant_get(element, "i", &i); + result.push_back(i); + g_variant_unref(element); + } + } + + return result; +} + sRectangle LibHomeScreen::getLayoutRenderAreaForSurfaceId(int surfaceId) { sRectangle result; @@ -53,6 +91,28 @@ sRectangle LibHomeScreen::getLayoutRenderAreaForSurfaceId(int surfaceId) return result; } +int LibHomeScreen::getSurfaceStatus(int surfaceId) +{ + int result; + GError *err = NULL; + + GVariant *out_renderArea; + + lib_home_screen_homescreen_call_get_surface_status_sync( + mp_libHomeScreenHomescreen_Proxy, + surfaceId, + &result, + NULL, + &err); + + if (NULL != err) + { + fprintf(stderr, "Unable to call getSurfaceStatus: %s\n", err->message); + } + + return result; +} + void LibHomeScreen::hardKeyPressed(int key) { GError *err = NULL; |