ivi-shell: rework layer_add_notification API
authorUcan, Emre (ADITG/SW1) <eucan@de.adit-jv.com>
Mon, 4 Apr 2016 08:05:05 +0000 (08:05 +0000)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 5 Apr 2016 08:53:48 +0000 (11:53 +0300)
commit3750d1b270135cf5b1482034aff2bed9999848c6
treed63a0ee72121016aaaddf0732bfb63891c5a630b
parent706cb5aa7ce7c106e4d5218e49d5940155ac0e0b
ivi-shell: rework layer_add_notification API

The layer_add_notification API accepts a simple
wl_listener instead of a ivi-shell specific notification
function. Therefore, the API is renamed to layer_add_listener.

This change has several advantages:
1. Code cleanup
2. No dynamic memory allocation. Listeners are allocated
   by controller plugins
3. Remove API is not needed. Controller plugins can easily
   remove the listener link.

This patch also remove two APIs which are not needed:
- ivi_layout_layer_remove_notification
- ivi_layout_layer_remove_notification_by_callback

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
ivi-shell/ivi-layout-export.h
ivi-shell/ivi-layout.c
tests/ivi_layout-internal-test.c