Change parameter for renderSurfaceToArea.
Remove getLayoutRenderAreaForSurfaceId.
Signed-off-by: Bocklage, Jens <Jens_Bocklage@mentor.com>
return newRequestGetAllSurfacesOfProcess(pid);
}
-QRect HomeScreenControlInterface::getLayoutRenderAreaForSurfaceId(int surfaceId)
-{
- qDebug("getLayoutRenderAreaForSurfaceId %d", surfaceId);
- return newRequestGetLayoutRenderAreaForSurfaceId(surfaceId);
-}
-
int HomeScreenControlInterface::getSurfaceStatus(int surfaceId)
{
qDebug("getSurfaceStatus %d", surfaceId);
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);
//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);
return mp_libHomeScreen->getAllSurfacesOfProcess(pid);
}
-sRectangle SampleClass::getLayoutRenderAreaForSurfaceId(int surfaceId)
-{
- return mp_libHomeScreen->getLayoutRenderAreaForSurfaceId(surfaceId);
-}
-
void SampleClass::hardKeyPressed(int key)
{
mp_libHomeScreen->hardKeyPressed(key);
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)
~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:
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList<int>"/>
</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>
// 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:
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;
}
}
-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);