ivi-shell: rework surface_add_notification API

Graphics / Wayland / Weston - Ucan, Emre (ADITG/SW1) [de.adit-jv.com] - 5 April 2016 03:53 UTC

The surface_add_notification API accepts a simple wl_listener instead of a ivi-shell specific notification function. Therefore, the API is renamed to surface_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_surface_remove_notification- ivi_layout_surface_remove_notification_by_callback

706cb5a ivi-shell: rework surface_add_notification API
ivi-shell/ivi-layout-export.h | 30 ++++-----------
ivi-shell/ivi-layout.c | 80 +++-------------------------------------
tests/ivi_layout-test-plugin.c | 37 +++++++++++--------
3 files changed, 35 insertions(+), 112 deletions(-)

Upstream: cgit.freedesktop.org


  • Share