aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBocklage, Jens <Jens_Bocklage@mentor.com>2016-11-09 18:31:50 +0100
committerBocklage, Jens <Jens_Bocklage@mentor.com>2016-11-09 18:31:50 +0100
commitf15a0c90d9514d1edf77b390076ae92d7a99a0ab (patch)
tree5fedc1a7011b707c3d9c0c22f6de429910699b2d
parent557bdea00ff9a398f0646fdcae653791c9cb640c (diff)
Changes to org.agl.homescreen interface
Change parameter for renderSurfaceToArea. Remove getLayoutRenderAreaForSurfaceId. Signed-off-by: Bocklage, Jens <Jens_Bocklage@mentor.com>
-rw-r--r--HomeScreen/src/homescreencontrolinterface.cpp6
-rw-r--r--HomeScreen/src/homescreencontrolinterface.h2
-rw-r--r--SampleHomeScreenInterfaceApp/src/sampleclass.cpp9
-rw-r--r--SampleHomeScreenInterfaceApp/src/sampleclass.hpp3
-rw-r--r--interfaces/homescreen.xml29
-rw-r--r--libhomescreen/include/libhomescreen.hpp3
-rw-r--r--libhomescreen/src/libhomescreen.cpp35
7 files changed, 10 insertions, 77 deletions
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<int> 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<int> 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<int> 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<int> 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<int> 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 @@
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList&lt;int&gt;"/>
</method>
<!--
- getLayoutRenderAreaForSurfaceId:
- @surfaceId: The surface that is requested.
- @renderArea: The layout render area in which the given surface is located.
-
- Before an application uses renderSurfaceToArea to render a surface into an area inside a layout area,
- this method should be used to get the dimension of the layout area, in which the surface
- currently is positioned.
- -->
- <method name="getLayoutRenderAreaForSurfaceId">
- <arg name="surfaceId" type="i" direction="in"/>
- <arg name="renderArea" type="(iiii)" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QRect"/>
- </method>
- <!--
renderSurfaceToArea:
@surfaceId: The surface that is requested.
- @renderArea: The render area inside the current layout area.
+ @layoutArea: The layout area where the surface shall be rendered.
This is a special case. In the normal use case, one layout area is always filled completely
- with one surface. By using this function, an app can request to position a surface in the
- layout area.
- Example:
- If the layout area is 500x500 pixel in size, the normal use case qould be, that a surface
- is positioned at x=0, y=0 with a width and a size of 500. With this function, an application can position surfaces
- free in this area.
- E.g.: Position surface 101 at x=10, y=30, width=300, height=100 and
- surface 104 at x=100, y=130, width=30, height=10
+ with the first surface, that the process creates (more precise: the surface with the lowest id).
+ By using this function, an app can request to position a different surface in the layout area.
-->
<method name="renderSurfaceToArea">
<arg name="surfaceId" type="i" direction="in"/>
- <arg name="renderArea" type="(iiii)" direction="in"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QRect"/>
+ <arg name="layoutArea" type="i" direction="in"/>
</method>
</interface>
</node>
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<int> 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<int> 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);