From: Marcus Fritzsch Date: Fri, 4 Jul 2014 13:47:29 +0000 (+0200) Subject: ilmControl: actually delete all the layer_main stuff X-Git-Tag: 1.2.0-rc7~83 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c171d8dbb78a4fa48e1c66abbf03ec07a02ff8c;p=profile%2Fivi%2Fwayland-ivi-extension.git ilmControl: actually delete all the layer_main stuff Signed-off-by: Marcus Fritzsch --- 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 4335b80..21c1a9e 100644 --- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c +++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c @@ -734,197 +734,6 @@ static struct ivi_controller_layer_listener controller_layer_listener_child = controller_layer_listener_destroyed_child }; -static void -controller_layer_listener_visibility_main(void *data, - struct ivi_controller_layer *controller, - int32_t visibility) -{ - struct ilm_control_context *ctx = data; - struct layer_context *ctx_layer = NULL; - - ctx_layer = get_layer_context(&ctx->main_ctx, controller); - if (ctx_layer == NULL) { - fprintf(stderr, "Invalid controller_layer in %s\n", __FUNCTION__); - return; - } - - ctx_layer->prop.visibility = (t_ilm_bool)visibility; -} - -static void -controller_layer_listener_opacity_main(void *data, - struct ivi_controller_layer *controller, - wl_fixed_t opacity) -{ - struct ilm_control_context *ctx = data; - struct layer_context *ctx_layer = NULL; - - ctx_layer = get_layer_context(&ctx->main_ctx, controller); - if (ctx_layer == NULL) { - fprintf(stderr, "Invalid controller_layer in %s\n", __FUNCTION__); - return; - } - - ctx_layer->prop.opacity = (t_ilm_float)wl_fixed_to_double(opacity); -} - -static void -controller_layer_listener_source_rectangle_main(void *data, - struct ivi_controller_layer *controller, - int32_t x, - int32_t y, - int32_t width, - int32_t height) -{ - struct ilm_control_context *ctx = data; - struct layer_context *ctx_layer = NULL; - - ctx_layer = get_layer_context(&ctx->main_ctx, controller); - if (ctx_layer == NULL) { - fprintf(stderr, "Invalid controller_layer in %s\n", __FUNCTION__); - return; - } - - ctx_layer->prop.sourceX = (t_ilm_uint)x; - ctx_layer->prop.sourceY = (t_ilm_uint)y; - ctx_layer->prop.sourceWidth = (t_ilm_uint)width; - ctx_layer->prop.sourceHeight = (t_ilm_uint)height; - if (ctx_layer->prop.origSourceWidth == 0) { - ctx_layer->prop.origSourceWidth = (t_ilm_uint)width; - } - if (ctx_layer->prop.origSourceHeight == 0) { - ctx_layer->prop.origSourceHeight = (t_ilm_uint)height; - } -} - -static void -controller_layer_listener_destination_rectangle_main(void *data, - struct ivi_controller_layer *controller, - int32_t x, - int32_t y, - int32_t width, - int32_t height) -{ - struct ilm_control_context *ctx = data; - struct layer_context *ctx_layer = NULL; - - ctx_layer = get_layer_context(&ctx->main_ctx, controller); - if (ctx_layer == NULL) { - fprintf(stderr, "Invalid controller_layer in %s\n", __FUNCTION__); - return; - } - - ctx_layer->prop.destX = (t_ilm_uint)x; - ctx_layer->prop.destY = (t_ilm_uint)y; - ctx_layer->prop.destWidth = (t_ilm_uint)width; - ctx_layer->prop.destHeight = (t_ilm_uint)height; -} - -static void -controller_layer_listener_configuration_main(void *data, - struct ivi_controller_layer *controller, - int32_t width, - int32_t height) -{ - struct ilm_control_context *ctx = data; - struct layer_context *ctx_layer = NULL; - - ctx_layer = get_layer_context(&ctx->main_ctx, controller); - if (ctx_layer == NULL) { - fprintf(stderr, "Invalid controller_layer in %s\n", __FUNCTION__); - return; - } - - ctx_layer->prop.sourceWidth = (t_ilm_uint)width; - ctx_layer->prop.sourceHeight = (t_ilm_uint)height; -} - -static void -controller_layer_listener_orientation_main(void *data, - struct ivi_controller_layer *controller, - int32_t orientation) -{ - ilmOrientation ilmorientation = ILM_ZERO; - struct ilm_control_context *ctx = data; - struct layer_context *ctx_layer = NULL; - - ctx_layer = get_layer_context(&ctx->main_ctx, controller); - if (ctx_layer == NULL) { - fprintf(stderr, "Invalid controller_layer in %s\n", __FUNCTION__); - return; - } - - switch(orientation) { - case IVI_CONTROLLER_SURFACE_ORIENTATION_0_DEGREES: - ilmorientation = ILM_ZERO; - break; - case IVI_CONTROLLER_SURFACE_ORIENTATION_90_DEGREES: - ilmorientation = ILM_NINETY; - break; - case IVI_CONTROLLER_SURFACE_ORIENTATION_180_DEGREES: - ilmorientation = ILM_ONEHUNDREDEIGHTY; - break; - case IVI_CONTROLLER_SURFACE_ORIENTATION_270_DEGREES: - ilmorientation = ILM_TWOHUNDREDSEVENTY; - break; - default: - break; - } - - ctx_layer->prop.orientation = ilmorientation; -} - -static void -controller_layer_listener_screen_main(void *data, - struct ivi_controller_layer *controller, - struct wl_output *output) -{ - struct ilm_control_context *ctx = data; - struct layer_context *ctx_layer = NULL; - - ctx_layer = get_layer_context(&ctx->main_ctx, controller); - if (ctx_layer == NULL) { - fprintf(stderr, "Invalid controller_layer in %s\n", __FUNCTION__); - return; - } - - if (output == NULL) { - remove_orderlayer_from_screen(&ctx->main_ctx, ctx_layer); - } else { - add_orderlayer_to_screen(&ctx->main_ctx, ctx_layer, output); - } -} - -static void -controller_layer_listener_destroyed_main(void *data, - struct ivi_controller_layer *controller) -{ - struct ilm_control_context *ctx = data; - struct layer_context *ctx_layer = NULL; - - ctx_layer = get_layer_context(&ctx->main_ctx, controller); - if (ctx_layer == NULL) { - fprintf(stderr, "Invalid controller_layer in %s\n", __FUNCTION__); - return; - } - - wl_list_remove(&ctx_layer->link); - free(ctx_layer); -} - -static struct ivi_controller_layer_listener controller_layer_listener_main = -{ - controller_layer_listener_visibility_main, - controller_layer_listener_opacity_main, - controller_layer_listener_source_rectangle_main, - controller_layer_listener_destination_rectangle_main, - controller_layer_listener_configuration_main, - controller_layer_listener_orientation_main, - controller_layer_listener_screen_main, - controller_layer_listener_destroyed_main -}; - - static struct layer_context* get_layer_context(struct wayland_context *ctx, struct ivi_controller_layer *ivi_layer)