[PATCH weston 05/16] ivi-shell: remove layer_remove_notification APIs

Ucan, Emre (ADITG/SW1) eucan at de.adit-jv.com
Thu Mar 31 11:09:12 UTC 2016


ivi_layout_layer_remove_notification and
ivi_layout_layer_remove_notification_by_callback APIs
are removed, because they are not needed after the changes
to the ivi_layout_layer_add_notification.

Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
---
 ivi-shell/ivi-layout-export.h |   18 --------------
 ivi-shell/ivi-layout.c        |   54 +----------------------------------------
 2 files changed, 1 insertion(+), 71 deletions(-)

diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
index 9db18e0..f8d29da 100644
--- a/ivi-shell/ivi-layout-export.h
+++ b/ivi-shell/ivi-layout-export.h
@@ -138,12 +138,6 @@ enum ivi_layout_transition_type{
 	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 (*layer_create_notification_func)(
 			struct ivi_layout_layer *ivilayer,
 			void *userdata);
@@ -531,11 +525,6 @@ struct ivi_layout_interface {
 					  struct wl_listener *listener);
 
 	/**
-	 * \brief remove notification on property changes of ivi_layer
-	 */
-	void (*layer_remove_notification)(struct ivi_layout_layer *ivilayer);
-
-	/**
 	 * \brief set type of transition animation
 	 */
 	int32_t (*layer_set_transition)(struct ivi_layout_layer *ivilayer,
@@ -595,13 +584,6 @@ struct ivi_layout_interface {
 				void *target, size_t size,
 				int32_t x, int32_t y,
 				int32_t width, int32_t height);
-
-	/**
-	 * \brief remove notification by callback on property changes of ivi_layer
-	 */
-	void (*layer_remove_notification_by_callback)(struct ivi_layout_layer *ivilayer,
-						      layer_property_notification_func callback,
-						      void *userdata);
 };
 
 #ifdef __cplusplus
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 25df1f9..80f8496 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -181,26 +181,6 @@ get_screen_from_output(struct weston_output *output)
 	return NULL;
 }
 
-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;
-		wl_list_remove(&listener->link);
-
-		notification =
-			container_of(listener,
-				     struct listener_layout_notification,
-				     listener);
-
-		free(notification->userdata);
-		free(notification);
-	}
-}
-
 /**
  * Called at destruction of wl_surface/ivi_surface
  */
@@ -1565,30 +1545,6 @@ ivi_layout_layer_create_with_dimension(uint32_t id_layer,
 }
 
 static 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);
-}
-
-static void
-ivi_layout_layer_remove_notification_by_callback(struct ivi_layout_layer *ivilayer,
-						 layer_property_notification_func callback,
-						 void *userdata)
-{
-	if (ivilayer == NULL) {
-		weston_log("ivi_layout_layer_remove_notification_by_callback: invalid argument\n");
-		return;
-	}
-
-	remove_notification(&ivilayer->property_changed.listener_list, callback, userdata);
-}
-
-static void
 ivi_layout_layer_destroy(struct ivi_layout_layer *ivilayer)
 {
 	struct ivi_layout *layout = get_instance();
@@ -1610,8 +1566,6 @@ ivi_layout_layer_destroy(struct ivi_layout_layer *ivilayer)
 	wl_list_remove(&ivilayer->order.link);
 	wl_list_remove(&ivilayer->link);
 
-	ivi_layout_layer_remove_notification(ivilayer);
-
 	free(ivilayer);
 }
 
@@ -2320,7 +2274,6 @@ static struct ivi_layout_interface ivi_layout_interface = {
 	.layer_remove_surface			= ivi_layout_layer_remove_surface,
 	.layer_set_render_order			= ivi_layout_layer_set_render_order,
 	.layer_add_listener			= ivi_layout_layer_add_listener,
-	.layer_remove_notification		= ivi_layout_layer_remove_notification,
 	.layer_set_transition			= ivi_layout_layer_set_transition,
 
 	/**
@@ -2340,12 +2293,7 @@ static struct ivi_layout_interface ivi_layout_interface = {
 	 * surface content dumping for debugging
 	 */
 	.surface_get_size		= ivi_layout_surface_get_size,
-	.surface_dump			= ivi_layout_surface_dump,
-
-	/**
-	 * remove notification by callback on property changes of ivi_surface/layer
-	 */
-	.layer_remove_notification_by_callback		= ivi_layout_layer_remove_notification_by_callback
+	.surface_dump			= ivi_layout_surface_dump
 };
 
 int
-- 
1.7.9.5



More information about the wayland-devel mailing list