summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>2014-07-29 16:28:33 +0900
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>2014-08-21 10:08:14 +0900
commit45cd9c311054b1674e4e93007fae6218997d7fce (patch)
treea142f71a038f2d63a3c62b012bf500cf94d19169
parent09493947ad21f688f1f4909ee4698402b8548b54 (diff)
downloadwayland-ivi-extension-45cd9c311054b1674e4e93007fae6218997d7fce.tar.gz
ilmControl: Send content event when ivi-surface is created or destroyed.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
-rw-r--r--ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c24
1 files changed, 22 insertions, 2 deletions
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 11789e0..45a0277 100644
--- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
+++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
@@ -731,6 +731,12 @@ controller_surface_listener_destroyed(void *data,
{
struct surface_context *ctx_surf = data;
+ if (ctx_surf->notification != NULL) {
+ ctx_surf->notification(ctx_surf->id_surface,
+ &ctx_surf->prop,
+ ILM_NOTIFICATION_CONTENT_REMOVED);
+ }
+
wl_list_remove(&ctx_surf->link);
free(ctx_surf);
}
@@ -740,19 +746,33 @@ controller_surface_listener_content(void *data,
struct ivi_controller_surface *controller,
int32_t content_state)
{
+ struct surface_context *ctx_surf = data;
+
// if client surface (=content) was removed with ilm_surfaceDestroy()
// the expected behavior within ILM API mandates a full removal
// of the surface from the scene. We must remove the controller
// from scene, too.
if (IVI_CONTROLLER_SURFACE_CONTENT_STATE_CONTENT_REMOVED == content_state)
{
- struct surface_context *ctx_surf = data;
+ if (ctx_surf->notification != NULL) {
+ ctx_surf->notification(ctx_surf->id_surface,
+ &ctx_surf->prop,
+ ILM_NOTIFICATION_CONTENT_REMOVED);
+ }
ivi_controller_surface_destroy(controller, 1);
wl_list_remove(&ctx_surf->link);
free(ctx_surf);
}
+ else if (IVI_CONTROLLER_SURFACE_CONTENT_STATE_CONTENT_AVAILABLE == content_state)
+ {
+ if (ctx_surf->notification != NULL) {
+ ctx_surf->notification(ctx_surf->id_surface,
+ &ctx_surf->prop,
+ ILM_NOTIFICATION_CONTENT_AVAILABLE);
+ }
+ }
}
static void
@@ -811,7 +831,7 @@ controller_listener_surface(void *data,
if (ctx_surf-> notification != NULL) {
ctx_surf->notification(ctx_surf->id_surface,
&ctx_surf->prop,
- ILM_NOTIFICATION_ALL);
+ ILM_NOTIFICATION_CONTENT_AVAILABLE);
}
fprintf(stderr, "invalid id_surface in controller_listener_surface\n");
return;