[PATCH weston 03/16] ivi-shell: remove surface_remove_notification APIs
Ucan, Emre (ADITG/SW1)
eucan at de.adit-jv.com
Thu Mar 31 11:09:04 UTC 2016
ivi_layout_surface_remove_notification and
ivi_layout_surface_remove_notification_by_callback APIs
are removed, because they are not needed after the changes
to the ivi_layout_surface_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 | 28 ----------------------------
tests/ivi_layout-test-plugin.c | 6 ++----
3 files changed, 2 insertions(+), 50 deletions(-)
diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
index 8dc32cb..7a25825 100644
--- a/ivi-shell/ivi-layout-export.h
+++ b/ivi-shell/ivi-layout-export.h
@@ -144,12 +144,6 @@ typedef void (*layer_property_notification_func)(
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);
@@ -332,11 +326,6 @@ struct ivi_layout_interface {
struct wl_listener *listener);
/**
- * \brief remove notification on property changes of ivi_surface
- */
- void (*surface_remove_notification)(struct ivi_layout_surface *ivisurf);
-
- /**
* \brief get weston_surface of ivi_surface
*/
struct weston_surface *
@@ -609,13 +598,6 @@ struct ivi_layout_interface {
int32_t width, int32_t height);
/**
- * remove notification by callback on property changes of ivi_surface
- */
- void (*surface_remove_notification_by_callback)(struct ivi_layout_surface *ivisurf,
- surface_property_notification_func callback,
- void *userdata);
-
- /**
* \brief remove notification by callback on property changes of ivi_layer
*/
void (*layer_remove_notification_by_callback)(struct ivi_layout_layer *ivilayer,
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 8a95a11..013e096 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -201,30 +201,6 @@ remove_all_notification(struct wl_list *listener_list)
}
}
-static 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
-ivi_layout_surface_remove_notification_by_callback(struct ivi_layout_surface *ivisurf,
- surface_property_notification_func callback,
- void *userdata)
-{
- if (ivisurf == NULL) {
- weston_log("ivi_layout_surface_remove_notification_by_callback: invalid argument\n");
- return;
- }
-
- remove_notification(&ivisurf->property_changed.listener_list, callback, userdata);
-}
-
/**
* Called at destruction of wl_surface/ivi_surface
*/
@@ -247,8 +223,6 @@ ivi_layout_surface_destroy(struct ivi_layout_surface *ivisurf)
ivi_layout_remove_all_surface_transitions(ivisurf);
- ivi_layout_surface_remove_notification(ivisurf);
-
free(ivisurf);
}
@@ -2347,7 +2321,6 @@ static struct ivi_layout_interface ivi_layout_interface = {
.surface_set_destination_rectangle = ivi_layout_surface_set_destination_rectangle,
.surface_set_orientation = ivi_layout_surface_set_orientation,
.surface_add_listener = ivi_layout_surface_add_listener,
- .surface_remove_notification = ivi_layout_surface_remove_notification,
.surface_get_weston_surface = ivi_layout_surface_get_weston_surface,
.surface_set_transition = ivi_layout_surface_set_transition,
.surface_set_transition_duration = ivi_layout_surface_set_transition_duration,
@@ -2401,7 +2374,6 @@ static struct ivi_layout_interface ivi_layout_interface = {
/**
* remove notification by callback on property changes of ivi_surface/layer
*/
- .surface_remove_notification_by_callback = ivi_layout_surface_remove_notification_by_callback,
.layer_remove_notification_by_callback = ivi_layout_layer_remove_notification_by_callback
};
diff --git a/tests/ivi_layout-test-plugin.c b/tests/ivi_layout-test-plugin.c
index 5cdc203..839a0f6 100644
--- a/tests/ivi_layout-test-plugin.c
+++ b/tests/ivi_layout-test-plugin.c
@@ -860,7 +860,8 @@ RUNNER_TEST(surface_properties_changed_notification)
runner_assert(ctx->user_flags == 0);
- lyt->surface_remove_notification(ivisurf);
+ // remove surface property changed listener.
+ wl_list_remove(&ctx->surface_property_changed.link);
ctx->user_flags = 0;
runner_assert(lyt->surface_set_destination_rectangle(
ivisurf, 40, 50, 400, 500) == IVI_SUCCEEDED);
@@ -868,9 +869,6 @@ RUNNER_TEST(surface_properties_changed_notification)
lyt->commit_changes();
runner_assert(ctx->user_flags == 0);
-
- // remove surface property changed listener.
- wl_list_remove(&ctx->surface_property_changed.link);
}
static void
--
1.7.9.5
More information about the wayland-devel
mailing list