Sync with the latest 2.4 93/42293/1 accepted/tizen/mobile/20150625.112850 submit/tizen_mobile/20150625.094438
authorSung-jae Park <nicesj.park@samsung.com>
Thu, 25 Jun 2015 09:36:58 +0000 (18:36 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Thu, 25 Jun 2015 09:36:58 +0000 (18:36 +0900)
Coding convention updated.
SDK Viewer layout issues are fixed.

Change-Id: If42ead21833369635d62d196a98f068038702218

15 files changed:
packaging/libwidget_viewer.spec
widget_viewer/src/client.c
widget_viewer/src/dlist.c
widget_viewer/src/fb.c
widget_viewer/src/fb_wayland.c
widget_viewer/src/file_service.c
widget_viewer/src/util.c
widget_viewer/src/widget.c
widget_viewer/src/widget_internal.c
widget_viewer_evas/CMakeLists.txt
widget_viewer_evas/src/widget_viewer_evas.c
widget_viewer_sdk/CMakeLists.txt
widget_viewer_sdk/data/widget_viewer_sdk.edc
widget_viewer_sdk/org.tizen.widget_viewer_sdk.efl
widget_viewer_sdk/src/main.c

index d26a394..973853b 100644 (file)
@@ -23,6 +23,8 @@ BuildRequires: pkgconfig(elementary)
 BuildRequires: pkgconfig(pkgmgr-info)
 BuildRequires: pkgconfig(capi-appfw-application)
 BuildRequires: pkgconfig(appcore-efl)
+BuildRequires: pkgconfig(capi-system-info)
+BuildRequires: pkgconfig(efl-extension)
 
 %if %{with wayland}
 BuildRequires: pkgconfig(wayland-client)
index 7d87689..4e9bf0e 100644 (file)
@@ -794,7 +794,7 @@ static struct packet *master_widget_updated(pid_t pid, int handle, const struct
        if (_widget_text_widget(common)) {
                const char *common_filename;
 
-               common_filename = common->filename ? common->filename : util_uri_to_path(common->id); 
+               common_filename = common->filename ? common->filename : util_uri_to_path(common->id);
 
                (void)parse_desc(common, common_filename, 0);
                /*!
@@ -937,7 +937,7 @@ static struct packet *master_gbar_created(pid_t pid, int handle, const struct pa
                        cb(handler, status, cbdata);
                } else if (status == (int)WIDGET_ERROR_NONE) {
                        _widget_invoke_event_handler(handler, WIDGET_EVENT_GBAR_CREATED);
-               } 
+               }
        }
 
 out:
@@ -1455,7 +1455,7 @@ static struct packet *master_size_changed(pid_t pid, int handle, const struct pa
 
                        /*!
                         * \NOTE
-                        * If there is a created WIDGET FB, 
+                        * If there is a created WIDGET FB,
                         * Update it too.
                         */
                        if (_widget_get_widget_fb(common)) {
index 3ae571b..5b48b86 100644 (file)
@@ -115,7 +115,7 @@ struct dlist *dlist_remove(struct dlist *list, struct dlist *l)
         * \note
         * If the removed entry 'l' has no next element, it is the last element.
         * In this case, check the existence of the list first,
-        * and if the list is not empty, update the 'prev' of the list (which is a head element of the list) 
+        * and if the list is not empty, update the 'prev' of the list (which is a head element of the list)
         *
         * If we didn't care about this, the head element(list) can indicates the invalid element.
         */
index 05795b2..a31e72c 100644 (file)
@@ -339,7 +339,7 @@ int fb_sync(struct fb_info *info, int x, int y, int w, int h)
        } else if (!strncasecmp(info->id, SCHEMA_PIXMAP, strlen(SCHEMA_PIXMAP))) {
                return sync_for_pixmap(info, x, y, w, h);
        } else if (!strncasecmp(info->id, SCHEMA_SHM, strlen(SCHEMA_SHM))) {
-               /* No need to do sync */ 
+               /* No need to do sync */
                return WIDGET_ERROR_NONE;
        }
 
index b72a20d..d958515 100644 (file)
@@ -248,7 +248,7 @@ int fb_sync(struct fb_info *info, int x, int y, int w, int h)
        } else if (!strncasecmp(info->id, SCHEMA_PIXMAP, strlen(SCHEMA_PIXMAP))) {
                return WIDGET_ERROR_NONE;
        } else if (!strncasecmp(info->id, SCHEMA_SHM, strlen(SCHEMA_SHM))) {
-               /* No need to do sync */ 
+               /* No need to do sync */
                return WIDGET_ERROR_NONE;
        }
 
index 7212459..1beeb30 100644 (file)
@@ -183,8 +183,8 @@ static inline int file_service_open(void)
        }
 
        len = strlen(COM_CORE_REMOTE_SCHEME);
-       len+= strlen(addr);
-       len+= 6;    /* Port length? */
+       len += strlen(addr);
+       len += 6;    /* Port length? */
 
        file_addr = malloc(len);
        if (!file_addr) {
index 5e44bbb..c9cc01d 100644 (file)
@@ -47,7 +47,7 @@ int util_check_extension(const char *filename, const char *check_ptr)
                        return WIDGET_ERROR_INVALID_PARAMETER;
                }
 
-               check_ptr ++;
+               check_ptr++;
        }
 
        return 0;
