From c9227670256328bbded3f584e033912907c2c335 Mon Sep 17 00:00:00 2001 From: hyunho kang Date: Fri, 28 Aug 2015 13:45:34 +0900 Subject: [PATCH] [widget] Add win destroy logic to tutorial. Change-Id: I2d2388bf25b98db69939328c59542e2c1d281094 Signed-off-by: hyunho kang --- .../native/app_framework/widget_tutorial_n.htm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/org.tizen.tutorials/html/native/app_framework/widget_tutorial_n.htm b/org.tizen.tutorials/html/native/app_framework/widget_tutorial_n.htm index 973fde0..31d3f04 100644 --- a/org.tizen.tutorials/html/native/app_framework/widget_tutorial_n.htm +++ b/org.tizen.tutorials/html/native/app_framework/widget_tutorial_n.htm @@ -330,7 +330,27 @@ widget_instance_create(widget_context_h context, bundle *content, int w, int h,    widget_app_context_set_tag(context, wid);    return WIDGET_ERROR_NONE; -} +} + +int widget_instance_destroy(widget_context_h context, widget_app_destroy_type_e reason, bundle *content, void *user_data) +{ + +   if (reason != WIDGET_APP_DESTROY_TYPE_PERMANENT) +   { +      // Save the current status at the bundle object +   } + +   widget_instance_data_s *wid = NULL; +   widget_app_context_get_tag(context, (void**)&wid); + +   if (wid->win) +       evas_object_del(wid->win); + +   free(wid); + +   return WIDGET_ERROR_NONE; +} +

Managing the Widget Instance

-- 2.7.4