aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYong-iL Joh <yong-il.joh@windriver.com>2016-04-15 23:20:50 +0900
committerYong-iL Joh <yong-il.joh@windriver.com>2016-04-15 23:23:44 +0900
commitace213f79d711053ad4a7f31b6f171279f244d76 (patch)
tree253e0c8fc12d570b6faf4c4fb976a9118bbd8257
parentbfd95c5021885ed61b58a33087a4ee8e3d2f32ad (diff)
parent997a4c4d8cf3f40eed0dd7fd186f18e6c88df85d (diff)
downloadmeta-ivi-ace213f79d711053ad4a7f31b6f171279f244d76.tar.gz
meta-ivi-ace213f79d711053ad4a7f31b6f171279f244d76.tar.bz2
meta-ivi-ace213f79d711053ad4a7f31b6f171279f244d76.zip
Merge branch 'origin/10.0'
Conflicts: README.md meta-ivi-bsp/recipes-graphics/mesa/mesa/README.gallium meta-ivi-bsp/recipes-graphics/mesa/mesa/revert-363b53f00069af718f64cf047f19ad5681a8bf6d.patch meta-ivi-bsp/recipes-graphics/mesa/mesa/revert-c46c551c56f78c6bf9e63524c89478695fc4f525.patch meta-ivi-bsp/recipes-graphics/mesa/mesa_10.4.%.bbappend meta-ivi-demo/conf/bblayers.conf.sample meta-ivi/conf/distro/poky-ivi-systemd.conf meta-ivi/recipes-graphics/wayland/weston_1.6.0.bbappend meta-ivi/recipes-graphics/wayland/weston_1.6.0.bbappend meta-ivi/recipes-yocto-ivi/images/leviathan-image.bb
-rw-r--r--COPYING.MIT (renamed from meta-ivi-bsp/COPYING.MIT)0
-rw-r--r--LICENSE39
-rw-r--r--MAINTAINERS10
-rw-r--r--README.md73
-rw-r--r--meta-ivi-bsp/classes/sdcard_image.bbclass3
-rw-r--r--meta-ivi-bsp/recipes-bsp/u-boot/files/no_delay.patch13
-rw-r--r--meta-ivi-bsp/recipes-bsp/u-boot/u-boot_2015.01.bbappend5
-rw-r--r--meta-ivi-bsp/recipes-core-ivi/dbus/dbus_%.bbappend7
-rw-r--r--meta-ivi-bsp/recipes-graphics/mesa/mesa/README.gallium66
-rw-r--r--meta-ivi-bsp/recipes-graphics/mesa/mesa/revert-363b53f00069af718f64cf047f19ad5681a8bf6d.patch31
-rw-r--r--meta-ivi-bsp/recipes-graphics/mesa/mesa/revert-c46c551c56f78c6bf9e63524c89478695fc4f525.patch147
-rw-r--r--meta-ivi-bsp/recipes-graphics/mesa/mesa_10.4.%.bbappend26
-rw-r--r--meta-ivi-bsp/recipes-graphics/wayland/weston_1.6.0.bbappend14
-rw-r--r--meta-ivi-bsp/recipes-graphics/weston/weston_1.9.0.bbappend11
-rw-r--r--meta-ivi-bsp/recipes-kernel/linux/linux-yocto/vexpress_a9.cfg10
-rw-r--r--meta-ivi-demo/COPYING.MIT17
-rw-r--r--meta-ivi-demo/README.md57
-rw-r--r--meta-ivi-demo/conf/bblayers.conf.sample24
-rw-r--r--meta-ivi-demo/conf/conf-notes.txt4
-rw-r--r--meta-ivi-demo/conf/layer.conf17
-rw-r--r--meta-ivi-demo/conf/local.conf.sample214
-rw-r--r--meta-ivi-demo/recipes-demo-platform/images/ivi-image-demo-sdk.bb24
-rw-r--r--meta-ivi-demo/recipes-demo-platform/images/ivi-image-demo.bb18
-rw-r--r--meta-ivi-test/conf/layer.conf10
-rw-r--r--meta-ivi-test/recipes-connectivity/bluez5/bluez5_%.bbappend38
-rw-r--r--meta-ivi-test/recipes-extended/common-api/common-api-test/common-api-test-3.1.5.tar.gzbin0 -> 251169 bytes
-rw-r--r--meta-ivi-test/recipes-extended/common-api/common-api-test_3.1.5.bb63
-rw-r--r--meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon/0001-change-file-position-for-dlt-test-filetransfer.patch41
-rw-r--r--meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon_%.bbappend26
-rw-r--r--meta-ivi-test/recipes-extended/node-health-monitor/node-health-monitor_%.bbappend25
-rw-r--r--meta-ivi-test/recipes-extended/node-startup-controller/node-startup-controller/helper.zipbin0 -> 6970 bytes
-rw-r--r--meta-ivi-test/recipes-extended/node-startup-controller/node-startup-controller_%.bbappend19
-rw-r--r--meta-ivi-test/recipes-extended/node-state-manager/node-state-manager_%.bbappend24
-rw-r--r--meta-ivi-test/recipes-extended/persistence-administrator/persistence-administrator_%.bbappend22
-rw-r--r--meta-ivi-test/recipes-extended/persistence-client-library/persistence-client-library_%.bbappend24
-rw-r--r--meta-ivi-test/recipes-extended/persistence-common-object/persistence-common-object_%.bbappend21
-rw-r--r--meta-ivi-test/recipes-graphics/wayland/wayland-ivi-extension_%.bbappend20
-rw-r--r--meta-ivi-test/recipes-multimedia/audiomanager/audiomanager_%.bbappend21
-rw-r--r--meta-ivi/COPYING.MIT17
-rw-r--r--meta-ivi/conf/conf-notes.txt2
-rw-r--r--meta-ivi/conf/distro/poky-ivi-systemd.conf8
-rw-r--r--meta-ivi/recipes-connectivity/bluez5/bluez5/0021-core-service-Add-btd_service_get_version.patch71
-rw-r--r--meta-ivi/recipes-connectivity/bluez5/bluez5/0022-core-service-Add-btd_service_set_auto_connect.patch58
-rw-r--r--meta-ivi/recipes-connectivity/bluez5/bluez5/0023-core-service-Add-btd_service_get_auto_connect.patch41
-rw-r--r--meta-ivi/recipes-connectivity/bluez5/bluez5/0024-core-device-Use-service-auto_connect-flag.patch37
-rw-r--r--meta-ivi/recipes-connectivity/bluez5/bluez5/0025-core-Make-device_get_path-public.patch23
-rw-r--r--meta-ivi/recipes-connectivity/bluez5/bluez5/0026-core-service-Add-btd_service_set_blocked.patch50
-rw-r--r--meta-ivi/recipes-connectivity/bluez5/bluez5/0027-core-service-Add-btd_service_is_blocked.patch41
-rw-r--r--meta-ivi/recipes-connectivity/bluez5/bluez5/build-fix-up-with-jethro.patch11
-rw-r--r--meta-ivi/recipes-connectivity/bluez5/bluez5_%.bbappend12
-rw-r--r--meta-ivi/recipes-core-ivi/busybox/busybox_%.bbappend (renamed from meta-ivi/recipes-core-ivi/busybox/busybox_1.23.1.bbappend)0
-rw-r--r--meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-add-send-with-reply-set-notify.patch4
-rw-r--r--meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-add-support-for-custom-marshalling.patch (renamed from meta-ivi/recipes-core-ivi/dbus/dbus/dbus-DBusMessage-add-support-for-custom-marshaling.patch)120
-rw-r--r--meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-block-acquire-io-path-on-send.patch14
-rw-r--r--meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-correct-dbus-connection-block-pending-call.patch13
-rw-r--r--meta-ivi/recipes-core-ivi/dbus/dbus_%.bbappend4
-rw-r--r--meta-ivi/recipes-extended/common-api/common-api-c++-dbus_3.1.5.bb (renamed from meta-ivi/recipes-extended/common-api/common-api-c++-dbus_3.1.3.bb)11
-rw-r--r--meta-ivi/recipes-extended/common-api/common-api-c++_3.1.5.bb (renamed from meta-ivi/recipes-extended/common-api/common-api-c++_3.1.3.bb)11
-rw-r--r--meta-ivi/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb12
-rw-r--r--meta-ivi/recipes-extended/node-health-monitor/node-health-monitor/0001-change-service-name.patch27
-rw-r--r--meta-ivi/recipes-extended/node-health-monitor/node-health-monitor_1.3.5.bb6
-rw-r--r--meta-ivi/recipes-extended/node-startup-controller/node-startup-controller_1.0.2.bb9
-rw-r--r--meta-ivi/recipes-extended/node-startup-controller/node-startup-controller_git.bb53
-rw-r--r--meta-ivi/recipes-extended/node-state-manager/node-state-manager_2.0.0.bb16
-rw-r--r--meta-ivi/recipes-extended/persistence-administrator/persistence-administrator_1.0.5.bb12
-rw-r--r--meta-ivi/recipes-extended/persistence-client-library/persistence-client-library-1.0.0/0001-Fix-cast-on-64bit-machines.patch35
-rw-r--r--meta-ivi/recipes-extended/persistence-client-library/persistence-client-library/0001-fix-exec-path.patch26
-rw-r--r--meta-ivi/recipes-extended/persistence-client-library/persistence-client-library/0001-load-correct-version-of-libpers_common.patch29
-rw-r--r--meta-ivi/recipes-extended/persistence-client-library/persistence-client-library_1.1.0.bb (renamed from meta-ivi/recipes-extended/persistence-client-library/persistence-client-library_1.0.0.bb)21
-rw-r--r--meta-ivi/recipes-extended/persistence-common-object/persistence-common-object_1.0.3.bb12
-rw-r--r--meta-ivi/recipes-graphics/cairo/cairo_%.bbappend16
-rw-r--r--meta-ivi/recipes-graphics/layer-management/layer-management-git/include-unistd-for-alarm-in-example.patch12
-rw-r--r--meta-ivi/recipes-graphics/layer-management/layer-management-git/include-unistd-for-usleep-in-OpenGLES2App.patch18
-rw-r--r--meta-ivi/recipes-graphics/layer-management/layer-management-git/point-to-internal-CMakeVersions.patch13
-rw-r--r--meta-ivi/recipes-graphics/layer-management/layer-management/layermanager.service14
-rw-r--r--meta-ivi/recipes-graphics/layer-management/layer-management_1.1.bb58
-rw-r--r--meta-ivi/recipes-graphics/layer-management/layer-management_git.bb56
-rw-r--r--meta-ivi/recipes-graphics/wayland/libinput_1.1.1.bb22
-rw-r--r--meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/0001-buildsystem-make-example-programs-link-to-the-genera.patch97
-rw-r--r--meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/apply_weston-1.5.x.patch249
-rw-r--r--meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/apply_weston-1.6.x.patch2135
-rw-r--r--meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/fix_compositor_include.patch26
-rw-r--r--meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/remove_compile-host-path_issue.patch17
-rw-r--r--meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/use_sysroot_dir.patch13
-rw-r--r--meta-ivi/recipes-graphics/wayland/wayland-ivi-extension_1.2.0.bb20
-rw-r--r--meta-ivi/recipes-graphics/wayland/wayland-ivi-extension_1.3.0.bb27
-rw-r--r--meta-ivi/recipes-graphics/wayland/wayland-ivi-extension_1.9.0.bb (renamed from meta-ivi/recipes-graphics/wayland/wayland-ivi-extension_1.5.0.bb)14
-rw-r--r--meta-ivi/recipes-graphics/wayland/wayland_1.6.0.bbappend8
-rw-r--r--meta-ivi/recipes-graphics/wayland/wayland_1.9.0.bb41
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/0001-README-modifed-for-ivi-shell.patch110
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/0002-protocol-add-interface-ivi_application-extension.patch239
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/0003-ivi-shell-add-IVI-layout-APIs.patch5642
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/0004-ivi-shell-add-the-shell-plugin-for-In-Vehicle-Infota.patch1027
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/0005-protocol-ivi-hmi-controller-protocol-to-set-up-IVI-s.patch176
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/0006-ivi-shell-a-reference-implementation-how-to-use-ivi-.patch2189
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/0007-clients-a-reference-implementation-of-UI-client-how-.patch1600
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/0008-data-add-reference-image-files-for-weston-ivi-shell-.patch10101
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/0009-ivi-shell-a-reference-of-weston.ini-for-ivi-shell-an.patch159
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/0010-clients-support-ivi-application.xml-for-clients-simp.patch164
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/0011-clients-support-ivi-application.xml-for-clients-simp.patch397
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/0012-clients-support-ivi-application.xml-for-clients-wind.patch274
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/0013-Reference-implementation-of-input-panel-for-ivi-shel.patch563
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/0014-input-panel-ivi-add-seat-keyboard-focus-to-condition.patch27
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/0015-protocol-ivi-application.xml-update-description-of-i.patch32
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/0100-Backport-ivi-controller.so-of-wayland-ivi-ext-1.5.0.patch728
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/Enable-disable-default-virtual-keyboard.patch65
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/build.fix.up.patch82
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/ivi-shell-click-event.patch54
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston/0001-make-error-portable.patch80
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston/disable-wayland-scanner-pkg-check.patch17
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston/fix-up-for-signal-11-on-qemux86.patch11
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston/make-lcms-explicitly-configurable.patch43
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston/make-libwebp-explicitly-configurable.patch37
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston/parallelmake.patch40
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston/weston.desktop9
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston/weston.pngbin0 -> 2383 bytes
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston_1.6.0.bbappend80
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston_1.9.0.bb94
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston_1.9.0.bbappend22
-rw-r--r--meta-ivi/recipes-graphics/xorg-lib/xkeyboard-config_%.bbappend4
-rw-r--r--meta-ivi/recipes-multimedia/audiomanager/audiomanager_7.0.bb27
-rw-r--r--meta-ivi/recipes-support-ivi/keyutils/keyutils/keyutils-fix-powerpc-cflags.patch36
-rw-r--r--meta-ivi/recipes-yocto-ivi/images/ivi-image.bb2
-rw-r--r--meta-ivi/recipes-yocto-ivi/images/leviathan-image.bb (renamed from meta-ivi/recipes-yocto-ivi/images/kronos-image.bb)2
-rw-r--r--meta-ivi/recipes-yocto-ivi/packagegroups/packagegroup-abstract-component-p1.bb3
-rw-r--r--meta-ivi/recipes-yocto-ivi/packagegroups/packagegroup-abstract-component-p2.bb3
-rw-r--r--meta-ivi/recipes-yocto-ivi/packagegroups/packagegroup-placeholder-component-p1.bb3
-rw-r--r--meta-ivi/recipes-yocto-ivi/packagegroups/packagegroup-specific-component-p1.bb3
-rw-r--r--meta-ivi/recipes-yocto-ivi/packagegroups/packagegroup-specific-component-p2.bb3
-rw-r--r--meta-ivi/recipes-yocto-ivi/packagegroups/packagegroup-xserver-ivi.bb3
130 files changed, 1625 insertions, 27372 deletions
diff --git a/meta-ivi-bsp/COPYING.MIT b/COPYING.MIT
index fb950dc..fb950dc 100644
--- a/meta-ivi-bsp/COPYING.MIT
+++ b/COPYING.MIT
diff --git a/LICENSE b/LICENSE
index 6ee23a3..2b424e5 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,11 +1,40 @@
-Different components of meta-ivi are under different license. Please see:
-
-meta-ivi/COPYING.MIT (MIT)
-meta-ivi-bsp/COPYING.MIT (MIT)
-
All metadata is MIT licensed unless otherwise stated. Source code included
in tree for individual recipes is under the LICENSE stated in the associated
recipe (.bb file) unless otherwise stated.
License information for any other files is either explicitly stated
or defaults to MPL version 2.
+
+----------------------------------------
+missing s/w packages due to license
+
+Because the license issues,
+following packages are not shipped in s/w build image from meta-ivi.
+
+gcc-runtime-dbg
+libgomp
+libgomp-dev
+libgomp-staticdev
+ - poky/meta/recipes-devtools/gcc/gcc-runtime.inc
+ - LICENSE_${PN}-dbg = "GPL-3.0-with-GCC-exception & GPLv3"
+ - LICENSE_libgomp = "GPLv3"
+ - LICENSE_libgomp-dev = "GPLv3"
+ - LICENSE_libgomp-staticdev = "GPLv3"
+
+cairo-dbg
+cairo-staticdev
+cairo-doc
+cairo-locale
+ - poky/meta/recipes-graphics/cairo/cairo.inc
+ - LICENSE = "MPL-1 & LGPLv2.1 & GPLv3+"
+
+dumpsexp-dev
+ - poky/meta/recipes-support/libgcrypt/libgcrypt.inc
+ - LICENSE_dumpsexp-dev = "GPLv3+"
+
+libgcrypt-dbg
+libgcrypt-staticdev
+libgcrypt-doc
+libgcrypt-locale
+ - poky/meta/recipes-support/libgcrypt/libgcrypt.inc
+ - LICENSE = "GPLv2+ & LGPLv2.1+ & GPLv3+"
diff --git a/MAINTAINERS b/MAINTAINERS
index eda4f6c..855ab62 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7,8 +7,8 @@ with '[meta-ivi]' in subject
You may also contact the maintainers directly in case you have any questions
on a particular meta-ivi topic, but please try to do the following first:
- - look in the meta-ivi Bugzilla
- (https://bugs.genivi.org/buglist.cgi?product=meta-ivi) to see if
+ - look in the GENIVI baseline JIRA
+ (https://at.projects.genivi.org/jira/projects/BASE/) to see if
a problem has already been reported
- look through recent entries of the meta-ivi mailing list archives
@@ -20,11 +20,11 @@ When creating patches, please use something like:
git format-patch -s --subject-prefix='meta-ivi][PATCH' origin
When sending patches, please use something like:
- git send-email --to=yong-il.joh@windriver.com --to=holger@windriver.com \
+ git send-email --to=yong-il.joh@windriver.com \
--cc=genivi-meta-ivi@lists.genivi.org <generated patch>
Please refer to:
-https://wiki.yoctoproject.org/wiki/Contribution_Guidelines#General_Information
+https://at.projects.genivi.org/wiki/display/PROJ/How+to+contribute+to+GENIVI
for some useful guidelines to be followed when submitting patches.
@@ -50,3 +50,5 @@ F: ./*
M: Yong-iL Joh <yong-il.joh@windriver.com>
F: ./meta-ivi/
F: ./meta-ivi-bsp/
+F: ./meta-ivi-test/
+F: ./*
diff --git a/README.md b/README.md
index da10773..488f1a3 100644
--- a/README.md
+++ b/README.md
@@ -17,11 +17,9 @@ review and edit our documentation and much more.
Subscribe to the mailing list
[here](https://lists.genivi.org/mailman/listinfo/genivi-meta-ivi).
View or Report bugs
- [here](https://bugs.genivi.org/buglist.cgi?product=meta-ivi).
+ [here](https://at.projects.genivi.org/jira/secure/RapidBoard.jspa?rapidView=10&projectKey=BASE).
Read or Edit the wiki
- [here](http://wiki.projects.genivi.org/index.php/meta-ivi).
-Vote or Comment on our plan
- [here](https://trello.com/b/HplBZa2l/meta-ivi-development).
+ [here](https://at.projects.genivi.org/wiki/display/PROJ/meta-ivi).
For information about the Yocto Project, see the
[Yocto Project website](https://www.yoctoproject.org).
For information about the Yocto GENIVI Baseline, see the
@@ -31,16 +29,16 @@ Layer Dependencies
------------------
URI: git://git.yoctoproject.org/poky
-> branch: fido
-> revision: eb4a134a60e3ac26a48379675ad6346a44010339
+> branch: jethro
+> revision: fc45deac89ef63ca1c44e763c38ced7dfd72cbe1
URI: git://git.openembedded.org/meta-openembedded
> layer: meta-oe
-> branch: fido
-> revision: 5b0305d9efa4b5692cd942586fb7aa92dba42d59
+> branch: jethro
+> revision: ad6133a2e95f4b83b6b3ea413598e2cd5fb3fd90
-Using the above git sha's and the master meta-ivi branch, bitbaking kronos-image
-is known to work (the kronos-image build should be aligned with GENIVI 9.0).
+Using the above git sha's and the master meta-ivi branch, bitbaking leviathan-image
+is known to work (the leviathan-image build should be aligned with GENIVI 10.0).
For creating a specific GENIVI compliant image version, please make sure you
git checkout the related meta-ivi branch and follow the build instructions
@@ -76,24 +74,63 @@ export TEMPLATECONF=/full/path/to/meta-ivi/meta-ivi/conf
2. Run the following command:
> $ source poky/oe-init-build-env
-3. Build kronos-image including GENIVI 9.0 (Kronos) components
- > $ bitbake kronos-image
+3. Build leviathan-image including GENIVI 10.0 (Leviathan) components
+ > $ bitbake leviathan-image
4. Run the emulator:
> for qemu vexpressa9:
- > $ PATH_TO_META_IVI/meta-ivi/scripts/runqemu kronos-image vexpressa9
+ > $ PATH_TO_META_IVI/meta-ivi/scripts/runqemu leviathan-image vexpressa9
>
> for qemu x86:
- > $ PATH_TO_META_IVI/meta-ivi/scripts/runqemu kronos-image qemux86
+ > $ PATH_TO_META_IVI/meta-ivi/scripts/runqemu leviathan-image qemux86
>
> for qemu x86-64:
- > $ PATH_TO_META_IVI/meta-ivi/scripts/runqemu kronos-image qemux86-64
+ > $ PATH_TO_META_IVI/meta-ivi/scripts/runqemu leviathan-image qemux86-64
5. To login use these credentials:
> User - root
> Password - root
-6. To use wayland-ivi-extension 1.5.0,
- put below line to conf/local.conf at your build directory
- PREFERRED_VERSION_wayland-ivi-extension = "1.5.0"
+talk about using SRCREV instead of branch or tag at SRC_URI
+-----------------------------------------------------------
+Sent: Tuesday, April 05, 2016 11:33 PM
+To: James Thomas
+Cc: genivi-meta-ivi@lists.genivi.org
+Subject: Re: [meta-ivi] Building with local source mirror
+
+On Tue, Mar 29, 2016 at 10:51 PM, James Thomas <james.thomas@codethink.co.uk> wrote:
+> One thing I noticed is that simply providing the SRCREV works as long
+> as that sha exists within master, if it doesn't then you have a build
+> error, so being able to use tags is useful.
+>
+> I think using git://...;tag=foo is not sufficient, because tags *can*
+> change (i.e there's no guarantee that the tag you're using is going to
+> be the same as the one you used yesterday).
+>
+> What would be nice is if you could go tag=foo, and have it verified
+> against SRCREV (in my testing this resulted in a build error *when*
+> the tag and sha matched)
+>
+> However, something like
+>
+> SRC_URI = "git://mygitrepo/foo.git;nobranch=1;branch=v0.2"
+> SRCREV = "7654321"
+>
+> does enforce that check (v0.2 is actually a tag in this case), which
+> seems to be pretty useful (the recipe provides something human
+> readable, and something a machine can understand, and will always
+> check they match)
+
+I completely understand the reasoning behind this. The point I'm trying to make is that the automotive industry has a strong need for reproducible offline builds and any kind of mandatory online checks break this requirement. And like Federico said, using SRCREV is also the Yocto project practice.
+
+If we want meta-ivi to be widely used in the industry I believe it should support it's needs. In my opinion the same should go for the whole GENIVI stack to work nicely, which in particular means tags of the projects should not change. But the easiest solution would be for meta-ivi to not use tags. That way it supports offline builds and it is also possible to track bugfixes in the projects instead of pinning to the tag and then getting the bugfixes in patch by patch until next release.
+
+How do the others on this list feel about this proposal?
+
+Regards,
+--
+Igor Socec
+Software Engineer
+
+
diff --git a/meta-ivi-bsp/classes/sdcard_image.bbclass b/meta-ivi-bsp/classes/sdcard_image.bbclass
index 54af536..e76e3a1 100644
--- a/meta-ivi-bsp/classes/sdcard_image.bbclass
+++ b/meta-ivi-bsp/classes/sdcard_image.bbclass
@@ -68,6 +68,9 @@ parted ${SDIMG} print
# Create a vfat image with boot files
BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
+ if [ -f ${WORKDIR}/boot.img ]; then
+ rm -f ${WORKDIR}/boot.img
+ fi
mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::kernel.img
diff --git a/meta-ivi-bsp/recipes-bsp/u-boot/files/no_delay.patch b/meta-ivi-bsp/recipes-bsp/u-boot/files/no_delay.patch
deleted file mode 100644
index f280b7e..0000000
--- a/meta-ivi-bsp/recipes-bsp/u-boot/files/no_delay.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: git/include/configs/omap3_beagle.h
-===================================================================
---- git.orig/include/configs/omap3_beagle.h 2012-01-20 02:19:54.582012450 +0200
-+++ git/include/configs/omap3_beagle.h 2012-01-20 02:20:33.534011227 +0200
-@@ -195,7 +195,7 @@
- /* partition */
-
- /* Environment information */
--#define CONFIG_BOOTDELAY 10
-+#define CONFIG_BOOTDELAY 0
-
- #define CONFIG_EXTRA_ENV_SETTINGS \
- "loadaddr=0x82000000\0" \
diff --git a/meta-ivi-bsp/recipes-bsp/u-boot/u-boot_2015.01.bbappend b/meta-ivi-bsp/recipes-bsp/u-boot/u-boot_2015.01.bbappend
deleted file mode 100644
index 6becfb8..0000000
--- a/meta-ivi-bsp/recipes-bsp/u-boot/u-boot_2015.01.bbappend
+++ /dev/null
@@ -1,5 +0,0 @@
-# Find "files" directory
-FILESEXTRAPATHS_append := ":${THISDIR}/files"
-
-# Patch for removing autostart countdown
-SRC_URI_append_imx53qsb = " file://no_delay.patch"
diff --git a/meta-ivi-bsp/recipes-core-ivi/dbus/dbus_%.bbappend b/meta-ivi-bsp/recipes-core-ivi/dbus/dbus_%.bbappend
new file mode 100644
index 0000000..3412ee9
--- /dev/null
+++ b/meta-ivi-bsp/recipes-core-ivi/dbus/dbus_%.bbappend
@@ -0,0 +1,7 @@
+#
+# for debugging only
+#
+EXTRA_OECONF_qemux86 = "--enable-developer \
+ --enable-verbose-mode \
+ --enable-asserts \
+ "
diff --git a/meta-ivi-bsp/recipes-graphics/mesa/mesa/README.gallium b/meta-ivi-bsp/recipes-graphics/mesa/mesa/README.gallium
deleted file mode 100644
index 6bc7787..0000000
--- a/meta-ivi-bsp/recipes-graphics/mesa/mesa/README.gallium
+++ /dev/null
@@ -1,66 +0,0 @@
-these files
- revert-363b53f00069af718f64cf047f19ad5681a8bf6d.patch
- revert-c46c551c56f78c6bf9e63524c89478695fc4f525.patch
-are the reverts of following commit of mesa:
- 363b53f00069af718f64cf047f19ad5681a8bf6d
- c46c551c56f78c6bf9e63524c89478695fc4f525
-
-the reason of two patches is described at
- http://lists.freedesktop.org/archives/mesa-dev/2014-November/070204.html
-
-
-[Mesa-dev] [PATCH 0/2] Disable the EGL state tracker for Linux/DRI builds
-
-Marek Olšák maraeo at gmail.com
-Tue Nov 4 14:42:43 PST 2014
-
-Hi everybody,
-
-I'm about to address this long-standing issue: The EGL state tracker is
-redundant. It duplicates what st/dri does and it also duplicates what
-the common loader egl_dri2 does, which is used by all classic drivers
-and even works better with gallium drivers.
-
-Let's compare EGL extensions for both backends:
-
-st/egl:
-EGL version string: 1.4 (Gallium)
-EGL client APIs: OpenGL OpenGL_ES OpenGL_ES2 OpenVG
-EGL extensions string:
- EGL_WL_bind_wayland_display EGL_KHR_image_base EGL_KHR_image_pixmap
- EGL_KHR_image EGL_KHR_reusable_sync EGL_KHR_fence_sync
- EGL_KHR_surfaceless_context EGL_NOK_swap_region
- EGL_NV_post_sub_buffer
-
-egl_dri2:
-EGL version string: 1.4 (DRI2)
-EGL client APIs: OpenGL OpenGL_ES OpenGL_ES2 OpenGL_ES3
-EGL extensions string:
- EGL_MESA_drm_image EGL_MESA_configless_context EGL_KHR_image_base
- EGL_KHR_image_pixmap EGL_KHR_image EGL_KHR_gl_texture_2D_image
- EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image
- EGL_KHR_surfaceless_context EGL_KHR_create_context
- EGL_NOK_swap_region EGL_NOK_texture_from_pixmap
- EGL_CHROMIUM_sync_control EGL_EXT_image_dma_buf_import
- EGL_NV_post_sub_buffer
-
-egl_dri2 also supports MSAA on the window framebuffer (through st/dri).
-It's really obvious which one is better.
-
-I'm aware of 2 features that we will lose:
-- swrast on Wayland - I'm not sure about this. Perhaps kms-swrast has
-addressed this already.
-- OpenVG - It has never taken off. If people want this on Linux, it should
-use egl_dri2 and st/dri, like OpenGL does.
-
-This series removes st/egl and st/gbm support from the autoconf build
-(the latter depends on the former and is probably just as redundant).
-The next step is to remove all Linux-specific backends from st/egl.
-Windows, Android, and other platform backends will be kept intact,
-therefore st/egl won't be removed completely.
-
-Please comment.
-
-Thanks,
-
-Marek
diff --git a/meta-ivi-bsp/recipes-graphics/mesa/mesa/revert-363b53f00069af718f64cf047f19ad5681a8bf6d.patch b/meta-ivi-bsp/recipes-graphics/mesa/mesa/revert-363b53f00069af718f64cf047f19ad5681a8bf6d.patch
deleted file mode 100644
index 3c91cc5..0000000
--- a/meta-ivi-bsp/recipes-graphics/mesa/mesa/revert-363b53f00069af718f64cf047f19ad5681a8bf6d.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff -urN Mesa-10.4.4.orig/src/egl/main/egldriver.c Mesa-10.4.4/src/egl/main/egldriver.c
---- Mesa-10.4.4.orig/src/egl/main/egldriver.c 2015-02-07 09:09:51.000000000 +0900
-+++ Mesa-10.4.4/src/egl/main/egldriver.c 2015-09-26 11:36:43.938445294 +0900
-@@ -518,6 +518,19 @@
-
-
- /**
-+ * Add egl_gallium to the module array.
-+ */
-+static void
-+_eglAddGalliumDriver(void)
-+{
-+#ifndef _EGL_BUILT_IN_DRIVER_GALLIUM
-+ void *external = (void *) "egl_gallium";
-+ _eglPreloadForEach(_eglGetSearchPath(), _eglLoaderFile, external);
-+#endif
-+}
-+
-+
-+/**
- * Add built-in drivers to the module array.
- */
- static void
-@@ -549,6 +562,7 @@
- * Add other drivers only when EGL_DRIVER is not set. The order here
- * decides the priorities.
- */
-+ _eglAddGalliumDriver();
- _eglAddBuiltInDrivers();
- }
-
diff --git a/meta-ivi-bsp/recipes-graphics/mesa/mesa/revert-c46c551c56f78c6bf9e63524c89478695fc4f525.patch b/meta-ivi-bsp/recipes-graphics/mesa/mesa/revert-c46c551c56f78c6bf9e63524c89478695fc4f525.patch
deleted file mode 100644
index b417249..0000000
--- a/meta-ivi-bsp/recipes-graphics/mesa/mesa/revert-c46c551c56f78c6bf9e63524c89478695fc4f525.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-diff -urN Mesa-10.4.4.orig/configure.ac Mesa-10.4.4/configure.ac
---- Mesa-10.4.4.orig/configure.ac 2015-09-26 10:15:23.382322385 +0900
-+++ Mesa-10.4.4/configure.ac 2015-09-26 10:15:49.578323045 +0900
-@@ -720,6 +720,20 @@
- [make GLX library Xlib-based instead of DRI-based @<:@default=disabled@:>@])],
- [enable_xlib_glx="$enableval"],
- [enable_xlib_glx=no])
-+AC_ARG_ENABLE([gallium-egl],
-+ [AS_HELP_STRING([--enable-gallium-egl],
-+ [enable optional EGL state tracker (not required
-+ for EGL support in Gallium with OpenGL and OpenGL ES)
-+ @<:@default=disabled@:>@])],
-+ [enable_gallium_egl="$enableval"],
-+ [enable_gallium_egl=no])
-+AC_ARG_ENABLE([gallium-gbm],
-+ [AS_HELP_STRING([--enable-gallium-gbm],
-+ [enable optional gbm state tracker (not required for
-+ gbm support in Gallium)
-+ @<:@default=auto@:>@])],
-+ [enable_gallium_gbm="$enableval"],
-+ [enable_gallium_gbm=auto])
-
- AC_ARG_ENABLE([r600-llvm-compiler],
- [AS_HELP_STRING([--enable-r600-llvm-compiler],
-@@ -1324,6 +1338,51 @@
- AC_SUBST([EGL_LIB_DEPS])
-
- dnl
-+dnl EGL Gallium configuration
-+dnl
-+if test "x$enable_gallium_egl" = xyes; then
-+ if test -z "$with_gallium_drivers"; then
-+ AC_MSG_ERROR([cannot enable egl_gallium without Gallium])
-+ fi
-+ if test "x$enable_egl" = xno; then
-+ AC_MSG_ERROR([cannot enable egl_gallium without EGL])
-+ fi
-+ if test "x$have_libdrm" != xyes; then
-+ AC_MSG_ERROR([egl_gallium requires libdrm >= $LIBDRM_REQUIRED])
-+ fi
-+# XXX: Uncomment once converted to use static/shared pipe-drivers
-+# enable_gallium_loader=$enable_shared_pipe_drivers
-+fi
-+AM_CONDITIONAL(HAVE_GALLIUM_EGL, test "x$enable_gallium_egl" = xyes)
-+
-+dnl
-+dnl gbm Gallium configuration
-+dnl
-+if test "x$enable_gallium_gbm" = xauto; then
-+ case "$enable_gbm$enable_gallium_egl$enable_dri$with_egl_platforms" in
-+ yesyesyes*drm*)
-+ enable_gallium_gbm=yes ;;
-+ *)
-+ enable_gallium_gbm=no ;;
-+ esac
-+fi
-+if test "x$enable_gallium_gbm" = xyes; then
-+ if test -z "$with_gallium_drivers"; then
-+ AC_MSG_ERROR([cannot enable gbm_gallium without Gallium])
-+ fi
-+ if test "x$enable_gbm" = xno; then
-+ AC_MSG_ERROR([cannot enable gbm_gallium without gbm])
-+ fi
-+
-+ if test "x$enable_gallium_egl" != xyes; then
-+ AC_MSG_ERROR([gbm_gallium is only used by egl_gallium])
-+ fi
-+
-+ enable_gallium_loader=$enable_shared_pipe_drivers
-+fi
-+AM_CONDITIONAL(HAVE_GALLIUM_GBM, test "x$enable_gallium_gbm" = xyes)
-+
-+dnl
- dnl XA configuration
- dnl
- if test "x$enable_xa" = xyes; then
-@@ -1351,9 +1410,9 @@
- if test -z "$with_gallium_drivers"; then
- AC_MSG_ERROR([cannot enable OpenVG without Gallium])
- fi
--
-- AC_MSG_ERROR([Cannot enable OpenVG, because egl_gallium has been removed and
-- OpenVG hasn't been integrated into standard libEGL yet])
-+ if test "x$enable_gallium_egl" = xno; then
-+ AC_MSG_ERROR([cannot enable OpenVG without egl_gallium])
-+ fi
-
- EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)'
- VG_LIB_DEPS="$VG_LIB_DEPS $SELINUX_LIBS $PTHREAD_LIBS"
-@@ -2165,6 +2224,8 @@
- src/gallium/drivers/vc4/kernel/Makefile
- src/gallium/state_trackers/clover/Makefile
- src/gallium/state_trackers/dri/Makefile
-+ src/gallium/state_trackers/egl/Makefile
-+ src/gallium/state_trackers/gbm/Makefile
- src/gallium/state_trackers/glx/xlib/Makefile
- src/gallium/state_trackers/nine/Makefile
- src/gallium/state_trackers/omx/Makefile
-@@ -2303,7 +2364,12 @@
- egl_drivers="$egl_drivers builtin:egl_dri2"
- fi
-
-- echo " EGL drivers: $egl_drivers"
-+ if test "x$enable_gallium_egl" = xyes; then
-+ echo " EGL drivers: ${egl_drivers} egl_gallium"
-+ echo " EGL Gallium STs:$EGL_CLIENT_APIS"
-+ else
-+ echo " EGL drivers: $egl_drivers"
-+ fi
- fi
-
- echo ""
-diff -urN Mesa-10.4.4.orig/docs/egl.html Mesa-10.4.4/docs/egl.html
---- Mesa-10.4.4.orig/docs/egl.html 2015-09-26 10:15:23.386322385 +0900
-+++ Mesa-10.4.4/docs/egl.html 2015-09-26 10:15:49.578323045 +0900
-@@ -77,6 +77,13 @@
-
- </dd>
-
-+<dt><code>--enable-gallium-egl</code></dt>
-+<dd>
-+
-+<p>Enable the optional <code>egl_gallium</code> driver.</p>
-+
-+</dd>
-+
- <dt><code>--with-egl-platforms</code></dt>
- <dd>
-
-diff -urN Mesa-10.4.4.orig/src/gallium/Makefile.am Mesa-10.4.4/src/gallium/Makefile.am
---- Mesa-10.4.4.orig/src/gallium/Makefile.am 2015-09-26 10:15:23.386322385 +0900
-+++ Mesa-10.4.4/src/gallium/Makefile.am 2015-09-26 10:15:49.578323045 +0900
-@@ -138,6 +138,14 @@
- SUBDIRS += state_trackers/vega
- endif
-
-+if HAVE_GALLIUM_EGL
-+SUBDIRS += state_trackers/egl targets/egl-static
-+endif
-+
-+if HAVE_GALLIUM_GBM
-+SUBDIRS += state_trackers/gbm targets/gbm
-+endif
-+
- if HAVE_X11_DRIVER
- SUBDIRS += state_trackers/glx/xlib targets/libgl-xlib
- endif
diff --git a/meta-ivi-bsp/recipes-graphics/mesa/mesa_10.4.%.bbappend b/meta-ivi-bsp/recipes-graphics/mesa/mesa_10.4.%.bbappend
deleted file mode 100644
index 7ae6b8b..0000000
--- a/meta-ivi-bsp/recipes-graphics/mesa/mesa_10.4.%.bbappend
+++ /dev/null
@@ -1,26 +0,0 @@
-PR = "r1"
-
-#
-# please, read mesa/READM.gallium about an issue when using gallium
-#
-PACKAGES =+ " \
- libegl-gallium libgbm-gallium \
- "
-
-FILESEXTRAPATHS_append := "${THISDIR}/${PN}"
-SRC_URI_append_qemux86 = " \
- file://revert-c46c551c56f78c6bf9e63524c89478695fc4f525.patch \
- file://revert-363b53f00069af718f64cf047f19ad5681a8bf6d.patch \
- "
-SRC_URI_append_qemux86-64 = " \
- file://revert-c46c551c56f78c6bf9e63524c89478695fc4f525.patch \
- file://revert-363b53f00069af718f64cf047f19ad5681a8bf6d.patch \
- "
-
-PACKAGECONFIG[gallium-egl] = "--enable-gallium-egl, --disable-gallium-egl"
-
-FILES_libegl-gallium = "${libdir}/egl/egl_gallium.so*"
-FILES_libgbm-gallium = "${libdir}/gbm/gbm_gallium_drm.so*"
-
-PACKAGECONFIG_append_qemux86 = " gallium gallium-egl gallium-llvm"
-PACKAGECONFIG_append_qemux86-64 = " gallium gallium-egl gallium-llvm"
diff --git a/meta-ivi-bsp/recipes-graphics/wayland/weston_1.6.0.bbappend b/meta-ivi-bsp/recipes-graphics/wayland/weston_1.6.0.bbappend
deleted file mode 100644
index fb6f3b0..0000000
--- a/meta-ivi-bsp/recipes-graphics/wayland/weston_1.6.0.bbappend
+++ /dev/null
@@ -1,14 +0,0 @@
-RDEPENDS_${PN}_append = " llvm3.3 "
-
-EXTRA_OECONF_append_vexpressa9 = "\
- --enable-simple-egl-clients \
- WESTON_NATIVE_BACKEND=fbdev-backend.so \
- "
-EXTRA_OECONF_append_qemux86 = "\
- --enable-simple-egl-clients \
- WESTON_NATIVE_BACKEND=fbdev-backend.so \
- "
-EXTRA_OECONF_append_qemux86-64 = "\
- --enable-simple-egl-clients \
- WESTON_NATIVE_BACKEND=fbdev-backend.so \
- "
diff --git a/meta-ivi-bsp/recipes-graphics/weston/weston_1.9.0.bbappend b/meta-ivi-bsp/recipes-graphics/weston/weston_1.9.0.bbappend
new file mode 100644
index 0000000..5672485
--- /dev/null
+++ b/meta-ivi-bsp/recipes-graphics/weston/weston_1.9.0.bbappend
@@ -0,0 +1,11 @@
+EXTRA_OECONF_append_vexpressa9 = "\
+ WESTON_NATIVE_BACKEND=fbdev-backend.so \
+ "
+
+PKG_MESA_qemux86 = "mesa-megadriver "
+PKG_MESA_qemux86-64 = "mesa-megadriver "
+PKG_MESA_vexpressa9 = "mesa-megadriver "
+PKG_MESA ?= " "
+
+RDEPENDS_${PN} += "${PKG_MESA} \
+ "
diff --git a/meta-ivi-bsp/recipes-kernel/linux/linux-yocto/vexpress_a9.cfg b/meta-ivi-bsp/recipes-kernel/linux/linux-yocto/vexpress_a9.cfg
index 42f067c..d2e76e1 100644
--- a/meta-ivi-bsp/recipes-kernel/linux/linux-yocto/vexpress_a9.cfg
+++ b/meta-ivi-bsp/recipes-kernel/linux/linux-yocto/vexpress_a9.cfg
@@ -856,3 +856,13 @@ CONFIG_CRC_ITU_T=m
CONFIG_NFC=y
CONFIG_NFC_DIGITAL=m
CONFIG_NFC_SIM=m
+
+#
+# additional kernel config during s/w integration
+#
+# fuse
+CONFIG_FUSE_FS=m
+CONFIG_CUSE=m
+
+# drm
+CONFIG_DRM=y
diff --git a/meta-ivi-demo/COPYING.MIT b/meta-ivi-demo/COPYING.MIT
deleted file mode 100644
index fb950dc..0000000
--- a/meta-ivi-demo/COPYING.MIT
+++ /dev/null
@@ -1,17 +0,0 @@
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/meta-ivi-demo/README.md b/meta-ivi-demo/README.md
deleted file mode 100644
index 3acc194..0000000
--- a/meta-ivi-demo/README.md
+++ /dev/null
@@ -1,57 +0,0 @@
-meta-ivi-demo, the meta-ivi demo layer
-======================================
-
-This layer's purpose is to provide a demo image build. The layer supports
-cross-architecture application development using QEMU emulation and a SDK.
-
-Please see the
-[MAINTAINERS](http://git.yoctoproject.org/cgit/cgit.cgi/meta-ivi/tree/MAINTAINERS)
-file for information on contacting the maintainers
-of this layer, as well as instructions for submitting patches.
-
-We welcome contributions. You can contribute code, submit patches, report bugs,
-answer questions on our mailing lists and review and edit our documentation
-and much more.
-
-Subscribe to the mailing list
- [here](https://lists.genivi.org/mailman/listinfo/genivi-meta-ivi).
-View or Report bugs
- [here](https://bugs.genivi.org/buglist.cgi?product=meta-ivi).
-Read or Edit the wiki
- [here](http://wiki.projects.genivi.org/index.php/meta-ivi).
-For information about the Yocto Project, see the
- [Yocto Project website](https://www.yoctoproject.org).
-For information about the Yocto GENIVI Baseline, see the
- [Yocto GENIVI Baseline website](http://projects.genivi.org/GENIVI_Baselines/meta-ivi).
-
-Layer Dependencies
-------------------
-
-URI: git://git.yoctoproject.org/meta-ivi
-> branch: 7.0
-> revision:
-
-URI: git://git.openembedded.org/meta-openembedded
-> layers: meta-oe
-> branch: dizzy
-> revision: 6413cdb66acf43059f94d0076ec9b8ad6a475b35
-
-URI: git://git.yoctoproject.org/poky
-> branch: dizzy
-> revision: 9bef9b9dddfaa90cecea75937d97a8d96f006663
-
-Supported Machines
-------------------
-
-We do support the builds for currently the following machines:
-
-* QEMU (x86-64) - emulated machine: qemux86-64
-
-
-Miscellaneous
--------------
-
-For the QEMU machine, in order to have audio, the emulation should be done
-like:
-
-> QEMU_AUDIO_DRV=alsa runqemu ivi-image-demo qemux86-64 audio
diff --git a/meta-ivi-demo/conf/bblayers.conf.sample b/meta-ivi-demo/conf/bblayers.conf.sample
deleted file mode 100644
index 631b10d..0000000
--- a/meta-ivi-demo/conf/bblayers.conf.sample
+++ /dev/null
@@ -1,24 +0,0 @@
-# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
-# changes incompatibly
-LCONF_VERSION = "6"
-
-BBPATH = "${TOPDIR}"
-BBFILES ?= ""
-
-BBLAYERS ?= " \
- ##OEROOT##/meta \
- ##OEROOT##/meta-yocto \
- ##OEROOT##/meta-yocto-bsp \
- ##OEROOT##/../meta-ivi/meta-ivi \
- ##OEROOT##/../meta-ivi/meta-ivi-bsp \
- ##OEROOT##/../meta-ivi/meta-ivi-demo \
- ##OEROOT##/../meta-openembedded/meta-oe \
- ##OEROOT##/../meta-openembedded/meta-filesystems \
- ##OEROOT##/../meta-qt5 \
- ##OEROOT##/../meta-openembedded/meta-ruby \
- "
-BBLAYERS_NON_REMOVABLE ?= " \
- ##OEROOT##/meta \
- ##OEROOT##/meta-yocto \
- ##OEROOT##/../meta-ivi/meta-ivi \
- "
diff --git a/meta-ivi-demo/conf/conf-notes.txt b/meta-ivi-demo/conf/conf-notes.txt
deleted file mode 100644
index e3f4bca..0000000
--- a/meta-ivi-demo/conf/conf-notes.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Common targets are:
- ivi-image
- ivi-image-demo
-
diff --git a/meta-ivi-demo/conf/layer.conf b/meta-ivi-demo/conf/layer.conf
deleted file mode 100644
index 784882c..0000000
--- a/meta-ivi-demo/conf/layer.conf
+++ /dev/null
@@ -1,17 +0,0 @@
-# We have a conf and classes directory, add to BBPATH
-BBPATH =. "${LAYERDIR}:"
-
-# We have recipes-* directories, add to BBFILES
-BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
- ${LAYERDIR}/recipes-*/*/*.bbappend"
-
-BBFILE_COLLECTIONS += "ividemo"
-BBFILE_PATTERN_ividemo = "^${LAYERDIR}/"
-BBFILE_PRIORITY_ividemo = "7"
-
-# This should only be incremented on significant changes that will
-# cause compatibility issues with other layers
-LAYERVERSION_ividemo = "1"
-
-LAYERDEPENDS_ividemo = "ivi"
-
diff --git a/meta-ivi-demo/conf/local.conf.sample b/meta-ivi-demo/conf/local.conf.sample
deleted file mode 100644
index 0c5137c..0000000
--- a/meta-ivi-demo/conf/local.conf.sample
+++ /dev/null
@@ -1,214 +0,0 @@
-#
-# This file is your local configuration file and is where all local user settings
-# are placed. The comments in this file give some guide to the options a new user
-# to the system might want to change but pretty much any configuration option can
-# be set in this file. More adventurous users can look at local.conf.extended
-# which contains other examples of configuration which can be placed in this file
-# but new users likely won't need any of them initially.
-#
-# Lines starting with the '#' character are commented out and in some cases the
-# default values are provided as comments to show people example syntax. Enabling
-# the option is a question of removing the # character and making any change to the
-# variable as required.
-
-#
-# Machine Selection
-#
-# You need to select a specific machine to target the build with. There are a selection
-# of emulated machines available which can boot and run in the QEMU emulator:
-#
-#MACHINE ?= "qemux86-64"
-
-#
-# This sets the default machine to be vexpressa9 if no other machine is selected:
-MACHINE ??= "qemux86-64"
-
-#
-# Where to place downloads
-#
-# During a first build the system will download many different source code tarballs
-# from various upstream projects. This can take a while, particularly if your network
-# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
-# can preserve this directory to speed up this part of subsequent builds. This directory
-# is safe to share between multiple builds on the same machine too.
-#
-# The default is a downloads directory under TOPDIR which is the build directory.
-#
-#DL_DIR ?= "${TOPDIR}/downloads"
-
-#
-# Where to place shared-state files
-#
-# BitBake has the capability to accelerate builds based on previously built output.
-# This is done using "shared state" files which can be thought of as cache objects
-# and this option determines where those files are placed.
-#
-# You can wipe out TMPDIR leaving this directory intact and the build would regenerate
-# from these files if no changes were made to the configuration. If changes were made
-# to the configuration, only shared state files where the state was still valid would
-# be used (done using checksums).
-#
-# The default is a sstate-cache directory under TOPDIR.
-#
-#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
-
-#
-# Where to place the build output
-#
-# This option specifies where the bulk of the building work should be done and
-# where BitBake should place its temporary files and output. Keep in mind that
-# this includes the extraction and compilation of many applications and the toolchain
-# which can use Gigabytes of hard disk space.
-#
-# The default is a tmp directory under TOPDIR.
-#
-#TMPDIR = "${TOPDIR}/tmp"
-
-#
-# Default policy config
-#
-# The distribution setting controls which policy settings are used as defaults.
-# The default value is fine for general Yocto GENIVI Baseline project use, at
-# least initially.
-# Ultimately when creating custom policy, people will likely end up subclassing
-# these defaults.
-#
-DISTRO ?= "poky-ivi-systemd"
-INCOMPATIBLE_LICENSE ?= "GPLv3"
-
-#
-# Package Management configuration
-#
-# This variable lists which packaging formats to enable. Multiple package backends
-# can be enabled at once and the first item listed in the variable will be used
-# to generate the root filesystems.
-# Options are:
-# - 'package_deb' for debian style deb files
-# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager)
-# - 'package_rpm' for rpm style packages
-# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
-# We default to rpm:
-PACKAGE_CLASSES ?= "package_rpm"
-
-#
-# SDK/ADT target architecture
-#
-# This variable specifies the architecture to build SDK/ADT items for and means
-# you can build the SDK packages for architectures other than the machine you are
-# running the build on (i.e. building i686 packages on an x86_64 host).
-# Supported values are i686 and x86_64
-#SDKMACHINE ?= "i686"
-
-#
-# Extra image configuration defaults
-#
-# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated
-# images. Some of these options are added to certain image types automatically. The
-# variable can contain the following options:
-# "dbg-pkgs" - add -dbg packages for all installed packages
-# (adds symbol information for debugging/profiling)
-# "dev-pkgs" - add -dev packages for all installed packages
-# (useful if you want to develop against libs in the image)
-# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages
-# (useful if you want to run the package test suites)
-# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.)
-# "tools-debug" - add debugging tools (gdb, strace)
-# "eclipse-debug" - add Eclipse remote debugging support
-# "tools-profile" - add profiling tools (oprofile, exmap, lttng, valgrind)
-# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.)
-# "debug-tweaks" - make an image suitable for development
-# e.g. ssh root access has a blank password
-# There are other application targets that can be used here too, see
-# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details.
-# We default to enabling the debugging tweaks.
-EXTRA_IMAGE_FEATURES = "debug-tweaks"
-
-#
-# Additional image features
-#
-# The following is a list of additional classes to use when building images which
-# enable extra features. Some available options which can be included in this variable
-# are:
-# - 'buildstats' collect build statistics
-# - 'image-mklibs' to reduce shared library files size for an image
-# - 'image-prelink' in order to prelink the filesystem image
-# - 'image-swab' to perform host system intrusion detection
-# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink
-# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended
-USER_CLASSES ?= "buildstats image-mklibs image-prelink"
-
-#
-# Runtime testing of images
-#
-# The build system can test booting virtual machine images under qemu (an emulator)
-# after any root filesystems are created and run tests against those images. To
-# enable this uncomment this line. See classes/testimage(-auto).bbclass for
-# further details.
-#TEST_IMAGE = "1"
-#
-# Interactive shell configuration
-#
-# Under certain circumstances the system may need input from you and to do this it
-# can launch an interactive shell. It needs to do this since the build is
-# multithreaded and needs to be able to handle the case where more than one parallel
-# process may require the user's attention. The default is iterate over the available
-# terminal types to find one that works.
-#
-# Examples of the occasions this may happen are when resolving patches which cannot
-# be applied, to use the devshell or the kernel menuconfig
-#
-# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none
-# Note: currently, Konsole support only works for KDE 3.x due to the way
-# newer Konsole versions behave
-#OE_TERMINAL = "auto"
-# By default disable interactive patch resolution (tasks will just fail instead):
-PATCHRESOLVE = "noop"
-
-#
-# Disk Space Monitoring during the build
-#
-# Monitor the disk space during the build. If there is less that 1GB of space or less
-# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully
-# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort
-# of the build. The reason for this is that running completely out of space can corrupt
-# files and damages the build in ways which may not be easily recoverable.
-BB_DISKMON_DIRS = "\
- STOPTASKS,${TMPDIR},1G,100K \
- STOPTASKS,${DL_DIR},1G,100K \
- STOPTASKS,${SSTATE_DIR},1G,100K \
- ABORT,${TMPDIR},100M,1K \
- ABORT,${DL_DIR},100M,1K \
- ABORT,${SSTATE_DIR},100M,1K"
-
-#
-# Shared-state files from other locations
-#
-# As mentioned above, shared state files are prebuilt cache data objects which can
-# used to accelerate build time. This variable can be used to configure the system
-# to search other mirror locations for these objects before it builds the data itself.
-#
-# This can be a filesystem directory, or a remote url such as http or ftp. These
-# would contain the sstate-cache results from previous builds (possibly from other
-# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the
-# cache locations to check for the shared objects.
-# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH
-# at the end as shown in the examples below. This will be substituted with the
-# correct path within the directory structure.
-#SSTATE_MIRRORS ?= "\
-#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
-#file://.* file:///some/local/dir/sstate/PATH"
-
-#
-# Qemu configuration
-#
-# By default qemu will build with a builtin VNC server where graphical output can be
-# seen. The two lines below enable the SDL backend too. This assumes there is a
-# libsdl library available on your build system.
-#PACKAGECONFIG_append_pn-qemu-native = " sdl"
-#PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
-#ASSUME_PROVIDED += "libsdl-native"
-
-# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
-# track the version of this file when it was generated. This can safely be ignored if
-# this doesn't mean anything to you.
-CONF_VERSION = "1"
diff --git a/meta-ivi-demo/recipes-demo-platform/images/ivi-image-demo-sdk.bb b/meta-ivi-demo/recipes-demo-platform/images/ivi-image-demo-sdk.bb
deleted file mode 100644
index 6845396..0000000
--- a/meta-ivi-demo/recipes-demo-platform/images/ivi-image-demo-sdk.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-require ivi-image-demo.bb
-
-DESCRIPTION = "meta-ivi demo image that includes everything within \
-ivi-image-demo plus meta-toolchain, development headers and libraries to \
-form a standalone SDK."
-
-inherit populate_sdk
-
-QT5PKG = ""
-
-IMAGE_FEATURES_append = "\
- debug-tweaks \
- dev-pkgs \
- eclipse-debug \
- ${QT5PKG} \
- tools-debug \
- tools-profile \
- tools-sdk \
- tools-testapps \
- "
-
-IMAGE_INSTALL_append = "\
- kernel-dev \
- "
diff --git a/meta-ivi-demo/recipes-demo-platform/images/ivi-image-demo.bb b/meta-ivi-demo/recipes-demo-platform/images/ivi-image-demo.bb
deleted file mode 100644
index 58e85b5..0000000
--- a/meta-ivi-demo/recipes-demo-platform/images/ivi-image-demo.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-# Base this image on generic IVI image
-require recipes-yocto-ivi/images/ivi-image.inc
-
-DESCRIPTION = "meta-ivi demo image"
-
-PV = "0.1+snapshot-${DATE}"
-
-IMAGE_FEATURES_append = " \
- ssh-server-openssh \
- "
-
-IMAGE_INSTALL_append = " \
- packagegroup-specific-component-p1 \
- packagegroup-abstract-component-p1 \
- packagegroup-placeholder-component-p1 \
- packagegroup-specific-component-p2 \
- packagegroup-abstract-component-p2 \
- "
diff --git a/meta-ivi-test/conf/layer.conf b/meta-ivi-test/conf/layer.conf
new file mode 100644
index 0000000..64fa5cf
--- /dev/null
+++ b/meta-ivi-test/conf/layer.conf
@@ -0,0 +1,10 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have recipes-* directories, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
+ ${LAYERDIR}/recipes-*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "ivitest"
+BBFILE_PATTERN_ivitest = "^${LAYERDIR}/"
+BBFILE_PRIORITY_ivitest = "7"
diff --git a/meta-ivi-test/recipes-connectivity/bluez5/bluez5_%.bbappend b/meta-ivi-test/recipes-connectivity/bluez5/bluez5_%.bbappend
new file mode 100644
index 0000000..43d4886
--- /dev/null
+++ b/meta-ivi-test/recipes-connectivity/bluez5/bluez5_%.bbappend
@@ -0,0 +1,38 @@
+#
+# for test
+#
+PACKAGECONFIG += " experimental"
+
+do_install_append() {
+ install -d ${D}/opt/tests/${PN}
+ mv ${D}/${libdir}/bluez/test/* ${D}/opt/tests/${PN}
+ rmdir ${D}/${libdir}/bluez/test
+ rmdir ${D}/${libdir}/bluez
+
+ # move desired tools that upstream leaves in build area
+ for f in ${NOINST_TOOLS} ; do
+ g=`basename $f`
+ mv ${D}/${bindir}/$g ${D}/opt/tests/${PN}
+ done
+}
+
+def get_noinst_tools_paths2 (d, bb, tools):
+ s = list()
+ bindir = '/opt/tests/' + d.getVar("PN", True)
+ for bdp in tools.split():
+ f = os.path.basename(bdp)
+ s.append("%s/%s" % (bindir, f))
+ return "\n".join(s)
+
+FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths2(d, bb, d.getVar('NOINST_TOOLS', True))}"
+
+PACKAGES += "${PN}-test"
+DEPENDS_${PN}-test = "${PN}"
+
+FILES_${PN}-dbg += " \
+ /opt/tests/${PN}/.debug/* \
+ /opt/tests/${PN}/lib/.debug/* \
+ "
+FILES_${PN}-test = " \
+ /opt/tests/${PN}/* \
+ "
diff --git a/meta-ivi-test/recipes-extended/common-api/common-api-test/common-api-test-3.1.5.tar.gz b/meta-ivi-test/recipes-extended/common-api/common-api-test/common-api-test-3.1.5.tar.gz
new file mode 100644
index 0000000..e1f5f7c
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/common-api/common-api-test/common-api-test-3.1.5.tar.gz
Binary files differ
diff --git a/meta-ivi-test/recipes-extended/common-api/common-api-test_3.1.5.bb b/meta-ivi-test/recipes-extended/common-api/common-api-test_3.1.5.bb
new file mode 100644
index 0000000..a286502
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/common-api/common-api-test_3.1.5.bb
@@ -0,0 +1,63 @@
+SUMMARY = "testsuite for CommonAPI"
+SECTION = "test"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+PR = "r0"
+
+inherit autotools cmake pkgconfig
+
+DEPENDS += " common-api-c++ common-api-c++-dbus glib-2.0"
+
+SRC_URI = " \
+ file://${PN}-${PV}.tar.gz \
+ "
+
+S = "${WORKDIR}/${PN}"
+
+EXTRA_OECMAKE += "-DUSE_INSTALLED_COMMONAPI=ON -DUSE_INSTALLED_DBUS=ON -DCMAKE_INSTALL_PREFIX=/usr"
+
+FILES_${PN} = " \
+ /opt/tests/${PN}/E0* \
+ /opt/tests/${PN}/*/README \
+ /opt/tests/${PN}/*/commonapi4dbus.ini \
+ /opt/tests/${PN}/*/*Client \
+ /opt/tests/${PN}/*/*Service \
+ ${libdir}/*.so \
+ "
+
+FILES_${PN}-dev = ""
+
+FILES_${PN}-dbg += " \
+ /opt/tests/${PN}/.debug/* \
+ /opt/tests/${PN}/*/.debug/* \
+ ${libdir}/.debug/* \
+ "
+
+do_install() {
+ _DEST=${D}/opt/tests/${PN}
+ _BIN=${WORKDIR}/build
+
+ install -d ${_DEST}
+ install -d ${D}${libdir}
+ for i in `\ls ${_BIN} | grep E0`; do
+ install -m 0755 ${_BIN}/${i}/${i}Client ${_DEST}
+ install -m 0755 ${_BIN}/${i}/${i}Service ${_DEST}
+ install -m 0755 ${_BIN}/${i}/lib${i}-dbus.so ${D}${libdir}
+ done
+
+ for i in BlueZ ObjectPathSimple UDisks2 VariantSimple; do
+ install -d ${_DEST}/${i}
+ install -m 0755 ${_BIN}/${i}/${i}Client ${_DEST}/${i}
+ rm -rf ${_DEST}/${i}/.debug
+ if [ -e ${_BIN}/${i}/${i}Service ]; then
+ install -m 0755 ${_BIN}/${i}/${i}Service ${_DEST}/${i}
+ fi
+ if [ -e ${S}/${i}/README ]; then
+ install -m 0644 ${S}/${i}/README ${_DEST}/${i}
+ fi
+ if [ -e ${S}/${i}/commonapi4dbus.ini ]; then
+ install -m 0644 ${S}/${i}/commonapi4dbus.ini ${_DEST}/${i}
+ fi
+ install -m 0755 ${_BIN}/${i}/lib${i}-dbus.so ${D}${libdir}
+ done
+}
diff --git a/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon/0001-change-file-position-for-dlt-test-filetransfer.patch b/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon/0001-change-file-position-for-dlt-test-filetransfer.patch
new file mode 100644
index 0000000..65be18e
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon/0001-change-file-position-for-dlt-test-filetransfer.patch
@@ -0,0 +1,41 @@
+From f1bc578f41bfeec2c6bcbe89406bf04ada412b74 Mon Sep 17 00:00:00 2001
+From: Yong-iL Joh <yong-il.joh@windriver.com>
+Date: Fri, 4 Mar 2016 16:02:54 +0900
+Subject: [PATCH] change file position for dlt-test-filetransfer
+
+Signed-off-by: Yong-iL Joh <yong-il.joh@windriver.com>
+---
+ src/tests/CMakeLists.txt | 2 +-
+ src/tests/dlt-test-filetransfer.c | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
+index 6a6a962..bd6808e 100644
+--- a/src/tests/CMakeLists.txt
++++ b/src/tests/CMakeLists.txt
+@@ -58,5 +58,5 @@ install(TARGETS dlt-test-multi-process dlt-test-multi-process-client dlt-test-us
+ COMPONENT base)
+
+ INSTALL(FILES dlt-test-filetransfer-file dlt-test-filetransfer-image.png
+- DESTINATION /usr/share/dlt-filetransfer
++ DESTINATION /opt/tests/dlt-daemon/data
+ )
+diff --git a/src/tests/dlt-test-filetransfer.c b/src/tests/dlt-test-filetransfer.c
+index 14b69e4..589926f 100644
+--- a/src/tests/dlt-test-filetransfer.c
++++ b/src/tests/dlt-test-filetransfer.c
+@@ -362,9 +362,9 @@ int testFile3Run3(){
+ int main(void)
+ {
+ //First file contains some text
+- file1 = "/usr/share/dlt-filetransfer/dlt-test-filetransfer-file";
++ file1 = "/opt/tests/dlt-daemon/data/dlt-test-filetransfer-file";
+ //Second file is a picture
+- file2 = "/usr/share/dlt-filetransfer/dlt-test-filetransfer-image.png";
++ file2 = "/opt/tests/dlt-daemon/data/dlt-test-filetransfer-image.png";
+ //Third file doesn't exist. Just to test the reaction when the file isn't available.
+ file3_1 = "dlt-test-filetransfer-doesntExist_1";
+ //Third file doesn't exist. Just to test the reaction when the file isn't available.
+--
+1.9.1
+
diff --git a/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon_%.bbappend b/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon_%.bbappend
new file mode 100644
index 0000000..8b50f89
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon_%.bbappend
@@ -0,0 +1,26 @@
+#
+# for test
+#
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+SRC_URI_append += " \
+ file://0001-change-file-position-for-dlt-test-filetransfer.patch \
+ "
+
+EXTRA_OECMAKE += "-DWITH_DLTTEST=ON -DCMAKE_SKIP_RPATH=ON -DWITH_MAN=OFF"
+
+do_install_append() {
+ _BIN=${WORKDIR}/build/src/tests
+ install -d ${D}/opt/tests/${PN}/data
+ install -m 0755 ${_BIN}/dlt-test-* ${D}/opt/tests/${PN}
+}
+
+PACKAGES += "${PN}-test"
+DEPENDS_${PN}-test = "${PN}"
+
+FILES_${PN}-dbg += " \
+ /opt/tests/${PN}/.debug/* \
+ "
+FILES_${PN}-test = " \
+ /opt/tests/${PN}/dlt-test* \
+ /opt/tests/${PN}/data/* \
+ "
diff --git a/meta-ivi-test/recipes-extended/node-health-monitor/node-health-monitor_%.bbappend b/meta-ivi-test/recipes-extended/node-health-monitor/node-health-monitor_%.bbappend
new file mode 100644
index 0000000..fa2055a
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/node-health-monitor/node-health-monitor_%.bbappend
@@ -0,0 +1,25 @@
+#
+# for test
+#
+do_compile_append() {
+ make -C tst nhm-main-test
+ make -C tst nhm-systemd-test
+}
+
+do_install_append() {
+ install -d ${D}/opt/tests/${PN}
+ install -m 0755 ${S}/tst/nhm-main-test ${D}/opt/tests/${PN}
+ install -m 0755 ${S}/tst/nhm-systemd-test ${D}/opt/tests/${PN}
+ ln -s /etc ${D}/opt/tests/cfg
+}
+
+PACKAGES += "${PN}-test"
+DEPENDS_${PN}-test = "${PN}"
+
+FILES_${PN}-dbg += " \
+ /opt/tests/${PN}/.debug/* \
+ "
+FILES_${PN}-test = " \
+ /opt/tests/${PN}/* \
+ /opt/tests/cfg \
+ "
diff --git a/meta-ivi-test/recipes-extended/node-startup-controller/node-startup-controller/helper.zip b/meta-ivi-test/recipes-extended/node-startup-controller/node-startup-controller/helper.zip
new file mode 100644
index 0000000..2b0d9b5
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/node-startup-controller/node-startup-controller/helper.zip
Binary files differ
diff --git a/meta-ivi-test/recipes-extended/node-startup-controller/node-startup-controller_%.bbappend b/meta-ivi-test/recipes-extended/node-startup-controller/node-startup-controller_%.bbappend
new file mode 100644
index 0000000..c9ccacc
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/node-startup-controller/node-startup-controller_%.bbappend
@@ -0,0 +1,19 @@
+#
+# for test
+#
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+SRC_URI_append += " \
+ file://helper.zip \
+ "
+
+do_install_append() {
+ install -d ${D}/opt/tests/${PN}
+ install -m 0755 ${WORKDIR}/helper/*.sh ${D}/opt/tests/${PN}
+ install -m 0644 ${WORKDIR}/helper/*.service ${D}/${systemd_unitdir}/system
+}
+
+FILES_${PN}-nsm-dummy += " \
+ /opt/tests/${PN}/* \
+ ${systemd_unitdir}/system/example.service \
+ ${systemd_unitdir}/system/hello.service \
+ "
diff --git a/meta-ivi-test/recipes-extended/node-state-manager/node-state-manager_%.bbappend b/meta-ivi-test/recipes-extended/node-state-manager/node-state-manager_%.bbappend
new file mode 100644
index 0000000..e8e8a2b
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/node-state-manager/node-state-manager_%.bbappend
@@ -0,0 +1,24 @@
+#
+# for test
+#
+do_install_append() {
+ install -d ${D}/opt/tests/${PN}/lib
+ install -m 0755 ${S}/NodeStateTest/NodeStateTest ${D}/opt/tests/${PN}
+ install -m 0644 ${S}/NodeStateTest/org.genivi.NodeStateMachineTest.xml \
+ ${D}${datadir}/dbus-1/interfaces/
+ install -m 0755 ${S}/NodeStateTest/.libs/libNodeStateMachineTest.so \
+ ${D}/opt/tests/${PN}/lib
+}
+
+PACKAGES += "${PN}-test"
+DEPENDS_${PN}-test = "${PN}"
+
+FILES_${PN}-dbg += " \
+ /opt/tests/${PN}/.debug/* \
+ /opt/tests/${PN}/lib/.debug/* \
+ "
+FILES_${PN}-test = " \
+ /opt/tests/${PN}/* \
+ /opt/tests/${PN}/lib/libNodeStateMachineTest.so \
+ ${datadir}/dbus-1/interfaces/org.genivi.NodeStateMachineTest.xml \
+ "
diff --git a/meta-ivi-test/recipes-extended/persistence-administrator/persistence-administrator_%.bbappend b/meta-ivi-test/recipes-extended/persistence-administrator/persistence-administrator_%.bbappend
new file mode 100644
index 0000000..c1cc200
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/persistence-administrator/persistence-administrator_%.bbappend
@@ -0,0 +1,22 @@
+#
+# test
+#
+do_install_append() {
+ install -d ${D}/opt/tests/${PN}
+ mv ${S}/test/pers_svc_test/.libs/pers_admin_test_framework \
+ ${D}/opt/tests/${PN}
+ install -d ${D}/Data
+ install -m 0644 ${S}/test/pers_svc_test/webtool_export/resource2.tar.gz \
+ ${D}/Data
+}
+
+PACKAGES += "${PN}-test"
+DEPENDS_${PN}-test = "${PN}"
+
+FILES_${PN}-dbg += " \
+ /opt/tests/${PN}/.debug/* \
+ "
+FILES_${PN}-test = " \
+ /opt/tests/${PN}/* \
+ /Data/resource2.tar.gz \
+ "
diff --git a/meta-ivi-test/recipes-extended/persistence-client-library/persistence-client-library_%.bbappend b/meta-ivi-test/recipes-extended/persistence-client-library/persistence-client-library_%.bbappend
new file mode 100644
index 0000000..58f2aa3
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/persistence-client-library/persistence-client-library_%.bbappend
@@ -0,0 +1,24 @@
+#
+# for test
+#
+EXTRA_OECONF += "--enable-tests"
+
+do_install_append() {
+ install -d ${D}/opt/tests/${PN}
+ install -m 0755 ${S}/test/.libs/persistence_client_library_test \
+ ${D}/opt/tests/${PN}
+ install -d ${D}/Data
+ install -m 0644 ${S}/test/data/PAS_data.tar.gz \
+ ${D}/Data/Data.tar.gz
+}
+
+PACKAGES += "${PN}-test"
+DEPENDS_${PN}-test = "${PN}"
+
+FILES_${PN}-dbg += " \
+ /opt/tests/${PN}/.debug/* \
+ "
+FILES_${PN}-test = " \
+ /opt/tests/${PN}/persistence_client_library_test \
+ /Data/Data.tar.gz \
+ "
diff --git a/meta-ivi-test/recipes-extended/persistence-common-object/persistence-common-object_%.bbappend b/meta-ivi-test/recipes-extended/persistence-common-object/persistence-common-object_%.bbappend
new file mode 100644
index 0000000..6dc26d4
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/persistence-common-object/persistence-common-object_%.bbappend
@@ -0,0 +1,21 @@
+#
+# for test
+#
+EXTRA_OECONF += "--enable-tests"
+
+do_install_append() {
+ install -d ${D}/opt/tests/${PN}
+ install -m 0755 ${S}/test/.libs/test_pco_key_value_store \
+ ${D}/opt/tests/${PN}
+}
+
+PACKAGES += "${PN}-test"
+RDEPENDS_${PN}-test += " libcheck"
+
+FILES_${PN}-dbg += " \
+ /opt/tests/${PN}/.debug/* \
+ "
+
+FILES_${PN}-test = " \
+ /opt/tests/${PN}/test_pco_key_value_store \
+ "
diff --git a/meta-ivi-test/recipes-graphics/wayland/wayland-ivi-extension_%.bbappend b/meta-ivi-test/recipes-graphics/wayland/wayland-ivi-extension_%.bbappend
new file mode 100644
index 0000000..d1d9fbb
--- /dev/null
+++ b/meta-ivi-test/recipes-graphics/wayland/wayland-ivi-extension_%.bbappend
@@ -0,0 +1,20 @@
+#
+# for testing
+#
+DEPENDS += " gtest"
+EXTRA_OECMAKE += " -DBUILD_ILM_API_TESTS=1 -DINSTALL_ILM_API_TESTS=1"
+
+do_install_append() {
+ install -d ${D}/opt/tests/${PN}
+ mv ${D}/${bindir}/*test ${D}/opt/tests/${PN}
+}
+
+PACKAGES += "${PN}-test"
+DEPENDS_${PN}-test = "${PN}"
+
+FILES_${PN}-dbg += " \
+ /opt/tests/${PN}/.debug/* \
+ "
+FILES_${PN}-test = " \
+ /opt/tests/${PN}/* \
+ "
diff --git a/meta-ivi-test/recipes-multimedia/audiomanager/audiomanager_%.bbappend b/meta-ivi-test/recipes-multimedia/audiomanager/audiomanager_%.bbappend
new file mode 100644
index 0000000..e6b91a5
--- /dev/null
+++ b/meta-ivi-test/recipes-multimedia/audiomanager/audiomanager_%.bbappend
@@ -0,0 +1,21 @@
+
+EXTRA_OECMAKE_remove = "-DWITH_TESTS=OFF"
+EXTRA_OECMAKE_append = " -DWITH_TESTS=ON -DUSE_BUILD_LIBS=OFF \
+ -DTEST_EXECUTABLE_INSTALL_PATH=/opt/tests/${PN}/ \
+ -Dgmock_build_tests=ON -Dgtest_build_samples=ON -Dgtest_build_tests=ON \
+ -DCMAKE_SKIP_RPATH=ON \
+ "
+
+do_install_append() {
+ mkdir -p ${D}/opt/tests/${PN}
+
+ for i in `find ${B}/bin/ -type f -regex '.*[tT]est.*'`; do
+ install -m 0755 ${i} ${D}/opt/tests/${PN}
+ done
+ install -m 0755 ${B}/googleMock/gtest/libgtest_dll.so ${D}/opt/tests/${PN}
+}
+
+PACKAGES += " ${PN}-test"
+
+FILES_${PN}-dbg += "/opt/tests/${PN}/.debug/* "
+FILES_${PN}-test = "/opt/tests/${PN}/* "
diff --git a/meta-ivi/COPYING.MIT b/meta-ivi/COPYING.MIT
deleted file mode 100644
index fb950dc..0000000
--- a/meta-ivi/COPYING.MIT
+++ /dev/null
@@ -1,17 +0,0 @@
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/meta-ivi/conf/conf-notes.txt b/meta-ivi/conf/conf-notes.txt
index 02e4173..240178a 100644
--- a/meta-ivi/conf/conf-notes.txt
+++ b/meta-ivi/conf/conf-notes.txt
@@ -1,4 +1,4 @@
Common targets are:
- kronos-image
+ leviathan-image
ivi-image
diff --git a/meta-ivi/conf/distro/poky-ivi-systemd.conf b/meta-ivi/conf/distro/poky-ivi-systemd.conf
index 4138a95..f79f17b 100644
--- a/meta-ivi/conf/distro/poky-ivi-systemd.conf
+++ b/meta-ivi/conf/distro/poky-ivi-systemd.conf
@@ -1,7 +1,7 @@
DISTRO = "poky-ivi-systemd"
DISTRO_NAME = "Yocto GENIVI Baseline (Poky/meta-ivi)"
-DISTRO_VERSION = "9.0.1"
-DISTRO_CODENAME ="kronos"
+DISTRO_VERSION = "10.0+snapshot-${DATE}"
+DISTRO_CODENAME ="leviathan"
MAINTAINER = "meta-ivi <genivi-meta-ivi@lists.genivi.org>"
@@ -34,9 +34,6 @@ PREFERRED_VERSION_gstreamer1.0-plugins-ugly ?= "1.4.%"
PREFERRED_VERSION_gstreamer1.0-libav ?= "1.4.%"
PREFERRED_VERSION_gstreamer1.0-omx ?= "1.2.%"
-# to keep the compatibility of wayland-ivi-extension
-PREFERRED_VERSION_wayland-ivi-extension ?= "1.3.0"
-
POKYQEMUDEPS = "${@bb.utils.contains("INCOMPATIBLE_LICENSE", "GPLv3", "", "packagegroup-core-device-devel",d)}"
DISTRO_EXTRA_RDEPENDS_append_qemuarm = " ${POKYQEMUDEPS}"
DISTRO_EXTRA_RDEPENDS_append_qemux86 = " ${POKYQEMUDEPS}"
@@ -71,7 +68,6 @@ gitsm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
-svk://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n"
MIRRORS =+ "\
diff --git a/meta-ivi/recipes-connectivity/bluez5/bluez5/0021-core-service-Add-btd_service_get_version.patch b/meta-ivi/recipes-connectivity/bluez5/bluez5/0021-core-service-Add-btd_service_get_version.patch
new file mode 100644
index 0000000..444ab5f
--- /dev/null
+++ b/meta-ivi/recipes-connectivity/bluez5/bluez5/0021-core-service-Add-btd_service_get_version.patch
@@ -0,0 +1,71 @@
+From 5d58c98b9e3b9024d33fcacd282a379931b670e5 Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Fri, 7 Feb 2014 15:23:52 +0200
+Subject: [PATCH 1/7] core/service: Add btd_service_get_version
+
+This adds btd_service_get_version which can be use to query service
+version.
+
+Conflicts:
+ src/service.c
+---
+ src/service.c | 23 +++++++++++++++++++++++
+ src/service.h | 1 +
+ 2 files changed, 24 insertions(+)
+
+diff --git a/src/service.c b/src/service.c
+index f7912f5..506c741 100644
+--- a/src/service.c
++++ b/src/service.c
+@@ -38,6 +38,7 @@
+
+ #include "lib/bluetooth.h"
+ #include "lib/sdp.h"
++#include "lib/sdp_lib.h"
+
+ #include "log.h"
+ #include "backtrace.h"
+@@ -319,6 +320,28 @@ int btd_service_get_error(const struct btd_service *service)
+ return service->err;
+ }
+
++uint16_t btd_service_get_version(const struct btd_service *service)
++{
++ const sdp_record_t *rec;
++ sdp_list_t *list;
++ sdp_profile_desc_t *desc;
++ uint16_t version;
++
++ rec = btd_device_get_record(service->device,
++ service->profile->remote_uuid);
++ if (rec == NULL)
++ return 0;
++
++ if (sdp_get_profile_descs(rec, &list) < 0)
++ return 0;
++
++ desc = list->data;
++ version = desc->version;
++ sdp_list_free(list, free);
++
++ return version;
++}
++
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb, void *user_data)
+ {
+ struct service_state_callback *state_cb;
+diff --git a/src/service.h b/src/service.h
+index c1f97f6..b95bd58 100644
+--- a/src/service.h
++++ b/src/service.h
+@@ -59,6 +59,7 @@ struct btd_device *btd_service_get_device(const struct btd_service *service);
+ struct btd_profile *btd_service_get_profile(const struct btd_service *service);
+ btd_service_state_t btd_service_get_state(const struct btd_service *service);
+ int btd_service_get_error(const struct btd_service *service);
++uint16_t btd_service_get_version(const struct btd_service *service);
+
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb,
+ void *user_data);
+--
+1.9.1
+
diff --git a/meta-ivi/recipes-connectivity/bluez5/bluez5/0022-core-service-Add-btd_service_set_auto_connect.patch b/meta-ivi/recipes-connectivity/bluez5/bluez5/0022-core-service-Add-btd_service_set_auto_connect.patch
new file mode 100644
index 0000000..498f4d8
--- /dev/null
+++ b/meta-ivi/recipes-connectivity/bluez5/bluez5/0022-core-service-Add-btd_service_set_auto_connect.patch
@@ -0,0 +1,58 @@
+From 503b8a648d450289181131712fc9917a11787659 Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Fri, 7 Feb 2014 16:24:53 +0200
+Subject: [PATCH 2/7] core/service: Add btd_service_set_auto_connect
+
+---
+ src/service.c | 7 +++++++
+ src/service.h | 2 ++
+ 2 files changed, 9 insertions(+)
+
+diff --git a/src/service.c b/src/service.c
+index 506c741..a434a9d 100644
+--- a/src/service.c
++++ b/src/service.c
+@@ -55,6 +55,7 @@ struct btd_service {
+ void *user_data;
+ btd_service_state_t state;
+ int err;
++ bool auto_connect;
+ };
+
+ struct service_state_callback {
+@@ -146,6 +147,7 @@ struct btd_service *service_create(struct btd_device *device,
+ service->ref = 1;
+ service->device = device; /* Weak ref */
+ service->profile = profile;
++ service->auto_connect = profile->auto_connect;
+ service->state = BTD_SERVICE_STATE_UNAVAILABLE;
+
+ return service;
+@@ -342,6 +344,11 @@ uint16_t btd_service_get_version(const struct btd_service *service)
+ return version;
+ }
+
++void btd_service_set_auto_connect(struct btd_service *service, bool value)
++{
++ service->auto_connect = value;
++}
++
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb, void *user_data)
+ {
+ struct service_state_callback *state_cb;
+diff --git a/src/service.h b/src/service.h
+index b95bd58..e3e0b00 100644
+--- a/src/service.h
++++ b/src/service.h
+@@ -61,6 +61,8 @@ btd_service_state_t btd_service_get_state(const struct btd_service *service);
+ int btd_service_get_error(const struct btd_service *service);
+ uint16_t btd_service_get_version(const struct btd_service *service);
+
++void btd_service_set_auto_connect(struct btd_service *service, bool value);
++
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb,
+ void *user_data);
+ bool btd_service_remove_state_cb(unsigned int id);
+--
+1.9.1
+
diff --git a/meta-ivi/recipes-connectivity/bluez5/bluez5/0023-core-service-Add-btd_service_get_auto_connect.patch b/meta-ivi/recipes-connectivity/bluez5/bluez5/0023-core-service-Add-btd_service_get_auto_connect.patch
new file mode 100644
index 0000000..ce69f9f
--- /dev/null
+++ b/meta-ivi/recipes-connectivity/bluez5/bluez5/0023-core-service-Add-btd_service_get_auto_connect.patch
@@ -0,0 +1,41 @@
+From 64a040208f03225bd1612dfaaa8d0a1634e67256 Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Fri, 7 Feb 2014 16:28:08 +0200
+Subject: [PATCH 3/7] core/service: Add btd_service_get_auto_connect
+
+---
+ src/service.c | 5 +++++
+ src/service.h | 1 +
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/service.c b/src/service.c
+index a434a9d..0cd2287 100644
+--- a/src/service.c
++++ b/src/service.c
+@@ -349,6 +349,11 @@ void btd_service_set_auto_connect(struct btd_service *service, bool value)
+ service->auto_connect = value;
+ }
+
++bool btd_service_get_auto_connect(const struct btd_service *service)
++{
++ return service->auto_connect;
++}
++
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb, void *user_data)
+ {
+ struct service_state_callback *state_cb;
+diff --git a/src/service.h b/src/service.h
+index e3e0b00..cc4eac1 100644
+--- a/src/service.h
++++ b/src/service.h
+@@ -62,6 +62,7 @@ int btd_service_get_error(const struct btd_service *service);
+ uint16_t btd_service_get_version(const struct btd_service *service);
+
+ void btd_service_set_auto_connect(struct btd_service *service, bool value);
++bool btd_service_get_auto_connect(const struct btd_service *service);
+
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb,
+ void *user_data);
+--
+1.9.1
+
diff --git a/meta-ivi/recipes-connectivity/bluez5/bluez5/0024-core-device-Use-service-auto_connect-flag.patch b/meta-ivi/recipes-connectivity/bluez5/bluez5/0024-core-device-Use-service-auto_connect-flag.patch
new file mode 100644
index 0000000..4cb9a32
--- /dev/null
+++ b/meta-ivi/recipes-connectivity/bluez5/bluez5/0024-core-device-Use-service-auto_connect-flag.patch
@@ -0,0 +1,37 @@
+From 12265c3db364ed4deefd3d9c1a861080c5d5032e Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Fri, 7 Feb 2014 16:28:36 +0200
+Subject: [PATCH 4/7] core/device: Use service auto_connect flag
+
+This make use of service auto_connect flag to determine if the service
+should be included in the list to be connected.
+---
+ src/device.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/device.c b/src/device.c
+index 1f7c895..a85ff76 100644
+--- a/src/device.c
++++ b/src/device.c
+@@ -1645,7 +1645,6 @@ static int service_prio_cmp(gconstpointer a, gconstpointer b)
+ static GSList *create_pending_list(struct btd_device *dev, const char *uuid)
+ {
+ struct btd_service *service;
+- struct btd_profile *p;
+ GSList *l;
+
+ if (uuid) {
+@@ -1658,9 +1657,8 @@ static GSList *create_pending_list(struct btd_device *dev, const char *uuid)
+
+ for (l = dev->services; l != NULL; l = g_slist_next(l)) {
+ service = l->data;
+- p = btd_service_get_profile(service);
+
+- if (!p->auto_connect)
++ if (!btd_service_get_auto_connect(service))
+ continue;
+
+ if (g_slist_find(dev->pending, service))
+--
+1.9.1
+
diff --git a/meta-ivi/recipes-connectivity/bluez5/bluez5/0025-core-Make-device_get_path-public.patch b/meta-ivi/recipes-connectivity/bluez5/bluez5/0025-core-Make-device_get_path-public.patch
new file mode 100644
index 0000000..494811c
--- /dev/null
+++ b/meta-ivi/recipes-connectivity/bluez5/bluez5/0025-core-Make-device_get_path-public.patch
@@ -0,0 +1,23 @@
+--- bluez-5.33/src/device.h.orig 2016-03-11 15:43:31.503474441 +0900
++++ bluez-5.33/src/device.h 2016-03-11 15:43:45.703474020 +0900
+@@ -82,6 +82,7 @@
+ struct btd_adapter *device_get_adapter(struct btd_device *device);
+ const bdaddr_t *device_get_address(struct btd_device *device);
+ const char *device_get_path(const struct btd_device *device);
++const char *btd_device_get_path(const struct btd_device *device);
+ gboolean device_is_temporary(struct btd_device *device);
+ bool device_is_paired(struct btd_device *device, uint8_t bdaddr_type);
+ bool device_is_bonded(struct btd_device *device, uint8_t bdaddr_type);
+--- bluez-5.33/src/device.c.orig 2016-03-11 15:42:30.783476238 +0900
++++ bluez-5.33/src/device.c 2016-03-11 15:43:20.483474767 +0900
+@@ -4700,6 +4700,10 @@
+ return device->path;
+ }
+
++const char *btd_device_get_path(const struct btd_device *device) {
++ return device_get_path(device);
++}
++
+ gboolean device_is_temporary(struct btd_device *device)
+ {
+ return device->temporary;
diff --git a/meta-ivi/recipes-connectivity/bluez5/bluez5/0026-core-service-Add-btd_service_set_blocked.patch b/meta-ivi/recipes-connectivity/bluez5/bluez5/0026-core-service-Add-btd_service_set_blocked.patch
new file mode 100644
index 0000000..11f1d45
--- /dev/null
+++ b/meta-ivi/recipes-connectivity/bluez5/bluez5/0026-core-service-Add-btd_service_set_blocked.patch
@@ -0,0 +1,50 @@
+From 7ca3e1849fc6f7b41e008225ca1e2e55bb01139f Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Sat, 8 Feb 2014 13:49:50 +0200
+Subject: [PATCH 6/7] core/service: Add btd_service_set_blocked
+
+---
+ src/service.c | 6 ++++++
+ src/service.h | 2 ++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/src/service.c b/src/service.c
+index 0cd2287..59553be 100644
+--- a/src/service.c
++++ b/src/service.c
+@@ -56,6 +56,7 @@ struct btd_service {
+ btd_service_state_t state;
+ int err;
+ bool auto_connect;
++ bool blocked;
+ };
+
+ struct service_state_callback {
+@@ -354,6 +355,11 @@ bool btd_service_get_auto_connect(const struct btd_service *service)
+ return service->auto_connect;
+ }
+
++void btd_service_set_blocked(struct btd_service *service, bool value)
++{
++ service->blocked = value;
++}
++
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb, void *user_data)
+ {
+ struct service_state_callback *state_cb;
+diff --git a/src/service.h b/src/service.h
+index cc4eac1..2855359 100644
+--- a/src/service.h
++++ b/src/service.h
+@@ -64,6 +64,8 @@ uint16_t btd_service_get_version(const struct btd_service *service);
+ void btd_service_set_auto_connect(struct btd_service *service, bool value);
+ bool btd_service_get_auto_connect(const struct btd_service *service);
+
++void btd_service_set_blocked(struct btd_service *service, bool value);
++
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb,
+ void *user_data);
+ bool btd_service_remove_state_cb(unsigned int id);
+--
+1.9.1
+
diff --git a/meta-ivi/recipes-connectivity/bluez5/bluez5/0027-core-service-Add-btd_service_is_blocked.patch b/meta-ivi/recipes-connectivity/bluez5/bluez5/0027-core-service-Add-btd_service_is_blocked.patch
new file mode 100644
index 0000000..a0f29fe
--- /dev/null
+++ b/meta-ivi/recipes-connectivity/bluez5/bluez5/0027-core-service-Add-btd_service_is_blocked.patch
@@ -0,0 +1,41 @@
+From 28fef24ee122e252b802d6710cb2eb49aa044475 Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Sat, 8 Feb 2014 13:52:45 +0200
+Subject: [PATCH 7/7] core/service: Add btd_service_is_blocked
+
+---
+ src/service.c | 5 +++++
+ src/service.h | 1 +
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/service.c b/src/service.c
+index 59553be..eff3c92 100644
+--- a/src/service.c
++++ b/src/service.c
+@@ -360,6 +360,11 @@ void btd_service_set_blocked(struct btd_service *service, bool value)
+ service->blocked = value;
+ }
+
++bool btd_service_is_blocked(const struct btd_service *service)
++{
++ return service->blocked;
++}
++
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb, void *user_data)
+ {
+ struct service_state_callback *state_cb;
+diff --git a/src/service.h b/src/service.h
+index 2855359..a1db44f 100644
+--- a/src/service.h
++++ b/src/service.h
+@@ -65,6 +65,7 @@ void btd_service_set_auto_connect(struct btd_service *service, bool value);
+ bool btd_service_get_auto_connect(const struct btd_service *service);
+
+ void btd_service_set_blocked(struct btd_service *service, bool value);
++bool btd_service_is_blocked(const struct btd_service *service);
+
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb,
+ void *user_data);
+--
+1.9.1
+
diff --git a/meta-ivi/recipes-connectivity/bluez5/bluez5/build-fix-up-with-jethro.patch b/meta-ivi/recipes-connectivity/bluez5/bluez5/build-fix-up-with-jethro.patch
new file mode 100644
index 0000000..118ce64
--- /dev/null
+++ b/meta-ivi/recipes-connectivity/bluez5/bluez5/build-fix-up-with-jethro.patch
@@ -0,0 +1,11 @@
+diff -urN bluez-5.33.orig/plugins/service.c bluez-5.33/plugins/service.c
+--- bluez-5.33.orig/plugins/service.c 2015-11-09 15:53:53.179261402 +0900
++++ bluez-5.33/plugins/service.c 2015-11-09 16:11:10.743287532 +0900
+@@ -32,6 +32,7 @@
+ #include <glib.h>
+ #include <gdbus/gdbus.h>
+
++#include "lib/sdp.h"
+ #include "lib/uuid.h"
+ #include "src/log.h"
+ #include "src/plugin.h"
diff --git a/meta-ivi/recipes-connectivity/bluez5/bluez5_%.bbappend b/meta-ivi/recipes-connectivity/bluez5/bluez5_%.bbappend
index 4c776c6..70187dd 100644
--- a/meta-ivi/recipes-connectivity/bluez5/bluez5_%.bbappend
+++ b/meta-ivi/recipes-connectivity/bluez5/bluez5_%.bbappend
@@ -5,7 +5,7 @@ FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
# Revision: 5.15 (Horizon)
# Homepage: https://collab.genivi.org/wiki/display/genivi/Bluetooth+Stack+Reference+Implementation
# Actual patches copied from:
-# https://review.tizen.org/git/?p=platform/upstream/bluez.git;a=commit;h=abb9a439baaaa9cd6f91ba5af8c6e426cdc8ff8e
+# http://git.baserock.org/cgit/delta/bluez.git/log/?h=baserock/5.37-19-g28fef24
#
SRC_URI_append = " \
file://0001-plugins-Add-initial-code-for-service-plugin.patch \
@@ -19,9 +19,17 @@ SRC_URI_append = " \
file://0009-plugins-service-Add-Version-property.patch \
file://0010-plugins-service-Add-AutoConnect-property.patch \
file://0011-plugins-service-Add-Blocked-property.patch \
+ file://build-fix-up-with-jethro.patch \
+ file://0021-core-service-Add-btd_service_get_version.patch \
+ file://0022-core-service-Add-btd_service_set_auto_connect.patch \
+ file://0023-core-service-Add-btd_service_get_auto_connect.patch \
+ file://0024-core-device-Use-service-auto_connect-flag.patch \
+ file://0025-core-Make-device_get_path-public.patch \
+ file://0026-core-service-Add-btd_service_set_blocked.patch \
+ file://0027-core-service-Add-btd_service_is_blocked.patch \
"
-EXTRA_OECONF += "--enable-service"
+EXTRA_OECONF += "--enable-service --enable-sixaxis "
PACKAGES =+ " libbluetooth-plugins-service "
FILES_libbluetooth-plugins-service = "${libdir}/bluetooth/plugins/*.so"
diff --git a/meta-ivi/recipes-core-ivi/busybox/busybox_1.23.1.bbappend b/meta-ivi/recipes-core-ivi/busybox/busybox_%.bbappend
index acb6fc4..acb6fc4 100644
--- a/meta-ivi/recipes-core-ivi/busybox/busybox_1.23.1.bbappend
+++ b/meta-ivi/recipes-core-ivi/busybox/busybox_%.bbappend
diff --git a/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-add-send-with-reply-set-notify.patch b/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-add-send-with-reply-set-notify.patch
index 3f92169..fee91c3 100644
--- a/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-add-send-with-reply-set-notify.patch
+++ b/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-add-send-with-reply-set-notify.patch
@@ -106,17 +106,17 @@ index e1068e3..233f179 100644
+ timeout_milliseconds,
+ reply_handler_timeout);
+
++ CONNECTION_UNLOCK (connection);
+ if (pending == NULL)
+ {
-+ CONNECTION_UNLOCK (connection);
+ return FALSE;
+ }
+
+ if (!dbus_pending_call_set_notify(pending, function0, user_data0, free_user_data0))
+ {
-+ CONNECTION_UNLOCK (connection);
+ return FALSE;
+ }
++ CONNECTION_LOCK (connection);
+
+ /* Assign a serial to the message */
+ serial = dbus_message_get_serial (message);
diff --git a/meta-ivi/recipes-core-ivi/dbus/dbus/dbus-DBusMessage-add-support-for-custom-marshaling.patch b/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-add-support-for-custom-marshalling.patch
index 5f225f3..78b073c 100644
--- a/meta-ivi/recipes-core-ivi/dbus/dbus/dbus-DBusMessage-add-support-for-custom-marshaling.patch
+++ b/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-add-support-for-custom-marshalling.patch
@@ -1,75 +1,23 @@
-From 467a2e307462b02865b35397c572b6048c2934e2 Mon Sep 17 00:00:00 2001
-From: Aleksandar Kanchev <kanchev@itestra.com>
-Date: Mon, 9 Jul 2012 18:09:04 +0200
-Subject: [PATCH] DBusMessage: add support for custom marshaling
+From 7b0925938400b970bf699a9188fe03b7271eeead Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=BCrgen=20Gehring?= <juergen.gehring@bmw.de>
+Date: Thu, 23 Apr 2015 01:18:11 -0700
+Subject: [PATCH] Add functions to support querying and manipulating the
+ message body and signature. This is useful for code generators, which can
+ generate custom marshaling functions based on a given IDL. Those functions
+ tend to be optimized and faster than the generic iterator based marshaling.
-Add functions to support querying and manipulating the message body and
-signature. This is useful for code generators, which can generate custom
-marshaling functions based on a given IDL. Those functions tend to be
-optimized and faster than the generic iterator based marshaling.
---
- dbus/dbus-message.c | 143 +++++++++++++++++++++++++++++++++++----------------
- dbus/dbus-message.h | 13 +++++
- dbus/dbus-string.c | 16 ++++++
- dbus/dbus-string.h | 4 ++
- 4 files changed, 132 insertions(+), 44 deletions(-)
+ dbus/dbus-message.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ dbus/dbus-message.h | 14 ++++++++
+ dbus/dbus-string.c | 16 +++++++++
+ dbus/dbus-string.h | 5 +++
+ 4 files changed, 134 insertions(+)
diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c
-index 24ef5ac..fbacfba 100644
+index 43cb1be..d34663a 100644
--- a/dbus/dbus-message.c
+++ b/dbus/dbus-message.c
-@@ -356,50 +356,6 @@ set_or_delete_string_field (DBusMessage *message,
- &value);
- }
-
--#if 0
--/* Probably we don't need to use this */
--/**
-- * Sets the signature of the message, i.e. the arguments in the
-- * message payload. The signature includes only "in" arguments for
-- * #DBUS_MESSAGE_TYPE_METHOD_CALL and only "out" arguments for
-- * #DBUS_MESSAGE_TYPE_METHOD_RETURN, so is slightly different from
-- * what you might expect (it does not include the signature of the
-- * entire C++-style method).
-- *
-- * The signature is a string made up of type codes such as
-- * #DBUS_TYPE_INT32. The string is terminated with nul (nul is also
-- * the value of #DBUS_TYPE_INVALID). The macros such as
-- * #DBUS_TYPE_INT32 evaluate to integers; to assemble a signature you
-- * may find it useful to use the string forms, such as
-- * #DBUS_TYPE_INT32_AS_STRING.
-- *
-- * An "unset" or #NULL signature is considered the same as an empty
-- * signature. In fact dbus_message_get_signature() will never return
-- * #NULL.
-- *
-- * @param message the message
-- * @param signature the type signature or #NULL to unset
-- * @returns #FALSE if no memory
-- */
--static dbus_bool_t
--_dbus_message_set_signature (DBusMessage *message,
-- const char *signature)
--{
-- _dbus_return_val_if_fail (message != NULL, FALSE);
-- _dbus_return_val_if_fail (!message->locked, FALSE);
-- _dbus_return_val_if_fail (signature == NULL ||
-- _dbus_check_is_valid_signature (signature));
-- /* can't delete the signature if you have a message body */
-- _dbus_return_val_if_fail (_dbus_string_get_length (&message->body) == 0 ||
-- signature != NULL);
--
-- return set_or_delete_string_field (message,
-- DBUS_HEADER_FIELD_SIGNATURE,
-- DBUS_TYPE_SIGNATURE,
-- signature);
--}
--#endif
--
- /* Message Cache
- *
- * We cache some DBusMessage to reduce the overhead of allocating
-@@ -3370,6 +3326,47 @@ dbus_message_get_sender (DBusMessage *message)
+@@ -3445,6 +3445,47 @@ dbus_message_get_sender (DBusMessage *message)
}
/**
@@ -117,7 +65,7 @@ index 24ef5ac..fbacfba 100644
* Gets the type signature of the message, i.e. the arguments in the
* message payload. The signature includes only "in" arguments for
* #DBUS_MESSAGE_TYPE_METHOD_CALL and only "out" arguments for
-@@ -4519,6 +4516,64 @@ dbus_message_type_to_string (int type)
+@@ -4632,6 +4673,64 @@ dbus_message_type_to_string (int type)
}
/**
@@ -183,7 +131,7 @@ index 24ef5ac..fbacfba 100644
* specification.
*
diff --git a/dbus/dbus-message.h b/dbus/dbus-message.h
-index 5500492..55388ac 100644
+index 4fd44da..76377b8 100644
--- a/dbus/dbus-message.h
+++ b/dbus/dbus-message.h
@@ -138,6 +138,9 @@ dbus_bool_t dbus_message_set_sender (DBusMessage *message,
@@ -196,28 +144,29 @@ index 5500492..55388ac 100644
const char* dbus_message_get_signature (DBusMessage *message);
DBUS_EXPORT
void dbus_message_set_no_reply (DBusMessage *message,
-@@ -264,6 +267,16 @@ void dbus_message_iter_abandon_container (DBusMessageIter *iter,
- DBusMessageIter *sub);
-
+@@ -262,6 +265,17 @@ dbus_bool_t dbus_message_iter_close_container (DBusMessageIter *iter,
DBUS_EXPORT
-+char* dbus_message_get_body (DBusMessage *message);
+ void dbus_message_iter_abandon_container (DBusMessageIter *iter,
+ DBusMessageIter *sub);
+DBUS_EXPORT
-+dbus_bool_t dbus_message_set_body_length (DBusMessage *message,
-+ int length);
++char* dbus_message_get_body (DBusMessage *message);
++
+DBUS_EXPORT
-+int dbus_message_get_body_length (DBusMessage *message);
++dbus_bool_t dbus_message_set_body_length (DBusMessage *message,
++ int length);
+DBUS_EXPORT
-+int dbus_message_get_body_allocated (DBusMessage *message);
++int dbus_message_get_body_length (DBusMessage *message);
+
+DBUS_EXPORT
- void dbus_message_lock (DBusMessage *message);
++int dbus_message_get_body_allocated (DBusMessage *message);
DBUS_EXPORT
+ void dbus_message_lock (DBusMessage *message);
diff --git a/dbus/dbus-string.c b/dbus/dbus-string.c
-index e2eb93b..d8628ba 100644
+index 0f63612..a084eca 100644
--- a/dbus/dbus-string.c
+++ b/dbus/dbus-string.c
-@@ -848,6 +848,22 @@ _dbus_string_get_length (const DBusString *str)
+@@ -730,6 +730,22 @@ _dbus_string_get_length (const DBusString *str)
}
#endif /* !_dbus_string_get_length */
@@ -241,10 +190,10 @@ index e2eb93b..d8628ba 100644
* Makes a string longer by the given number of bytes. Checks whether
* adding additional_length to the current length would overflow an
diff --git a/dbus/dbus-string.h b/dbus/dbus-string.h
-index 2f1ed31..490aea6 100644
+index 86fb8c3..bfa2a39 100644
--- a/dbus/dbus-string.h
+++ b/dbus/dbus-string.h
-@@ -62,6 +62,7 @@ struct DBusString
+@@ -61,6 +61,7 @@ struct DBusString
*/
#define _dbus_string_get_data(s) ((char*)(((DBusString*)(s))->dummy1))
#define _dbus_string_get_length(s) (((DBusString*)(s))->dummy2)
@@ -252,16 +201,17 @@ index 2f1ed31..490aea6 100644
#define _dbus_string_set_byte(s, i, b) ((((unsigned char*)(((DBusString*)(s))->dummy1))[(i)]) = (unsigned char) (b))
#define _dbus_string_get_byte(s, i) (((const unsigned char*)(((DBusString*)(s))->dummy1))[(i)])
#define _dbus_string_get_const_data(s) ((const char*)(((DBusString*)(s))->dummy1))
-@@ -131,6 +132,9 @@ void _dbus_string_copy_to_buffer_with_nul (const DBusString *str,
- #ifndef _dbus_string_get_length
+@@ -131,6 +132,10 @@ void _dbus_string_copy_to_buffer_with_nul (const DBusString *str,
int _dbus_string_get_length (const DBusString *str);
#endif /* !_dbus_string_get_length */
+
+#ifndef _dbus_string_get_allocated
+int _dbus_string_get_allocated (const DBusString *str);
+#endif /* !_dbus_string_get_allocated */
-
++
dbus_bool_t _dbus_string_lengthen (DBusString *str,
int additional_length);
+ void _dbus_string_shorten (DBusString *str,
--
-1.7.10.2
+1.9.1
diff --git a/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-block-acquire-io-path-on-send.patch b/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-block-acquire-io-path-on-send.patch
new file mode 100644
index 0000000..1fb7316
--- /dev/null
+++ b/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-block-acquire-io-path-on-send.patch
@@ -0,0 +1,14 @@
+diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c
+index a3dafa0..1fc7254 100644
+--- a/dbus/dbus-connection.c
++++ b/dbus/dbus-connection.c
+@@ -1207,8 +1207,7 @@ _dbus_connection_do_iteration_unlocked (DBusConnection *connection,
+ if (connection->n_outgoing == 0)
+ flags &= ~DBUS_ITERATION_DO_WRITING;
+
+- if (_dbus_connection_acquire_io_path (connection,
+- (flags & DBUS_ITERATION_BLOCK) ? timeout_milliseconds : 0))
++ if (_dbus_connection_acquire_io_path (connection, timeout_milliseconds))
+ {
+ HAVE_LOCK_CHECK (connection);
+
diff --git a/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-correct-dbus-connection-block-pending-call.patch b/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-correct-dbus-connection-block-pending-call.patch
new file mode 100644
index 0000000..ce17128
--- /dev/null
+++ b/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-correct-dbus-connection-block-pending-call.patch
@@ -0,0 +1,13 @@
+diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c
+index b574207..a617457 100644
+--- a/dbus/dbus-connection.c
++++ b/dbus/dbus-connection.c
+@@ -2525,7 +2525,7 @@ _dbus_connection_block_pending_call (DBusPendingCall *pending)
+ {
+ /* block again, we don't have the reply buffered yet. */
+ _dbus_connection_do_iteration_unlocked (connection,
+- NULL,
++ pending,
+ DBUS_ITERATION_DO_READING |
+ DBUS_ITERATION_BLOCK,
+ timeout_milliseconds - elapsed_milliseconds);
diff --git a/meta-ivi/recipes-core-ivi/dbus/dbus_%.bbappend b/meta-ivi/recipes-core-ivi/dbus/dbus_%.bbappend
index 495f219..4f0b25b 100644
--- a/meta-ivi/recipes-core-ivi/dbus/dbus_%.bbappend
+++ b/meta-ivi/recipes-core-ivi/dbus/dbus_%.bbappend
@@ -10,8 +10,10 @@ SRC_URI_AFBUS = ""
# add support for GENIVI CommonAPI D-Bus runtime
# - http://projects.genivi.org/commonapi/
SRC_URI_COMMONAPI = " \
- file://dbus-DBusMessage-add-support-for-custom-marshaling.patch \
file://capi-dbus-add-send-with-reply-set-notify.patch \
+ file://capi-dbus-add-support-for-custom-marshalling.patch \
+ file://capi-dbus-block-acquire-io-path-on-send.patch \
+ file://capi-dbus-correct-dbus-connection-block-pending-call.patch \
"
SRC_URI_append = "\
diff --git a/meta-ivi/recipes-extended/common-api/common-api-c++-dbus_3.1.3.bb b/meta-ivi/recipes-extended/common-api/common-api-c++-dbus_3.1.5.bb
index c1cfa71..1426d9c 100644
--- a/meta-ivi/recipes-extended/common-api/common-api-c++-dbus_3.1.3.bb
+++ b/meta-ivi/recipes-extended/common-api/common-api-c++-dbus_3.1.5.bb
@@ -2,21 +2,16 @@ SUMMARY = "CommonAPI-DBus"
SECTION = "libs"
LICENSE = "MPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad"
-PR = "r1"
+PR = "r0"
DEPENDS = "commonapi3 dbus"
REQUIRES = "commonapi3 dbus"
-SRC_URI = "git://git.projects.genivi.org/ipc/common-api-dbus-runtime.git;branch=master;tag=${PV}"
-
+SRCREV = "3348a422ffc756b63de5890356383858a898e8b1"
+SRC_URI = "git://git.projects.genivi.org/ipc/common-api-dbus-runtime.git"
S = "${WORKDIR}/git"
EXTRA_OECMAKE += "-DCMAKE_INSTALL_PREFIX=/usr "
CXXFLAGS := "${@oe_filter_out('-fvisibility-inlines-hidden', '${CXXFLAGS}', d)}"
-do_configure_prepend() {
- sed -i '/ set(${var} /c set(ABSOLUTE_${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") ' ${S}/CMakeLists.txt
- sed -i '/file(RELATIVE_PATH /c file(RELATIVE_PATH REL_INCLUDE_DIR "${ABSOLUTE_INSTALL_CMAKE_DIR}" "${ABSOLUTE_INSTALL_INCLUDE_DIR}") ' ${S}/CMakeLists.txt
-}
-
inherit cmake lib_package pkgconfig
FILES_${PN}-dev += "${libdir}/cmake"
diff --git a/meta-ivi/recipes-extended/common-api/common-api-c++_3.1.3.bb b/meta-ivi/recipes-extended/common-api/common-api-c++_3.1.5.bb
index 064499d..66308d4 100644
--- a/meta-ivi/recipes-extended/common-api/common-api-c++_3.1.3.bb
+++ b/meta-ivi/recipes-extended/common-api/common-api-c++_3.1.5.bb
@@ -3,18 +3,15 @@ SECTION = "libs"
LICENSE = "MPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad"
PROVIDES = "commonapi3"
-PR = "r1"
+PR = "r0"
inherit autotools cmake lib_package pkgconfig
-SRC_URI = "git://git.projects.genivi.org/ipc/common-api-runtime.git;branch=master;tag=${PV}"
+SRCREV = "77d9cdaf6acee03a1e360e0e1a3cd0b01a95b407"
+SRC_URI = "git://git.projects.genivi.org/ipc/common-api-runtime.git"
S = "${WORKDIR}/git"
EXTRA_OECMAKE += "-DCMAKE_INSTALL_PREFIX=/usr"
-do_configure_prepend () {
- sed -i '/ set(${var} /c set(ABSOLUTE_${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") ' ${S}/CMakeLists.txt
- sed -i '/file(RELATIVE_PATH /c file(RELATIVE_PATH REL_INCLUDE_DIR "${ABSOLUTE_INSTALL_CMAKE_DIR}" "${ABSOLUTE_INSTALL_INCLUDE_DIR}") ' ${S}/CMakeLists.txt
-}
-
FILES_${PN}-dev += "${libdir}/cmake"
+RDEPENDS_${PN} += "dlt-daemon"
diff --git a/meta-ivi/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb b/meta-ivi/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb
index 183e2e9..e117ad4 100644
--- a/meta-ivi/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb
+++ b/meta-ivi/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb
@@ -15,12 +15,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=99ba60c3fad7eaf8c56bca6dd75cba09 \
DEPENDS = "dbus zlib"
-# FIX ME
-# This should be TAG = "v${PV}" but yocto doesn't support lightweight tags for now
-# https://bugzilla.yoctoproject.org/show_bug.cgi?id=6881
-TAG = "b8b3ea3a31f7deb681941a19878c82e7b7350ae7"
-BRANCH = "v2.11.x"
-SRC_URI = "git://git.projects.genivi.org/${PN}.git;branch=${BRANCH};tag=${TAG} \
+SRCREV = "b8b3ea3a31f7deb681941a19878c82e7b7350ae7"
+SRC_URI = "git://git.projects.genivi.org/${PN}.git;branch=v2.11.x \
file://0001-Fix-build-with-systemd-209.patch \
file://0002-Don-t-execute-processes-as-a-specific-user.patch \
file://0003-systemd-unit-type-should-be-in-lowercase-so-use-Type.patch \
@@ -42,3 +38,7 @@ SYSTEMD_AUTO_ENABLE_${PN}-systemd = "disable"
EXTRA_OECMAKE = "-DWITH_SYSTEMD=ON"
FILES_${PN}-doc += "/usr/share/dlt-filetransfer"
+
+do_install_append() {
+ rm -f ${D}${bindir}/dlt-test-*
+}
diff --git a/meta-ivi/recipes-extended/node-health-monitor/node-health-monitor/0001-change-service-name.patch b/meta-ivi/recipes-extended/node-health-monitor/node-health-monitor/0001-change-service-name.patch
new file mode 100644
index 0000000..21a4cc5
--- /dev/null
+++ b/meta-ivi/recipes-extended/node-health-monitor/node-health-monitor/0001-change-service-name.patch
@@ -0,0 +1,27 @@
+From 15e991f5e36f896fa79e4fd851ba075c25e4ce0d Mon Sep 17 00:00:00 2001
+From: Yong-iL Joh <yong-il.joh@windriver.com>
+Date: Wed, 9 Mar 2016 17:30:32 +0900
+Subject: [PATCH] change service name
+
+---
+ cfg/node-health-monitor.service.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cfg/node-health-monitor.service.in b/cfg/node-health-monitor.service.in
+index a28ab39..9027b42 100644
+--- a/cfg/node-health-monitor.service.in
++++ b/cfg/node-health-monitor.service.in
+@@ -2,8 +2,8 @@
+
+ [Unit]
+ Description=node-health-monitor to observe system health
+-Requires=nodestatemanager-daemon.service dlt-daemon.service
+-After=nodestatemanager-daemon.service dlt-daemon.service
++Requires=nodestatemanager-daemon.service dlt.service
++After=nodestatemanager-daemon.service dlt.service
+
+ [Service]
+ Type=notify
+--
+1.9.1
+
diff --git a/meta-ivi/recipes-extended/node-health-monitor/node-health-monitor_1.3.5.bb b/meta-ivi/recipes-extended/node-health-monitor/node-health-monitor_1.3.5.bb
index 2d3c7a6..2ef9cdb 100644
--- a/meta-ivi/recipes-extended/node-health-monitor/node-health-monitor_1.3.5.bb
+++ b/meta-ivi/recipes-extended/node-health-monitor/node-health-monitor_1.3.5.bb
@@ -4,10 +4,10 @@ LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=815ca599c9df247a0c7f619bab123dad"
PR = "r2"
-SRCREV = "851565499527e2d44047de3f6cbe9dd3a84a6c74"
-
-SRC_URI = "git://git.projects.genivi.org/lifecycle/node-health-monitor.git \
+SRCREV="851565499527e2d44047de3f6cbe9dd3a84a6c74"
+SRC_URI = "git://git.projects.genivi.org/lifecycle/${PN}.git \
file://fix-no-libsystemd-daemon.patch \
+ file://0001-change-service-name.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta-ivi/recipes-extended/node-startup-controller/node-startup-controller_1.0.2.bb b/meta-ivi/recipes-extended/node-startup-controller/node-startup-controller_1.0.2.bb
index d5cbc92..570677a 100644
--- a/meta-ivi/recipes-extended/node-startup-controller/node-startup-controller_1.0.2.bb
+++ b/meta-ivi/recipes-extended/node-startup-controller/node-startup-controller_1.0.2.bb
@@ -1,5 +1,3 @@
-DEFAULT_PREFERENCE = "-1"
-
SUMMARY = "GENIVI Node Startup Controller"
DESCRIPTION = "The GENIVI Node Startup Controller \
- manages the Last User Context (LUC) \
@@ -14,18 +12,17 @@ SECTION = "base"
LICENSE = "MPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=815ca599c9df247a0c7f619bab123dad"
-SRCREV = "717e743c84ef9c168501dcbc012c4212f1903581"
PR = "r4"
-SRC_URI = "git://git.projects.genivi.org/lifecycle/node-startup-controller.git;branch=genivi-excalibur \
+SRCREV = "717e743c84ef9c168501dcbc012c4212f1903581"
+SRC_URI = "git://git.projects.genivi.org/lifecycle/${PN}.git;branch=genivi-excalibur \
file://use-systemd-unit-dir.patch \
file://fix-no-libsystemd-daemon.patch \
"
+S = "${WORKDIR}/git"
DEPENDS = "glib-2.0 dlt-daemon systemd"
-S = "${WORKDIR}/git"
-
inherit autotools gtk-doc systemd
do_configure_prepend () {
mkdir -p ${S}/m4
diff --git a/meta-ivi/recipes-extended/node-startup-controller/node-startup-controller_git.bb b/meta-ivi/recipes-extended/node-startup-controller/node-startup-controller_git.bb
deleted file mode 100644
index 0d3b90c..0000000
--- a/meta-ivi/recipes-extended/node-startup-controller/node-startup-controller_git.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-SUMMARY = "GENIVI Node Startup Controller"
-DESCRIPTION = "The GENIVI Node Startup Controller \
- - manages the Last User Context (LUC) \
- - monitors node startup \
- and \
- - manages legacy applications within a node \
- "
-
-HOMEPAGE = "https://www.genivi.org/"
-SECTION = "base"
-
-LICENSE = "MPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=815ca599c9df247a0c7f619bab123dad"
-
-SRCREV = "958e5ab2bc93ac0d885ca75f4f33988cbdd3e758"
-PV = "1.0.0+git${SRCPV}"
-PR = "r2"
-
-DEFAULT_PREFERENCE = "-1"
-
-SRC_URI = "git://git.projects.genivi.org/lifecycle/node-startup-controller.git;protocol=git"
-
-DEPENDS = "glib-2.0 dlt-daemon systemd"
-
-S = "${WORKDIR}/git"
-
-inherit autotools gtk-doc
-do_configure_prepend () {
- mkdir m4
-}
-
-PACKAGES =+ "${PN}-nsm-dummy ${PN}-nsm-dummy-dbg"
-
-RRECOMMENDS_${PN} += "${PN}-nsm-dummy"
-
-
-FILES_${PN} += "\
- ${libdir}/${PN}-1/${PN} \
- ${libdir}/${PN}-1/legacy-app-handler \
- ${libdir}/systemd/system/${PN}.service \
- ${datadir}/dbus-1/system-services/org.genivi.NodeStartupController1.service \
- "
-FILES_${PN}-dbg += "\
- ${libdir}/${PN}-1/.debug/*ler \
- "
-FILES_${PN}-nsm-dummy = "\
- ${libdir}/${PN}-1/nsm-dummy \
- ${libdir}/systemd/system/nsm-dummy.service \
- ${datadir}/dbus-1/system-services/org.genivi.NodeStateManager.* \
- "
-FILES_${PN}-nsm-dummy-dbg = "\
- ${libdir}/${PN}-1/.debug/nsm-dummy \
- "
diff --git a/meta-ivi/recipes-extended/node-state-manager/node-state-manager_2.0.0.bb b/meta-ivi/recipes-extended/node-state-manager/node-state-manager_2.0.0.bb
index 59eccce..f2af33b 100644
--- a/meta-ivi/recipes-extended/node-state-manager/node-state-manager_2.0.0.bb
+++ b/meta-ivi/recipes-extended/node-state-manager/node-state-manager_2.0.0.bb
@@ -12,12 +12,12 @@ LICENSE = "MPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=815ca599c9df247a0c7f619bab123dad"
SRCREV = "dd4a86b9459537d2e85489b36abf80f34d12f098"
-
-SRC_URI = "git://git.projects.genivi.org/lifecycle/node-state-manager.git \
+SRC_URI = "git://git.projects.genivi.org/lifecycle/${PN}.git \
file://nsm-fix-systemd-service-dep.patch \
file://nsm-fix-no-libsystemd-daemon.patch \
file://link-with-gio.patch \
"
+S = "${WORKDIR}/git"
PR = "r1"
@@ -25,8 +25,6 @@ EXTRA_OECONF = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-syste
DEPENDS = "dbus glib-2.0 dlt-daemon persistence-client-library systemd"
-S = "${WORKDIR}/git"
-
inherit pkgconfig autotools-brokensep systemd
SYSTEMD_PACKAGES = "${PN}"
@@ -45,7 +43,13 @@ FILES_SOLIBSDEV = ""
SOLIBS = "${SOLIBSDEV}"
FILES_${PN} += "\
- ${datadir}/dbus-1/system-services/org.genivi.NodeStateManager.LifeCycleControl.service \
+ ${datadir}/dbus-1/system-services \
+ ${datadir}/dbus-1/interfaces/org.genivi.NodeStateManager.*.xml \
${systemd_unitdir}/system/nodestatemanager-daemon.service \
"
-FILES_${PN}-dev += "${datadir}/dbus-1/interfaces/"
+
+do_install_append() {
+ rm -f ${D}${bindir}/NodeStateTest
+ rm -f ${D}${libdir}/libNodeStateMachineTest.*
+ rm -f ${D}${datadir}/dbus-1/interfaces/org.genivi.NodeStateMachineTest.xml
+}
diff --git a/meta-ivi/recipes-extended/persistence-administrator/persistence-administrator_1.0.5.bb b/meta-ivi/recipes-extended/persistence-administrator/persistence-administrator_1.0.5.bb
index c90f53c..0f36220 100644
--- a/meta-ivi/recipes-extended/persistence-administrator/persistence-administrator_1.0.5.bb
+++ b/meta-ivi/recipes-extended/persistence-administrator/persistence-administrator_1.0.5.bb
@@ -6,17 +6,17 @@ SECTION = "base"
LICENSE = "MPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=815ca599c9df247a0c7f619bab123dad"
+SRCREV = "68016b6762f9cbd87a7196df26d2b6fc8fcba2c1"
SRC_URI = " \
- git://git.projects.genivi.org/persistence/persistence-administrator.git;tag=${PV} \
+ git://git.projects.genivi.org/persistence/persistence-administrator.git \
file://libsystemd_daemon.patch \
file://0001-Add-support-for-json-c-0.12.patch \
"
+S = "${WORKDIR}/git"
DEPENDS = "glib-2.0 dbus dlt-daemon libarchive zlib json-c node-state-manager \
systemd persistence-common-object libffi libitzam"
-S = "${WORKDIR}/git"
-
inherit autotools-brokensep systemd pkgconfig
FILES_${PN}-dev += "${datadir}/dbus-1/"
@@ -24,3 +24,9 @@ FILES_${PN}-dev += "${datadir}/dbus-1/"
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "pas-daemon.service"
SYSTEMD_AUTO_ENABLE = "disable"
+
+do_install_append() {
+ perl -pi -e 's/dbus-public-bus.service/dbus.service/' \
+ ${D}/lib/systemd/system/pas-daemon.service
+ rm -f ${D}${bindir}/pers_admin_test_framework
+}
diff --git a/meta-ivi/recipes-extended/persistence-client-library/persistence-client-library-1.0.0/0001-Fix-cast-on-64bit-machines.patch b/meta-ivi/recipes-extended/persistence-client-library/persistence-client-library-1.0.0/0001-Fix-cast-on-64bit-machines.patch
deleted file mode 100644
index 4f86748..0000000
--- a/meta-ivi/recipes-extended/persistence-client-library/persistence-client-library-1.0.0/0001-Fix-cast-on-64bit-machines.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From d58ab09ddd9a6ce7f47a045ecb9bccb7d59109bd Mon Sep 17 00:00:00 2001
-From: Andrei Gherzan <andrei.gherzan@windriver.com>
-Date: Sun, 17 May 2015 22:40:55 +0200
-Subject: [PATCH] Fix cast on 64bit machines
-
-Signed-off-by: Andrei Gherzan <andrei.gherzan@windriver.com>
----
- src/persistence_client_library_dbus_service.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/persistence_client_library_dbus_service.c b/src/persistence_client_library_dbus_service.c
-index c3c2624..84bbb0a 100644
---- a/src/persistence_client_library_dbus_service.c
-+++ b/src/persistence_client_library_dbus_service.c
-@@ -286,7 +286,7 @@ static void removeWatch(DBusWatch *watch, void *data)
-
- (void)data;
-
-- DLT_LOG(gPclDLTContext, DLT_LOG_DEBUG, DLT_STRING("removeWatch called "), DLT_INT( (int)watch) );
-+ DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("removeWatch called "), DLT_INT( (long)watch) );
-
- if(w_data)
- free(w_data);
-@@ -299,7 +299,7 @@ static void removeWatch(DBusWatch *watch, void *data)
- static void watchToggled(DBusWatch *watch, void *data)
- {
- (void)data;
-- DLT_LOG(gPclDLTContext, DLT_LOG_DEBUG, DLT_STRING("watchToggled called "), DLT_INT( (int)watch) );
-+ DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("watchToggled called "), DLT_INT( (long)watch) );
-
- if(dbus_watch_get_enabled(watch))
- addWatch(watch, data);
---
-2.1.0
-
diff --git a/meta-ivi/recipes-extended/persistence-client-library/persistence-client-library/0001-fix-exec-path.patch b/meta-ivi/recipes-extended/persistence-client-library/persistence-client-library/0001-fix-exec-path.patch
new file mode 100644
index 0000000..45ca6cd
--- /dev/null
+++ b/meta-ivi/recipes-extended/persistence-client-library/persistence-client-library/0001-fix-exec-path.patch
@@ -0,0 +1,26 @@
+From f658846d8bf13f00e2d39b951f7811d2a6fa1f51 Mon Sep 17 00:00:00 2001
+From: Yong-iL Joh <yong-il.joh@windriver.com>
+Date: Tue, 23 Feb 2016 20:38:13 +0900
+Subject: [PATCH] fix exec path
+
+Signed-off-by: Yong-iL Joh <yong-il.joh@windriver.com>
+---
+ test/persistence_client_library_test.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/persistence_client_library_test.c b/test/persistence_client_library_test.c
+index 7382ab4..fd92be1 100644
+--- a/test/persistence_client_library_test.c
++++ b/test/persistence_client_library_test.c
+@@ -1578,7 +1578,7 @@ END_TEST
+ START_TEST(test_PAS_DbusInterface)
+ {
+ // let the administration servis generate a message to the PCL
+- if(system("/usr/local/bin/persadmin_tool export /tmp/myBackup 0") == -1)
++ if(system("/usr/bin/persadmin_tool export /tmp/myBackup 0") == -1)
+ {
+ printf("Failed to execute command -> admin service!!\n");
+ }
+--
+1.9.1
+
diff --git a/meta-ivi/recipes-extended/persistence-client-library/persistence-client-library/0001-load-correct-version-of-libpers_common.patch b/meta-ivi/recipes-extended/persistence-client-library/persistence-client-library/0001-load-correct-version-of-libpers_common.patch
new file mode 100644
index 0000000..5bf6aae
--- /dev/null
+++ b/meta-ivi/recipes-extended/persistence-client-library/persistence-client-library/0001-load-correct-version-of-libpers_common.patch
@@ -0,0 +1,29 @@
+From 58c25a1bee0e65aa273af3958675b9db398851ee Mon Sep 17 00:00:00 2001
+From: Igor Socec <igor.socec@pelagicore.com>
+Date: Thu, 25 Feb 2016 09:52:15 +0100
+Subject: [PATCH] load correct version of libpers_common
+
+Signed-off-by: Igor Socec <igor.socec@pelagicore.com>
+---
+ config/pclCustomLibConfigFile.cfg | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/config/pclCustomLibConfigFile.cfg b/config/pclCustomLibConfigFile.cfg
+index fe95ea0..f8e0877 100644
+--- a/config/pclCustomLibConfigFile.cfg
++++ b/config/pclCustomLibConfigFile.cfg
+@@ -1,8 +1,8 @@
+ hwinfo /usr/lib/libhwinfoperscustom.so init async
+ secure /usr/lib/libsecureperscustom.so od sync
+ custom3 /usr/lib/libcustom3perscustom.so init sync
+-default /usr/lib/libpers_common.so.1 init sync
++default /usr/lib/libpers_common.so.0 init sync
+ emergency /usr/lib/libemergencyperscustom.so od async
+ early /usr/lib/libearlyperscustom.so od sync
+ anInvalidEntry /wrongPath/wrongLib do cnys
+-custom2 /usr/lib/libcustom2perscustom.so init sync
+\ No newline at end of file
++custom2 /usr/lib/libcustom2perscustom.so init sync
+--
+2.1.4
+
diff --git a/meta-ivi/recipes-extended/persistence-client-library/persistence-client-library_1.0.0.bb b/meta-ivi/recipes-extended/persistence-client-library/persistence-client-library_1.1.0.bb
index 0054e30..bbaf9a5 100644
--- a/meta-ivi/recipes-extended/persistence-client-library/persistence-client-library_1.0.0.bb
+++ b/meta-ivi/recipes-extended/persistence-client-library/persistence-client-library_1.1.0.bb
@@ -1,7 +1,7 @@
SUMMARY = "GENIVI Persistence Client Library"
DESCRIPTION = "The Persistence Management is responsible to handle \
-persistent data, including all data read and modified often during \
-a lifetime of an infotainment system."
+ persistent data, including all data read and modified often during \
+ a lifetime of an infotainment system."
HOMEPAGE = "http://projects.genivi.org/persistence-client-library"
BUGTRACKER = "http://bugs.genivi.org/enter_bug.cgi?product=Persistence"
LICENSE = "MPLv2"
@@ -9,9 +9,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6161c6840f21a000e9b52af81d2ca823"
DEPENDS = "dlt-daemon dbus libcheck persistence-common-object"
+SRCREV = "4b503da99c6b04ad21a197dafe6e7243187c7c7e"
SRC_URI = " \
- git://git.projects.genivi.org/persistence/persistence-client-library.git;tag=v${PV} \
- file://0001-Fix-cast-on-64bit-machines.patch \
+ git://git.projects.genivi.org/persistence/persistence-client-library.git \
+ file://0001-load-correct-version-of-libpers_common.patch \
+ file://0001-fix-exec-path.patch \
"
S = "${WORKDIR}/git"
@@ -19,11 +21,18 @@ inherit pkgconfig autotools-brokensep
PARALLEL_MAKE = ""
-FILES_${PN} = " \
- ${libdir}/*.so \
+# .so files are the actual libraries
+FILES_SOLIBSDEV = ""
+#SOLIBS = "${SOLIBSDEV}"
+
+FILES_${PN} += " \
+ ${libdir}/lib*custom.so \
${libdir}/*.so.* \
${sysconfdir} \
"
+FILES_${PN}-dev += " \
+ ${libdir}/libpersistence_client_library.so \
+ "
do_install_append() {
install -d ${D}${sysconfdir}/dbus-1/system.d
diff --git a/meta-ivi/recipes-extended/persistence-common-object/persistence-common-object_1.0.3.bb b/meta-ivi/recipes-extended/persistence-common-object/persistence-common-object_1.0.3.bb
index dd9e4fe..2ba5c88 100644
--- a/meta-ivi/recipes-extended/persistence-common-object/persistence-common-object_1.0.3.bb
+++ b/meta-ivi/recipes-extended/persistence-common-object/persistence-common-object_1.0.3.bb
@@ -5,19 +5,21 @@ SECTION = "base"
LICENSE = "MPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=815ca599c9df247a0c7f619bab123dad"
+SRCREV = "b27fe577fcef7bf57d8d287f56e8dfd6ac60b1f0"
SRC_URI = " \
- git://git.projects.genivi.org/persistence/persistence-common-object.git;tag=${PV} \
+ git://git.projects.genivi.org/persistence/persistence-common-object.git \
file://configure.ac-fix-typo.patch \
file://B251_typedef_uint64_t.patch \
"
-#link for bug 251 in bugzilla https://bugs.genivi.org/show_bug.cgi?id=251
+S = "${WORKDIR}/git"
DEPENDS = "glib-2.0 libitzam dlt-daemon"
-S = "${WORKDIR}/git"
-
inherit autotools-brokensep pkgconfig
-EXTRA_OECONF = "--with-dbuspolicydir=${sysconfdir}"
+EXTRA_OECONF = " \
+ --with-dbuspolicydir=${sysconfdir} \
+ --with-database=key-value-store \
+ "
FILES_${PN} += "${datadir}"
diff --git a/meta-ivi/recipes-graphics/cairo/cairo_%.bbappend b/meta-ivi/recipes-graphics/cairo/cairo_%.bbappend
new file mode 100644
index 0000000..1320a00
--- /dev/null
+++ b/meta-ivi/recipes-graphics/cairo/cairo_%.bbappend
@@ -0,0 +1,16 @@
+PR = "r1"
+
+# remove this packages because of license
+PACKAGES_remove =+ "\
+ cairo-perf-utils \
+ cairo-script-interpreter \
+"
+
+do_install_append () {
+ rm -f ${D}${bindir}/cairo-trace
+ rm -f ${D}${libdir}/cairo/libcairo-trace.so*
+
+ rmdir ${D}${bindir}
+
+ rm -f ${D}${libdir}/libcairo-script-interpreter.so*
+}
diff --git a/meta-ivi/recipes-graphics/layer-management/layer-management-git/include-unistd-for-alarm-in-example.patch b/meta-ivi/recipes-graphics/layer-management/layer-management-git/include-unistd-for-alarm-in-example.patch
deleted file mode 100644
index 20896b4..0000000
--- a/meta-ivi/recipes-graphics/layer-management/layer-management-git/include-unistd-for-alarm-in-example.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: git/LayerManagerExamples/LayerManagerControl/src/commands.cpp
-===================================================================
---- git.orig/LayerManagerExamples/LayerManagerControl/src/commands.cpp 2012-07-12 16:51:49.695274924 +0300
-+++ git/LayerManagerExamples/LayerManagerControl/src/commands.cpp 2012-07-12 16:52:03.231275452 +0300
-@@ -21,6 +21,7 @@
- #include "ExpressionInterpreter.h"
- #include <iostream>
- #include <signal.h> // signal
-+#include <unistd.h>
-
- using namespace std;
-
diff --git a/meta-ivi/recipes-graphics/layer-management/layer-management-git/include-unistd-for-usleep-in-OpenGLES2App.patch b/meta-ivi/recipes-graphics/layer-management/layer-management-git/include-unistd-for-usleep-in-OpenGLES2App.patch
deleted file mode 100644
index 87a9379..0000000
--- a/meta-ivi/recipes-graphics/layer-management/layer-management-git/include-unistd-for-usleep-in-OpenGLES2App.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Include unistd.h in OpenGLES2App.cpp as usleep is used in code
-
-Signed-off-by: Andrei Gherzan <andrei.gherzan@windriver.com>
-Upstream-status: Pending
-
-Index: git/LayerManagerExamples/EGLX11MockNavigation/src/OpenGLES2App.cpp
-===================================================================
---- git.orig/LayerManagerExamples/EGLX11MockNavigation/src/OpenGLES2App.cpp 2012-05-16 13:52:30.114057234 +0300
-+++ git/LayerManagerExamples/EGLX11MockNavigation/src/OpenGLES2App.cpp 2012-05-16 13:52:46.674056640 +0300
-@@ -28,6 +28,8 @@
- #include <math.h>
- #include <sys/time.h>
-
-+#include <unistd.h>
-+
- #define RUNTIME_IN_MS() (GetTickCount() - startTimeInMS)
-
- // Max width and height of the window
diff --git a/meta-ivi/recipes-graphics/layer-management/layer-management-git/point-to-internal-CMakeVersions.patch b/meta-ivi/recipes-graphics/layer-management/layer-management-git/point-to-internal-CMakeVersions.patch
deleted file mode 100644
index 5fd080f..0000000
--- a/meta-ivi/recipes-graphics/layer-management/layer-management-git/point-to-internal-CMakeVersions.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: git/CMakeLists.txt
-===================================================================
---- git.orig/CMakeLists.txt 2012-02-16 13:02:02.257718578 +0200
-+++ git/CMakeLists.txt 2012-02-16 13:02:20.217968698 +0200
-@@ -22,7 +22,7 @@
-
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/")
-
--include(${CMAKE_MODULE_PATH}/CMakeVersions.txt)
-+include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/CMakeVersions.txt)
-
- # set default build type, if not defined by user
- if (NOT CMAKE_BUILD_TYPE)
diff --git a/meta-ivi/recipes-graphics/layer-management/layer-management/layermanager.service b/meta-ivi/recipes-graphics/layer-management/layer-management/layermanager.service
deleted file mode 100644
index 1540d79..0000000
--- a/meta-ivi/recipes-graphics/layer-management/layer-management/layermanager.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=LayerManager Service from Genivi
-Requires=X.service
-After=X.service
-
-[Service]
-Type=dbus
-BusName=org.genivi.layermanagementservice
-ExecStartPre=/bin/sleep 1
-ExecStart=/usr/bin/LayerManagerService
-TimeoutSec=2s
-
-[Install]
-WantedBy=multi-user.target.wants \ No newline at end of file
diff --git a/meta-ivi/recipes-graphics/layer-management/layer-management_1.1.bb b/meta-ivi/recipes-graphics/layer-management/layer-management_1.1.bb
deleted file mode 100644
index 6a261fb..0000000
--- a/meta-ivi/recipes-graphics/layer-management/layer-management_1.1.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-DESCRIPTION = "LayerManager"
-HOMEPAGE = "https://www.genivi.org/"
-SECTION = "environment/base"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=071e6b9a5eb9fc5868edf57ce153e5b9"
-
-DEPENDS = "virtual/egl dbus libxcomposite libxdamage"
-
-SRCREV = "5e2f490b40b8b60a0efbd2b244be44d93bc081f6"
-PR = "r1"
-
-SRC_URI = " \
- git://git.projects.genivi.org/layer_management.git;protocol=git \
- file://layermanager.service \
- "
-
-S = "${WORKDIR}/git"
-
-inherit gettext cmake systemd
-
-SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE_${PN} = "layermanager.service"
-SYSTEMD_AUTO_ENABLE = "disable"
-
-EXTRA_OECMAKE += "-DWITH_EXAMPLE_SCENE_PROVIDER=ON"
-
-FILES_${PN} += " \
- ${libdir}/lib* \
- ${libdir}/layermanager/lib* \
- ${libdir}/layermanager/communicator/lib* \
- ${libdir}/layermanager/ipcmodules/lib* \
- ${libdir}/layermanager/renderer/lib* \
- ${libdir}/layermanager/renderer/renderer* \
- ${libdir}/layermanager/sceneprovider/* \
- ${systemd_unitdir}/system/layermanager.service \
- "
-
-FILES_${PN}-dev = " \
- ${includedir}/* \
- "
-FILES_${PN}-staticdev += " \
- ${libdir}/layermanager/static/lib* \
- "
-FILES_${PN}-dbg += " \
- ${libdir}/layermanager/.debug/ \
- ${libdir}/layermanager/communicator/.debug/ \
- ${libdir}/layermanager/ipcmodules/.debug/ \
- ${libdir}/layermanager/renderer/.debug/ \
- ${libdir}/layermanager/sceneprovider/.debug/ \
- "
-
-do_install_append() {
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- install -d ${D}${systemd_unitdir}/system/
- install -m 0644 ${WORKDIR}/layermanager.service ${D}${systemd_unitdir}/system
- fi
-}
diff --git a/meta-ivi/recipes-graphics/layer-management/layer-management_git.bb b/meta-ivi/recipes-graphics/layer-management/layer-management_git.bb
deleted file mode 100644
index 9af452d..0000000
--- a/meta-ivi/recipes-graphics/layer-management/layer-management_git.bb
+++ /dev/null
@@ -1,56 +0,0 @@
-DESCRIPTION = "LayerManager"
-
-HOMEPAGE = "https://www.genivi.org/"
-SECTION = "environment/base"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=249d3578d6bba1bb946148d367a28080"
-
-DEPENDS = "virtual/egl dbus libxcomposite"
-
-PR = "r3"
-
-SRCREV = "86c2dc9ef367b52fd5d05b53cbad5e21b9ab042f"
-
-DEFAULT_PREFERENCE = "-1"
-
-SRC_URI = "git://git.projects.genivi.org/layer_management.git;protocol=git \
- file://point-to-internal-CMakeVersions.patch \
- file://include-unistd-for-usleep-in-OpenGLES2App.patch \
- file://include-unistd-for-alarm-in-example.patch \
- file://layermanager.service \
- "
-# Needed this for imx6 boards to use precompiled EGL libraries
-python () {
- if ((d.getVar("MACHINE", True) or "").find("imx6") != -1):
- flags = d.getVar("OECMAKE_CXX_FLAGS", True)
- flags += " -DLINUX"
- d.setVar('OECMAKE_CXX_FLAGS', flags)
-}
-
-S = "${WORKDIR}/git"
-
-inherit autotools gettext cmake
-
-do_install_append() {
- install -d ${D}/${libdir}/systemd/system
- install -m 0755 ${WORKDIR}/layermanager.service ${D}/${libdir}/systemd/system
- install -m 0755 ${WORKDIR}/layermanager_demo.service ${D}/${libdir}/systemd/system
-}
-
-FILES_${PN} += "${libdir}/lib* \
- ${libdir}/layermanager/lib* \
- ${libdir}/layermanager/communicator/lib* \
- ${libdir}/layermanager/ipcmodules/lib* \
- ${libdir}/layermanager/renderer/lib* \
- ${libdir}/layermanager/renderer/renderer* \
- ${libdir}/systemd"
-
-FILES_${PN}-dev = "${includedir}/*"
-FILES_${PN}-staticdev += "${libdir}/layermanager/static/lib*"
-FILES_${PN}-dbg += "${libdir}/layermanager/.debug/ \
- ${libdir}/layermanager/communicator/.debug/ \
- ${libdir}/layermanager/ipcmodules/.debug/ \
- ${libdir}/layermanager/renderer/.debug/ "
-
-WARN_QA = "ldflags useless-rpaths rpaths staticdev"
diff --git a/meta-ivi/recipes-graphics/wayland/libinput_1.1.1.bb b/meta-ivi/recipes-graphics/wayland/libinput_1.1.1.bb
new file mode 100644
index 0000000..1ab2859
--- /dev/null
+++ b/meta-ivi/recipes-graphics/wayland/libinput_1.1.1.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Library to handle input devices in Wayland compositors"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2184aef38ff137ed33ce9a63b9d1eb8f"
+
+DEPENDS = "libevdev udev mtdev"
+
+SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \
+"
+SRC_URI[md5sum] = "4a3fc842ac0b7bf0fa306ea7badc31a0"
+SRC_URI[sha256sum] = "2de2b433ddc73ba1bfd4d309fd873d0ced6937cf1a7a94e4afbf18ddd8f8dd17"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
+PACKAGECONFIG[gui] = "--enable-event-gui,--disable-event-gui,cairo gtk+3"
+
+FILES_${PN} += "${libdir}/udev/"
+FILES_${PN}-dbg += "${libdir}/udev/.debug"
diff --git a/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/0001-buildsystem-make-example-programs-link-to-the-genera.patch b/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/0001-buildsystem-make-example-programs-link-to-the-genera.patch
new file mode 100644
index 0000000..37459f2
--- /dev/null
+++ b/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/0001-buildsystem-make-example-programs-link-to-the-genera.patch
@@ -0,0 +1,97 @@
+From ef3507c482a342661ce8075f78359e653a4486cd Mon Sep 17 00:00:00 2001
+From: Frederico Cadete <frederico.cadete@awtce.be>
+Date: Thu, 17 Mar 2016 16:55:31 +0100
+Subject: [PATCH] buildsystem: make example programs link to the generated
+ protocols library
+
+This avoids redefining the generation of protocol files
+and fixes builds with parallel make (the header generation was missing).
+
+Signed-off-by: Frederico Cadete <frederico.cadete@awtce.be>
+---
+ .../multi-touch-viewer/CMakeLists.txt | 10 +---------
+ .../simple-ivi-share/CMakeLists.txt | 19 +------------------
+ 2 files changed, 2 insertions(+), 27 deletions(-)
+
+diff --git a/ivi-layermanagement-examples/multi-touch-viewer/CMakeLists.txt b/ivi-layermanagement-examples/multi-touch-viewer/CMakeLists.txt
+index 42f7d22..87623fe 100644
+--- a/ivi-layermanagement-examples/multi-touch-viewer/CMakeLists.txt
++++ b/ivi-layermanagement-examples/multi-touch-viewer/CMakeLists.txt
+@@ -25,14 +25,6 @@ project (generate-protocol-src)
+
+ find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner)
+
+-add_custom_command(
+- OUTPUT ivi-application-protocol.c
+- COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code
+- < ${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml
+- > ${CMAKE_CURRENT_BINARY_DIR}/ivi-application-protocol.c
+- DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml
+-)
+-
+ ################################################################
+
+ project (multi-touch-viewer)
+@@ -61,6 +53,7 @@ link_directories(
+
+ SET(LIBS
+ ${LIBS}
++ ivi-extension-protocol
+ ${GLESv2_LIBRARIES}
+ ${WAYLAND_CLIENT_LIBRARIES}
+ ${WAYLAND_EGL_LIBRARIES}
+@@ -82,7 +75,6 @@ set(HEADER_FILES
+
+ add_executable(${PROJECT_NAME}
+ ${SRC_FILES}
+- ${CMAKE_CURRENT_BINARY_DIR}/ivi-application-protocol.c
+ )
+
+ add_dependencies(${PROJECT_NAME} ${LIBS})
+diff --git a/ivi-layermanagement-examples/simple-ivi-share/CMakeLists.txt b/ivi-layermanagement-examples/simple-ivi-share/CMakeLists.txt
+index 248eafd..7401d08 100644
+--- a/ivi-layermanagement-examples/simple-ivi-share/CMakeLists.txt
++++ b/ivi-layermanagement-examples/simple-ivi-share/CMakeLists.txt
+@@ -25,22 +25,6 @@ project (generate-protocol-src)
+
+ find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner)
+
+-add_custom_command(
+- OUTPUT ivi-application-protocol.c
+- COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code
+- < ${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml
+- > ${CMAKE_CURRENT_BINARY_DIR}/ivi-application-protocol.c
+- DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml
+-)
+-
+-add_custom_command(
+- OUTPUT ivi-share-protocol.c
+- COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code
+- < ${CMAKE_SOURCE_DIR}/protocol/ivi-share.xml
+- > ${CMAKE_CURRENT_BINARY_DIR}/ivi-share-protocol.c
+- DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-share.xml
+-)
+-
+ ################################################################
+
+ project (simple-ivi-share)
+@@ -69,6 +53,7 @@ link_directories(
+
+ SET(LIBS
+ ${LIBS}
++ ivi-extension-protocol
+ ${GLESv2_LIBRARIES}
+ ${WAYLAND_CLIENT_LIBRARIES}
+ ${WAYLAND_EGL_LIBRARIES}
+@@ -82,8 +67,6 @@ SET(SRC_FILES
+
+ add_executable(${PROJECT_NAME}
+ ${SRC_FILES}
+- ${CMAKE_CURRENT_BINARY_DIR}/ivi-application-protocol.c
+- ${CMAKE_CURRENT_BINARY_DIR}/ivi-share-protocol.c
+ )
+
+ add_dependencies(${PROJECT_NAME} ${LIBS})
+--
+1.9.1
+
diff --git a/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/apply_weston-1.5.x.patch b/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/apply_weston-1.5.x.patch
deleted file mode 100644
index 8cbbdd1..0000000
--- a/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/apply_weston-1.5.x.patch
+++ /dev/null
@@ -1,249 +0,0 @@
-From fb66405f4f8ee200a443e22d3b4f56a0e917f785 Mon Sep 17 00:00:00 2001
-From: Manuel Bachmann <mbc@iot.bzh>
-Date: Wed, 30 Sep 2015 05:22:25 +0200
-Subject: [PATCH] Backport to Wayland/Weston 1.9.0 > 1.5.0.
-
-Downgrade requirements to Wayland/Weston 1.9.0 > 1.5.0.
-
-"wl_display_roundtrip_queue()" did not exist at the time,
-so just use the wrapper functions instead.
-
-Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
----
- .../ilmClient/src/ilm_client_wayland_platform.c | 15 ++----
- .../ilmControl/src/ilm_control_wayland_platform.c | 52 +++++++++++++++++---
- protocol/CMakeLists.txt | 4 +-
- weston-ivi-shell/CMakeLists.txt | 4 +-
- weston-ivi-shell/src/ivi-extension.c | 9 +++-
- weston-ivi-shell/src/ivi-layout-export.h | 2 +
- 6 files changed, 63 insertions(+), 23 deletions(-)
-
-diff --git a/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c b/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c
-index 55b1621..8730616 100644
---- a/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c
-+++ b/ivi-layermanagement-api/ilmClient/src/ilm_client_wayland_platform.c
-@@ -61,7 +61,6 @@ struct ilm_client_context {
- struct wl_registry *registry;
- struct wl_compositor *compositor;
- struct ivi_application *ivi_application;
-- struct wl_event_queue *queue;
-
- struct wl_list list_surface;
-
-@@ -167,12 +166,6 @@ destroy_client_resouses(void)
- ctx->ivi_application = NULL;
- }
-
-- if (ctx->queue)
-- {
-- wl_event_queue_destroy(ctx->queue);
-- ctx->queue = NULL;
-- }
--
- if (ctx->registry)
- {
- wl_registry_destroy(ctx->registry);
-@@ -203,21 +196,19 @@ init_client(void)
-
- wl_list_init(&ctx->list_surface);
-
-- ctx->queue = wl_display_create_queue(ctx->display);
- ctx->registry = wl_display_get_registry(ctx->display);
- if (ctx->registry == NULL) {
-- wl_event_queue_destroy(ctx->queue);
- fprintf(stderr, "Failed to get registry\n");
- return;
- }
-
-- wl_proxy_set_queue((void*)ctx->registry, ctx->queue);
- if (wl_registry_add_listener(ctx->registry,
- &registry_client_listener, ctx)) {
- fprintf(stderr, "Failed to add registry listener\n");
- return;
- }
-- wl_display_roundtrip_queue(ctx->display, ctx->queue);
-+ wl_display_dispatch(ctx->display);
-+ wl_display_roundtrip(ctx->display);
-
- if ((ctx->display == NULL) || (ctx->ivi_application == NULL)) {
- fprintf(stderr, "Failed to connect display at ilm_client\n");
-@@ -239,7 +230,7 @@ get_client_instance(void)
- exit(0);
- }
-
-- wl_display_roundtrip_queue(ctx->display, ctx->queue);
-+ wl_display_roundtrip(ctx->display);
-
- return ctx;
- }
-diff --git a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
-index 8910df5..61bdfc5 100644
---- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
-+++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
-@@ -76,6 +76,46 @@ struct screen_context {
- struct ilm_control_context *ctx;
- };
-
-+static void roundtrip_done(void *data, struct wl_callback *callback,
-+ uint32_t serial)
-+{
-+ (void) serial;
-+
-+ *(int *)data = 1;
-+
-+ wl_callback_destroy(callback);
-+}
-+
-+static struct wl_callback_listener roundtrip_listener = {roundtrip_done};
-+
-+int display_roundtrip_queue(struct wl_display *display,
-+ struct wl_event_queue *queue)
-+{
-+ int done = 0;
-+ int ret = 0;
-+ struct wl_callback *callback = wl_display_sync(display);
-+
-+ if (! callback)
-+ {
-+ return -1;
-+ }
-+
-+ wl_proxy_set_queue((void *)callback, queue);
-+ wl_callback_add_listener(callback, &roundtrip_listener, &done);
-+
-+ while (ret != -1 && !done)
-+ {
-+ ret = wl_display_dispatch_queue(display, queue);
-+ }
-+
-+ if (ret == -1 && !done)
-+ {
-+ wl_callback_destroy(callback);
-+ }
-+
-+ return ret;
-+}
-+
- static inline void lock_context(struct ilm_control_context *ctx)
- {
- pthread_mutex_lock(&ctx->mutex);
-@@ -1304,11 +1344,11 @@ init_control(void)
-
- if (
- // first level objects; ivi_controller
-- wl_display_roundtrip_queue(wl->display, wl->queue) == -1 ||
-+ display_roundtrip_queue(wl->display, wl->queue) == -1 ||
- // second level object: ivi_controller_surfaces/layers
-- wl_display_roundtrip_queue(wl->display, wl->queue) == -1 ||
-+ display_roundtrip_queue(wl->display, wl->queue) == -1 ||
- // third level objects: ivi_controller_surfaces/layers properties
-- wl_display_roundtrip_queue(wl->display, wl->queue) == -1)
-+ display_roundtrip_queue(wl->display, wl->queue) == -1)
- {
- fprintf(stderr, "Failed to initialize wayland connection: %s\n", strerror(errno));
- return -1;
-@@ -1349,7 +1389,7 @@ ilmErrorTypes impl_sync_and_acquire_instance(struct ilm_control_context *ctx)
-
- lock_context(ctx);
-
-- if (wl_display_roundtrip_queue(ctx->wl.display, ctx->wl.queue) == -1) {
-+ if (display_roundtrip_queue(ctx->wl.display, ctx->wl.queue) == -1) {
- int err = wl_display_get_error(ctx->wl.display);
- fprintf(stderr, "Error communicating with wayland: %s\n", strerror(err));
- unlock_context(ctx);
-@@ -2454,7 +2494,7 @@ ilm_getPropertiesOfSurface(t_ilm_uint surfaceID,
- // request statistics for surface
- ivi_controller_surface_send_stats(ctx_surf->controller);
- // force submission
-- int ret = wl_display_roundtrip_queue(ctx->wl.display, ctx->wl.queue);
-+ int ret = display_roundtrip_queue(ctx->wl.display, ctx->wl.queue);
-
- // If we got an error here, there is really no sense
- // in returning the properties as something is fundamentally
-@@ -2567,7 +2607,7 @@ ilm_commitChanges(void)
- if (ctx->wl.controller != NULL) {
- ivi_controller_commit_changes(ctx->wl.controller);
-
-- if (wl_display_roundtrip_queue(ctx->wl.display, ctx->wl.queue) != -1)
-+ if (display_roundtrip_queue(ctx->wl.display, ctx->wl.queue) != -1)
- {
- returnValue = ILM_SUCCESS;
- }
-diff --git a/protocol/CMakeLists.txt b/protocol/CMakeLists.txt
-index 6842131..207b8f1 100644
---- a/protocol/CMakeLists.txt
-+++ b/protocol/CMakeLists.txt
-@@ -22,8 +22,8 @@ cmake_minimum_required (VERSION 2.6)
- project(ivi-extension-protocol)
-
- find_package(PkgConfig REQUIRED)
--pkg_check_modules(WAYLAND_CLIENT wayland-client>=1.9.0 REQUIRED)
--pkg_check_modules(WAYLAND_SERVER wayland-server>=1.9.0 REQUIRED)
-+pkg_check_modules(WAYLAND_CLIENT wayland-client>=1.5.0 REQUIRED)
-+pkg_check_modules(WAYLAND_SERVER wayland-server>=1.5.0 REQUIRED)
-
- find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner)
-
-diff --git a/weston-ivi-shell/CMakeLists.txt b/weston-ivi-shell/CMakeLists.txt
-index c2664df..927e3f5 100644
---- a/weston-ivi-shell/CMakeLists.txt
-+++ b/weston-ivi-shell/CMakeLists.txt
-@@ -23,8 +23,8 @@ cmake_minimum_required (VERSION 2.6)
- project(ivi-controller)
-
- find_package(PkgConfig REQUIRED)
--pkg_check_modules(WAYLAND_SERVER wayland-server>=1.9.0 REQUIRED)
--pkg_check_modules(WESTON weston>=1.9.0 REQUIRED)
-+pkg_check_modules(WAYLAND_SERVER wayland-server>=1.5.0 REQUIRED)
-+pkg_check_modules(WESTON weston>=1.5.0 REQUIRED)
- pkg_check_modules(PIXMAN pixman-1 REQUIRED)
-
- GET_TARGET_PROPERTY(IVI_EXTENSION_INCLUDE_DIRS ivi-extension-protocol INCLUDE_DIRECTORIES)
-diff --git a/weston-ivi-shell/src/ivi-extension.c b/weston-ivi-shell/src/ivi-extension.c
-index bb3b23d..ba2d7e6 100755
---- a/weston-ivi-shell/src/ivi-extension.c
-+++ b/weston-ivi-shell/src/ivi-extension.c
-@@ -702,11 +702,17 @@ ivi_extension_layer_set_fade_info(struct ivishell *shell,
- start_alpha, end_alpha);
- }
-
-+#if 0 // this is for weston/wayland 1.7.0
- WL_EXPORT int
- controller_module_init(struct weston_compositor *compositor,
- int *argc, char *argv[],
- const struct ivi_controller_interface *interface,
- size_t interface_version)
-+#else
-+WL_EXPORT int
-+module_init(struct weston_compositor *compositor,
-+ int *argc, char *argv[])
-+#endif
- {
- struct ivi_controller_shell *controller_shell;
- (void)argc;
-@@ -718,7 +724,8 @@ controller_module_init(struct weston_compositor *compositor,
-
- memset(controller_shell, 0, sizeof *controller_shell);
-
-- controller_shell->interface = interface;
-+ //controller_shell->interface = interface;
-+ controller_shell->interface = get_ivi_controller_interface();
-
- init_ivi_shell(compositor, &controller_shell->base);
-
-diff --git a/weston-ivi-shell/src/ivi-layout-export.h b/weston-ivi-shell/src/ivi-layout-export.h
-index d38d6ea..e07acb2 100644
---- a/weston-ivi-shell/src/ivi-layout-export.h
-+++ b/weston-ivi-shell/src/ivi-layout-export.h
-@@ -169,6 +169,8 @@ typedef void (*ivi_controller_surface_content_callback)(
- struct ivi_layout_surface *ivisurf,
- int32_t content,
- void *userdata);
-+
-+struct ivi_controller_interface *get_ivi_controller_interface(void);
- #ifdef __cplusplus
- }
- #endif /* __cplusplus */
---
-1.7.9.5
-
diff --git a/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/apply_weston-1.6.x.patch b/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/apply_weston-1.6.x.patch
deleted file mode 100644
index 7f8ef4e..0000000
--- a/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/apply_weston-1.6.x.patch
+++ /dev/null
@@ -1,2135 +0,0 @@
-diff --git a/weston-ivi-shell/src/ivi-controller.c b/weston-ivi-shell/src/ivi-controller.c
-index f341454..049859e 100755
---- a/weston-ivi-shell/src/ivi-controller.c
-+++ b/weston-ivi-shell/src/ivi-controller.c
-@@ -202,7 +202,7 @@ destroy_ivicontroller_layer(struct wl_resource *resource)
- struct ivicontroller_layer *next = NULL;
- uint32_t id_layer = 0;
-
-- id_layer = ivi_layout_getIdOfLayer(ivilayer->layout_layer);
-+ id_layer = ivi_layout_get_id_of_layer(ivilayer->layout_layer);
-
- wl_list_for_each_safe(ctrllayer, next,
- &shell->list_controller_layer, link) {
-@@ -222,7 +222,7 @@ destroy_ivicontroller_layer(struct wl_resource *resource)
- if ((ivilayer->layout_layer != NULL) &&
- (ivilayer->controller_layer_count == 0) &&
- (ivilayer->layer_canbe_removed == 1)) {
-- ivi_layout_layerRemove(ivilayer->layout_layer);
-+ ivi_layout_layer_remove(ivilayer->layout_layer);
- }
- }
-
-@@ -271,7 +271,7 @@ get_surface(struct wl_list *list_surf, uint32_t id_surface)
- uint32_t ivisurf_id = 0;
-
- wl_list_for_each(ivisurf, list_surf, link) {
-- ivisurf_id = ivi_layout_getIdOfSurface(ivisurf->layout_surface);
-+ ivisurf_id = ivi_layout_get_id_of_surface(ivisurf->layout_surface);
- if (ivisurf_id == id_surface) {
- return ivisurf;
- }
-@@ -287,7 +287,7 @@ get_layer(struct wl_list *list_layer, uint32_t id_layer)
- uint32_t ivilayer_id = 0;
-
- wl_list_for_each(ivilayer, list_layer, link) {
-- ivilayer_id = ivi_layout_getIdOfLayer(ivilayer->layout_layer);
-+ ivilayer_id = ivi_layout_get_id_of_layer(ivilayer->layout_layer);
- if (ivilayer_id == id_layer) {
- return ivilayer;
- }
-@@ -361,7 +361,7 @@ send_surface_add_event(struct ivisurface *ivisurf,
- struct wl_client *surface_client = wl_resource_get_client(resource);
- int found = 0;
-
-- ans = ivi_layout_getLayersUnderSurface(ivisurf->layout_surface,
-+ ans = ivi_layout_get_layers_under_surface(ivisurf->layout_surface,
- &length, &pArray);
- if (0 != ans) {
- weston_log("failed to get layers at send_surface_add_event\n");
-@@ -389,7 +389,7 @@ send_surface_add_event(struct ivisurface *ivisurf,
- }
-
- id_layout_layer =
-- ivi_layout_getIdOfLayer(ivilayer->layout_layer);
-+ ivi_layout_get_id_of_layer(ivilayer->layout_layer);
- wl_list_for_each(ctrllayer, &shell->list_controller_layer, link) {
- if (id_layout_layer != ctrllayer->id_layer) {
- continue;
-@@ -412,7 +412,7 @@ send_surface_add_event(struct ivisurface *ivisurf,
- static void
- send_surface_event(struct wl_resource *resource,
- struct ivisurface *ivisurf,
-- struct ivi_layout_SurfaceProperties *prop,
-+ struct ivi_layout_surface_properties *prop,
- uint32_t mask)
- {
- if (mask & IVI_NOTIFICATION_OPACITY) {
-@@ -421,13 +421,13 @@ send_surface_event(struct wl_resource *resource,
- }
- if (mask & IVI_NOTIFICATION_SOURCE_RECT) {
- ivi_controller_surface_send_source_rectangle(resource,
-- prop->sourceX, prop->sourceY,
-- prop->sourceWidth, prop->sourceHeight);
-+ prop->source_x, prop->source_y,
-+ prop->source_width, prop->source_height);
- }
- if (mask & IVI_NOTIFICATION_DEST_RECT) {
- ivi_controller_surface_send_destination_rectangle(resource,
-- prop->destX, prop->destY,
-- prop->destWidth, prop->destHeight);
-+ prop->dest_x, prop->dest_y,
-+ prop->dest_width, prop->dest_height);
- }
- if (mask & IVI_NOTIFICATION_ORIENTATION) {
- ivi_controller_surface_send_orientation(resource,
-@@ -437,15 +437,6 @@ send_surface_event(struct wl_resource *resource,
- ivi_controller_surface_send_visibility(resource,
- prop->visibility);
- }
-- if (mask & IVI_NOTIFICATION_PIXELFORMAT) {
-- ivi_controller_surface_send_pixelformat(resource,
-- prop->pixelformat);
-- }
-- if (mask & IVI_NOTIFICATION_KEYBOARD_FOCUS) {
-- ivi_controller_surface_send_input_focus(resource,
-- IVI_CONTROLLER_SURFACE_INPUT_DEVICE_KEYBOARD,
-- prop->hasKeyboardFocus);
-- }
- if (mask & IVI_NOTIFICATION_REMOVE) {
- send_surface_add_event(ivisurf, resource, IVI_NOTIFICATION_REMOVE);
- }
-@@ -464,7 +455,7 @@ update_surface_prop(struct ivisurface *ivisurf,
- int i = 0;
- struct ivishell *shell = ivisurf->shell;
-
-- ans = ivi_layout_getLayersUnderSurface(ivisurf->layout_surface,
-+ ans = ivi_layout_get_layers_under_surface(ivisurf->layout_surface,
- &length, &pArray);
- if (0 != ans) {
- weston_log("failed to get layers at send_surface_add_event\n");
-@@ -511,7 +502,7 @@ update_surface_prop(struct ivisurface *ivisurf,
-
- static void
- send_surface_prop(struct ivi_layout_surface *layout_surface,
-- struct ivi_layout_SurfaceProperties *prop,
-+ struct ivi_layout_surface_properties *prop,
- enum ivi_layout_notification_mask mask,
- void *userdata)
- {
-@@ -520,7 +511,7 @@ send_surface_prop(struct ivi_layout_surface *layout_surface,
- struct ivicontroller_surface *ctrlsurf = NULL;
- uint32_t id_surface = 0;
-
-- id_surface = ivi_layout_getIdOfSurface(layout_surface);
-+ id_surface = ivi_layout_get_id_of_surface(layout_surface);
-
- wl_list_for_each(ctrlsurf, &shell->list_controller_surface, link) {
- if (id_surface != ctrlsurf->id_surface) {
-@@ -548,7 +539,7 @@ send_layer_add_event(struct ivilayer *ivilayer,
- struct wl_client *client = wl_resource_get_client(resource);
- struct wl_resource *resource_output = NULL;
-
-- ans = ivi_layout_getScreensUnderLayer(ivilayer->layout_layer,
-+ ans = ivi_layout_get_screens_under_layer(ivilayer->layout_layer,
- &length, &pArray);
- if (0 != ans) {
- weston_log("failed to get screens at send_layer_add_event\n");
-@@ -591,7 +582,7 @@ send_layer_add_event(struct ivilayer *ivilayer,
- static void
- send_layer_event(struct wl_resource *resource,
- struct ivilayer *ivilayer,
-- struct ivi_layout_LayerProperties *prop,
-+ struct ivi_layout_layer_properties *prop,
- uint32_t mask)
- {
- if (mask & IVI_NOTIFICATION_OPACITY) {
-@@ -600,17 +591,17 @@ send_layer_event(struct wl_resource *resource,
- }
- if (mask & IVI_NOTIFICATION_SOURCE_RECT) {
- ivi_controller_layer_send_source_rectangle(resource,
-- prop->sourceX,
-- prop->sourceY,
-- prop->sourceWidth,
-- prop->sourceHeight);
-+ prop->source_x,
-+ prop->source_y,
-+ prop->source_width,
-+ prop->source_height);
- }
- if (mask & IVI_NOTIFICATION_DEST_RECT) {
- ivi_controller_layer_send_destination_rectangle(resource,
-- prop->destX,
-- prop->destY,
-- prop->destWidth,
-- prop->destHeight);
-+ prop->dest_x,
-+ prop->dest_y,
-+ prop->dest_width,
-+ prop->dest_height);
- }
- if (mask & IVI_NOTIFICATION_ORIENTATION) {
- ivi_controller_layer_send_orientation(resource,
-@@ -638,7 +629,7 @@ update_layer_prop(struct ivilayer *ivilayer,
- struct link_screen *link_scrn = NULL;
- struct link_screen *next = NULL;
-
-- ans = ivi_layout_getScreensUnderLayer(ivilayer->layout_layer,
-+ ans = ivi_layout_get_screens_under_layer(ivilayer->layout_layer,
- &length, &pArray);
- if (0 != ans) {
- weston_log("failed to get screens at send_layer_add_event\n");
-@@ -687,7 +678,7 @@ update_layer_prop(struct ivilayer *ivilayer,
-
- static void
- send_layer_prop(struct ivi_layout_layer *layer,
-- struct ivi_layout_LayerProperties *prop,
-+ struct ivi_layout_layer_properties *prop,
- enum ivi_layout_notification_mask mask,
- void *userdata)
- {
-@@ -696,7 +687,7 @@ send_layer_prop(struct ivi_layout_layer *layer,
- struct ivishell *shell = ivilayer->shell;
- uint32_t id_layout_layer = 0;
-
-- id_layout_layer = ivi_layout_getIdOfLayer(layer);
-+ id_layout_layer = ivi_layout_get_id_of_layer(layer);
- wl_list_for_each(ctrllayer, &shell->list_controller_layer, link) {
- if (id_layout_layer != ctrllayer->id_layer) {
- continue;
-@@ -714,7 +705,7 @@ controller_surface_set_opacity(struct wl_client *client,
- {
- struct ivisurface *ivisurf = wl_resource_get_user_data(resource);
- (void)client;
-- ivi_layout_surfaceSetOpacity(ivisurf->layout_surface, (float)opacity);
-+ ivi_layout_surface_set_opacity(ivisurf->layout_surface, (float)opacity);
- }
-
- static void
-@@ -727,7 +718,7 @@ controller_surface_set_source_rectangle(struct wl_client *client,
- {
- struct ivisurface *ivisurf = wl_resource_get_user_data(resource);
- (void)client;
-- ivi_layout_surfaceSetSourceRectangle(ivisurf->layout_surface,
-+ ivi_layout_surface_set_source_rectangle(ivisurf->layout_surface,
- (uint32_t)x, (uint32_t)y, (uint32_t)width, (uint32_t)height);
- }
-
-@@ -743,11 +734,11 @@ controller_surface_set_destination_rectangle(struct wl_client *client,
- (void)client;
-
- // TODO: create set transition type protocol
-- ivi_layout_surfaceSetTransition( ivisurf->layout_surface,
-+ ivi_layout_surface_set_transition(ivisurf->layout_surface,
- IVI_LAYOUT_TRANSITION_NONE,
- 300); // ms
-
-- ivi_layout_surfaceSetDestinationRectangle(ivisurf->layout_surface,
-+ ivi_layout_surface_set_destination_rectangle(ivisurf->layout_surface,
- (uint32_t)x, (uint32_t)y, (uint32_t)width, (uint32_t)height);
- }
-
-@@ -758,7 +749,7 @@ controller_surface_set_visibility(struct wl_client *client,
- {
- struct ivisurface *ivisurf = wl_resource_get_user_data(resource);
- (void)client;
-- ivi_layout_surfaceSetVisibility(ivisurf->layout_surface, visibility);
-+ ivi_layout_surface_set_visibility(ivisurf->layout_surface, visibility);
- }
-
- static void
-@@ -780,7 +771,7 @@ controller_surface_set_orientation(struct wl_client *client,
- {
- struct ivisurface *ivisurf = wl_resource_get_user_data(resource);
- (void)client;
-- ivi_layout_surfaceSetOrientation(ivisurf->layout_surface, (uint32_t)orientation);
-+ ivi_layout_surface_set_orientation(ivisurf->layout_surface, (uint32_t)orientation);
- }
-
- static int
-@@ -941,7 +932,7 @@ clear_viewlist_but_specified_surface(struct weston_compositor *compositor,
- }
-
- static void
--get_gl_surface_rectangle(struct ivi_layout_SurfaceProperties *prop,
-+get_gl_surface_rectangle(struct ivi_layout_surface_properties *prop,
- int32_t *x,
- int32_t *y,
- int32_t *width,
-@@ -951,10 +942,10 @@ get_gl_surface_rectangle(struct ivi_layout_SurfaceProperties *prop,
- return;
- }
-
-- *x = prop->sourceX;
-- *y = prop->sourceY;
-- *width = prop->sourceWidth;
-- *height = prop->sourceHeight;
-+ *x = prop->source_x;
-+ *y = prop->source_y;
-+ *width = prop->source_width;
-+ *height = prop->source_height;
- }
-
- static int
-@@ -967,7 +958,7 @@ gl_surface_screenshot(struct ivisurface *ivisurf,
- struct weston_view *view = NULL;
- struct weston_output *output = NULL;
- struct iviscreen *link_scrn = NULL;
-- struct ivi_layout_SurfaceProperties prop = {};
-+ struct ivi_layout_surface_properties *prop;
- int32_t x = 0;
- int32_t y = 0;
- int32_t width = 0;
-@@ -984,7 +975,9 @@ gl_surface_screenshot(struct ivisurface *ivisurf,
- return -1;
- }
-
-- if (ivi_layout_getPropertiesOfSurface(ivisurf->layout_surface, &prop) != 0) {
-+ prop = (struct ivi_layout_surface_properties *)
-+ ivi_layout_get_properties_of_surface(ivisurf->layout_surface);
-+ if (prop == NULL) {
- fprintf(stderr, "Failed to get surface properties.");
- return -1;
- }
-@@ -997,7 +990,7 @@ gl_surface_screenshot(struct ivisurface *ivisurf,
- view->plane = &compositor->primary_plane;
- }
-
-- get_gl_surface_rectangle(&prop, &x, &y, &width, &height);
-+ get_gl_surface_rectangle(prop, &x, &y, &width, &height);
- dump_surface(link_scrn->output,
- compositor,
- filename,
-@@ -1026,13 +1019,13 @@ controller_surface_screenshot(struct wl_client *client,
- int32_t height = 0;
- int32_t stride = 0;
-
-- weston_surface = ivi_layout_surfaceGetWestonSurface(ivisurf->layout_surface);
-+ weston_surface = ivi_layout_surface_get_weston_surface(ivisurf->layout_surface);
- if (weston_surface == NULL) {
- fprintf(stderr, "Failed to get weston surface.\n");
- return;
- }
-
-- if (ivi_layout_surfaceGetSize(ivisurf->layout_surface, &width, &height, &stride) != 0) {
-+ if (ivi_layout_surface_get_size(ivisurf->layout_surface, &width, &height, &stride) != 0) {
- fprintf(stderr, "Failed to get surface size.\n");
- return;
- }
-@@ -1069,43 +1062,24 @@ controller_surface_destroy(struct wl_client *client,
- wl_resource_destroy(resource);
- }
-
--static void send_all_keyboard_focus(struct ivishell *shell)
--{
-- struct ivi_layout_SurfaceProperties props;
-- struct ivicontroller_surface *ctrlsurf;
-- struct ivisurface *current_surf;
-- uint32_t id_surface;
--
-- wl_list_for_each(current_surf, &shell->list_surface, link) {
-- ivi_layout_getPropertiesOfSurface(current_surf->layout_surface,
-- &props);
-- id_surface = ivi_layout_getIdOfSurface(current_surf->layout_surface);
-- wl_list_for_each(ctrlsurf, &shell->list_controller_surface, link) {
-- if (id_surface != ctrlsurf->id_surface) {
-- continue;
-- }
-- ivi_controller_surface_send_input_focus(ctrlsurf->resource,
-- IVI_CONTROLLER_SURFACE_INPUT_DEVICE_KEYBOARD,
-- props.hasKeyboardFocus);
-- }
-- }
--}
--
- static void
- controller_surface_set_input_focus(struct wl_client *client,
- struct wl_resource *resource,
- uint32_t device,
- int32_t enabled)
- {
-+ weston_log("%s: %p, %p, %x, %d\n", __FUNCTION__, client, resource, device, enabled);
-+#if 0
- (void)client;
- struct ivisurface *ivisurf = wl_resource_get_user_data(resource);
-
- if (device & IVI_CONTROLLER_SURFACE_INPUT_DEVICE_KEYBOARD) {
- if (enabled) {
-- ivi_layout_SetKeyboardFocusOn(ivisurf->layout_surface);
-+ ivi_layout_SetKeyboardFocusOn(ivisurf->layout_surface); // tolkien
- send_all_keyboard_focus(ivisurf->shell);
- }
- }
-+#endif
- }
-
- static const
-@@ -1132,7 +1106,7 @@ controller_layer_set_source_rectangle(struct wl_client *client,
- {
- struct ivilayer *ivilayer = wl_resource_get_user_data(resource);
- (void)client;
-- ivi_layout_layerSetSourceRectangle(ivilayer->layout_layer,
-+ ivi_layout_layer_set_source_rectangle(ivilayer->layout_layer,
- (uint32_t)x, (uint32_t)y, (uint32_t)width, (uint32_t)height);
- }
-
-@@ -1146,7 +1120,7 @@ controller_layer_set_destination_rectangle(struct wl_client *client,
- {
- struct ivilayer *ivilayer = wl_resource_get_user_data(resource);
- (void)client;
-- ivi_layout_layerSetDestinationRectangle(ivilayer->layout_layer,
-+ ivi_layout_layer_set_destination_rectangle(ivilayer->layout_layer,
- (uint32_t)x, (uint32_t)y, (uint32_t)width, (uint32_t)height);
- }
-
-@@ -1157,7 +1131,7 @@ controller_layer_set_visibility(struct wl_client *client,
- {
- struct ivilayer *ivilayer = wl_resource_get_user_data(resource);
- (void)client;
-- ivi_layout_layerSetVisibility(ivilayer->layout_layer, visibility);
-+ ivi_layout_layer_set_visibility(ivilayer->layout_layer, visibility);
- }
-
- static void
-@@ -1167,7 +1141,7 @@ controller_layer_set_opacity(struct wl_client *client,
- {
- struct ivilayer *ivilayer = wl_resource_get_user_data(resource);
- (void)client;
-- ivi_layout_layerSetOpacity(ivilayer->layout_layer, (float)opacity);
-+ ivi_layout_layer_set_opacity(ivilayer->layout_layer, (float)opacity);
- }
-
- static void
-@@ -1190,7 +1164,7 @@ controller_layer_set_orientation(struct wl_client *client,
- {
- struct ivilayer *ivilayer = wl_resource_get_user_data(resource);
- (void)client;
-- ivi_layout_layerSetOrientation(ivilayer->layout_layer, (uint32_t)orientation);
-+ ivi_layout_layer_set_orientation(ivilayer->layout_layer, (uint32_t)orientation);
- }
-
- static void
-@@ -1199,7 +1173,7 @@ controller_layer_clear_surfaces(struct wl_client *client,
- {
- struct ivilayer *ivilayer = wl_resource_get_user_data(resource);
- (void)client;
-- ivi_layout_layerSetRenderOrder(ivilayer->layout_layer, NULL, 0);
-+ ivi_layout_layer_set_render_order(ivilayer->layout_layer, NULL, 0);
- }
-
- static void
-@@ -1210,7 +1184,7 @@ controller_layer_add_surface(struct wl_client *client,
- struct ivilayer *ivilayer = wl_resource_get_user_data(resource);
- struct ivisurface *ivisurf = wl_resource_get_user_data(surface);
- (void)client;
-- ivi_layout_layerAddSurface(ivilayer->layout_layer, ivisurf->layout_surface);
-+ ivi_layout_layer_add_surface(ivilayer->layout_layer, ivisurf->layout_surface);
- }
-
- static void
-@@ -1221,7 +1195,7 @@ controller_layer_remove_surface(struct wl_client *client,
- struct ivilayer *ivilayer = wl_resource_get_user_data(resource);
- struct ivisurface *ivisurf = wl_resource_get_user_data(surface);
- (void)client;
-- ivi_layout_layerRemoveSurface(ivilayer->layout_layer, ivisurf->layout_surface);
-+ ivi_layout_layer_remove_surface(ivilayer->layout_layer, ivisurf->layout_surface);
- }
-
- static void
-@@ -1252,7 +1226,7 @@ controller_layer_set_render_order(struct wl_client *client,
-
- wl_array_for_each(id_surface, id_surfaces) {
- wl_list_for_each(ivisurf, &ivilayer->shell->list_surface, link) {
-- id_layout_surface = ivi_layout_getIdOfSurface(ivisurf->layout_surface);
-+ id_layout_surface = ivi_layout_get_id_of_surface(ivisurf->layout_surface);
- if (*id_surface == id_layout_surface) {
- layoutsurf_array[i] = ivisurf->layout_surface;
- i++;
-@@ -1261,7 +1235,7 @@ controller_layer_set_render_order(struct wl_client *client,
- }
- }
-
-- ivi_layout_layerSetRenderOrder(ivilayer->layout_layer,
-+ ivi_layout_layer_set_render_order(ivilayer->layout_layer,
- layoutsurf_array, i);
- free(layoutsurf_array);
- }
-@@ -1275,7 +1249,7 @@ controller_layer_destroy(struct wl_client *client,
- struct ivishell *shell = ivilayer->shell;
- struct ivicontroller_layer *ctrllayer = NULL;
- struct ivicontroller_layer *next = NULL;
-- uint32_t id_layer = ivi_layout_getIdOfLayer(ivilayer->layout_layer);
-+ uint32_t id_layer = ivi_layout_get_id_of_layer(ivilayer->layout_layer);
- (void)client;
- (void)destroy_scene_object;
-
-@@ -1335,7 +1309,7 @@ controller_screen_clear(struct wl_client *client,
- {
- struct iviscreen *iviscrn = wl_resource_get_user_data(resource);
- (void)client;
-- ivi_layout_screenSetRenderOrder(iviscrn->layout_screen, NULL, 0);
-+ ivi_layout_screen_set_render_order(iviscrn->layout_screen, NULL, 0);
- }
-
- static void
-@@ -1346,7 +1320,7 @@ controller_screen_add_layer(struct wl_client *client,
- struct iviscreen *iviscrn = wl_resource_get_user_data(resource);
- struct ivilayer *ivilayer = wl_resource_get_user_data(layer);
- (void)client;
-- ivi_layout_screenAddLayer(iviscrn->layout_screen, ivilayer->layout_layer);
-+ ivi_layout_screen_add_layer(iviscrn->layout_screen, ivilayer->layout_layer);
- }
-
- static void
-@@ -1365,7 +1339,7 @@ controller_screen_screenshot(struct wl_client *client,
- int32_t stride = 0;
- uint8_t *readpixs = NULL;
-
-- output = ivi_layout_screenGetOutput(iviscrn->layout_screen);
-+ output = ivi_layout_screen_get_output(iviscrn->layout_screen);
- --output->disable_planes;
-
- width = output->current_mode->width;
-@@ -1409,7 +1383,7 @@ controller_screen_set_render_order(struct wl_client *client,
-
- wl_array_for_each(id_layer, id_layers) {
- wl_list_for_each(ivilayer, &iviscrn->shell->list_layer, link) {
-- id_layout_layer = ivi_layout_getIdOfLayer(ivilayer->layout_layer);
-+ id_layout_layer = ivi_layout_get_id_of_layer(ivilayer->layout_layer);
- if (*id_layer == id_layout_layer) {
- layoutlayer_array[i] = ivilayer->layout_layer;
- i++;
-@@ -1418,7 +1392,7 @@ controller_screen_set_render_order(struct wl_client *client,
- }
- }
-
-- ivi_layout_screenSetRenderOrder(iviscrn->layout_screen,
-+ ivi_layout_screen_set_render_order(iviscrn->layout_screen,
- layoutlayer_array, i);
- free(layoutlayer_array);
- }
-@@ -1440,7 +1414,7 @@ controller_commit_changes(struct wl_client *client,
- (void)client;
- (void)resource;
-
-- ans = ivi_layout_commitChanges();
-+ ans = ivi_layout_commit_changes();
- if (ans < 0) {
- weston_log("Failed to commit changes at controller_commit_changes\n");
- }
-@@ -1459,11 +1433,11 @@ controller_layer_create(struct wl_client *client,
- struct ivi_layout_layer *layout_layer = NULL;
- struct ivicontroller_layer *ctrllayer = NULL;
- struct ivilayer *ivilayer = NULL;
-- struct ivi_layout_LayerProperties prop;
-+ struct ivi_layout_layer_properties *prop = NULL;
-
- ivilayer = get_layer(&shell->list_layer, id_layer);
- if (ivilayer == NULL) {
-- layout_layer = ivi_layout_layerCreateWithDimension(id_layer,
-+ layout_layer = ivi_layout_layer_create_with_dimension(id_layer,
- (uint32_t)width, (uint32_t)height);
- if (layout_layer == NULL) {
- weston_log("id_layer is already created\n");
-@@ -1505,11 +1479,9 @@ controller_layer_create(struct wl_client *client,
- &controller_layer_implementation,
- ivilayer, destroy_ivicontroller_layer);
-
-- memset(&prop, 0, sizeof prop);
--
-- ivi_layout_getPropertiesOfLayer(ivilayer->layout_layer, &prop);
-+ prop = ivi_layout_get_properties_of_surface(ivilayer->layout_layer);
- send_layer_event(ctrllayer->resource, ivilayer,
-- &prop, IVI_NOTIFICATION_ALL);
-+ prop, IVI_NOTIFICATION_ALL);
- }
-
- static void
-@@ -1533,7 +1505,7 @@ controller_surface_create(struct wl_client *client,
- struct ivicontroller *ctrl = wl_resource_get_user_data(resource);
- struct ivishell *shell = ctrl->shell;
- struct ivicontroller_surface *ctrlsurf = NULL;
-- struct ivi_layout_SurfaceProperties prop;
-+ struct ivi_layout_surface_properties *prop = NULL;
- struct ivisurface *ivisurf = NULL;
- struct ivicontroller_surface *ctrl_link = NULL;
-
-@@ -1583,13 +1555,11 @@ controller_surface_create(struct wl_client *client,
-
- ctrlsurf->implementation_set = 1;
-
-- memset(&prop, 0, sizeof prop);
--
-- ivi_layout_getPropertiesOfSurface(ivisurf->layout_surface, &prop);
-- ivi_layout_surfaceSetContentObserver(ivisurf->layout_surface, surface_event_content, shell);
-+ prop = ivi_layout_get_properties_of_surface(ivisurf->layout_surface);
-+ ivi_layout_surface_set_content_observer(ivisurf->layout_surface, surface_event_content, shell);
-
- send_surface_event(ctrlsurf->resource, ivisurf,
-- &prop, IVI_NOTIFICATION_ALL);
-+ prop, IVI_NOTIFICATION_ALL);
- }
-
- static const struct ivi_controller_interface controller_implementation = {
-@@ -1629,14 +1599,14 @@ add_client_to_resources(struct ivishell *shell,
- }
- wl_list_for_each_reverse(ivilayer, &shell->list_layer, link) {
- id_layout_layer =
-- ivi_layout_getIdOfLayer(ivilayer->layout_layer);
-+ ivi_layout_get_id_of_layer(ivilayer->layout_layer);
-
- ivi_controller_send_layer(controller->resource,
- id_layout_layer);
- }
- wl_list_for_each_reverse(ivisurf, &shell->list_surface, link) {
- id_layout_surface =
-- ivi_layout_getIdOfSurface(ivisurf->layout_surface);
-+ ivi_layout_get_id_of_surface(ivisurf->layout_surface);
-
- ivi_controller_send_surface(controller->resource,
- id_layout_surface);
-@@ -1687,7 +1657,7 @@ create_screen(struct ivishell *shell, struct weston_output *output)
- iviscrn->output = output;
-
- // TODO : Only Single display
-- iviscrn->layout_screen = ivi_layout_getScreenFromId(0);
-+ iviscrn->layout_screen = ivi_layout_get_screen_from_id(0);
-
- wl_list_init(&iviscrn->link);
-
-@@ -1720,7 +1690,7 @@ create_layer(struct ivishell *shell,
- wl_list_insert(&shell->list_layer, &ivilayer->link);
- ivilayer->layout_layer = layout_layer;
-
-- ivi_layout_layerAddNotification(layout_layer, send_layer_prop, ivilayer);
-+ ivi_layout_layer_add_notification(layout_layer, send_layer_prop, ivilayer);
-
- wl_list_for_each(controller, &shell->list_controller, link) {
- ivi_controller_send_layer(controller->resource, id_layer);
-@@ -1760,7 +1730,7 @@ create_surface(struct ivishell *shell,
- id_surface);
- }
-
-- ivi_layout_surfaceAddNotification(layout_surface,
-+ ivi_layout_layer_add_notification(layout_surface,
- send_surface_prop, ivisurf);
-
- return ivisurf;
-@@ -1774,7 +1744,7 @@ layer_event_create(struct ivi_layout_layer *layout_layer,
- struct ivilayer *ivilayer = NULL;
- uint32_t id_layer = 0;
-
-- id_layer = ivi_layout_getIdOfLayer(layout_layer);
-+ id_layer = ivi_layout_get_id_of_layer(layout_layer);
-
- ivilayer = create_layer(shell, layout_layer, id_layer);
- if (ivilayer == NULL) {
-@@ -1808,7 +1778,7 @@ layer_event_remove(struct ivi_layout_layer *layout_layer,
- }
-
- if (is_removed) {
-- id_layer = ivi_layout_getIdOfLayer(layout_layer);
-+ id_layer = ivi_layout_get_id_of_layer(layout_layer);
-
- wl_list_for_each(ctrllayer, &shell->list_controller_layer, link) {
- if (id_layer != ctrllayer->id_layer) {
-@@ -1829,7 +1799,7 @@ surface_event_create(struct ivi_layout_surface *layout_surface,
- uint32_t id_surface = 0;
- struct ivicontroller_surface *ctrlsurf = NULL;
-
-- id_surface = ivi_layout_getIdOfSurface(layout_surface);
-+ id_surface = ivi_layout_get_id_of_surface(layout_surface);
-
- ivisurf = create_surface(shell, layout_surface, id_surface);
- if (ivisurf == NULL) {
-@@ -1875,7 +1845,7 @@ surface_event_remove(struct ivi_layout_surface *layout_surface,
- }
-
- if (is_removed) {
-- id_surface = ivi_layout_getIdOfSurface(layout_surface);
-+ id_surface = ivi_layout_get_id_of_surface(layout_surface);
-
- wl_list_for_each(ctrlsurf, &shell->list_controller_surface, link) {
- if (id_surface != ctrlsurf->id_surface) {
-@@ -1894,10 +1864,10 @@ surface_event_configure(struct ivi_layout_surface *layout_surface,
- struct ivishell *shell = userdata;
- struct ivisurface *ivisurf = NULL;
- struct ivicontroller_surface *ctrlsurf = NULL;
-- struct ivi_layout_SurfaceProperties prop;
-+ struct ivi_layout_surface_properties *prop = NULL;
- uint32_t id_surface = 0;
-
-- id_surface = ivi_layout_getIdOfSurface(layout_surface);
-+ id_surface = ivi_layout_get_id_of_surface(layout_surface);
-
- ivisurf = get_surface(&shell->list_surface, id_surface);
- if (ivisurf == NULL) {
-@@ -1905,8 +1875,7 @@ surface_event_configure(struct ivi_layout_surface *layout_surface,
- return;
- }
-
-- memset(&prop, 0, sizeof prop);
-- ivi_layout_getPropertiesOfSurface(layout_surface, &prop);
-+ prop = ivi_layout_get_properties_of_surface(layout_surface);
-
- wl_list_for_each(ctrlsurf, &shell->list_controller_surface, link) {
- if (id_surface != ctrlsurf->id_surface) {
-@@ -1927,7 +1896,7 @@ check_layout_layers(struct ivishell *shell)
- uint32_t i = 0;
- int32_t ret = 0;
-
-- ret = ivi_layout_getLayers(&length, &pArray);
-+ ret = ivi_layout_get_layers(&length, &pArray);
- if(ret != 0) {
- weston_log("failed to get layers at check_layout_layers\n");
- return -1;
-@@ -1939,7 +1908,7 @@ check_layout_layers(struct ivishell *shell)
- }
-
- for (i = 0; i < length; i++) {
-- id_layer = ivi_layout_getIdOfLayer(pArray[i]);
-+ id_layer = ivi_layout_get_id_of_layer(pArray[i]);
- ivilayer = create_layer(shell, pArray[i], id_layer);
- if (ivilayer == NULL) {
- weston_log("failed to create layer");
-@@ -1962,7 +1931,7 @@ check_layout_surfaces(struct ivishell *shell)
- uint32_t i = 0;
- int32_t ret = 0;
-
-- ret = ivi_layout_getSurfaces(&length, &pArray);
-+ ret = ivi_layout_get_surfaces(&length, &pArray);
- if(ret != 0) {
- weston_log("failed to get surfaces at check_layout_surfaces\n");
- return -1;
-@@ -1974,7 +1943,7 @@ check_layout_surfaces(struct ivishell *shell)
- }
-
- for (i = 0; i < length; i++) {
-- id_surface = ivi_layout_getIdOfSurface(pArray[i]);
-+ id_surface = ivi_layout_get_id_of_surface(pArray[i]);
- ivisurf = create_surface(shell, pArray[i], id_surface);
- if (ivisurf == NULL) {
- weston_log("failed to create surface");
-@@ -2023,12 +1992,12 @@ init_ivi_shell(struct weston_compositor *ec, struct ivishell *shell)
- weston_log("failed to check_layout_surfaces");
- }
-
-- ivi_layout_addNotificationCreateLayer(layer_event_create, shell);
-- ivi_layout_addNotificationRemoveLayer(layer_event_remove, shell);
-+ ivi_layout_add_notification_create_layer(layer_event_create, shell);
-+ ivi_layout_add_notification_remove_layer(layer_event_remove, shell);
-
-- ivi_layout_addNotificationCreateSurface(surface_event_create, shell);
-- ivi_layout_addNotificationRemoveSurface(surface_event_remove, shell);
-- ivi_layout_addNotificationConfigureSurface(surface_event_configure, shell);
-+ ivi_layout_add_notification_create_surface(surface_event_create, shell);
-+ ivi_layout_add_notification_remove_surface(surface_event_remove, shell);
-+ ivi_layout_add_notification_configure_surface(surface_event_configure, shell);
- }
-
- WL_EXPORT int
-diff --git a/weston-ivi-shell/src/ivi-layout-export.h b/weston-ivi-shell/src/ivi-layout-export.h
-index 3d1afc9..eb3752c 100644
---- a/weston-ivi-shell/src/ivi-layout-export.h
-+++ b/weston-ivi-shell/src/ivi-layout-export.h
-@@ -36,10 +36,13 @@
- * - commit to apply property changes.
- * - notifications of property change.
- *
-- * Management of surfaces and layers grouping these surfaces are common way in
-- * In-Vehicle Infotainment system, which integrate several domains in one system.
-- * A layer is allocated to a domain in order to control application surfaces
-- * grouped to the layer all together.
-+ * Management of surfaces and layers grouping these surfaces are common
-+ * way in In-Vehicle Infotainment system, which integrate several domains
-+ * in one system. A layer is allocated to a domain in order to control
-+ * application surfaces grouped to the layer all together.
-+ *
-+ * This API and ABI follow following specifications.
-+ * http://projects.genivi.org/wayland-ivi-extension/layer-manager-apis
- */
-
- #ifndef _IVI_LAYOUT_EXPORT_H_
-@@ -49,181 +52,205 @@
- extern "C" {
- #endif /* __cplusplus */
-
--#include "compositor.h"
--#include "ivi-layout.h"
-+#include "stdbool.h"
-+#include <weston/compositor.h>
-+
-+#define IVI_SUCCEEDED (0)
-+#define IVI_FAILED (-1)
-
- struct ivi_layout_layer;
- struct ivi_layout_screen;
-+struct ivi_layout_surface;
-+
-+struct ivi_layout_surface_properties
-+{
-+ wl_fixed_t opacity;
-+ int32_t source_x;
-+ int32_t source_y;
-+ int32_t source_width;
-+ int32_t source_height;
-+ int32_t start_x;
-+ int32_t start_y;
-+ int32_t start_width;
-+ int32_t start_height;
-+ int32_t dest_x;
-+ int32_t dest_y;
-+ int32_t dest_width;
-+ int32_t dest_height;
-+ enum wl_output_transform orientation;
-+ bool visibility;
-+ int32_t transition_type;
-+ uint32_t transition_duration;
-+};
-+
-+struct ivi_layout_layer_properties
-+{
-+ wl_fixed_t opacity;
-+ int32_t source_x;
-+ int32_t source_y;
-+ int32_t source_width;
-+ int32_t source_height;
-+ int32_t dest_x;
-+ int32_t dest_y;
-+ int32_t dest_width;
-+ int32_t dest_height;
-+ enum wl_output_transform orientation;
-+ uint32_t visibility;
-+ int32_t transition_type;
-+ uint32_t transition_duration;
-+ double start_alpha;
-+ double end_alpha;
-+ uint32_t is_fade_in;
-+};
-
- enum ivi_layout_notification_mask {
-- IVI_NOTIFICATION_NONE = 0,
-- IVI_NOTIFICATION_OPACITY = (1 << 1),
-- IVI_NOTIFICATION_SOURCE_RECT = (1 << 2),
-- IVI_NOTIFICATION_DEST_RECT = (1 << 3),
-- IVI_NOTIFICATION_DIMENSION = (1 << 4),
-- IVI_NOTIFICATION_POSITION = (1 << 5),
-- IVI_NOTIFICATION_ORIENTATION = (1 << 6),
-- IVI_NOTIFICATION_VISIBILITY = (1 << 7),
-- IVI_NOTIFICATION_PIXELFORMAT = (1 << 8),
-- IVI_NOTIFICATION_ADD = (1 << 9),
-- IVI_NOTIFICATION_REMOVE = (1 << 10),
-- IVI_NOTIFICATION_CONFIGURE = (1 << 11),
-- IVI_NOTIFICATION_KEYBOARD_FOCUS = (1 << 12),
-- IVI_NOTIFICATION_ALL = 0xFFFF
-+ IVI_NOTIFICATION_NONE = 0,
-+ IVI_NOTIFICATION_OPACITY = (1 << 1),
-+ IVI_NOTIFICATION_SOURCE_RECT = (1 << 2),
-+ IVI_NOTIFICATION_DEST_RECT = (1 << 3),
-+ IVI_NOTIFICATION_DIMENSION = (1 << 4),
-+ IVI_NOTIFICATION_POSITION = (1 << 5),
-+ IVI_NOTIFICATION_ORIENTATION = (1 << 6),
-+ IVI_NOTIFICATION_VISIBILITY = (1 << 7),
-+ IVI_NOTIFICATION_PIXELFORMAT = (1 << 8),
-+ IVI_NOTIFICATION_ADD = (1 << 9),
-+ IVI_NOTIFICATION_REMOVE = (1 << 10),
-+ IVI_NOTIFICATION_CONFIGURE = (1 << 11),
-+ IVI_NOTIFICATION_ALL = 0xFFFF
- };
-
- enum ivi_layout_transition_type{
-- IVI_LAYOUT_TRANSITION_NONE,
-- IVI_LAYOUT_TRANSITION_VIEW_DEFAULT,
-- IVI_LAYOUT_TRANSITION_VIEW_DEST_RECT_ONLY,
-- IVI_LAYOUT_TRANSITION_VIEW_FADE_ONLY,
-- IVI_LAYOUT_TRANSITION_LAYER_FADE,
-- IVI_LAYOUT_TRANSITION_LAYER_MOVE,
-- IVI_LAYOUT_TRANSITION_LAYER_VIEW_ORDER,
-- IVI_LAYOUT_TRANSITION_MAX,
-+ IVI_LAYOUT_TRANSITION_NONE,
-+ IVI_LAYOUT_TRANSITION_VIEW_DEFAULT,
-+ IVI_LAYOUT_TRANSITION_VIEW_DEST_RECT_ONLY,
-+ IVI_LAYOUT_TRANSITION_VIEW_FADE_ONLY,
-+ IVI_LAYOUT_TRANSITION_LAYER_FADE,
-+ IVI_LAYOUT_TRANSITION_LAYER_MOVE,
-+ IVI_LAYOUT_TRANSITION_LAYER_VIEW_ORDER,
-+ IVI_LAYOUT_TRANSITION_VIEW_MOVE_RESIZE,
-+ IVI_LAYOUT_TRANSITION_VIEW_RESIZE,
-+ IVI_LAYOUT_TRANSITION_VIEW_FADE,
-+ IVI_LAYOUT_TRANSITION_MAX,
- };
-
--typedef void(*shellWarningNotificationFunc)(uint32_t id_surface,
-- enum ivi_layout_warning_flag warn,
-- void *userdata);
--
--typedef void(*layerPropertyNotificationFunc)(struct ivi_layout_layer *ivilayer,
-- struct ivi_layout_LayerProperties*,
-- enum ivi_layout_notification_mask mask,
-- void *userdata);
--
--typedef void(*surfacePropertyNotificationFunc)(struct ivi_layout_surface *ivisurf,
-- struct ivi_layout_SurfaceProperties*,
-- enum ivi_layout_notification_mask mask,
-- void *userdata);
-+typedef void (*layer_property_notification_func)(
-+ struct ivi_layout_layer *ivilayer,
-+ const struct ivi_layout_layer_properties *,
-+ enum ivi_layout_notification_mask mask,
-+ void *userdata);
-
--typedef void(*layerCreateNotificationFunc)(struct ivi_layout_layer *ivilayer,
-- void *userdata);
-+typedef void (*surface_property_notification_func)(
-+ struct ivi_layout_surface *ivisurf,
-+ const struct ivi_layout_surface_properties *,
-+ enum ivi_layout_notification_mask mask,
-+ void *userdata);
-
--typedef void(*layerRemoveNotificationFunc)(struct ivi_layout_layer *ivilayer,
-- void *userdata);
-+typedef void (*layer_create_notification_func)(
-+ struct ivi_layout_layer *ivilayer,
-+ void *userdata);
-
--typedef void(*surfaceCreateNotificationFunc)(struct ivi_layout_surface *ivisurf,
-- void *userdata);
-+typedef void (*layer_remove_notification_func)(
-+ struct ivi_layout_layer *ivilayer,
-+ void *userdata);
-
--typedef void(*surfaceRemoveNotificationFunc)(struct ivi_layout_surface *ivisurf,
-- void *userdata);
-+typedef void (*surface_create_notification_func)(
-+ struct ivi_layout_surface *ivisurf,
-+ void *userdata);
-
--typedef void(*surfaceConfigureNotificationFunc)(struct ivi_layout_surface *ivisurf,
-- void *userdata);
-+typedef void (*surface_remove_notification_func)(
-+ struct ivi_layout_surface *ivisurf,
-+ void *userdata);
-
--typedef void(*ivi_controller_surface_content_callback)(struct ivi_layout_surface *ivisurf,
-- int32_t content,
-- void *userdata);
--
--int32_t
--ivi_layout_addNotificationShellWarning(shellWarningNotificationFunc callback,
-- void *userdata);
--
--void
--ivi_layout_removeNotificationShellWarning(shellWarningNotificationFunc callback,
-- void *userdata);
--
--/**
-- * \brief to be called by ivi-shell in order to set initail view of
-- * weston_surface.
-- */
--/*
--struct weston_view *
--ivi_layout_get_weston_view(struct ivi_layout_surface *surface);
--*/
-+typedef void (*surface_configure_notification_func)(
-+ struct ivi_layout_surface *ivisurf,
-+ void *userdata);
-
--/**
-- * \brief initialize ivi-layout
-- */
--/*
--void
--ivi_layout_initWithCompositor(struct weston_compositor *ec);
--*/
-+typedef void (*ivi_controller_surface_content_callback)(
-+ struct ivi_layout_surface *ivisurf,
-+ int32_t content,
-+ void *userdata);
-
- /**
- * \brief register for notification when layer is created
- */
- int32_t
--ivi_layout_addNotificationCreateLayer(layerCreateNotificationFunc callback,
-- void *userdata);
-+ivi_layout_add_notification_create_layer(
-+ layer_create_notification_func callback,
-+ void *userdata);
-
- void
--ivi_layout_removeNotificationCreateLayer(layerCreateNotificationFunc callback,
-- void *userdata);
-+ivi_layout_remove_notification_create_layer(
-+ layer_create_notification_func callback,
-+ void *userdata);
-
- /**
- * \brief register for notification when layer is removed
- */
- int32_t
--ivi_layout_addNotificationRemoveLayer(layerRemoveNotificationFunc callback,
-- void *userdata);
-+ivi_layout_add_notification_remove_layer(
-+ layer_remove_notification_func callback,
-+ void *userdata);
-
- void
--ivi_layout_removeNotificationRemoveLayer(layerRemoveNotificationFunc callback,
-- void *userdata);
-+ivi_layout_remove_notification_remove_layer(
-+ layer_remove_notification_func callback,
-+ void *userdata);
-
- /**
- * \brief register for notification when surface is created
- */
- int32_t
--ivi_layout_addNotificationCreateSurface(surfaceCreateNotificationFunc callback,
-- void *userdata);
-+ivi_layout_add_notification_create_surface(
-+ surface_create_notification_func callback,
-+ void *userdata);
-
- void
--ivi_layout_removeNotificationCreateSurface(surfaceCreateNotificationFunc callback,
-- void *userdata);
-+ivi_layout_remove_notification_create_surface(
-+ surface_create_notification_func callback,
-+ void *userdata);
-
- /**
- * \brief register for notification when surface is removed
- */
- int32_t
--ivi_layout_addNotificationRemoveSurface(surfaceRemoveNotificationFunc callback,
-- void *userdata);
-+ivi_layout_add_notification_remove_surface(
-+ surface_remove_notification_func callback,
-+ void *userdata);
-
- void
--ivi_layout_removeNotificationRemoveSurface(surfaceRemoveNotificationFunc callback,
-- void *userdata);
-+ivi_layout_remove_notification_remove_surface(
-+ surface_remove_notification_func callback,
-+ void *userdata);
-
- /**
- * \brief register for notification when surface is configured
- */
- int32_t
--ivi_layout_addNotificationConfigureSurface(surfaceConfigureNotificationFunc callback,
-- void *userdata);
-+ivi_layout_add_notification_configure_surface(
-+ surface_configure_notification_func callback,
-+ void *userdata);
-
- void
--ivi_layout_removeNotificationConfigureSurface(surfaceConfigureNotificationFunc callback,
-- void *userdata);
-+ivi_layout_remove_notification_configure_surface(
-+ surface_configure_notification_func callback,
-+ void *userdata);
-
- /**
- * \brief get id of surface from ivi_layout_surface
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return id of surface
- */
- uint32_t
--ivi_layout_getIdOfSurface(struct ivi_layout_surface *ivisurf);
-+ivi_layout_get_id_of_surface(struct ivi_layout_surface *ivisurf);
-
- /**
- * \brief get id of layer from ivi_layout_layer
- *
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return id of layer
- */
- uint32_t
--ivi_layout_getIdOfLayer(struct ivi_layout_layer *ivilayer);
--
--/**
-- * \brief get ivi_layout_layer from id of layer
-- *
-- * \return (struct ivi_layout_layer *)
-- * if the method call was successful
-- * \return NULL if the method call was failed
-- */
--struct ivi_layout_layer *
--ivi_layout_getLayerFromId(uint32_t id_layer);
-+ivi_layout_get_id_of_layer(struct ivi_layout_layer *ivilayer);
-
- /**
- * \brief get ivi_layout_surface from id of surface
-@@ -233,7 +260,7 @@ ivi_layout_getLayerFromId(uint32_t id_layer);
- * \return NULL if the method call was failed
- */
- struct ivi_layout_surface *
--ivi_layout_getSurfaceFromId(uint32_t id_surface);
-+ivi_layout_get_surface_from_id(uint32_t id_surface);
-
- /**
- * \brief get ivi_layout_screen from id of screen
-@@ -243,708 +270,420 @@ ivi_layout_getSurfaceFromId(uint32_t id_surface);
- * \return NULL if the method call was failed
- */
- struct ivi_layout_screen *
--ivi_layout_getScreenFromId(uint32_t id_screen);
-+ivi_layout_get_screen_from_id(uint32_t id_screen);
-
- /**
- * \brief Get the screen resolution of a specific screen
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_getScreenResolution(struct ivi_layout_screen *iviscrn,
-- int32_t *pWidth,
-- int32_t *pHeight);
--
--/**
-- * \brief register for notification on property changes of surface
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_surfaceAddNotification(struct ivi_layout_surface *ivisurf,
-- surfacePropertyNotificationFunc callback,
-- void *userdata);
--
--/**
-- * \brief remove notification on property changes of surface
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_surfaceRemoveNotification(struct ivi_layout_surface *ivisurf);
--
--/**
-- * \brief Create a surface
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--/*
--struct ivi_layout_surface *
--ivi_layout_surfaceCreate(struct weston_surface *wl_surface,
-- uint32_t id_surface);
--*/
--
--/**
-- * \brief Set the native content of an application to be used as surface content.
-- * If wl_surface is NULL, remove the native content of a surface
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--/*
--int32_t
--ivi_layout_surfaceSetNativeContent(struct weston_surface *wl_surface,
-- uint32_t width,
-- uint32_t height,
-- uint32_t id_surface);
--*/
-+ivi_layout_get_screen_resolution(struct ivi_layout_screen *iviscrn,
-+ int32_t *pWidth,
-+ int32_t *pHeight);
-
- /**
- * \brief Set an observer callback for surface content status change.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_surfaceSetContentObserver(struct ivi_layout_surface *ivisurf,
-- ivi_controller_surface_content_callback callback,
-- void* userdata);
--
--/**
-- * \brief initialize ivi_layout_surface dest/source width and height
-- */
--/*
--void
--ivi_layout_surfaceConfigure(struct ivi_layout_surface *ivisurf,
-- uint32_t width, uint32_t height);
--*/
--
--/**
-- * \brief Remove a surface
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_surfaceRemove(struct ivi_layout_surface *ivisurf);
--
--/**
-- * \brief Set from which kind of devices the surface can accept input events.
-- * By default, a surface accept input events from all kind of devices (keyboards, pointer, ...)
-- * By calling this function, you can adjust surface preferences. Note that this function only
-- * adjust the acceptance for the specified devices. Non specified are keept untouched.
-- *
-- * Typicall use case for this function is when dealing with pointer or touch events.
-- * Those are normally dispatched to the first visible surface below the coordinate.
-- * If you want a different behavior (i.e. forward events to an other surface below the coordinate,
-- * you can set all above surfaces to refuse input events)
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_UpdateInputEventAcceptanceOn(struct ivi_layout_surface *ivisurf,
-- int32_t devices,
-- int32_t acceptance);
-+ivi_layout_surface_set_content_observer(
-+ struct ivi_layout_surface *ivisurf,
-+ ivi_controller_surface_content_callback callback,
-+ void* userdata);
-
- /**
- * \brief Get the layer properties
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_getPropertiesOfLayer(struct ivi_layout_layer *ivilayer,
-- struct ivi_layout_LayerProperties *pLayerProperties);
--
--/**
-- * \brief Get the number of hardware layers of a screen
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return (const struct ivi_layout_layer_properties *)
-+ * if the method call was successful
-+ * \return NULL if the method call was failed
- */
--int32_t
--ivi_layout_getNumberOfHardwareLayers(uint32_t id_screen,
-- int32_t *pNumberOfHardwareLayers);
-+const struct ivi_layout_layer_properties *
-+ivi_layout_get_properties_of_layer(struct ivi_layout_layer *ivilayer);
-
- /**
- * \brief Get the screens
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_getScreens(int32_t *pLength, struct ivi_layout_screen ***ppArray);
-+ivi_layout_get_screens(int32_t *pLength, struct ivi_layout_screen ***ppArray);
-
- /**
- * \brief Get the screens under the given layer
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_getScreensUnderLayer(struct ivi_layout_layer *ivilayer,
-- int32_t *pLength,
-- struct ivi_layout_screen ***ppArray);
--
--/**
-- * \brief Get all Layers which are currently registered and managed by the services
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_getLayers(int32_t *pLength, struct ivi_layout_layer ***ppArray);
-+ivi_layout_get_screens_under_layer(struct ivi_layout_layer *ivilayer,
-+ int32_t *pLength,
-+ struct ivi_layout_screen ***ppArray);
-
- /**
-- * \brief Get all Layers of the given screen
-+ * \brief Get all Layers which are currently registered and managed
-+ * by the services
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_getLayersOnScreen(struct ivi_layout_screen *iviscrn,
-- int32_t *pLength,
-- struct ivi_layout_layer ***ppArray);
-+ivi_layout_get_layers(int32_t *pLength, struct ivi_layout_layer ***ppArray);
-
- /**
- * \brief Get all Layers under the given surface
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_getLayersUnderSurface(struct ivi_layout_surface *ivisurf,
-- int32_t *pLength,
-- struct ivi_layout_layer ***ppArray);
--
--/**
-- * \brief Get all Surfaces which are currently registered and managed by the services
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_getSurfaces(int32_t *pLength, struct ivi_layout_surface ***ppArray);
-+ivi_layout_get_layers_under_surface(struct ivi_layout_surface *ivisurf,
-+ int32_t *pLength,
-+ struct ivi_layout_layer ***ppArray);
-
- /**
-- * \brief Get all Surfaces which are currently registered to a given layer and are managed by the services
-+ * \brief Get all Surfaces which are currently registered and managed
-+ * by the services
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_getSurfacesOnLayer(struct ivi_layout_layer *ivilayer,
-- int32_t *pLength,
-- struct ivi_layout_surface ***ppArray);
-+ivi_layout_get_surfaces(int32_t *pLength, struct ivi_layout_surface ***ppArray);
-
- /**
- * \brief Create a layer which should be managed by the service
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return (struct ivi_layout_layer *)
-+ * if the method call was successful
-+ * \return NULL if the method call was failed
- */
- struct ivi_layout_layer *
--ivi_layout_layerCreateWithDimension(uint32_t id_layer,
-- int32_t width, int32_t height);
-+ivi_layout_layer_create_with_dimension(uint32_t id_layer,
-+ int32_t width, int32_t height);
-
- /**
- * \brief Removes a layer which is currently managed by the service
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_layerRemove(struct ivi_layout_layer *ivilayer);
--
--/**
-- * \brief Get the current type of the layer.
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
- */
--int32_t
--ivi_layout_layerGetType(struct ivi_layout_layer *ivilayer,
-- int32_t *pLayerType);
--
--/**
-- * \brief Set the visibility of a layer. If a layer is not visible, the layer and its
-- * surfaces will not be rendered.
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_layerSetVisibility(struct ivi_layout_layer *ivilayer,
-- int32_t newVisibility);
-+void
-+ivi_layout_layer_remove(struct ivi_layout_layer *ivilayer);
-
- /**
-- * \brief Get the visibility of a layer. If a layer is not visible, the layer and its
-- * surfaces will not be rendered.
-+ * \brief Set the visibility of a layer. If a layer is not visible, the
-+ * layer and its surfaces will not be rendered.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_layerGetVisibility(struct ivi_layout_layer *ivilayer,
-- int32_t *pVisibility);
-+ivi_layout_layer_set_visibility(struct ivi_layout_layer *ivilayer,
-+ bool newVisibility);
-
- /**
- * \brief Set the opacity of a layer.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_layerSetOpacity(struct ivi_layout_layer *ivilayer, float opacity);
-+ivi_layout_layer_set_opacity(struct ivi_layout_layer *ivilayer,
-+ wl_fixed_t opacity);
-
- /**
- * \brief Get the opacity of a layer.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return opacity if the method call was successful
-+ * \return wl_fixed_from_double(0.0) if the method call was failed
- */
--int32_t
--ivi_layout_layerGetOpacity(struct ivi_layout_layer *ivilayer, float *pOpacity);
-+wl_fixed_t
-+ivi_layout_layer_get_opacity(struct ivi_layout_layer *ivilayer);
-
- /**
- * \brief Set the area of a layer which should be used for the rendering.
-- * Only this part will be visible.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_layerSetSourceRectangle(struct ivi_layout_layer *ivilayer,
-- int32_t x, int32_t y,
-- int32_t width, int32_t height);
--
--/**
-- * \brief Set the destination area on the display for a layer.
-- * The layer will be scaled and positioned to this rectangle for rendering
-+ * Only this part will be visible.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_layerSetDestinationRectangle(struct ivi_layout_layer *ivilayer,
-- int32_t x, int32_t y,
-- int32_t width, int32_t height);
-+ivi_layout_layer_set_source_rectangle(struct ivi_layout_layer *ivilayer,
-+ int32_t x, int32_t y,
-+ int32_t width, int32_t height);
-
- /**
-- * \brief Get the horizontal and vertical dimension of the layer.
-+ * \brief Set the destination area on the display for a layer.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_layerGetDimension(struct ivi_layout_layer *ivilayer,
-- int32_t *pDimension);
--
--/**
-- * \brief Set the horizontal and vertical dimension of the layer.
-+ * The layer will be scaled and positioned to this rectangle
-+ * for rendering
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_layerSetDimension(struct ivi_layout_layer *ivilayer,
-- int32_t *pDimension);
-+ivi_layout_layer_set_destination_rectangle(struct ivi_layout_layer *ivilayer,
-+ int32_t x, int32_t y,
-+ int32_t width, int32_t height);
-
- /**
- * \brief Get the horizontal and vertical position of the layer.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_layerGetPosition(struct ivi_layout_layer *ivilayer,
-- int32_t *pPosition);
-+ivi_layout_layer_get_position(struct ivi_layout_layer *ivilayer,
-+ int32_t *dest_x, int32_t *dest_y);
-
- /**
- * \brief Sets the horizontal and vertical position of the layer.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_layerSetPosition(struct ivi_layout_layer *ivilayer,
-- int32_t *pPosition);
-+ivi_layout_layer_set_position(struct ivi_layout_layer *ivilayer,
-+ int32_t dest_x, int32_t dest_y);
-
- /**
- * \brief Sets the orientation of a layer.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_layerSetOrientation(struct ivi_layout_layer *ivilayer,
-- int32_t orientation);
--
--/**
-- * \brief Gets the orientation of a layer.
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_layerGetOrientation(struct ivi_layout_layer *ivilayer,
-- int32_t *pOrientation);
--
--/**
-- * \brief Sets the color value which defines the transparency value.
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_layerSetChromaKey(struct ivi_layout_layer *ivilayer,
-- int32_t* pColor);
-+ivi_layout_layer_set_orientation(struct ivi_layout_layer *ivilayer,
-+ enum wl_output_transform orientation);
-
- /**
- * \brief Sets render order of surfaces within one layer
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_layerSetRenderOrder(struct ivi_layout_layer *ivilayer,
-- struct ivi_layout_surface **pSurface,
-- int32_t number);
--
--/**
-- * \brief Get the capabilities of a layer
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_layerGetCapabilities(struct ivi_layout_layer *ivilayer,
-- int32_t *pCapabilities);
--
--/**
-- * \brief Get the possible capabilities of a layertype
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_layerTypeGetCapabilities(int32_t layerType,
-- int32_t *pCapabilities);
--
--/**
-- * \brief Create the logical surface, which has no native buffer associated
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_surfaceInitialize(struct ivi_layout_surface **pSurface);
-+ivi_layout_layer_set_render_order(struct ivi_layout_layer *ivilayer,
-+ struct ivi_layout_surface **pSurface,
-+ int32_t number);
-
- /**
- * \brief Set the visibility of a surface.
-- * If a surface is not visible it will not be rendered.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * If a surface is not visible it will not be rendered.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_surfaceSetVisibility(struct ivi_layout_surface *ivisurf,
-- int32_t newVisibility);
-+ivi_layout_surface_set_visibility(struct ivi_layout_surface *ivisurf,
-+ bool newVisibility);
-
- /**
- * \brief Get the visibility of a surface.
-- * If a surface is not visible it will not be rendered.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * If a surface is not visible it will not be rendered.
-+ *
-+ * \return true if surface is visible
-+ * \return false if surface is invisible or the method call was failed
- */
--int32_t
--ivi_layout_surfaceGetVisibility(struct ivi_layout_surface *ivisurf,
-- int32_t *pVisibility);
-+bool
-+ivi_layout_surface_get_visibility(struct ivi_layout_surface *ivisurf);
-
- /**
- * \brief Set the opacity of a surface.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_surfaceSetOpacity(struct ivi_layout_surface *ivisurf,
-- float opacity);
-+ivi_layout_surface_set_opacity(struct ivi_layout_surface *ivisurf,
-+ wl_fixed_t opacity);
-
- /**
- * \brief Get the opacity of a surface.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_surfaceGetOpacity(struct ivi_layout_surface *ivisurf,
-- float *pOpacity);
--
--/**
-- * \brief Set the keyboard focus on a certain surface
-- * To receive keyboard events, 2 conditions must be fulfilled:
-- * 1- The surface must accept events from keyboard. See ilm_UpdateInputEventAcceptanceOn
-- * 2- The keyboard focus must be set on that surface
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return opacity if the method call was successful
-+ * \return wl_fixed_from_double(0.0) if the method call was failed
- */
--int32_t
--ivi_layout_SetKeyboardFocusOn(struct ivi_layout_surface *ivisurf);
--
--/**
-- * \brief Get the indentifier of the surface which hold the keyboard focus
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_GetKeyboardFocusSurfaceId(struct ivi_layout_surface **pSurfaceId);
-+wl_fixed_t
-+ivi_layout_surface_get_opacity(struct ivi_layout_surface *ivisurf);
-
- /**
- * \brief Set the destination area of a surface within a layer for rendering.
-- * The surface will be scaled to this rectangle for rendering.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_surfaceSetDestinationRectangle(struct ivi_layout_surface *ivisurf,
-- int32_t x, int32_t y,
-- int32_t width, int32_t height);
--
--/**
-- * \brief Set the horizontal and vertical dimension of the surface.
-+ * The surface will be scaled to this rectangle for rendering.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_surfaceSetDimension(struct ivi_layout_surface *ivisurf,
-- int32_t *pDimension);
--
--/**
-- * \brief Get the horizontal and vertical dimension of the surface.
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_surfaceGetDimension(struct ivi_layout_surface *ivisurf,
-- int32_t *pDimension);
--
--/**
-- * \brief Sets the horizontal and vertical position of the surface.
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_surfaceSetPosition(struct ivi_layout_surface *ivisurf,
-- int32_t *pPosition);
--
--/**
-- * \brief Get the horizontal and vertical position of the surface.
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_surfaceGetPosition(struct ivi_layout_surface *ivisurf,
-- int32_t *pPosition);
-+ivi_layout_surface_set_destination_rectangle(struct ivi_layout_surface *ivisurf,
-+ int32_t x, int32_t y,
-+ int32_t width, int32_t height);
-
- /**
- * \brief Sets the orientation of a surface.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_surfaceSetOrientation(struct ivi_layout_surface *ivisurf,
-- int32_t orientation);
--
--/**
-- * \brief Gets the orientation of a surface.
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_surfaceGetOrientation(struct ivi_layout_surface *ivisurf,
-- int32_t *pOrientation);
--
--/**
-- * \brief Gets the pixelformat of a surface.
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_surfaceGetPixelformat(struct ivi_layout_layer *ivisurf,
-- int32_t *pPixelformat);
--
--/**
-- * \brief Sets the color value which defines the transparency value of a surface.
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-- */
--int32_t
--ivi_layout_surfaceSetChromaKey(struct ivi_layout_surface *ivisurf,
-- int32_t* pColor);
-+ivi_layout_surface_set_orientation(struct ivi_layout_surface *ivisurf,
-+ enum wl_output_transform orientation);
-
- /**
- * \brief Add a layer to a screen which is currently managed by the service
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_screenAddLayer(struct ivi_layout_screen *iviscrn,
-- struct ivi_layout_layer *addlayer);
-+ivi_layout_screen_add_layer(struct ivi_layout_screen *iviscrn,
-+ struct ivi_layout_layer *addlayer);
-
- /**
- * \brief Sets render order of layers on a display
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_screenSetRenderOrder(struct ivi_layout_screen *iviscrn,
-- struct ivi_layout_layer **pLayer,
-- const int32_t number);
-+ivi_layout_screen_set_render_order(struct ivi_layout_screen *iviscrn,
-+ struct ivi_layout_layer **pLayer,
-+ const int32_t number);
-
- /**
-- * \brief Enable or disable a rendering optimization
-+ * \brief register for notification on property changes of layer
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_SetOptimizationMode(uint32_t id, int32_t mode);
-+ivi_layout_layer_add_notification(struct ivi_layout_layer *ivilayer,
-+ layer_property_notification_func callback,
-+ void *userdata);
-
- /**
-- * \brief Get the current enablement for an optimization
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \brief remove notification on property changes of layer
- */
--int32_t
--ivi_layout_GetOptimizationMode(uint32_t id, int32_t *pMode);
-+void
-+ivi_layout_layer_remove_notification(struct ivi_layout_layer *ivilayer);
-
- /**
-- * \brief register for notification on property changes of layer
-+ * \brief register for notification on property changes of surface
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_layerAddNotification(struct ivi_layout_layer *ivilayer,
-- layerPropertyNotificationFunc callback,
-- void *userdata);
-+ivi_layout_surface_add_notification(struct ivi_layout_surface *ivisurf,
-+ surface_property_notification_func callback,
-+ void *userdata);
-
- /**
-- * \brief remove notification on property changes of layer
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \brief remove notification on property changes of surface
- */
--int32_t
--ivi_layout_layerRemoveNotification(struct ivi_layout_layer *ivilayer);
-+void
-+ivi_layout_surface_remove_notification(struct ivi_layout_surface *ivisurf);
-
- /**
- * \brief Get the surface properties
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return (const struct ivi_surface_layer_properties *)
-+ * if the method call was successful
-+ * \return NULL if the method call was failed
- */
--int32_t
--ivi_layout_getPropertiesOfSurface(struct ivi_layout_surface *ivisurf,
-- struct ivi_layout_SurfaceProperties *pSurfaceProperties);
-+const struct ivi_layout_surface_properties *
-+ivi_layout_get_properties_of_surface(struct ivi_layout_surface *ivisurf);
-
- /**
- * \brief Add a surface to a layer which is currently managed by the service
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_layerAddSurface(struct ivi_layout_layer *ivilayer,
-- struct ivi_layout_surface *addsurf);
-+ivi_layout_layer_add_surface(struct ivi_layout_layer *ivilayer,
-+ struct ivi_layout_surface *addsurf);
-
- /**
- * \brief Removes a surface from a layer which is currently managed by the service
-- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
- */
--int32_t
--ivi_layout_layerRemoveSurface(struct ivi_layout_layer *ivilayer,
-- struct ivi_layout_surface *remsurf);
-+void
-+ivi_layout_layer_remove_surface(struct ivi_layout_layer *ivilayer,
-+ struct ivi_layout_surface *remsurf);
-
- /**
- * \brief Set the area of a surface which should be used for the rendering.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_surfaceSetSourceRectangle(struct ivi_layout_surface *ivisurf,
-- int32_t x, int32_t y,
-- int32_t width, int32_t height);
-+ivi_layout_surface_set_source_rectangle(struct ivi_layout_surface *ivisurf,
-+ int32_t x, int32_t y,
-+ int32_t width, int32_t height);
-
- /**
- * \brief get weston_output from ivi_layout_screen.
- *
-- * \return (struct weston_screen *)
-+ * \return (struct weston_output *)
- * if the method call was successful
- * \return NULL if the method call was failed
- */
- struct weston_output *
--ivi_layout_screenGetOutput(struct ivi_layout_screen *);
-+ivi_layout_screen_get_output(struct ivi_layout_screen *);
-
- struct weston_surface *
--ivi_layout_surfaceGetWestonSurface(struct ivi_layout_surface *ivisurf);
-+ivi_layout_surface_get_weston_surface(struct ivi_layout_surface *ivisurf);
-
- int32_t
--ivi_layout_surfaceGetSize(struct ivi_layout_surface *ivisurf, int32_t *width, int32_t *height, int32_t *stride);
-+ivi_layout_surface_get_size(struct ivi_layout_surface *ivisurf,
-+ int32_t *width,
-+ int32_t *height,
-+ int32_t *stride);
-
- int32_t
--ivi_layout_layerSetTransition(struct ivi_layout_layer *ivilayer,
-- enum ivi_layout_transition_type type,
-- uint32_t duration);
-+ivi_layout_layer_set_transition(struct ivi_layout_layer *ivilayer,
-+ enum ivi_layout_transition_type type,
-+ uint32_t duration);
-
- int32_t
--ivi_layout_layerSetFadeInfo(struct ivi_layout_layer* layer,
-- uint32_t is_fade_in,
-- double start_alpha, double end_alpha);
-+ivi_layout_layer_set_fade_info(struct ivi_layout_layer* layer,
-+ uint32_t is_fade_in,
-+ double start_alpha, double end_alpha);
-
- int32_t
--ivi_layout_surfaceSetTransition(struct ivi_layout_surface *ivisurf,
-- enum ivi_layout_transition_type type,
-- uint32_t duration);
-+ivi_layout_surface_set_transition(struct ivi_layout_surface *ivisurf,
-+ enum ivi_layout_transition_type type,
-+ uint32_t duration);
-
--int32_t
--ivi_layout_surfaceSetTransitionDuration(struct ivi_layout_surface *ivisurf,uint32_t duration);
-+void
-+ivi_layout_transition_layer_render_order(struct ivi_layout_layer* layer,
-+ struct ivi_layout_surface** new_order,
-+ uint32_t surface_num,
-+ uint32_t duration);
-+
-+void
-+ivi_layout_transition_move_layer_cancel(struct ivi_layout_layer* layer);
-
- /**
-- * \brief Commit all changes and execute all enqueued commands since last commit.
-+ * \brief Commit all changes and execute all enqueued commands since
-+ * last commit.
- *
-- * \return 0 if the method call was successful
-- * \return -1 if the method call was failed
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
- */
- int32_t
--ivi_layout_commitChanges(void);
-+ivi_layout_commit_changes(void);
-
- #ifdef __cplusplus
--} /**/
-+}
- #endif /* __cplusplus */
-
- #endif /* _IVI_LAYOUT_EXPORT_H_ */
-diff --git a/weston-ivi-shell/src/ivi-layout.h b/weston-ivi-shell/src/ivi-layout.h
-deleted file mode 100644
-index 7a53733..0000000
---- a/weston-ivi-shell/src/ivi-layout.h
-+++ /dev/null
-@@ -1,147 +0,0 @@
--/*
-- * Copyright (C) 2013 DENSO CORPORATION
-- *
-- * Permission to use, copy, modify, distribute, and sell this software and
-- * its documentation for any purpose is hereby granted without fee, provided
-- * that the above copyright notice appear in all copies and that both that
-- * copyright notice and this permission notice appear in supporting
-- * documentation, and that the name of the copyright holders not be used in
-- * advertising or publicity pertaining to distribution of the software
-- * without specific, written prior permission. The copyright holders make
-- * no representations about the suitability of this software for any
-- * purpose. It is provided "as is" without express or implied warranty.
-- *
-- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
-- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
-- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
-- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
-- * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-- */
--
--/**
-- * The ivi-layout library supports API set of controlling properties of
-- * surface and layer which groups surfaces. An unique ID whose type is integer
-- * is required to create surface and layer. With the unique ID, surface and
-- * layer are identified to control them. The API set consists of APIs to control
-- * properties of surface and layers about followings,
-- * - visibility.
-- * - opacity.
-- * - clipping (x,y,width,height).
-- * - position and size of it to be displayed.
-- * - orientation per 90 degree.
-- * - add or remove surfaces to a layer.
-- * - order of surfaces/layers in layer/screen to be displayed.
-- * - commit to apply property changes.
-- * - notifications of property change.
-- *
-- * Management of surfaces and layers grouping these surfaces are common way in
-- * In-Vehicle Infotainment system, which integrate several domains in one system.
-- * A layer is allocated to a domain in order to control application surfaces
-- * grouped to the layer all together.
-- */
--
--#ifndef _IVI_LAYOUT_H_
--#define _IVI_LAYOUT_H_
--
--#ifdef __cplusplus
--extern "C" {
--#endif /* __cplusplus */
--
--#include "compositor.h"
--
--struct ivi_layout_surface;
--struct ivi_layout_layer;
--struct ivi_layout_screen;
--
--struct ivi_layout_SurfaceProperties
--{
-- float opacity;
-- uint32_t sourceX;
-- uint32_t sourceY;
-- uint32_t sourceWidth;
-- uint32_t sourceHeight;
-- uint32_t origSourceWidth;
-- uint32_t origSourceHeight;
-- int32_t startX;
-- int32_t startY;
-- uint32_t startWidth;
-- uint32_t startHeight;
-- int32_t destX;
-- int32_t destY;
-- uint32_t destWidth;
-- uint32_t destHeight;
-- uint32_t orientation;
-- uint32_t visibility;
-- uint32_t frameCounter;
-- uint32_t drawCounter;
-- uint32_t updateCounter;
-- uint32_t pixelformat;
-- uint32_t nativeSurface;
-- uint32_t inputDevicesAcceptance;
-- uint32_t chromaKeyEnabled;
-- uint32_t chromaKeyRed;
-- uint32_t chromaKeyGreen;
-- uint32_t chromaKeyBlue;
-- int32_t creatorPid;
-- int32_t transitionType;
-- uint32_t transitionDuration;
-- uint32_t hasKeyboardFocus;
--};
--
--struct ivi_layout_LayerProperties
--{
-- float opacity;
-- uint32_t sourceX;
-- uint32_t sourceY;
-- uint32_t sourceWidth;
-- uint32_t sourceHeight;
-- uint32_t origSourceWidth;
-- uint32_t origSourceHeight;
-- int32_t destX;
-- int32_t destY;
-- uint32_t destWidth;
-- uint32_t destHeight;
-- uint32_t orientation;
-- uint32_t visibility;
-- uint32_t type;
-- uint32_t chromaKeyEnabled;
-- uint32_t chromaKeyRed;
-- uint32_t chromaKeyGreen;
-- uint32_t chromaKeyBlue;
-- int32_t creatorPid;
-- int32_t transitionType;
-- uint32_t transitionDuration;
-- double startAlpha;
-- double endAlpha;
-- uint32_t isFadeIn;
--};
--
--enum ivi_layout_warning_flag {
-- IVI_WARNING_INVALID_WL_SURFACE,
-- IVI_WARNING_IVI_ID_IN_USE
--};
--
--struct ivi_layout_interface {
-- struct weston_view* (*get_weston_view)(struct ivi_layout_surface *surface);
-- void (*surfaceConfigure)(struct ivi_layout_surface *ivisurf,
-- int32_t width, int32_t height);
-- int32_t (*surfaceSetNativeContent)(struct weston_surface *wl_surface,
-- int32_t width,
-- int32_t height,
-- uint32_t id_surface);
-- struct ivi_layout_surface* (*surfaceCreate)(struct weston_surface *wl_surface,
-- uint32_t id_surface);
-- void (*initWithCompositor)(struct weston_compositor *ec);
-- void (*emitWarningSignal)(uint32_t id_surface,
-- enum ivi_layout_warning_flag flag);
--};
--
--WL_EXPORT struct ivi_layout_interface ivi_layout_interface;
--
--#ifdef __cplusplus
--} /**/
--#endif /* __cplusplus */
--
--#endif /* _IVI_LAYOUT_H_ */
diff --git a/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/fix_compositor_include.patch b/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/fix_compositor_include.patch
deleted file mode 100644
index d9238d5..0000000
--- a/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/fix_compositor_include.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Index: git/weston-ivi-shell/src/ivi-layout-export.h
-===================================================================
---- git.orig/weston-ivi-shell/src/ivi-layout-export.h 2014-07-10 13:49:00.274877329 +0300
-+++ git/weston-ivi-shell/src/ivi-layout-export.h 2014-07-10 13:50:52.690874042 +0300
-@@ -49,7 +49,7 @@
- extern "C" {
- #endif /* __cplusplus */
-
--#include "compositor.h"
-+#include <weston/compositor.h>
- #include "ivi-layout.h"
-
- struct ivi_layout_SurfaceProperties
-Index: git/weston-ivi-shell/src/ivi-layout.h
-===================================================================
---- git.orig/weston-ivi-shell/src/ivi-layout.h 2014-07-10 13:49:00.274877329 +0300
-+++ git/weston-ivi-shell/src/ivi-layout.h 2014-07-10 13:51:02.802873746 +0300
-@@ -49,7 +49,7 @@
- extern "C" {
- #endif /* __cplusplus */
-
--#include "compositor.h"
-+#include <weston/compositor.h>
-
- struct ivi_layout_surface;
-
diff --git a/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/remove_compile-host-path_issue.patch b/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/remove_compile-host-path_issue.patch
new file mode 100644
index 0000000..6849d2a
--- /dev/null
+++ b/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/remove_compile-host-path_issue.patch
@@ -0,0 +1,17 @@
+--- git/ivi-input-modules/ivi-input-controller/CMakeLists.txt.orig 2016-01-28 18:19:37.297557498 +0900
++++ git/ivi-input-modules/ivi-input-controller/CMakeLists.txt 2016-01-28 18:20:01.249558101 +0900
+@@ -37,14 +37,12 @@
+ ${IVI_CONTROLLER_INCLUDE_DIRS}
+ ${WAYLAND_SERVER_INCLUDE_DIRS}
+ ${WESTON_INCLUDE_DIRS}
+- ${WESTON_INCLUDE_DIRS}/weston
+ ${PIXMAN_INCLUDE_DIRS}
+ )
+
+ link_directories(
+ ${WAYLAND_SERVER_LIBRARY_DIRS}
+ ${WESTON_LIBRARY_DIRS}
+- ${WESTON_LIBDIR}/weston
+ ${PIXMAN_LIBRARY_DIRS}
+ )
+
diff --git a/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/use_sysroot_dir.patch b/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/use_sysroot_dir.patch
deleted file mode 100644
index 17dbb9e..0000000
--- a/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension/use_sysroot_dir.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: git/weston-ivi-shell/CMakeLists.txt
-===================================================================
---- git.orig/weston-ivi-shell/CMakeLists.txt
-+++ git/weston-ivi-shell/CMakeLists.txt
-@@ -49,7 +49,7 @@ link_directories(
- ${CAIRO_LIBRARY_DIRS}
- ${WESTON_LIBRARY_DIRS}
- ${PIXMAN_LIBRARY_DIRS}
-- ${WESTON_LIBDIR}/weston
-+ =${WESTON_LIBDIR}/weston
- ${EGL_LIBRARY_DIRS}
- ${GLES_LIBRARY_DIRS}
- )
diff --git a/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension_1.2.0.bb b/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension_1.2.0.bb
deleted file mode 100644
index fdc7c50..0000000
--- a/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension_1.2.0.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Wayland IVI Extension"
-DESCRIPTION = "GENIVI Layer Management API based on Wayland IVI Extension"
-HOMEPAGE = "http://projects.genivi.org/wayland-ivi-extension"
-BUGTRACKER = "http://bugs.genivi.org/enter_bug.cgi?product=Wayland%20IVI%20Extension"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=176cedb32f48dd58f07e0c1c717b3ea4"
-
-DEPENDS = "weston"
-
-SRC_URI = "git://git.projects.genivi.org/wayland-ivi-extension.git \
- file://use_sysroot_dir.patch \
- file://fix_compositor_include.patch \
- "
-SRCREV = "278437417d1ac0958a800eecfebd2a388d6d9ca7"
-S = "${WORKDIR}/git"
-
-inherit cmake autotools
-
-FILES_${PN} += "${libdir}/weston/*"
-FILES_${PN}-dbg += "${libdir}/weston/.debug/*"
diff --git a/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension_1.3.0.bb b/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension_1.3.0.bb
deleted file mode 100644
index f7d8d0a..0000000
--- a/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension_1.3.0.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "Wayland IVI Extension"
-DESCRIPTION = "GENIVI Layer Management API based on Wayland IVI Extension"
-HOMEPAGE = "http://projects.genivi.org/wayland-ivi-extension"
-BUGTRACKER = "http://bugs.genivi.org/enter_bug.cgi?product=Wayland%20IVI%20Extension"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=176cedb32f48dd58f07e0c1c717b3ea4"
-
-DEPENDS = "weston"
-
-# FIX ME
-# This should be TAG = "${PV}" but yocto doesn't support lightweight tags for now
-# https://bugzilla.yoctoproject.org/show_bug.cgi?id=6881
-#TAG = "a4bde3e5a4c21ff7cf28cc027d45d7c63cac2f66"
-TAG = "1.3.91"
-SRC_URI = "git://git.projects.genivi.org/${PN}.git;tag=${TAG} \
- file://use_sysroot_dir.patch \
- file://apply_weston-1.6.x.patch \
- "
-#"
-# file://fix_compositor_include.patch \
-#"
-S = "${WORKDIR}/git"
-
-inherit cmake autotools
-
-FILES_${PN} += "${libdir}/weston/*"
-FILES_${PN}-dbg += "${libdir}/weston/.debug/*"
diff --git a/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension_1.5.0.bb b/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension_1.9.0.bb
index 56bb560..d7310fc 100644
--- a/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension_1.5.0.bb
+++ b/meta-ivi/recipes-graphics/wayland/wayland-ivi-extension_1.9.0.bb
@@ -5,16 +5,20 @@ BUGTRACKER = "http://bugs.genivi.org/enter_bug.cgi?product=Wayland%20IVI%20Exten
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=176cedb32f48dd58f07e0c1c717b3ea4"
-DEPENDS = "weston"
+PR = "r1"
+SRCREV = "beac5d2e25324ca9cc82d0e3b364512258af3567"
SRC_URI = "git://git.projects.genivi.org/${PN}.git \
- file://apply_weston-1.5.x.patch \
- "
-SRCREV = "8f0874b606b8e2a9385af947728905735bad3939"
-
+ file://remove_compile-host-path_issue.patch \
+ file://0001-buildsystem-make-example-programs-link-to-the-genera.patch \
+ "
S = "${WORKDIR}/git"
+DEPENDS = "weston"
+
inherit cmake autotools
+EXTRA_OECMAKE := "-DWITH_ILM_INPUT=1"
+
FILES_${PN} += "${libdir}/weston/*"
FILES_${PN}-dbg += "${libdir}/weston/.debug/*"
diff --git a/meta-ivi/recipes-graphics/wayland/wayland_1.6.0.bbappend b/meta-ivi/recipes-graphics/wayland/wayland_1.6.0.bbappend
deleted file mode 100644
index 3d3584a..0000000
--- a/meta-ivi/recipes-graphics/wayland/wayland_1.6.0.bbappend
+++ /dev/null
@@ -1,8 +0,0 @@
-PR = "r1"
-
-# [PATCH] build fix up of "error: 'WL_POINTER_ERROR_ROLE' undeclared"
-# to support this macro, we have to go version 1.6.91
-# Signed-off-by: Yong-iL Joh <yong-il.joh at windriver.com>
-SRC_URI_remove = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
-SRC_URI_append += "git://anongit.freedesktop.org/wayland/wayland.git;tag=1.6.91"
-S = "${WORKDIR}/git"
diff --git a/meta-ivi/recipes-graphics/wayland/wayland_1.9.0.bb b/meta-ivi/recipes-graphics/wayland/wayland_1.9.0.bb
new file mode 100644
index 0000000..00d2a56
--- /dev/null
+++ b/meta-ivi/recipes-graphics/wayland/wayland_1.9.0.bb
@@ -0,0 +1,41 @@
+SUMMARY = "Wayland, a protocol between a compositor and clients"
+DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \
+as well as a C library implementation of that protocol. The compositor can be \
+a standalone display server running on Linux kernel modesetting and evdev \
+input devices, an X application, or a wayland client itself. The clients can \
+be traditional applications, X servers (rootless or fullscreen) or other \
+display servers."
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \
+ file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce"
+
+SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "5e141b3f2a7005d6c89d6f233c87c317"
+SRC_URI[sha256sum] = "9c8770720aa0034479735f58a4dc4ca9b172ecfede28f5134312e135b7301efa"
+
+EXTRA_OECONF_class-native = "--disable-documentation"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
+
+DEPENDS = "expat libffi wayland-native"
+
+EXTRA_OECONF = "--disable-documentation --with-host-scanner"
+
+# Wayland installs a M4 macro for other projects to use, which uses the target
+# pkg-config to find files. Replace pkg-config with pkg-config-native.
+do_install_append_class-native() {
+ sed -e 's,PKG_CHECK_MODULES(.*),,g' \
+ -e 's,$PKG_CONFIG,pkg-config-native,g' \
+ -i ${D}/${datadir}/aclocal/wayland-scanner.m4
+}
+
+sysroot_stage_all_append_class-target () {
+ rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4
+ cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
+}
+
+FILES_${PN} = "${libdir}/*${SOLIBS}"
+FILES_${PN}-dev += "${bindir} ${datadir}/wayland"
diff --git a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0001-README-modifed-for-ivi-shell.patch b/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0001-README-modifed-for-ivi-shell.patch
deleted file mode 100644
index 5712d02..0000000
--- a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0001-README-modifed-for-ivi-shell.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 0a9f945fe49de1653681589711a31f2431522282 Mon Sep 17 00:00:00 2001
-From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-Date: Wed, 29 Jan 2014 15:53:59 +0900
-Subject: [PATCH 01/15] README modifed for ivi-shell
-
-changes for amendament v1:
- add ivi-shell/README.
- move description of ivi-shell from README to ivi-shell/README
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------------
-changes for v2:
-ivi-shell: Update README more details
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
----
- ivi-shell/README | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 79 insertions(+)
- create mode 100644 ivi-shell/README
-
-diff --git a/ivi-shell/README b/ivi-shell/README
-new file mode 100644
-index 0000000..7f41291
---- /dev/null
-+++ b/ivi-shell/README
-@@ -0,0 +1,79 @@
-+ In-vehicle infotainment (information and entertainment)
-+ graphical environment support modules for Weston
-+
-+
-+IVI-shell is an alternative shell for Weston, a Wayland display server.
-+Window management and application interaction with the display server
-+are very different to that of a normal desktop, which is why this is
-+a separate shell and not an extension to the desktop-shell suite with
-+xdg_shell. As such, applications need to be specifically written to use
-+IVI-shell.
-+
-+IVI-shell contains two main features:
-+- Common layout library for surface, which allow ivi-shell developer
-+ to develop own shell, linking Common layout library.
-+ For the time being, the library refers Genivi ilm interface.
-+
-+ http://projects.genivi.org/wayland-ivi-extension/
-+
-+- Extension protocal; ivi-application to tie wl_surface and a given ID.
-+ With this ID, shell can identify which wl_surface is drawn by which
-+ application. In in-vehicle infortainment system, a shell has to update
-+ a property of a wl_surface. E.g. there may be a use case when vehicle
-+ starts to move, the wl_surface drawn by Car navigation is expected to
-+ move top of surfaces.
-+
-+The actual software components delivered with Weston are:
-+
-+- ivi-application.xml:
-+ Wayland protocol extension for IVI-applications; the public
-+ shell protocol (the same concept as xdg_shell).
-+ Implemented by ivi-shell.so.
-+
-+- ivi-shell.so:
-+ A Weston shell module that implements ivi-application.xml interfaces.
-+ Loads ivi-layout.so.
-+
-+- ivi-layout.so:
-+ Implements the IVI window management concepts: Screen, Layer,
-+ Surface, groups of Layers, groups of Surfaces, see:
-+ http://projects.genivi.org/ivi-layer-management/node/13
-+ Offers a stable API for writing IVI-controller modules like
-+ hmi-controller.so against the IVI concepts. In other words,
-+ it offers an API to write IVI window manager modules.
-+
-+- hmi-controller.so:
-+ A sample implementation of an IVI-controller module, usually
-+ replaced by IVI system vendors.
-+ Uses ivi-layout.so to perform essentially window manager tasks.
-+ This implementation keeps all window management inside the module,
-+ while IVI-systems may use another module that exposes all window
-+ management via Wayland or other protocol for an external process
-+ to control:
-+ http://git.projects.genivi.org/?p=wayland-ivi-extension.git;a=summary
-+
-+- ivi-hmi-controller.xml:
-+ Wayland protocol extension for IVI display control; the private
-+ shell protocol for weston-ivi-shell-user-interface client
-+ (the same concept as desktop-shell.xml).
-+ Implemented by hmi-controller.so, and usually replaced by IVI
-+ system vendors.
-+
-+- weston-ivi-shell-user-interface:
-+ A sample implementation of an IVI shell helper client, usually
-+ replaced by IVI system vendors.
-+ A helper client for basic display content, similar to
-+ weston-desktop-shell.
-+
-+
-+How to compile:
-+same as weston. To disable, use option: --disable-ivi-shell for configure.
-+
-+How to configure weston.ini:
-+reference ini file will be generated in <build_dir>/ivi-shell.
-+
-+How to run:
-+same as weston. exec weston.
-+
-+How to use UI:
-+http://lists.freedesktop.org/archives/wayland-devel/attachments/20140625/abbfc064/attachment-0001.png
---
-1.7.9.5
-
diff --git a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0002-protocol-add-interface-ivi_application-extension.patch b/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0002-protocol-add-interface-ivi_application-extension.patch
deleted file mode 100644
index 8087743..0000000
--- a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0002-protocol-add-interface-ivi_application-extension.patch
+++ /dev/null
@@ -1,239 +0,0 @@
-From 983fb7e0cf9f91a60e1cb07f73fb5e70b4cc9362 Mon Sep 17 00:00:00 2001
-From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-Date: Mon, 17 Mar 2014 14:15:14 +0900
-Subject: [PATCH 02/15] protocol: add interface ivi_application extension
-
-- introduces ivi-application.xml
-
-<<<<<<new
-Many applications in an IVI-system are special single-purpose
-applications that have a very specific role in the whole IVI UI, for
-example a rear camera, speedometer, map, etc. The IVI system vendor
-specifies what these are and how they integrate into the UI. They also
-vary between particular IVI systems. This is why we use (system-)global,
-unique, pre-determined ID numbers to tell what wl_surface is which
-application, instead of writing specific shell requests for each one.
-Using ID numbers allows vendors to easily invent new component
-applications without extending or breaking the actual Wayland protocol.
-In IVI-systems, the ID is a standard concept already used in several
-APIs, with a vendor-specified global definition of ID assignments.`
->>>>>>old
-ivi_applicatoin extension creates ivi_surface objects tied
-to a given wl_surface with a given id. The given id can be used in a
-shell to identify which application is assigned to a wl_surface and
-layout the surface wherever the shell wants. ivi_surface objects can
-be used to receive status of wl_surface in the scenegraph of the
-compositor.
-------
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-ivi-application.xml: Add configure event in ivi_surface
-
-Configure event is notified to suggest resize of its surface
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------------
-protocol: update description of destroy.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------------
-protocol: ivi-application, remove Visibility event.
-
-Visibility event can be replaced with frame event. We need to clarify
-IVI use case to enalbe again, why explicit event is required.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------------
-protocol: ivi-application.xml, update decription of ivi-application
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------------
-protocol: ivi-application add errors and modify description of
-surface_create
-
-Indeed, the new role stuff. For more information, see:
-http://cgit.freedesktop.org/wayland/wayland/commit/?id=ff2df60b1a07c3d26d170e65cd5440d15cdf3088
-and examples:
-http://cgit.freedesktop.org/wayland/wayland/commit/?id=a27501f40e9a369ed5d4c655674130e76214281f
-http://cgit.freedesktop.org/wayland/wayland/commit/?id=7a0b86ab22e026387b6d529a46d8eb416caa26fa
-http://cgit.freedesktop.org/wayland/weston/commit/?id=50b67479033709d8ab32744c7b8346b130ace9e0
-
-So, you also need to add a protocol error code for role errors like in
-the examples.
-
-What happens if the ID is already used by an existing surface? Does that
-depend on the particular ID perhaps?
-
-Would you want to tie ID as a role? Note, that if you do, there cannot
-be two surfaces with the same ID.
-
-I think we talked about this before, but the specifications are still
-missing here.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------------
-protocol: ivi-application.xml. alignment of indents
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------------
-protocol: fix xml format error
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------------
-Makefile.am: add ivi-application to toolkit
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------------
-protocol: ivi-application.xml, add clear decription of surface_create
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------------
-protocol: ivi-application.xml, update license file test
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
----
- Makefile.am | 7 ++-
- protocol/ivi-application.xml | 96 ++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 101 insertions(+), 2 deletions(-)
- create mode 100644 protocol/ivi-application.xml
-
-diff --git a/Makefile.am b/Makefile.am
-index b2d6893..2330933 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -446,7 +446,9 @@ nodist_libtoytoolkit_la_SOURCES = \
- protocol/workspaces-protocol.c \
- protocol/workspaces-client-protocol.h \
- protocol/xdg-shell-protocol.c \
-- protocol/xdg-shell-client-protocol.h
-+ protocol/xdg-shell-client-protocol.h \
-+ protocol/ivi-application-protocol.c \
-+ protocol/ivi-application-client-protocol.h
-
- BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES)
-
-@@ -987,7 +989,8 @@ EXTRA_DIST += \
- protocol/wayland-test.xml \
- protocol/xdg-shell.xml \
- protocol/fullscreen-shell.xml \
-- protocol/scaler.xml
-+ protocol/scaler.xml \
-+ protocol/ivi-application.xml
-
- man_MANS = weston.1 weston.ini.5
-
-diff --git a/protocol/ivi-application.xml b/protocol/ivi-application.xml
-new file mode 100644
-index 0000000..6bb90a7
---- /dev/null
-+++ b/protocol/ivi-application.xml
-@@ -0,0 +1,96 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<protocol name="ivi_application">
-+
-+ <copyright>
-+ Copyright (C) 2013 DENSO CORPORATION
-+ Copyright (c) 2013 BMW Car IT GmbH
-+
-+ Permission to use, copy, modify, distribute, and sell this software and
-+ its documentation for any purpose is hereby granted without fee, provided
-+ that the above copyright notice appear in all copies and that both that
-+ copyright notice and this permission notice appear in supporting
-+ documentation, and that the name of the copyright holders not be used in
-+ advertising or publicity pertaining to distribution of the software
-+ without specific, written prior permission. The copyright holders make
-+ no representations about the suitability of this software for any
-+ purpose. It is provided "as is" without express or implied warranty.
-+
-+ THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
-+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-+ FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
-+ SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
-+ RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
-+ CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-+ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ </copyright>
-+
-+ <interface name="ivi_surface" version="1">
-+ <description summary="application interface to surface in ivi compositor"/>
-+
-+ <request name="destroy" type="destructor">
-+ <description summary="destroy ivi_surface">
-+ This removes link from ivi_id to wl_surface and destroys ivi_surface.
-+ The ID, ivi_id, is free and can be used for surface_create again.
-+ </description>
-+ </request>
-+
-+ <event name="configure">
-+ <description summary="suggest resize">
-+ The configure event asks the client to resize its surface.
-+
-+ The size is a hint, in the sense that the client is free to
-+ ignore it if it doesn't resize, pick a smaller size (to
-+ satisfy aspect ratio or resize in steps of NxM pixels).
-+
-+ The client is free to dismiss all but the last configure
-+ event it received.
-+
-+ The width and height arguments specify the size of the window
-+ in surface local coordinates.
-+ </description>
-+ <arg name="width" type="int"/>
-+ <arg name="height" type="int"/>
-+ </event>
-+ </interface>
-+
-+ <interface name="ivi_application" version="1">
-+ <description summary="create ivi-style surfaces">
-+ This interface is exposed as a global singleton.
-+ This interface is implemented by servers that provide IVI-style user interfaces.
-+ It allows clients to associate a ivi_surface with wl_surface.
-+ </description>
-+
-+ <enum name="error">
-+ <entry name="role" value="0" summary="given wl_surface has another role"/>
-+ <entry name="ivi_id" value="1" summary="given ivi_id is assigned to another wl_surface"/>
-+ </enum>
-+
-+ <request name="surface_create">
-+ <description summary="create ivi_surface with numeric ID in ivi compositor">
-+ This request gives the wl_surface the role of an IVI Surface. Creating more than
-+ one ivi_surface for a wl_surface is not allowed. Note, that this still allows the
-+ following example:
-+
-+ 1. create a wl_surface
-+ 2. create ivi_surface for the wl_surface
-+ 3. destroy the ivi_surface
-+ 4. create ivi_surface for the wl_surface (with the same or another ivi_id as before)
-+
-+ surface_create will create a interface:ivi_surface with numeric ID; ivi_id in
-+ ivi compositor. These ivi_ids are defined as unique in the system to identify
-+ it inside of ivi compositor. The ivi compositor implements business logic how to
-+ set properties of the surface with ivi_id according to status of the system.
-+ E.g. a unique ID for Car Navigation application is used for implementing special
-+ logic of the application about where it shall be located.
-+ The server regards following cases as protocol errors and disconnects the client.
-+ - wl_surface already has an nother role.
-+ - ivi_id is already assigned to an another wl_surface
-+ </description>
-+ <arg name="ivi_id" type="uint"/>
-+ <arg name="surface" type="object" interface="wl_surface"/>
-+ <arg name="id" type="new_id" interface="ivi_surface"/>
-+ </request>
-+
-+ </interface>
-+
-+</protocol>
---
-1.7.9.5
-
diff --git a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0003-ivi-shell-add-IVI-layout-APIs.patch b/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0003-ivi-shell-add-IVI-layout-APIs.patch
deleted file mode 100644
index 94919dd..0000000
--- a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0003-ivi-shell-add-IVI-layout-APIs.patch
+++ /dev/null
@@ -1,5642 +0,0 @@
-From f67d989f4b5e1ffd7e6cc562bf6065917b748342 Mon Sep 17 00:00:00 2001
-From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-Date: Tue, 6 May 2014 17:25:31 +0900
-Subject: [PATCH 03/15] ivi-shell: add IVI layout APIs
-
-- ivi-layout.so
-- introduces ivi-layout-export.h, ivi-layout.[ch]
-
-API set of controlling properties of surface and layer which groups
-surfaces. An unique ID whose type is integer is required to create
-surface and layer. With the unique ID, surface and layer are identified
-to control them. The API set consists of APIs to control properties of
-surface and layers about followings,
-
-- visibility.
-- opacity.
-- clipping (x,y,width,height).
-- position and size of it to be displayed.
-- orientation per 90 degree.
-- add or remove surfaces to a layer.
-- order of surfaces/layers in layer/screen to be displayed.
-- commit to apply property changes.
-- notifications of property change.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-ivi-layout: fix calculation of view scale.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
---------------------------------------------------------
-ivi-shell/ivi-layout.[ch] from transition animation
-
---------------------------------------------------------
-ivi-shell/ivi-layout-export.h from transition animation
-
---------------------------------------------------------
-ivi-shell/ivi-layout-private.h from transition animation
-
---------------------------------------------------------
-ivi-shell: Add IVI layout APIs - ivi_layout_surfaceGetWestonSurface - ivi_layout_surfaceGetSize These are used by screenshot APIs.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
--------------------------------------------------------
-update for configure support
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------
-ivi-shell: transition animation support
-
-- introduces ivi-shell/ivi-layout-transition.[ch]
-
-interpolate animation when an atribute of surface is changed by
-commitChanges.
-
------------------------------------------------------------
-update for configure support for transition animation
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Insert a space between "void" and "(*".
-
-> > In all function pointer type definitions, need a space between "void"
-> > and "(*".
-> [ntanibata] I will fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
------------------------------------------------------------
-
-ivi-shell: Define return type.
-
-> > Hm, the return type is unsigned, so -1 makes little sense. Should
-> > there
-> > be something like #define IVI_INVALID_ID 0xffffffff and the use
-> > that?
-> [ntanibata] I agree.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Delete unused APIs
-
-> What is color? An array? How many bits per channel?
-> What if the output or buffer is at different bit depth?
-> [ntanibata] This is not valid. I will remove.
-
-> What are capabilities?
-> [ntanibata] This is not valid now. I will remove.
-
-> What is a layer type?
-> [ntanibata] This is not valid now. I will remove.
-
-> Unimplemented... how would you use this?
-> How would you set the content?
-> [ntanibata] This is not valid now. I will remove.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: remove commented-out code
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Delete input acceptance function.
-
-> > Is this really necessary, when you could be forcing the input region
-> > of
-> > weston_surface? What are 'devices' and...
-> >
-> > Oh, I see that this function is not actually implemented. You should
-> > remove
-> > all functions you do not implement. You can add the implementations
-> > later,
-> > and if you need the stubs to be able to test non-upstream code, you
-> > can
-> > keep the stubs in your own repository.
-> >
-> [ntanibata] I agree.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: layout APIs header, clean up public and private ones in two
-headers, ivi-layout-export/private.h
-
-> b40fdf4 ivi-shell: add IVI layout APIs
->
-> Header rearrangements?
-> What are the API stability guarantees?
-> New title: "ivi-shell: add ivi-layout.so module and API"
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Changed stdbool from uint32_t
-
-> Supposedly visibility is a boolean? Non-zero means visible?
-> [ntanibata] It should be a Boolean. I will fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Change the return-type of APIs to void if it had not used.
-
-> > It's kind of strange to see this sort of function being able to
-> > return
-> > failure. How could it reasonably fail?
-> >
-> > Looking at your implementation, it cannot fail, unless the caller
-> > made
-> > a mistake. It is worth returning a failure only if the called can
-> > sensibly
-> > react to or recover from it.
-> >
-> > Couldn't this (and all other remove functions) just return void?
-> >
-> > You can still do the sanity check in the code and log an error, but
-> > I
-> don't
-> > see value in returning the error from the function. Is there some
-> > value?
-> >
-> [ntanibata] I will change it to void.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-Change return-type of getter of properties APIs to const properties pointer.
-
-> > Any particular reason to return a copy, rather than a const pointer to
-> > the original?
-> [ntanibata] I will check.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Return the requested value in the return value.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Change type of orientation value int32_t to wl_output_transform.
-
-> > > > What is 'orientation'? enum wl_output_transform?
-> > > [ntanibata] rotate surface/layer with 0,90,180,270 degree.
-> >
-> > Yeah, I guessed that much, but what is the actual API here? :-)
-> > The values from enum wl_output_transform?
-> [ntanibata] they are from here. However, it should use enum
-> defined in Weston. I will fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Delete functions of Keyboard focus.
-
-> > Keyboard focus of which weston_seat? How do you handle multiple
-> > weston_seats?
-> [ntanibata] This would be discuss later with patch of src/input.c.
-> For the time being, this will be removed.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Replace allocation check assert to if-statement.
-
-> > Heh, considering your usual paranoid pointer checks, using an assert
-> > here is surprising. ;-)
-> >
-> > I think in Weston we are accustomed to check the return value from
-> > malloc() and propagate the failure, even though it usually is in
-> > vain.
-> >
-> > assert()s should be reserved for programmer errors.
-> [ntanibata] I see. I will fix.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Delete needless memory allocation.
-
-> > Just allocate it from stack instead?
-> [ntanibata] I will fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Use the weston_config that has already been created.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Output log when mamory allocation fails.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Delete cursor check.
-
-> > > > What is this about?
-> > > > Why would you remove the cursor_layer?
-> > > > Also, there is a default cursor theme if nothing is set in
-> > > > weston.ini.
-> > > [ntanibata] I think I should add comments clearly.
-> > > If cursor-theme is not set, I want to disable showing cursor
-> > > because cursor is not mandatory on ivi system e.g with touch
-> > > panel.
-> > > So I call wl_list_remove.
-> >
-> > But a cursor theme has nothing to do whether a cursor will be shown.
-> > If no theme is set, a default theme is used (and if that does not
-> > exist, a built-in theme from libwayland-cursor gets used). So there
-> > is always some theme, regardless of settings.
-> >
-> > A cursor will be shown, if the compositor has a wl_pointer device (a
-> > mouse).
-> > If there are no wl_pointer devices, there are also no cursors.
-> > That is how Weston works already.
-> [ntanibata] Oh, I see. This feature fix may use case. So I will remove
-> this code.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Fix ivi_layout_layerGetDimension
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Change int type from array type
-
-> Just one value? Or is it supposed to be an array of two values?
-> [ntanibata] It is an array two values.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Delete unsupported APIs.
-
-> > Why would an external module want to know? It cannot really do
-> > anything
-> > with that information, can it?
-> >
-> > Handling hardware overlays is an internal detail of a Weston
-> > backend, and
-> > deliberately not exposed to clients, and not even to outside of the
-> > backend really.
-> [ntanibata] I will remote this API. This is just a history from Layer
-> manager
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Modification of function name
-
-> "identifier"?
-> [ntanibata] right. I will fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: Fix comment out message
-
-> Twice?
-> [ntanibata] Oh, I will remove one.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: Add function header comments.
-
-> > What is this for really? The implementation looks suspiciously
-> > broken,
-> > depending on how it is supposed to be used.
-> [ntanibata] If this is not used, I will remove.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-
-ivi-shell: Fix ivi_layout_surfaceSetPosition. Change int type from array type
-
-> Again, array of two or?
-> [ntanibata] I will fix.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-
-Add comments: what happens when commitchange is called during transition
-animation in comment of ivi-layout.c
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: Delete ivi_layout_surface_pixelformat
-
-> Does this pixel format enumeration come from somewhere, or was it
-> invented here? Or are you removing it with the unsupported/unused features?
-> [ntanibata]Yes, I will remove them.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: Change quoted_printable_encode form camelcase
-
-> Is the style here, that all internal and Weston core facing things are
-> named with underscores, and all ivi-layout public API is in CamelCase?
-> [ntanibata] I will change them to underscores to avoid CamelCase.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-add FIXME at calling clock_gettime
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: Replace list_thing with thing_list.
-
-> > We'd prefer naming it as thing_list, not list_thing. Like in English
-> > you can have a "note list" meaning a "list of notes", while "list
-> > note"
-> > sounds like it is one note about a list.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: Declare variable in the beginning of a block.
-
-> > Declarations mixed up with code. Our style has declarations only in
-> > the beginning of a block.
-> [ntanibata] I will fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: ivi-layout.c, clean-up definition of valueable in the middle function.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: ivi-layout.c, remove #if 0
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
- ivi-shell: ivi-layout-transition.c, clean-up definition of valueable in the middle
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
- ivi-shell: ivi-layout-transition.c, remove code commented out
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: ivi-layout, modify comments, surface/layer/screen -> ivi_*
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: Delete duplicated of definition.
-
-> > > > Looks identical to enum ivi_layout_transition_type, do you
-> > > > really need another?
-> > > [ntanibata] Question: Do you mean why there are many types?
-> >
-> > Why define ivi_layout_inner_transition_type, when
-> > ivi_layout_transition_type is already the same down to the actual
-> > values, if I'm not mistaken?
-> >
-> > Why not just use ivi_layout_transition_type everywhere?
-> [ntanibata] Oh, I see "inner". I will fix them. I jumped the gun:)
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: ivi-layout-export/private.h, reorgenize two interface from private to export because it is used by hmi-controller.c
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: Use error-code defined in ivi-application-protocol.
-
-> > You also need to add the two error codes into ivi-application
-> > interface and use those instead of WL_DISPLAY_ERROR_INVALID_OBJECT.
-> [ntanibata] I will fix this according to two error codes.
-> <enum name="error">
-> <entry name="role" value="0" summary="given wl_surface has
-> another role"/>
-> <entry name="ivi_id" value="1" summary="given ivi_id is assigned
-> to another wl_surface"/>
-> </enum>
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: Amend wrong comments regarding return values:
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: Fix transition bug on visibility change.
-
-This is embeded during cleaning up code.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: Qualify const modifier to readonly argument.
-
-This is embded during cleaning up code before.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: Fix invalid type.
-
-> prop->opacity = wlfixedfrom_double(1.0);
-> What? 'opacity' is a float, isn't it?
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell:ivi-layout.c Change type of calculatable variables to signed from unsigned
-
-> FWIW, if you are going to do calculations with these variables, they
-> should be signed. If you mix unsigned and signed variables in
-> calculations, the result is probably not what you expect in all cases.
-> This is just a reminder for you, that you might want to change these in the future.
-> Weston core categorically uses signed variables for anything that is
-> involved in calculations, even if negative values would not make any
-> sense for a particular variable.
-> Counters (that may wrap around) are of course better stored as unsigned.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-Makefile.am: clean up Makefile.am with FR3 for ivi-layout
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-configure.ac: remove checking module cairo.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: ivi-layout-export.h, remove unused member of structure.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: ivi-layout-transition, remove wl_event_source_timer_update
-because The timer is already disarmed when you create it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: ivi-layout-export.h, add an explanation of what kind of
-stability guarantees this API
-and ABI should have.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: Move functions that are not used by other to private.h from export.h.
-
-> +WL_EXPORT int32_t +ivi_layout_surface_get_dimension(struct
-> ivi_layout_surface ivisurf, + int32_t dest_width, int32_t +*dest_height)
-> Does this function need to be WL_EXPORT?
-> hmi-controller does not use it, and it is exposed to ivi-shell.so via
-> struct ivi_layout_interface.
-
-For the time being, there are some APIs which is not used by
-hmi-controller.c. but it is used by ivi-controller.so maintained by
-another project. I will add reference implementation for them later in
-hmi-controller.c
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-layout: ivi-layout-export.h remove type of ivi_layout_layer_properties
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: Rename confusing functions
-
-> .oO( That looks strange, it's returning either 0 or 1 as an identifier.
-> Maybe this has nothing to do with identifiers... )
-
-This callback is to detect whether transition happens or not.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: ivi-layout-private/export.h, move struct ivi_layout_interface declarations from > ivi-layout-export.h into ivi-layout-private.h
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: ivi-layout.c, Remove casts to (void)
-
-> I don't think we need these casts. The warning about unused arguments is disabled, isn't it?
-> You should be able to remove casts to (void) from all places.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-layout: private.h, remove WL_EXPORT definition of ivi_layout_interface
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-layout: remove ivi_layout_surface_set_native_content.
-
-There are two use case to
-- create ivi_surface without wl_surface to set property in advanced
-- keep property per ID during deletion of ivi_surface.
-
-This is supported later. For the time being, remove this function.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-layout: Fix invalid memory read/write. correct destruction methods
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-layout: code style clean up
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-layout: revert destruction method to re-organize them.
-
-This commit is a target of this revert.
-https://github.com/ntanibata/weston-ivi-shell/commit/f097ccf90a12efad954228f2534a4cad8f578d19
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-layout: remove unused function. This was called from ivi-shell.
-However it is not called anymore after code clean up.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: ivi-layout.c, Remove all configure event on specified surface.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-layout.c: remove unneeded casts
-
-Also a couple of whitespace fixes.
-
-ivi-layout.c: reflow long lines
-
-----------------------------------------------------------
-ivi-layout.c: simplify add_link_to_surface()
-
-There is a way to make this function even simpler.
-
-If you guarantee, that it is always legal to call wl_list_remove() on the
-link, this function could literally be just:
-
-wl_list_remove(&link_layer->link_to_layer);
-wl_list_insert(&ivilayer->link_to_surface, &link_layer->link_to_layer);
-
-You would go from an O(n) operation to O(1) operation!
----
- Makefile.am | 20 +
- configure.ac | 9 +
- ivi-shell/ivi-layout-export.h | 689 +++++++++
- ivi-shell/ivi-layout-private.h | 319 +++++
- ivi-shell/ivi-layout-transition.c | 1111 +++++++++++++++
- ivi-shell/ivi-layout.c | 2809 +++++++++++++++++++++++++++++++++++++
- 6 files changed, 4957 insertions(+)
- create mode 100644 ivi-shell/ivi-layout-export.h
- create mode 100644 ivi-shell/ivi-layout-private.h
- create mode 100644 ivi-shell/ivi-layout-transition.c
- create mode 100644 ivi-shell/ivi-layout.c
-
-diff --git a/Makefile.am b/Makefile.am
-index 2330933..812b4bd 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -720,6 +720,26 @@ nodist_fullscreen_shell_la_SOURCES = \
- BUILT_SOURCES += $(nodist_fullscreen_shell_la_SOURCES)
- endif
-
-+if ENABLE_IVI_SHELL
-+
-+module_LTLIBRARIES += \
-+ $(ivi_layout)
-+
-+ivi_layout = ivi-layout.la
-+ivi_layout_la_LDFLAGS = -module -avoid-version
-+ivi_layout_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
-+ivi_layout_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
-+ivi_layout_la_SOURCES = \
-+ ivi-shell/ivi-layout-export.h \
-+ ivi-shell/ivi-layout-private.h \
-+ ivi-shell/ivi-layout.c \
-+ ivi-shell/ivi-layout-transition.c
-+
-+BUILT_SOURCES += $(nodist_ivi_layout_la_SOURCES)
-+
-+endif
-+
-+
- if ENABLE_SCREEN_SHARING
-
- module_LTLIBRARIES += screen-share.la
-diff --git a/configure.ac b/configure.ac
-index 05e883d..e45dbeb 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -434,6 +434,13 @@ if test "x$enable_dbus" != "xno"; then
- fi
- AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
-
-+# ivi-shell support
-+AC_ARG_ENABLE(ivi-shell,
-+ AS_HELP_STRING([--disable-ivi-shell],
-+ [do not build ivi-shell server plugin and client]),,
-+ enable_ivi_shell=yes)
-+AM_CONDITIONAL(ENABLE_IVI_SHELL, test "x$enable_ivi_shell" = "xyes")
-+
- AC_ARG_ENABLE(wcap-tools, [ --disable-wcap-tools],, enable_wcap_tools=yes)
- AM_CONDITIONAL(BUILD_WCAP_TOOLS, test x$enable_wcap_tools = xyes)
- if test x$enable_wcap_tools = xyes; then
-@@ -523,6 +530,8 @@ AC_MSG_RESULT([
- XWayland ${enable_xwayland}
- dbus ${enable_dbus}
-
-+ ivi-shell ${enable_ivi_shell}
-+
- Build wcap utility ${enable_wcap_tools}
- Build Fullscreen Shell ${enable_fullscreen_shell}
-
-diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
-new file mode 100644
-index 0000000..18b1dc3
---- /dev/null
-+++ b/ivi-shell/ivi-layout-export.h
-@@ -0,0 +1,689 @@
-+/*
-+ * Copyright (C) 2013 DENSO CORPORATION
-+ *
-+ * Permission to use, copy, modify, distribute, and sell this software and
-+ * its documentation for any purpose is hereby granted without fee, provided
-+ * that the above copyright notice appear in all copies and that both that
-+ * copyright notice and this permission notice appear in supporting
-+ * documentation, and that the name of the copyright holders not be used in
-+ * advertising or publicity pertaining to distribution of the software
-+ * without specific, written prior permission. The copyright holders make
-+ * no representations about the suitability of this software for any
-+ * purpose. It is provided "as is" without express or implied warranty.
-+ *
-+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
-+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
-+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
-+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
-+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ */
-+
-+/**
-+ * The ivi-layout library supports API set of controlling properties of
-+ * surface and layer which groups surfaces. An unique ID whose type is integer
-+ * is required to create surface and layer. With the unique ID, surface and
-+ * layer are identified to control them. The API set consists of APIs to control
-+ * properties of surface and layers about followings,
-+ * - visibility.
-+ * - opacity.
-+ * - clipping (x,y,width,height).
-+ * - position and size of it to be displayed.
-+ * - orientation per 90 degree.
-+ * - add or remove surfaces to a layer.
-+ * - order of surfaces/layers in layer/screen to be displayed.
-+ * - commit to apply property changes.
-+ * - notifications of property change.
-+ *
-+ * Management of surfaces and layers grouping these surfaces are common
-+ * way in In-Vehicle Infotainment system, which integrate several domains
-+ * in one system. A layer is allocated to a domain in order to control
-+ * application surfaces grouped to the layer all together.
-+ *
-+ * This API and ABI follow following specifications.
-+ * http://projects.genivi.org/wayland-ivi-extension/layer-manager-apis
-+ */
-+
-+#ifndef _IVI_LAYOUT_EXPORT_H_
-+#define _IVI_LAYOUT_EXPORT_H_
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif /* __cplusplus */
-+
-+#include "stdbool.h"
-+#include "compositor.h"
-+
-+#define IVI_SUCCEEDED (0)
-+#define IVI_FAILED (-1)
-+
-+struct ivi_layout_layer;
-+struct ivi_layout_screen;
-+struct ivi_layout_surface;
-+
-+struct ivi_layout_surface_properties
-+{
-+ wl_fixed_t opacity;
-+ int32_t source_x;
-+ int32_t source_y;
-+ int32_t source_width;
-+ int32_t source_height;
-+ int32_t start_x;
-+ int32_t start_y;
-+ int32_t start_width;
-+ int32_t start_height;
-+ int32_t dest_x;
-+ int32_t dest_y;
-+ int32_t dest_width;
-+ int32_t dest_height;
-+ enum wl_output_transform orientation;
-+ bool visibility;
-+ int32_t transition_type;
-+ uint32_t transition_duration;
-+};
-+
-+struct ivi_layout_layer_properties
-+{
-+ wl_fixed_t opacity;
-+ int32_t source_x;
-+ int32_t source_y;
-+ int32_t source_width;
-+ int32_t source_height;
-+ int32_t dest_x;
-+ int32_t dest_y;
-+ int32_t dest_width;
-+ int32_t dest_height;
-+ enum wl_output_transform orientation;
-+ uint32_t visibility;
-+ int32_t transition_type;
-+ uint32_t transition_duration;
-+ double start_alpha;
-+ double end_alpha;
-+ uint32_t is_fade_in;
-+};
-+
-+enum ivi_layout_notification_mask {
-+ IVI_NOTIFICATION_NONE = 0,
-+ IVI_NOTIFICATION_OPACITY = (1 << 1),
-+ IVI_NOTIFICATION_SOURCE_RECT = (1 << 2),
-+ IVI_NOTIFICATION_DEST_RECT = (1 << 3),
-+ IVI_NOTIFICATION_DIMENSION = (1 << 4),
-+ IVI_NOTIFICATION_POSITION = (1 << 5),
-+ IVI_NOTIFICATION_ORIENTATION = (1 << 6),
-+ IVI_NOTIFICATION_VISIBILITY = (1 << 7),
-+ IVI_NOTIFICATION_PIXELFORMAT = (1 << 8),
-+ IVI_NOTIFICATION_ADD = (1 << 9),
-+ IVI_NOTIFICATION_REMOVE = (1 << 10),
-+ IVI_NOTIFICATION_CONFIGURE = (1 << 11),
-+ IVI_NOTIFICATION_ALL = 0xFFFF
-+};
-+
-+enum ivi_layout_transition_type{
-+ IVI_LAYOUT_TRANSITION_NONE,
-+ IVI_LAYOUT_TRANSITION_VIEW_DEFAULT,
-+ IVI_LAYOUT_TRANSITION_VIEW_DEST_RECT_ONLY,
-+ IVI_LAYOUT_TRANSITION_VIEW_FADE_ONLY,
-+ IVI_LAYOUT_TRANSITION_LAYER_FADE,
-+ IVI_LAYOUT_TRANSITION_LAYER_MOVE,
-+ IVI_LAYOUT_TRANSITION_LAYER_VIEW_ORDER,
-+ IVI_LAYOUT_TRANSITION_VIEW_MOVE_RESIZE,
-+ IVI_LAYOUT_TRANSITION_VIEW_RESIZE,
-+ IVI_LAYOUT_TRANSITION_VIEW_FADE,
-+ IVI_LAYOUT_TRANSITION_MAX,
-+};
-+
-+typedef void (*layer_property_notification_func)(
-+ struct ivi_layout_layer *ivilayer,
-+ const struct ivi_layout_layer_properties *,
-+ enum ivi_layout_notification_mask mask,
-+ void *userdata);
-+
-+typedef void (*surface_property_notification_func)(
-+ struct ivi_layout_surface *ivisurf,
-+ const struct ivi_layout_surface_properties *,
-+ enum ivi_layout_notification_mask mask,
-+ void *userdata);
-+
-+typedef void (*layer_create_notification_func)(
-+ struct ivi_layout_layer *ivilayer,
-+ void *userdata);
-+
-+typedef void (*layer_remove_notification_func)(
-+ struct ivi_layout_layer *ivilayer,
-+ void *userdata);
-+
-+typedef void (*surface_create_notification_func)(
-+ struct ivi_layout_surface *ivisurf,
-+ void *userdata);
-+
-+typedef void (*surface_remove_notification_func)(
-+ struct ivi_layout_surface *ivisurf,
-+ void *userdata);
-+
-+typedef void (*surface_configure_notification_func)(
-+ struct ivi_layout_surface *ivisurf,
-+ void *userdata);
-+
-+typedef void (*ivi_controller_surface_content_callback)(
-+ struct ivi_layout_surface *ivisurf,
-+ int32_t content,
-+ void *userdata);
-+
-+/**
-+ * \brief register for notification when layer is created
-+ */
-+int32_t
-+ivi_layout_add_notification_create_layer(
-+ layer_create_notification_func callback,
-+ void *userdata);
-+
-+void
-+ivi_layout_remove_notification_create_layer(
-+ layer_create_notification_func callback,
-+ void *userdata);
-+
-+/**
-+ * \brief register for notification when layer is removed
-+ */
-+int32_t
-+ivi_layout_add_notification_remove_layer(
-+ layer_remove_notification_func callback,
-+ void *userdata);
-+
-+void
-+ivi_layout_remove_notification_remove_layer(
-+ layer_remove_notification_func callback,
-+ void *userdata);
-+
-+/**
-+ * \brief register for notification when surface is created
-+ */
-+int32_t
-+ivi_layout_add_notification_create_surface(
-+ surface_create_notification_func callback,
-+ void *userdata);
-+
-+void
-+ivi_layout_remove_notification_create_surface(
-+ surface_create_notification_func callback,
-+ void *userdata);
-+
-+/**
-+ * \brief register for notification when surface is removed
-+ */
-+int32_t
-+ivi_layout_add_notification_remove_surface(
-+ surface_remove_notification_func callback,
-+ void *userdata);
-+
-+void
-+ivi_layout_remove_notification_remove_surface(
-+ surface_remove_notification_func callback,
-+ void *userdata);
-+
-+/**
-+ * \brief register for notification when surface is configured
-+ */
-+int32_t
-+ivi_layout_add_notification_configure_surface(
-+ surface_configure_notification_func callback,
-+ void *userdata);
-+
-+void
-+ivi_layout_remove_notification_configure_surface(
-+ surface_configure_notification_func callback,
-+ void *userdata);
-+
-+/**
-+ * \brief get id of surface from ivi_layout_surface
-+ *
-+ * \return id of surface
-+ */
-+uint32_t
-+ivi_layout_get_id_of_surface(struct ivi_layout_surface *ivisurf);
-+
-+/**
-+ * \brief get id of layer from ivi_layout_layer
-+ *
-+ *
-+ * \return id of layer
-+ */
-+uint32_t
-+ivi_layout_get_id_of_layer(struct ivi_layout_layer *ivilayer);
-+
-+/**
-+ * \brief get ivi_layout_surface from id of surface
-+ *
-+ * \return (struct ivi_layout_surface *)
-+ * if the method call was successful
-+ * \return NULL if the method call was failed
-+ */
-+struct ivi_layout_surface *
-+ivi_layout_get_surface_from_id(uint32_t id_surface);
-+
-+/**
-+ * \brief get ivi_layout_screen from id of screen
-+ *
-+ * \return (struct ivi_layout_screen *)
-+ * if the method call was successful
-+ * \return NULL if the method call was failed
-+ */
-+struct ivi_layout_screen *
-+ivi_layout_get_screen_from_id(uint32_t id_screen);
-+
-+/**
-+ * \brief Get the screen resolution of a specific screen
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_get_screen_resolution(struct ivi_layout_screen *iviscrn,
-+ int32_t *pWidth,
-+ int32_t *pHeight);
-+
-+/**
-+ * \brief Set an observer callback for surface content status change.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_surface_set_content_observer(
-+ struct ivi_layout_surface *ivisurf,
-+ ivi_controller_surface_content_callback callback,
-+ void* userdata);
-+
-+/**
-+ * \brief Get the layer properties
-+ *
-+ * \return (const struct ivi_layout_layer_properties *)
-+ * if the method call was successful
-+ * \return NULL if the method call was failed
-+ */
-+const struct ivi_layout_layer_properties *
-+ivi_layout_get_properties_of_layer(struct ivi_layout_layer *ivilayer);
-+
-+/**
-+ * \brief Get the screens
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_get_screens(int32_t *pLength, struct ivi_layout_screen ***ppArray);
-+
-+/**
-+ * \brief Get the screens under the given layer
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_get_screens_under_layer(struct ivi_layout_layer *ivilayer,
-+ int32_t *pLength,
-+ struct ivi_layout_screen ***ppArray);
-+
-+/**
-+ * \brief Get all Layers which are currently registered and managed
-+ * by the services
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_get_layers(int32_t *pLength, struct ivi_layout_layer ***ppArray);
-+
-+/**
-+ * \brief Get all Layers under the given surface
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_get_layers_under_surface(struct ivi_layout_surface *ivisurf,
-+ int32_t *pLength,
-+ struct ivi_layout_layer ***ppArray);
-+
-+/**
-+ * \brief Get all Surfaces which are currently registered and managed
-+ * by the services
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_get_surfaces(int32_t *pLength, struct ivi_layout_surface ***ppArray);
-+
-+/**
-+ * \brief Create a layer which should be managed by the service
-+ *
-+ * \return (struct ivi_layout_layer *)
-+ * if the method call was successful
-+ * \return NULL if the method call was failed
-+ */
-+struct ivi_layout_layer *
-+ivi_layout_layer_create_with_dimension(uint32_t id_layer,
-+ int32_t width, int32_t height);
-+
-+/**
-+ * \brief Removes a layer which is currently managed by the service
-+ */
-+void
-+ivi_layout_layer_remove(struct ivi_layout_layer *ivilayer);
-+
-+/**
-+ * \brief Set the visibility of a layer. If a layer is not visible, the
-+ * layer and its surfaces will not be rendered.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_layer_set_visibility(struct ivi_layout_layer *ivilayer,
-+ bool newVisibility);
-+
-+/**
-+ * \brief Set the opacity of a layer.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_layer_set_opacity(struct ivi_layout_layer *ivilayer,
-+ wl_fixed_t opacity);
-+
-+/**
-+ * \brief Get the opacity of a layer.
-+ *
-+ * \return opacity if the method call was successful
-+ * \return wl_fixed_from_double(0.0) if the method call was failed
-+ */
-+wl_fixed_t
-+ivi_layout_layer_get_opacity(struct ivi_layout_layer *ivilayer);
-+
-+/**
-+ * \brief Set the area of a layer which should be used for the rendering.
-+ *
-+ * Only this part will be visible.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_layer_set_source_rectangle(struct ivi_layout_layer *ivilayer,
-+ int32_t x, int32_t y,
-+ int32_t width, int32_t height);
-+
-+/**
-+ * \brief Set the destination area on the display for a layer.
-+ *
-+ * The layer will be scaled and positioned to this rectangle
-+ * for rendering
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_layer_set_destination_rectangle(struct ivi_layout_layer *ivilayer,
-+ int32_t x, int32_t y,
-+ int32_t width, int32_t height);
-+
-+/**
-+ * \brief Get the horizontal and vertical position of the layer.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_layer_get_position(struct ivi_layout_layer *ivilayer,
-+ int32_t *dest_x, int32_t *dest_y);
-+
-+/**
-+ * \brief Sets the horizontal and vertical position of the layer.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_layer_set_position(struct ivi_layout_layer *ivilayer,
-+ int32_t dest_x, int32_t dest_y);
-+
-+/**
-+ * \brief Sets the orientation of a layer.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_layer_set_orientation(struct ivi_layout_layer *ivilayer,
-+ enum wl_output_transform orientation);
-+
-+/**
-+ * \brief Sets render order of surfaces within one layer
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_layer_set_render_order(struct ivi_layout_layer *ivilayer,
-+ struct ivi_layout_surface **pSurface,
-+ int32_t number);
-+
-+/**
-+ * \brief Set the visibility of a surface.
-+ *
-+ * If a surface is not visible it will not be rendered.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_surface_set_visibility(struct ivi_layout_surface *ivisurf,
-+ bool newVisibility);
-+
-+/**
-+ * \brief Get the visibility of a surface.
-+ *
-+ * If a surface is not visible it will not be rendered.
-+ *
-+ * \return true if surface is visible
-+ * \return false if surface is invisible or the method call was failed
-+ */
-+bool
-+ivi_layout_surface_get_visibility(struct ivi_layout_surface *ivisurf);
-+
-+/**
-+ * \brief Set the opacity of a surface.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_surface_set_opacity(struct ivi_layout_surface *ivisurf,
-+ wl_fixed_t opacity);
-+
-+/**
-+ * \brief Get the opacity of a surface.
-+ *
-+ * \return opacity if the method call was successful
-+ * \return wl_fixed_from_double(0.0) if the method call was failed
-+ */
-+wl_fixed_t
-+ivi_layout_surface_get_opacity(struct ivi_layout_surface *ivisurf);
-+
-+/**
-+ * \brief Set the destination area of a surface within a layer for rendering.
-+ *
-+ * The surface will be scaled to this rectangle for rendering.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_surface_set_destination_rectangle(struct ivi_layout_surface *ivisurf,
-+ int32_t x, int32_t y,
-+ int32_t width, int32_t height);
-+
-+/**
-+ * \brief Sets the orientation of a surface.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_surface_set_orientation(struct ivi_layout_surface *ivisurf,
-+ enum wl_output_transform orientation);
-+
-+/**
-+ * \brief Add a layer to a screen which is currently managed by the service
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_screen_add_layer(struct ivi_layout_screen *iviscrn,
-+ struct ivi_layout_layer *addlayer);
-+
-+/**
-+ * \brief Sets render order of layers on a display
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_screen_set_render_order(struct ivi_layout_screen *iviscrn,
-+ struct ivi_layout_layer **pLayer,
-+ const int32_t number);
-+
-+/**
-+ * \brief register for notification on property changes of layer
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_layer_add_notification(struct ivi_layout_layer *ivilayer,
-+ layer_property_notification_func callback,
-+ void *userdata);
-+
-+/**
-+ * \brief remove notification on property changes of layer
-+ */
-+void
-+ivi_layout_layer_remove_notification(struct ivi_layout_layer *ivilayer);
-+
-+/**
-+ * \brief register for notification on property changes of surface
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_surface_add_notification(struct ivi_layout_surface *ivisurf,
-+ surface_property_notification_func callback,
-+ void *userdata);
-+
-+/**
-+ * \brief remove notification on property changes of surface
-+ */
-+void
-+ivi_layout_surface_remove_notification(struct ivi_layout_surface *ivisurf);
-+
-+/**
-+ * \brief Get the surface properties
-+ *
-+ * \return (const struct ivi_surface_layer_properties *)
-+ * if the method call was successful
-+ * \return NULL if the method call was failed
-+ */
-+const struct ivi_layout_surface_properties *
-+ivi_layout_get_properties_of_surface(struct ivi_layout_surface *ivisurf);
-+
-+/**
-+ * \brief Add a surface to a layer which is currently managed by the service
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_layer_add_surface(struct ivi_layout_layer *ivilayer,
-+ struct ivi_layout_surface *addsurf);
-+
-+/**
-+ * \brief Removes a surface from a layer which is currently managed by the service
-+ */
-+void
-+ivi_layout_layer_remove_surface(struct ivi_layout_layer *ivilayer,
-+ struct ivi_layout_surface *remsurf);
-+
-+/**
-+ * \brief Set the area of a surface which should be used for the rendering.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_surface_set_source_rectangle(struct ivi_layout_surface *ivisurf,
-+ int32_t x, int32_t y,
-+ int32_t width, int32_t height);
-+
-+/**
-+ * \brief get weston_output from ivi_layout_screen.
-+ *
-+ * \return (struct weston_output *)
-+ * if the method call was successful
-+ * \return NULL if the method call was failed
-+ */
-+struct weston_output *
-+ivi_layout_screen_get_output(struct ivi_layout_screen *);
-+
-+struct weston_surface *
-+ivi_layout_surface_get_weston_surface(struct ivi_layout_surface *ivisurf);
-+
-+int32_t
-+ivi_layout_surface_get_size(struct ivi_layout_surface *ivisurf,
-+ int32_t *width,
-+ int32_t *height,
-+ int32_t *stride);
-+
-+int32_t
-+ivi_layout_layer_set_transition(struct ivi_layout_layer *ivilayer,
-+ enum ivi_layout_transition_type type,
-+ uint32_t duration);
-+
-+int32_t
-+ivi_layout_layer_set_fade_info(struct ivi_layout_layer* layer,
-+ uint32_t is_fade_in,
-+ double start_alpha, double end_alpha);
-+
-+int32_t
-+ivi_layout_surface_set_transition(struct ivi_layout_surface *ivisurf,
-+ enum ivi_layout_transition_type type,
-+ uint32_t duration);
-+
-+void
-+ivi_layout_transition_layer_render_order(struct ivi_layout_layer* layer,
-+ struct ivi_layout_surface** new_order,
-+ uint32_t surface_num,
-+ uint32_t duration);
-+
-+void
-+ivi_layout_transition_move_layer_cancel(struct ivi_layout_layer* layer);
-+
-+/**
-+ * \brief Commit all changes and execute all enqueued commands since
-+ * last commit.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_commit_changes(void);
-+
-+#ifdef __cplusplus
-+}
-+#endif /* __cplusplus */
-+
-+#endif /* _IVI_LAYOUT_EXPORT_H_ */
-diff --git a/ivi-shell/ivi-layout-private.h b/ivi-shell/ivi-layout-private.h
-new file mode 100644
-index 0000000..8287e93
---- /dev/null
-+++ b/ivi-shell/ivi-layout-private.h
-@@ -0,0 +1,319 @@
-+/*
-+ * Copyright (C) 2014 DENSO CORPORATION
-+ *
-+ * Permission to use, copy, modify, distribute, and sell this software and
-+ * its documentation for any purpose is hereby granted without fee, provided
-+ * that the above copyright notice appear in all copies and that both that
-+ * copyright notice and this permission notice appear in supporting
-+ * documentation, and that the name of the copyright holders not be used in
-+ * advertising or publicity pertaining to distribution of the software
-+ * without specific, written prior permission. The copyright holders make
-+ * no representations about the suitability of this software for any
-+ * purpose. It is provided "as is" without express or implied warranty.
-+ *
-+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
-+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
-+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
-+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
-+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ */
-+
-+#ifndef _ivi_layout_PRIVATE_H_
-+#define _ivi_layout_PRIVATE_H_
-+
-+#include "compositor.h"
-+#include "ivi-layout-export.h"
-+
-+struct ivi_layout_surface {
-+ struct wl_list link;
-+ struct wl_signal property_changed;
-+ struct wl_list layer_list;
-+ int32_t update_count;
-+ uint32_t id_surface;
-+
-+ struct ivi_layout *layout;
-+ struct weston_surface *surface;
-+
-+ struct wl_listener surface_destroy_listener;
-+ struct weston_transform surface_rotation;
-+ struct weston_transform layer_rotation;
-+ struct weston_transform surface_pos;
-+ struct weston_transform layer_pos;
-+ struct weston_transform scaling;
-+
-+ struct ivi_layout_surface_properties prop;
-+ uint32_t event_mask;
-+
-+ struct {
-+ struct ivi_layout_surface_properties prop;
-+ struct wl_list link;
-+ } pending;
-+
-+ struct {
-+ struct wl_list link;
-+ struct wl_list layer_list;
-+ } order;
-+
-+ struct {
-+ ivi_controller_surface_content_callback callback;
-+ void *userdata;
-+ } content_observer;
-+
-+ struct wl_signal configured;
-+};
-+
-+struct ivi_layout_layer {
-+ struct wl_list link;
-+ struct wl_signal property_changed;
-+ struct wl_list screen_list;
-+ struct wl_list link_to_surface;
-+ uint32_t id_layer;
-+
-+ struct ivi_layout *layout;
-+
-+ struct ivi_layout_layer_properties prop;
-+ uint32_t event_mask;
-+
-+ struct {
-+ struct ivi_layout_layer_properties prop;
-+ struct wl_list surface_list;
-+ struct wl_list link;
-+ } pending;
-+
-+ struct {
-+ struct wl_list surface_list;
-+ struct wl_list link;
-+ } order;
-+};
-+
-+struct ivi_layout {
-+ struct weston_compositor *compositor;
-+
-+ struct wl_list surface_list;
-+ struct wl_list layer_list;
-+ struct wl_list screen_list;
-+
-+ struct {
-+ struct wl_signal created;
-+ struct wl_signal removed;
-+ } layer_notification;
-+
-+ struct {
-+ struct wl_signal created;
-+ struct wl_signal removed;
-+ struct wl_signal configure_changed;
-+ } surface_notification;
-+
-+ struct weston_layer layout_layer;
-+ struct wl_signal warning_signal;
-+
-+ struct ivi_layout_transition_set *transitions;
-+ struct wl_list pending_transition_list;
-+};
-+
-+struct ivi_layout *get_instance(void);
-+
-+struct ivi_layout_transition;
-+
-+struct ivi_layout_transition_set {
-+ struct wl_event_source *event_source;
-+ struct wl_list transition_list;
-+};
-+
-+typedef void (*ivi_layout_transition_destroy_user_func)(void *user_data);
-+
-+struct ivi_layout_transition_set *
-+ivi_layout_transition_set_create(struct weston_compositor *ec);
-+
-+void
-+ivi_layout_transition_move_resize_view(struct ivi_layout_surface *surface,
-+ int32_t dest_x, int32_t dest_y,
-+ int32_t dest_width, int32_t dest_height,
-+ uint32_t duration);
-+
-+void
-+ivi_layout_transition_visibility_on(struct ivi_layout_surface *surface,
-+ uint32_t duration);
-+
-+void
-+ivi_layout_transition_visibility_off(struct ivi_layout_surface *surface,
-+ uint32_t duration);
-+
-+
-+void
-+ivi_layout_transition_move_layer(struct ivi_layout_layer *layer,
-+ int32_t dest_x, int32_t dest_y,
-+ uint32_t duration);
-+
-+void
-+ivi_layout_transition_fade_layer(struct ivi_layout_layer *layer,
-+ uint32_t is_fade_in,
-+ double start_alpha, double end_alpha,
-+ void *user_data,
-+ ivi_layout_transition_destroy_user_func destroy_func,
-+ uint32_t duration);
-+
-+int32_t
-+is_surface_transition(struct ivi_layout_surface *surface);
-+
-+/**
-+ * \brief get ivi_layout_layer from id of layer
-+ *
-+ * \return (struct ivi_layout_layer *)
-+ * if the method call was successful
-+ * \return NULL if the method call was failed
-+ */
-+struct ivi_layout_layer *
-+ivi_layout_get_layer_from_id(uint32_t id_layer);
-+
-+/**
-+ * \brief Remove a surface
-+ */
-+void
-+ivi_layout_surface_remove(struct ivi_layout_surface *ivisurf);
-+
-+/**
-+ * \brief Get all Layers of the given screen
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_get_layers_on_screen(struct ivi_layout_screen *iviscrn,
-+ int32_t *pLength,
-+ struct ivi_layout_layer ***ppArray);
-+
-+/**
-+ * \brief Get all Surfaces which are currently registered to a given
-+ * layer and are managed by the services
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_get_surfaces_on_layer(struct ivi_layout_layer *ivilayer,
-+ int32_t *pLength,
-+ struct ivi_layout_surface ***ppArray);
-+
-+/**
-+ * \brief Get the visibility of a layer. If a layer is not visible,
-+ * the layer and its surfaces will not be rendered.
-+ *
-+ * \return true if layer is visible
-+ * \return false if layer is invisible or the method call was failed
-+ */
-+bool
-+ivi_layout_layer_get_visibility(struct ivi_layout_layer *ivilayer);
-+
-+/**
-+ * \brief Get the horizontal and vertical dimension of the layer.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_layer_get_dimension(struct ivi_layout_layer *ivilayer,
-+ int32_t *dest_width, int32_t *dest_height);
-+
-+/**
-+ * \brief Set the horizontal and vertical dimension of the layer.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_layer_set_dimension(struct ivi_layout_layer *ivilayer,
-+ int32_t dest_width, int32_t dest_height);
-+
-+/**
-+ * \brief Gets the orientation of a layer.
-+ *
-+ * \return (enum wl_output_transform)
-+ * if the method call was successful
-+ * \return WL_OUTPUT_TRANSFORM_NORMAL if the method call was failed
-+ */
-+enum wl_output_transform
-+ivi_layout_layer_get_orientation(struct ivi_layout_layer *ivilayer);
-+
-+/**
-+ * \brief Set the horizontal and vertical dimension of the surface.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_surface_set_dimension(struct ivi_layout_surface *ivisurf,
-+ int32_t dest_width, int32_t dest_height);
-+
-+/**
-+ * \brief Get the horizontal and vertical dimension of the surface.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_surface_get_dimension(struct ivi_layout_surface *ivisurf,
-+ int32_t *dest_width, int32_t *dest_height);
-+
-+/**
-+ * \brief Sets the horizontal and vertical position of the surface.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_surface_set_position(struct ivi_layout_surface *ivisurf,
-+ int32_t dest_x, int32_t dest_y);
-+
-+/**
-+ * \brief Get the horizontal and vertical position of the surface.
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+int32_t
-+ivi_layout_surface_get_position(struct ivi_layout_surface *ivisurf,
-+ int32_t *dest_x, int32_t *dest_y);
-+
-+/**
-+ * \brief Gets the orientation of a surface.
-+ *
-+ * \return (enum wl_output_transform)
-+ * if the method call was successful
-+ * \return WL_OUTPUT_TRANSFORM_NORMAL if the method call was failed
-+ */
-+enum wl_output_transform
-+ivi_layout_surface_get_orientation(struct ivi_layout_surface *ivisurf);
-+
-+int32_t
-+ivi_layout_surface_set_transition_duration(
-+ struct ivi_layout_surface *ivisurf,
-+ uint32_t duration);
-+
-+struct ivi_layout_interface {
-+ struct weston_view *(*get_weston_view)(
-+ struct ivi_layout_surface *surface);
-+
-+ void (*surface_configure)(struct ivi_layout_surface *ivisurf,
-+ int32_t width,
-+ int32_t height);
-+
-+ struct ivi_layout_surface *(*surface_create)(
-+ struct weston_surface *wl_surface,
-+ uint32_t id_surface);
-+
-+ void (*init_with_compositor)(struct weston_compositor *ec);
-+
-+ int32_t (*get_surface_dimension)(
-+ struct ivi_layout_surface *ivisurf,
-+ int32_t *dest_width,
-+ int32_t *dest_height);
-+
-+ void (*add_surface_configured_listener)(
-+ struct ivi_layout_surface *ivisurf,
-+ struct wl_listener* listener);
-+};
-+
-+#endif
-diff --git a/ivi-shell/ivi-layout-transition.c b/ivi-shell/ivi-layout-transition.c
-new file mode 100644
-index 0000000..0c45c4a
---- /dev/null
-+++ b/ivi-shell/ivi-layout-transition.c
-@@ -0,0 +1,1111 @@
-+/*
-+ * Copyright (C) 2014 DENSO CORPORATION
-+ *
-+ * Permission to use, copy, modify, distribute, and sell this software and
-+ * its documentation for any purpose is hereby granted without fee, provided
-+ * that the above copyright notice appear in all copies and that both that
-+ * copyright notice and this permission notice appear in supporting
-+ * documentation, and that the name of the copyright holders not be used in
-+ * advertising or publicity pertaining to distribution of the software
-+ * without specific, written prior permission. The copyright holders make
-+ * no representations about the suitability of this software for any
-+ * purpose. It is provided "as is" without express or implied warranty.
-+ *
-+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
-+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
-+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
-+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
-+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ */
-+
-+#include <time.h>
-+#include <assert.h>
-+#include <stdlib.h>
-+#include <stdio.h>
-+
-+#include "ivi-layout-export.h"
-+#include "ivi-layout-private.h"
-+
-+struct ivi_layout_transition;
-+
-+typedef void (*ivi_layout_transition_frame_func)(
-+ struct ivi_layout_transition *transition);
-+typedef void (*ivi_layout_transition_destroy_func)(
-+ struct ivi_layout_transition *transition);
-+typedef int32_t (*ivi_layout_is_transition_func)(void *private_data, void *id);
-+
-+struct ivi_layout_transition {
-+ enum ivi_layout_transition_type type;
-+ void *private_data;
-+ void *user_data;
-+
-+ uint32_t time_start;
-+ uint32_t time_duration;
-+ uint32_t time_elapsed;
-+ uint32_t is_done;
-+ ivi_layout_is_transition_func is_transition_func;
-+ ivi_layout_transition_frame_func frame_func;
-+ ivi_layout_transition_destroy_func destroy_func;
-+};
-+
-+struct transition_node {
-+ struct ivi_layout_transition *transition;
-+ struct wl_list link;
-+};
-+
-+static void layout_transition_destroy(struct ivi_layout_transition *transition);
-+
-+static struct ivi_layout_transition *
-+get_transition_from_type_and_id(enum ivi_layout_transition_type type,
-+ void *id_data)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct transition_node *node;
-+ struct ivi_layout_transition *tran;
-+
-+ wl_list_for_each(node, &layout->transitions->transition_list, link) {
-+ tran = node->transition;
-+
-+ if (tran->type == type &&
-+ tran->is_transition_func(tran->private_data, id_data))
-+ return tran;
-+ }
-+
-+ return NULL;
-+}
-+
-+WL_EXPORT int32_t
-+is_surface_transition(struct ivi_layout_surface *surface)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct transition_node *node;
-+ struct ivi_layout_transition *tran;
-+
-+ wl_list_for_each(node, &layout->transitions->transition_list, link) {
-+ tran = node->transition;
-+
-+ if ((tran->type == IVI_LAYOUT_TRANSITION_VIEW_MOVE_RESIZE ||
-+ tran->type == IVI_LAYOUT_TRANSITION_VIEW_RESIZE) &&
-+ tran->is_transition_func(tran->private_data, surface))
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-+
-+static void
-+tick_transition(struct ivi_layout_transition *transition, uint32_t timestamp)
-+{
-+ const double t = timestamp - transition->time_start;
-+
-+ if (transition->time_duration <= t) {
-+ transition->time_elapsed = transition->time_duration;
-+ transition->is_done = 1;
-+ } else {
-+ transition->time_elapsed = t;
-+ }
-+}
-+
-+static float time_to_nowpos(struct ivi_layout_transition *transition)
-+{
-+ return sin((float)transition->time_elapsed /
-+ (float)transition->time_duration * M_PI_2);
-+}
-+
-+static void
-+do_transition_frame(struct ivi_layout_transition *transition,
-+ uint32_t timestamp)
-+{
-+ if (0 == transition->time_start)
-+ transition->time_start = timestamp;
-+
-+ tick_transition(transition, timestamp);
-+ transition->frame_func(transition);
-+
-+ if (transition->is_done)
-+ layout_transition_destroy(transition);
-+}
-+
-+static int32_t
-+layout_transition_frame(void *data)
-+{
-+ struct ivi_layout_transition_set *transitions = data;
-+ uint32_t fps = 30;
-+ struct timespec timestamp = {};
-+ uint32_t msec = 0;
-+ struct transition_node *node = NULL;
-+ struct transition_node *next = NULL;
-+
-+ if (wl_list_empty(&transitions->transition_list)) {
-+ wl_event_source_timer_update(transitions->event_source, 0);
-+ return 1;
-+ }
-+
-+ wl_event_source_timer_update(transitions->event_source, 1000 / fps);
-+
-+ clock_gettime(CLOCK_MONOTONIC, &timestamp);//FIXME;
-+ msec = (1e+3 * timestamp.tv_sec + 1e-6 * timestamp.tv_nsec);
-+
-+ wl_list_for_each_safe(node, next, &transitions->transition_list, link) {
-+ do_transition_frame(node->transition, msec);
-+ }
-+
-+ ivi_layout_commit_changes();
-+ return 1;
-+}
-+
-+WL_EXPORT struct ivi_layout_transition_set *
-+ivi_layout_transition_set_create(struct weston_compositor *ec)
-+{
-+ struct ivi_layout_transition_set *transitions;
-+ struct wl_event_loop *loop;
-+
-+ transitions = malloc(sizeof(*transitions));
-+ if (transitions == NULL) {
-+ weston_log("%s: memory allocation fails\n", __func__);
-+ return NULL;
-+ }
-+
-+ wl_list_init(&transitions->transition_list);
-+
-+ loop = wl_display_get_event_loop(ec->wl_display);
-+ transitions->event_source =
-+ wl_event_loop_add_timer(loop, layout_transition_frame,
-+ transitions);
-+
-+ return transitions;
-+}
-+
-+static void
-+layout_transition_register(struct ivi_layout_transition *trans)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct transition_node *node;
-+
-+ node = malloc(sizeof(*node));
-+ if (node == NULL) {
-+ weston_log("%s: memory allocation fails\n", __func__);
-+ return;
-+ }
-+
-+ node->transition = trans;
-+ wl_list_insert(&layout->pending_transition_list, &node->link);
-+}
-+
-+static void
-+remove_transition(struct ivi_layout *layout,
-+ struct ivi_layout_transition *trans)
-+{
-+ struct transition_node *node;
-+ struct transition_node *next;
-+
-+ wl_list_for_each_safe(node, next,
-+ &layout->transitions->transition_list, link) {
-+ if (node->transition == trans) {
-+ wl_list_remove(&node->link);
-+ free(node);
-+ return;
-+ }
-+ }
-+
-+ wl_list_for_each_safe(node, next,
-+ &layout->pending_transition_list, link) {
-+ if (node->transition == trans) {
-+ wl_list_remove(&node->link);
-+ free(node);
-+ return;
-+ }
-+ }
-+}
-+
-+static void
-+layout_transition_destroy(struct ivi_layout_transition *transition)
-+{
-+ struct ivi_layout *layout = get_instance();
-+
-+ remove_transition(layout, transition);
-+ if(transition->destroy_func)
-+ transition->destroy_func(transition);
-+ free(transition);
-+}
-+
-+static struct ivi_layout_transition *
-+create_layout_transition(void)
-+{
-+ struct ivi_layout_transition *transition = malloc(sizeof(*transition));
-+
-+ if (transition == NULL) {
-+ weston_log("%s: memory allocation fails\n", __func__);
-+ return NULL;
-+ }
-+
-+ transition->type = IVI_LAYOUT_TRANSITION_MAX;
-+ transition->time_start = 0;
-+ transition->time_duration = 300; /* 300ms */
-+ transition->time_elapsed = 0;
-+
-+ transition->is_done = 0;
-+
-+ transition->private_data = NULL;
-+ transition->user_data = NULL;
-+
-+ transition->frame_func = NULL;
-+ transition->destroy_func = NULL;
-+
-+ return transition;
-+}
-+
-+/* move and resize view transition */
-+
-+struct move_resize_view_data {
-+ struct ivi_layout_surface *surface;
-+ int32_t start_x;
-+ int32_t start_y;
-+ int32_t end_x;
-+ int32_t end_y;
-+ int32_t start_width;
-+ int32_t start_height;
-+ int32_t end_width;
-+ int32_t end_height;
-+};
-+
-+static void
-+transition_move_resize_view_destroy(struct ivi_layout_transition *transition)
-+{
-+ struct move_resize_view_data *data =
-+ (struct move_resize_view_data *)transition->private_data;
-+ struct ivi_layout_surface *layout_surface = data->surface;
-+
-+ wl_signal_emit(&layout_surface->configured, layout_surface);
-+
-+ if (transition->private_data) {
-+ free(transition->private_data);
-+ transition->private_data = NULL;
-+ }
-+}
-+
-+static void
-+transition_move_resize_view_user_frame(struct ivi_layout_transition *transition)
-+{
-+ struct move_resize_view_data *mrv = transition->private_data;
-+ const double current = time_to_nowpos(transition);
-+
-+ const int32_t destx = mrv->start_x +
-+ (mrv->end_x - mrv->start_x) * current;
-+
-+ const int32_t desty = mrv->start_y +
-+ (mrv->end_y - mrv->start_y) * current;
-+
-+ const int32_t dest_width = mrv->start_width +
-+ (mrv->end_width - mrv->start_width) * current;
-+
-+ const int32_t dest_height = mrv->start_height +
-+ (mrv->end_height - mrv->start_height) * current;
-+
-+ ivi_layout_surface_set_destination_rectangle(mrv->surface,
-+ destx, desty,
-+ dest_width, dest_height);
-+}
-+
-+static int32_t
-+is_transition_move_resize_view_func(struct move_resize_view_data *data,
-+ struct ivi_layout_surface *view)
-+{
-+ return data->surface == view;
-+}
-+
-+static struct ivi_layout_transition *
-+create_move_resize_view_transition(
-+ struct ivi_layout_surface *surface,
-+ int32_t start_x, int32_t start_y,
-+ int32_t end_x, int32_t end_y,
-+ int32_t start_width, int32_t start_height,
-+ int32_t end_width, int32_t end_height,
-+ ivi_layout_transition_frame_func frame_func,
-+ ivi_layout_transition_destroy_func destroy_func,
-+ uint32_t duration)
-+{
-+ struct ivi_layout_transition *transition = create_layout_transition();
-+ struct move_resize_view_data *data = malloc(sizeof(*data));
-+
-+ if (data == NULL) {
-+ weston_log("%s: memory allocation fails\n", __func__);
-+ return NULL;
-+ }
-+
-+ transition->type = IVI_LAYOUT_TRANSITION_VIEW_MOVE_RESIZE;
-+ transition->is_transition_func = (ivi_layout_is_transition_func)is_transition_move_resize_view_func;
-+
-+ transition->frame_func = frame_func;
-+ transition->destroy_func = destroy_func;
-+ transition->private_data = data;
-+
-+ if (duration != 0)
-+ transition->time_duration = duration;
-+
-+ data->surface = surface;
-+ data->start_x = start_x;
-+ data->start_y = start_y;
-+ data->end_x = end_x;
-+ data->end_y = end_y;
-+
-+ data->start_width = start_width;
-+ data->start_height = start_height;
-+ data->end_width = end_width;
-+ data->end_height = end_height;
-+
-+ return transition;
-+}
-+
-+WL_EXPORT void
-+ivi_layout_transition_move_resize_view(struct ivi_layout_surface *surface,
-+ int32_t dest_x, int32_t dest_y,
-+ int32_t dest_width, int32_t dest_height,
-+ uint32_t duration)
-+{
-+ struct ivi_layout_transition *transition;
-+ int32_t start_pos[2] = {
-+ surface->pending.prop.start_x,
-+ surface->pending.prop.start_y
-+ };
-+
-+ int32_t start_size[2] = {
-+ surface->pending.prop.start_width,
-+ surface->pending.prop.start_height
-+ };
-+
-+ transition = get_transition_from_type_and_id(
-+ IVI_LAYOUT_TRANSITION_VIEW_MOVE_RESIZE,
-+ surface);
-+ if (transition) {
-+ struct move_resize_view_data *data = transition->private_data;
-+ transition->time_start = 0;
-+ transition->time_duration = duration;
-+
-+ data->start_x = start_pos[0];
-+ data->start_y = start_pos[1];
-+ data->end_x = dest_x;
-+ data->end_y = dest_y;
-+
-+ data->start_width = start_size[0];
-+ data->start_height = start_size[1];
-+ data->end_width = dest_width;
-+ data->end_height = dest_height;
-+ return;
-+ }
-+
-+ transition = create_move_resize_view_transition(
-+ surface,
-+ start_pos[0], start_pos[1],
-+ dest_x, dest_y,
-+ start_size[0], start_size[1],
-+ dest_width, dest_height,
-+ transition_move_resize_view_user_frame,
-+ transition_move_resize_view_destroy,
-+ duration);
-+
-+ layout_transition_register(transition);
-+}
-+
-+/* fade transition */
-+struct fade_view_data {
-+ struct ivi_layout_surface *surface;
-+ double start_alpha;
-+ double end_alpha;
-+};
-+
-+struct store_alpha{
-+ double alpha;
-+};
-+
-+static void
-+fade_view_user_frame(struct ivi_layout_transition *transition)
-+{
-+ struct fade_view_data *fade = transition->private_data;
-+ struct ivi_layout_surface *surface = fade->surface;
-+
-+ const double current = time_to_nowpos(transition);
-+ const double alpha = fade->start_alpha +
-+ (fade->end_alpha - fade->start_alpha) * current;
-+
-+ ivi_layout_surface_set_opacity(surface, wl_fixed_from_double(alpha));
-+ ivi_layout_surface_set_visibility(surface, true);
-+}
-+
-+static int32_t
-+is_transition_fade_view_func(struct fade_view_data *data,
-+ struct ivi_layout_surface *view)
-+{
-+ return data->surface == view;
-+}
-+
-+static struct ivi_layout_transition *
-+create_fade_view_transition(
-+ struct ivi_layout_surface *surface,
-+ double start_alpha, double end_alpha,
-+ ivi_layout_transition_frame_func frame_func,
-+ void *user_data,
-+ ivi_layout_transition_destroy_func destroy_func,
-+ uint32_t duration)
-+{
-+ struct ivi_layout_transition *transition = create_layout_transition();
-+ struct fade_view_data *data = malloc(sizeof(*data));
-+
-+ if (data == NULL) {
-+ weston_log("%s: memory allocation fails\n", __func__);
-+ return NULL;
-+ }
-+
-+ transition->type = IVI_LAYOUT_TRANSITION_VIEW_FADE;
-+ transition->is_transition_func = (ivi_layout_is_transition_func)is_transition_fade_view_func;
-+
-+ transition->user_data = user_data;
-+ transition->private_data = data;
-+ transition->frame_func = frame_func;
-+ transition->destroy_func = destroy_func;
-+
-+ if (duration != 0)
-+ transition->time_duration = duration;
-+
-+ data->surface = surface;
-+ data->start_alpha = start_alpha;
-+ data->end_alpha = end_alpha;
-+
-+ return transition;
-+}
-+
-+static void
-+create_visibility_transition(struct ivi_layout_surface *surface,
-+ double start_alpha,
-+ double dest_alpha,
-+ void *user_data,
-+ ivi_layout_transition_destroy_func destroy_func,
-+ uint32_t duration)
-+{
-+ struct ivi_layout_transition *transition = NULL;
-+
-+ transition = create_fade_view_transition(
-+ surface,
-+ start_alpha, dest_alpha,
-+ fade_view_user_frame,
-+ user_data,
-+ destroy_func,
-+ duration);
-+
-+ layout_transition_register(transition);
-+}
-+
-+static void
-+visibility_on_transition_destroy(struct ivi_layout_transition *transition)
-+{
-+ struct fade_view_data *data = transition->private_data;
-+ struct store_alpha *user_data = transition->user_data;
-+
-+ ivi_layout_surface_set_visibility(data->surface, true);
-+
-+ free(data);
-+ transition->private_data = NULL;
-+
-+ free(user_data);
-+ transition->user_data = NULL;
-+}
-+
-+WL_EXPORT void
-+ivi_layout_transition_visibility_on(struct ivi_layout_surface *surface,
-+ uint32_t duration)
-+{
-+ struct ivi_layout_transition *transition;
-+ bool is_visible = ivi_layout_surface_get_visibility(surface);
-+ wl_fixed_t dest_alpha = ivi_layout_surface_get_opacity(surface);
-+ struct store_alpha *user_data = NULL;
-+ wl_fixed_t start_alpha = 0.0;
-+ struct fade_view_data *data = NULL;
-+
-+ transition = get_transition_from_type_and_id(
-+ IVI_LAYOUT_TRANSITION_VIEW_FADE,
-+ surface);
-+ if (transition) {
-+ start_alpha = ivi_layout_surface_get_opacity(surface);
-+ user_data = transition->user_data;
-+ data = transition->private_data;
-+
-+ transition->time_start = 0;
-+ transition->time_duration = duration;
-+ transition->destroy_func = visibility_on_transition_destroy;
-+
-+ data->start_alpha = wl_fixed_to_double(start_alpha);
-+ data->end_alpha = user_data->alpha;
-+ return;
-+ }
-+
-+ if (is_visible)
-+ return;
-+
-+ user_data = malloc(sizeof(*user_data));
-+ if (user_data == NULL) {
-+ weston_log("%s: memory allocation fails\n", __func__);
-+ return;
-+ }
-+
-+ user_data->alpha = wl_fixed_to_double(dest_alpha);
-+
-+ create_visibility_transition(surface,
-+ 0.0, // start_alpha
-+ wl_fixed_to_double(dest_alpha),
-+ user_data,
-+ visibility_on_transition_destroy,
-+ duration);
-+}
-+
-+static void
-+visibility_off_transition_destroy(struct ivi_layout_transition *transition)
-+{
-+ struct fade_view_data *data = transition->private_data;
-+ struct store_alpha *user_data = transition->user_data;
-+
-+ ivi_layout_surface_set_visibility(data->surface, false);
-+
-+ ivi_layout_surface_set_opacity(data->surface,
-+ wl_fixed_from_double(user_data->alpha));
-+
-+ free(data);
-+ transition->private_data = NULL;
-+
-+ free(user_data);
-+ transition->user_data= NULL;
-+}
-+
-+WL_EXPORT void
-+ivi_layout_transition_visibility_off(struct ivi_layout_surface *surface,
-+ uint32_t duration)
-+{
-+ struct ivi_layout_transition *transition;
-+ wl_fixed_t start_alpha = ivi_layout_surface_get_opacity(surface);
-+ struct store_alpha* user_data = NULL;
-+ struct fade_view_data* data = NULL;
-+
-+ transition =
-+ get_transition_from_type_and_id(IVI_LAYOUT_TRANSITION_VIEW_FADE,
-+ surface);
-+ if (transition) {
-+ data = transition->private_data;
-+
-+ transition->time_start = 0;
-+ transition->time_duration = duration;
-+ transition->destroy_func = visibility_off_transition_destroy;
-+
-+ data->start_alpha = wl_fixed_to_double(start_alpha);
-+ data->end_alpha = 0;
-+ return;
-+ }
-+
-+ user_data = malloc(sizeof(*user_data));
-+ if (user_data == NULL) {
-+ weston_log("%s: memory allocation fails\n", __func__);
-+ return;
-+ }
-+
-+ user_data->alpha = wl_fixed_to_double(start_alpha);
-+
-+ create_visibility_transition(surface,
-+ wl_fixed_to_double(start_alpha),
-+ 0.0, // dest_alpha
-+ user_data,
-+ visibility_off_transition_destroy,
-+ duration);
-+}
-+
-+/* move layer transition */
-+
-+struct move_layer_data {
-+ struct ivi_layout_layer *layer;
-+ int32_t start_x;
-+ int32_t start_y;
-+ int32_t end_x;
-+ int32_t end_y;
-+ ivi_layout_transition_destroy_user_func destroy_func;
-+};
-+
-+static void
-+transition_move_layer_user_frame(struct ivi_layout_transition *transition)
-+{
-+ struct move_layer_data *data = transition->private_data;
-+ struct ivi_layout_layer *layer = data->layer;
-+
-+ const float current = time_to_nowpos(transition);
-+
-+ const int32_t dest_x = data->start_x +
-+ (data->end_x - data->start_x) * current;
-+
-+ const int32_t dest_y = data->start_y +
-+ (data->end_y - data->start_y) * current;
-+
-+ ivi_layout_layer_set_position(layer, dest_x, dest_y);
-+}
-+
-+static void
-+transition_move_layer_destroy(struct ivi_layout_transition *transition)
-+{
-+ struct move_layer_data *data = transition->private_data;
-+
-+ if(data->destroy_func)
-+ data->destroy_func(transition->user_data);
-+
-+ free(data);
-+ transition->private_data = NULL;
-+}
-+
-+static int32_t
-+is_transition_move_layer_func(struct move_layer_data *data,
-+ struct ivi_layout_layer *layer)
-+{
-+ return data->layer == layer;
-+}
-+
-+
-+static struct ivi_layout_transition *
-+create_move_layer_transition(
-+ struct ivi_layout_layer *layer,
-+ int32_t start_x, int32_t start_y,
-+ int32_t end_x, int32_t end_y,
-+ void *user_data,
-+ ivi_layout_transition_destroy_user_func destroy_user_func,
-+ uint32_t duration)
-+{
-+ struct ivi_layout_transition *transition = create_layout_transition();
-+ struct move_layer_data *data = malloc(sizeof(*data));
-+
-+ if (data == NULL) {
-+ weston_log("%s: memory allocation fails\n", __func__);
-+ return NULL;
-+ }
-+
-+ transition->type = IVI_LAYOUT_TRANSITION_LAYER_MOVE;
-+ transition->is_transition_func = (ivi_layout_is_transition_func)is_transition_move_layer_func;
-+
-+ transition->frame_func = transition_move_layer_user_frame;
-+ transition->destroy_func = transition_move_layer_destroy;
-+ transition->private_data = data;
-+ transition->user_data = user_data;
-+
-+ if (duration != 0)
-+ transition->time_duration = duration;
-+
-+ data->layer = layer;
-+ data->start_x = start_x;
-+ data->start_y = start_y;
-+ data->end_x = end_x;
-+ data->end_y = end_y;
-+ data->destroy_func = destroy_user_func;
-+
-+ return transition;
-+}
-+
-+WL_EXPORT void
-+ivi_layout_transition_move_layer(struct ivi_layout_layer *layer,
-+ int32_t dest_x, int32_t dest_y,
-+ uint32_t duration)
-+{
-+ int32_t start_pos_x = 0;
-+ int32_t start_pos_y = 0;
-+ struct ivi_layout_transition *transition = NULL;
-+
-+ ivi_layout_layer_get_position(layer, &start_pos_x, &start_pos_y);
-+
-+ transition = create_move_layer_transition(
-+ layer,
-+ start_pos_x, start_pos_y,
-+ dest_x, dest_y,
-+ NULL, NULL,
-+ duration);
-+
-+ layout_transition_register(transition);
-+
-+ return;
-+}
-+
-+WL_EXPORT void
-+ivi_layout_transition_move_layer_cancel(struct ivi_layout_layer *layer)
-+{
-+ struct ivi_layout_transition *transition =
-+ get_transition_from_type_and_id(
-+ IVI_LAYOUT_TRANSITION_LAYER_MOVE,
-+ layer);
-+ if (transition) {
-+ layout_transition_destroy(transition);
-+ }
-+}
-+
-+/* fade layer transition */
-+struct fade_layer_data {
-+ struct ivi_layout_layer *layer;
-+ uint32_t is_fade_in;
-+ double start_alpha;
-+ double end_alpha;
-+ ivi_layout_transition_destroy_user_func destroy_func;
-+};
-+
-+static void
-+transition_fade_layer_destroy(struct ivi_layout_transition *transition)
-+{
-+ struct fade_layer_data *data = transition->private_data;
-+ transition->private_data = NULL;
-+
-+ free(data);
-+}
-+
-+static void
-+transition_fade_layer_user_frame(struct ivi_layout_transition *transition)
-+{
-+ double current = time_to_nowpos(transition);
-+ struct fade_layer_data *data = transition->private_data;
-+ double alpha = data->start_alpha +
-+ (data->end_alpha - data->start_alpha) * current;
-+ wl_fixed_t fixed_alpha = wl_fixed_from_double(alpha);
-+
-+ int32_t is_done = transition->is_done;
-+ bool is_visible = !is_done || data->is_fade_in;
-+
-+ ivi_layout_layer_set_opacity(data->layer, fixed_alpha);
-+ ivi_layout_layer_set_visibility(data->layer, is_visible);
-+}
-+
-+static int32_t
-+is_transition_fade_layer_func(struct fade_layer_data *data,
-+ struct ivi_layout_layer *layer)
-+{
-+ return data->layer == layer;
-+}
-+
-+WL_EXPORT void
-+ivi_layout_transition_fade_layer(
-+ struct ivi_layout_layer *layer,
-+ uint32_t is_fade_in,
-+ double start_alpha, double end_alpha,
-+ void* user_data,
-+ ivi_layout_transition_destroy_user_func destroy_func,
-+ uint32_t duration)
-+{
-+ struct ivi_layout_transition *transition;
-+ struct fade_layer_data *data = NULL;
-+ wl_fixed_t fixed_opacity = 0.0;
-+ double now_opacity = 0.0;
-+ double remain = 0.0;
-+
-+ transition = get_transition_from_type_and_id(
-+ IVI_LAYOUT_TRANSITION_LAYER_FADE,
-+ layer);
-+ if (transition) {
-+ /* transition update */
-+ data = transition->private_data;
-+
-+ /* FIXME */
-+ fixed_opacity = ivi_layout_layer_get_opacity(layer);
-+ now_opacity = wl_fixed_to_double(fixed_opacity);
-+ remain = 0.0;
-+
-+ data->is_fade_in = is_fade_in;
-+ data->start_alpha = now_opacity;
-+ data->end_alpha = end_alpha;
-+
-+ remain = is_fade_in? 1.0 - now_opacity : now_opacity;
-+ transition->time_start = 0;
-+ transition->time_elapsed = 0;
-+ transition->time_duration = duration * remain;
-+
-+ return;
-+ }
-+
-+ transition = create_layout_transition();
-+ data = malloc(sizeof(*data));
-+
-+ if (data == NULL) {
-+ weston_log("%s: memory allocation fails\n", __func__);
-+ return;
-+ }
-+
-+ transition->type = IVI_LAYOUT_TRANSITION_LAYER_FADE;
-+ transition->is_transition_func = (ivi_layout_is_transition_func)is_transition_fade_layer_func;
-+
-+ transition->private_data = data;
-+ transition->user_data = user_data;
-+
-+ transition->frame_func = transition_fade_layer_user_frame;
-+ transition->destroy_func = transition_fade_layer_destroy;
-+
-+ if (duration != 0)
-+ transition->time_duration = duration;
-+
-+ data->layer = layer;
-+ data->is_fade_in = is_fade_in;
-+ data->start_alpha = start_alpha;
-+ data->end_alpha = end_alpha;
-+ data->destroy_func = destroy_func;
-+
-+ layout_transition_register(transition);
-+
-+ return;
-+}
-+
-+/* render order transition */
-+struct surface_reorder {
-+ uint32_t id_surface;
-+ uint32_t new_index;
-+};
-+
-+struct change_order_data {
-+ struct ivi_layout_layer *layer;
-+ uint32_t surface_num;
-+ struct surface_reorder *reorder;
-+};
-+
-+struct surf_with_index {
-+ uint32_t id_surface;
-+ float surface_index;
-+};
-+
-+static int
-+cmp_order_asc(const void *lhs, const void *rhs)
-+{
-+ const struct surf_with_index *l = lhs;
-+ const struct surf_with_index *r = rhs;
-+
-+ return l->surface_index > r->surface_index;
-+}
-+
-+/*
-+render oerder transition
-+
-+index 0 1 2
-+old surfA, surfB, surfC
-+new surfB, surfC, surfA
-+ (-1) (-1) (+2)
-+
-+after 10% of time elapsed
-+ 0.2 0.9 1.9
-+ surfA, surfB, surfC
-+
-+after 50% of time elapsed
-+ 0.5 1.0 1.5
-+ surfB, surfA, surfC
-+*/
-+
-+static void
-+transition_change_order_user_frame(struct ivi_layout_transition *transition)
-+{
-+ uint32_t i, old_index;
-+ double current = time_to_nowpos(transition);
-+ struct change_order_data *data = transition->private_data;
-+
-+ struct surf_with_index *swi = malloc(sizeof(*swi) * data->surface_num);
-+ struct ivi_layout_surface **new_surface_order = NULL;
-+ uint32_t surface_num = 0;
-+
-+ if (swi == NULL) {
-+ weston_log("%s: memory allocation fails\n", __func__);
-+ return;
-+ }
-+
-+ for (old_index = 0; old_index < data->surface_num; old_index++) {
-+ swi[old_index].id_surface = data->reorder[old_index].id_surface;
-+ swi[old_index].surface_index = (float)old_index +
-+ ((float)data->reorder[old_index].new_index - (float)old_index) * current;
-+ }
-+
-+ qsort(swi, data->surface_num, sizeof(*swi), cmp_order_asc);
-+
-+ new_surface_order =
-+ malloc(sizeof(*new_surface_order) * data->surface_num);
-+
-+ if (new_surface_order == NULL) {
-+ weston_log("%s: memory allocation fails\n", __func__);
-+ return;
-+ }
-+
-+ for (i = 0; i < data->surface_num; i++) {
-+ struct ivi_layout_surface *surf =
-+ ivi_layout_get_surface_from_id(swi[i].id_surface);
-+ if(surf)
-+ new_surface_order[surface_num++] = surf;
-+ }
-+
-+ ivi_layout_layer_set_render_order(data->layer, new_surface_order,
-+ surface_num);
-+
-+ free(new_surface_order);
-+ free(swi);
-+}
-+
-+static void
-+transition_change_order_destroy(struct ivi_layout_transition *transition)
-+{
-+ struct change_order_data *data = transition->private_data;
-+
-+ free(data->reorder);
-+ free(data);
-+}
-+
-+static int32_t find_surface(struct ivi_layout_surface **surfaces,
-+ uint32_t surface_num,
-+ struct ivi_layout_surface *target)
-+{
-+ uint32_t i = 0;
-+
-+ for(i = 0; i < surface_num; i++) {
-+ if (surfaces[i] == target)
-+ return i;
-+ }
-+
-+ return -1;
-+}
-+
-+static int32_t
-+is_transition_change_order_func(struct change_order_data *data,
-+ struct ivi_layout_layer *layer)
-+{
-+ return data->layer == layer;
-+}
-+
-+WL_EXPORT void
-+ivi_layout_transition_layer_render_order(struct ivi_layout_layer *layer,
-+ struct ivi_layout_surface **new_order,
-+ uint32_t surface_num,
-+ uint32_t duration)
-+{
-+ struct surface_reorder *reorder;
-+ struct ivi_layout_surface *surf;
-+ uint32_t old_index = 0;
-+ struct ivi_layout_transition *transition;
-+ struct change_order_data *data = NULL;
-+ int32_t new_index = 0;
-+ uint32_t id = 0;
-+
-+ reorder = malloc(sizeof(*reorder) * surface_num);
-+ if (reorder == NULL) {
-+ weston_log("%s: memory allocation fails\n", __func__);
-+ return;
-+ }
-+
-+ wl_list_for_each(surf, &layer->order.surface_list, order.link) {
-+ new_index = find_surface(new_order, surface_num, surf);
-+ id = ivi_layout_get_id_of_surface(surf);
-+ if(new_index < 0){
-+ fprintf(stderr, "invalid render order!!!\n");
-+ return;
-+ }
-+
-+ reorder[old_index].id_surface = id;
-+ reorder[old_index].new_index = new_index;
-+ old_index++;
-+ }
-+
-+ transition = get_transition_from_type_and_id(
-+ IVI_LAYOUT_TRANSITION_LAYER_VIEW_ORDER,
-+ layer);
-+ if (transition) {
-+ /* update transition */
-+ struct change_order_data *data = transition->private_data;
-+ transition->time_start = 0; /* timer reset */
-+
-+ if (duration != 0) {
-+ transition->time_duration = duration;
-+ }
-+
-+ free(data->reorder);
-+ data->reorder = reorder;
-+ return;
-+ }
-+
-+ transition = create_layout_transition();
-+ data = malloc(sizeof(*data));
-+
-+ if (data == NULL) {
-+ weston_log("%s: memory allocation fails\n", __func__);
-+ return;
-+ }
-+
-+ transition->type = IVI_LAYOUT_TRANSITION_LAYER_VIEW_ORDER;
-+ transition->is_transition_func = (ivi_layout_is_transition_func)is_transition_change_order_func;
-+
-+ transition->private_data = data;
-+ transition->frame_func = transition_change_order_user_frame;
-+ transition->destroy_func = transition_change_order_destroy;
-+
-+ if (duration != 0)
-+ transition->time_duration = duration;
-+
-+ data->layer = layer;
-+ data->reorder = reorder;
-+ data->surface_num = old_index;
-+
-+ layout_transition_register(transition);
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_surface_set_transition(struct ivi_layout_surface *ivisurf,
-+ enum ivi_layout_transition_type type,
-+ uint32_t duration)
-+{
-+ struct ivi_layout_surface_properties *prop;
-+
-+ if (ivisurf == NULL) {
-+ weston_log("%s: invalid argument\n", __func__);
-+ return -1;
-+ }
-+
-+ prop = &ivisurf->pending.prop;
-+ prop->transition_type = type;
-+ prop->transition_duration = duration;
-+ return 0;
-+}
-+
-+int32_t
-+ivi_layout_surface_set_transition_duration(struct ivi_layout_surface *ivisurf,
-+ uint32_t duration)
-+{
-+ struct ivi_layout_surface_properties *prop;
-+
-+ if (ivisurf == NULL) {
-+ weston_log("%s: invalid argument\n", __func__);
-+ return -1;
-+ }
-+
-+ prop = &ivisurf->pending.prop;
-+ prop->transition_duration = duration*10;
-+ return 0;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_layer_set_transition(struct ivi_layout_layer *ivilayer,
-+ enum ivi_layout_transition_type type,
-+ uint32_t duration)
-+{
-+ if (ivilayer == NULL) {
-+ weston_log("%s: invalid argument\n", __func__);
-+ return -1;
-+ }
-+
-+ ivilayer->pending.prop.transition_type = type;
-+ ivilayer->pending.prop.transition_duration = duration;
-+
-+ return 0;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_layer_set_fade_info(struct ivi_layout_layer* ivilayer,
-+ uint32_t is_fade_in,
-+ double start_alpha, double end_alpha)
-+{
-+ if (ivilayer == NULL) {
-+ weston_log("%s: invalid argument\n", __func__);
-+ return -1;
-+ }
-+
-+ ivilayer->pending.prop.is_fade_in = is_fade_in;
-+ ivilayer->pending.prop.start_alpha = start_alpha;
-+ ivilayer->pending.prop.end_alpha = end_alpha;
-+
-+ return 0;
-+}
-diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
-new file mode 100644
-index 0000000..6f7c3c2
---- /dev/null
-+++ b/ivi-shell/ivi-layout.c
-@@ -0,0 +1,2809 @@
-+/*
-+ * Copyright (C) 2013 DENSO CORPORATION
-+ *
-+ * Permission to use, copy, modify, distribute, and sell this software and
-+ * its documentation for any purpose is hereby granted without fee, provided
-+ * that the above copyright notice appear in all copies and that both that
-+ * copyright notice and this permission notice appear in supporting
-+ * documentation, and that the name of the copyright holders not be used in
-+ * advertising or publicity pertaining to distribution of the software
-+ * without specific, written prior permission. The copyright holders make
-+ * no representations about the suitability of this software for any
-+ * purpose. It is provided "as is" without express or implied warranty.
-+ *
-+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
-+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
-+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
-+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
-+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ */
-+
-+/**
-+ * Implementation of ivi-layout library. The actual view on ivi_screen is
-+ * not updated till calling ivi_layout_commit_changes. A overview from
-+ * calling API for updating properties of ivi_surface/ivi_layer to asking
-+ * compositor to compose them by using weston_compositor_schedule_repaint,
-+ * 0/ initialize this library by ivi_layout_init_with_compositor
-+ * with (struct weston_compositor *ec) from ivi-shell.
-+ * 1/ When a API for updating properties of ivi_surface/ivi_layer, it updates
-+ * pending prop of ivi_surface/ivi_layer/ivi_screen which are structure to
-+ * store properties.
-+ * 2/ Before calling commitChanges, in case of calling a API to get a property,
-+ * return current property, not pending property.
-+ * 3/ At the timing of calling ivi_layout_commitChanges, pending properties
-+ * are applied to properties.
-+ *
-+ * *) ivi_layout_commitChanges is also called by transition animation
-+ * per each frame. See ivi-layout-transition.c in details. Transition
-+ * animation interpolates frames between previous properties of ivi_surface
-+ * and new ones.
-+ * For example, when a property of ivi_surface is changed from invisibility
-+ * to visibility, it behaves like fade-in. When ivi_layout_commitChange is
-+ * called during transition animation, it cancels the transition and
-+ * re-start transition to new properties from current properties of final
-+ * frame just before the the cancellation.
-+ *
-+ * 4/ According properties, set transformation by using weston_matrix and
-+ * weston_view per ivi_surfaces and ivi_layers in while loop.
-+ * 5/ Set damage and trigger transform by using weston_view_geometry_dirty.
-+ * 6/ Notify update of properties.
-+ * 7/ Trigger composition by weston_compositor_schedule_repaint.
-+ *
-+ */
-+
-+#include <sys/wait.h>
-+#include <unistd.h>
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <string.h>
-+#include <linux/input.h>
-+
-+#include "compositor.h"
-+#include "ivi-layout-export.h"
-+#include "ivi-layout-private.h"
-+
-+struct link_layer {
-+ struct ivi_layout_layer *ivilayer;
-+ struct wl_list link;
-+ struct wl_list link_to_layer;
-+};
-+
-+struct link_screen {
-+ struct ivi_layout_screen *iviscrn;
-+ struct wl_list link;
-+ struct wl_list link_to_screen;
-+};
-+
-+struct listener_layout_notification {
-+ void *userdata;
-+ struct wl_listener listener;
-+};
-+
-+struct ivi_layout;
-+
-+struct ivi_layout_screen {
-+ struct wl_list link;
-+ struct wl_list link_to_layer;
-+ uint32_t id_screen;
-+
-+ struct ivi_layout *layout;
-+ struct weston_output *output;
-+
-+ uint32_t event_mask;
-+
-+ struct {
-+ struct wl_list layer_list;
-+ struct wl_list link;
-+ } pending;
-+
-+ struct {
-+ struct wl_list layer_list;
-+ struct wl_list link;
-+ } order;
-+};
-+
-+struct ivi_layout_notification_callback {
-+ void *callback;
-+ void *data;
-+};
-+
-+static struct ivi_layout ivilayout = {0};
-+
-+struct ivi_layout *
-+get_instance(void)
-+{
-+ return &ivilayout;
-+}
-+
-+/**
-+ * Internal API to add/remove a link to ivi_surface from ivi_layer.
-+ */
-+static void
-+add_link_to_surface(struct ivi_layout_layer *ivilayer,
-+ struct link_layer *link_layer)
-+{
-+ struct link_layer *link = NULL;
-+
-+ wl_list_for_each(link, &ivilayer->link_to_surface, link_to_layer) {
-+ if (link == link_layer)
-+ return;
-+ }
-+
-+ wl_list_insert(&ivilayer->link_to_surface, &link_layer->link_to_layer);
-+}
-+
-+static void
-+remove_link_to_surface(struct ivi_layout_layer *ivilayer)
-+{
-+ struct link_layer *link = NULL;
-+ struct link_layer *next = NULL;
-+
-+ wl_list_for_each_safe(link, next, &ivilayer->link_to_surface, link_to_layer) {
-+ if (!wl_list_empty(&link->link_to_layer)) {
-+ wl_list_remove(&link->link_to_layer);
-+ }
-+ if (!wl_list_empty(&link->link)) {
-+ wl_list_remove(&link->link);
-+ }
-+ free(link);
-+ }
-+
-+ wl_list_init(&ivilayer->link_to_surface);
-+}
-+
-+/**
-+ * Internal API to add a link to ivi_layer from ivi_screen.
-+ */
-+static void
-+add_link_to_layer(struct ivi_layout_screen *iviscrn,
-+ struct link_screen *link_screen)
-+{
-+ wl_list_init(&link_screen->link_to_screen);
-+ wl_list_insert(&iviscrn->link_to_layer, &link_screen->link_to_screen);
-+}
-+
-+/**
-+ * Internal API to add/remove a ivi_surface from ivi_layer.
-+ */
-+static void
-+add_ordersurface_to_layer(struct ivi_layout_surface *ivisurf,
-+ struct ivi_layout_layer *ivilayer)
-+{
-+ struct link_layer *link_layer = NULL;
-+
-+ link_layer = malloc(sizeof *link_layer);
-+ if (link_layer == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return;
-+ }
-+
-+ link_layer->ivilayer = ivilayer;
-+ wl_list_init(&link_layer->link);
-+ wl_list_insert(&ivisurf->layer_list, &link_layer->link);
-+ add_link_to_surface(ivilayer, link_layer);
-+}
-+
-+static void
-+remove_ordersurface_from_layer(struct ivi_layout_surface *ivisurf)
-+{
-+ struct link_layer *link_layer = NULL;
-+ struct link_layer *next = NULL;
-+
-+ wl_list_for_each_safe(link_layer, next, &ivisurf->layer_list, link) {
-+ if (!wl_list_empty(&link_layer->link)) {
-+ wl_list_remove(&link_layer->link);
-+ }
-+ if (!wl_list_empty(&link_layer->link_to_layer)) {
-+ wl_list_remove(&link_layer->link_to_layer);
-+ }
-+ free(link_layer);
-+ }
-+ wl_list_init(&ivisurf->layer_list);
-+}
-+
-+/**
-+ * Internal API to add/remove a ivi_layer to/from ivi_screen.
-+ */
-+static void
-+add_orderlayer_to_screen(struct ivi_layout_layer *ivilayer,
-+ struct ivi_layout_screen *iviscrn)
-+{
-+ struct link_screen *link_scrn = NULL;
-+
-+ link_scrn = malloc(sizeof *link_scrn);
-+ if (link_scrn == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return;
-+ }
-+
-+ link_scrn->iviscrn = iviscrn;
-+ wl_list_init(&link_scrn->link);
-+ wl_list_insert(&ivilayer->screen_list, &link_scrn->link);
-+ add_link_to_layer(iviscrn, link_scrn);
-+}
-+
-+static void
-+remove_orderlayer_from_screen(struct ivi_layout_layer *ivilayer)
-+{
-+ struct link_screen *link_scrn = NULL;
-+ struct link_screen *next = NULL;
-+
-+ wl_list_for_each_safe(link_scrn, next, &ivilayer->screen_list, link) {
-+ if (!wl_list_empty(&link_scrn->link)) {
-+ wl_list_remove(&link_scrn->link);
-+ }
-+ if (!wl_list_empty(&link_scrn->link_to_screen)) {
-+ wl_list_remove(&link_scrn->link_to_screen);
-+ }
-+ free(link_scrn);
-+ }
-+ wl_list_init(&ivilayer->screen_list);
-+}
-+
-+/**
-+ * Internal API to add/remove a ivi_layer to/from ivi_screen.
-+ */
-+static struct ivi_layout_surface *
-+get_surface(struct wl_list *surf_list, uint32_t id_surface)
-+{
-+ struct ivi_layout_surface *ivisurf;
-+
-+ wl_list_for_each(ivisurf, surf_list, link) {
-+ if (ivisurf->id_surface == id_surface) {
-+ return ivisurf;
-+ }
-+ }
-+
-+ return NULL;
-+}
-+
-+static struct ivi_layout_layer *
-+get_layer(struct wl_list *layer_list, uint32_t id_layer)
-+{
-+ struct ivi_layout_layer *ivilayer;
-+
-+ wl_list_for_each(ivilayer, layer_list, link) {
-+ if (ivilayer->id_layer == id_layer) {
-+ return ivilayer;
-+ }
-+ }
-+
-+ return NULL;
-+}
-+
-+/**
-+ * Called at destruction of ivi_surface
-+ */
-+static void
-+westonsurface_destroy_from_ivisurface(struct wl_listener *listener, void *data)
-+{
-+ struct ivi_layout_surface *ivisurf = NULL;
-+
-+ ivisurf = container_of(listener, struct ivi_layout_surface,
-+ surface_destroy_listener);
-+
-+ wl_list_init(&ivisurf->surface_rotation.link);
-+ wl_list_init(&ivisurf->layer_rotation.link);
-+ wl_list_init(&ivisurf->surface_pos.link);
-+ wl_list_init(&ivisurf->layer_pos.link);
-+ wl_list_init(&ivisurf->scaling.link);
-+
-+ ivisurf->surface = NULL;
-+ ivi_layout_surface_remove(ivisurf);
-+}
-+
-+/**
-+ * Internal API to check ivi_layer/ivi_surface already added in ivi_layer/ivi_screen.
-+ * Called by ivi_layout_layer_add_surface/ivi_layout_screenAddLayer
-+ */
-+static int
-+is_surface_in_layer(struct ivi_layout_surface *ivisurf,
-+ struct ivi_layout_layer *ivilayer)
-+{
-+ struct ivi_layout_surface *surf = NULL;
-+
-+ wl_list_for_each(surf, &ivilayer->pending.surface_list, pending.link) {
-+ if (surf->id_surface == ivisurf->id_surface) {
-+ return 1;
-+ }
-+ }
-+
-+ return 0;
-+}
-+
-+static int
-+is_layer_in_screen(struct ivi_layout_layer *ivilayer,
-+ struct ivi_layout_screen *iviscrn)
-+{
-+ struct ivi_layout_layer *layer = NULL;
-+
-+ wl_list_for_each(layer, &iviscrn->pending.layer_list, pending.link) {
-+ if (layer->id_layer == ivilayer->id_layer) {
-+ return 1;
-+ }
-+ }
-+
-+ return 0;
-+}
-+
-+/**
-+ * Internal API to initialize ivi_screens found from output_list of weston_compositor.
-+ * Called by ivi_layout_init_with_compositor.
-+ */
-+static void
-+create_screen(struct weston_compositor *ec)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_screen *iviscrn = NULL;
-+ struct weston_output *output = NULL;
-+ int32_t count = 0;
-+
-+ wl_list_for_each(output, &ec->output_list, link) {
-+ iviscrn = calloc(1, sizeof *iviscrn);
-+ if (iviscrn == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ continue;
-+ }
-+
-+ wl_list_init(&iviscrn->link);
-+ iviscrn->layout = layout;
-+
-+ iviscrn->id_screen = count;
-+ count++;
-+
-+ iviscrn->output = output;
-+ iviscrn->event_mask = 0;
-+
-+ wl_list_init(&iviscrn->pending.layer_list);
-+ wl_list_init(&iviscrn->pending.link);
-+
-+ wl_list_init(&iviscrn->order.layer_list);
-+ wl_list_init(&iviscrn->order.link);
-+
-+ wl_list_init(&iviscrn->link_to_layer);
-+
-+ wl_list_insert(&layout->screen_list, &iviscrn->link);
-+ }
-+}
-+
-+/**
-+ * Internal APIs to initialize properties of ivi_surface/ivi_layer when they are created.
-+ */
-+static void
-+init_layer_properties(struct ivi_layout_layer_properties *prop,
-+ int32_t width, int32_t height)
-+{
-+ memset(prop, 0, sizeof *prop);
-+ prop->opacity = wl_fixed_from_double(1.0);
-+ prop->source_width = width;
-+ prop->source_height = height;
-+ prop->dest_width = width;
-+ prop->dest_height = height;
-+}
-+
-+static void
-+init_surface_properties(struct ivi_layout_surface_properties *prop)
-+{
-+ memset(prop, 0, sizeof *prop);
-+ prop->opacity = wl_fixed_from_double(1.0);
-+}
-+
-+/**
-+ * Internal APIs to be called from ivi_layout_commit_changes.
-+ */
-+static void
-+update_opacity(struct ivi_layout_layer *ivilayer,
-+ struct ivi_layout_surface *ivisurf)
-+{
-+ double layer_alpha = wl_fixed_to_double(ivilayer->prop.opacity);
-+ double surf_alpha = wl_fixed_to_double(ivisurf->prop.opacity);
-+
-+ if ((ivilayer->event_mask & IVI_NOTIFICATION_OPACITY) ||
-+ (ivisurf->event_mask & IVI_NOTIFICATION_OPACITY)) {
-+ struct weston_view *tmpview = NULL;
-+ wl_list_for_each(tmpview, &ivisurf->surface->views, surface_link) {
-+ if (tmpview == NULL) {
-+ continue;
-+ }
-+ tmpview->alpha = layer_alpha * surf_alpha;
-+ }
-+ }
-+}
-+
-+static void
-+update_surface_orientation(struct ivi_layout_layer *ivilayer,
-+ struct ivi_layout_surface *ivisurf)
-+{
-+ struct weston_view *view;
-+ struct weston_matrix *matrix = &ivisurf->surface_rotation.matrix;
-+ float width = 0.0f;
-+ float height = 0.0f;
-+ float v_sin = 0.0f;
-+ float v_cos = 0.0f;
-+ float cx = 0.0f;
-+ float cy = 0.0f;
-+ float sx = 1.0f;
-+ float sy = 1.0f;
-+
-+ wl_list_for_each(view, &ivisurf->surface->views, surface_link) {
-+ if (view != NULL) {
-+ break;
-+ }
-+ }
-+
-+ if (view == NULL) {
-+ return;
-+ }
-+
-+ if ((ivilayer->prop.dest_width == 0) ||
-+ (ivilayer->prop.dest_height == 0)) {
-+ return;
-+ }
-+ width = (float)ivilayer->prop.dest_width;
-+ height = (float)ivilayer->prop.dest_height;
-+
-+ switch (ivisurf->prop.orientation) {
-+ case WL_OUTPUT_TRANSFORM_NORMAL:
-+ v_sin = 0.0f;
-+ v_cos = 1.0f;
-+ break;
-+ case WL_OUTPUT_TRANSFORM_90:
-+ v_sin = 1.0f;
-+ v_cos = 0.0f;
-+ sx = width / height;
-+ sy = height / width;
-+ break;
-+ case WL_OUTPUT_TRANSFORM_180:
-+ v_sin = 0.0f;
-+ v_cos = -1.0f;
-+ break;
-+ case WL_OUTPUT_TRANSFORM_270:
-+ default:
-+ v_sin = -1.0f;
-+ v_cos = 0.0f;
-+ sx = width / height;
-+ sy = height / width;
-+ break;
-+ }
-+ wl_list_remove(&ivisurf->surface_rotation.link);
-+ weston_view_geometry_dirty(view);
-+
-+ weston_matrix_init(matrix);
-+ cx = 0.5f * width;
-+ cy = 0.5f * height;
-+ weston_matrix_translate(matrix, -cx, -cy, 0.0f);
-+ weston_matrix_rotate_xy(matrix, v_cos, v_sin);
-+ weston_matrix_scale(matrix, sx, sy, 1.0);
-+ weston_matrix_translate(matrix, cx, cy, 0.0f);
-+ wl_list_insert(&view->geometry.transformation_list,
-+ &ivisurf->surface_rotation.link);
-+
-+ weston_view_set_transform_parent(view, NULL);
-+ weston_view_update_transform(view);
-+}
-+
-+static void
-+update_layer_orientation(struct ivi_layout_layer *ivilayer,
-+ struct ivi_layout_surface *ivisurf)
-+{
-+ struct weston_surface *es = ivisurf->surface;
-+ struct weston_view *view;
-+ struct weston_matrix *matrix = &ivisurf->layer_rotation.matrix;
-+ struct weston_output *output = NULL;
-+ float width = 0.0f;
-+ float height = 0.0f;
-+ float v_sin = 0.0f;
-+ float v_cos = 0.0f;
-+ float cx = 0.0f;
-+ float cy = 0.0f;
-+ float sx = 1.0f;
-+ float sy = 1.0f;
-+
-+ wl_list_for_each(view, &ivisurf->surface->views, surface_link) {
-+ if (view != NULL) {
-+ break;
-+ }
-+ }
-+
-+ if (es == NULL || view == NULL) {
-+ return;
-+ }
-+
-+ output = es->output;
-+ if (output == NULL) {
-+ return;
-+ }
-+ if ((output->width == 0) || (output->height == 0)) {
-+ return;
-+ }
-+ width = (float)output->width;
-+ height = (float)output->height;
-+
-+ switch (ivilayer->prop.orientation) {
-+ case WL_OUTPUT_TRANSFORM_NORMAL:
-+ v_sin = 0.0f;
-+ v_cos = 1.0f;
-+ break;
-+ case WL_OUTPUT_TRANSFORM_90:
-+ v_sin = 1.0f;
-+ v_cos = 0.0f;
-+ sx = width / height;
-+ sy = height / width;
-+ break;
-+ case WL_OUTPUT_TRANSFORM_180:
-+ v_sin = 0.0f;
-+ v_cos = -1.0f;
-+ break;
-+ case WL_OUTPUT_TRANSFORM_270:
-+ default:
-+ v_sin = -1.0f;
-+ v_cos = 0.0f;
-+ sx = width / height;
-+ sy = height / width;
-+ break;
-+ }
-+ wl_list_remove(&ivisurf->layer_rotation.link);
-+ weston_view_geometry_dirty(view);
-+
-+ weston_matrix_init(matrix);
-+ cx = 0.5f * width;
-+ cy = 0.5f * height;
-+ weston_matrix_translate(matrix, -cx, -cy, 0.0f);
-+ weston_matrix_rotate_xy(matrix, v_cos, v_sin);
-+ weston_matrix_scale(matrix, sx, sy, 1.0);
-+ weston_matrix_translate(matrix, cx, cy, 0.0f);
-+ wl_list_insert(&view->geometry.transformation_list,
-+ &ivisurf->layer_rotation.link);
-+
-+ weston_view_set_transform_parent(view, NULL);
-+ weston_view_update_transform(view);
-+}
-+
-+static void
-+update_surface_position(struct ivi_layout_surface *ivisurf)
-+{
-+ struct weston_view *view;
-+ float tx = (float)ivisurf->prop.dest_x;
-+ float ty = (float)ivisurf->prop.dest_y;
-+ struct weston_matrix *matrix = &ivisurf->surface_pos.matrix;
-+
-+ wl_list_for_each(view, &ivisurf->surface->views, surface_link) {
-+ if (view != NULL) {
-+ break;
-+ }
-+ }
-+
-+ if (view == NULL) {
-+ return;
-+ }
-+
-+ wl_list_remove(&ivisurf->surface_pos.link);
-+
-+ weston_matrix_init(matrix);
-+ weston_matrix_translate(matrix, tx, ty, 0.0f);
-+ wl_list_insert(&view->geometry.transformation_list,
-+ &ivisurf->surface_pos.link);
-+
-+ weston_view_set_transform_parent(view, NULL);
-+ weston_view_update_transform(view);
-+}
-+
-+static void
-+update_layer_position(struct ivi_layout_layer *ivilayer,
-+ struct ivi_layout_surface *ivisurf)
-+{
-+ struct weston_view *view;
-+ struct weston_matrix *matrix = &ivisurf->layer_pos.matrix;
-+ float tx = (float)ivilayer->prop.dest_x;
-+ float ty = (float)ivilayer->prop.dest_y;
-+
-+ wl_list_for_each(view, &ivisurf->surface->views, surface_link) {
-+ if (view != NULL) {
-+ break;
-+ }
-+ }
-+
-+ if (view == NULL) {
-+ return;
-+ }
-+
-+ wl_list_remove(&ivisurf->layer_pos.link);
-+
-+ weston_matrix_init(matrix);
-+ weston_matrix_translate(matrix, tx, ty, 0.0f);
-+ wl_list_insert(&view->geometry.transformation_list,
-+ &ivisurf->layer_pos.link);
-+
-+ weston_view_set_transform_parent(view, NULL);
-+ weston_view_update_transform(view);
-+}
-+
-+static void
-+update_scale(struct ivi_layout_layer *ivilayer,
-+ struct ivi_layout_surface *ivisurf)
-+{
-+ struct weston_view *view;
-+ struct weston_matrix *matrix = &ivisurf->scaling.matrix;
-+ float sx = 0.0f;
-+ float sy = 0.0f;
-+ float lw = 0.0f;
-+ float sw = 0.0f;
-+ float lh = 0.0f;
-+ float sh = 0.0f;
-+
-+ wl_list_for_each(view, &ivisurf->surface->views, surface_link) {
-+ if (view != NULL) {
-+ break;
-+ }
-+ }
-+
-+ if (view == NULL) {
-+ return;
-+ }
-+
-+ if (ivisurf->prop.dest_width == 0 && ivisurf->prop.dest_height == 0) {
-+ ivisurf->prop.dest_width = ivisurf->surface->width_from_buffer;
-+ ivisurf->prop.dest_height = ivisurf->surface->height_from_buffer;
-+ }
-+
-+ lw = ((float)ivilayer->prop.dest_width / (float)ivilayer->prop.source_width );
-+ sw = ((float)ivisurf->prop.dest_width / (float)ivisurf->prop.source_width );
-+ lh = ((float)ivilayer->prop.dest_height / (float)ivilayer->prop.source_height);
-+ sh = ((float)ivisurf->prop.dest_height / (float)ivisurf->prop.source_height );
-+ sx = sw * lw;
-+ sy = sh * lh;
-+
-+ wl_list_remove(&ivisurf->scaling.link);
-+ weston_matrix_init(matrix);
-+ weston_matrix_scale(matrix, sx, sy, 1.0f);
-+
-+ wl_list_insert(&view->geometry.transformation_list,
-+ &ivisurf->scaling.link);
-+
-+ weston_view_set_transform_parent(view, NULL);
-+ weston_view_update_transform(view);
-+}
-+
-+static void
-+update_prop(struct ivi_layout_layer *ivilayer,
-+ struct ivi_layout_surface *ivisurf)
-+{
-+ if (ivilayer->event_mask | ivisurf->event_mask) {
-+ struct weston_view *tmpview;
-+ update_opacity(ivilayer, ivisurf);
-+ update_layer_orientation(ivilayer, ivisurf);
-+ update_layer_position(ivilayer, ivisurf);
-+ update_surface_position(ivisurf);
-+ update_surface_orientation(ivilayer, ivisurf);
-+ update_scale(ivilayer, ivisurf);
-+
-+ ivisurf->update_count++;
-+
-+ wl_list_for_each(tmpview, &ivisurf->surface->views, surface_link) {
-+ if (tmpview != NULL) {
-+ break;
-+ }
-+ }
-+
-+ if (tmpview != NULL) {
-+ weston_view_geometry_dirty(tmpview);
-+ }
-+
-+ if (ivisurf->surface != NULL) {
-+ weston_surface_damage(ivisurf->surface);
-+ }
-+ }
-+}
-+
-+static void
-+commit_changes(struct ivi_layout *layout)
-+{
-+ struct ivi_layout_screen *iviscrn = NULL;
-+ struct ivi_layout_layer *ivilayer = NULL;
-+ struct ivi_layout_surface *ivisurf = NULL;
-+
-+ wl_list_for_each(iviscrn, &layout->screen_list, link) {
-+ wl_list_for_each(ivilayer, &iviscrn->order.layer_list, order.link) {
-+ wl_list_for_each(ivisurf, &ivilayer->order.surface_list, order.link) {
-+ update_prop(ivilayer, ivisurf);
-+ }
-+ }
-+ }
-+}
-+
-+static void
-+commit_surface_list(struct ivi_layout *layout)
-+{
-+ struct ivi_layout_surface *ivisurf = NULL;
-+ int32_t dest_x = 0;
-+ int32_t dest_y = 0;
-+ int32_t dest_width = 0;
-+ int32_t dest_height = 0;
-+ int32_t configured = 0;
-+
-+ wl_list_for_each(ivisurf, &layout->surface_list, link) {
-+ if(ivisurf->pending.prop.transition_type == IVI_LAYOUT_TRANSITION_VIEW_DEFAULT) {
-+ dest_x = ivisurf->prop.dest_x;
-+ dest_y = ivisurf->prop.dest_y;
-+ dest_width = ivisurf->prop.dest_width;
-+ dest_height = ivisurf->prop.dest_height;
-+
-+ ivi_layout_transition_move_resize_view(ivisurf,
-+ ivisurf->pending.prop.dest_x,
-+ ivisurf->pending.prop.dest_y,
-+ ivisurf->pending.prop.dest_width,
-+ ivisurf->pending.prop.dest_height,
-+ ivisurf->pending.prop.transition_duration);
-+
-+ if(ivisurf->pending.prop.visibility) {
-+ ivi_layout_transition_visibility_on(ivisurf, ivisurf->pending.prop.transition_duration);
-+ } else {
-+ ivi_layout_transition_visibility_off(ivisurf, ivisurf->pending.prop.transition_duration);
-+ }
-+
-+ ivisurf->prop = ivisurf->pending.prop;
-+ ivisurf->prop.dest_x = dest_x;
-+ ivisurf->prop.dest_y = dest_y;
-+ ivisurf->prop.dest_width = dest_width;
-+ ivisurf->prop.dest_height = dest_height;
-+ ivisurf->prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
-+ ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
-+
-+ } else if(ivisurf->pending.prop.transition_type == IVI_LAYOUT_TRANSITION_VIEW_DEST_RECT_ONLY){
-+ dest_x = ivisurf->prop.dest_x;
-+ dest_y = ivisurf->prop.dest_y;
-+ dest_width = ivisurf->prop.dest_width;
-+ dest_height = ivisurf->prop.dest_height;
-+
-+ ivi_layout_transition_move_resize_view(ivisurf,
-+ ivisurf->pending.prop.dest_x,
-+ ivisurf->pending.prop.dest_y,
-+ ivisurf->pending.prop.dest_width,
-+ ivisurf->pending.prop.dest_height,
-+ ivisurf->pending.prop.transition_duration);
-+
-+ ivisurf->prop = ivisurf->pending.prop;
-+ ivisurf->prop.dest_x = dest_x;
-+ ivisurf->prop.dest_y = dest_y;
-+ ivisurf->prop.dest_width = dest_width;
-+ ivisurf->prop.dest_height = dest_height;
-+
-+ ivisurf->prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
-+ ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
-+
-+ } else if(ivisurf->pending.prop.transition_type == IVI_LAYOUT_TRANSITION_VIEW_FADE_ONLY){
-+ configured = 0;
-+ if(ivisurf->pending.prop.visibility) {
-+ ivi_layout_transition_visibility_on(ivisurf, ivisurf->pending.prop.transition_duration);
-+ } else {
-+ ivi_layout_transition_visibility_off(ivisurf, ivisurf->pending.prop.transition_duration);
-+ }
-+
-+ if (ivisurf->prop.dest_width != ivisurf->pending.prop.dest_width ||
-+ ivisurf->prop.dest_height != ivisurf->pending.prop.dest_height) {
-+ configured = 1;
-+ }
-+
-+ ivisurf->prop = ivisurf->pending.prop;
-+ ivisurf->prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
-+ ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
-+
-+ if (configured && !is_surface_transition(ivisurf))
-+ wl_signal_emit(&ivisurf->configured, ivisurf);
-+ } else {
-+ configured = 0;
-+ if (ivisurf->prop.dest_width != ivisurf->pending.prop.dest_width ||
-+ ivisurf->prop.dest_height != ivisurf->pending.prop.dest_height) {
-+ configured = 1;
-+ }
-+
-+ ivisurf->prop = ivisurf->pending.prop;
-+ ivisurf->prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
-+ ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
-+
-+ if (configured && !is_surface_transition(ivisurf))
-+ wl_signal_emit(&ivisurf->configured, ivisurf);
-+ }
-+ }
-+}
-+
-+static void
-+commit_layer_list(struct ivi_layout *layout)
-+{
-+ struct ivi_layout_layer *ivilayer = NULL;
-+ struct ivi_layout_surface *ivisurf = NULL;
-+ struct ivi_layout_surface *next = NULL;
-+
-+ wl_list_for_each(ivilayer, &layout->layer_list, link) {
-+ if(ivilayer->pending.prop.transition_type == IVI_LAYOUT_TRANSITION_LAYER_MOVE) {
-+ ivi_layout_transition_move_layer(ivilayer, ivilayer->pending.prop.dest_x, ivilayer->pending.prop.dest_y, ivilayer->pending.prop.transition_duration);
-+ } else if(ivilayer->pending.prop.transition_type == IVI_LAYOUT_TRANSITION_LAYER_FADE) {
-+ ivi_layout_transition_fade_layer(ivilayer,ivilayer->pending.prop.is_fade_in,
-+ ivilayer->pending.prop.start_alpha,ivilayer->pending.prop.end_alpha,
-+ NULL, NULL,
-+ ivilayer->pending.prop.transition_duration);
-+ }
-+ ivilayer->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
-+
-+ ivilayer->prop = ivilayer->pending.prop;
-+
-+ if (!(ivilayer->event_mask &
-+ (IVI_NOTIFICATION_ADD | IVI_NOTIFICATION_REMOVE)) ) {
-+ continue;
-+ }
-+
-+ if (ivilayer->event_mask & IVI_NOTIFICATION_REMOVE) {
-+ wl_list_for_each_safe(ivisurf, next,
-+ &ivilayer->order.surface_list, order.link) {
-+ remove_ordersurface_from_layer(ivisurf);
-+
-+ if (!wl_list_empty(&ivisurf->order.link)) {
-+ wl_list_remove(&ivisurf->order.link);
-+ }
-+
-+ wl_list_init(&ivisurf->order.link);
-+ ivisurf->event_mask |= IVI_NOTIFICATION_REMOVE;
-+ }
-+
-+ wl_list_init(&ivilayer->order.surface_list);
-+ }
-+
-+ if (ivilayer->event_mask & IVI_NOTIFICATION_ADD) {
-+ wl_list_for_each_safe(ivisurf, next,
-+ &ivilayer->order.surface_list, order.link) {
-+ remove_ordersurface_from_layer(ivisurf);
-+
-+ if (!wl_list_empty(&ivisurf->order.link)) {
-+ wl_list_remove(&ivisurf->order.link);
-+ }
-+
-+ wl_list_init(&ivisurf->order.link);
-+ }
-+
-+ wl_list_init(&ivilayer->order.surface_list);
-+ wl_list_for_each(ivisurf, &ivilayer->pending.surface_list,
-+ pending.link) {
-+ if(!wl_list_empty(&ivisurf->order.link)){
-+ wl_list_remove(&ivisurf->order.link);
-+ wl_list_init(&ivisurf->order.link);
-+ }
-+
-+ wl_list_insert(&ivilayer->order.surface_list,
-+ &ivisurf->order.link);
-+ add_ordersurface_to_layer(ivisurf, ivilayer);
-+ ivisurf->event_mask |= IVI_NOTIFICATION_ADD;
-+ }
-+ }
-+ }
-+}
-+
-+static void
-+commit_screen_list(struct ivi_layout *layout)
-+{
-+ struct ivi_layout_screen *iviscrn = NULL;
-+ struct ivi_layout_layer *ivilayer = NULL;
-+ struct ivi_layout_layer *next = NULL;
-+ struct ivi_layout_surface *ivisurf = NULL;
-+
-+ wl_list_for_each(iviscrn, &layout->screen_list, link) {
-+ if (iviscrn->event_mask & IVI_NOTIFICATION_REMOVE) {
-+ wl_list_for_each_safe(ivilayer, next,
-+ &iviscrn->order.layer_list, order.link) {
-+ remove_orderlayer_from_screen(ivilayer);
-+
-+ if (!wl_list_empty(&ivilayer->order.link)) {
-+ wl_list_remove(&ivilayer->order.link);
-+ }
-+
-+ wl_list_init(&ivilayer->order.link);
-+ ivilayer->event_mask |= IVI_NOTIFICATION_REMOVE;
-+ }
-+ }
-+
-+ if (iviscrn->event_mask & IVI_NOTIFICATION_ADD) {
-+ wl_list_for_each_safe(ivilayer, next,
-+ &iviscrn->order.layer_list, order.link) {
-+ remove_orderlayer_from_screen(ivilayer);
-+
-+ if (!wl_list_empty(&ivilayer->order.link)) {
-+ wl_list_remove(&ivilayer->order.link);
-+ }
-+
-+ wl_list_init(&ivilayer->order.link);
-+ }
-+
-+ wl_list_init(&iviscrn->order.layer_list);
-+ wl_list_for_each(ivilayer, &iviscrn->pending.layer_list,
-+ pending.link) {
-+ wl_list_insert(&iviscrn->order.layer_list,
-+ &ivilayer->order.link);
-+ add_orderlayer_to_screen(ivilayer, iviscrn);
-+ ivilayer->event_mask |= IVI_NOTIFICATION_ADD;
-+ }
-+ }
-+
-+ iviscrn->event_mask = 0;
-+
-+ /* Clear view list of layout ivi_layer */
-+ wl_list_init(&layout->layout_layer.view_list.link);
-+
-+ wl_list_for_each(ivilayer, &iviscrn->order.layer_list, order.link) {
-+ if (ivilayer->prop.visibility == false)
-+ continue;
-+
-+ wl_list_for_each(ivisurf, &ivilayer->order.surface_list, order.link) {
-+ struct weston_view *tmpview = NULL;
-+ wl_list_for_each(tmpview, &ivisurf->surface->views, surface_link) {
-+ if (tmpview != NULL) {
-+ break;
-+ }
-+ }
-+
-+ if (ivisurf->prop.visibility == false)
-+ continue;
-+ if (ivisurf->surface == NULL || tmpview == NULL)
-+ continue;
-+
-+ weston_layer_entry_insert(&layout->layout_layer.view_list,
-+ &tmpview->layer_link);
-+
-+ ivisurf->surface->output = iviscrn->output;
-+ }
-+ }
-+
-+ break;
-+ }
-+}
-+
-+static void
-+commit_transition(struct ivi_layout* layout)
-+{
-+ if(wl_list_empty(&layout->pending_transition_list)){
-+ return;
-+ }
-+
-+ wl_list_insert_list(&layout->transitions->transition_list,
-+ &layout->pending_transition_list);
-+
-+ wl_list_init(&layout->pending_transition_list);
-+
-+ wl_event_source_timer_update(layout->transitions->event_source, 1);
-+}
-+
-+static void
-+send_surface_prop(struct ivi_layout_surface *ivisurf)
-+{
-+ wl_signal_emit(&ivisurf->property_changed, ivisurf);
-+ ivisurf->event_mask = 0;
-+}
-+
-+static void
-+send_layer_prop(struct ivi_layout_layer *ivilayer)
-+{
-+ wl_signal_emit(&ivilayer->property_changed, ivilayer);
-+ ivilayer->event_mask = 0;
-+}
-+
-+static void
-+send_prop(struct ivi_layout *layout)
-+{
-+ struct ivi_layout_layer *ivilayer = NULL;
-+ struct ivi_layout_surface *ivisurf = NULL;
-+
-+ wl_list_for_each_reverse(ivilayer, &layout->layer_list, link) {
-+ send_layer_prop(ivilayer);
-+ }
-+
-+ wl_list_for_each_reverse(ivisurf, &layout->surface_list, link) {
-+ send_surface_prop(ivisurf);
-+ }
-+}
-+
-+static void
-+clear_surface_pending_list(struct ivi_layout_layer *ivilayer)
-+{
-+ struct ivi_layout_surface *surface_link = NULL;
-+ struct ivi_layout_surface *surface_next = NULL;
-+
-+ wl_list_for_each_safe(surface_link, surface_next,
-+ &ivilayer->pending.surface_list, pending.link) {
-+ if (!wl_list_empty(&surface_link->pending.link)) {
-+ wl_list_remove(&surface_link->pending.link);
-+ }
-+
-+ wl_list_init(&surface_link->pending.link);
-+ }
-+
-+ ivilayer->event_mask |= IVI_NOTIFICATION_REMOVE;
-+}
-+
-+static void
-+clear_surface_order_list(struct ivi_layout_layer *ivilayer)
-+{
-+ struct ivi_layout_surface *surface_link = NULL;
-+ struct ivi_layout_surface *surface_next = NULL;
-+
-+ wl_list_for_each_safe(surface_link, surface_next,
-+ &ivilayer->order.surface_list, order.link) {
-+ if (!wl_list_empty(&surface_link->order.link)) {
-+ wl_list_remove(&surface_link->order.link);
-+ }
-+
-+ wl_list_init(&surface_link->order.link);
-+ }
-+
-+ ivilayer->event_mask |= IVI_NOTIFICATION_REMOVE;
-+}
-+
-+static void
-+layer_created(struct wl_listener *listener, void *data)
-+{
-+ struct ivi_layout_layer *ivilayer = data;
-+
-+ struct listener_layout_notification *notification =
-+ container_of(listener,
-+ struct listener_layout_notification,
-+ listener);
-+
-+ struct ivi_layout_notification_callback *created_callback =
-+ notification->userdata;
-+
-+ ((layer_create_notification_func)created_callback->callback)
-+ (ivilayer, created_callback->data);
-+}
-+
-+static void
-+layer_removed(struct wl_listener *listener, void *data)
-+{
-+ struct ivi_layout_layer *ivilayer = data;
-+
-+ struct listener_layout_notification *notification =
-+ container_of(listener,
-+ struct listener_layout_notification,
-+ listener);
-+
-+ struct ivi_layout_notification_callback *removed_callback =
-+ notification->userdata;
-+
-+ ((layer_remove_notification_func)removed_callback->callback)
-+ (ivilayer, removed_callback->data);
-+}
-+
-+static void
-+layer_prop_changed(struct wl_listener *listener, void *data)
-+{
-+ struct ivi_layout_layer *ivilayer = data;
-+
-+ struct listener_layout_notification *layout_listener =
-+ container_of(listener,
-+ struct listener_layout_notification,
-+ listener);
-+
-+ struct ivi_layout_notification_callback *prop_callback =
-+ layout_listener->userdata;
-+
-+ ((layer_property_notification_func)prop_callback->callback)
-+ (ivilayer, &ivilayer->prop, ivilayer->event_mask, prop_callback->data);
-+}
-+
-+static void
-+surface_created(struct wl_listener *listener, void *data)
-+{
-+ struct ivi_layout_surface *ivisurface = data;
-+
-+ struct listener_layout_notification *notification =
-+ container_of(listener,
-+ struct listener_layout_notification,
-+ listener);
-+
-+ struct ivi_layout_notification_callback *created_callback =
-+ notification->userdata;
-+
-+ ((surface_create_notification_func)created_callback->callback)
-+ (ivisurface, created_callback->data);
-+}
-+
-+static void
-+surface_removed(struct wl_listener *listener, void *data)
-+{
-+ struct ivi_layout_surface *ivisurface = data;
-+
-+ struct listener_layout_notification *notification =
-+ container_of(listener,
-+ struct listener_layout_notification,
-+ listener);
-+
-+ struct ivi_layout_notification_callback *removed_callback =
-+ notification->userdata;
-+
-+ ((surface_remove_notification_func)removed_callback->callback)
-+ (ivisurface, removed_callback->data);
-+}
-+
-+static void
-+surface_prop_changed(struct wl_listener *listener, void *data)
-+{
-+ struct ivi_layout_surface *ivisurf = data;
-+
-+ struct listener_layout_notification *layout_listener =
-+ container_of(listener,
-+ struct listener_layout_notification,
-+ listener);
-+
-+ struct ivi_layout_notification_callback *prop_callback =
-+ layout_listener->userdata;
-+
-+ ((surface_property_notification_func)prop_callback->callback)
-+ (ivisurf, &ivisurf->prop, ivisurf->event_mask, prop_callback->data);
-+
-+ ivisurf->event_mask = 0;
-+}
-+
-+static void
-+surface_configure_changed(struct wl_listener *listener,
-+ void *data)
-+{
-+ struct ivi_layout_surface *ivisurface = data;
-+
-+ struct listener_layout_notification *notification =
-+ container_of(listener,
-+ struct listener_layout_notification,
-+ listener);
-+
-+ struct ivi_layout_notification_callback *configure_changed_callback =
-+ notification->userdata;
-+
-+ ((surface_configure_notification_func)configure_changed_callback->callback)
-+ (ivisurface, configure_changed_callback->data);
-+}
-+
-+static int32_t
-+add_notification(struct wl_signal *signal,
-+ wl_notify_func_t callback,
-+ void *userdata)
-+{
-+ struct listener_layout_notification *notification = NULL;
-+
-+ notification = malloc(sizeof *notification);
-+ if (notification == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ free(userdata);
-+ return IVI_FAILED;
-+ }
-+
-+ notification->listener.notify = callback;
-+ notification->userdata = userdata;
-+
-+ wl_signal_add(signal, &notification->listener);
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+static void
-+remove_notification(struct wl_list *listener_list, void *callback, void *userdata)
-+{
-+ struct wl_listener *listener = NULL;
-+ struct wl_listener *next = NULL;
-+
-+ wl_list_for_each_safe(listener, next, listener_list, link) {
-+ struct listener_layout_notification *notification =
-+ container_of(listener,
-+ struct listener_layout_notification,
-+ listener);
-+
-+ struct ivi_layout_notification_callback *notification_callback =
-+ notification->userdata;
-+
-+ if ((notification_callback->callback != callback) ||
-+ (notification_callback->data != userdata)) {
-+ continue;
-+ }
-+
-+ if (!wl_list_empty(&listener->link)) {
-+ wl_list_remove(&listener->link);
-+ }
-+
-+ free(notification->userdata);
-+ free(notification);
-+ }
-+}
-+
-+static void
-+remove_all_notification(struct wl_list *listener_list)
-+{
-+ struct wl_listener *listener = NULL;
-+ struct wl_listener *next = NULL;
-+
-+ wl_list_for_each_safe(listener, next, listener_list, link) {
-+ struct listener_layout_notification *notification = NULL;
-+ if (!wl_list_empty(&listener->link)) {
-+ wl_list_remove(&listener->link);
-+ }
-+
-+ notification =
-+ container_of(listener,
-+ struct listener_layout_notification,
-+ listener);
-+
-+ free(notification->userdata);
-+ free(notification);
-+ }
-+}
-+
-+/**
-+ * Exported APIs of ivi-layout library are implemented from here.
-+ * Brief of APIs is described in ivi-layout-export.h.
-+ */
-+WL_EXPORT int32_t
-+ivi_layout_add_notification_create_layer(layer_create_notification_func callback,
-+ void *userdata)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_notification_callback *created_callback = NULL;
-+
-+ if (callback == NULL) {
-+ weston_log("ivi_layout_add_notification_create_layer: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ created_callback = malloc(sizeof *created_callback);
-+ if (created_callback == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return IVI_FAILED;
-+ }
-+
-+ created_callback->callback = callback;
-+ created_callback->data = userdata;
-+
-+ return add_notification(&layout->layer_notification.created,
-+ layer_created,
-+ created_callback);
-+}
-+
-+WL_EXPORT void
-+ivi_layout_remove_notification_create_layer(layer_create_notification_func callback,
-+ void *userdata)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ remove_notification(&layout->layer_notification.created.listener_list, callback, userdata);
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_add_notification_remove_layer(layer_remove_notification_func callback,
-+ void *userdata)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_notification_callback *removed_callback = NULL;
-+
-+ if (callback == NULL) {
-+ weston_log("ivi_layout_add_notification_remove_layer: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ removed_callback = malloc(sizeof *removed_callback);
-+ if (removed_callback == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return IVI_FAILED;
-+ }
-+
-+ removed_callback->callback = callback;
-+ removed_callback->data = userdata;
-+ return add_notification(&layout->layer_notification.removed,
-+ layer_removed,
-+ removed_callback);
-+}
-+
-+WL_EXPORT void
-+ivi_layout_remove_notification_remove_layer(layer_remove_notification_func callback,
-+ void *userdata)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ remove_notification(&layout->layer_notification.removed.listener_list, callback, userdata);
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_add_notification_create_surface(surface_create_notification_func callback,
-+ void *userdata)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_notification_callback *created_callback = NULL;
-+
-+ if (callback == NULL) {
-+ weston_log("ivi_layout_add_notification_create_surface: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ created_callback = malloc(sizeof *created_callback);
-+ if (created_callback == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return IVI_FAILED;
-+ }
-+
-+ created_callback->callback = callback;
-+ created_callback->data = userdata;
-+
-+ return add_notification(&layout->surface_notification.created,
-+ surface_created,
-+ created_callback);
-+}
-+
-+WL_EXPORT void
-+ivi_layout_remove_notification_create_surface(surface_create_notification_func callback,
-+ void *userdata)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ remove_notification(&layout->surface_notification.created.listener_list, callback, userdata);
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_add_notification_remove_surface(surface_remove_notification_func callback,
-+ void *userdata)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_notification_callback *removed_callback = NULL;
-+
-+ if (callback == NULL) {
-+ weston_log("ivi_layout_add_notification_remove_surface: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ removed_callback = malloc(sizeof *removed_callback);
-+ if (removed_callback == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return IVI_FAILED;
-+ }
-+
-+ removed_callback->callback = callback;
-+ removed_callback->data = userdata;
-+
-+ return add_notification(&layout->surface_notification.removed,
-+ surface_removed,
-+ removed_callback);
-+}
-+
-+WL_EXPORT void
-+ivi_layout_remove_notification_remove_surface(surface_remove_notification_func callback,
-+ void *userdata)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ remove_notification(&layout->surface_notification.removed.listener_list, callback, userdata);
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_add_notification_configure_surface(surface_configure_notification_func callback,
-+ void *userdata)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_notification_callback *configure_changed_callback = NULL;
-+ if (callback == NULL) {
-+ weston_log("ivi_layout_add_notification_configure_surface: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ configure_changed_callback = malloc(sizeof *configure_changed_callback);
-+ if (configure_changed_callback == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return IVI_FAILED;
-+ }
-+
-+ configure_changed_callback->callback = callback;
-+ configure_changed_callback->data = userdata;
-+
-+ return add_notification(&layout->surface_notification.configure_changed,
-+ surface_configure_changed,
-+ configure_changed_callback);
-+}
-+
-+WL_EXPORT void
-+ivi_layout_remove_notification_configure_surface(surface_configure_notification_func callback,
-+ void *userdata)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ remove_notification(&layout->surface_notification.configure_changed.listener_list, callback, userdata);
-+}
-+
-+WL_EXPORT uint32_t
-+ivi_layout_get_id_of_surface(struct ivi_layout_surface *ivisurf)
-+{
-+ return ivisurf->id_surface;
-+}
-+
-+WL_EXPORT uint32_t
-+ivi_layout_get_id_of_layer(struct ivi_layout_layer *ivilayer)
-+{
-+ return ivilayer->id_layer;
-+}
-+
-+struct ivi_layout_layer *
-+ivi_layout_get_layer_from_id(uint32_t id_layer)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_layer *ivilayer = NULL;
-+
-+ wl_list_for_each(ivilayer, &layout->layer_list, link) {
-+ if (ivilayer->id_layer == id_layer) {
-+ return ivilayer;
-+ }
-+ }
-+
-+ return NULL;
-+}
-+
-+WL_EXPORT struct ivi_layout_surface *
-+ivi_layout_get_surface_from_id(uint32_t id_surface)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_surface *ivisurf = NULL;
-+
-+ wl_list_for_each(ivisurf, &layout->surface_list, link) {
-+ if (ivisurf->id_surface == id_surface) {
-+ return ivisurf;
-+ }
-+ }
-+
-+ return NULL;
-+}
-+
-+WL_EXPORT struct ivi_layout_screen *
-+ivi_layout_get_screen_from_id(uint32_t id_screen)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_screen *iviscrn = NULL;
-+
-+ wl_list_for_each(iviscrn, &layout->screen_list, link) {
-+//FIXME : select iviscrn from screen_list by id_screen
-+ return iviscrn;
-+ break;
-+ }
-+
-+ return NULL;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_get_screen_resolution(struct ivi_layout_screen *iviscrn,
-+ int32_t *pWidth, int32_t *pHeight)
-+{
-+ struct weston_output *output = NULL;
-+
-+ if (pWidth == NULL || pHeight == NULL) {
-+ weston_log("ivi_layout_get_screen_resolution: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ output = iviscrn->output;
-+ *pWidth = output->current_mode->width;
-+ *pHeight = output->current_mode->height;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_surface_add_notification(struct ivi_layout_surface *ivisurf,
-+ surface_property_notification_func callback,
-+ void *userdata)
-+{
-+ struct listener_layout_notification* notification = NULL;
-+ struct ivi_layout_notification_callback *prop_callback = NULL;
-+
-+ if (ivisurf == NULL || callback == NULL) {
-+ weston_log("ivi_layout_surface_add_notification: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ notification = malloc(sizeof *notification);
-+ if (notification == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop_callback = malloc(sizeof *prop_callback);
-+ if (prop_callback == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop_callback->callback = callback;
-+ prop_callback->data = userdata;
-+
-+ notification->listener.notify = surface_prop_changed;
-+ notification->userdata = prop_callback;
-+
-+ wl_signal_add(&ivisurf->property_changed, &notification->listener);
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT void
-+ivi_layout_surface_remove_notification(struct ivi_layout_surface *ivisurf)
-+{
-+ if (ivisurf == NULL) {
-+ weston_log("ivi_layout_surface_remove_notification: invalid argument\n");
-+ return;
-+ }
-+
-+ remove_all_notification(&ivisurf->property_changed.listener_list);
-+}
-+
-+static void
-+remove_configured_listener(struct ivi_layout_surface *ivisurf)
-+{
-+ struct wl_listener *link = NULL;
-+ struct wl_listener *next = NULL;
-+
-+ wl_list_for_each_safe(link, next, &ivisurf->configured.listener_list, link) {
-+ wl_list_remove(&link->link);
-+ }
-+}
-+
-+void
-+ivi_layout_surface_remove(struct ivi_layout_surface *ivisurf)
-+{
-+ struct ivi_layout *layout = get_instance();
-+
-+ if (ivisurf == NULL) {
-+ weston_log("ivi_layout_surface_remove: invalid argument\n");
-+ return;
-+ }
-+
-+ if (!wl_list_empty(&ivisurf->pending.link)) {
-+ wl_list_remove(&ivisurf->pending.link);
-+ }
-+ if (!wl_list_empty(&ivisurf->order.link)) {
-+ wl_list_remove(&ivisurf->order.link);
-+ }
-+ if (!wl_list_empty(&ivisurf->link)) {
-+ wl_list_remove(&ivisurf->link);
-+ }
-+ remove_ordersurface_from_layer(ivisurf);
-+
-+ wl_signal_emit(&layout->surface_notification.removed, ivisurf);
-+
-+ remove_configured_listener(ivisurf);
-+
-+ ivi_layout_surface_remove_notification(ivisurf);
-+
-+ free(ivisurf);
-+}
-+
-+WL_EXPORT const struct ivi_layout_layer_properties *
-+ivi_layout_get_properties_of_layer(struct ivi_layout_layer *ivilayer)
-+{
-+ if (ivilayer == NULL) {
-+ weston_log("ivi_layout_get_properties_of_layer: invalid argument\n");
-+ return NULL;
-+ }
-+
-+ return &ivilayer->prop;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_get_screens(int32_t *pLength, struct ivi_layout_screen ***ppArray)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_screen *iviscrn = NULL;
-+ int32_t length = 0;
-+ int32_t n = 0;
-+
-+ if (pLength == NULL || ppArray == NULL) {
-+ weston_log("ivi_layout_get_screens: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ length = wl_list_length(&layout->screen_list);
-+
-+ if (length != 0){
-+ /* the Array must be free by module which called this function */
-+ *ppArray = calloc(length, sizeof(struct ivi_layout_screen *));
-+ if (*ppArray == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return IVI_FAILED;
-+ }
-+
-+ wl_list_for_each(iviscrn, &layout->screen_list, link) {
-+ (*ppArray)[n++] = iviscrn;
-+ }
-+ }
-+
-+ *pLength = length;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_get_screens_under_layer(struct ivi_layout_layer *ivilayer,
-+ int32_t *pLength,
-+ struct ivi_layout_screen ***ppArray)
-+{
-+ struct link_screen *link_scrn = NULL;
-+ int32_t length = 0;
-+ int32_t n = 0;
-+
-+ if (ivilayer == NULL || pLength == NULL || ppArray == NULL) {
-+ weston_log("ivi_layout_get_screens_under_layer: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ length = wl_list_length(&ivilayer->screen_list);
-+
-+ if (length != 0){
-+ /* the Array must be free by module which called this function */
-+ *ppArray = calloc(length, sizeof(struct ivi_layout_screen *));
-+ if (*ppArray == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return IVI_FAILED;
-+ }
-+
-+ wl_list_for_each(link_scrn, &ivilayer->screen_list, link) {
-+ (*ppArray)[n++] = link_scrn->iviscrn;
-+ }
-+ }
-+
-+ *pLength = length;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_get_layers(int32_t *pLength, struct ivi_layout_layer ***ppArray)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_layer *ivilayer = NULL;
-+ int32_t length = 0;
-+ int32_t n = 0;
-+
-+ if (pLength == NULL || ppArray == NULL) {
-+ weston_log("ivi_layout_get_layers: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ length = wl_list_length(&layout->layer_list);
-+
-+ if (length != 0){
-+ /* the Array must be free by module which called this function */
-+ *ppArray = calloc(length, sizeof(struct ivi_layout_layer *));
-+ if (*ppArray == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return IVI_FAILED;
-+ }
-+
-+ wl_list_for_each(ivilayer, &layout->layer_list, link) {
-+ (*ppArray)[n++] = ivilayer;
-+ }
-+ }
-+
-+ *pLength = length;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+int32_t
-+ivi_layout_get_layers_on_screen(struct ivi_layout_screen *iviscrn,
-+ int32_t *pLength,
-+ struct ivi_layout_layer ***ppArray)
-+{
-+ struct ivi_layout_layer *ivilayer = NULL;
-+ int32_t length = 0;
-+ int32_t n = 0;
-+
-+ if (iviscrn == NULL || pLength == NULL || ppArray == NULL) {
-+ weston_log("ivi_layout_get_layers_on_screen: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ length = wl_list_length(&iviscrn->order.layer_list);
-+
-+ if (length != 0){
-+ /* the Array must be free by module which called this function */
-+ *ppArray = calloc(length, sizeof(struct ivi_layout_layer *));
-+ if (*ppArray == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return IVI_FAILED;
-+ }
-+
-+ wl_list_for_each(ivilayer, &iviscrn->order.layer_list, link) {
-+ (*ppArray)[n++] = ivilayer;
-+ }
-+ }
-+
-+ *pLength = length;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_get_layers_under_surface(struct ivi_layout_surface *ivisurf,
-+ int32_t *pLength,
-+ struct ivi_layout_layer ***ppArray)
-+{
-+ struct link_layer *link_layer = NULL;
-+ int32_t length = 0;
-+ int32_t n = 0;
-+
-+ if (ivisurf == NULL || pLength == NULL || ppArray == NULL) {
-+ weston_log("ivi_layout_getLayers: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ length = wl_list_length(&ivisurf->layer_list);
-+
-+ if (length != 0){
-+ /* the Array must be free by module which called this function */
-+ *ppArray = calloc(length, sizeof(struct ivi_layout_layer *));
-+ if (*ppArray == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return IVI_FAILED;
-+ }
-+
-+ wl_list_for_each(link_layer, &ivisurf->layer_list, link) {
-+ (*ppArray)[n++] = link_layer->ivilayer;
-+ }
-+ }
-+
-+ *pLength = length;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_get_surfaces(int32_t *pLength, struct ivi_layout_surface ***ppArray)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_surface *ivisurf = NULL;
-+ int32_t length = 0;
-+ int32_t n = 0;
-+
-+ if (pLength == NULL || ppArray == NULL) {
-+ weston_log("ivi_layout_get_surfaces: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ length = wl_list_length(&layout->surface_list);
-+
-+ if (length != 0){
-+ /* the Array must be free by module which called this function */
-+ *ppArray = calloc(length, sizeof(struct ivi_layout_surface *));
-+ if (*ppArray == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return IVI_FAILED;
-+ }
-+
-+ wl_list_for_each(ivisurf, &layout->surface_list, link) {
-+ (*ppArray)[n++] = ivisurf;
-+ }
-+ }
-+
-+ *pLength = length;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+int32_t
-+ivi_layout_get_surfaces_on_layer(struct ivi_layout_layer *ivilayer,
-+ int32_t *pLength,
-+ struct ivi_layout_surface ***ppArray)
-+{
-+ struct ivi_layout_surface *ivisurf = NULL;
-+ int32_t length = 0;
-+ int32_t n = 0;
-+
-+ if (ivilayer == NULL || pLength == NULL || ppArray == NULL) {
-+ weston_log("ivi_layout_getSurfaceIDsOnLayer: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ length = wl_list_length(&ivilayer->order.surface_list);
-+
-+ if (length != 0) {
-+ /* the Array must be free by module which called this function */
-+ *ppArray = calloc(length, sizeof(struct ivi_layout_surface *));
-+ if (*ppArray == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return IVI_FAILED;
-+ }
-+
-+ wl_list_for_each(ivisurf, &ivilayer->order.surface_list, order.link) {
-+ (*ppArray)[n++] = ivisurf;
-+ }
-+ }
-+
-+ *pLength = length;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT struct ivi_layout_layer *
-+ivi_layout_layer_create_with_dimension(uint32_t id_layer,
-+ int32_t width, int32_t height)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_layer *ivilayer = NULL;
-+
-+ ivilayer = get_layer(&layout->layer_list, id_layer);
-+ if (ivilayer != NULL) {
-+ weston_log("id_layer is already created\n");
-+ return ivilayer;
-+ }
-+
-+ ivilayer = calloc(1, sizeof *ivilayer);
-+ if (ivilayer == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return NULL;
-+ }
-+
-+ wl_list_init(&ivilayer->link);
-+ wl_signal_init(&ivilayer->property_changed);
-+ wl_list_init(&ivilayer->screen_list);
-+ wl_list_init(&ivilayer->link_to_surface);
-+ ivilayer->layout = layout;
-+ ivilayer->id_layer = id_layer;
-+
-+ init_layer_properties(&ivilayer->prop, width, height);
-+ ivilayer->event_mask = 0;
-+
-+ wl_list_init(&ivilayer->pending.surface_list);
-+ wl_list_init(&ivilayer->pending.link);
-+ ivilayer->pending.prop = ivilayer->prop;
-+
-+ wl_list_init(&ivilayer->order.surface_list);
-+ wl_list_init(&ivilayer->order.link);
-+
-+ wl_list_insert(&layout->layer_list, &ivilayer->link);
-+
-+ wl_signal_emit(&layout->layer_notification.created, ivilayer);
-+
-+ return ivilayer;
-+}
-+
-+WL_EXPORT void
-+ivi_layout_layer_remove(struct ivi_layout_layer *ivilayer)
-+{
-+ struct ivi_layout *layout = get_instance();
-+
-+ if (ivilayer == NULL) {
-+ weston_log("ivi_layout_layer_remove: invalid argument\n");
-+ return;
-+ }
-+
-+ wl_signal_emit(&layout->layer_notification.removed, ivilayer);
-+
-+ clear_surface_pending_list(ivilayer);
-+ clear_surface_order_list(ivilayer);
-+
-+ if (!wl_list_empty(&ivilayer->pending.link)) {
-+ wl_list_remove(&ivilayer->pending.link);
-+ }
-+ if (!wl_list_empty(&ivilayer->order.link)) {
-+ wl_list_remove(&ivilayer->order.link);
-+ }
-+ if (!wl_list_empty(&ivilayer->link)) {
-+ wl_list_remove(&ivilayer->link);
-+ }
-+ remove_orderlayer_from_screen(ivilayer);
-+ remove_link_to_surface(ivilayer);
-+ ivi_layout_layer_remove_notification(ivilayer);
-+
-+ free(ivilayer);
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_layer_set_visibility(struct ivi_layout_layer *ivilayer,
-+ bool newVisibility)
-+{
-+ struct ivi_layout_layer_properties *prop = NULL;
-+
-+ if (ivilayer == NULL) {
-+ weston_log("ivi_layout_layer_set_visibility: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop = &ivilayer->pending.prop;
-+ prop->visibility = newVisibility;
-+
-+ ivilayer->event_mask |= IVI_NOTIFICATION_VISIBILITY;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+bool
-+ivi_layout_layer_get_visibility(struct ivi_layout_layer *ivilayer)
-+{
-+ if (ivilayer == NULL) {
-+ weston_log("ivi_layout_layer_get_visibility: invalid argument\n");
-+ return false;
-+ }
-+
-+ return ivilayer->prop.visibility;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_layer_set_opacity(struct ivi_layout_layer *ivilayer,
-+ wl_fixed_t opacity)
-+{
-+ struct ivi_layout_layer_properties *prop = NULL;
-+
-+ if (ivilayer == NULL) {
-+ weston_log("ivi_layout_layer_set_opacity: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop = &ivilayer->pending.prop;
-+ prop->opacity = opacity;
-+
-+ ivilayer->event_mask |= IVI_NOTIFICATION_OPACITY;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT wl_fixed_t
-+ivi_layout_layer_get_opacity(struct ivi_layout_layer *ivilayer)
-+{
-+ if (ivilayer == NULL) {
-+ weston_log("ivi_layout_layer_get_opacity: invalid argument\n");
-+ return wl_fixed_from_double(0.0);
-+ }
-+
-+ return ivilayer->prop.opacity;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_layer_set_source_rectangle(struct ivi_layout_layer *ivilayer,
-+ int32_t x, int32_t y,
-+ int32_t width, int32_t height)
-+{
-+ struct ivi_layout_layer_properties *prop = NULL;
-+
-+ if (ivilayer == NULL) {
-+ weston_log("ivi_layout_layer_set_source_rectangle: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop = &ivilayer->pending.prop;
-+ prop->source_x = x;
-+ prop->source_y = y;
-+ prop->source_width = width;
-+ prop->source_height = height;
-+
-+ ivilayer->event_mask |= IVI_NOTIFICATION_SOURCE_RECT;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_layer_set_destination_rectangle(struct ivi_layout_layer *ivilayer,
-+ int32_t x, int32_t y,
-+ int32_t width, int32_t height)
-+{
-+ struct ivi_layout_layer_properties *prop = NULL;
-+
-+ if (ivilayer == NULL) {
-+ weston_log("ivi_layout_layer_set_destination_rectangle: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop = &ivilayer->pending.prop;
-+ prop->dest_x = x;
-+ prop->dest_y = y;
-+ prop->dest_width = width;
-+ prop->dest_height = height;
-+
-+ ivilayer->event_mask |= IVI_NOTIFICATION_DEST_RECT;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+int32_t
-+ivi_layout_layer_get_dimension(struct ivi_layout_layer *ivilayer,
-+ int32_t *dest_width, int32_t *dest_height)
-+{
-+ if (ivilayer == NULL || dest_width == NULL || dest_height == NULL) {
-+ weston_log("ivi_layout_layer_get_dimension: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ *dest_width = ivilayer->prop.dest_width;
-+ *dest_height = ivilayer->prop.dest_height;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+int32_t
-+ivi_layout_layer_set_dimension(struct ivi_layout_layer *ivilayer,
-+ int32_t dest_width, int32_t dest_height)
-+{
-+ struct ivi_layout_layer_properties *prop = NULL;
-+
-+ if (ivilayer == NULL) {
-+ weston_log("ivi_layout_layer_set_dimension: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop = &ivilayer->pending.prop;
-+
-+ prop->dest_width = dest_width;
-+ prop->dest_height = dest_height;
-+
-+ ivilayer->event_mask |= IVI_NOTIFICATION_DIMENSION;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_layer_get_position(struct ivi_layout_layer *ivilayer,
-+ int32_t *dest_x, int32_t *dest_y)
-+{
-+ if (ivilayer == NULL || dest_x == NULL || dest_y == NULL) {
-+ weston_log("ivi_layout_layer_get_position: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ *dest_x = ivilayer->prop.dest_x;
-+ *dest_y = ivilayer->prop.dest_y;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_layer_set_position(struct ivi_layout_layer *ivilayer,
-+ int32_t dest_x, int32_t dest_y)
-+{
-+ struct ivi_layout_layer_properties *prop = NULL;
-+
-+ if (ivilayer == NULL) {
-+ weston_log("ivi_layout_layer_set_position: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop = &ivilayer->pending.prop;
-+ prop->dest_x = dest_x;
-+ prop->dest_y = dest_y;
-+
-+ ivilayer->event_mask |= IVI_NOTIFICATION_POSITION;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_layer_set_orientation(struct ivi_layout_layer *ivilayer,
-+ enum wl_output_transform orientation)
-+{
-+ struct ivi_layout_layer_properties *prop = NULL;
-+
-+ if (ivilayer == NULL) {
-+ weston_log("ivi_layout_layer_set_orientation: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop = &ivilayer->pending.prop;
-+ prop->orientation = orientation;
-+
-+ ivilayer->event_mask |= IVI_NOTIFICATION_ORIENTATION;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+enum wl_output_transform
-+ivi_layout_layer_get_orientation(struct ivi_layout_layer *ivilayer)
-+{
-+ if (ivilayer == NULL) {
-+ weston_log("ivi_layout_layer_get_orientation: invalid argument\n");
-+ return 0;
-+ }
-+
-+ return ivilayer->prop.orientation;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_layer_set_render_order(struct ivi_layout_layer *ivilayer,
-+ struct ivi_layout_surface **pSurface,
-+ int32_t number)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_surface *ivisurf = NULL;
-+ struct ivi_layout_surface *next = NULL;
-+ uint32_t *id_surface = NULL;
-+ int32_t i = 0;
-+
-+ if (ivilayer == NULL) {
-+ weston_log("ivi_layout_layer_set_render_order: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ if (pSurface == NULL) {
-+ wl_list_for_each_safe(ivisurf, next, &ivilayer->pending.surface_list, pending.link) {
-+ if (!wl_list_empty(&ivisurf->pending.link)) {
-+ wl_list_remove(&ivisurf->pending.link);
-+ }
-+
-+ wl_list_init(&ivisurf->pending.link);
-+ }
-+ ivilayer->event_mask |= IVI_NOTIFICATION_REMOVE;
-+ return IVI_SUCCEEDED;
-+ }
-+
-+ for (i = 0; i < number; i++) {
-+ id_surface = &pSurface[i]->id_surface;
-+
-+ wl_list_for_each_safe(ivisurf, next, &layout->surface_list, link) {
-+ if (*id_surface != ivisurf->id_surface) {
-+ continue;
-+ }
-+
-+ if (!wl_list_empty(&ivisurf->pending.link)) {
-+ wl_list_remove(&ivisurf->pending.link);
-+ }
-+ wl_list_init(&ivisurf->pending.link);
-+ wl_list_insert(&ivilayer->pending.surface_list,
-+ &ivisurf->pending.link);
-+ break;
-+ }
-+ }
-+
-+ ivilayer->event_mask |= IVI_NOTIFICATION_ADD;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_surface_set_visibility(struct ivi_layout_surface *ivisurf,
-+ bool newVisibility)
-+{
-+ struct ivi_layout_surface_properties *prop = NULL;
-+
-+ if (ivisurf == NULL) {
-+ weston_log("ivi_layout_surface_set_visibility: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop = &ivisurf->pending.prop;
-+ prop->visibility = newVisibility;
-+
-+ ivisurf->event_mask |= IVI_NOTIFICATION_VISIBILITY;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT bool
-+ivi_layout_surface_get_visibility(struct ivi_layout_surface *ivisurf)
-+{
-+ if (ivisurf == NULL) {
-+ weston_log("ivi_layout_surface_get_visibility: invalid argument\n");
-+ return false;
-+ }
-+
-+ return ivisurf->prop.visibility;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_surface_set_opacity(struct ivi_layout_surface *ivisurf,
-+ wl_fixed_t opacity)
-+{
-+ struct ivi_layout_surface_properties *prop = NULL;
-+
-+ if (ivisurf == NULL) {
-+ weston_log("ivi_layout_surface_set_opacity: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop = &ivisurf->pending.prop;
-+ prop->opacity = opacity;
-+
-+ ivisurf->event_mask |= IVI_NOTIFICATION_OPACITY;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT wl_fixed_t
-+ivi_layout_surface_get_opacity(struct ivi_layout_surface *ivisurf)
-+{
-+ if (ivisurf == NULL) {
-+ weston_log("ivi_layout_surface_get_opacity: invalid argument\n");
-+ return wl_fixed_from_double(0.0);
-+ }
-+
-+ return ivisurf->prop.opacity;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_surface_set_destination_rectangle(struct ivi_layout_surface *ivisurf,
-+ int32_t x, int32_t y,
-+ int32_t width, int32_t height)
-+{
-+ struct ivi_layout_surface_properties *prop = NULL;
-+
-+ if (ivisurf == NULL) {
-+ weston_log("ivi_layout_surface_set_destination_rectangle: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop = &ivisurf->pending.prop;
-+ prop->start_x = prop->dest_x;
-+ prop->start_y = prop->dest_y;
-+ prop->dest_x = x;
-+ prop->dest_y = y;
-+ prop->start_width = prop->dest_width;
-+ prop->start_height = prop->dest_height;
-+ prop->dest_width = width;
-+ prop->dest_height = height;
-+
-+ ivisurf->event_mask |= IVI_NOTIFICATION_DEST_RECT;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+int32_t
-+ivi_layout_surface_set_dimension(struct ivi_layout_surface *ivisurf,
-+ int32_t dest_width, int32_t dest_height)
-+{
-+ struct ivi_layout_surface_properties *prop = NULL;
-+
-+ if (ivisurf == NULL) {
-+ weston_log("ivi_layout_surface_set_dimension: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop = &ivisurf->pending.prop;
-+ prop->dest_width = dest_width;
-+ prop->dest_height = dest_height;
-+
-+ ivisurf->event_mask |= IVI_NOTIFICATION_DIMENSION;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+int32_t
-+ivi_layout_surface_get_dimension(struct ivi_layout_surface *ivisurf,
-+ int32_t *dest_width, int32_t *dest_height)
-+{
-+ if (ivisurf == NULL || dest_width == NULL || dest_height == NULL) {
-+ weston_log("ivi_layout_surface_get_dimension: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ *dest_width = ivisurf->prop.dest_width;
-+ *dest_height = ivisurf->prop.dest_height;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+int32_t
-+ivi_layout_surface_set_position(struct ivi_layout_surface *ivisurf,
-+ int32_t dest_x, int32_t dest_y)
-+{
-+ struct ivi_layout_surface_properties *prop = NULL;
-+
-+ if (ivisurf == NULL) {
-+ weston_log("ivi_layout_surface_set_position: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop = &ivisurf->pending.prop;
-+ prop->dest_x = dest_x;
-+ prop->dest_y = dest_y;
-+
-+ ivisurf->event_mask |= IVI_NOTIFICATION_POSITION;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+int32_t
-+ivi_layout_surface_get_position(struct ivi_layout_surface *ivisurf,
-+ int32_t *dest_x, int32_t *dest_y)
-+{
-+ if (ivisurf == NULL || dest_x == NULL || dest_y == NULL) {
-+ weston_log("ivi_layout_surface_get_position: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ *dest_x = ivisurf->prop.dest_x;
-+ *dest_y = ivisurf->prop.dest_y;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_surface_set_orientation(struct ivi_layout_surface *ivisurf,
-+ enum wl_output_transform orientation)
-+{
-+ struct ivi_layout_surface_properties *prop = NULL;
-+
-+ if (ivisurf == NULL) {
-+ weston_log("ivi_layout_surface_set_orientation: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop = &ivisurf->pending.prop;
-+ prop->orientation = orientation;
-+
-+ ivisurf->event_mask |= IVI_NOTIFICATION_ORIENTATION;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+enum wl_output_transform
-+ivi_layout_surface_get_orientation(struct ivi_layout_surface *ivisurf)
-+{
-+ if (ivisurf == NULL) {
-+ weston_log("ivi_layout_surface_get_orientation: invalid argument\n");
-+ return 0;
-+ }
-+
-+ return ivisurf->prop.orientation;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_screen_add_layer(struct ivi_layout_screen *iviscrn,
-+ struct ivi_layout_layer *addlayer)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_layer *ivilayer = NULL;
-+ struct ivi_layout_layer *next = NULL;
-+ int is_layer_in_scrn = 0;
-+
-+ if (iviscrn == NULL || addlayer == NULL) {
-+ weston_log("ivi_layout_screen_add_layer: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ is_layer_in_scrn = is_layer_in_screen(addlayer, iviscrn);
-+ if (is_layer_in_scrn == 1) {
-+ weston_log("ivi_layout_screen_add_layer: addlayer is already available\n");
-+ return IVI_SUCCEEDED;
-+ }
-+
-+ wl_list_for_each_safe(ivilayer, next, &layout->layer_list, link) {
-+ if (ivilayer->id_layer == addlayer->id_layer) {
-+ if (!wl_list_empty(&ivilayer->pending.link)) {
-+ wl_list_remove(&ivilayer->pending.link);
-+ }
-+ wl_list_init(&ivilayer->pending.link);
-+ wl_list_insert(&iviscrn->pending.layer_list,
-+ &ivilayer->pending.link);
-+ break;
-+ }
-+ }
-+
-+ iviscrn->event_mask |= IVI_NOTIFICATION_ADD;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_screen_set_render_order(struct ivi_layout_screen *iviscrn,
-+ struct ivi_layout_layer **pLayer,
-+ const int32_t number)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_layer *ivilayer = NULL;
-+ struct ivi_layout_layer *next = NULL;
-+ uint32_t *id_layer = NULL;
-+ int32_t i = 0;
-+
-+ if (iviscrn == NULL) {
-+ weston_log("ivi_layout_screen_set_render_order: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ wl_list_for_each_safe(ivilayer, next,
-+ &iviscrn->pending.layer_list, pending.link) {
-+ wl_list_init(&ivilayer->pending.link);
-+ }
-+
-+ wl_list_init(&iviscrn->pending.layer_list);
-+
-+ if (pLayer == NULL) {
-+ wl_list_for_each_safe(ivilayer, next, &iviscrn->pending.layer_list, pending.link) {
-+ if (!wl_list_empty(&ivilayer->pending.link)) {
-+ wl_list_remove(&ivilayer->pending.link);
-+ }
-+
-+ wl_list_init(&ivilayer->pending.link);
-+ }
-+
-+ iviscrn->event_mask |= IVI_NOTIFICATION_REMOVE;
-+ return IVI_SUCCEEDED;
-+ }
-+
-+ for (i = 0; i < number; i++) {
-+ id_layer = &pLayer[i]->id_layer;
-+ wl_list_for_each(ivilayer, &layout->layer_list, link) {
-+ if (*id_layer != ivilayer->id_layer) {
-+ continue;
-+ }
-+
-+ if (!wl_list_empty(&ivilayer->pending.link)) {
-+ wl_list_remove(&ivilayer->pending.link);
-+ }
-+ wl_list_init(&ivilayer->pending.link);
-+ wl_list_insert(&iviscrn->pending.layer_list,
-+ &ivilayer->pending.link);
-+ break;
-+ }
-+ }
-+
-+ iviscrn->event_mask |= IVI_NOTIFICATION_ADD;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT struct weston_output *
-+ivi_layout_screen_get_output(struct ivi_layout_screen *iviscrn)
-+{
-+ return iviscrn->output;
-+}
-+
-+/**
-+ * This function is used by the additional ivi-module because of dumping ivi_surface sceenshot.
-+ * The ivi-module, e.g. ivi-controller.so, is in wayland-ivi-extension of Genivi's Layer Management.
-+ * This function is used to get the result of drawing by clients.
-+ */
-+WL_EXPORT struct weston_surface *
-+ivi_layout_surface_get_weston_surface(struct ivi_layout_surface *ivisurf)
-+{
-+ return ivisurf != NULL ? ivisurf->surface : NULL;
-+}
-+
-+/**
-+ * This function is used by the additional ivi-module because of dumping ivi_surface sceenshot.
-+ * The ivi-module, e.g. ivi-controller.so, is in wayland-ivi-extension of Genivi's Layer Management.
-+ * This function is used to get the region and the stride.
-+ */
-+WL_EXPORT int32_t
-+ivi_layout_surface_get_size(struct ivi_layout_surface *ivisurf, int32_t *width, int32_t *height, int32_t *stride)
-+{
-+ if (ivisurf == NULL) {
-+ return IVI_FAILED;
-+ }
-+
-+ if (width != NULL) {
-+ *width = ivisurf->prop.source_width;
-+ }
-+
-+ if (height != NULL) {
-+ *height = ivisurf->prop.source_height;
-+ }
-+
-+ if (stride != NULL &&
-+ ivisurf->surface->buffer_ref.buffer != NULL &&
-+ ivisurf->surface->buffer_ref.buffer->shm_buffer != NULL) {
-+ *stride = wl_shm_buffer_get_stride(ivisurf->surface->buffer_ref.buffer->shm_buffer);
-+ }
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_layer_add_notification(struct ivi_layout_layer *ivilayer,
-+ layer_property_notification_func callback,
-+ void *userdata)
-+{
-+ struct ivi_layout_notification_callback *prop_callback = NULL;
-+
-+ if (ivilayer == NULL || callback == NULL) {
-+ weston_log("ivi_layout_layer_add_notification: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop_callback = malloc(sizeof *prop_callback);
-+ if (prop_callback == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop_callback->callback = callback;
-+ prop_callback->data = userdata;
-+
-+ return add_notification(&ivilayer->property_changed,
-+ layer_prop_changed,
-+ prop_callback);
-+}
-+
-+WL_EXPORT void
-+ivi_layout_layer_remove_notification(struct ivi_layout_layer *ivilayer)
-+{
-+ if (ivilayer == NULL) {
-+ weston_log("ivi_layout_layer_remove_notification: invalid argument\n");
-+ return;
-+ }
-+
-+ remove_all_notification(&ivilayer->property_changed.listener_list);
-+}
-+
-+WL_EXPORT const struct ivi_layout_surface_properties *
-+ivi_layout_get_properties_of_surface(struct ivi_layout_surface *ivisurf)
-+{
-+ if (ivisurf == NULL) {
-+ weston_log("ivi_layout_get_properties_of_surface: invalid argument\n");
-+ return NULL;
-+ }
-+
-+ return &ivisurf->prop;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_layer_add_surface(struct ivi_layout_layer *ivilayer,
-+ struct ivi_layout_surface *addsurf)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_surface *ivisurf = NULL;
-+ struct ivi_layout_surface *next = NULL;
-+ int is_surf_in_layer = 0;
-+
-+ if (ivilayer == NULL || addsurf == NULL) {
-+ weston_log("ivi_layout_layer_add_surface: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ is_surf_in_layer = is_surface_in_layer(addsurf, ivilayer);
-+ if (is_surf_in_layer == 1) {
-+ weston_log("ivi_layout_layer_add_surface: addsurf is already available\n");
-+ return IVI_SUCCEEDED;
-+ }
-+
-+ wl_list_for_each_safe(ivisurf, next, &layout->surface_list, link) {
-+ if (ivisurf->id_surface == addsurf->id_surface) {
-+ if (!wl_list_empty(&ivisurf->pending.link)) {
-+ wl_list_remove(&ivisurf->pending.link);
-+ }
-+ wl_list_init(&ivisurf->pending.link);
-+ wl_list_insert(&ivilayer->pending.surface_list,
-+ &ivisurf->pending.link);
-+ break;
-+ }
-+ }
-+
-+ ivilayer->event_mask |= IVI_NOTIFICATION_ADD;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT void
-+ivi_layout_layer_remove_surface(struct ivi_layout_layer *ivilayer,
-+ struct ivi_layout_surface *remsurf)
-+{
-+ struct ivi_layout_surface *ivisurf = NULL;
-+ struct ivi_layout_surface *next = NULL;
-+
-+ if (ivilayer == NULL || remsurf == NULL) {
-+ weston_log("ivi_layout_layer_remove_surface: invalid argument\n");
-+ return;
-+ }
-+
-+ wl_list_for_each_safe(ivisurf, next,
-+ &ivilayer->pending.surface_list, pending.link) {
-+ if (ivisurf->id_surface == remsurf->id_surface) {
-+ if (!wl_list_empty(&ivisurf->pending.link)) {
-+ wl_list_remove(&ivisurf->pending.link);
-+ }
-+ wl_list_init(&ivisurf->pending.link);
-+ break;
-+ }
-+ }
-+
-+ remsurf->event_mask |= IVI_NOTIFICATION_REMOVE;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_surface_set_source_rectangle(struct ivi_layout_surface *ivisurf,
-+ int32_t x, int32_t y,
-+ int32_t width, int32_t height)
-+{
-+ struct ivi_layout_surface_properties *prop = NULL;
-+
-+ if (ivisurf == NULL) {
-+ weston_log("ivi_layout_surface_set_source_rectangle: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ prop = &ivisurf->pending.prop;
-+ prop->source_x = x;
-+ prop->source_y = y;
-+ prop->source_width = width;
-+ prop->source_height = height;
-+
-+ ivisurf->event_mask |= IVI_NOTIFICATION_SOURCE_RECT;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_commit_changes(void)
-+{
-+ struct ivi_layout *layout = get_instance();
-+
-+ commit_surface_list(layout);
-+ commit_layer_list(layout);
-+ commit_screen_list(layout);
-+
-+ commit_transition(layout);
-+
-+ commit_changes(layout);
-+ send_prop(layout);
-+ weston_compositor_schedule_repaint(layout->compositor);
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+/***called from ivi-shell**/
-+static struct weston_view *
-+ivi_layout_get_weston_view(struct ivi_layout_surface *surface)
-+{
-+ struct weston_view *tmpview = NULL;
-+
-+ if(surface == NULL)
-+ return NULL;
-+
-+ wl_list_for_each(tmpview, &surface->surface->views, surface_link)
-+ {
-+ if (tmpview != NULL) {
-+ break;
-+ }
-+ }
-+ return tmpview;
-+}
-+
-+static void
-+ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf,
-+ int32_t width, int32_t height)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ int32_t in_init = 0;
-+ ivisurf->surface->width_from_buffer = width;
-+ ivisurf->surface->height_from_buffer = height;
-+
-+ if (ivisurf->prop.source_width == 0 || ivisurf->prop.source_height == 0) {
-+ in_init = 1;
-+ }
-+
-+ /* FIXME: when sourceHeight/Width is used as clipping range in image buffer */
-+ /* if (ivisurf->prop.sourceWidth == 0 || ivisurf->prop.sourceHeight == 0) { */
-+ ivisurf->pending.prop.source_width = width;
-+ ivisurf->pending.prop.source_height = height;
-+ ivisurf->prop.source_width = width;
-+ ivisurf->prop.source_height = height;
-+ /* } */
-+
-+ ivisurf->event_mask |= IVI_NOTIFICATION_CONFIGURE;
-+
-+ if (in_init) {
-+ wl_signal_emit(&layout->surface_notification.configure_changed, ivisurf);
-+ } else {
-+ ivi_layout_commit_changes();
-+ }
-+}
-+
-+WL_EXPORT int32_t
-+ivi_layout_surface_set_content_observer(struct ivi_layout_surface *ivisurf,
-+ ivi_controller_surface_content_callback callback,
-+ void* userdata)
-+{
-+ int32_t ret = IVI_FAILED;
-+
-+ if (ivisurf != NULL) {
-+ ivisurf->content_observer.callback = callback;
-+ ivisurf->content_observer.userdata = userdata;
-+ ret = IVI_SUCCEEDED;
-+ }
-+ return ret;
-+}
-+
-+static struct ivi_layout_surface*
-+ivi_layout_surface_create(struct weston_surface *wl_surface,
-+ uint32_t id_surface)
-+{
-+ struct ivi_layout *layout = get_instance();
-+ struct ivi_layout_surface *ivisurf = NULL;
-+ struct weston_view *tmpview = NULL;
-+
-+ if (wl_surface == NULL) {
-+ weston_log("ivi_layout_surface_create: invalid argument\n");
-+ return NULL;
-+ }
-+
-+ ivisurf = get_surface(&layout->surface_list, id_surface);
-+ if (ivisurf != NULL) {
-+ if (ivisurf->surface != NULL) {
-+ weston_log("id_surface(%d) is already created\n", id_surface);
-+ return NULL;
-+ }
-+ }
-+
-+ ivisurf = calloc(1, sizeof *ivisurf);
-+ if (ivisurf == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ return NULL;
-+ }
-+
-+ wl_list_init(&ivisurf->link);
-+ wl_signal_init(&ivisurf->property_changed);
-+ wl_signal_init(&ivisurf->configured);
-+ wl_list_init(&ivisurf->layer_list);
-+ ivisurf->id_surface = id_surface;
-+ ivisurf->layout = layout;
-+
-+ ivisurf->surface = wl_surface;
-+ ivisurf->surface_destroy_listener.notify =
-+ westonsurface_destroy_from_ivisurface;
-+ wl_resource_add_destroy_listener(wl_surface->resource,
-+ &ivisurf->surface_destroy_listener);
-+
-+ tmpview = weston_view_create(wl_surface);
-+ if (tmpview == NULL) {
-+ weston_log("fails to allocate memory\n");
-+ }
-+
-+ ivisurf->surface->width_from_buffer = 0;
-+ ivisurf->surface->height_from_buffer = 0;
-+
-+ weston_matrix_init(&ivisurf->surface_rotation.matrix);
-+ weston_matrix_init(&ivisurf->layer_rotation.matrix);
-+ weston_matrix_init(&ivisurf->surface_pos.matrix);
-+ weston_matrix_init(&ivisurf->layer_pos.matrix);
-+ weston_matrix_init(&ivisurf->scaling.matrix);
-+
-+ wl_list_init(&ivisurf->surface_rotation.link);
-+ wl_list_init(&ivisurf->layer_rotation.link);
-+ wl_list_init(&ivisurf->surface_pos.link);
-+ wl_list_init(&ivisurf->layer_pos.link);
-+ wl_list_init(&ivisurf->scaling.link);
-+
-+ init_surface_properties(&ivisurf->prop);
-+ ivisurf->event_mask = 0;
-+
-+ ivisurf->pending.prop = ivisurf->prop;
-+ wl_list_init(&ivisurf->pending.link);
-+
-+ wl_list_init(&ivisurf->order.link);
-+ wl_list_init(&ivisurf->order.layer_list);
-+
-+ wl_list_insert(&layout->surface_list, &ivisurf->link);
-+
-+ wl_signal_emit(&layout->surface_notification.created, ivisurf);
-+
-+ return ivisurf;
-+}
-+
-+static void
-+ivi_layout_init_with_compositor(struct weston_compositor *ec)
-+{
-+ struct ivi_layout *layout = get_instance();
-+
-+ layout->compositor = ec;
-+
-+ wl_list_init(&layout->surface_list);
-+ wl_list_init(&layout->layer_list);
-+ wl_list_init(&layout->screen_list);
-+
-+ wl_signal_init(&layout->layer_notification.created);
-+ wl_signal_init(&layout->layer_notification.removed);
-+
-+ wl_signal_init(&layout->surface_notification.created);
-+ wl_signal_init(&layout->surface_notification.removed);
-+ wl_signal_init(&layout->surface_notification.configure_changed);
-+
-+ /* Add layout_layer at the last of weston_compositor.layer_list */
-+ weston_layer_init(&layout->layout_layer, ec->layer_list.prev);
-+
-+ create_screen(ec);
-+
-+ layout->transitions = ivi_layout_transition_set_create(ec);
-+ wl_list_init(&layout->pending_transition_list);
-+}
-+
-+
-+static void
-+ivi_layout_surface_add_configured_listener(struct ivi_layout_surface* ivisurf,
-+ struct wl_listener* listener)
-+{
-+ wl_signal_add(&ivisurf->configured, listener);
-+}
-+
-+WL_EXPORT struct ivi_layout_interface ivi_layout_interface = {
-+ .get_weston_view = ivi_layout_get_weston_view,
-+ .surface_configure = ivi_layout_surface_configure,
-+ .surface_create = ivi_layout_surface_create,
-+ .init_with_compositor = ivi_layout_init_with_compositor,
-+ .get_surface_dimension = ivi_layout_surface_get_dimension,
-+ .add_surface_configured_listener = ivi_layout_surface_add_configured_listener
-+};
---
-1.7.9.5
-
diff --git a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0004-ivi-shell-add-the-shell-plugin-for-In-Vehicle-Infota.patch b/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0004-ivi-shell-add-the-shell-plugin-for-In-Vehicle-Infota.patch
deleted file mode 100644
index 9320abb..0000000
--- a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0004-ivi-shell-add-the-shell-plugin-for-In-Vehicle-Infota.patch
+++ /dev/null
@@ -1,1027 +0,0 @@
-From 6b3f32ba6541b27062ab87aeb88665986c67e31d Mon Sep 17 00:00:00 2001
-From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-Date: Wed, 15 Oct 2014 11:26:29 +0900
-Subject: [PATCH 04/15] ivi-shell: add the shell plugin for In-Vehicle
- Infotainment system
-
-- ivi-shell.so
-- introduces ivi-shell/ivi-shell.[ch]
-
-In-Vehicle Infotainment system traditionally manages surfaces with
-global identification. A protocol, ivi_application, supports such a
-feature by implementing a request, ivi_application::surface_creation
-defined in ivi_application.xml.
-
-The ivi-shell explicitly loads ivi-layout.so and a module to add
-business logic like how to layout surfaces by using ivi-layout APIs.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-ivi-shell: send ivi_surface configure event when ivi_layout_surface configured signal emitted.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
--------------------------------------------------------------------
-ivi-shell: Release module when initialzing failed.
-
-> f9839a9 ivi-shell: add the shell plugin for In-Vehicle Infotainment system
->
-> New title: "ivi-shell: add ivi-shell.so shell module"
-> Destructors and few minor things need fixing.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
--------------------------------------------------------------------
-ivi-shell: Fix ivi_layout_surfaceSetPosition. Change int type from array type
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
--------------------------------------------------------------------
-ivi-shell: Change quoted_printable_encode form camelcase
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
--------------------------------------------------------------------
-ivi-shell: add comment why it doesn't use weston_load_module
-
-The reason why the following code is written newly without using
-weston_load_module is it doesn't open library with RTLD_GLOBAL option.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
--------------------------------------------------------------------
- ivi-shell: Replace list_thing with thing_list.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
--------------------------------------------------------------------
-ivi-shell/ivi-shell.c: remove non-availalable header including
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
--------------------------------------------------------------------
-ivi-shell: ivi-shell.[ch] clean-up code
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
--------------------------------------------------------------------
-ivi-shell: Remove call wl_resource_set_implementation
-
-> This call in not needed, AFAIK.
-> [ntanibata] I will remove it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
--------------------------------------------------------------------
-ivi-shell: Move surface_configure_notify() definition
-
-> Move surface_configure_notify() definition above the line where it is
-> needed, and remove the declaration from the beginning of the file.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
--------------------------------------------------------------------
-ivi-shell: Add shell-surface destructor.
-
->> No destructor function? So what happens, if the client unexpectedly
->> disconnects, and libwayland-server destroys all wl_resources in a
->> random order? I think you'd be leaking everything you allocated in
->> this function.
-
-> [ntanibata] I will check and fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
--------------------------------------------------------------------
-ivi-shell: Fix wl_resource_create form application_surface_create
-
-> 'res' is wrong, you need to use 'resource' which is the object whose
-> method you are executing.
-> [ntanibata] I will fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: Fix resource leak.
-
-I think there is a bug.
-surface_destroy() needs to call wl_resource_destroy(resource).
-wl_resource_destroy() will internally as the last thing call the
-destructor function you set with wl_resource_set_implementation(), which
-means that shell_destroy_shell_surface() will get called when you call
-wl_resource_destroy().
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: Use error-code defined in ivi-application-protocol.
-> > You also need to add the two error codes into ivi-application
-> > interface and use those instead of WL_DISPLAY_ERROR_INVALID_OBJECT.
-> [ntanibata] I will fix this according to two error codes.
-> <enum name="error">
-> <entry name="role" value="0" summary="given wl_surface has
-> another role"/>
-> <entry name="ivi_id" value="1" summary="given ivi_id is assigned
-> to another wl_surface"/>
-> </enum>
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: Throw error-code when ivi-surface already created in application_surface_create
-
-> [ntanibata] I will fix it. [ntanibata] This is the first clarification.
-> This is required for, - If application_surface_create is called as
-> duplicate - id_surface is duplicate To avoid ivi_surface creation with the same id_surface.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: Fix destinations of error when resource error occurred.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: Remove an unnecessary call of weston_config_parse()
-
-> Do not call weston_config_parse, but use weston_compositor::config instead.
-> [ntanibata] I will fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: Throw error-code when ivi-surface already created in application_surface_create
-
-> [ntanibata] I will fix it. [ntanibata] This is the first clarification.
-> This is required for, - If application_surface_create is called as
-> duplicate - id_surface is duplicate To avoid ivi_surface creation with the same id_surface.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: Fix destinations of error when resource error occurred.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: ivi-shell, > wl_resource_post_error uses printf-format
-arguments, and passing a
-> non-constant string as the format string (here 'msg' argument) is
-> considered
-> a security hazard, which is why compilers warn about it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: Register a ivi-surface destroy handler to weston-surface destroy signal.
-
-> Even if you wanted that, you still need a destroy listener to reset the
-> pointer to NULL. Otherwise you will have a dangling pointer to a freed
-> struct weston_surface, if the weston_surface (wl_surface) gets
-> destroyed.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: clean-up Makefile.am FR3.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: Remove redundant cast
-
-> if (weston_config_section_get_string( + section, "ivi-module", (char **)&dest->ivi_module, NULL ) != 0)
-> Why the cast?
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: ivi-shell.c +ivi_shell_setting_create(struct ivi_shell_setting *dest, struct > > +weston_compositor *compositor) > > Too long line.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: ivi-shell.c, You could get rid of one level of indenting
-
- wl_resource_post_error(resource,
- IVI_APPLICATION_ERROR_ROLE,
- "wl_surface is invalid");
- return;
- }
-
- That's nice and clear: one can immediately read from each branch
-what went wrong if execution ends up there.
-
- You could get rid of one level of indenting but moving the if
-(!weston_surface) check to the top, since it ends in return. No need for
-an else block then.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: ivi-shell.c, assert() would likely be enough here. Removes one level of indenting too.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: Remove unnecessary check for application_surface_create()
-
-> Didn't you already check for this condition above? Can it pass the
-> earlier check and then fail here? How could this inconsistency happen?
-> Or is this a paranoid check, that if we get here, there is an
-> implementation bug somewhere server-side? If so, you should probably
-> highlight it more, and at least make it distinguishable from the earlier check.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: Fix memory leaks by shell_destroy_shell_surface()
-
-> I believe you are missing free(ivisurf) here. The lifetime of ivisurf is
-> tied to the lifetime of the ivi_surface protocol object (wl_resource).
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell:ivi-shell.c add null check of ivisurf->surface
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell:ivi-shell.c remove unused method, is_surf_in_surfaces
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: ivi-shell.c, remove surface_set_native_content.
-
-There are two use case to
-- create ivi_surface without wl_surface to set property in advanced
-- keep property per ID during deletion of ivi_surface.
-
-This is supported later. For the time being, remove this function.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: ivi-shell.c, Fix surface destructor.
-
-> You cannot do this. The client is destroying the wl_surface, not the
-> ivi_surface. Calling wl_resource_destroy() here creates a disagreement
-> between the server and the client on what protocol objects exist. It
-> inevitably leads to a protocol error if the client attempts to destroy
-> the ivi_surface after the wl_surface.
-> Instead, you need to detach all listeners etc. from the weston_surface
-> here, and set ivisurf->surface = NULL.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: Fix invalid memory read/write. correct destruction methods
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-ivi-shell: ivi-shell, revert commit of
-
-------------------------------------------------------------------
-https://github.com/ntanibata/weston-ivi-shell/commit/f78b50f31f6ade37de2d00845ae70872707d9fd8
-Distruction method shall be reorganized.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: ivi-shell.c, revert of fix of destruction to be re-organized.
-
-https://github.com/ntanibata/weston-ivi-shell/commit/0395a7ecc72ef4f4767c996473cccbbd121a34af
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: ivi-shell.c, remove wl_resource_destroy
-
-> vi_shell_surface,
-
-> + surface_destroy_listener); + + if (ivisurf->resource) { +
-> wl_resource_destroy(ivisurf->resource);
-
-You cannot do this. The client is destroying the wl_surface, not the
-ivi_surface. Calling wl_resource_destroy() here creates a disagreement
-between the server and the client on what protocol objects exist. It
-inevitably leads to a protocol error if the client attempts to destroy
-the ivi_surface after the wl_surface.
-
-Instead, you need to detach all listeners etc. from the weston_surface
-here, and set ivisurf->surface = NULL.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: ivi-shell.c, add comment FIXMEs to improve creation and
-destruction process.
-
-When I compare this code with desktop-shell/shell.c, there are several
-differences in process.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: ivi-shell.c, move destruction process from
-shell_destroy_shell_surface to shell_handle_surface_destroy.
-
-This follows the same way in desktop-shell.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: ivi-shell.c, fix simple bug of assert
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: ivi-shell, remove unnecessary code.
-
-This removeing code for listener of ivi_layout_surface is already called
-in ivi_layout.c. Additonally, ivisurf.ivi_layout_surface is already
-cleaned up before this distroy destruction.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: ivi-shekk, Remove a link from surface-list of shell.
-
-Forget to remove it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell.c: add comments about the destruction sequence
-
-Also move surface_destroy_listener together with the weston_surface
-pointer it watches.
-
-------------------------------------------------------------------
-ivi-shell: ivi-shell.c, Set NULL to resource of ivisurface when shell_destroy_shell_surface called
-
-> /* FIXME: Need to set ivisurf->resource = NULL. */
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: ivi-shell.c, Remove unnecessary check for weston_surface of application_surface_create()
-
-> FIXME: This is not checked in desktop_shell, required to check?
-> - Not required to check this, because libwayland-server will raise
-> a protocol error automatically, if the passed in object is null
-> but the protocol XML does not specify allow-null="true" for the argument.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: ivi-shell.c, Add NULL check of ivisurf->resource
-
-> FIXME: shell_surf->resource might be NULL,
-> if controller decides to reconfigure a surface after a client
-> has destroyed it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: ivi-shell.c, Move down function call for wl_resource creation
-
-> FIXME: this shall be done below:TAG_1, if I use the same order of
-> calling in create_common_surface
-> FIXME: not required if move res to below:TAG_1
-> FIXME: Move below:TAG_1
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------------
-ivi-shell: ivi-shell.c,Move ivi_layout_interface into struct ivi_shell
-
-> FIXME: move this static variable into struct ivi_shell.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
----
- Makefile.am | 17 +-
- ivi-shell/ivi-shell.c | 529 +++++++++++++++++++++++++++++++++++++++++++++++++
- ivi-shell/ivi-shell.h | 37 ++++
- 3 files changed, 582 insertions(+), 1 deletion(-)
- create mode 100644 ivi-shell/ivi-shell.c
- create mode 100644 ivi-shell/ivi-shell.h
-
-diff --git a/Makefile.am b/Makefile.am
-index 812b4bd..b16cfaa 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -723,7 +723,8 @@ endif
- if ENABLE_IVI_SHELL
-
- module_LTLIBRARIES += \
-- $(ivi_layout)
-+ $(ivi_layout) \
-+ $(ivi_shell)
-
- ivi_layout = ivi-layout.la
- ivi_layout_la_LDFLAGS = -module -avoid-version
-@@ -737,6 +738,20 @@ ivi_layout_la_SOURCES = \
-
- BUILT_SOURCES += $(nodist_ivi_layout_la_SOURCES)
-
-+ivi_shell = ivi-shell.la
-+ivi_shell_la_LDFLAGS = -module -avoid-version
-+ivi_shell_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
-+ivi_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
-+ivi_shell_la_SOURCES = \
-+ ivi-shell/ivi-shell.h \
-+ ivi-shell/ivi-shell.c \
-+ ivi-shell/ivi-layout-private.h
-+nodist_ivi_shell_la_SOURCES = \
-+ protocol/ivi-application-protocol.c \
-+ protocol/ivi-application-server-protocol.h
-+
-+BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
-+
- endif
-
-
-diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
-new file mode 100644
-index 0000000..3904402
---- /dev/null
-+++ b/ivi-shell/ivi-shell.c
-@@ -0,0 +1,529 @@
-+/*
-+ * Copyright (C) 2013 DENSO CORPORATION
-+ *
-+ * Permission to use, copy, modify, distribute, and sell this software and
-+ * its documentation for any purpose is hereby granted without fee, provided
-+ * that the above copyright notice appear in all copies and that both that
-+ * copyright notice and this permission notice appear in supporting
-+ * documentation, and that the name of the copyright holders not be used in
-+ * advertising or publicity pertaining to distribution of the software
-+ * without specific, written prior permission. The copyright holders make
-+ * no representations about the suitability of this software for any
-+ * purpose. It is provided "as is" without express or implied warranty.
-+ *
-+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
-+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
-+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
-+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
-+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ */
-+
-+/*
-+ * ivi-shell supports a type of shell for In-Vehicle Infotainment system.
-+ * In-Vehicle Infotainment system traditionally manages surfaces with global
-+ * identification. A protocol, ivi_application, supports such a feature
-+ * by implementing a request, ivi_application::surface_creation defined in
-+ * ivi_application.xml.
-+ *
-+ * The ivi-shell explicitly loads a module to add business logic like how to
-+ * layout surfaces by using internal ivi-layout APIs.
-+ */
-+#include "config.h"
-+
-+#include <sys/wait.h>
-+#include <unistd.h>
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <string.h>
-+#include <linux/input.h>
-+#include <dlfcn.h>
-+#include <limits.h>
-+#include <assert.h>
-+
-+#include "ivi-shell.h"
-+#include "ivi-application-server-protocol.h"
-+#include "ivi-layout-private.h"
-+
-+#include "../shared/os-compatibility.h"
-+
-+/* Representation of ivi_surface protocol object. */
-+struct ivi_shell_surface
-+{
-+ struct wl_resource* resource;
-+ struct ivi_shell *shell;
-+ struct ivi_layout_surface *layout_surface;
-+
-+ struct weston_surface *surface;
-+ struct wl_listener surface_destroy_listener;
-+
-+ uint32_t id_surface;
-+
-+ int32_t width;
-+ int32_t height;
-+
-+ struct wl_list link;
-+
-+ struct wl_listener configured_listener;
-+};
-+
-+struct ivi_shell_setting
-+{
-+ char *ivi_module;
-+};
-+
-+/* FIXME: move this static variable into struct ivi_shell.
-+ * FIXED: Moved
-+ */
-+
-+/*
-+ * Implementation of ivi_surface
-+ */
-+
-+static void
-+surface_configure_notify(struct wl_listener *listener, void *data)
-+{
-+ struct ivi_layout_surface *layout_surf =
-+ (struct ivi_layout_surface *)data;
-+
-+ struct ivi_shell_surface *shell_surf =
-+ container_of(listener,
-+ struct ivi_shell_surface,
-+ configured_listener);
-+
-+ int32_t dest_width = 0;
-+ int32_t dest_height = 0;
-+ shell_surf->shell->ivi_layout->get_surface_dimension(layout_surf,
-+ &dest_width, &dest_height);
-+
-+ /* FIXME: shell_surf->resource might be NULL,
-+ * if controller decides to reconfigure a surface after a client
-+ * has destroyed it.
-+ * FIXED: Add NULL Check
-+ */
-+ if (shell_surf->resource)
-+ ivi_surface_send_configure(shell_surf->resource,
-+ dest_width, dest_height);
-+}
-+
-+static void
-+ivi_shell_surface_configure(struct weston_surface *, int32_t, int32_t);
-+
-+static struct ivi_shell_surface *
-+get_ivi_shell_surface(struct weston_surface *surface)
-+{
-+ if (surface->configure == ivi_shell_surface_configure)
-+ return surface->configure_private;
-+
-+ return NULL;
-+}
-+
-+static void
-+ivi_shell_surface_configure(struct weston_surface *surface,
-+ int32_t sx, int32_t sy)
-+{
-+ struct ivi_shell_surface *ivisurf = get_ivi_shell_surface(surface);
-+ struct weston_view *view;
-+ float from_x;
-+ float from_y;
-+ float to_x;
-+ float to_y;
-+
-+ if (surface->width == 0 || surface->height == 0 || ivisurf == NULL)
-+ return;
-+
-+ view = ivisurf->shell->ivi_layout->get_weston_view(ivisurf->layout_surface);
-+ if (view == NULL)
-+ return;
-+
-+ if (ivisurf->width != surface->width ||
-+ ivisurf->height != surface->height) {
-+ ivisurf->width = surface->width;
-+ ivisurf->height = surface->height;
-+
-+ weston_view_to_global_float(view, 0, 0, &from_x, &from_y);
-+ weston_view_to_global_float(view, sx, sy, &to_x, &to_y);
-+
-+ weston_view_set_position(view,
-+ view->geometry.x + to_x - from_x,
-+ view->geometry.y + to_y - from_y);
-+ weston_view_update_transform(view);
-+
-+ ivisurf->shell->ivi_layout->surface_configure(ivisurf->layout_surface,
-+ surface->width, surface->height);
-+ }
-+}
-+
-+/*
-+ * The ivi_surface wl_resource destructor.
-+ *
-+ * Gets called via ivi_surface.destroy request or automatic wl_client clean-up.
-+ */
-+static void
-+shell_destroy_shell_surface(struct wl_resource *resource)
-+{
-+/* FIXME: When I compare destruction logic of desktop-shell,
-+ this part shall be done in shell_handle_surface_destroy, not here?
-+FIXED: moved.
-+*/
-+ /* FIXME: Need to set ivisurf->resource = NULL.
-+ * FIXED: ivisurf->resource = NULL
-+ */
-+ struct ivi_shell_surface *ivisurf = wl_resource_get_user_data(resource);
-+ ivisurf->resource = NULL;
-+}
-+
-+/* Gets called through the weston_surface destroy signal. */
-+static void
-+shell_handle_surface_destroy(struct wl_listener *listener, void *data)
-+{
-+ struct ivi_shell_surface *ivisurf =
-+ container_of(listener, struct ivi_shell_surface,
-+ surface_destroy_listener);
-+
-+ assert(ivisurf != NULL);
-+
-+ /* FIXME: When I see desktop-shell, the following part is divided as
-+ subfuction, destroy_shell_surface.
-+ * - Looking at shell.c, looks like destroy_shell_surface() would
-+ * not need to be a separate function. It could be done in
-+ * shell_handle_surface_destroy() too.
-+ */
-+ if (ivisurf->surface!=NULL) {
-+ ivisurf->surface->configure = NULL;
-+ ivisurf->surface->configure_private = NULL;
-+ ivisurf->surface = NULL;
-+ }
-+
-+ wl_list_remove(&ivisurf->surface_destroy_listener.link);
-+ wl_list_remove(&ivisurf->link);
-+ ivisurf->resource = NULL;
-+ free(ivisurf);
-+
-+}
-+
-+/* Gets called, when a client sends ivi_surface.destroy request. */
-+static void
-+surface_destroy(struct wl_client *client, struct wl_resource *resource)
-+{
-+ /*
-+ * Fires the wl_resource destroy signal, and then calls
-+ * ivi_surface wl_resource destructor: shell_destroy_shell_surface()
-+ */
-+ wl_resource_destroy(resource);
-+}
-+
-+static const struct ivi_surface_interface surface_implementation = {
-+ surface_destroy,
-+};
-+
-+/**
-+ * Request handler for ivi_application.surface_create.
-+ *
-+ * Creates an ivi_surface protocol object associated with the given wl_surface.
-+ * ivi_surface protocol object is represented by struct ivi_shell_surface.
-+ *
-+ * \param client The client.
-+ * \param resource The ivi_application protocol object.
-+ * \param id_surface The IVI surface ID.
-+ * \param surface_resource The wl_surface protocol object.
-+ * \param id The protocol object id for the new ivi_surface protocol object.
-+ *
-+ * The wl_surface is given the ivi_surface role and associated with a unique
-+ * IVI ID which is used to identify the surface in a controller
-+ * (window manager).
-+ */
-+static void
-+application_surface_create(struct wl_client *client,
-+ struct wl_resource *resource,
-+ uint32_t id_surface,
-+ struct wl_resource *surface_resource,
-+ uint32_t id)
-+{
-+ struct ivi_shell *shell = wl_resource_get_user_data(resource);
-+ struct ivi_shell_surface *ivisurf;
-+ struct ivi_layout_surface *layout_surface;
-+ struct weston_surface *weston_surface =
-+ wl_resource_get_user_data(surface_resource);
-+ struct wl_resource *res;
-+
-+
-+ /* FIXME: This is not checked in desktop_shell, required to check?
-+ * - Not required to check this, because libwayland-server will raise
-+ * a protocol error automatically, if the passed in object is null
-+ * but the protocol XML does not specify allow-null="true" for the
-+ * argument.
-+ * FIXED: Delete NULL check
-+ */
-+
-+ /* FIXME: This is the similar check with
-+ desktop-shell::get_shell_surface
-+ * - Yes. To be changed into a weston_surface_set_role() call,
-+ * rebasing on top of upstream master branch.
-+ */
-+ /* check if a wl_surface already has another role*/
-+ if (weston_surface->configure) {
-+ wl_resource_post_error(resource,
-+ IVI_APPLICATION_ERROR_ROLE,
-+ "surface->configure already "
-+ "set");
-+ return;
-+ }
-+
-+
-+ /* FIXME: from here, it is the similar functionality
-+ with desktop-shell::create_common_surface */
-+ layout_surface = shell->ivi_layout->surface_create(weston_surface,
-+ id_surface);
-+
-+ /* check if id_ivi is already used for wl_surface*/
-+ if (layout_surface == NULL){
-+ wl_resource_post_error(resource,
-+ IVI_APPLICATION_ERROR_IVI_ID,
-+ "surface_id is already assigned "
-+ "by another app");
-+ return;
-+ }
-+
-+ /* FIXME: this shall be done below:TAG_1, if I use the same order of calling in
-+ create_common_surface
-+ * FIXED: Moved
-+ */
-+
-+ ivisurf = zalloc(sizeof *ivisurf);
-+ if (ivisurf == NULL) {
-+ wl_resource_post_no_memory(resource);
-+ /*FIXME: not required if move res to below:TAG_1
-+ *FIXED: Delete
-+ */
-+ return;
-+ }
-+
-+ wl_list_init(&ivisurf->link);
-+ wl_list_insert(&shell->ivi_surface_list, &ivisurf->link);
-+
-+ ivisurf->shell = shell;
-+ ivisurf->id_surface = id_surface;
-+
-+ /*FIXME: Move below:TAG_1
-+ *FIXED: Moved
-+ */
-+ ivisurf->width = 0;
-+ ivisurf->height = 0;
-+ ivisurf->layout_surface = layout_surface;
-+ ivisurf->configured_listener.notify = surface_configure_notify;
-+ ivisurf->shell->ivi_layout->add_surface_configured_listener(layout_surface,
-+ &ivisurf->configured_listener);
-+
-+ /*FIXME: when I compare this logic with desktop shell: create_common_surface
-+
-+shsurf->resource_destroy_listener.notify = handle_resource_destroy;
-+wl_resource_add_destroy_listener(surface->resource,
-+&shsurf->resource_destroy_listener);
-+
-+ to be add the above lisnter??
-+ * - That is linking to the wl_resource destroy signal, this below
-+ * here is linking to the weston_surface destroy signal. They have
-+ * a different purpose, and you need to choose which suits the
-+ * semantics you want, or if might need both. So, figure out what
-+ * semantics you want first.
-+ */
-+
-+ ivisurf->surface_destroy_listener.notify = shell_handle_surface_destroy;
-+ wl_signal_add(&weston_surface->destroy_signal,
-+ &ivisurf->surface_destroy_listener);
-+
-+ ivisurf->surface = weston_surface;
-+
-+ weston_surface->configure = ivi_shell_surface_configure;
-+ weston_surface->configure_private = ivisurf;
-+
-+ /* FIXME: End of desktop-shell::create_common_surface */
-+ /* FIXME: TAG_1 */
-+ res = wl_resource_create(client, &ivi_surface_interface, 1, id);
-+ if (res == NULL) {
-+ wl_client_post_no_memory(client);
-+ return;
-+ }
-+
-+ ivisurf->resource = res;
-+
-+ wl_resource_set_implementation(res, &surface_implementation,
-+ ivisurf, shell_destroy_shell_surface);
-+}
-+
-+static const struct ivi_application_interface application_implementation = {
-+ application_surface_create
-+};
-+
-+/*
-+ * Handle wl_registry.bind of ivi_application global singleton.
-+ */
-+static void
-+bind_ivi_application(struct wl_client *client,
-+ void *data, uint32_t version, uint32_t id)
-+{
-+ struct ivi_shell *shell = data;
-+ struct wl_resource *resource;
-+
-+ resource = wl_resource_create(client, &ivi_application_interface,
-+ 1, id);
-+
-+ wl_resource_set_implementation(resource,
-+ &application_implementation,
-+ shell, NULL);
-+}
-+
-+/*
-+ * Called through the compositor's destroy signal.
-+ */
-+static void
-+shell_destroy(struct wl_listener *listener, void *data)
-+{
-+ struct ivi_shell *shell =
-+ container_of(listener, struct ivi_shell, destroy_listener);
-+ struct ivi_shell_surface *ivisurf, *next;
-+
-+ wl_list_for_each_safe(ivisurf, next, &shell->ivi_surface_list, link) {
-+ wl_list_remove(&ivisurf->link);
-+ free(ivisurf);
-+ }
-+
-+ free(shell);
-+}
-+
-+static void
-+init_ivi_shell(struct weston_compositor *compositor, struct ivi_shell *shell)
-+{
-+ shell->compositor = compositor;
-+
-+ wl_list_init(&shell->ivi_surface_list);
-+
-+}
-+
-+static int
-+ivi_shell_setting_create(struct ivi_shell_setting *dest,
-+ struct weston_compositor *compositor)
-+{
-+ int result = 0;
-+ struct weston_config *config = compositor->config;
-+ struct weston_config_section *section;
-+
-+ if (NULL == dest)
-+ return -1;
-+
-+ section = weston_config_get_section(config, "ivi-shell", NULL, NULL);
-+
-+ if (weston_config_section_get_string(
-+ section, "ivi-module", &dest->ivi_module, NULL) != 0)
-+ {
-+ result = -1;
-+ }
-+
-+ return result;
-+}
-+
-+/*
-+ * Initialization of ivi-shell.
-+ */
-+static int
-+ivi_load_modules(struct weston_compositor *compositor, const char *modules,
-+ int *argc, char *argv[])
-+{
-+ const char *p, *end;
-+ char buffer[256];
-+ int (*module_init)(struct weston_compositor *compositor,
-+ int *argc, char *argv[]);
-+
-+ if (modules == NULL)
-+ return 0;
-+
-+ p = modules;
-+ while (*p) {
-+ end = strchrnul(p, ',');
-+ snprintf(buffer, sizeof buffer, "%.*s", (int)(end - p), p);
-+
-+ module_init = weston_load_module(buffer, "module_init");
-+ if (module_init)
-+ module_init(compositor, argc, argv);
-+
-+ p = end;
-+ while (*p == ',')
-+ p++;
-+ }
-+
-+ return 0;
-+}
-+
-+WL_EXPORT int
-+module_init(struct weston_compositor *compositor,
-+ int *argc, char *argv[])
-+{
-+ struct ivi_shell *shell;
-+ char ivi_layout_path[PATH_MAX];
-+ void *module;
-+ struct ivi_shell_setting setting = { };
-+
-+ shell = zalloc(sizeof *shell);
-+ if (shell == NULL)
-+ return -1;
-+
-+ init_ivi_shell(compositor, shell);
-+
-+ shell->destroy_listener.notify = shell_destroy;
-+ wl_signal_add(&compositor->destroy_signal, &shell->destroy_listener);
-+
-+
-+ if (wl_global_create(compositor->wl_display,
-+ &ivi_application_interface, 1,
-+ shell, bind_ivi_application) == NULL)
-+ return -1;
-+
-+ if (ivi_shell_setting_create(&setting, compositor) != 0)
-+ return -1;
-+
-+ /*
-+ * load module:ivi-layout
-+ * ivi_layout_interface is referred by ivi-shell to use ivi-layout.
-+ * The reason why the following code is written newly without
-+ * using weston_load_module is it doesn't open library with
-+ * RTLD_GLOBAL option.
-+ */
-+ snprintf(ivi_layout_path, sizeof ivi_layout_path,
-+ "%s/%s", MODULEDIR, "ivi-layout.so");
-+ module = dlopen(ivi_layout_path, RTLD_NOW | RTLD_NOLOAD);
-+ if (module) {
-+ weston_log("ivi-shell: Module '%s' already loaded\n",
-+ ivi_layout_path);
-+ dlclose(module);
-+ return -1;
-+ }
-+
-+ weston_log("ivi-shell: Loading module '%s'\n", ivi_layout_path);
-+ module = dlopen(ivi_layout_path, RTLD_NOW | RTLD_GLOBAL);
-+ if (!module) {
-+ weston_log("ivi-shell: Failed to load module: %s\n", dlerror());
-+ return -1;
-+ }
-+
-+ shell->ivi_layout = dlsym(module,"ivi_layout_interface");
-+ if (!shell->ivi_layout){
-+ weston_log("ivi-shell: couldn't find ivi_layout_interface in '%s'\n", ivi_layout_path);
-+ free(setting.ivi_module);
-+ dlclose(module);
-+ return -1;
-+ }
-+
-+ shell->ivi_layout->init_with_compositor(compositor);
-+
-+ /* Call module_init of ivi-modules which are defined in weston.ini */
-+ if (ivi_load_modules(compositor, setting.ivi_module, argc, argv) < 0) {
-+ free(setting.ivi_module);
-+ dlclose(module);
-+ return -1;
-+ }
-+
-+ free(setting.ivi_module);
-+ return 0;
-+}
-diff --git a/ivi-shell/ivi-shell.h b/ivi-shell/ivi-shell.h
-new file mode 100644
-index 0000000..1283a00
---- /dev/null
-+++ b/ivi-shell/ivi-shell.h
-@@ -0,0 +1,37 @@
-+/*
-+ * Copyright (C) 2013 DENSO CORPORATION
-+ *
-+ * Permission to use, copy, modify, distribute, and sell this software and
-+ * its documentation for any purpose is hereby granted without fee, provided
-+ * that the above copyright notice appear in all copies and that both that
-+ * copyright notice and this permission notice appear in supporting
-+ * documentation, and that the name of the copyright holders not be used in
-+ * advertising or publicity pertaining to distribution of the software
-+ * without specific, written prior permission. The copyright holders make
-+ * no representations about the suitability of this software for any
-+ * purpose. It is provided "as is" without express or implied warranty.
-+ *
-+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
-+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
-+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
-+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
-+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ */
-+
-+#include <stdbool.h>
-+
-+#include "compositor.h"
-+
-+struct ivi_shell
-+{
-+ struct wl_resource *resource;
-+ struct wl_listener destroy_listener;
-+
-+ struct weston_compositor *compositor;
-+
-+ struct wl_list ivi_surface_list; /* struct ivi_shell_surface::link */
-+
-+ struct ivi_layout_interface *ivi_layout;
-+};
---
-1.7.9.5
-
diff --git a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0005-protocol-ivi-hmi-controller-protocol-to-set-up-IVI-s.patch b/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0005-protocol-ivi-hmi-controller-protocol-to-set-up-IVI-s.patch
deleted file mode 100644
index 9bc8574..0000000
--- a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0005-protocol-ivi-hmi-controller-protocol-to-set-up-IVI-s.patch
+++ /dev/null
@@ -1,176 +0,0 @@
-From d8147a8e834dcb16b3114ad08168eb7fcafbd3a8 Mon Sep 17 00:00:00 2001
-From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-Date: Tue, 11 Mar 2014 10:18:30 +0900
-Subject: [PATCH 05/15] protocol: ivi hmi controller protocol to set up IVI
- style UI
-
-- introduces ivi-hmi-controller.xml
-
-This protocol realizes following features,
-- UI ready
-- changing modes; tiling, side by side, full_screen, and random
-- Give control a surface; workspace to be controlled by using ivi layout APIs
-- Display/undisplay a surface; home contains sevaral workspaces to launch
- application
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
--------------------------------------------------------------------
-Makefile.am: delete protocol/ivi-hmi-controller.xml
-
-> 79ba752 protocol: ivi hmi controller protocol to set up IVI style UI
-> Did not look at this too carefully, because it is a private
-> protocol between hmi-controller.so and
-> weston-ivi-shell-user-interface. No review email.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
--------------------------------------------------------------------
-Makefile.am: add ivi-hmi-controller.xml to EXTRA_DIST
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
--------------------------------------------------------------------
-Makefile.am: add ivi-hmi-cotronller client protocol to be built as tookkit
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
--------------------------------------------------------------------
-ivi-shell: ivi-hmi-contoller.xml, clean-up Makefile.am
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
--------------------------------------------------------------------
-protocol: hmi-controller.xml, update license text and clean up
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
----
- Makefile.am | 3 +-
- protocol/ivi-hmi-controller.xml | 101 +++++++++++++++++++++++++++++++++++++++
- 2 files changed, 103 insertions(+), 1 deletion(-)
- create mode 100644 protocol/ivi-hmi-controller.xml
-
-diff --git a/Makefile.am b/Makefile.am
-index b16cfaa..112bff2 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1025,7 +1025,8 @@ EXTRA_DIST += \
- protocol/xdg-shell.xml \
- protocol/fullscreen-shell.xml \
- protocol/scaler.xml \
-- protocol/ivi-application.xml
-+ protocol/ivi-application.xml \
-+ protocol/ivi-hmi-controller.xml
-
- man_MANS = weston.1 weston.ini.5
-
-diff --git a/protocol/ivi-hmi-controller.xml b/protocol/ivi-hmi-controller.xml
-new file mode 100644
-index 0000000..a35dd64
---- /dev/null
-+++ b/protocol/ivi-hmi-controller.xml
-@@ -0,0 +1,101 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<protocol name="ivi_hmi_controller">
-+
-+ <copyright>
-+ Copyright (C) 2013 DENSO CORPORATION
-+ Copyright (c) 2013 BMW Car IT GmbH
-+
-+ Permission to use, copy, modify, distribute, and sell this software and
-+ its documentation for any purpose is hereby granted without fee, provided
-+ that the above copyright notice appear in all copies and that both that
-+ copyright notice and this permission notice appear in supporting
-+ documentation, and that the name of the copyright holders not be used in
-+ advertising or publicity pertaining to distribution of the software
-+ without specific, written prior permission. The copyright holders make
-+ no representations about the suitability of this software for any
-+ purpose. It is provided "as is" without express or implied warranty.
-+
-+ THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
-+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-+ FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
-+ SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
-+ RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
-+ CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-+ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ </copyright>
-+
-+ <interface name="ivi_hmi_controller" version="1">
-+ <description summary="set up and control IVI style UI"/>
-+
-+ <enum name="error_code">
-+ <entry name="init_failed" value="0"/>
-+ </enum>
-+
-+ <request name="UI_ready">
-+ <description summary="inform the ready for drawing desktop." />
-+ </request>
-+
-+ <request name="workspace_control">
-+ <description summary="start controlling a surface by server">
-+ Reference protocol to control a surface by server.
-+ To control a surface by server, it gives seat to the server
-+ to e.g. control Home screen. Home screen has several workspaces
-+ to group launchers of wayland application. These workspaces
-+ are drawn on a horizontally long surface to be controlled
-+ by motion of input device. E.g. A motion from right to left
-+ happens, the viewport of surface is controlled in the ivi-shell
-+ by using ivi-layout. client can recognizes the end of controlling
-+ by event "workspace_end_control".
-+ </description>
-+ <arg name="seat" type="object" interface="wl_seat"/>
-+ <arg name="serial" type="uint"/>
-+ </request>
-+
-+ <enum name="layout_mode">
-+ <entry name="tiling" value="0"/>
-+ <entry name="side_by_side" value="1"/>
-+ <entry name="full_screen" value="2"/>
-+ <entry name="random" value="3" />
-+ </enum>
-+
-+ <request name="switch_mode">
-+ <description summary="request mode switch of application layout">
-+ hmi-controller loaded to ivi-shall implements 4 types of layout
-+ as a reference; tiling, side by side, full_screen, and random.
-+ </description>
-+ <arg name="layout_mode" type="uint"/>
-+ </request>
-+
-+ <enum name="home">
-+ <entry name="off" value="0"/>
-+ <entry name="on" value="1"/>
-+ </enum>
-+
-+ <request name="home">
-+ <description summary="request displaying/undisplaying home screen">
-+ home screen is a reference implementation of launcher to launch
-+ wayland applications. The home screen has several workspaces to
-+ group wayland applications. By defining the following keys in
-+ weston.ini, user can add launcher icon to launch a wayland application
-+ to a workspace.
-+ [ivi-launcher]
-+ workspace-id=0
-+ : id of workspace to add a launcher
-+ icon-id=4001
-+ : ivi id of ivi_surface to draw a icon
-+ icon=/home/user/review/build-ivi-shell/data/icon_ivi_flower.png
-+ : path to icon image
-+ path=/home/user/review/build-ivi-shell/weston-dnd
-+ : path to wayland application
-+ </description>
-+ <arg name="home" type="uint"/>
-+ </request>
-+
-+ <event name="workspace_end_control">
-+ <description summary="notify controlling workspace end"/>
-+ <arg name="is_controlled" type="int"/>
-+ </event>
-+
-+ </interface>
-+
-+</protocol>
---
-1.7.9.5
-
diff --git a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0006-ivi-shell-a-reference-implementation-how-to-use-ivi-.patch b/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0006-ivi-shell-a-reference-implementation-how-to-use-ivi-.patch
deleted file mode 100644
index 846fc66..0000000
--- a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0006-ivi-shell-a-reference-implementation-how-to-use-ivi-.patch
+++ /dev/null
@@ -1,2189 +0,0 @@
-From 7fd5b817649f0cb829bb0e033fe371a275810ad8 Mon Sep 17 00:00:00 2001
-From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-Date: Tue, 24 Jun 2014 23:06:02 +0900
-Subject: [PATCH 06/15] ivi-shell: a reference implementation how to use
- ivi-layout internal APIs
-
-- hmi-controller.so
-- introduces hmi-controller.so
-
-The library is used to manage layout of surfaces/layers. Layout change
-is triggered by ivi-hmi-controller protocol, ivi-hmi-controller.xml. A
-reference how to use the protocol, see ivi-shell-user-interface.c.
-
-In-Vehicle Infotainment system usually manages properties of
-surfaces/layers by only a central component which decide where
-surfaces/layers shall be. This is differenct use case from desktop
-style; each application can request property of its window via xdg-shell
-protocol, like fullscreen and set its to top level. In-Vehicle
-Infortainment system doesn't allow each application to chagen them from
-its application because of safty reasons. The concept of layer is
-simillar with a use case of cursor layer of Destop. For In-Vehicle
-Infortainment system, it is extended to all applications. For example,
-rearview camera application is assigned to a layer to group several
-surfaces, e.g. captured image and drawing lines separately. Central
-manaegr can control property of the layer of rearview camera.
-
-This reference show examples to implement the central component as a
-module of weston.
-
-Default Scene graph of UI is defined in hmi_controller_create. It
-consists of
-- In the bottom, a base layer to group surfaces of background, panel,
- and buttons
-- Next, a application layer to show application surfaces.
-- Workspace background layer to show a surface of background image.
-- Workspace layer to show launcher to launch application with icons.
- Paths to binary and icon are defined in weston.ini. The width of
- this layer is longer than the size of screen because a workspace
- has several pages and is controlled by motion of input.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-data: add reference image files for weston-ivi-shell-user-interface
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------
-ivi-shell/hmi-controller.c from transition animation
-
-------------------------------------------
-clients/ivi-shell-user-interface.c from transition animation
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-remove clients/ivi-shell-suer-interface.c
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: clean up LIBS /CFLAGS of hmi-controller
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: clean-up headers to be used for hmi-controller
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: .gitignore update
-remove unnecesary lines.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-hmi-controller: change stdbool from unit32_t
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Modification of function name
-
-> Typo in function name.
-> [ntanibata] I will fix. -> application
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: fix invalid condition in get_hmi_grab_device
-
-> Should probably compare serial to something.
-> [ntanibata] I will fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Fix delete API
-
-> Is this necessary? The client should just eventually (or alreay did)
-> get a hangup from the connection, and exit.
-> [ntanibata] I will fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Fix minor modifications of hmi_controller_create
-
-> This assignment should be in hmi_controller_create().
-> [ntanibata] I will fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: change int type from array type
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-hmi-controller: Use the weston_config that has already been created.
-
-> > Don't call weston_config_parse(), but have the
-> > weston_compositor::config variable passed in here.
-> [ntanibata] Yes, the same as previous comment. I will fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Use the weston_config that has already been created.
-
-> Don't parse, but use weston_compositor::config.
-> All this re-parsing of weston.ini might actually slow down your start-up.
-> [ntanibata] I will fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-hmi-controller: Fix initialized flag setting bug.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Fix add include file
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: change API name from range_val to clamp
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-hmi-controller: Fix array memory allocation.
-
-> > Declarations mixed up with code. Our style has declarations only in
-> > the beginning of a block.
-> [ntanibata] I will fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: Change quoted_printable_encode form camelcase
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-add FIXME at calling clock_gettime
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-hmi-controller: Declare variable in the beginning of a block.
-
-> > Declarations mixed up with code. Our style has declarations only
-> > in the beginning of a block.
-> [ntanibata] I will fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell/hmi-controller.c: remove non-availalable header including
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-Makefile.am: hmi-controller.so needs weston_parser feature to read configs
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: hmi-controller.c, clean-up definition of valueable in the
-middle function.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: hmi-controller.c, remove code commented out.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------------
-ivi-shell: hmi-controller, modify comments, surface/layer/screen -> ivi_*
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: hmi-controller. avoid including ivi-layout-private.h
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: Get hmi_controller from resource when before setup time.
-
-> Every one of these calls commit. Wouldn't it be better to call commit
-> only once in the end of this function?
-> [ntanibata] Exactly, I will fix it.
-> It doesn't make too much sense to pass 'resource' as the argument to
-> these function calls. Would be better to pass in struct
-> hmi_controller, because that is what every single function needs and
-> not the wl_resource.
-> [ntanibata] I agree. I will fix it.
-> ivi_hmi_controller_UI_ready() is the only function that is actually a
-> request handler.
-> [ntanibata] Right. I will fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: Modification to end of function
-
-> Every one of these calls commit. Wouldn't it be better to call commit
-> only once in the end of this function?
-> [ntanibata] Exactly, I will fix it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell:hmi-controller.c Change type of calculatable variables to signed from unsigned
-
-> FWIW, if you are going to do calculations with these variables, they
-> should be signed. If you mix unsigned and signed variables in
-> calculations, the result is probably not what you expect in all cases.
-> This is just a reminder for you, that you might want to change these in
-> the future.
-> Weston core categorically uses signed variables for anything that is
-> involved in calculations, even if negative values would not make any
-> sense for a particular variable.
-> Counters (that may wrap around) are of course better stored as unsigned.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-Makefile.am: clean up Makefile.am with FR3 for hmi-controller
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: Move register process of destroy signal handler when hmi-controller created.
-
-> This does not belong here with the client launching, it belongs in
-> hmicontrollercreate() with the hmi-controller init.
-> Where is the function to be called on compositor destroy, anyway?
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: To improve documentary value.
-
-> To improve documentary value, you should have:
-> struct hmicontroller *hmictrl = data;
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: remove IVI_SHELL_{LIBS,CFLAGS} from Makefile.am
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: Use weston_log() instead.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: Should be a tab, not spaces in Makefile.am
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: Change type of temporary variables from void *into int32_t *.
-
-> Since it's always an uint32t anyway, might as well use 'uint32t *dest'
-> here and drop a cast below.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: Remove a unused assignment.
-
-> Useless return. Also pp_surface = NULL; has no use.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: Remove unused variables as return value.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: Fix invalid calculation.
-
-> 'time' is zero, so why these calculations with it?
-> Something is missing here, at least you need a comment explaining what
-> it is. I'd assume 'time' shouldn't be zero.
-> Maybe a mistake when moving code around.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: Set initialized-flag when UI settings succeeded.
-
-> So, if getting any single id from the config fails, you ignore them all,
-> do not set up any of the UI components except launchers, and then
-> continue as if nothing went wrong? Seems a bit strange, but if you
-> like it that way, so be it.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: remove useless return
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-ivi-shell: Replace weston_client_launch() with weston_client_start()
-
-> Since you are not really using the SIGCHLD handler for anything, a
-> better function to call would be weston_client_start().
-> Allows you to remove the 'process' field from struct hmi_controller
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: Remove casts to (void)
-
-> I don't think we need these casts. The warning about unused arguments is
-> disabled, isn't it?
-> You should be able to remove casts to (void) from all places.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: fix code mixed with declarations
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: hmi-controller, Set handler to destroy-listener.
-
-> Ok, but do you actually set hmictrl->destroylistener.notify somewhere? I
-> can't find it, and if it is not set, you should be getting a crash
-> during weston shutdown.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: Post error-code if initialize failed.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: Check authorization of protocol binding.
-
-> ..and use 'hmictrl' here instead of 'data'. That way the reader sees
-> what the userdata for the wlresource is without tracking it further.
-> This function is missing authorization checks. Any client is allowed to
-> bind to hmicontroller and use it to do whatever they want. You'd
-> probably rather want access to hmicontroller to be restricted to the
-> client you launch in launchhmiclientprocess().
-> To implement the authorization check, you would save the wlclient
-> pointer from westonclientlaunch() or westonclientstart(), and compare
-> 'client' to the saved pointer here. If the pointers differ, the client
-> attempting to bind to hmicontroller is not the one you launched, and so
-> you can send a protocol error and just return.
-> If you want to implement respawn for the controller client, hook into
-> the wlclient destruction, not SIGCHLD. You should hook to the wl_client
-> destruction anyway, so you know when to reset the saved client pointer
-> to NULL.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: Post invalid-object-error if binding failed.
-
-> missing an error sending.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller: hmi_controller_destroy feature to release memory
-
-> ok, though shouldn't that function be freeing some things? I suspect you
-> might want to free struct hmi_controller there, and its members.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-----------------------------------------------------------
-hmi-controller.c: indent with tabs
-
-For the stray changes, see 'git show -b <sha1>'.
-
-----------------------------------------------------------
-hmi-controller.c: remove unneeded braces from if-statements
-
-----------------------------------------------------------
-hmi-controller.c: whitespace fixes
-
-----------------------------------------------------------
-hmi-controller.c: remove unneeded casts
-
-----------------------------------------------------------
-hmi-controller.c: split long lines
----
- Makefile.am | 16 +-
- ivi-shell/.gitignore | 1 +
- ivi-shell/hmi-controller.c | 1710 ++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 1726 insertions(+), 1 deletion(-)
- create mode 100644 ivi-shell/.gitignore
- create mode 100644 ivi-shell/hmi-controller.c
-
-diff --git a/Makefile.am b/Makefile.am
-index 112bff2..76780a8 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -724,7 +724,8 @@ if ENABLE_IVI_SHELL
-
- module_LTLIBRARIES += \
- $(ivi_layout) \
-- $(ivi_shell)
-+ $(ivi_shell) \
-+ $(hmi_controller)
-
- ivi_layout = ivi-layout.la
- ivi_layout_la_LDFLAGS = -module -avoid-version
-@@ -752,6 +753,19 @@ nodist_ivi_shell_la_SOURCES = \
-
- BUILT_SOURCES += $(nodist_ivi_shell_la_SOURCES)
-
-+hmi_controller = hmi-controller.la
-+hmi_controller_la_LDFLAGS = -module -avoid-version
-+hmi_controller_la_LIBADD = $(COMPOSITOR_LIBS) libshared.la
-+hmi_controller_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
-+hmi_controller_la_SOURCES = \
-+ ivi-shell/ivi-layout-export.h \
-+ ivi-shell/hmi-controller.c
-+nodist_hmi_controller_la_SOURCES = \
-+ protocol/ivi-hmi-controller-protocol.c \
-+ protocol/ivi-hmi-controller-server-protocol.h
-+
-+BUILT_SOURCES += $(nodist_hmi_controller_la_SOURCES)
-+
- endif
-
-
-diff --git a/ivi-shell/.gitignore b/ivi-shell/.gitignore
-new file mode 100644
-index 0000000..e690c59
---- /dev/null
-+++ b/ivi-shell/.gitignore
-@@ -0,0 +1 @@
-+weston.ini
-diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c
-new file mode 100644
-index 0000000..b7a6c61
---- /dev/null
-+++ b/ivi-shell/hmi-controller.c
-@@ -0,0 +1,1710 @@
-+/*
-+ * Copyright (C) 2014 DENSO CORPORATION
-+ *
-+ * Permission to use, copy, modify, distribute, and sell this software and
-+ * its documentation for any purpose is hereby granted without fee, provided
-+ * that the above copyright notice appear in all copies and that both that
-+ * copyright notice and this permission notice appear in supporting
-+ * documentation, and that the name of the copyright holders not be used in
-+ * advertising or publicity pertaining to distribution of the software
-+ * without specific, written prior permission. The copyright holders make
-+ * no representations about the suitability of this software for any
-+ * purpose. It is provided "as is" without express or implied warranty.
-+ *
-+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
-+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
-+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
-+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
-+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ */
-+
-+/**
-+ * A reference implementation how to use ivi-layout APIs in order to manage
-+ * layout of ivi_surfaces/ivi_layers. Layout change is triggered by
-+ * ivi-hmi-controller protocol, ivi-hmi-controller.xml. A reference how to
-+ * use the protocol, see hmi-controller-homescreen.
-+ *
-+ * In-Vehicle Infotainment system usually manage properties of
-+ * ivi_surfaces/ivi_layers by only a central component which decide where
-+ * ivi_surfaces/ivi_layers shall be. This reference show examples to
-+ * implement the central component as a module of weston.
-+ *
-+ * Default Scene graph of UI is defined in hmi_controller_create. It
-+ * consists of
-+ * - In the bottom, a base ivi_layer to group ivi_surfaces of background,
-+ * panel, and buttons
-+ * - Next, a application ivi_layer to show application ivi_surfaces.
-+ * - Workspace background ivi_layer to show a ivi_surface of background image.
-+ * - Workspace ivi_layer to show launcher to launch application with icons.
-+ * Paths to binary and icon are defined in weston.ini. The width of this
-+ * ivi_layer is longer than the size of ivi_screen because a workspace has
-+ * several pages and is controlled by motion of input.
-+ *
-+ * TODO: animation method shall be refined
-+ * TODO: support fade-in when UI is ready
-+ */
-+
-+#include <sys/wait.h>
-+#include <unistd.h>
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <string.h>
-+#include <linux/input.h>
-+#include <assert.h>
-+#include <time.h>
-+
-+#include "ivi-layout-export.h"
-+#include "ivi-hmi-controller-server-protocol.h"
-+
-+/*****************************************************************************
-+ * structure, globals
-+ ****************************************************************************/
-+struct hmi_controller_layer {
-+ struct ivi_layout_layer *ivilayer;
-+ uint32_t id_layer;
-+ int32_t x;
-+ int32_t y;
-+ int32_t width;
-+ int32_t height;
-+};
-+
-+struct link_layer {
-+ struct ivi_layout_layer *layout_layer;
-+ struct wl_list link;
-+};
-+
-+struct hmi_controller_fade {
-+ uint32_t is_fade_in;
-+ struct wl_list layer_list;
-+};
-+
-+struct hmi_server_setting {
-+ uint32_t base_layer_id;
-+ uint32_t application_layer_id;
-+ uint32_t workspace_background_layer_id;
-+ uint32_t workspace_layer_id;
-+ int32_t panel_height;
-+ uint32_t transition_duration;
-+ char *ivi_homescreen;
-+};
-+
-+struct hmi_controller {
-+ struct hmi_server_setting *hmi_setting;
-+ struct hmi_controller_layer base_layer;
-+ struct hmi_controller_layer application_layer;
-+ struct hmi_controller_layer workspace_background_layer;
-+ struct hmi_controller_layer workspace_layer;
-+ enum ivi_hmi_controller_layout_mode layout_mode;
-+
-+ struct hmi_controller_fade workspace_fade;
-+
-+ int32_t workspace_count;
-+ struct wl_array ui_widgets;
-+ int32_t is_initialized;
-+
-+ struct weston_compositor *compositor;
-+ struct wl_listener destroy_listener;
-+
-+ struct wl_client *user_interface;
-+};
-+
-+struct launcher_info {
-+ uint32_t surface_id;
-+ uint32_t workspace_id;
-+ int32_t index;
-+};
-+
-+/*****************************************************************************
-+ * local functions
-+ ****************************************************************************/
-+static void *
-+fail_on_null(void *p, size_t size, char *file, int32_t line)
-+{
-+ if (size && !p) {
-+ weston_log("%s(%d) %zd: out of memory\n", file, line, size);
-+ exit(EXIT_FAILURE);
-+ }
-+
-+ return p;
-+}
-+
-+static void *
-+mem_alloc(size_t size, char *file, int32_t line)
-+{
-+ return fail_on_null(calloc(1, size), size, file, line);
-+}
-+
-+#define MEM_ALLOC(s) mem_alloc((s),__FILE__,__LINE__)
-+
-+static int32_t
-+is_surf_in_ui_widget(struct hmi_controller *hmi_ctrl,
-+ struct ivi_layout_surface *ivisurf)
-+{
-+ uint32_t id = ivi_layout_get_id_of_surface(ivisurf);
-+
-+ uint32_t *ui_widget_id = NULL;
-+ wl_array_for_each(ui_widget_id, &hmi_ctrl->ui_widgets) {
-+ if (*ui_widget_id == id)
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-+
-+static int
-+compare_launcher_info(const void *lhs, const void *rhs)
-+{
-+ const struct launcher_info *left = lhs;
-+ const struct launcher_info *right = rhs;
-+
-+ if (left->workspace_id < right->workspace_id)
-+ return -1;
-+
-+ if (left->workspace_id > right->workspace_id)
-+ return 1;
-+
-+ if (left->index < right->index)
-+ return -1;
-+
-+ if (left->index > right->index)
-+ return 1;
-+
-+ return 0;
-+}
-+
-+/**
-+ * Internal methods called by mainly ivi_hmi_controller_switch_mode
-+ * This reference shows 4 examples how to use ivi_layout APIs.
-+ */
-+static void
-+mode_divided_into_tiling(struct hmi_controller *hmi_ctrl,
-+ struct ivi_layout_surface **pp_surface,
-+ int32_t surface_length,
-+ struct hmi_controller_layer *layer)
-+{
-+ const float surface_width = (float)layer->width * 0.25;
-+ const float surface_height = (float)layer->height * 0.5;
-+ int32_t surface_x = 0;
-+ int32_t surface_y = 0;
-+ struct ivi_layout_surface *ivisurf = NULL;
-+ struct ivi_layout_surface **surfaces;
-+ struct ivi_layout_surface **new_order;
-+ const uint32_t duration = hmi_ctrl->hmi_setting->transition_duration;
-+
-+ int32_t i = 0;
-+ int32_t surf_num = 0;
-+ uint32_t num = 1;
-+
-+ surfaces = MEM_ALLOC(sizeof(*surfaces) * surface_length);
-+ new_order = MEM_ALLOC(sizeof(*surfaces) * surface_length);
-+
-+ for (i = 0; i < surface_length; i++) {
-+ ivisurf = pp_surface[i];
-+
-+ /* skip ui widgets */
-+ if (is_surf_in_ui_widget(hmi_ctrl, ivisurf))
-+ continue;
-+
-+ surfaces[surf_num++] = ivisurf;
-+ }
-+
-+ for (i = 0; i < surf_num; i++) {
-+ ivisurf = surfaces[i];
-+ new_order[i] = ivisurf;
-+
-+ if (num <= 8) {
-+ if (num < 5) {
-+ surface_x = (int32_t)((num - 1) * (surface_width));
-+ surface_y = 0;
-+ } else {
-+ surface_x = (int32_t)((num - 5) * (surface_width));
-+ surface_y = (int32_t)surface_height;
-+ }
-+
-+ ivi_layout_surface_set_transition(ivisurf,
-+ IVI_LAYOUT_TRANSITION_VIEW_DEFAULT,
-+ duration);
-+ ivi_layout_surface_set_visibility(ivisurf, true);
-+ ivi_layout_surface_set_destination_rectangle(ivisurf,
-+ surface_x, surface_y,
-+ (int32_t)surface_width,
-+ (int32_t)surface_height);
-+
-+ num++;
-+ continue;
-+ }
-+ ivi_layout_surface_set_visibility(ivisurf, false);
-+ }
-+
-+ if (surf_num > 0) {
-+ ivi_layout_layer_set_transition(layer->ivilayer,
-+ IVI_LAYOUT_TRANSITION_LAYER_VIEW_ORDER,
-+ duration);
-+ //TODO: implement IVI_LAYOUT_TRANSITION_LAYER_VIEW_ORDER later.
-+ ivi_layout_transition_layer_render_order(layer->ivilayer,
-+ new_order,
-+ surf_num,
-+ duration);
-+ }
-+
-+ free(surfaces);
-+ free(new_order);
-+}
-+
-+static void
-+mode_divided_into_sidebyside(struct hmi_controller *hmi_ctrl,
-+ struct ivi_layout_surface **pp_surface,
-+ int32_t surface_length,
-+ struct hmi_controller_layer *layer)
-+{
-+ int32_t surface_width = layer->width / 2;
-+ int32_t surface_height = layer->height;
-+ struct ivi_layout_surface *ivisurf = NULL;
-+
-+ const uint32_t duration = hmi_ctrl->hmi_setting->transition_duration;
-+ int32_t i = 0;
-+ int32_t num = 1;
-+
-+ for (i = 0; i < surface_length; i++) {
-+ ivisurf = pp_surface[i];
-+
-+ /* skip ui widgets */
-+ if (is_surf_in_ui_widget(hmi_ctrl, ivisurf))
-+ continue;
-+
-+ if (num == 1) {
-+ ivi_layout_surface_set_transition(ivisurf,
-+ IVI_LAYOUT_TRANSITION_VIEW_DEFAULT,
-+ duration);
-+ ivi_layout_surface_set_visibility(ivisurf, true);
-+ ivi_layout_surface_set_destination_rectangle(ivisurf,
-+ 0, 0,
-+ surface_width,
-+ surface_height);
-+
-+ num++;
-+ continue;
-+ } else if (num == 2) {
-+ ivi_layout_surface_set_transition(ivisurf,
-+ IVI_LAYOUT_TRANSITION_VIEW_DEFAULT,
-+ duration);
-+ ivi_layout_surface_set_visibility(ivisurf, true);
-+ ivi_layout_surface_set_destination_rectangle(ivisurf,
-+ surface_width, 0,
-+ surface_width,
-+ surface_height);
-+
-+ num++;
-+ continue;
-+ }
-+ ivi_layout_surface_set_transition(ivisurf,
-+ IVI_LAYOUT_TRANSITION_VIEW_FADE_ONLY,
-+ duration);
-+ ivi_layout_surface_set_visibility(ivisurf, false);
-+ }
-+}
-+
-+static void
-+mode_fullscreen_someone(struct hmi_controller *hmi_ctrl,
-+ struct ivi_layout_surface **pp_surface,
-+ int32_t surface_length,
-+ struct hmi_controller_layer *layer)
-+{
-+ const int32_t surface_width = layer->width;
-+ const int32_t surface_height = layer->height;
-+ struct ivi_layout_surface *ivisurf = NULL;
-+ int32_t i = 0;
-+ const uint32_t duration = hmi_ctrl->hmi_setting->transition_duration;
-+
-+ for (i = 0; i < surface_length; i++) {
-+ ivisurf = pp_surface[i];
-+
-+ /* skip ui widgets */
-+ if (is_surf_in_ui_widget(hmi_ctrl, ivisurf))
-+ continue;
-+
-+ ivi_layout_surface_set_transition(ivisurf,
-+ IVI_LAYOUT_TRANSITION_VIEW_DEFAULT,
-+ duration);
-+ ivi_layout_surface_set_visibility(ivisurf, true);
-+ ivi_layout_surface_set_destination_rectangle(ivisurf, 0, 0,
-+ surface_width,
-+ surface_height);
-+ }
-+}
-+
-+static void
-+mode_random_replace(struct hmi_controller *hmi_ctrl,
-+ struct ivi_layout_surface **pp_surface,
-+ int32_t surface_length,
-+ struct hmi_controller_layer *layer)
-+{
-+ const int32_t surface_width = (int32_t)(layer->width * 0.25f);
-+ const int32_t surface_height = (int32_t)(layer->height * 0.25f);
-+ int32_t surface_x = 0;
-+ int32_t surface_y = 0;
-+ struct ivi_layout_surface *ivisurf = NULL;
-+ const uint32_t duration = hmi_ctrl->hmi_setting->transition_duration;
-+ int32_t i = 0;
-+
-+ for (i = 0; i < surface_length; i++) {
-+ ivisurf = pp_surface[i];
-+
-+ /* skip ui widgets */
-+ if (is_surf_in_ui_widget(hmi_ctrl, ivisurf))
-+ continue;
-+
-+ ivi_layout_surface_set_transition(ivisurf,
-+ IVI_LAYOUT_TRANSITION_VIEW_DEFAULT,
-+ duration);
-+ ivi_layout_surface_set_visibility(ivisurf, true);
-+ surface_x = rand() % (layer->width - surface_width);
-+ surface_y = rand() % (layer->height - surface_height);
-+
-+ ivi_layout_surface_set_destination_rectangle(ivisurf,
-+ surface_x,
-+ surface_y,
-+ surface_width,
-+ surface_height);
-+ }
-+}
-+
-+static int32_t
-+has_application_surface(struct hmi_controller *hmi_ctrl,
-+ struct ivi_layout_surface **pp_surface,
-+ int32_t surface_length)
-+{
-+ struct ivi_layout_surface *ivisurf = NULL;
-+ int32_t i = 0;
-+
-+ for (i = 0; i < surface_length; i++) {
-+ ivisurf = pp_surface[i];
-+
-+ /* skip ui widgets */
-+ if (is_surf_in_ui_widget(hmi_ctrl, ivisurf))
-+ continue;
-+
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-+
-+/**
-+ * Supports 4 example to layout of application ivi_surfaces;
-+ * tiling, side by side, fullscreen, and random.
-+ */
-+static void
-+switch_mode(struct hmi_controller *hmi_ctrl,
-+ enum ivi_hmi_controller_layout_mode layout_mode)
-+{
-+ struct hmi_controller_layer *layer = &hmi_ctrl->application_layer;
-+ struct ivi_layout_surface **pp_surface = NULL;
-+ int32_t surface_length = 0;
-+ int32_t ret = 0;
-+
-+ if (!hmi_ctrl->is_initialized)
-+ return;
-+
-+ hmi_ctrl->layout_mode = layout_mode;
-+
-+ ret = ivi_layout_get_surfaces(&surface_length, &pp_surface);
-+ assert(!ret);
-+
-+ if (!has_application_surface(hmi_ctrl, pp_surface, surface_length)) {
-+ free(pp_surface);
-+ pp_surface = NULL;
-+ return;
-+ }
-+
-+ switch (layout_mode) {
-+ case IVI_HMI_CONTROLLER_LAYOUT_MODE_TILING:
-+ mode_divided_into_tiling(hmi_ctrl, pp_surface, surface_length,
-+ layer);
-+ break;
-+ case IVI_HMI_CONTROLLER_LAYOUT_MODE_SIDE_BY_SIDE:
-+ mode_divided_into_sidebyside(hmi_ctrl, pp_surface,
-+ surface_length, layer);
-+ break;
-+ case IVI_HMI_CONTROLLER_LAYOUT_MODE_FULL_SCREEN:
-+ mode_fullscreen_someone(hmi_ctrl, pp_surface, surface_length,
-+ layer);
-+ break;
-+ case IVI_HMI_CONTROLLER_LAYOUT_MODE_RANDOM:
-+ mode_random_replace(hmi_ctrl, pp_surface, surface_length,
-+ layer);
-+ break;
-+ }
-+
-+ ivi_layout_commit_changes();
-+ free(pp_surface);
-+}
-+
-+/**
-+ * Internal method for transition
-+ */
-+static void
-+hmi_controller_fade_run(struct hmi_controller *hmi_ctrl, uint32_t is_fade_in,
-+ struct hmi_controller_fade *fade)
-+{
-+ double tint = is_fade_in ? 1.0 : 0.0;
-+ struct link_layer *linklayer = NULL;
-+ const uint32_t duration = hmi_ctrl->hmi_setting->transition_duration;
-+
-+ fade->is_fade_in = is_fade_in;
-+
-+ wl_list_for_each(linklayer, &fade->layer_list, link) {
-+ ivi_layout_layer_set_transition(linklayer->layout_layer,
-+ IVI_LAYOUT_TRANSITION_LAYER_FADE,
-+ duration);
-+ ivi_layout_layer_set_fade_info(linklayer->layout_layer,
-+ is_fade_in, 1.0 - tint, tint);
-+ }
-+}
-+
-+/**
-+ * Internal method to create ivi_layer with hmi_controller_layer and
-+ * add to a ivi_screen
-+ */
-+static void
-+create_layer(struct ivi_layout_screen *iviscrn,
-+ struct hmi_controller_layer *layer)
-+{
-+ int32_t ret = 0;
-+
-+ layer->ivilayer =
-+ ivi_layout_layer_create_with_dimension(layer->id_layer,
-+ layer->width,
-+ layer->height);
-+ assert(layer->ivilayer != NULL);
-+
-+ ret = ivi_layout_screen_add_layer(iviscrn, layer->ivilayer);
-+ assert(!ret);
-+
-+ ret = ivi_layout_layer_set_destination_rectangle(layer->ivilayer,
-+ layer->x, layer->y,
-+ layer->width,
-+ layer->height);
-+ assert(!ret);
-+
-+ ret = ivi_layout_layer_set_visibility(layer->ivilayer, true);
-+ assert(!ret);
-+}
-+
-+/**
-+ * Internal set notification
-+ */
-+static void
-+set_notification_create_surface(struct ivi_layout_surface *ivisurf,
-+ void *userdata)
-+{
-+ struct hmi_controller *hmi_ctrl = userdata;
-+ struct ivi_layout_layer *application_layer =
-+ hmi_ctrl->application_layer.ivilayer;
-+ int32_t ret = 0;
-+
-+ /* skip ui widgets */
-+ if (is_surf_in_ui_widget(hmi_ctrl, ivisurf))
-+ return;
-+
-+ ret = ivi_layout_layer_add_surface(application_layer, ivisurf);
-+ assert(!ret);
-+}
-+
-+static void
-+set_notification_remove_surface(struct ivi_layout_surface *ivisurf,
-+ void *userdata)
-+{
-+ struct hmi_controller *hmi_ctrl = userdata;
-+
-+ switch_mode(hmi_ctrl, hmi_ctrl->layout_mode);
-+}
-+
-+static void
-+set_notification_configure_surface(struct ivi_layout_surface *ivisurf,
-+ void *userdata)
-+{
-+ struct hmi_controller *hmi_ctrl = userdata;
-+
-+ switch_mode(hmi_ctrl, hmi_ctrl->layout_mode);
-+}
-+
-+/**
-+ * A hmi_controller used 4 ivi_layers to manage ivi_surfaces. The IDs of
-+ * corresponding ivi_layer are defined in weston.ini. Default scene graph
-+ * of ivi_layers are initialized in hmi_controller_create
-+ */
-+static struct hmi_server_setting *
-+hmi_server_setting_create(struct weston_compositor *ec)
-+{
-+ struct hmi_server_setting *setting = MEM_ALLOC(sizeof(*setting));
-+ struct weston_config *config = ec->config;
-+ struct weston_config_section *shell_section = NULL;
-+
-+ shell_section = weston_config_get_section(config, "ivi-shell",
-+ NULL, NULL);
-+
-+ weston_config_section_get_uint(shell_section, "base-layer-id",
-+ &setting->base_layer_id, 1000);
-+
-+ weston_config_section_get_uint(shell_section,
-+ "workspace-background-layer-id",
-+ &setting->workspace_background_layer_id,
-+ 2000);
-+
-+ weston_config_section_get_uint(shell_section, "workspace-layer-id",
-+ &setting->workspace_layer_id, 3000);
-+
-+ weston_config_section_get_uint(shell_section, "application-layer-id",
-+ &setting->application_layer_id, 4000);
-+
-+ weston_config_section_get_uint(shell_section, "transition-duration",
-+ &setting->transition_duration, 300);
-+
-+ setting->panel_height = 70;
-+
-+ weston_config_section_get_string(shell_section,
-+ "ivi-shell-user-interface",
-+ &setting->ivi_homescreen, NULL);
-+
-+ return setting;
-+}
-+
-+static void
-+hmi_controller_destroy(struct wl_listener *listener, void *data)
-+{
-+ struct link_layer *link = NULL;
-+ struct link_layer *next = NULL;
-+ struct hmi_controller *hmi_ctrl =
-+ container_of(listener, struct hmi_controller, destroy_listener);
-+
-+ wl_list_for_each_safe(link, next,
-+ &hmi_ctrl->workspace_fade.layer_list, link) {
-+ wl_list_remove(&link->link);
-+ free(link);
-+ }
-+
-+ wl_array_release(&hmi_ctrl->ui_widgets);
-+ free(hmi_ctrl->hmi_setting);
-+ free(hmi_ctrl);
-+}
-+
-+/**
-+ * This is a starting method called from module_init.
-+ * This sets up scene graph of ivi_layers; base, application, workspace
-+ * background, and workspace. These ivi_layers are created/added to
-+ * ivi_screen in create_layer
-+ *
-+ * base: to group ivi_surfaces of panel and background
-+ * application: to group ivi_surfaces of ivi_applications
-+ * workspace background: to group a ivi_surface of background in workspace
-+ * workspace: to group ivi_surfaces for launching ivi_applications
-+ *
-+ * ivi_layers of workspace background and workspace is set to invisible at
-+ * first. The properties of it is updated with animation when
-+ * ivi_hmi_controller_home is requested.
-+ */
-+static struct hmi_controller *
-+hmi_controller_create(struct weston_compositor *ec)
-+{
-+ struct ivi_layout_screen **pp_screen = NULL;
-+ struct ivi_layout_screen *iviscrn = NULL;
-+ int32_t screen_length = 0;
-+ int32_t screen_width = 0;
-+ int32_t screen_height = 0;
-+ struct link_layer *tmp_link_layer = NULL;
-+ int32_t panel_height = 0;
-+ struct hmi_controller *hmi_ctrl = MEM_ALLOC(sizeof(*hmi_ctrl));
-+
-+ wl_array_init(&hmi_ctrl->ui_widgets);
-+ hmi_ctrl->layout_mode = IVI_HMI_CONTROLLER_LAYOUT_MODE_TILING;
-+ hmi_ctrl->hmi_setting = hmi_server_setting_create(ec);
-+ hmi_ctrl->compositor = ec;
-+
-+ ivi_layout_get_screens(&screen_length, &pp_screen);
-+
-+ iviscrn = pp_screen[0];
-+
-+ ivi_layout_get_screen_resolution(iviscrn, &screen_width,
-+ &screen_height);
-+
-+ /* init base ivi_layer*/
-+ hmi_ctrl->base_layer.x = 0;
-+ hmi_ctrl->base_layer.y = 0;
-+ hmi_ctrl->base_layer.width = screen_width;
-+ hmi_ctrl->base_layer.height = screen_height;
-+ hmi_ctrl->base_layer.id_layer = hmi_ctrl->hmi_setting->base_layer_id;
-+
-+ create_layer(iviscrn, &hmi_ctrl->base_layer);
-+
-+ panel_height = hmi_ctrl->hmi_setting->panel_height;
-+
-+ /* init application ivi_layer */
-+ hmi_ctrl->application_layer.x = 0;
-+ hmi_ctrl->application_layer.y = 0;
-+ hmi_ctrl->application_layer.width = screen_width;
-+ hmi_ctrl->application_layer.height = screen_height - panel_height;
-+ hmi_ctrl->application_layer.id_layer =
-+ hmi_ctrl->hmi_setting->application_layer_id;
-+
-+ create_layer(iviscrn, &hmi_ctrl->application_layer);
-+
-+ /* init workspace background ivi_layer */
-+ hmi_ctrl->workspace_background_layer.x = 0;
-+ hmi_ctrl->workspace_background_layer.y = 0;
-+ hmi_ctrl->workspace_background_layer.width = screen_width;
-+ hmi_ctrl->workspace_background_layer.height =
-+ screen_height - panel_height;
-+
-+ hmi_ctrl->workspace_background_layer.id_layer =
-+ hmi_ctrl->hmi_setting->workspace_background_layer_id;
-+
-+ create_layer(iviscrn, &hmi_ctrl->workspace_background_layer);
-+ ivi_layout_layer_set_opacity(
-+ hmi_ctrl->workspace_background_layer.ivilayer, 0);
-+ ivi_layout_layer_set_visibility(
-+ hmi_ctrl->workspace_background_layer.ivilayer, false);
-+
-+ /* init workspace ivi_layer */
-+ hmi_ctrl->workspace_layer.x = hmi_ctrl->workspace_background_layer.x;
-+ hmi_ctrl->workspace_layer.y = hmi_ctrl->workspace_background_layer.y;
-+ hmi_ctrl->workspace_layer.width =
-+ hmi_ctrl->workspace_background_layer.width;
-+ hmi_ctrl->workspace_layer.height =
-+ hmi_ctrl->workspace_background_layer.height;
-+ hmi_ctrl->workspace_layer.id_layer =
-+ hmi_ctrl->hmi_setting->workspace_layer_id;
-+
-+ create_layer(iviscrn, &hmi_ctrl->workspace_layer);
-+ ivi_layout_layer_set_opacity(hmi_ctrl->workspace_layer.ivilayer, 0);
-+ ivi_layout_layer_set_visibility(hmi_ctrl->workspace_layer.ivilayer,
-+ false);
-+
-+ wl_list_init(&hmi_ctrl->workspace_fade.layer_list);
-+ tmp_link_layer = MEM_ALLOC(sizeof(*tmp_link_layer));
-+ tmp_link_layer->layout_layer = hmi_ctrl->workspace_layer.ivilayer;
-+ wl_list_insert(&hmi_ctrl->workspace_fade.layer_list,
-+ &tmp_link_layer->link);
-+ tmp_link_layer = MEM_ALLOC(sizeof(*tmp_link_layer));
-+ tmp_link_layer->layout_layer =
-+ hmi_ctrl->workspace_background_layer.ivilayer;
-+ wl_list_insert(&hmi_ctrl->workspace_fade.layer_list,
-+ &tmp_link_layer->link);
-+
-+ ivi_layout_add_notification_create_surface(
-+ set_notification_create_surface, hmi_ctrl);
-+ ivi_layout_add_notification_remove_surface(
-+ set_notification_remove_surface, hmi_ctrl);
-+ ivi_layout_add_notification_configure_surface(
-+ set_notification_configure_surface, hmi_ctrl);
-+
-+ hmi_ctrl->destroy_listener.notify = hmi_controller_destroy;
-+ wl_signal_add(&hmi_ctrl->compositor->destroy_signal,
-+ &hmi_ctrl->destroy_listener);
-+
-+ free(pp_screen);
-+ pp_screen = NULL;
-+
-+ return hmi_ctrl;
-+}
-+
-+/**
-+ * Implementations of ivi-hmi-controller.xml
-+ */
-+
-+/**
-+ * A ivi_surface drawing background is identified by id_surface.
-+ * Properties of the ivi_surface is set by using ivi_layout APIs according to
-+ * the scene graph of UI defined in hmi_controller_create.
-+ *
-+ * UI ivi_layer is used to add this ivi_surface.
-+ */
-+static void
-+ivi_hmi_controller_set_background(struct hmi_controller *hmi_ctrl,
-+ uint32_t id_surface)
-+{
-+ struct ivi_layout_surface *ivisurf = NULL;
-+ struct ivi_layout_layer *ivilayer = hmi_ctrl->base_layer.ivilayer;
-+ const int32_t dstx = hmi_ctrl->application_layer.x;
-+ const int32_t dsty = hmi_ctrl->application_layer.y;
-+ const int32_t width = hmi_ctrl->application_layer.width;
-+ const int32_t height = hmi_ctrl->application_layer.height;
-+ int32_t ret = 0;
-+
-+ uint32_t *add_surface_id = wl_array_add(&hmi_ctrl->ui_widgets,
-+ sizeof(*add_surface_id));
-+ *add_surface_id = id_surface;
-+
-+ ivisurf = ivi_layout_get_surface_from_id(id_surface);
-+ assert(ivisurf != NULL);
-+
-+ ret = ivi_layout_layer_add_surface(ivilayer, ivisurf);
-+ assert(!ret);
-+
-+ ret = ivi_layout_surface_set_destination_rectangle(ivisurf,
-+ dstx, dsty, width, height);
-+ assert(!ret);
-+
-+ ret = ivi_layout_surface_set_visibility(ivisurf, true);
-+ assert(!ret);
-+}
-+
-+/**
-+ * A ivi_surface drawing panel is identified by id_surface.
-+ * Properties of the ivi_surface is set by using ivi_layout APIs according to
-+ * the scene graph of UI defined in hmi_controller_create.
-+ *
-+ * UI ivi_layer is used to add this ivi_surface.
-+ */
-+static void
-+ivi_hmi_controller_set_panel(struct hmi_controller *hmi_ctrl,
-+ uint32_t id_surface)
-+{
-+ struct ivi_layout_surface *ivisurf = NULL;
-+ struct ivi_layout_layer *ivilayer = hmi_ctrl->base_layer.ivilayer;
-+ const int32_t width = hmi_ctrl->base_layer.width;
-+ int32_t ret = 0;
-+ int32_t panel_height = 0;
-+ const int32_t dstx = 0;
-+ int32_t dsty = 0;
-+
-+ uint32_t *add_surface_id = wl_array_add(&hmi_ctrl->ui_widgets,
-+ sizeof(*add_surface_id));
-+ *add_surface_id = id_surface;
-+
-+ ivisurf = ivi_layout_get_surface_from_id(id_surface);
-+ assert(ivisurf != NULL);
-+
-+ ret = ivi_layout_layer_add_surface(ivilayer, ivisurf);
-+ assert(!ret);
-+
-+ panel_height = hmi_ctrl->hmi_setting->panel_height;
-+
-+ dsty = hmi_ctrl->base_layer.height - panel_height;
-+
-+ ret = ivi_layout_surface_set_destination_rectangle(
-+ ivisurf, dstx, dsty, width, panel_height);
-+ assert(!ret);
-+
-+ ret = ivi_layout_surface_set_visibility(ivisurf, true);
-+ assert(!ret);
-+}
-+
-+/**
-+ * A ivi_surface drawing buttons in panel is identified by id_surface.
-+ * It can set several buttons. Properties of the ivi_surface is set by
-+ * using ivi_layout APIs according to the scene graph of UI defined in
-+ * hmi_controller_create. Additionally, the position of it is shifted to
-+ * right when new one is requested.
-+ *
-+ * UI ivi_layer is used to add these ivi_surfaces.
-+ */
-+static void
-+ivi_hmi_controller_set_button(struct hmi_controller *hmi_ctrl,
-+ uint32_t id_surface, int32_t number)
-+{
-+ struct ivi_layout_surface *ivisurf = NULL;
-+ struct ivi_layout_layer *ivilayer = hmi_ctrl->base_layer.ivilayer;
-+ const int32_t width = 48;
-+ const int32_t height = 48;
-+ int32_t ret = 0;
-+ int32_t panel_height = 0;
-+ int32_t dstx = 0;
-+ int32_t dsty = 0;
-+ uint32_t *add_surface_id = wl_array_add(&hmi_ctrl->ui_widgets,
-+ sizeof(*add_surface_id));
-+ *add_surface_id = id_surface;
-+
-+ ivisurf = ivi_layout_get_surface_from_id(id_surface);
-+ assert(ivisurf != NULL);
-+
-+ ret = ivi_layout_layer_add_surface(ivilayer, ivisurf);
-+ assert(!ret);
-+
-+ panel_height = hmi_ctrl->hmi_setting->panel_height;
-+
-+ dstx = (60 * number) + 15;
-+ dsty = (hmi_ctrl->base_layer.height - panel_height) + 5;
-+
-+ ret = ivi_layout_surface_set_destination_rectangle(
-+ ivisurf,dstx, dsty, width, height);
-+ assert(!ret);
-+
-+ ret = ivi_layout_surface_set_visibility(ivisurf, true);
-+ assert(!ret);
-+}
-+
-+/**
-+ * A ivi_surface drawing home button in panel is identified by id_surface.
-+ * Properties of the ivi_surface is set by using ivi_layout APIs according to
-+ * the scene graph of UI defined in hmi_controller_create.
-+ *
-+ * UI ivi_layer is used to add these ivi_surfaces.
-+ */
-+static void
-+ivi_hmi_controller_set_home_button(struct hmi_controller *hmi_ctrl,
-+ uint32_t id_surface)
-+{
-+ struct ivi_layout_surface *ivisurf = NULL;
-+ struct ivi_layout_layer *ivilayer = hmi_ctrl->base_layer.ivilayer;
-+ int32_t ret = 0;
-+ int32_t size = 48;
-+ int32_t panel_height = hmi_ctrl->hmi_setting->panel_height;
-+ const int32_t dstx = (hmi_ctrl->base_layer.width - size) / 2;
-+ const int32_t dsty = (hmi_ctrl->base_layer.height - panel_height) + 5;
-+
-+ uint32_t *add_surface_id = wl_array_add(&hmi_ctrl->ui_widgets,
-+ sizeof(*add_surface_id));
-+ *add_surface_id = id_surface;
-+
-+ ivisurf = ivi_layout_get_surface_from_id(id_surface);
-+ assert(ivisurf != NULL);
-+
-+ ret = ivi_layout_layer_add_surface(ivilayer, ivisurf);
-+ assert(!ret);
-+
-+ ret = ivi_layout_surface_set_destination_rectangle(
-+ ivisurf, dstx, dsty, size, size);
-+ assert(!ret);
-+
-+ ret = ivi_layout_surface_set_visibility(ivisurf, true);
-+ assert(!ret);
-+}
-+
-+/**
-+ * A ivi_surface drawing background of workspace is identified by id_surface.
-+ * Properties of the ivi_surface is set by using ivi_layout APIs according to
-+ * the scene graph of UI defined in hmi_controller_create.
-+ *
-+ * A ivi_layer of workspace_background is used to add this ivi_surface.
-+ */
-+static void
-+ivi_hmi_controller_set_workspacebackground(struct hmi_controller *hmi_ctrl,
-+ uint32_t id_surface)
-+{
-+ struct ivi_layout_surface *ivisurf = NULL;
-+ struct ivi_layout_layer *ivilayer = NULL;
-+ const int32_t width = hmi_ctrl->workspace_background_layer.width;
-+ const int32_t height = hmi_ctrl->workspace_background_layer.height;
-+ int32_t ret = 0;
-+
-+ uint32_t *add_surface_id = wl_array_add(&hmi_ctrl->ui_widgets,
-+ sizeof(*add_surface_id));
-+ *add_surface_id = id_surface;
-+ ivilayer = hmi_ctrl->workspace_background_layer.ivilayer;
-+
-+ ivisurf = ivi_layout_get_surface_from_id(id_surface);
-+ assert(ivisurf != NULL);
-+
-+ ret = ivi_layout_layer_add_surface(ivilayer, ivisurf);
-+ assert(!ret);
-+
-+ ret = ivi_layout_surface_set_destination_rectangle(ivisurf,
-+ 0, 0, width, height);
-+ assert(!ret);
-+
-+ ret = ivi_layout_surface_set_visibility(ivisurf, true);
-+ assert(!ret);
-+}
-+
-+/**
-+ * A list of ivi_surfaces drawing launchers in workspace is identified by
-+ * id_surfaces. Properties of the ivi_surface is set by using ivi_layout
-+ * APIs according to the scene graph of UI defined in hmi_controller_create.
-+ *
-+ * The workspace can have several pages to group ivi_surfaces of launcher.
-+ * Each call of this interface increments a number of page to add a group
-+ * of ivi_surfaces
-+ */
-+static void
-+ivi_hmi_controller_add_launchers(struct wl_resource *resource,
-+ int32_t icon_size)
-+{
-+ struct hmi_controller *hmi_ctrl = wl_resource_get_user_data(resource);
-+ struct ivi_layout_layer *layer = hmi_ctrl->workspace_layer.ivilayer;
-+ int32_t minspace_x = 10;
-+ int32_t minspace_y = minspace_x;
-+
-+ int32_t width = hmi_ctrl->workspace_layer.width;
-+ int32_t height = hmi_ctrl->workspace_layer.height;
-+
-+ int32_t x_count = (width - minspace_x) / (minspace_x + icon_size);
-+ int32_t space_x = (int32_t)((width - x_count * icon_size) / (1.0 + x_count));
-+ float fcell_size_x = icon_size + space_x;
-+
-+ int32_t y_count = (height - minspace_y) / (minspace_y + icon_size);
-+ int32_t space_y = (int32_t)((height - y_count * icon_size) / (1.0 + y_count));
-+ float fcell_size_y = icon_size + space_y;
-+
-+ struct weston_config *config = NULL;
-+ struct weston_config_section *section = NULL;
-+ const char *name = NULL;
-+ int launcher_count = 0;
-+ struct wl_array launchers;
-+ int32_t nx = 0;
-+ int32_t ny = 0;
-+ int32_t prev = -1;
-+ struct launcher_info *data = NULL;
-+
-+ uint32_t surfaceid = 0;
-+ uint32_t workspaceid = 0;
-+ struct launcher_info *info = NULL;
-+
-+ int32_t x = 0;
-+ int32_t y = 0;
-+ int32_t ret = 0;
-+ struct ivi_layout_surface* layout_surface = NULL;
-+ uint32_t *add_surface_id = NULL;
-+
-+ if (0 == x_count)
-+ x_count = 1;
-+
-+ if (0 == y_count)
-+ y_count = 1;
-+
-+ config = hmi_ctrl->compositor->config;
-+ if (!config)
-+ return;
-+
-+ section = weston_config_get_section(config, "ivi-shell", NULL, NULL);
-+ if (!section)
-+ return;
-+
-+ wl_array_init(&launchers);
-+
-+ while (weston_config_next_section(config, &section, &name)) {
-+ surfaceid = 0;
-+ workspaceid = 0;
-+ info = NULL;
-+ if (0 != strcmp(name, "ivi-launcher"))
-+ continue;
-+
-+ if (0 != weston_config_section_get_uint(section, "icon-id",
-+ &surfaceid, 0))
-+ continue;
-+
-+ if (0 != weston_config_section_get_uint(section,
-+ "workspace-id",
-+ &workspaceid, 0))
-+ continue;
-+
-+ info = wl_array_add(&launchers, sizeof(*info));
-+
-+ if (info) {
-+ info->surface_id = surfaceid;
-+ info->workspace_id = workspaceid;
-+ info->index = launcher_count;
-+ ++launcher_count;
-+ }
-+ }
-+
-+ qsort(launchers.data, launcher_count, sizeof(struct launcher_info),
-+ compare_launcher_info);
-+
-+ wl_array_for_each(data, &launchers) {
-+ x = 0;
-+ y = 0;
-+ ret = 0;
-+ layout_surface = NULL;
-+ add_surface_id = wl_array_add(&hmi_ctrl->ui_widgets,
-+ sizeof(*add_surface_id));
-+
-+ *add_surface_id = data->surface_id;
-+
-+ if (0 > prev || (uint32_t)prev != data->workspace_id) {
-+ nx = 0;
-+ ny = 0;
-+ prev = data->workspace_id;
-+
-+ if (0 <= prev)
-+ hmi_ctrl->workspace_count++;
-+ }
-+
-+ if (y_count == ny) {
-+ ny = 0;
-+ hmi_ctrl->workspace_count++;
-+ }
-+
-+ x = nx * fcell_size_x + (hmi_ctrl->workspace_count - 1) * width + space_x;
-+ y = ny * fcell_size_y + space_y;
-+
-+ layout_surface =
-+ ivi_layout_get_surface_from_id(data->surface_id);
-+ assert(layout_surface);
-+
-+ ret = ivi_layout_layer_add_surface(layer, layout_surface);
-+ assert(!ret);
-+
-+ ret = ivi_layout_surface_set_destination_rectangle(
-+ layout_surface, x, y, icon_size, icon_size);
-+ assert(!ret);
-+
-+ ret = ivi_layout_surface_set_visibility(layout_surface, true);
-+ assert(!ret);
-+
-+ nx++;
-+
-+ if (x_count == nx) {
-+ ny++;
-+ nx = 0;
-+ }
-+ }
-+
-+ wl_array_release(&launchers);
-+ ivi_layout_commit_changes();
-+}
-+
-+static void
-+ivi_hmi_controller_UI_ready(struct wl_client *client,
-+ struct wl_resource *resource)
-+{
-+ struct setting {
-+ uint32_t background_id;
-+ uint32_t panel_id;
-+ uint32_t tiling_id;
-+ uint32_t sidebyside_id;
-+ uint32_t fullscreen_id;
-+ uint32_t random_id;
-+ uint32_t home_id;
-+ uint32_t workspace_background_id;
-+ };
-+
-+ struct config_command {
-+ char *key;
-+ uint32_t *dest;
-+ };
-+
-+ struct hmi_controller *hmi_ctrl = wl_resource_get_user_data(resource);
-+ struct weston_config *config = hmi_ctrl->compositor->config;
-+ struct weston_config_section *section = NULL;
-+ struct setting dest;
-+ int result = 0;
-+ int i = 0;
-+
-+ const struct config_command uint_commands[] = {
-+ { "background-id", &dest.background_id },
-+ { "panel-id", &dest.panel_id },
-+ { "tiling-id", &dest.tiling_id },
-+ { "sidebyside-id", &dest.sidebyside_id },
-+ { "fullscreen-id", &dest.fullscreen_id },
-+ { "random-id", &dest.random_id },
-+ { "home-id", &dest.home_id },
-+ { "workspace-background-id", &dest.workspace_background_id },
-+ { NULL, NULL }
-+ };
-+
-+ section = weston_config_get_section(config, "ivi-shell", NULL, NULL);
-+
-+ for (i = 0; -1 != result; ++i) {
-+ const struct config_command *command = &uint_commands[i];
-+
-+ if (!command->key)
-+ break;
-+
-+ if (weston_config_section_get_uint(
-+ section, command->key, command->dest, 0) != 0)
-+ result = -1;
-+ }
-+
-+ if (-1 == result) {
-+ wl_resource_post_error(resource,
-+ IVI_HMI_CONTROLLER_ERROR_CODE_INIT_FAILED,
-+ "Failed to initialize hmi-controller.");
-+ return;
-+ }
-+
-+ ivi_hmi_controller_set_background(hmi_ctrl, dest.background_id);
-+ ivi_hmi_controller_set_panel(hmi_ctrl, dest.panel_id);
-+ ivi_hmi_controller_set_button(hmi_ctrl, dest.tiling_id, 0);
-+ ivi_hmi_controller_set_button(hmi_ctrl, dest.sidebyside_id, 1);
-+ ivi_hmi_controller_set_button(hmi_ctrl, dest.fullscreen_id, 2);
-+ ivi_hmi_controller_set_button(hmi_ctrl, dest.random_id, 3);
-+ ivi_hmi_controller_set_home_button(hmi_ctrl, dest.home_id);
-+ ivi_hmi_controller_set_workspacebackground(hmi_ctrl,
-+ dest.workspace_background_id);
-+ ivi_layout_commit_changes();
-+
-+ ivi_hmi_controller_add_launchers(resource, 256);
-+ hmi_ctrl->is_initialized = 1;
-+}
-+
-+/**
-+ * Implementation of request and event of ivi_hmi_controller_workspace_control
-+ * and controlling workspace.
-+ *
-+ * When motion of input is detected in a ivi_surface of workspace background,
-+ * ivi_hmi_controller_workspace_control shall be invoked and to start
-+ * controlling of workspace. The workspace has several pages to show several
-+ * groups of applications.
-+ * The workspace is slid by using ivi-layout to select a a page in layer_set_pos
-+ * according to motion. When motion finished, e.g. touch up detected, control is
-+ * terminated and event:ivi_hmi_controller_workspace_control is notified.
-+ */
-+struct pointer_grab {
-+ struct weston_pointer_grab grab;
-+ struct ivi_layout_layer *layer;
-+ struct wl_resource *resource;
-+};
-+
-+struct touch_grab {
-+ struct weston_touch_grab grab;
-+ struct ivi_layout_layer *layer;
-+ struct wl_resource *resource;
-+};
-+
-+struct move_grab {
-+ wl_fixed_t dst[2];
-+ wl_fixed_t rgn[2][2];
-+ double v[2];
-+ struct timespec start_time;
-+ struct timespec pre_time;
-+ wl_fixed_t start_pos[2];
-+ wl_fixed_t pos[2];
-+ int32_t is_moved;
-+};
-+
-+struct pointer_move_grab {
-+ struct pointer_grab base;
-+ struct move_grab move;
-+};
-+
-+struct touch_move_grab {
-+ struct touch_grab base;
-+ struct move_grab move;
-+ int32_t is_active;
-+};
-+
-+static void
-+pointer_grab_start(struct pointer_grab *grab,
-+ struct ivi_layout_layer *layer,
-+ const struct weston_pointer_grab_interface *interface,
-+ struct weston_pointer *pointer)
-+{
-+ grab->grab.interface = interface;
-+ grab->layer = layer;
-+ weston_pointer_start_grab(pointer, &grab->grab);
-+}
-+
-+static void
-+touch_grab_start(struct touch_grab *grab,
-+ struct ivi_layout_layer *layer,
-+ const struct weston_touch_grab_interface *interface,
-+ struct weston_touch* touch)
-+{
-+ grab->grab.interface = interface;
-+ grab->layer = layer;
-+ weston_touch_start_grab(touch, &grab->grab);
-+}
-+
-+static int32_t
-+clamp(int32_t val, int32_t min, int32_t max)
-+{
-+ if (val < min)
-+ return min;
-+
-+ if (max < val)
-+ return max;
-+
-+ return val;
-+}
-+
-+static void
-+move_workspace_grab_end(struct move_grab *move, struct wl_resource* resource,
-+ wl_fixed_t grab_x, struct ivi_layout_layer *layer)
-+{
-+ struct hmi_controller *hmi_ctrl = wl_resource_get_user_data(resource);
-+ int32_t width = hmi_ctrl->workspace_background_layer.width;
-+
-+ struct timespec time = {0};
-+ double grab_time = 0.0;
-+ double from_motion_time = 0.0;
-+ double pointer_v = 0.0;
-+ int32_t is_flick = 0;
-+ int32_t pos_x = 0;
-+ int32_t pos_y = 0;
-+ int page_no = 0;
-+ double end_pos = 0.0;
-+ uint32_t duration = 0;
-+
-+ clock_gettime(CLOCK_MONOTONIC, &time);
-+
-+ grab_time = 1e+3 * (time.tv_sec - move->start_time.tv_sec) +
-+ 1e-6 * (time.tv_nsec - move->start_time.tv_nsec);
-+
-+ from_motion_time = 1e+3 * (time.tv_sec - move->pre_time.tv_sec) +
-+ 1e-6 * (time.tv_nsec - move->pre_time.tv_nsec);
-+
-+ pointer_v = move->v[0];
-+
-+ is_flick = grab_time < 400 && 0.4 < fabs(pointer_v);
-+ if (200 < from_motion_time)
-+ pointer_v = 0.0;
-+
-+ ivi_layout_layer_get_position(layer, &pos_x, &pos_y);
-+
-+
-+ if (is_flick) {
-+ int orgx = wl_fixed_to_int(move->dst[0] + grab_x);
-+ page_no = (-orgx + width / 2) / width;
-+
-+ if (pointer_v < 0.0)
-+ page_no++;
-+ else
-+ page_no--;
-+ } else {
-+ page_no = (-pos_x + width / 2) / width;
-+ }
-+
-+ page_no = clamp(page_no, 0, hmi_ctrl->workspace_count - 1);
-+ end_pos = -page_no * width;
-+
-+ duration = hmi_ctrl->hmi_setting->transition_duration;
-+ ivi_hmi_controller_send_workspace_end_control(resource, move->is_moved);
-+ ivi_layout_layer_set_transition(layer,
-+ IVI_LAYOUT_TRANSITION_LAYER_MOVE,
-+ duration);
-+ ivi_layout_layer_set_destination_rectangle(layer,
-+ end_pos, pos_y,
-+ hmi_ctrl->workspace_background_layer.width,
-+ hmi_ctrl->workspace_background_layer.height);
-+ ivi_layout_commit_changes();
-+}
-+
-+static void
-+pointer_move_workspace_grab_end(struct pointer_grab *grab)
-+{
-+ struct pointer_move_grab *pnt_move_grab =
-+ (struct pointer_move_grab *)grab;
-+ struct ivi_layout_layer *layer = pnt_move_grab->base.layer;
-+
-+ move_workspace_grab_end(&pnt_move_grab->move, grab->resource,
-+ grab->grab.pointer->grab_x, layer);
-+
-+ weston_pointer_end_grab(grab->grab.pointer);
-+}
-+
-+static void
-+touch_move_workspace_grab_end(struct touch_grab *grab)
-+{
-+ struct touch_move_grab *tch_move_grab = (struct touch_move_grab *)grab;
-+ struct ivi_layout_layer *layer = tch_move_grab->base.layer;
-+
-+ move_workspace_grab_end(&tch_move_grab->move, grab->resource,
-+ grab->grab.touch->grab_x, layer);
-+
-+ weston_touch_end_grab(grab->grab.touch);
-+}
-+
-+static void
-+pointer_noop_grab_focus(struct weston_pointer_grab *grab)
-+{
-+}
-+
-+static void
-+move_grab_update(struct move_grab *move, wl_fixed_t pointer[2])
-+{
-+ struct timespec timestamp = {0};
-+ int32_t ii = 0;
-+ double dt = 0.0;
-+
-+ clock_gettime(CLOCK_MONOTONIC, &timestamp); //FIXME
-+ dt = (1e+3 * (timestamp.tv_sec - move->pre_time.tv_sec) +
-+ 1e-6 * (timestamp.tv_nsec - move->pre_time.tv_nsec));
-+
-+ if (dt < 1e-6)
-+ dt = 1e-6;
-+
-+ move->pre_time = timestamp;
-+
-+ for (ii = 0; ii < 2; ii++) {
-+ wl_fixed_t prepos = move->pos[ii];
-+ move->pos[ii] = pointer[ii] + move->dst[ii];
-+
-+ if (move->pos[ii] < move->rgn[0][ii]) {
-+ move->pos[ii] = move->rgn[0][ii];
-+ move->dst[ii] = move->pos[ii] - pointer[ii];
-+ } else if (move->rgn[1][ii] < move->pos[ii]) {
-+ move->pos[ii] = move->rgn[1][ii];
-+ move->dst[ii] = move->pos[ii] - pointer[ii];
-+ }
-+
-+ move->v[ii] = wl_fixed_to_double(move->pos[ii] - prepos) / dt;
-+
-+ if (!move->is_moved &&
-+ 0 < wl_fixed_to_int(move->pos[ii] - move->start_pos[ii]))
-+ move->is_moved = 1;
-+ }
-+}
-+
-+static void
-+layer_set_pos(struct ivi_layout_layer *layer, wl_fixed_t pos_x,
-+ wl_fixed_t pos_y)
-+{
-+ int32_t layout_pos_x = 0;
-+ int32_t layout_pos_y = 0;
-+
-+ layout_pos_x = wl_fixed_to_int(pos_x);
-+ layout_pos_y = wl_fixed_to_int(pos_y);
-+ ivi_layout_layer_set_position(layer, layout_pos_x, layout_pos_y);
-+ ivi_layout_commit_changes();
-+}
-+
-+static void
-+pointer_move_grab_motion(struct weston_pointer_grab *grab, uint32_t time,
-+ wl_fixed_t x, wl_fixed_t y)
-+{
-+ struct pointer_move_grab *pnt_move_grab =
-+ (struct pointer_move_grab *)grab;
-+ wl_fixed_t pointer_pos[2] = {x, y};
-+
-+ move_grab_update(&pnt_move_grab->move, pointer_pos);
-+ layer_set_pos(pnt_move_grab->base.layer,
-+ pnt_move_grab->move.pos[0], pnt_move_grab->move.pos[1]);
-+ weston_pointer_move(pnt_move_grab->base.grab.pointer, x, y);
-+}
-+
-+static void
-+touch_move_grab_motion(struct weston_touch_grab *grab, uint32_t time,
-+ int touch_id, wl_fixed_t x, wl_fixed_t y)
-+{
-+ struct touch_move_grab *tch_move_grab = (struct touch_move_grab *)grab;
-+
-+ if (!tch_move_grab->is_active)
-+ return;
-+
-+ wl_fixed_t pointer_pos[2] = {
-+ grab->touch->grab_x,
-+ grab->touch->grab_y
-+ };
-+
-+ move_grab_update(&tch_move_grab->move, pointer_pos);
-+ layer_set_pos(tch_move_grab->base.layer,
-+ tch_move_grab->move.pos[0], tch_move_grab->move.pos[1]);
-+}
-+
-+static void
-+pointer_move_workspace_grab_button(struct weston_pointer_grab *grab,
-+ uint32_t time, uint32_t button,
-+ uint32_t state_w)
-+{
-+ if (BTN_LEFT == button &&
-+ WL_POINTER_BUTTON_STATE_RELEASED == state_w) {
-+ struct pointer_grab *pg = (struct pointer_grab *)grab;
-+
-+ pointer_move_workspace_grab_end(pg);
-+ free(grab);
-+ }
-+}
-+
-+static void
-+touch_nope_grab_down(struct weston_touch_grab *grab, uint32_t time,
-+ int touch_id, wl_fixed_t sx, wl_fixed_t sy)
-+{
-+}
-+
-+static void
-+touch_move_workspace_grab_up(struct weston_touch_grab *grab, uint32_t time,
-+ int touch_id)
-+{
-+ struct touch_move_grab *tch_move_grab = (struct touch_move_grab *)grab;
-+
-+ if (0 == touch_id)
-+ tch_move_grab->is_active = 0;
-+
-+ if (0 == grab->touch->num_tp) {
-+ touch_move_workspace_grab_end(&tch_move_grab->base);
-+ free(grab);
-+ }
-+}
-+
-+static void
-+pointer_move_workspace_grab_cancel(struct weston_pointer_grab *grab)
-+{
-+ struct pointer_grab *pg = (struct pointer_grab *)grab;
-+
-+ pointer_move_workspace_grab_end(pg);
-+ free(grab);
-+}
-+
-+static void
-+touch_move_workspace_grab_cancel(struct weston_touch_grab *grab)
-+{
-+ struct touch_grab *tg = (struct touch_grab *)grab;
-+
-+ touch_move_workspace_grab_end(tg);
-+ free(grab);
-+}
-+
-+static const struct weston_pointer_grab_interface pointer_move_grab_workspace_interface = {
-+ pointer_noop_grab_focus,
-+ pointer_move_grab_motion,
-+ pointer_move_workspace_grab_button,
-+ pointer_move_workspace_grab_cancel
-+};
-+
-+static const struct weston_touch_grab_interface touch_move_grab_workspace_interface = {
-+ touch_nope_grab_down,
-+ touch_move_workspace_grab_up,
-+ touch_move_grab_motion,
-+ touch_move_workspace_grab_cancel
-+};
-+
-+enum HMI_GRAB_DEVICE {
-+ HMI_GRAB_DEVICE_NONE,
-+ HMI_GRAB_DEVICE_POINTER,
-+ HMI_GRAB_DEVICE_TOUCH
-+};
-+
-+static enum HMI_GRAB_DEVICE
-+get_hmi_grab_device(struct weston_seat *seat, uint32_t serial)
-+{
-+ if (seat->pointer &&
-+ seat->pointer->focus &&
-+ seat->pointer->button_count &&
-+ seat->pointer->grab_serial == serial)
-+ return HMI_GRAB_DEVICE_POINTER;
-+
-+ if (seat->touch &&
-+ seat->touch->focus &&
-+ seat->touch->grab_serial == serial)
-+ return HMI_GRAB_DEVICE_TOUCH;
-+
-+ return HMI_GRAB_DEVICE_NONE;
-+}
-+
-+static void
-+move_grab_init(struct move_grab* move, wl_fixed_t start_pos[2],
-+ wl_fixed_t grab_pos[2], wl_fixed_t rgn[2][2],
-+ struct wl_resource* resource)
-+{
-+ clock_gettime(CLOCK_MONOTONIC, &move->start_time); //FIXME
-+ move->pre_time = move->start_time;
-+ move->pos[0] = start_pos[0];
-+ move->pos[1] = start_pos[1];
-+ move->start_pos[0] = start_pos[0];
-+ move->start_pos[1] = start_pos[1];
-+ move->dst[0] = start_pos[0] - grab_pos[0];
-+ move->dst[1] = start_pos[1] - grab_pos[1];
-+ memcpy(move->rgn, rgn, sizeof(move->rgn));
-+}
-+
-+static void
-+move_grab_init_workspace(struct move_grab* move,
-+ wl_fixed_t grab_x, wl_fixed_t grab_y,
-+ struct wl_resource *resource)
-+{
-+ struct hmi_controller *hmi_ctrl = wl_resource_get_user_data(resource);
-+ struct ivi_layout_layer *layer = hmi_ctrl->workspace_layer.ivilayer;
-+ int32_t workspace_count = hmi_ctrl->workspace_count;
-+ int32_t workspace_width = hmi_ctrl->workspace_background_layer.width;
-+ int32_t layer_pos_x = 0;
-+ int32_t layer_pos_y = 0;
-+ wl_fixed_t start_pos[2] = {0};
-+ wl_fixed_t rgn[2][2] = {{0}};
-+ wl_fixed_t grab_pos[2] = { grab_x, grab_y };
-+
-+ ivi_layout_layer_get_position(layer, &layer_pos_x, &layer_pos_y);
-+
-+ start_pos[0] = wl_fixed_from_int(layer_pos_x);
-+ start_pos[1] = wl_fixed_from_int(layer_pos_y);
-+
-+ rgn[0][0] = wl_fixed_from_int(-workspace_width * (workspace_count - 1));
-+
-+ rgn[0][1] = wl_fixed_from_int(0);
-+ rgn[1][0] = wl_fixed_from_int(0);
-+ rgn[1][1] = wl_fixed_from_int(0);
-+
-+ move_grab_init(move, start_pos, grab_pos, rgn, resource);
-+}
-+
-+static struct pointer_move_grab *
-+create_workspace_pointer_move(struct weston_pointer *pointer,
-+ struct wl_resource* resource)
-+{
-+ struct pointer_move_grab *pnt_move_grab =
-+ MEM_ALLOC(sizeof(*pnt_move_grab));
-+
-+ pnt_move_grab->base.resource = resource;
-+ move_grab_init_workspace(&pnt_move_grab->move, pointer->grab_x,
-+ pointer->grab_y, resource);
-+
-+ return pnt_move_grab;
-+}
-+
-+static struct touch_move_grab *
-+create_workspace_touch_move(struct weston_touch *touch,
-+ struct wl_resource* resource)
-+{
-+ struct touch_move_grab *tch_move_grab =
-+ MEM_ALLOC(sizeof(*tch_move_grab));
-+
-+ tch_move_grab->base.resource = resource;
-+ tch_move_grab->is_active = 1;
-+ move_grab_init_workspace(&tch_move_grab->move, touch->grab_x,
-+ touch->grab_y, resource);
-+
-+ return tch_move_grab;
-+}
-+
-+static void
-+ivi_hmi_controller_workspace_control(struct wl_client *client,
-+ struct wl_resource *resource,
-+ struct wl_resource *seat_resource,
-+ uint32_t serial)
-+{
-+ struct hmi_controller *hmi_ctrl = wl_resource_get_user_data(resource);
-+ struct ivi_layout_layer *layer = NULL;
-+ struct pointer_move_grab *pnt_move_grab = NULL;
-+ struct touch_move_grab *tch_move_grab = NULL;
-+ struct weston_seat *seat = NULL;
-+ enum HMI_GRAB_DEVICE device;
-+
-+ if (hmi_ctrl->workspace_count < 2)
-+ return;
-+
-+ seat = wl_resource_get_user_data(seat_resource);
-+ device = get_hmi_grab_device(seat, serial);
-+
-+ if (HMI_GRAB_DEVICE_POINTER != device &&
-+ HMI_GRAB_DEVICE_TOUCH != device)
-+ return;
-+
-+ layer = hmi_ctrl->workspace_layer.ivilayer;
-+
-+ ivi_layout_transition_move_layer_cancel(layer);
-+
-+ switch (device) {
-+ case HMI_GRAB_DEVICE_POINTER:
-+ pnt_move_grab = create_workspace_pointer_move(seat->pointer,
-+ resource);
-+
-+ pointer_grab_start(&pnt_move_grab->base, layer,
-+ &pointer_move_grab_workspace_interface,
-+ seat->pointer);
-+ break;
-+
-+ case HMI_GRAB_DEVICE_TOUCH:
-+ tch_move_grab = create_workspace_touch_move(seat->touch,
-+ resource);
-+
-+ touch_grab_start(&tch_move_grab->base, layer,
-+ &touch_move_grab_workspace_interface,
-+ seat->touch);
-+ break;
-+
-+ default:
-+ break;
-+ }
-+}
-+
-+/**
-+ * Implementation of switch_mode
-+ */
-+static void
-+ivi_hmi_controller_switch_mode(struct wl_client *client,
-+ struct wl_resource *resource,
-+ uint32_t layout_mode)
-+{
-+ struct hmi_controller *hmi_ctrl = wl_resource_get_user_data(resource);
-+
-+ switch_mode(hmi_ctrl, layout_mode);
-+}
-+
-+/**
-+ * Implementation of on/off displaying workspace and workspace background
-+ * ivi_layers.
-+ */
-+static void
-+ivi_hmi_controller_home(struct wl_client *client,
-+ struct wl_resource *resource,
-+ uint32_t home)
-+{
-+ struct hmi_controller *hmi_ctrl = wl_resource_get_user_data(resource);
-+ uint32_t is_fade_in;
-+
-+ if ((IVI_HMI_CONTROLLER_HOME_ON == home &&
-+ !hmi_ctrl->workspace_fade.is_fade_in) ||
-+ (IVI_HMI_CONTROLLER_HOME_OFF == home &&
-+ hmi_ctrl->workspace_fade.is_fade_in)) {
-+ is_fade_in = !hmi_ctrl->workspace_fade.is_fade_in;
-+ hmi_controller_fade_run(hmi_ctrl, is_fade_in,
-+ &hmi_ctrl->workspace_fade);
-+ }
-+
-+ ivi_layout_commit_changes();
-+}
-+
-+/**
-+ * binding ivi-hmi-controller implementation
-+ */
-+static const struct ivi_hmi_controller_interface ivi_hmi_controller_implementation = {
-+ ivi_hmi_controller_UI_ready,
-+ ivi_hmi_controller_workspace_control,
-+ ivi_hmi_controller_switch_mode,
-+ ivi_hmi_controller_home
-+};
-+
-+static void
-+unbind_hmi_controller(struct wl_resource *resource)
-+{
-+}
-+
-+static void
-+bind_hmi_controller(struct wl_client *client,
-+ void *data, uint32_t version, uint32_t id)
-+{
-+ struct wl_resource *resource = NULL;
-+ struct hmi_controller *hmi_ctrl = data;
-+
-+ if (hmi_ctrl->user_interface != client) {
-+ wl_resource_post_error(resource,
-+ WL_DISPLAY_ERROR_INVALID_OBJECT,
-+ "hmi-controller failed: permission denied");
-+ return;
-+ }
-+
-+ resource = wl_resource_create(
-+ client, &ivi_hmi_controller_interface, 1, id);
-+
-+ wl_resource_set_implementation(
-+ resource, &ivi_hmi_controller_implementation,
-+ hmi_ctrl, unbind_hmi_controller);
-+}
-+
-+static void
-+launch_hmi_client_process(void *data)
-+{
-+ struct hmi_controller *hmi_ctrl =
-+ (struct hmi_controller *)data;
-+
-+ hmi_ctrl->user_interface =
-+ weston_client_start(hmi_ctrl->compositor,
-+ hmi_ctrl->hmi_setting->ivi_homescreen);
-+
-+ free(hmi_ctrl->hmi_setting->ivi_homescreen);
-+}
-+
-+/*****************************************************************************
-+ * exported functions
-+ ****************************************************************************/
-+
-+WL_EXPORT int
-+module_init(struct weston_compositor *ec,
-+ int *argc, char *argv[])
-+{
-+ struct hmi_controller *hmi_ctrl = hmi_controller_create(ec);
-+ struct wl_event_loop *loop = NULL;
-+
-+ if (wl_global_create(ec->wl_display,
-+ &ivi_hmi_controller_interface, 1,
-+ hmi_ctrl, bind_hmi_controller) == NULL) {
-+ return -1;
-+ }
-+
-+ loop = wl_display_get_event_loop(ec->wl_display);
-+ wl_event_loop_add_idle(loop, launch_hmi_client_process, hmi_ctrl);
-+
-+ return 0;
-+}
---
-1.7.9.5
-
diff --git a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0007-clients-a-reference-implementation-of-UI-client-how-.patch b/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0007-clients-a-reference-implementation-of-UI-client-how-.patch
deleted file mode 100644
index 45f9550..0000000
--- a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0007-clients-a-reference-implementation-of-UI-client-how-.patch
+++ /dev/null
@@ -1,1600 +0,0 @@
-From 82eab90f7842cefa60fbeaa000acc4ae71f7ff8b Mon Sep 17 00:00:00 2001
-From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-Date: Mon, 27 Oct 2014 11:17:51 +0900
-Subject: [PATCH 07/15] clients: a reference implementation of UI client how
- to use ivi-hmi-controller.
-
-- introduces ivi-shell-user-interface.c
-
-This is launched from hmi-controller by launch_hmi_client_process and
-invoke a
-client process.
-
-The basic flow is as followed,
-1/ process invoked
-2/ read configuration from weston.ini.
-3/ draw png file to surface according to configuration of weston.ini
-4/ all parts of UI are ready. request "UI_ready" to draw UI.
-5/ Enter event loop
-6/ If a surface receives touch/pointer event, followings are invoked
-according
- to type of event and surface
-6-1/ If a surface to launch ivi_application receive touch up, it execs
- ivi-application configured in weston.ini.
-6-2/ If a surface to switch layout mode receive touch up, it sends a
-request,
- ivi_hmi_controller_switch_mode, to hmi-controller.
-6-3/ If a surface to show workspace having launchers, it sends a
-request,
- ivi_hmi_controller_home, to hmi-controller.
-6-4/ If touch down events happens in workspace,
- ivi_hmi_controller_workspace_control is sent to slide workspace.
- When control finished, event:
-ivi_hmi_controller_workspace_end_control
- is received.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: remove pthread.h from ivi-shell-user-interface.c
-
-it doesn't refer it anymore.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-
-clients: Change SIGTERM form SIGKILL
-
-> I cannot say, that 'volatile' in this case is wrong. It might even be necessary,
-> since you are changing it from a signal handler, which I probably overlooked.
-> Another mixup I might had is that this volatile is accessed "directly"
-> rather than through a pointer. There was something about variables accessed
-> through a pointer behaving slightly differently...
-> Anyway, since it's modified from a signal handler, keep the 'volatile'.
-> I likely have my own misconceptions about 'volatile'.
-> Btw. you cannot catch SIGKILL. Do you need to catch any signals? This code
-> makes the program exit with EXIT_SUCCESS even if killed by SIGINT.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-user_interface reference. Update Makefile.am
-add xml to BUILT_SOURCES
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface, remove pthread from comment
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface, remove declarations in the middle
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface, remove casts to (void)
-
-> I don't think we need these casts. The warning about unused arguments is disabled, isn't it?
-> You should be able to remove casts to (void) from all places.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface, Check return value of wl_display_dispatch.
-
-> So here is the main loop, and it gracefully ignores all error
-> conditions, which means that this program never exits if it gets
-> disconnected - instead it starts eating 100% CPU until forcefully
-> killed.
-> Now I see why you had the server kill this client. You'd better fix this
-> main loop instead.
-> For guidance, see what simple-shm.c does.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface, Move declaration to top
-
-> Mixed decl & code.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface, Delete signal handlings
-
-> I don't think you need to catch these at all. The default action is to
-> kill the process, which is quite fine. The default action even sets the
-> process exit code properly, unlike these.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface.c , Remove redundant function calls
-
-> _set_user_data() is redundant here, _add_listener() does it too.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface.c, Remove unnecessary do-while
-
-> Using if () { } else if () { ...
-> would let you get rid of one level of indent and the breaks. }
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface.c , Fix Invalid value for registry_listener
-
-> NULL here will cause a segfault when the event arrives.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface.c ,use os_create_anonymous_file when temporary file
-
-> You should use oscreateanonymous_file() instead.
-> Here you forget to e.g. unlink the file, and set the file descriptor CLOEXEC.
-> Oh hey, my /tmp has 109 files from September from this function, and
-> it's not even a tmpfs so they actually ended up on disk. Apparently that
-> is the last time I actually tried to run this.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface, Remove unnecessary function calls
-
-> This is a strange place for a roundtrip.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface.c,Remove unnecessary function calls
-
-> Yet another roundtrip that makes no sense. A flush might be good, except
-> it is the main loop's job to flush.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface.c,Remove unnecessary function calls
-
-> It does not matter if we bind only wl_shm or any number of other global
-> interfaces too, they all will be covered by the same two roundtrips.
-> The mistake the demos used to do is to call dispatch instead of one of
-> the roundtrips, IIRC.
-> For a truly correct solution, you do what weston-info.c does wrt.
-> roundtrips, but the two is enough here.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface,Change appropriate function name
-
-> You call it createWLContext, but what it actually does is create one
-> wlsurface and one wlbuffer.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface,Delete wl_display_roundtrip in function of WLSurface creation
-
-> Why a roundtrip here, isn't the flush enough? Well, this is a strange
-> place for a flush, too.
-> Looks like you just leak everything that gets created through this
-> function. No, wait, maybe you don't? I don't know, all the naming here
-> makes me dizzy. I'd expect a "context" here is basically a singleton,
-> since we have no need multiple contexts, but maybe here it actually
-> means a window?
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface.c ,Add wl_display_roundtrip in function of WLbuffer creation
-
-> Hmm, wonder where the other roundtrip is. Hopefully it happens before
-> you create any wlbuffers, so that the wlshm.format events are
-> guaranteed to been received.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface.c, replace 4 spaces to tab.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface.c, align member of structure
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients: ivi-shell-user-interface.c, align indent of parameters in methods
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
---------------------------------------------------------------
-clients/ivi-shell-user-interface.c: whitespace fixes
-
---------------------------------------------------------------
-clients/ivi-shell-user-interface.c: split long lines
-
-hmi_homescreen_setting_create() lost one level of ident through a little
-refactoring.
-
---------------------------------------------------------------
-clients/ivi-shell-user-interface.c: remove unnecessary braces
----
- Makefile.am | 23 +-
- clients/ivi-shell-user-interface.c | 1308 ++++++++++++++++++++++++++++++++++++
- 2 files changed, 1329 insertions(+), 2 deletions(-)
- create mode 100644 clients/ivi-shell-user-interface.c
-
-diff --git a/Makefile.am b/Makefile.am
-index 76780a8..48cad9b 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -364,6 +364,11 @@ libexec_PROGRAMS += \
- weston-keyboard \
- weston-simple-im
-
-+if ENABLE_IVI_SHELL
-+libexec_PROGRAMS += \
-+ weston-ivi-shell-user-interface
-+endif
-+
- demo_clients = \
- weston-flower \
- weston-image \
-@@ -590,6 +595,17 @@ nodist_weston_desktop_shell_SOURCES = \
- weston_desktop_shell_LDADD = libtoytoolkit.la
- weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
-
-+if ENABLE_IVI_SHELL
-+weston_ivi_shell_user_interface_SOURCES = clients/ivi-shell-user-interface.c
-+nodist_weston_ivi_shell_user_interface_SOURCES = \
-+ protocol/ivi-hmi-controller-client-protocol.h \
-+ protocol/ivi-hmi-controller-protocol.c \
-+ protocol/ivi-application-client-protocol.h \
-+ protocol/ivi-application-protocol.c
-+weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
-+weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
-+endif
-+
- if BUILD_FULL_GL_CLIENTS
- demo_clients += weston-gears
- weston_gears_SOURCES = clients/gears.c
-@@ -636,8 +652,11 @@ BUILT_SOURCES += \
- protocol/fullscreen-shell-protocol.c \
- protocol/fullscreen-shell-client-protocol.h \
- protocol/xdg-shell-protocol.c \
-- protocol/xdg-shell-client-protocol.h
--
-+ protocol/xdg-shell-client-protocol.h \
-+ protocol/ivi-hmi-controller-protocol.c \
-+ protocol/ivi-hmi-controller-client-protocol.h \
-+ protocol/ivi-application-protocol.c \
-+ protocol/ivi-application-client-protocol.h
-
- westondatadir = $(datadir)/weston
- dist_westondata_DATA = \
-diff --git a/clients/ivi-shell-user-interface.c b/clients/ivi-shell-user-interface.c
-new file mode 100644
-index 0000000..3c69541
---- /dev/null
-+++ b/clients/ivi-shell-user-interface.c
-@@ -0,0 +1,1308 @@
-+/*
-+ * Copyright (C) 2013 DENSO CORPORATION
-+ *
-+ * Permission to use, copy, modify, distribute, and sell this software and
-+ * its documentation for any purpose is hereby granted without fee, provided
-+ * that the above copyright notice appear in all copies and that both that
-+ * copyright notice and this permission notice appear in supporting
-+ * documentation, and that the name of the copyright holders not be used in
-+ * advertising or publicity pertaining to distribution of the software
-+ * without specific, written prior permission. The copyright holders make
-+ * no representations about the suitability of this software for any
-+ * purpose. It is provided "as is" without express or implied warranty.
-+ *
-+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
-+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
-+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
-+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
-+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ */
-+
-+#include <sys/wait.h>
-+#include <unistd.h>
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <string.h>
-+#include <linux/input.h>
-+#include <assert.h>
-+#include <fcntl.h>
-+#include <signal.h>
-+#include <sys/mman.h>
-+#include <getopt.h>
-+#include <wayland-cursor.h>
-+#include "../shared/cairo-util.h"
-+#include "../shared/config-parser.h"
-+#include "../shared/os-compatibility.h"
-+#include "ivi-application-client-protocol.h"
-+#include "ivi-hmi-controller-client-protocol.h"
-+
-+/**
-+ * A reference implementation how to use ivi-hmi-controller interface to
-+ * interact with hmi-controller. This is launched from hmi-controller by using
-+ * hmi_client_start and create a pthread.
-+ *
-+ * The basic flow is as followed,
-+ * 1/ read configuration from weston.ini.
-+ * 2/ draw png file to surface according to configuration of weston.ini
-+ * 3/ set up UI by using ivi-hmi-controller protocol
-+ * 4/ Enter event loop
-+ * 5/ If a surface receives touch/pointer event, followings are invoked
-+ * according to type of event and surface
-+ * 5-1/ If a surface to launch ivi_application receive touch up, it execs
-+ * ivi-application configured in weston.ini.
-+ * 5-2/ If a surface to switch layout mode receive touch up, it sends a request,
-+ * ivi_hmi_controller_switch_mode, to hmi-controller.
-+ * 5-3/ If a surface to show workspace having launchers, it sends a request,
-+ * ivi_hmi_controller_home, to hmi-controller.
-+ * 5-4/ If touch down events happens in workspace,
-+ * ivi_hmi_controller_workspace_control is sent to slide workspace.
-+ * When control finished, event: ivi_hmi_controller_workspace_end_control
-+ * is received.
-+ */
-+
-+/*****************************************************************************
-+ * structure, globals
-+ ****************************************************************************/
-+enum cursor_type {
-+ CURSOR_BOTTOM_LEFT,
-+ CURSOR_BOTTOM_RIGHT,
-+ CURSOR_BOTTOM,
-+ CURSOR_DRAGGING,
-+ CURSOR_LEFT_PTR,
-+ CURSOR_LEFT,
-+ CURSOR_RIGHT,
-+ CURSOR_TOP_LEFT,
-+ CURSOR_TOP_RIGHT,
-+ CURSOR_TOP,
-+ CURSOR_IBEAM,
-+ CURSOR_HAND1,
-+ CURSOR_WATCH,
-+
-+ CURSOR_BLANK
-+};
-+struct wlContextCommon {
-+ struct wl_display *wlDisplay;
-+ struct wl_registry *wlRegistry;
-+ struct wl_compositor *wlCompositor;
-+ struct wl_shm *wlShm;
-+ struct wl_seat *wlSeat;
-+ struct wl_pointer *wlPointer;
-+ struct wl_touch *wlTouch;
-+ struct ivi_application *iviApplication;
-+ struct ivi_hmi_controller *hmiCtrl;
-+ struct hmi_homescreen_setting *hmi_setting;
-+ struct wl_list *list_wlContextStruct;
-+ struct wl_surface *enterSurface;
-+ int32_t is_home_on;
-+ struct wl_cursor_theme *cursor_theme;
-+ struct wl_cursor **cursors;
-+ struct wl_surface *pointer_surface;
-+ enum cursor_type current_cursor;
-+ uint32_t enter_serial;
-+};
-+
-+struct wlContextStruct {
-+ struct wlContextCommon cmm;
-+ struct wl_surface *wlSurface;
-+ struct wl_buffer *wlBuffer;
-+ uint32_t formats;
-+ cairo_surface_t *ctx_image;
-+ void *data;
-+ uint32_t id_surface;
-+ struct wl_list link;
-+};
-+
-+struct
-+hmi_homescreen_srf {
-+ uint32_t id;
-+ char *filePath;
-+ uint32_t color;
-+};
-+
-+struct
-+hmi_homescreen_workspace {
-+ struct wl_array launcher_id_array;
-+ struct wl_list link;
-+};
-+
-+struct
-+hmi_homescreen_launcher {
-+ uint32_t icon_surface_id;
-+ uint32_t workspace_id;
-+ char *icon;
-+ char *path;
-+ struct wl_list link;
-+};
-+
-+struct
-+hmi_homescreen_setting {
-+ struct hmi_homescreen_srf background;
-+ struct hmi_homescreen_srf panel;
-+ struct hmi_homescreen_srf tiling;
-+ struct hmi_homescreen_srf sidebyside;
-+ struct hmi_homescreen_srf fullscreen;
-+ struct hmi_homescreen_srf random;
-+ struct hmi_homescreen_srf home;
-+ struct hmi_homescreen_srf workspace_background;
-+
-+ struct wl_list workspace_list;
-+ struct wl_list launcher_list;
-+
-+ char *cursor_theme;
-+ int32_t cursor_size;
-+ uint32_t transition_duration;
-+};
-+
-+static void *
-+fail_on_null(void *p, size_t size, char *file, int32_t line)
-+{
-+ if (size && !p) {
-+ fprintf(stderr, "%s(%d) %zd: out of memory\n",
-+ file, line, size);
-+ exit(EXIT_FAILURE);
-+ }
-+
-+ return p;
-+}
-+
-+static void *
-+mem_alloc(size_t size, char *file, int32_t line)
-+{
-+ return fail_on_null(calloc(1, size), size, file, line);
-+}
-+
-+#define MEM_ALLOC(s) mem_alloc((s),__FILE__,__LINE__)
-+#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
-+
-+/*****************************************************************************
-+ * Event Handler
-+ ****************************************************************************/
-+
-+static void
-+shm_format(void *data, struct wl_shm *pWlShm, uint32_t format)
-+{
-+ struct wlContextStruct *pDsp = data;
-+ pDsp->formats |= (1 << format);
-+}
-+
-+static struct wl_shm_listener shm_listenter = {
-+ shm_format
-+};
-+
-+static int32_t
-+getIdOfWlSurface(struct wlContextCommon *pCtx, struct wl_surface *wlSurface)
-+{
-+ struct wlContextStruct *pWlCtxSt = NULL;
-+
-+ if (NULL == pCtx || NULL == wlSurface )
-+ return 0;
-+
-+ wl_list_for_each(pWlCtxSt, pCtx->list_wlContextStruct, link) {
-+ if (pWlCtxSt->wlSurface == wlSurface)
-+ return pWlCtxSt->id_surface;
-+ }
-+
-+ return -1;
-+}
-+
-+static void
-+set_pointer_image(struct wlContextCommon *pCtx, uint32_t index)
-+{
-+ struct wl_cursor *cursor = NULL;
-+ struct wl_cursor_image *image = NULL;
-+ struct wl_buffer *buffer = NULL;
-+
-+ if (!pCtx->wlPointer || !pCtx->cursors)
-+ return;
-+
-+ if (CURSOR_BLANK == pCtx->current_cursor) {
-+ wl_pointer_set_cursor(pCtx->wlPointer, pCtx->enter_serial,
-+ NULL, 0, 0);
-+ return;
-+ }
-+
-+ cursor = pCtx->cursors[pCtx->current_cursor];
-+ if (!cursor)
-+ return;
-+
-+ if (cursor->image_count <= index) {
-+ fprintf(stderr, "cursor index out of range\n");
-+ return;
-+ }
-+
-+ image = cursor->images[index];
-+ buffer = wl_cursor_image_get_buffer(image);
-+
-+ if (!buffer)
-+ return;
-+
-+ wl_pointer_set_cursor(pCtx->wlPointer, pCtx->enter_serial,
-+ pCtx->pointer_surface,
-+ image->hotspot_x, image->hotspot_y);
-+
-+ wl_surface_attach(pCtx->pointer_surface, buffer, 0, 0);
-+
-+ wl_surface_damage(pCtx->pointer_surface, 0, 0,
-+ image->width, image->height);
-+
-+ wl_surface_commit(pCtx->pointer_surface);
-+}
-+
-+static void
-+PointerHandleEnter(void *data, struct wl_pointer *wlPointer, uint32_t serial,
-+ struct wl_surface *wlSurface, wl_fixed_t sx, wl_fixed_t sy)
-+{
-+ struct wlContextCommon *pCtx = data;
-+
-+ pCtx->enter_serial = serial;
-+ pCtx->enterSurface = wlSurface;
-+ set_pointer_image(pCtx, 0);
-+#ifdef _DEBUG
-+ printf("ENTER PointerHandleEnter: x(%d), y(%d)\n", sx, sy);
-+#endif
-+}
-+
-+static void
-+PointerHandleLeave(void *data, struct wl_pointer *wlPointer, uint32_t serial,
-+ struct wl_surface *wlSurface)
-+{
-+ struct wlContextCommon *pCtx = data;
-+
-+ pCtx->enterSurface = NULL;
-+
-+#ifdef _DEBUG
-+ printf("ENTER PointerHandleLeave: serial(%d)\n", serial);
-+#endif
-+}
-+
-+static void
-+PointerHandleMotion(void *data, struct wl_pointer *wlPointer, uint32_t time,
-+ wl_fixed_t sx, wl_fixed_t sy)
-+{
-+#ifdef _DEBUG
-+ printf("ENTER PointerHandleMotion: x(%d), y(%d)\n",
-+ gPointerX, gPointerY);
-+#endif
-+}
-+
-+/**
-+ * if a surface assigned as launcher receives touch-off event, invoking
-+ * ivi-application which configured in weston.ini with path to binary.
-+ */
-+extern char **environ; /*defied by libc */
-+
-+static pid_t
-+execute_process(char *path, char *argv[])
-+{
-+ pid_t pid = fork();
-+ if (pid < 0)
-+ fprintf(stderr, "Failed to fork\n");
-+
-+ if (pid)
-+ return pid;
-+
-+ if (-1 == execve(path, argv, environ)) {
-+ fprintf(stderr, "Failed to execve %s\n", path);
-+ exit(1);
-+ }
-+
-+ return pid;
-+}
-+
-+static int32_t
-+launcher_button(uint32_t surfaceId, struct wl_list *launcher_list)
-+{
-+ struct hmi_homescreen_launcher *launcher = NULL;
-+
-+ wl_list_for_each(launcher, launcher_list, link) {
-+ char *argv[] = { NULL };
-+
-+ if (surfaceId != launcher->icon_surface_id)
-+ continue;
-+
-+ execute_process(launcher->path, argv);
-+
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-+
-+/**
-+ * is-method to identify a surface set as launcher in workspace or workspace
-+ * itself. This is-method is used to decide whether request;
-+ * ivi_hmi_controller_workspace_control is sent or not.
-+ */
-+static int32_t
-+isWorkspaceSurface(uint32_t id, struct hmi_homescreen_setting *hmi_setting)
-+{
-+ struct hmi_homescreen_launcher *launcher = NULL;
-+
-+ if (id == hmi_setting->workspace_background.id)
-+ return 1;
-+
-+ wl_list_for_each(launcher, &hmi_setting->launcher_list, link) {
-+ if (id == launcher->icon_surface_id)
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-+
-+/**
-+ * Decide which request is sent to hmi-controller
-+ */
-+static void
-+touch_up(struct ivi_hmi_controller *hmi_ctrl, uint32_t id_surface,
-+ int32_t *is_home_on, struct hmi_homescreen_setting *hmi_setting)
-+{
-+ if (launcher_button(id_surface, &hmi_setting->launcher_list)) {
-+ *is_home_on = 0;
-+ ivi_hmi_controller_home(hmi_ctrl, IVI_HMI_CONTROLLER_HOME_OFF);
-+ } else if (id_surface == hmi_setting->tiling.id) {
-+ ivi_hmi_controller_switch_mode(hmi_ctrl,
-+ IVI_HMI_CONTROLLER_LAYOUT_MODE_TILING);
-+ } else if (id_surface == hmi_setting->sidebyside.id) {
-+ ivi_hmi_controller_switch_mode(hmi_ctrl,
-+ IVI_HMI_CONTROLLER_LAYOUT_MODE_SIDE_BY_SIDE);
-+ } else if (id_surface == hmi_setting->fullscreen.id) {
-+ ivi_hmi_controller_switch_mode(hmi_ctrl,
-+ IVI_HMI_CONTROLLER_LAYOUT_MODE_FULL_SCREEN);
-+ } else if (id_surface == hmi_setting->random.id) {
-+ ivi_hmi_controller_switch_mode(hmi_ctrl,
-+ IVI_HMI_CONTROLLER_LAYOUT_MODE_RANDOM);
-+ } else if (id_surface == hmi_setting->home.id) {
-+ *is_home_on = !(*is_home_on);
-+ if (*is_home_on) {
-+ ivi_hmi_controller_home(hmi_ctrl,
-+ IVI_HMI_CONTROLLER_HOME_ON);
-+ } else {
-+ ivi_hmi_controller_home(hmi_ctrl,
-+ IVI_HMI_CONTROLLER_HOME_OFF);
-+ }
-+ }
-+}
-+
-+/**
-+ * Even handler of Pointer event. IVI system is usually manipulated by touch
-+ * screen. However, some systems also have pointer device.
-+ * Release is the same behavior as touch off
-+ * Pressed is the same behavior as touch on
-+ */
-+static void
-+PointerHandleButton(void *data, struct wl_pointer *wlPointer, uint32_t serial,
-+ uint32_t time, uint32_t button, uint32_t state)
-+{
-+ struct wlContextCommon *pCtx = data;
-+ struct ivi_hmi_controller *hmi_ctrl = pCtx->hmiCtrl;
-+ const uint32_t id_surface = getIdOfWlSurface(pCtx, pCtx->enterSurface);
-+
-+ if (BTN_RIGHT == button)
-+ return;
-+
-+ switch (state) {
-+ case WL_POINTER_BUTTON_STATE_RELEASED:
-+ touch_up(hmi_ctrl, id_surface, &pCtx->is_home_on,
-+ pCtx->hmi_setting);
-+ break;
-+
-+ case WL_POINTER_BUTTON_STATE_PRESSED:
-+
-+ if (isWorkspaceSurface(id_surface, pCtx->hmi_setting)) {
-+ ivi_hmi_controller_workspace_control(hmi_ctrl,
-+ pCtx->wlSeat,
-+ serial);
-+ }
-+
-+ break;
-+ }
-+#ifdef _DEBUG
-+ printf("ENTER PointerHandleButton: button(%d), state(%d)\n",
-+ button, state);
-+#endif
-+}
-+
-+static void
-+PointerHandleAxis(void *data, struct wl_pointer *wlPointer, uint32_t time,
-+ uint32_t axis, wl_fixed_t value)
-+{
-+#ifdef _DEBUG
-+ printf("ENTER PointerHandleAxis: axis(%d), value(%d)\n", axis, value);
-+#endif
-+}
-+
-+static struct wl_pointer_listener pointer_listener = {
-+ PointerHandleEnter,
-+ PointerHandleLeave,
-+ PointerHandleMotion,
-+ PointerHandleButton,
-+ PointerHandleAxis
-+};
-+
-+/**
-+ * Even handler of touch event
-+ */
-+static void
-+TouchHandleDown(void *data, struct wl_touch *wlTouch, uint32_t serial,
-+ uint32_t time, struct wl_surface *surface, int32_t id,
-+ wl_fixed_t x_w, wl_fixed_t y_w)
-+{
-+ struct wlContextCommon *pCtx = data;
-+ struct ivi_hmi_controller *hmi_ctrl = pCtx->hmiCtrl;
-+ uint32_t id_surface = 0;
-+
-+ if (0 == id)
-+ pCtx->enterSurface = surface;
-+
-+ id_surface = getIdOfWlSurface(pCtx, pCtx->enterSurface);
-+
-+ /**
-+ * When touch down happens on surfaces of workspace, ask
-+ * hmi-controller to start control workspace to select page of
-+ * workspace. After sending seat to hmi-controller by
-+ * ivi_hmi_controller_workspace_control,
-+ * hmi-controller-homescreen doesn't receive any event till
-+ * hmi-controller sends back it.
-+ */
-+ if (isWorkspaceSurface(id_surface, pCtx->hmi_setting)) {
-+ ivi_hmi_controller_workspace_control(hmi_ctrl, pCtx->wlSeat,
-+ serial);
-+ }
-+}
-+
-+static void
-+TouchHandleUp(void *data, struct wl_touch *wlTouch, uint32_t serial,
-+ uint32_t time, int32_t id)
-+{
-+ struct wlContextCommon *pCtx = data;
-+ struct ivi_hmi_controller *hmi_ctrl = pCtx->hmiCtrl;
-+
-+ const uint32_t id_surface = getIdOfWlSurface(pCtx, pCtx->enterSurface);
-+
-+ /**
-+ * triggering event according to touch-up happening on which surface.
-+ */
-+ if (id == 0){
-+ touch_up(hmi_ctrl, id_surface, &pCtx->is_home_on,
-+ pCtx->hmi_setting);
-+ }
-+}
-+
-+static void
-+TouchHandleMotion(void *data, struct wl_touch *wlTouch, uint32_t time,
-+ int32_t id, wl_fixed_t x_w, wl_fixed_t y_w)
-+{
-+}
-+
-+static void
-+TouchHandleFrame(void *data, struct wl_touch *wlTouch)
-+{
-+}
-+
-+static void
-+TouchHandleCancel(void *data, struct wl_touch *wlTouch)
-+{
-+}
-+
-+static struct wl_touch_listener touch_listener = {
-+ TouchHandleDown,
-+ TouchHandleUp,
-+ TouchHandleMotion,
-+ TouchHandleFrame,
-+ TouchHandleCancel,
-+};
-+
-+/**
-+ * Handler of capabilities
-+ */
-+static void
-+seat_handle_capabilities(void *data, struct wl_seat *seat, uint32_t caps)
-+{
-+ struct wlContextCommon *p_wlCtx = (struct wlContextCommon*)data;
-+ struct wl_seat *wlSeat = p_wlCtx->wlSeat;
-+ struct wl_pointer *wlPointer = p_wlCtx->wlPointer;
-+ struct wl_touch *wlTouch = p_wlCtx->wlTouch;
-+
-+ if (p_wlCtx->hmi_setting->cursor_theme) {
-+ if ((caps & WL_SEAT_CAPABILITY_POINTER) && !wlPointer){
-+ wlPointer = wl_seat_get_pointer(wlSeat);
-+ wl_pointer_add_listener(wlPointer,
-+ &pointer_listener, data);
-+ } else
-+ if (!(caps & WL_SEAT_CAPABILITY_POINTER) && wlPointer){
-+ wl_pointer_destroy(wlPointer);
-+ wlPointer = NULL;
-+ }
-+ p_wlCtx->wlPointer = wlPointer;
-+ }
-+
-+ if ((caps & WL_SEAT_CAPABILITY_TOUCH) && !wlTouch){
-+ wlTouch = wl_seat_get_touch(wlSeat);
-+ wl_touch_add_listener(wlTouch, &touch_listener, data);
-+ } else
-+ if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && wlTouch){
-+ wl_touch_destroy(wlTouch);
-+ wlTouch = NULL;
-+ }
-+ p_wlCtx->wlTouch = wlTouch;
-+}
-+
-+static struct wl_seat_listener seat_Listener = {
-+ seat_handle_capabilities,
-+};
-+
-+/**
-+ * Registration of event
-+ * This event is received when hmi-controller server finished controlling
-+ * workspace.
-+ */
-+static void
-+ivi_hmi_controller_workspace_end_control(void *data,
-+ struct ivi_hmi_controller *hmi_ctrl,
-+ int32_t is_controlled)
-+{
-+ struct wlContextCommon *pCtx = data;
-+ const uint32_t id_surface = getIdOfWlSurface(pCtx, pCtx->enterSurface);
-+
-+ if (is_controlled)
-+ return;
-+
-+ /**
-+ * During being controlled by hmi-controller, any input event is not
-+ * notified. So when control ends with touch up, it invokes launcher
-+ * if up event happens on a launcher surface.
-+ *
-+ */
-+ if (launcher_button(id_surface, &pCtx->hmi_setting->launcher_list)) {
-+ pCtx->is_home_on = 0;
-+ ivi_hmi_controller_home(hmi_ctrl, IVI_HMI_CONTROLLER_HOME_OFF);
-+ }
-+}
-+
-+static const struct ivi_hmi_controller_listener hmi_controller_listener = {
-+ ivi_hmi_controller_workspace_end_control
-+};
-+
-+/**
-+ * Registration of interfaces
-+ */
-+static void
-+registry_handle_global(void *data, struct wl_registry *registry, uint32_t name,
-+ const char *interface, uint32_t version)
-+{
-+ struct wlContextCommon *p_wlCtx = (struct wlContextCommon*)data;
-+
-+ if (!strcmp(interface, "wl_compositor")) {
-+ p_wlCtx->wlCompositor =
-+ wl_registry_bind(registry, name,
-+ &wl_compositor_interface, 1);
-+ } else if (!strcmp(interface, "wl_shm")) {
-+ p_wlCtx->wlShm =
-+ wl_registry_bind(registry, name, &wl_shm_interface, 1);
-+ wl_shm_add_listener(p_wlCtx->wlShm, &shm_listenter, p_wlCtx);
-+ } else if (!strcmp(interface, "wl_seat")) {
-+ p_wlCtx->wlSeat =
-+ wl_registry_bind(registry, name, &wl_seat_interface, 1);
-+ wl_seat_add_listener(p_wlCtx->wlSeat, &seat_Listener, data);
-+ } else if (!strcmp(interface, "ivi_application")) {
-+ p_wlCtx->iviApplication =
-+ wl_registry_bind(registry, name,
-+ &ivi_application_interface, 1);
-+ } else if (!strcmp(interface, "ivi_hmi_controller")) {
-+ p_wlCtx->hmiCtrl =
-+ wl_registry_bind(registry, name,
-+ &ivi_hmi_controller_interface, 1);
-+
-+ if (p_wlCtx->hmiCtrl) {
-+ ivi_hmi_controller_add_listener(p_wlCtx->hmiCtrl,
-+ &hmi_controller_listener, p_wlCtx);
-+ }
-+ }
-+}
-+
-+static void
-+registry_handle_global_remove(void *data, struct wl_registry *registry,
-+ uint32_t name)
-+{
-+}
-+
-+static const struct wl_registry_listener registry_listener = {
-+ registry_handle_global,
-+ registry_handle_global_remove
-+};
-+
-+static void
-+frame_listener_func(void *data, struct wl_callback *callback, uint32_t time)
-+{
-+ if (callback)
-+ wl_callback_destroy(callback);
-+}
-+
-+static const struct wl_callback_listener frame_listener = {
-+ frame_listener_func
-+};
-+
-+/*
-+ * The following correspondences between file names and cursors was copied
-+ * from: https://bugs.kde.org/attachment.cgi?id=67313
-+ */
-+static const char *bottom_left_corners[] = {
-+ "bottom_left_corner",
-+ "sw-resize",
-+ "size_bdiag"
-+};
-+
-+static const char *bottom_right_corners[] = {
-+ "bottom_right_corner",
-+ "se-resize",
-+ "size_fdiag"
-+};
-+
-+static const char *bottom_sides[] = {
-+ "bottom_side",
-+ "s-resize",
-+ "size_ver"
-+};
-+
-+static const char *grabbings[] = {
-+ "grabbing",
-+ "closedhand",
-+ "208530c400c041818281048008011002"
-+};
-+
-+static const char *left_ptrs[] = {
-+ "left_ptr",
-+ "default",
-+ "top_left_arrow",
-+ "left-arrow"
-+};
-+
-+static const char *left_sides[] = {
-+ "left_side",
-+ "w-resize",
-+ "size_hor"
-+};
-+
-+static const char *right_sides[] = {
-+ "right_side",
-+ "e-resize",
-+ "size_hor"
-+};
-+
-+static const char *top_left_corners[] = {
-+ "top_left_corner",
-+ "nw-resize",
-+ "size_fdiag"
-+};
-+
-+static const char *top_right_corners[] = {
-+ "top_right_corner",
-+ "ne-resize",
-+ "size_bdiag"
-+};
-+
-+static const char *top_sides[] = {
-+ "top_side",
-+ "n-resize",
-+ "size_ver"
-+};
-+
-+static const char *xterms[] = {
-+ "xterm",
-+ "ibeam",
-+ "text"
-+};
-+
-+static const char *hand1s[] = {
-+ "hand1",
-+ "pointer",
-+ "pointing_hand",
-+ "e29285e634086352946a0e7090d73106"
-+};
-+
-+static const char *watches[] = {
-+ "watch",
-+ "wait",
-+ "0426c94ea35c87780ff01dc239897213"
-+};
-+
-+struct cursor_alternatives {
-+ const char **names;
-+ size_t count;
-+};
-+
-+static const struct cursor_alternatives cursors[] = {
-+ { bottom_left_corners, ARRAY_LENGTH(bottom_left_corners) },
-+ { bottom_right_corners, ARRAY_LENGTH(bottom_right_corners) },
-+ { bottom_sides, ARRAY_LENGTH(bottom_sides) },
-+ { grabbings, ARRAY_LENGTH(grabbings) },
-+ { left_ptrs, ARRAY_LENGTH(left_ptrs) },
-+ { left_sides, ARRAY_LENGTH(left_sides) },
-+ { right_sides, ARRAY_LENGTH(right_sides) },
-+ { top_left_corners, ARRAY_LENGTH(top_left_corners) },
-+ { top_right_corners, ARRAY_LENGTH(top_right_corners) },
-+ { top_sides, ARRAY_LENGTH(top_sides) },
-+ { xterms, ARRAY_LENGTH(xterms) },
-+ { hand1s, ARRAY_LENGTH(hand1s) },
-+ { watches, ARRAY_LENGTH(watches) },
-+};
-+
-+static void
-+create_cursors(struct wlContextCommon *cmm)
-+{
-+ uint32_t i = 0;
-+ uint32_t j = 0;
-+ struct wl_cursor *cursor = NULL;
-+ char *cursor_theme = cmm->hmi_setting->cursor_theme;
-+ int32_t cursor_size = cmm->hmi_setting->cursor_size;
-+
-+ cmm->cursor_theme = wl_cursor_theme_load(cursor_theme, cursor_size,
-+ cmm->wlShm);
-+
-+ cmm->cursors =
-+ MEM_ALLOC(ARRAY_LENGTH(cursors) * sizeof(cmm->cursors[0]));
-+
-+ for (i = 0; i < ARRAY_LENGTH(cursors); i++) {
-+ cursor = NULL;
-+
-+ for (j = 0; !cursor && j < cursors[i].count; ++j) {
-+ cursor = wl_cursor_theme_get_cursor(
-+ cmm->cursor_theme, cursors[i].names[j]);
-+ }
-+
-+ if (!cursor) {
-+ fprintf(stderr, "could not load cursor '%s'\n",
-+ cursors[i].names[0]);
-+ }
-+
-+ cmm->cursors[i] = cursor;
-+ }
-+}
-+
-+static void
-+destroy_cursors(struct wlContextCommon *cmm)
-+{
-+ if (cmm->cursor_theme)
-+ wl_cursor_theme_destroy(cmm->cursor_theme);
-+
-+ free(cmm->cursors);
-+}
-+
-+/**
-+ * Internal method to prepare parts of UI
-+ */
-+static void
-+createShmBuffer(struct wlContextStruct *p_wlCtx)
-+{
-+ struct wl_shm_pool *pool;
-+
-+ int fd = -1;
-+ int size = 0;
-+ int width = 0;
-+ int height = 0;
-+ int stride = 0;
-+
-+ width = cairo_image_surface_get_width(p_wlCtx->ctx_image);
-+ height = cairo_image_surface_get_height(p_wlCtx->ctx_image);
-+ stride = cairo_image_surface_get_stride(p_wlCtx->ctx_image);
-+
-+ size = stride * height;
-+
-+ fd = os_create_anonymous_file(size);
-+ if (fd < 0) {
-+ fprintf(stderr, "creating a buffer file for %d B failed: %m\n",
-+ size);
-+ return ;
-+ }
-+
-+ p_wlCtx->data =
-+ mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-+
-+ if (MAP_FAILED == p_wlCtx->data) {
-+ fprintf(stderr, "mmap failed: %m\n");
-+ close(fd);
-+ return;
-+ }
-+
-+ pool = wl_shm_create_pool(p_wlCtx->cmm.wlShm, fd, size);
-+ p_wlCtx->wlBuffer = wl_shm_pool_create_buffer(pool, 0,
-+ width,
-+ height,
-+ stride,
-+ WL_SHM_FORMAT_ARGB8888);
-+
-+ if (NULL == p_wlCtx->wlBuffer) {
-+ fprintf(stderr, "wl_shm_create_buffer failed: %m\n");
-+ close(fd);
-+ return;
-+ }
-+
-+ wl_display_roundtrip(p_wlCtx->cmm.wlDisplay);
-+
-+ wl_shm_pool_destroy(pool);
-+ close(fd);
-+
-+ return;
-+}
-+
-+static void
-+destroyWLContextCommon(struct wlContextCommon *p_wlCtx)
-+{
-+ destroy_cursors(p_wlCtx);
-+
-+ if (p_wlCtx->pointer_surface)
-+ wl_surface_destroy(p_wlCtx->pointer_surface);
-+
-+ if (p_wlCtx->wlCompositor)
-+ wl_compositor_destroy(p_wlCtx->wlCompositor);
-+}
-+
-+static void
-+destroyWLContextStruct(struct wlContextStruct *p_wlCtx)
-+{
-+ if (p_wlCtx->wlSurface)
-+ wl_surface_destroy(p_wlCtx->wlSurface);
-+
-+ if (p_wlCtx->ctx_image) {
-+ cairo_surface_destroy(p_wlCtx->ctx_image);
-+ p_wlCtx->ctx_image = NULL;
-+ }
-+}
-+
-+static int
-+createSurface(struct wlContextStruct *p_wlCtx)
-+{
-+ p_wlCtx->wlSurface =
-+ wl_compositor_create_surface(p_wlCtx->cmm.wlCompositor);
-+ if (NULL == p_wlCtx->wlSurface) {
-+ printf("Error: wl_compositor_create_surface failed.\n");
-+ destroyWLContextCommon(&p_wlCtx->cmm);
-+ abort();
-+ }
-+
-+ return 0;
-+}
-+
-+static void
-+drawImage(struct wlContextStruct *p_wlCtx)
-+{
-+ struct wl_callback *callback;
-+
-+ int width = 0;
-+ int height = 0;
-+ int stride = 0;
-+ void *data = NULL;
-+
-+ width = cairo_image_surface_get_width(p_wlCtx->ctx_image);
-+ height = cairo_image_surface_get_height(p_wlCtx->ctx_image);
-+ stride = cairo_image_surface_get_stride(p_wlCtx->ctx_image);
-+ data = cairo_image_surface_get_data(p_wlCtx->ctx_image);
-+
-+ memcpy(p_wlCtx->data, data, stride * height);
-+
-+ wl_surface_attach(p_wlCtx->wlSurface, p_wlCtx->wlBuffer, 0, 0);
-+ wl_surface_damage(p_wlCtx->wlSurface, 0, 0, width, height);
-+
-+ callback = wl_surface_frame(p_wlCtx->wlSurface);
-+ wl_callback_add_listener(callback, &frame_listener, NULL);
-+
-+ wl_surface_commit(p_wlCtx->wlSurface);
-+
-+ wl_display_roundtrip(p_wlCtx->cmm.wlDisplay);
-+}
-+
-+static void
-+create_ivisurface(struct wlContextStruct *p_wlCtx,
-+ uint32_t id_surface,
-+ cairo_surface_t *surface)
-+{
-+ struct ivi_surface *ivisurf = NULL;
-+
-+ p_wlCtx->ctx_image = surface;
-+
-+ p_wlCtx->id_surface = id_surface;
-+ wl_list_init(&p_wlCtx->link);
-+ wl_list_insert(p_wlCtx->cmm.list_wlContextStruct, &p_wlCtx->link);
-+
-+ createSurface(p_wlCtx);
-+ createShmBuffer(p_wlCtx);
-+
-+ ivisurf = ivi_application_surface_create(p_wlCtx->cmm.iviApplication,
-+ id_surface,
-+ p_wlCtx->wlSurface);
-+ if (ivisurf == NULL) {
-+ fprintf(stderr, "Failed to create ivi_client_surface\n");
-+ return;
-+ }
-+
-+ drawImage(p_wlCtx);
-+}
-+
-+static void
-+create_ivisurfaceFromFile(struct wlContextStruct *p_wlCtx,
-+ uint32_t id_surface,
-+ const char *imageFile)
-+{
-+ cairo_surface_t *surface = load_cairo_surface(imageFile);
-+
-+ if (NULL == surface) {
-+ fprintf(stderr, "Failed to load_cairo_surface %s\n", imageFile);
-+ return;
-+ }
-+
-+ create_ivisurface(p_wlCtx, id_surface, surface);
-+}
-+
-+static void
-+set_hex_color(cairo_t *cr, uint32_t color)
-+{
-+ cairo_set_source_rgba(cr,
-+ ((color >> 16) & 0xff) / 255.0,
-+ ((color >> 8) & 0xff) / 255.0,
-+ ((color >> 0) & 0xff) / 255.0,
-+ ((color >> 24) & 0xff) / 255.0);
-+}
-+
-+static void
-+create_ivisurfaceFromColor(struct wlContextStruct *p_wlCtx,
-+ uint32_t id_surface,
-+ uint32_t width, uint32_t height,
-+ uint32_t color)
-+{
-+ cairo_surface_t *surface = NULL;
-+ cairo_t *cr = NULL;
-+
-+ surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
-+ width, height);
-+
-+ cr = cairo_create(surface);
-+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
-+ cairo_rectangle(cr, 0, 0, width, height);
-+ set_hex_color(cr, color);
-+ cairo_fill(cr);
-+ cairo_destroy(cr);
-+
-+ create_ivisurface(p_wlCtx, id_surface, surface);
-+}
-+
-+static void
-+UI_ready(struct ivi_hmi_controller *controller)
-+{
-+ ivi_hmi_controller_UI_ready(controller);
-+}
-+
-+/**
-+ * Internal method to set up UI by using ivi-hmi-controller
-+ */
-+static void
-+create_background(struct wlContextStruct *p_wlCtx, const uint32_t id_surface,
-+ const char *imageFile)
-+{
-+ create_ivisurfaceFromFile(p_wlCtx, id_surface, imageFile);
-+}
-+
-+static void
-+create_panel(struct wlContextStruct *p_wlCtx, const uint32_t id_surface,
-+ const char *imageFile)
-+{
-+ create_ivisurfaceFromFile(p_wlCtx, id_surface, imageFile);
-+}
-+
-+static void
-+create_button(struct wlContextStruct *p_wlCtx, const uint32_t id_surface,
-+ const char *imageFile, uint32_t number)
-+{
-+ create_ivisurfaceFromFile(p_wlCtx, id_surface, imageFile);
-+}
-+
-+static void
-+create_home_button(struct wlContextStruct *p_wlCtx, const uint32_t id_surface,
-+ const char *imageFile)
-+{
-+ create_ivisurfaceFromFile(p_wlCtx, id_surface, imageFile);
-+}
-+
-+static void
-+create_workspace_background(struct wlContextStruct *p_wlCtx,
-+ struct hmi_homescreen_srf *srf)
-+{
-+ create_ivisurfaceFromColor(p_wlCtx, srf->id, 1, 1, srf->color);
-+}
-+
-+static void
-+create_launchers(struct wlContextCommon *cmm, struct wl_list *launcher_list)
-+{
-+ struct hmi_homescreen_launcher **launchers;
-+ struct hmi_homescreen_launcher *launcher = NULL;
-+
-+ int launcher_count = wl_list_length(launcher_list);
-+ int ii = 0;
-+ int start = 0;
-+
-+ if (0 == launcher_count)
-+ return;
-+
-+ launchers = MEM_ALLOC(launcher_count * sizeof(*launchers));
-+
-+ wl_list_for_each(launcher, launcher_list, link) {
-+ launchers[ii] = launcher;
-+ ii++;
-+ }
-+
-+ for (ii = 0; ii < launcher_count; ii++) {
-+ int jj = 0;
-+
-+ if (ii != launcher_count - 1 &&
-+ launchers[ii]->workspace_id ==
-+ launchers[ii + 1]->workspace_id)
-+ continue;
-+
-+ for (jj = start; jj <= ii; jj++) {
-+ struct wlContextStruct *p_wlCtx;
-+
-+ p_wlCtx = MEM_ALLOC(sizeof(*p_wlCtx));
-+ p_wlCtx->cmm = *cmm;
-+ create_ivisurfaceFromFile(p_wlCtx,
-+ launchers[jj]->icon_surface_id,
-+ launchers[jj]->icon);
-+ }
-+
-+ start = ii + 1;
-+ }
-+
-+ free(launchers);
-+}
-+
-+/**
-+ * Internal method to read out weston.ini to get configuration
-+ */
-+static struct hmi_homescreen_setting *
-+hmi_homescreen_setting_create(void)
-+{
-+ struct weston_config *config = NULL;
-+ struct weston_config_section *shellSection = NULL;
-+ struct hmi_homescreen_setting *setting = MEM_ALLOC(sizeof(*setting));
-+ struct weston_config_section *section = NULL;
-+ const char *name = NULL;
-+ uint32_t workspace_layer_id;
-+ uint32_t icon_surface_id = 0;
-+
-+ wl_list_init(&setting->workspace_list);
-+ wl_list_init(&setting->launcher_list);
-+
-+ config = weston_config_parse("weston.ini");
-+
-+ shellSection =
-+ weston_config_get_section(config, "ivi-shell", NULL, NULL);
-+
-+ weston_config_section_get_string(
-+ shellSection, "cursor-theme", &setting->cursor_theme, NULL);
-+
-+ weston_config_section_get_int(
-+ shellSection, "cursor-size", &setting->cursor_size, 32);
-+
-+ weston_config_section_get_uint(
-+ shellSection, "workspace-layer-id", &workspace_layer_id, 3000);
-+
-+ weston_config_section_get_string(
-+ shellSection, "background-image", &setting->background.filePath,
-+ DATADIR "/weston/background.png");
-+
-+ weston_config_section_get_uint(
-+ shellSection, "background-id", &setting->background.id, 1001);
-+
-+ weston_config_section_get_string(
-+ shellSection, "panel-image", &setting->panel.filePath,
-+ DATADIR "/weston/panel.png");
-+
-+ weston_config_section_get_uint(
-+ shellSection, "panel-id", &setting->panel.id, 1002);
-+
-+ weston_config_section_get_string(
-+ shellSection, "tiling-image", &setting->tiling.filePath,
-+ DATADIR "/weston/tiling.png");
-+
-+ weston_config_section_get_uint(
-+ shellSection, "tiling-id", &setting->tiling.id, 1003);
-+
-+ weston_config_section_get_string(
-+ shellSection, "sidebyside-image", &setting->sidebyside.filePath,
-+ DATADIR "/weston/sidebyside.png");
-+
-+ weston_config_section_get_uint(
-+ shellSection, "sidebyside-id", &setting->sidebyside.id, 1004);
-+
-+ weston_config_section_get_string(
-+ shellSection, "fullscreen-image", &setting->fullscreen.filePath,
-+ DATADIR "/weston/fullscreen.png");
-+
-+ weston_config_section_get_uint(
-+ shellSection, "fullscreen-id", &setting->fullscreen.id, 1005);
-+
-+ weston_config_section_get_string(
-+ shellSection, "random-image", &setting->random.filePath,
-+ DATADIR "/weston/random.png");
-+
-+ weston_config_section_get_uint(
-+ shellSection, "random-id", &setting->random.id, 1006);
-+
-+ weston_config_section_get_string(
-+ shellSection, "home-image", &setting->home.filePath,
-+ DATADIR "/weston/home.png");
-+
-+ weston_config_section_get_uint(
-+ shellSection, "home-id", &setting->home.id, 1007);
-+
-+ weston_config_section_get_uint(
-+ shellSection, "workspace-background-color",
-+ &setting->workspace_background.color, 0x99000000);
-+
-+ weston_config_section_get_uint(
-+ shellSection, "workspace-background-id",
-+ &setting->workspace_background.id, 2001);
-+
-+ icon_surface_id = workspace_layer_id + 1;
-+
-+ while (weston_config_next_section(config, &section, &name)) {
-+ struct hmi_homescreen_launcher *launcher;
-+
-+ if (strcmp(name, "ivi-launcher") != 0)
-+ continue;
-+
-+ launcher = MEM_ALLOC(sizeof(*launcher));
-+ wl_list_init(&launcher->link);
-+
-+ weston_config_section_get_string(section, "icon",
-+ &launcher->icon, NULL);
-+ weston_config_section_get_string(section, "path",
-+ &launcher->path, NULL);
-+ weston_config_section_get_uint(section, "workspace-id",
-+ &launcher->workspace_id, 0);
-+ weston_config_section_get_uint(section, "icon-id",
-+ &launcher->icon_surface_id,
-+ icon_surface_id);
-+ icon_surface_id++;
-+
-+ wl_list_insert(setting->launcher_list.prev, &launcher->link);
-+ }
-+
-+ weston_config_destroy(config);
-+ return setting;
-+}
-+
-+/**
-+ * Main thread
-+ *
-+ * The basic flow are as followed,
-+ * 1/ read configuration from weston.ini by hmi_homescreen_setting_create
-+ * 2/ draw png file to surface according to configuration of weston.ini and
-+ * set up UI by using ivi-hmi-controller protocol by each create_* method
-+ */
-+int main(int argc, char **argv)
-+{
-+ struct wlContextCommon wlCtxCommon;
-+ struct wlContextStruct wlCtx_BackGround;
-+ struct wlContextStruct wlCtx_Panel;
-+ struct wlContextStruct wlCtx_Button_1;
-+ struct wlContextStruct wlCtx_Button_2;
-+ struct wlContextStruct wlCtx_Button_3;
-+ struct wlContextStruct wlCtx_Button_4;
-+ struct wlContextStruct wlCtx_HomeButton;
-+ struct wlContextStruct wlCtx_WorkSpaceBackGround;
-+ struct wl_list launcher_wlCtxList;
-+ int ret = 0;
-+ struct hmi_homescreen_setting *hmi_setting;
-+ struct wlContextStruct *pWlCtxSt = NULL;
-+
-+ hmi_setting = hmi_homescreen_setting_create();
-+
-+ memset(&wlCtxCommon, 0x00, sizeof(wlCtxCommon));
-+ memset(&wlCtx_BackGround, 0x00, sizeof(wlCtx_BackGround));
-+ memset(&wlCtx_Panel, 0x00, sizeof(wlCtx_Panel));
-+ memset(&wlCtx_Button_1, 0x00, sizeof(wlCtx_Button_1));
-+ memset(&wlCtx_Button_2, 0x00, sizeof(wlCtx_Button_2));
-+ memset(&wlCtx_Button_3, 0x00, sizeof(wlCtx_Button_3));
-+ memset(&wlCtx_Button_4, 0x00, sizeof(wlCtx_Button_4));
-+ memset(&wlCtx_HomeButton, 0x00, sizeof(wlCtx_HomeButton));
-+ memset(&wlCtx_WorkSpaceBackGround, 0x00,
-+ sizeof(wlCtx_WorkSpaceBackGround));
-+ wl_list_init(&launcher_wlCtxList);
-+ wlCtxCommon.list_wlContextStruct = MEM_ALLOC(sizeof(struct wl_list));
-+ assert(wlCtxCommon.list_wlContextStruct);
-+ wl_list_init(wlCtxCommon.list_wlContextStruct);
-+
-+ wlCtxCommon.hmi_setting = hmi_setting;
-+
-+ wlCtxCommon.wlDisplay = wl_display_connect(NULL);
-+ if (NULL == wlCtxCommon.wlDisplay) {
-+ printf("Error: wl_display_connect failed.\n");
-+ return -1;
-+ }
-+
-+ /* get wl_registry */
-+ wlCtxCommon.wlRegistry = wl_display_get_registry(wlCtxCommon.wlDisplay);
-+ wl_registry_add_listener(wlCtxCommon.wlRegistry,
-+ &registry_listener, &wlCtxCommon);
-+ wl_display_roundtrip(wlCtxCommon.wlDisplay);
-+
-+ if (wlCtxCommon.hmi_setting->cursor_theme) {
-+ create_cursors(&wlCtxCommon);
-+
-+ wlCtxCommon.pointer_surface =
-+ wl_compositor_create_surface(wlCtxCommon.wlCompositor);
-+
-+ wlCtxCommon.current_cursor = CURSOR_LEFT_PTR;
-+ }
-+
-+ wlCtx_BackGround.cmm = wlCtxCommon;
-+ wlCtx_Panel.cmm = wlCtxCommon;
-+ wlCtx_Button_1.cmm = wlCtxCommon;
-+ wlCtx_Button_2.cmm = wlCtxCommon;
-+ wlCtx_Button_3.cmm = wlCtxCommon;
-+ wlCtx_Button_4.cmm = wlCtxCommon;
-+ wlCtx_HomeButton.cmm = wlCtxCommon;
-+ wlCtx_WorkSpaceBackGround.cmm = wlCtxCommon;
-+
-+ /* create desktop widgets */
-+ create_background(&wlCtx_BackGround, hmi_setting->background.id,
-+ hmi_setting->background.filePath);
-+
-+ create_panel(&wlCtx_Panel, hmi_setting->panel.id,
-+ hmi_setting->panel.filePath);
-+
-+ create_button(&wlCtx_Button_1, hmi_setting->tiling.id,
-+ hmi_setting->tiling.filePath, 0);
-+
-+ create_button(&wlCtx_Button_2, hmi_setting->sidebyside.id,
-+ hmi_setting->sidebyside.filePath, 1);
-+
-+ create_button(&wlCtx_Button_3, hmi_setting->fullscreen.id,
-+ hmi_setting->fullscreen.filePath, 2);
-+
-+ create_button(&wlCtx_Button_4, hmi_setting->random.id,
-+ hmi_setting->random.filePath, 3);
-+
-+ create_workspace_background(&wlCtx_WorkSpaceBackGround,
-+ &hmi_setting->workspace_background);
-+
-+ create_launchers(&wlCtxCommon, &hmi_setting->launcher_list);
-+
-+ create_home_button(&wlCtx_HomeButton, hmi_setting->home.id,
-+ hmi_setting->home.filePath);
-+
-+ UI_ready(wlCtxCommon.hmiCtrl);
-+
-+ while(ret != -1)
-+ ret = wl_display_dispatch(wlCtxCommon.wlDisplay);
-+
-+ wl_list_for_each(pWlCtxSt, wlCtxCommon.list_wlContextStruct, link) {
-+ destroyWLContextStruct(pWlCtxSt);
-+ }
-+
-+ destroyWLContextCommon(&wlCtxCommon);
-+ free(wlCtxCommon.list_wlContextStruct);
-+
-+ return 0;
-+}
---
-1.7.9.5
-
diff --git a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0008-data-add-reference-image-files-for-weston-ivi-shell-.patch b/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0008-data-add-reference-image-files-for-weston-ivi-shell-.patch
deleted file mode 100644
index 3db0932..0000000
--- a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0008-data-add-reference-image-files-for-weston-ivi-shell-.patch
+++ /dev/null
@@ -1,10101 +0,0 @@
-From 3d8effbdca1db5344c1e6413876ddf270a8d9320 Mon Sep 17 00:00:00 2001
-From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-Date: Tue, 11 Mar 2014 11:54:45 +0900
-Subject: [PATCH 08/15] data: add reference image files for
- weston-ivi-shell-user-interface
-
-- introduces ivi-shell-user-interface.c
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------
-COPYING: append license of images to COPYING file.
-
-> 800457d data: add reference image files for weston-ivi-shell-user-interface
-> Do add a note of the image copyrights and licence to the commit
-> message, and if the licence not MIT, add it to the COPYING
-> file, too.
-> No review email.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-------------------------------------------------------------
-data: add list of images under DENSO copyright
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
----
- Makefile.am | 14 +++++++++++++-
- data/COPYING | 29 ++++++++++++++++++++++++++++-
- data/background.png | Bin 0 -> 245579 bytes
- data/fullscreen.png | Bin 0 -> 3406 bytes
- data/home.png | Bin 0 -> 4629 bytes
- data/icon_ivi_clickdot.png | Bin 0 -> 39523 bytes
- data/icon_ivi_flower.png | Bin 0 -> 24475 bytes
- data/icon_ivi_simple-egl.png | Bin 0 -> 29316 bytes
- data/icon_ivi_simple-shm.png | Bin 0 -> 71120 bytes
- data/icon_ivi_smoke.png | Bin 0 -> 46577 bytes
- data/panel.png | Bin 0 -> 41955 bytes
- data/random.png | Bin 0 -> 4891 bytes
- data/sidebyside.png | Bin 0 -> 3929 bytes
- data/tiling.png | Bin 0 -> 5620 bytes
- 14 files changed, 41 insertions(+), 2 deletions(-)
- create mode 100644 data/background.png
- create mode 100644 data/fullscreen.png
- create mode 100644 data/home.png
- create mode 100644 data/icon_ivi_clickdot.png
- create mode 100644 data/icon_ivi_flower.png
- create mode 100644 data/icon_ivi_simple-egl.png
- create mode 100644 data/icon_ivi_simple-shm.png
- create mode 100644 data/icon_ivi_smoke.png
- create mode 100644 data/panel.png
- create mode 100644 data/random.png
- create mode 100644 data/sidebyside.png
- create mode 100644 data/tiling.png
-
-diff --git a/Makefile.am b/Makefile.am
-index 48cad9b..f25b898 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -668,7 +668,19 @@ dist_westondata_DATA = \
- data/icon_window.png \
- data/sign_close.png \
- data/sign_maximize.png \
-- data/sign_minimize.png
-+ data/sign_minimize.png \
-+ data/background.png \
-+ data/tiling.png \
-+ data/fullscreen.png \
-+ data/panel.png \
-+ data/random.png \
-+ data/sidebyside.png \
-+ data/home.png \
-+ data/icon_ivi_clickdot.png \
-+ data/icon_ivi_flower.png \
-+ data/icon_ivi_simple-egl.png \
-+ data/icon_ivi_simple-shm.png \
-+ data/icon_ivi_smoke.png
-
-
- if BUILD_WCAP_TOOLS
-diff