index a098b94..ae3ecbc 100644 (file)
@@ -3058,7 +3058,7 @@ EAPI int widget_viewer_acquire_extra_resource_id(widget_h handle, int gbar, int
                 * This can be called from extra_resource_created event.
                 * and it can be called before get the created event.
                 * then we didn't know this handle's buffer type yet
-                * so we cannot use its type to validate handle 
+                * so we cannot use its type to validate handle
                 *
                 * handle->common.gbar.type == unknown
                 */
@@ -3076,7 +3076,7 @@ EAPI int widget_viewer_acquire_extra_resource_id(widget_h handle, int gbar, int
                 * This can be called from extra_resource_created event.
                 * and it can be called before get the created event.
                 * then we didn't know this handle's buffer type yet
-                * so we cannot use its type to validate handle 
+                * so we cannot use its type to validate handle
                 *
                 * handle->common.widget.type == unknown
                 */
@@ -3182,7 +3182,7 @@ EAPI int widget_viewer_release_resource_id(widget_h handle, int gbar, unsigned i
                         * This can be called from extra_resource_created event.
                         * and it can be called before get the created event.
                         * then we didn't know this handle's buffer type yet
-                        * so we cannot use its type to validate handle 
+                        * so we cannot use its type to validate handle
                         *
                         * handle->common.gbar.type == unknown
                         */
@@ -3226,7 +3226,7 @@ EAPI int widget_viewer_release_resource_id(widget_h handle, int gbar, unsigned i
                         * This can be called from extra_resource_created event.
                         * and it can be called before get the created event.
                         * then we didn't know this handle's buffer type yet
-                        * so we cannot use its type to validate handle 
+                        * so we cannot use its type to validate handle
                         *
                         * handle->common.widget.type == unknown
                         */
@@ -3277,7 +3277,7 @@ EAPI unsigned int widget_extra_resource_id(const widget_h handle, int gbar, int
                 * This can be called from extra_resource_created event.
                 * and it can be called before get the created event.
                 * then we didn't know this handle's buffer type yet
-                * so we cannot use its type to validate handle 
+                * so we cannot use its type to validate handle
                 *
                 * handle->common.gbar.type == unknown
                 */
@@ -3293,7 +3293,7 @@ EAPI unsigned int widget_extra_resource_id(const widget_h handle, int gbar, int
                 * This can be called from extra_resource_created event.
                 * and it can be called before get the created event.
                 * then we didn't know this handle's buffer type yet
-                * so we cannot use its type to validate handle 
+                * so we cannot use its type to validate handle
                 *
                 * handle->common.widget.type == unknown
                 */
@@ -3344,8 +3344,7 @@ EAPI int widget_viewer_get_resource_id(const widget_h handle, int gbar, unsigned
                        ret = WIDGET_ERROR_INVALID_PARAMETER;
                        goto out;
                }
-       }
-       else {
+       } else {
                if (handle->common->widget.type != WIDGET_TYPE_SCRIPT && handle->common->widget.type != WIDGET_TYPE_BUFFER) {
                        ErrPrint("Invalid handle\n");
                        ret = WIDGET_ERROR_INVALID_PARAMETER;
@@ -3368,25 +3367,25 @@ out:
 
 EAPI void *widget_viewer_acquire_buffer(widget_h handle, int gbar)
 {
-       if (gbar) {
-               if (!handle || handle->state != WIDGET_STATE_CREATE) {
-                       ErrPrint("Handler is invalid\n");
-                       set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
-                       return NULL;
-               }
+       if (!handle || handle->state != WIDGET_STATE_CREATE) {
+               ErrPrint("Handler is invalid\n");
+               set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
+               return NULL;
+       }
 
-               if (!handle->common || handle->common->state != WIDGET_STATE_CREATE) {
-                       ErrPrint("Handler is invalid\n");
-                       set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
-                       return NULL;
-               }
+       if (!handle->common || handle->common->state != WIDGET_STATE_CREATE) {
+               ErrPrint("Handler is invalid\n");
+               set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
+               return NULL;
+       }
 
-               if (!handle->common->id) {
-                       ErrPrint("Invalid handle\n");
-                       set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
-                       return NULL;
-               }
+       if (!handle->common->id) {
+               ErrPrint("Invalid handle\n");
+               set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
+               return NULL;
+       }
 
+       if (gbar) {
                if (handle->common->gbar.type != GBAR_TYPE_SCRIPT && handle->common->gbar.type != GBAR_TYPE_BUFFER) {
                        ErrPrint("Handler is not valid type\n");
                        set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
@@ -3395,24 +3394,6 @@ EAPI void *widget_viewer_acquire_buffer(widget_h handle, int gbar)
 
                return fb_acquire_buffer(handle->common->gbar.fb);
        } else {
-               if (!handle || handle->state != WIDGET_STATE_CREATE) {
-                       ErrPrint("Handler is invalid\n");
-                       set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
-                       return NULL;
-               }
-
-               if (!handle->common || handle->common->state != WIDGET_STATE_CREATE) {
-                       ErrPrint("Handler is invalid\n");
-                       set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
-                       return NULL;
-               }
-
-               if (!handle->common->id) {
-                       ErrPrint("Invalid handle\n");
-                       set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
-                       return NULL;
-               }
-
                if (handle->common->widget.type != WIDGET_TYPE_SCRIPT && handle->common->widget.type != WIDGET_TYPE_BUFFER) {
                        ErrPrint("Handler is not valid type\n");
                        set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
index e556e08..a767b12 100644 (file)
@@ -884,7 +884,7 @@ struct widget_common *_widget_find_sharable_common_handle(const char *pkgname, c
                if (common->content && content) {
                        if (strcmp(common->content, content)) {
                                DbgPrint("%s Content ([%s] <> [%s])\n", common->pkgname, common->content, content);
-                               continue;    
+                               continue;
                        }
                } else {
                        int c1_len;
index e32133f..cb4cd17 100644 (file)
@@ -18,6 +18,7 @@ pkg_check_modules(viewer_evas REQUIRED
        widget_service
        elementary
        pkgmgr-info
+       capi-system-info
 )
 
 SET(BUILD_SOURCE
index 2b43b31..b9b2fc3 100644 (file)
@@ -28,6 +28,7 @@
 #include <Edje.h>
 
 #include <pkgmgr-info.h>
+#include <system_info.h>
 
 #include <widget_errno.h>
 #include <widget_viewer.h>
 #define DEFAULT_CLUSTER "user,created"
 #define DEFAULT_CATEGORY "default"
 
-// Enable this to apply shadow effect to image object (for text widget)
-// #define SUPPORT_IMAGE_EFFECT
+/*!
+ * \note
+ * Enable this to apply shadow effect to image object (for text widget)
+ * #define SUPPORT_IMAGE_EFFECT
+ */
 
 int errno;
 
@@ -149,22 +153,22 @@ static struct {
 
        union _conf {
                struct _field {
-                       unsigned int user_view_port: 1;
-                       unsigned int force_to_buffer: 1;
-                       unsigned int support_gbar: 1;
-                       unsigned int manual_pause_resume: 1;
-                       unsigned int use_fixed_size: 1;
-                       unsigned int easy_mode: 1;
-                       unsigned int is_scroll_x: 1;
-                       unsigned int is_scroll_y: 1;
-                       unsigned int auto_feed: 1;
-                       unsigned int delayed_resume: 1;
-                       unsigned int sensitive_move: 1;
-                       unsigned int render_animator: 1;
-                       unsigned int auto_render_selector: 1;
-                       unsigned int skip_acquire: 1;
-
-                       unsigned int reserved: 18;
+                       unsigned int user_view_port:1;
+                       unsigned int force_to_buffer:1;
+                       unsigned int support_gbar:1;
+                       unsigned int manual_pause_resume:1;
+                       unsigned int use_fixed_size:1;
+                       unsigned int easy_mode:1;
+                       unsigned int is_scroll_x:1;
+                       unsigned int is_scroll_y:1;
+                       unsigned int auto_feed:1;
+                       unsigned int delayed_resume:1;
+                       unsigned int sensitive_move:1;
+                       unsigned int render_animator:1;
+                       unsigned int auto_render_selector:1;
+                       unsigned int skip_acquire:1;
+
+                       unsigned int reserved:18;
                } field;
                unsigned int mask;
        } conf;
@@ -297,39 +301,39 @@ struct widget_data {
 
        union {
                struct {
-                       unsigned int pressed: 1;                     /**< Mouse is pressed */
-                       unsigned int touch_effect: 1;                /**< Requires to play touch effect */
-                       unsigned int mouse_event: 1;                 /**< Requires to feed mouse event */
-                       unsigned int scroll_x: 1;                    /**< */
-                       unsigned int scroll_y: 1;
-                       unsigned int faulted: 1;
-                       unsigned int flick_down: 1;
-                       unsigned int gbar_created: 1;
-
-                       unsigned int created: 1;
-                       unsigned int deleted: 1;
-                       unsigned int widget_pixmap_acquire_requested: 1;
-                       unsigned int gbar_pixmap_acquire_requested: 1;
-                       unsigned int cancel_scroll_x: 1;
-                       unsigned int cancel_scroll_y: 1;
-                       unsigned int cancel_click: 2;
-                       unsigned int disable_preview: 1;
-                       unsigned int disable_loading: 1;
-                       unsigned int disable_text: 1;
-                       unsigned int widget_overlay_loaded: 1;
-                       unsigned int gbar_overlay_loaded: 1;
-
-                       unsigned int freeze_visibility: 1;
-
-                       unsigned int widget_dirty: 1;
-                       unsigned int gbar_dirty: 1;
-
-                       unsigned int send_delete: 1;
-                       unsigned int permanent_delete: 1;
-
-                       unsigned int delayed_resume: 2;
-
-                       unsigned int reserved: 4;
+                       unsigned int pressed:1;                     /**< Mouse is pressed */
+                       unsigned int touch_effect:1;                /**< Requires to play touch effect */
+                       unsigned int mouse_event:1;                 /**< Requires to feed mouse event */
+                       unsigned int scroll_x:1;                    /**< */
+                       unsigned int scroll_y:1;
+                       unsigned int faulted:1;
+                       unsigned int flick_down:1;
+                       unsigned int gbar_created:1;
+
+                       unsigned int created:1;
+                       unsigned int deleted:1;
+                       unsigned int widget_pixmap_acquire_requested:1;
+                       unsigned int gbar_pixmap_acquire_requested:1;
+                       unsigned int cancel_scroll_x:1;
+                       unsigned int cancel_scroll_y:1;
+                       unsigned int cancel_click:2;
+                       unsigned int disable_preview:1;
+                       unsigned int disable_loading:1;
+                       unsigned int disable_text:1;
+                       unsigned int widget_overlay_loaded:1;
+                       unsigned int gbar_overlay_loaded:1;
+
+                       unsigned int freeze_visibility:1;
+
+                       unsigned int widget_dirty:1;
+                       unsigned int gbar_dirty:1;
+
+                       unsigned int send_delete:1;
+                       unsigned int permanent_delete:1;
+
+                       unsigned int delayed_resume:2;
+
+                       unsigned int reserved:4;
                } field;        /* Do we really have the performance loss because of bit fields? */
 
                unsigned int flags;
@@ -424,6 +428,19 @@ static void append_gbar_dirty_object_list(struct widget_data *data, int idx);
 static void __widget_event_widget_updated(struct widget_data *data);
 static void __widget_event_gbar_updated(struct widget_data *data);
 
+static inline bool is_widget_feature_enabled(void)
+{
+       bool feature = false;
+       int ret;
+
+       ret = system_info_get_platform_bool("http://tizen.org/feature/shell.appwidget", &feature);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               ErrPrint("system_info: %d\n", ret);
+       }
+
+       return feature;
+}
+
 static char *get_preview_image(struct widget_data *data, widget_size_type_e type)
 {
        Eina_List *l;
@@ -466,7 +483,6 @@ static struct widget_data *get_smart_data(Evas_Object *widget)
 static struct widget_data *get_smart_data_from_handle(widget_h handle)
 {
        Evas_Object *widget;
-       //    struct widget_data *data;
 
        widget = widget_viewer_get_data(handle);
        if (!widget) {
@@ -1085,7 +1101,6 @@ static void gbar_move_cb(void *cbdata, Evas *e, Evas_Object *obj, void *event_in
                        s_info.conf.field.render_animator = 0;
                }
        }
-
 }
 
 static void __widget_pixmap_del_cb(void *cbdata, Evas *e, Evas_Object *obj, void *event_info)
@@ -1760,7 +1775,7 @@ static inline void apply_shadow_effect(struct image_option *img_opt, Evas_Object
                return;
        }
 
-       // -90, 2, 4, 0x99000000
+       /* -90, 2, 4, 0x99000000 */
        ea_image_effect_add_outer_shadow(ea_effect, img_opt->shadow.angle, img_opt->shadow.offset, img_opt->shadow.softness, img_opt->shadow.color);
        ea_object_image_effect_set(img, ea_effect);
 
@@ -2755,7 +2770,7 @@ static void __widget_up_cb(void *cbdata, Evas *e, Evas_Object *obj, void *event_
 
                        rx = ((double)x + (double)w / 2.0f) / (double)s_info.screen_width;
                        DbgPrint("x[%d], w[%d], rx[%lf]\n", x, w, rx);
-                       // 0.0    0.125    0.25    0.375   0.5   0.625   0.75    0.875   1.0
+                       /* 0.0    0.125    0.25    0.375   0.5   0.625   0.75    0.875   1.0 */
                        widget_viewer_get_size_type(data->handle, &size_type);
                        switch (size_type) {
                        case WIDGET_SIZE_TYPE_1x1:
@@ -3221,7 +3236,7 @@ static void __widget_data_setup(struct widget_data *data)
                        elm_scroller_bounce_set(scroller, EINA_FALSE, EINA_FALSE);
                        elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
                        elm_scroller_single_direction_set(scroller, ELM_SCROLLER_SINGLE_DIRECTION_HARD);
-                       //elm_object_scroll_lock_x_set(scroller, EINA_TRUE);
+                       /* elm_object_scroll_lock_x_set(scroller, EINA_TRUE); */
 
                        box = evas_object_rectangle_add(data->e);
                        if (box) {
@@ -3286,11 +3301,6 @@ static void remove_widget_dirty_object_list(struct widget_data *data)
        s_info.widget_dirty_objects = eina_list_remove(s_info.widget_dirty_objects, data);
 }
 
-static void remove_gbar_dirty_object_list(struct widget_data *data)
-{
-       s_info.gbar_dirty_objects = eina_list_remove(s_info.gbar_dirty_objects, data);
-}
-
 static void append_widget_dirty_object_list(struct widget_data *data, int idx)
 {
        data->is.field.widget_dirty = 1;
@@ -3336,6 +3346,11 @@ static void append_widget_dirty_object_list(struct widget_data *data, int idx)
        }
 }
 
+static void remove_gbar_dirty_object_list(struct widget_data *data)
+{
+       s_info.gbar_dirty_objects = eina_list_remove(s_info.gbar_dirty_objects, data);
+}
+
 static void append_gbar_dirty_object_list(struct widget_data *data, int idx)
 {
        data->is.field.gbar_dirty = 1;
@@ -3669,8 +3684,8 @@ static void update_visibility(struct widget_data *data)
        if (data->is.field.delayed_resume == 0) { /* Follow the global configuration */
                delay = s_info.conf.field.delayed_resume;
        } else { /* Ignore the global configuration */
-               // 1 : Disable Delayed Pause Resume
-               // 2 : Enable Delayed Pause Resume
+               /* 1 : Disable Delayed Pause Resume */
+               /* 2 : Enable Delayed Pause Resume */
                delay = (data->is.field.delayed_resume == 2);
        }
 
@@ -4483,7 +4498,7 @@ static int widget_system_created(struct widget *handle, struct widget_data *data
 
        if (data->size_type == WIDGET_SIZE_TYPE_UNKNOWN || widget_service_get_size(data->size_type, &data->widget_width, &data->widget_height) < 0) {
                ErrPrint("Failed to get size info: %s\n", widget_viewer_get_pkgname(handle));
-               
+
        } else {
                DbgPrint("System created WIDGET size is (%d)%dx%d\n", data->size_type, data->widget_width, data->widget_height);
        }
@@ -4672,6 +4687,7 @@ static void __widget_resize_cb(struct widget *handle, int ret, void *cbdata)
                widget_unref(data);
                return;
        }
+
        widget_viewer_get_type(handle, 0, &widget_type);
        switch (widget_type) {
        case WIDGET_CONTENT_TYPE_IMAGE:
@@ -5010,7 +5026,6 @@ static void __widget_resize(Evas_Object *widget, Evas_Coord w, Evas_Coord h)
         * Then we should not try to resize resource_id(surface) as width & height.
         * Just keep them their size and try to resize layout only.
         */
-
        if (!widget_viewer_is_created_by_user(data->handle)) {
                /**
                 * Viewer should not be able to resize the box
@@ -5080,6 +5095,7 @@ static void __widget_resize(Evas_Object *widget, Evas_Coord w, Evas_Coord h)
                widget_service_get_need_of_mouse_event(data->widget_id, type, (bool *)&need_of_mouse_event);
                data->is.field.mouse_event = need_of_mouse_event;
        } else {
+
                int ret;
 
                if (type > 0 && type != WIDGET_SIZE_TYPE_UNKNOWN) {
@@ -5206,7 +5222,7 @@ static void __widget_clip_unset(Evas_Object *widget)
        evas_object_clip_unset(data->stage);
 }
 
-/*!
+/**
  * This must be called before update_gbar_geometry
  */
 static void update_stage_geometry(struct acquire_data *acquire_data)
@@ -5220,14 +5236,11 @@ static void update_stage_geometry(struct acquire_data *acquire_data)
        const int delta_y_bottom = (acquire_data->h - (s_info.screen_height - widget_y - widget_h));
 
        stage_w = widget_w > acquire_data->w ? widget_w : acquire_data->w;
-       stage_h = widget_h + acquire_data->h;// - delta_y_top;
+       stage_h = widget_h + acquire_data->h;/* - delta_y_top; */
 
-       if(delta_y_top >= delta_y_bottom)
-       {
+       if (delta_y_top >= delta_y_bottom) {
                evas_object_move(acquire_data->data->stage, 0, widget_y);
-       }
-       else
-       {
+       } else {
                evas_object_move(acquire_data->data->stage, 0, widget_y - acquire_data->h);
        }
 
@@ -5240,18 +5253,15 @@ static void update_gbar_geometry(struct acquire_data *acquire_data)
 
        evas_object_geometry_get(acquire_data->data->widget_layout, &widget_x, &widget_y, &widget_w, &widget_h);
 
-       //How much of the GBAR is outside the screen
+       /* How much of the GBAR is outside the screen */
        const int delta_y_top    = (acquire_data->h - widget_y) < 0 ? 0 : acquire_data->h - widget_y;
        const int delta_y_bottom = (acquire_data->h - (s_info.screen_height - widget_y - widget_h)) < 0 ? 0 : (acquire_data->h - (s_info.screen_height - widget_y - widget_h));
 
-       //If more of the GBAR is outside the top side draw at the bottom, otherwise draw at the top
-       if(delta_y_top >= delta_y_bottom)
-       {
+       /* If more of the GBAR is outside the top side draw at the bottom, otherwise draw at the top */
+       if (delta_y_top >= delta_y_bottom) {
                evas_object_move(acquire_data->data->gbar_layout, 0, widget_y + widget_h - delta_y_bottom);
                effect_resize(acquire_data->data->gbar_layout, acquire_data->w, acquire_data->h, EFFECT_HEIGHT);
-       }
-       else
-       {
+       } else {
                evas_object_move(acquire_data->data->gbar_layout, 0, widget_y + delta_y_top);
                effect_resize(acquire_data->data->gbar_layout, acquire_data->w, acquire_data->h, EFFECT_HEIGHT|EFFECT_MOVE);
        }
@@ -5487,7 +5497,7 @@ static void gbar_update_buffer_object(struct widget_data *data, Evas_Object *gba
                widget_viewer_release_buffer(data->gbar_fb);
                data->gbar_fb = NULL;
        } else {
-               // This is first time
+               /* This is first time */
                gbar_overlay_disable(data);
        }
 
@@ -5954,7 +5964,7 @@ static inline int handle_subscribed_group(struct widget *handle)
                        /* Emit RAW_CREATE event */
                        nr = invoke_raw_event_callback(WIDGET_VIEWER_EVAS_RAW_CREATE, widget_viewer_get_pkgname(handle), widget, WIDGET_ERROR_NONE);
 
-                       if ( (temp_widget_data = get_smart_data(widget)) == NULL) {
+                       if ((temp_widget_data = get_smart_data(widget)) == NULL) {
                                ErrPrint("Failed to get widget data\n");
                                (void)widget_viewer_delete_widget(handle, WIDGET_DELETE_PERMANENTLY, NULL, NULL);
                                return WIDGET_ERROR_FAULT;
@@ -5963,7 +5973,7 @@ static inline int handle_subscribed_group(struct widget *handle)
                        if (nr <= 0 || widget_system_created(handle, temp_widget_data) != WIDGET_ERROR_NONE) {
                                /*
                                 * Deleting evas object will invoke delete callback.
-                                * Then it will invoke the RAW_DELETE event and execute the proper procedures for deleting object 
+                                * Then it will invoke the RAW_DELETE event and execute the proper procedures for deleting object
                                 */
                                widget_viewer_evas_set_permanent_delete(widget, EINA_TRUE);
                                evas_object_del(widget);
@@ -6307,6 +6317,10 @@ EAPI int widget_viewer_evas_init(Evas_Object *win)
 {
        int ret;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!win) {
                return WIDGET_ERROR_INVALID_PARAMETER;
        }
@@ -6324,7 +6338,7 @@ EAPI int widget_viewer_evas_init(Evas_Object *win)
 
        util_screen_size_get(&s_info.screen_width, &s_info.screen_height);
 
-       s_info.conf.field.render_animator = 0;  // By default, use render animator for updating
+       s_info.conf.field.render_animator = 0;  /* By default, use render animator for updating */
 
        ret = widget_viewer_init(util_display_get(), 1, 0.001f, 1);
        if (ret < 0) {
@@ -6361,6 +6375,10 @@ EAPI int widget_viewer_evas_fini(void)
 {
        int ret;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (s_info.initialized) {
                widget_viewer_remove_event_handler(widget_event_handler);
                widget_viewer_remove_fault_handler(widget_fault_handler);
@@ -6378,6 +6396,10 @@ EAPI int widget_viewer_evas_fini(void)
 
 EAPI int widget_viewer_evas_notify_resumed_status_of_viewer(void)
 {
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -6387,6 +6409,10 @@ EAPI int widget_viewer_evas_notify_resumed_status_of_viewer(void)
 
 EAPI int widget_viewer_evas_notify_paused_status_of_viewer(void)
 {
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -6396,6 +6422,10 @@ EAPI int widget_viewer_evas_notify_paused_status_of_viewer(void)
 
 EAPI int widget_viewer_evas_notify_orientation_of_viewer(int orientation)
 {
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -6414,6 +6444,10 @@ EAPI Evas_Object *widget_viewer_evas_add_widget(Evas_Object *parent, const char
        char *cluster = DEFAULT_CLUSTER;
        char *category = DEFAULT_CATEGORY;
 
+       if (!is_widget_feature_enabled()) {
+               return NULL;
+       }
+
        if (!s_info.initialized) {
                ErrPrint("Viewer is not initialized\n");
                return NULL;
@@ -6499,6 +6533,10 @@ EAPI int widget_viewer_evas_set_view_port(Evas_Object *widget, int x, int y, int
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -6520,6 +6558,10 @@ EAPI int widget_viewer_evas_get_view_port(Evas_Object *widget, int *x, int *y, i
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -6552,6 +6594,10 @@ EAPI int widget_viewer_evas_set_option(widget_evas_conf_e type, int value)
 {
        int ret = WIDGET_ERROR_NONE;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        switch ((int)type) {
        case WIDGET_VIEWER_EVAS_SENSITIVE_MOVE:
                s_info.conf.field.sensitive_move = value;
@@ -6613,6 +6659,10 @@ EAPI int widget_viewer_evas_pause_widget(Evas_Object *widget)
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -6626,6 +6676,7 @@ EAPI int widget_viewer_evas_pause_widget(Evas_Object *widget)
                (void)ecore_timer_del(data->delayed_resume_timer);
                data->delayed_resume_timer = NULL;
        }
+
        return widget_viewer_set_visibility(data->handle, WIDGET_HIDE_WITH_PAUSE);
 }
 
@@ -6633,6 +6684,10 @@ EAPI int widget_viewer_evas_resume_widget(Evas_Object *widget)
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -6646,6 +6701,7 @@ EAPI int widget_viewer_evas_resume_widget(Evas_Object *widget)
                (void)ecore_timer_del(data->delayed_resume_timer);
                data->delayed_resume_timer = NULL;
        }
+
        return widget_viewer_set_visibility(data->handle, WIDGET_SHOW);
 }
 
@@ -6654,6 +6710,10 @@ EAPI int widget_viewer_evas_destroy_glance_bar(Evas_Object *widget)
        struct widget_data *data;
        int ret;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -6675,6 +6735,10 @@ EAPI const char *widget_viewer_evas_get_content_info(Evas_Object *widget)
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return NULL;
+       }
+
        if (!s_info.initialized) {
                return NULL;
        }
@@ -6691,6 +6755,10 @@ EAPI const char *widget_viewer_evas_get_title_string(Evas_Object *widget)
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return NULL;
+       }
+
        if (!s_info.initialized) {
                return NULL;
        }
@@ -6707,6 +6775,10 @@ EAPI const char *widget_viewer_evas_get_widget_id(Evas_Object *widget)
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return NULL;
+       }
+
        if (!s_info.initialized) {
                return NULL;
        }
@@ -6723,6 +6795,10 @@ EAPI double widget_viewer_evas_get_period(Evas_Object *widget)
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return 0.0f;
+       }
+
        if (!s_info.initialized) {
                return 0.0f;
        }
@@ -6739,6 +6815,10 @@ EAPI void widget_viewer_evas_cancel_click_event(Evas_Object *widget)
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return;
+       }
+
        if (!s_info.initialized) {
                return;
        }
@@ -6796,6 +6876,10 @@ EAPI int widget_viewer_evas_feed_mouse_up_event(Evas_Object *widget)
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -6810,6 +6894,10 @@ EAPI int widget_viewer_evas_feed_mouse_up_event(Evas_Object *widget)
 
 EAPI int widget_viewer_evas_feed_access_event(Evas_Object *widget, int type, void *_info, void (*ret_cb)(Evas_Object *obj, int ret, void *data), void *cbdata)
 {
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
 #if defined(ELM_ACCESS_ENABLED)
        struct widget_data *data;
        Elm_Access_Action_Info *info = _info;
@@ -7110,6 +7198,10 @@ EAPI void widget_viewer_evas_disable_preview(Evas_Object *widget)
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return;
+       }
+
        if (!s_info.initialized) {
                return;
        }
@@ -7127,6 +7219,10 @@ EAPI void widget_viewer_evas_disable_overlay_text(Evas_Object *widget)
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return;
+       }
+
        if (!s_info.initialized) {
                return;
        }
@@ -7144,6 +7240,10 @@ EAPI void widget_viewer_evas_disable_loading(Evas_Object *widget)
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return;
+       }
+
        if (!s_info.initialized) {
                return;
        }
@@ -7161,6 +7261,10 @@ EAPI void widget_viewer_evas_activate_faulted_widget(Evas_Object *widget)
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return;
+       }
+
        if (!s_info.initialized) {
                return;
        }
@@ -7182,6 +7286,10 @@ EAPI bool widget_viewer_evas_is_faulted(Evas_Object *widget)
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return false;
+       }
+
        if (!s_info.initialized) {
                return 0;
        }
@@ -7199,6 +7307,10 @@ EAPI int widget_viewer_evas_set_raw_event_callback(widget_evas_raw_event_type_e
 {
        struct raw_event_cbdata *cbdata;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        cbdata = calloc(1, sizeof(*cbdata));
        if (!cbdata) {
                ErrPrint("calloc: %d\n", errno);
@@ -7229,6 +7341,10 @@ EAPI int widget_viewer_evas_unset_raw_event_callback(widget_evas_raw_event_type_
        Eina_List *n;
        struct raw_event_cbdata *cbdata;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        switch (type) {
        case WIDGET_VIEWER_EVAS_RAW_DELETE:
                EINA_LIST_FOREACH_SAFE(s_info.raw_event.delete_list, l, n, cbdata) {
@@ -7257,6 +7373,10 @@ EAPI int widget_viewer_evas_freeze_visibility(Evas_Object *widget, widget_visibi
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -7276,6 +7396,10 @@ EAPI int widget_viewer_evas_thaw_visibility(Evas_Object *widget)
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -7295,6 +7419,10 @@ EAPI bool widget_viewer_evas_is_visibility_frozen(Evas_Object *widget)
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return false;
+       }
+
        if (!s_info.initialized) {
                ErrPrint("Not initialized\n");
                return false;
@@ -7314,6 +7442,10 @@ EAPI int widget_viewer_evas_dump_to_file(Evas_Object *widget, const char *filena
        struct widget_data *data;
        FILE *fp;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -7348,8 +7480,12 @@ EAPI bool widget_viewer_evas_is_widget(Evas_Object *widget)
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return false;
+       }
+
        if (!s_info.initialized) {
-               return 0;
+               return false;
        }
 
        data = get_smart_data(widget);
@@ -7365,6 +7501,10 @@ EAPI void widget_viewer_evas_set_permanent_delete(Evas_Object *widget, int flag)
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return;
+       }
+
        if (!s_info.initialized) {
                return;
        }
@@ -7384,6 +7524,10 @@ EAPI int widget_viewer_evas_subscribe_group(const char *cluster, const char *sub
        Eina_List *l;
        int ret;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -7438,6 +7582,10 @@ EAPI int widget_viewer_evas_unsubscribe_group(const char *cluster, const char *s
        Eina_List *l;
        Eina_List *n;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -7465,6 +7613,10 @@ EAPI int widget_viewer_evas_subscribe_category(const char *category)
        Eina_List *l;
        int ret;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -7509,6 +7661,10 @@ EAPI int widget_viewer_evas_unsubscribe_category(const char *category)
        Eina_List *n;
        struct subscribe_category *item;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -7538,6 +7694,10 @@ EAPI int widget_viewer_evas_emit_text_signal(Evas_Object *widget, widget_text_si
 {
        struct widget_data *widget_data_from_evas;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -7556,6 +7716,10 @@ EAPI int widget_viewer_evas_get_instance_id(Evas_Object *widget, char **instance
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -7573,6 +7737,10 @@ EAPI int widget_viewer_evas_set_widget_option(Evas_Object *widget, widget_option
 {
        struct widget_data *data;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
@@ -7601,6 +7769,10 @@ EAPI int widget_viewer_evas_set_preview_image(Evas_Object *widget, widget_size_t
        Eina_List *n;
        struct preview_info *info;
 
+       if (!is_widget_feature_enabled()) {
+               return WIDGET_ERROR_NOT_SUPPORTED;
+       }
+
        if (!s_info.initialized) {
                return WIDGET_ERROR_FAULT;
        }
index 3ed56a8..14e7b2a 100644 (file)
@@ -43,6 +43,7 @@ pkg_check_modules(sdk_pkgs REQUIRED
        bundle
     dlog
        widget_service
+       efl-extension
 )
 
 ADD_DEFINITIONS("-DWIDGET_EVAS_RESOURCE_EDJ=\"${EDJDIR}/widget_viewer_sdk.edj\"")
index 6a613a9..109aec7 100644 (file)
@@ -84,6 +84,7 @@ collections {
                                        text {
                                                style: "info,text";
                                                text: "widget id";
+                                               fit: 1 1;
                                        }
                                }
                        }
@@ -103,6 +104,7 @@ collections {
                                        text {
                                                style: "info,text";
                                                text: "Hello";
+                                               fit: 1 1;
                                        }
                                }
                        }
@@ -119,6 +121,7 @@ collections {
                                        text {
                                                style: "info,text";
                                                text: "content info";
+                                               fit: 1 1;
                                        }
                                }
                        }
@@ -138,6 +141,7 @@ collections {
                                        text {
                                                style: "info,text";
                                                text: "Hello";
+                                               fit: 1 1;
                                        }
                                }
                        }
@@ -154,6 +158,7 @@ collections {
                                        text {
                                                style: "info,text";
                                                text: "title";
+                                               fit: 1 1;
                                        }
                                }
                        }
@@ -173,6 +178,7 @@ collections {
                                        text {
                                                style: "info,text";
                                                text: "Hello";
+                                               fit: 1 1;
                                        }
                                }
                        }
@@ -189,6 +195,7 @@ collections {
                                        text {
                                                style: "info,text";
                                                text: "period";
+                                               fit: 1 1;
                                        }
                                }
                        }
@@ -208,6 +215,7 @@ collections {
                                        text {
                                                style: "info,text";
                                                text: "Hello";
+                                               fit: 1 1;
                                        }
                                }
                        }
@@ -247,6 +255,7 @@ collections {
                                        text {
                                                style: "info,text";
                                                text: "Information";
+                                               fit: 1 1;
                                        }
                                        visible: 0;
                                }
index b0facbc..549248b 100644 (file)
@@ -8,7 +8,6 @@ org.tizen.widget_viewer_sdk sound_server rw---- ------
 org.tizen.widget_viewer_sdk syspopup::db rw---- ------
 org.tizen.widget_viewer_sdk dbus rwx--- ------
 org.tizen.widget_viewer_sdk pulseaudio rwxat- ------
-org.tizen.widget_viewer_sdk ail::db rw---- ------
 org.tizen.widget_viewer_sdk connman r----- ------
 org.tizen.widget_viewer_sdk system rwx--- ------
 org.tizen.widget_viewer_sdk immvibed rw---- ------
@@ -16,16 +15,11 @@ org.tizen.widget_viewer_sdk svi-data r-x--- ------
 org.tizen.widget_viewer_sdk org.tizen.clocksetting rwx--- ------
 org.tizen.widget_viewer_sdk org.tizen.clocksetting::default-resources r-x--- ------
 org.tizen.widget_viewer_sdk e17 r-x--- ------
-org.tizen.widget_viewer_sdk system::vconf rwx--- ------
-org.tizen.widget_viewer_sdk system::vconf_setting rw---- ------
-org.tizen.widget_viewer_sdk system::vconf_inhouse rw---- ------
-org.tizen.widget_viewer_sdk system::vconf_multimedia rw---- ------
 org.tizen.widget_viewer_sdk deviced rwx--- ------
 org.tizen.widget_viewer_sdk deviced::display rw---- ------
 org.tizen.widget_viewer_sdk data-provider-master::data --x--- ------
 org.tizen.widget_viewer_sdk testmode::vconf r----- ------
 org.tizen.widget_viewer_sdk data-provider-master::db rw---- ------
-org.tizen.widget_viewer_sdk data-provider-master::share rwxat- ------
 org.tizen.widget_viewer_sdk data-provider-master::data r-x--- ------
 org.tizen.widget_viewer_sdk data-provider-master::client rw---- ------
 org.tizen.widget_viewer_sdk data-provider-master rw---- ------
index f98c07c..aa8b260 100644 (file)
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <app_control.h>
 #include <app_control_internal.h>
+#include <efl_extension.h>
 
 int errno;
 
@@ -60,7 +61,7 @@ static struct info {
        .ctx = {
                .content_info = NULL,
                .title = NULL,
-               .period = WIDGET_VIEWER_EVAS_DEFAULT_PERIOD, 
+               .period = WIDGET_VIEWER_EVAS_DEFAULT_PERIOD,
                .widget = NULL,
                .size_types = NULL,
                .count_of_size_type = 20,
@@ -69,6 +70,11 @@ static struct info {
 
 #define LONG_PRESS 1.0f
 
+static void back_key_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       ui_app_exit();
+}
+
 static void hide_widget_info_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
 {
        DbgPrint("Hide info panel\n");
@@ -138,8 +144,9 @@ static bool app_create(void *data)
                s_info.win = NULL;
                return false;
        }
-       elm_win_resize_object_add(s_info.win, s_info.box);
-       evas_object_show(s_info.box);
+       evas_object_size_hint_expand_set(s_info.box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_fill_set(s_info.box, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       elm_box_align_set(s_info.box, 0.5, 0.5);
 
        s_info.layout = elm_layout_add(s_info.win);
        if (!s_info.layout) {
@@ -152,10 +159,6 @@ static bool app_create(void *data)
                return false;
        }
 
-       elm_box_align_set(s_info.box, 0.5, 0.5);
-       evas_object_size_hint_expand_set(s_info.box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       evas_object_size_hint_fill_set(s_info.box, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
        if (elm_layout_file_set(s_info.layout, LAYOUT_EDJ, "layout") != EINA_TRUE) {
                LOGE("Failed to load an edje\n");
                evas_object_del(s_info.bg);
@@ -166,13 +169,16 @@ static bool app_create(void *data)
                s_info.win = NULL;
                return false;
        }
+       evas_object_size_hint_expand_set(s_info.layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_fill_set(s_info.layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       elm_win_resize_object_add(s_info.win, s_info.layout);
        evas_object_show(s_info.layout);
 
        elm_object_signal_callback_add(s_info.layout, "mouse,clicked,1", "widget,info,bg", hide_widget_info_cb, NULL);
        evas_object_event_callback_add(s_info.layout, EVAS_CALLBACK_MOUSE_DOWN, layout_down_cb, NULL);
        evas_object_event_callback_add(s_info.layout, EVAS_CALLBACK_MOUSE_UP, layout_up_cb, NULL);
 
-       elm_box_pack_end(s_info.box, s_info.layout);
+       elm_object_part_content_set(s_info.layout, "widget", s_info.box);
 
        /* WIDGET init */
        widget_viewer_evas_set_option(WIDGET_VIEWER_EVAS_DIRECT_UPDATE, 1);
@@ -180,6 +186,8 @@ static bool app_create(void *data)
 
        widget_viewer_evas_init(s_info.win);
 
+       eext_object_event_callback_add(s_info.win, EEXT_CALLBACK_BACK, back_key_cb, NULL);
+
        return true;
 }
 
@@ -195,7 +203,7 @@ static int unload_widget(void)
        DbgPrint("Unload previous widget: %s\n", tmp);
 
        widget_viewer_evas_set_permanent_delete(s_info.ctx.widget, EINA_TRUE);
-       elm_object_part_content_unset(s_info.layout, "widget");
+       elm_box_unpack(s_info.box, s_info.ctx.widget);
        evas_object_del(s_info.ctx.widget);
        free(s_info.ctx.title);
        free(s_info.ctx.content_info);
@@ -218,6 +226,8 @@ static int unload_widget(void)
 
 static void app_terminate(void *data)
 {
+       eext_object_event_callback_del(s_info.win, EEXT_CALLBACK_BACK, back_key_cb);
+
        unload_widget();
 
        /* WIDGET fini */
@@ -259,10 +269,6 @@ static void list_item_clicked_cb(void *data, Evas_Object *obj, void *event_info)
        evas_object_resize(s_info.ctx.widget, w, h);
        evas_object_size_hint_min_set(s_info.ctx.widget, w, h);
        evas_object_size_hint_max_set(s_info.ctx.widget, w, h);
-
-       evas_object_resize(s_info.layout, w, h);
-       evas_object_size_hint_min_set(s_info.layout, w, h);
-       evas_object_size_hint_max_set(s_info.layout, w, h);
 }
 
 static void extra_updated_cb(void *data, Evas_Object *obj, void *event_info)
@@ -359,8 +365,7 @@ static int load_widget(const char *widget_id)
                evas_object_size_hint_min_set(rect, s_info.w, s_info.h);
                evas_object_color_set(rect, 100, 100, 100, 255);
                evas_object_show(rect);
-               elm_object_part_content_set(s_info.layout, "widget", rect);
-               evas_object_show(s_info.layout);
+               elm_box_pack_end(s_info.box, rect);
 
                update_message("Supported size is not found");
                return WIDGET_ERROR_NOT_SUPPORTED;
@@ -384,15 +389,12 @@ static int load_widget(const char *widget_id)
        evas_object_smart_callback_add(s_info.ctx.widget, WIDGET_SMART_SIGNAL_WIDGET_CREATE_ABORTED, widget_create_aborted_cb, NULL);
 
        elm_object_part_text_set(s_info.layout, "widget,id", widget_id);
-       elm_object_part_content_set(s_info.layout, "widget", s_info.ctx.widget);
+       elm_box_pack_end(s_info.box, s_info.ctx.widget);
 
        evas_object_resize(s_info.ctx.widget, w, h);
        evas_object_size_hint_min_set(s_info.ctx.widget, w, h);
        evas_object_size_hint_max_set(s_info.ctx.widget, w, h);
-
-       evas_object_resize(s_info.layout, w, h);
-       evas_object_size_hint_min_set(s_info.layout, w, h);
-       evas_object_size_hint_max_set(s_info.layout, w, h);
+       evas_object_show(s_info.ctx.widget);
 
        return WIDGET_ERROR_NONE;
 }
@@ -427,7 +429,8 @@ static Evas_Object *list_item_content_get_cb(void *data, Evas_Object *obj, const
                icon = elm_icon_add(s_info.win);
                if (icon) {
                        elm_image_file_set(icon, icon_filename, NULL);
-                       elm_image_resizable_set(icon, EINA_FALSE, EINA_FALSE);
+                       elm_image_resizable_set(icon, EINA_TRUE, EINA_TRUE);
+                       evas_object_size_hint_max_set(icon, 100, 100);
                        DbgPrint("Icon: %s\n", icon_filename);
                }
                free(icon_filename);
@@ -448,6 +451,7 @@ static int prepare_widget(const char *widget_id, app_control_h control)
        int h;
        bundle *b;
        static Elm_Genlist_Item_Class class = {
+               .item_style = "1text.1icon",
                .func = {
                        .text_get = list_item_text_get_cb,
                        .content_get = list_item_content_get_cb,