diff options
author | Emre Ucan <eucan@de.adit-jv.com> | 2015-07-06 16:06:18 +0200 |
---|---|---|
committer | Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp> | 2015-07-08 08:56:15 +0900 |
commit | 2e8bcaa638e76909891ec4eb581ccbb543efed42 (patch) | |
tree | 6807921647bffc9688ec86312a9039d719794bcf /ivi-layermanagement-examples | |
parent | f15ae595973df478fbc4f3c61c3faad4d37ab798 (diff) | |
download | wayland-ivi-extension-2e8bcaa638e76909891ec4eb581ccbb543efed42.tar.gz |
LayerManagerControl: remove SetPosition API calls
ilm_*SetDestinationRectangle APIs are used instead
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Diffstat (limited to 'ivi-layermanagement-examples')
-rw-r--r-- | ivi-layermanagement-examples/LayerManagerControl/src/commands.cpp | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/ivi-layermanagement-examples/LayerManagerControl/src/commands.cpp b/ivi-layermanagement-examples/LayerManagerControl/src/commands.cpp index c06371e..6564d30 100644 --- a/ivi-layermanagement-examples/LayerManagerControl/src/commands.cpp +++ b/ivi-layermanagement-examples/LayerManagerControl/src/commands.cpp @@ -553,13 +553,22 @@ COMMAND("set layer|surface <id> position <x> <y>") //============================================================================= { unsigned int id = input->getUint("id"); - unsigned int dimension[2]; - dimension[0] = input->getUint("x"); - dimension[1] = input->getUint("y"); + unsigned int destX = input->getUint("x"); + unsigned int destY = input->getUint("y"); if (input->contains("layer")) { - ilmErrorTypes callResult = ilm_layerSetPosition(id, dimension); + ilmLayerProperties lp; + + ilmErrorTypes callResult = ilm_getPropertiesOfLayer(id, &lp); + if (ILM_SUCCESS != callResult) + { + cout << "LayerManagerService returned: " << ILM_ERROR_STRING(callResult) << "\n"; + cout << "Failed to set position of layer with ID " << id << "\n"; + return; + } + + callResult = ilm_layerSetDestinationRectangle(id, destX, destY, lp.destWidth, lp.destHeight); if (ILM_SUCCESS != callResult) { cout << "LayerManagerService returned: " << ILM_ERROR_STRING(callResult) << "\n"; @@ -571,7 +580,9 @@ COMMAND("set layer|surface <id> position <x> <y>") } else if (input->contains("surface")) { - ilmErrorTypes callResult = ilm_surfaceSetPosition(id, dimension); + ilmSurfaceProperties sp; + + ilmErrorTypes callResult = ilm_getPropertiesOfSurface(id, &sp); if (ILM_SUCCESS != callResult) { cout << "LayerManagerService returned: " << ILM_ERROR_STRING(callResult) << "\n"; @@ -579,6 +590,15 @@ COMMAND("set layer|surface <id> position <x> <y>") return; } + callResult = ilm_surfaceSetDestinationRectangle(id, destX, destY, sp.destWidth, sp.destHeight); + if (ILM_SUCCESS != callResult) + { + cout << "LayerManagerService returned: " << ILM_ERROR_STRING(callResult) << "\n"; + cout << "Failed to set position of surface with ID " << id << "\n"; + return; + } + + ilm_commitChanges(); } } |