From: Bocklage, Jens Date: Wed, 9 Nov 2016 17:31:50 +0000 (+0100) Subject: Changes to org.agl.homescreen interface X-Git-Tag: 20161111_preCESIntegrationWorkshop~4 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=staging%2FHomeScreen.git;a=commitdiff_plain;h=c23b2ba48e72548acaeb7da4601aa6590ffc8704 Changes to org.agl.homescreen interface Change parameter for renderSurfaceToArea. Remove getLayoutRenderAreaForSurfaceId. Signed-off-by: Bocklage, Jens --- diff --git a/HomeScreen/src/homescreencontrolinterface.cpp b/HomeScreen/src/homescreencontrolinterface.cpp index fae19a2..71e4a2c 100644 --- a/HomeScreen/src/homescreencontrolinterface.cpp +++ b/HomeScreen/src/homescreencontrolinterface.cpp @@ -30,12 +30,6 @@ QList HomeScreenControlInterface::getAllSurfacesOfProcess(int pid) return newRequestGetAllSurfacesOfProcess(pid); } -QRect HomeScreenControlInterface::getLayoutRenderAreaForSurfaceId(int surfaceId) -{ - qDebug("getLayoutRenderAreaForSurfaceId %d", surfaceId); - return newRequestGetLayoutRenderAreaForSurfaceId(surfaceId); -} - int HomeScreenControlInterface::getSurfaceStatus(int surfaceId) { qDebug("getSurfaceStatus %d", surfaceId); diff --git a/HomeScreen/src/homescreencontrolinterface.h b/HomeScreen/src/homescreencontrolinterface.h index fb772db..27cf4e8 100644 --- a/HomeScreen/src/homescreencontrolinterface.h +++ b/HomeScreen/src/homescreencontrolinterface.h @@ -18,7 +18,6 @@ signals: void newRequestsToBeVisibleApp(int pid); QList newRequestGetAllSurfacesOfProcess(int pid); - QRect newRequestGetLayoutRenderAreaForSurfaceId(int surfaceId); int newRequestGetSurfaceStatus(int surfaceId); void newRequestRenderSurfaceToArea(int surfaceId, const QRect &renderArea); void newRequestSurfaceIdToFullScreen(int surfaceId); @@ -26,7 +25,6 @@ signals: //from homescreen_adapter.h public Q_SLOTS: // METHODS QList getAllSurfacesOfProcess(int pid); - QRect getLayoutRenderAreaForSurfaceId(int surfaceId); int getSurfaceStatus(int surfaceId); void hardKeyPressed(int key); void renderSurfaceToArea(int surfaceId, const QRect &renderArea); diff --git a/SampleHomeScreenInterfaceApp/src/sampleclass.cpp b/SampleHomeScreenInterfaceApp/src/sampleclass.cpp index f4c1c83..bc39af9 100644 --- a/SampleHomeScreenInterfaceApp/src/sampleclass.cpp +++ b/SampleHomeScreenInterfaceApp/src/sampleclass.cpp @@ -16,11 +16,6 @@ std::list SampleClass::getAllSurfacesOfProcess(int pid) return mp_libHomeScreen->getAllSurfacesOfProcess(pid); } -sRectangle SampleClass::getLayoutRenderAreaForSurfaceId(int surfaceId) -{ - return mp_libHomeScreen->getLayoutRenderAreaForSurfaceId(surfaceId); -} - void SampleClass::hardKeyPressed(int key) { mp_libHomeScreen->hardKeyPressed(key); @@ -31,9 +26,9 @@ int SampleClass::getSurfaceStatus(int surfaceId) return mp_libHomeScreen->getSurfaceStatus(surfaceId); } -void SampleClass::renderSurfaceToArea(int surfaceId, const sRectangle &renderArea) +void SampleClass::renderSurfaceToArea(int surfaceId, int layoutArea) { - mp_libHomeScreen->renderSurfaceToArea(surfaceId, renderArea); + mp_libHomeScreen->renderSurfaceToArea(surfaceId, layoutArea); } void SampleClass::requestSurfaceIdToFullScreen(int surfaceId) diff --git a/SampleHomeScreenInterfaceApp/src/sampleclass.hpp b/SampleHomeScreenInterfaceApp/src/sampleclass.hpp index f5a5d13..9293843 100644 --- a/SampleHomeScreenInterfaceApp/src/sampleclass.hpp +++ b/SampleHomeScreenInterfaceApp/src/sampleclass.hpp @@ -11,10 +11,9 @@ public: ~SampleClass(); std::list getAllSurfacesOfProcess(int pid); - sRectangle getLayoutRenderAreaForSurfaceId(int surfaceId); int getSurfaceStatus(int surfaceId); void hardKeyPressed(int key); - void renderSurfaceToArea(int surfaceId, const sRectangle &renderArea); + void renderSurfaceToArea(int surfaceId, int layoutArea); void requestSurfaceIdToFullScreen(int surfaceId); private: diff --git a/interfaces/homescreen.xml b/interfaces/homescreen.xml index 1cd390a..999b0e9 100644 --- a/interfaces/homescreen.xml +++ b/interfaces/homescreen.xml @@ -63,38 +63,17 @@ - - - - - - - - + diff --git a/libhomescreen/include/libhomescreen.hpp b/libhomescreen/include/libhomescreen.hpp index c028617..f88b35f 100644 --- a/libhomescreen/include/libhomescreen.hpp +++ b/libhomescreen/include/libhomescreen.hpp @@ -23,10 +23,9 @@ public: // these are representing the D-Bus methods: std::list getAllSurfacesOfProcess(int pid); - sRectangle getLayoutRenderAreaForSurfaceId(int surfaceId); int getSurfaceStatus(int surfaceId); void hardKeyPressed(int key); - void renderSurfaceToArea(int surfaceId, const sRectangle &renderArea); + void renderSurfaceToArea(int surfaceId, int layoutArea); void requestSurfaceIdToFullScreen(int surfaceId); private: diff --git a/libhomescreen/src/libhomescreen.cpp b/libhomescreen/src/libhomescreen.cpp index 03e95d6..374cfe8 100644 --- a/libhomescreen/src/libhomescreen.cpp +++ b/libhomescreen/src/libhomescreen.cpp @@ -67,30 +67,6 @@ std::list LibHomeScreen::getAllSurfacesOfProcess(int pid) return result; } -sRectangle LibHomeScreen::getLayoutRenderAreaForSurfaceId(int surfaceId) -{ - sRectangle result; - GError *err = NULL; - - GVariant *out_renderArea; - - lib_home_screen_homescreen_call_get_layout_render_area_for_surface_id_sync( - mp_libHomeScreenHomescreen_Proxy, - surfaceId, - &out_renderArea, - NULL, - &err); - - if (NULL != err) - { - fprintf(stderr, "Unable to call getLayoutRenderAreaForSurfaceId: %s\n", err->message); - } - - g_variant_get(out_renderArea, "(iiii)", result.x, result.y, result.width, result.height); - - return result; -} - int LibHomeScreen::getSurfaceStatus(int surfaceId) { int result; @@ -129,21 +105,14 @@ void LibHomeScreen::hardKeyPressed(int key) } } -void LibHomeScreen::renderSurfaceToArea(int surfaceId, const sRectangle &renderArea) +void LibHomeScreen::renderSurfaceToArea(int surfaceId, int layoutArea) { GError *err = NULL; - GVariant *variant; - GVariantBuilder *builder; - builder = g_variant_builder_new(G_VARIANT_TYPE("(iiii)")); - g_variant_builder_add(builder, "(iiii)", renderArea.x, renderArea.y, renderArea.width, renderArea.height); - variant = g_variant_new("(iiii)", builder); - g_variant_builder_unref(builder); - lib_home_screen_homescreen_call_render_surface_to_area_sync( mp_libHomeScreenHomescreen_Proxy, surfaceId, - variant, + layoutArea, NULL, &err);