add missing file
authorJisung Ahn <jcastle.ahn@samsung.com>
Wed, 22 Aug 2012 04:50:48 +0000 (13:50 +0900)
committerJisung Ahn <jcastle.ahn@samsung.com>
Wed, 22 Aug 2012 04:50:48 +0000 (13:50 +0900)
Change-Id: Ic21b33793e72879be37296180ad43f19aa5785cb

198 files changed:
common/include/ivug-callback.h [new file with mode: 0755]
common/include/ivug-config.h [new file with mode: 0755]
common/include/ivug-db.h [new file with mode: 0755]
common/include/ivug-drm.h [new file with mode: 0755]
common/include/ivug-exif.h [new file with mode: 0755]
common/include/ivug-file-info.h [new file with mode: 0755]
common/include/ivug-message.h [new file with mode: 0755]
common/include/ivug-util.h [new file with mode: 0755]
common/include/ivug-uuid.h [new file with mode: 0755]
common/src/ivug-callback.c [new file with mode: 0755]
common/src/ivug-callback.c.bak [new file with mode: 0755]
common/src/ivug-config.c [new file with mode: 0755]
common/src/ivug-db.c [new file with mode: 0755]
common/src/ivug-drm.c [new file with mode: 0755]
common/src/ivug-exif.c [new file with mode: 0755]
common/src/ivug-file-info.c [new file with mode: 0755]
common/src/ivug-message.c [new file with mode: 0755]
common/src/ivug-util.c [new file with mode: 0755]
common/src/ivug-uuid.c [new file with mode: 0755]
feature/CMakeLists.txt [new file with mode: 0755]
feature/include/ivug-email.h [new file with mode: 0755]
feature/include/ivug-ext-ug.h [new file with mode: 0755]
feature/include/ivug-vibration.h [new file with mode: 0755]
feature/src/ivug-ext-ug.c [new file with mode: 0755]
feature/src/ivug-vibration.c [new file with mode: 0755]
include/ivug-datatypes.h [new file with mode: 0755]
include/ivug-define.h [new file with mode: 0755]
main/layout/crop-view/T06_controlbar_bg.png [new file with mode: 0755]
main/layout/gengrid/00_winset_thumbs_bg.png [new file with mode: 0755]
main/layout/gengrid/00_winset_thumbs_focus_bg.png [new file with mode: 0755]
main/layout/icons/T01_btn_paused.png [new file with mode: 0755]
main/layout/images/theme/blue/00_winset_control_toolbar_bg.png [new file with mode: 0755]
main/layout/images/theme/blue/00_winset_control_top_arrow.png [new file with mode: 0755]
main/layout/images/theme/blue/00_winset_control_top_bg.png [new file with mode: 0755]
main/layout/images/theme/blue/00_winset_title_bg.png [new file with mode: 0755]
main/layout/images/theme/blue/00_winset_title_line.png [new file with mode: 0755]
main/layout/images/theme/blue/T01_Edit Field_clear.png [new file with mode: 0755]
main/layout/images/theme/blue/T01_title_btn.png [new file with mode: 0755]
main/layout/images/theme/blue/T01_title_btn_press.png [new file with mode: 0755]
main/layout/images/theme/white/00_winset_control_toolbar_bg.png [new file with mode: 0755]
main/layout/images/theme/white/00_winset_control_top_arrow.png [new file with mode: 0755]
main/layout/images/theme/white/00_winset_control_top_bg.png [new file with mode: 0755]
main/layout/images/theme/white/00_winset_title_bg.png [new file with mode: 0755]
main/layout/images/theme/white/00_winset_title_line.png [new file with mode: 0755]
main/layout/images/theme/white/T01_Edit Field_clear.png [new file with mode: 0755]
main/layout/images/theme/white/T01_title_btn.png [new file with mode: 0755]
main/layout/images/theme/white/T01_title_btn_press.png [new file with mode: 0755]
main/layout/ivug-crop-view.edc [new file with mode: 0755]
main/layout/ivug-gengrid.edc [new file with mode: 0755]
main/layout/ivug-name-view.edc [new file with mode: 0755]
main/layout/ivug-popup.edc [new file with mode: 0755]
main/layout/ivug-theme.edc [new file with mode: 0755]
main/res/images/01_Control icon/00_winset_btn_prev.png [new file with mode: 0755]
main/res/images/01_Control icon/01_controlbar_icon_trim.png [new file with mode: 0755]
main/res/images/01_Control icon/01_controllbar_icon_close.png [new file with mode: 0755]
main/res/images/01_Control icon/T01_1_controlbar_icon_detail.png [new file with mode: 0755]
main/res/images/01_Control icon/T01_1_title_icon_set_as.png [new file with mode: 0755]
main/res/images/01_Control icon/T01_Option tray_Edit.png [new file with mode: 0755]
main/res/images/01_Control icon/T01_Title_icon_more.png [new file with mode: 0755]
main/res/images/01_Control icon/T01_controlbar_icon_add.png [new file with mode: 0755]
main/res/images/01_Control icon/T01_controlbar_icon_save.png [new file with mode: 0755]
main/res/images/01_Control icon/T01_controlbar_icon_share.png [new file with mode: 0755]
main/res/images/Popup_icon/T01_1_popup_icon_Crop.png [new file with mode: 0755]
main/res/images/Popup_icon/T01_1_popup_icon_Paste from Clipboard.png [new file with mode: 0755]
main/res/po/.pot [new file with mode: 0755]
main/res/po/ar.po [new file with mode: 0755]
main/res/po/bg.po [new file with mode: 0755]
main/res/po/ca.po [new file with mode: 0755]
main/res/po/cs.po [new file with mode: 0755]
main/res/po/csv2po_v2 [new file with mode: 0755]
main/res/po/da.po [new file with mode: 0755]
main/res/po/en_US.po [new file with mode: 0755]
main/res/po/fi.po [new file with mode: 0755]
main/res/po/he.po [new file with mode: 0755]
main/res/po/hi.po [new file with mode: 0755]
main/res/po/hr.po [new file with mode: 0755]
main/res/po/hu.po [new file with mode: 0755]
main/res/po/id.po [new file with mode: 0755]
main/res/po/lt.po [new file with mode: 0755]
main/res/po/lv.po [new file with mode: 0755]
main/res/po/ms.po [new file with mode: 0755]
main/res/po/no.po [new file with mode: 0755]
main/res/po/pl.po [new file with mode: 0755]
main/res/po/ro.po [new file with mode: 0755]
main/res/po/sk.po [new file with mode: 0755]
main/res/po/sl.po [new file with mode: 0755]
main/res/po/sr.po [new file with mode: 0755]
main/res/po/sv.po [new file with mode: 0755]
main/res/po/th.po [new file with mode: 0755]
main/res/po/uk.po [new file with mode: 0755]
main/res/po/vi.po [new file with mode: 0755]
main/src/control/ivug-context.c [new file with mode: 0755]
main/src/control/ivug-context.h [new file with mode: 0755]
main/src/control/ivug-crop-ug.cpp [new file with mode: 0755]
main/src/control/ivug-crop-ug.h [new file with mode: 0755]
main/src/control/ivug-detail-info.c [new file with mode: 0755]
main/src/control/ivug-detail-info.h [new file with mode: 0755]
main/src/control/ivug-filter.c [new file with mode: 0755]
main/src/control/ivug-filter.h [new file with mode: 0755]
main/src/control/ivug-popup.c [new file with mode: 0755]
main/src/control/ivug-popup.h [new file with mode: 0755]
main/src/control/ivug-selectioninfo.c [new file with mode: 0755]
main/src/control/ivug-selectioninfo.h [new file with mode: 0755]
main/src/control/ivug-setas.cpp [new file with mode: 0755]
main/src/control/ivug-setas.h [new file with mode: 0755]
main/src/control/ivug-widget.c [new file with mode: 0755]
main/src/control/ivug-widget.h [new file with mode: 0755]
main/src/include/ivug-common.h [new file with mode: 0755]
main/src/include/ivug-crop-view.h [new file with mode: 0755]
main/src/include/ivug-details-view.h [new file with mode: 0755]
main/src/include/ivug-main-view.h [new file with mode: 0755]
main/src/include/ivug-name-view.h [new file with mode: 0755]
main/src/include/ivug-setas-view.h [new file with mode: 0755]
main/src/include/ivug-slider-item.h [new file with mode: 0755]
main/src/include/ivug-slider.h [new file with mode: 0755]
main/src/include/ivug-string.h [new file with mode: 0755]
main/src/slider/ivug-slider-item.cpp [new file with mode: 0755]
main/src/slider/ivug-slider-mouse.cpp [new file with mode: 0755]
main/src/slider/ivug-slider-priv.h [new file with mode: 0755]
main/src/slider/ivug-slider.cpp [new file with mode: 0755]
main/src/view/ivug-crop-view.cpp [new file with mode: 0755]
main/src/view/ivug-main-view-menu.cpp [new file with mode: 0755]
main/src/view/ivug-main-view-menu.h [new file with mode: 0755]
main/src/view/ivug-main-view-toolbar.cpp [new file with mode: 0755]
main/src/view/ivug-main-view-toolbar.h [new file with mode: 0755]
main/src/view/ivug-main-view.cpp [new file with mode: 0755]
main/src/view/ivug-name-view.c [new file with mode: 0755]
main/src/view/ivug-setas-view-callerid.cpp [new file with mode: 0755]
main/src/view/ivug-setas-view-callerid.h [new file with mode: 0755]
main/src/view/ivug-setas-view-wallpaper.cpp [new file with mode: 0755]
main/src/view/ivug-setas-view-wallpaper.h [new file with mode: 0755]
medialist/CMakeLists.txt [new file with mode: 0755]
medialist/include/ivug-media.h [new file with mode: 0755]
medialist/include/ivug-medialist.h [new file with mode: 0755]
medialist/src/ivug-data-list.c [new file with mode: 0755]
medialist/src/ivug-data-list.h [new file with mode: 0755]
medialist/src/ivug-mediadata.c [new file with mode: 0755]
medialist/src/ivug-mediadata.h [new file with mode: 0755]
medialist/src/ivug-medialist.c [new file with mode: 0755]
packaging/changelog [new file with mode: 0755]
res/images/T01_Nocontents_broken.png [new file with mode: 0755]
res/manifest/ug-image-viewer-efl.png [new file with mode: 0755]
res/manifest/ug-image-viewer-efl.xml [new file with mode: 0755]
slideshow/CMakeLists.txt [new file with mode: 0755]
slideshow/include/ivug-slideshow.h [new file with mode: 0755]
slideshow/res/images/T01_Noise.png [new file with mode: 0755]
slideshow/res/layout/icons/T01_btn_play.png [new file with mode: 0755]
slideshow/res/layout/ivug-ss-ly.edc [new file with mode: 0755]
slideshow/src/effect/include/ivug-anim.h [new file with mode: 0755]
slideshow/src/effect/include/ivug-effect.h [new file with mode: 0755]
slideshow/src/effect/ivug-anim.c [new file with mode: 0755]
slideshow/src/effect/ivug-blind.c [new file with mode: 0755]
slideshow/src/effect/ivug-dissolve.c [new file with mode: 0755]
slideshow/src/effect/ivug-effect.c [new file with mode: 0755]
slideshow/src/effect/ivug-fade.c [new file with mode: 0755]
slideshow/src/effect/ivug-iris.c [new file with mode: 0755]
slideshow/src/effect/ivug-slide.c [new file with mode: 0755]
slideshow/src/effect/ivug-xcapture.c [new file with mode: 0755]
slideshow/src/effect/ivug-xcapture.h [new file with mode: 0755]
slideshow/src/effect/template.c [new file with mode: 0755]
slideshow/src/ivug-slideshow.cpp [new file with mode: 0755]
widget/CMakeLists.txt [new file with mode: 0755]
widget/include/Animation.h [new file with mode: 0755]
widget/include/ECoreAnimator.h [new file with mode: 0755]
widget/include/EFLUtil.h [new file with mode: 0755]
widget/include/EvasSmartObj.h [new file with mode: 0755]
widget/include/Exception.h [new file with mode: 0755]
widget/include/Object.h [new file with mode: 0755]
widget/include/Primitives.h [new file with mode: 0755]
widget/include/ScrollerClient.h [new file with mode: 0755]
widget/include/Transit.h [new file with mode: 0755]
widget/include/ivug-image.h [new file with mode: 0755]
widget/include/ivug-listpopup.h [new file with mode: 0755]
widget/include/ivug-scissorbox.h [new file with mode: 0755]
widget/res/images/crop/T06_selection.png [new file with mode: 0755]
widget/res/images/crop/T06_selection_Delete.png [new file with mode: 0755]
widget/res/images/crop/T06_selection_Resizing_V.png [new file with mode: 0755]
widget/res/images/crop/T06_selection_Resizing_h.png [new file with mode: 0755]
widget/res/images/crop/T06_selection_Rotate.png [new file with mode: 0755]
widget/res/images/scissorbox/T01_CallerID_hold.png [new file with mode: 0755]
widget/res/images/scissorbox/T01_CallerID_line_W.png [new file with mode: 0755]
widget/res/images/scissorbox/T01_CallerID_line_W_press.png [new file with mode: 0755]
widget/res/images/scissorbox/T01_CallerID_line_h.png [new file with mode: 0755]
widget/res/images/scissorbox/T01_CallerID_line_h_press.png [new file with mode: 0755]
widget/res/images/scissorbox/T01_CallerID_normal.png [new file with mode: 0755]
widget/res/images/scissorbox/T01_CallerID_press.png [new file with mode: 0755]
widget/res/images/scissorbox/T01_btn_optiontray.png [new file with mode: 0755]
widget/res/layout/ivug-scroller.edc [new file with mode: 0755]
widget/src/common/BufferCanvas.h [new file with mode: 0755]
widget/src/common/Primitives.cpp [new file with mode: 0755]
widget/src/common/Scroller.cpp [new file with mode: 0755]
widget/src/common/Scroller.h [new file with mode: 0755]
widget/src/image/ivug-image-photocam.cpp [new file with mode: 0755]
widget/src/scissorbox/ScissorBox.cpp [new file with mode: 0755]
widget/src/scissorbox/ScissorBox.h [new file with mode: 0755]
widget/src/scissorbox/ivug-scissorbox.cpp [new file with mode: 0755]
widget/src/util/EFLUtil.cpp [new file with mode: 0755]
widget/src/util/ivug-listpopup.c [new file with mode: 0755]

diff --git a/common/include/ivug-callback.h b/common/include/ivug-callback.h
new file mode 100755 (executable)
index 0000000..fac346c
--- /dev/null
@@ -0,0 +1,37 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+
+#ifndef __IVUG_CALLBACK_H__
+#define __IVUG_CALLBACK_H__
+
+typedef void (*callback_func_t) (void *data1, void *data2, void *data3, void *user_data);
+
+typedef struct {
+       callback_func_t CBFunc;
+       void *data;
+}callback_handle_t;
+
+callback_handle_t * ivug_callback_register(void);
+
+void ivug_callback_set_callback(callback_handle_t *handle, callback_func_t callback, void *data);
+
+void ivug_callback_call(callback_handle_t *handle, void *data1, void *data2, void *data3);
+
+void ivug_callback_unregister(callback_handle_t *handle);
+
+#endif                         // __IVUG_CALLBACK_H__
+//! End of a file
diff --git a/common/include/ivug-config.h b/common/include/ivug-config.h
new file mode 100755 (executable)
index 0000000..e6a480c
--- /dev/null
@@ -0,0 +1,59 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_CONFIG_H__
+#define __IVUG_CONFIG_H__
+
+#include <vconf.h>
+
+typedef enum {
+       SLIDE_SHOW_MODE_NORMAL                  = 0x00,
+       SLIDE_SHOW_MODE_REPEAT                  = 0x01,
+       SLIDE_SHOW_MODE_SHUFFLE                 = 0x02,
+       SLIDE_SHOW_MODE_SHUFFLE_REPEAT  = 0x03,
+} slide_show_mode;
+
+typedef enum {
+       IVUG_EFFECT_TYPE_UNKNOWN = -1,
+
+       IVUG_EFFECT_TYPE_IRIS= 0x00,
+       IVUG_EFFECT_TYPE_DISSOLVE,
+       IVUG_EFFECT_TYPE_SLIDE,
+       IVUG_EFFECT_TYPE_DISSOLVE_FADE,
+       IVUG_EFFECT_TYPE_SPLIT,
+       IVUG_EFFECT_TYPE_MAX,
+} ivug_effect_type;
+
+typedef void (*_vconf_state_changed_cb)(keynode_t* node, void *data);
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+bool ivug_config_set_lockscreen_image(const char* filepath);
+
+bool ivug_config_set_homescreen_image(const char* filepath);
+
+void ivug_config_get_slideshow_setting(slide_show_mode * /* OUT */ mode,
+                                                       double * /* OUT */ interval_time,
+                                                       ivug_effect_type * /* OUT */ effect_type);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __IVUG_CONFIG_H__
diff --git a/common/include/ivug-db.h b/common/include/ivug-db.h
new file mode 100755 (executable)
index 0000000..7d6e7de
--- /dev/null
@@ -0,0 +1,67 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_DB_H__
+#define __IVUG_DB_H__
+
+#include <stdbool.h>
+
+#include "ivug-datatypes.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *filter_handle;
+typedef void *media_handle;
+
+typedef bool (*ivug_db_cb)(media_handle media, void *user_data);
+
+#define IVUG_MAX_CONDITION_LEN (1024)
+
+bool ivug_db_create(void);
+bool ivug_db_destroy(void);
+
+bool ivug_db_create_filter(filter_handle *filter);
+bool ivug_db_destroy_filter(filter_handle filter);
+bool ivug_db_set_filter(filter_handle filter, ivug_view_by view_by, ivug_media_type media_type, char *condition);
+bool ivug_db_set_filter_offset(filter_handle filter, int stp, int endp);
+
+media_handle ivug_db_get_file_handle(const char* filepath);
+media_handle ivug_db_get_file_handle_from_media_id(const char* media_id);
+media_handle ivug_db_get_folder_handle(const char* folderpath);
+
+bool ivug_db_destroy_file_handle(media_handle m_handle);
+bool ivug_db_destroy_folder_handle(media_handle m_handle);
+
+bool ivug_db_get_all_folder_list(ivug_db_cb callback, void *data);
+
+/*
+       below functions returned values should be freed by user
+*/
+char *ivug_db_get_file_path(media_handle media);
+char *ivug_db_get_folder_name(media_handle media);
+char *ivug_db_get_folder_id(media_handle media);
+char *ivug_db_get_folder_path(media_handle media);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __IVUG_DB_H__
+
diff --git a/common/include/ivug-drm.h b/common/include/ivug-drm.h
new file mode 100755 (executable)
index 0000000..891100c
--- /dev/null
@@ -0,0 +1,92 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_DRM_H__
+#define __IVUG_DRM_H__
+
+#include <stdbool.h>
+
+typedef enum IVUG_DRM_SETAS_TYPE
+{
+       IVUG_DRM_SETAS_NONE = -1,
+       IVUG_DRM_SETAS_WALLPAPER,
+       IVUG_DRM_SETAS_CALLERID,
+}_ivug_drm_setas_type;
+
+typedef enum
+{
+       IVUG_DRM_RESULT_LIMITED = -1,
+       IVUG_DRM_RESULT_UNLIMITED,
+       IVUG_DRM_RESULT_COUNT,
+       IVUG_DRM_RESULT_DATETIME,
+       IVUG_DRM_RESULT_INTERVAL_DAYS,
+       IVUG_DRM_RESULT_TIMED_COUNT,
+       IVUG_DRM_RESULT_ACCUMULATED,
+       IVUG_DRM_RESULT_INDIVIDUAL,
+       IVUG_DRM_RESULT_SYSTEM,
+}drm_constraints;
+
+typedef struct
+{
+       drm_constraints constraints;
+       int data;
+}drm_data_t;
+
+typedef void *drm_handle_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+       Check whether @param file_path is DRM or not.
+*/
+bool ivug_drm_is_drm_file(const char* file_path);
+\r
+/*
+       Check RO is valid.
+       FL case : Always return true(valid RO).
+*/
+bool ivug_drm_has_valid_ro(const char *path);
+
+/*
+       Retrieving infomation from file
+*/
+char* ivug_drm_get_drm_vendor_info(const char *path);
+bool ivug_drm_get_forwarding_info(const char *path);
+
+bool ivug_drm_is_possible_to_setas(const char* path, _ivug_drm_setas_type type);
+\r
+/*
+       Decrypt DRM file and allocated in memory.
+
+       CAUTION : this functionn read entire file and allocate memory with size of entire file.
+*/\r
+drm_data_t * ivug_drm_check_constraint(const char* path);
+
+/* return value must be freed */
+char * ivug_drm_get_right_url(const char *path);
+char * ivug_drm_get_mime(const char *path);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __IVUG_DRM_H__
+
diff --git a/common/include/ivug-exif.h b/common/include/ivug-exif.h
new file mode 100755 (executable)
index 0000000..a76913b
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *       http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __IVUG_EXIF_H__
+#define __IVUG_EXIF_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+int ivug_exif_set_rotate(const char *file, int degree);
+
+int ivug_exif_get_rotate(const char *file, int *degree);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif         //__IVUG_EXIF_H__
+
+
diff --git a/common/include/ivug-file-info.h b/common/include/ivug-file-info.h
new file mode 100755 (executable)
index 0000000..7f35502
--- /dev/null
@@ -0,0 +1,58 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_FILE_INFO_H__
+#define __IVUG_FILE_INFO_H__
+
+#include <stdbool.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+       ivug_fileinfo_*() returns false when error. otherwise return true and fill proper value in [out] param
+*/
+bool ivug_fileinfo_get_image_gps_info(const char* filepath, double * /* OUT */ latitude, double * /* OUT */ longitude);
+bool ivug_fileinfo_get_video_gps_info(const char *filepath, double * /* OUT */ latitude, double * /* OUT */ longitude);
+
+bool ivug_fileinfo_get_video_resolution(const char *filepath, int * /* OUT */ pWidth, int * /* OUT */pHeight);
+bool ivug_fileinfo_get_image_resolution(const char *filepath, int * /* OUT */ pWidth, int * /* OUT */pHeight);
+
+
+/*
+       return file extension string. if file is DRM file, decrypted file extension is returned.
+
+       CAUTION : user should free returned string.
+*/
+char *ivug_fileinfo_get_file_extension(const char *filepath);
+
+
+/*
+       return mine type from drm or non-drm file.
+
+       CAUTION : user should free returned string.
+*/
+char *ivug_fileinfo_get_mime_type(const char *filepath);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif                 // __IVUG_FILE_INFO_H__
+
diff --git a/common/include/ivug-message.h b/common/include/ivug-message.h
new file mode 100755 (executable)
index 0000000..5d73980
--- /dev/null
@@ -0,0 +1,44 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __MESSAGE_H__
+#define __ MESSAGE_H__
+
+#include <stdbool.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void * MessageHandle;
+typedef void (*FnMessage)(     int param1, int param2, int param3, void *param4, void *client_data);
+
+
+bool remove_message_handle(MessageHandle handle);
+
+MessageHandle create_message_handle();
+
+bool register_message(MessageHandle handle, const char *command, FnMessage cb, void *data );
+bool unregister_message(MessageHandle handle, const char *command, FnMessage cb);
+
+bool send_message(MessageHandle handle, const char *command, int param1, int param2, int param3, void *param4);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __FMRADIO_MESSAGE_H__
+
diff --git a/common/include/ivug-util.h b/common/include/ivug-util.h
new file mode 100755 (executable)
index 0000000..fa0f99f
--- /dev/null
@@ -0,0 +1,87 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_UTIL_H__
+#define __IVUG_UTIL_H__
+
+#include <stdbool.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+
+*/
+bool ivug_is_web_uri(const char* uri);
+
+bool ivug_remove_file(const char *filepath);
+
+bool ivug_is_file_exist(const char* filepath);
+
+bool ivug_rename_file(const char *src, const char *dst);
+
+bool ivug_copy_file(const char *filename, const char *dest);
+
+const char *ivug_get_filename(const char *filepath);
+
+unsigned int get_distance(int prevX, int prevY, int X, int Y);
+
+/*
+       Generate temporary file name with given path and extension.
+       returned value should free() by user.
+*/
+char *ivug_mktemp(char* filepath, char*ext);
+
+
+/*
+       LCD sleep control.
+*/
+bool ivug_prohibit_lcd_off(void);
+bool ivug_allow_lcd_off(void);
+
+
+/*
+       Get mime type from file path. Can be used either DRM and non DRM.
+       should free returned after use.
+*/
+
+bool ivug_is_editable_video_file(char *filepath);
+
+
+/*
+       returned values should be freed by user
+*/
+int ivug_atoi(const char *number);\r
+
+double ivug_atod(const char *number);
+
+char * ivug_generate_file_name(const char *filepath);
+
+/*
+       Removes leading and trailing whitespace from string
+       This function doesn't allocate or reallocate any memory
+*/
+char * ivug_strip_string(char* name);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
+#endif //__IVUG_UTIL_H__
+
diff --git a/common/include/ivug-uuid.h b/common/include/ivug-uuid.h
new file mode 100755 (executable)
index 0000000..661515e
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_UUID_H__
+#define __IVUG_UUID_H__
+
+#include "ivug-datatypes.h"
+#include <stdbool.h>
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+UUID uuid_assign(UUID id);
+
+void uuid_free(UUID id);
+
+int uuid_compare(UUID id1, UUID id2);
+
+const char *uuid_getchar(UUID id);
+
+UUID uuid_getuuid(const char *szID);
+
+bool uuid_is_valid(UUID id);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __IVUG_UUID_H__
+
diff --git a/common/src/ivug-callback.c b/common/src/ivug-callback.c
new file mode 100755 (executable)
index 0000000..60daad8
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *       http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ivug-debug.h"
+#include "ivug-callback.h"
+
+#include <stdlib.h>
+//callback_func_t g_callback;
+
+callback_handle_t * ivug_callback_register()
+{
+       callback_handle_t *callback_handle = calloc(1, sizeof(callback_handle_t));
+       return callback_handle;
+}
+
+void ivug_callback_set_callback(callback_handle_t *handle, callback_func_t callback, void *data)
+{
+       IV_ASSERT(handle != NULL);
+       handle->CBFunc = callback;
+       handle->data = data;
+}
+
+void ivug_callback_call(callback_handle_t *handle, void *data1, void *data2, void *data3)
+{
+       IV_ASSERT(handle != NULL);
+       if(handle->CBFunc)
+       {
+               (handle->CBFunc)(data1, data2, data3, handle->data);
+       }
+}
+
+void ivug_callback_unregister(callback_handle_t *handle)
+{
+       IV_ASSERT(handle != NULL);
+       free(handle);
+}
+
diff --git a/common/src/ivug-callback.c.bak b/common/src/ivug-callback.c.bak
new file mode 100755 (executable)
index 0000000..87aa41a
--- /dev/null
@@ -0,0 +1,51 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+
+#include "ivug-debug.h"
+#include "ivug-callback.h"
+
+#include <stdlib.h>
+//callback_func_t g_callback;
+
+callback_handle_t * ivug_callback_register()
+{
+       callback_handle_t *callback_handle = calloc(1, sizeof(callback_handle_t));
+       return callback_handle;
+}
+
+void ivug_callback_set_callback(callback_handle_t *handle, callback_func_t callback, void *data)
+{
+       IV_ASSERT(handle != NULL);
+       handle->CBFunc = callback;
+       handle->data = data;
+}
+
+void ivug_callback_call(callback_handle_t *handle, void *data1, void *data2, void *data3)
+{
+       IV_ASSERT(handle != NULL);
+       if(handle->CBFunc)
+       {
+               (handle->CBFunc)(data1, data2, data3, handle->data);
+       }
+}
+
+void ivug_callback_unregister(callback_handle_t *handle)
+{
+       IV_ASSERT(handle != NULL);
+       free(handle);
+}
+
diff --git a/common/src/ivug-config.c b/common/src/ivug-config.c
new file mode 100755 (executable)
index 0000000..2efd873
--- /dev/null
@@ -0,0 +1,223 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+//#include "ivug-common.h"
+#include "ivug-define.h"
+#include "ivug-datatypes.h"
+#include "ivug-uuid.h"
+
+#include <Elementary.h>
+#include <assert.h>
+
+#include "statistics.h"
+#include "ivug-debug.h"
+
+#include "ivug-config.h"
+
+#include <vconf.h>
+#include <vconf-keys.h>
+
+//TODO: Request vconf key to setting part, Slide show setting vconf key
+#define VCONFKEY_GALLERY_INTERVAL_TIME "db/setting/gallery/interval_time"  //double
+#define VCONFKEY_GALLERY_REPEAT_STATE  "db/setting/gallery/repeat_state" //boolean
+#define VCONFKEY_GALLERY_SHUFFLE_STATE  "db/setting/gallery/shuffle_state" //boolean
+#define VCONFKEY_GALLERY_TRANSITION_EFFECT     "db/setting/gallery/ss_effect"  //char
+
+enum { STATE_FALSE = 0, STATE_TRUE = 1, };
+
+/*
+       Set lock screen with given image.
+
+       CAUTION : does not check filepath integrity
+*/
+bool ivug_config_set_lockscreen_image(const char* filepath)
+{
+       if(filepath == NULL)
+       {
+               MSG_IMAGEVIEW_ERROR("Lock screen path is NULL");
+               return FALSE;
+       }
+
+       if(vconf_set_str( VCONFKEY_IDLE_LOCK_BGSET, filepath ) < 0)
+       {
+               MSG_IMAGEVIEW_ERROR("Lockscreen set Error : %s", filepath);
+               return FALSE;
+       }
+
+       MSG_IMAGEVIEW_HIGH("Set Lockscreen filepath = %s", filepath);
+
+       return TRUE;
+}
+
+/*
+       Set home screen with given image
+
+       CAUTION : does not check filepath integrity
+*/
+bool ivug_config_set_homescreen_image( const char* filepath )
+{
+       if(filepath == NULL)
+       {
+               MSG_IMAGEVIEW_ERROR("Home screen path is NULL");
+               return FALSE;
+       }
+// TODO : Need to check file existence?????
+       if(vconf_set_str(VCONFKEY_BGSET, filepath) < 0)
+       {
+               MSG_IMAGEVIEW_ERROR("Homescreen set Error");
+               return FALSE;
+       }
+
+       MSG_IMAGEVIEW_HIGH("Set Homescreen filepath = %s", filepath);
+       return TRUE;
+}
+
+
+static bool
+_ivug_config_get_slideshow_repeat_state(void)
+{
+       int repeat_state = STATE_FALSE;
+
+       if(vconf_get_bool(VCONFKEY_GALLERY_REPEAT_STATE, &repeat_state) < 0)
+       {
+               MSG_IMAGEVIEW_ERROR("vconf_get_bool failed, set as repeat state as default: false");
+               return false;
+       }
+
+       MSG_IMAGEVIEW_HIGH("repeat state is: %d", repeat_state);
+
+       return (repeat_state == STATE_TRUE ? true : false);
+}
+
+static bool
+_ivug_config_get_slideshow_shuffle_state(void)
+{
+       int shuffle_state = STATE_FALSE;
+
+       if(vconf_get_bool(VCONFKEY_GALLERY_SHUFFLE_STATE, &shuffle_state) < 0)
+       {
+               MSG_IMAGEVIEW_ERROR("vconf_get_bool failed, set as shuffle state as default: false");
+               return false;
+       }
+
+       MSG_IMAGEVIEW_HIGH("shuffle state is: %d", shuffle_state);
+
+       return (shuffle_state == STATE_TRUE ? true : false);
+}
+
+static double
+_ivug_config_get_slideshow_interval_time(void)
+{
+       double interval_time = 0.0;
+
+       if(vconf_get_dbl(VCONFKEY_GALLERY_INTERVAL_TIME, &interval_time) < 0)
+       {
+               MSG_IMAGEVIEW_ERROR("vconf_get_dbl failed, set as interval time as -1");
+
+               interval_time = -1.0;
+       }
+
+       MSG_IMAGEVIEW_HIGH("interval time is: %f", interval_time);
+       return interval_time;
+}
+
+static char *
+_ivug_config_get_slideshow_effect_type(void)
+{
+// TODO : Free returned string??
+       char *effect_str = NULL;
+       effect_str = vconf_get_str(VCONFKEY_GALLERY_TRANSITION_EFFECT);
+
+       if(!effect_str)
+       {
+               MSG_IMAGEVIEW_ERROR("vconf_get_str failed, set as effect type as default");
+
+               effect_str = NULL;
+       }
+
+       MSG_IMAGEVIEW_HIGH("effect is: %s", effect_str);
+
+       return effect_str;
+}
+
+static ivug_effect_type
+_ivug_config_get_effect_type_by_string(char *effect_str)
+{
+       IV_ASSERT(effect_str != NULL);
+
+       ivug_effect_type type = IVUG_EFFECT_TYPE_SLIDE;
+
+       if(!strncmp(effect_str, "Slide", strlen(effect_str)))
+       {
+               type = IVUG_EFFECT_TYPE_SLIDE;
+       }
+       else if(!strncmp(effect_str, "Iris", strlen(effect_str)))
+       {
+               type = IVUG_EFFECT_TYPE_IRIS;
+       }
+       else if(!strncmp(effect_str, "Dissolve", strlen(effect_str)))
+       {
+               type = IVUG_EFFECT_TYPE_DISSOLVE;
+       }
+       else if(!strncmp(effect_str, "DissolveFade", strlen(effect_str)))
+       {
+               type = IVUG_EFFECT_TYPE_DISSOLVE_FADE;
+       }
+       else if(!strncmp(effect_str, "Split", strlen(effect_str)))
+       {
+               type = IVUG_EFFECT_TYPE_SPLIT;
+       }
+       else //Set all other cases as default NONE
+       {
+               MSG_SLIDER_WARN("Invalid type : %s", effect_str);
+               type = IVUG_EFFECT_TYPE_UNKNOWN;
+       }
+
+       MSG_IMAGEVIEW_HIGH("effect_str = %s, type = %d", effect_str, type);
+
+       return type;
+}
+
+void
+ivug_config_get_slideshow_setting(slide_show_mode *mode,
+                                                       double *interval_time,
+                                                       ivug_effect_type *effect_type)
+{
+       *mode = SLIDE_SHOW_MODE_NORMAL;
+
+       bool state;
+
+       state = _ivug_config_get_slideshow_repeat_state();
+       if(state == true)
+       {
+               *mode |= SLIDE_SHOW_MODE_REPEAT;
+       }
+
+       state = _ivug_config_get_slideshow_shuffle_state();
+       if(state == true)
+       {
+               *mode |= SLIDE_SHOW_MODE_SHUFFLE;
+       }
+
+       *interval_time = _ivug_config_get_slideshow_interval_time();
+
+       /* EFFECT_NONE, EFFECT_DISSOLVE_FADE, EFFECT_DISSOLVE_FADE, EFFECT_IRIS */
+       char *effect = _ivug_config_get_slideshow_effect_type();
+
+       *effect_type = _ivug_config_get_effect_type_by_string(effect);
+}
+
+
diff --git a/common/src/ivug-db.c b/common/src/ivug-db.c
new file mode 100755 (executable)
index 0000000..288fe6e
--- /dev/null
@@ -0,0 +1,417 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-define.h"
+#include "ivug-debug.h"
+#include "ivug-util.h"
+#include "ivug-db.h"
+
+#include <Elementary.h>
+#include <media_content.h>
+
+#define LOG_LVL DBG_MSG_LVL_HIGH
+#define LOG_CAT "IV-DB"
+
+typedef struct _Ivug_DB
+{
+       ivug_db_cb callback;
+       media_handle *m_handle;
+       void *data;
+}Ivug_DB;
+
+static char *_strerror_db(int error)
+{
+       switch(error)
+       {
+       case MEDIA_CONTENT_ERROR_INVALID_PARAMETER:
+               return "Invalid parameter";
+       case MEDIA_CONTENT_ERROR_OUT_OF_MEMORY :
+               return "Out of memory";
+       case MEDIA_CONTENT_ERROR_DB_FAILED :
+               return "DB operation failed";
+       default:
+               {
+                       static char buf[40];
+                       sprintf(buf, "Error Code=%d", error);
+                       return buf;
+               }
+
+       }
+}
+
+bool ivug_db_create(void)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_content_connect();
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_content_connect is failed, err:%s", _strerror_db(ret));
+               return false;
+       }
+
+       MSG_HIGH("ivug_db_create success");
+       return true;
+}
+
+bool ivug_db_destroy(void)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_content_disconnect();
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_content_disconnect is failed, err:%s", _strerror_db(ret));
+               return false;
+       }
+
+       MSG_HIGH("ivug_db_destroy success");
+       return true;
+}
+
+bool ivug_db_destroy_file_handle(media_handle m_handle)
+{
+       media_info_h minfo = (media_info_h)m_handle;
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_destroy(minfo);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_info_destroy is failed, err = %s", _strerror_db(ret));
+               return false;
+       }
+
+       return true;
+}
+
+bool ivug_db_destroy_folder_handle(media_handle m_handle)
+{
+       media_folder_h minfo = (media_folder_h)m_handle;
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_folder_destroy(minfo);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_folder_destroy is failed, err = %s", _strerror_db(ret));
+               return false;
+       }
+
+       return true;
+}
+
+bool ivug_db_create_filter(filter_handle *filter)
+{
+       filter_h *media_filter = (filter_h *)filter;
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_filter_create(media_filter);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_filter_create is failed, err = %s", _strerror_db(ret));
+               return false;
+       }
+       MSG_MED("ivug_db_create_filter success");
+       return true;
+}
+
+bool ivug_db_destroy_filter(filter_handle filter)
+{
+       filter_h media_filter = (filter_h)filter;
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_filter_destroy(media_filter);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_filter_destroy is failed, err = %s", _strerror_db(ret));
+               return false;
+       }
+       MSG_MED("ivug_db_destroy_filter success");
+       return true;
+}
+
+bool ivug_db_set_filter_condition(filter_handle media_filter, const char *condition)
+{
+       IV_ASSERT(condition != NULL);
+
+       MSG_HIGH("condition str = %s", condition);
+       int ret = media_filter_set_condition(media_filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_filter_set_condition is failed, err = %s", _strerror_db(ret));
+               return false;
+       }
+       return true;
+}
+
+bool ivug_db_set_filter(filter_handle filter, ivug_view_by view_by,    ivug_media_type media_type, char *condition)
+{
+       filter_h media_filter = (filter_h)filter;
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       if(condition == NULL)
+       {
+               condition = calloc(1, sizeof(char)*IVUG_MAX_CONDITION_LEN);
+       }
+       else
+       {
+               strcat(condition," AND ");
+       }
+
+       /*MEDIA_TYPE 0-image, 1-video, 2-sound, 3-music*/
+       switch(media_type)
+       {
+               case IVUG_MEDIA_TYPE_IMAGE:
+                       strcat(condition, "(MEDIA_TYPE=0)");
+                       break;
+               case IVUG_MEDIA_TYPE_VIDEO:
+                       strcat(condition,"(MEDIA_TYPE=1)");
+                       break;
+               case IVUG_MEDIA_TYPE_ALL:
+                       strcat(condition, "(MEDIA_TYPE=0 OR MEDIA_TYPE=1)");
+                       break;
+               default:
+                       MSG_FATAL("Invalid media type : %d", media_type);
+                       break;
+       }
+
+       if(view_by == IVUG_VIEW_BY_FAVORITES)
+       {
+               strcat(condition, " AND MEDIA_FAVORITE=1");
+       }
+
+       if(condition)
+       {
+               if(ivug_db_set_filter_condition(media_filter, condition) == false)
+               {
+                       goto SET_FILTER_ERROR;
+               }
+       }
+
+       ret = media_filter_set_order(media_filter, MEDIA_CONTENT_ORDER_DESC, MEDIA_MODIFIED_TIME, MEDIA_CONTENT_COLLATE_NOCASE);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_filter_set_order is failed, err = %s", _strerror_db(ret));
+               goto SET_FILTER_ERROR;
+       }
+
+       if(condition)
+               free(condition);
+
+       MSG_MED("ivug_db_set_filter success, view_by:%d, media_type:%d", view_by, media_type);
+       return true;
+
+SET_FILTER_ERROR:
+       if(condition)
+               free(condition);
+       return false;
+}
+
+bool ivug_db_set_filter_offset(filter_handle filter, int stp, int endp)
+{
+       filter_h media_filter = (filter_h)filter;
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_filter_set_offset(media_filter, stp, endp-stp+1);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_filter_set_offset is failed, err = %s", _strerror_db(ret));
+               return false;
+       }
+
+       return true;
+}
+
+bool _media_item_cb(media_info_h item, void *user_data)
+{
+       media_handle *m_handle = (media_handle *)user_data;
+
+       media_info_clone((media_info_h *)m_handle, item);
+
+       return false;   //only 1 item
+}
+
+media_handle ivug_db_get_file_handle(const char* filepath)
+{
+       IV_ASSERT(filepath != NULL);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_handle media_filter = NULL;
+
+       char buf[1024] = {0,};
+       snprintf(buf, sizeof(buf), "MEDIA_PATH=\'%s\'", filepath);
+
+       media_handle m_handle = NULL;
+
+       ivug_db_create_filter(&media_filter);
+       ivug_db_set_filter_condition(media_filter, buf);
+       ret = media_info_foreach_media_from_db(media_filter, _media_item_cb, &m_handle);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_info_foreach_media_from_db is failed, err = %s", _strerror_db(ret));
+               goto GET_ITEM_ERROR;
+       }
+       ivug_db_destroy_filter(media_filter);
+
+       return m_handle;
+
+GET_ITEM_ERROR:
+       if(media_filter)
+               ivug_db_destroy_filter(media_filter);
+
+       return NULL;
+}
+
+media_handle ivug_db_get_file_handle_from_media_id(const char* media_id)
+{
+       IV_ASSERT(media_id != NULL);
+
+       media_handle m_handle = NULL;
+
+       int ret = media_info_get_media_from_db(media_id, (media_info_h*)&m_handle);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_info_get_media_from_db is failed, err = %s", _strerror_db(ret));
+               return NULL;
+       }
+
+       return m_handle;
+}
+
+static bool _media_folder_item_cb(media_folder_h item, void *user_data)
+{
+       media_handle *t_handle = (media_handle *)user_data;
+
+       media_folder_clone((media_folder_h *)t_handle, item);
+
+       return false;   //only 1 item
+}
+
+media_handle ivug_db_get_folder_handle(const char* folderpath)
+{
+       IV_ASSERT(folderpath != NULL);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_handle media_filter = NULL;
+
+       char buf[1024] = {0,};
+       snprintf(buf, sizeof(buf), "FOLDER_PATH=\'%s\'", folderpath);
+
+       media_handle m_handle = NULL;
+
+       ivug_db_create_filter(&media_filter);
+       ivug_db_set_filter_condition(media_filter, buf);
+       ret = media_folder_foreach_folder_from_db(media_filter, _media_folder_item_cb, &m_handle);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_folder_foreach_folder_from_db is failed, err = %s", _strerror_db(ret));
+               goto GET_ITEM_ERROR;
+       }
+       ivug_db_destroy_filter(media_filter);
+
+       return m_handle;
+
+GET_ITEM_ERROR:
+       if(media_filter)
+               ivug_db_destroy_filter(media_filter);
+
+       return NULL;
+}
+
+static bool _media_folder_list_cb(media_folder_h item, void *user_data)
+{
+       Ivug_DB *iv_db = (Ivug_DB *)user_data;
+
+       if(iv_db->callback)
+       {
+               iv_db->callback((media_handle)item, iv_db->data);
+       }
+
+       return true;
+}
+
+bool ivug_db_get_all_folder_list(ivug_db_cb callback, void *data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_handle media_filter = NULL;
+
+       Ivug_DB *iv_db = calloc(1, sizeof(Ivug_DB));
+       iv_db->callback = callback;
+       iv_db->data = data;
+
+       ivug_db_create_filter(&media_filter);
+       ret = media_folder_foreach_folder_from_db(media_filter, _media_folder_list_cb, iv_db);
+
+       free(iv_db);
+
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_folder_foreach_folder_from_db is failed, err = %s", _strerror_db(ret));
+               goto GET_ITEM_ERROR;
+       }
+       ivug_db_destroy_filter(media_filter);
+
+       return true;
+
+GET_ITEM_ERROR:
+       if(media_filter)
+               ivug_db_destroy_filter(media_filter);
+
+       return false;
+}
+
+char *ivug_db_get_file_path(media_handle media)
+{
+       media_info_h file_item = (media_info_h)media;
+       char *name = NULL;
+
+       media_info_get_file_path(file_item, &name);
+
+       return name;
+}
+
+char *ivug_db_get_folder_name(media_handle media)
+{
+       media_folder_h folder_item = (media_folder_h)media;
+       char *name = NULL;
+
+       media_folder_get_name(folder_item, &name);
+
+       return name;
+}
+
+char *ivug_db_get_folder_id(media_handle media)
+{
+       media_folder_h folder_item = (media_folder_h)media;
+       char *id = NULL;
+
+       media_folder_get_folder_id(folder_item, &id);
+
+       return id;
+}
+
+char *ivug_db_get_folder_path(media_handle media)
+{
+       media_folder_h folder_item = (media_folder_h)media;
+       char *path = NULL;
+
+       media_folder_get_path(folder_item, &path);
+
+       return path;
+}
+
diff --git a/common/src/ivug-drm.c b/common/src/ivug-drm.c
new file mode 100755 (executable)
index 0000000..3f090bc
--- /dev/null
@@ -0,0 +1,363 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+#include "ivug-drm.h"
+
+#include <drm_client.h>
+\r
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include "ivug-define.h"
+#include "ivug-debug.h"
+#include "ivug-file-info.h"
+#include "ivug-util.h"
+
+#include <Ecore_File.h>                //ecore_file_dir_is_empty
+
+#define IVUG_DRM_TEMP_DIR      DATADIR"/ug-image-viewer-efl/.tmp"
+
+#define MOUNTH_COUNT           12                                      //used for drm file info,
+#define DAY_COUNT              30
+#define HOUR_COUNT             24
+
+\r
+char*
+ivug_drm_get_drm_vendor_info(const char *path)
+{
+       IV_ASSERT(path != NULL);
+
+       drm_result_e ret = DRM_RETURN_INTERNAL_ERROR;
+       drm_content_info_s content_info;
+       memset(&content_info, 0x0, sizeof(drm_content_info_s));
+
+       ret = drm_get_content_info(path, &content_info);
+       if(ret != DRM_RETURN_SUCCESS)
+       {
+               MSG_IVUG_ERROR("drm_get_content_info Error. %s, ret = %d", path, ret);
+               return NULL;
+       }
+
+       if(strlen(content_info.author) > 0)
+       {
+               return strdup(content_info.author);
+       }
+
+       return NULL;
+}
+
+bool
+ivug_drm_get_forwarding_info(const char *path)
+{
+       IV_ASSERT(path != NULL);
+
+       ivug_retvm_if(!path, false, "path is NULL");
+
+       drm_bool_type_e is_allowed = DRM_UNKNOWN;
+       drm_action_type_e action = DRM_IS_FORWARDING_ALLOWED;
+       drm_action_allowed_data_s action_data;
+       int ret = -1;
+
+       memset(&action_data, 0x00, sizeof(drm_action_allowed_data_s));
+
+       ret = drm_is_action_allowed(action, &action_data, &is_allowed);
+       if(ret != DRM_RETURN_SUCCESS)\r
+       {
+               MSG_IVUG_ERROR("drm_is_action_allowed failed: %d", ret);
+               return false;
+       }
+
+       if(is_allowed == DRM_TRUE)
+       {
+               MSG_IVUG_ERROR("Possible to forwarding. file=%s", path);
+               return true;
+       }
+       else
+       {
+               MSG_IVUG_ERROR("Impossible to forwarding. file=%s", path);
+               return false;
+       }
+}
+
+char *
+ivug_drm_get_right_url(const char *path)
+{
+       drm_content_info_s content_info;
+       memset(&content_info,0x0,sizeof(drm_content_info_s));
+       int ret = -1;
+
+       ret = drm_get_content_info(path, &content_info);
+       if(ret != DRM_RETURN_SUCCESS)
+       {
+               MSG_IVUG_ERROR("drm_get_content_info Error. %s, ret = %d", path, ret);
+               return NULL;
+       }
+
+       if('\0' == content_info.rights_url[0])
+       {
+               MSG_IVUG_ERROR("rights_url is NULL. %s", path);
+               return NULL;
+       }
+       MSG_IVUG_HIGH("rights_url = %s", content_info.rights_url);
+
+       return strdup(content_info.rights_url);
+}
+
+char *
+ivug_drm_get_mime(const char *path)
+{
+       drm_content_info_s content_info;
+       memset(&content_info,0x0,sizeof(drm_content_info_s));
+       int ret = -1;
+
+       ret = drm_get_content_info(path, &content_info);
+       if(ret != DRM_RETURN_SUCCESS)
+       {
+               MSG_IVUG_ERROR("drm_get_content_info Error. %s, ret = %d", path, ret);
+               return NULL;
+       }
+
+       if('\0' == content_info.mime_type[0])
+       {
+               MSG_IVUG_ERROR("mime_type is NULL. %s", path);
+               return NULL;
+       }
+       MSG_IVUG_HIGH("mime_type = %s", content_info.mime_type);
+
+       return strdup(content_info.mime_type);
+}
+
+
+bool
+ivug_drm_has_valid_ro(const char *path)
+{
+       IV_ASSERT(path != NULL);
+
+       drm_result_e ret;
+
+       drm_license_status_e status = DRM_LICENSE_STATUS_UNDEFINED;
+
+       ret = drm_get_license_status(path, DRM_PERMISSION_TYPE_DISPLAY, &status);
+       if(ret != DRM_RETURN_SUCCESS)
+       {
+               MSG_IVUG_ERROR("drm_get_license_status Error. %s, ret = %d", path, ret);
+               return false;
+       }
+
+       if(status != DRM_LICENSE_STATUS_VALID)
+       {
+               MSG_IVUG_ERROR("No valid right. %s, status = %d", path, status);
+               return false;
+       }
+
+       return true;
+}
+
+bool
+ivug_drm_is_drm_file(const char* file_path)
+{
+       IV_ASSERT(file_path != NULL);
+
+       drm_bool_type_e isDRM = DRM_FALSE;
+
+       if(drm_is_drm_file(file_path, &isDRM) == DRM_RETURN_SUCCESS)
+       {
+               if(isDRM == DRM_TRUE)
+               {
+                       MSG_IVUG_MED("DRM file. path=%s", file_path);
+                       return true;
+               }
+               return false;
+       }
+
+       return false;
+}
+\r
+bool ivug_drm_is_possible_to_setas(const char* path, _ivug_drm_setas_type type)
+{
+       ivug_retvm_if(!path, false, "path is NULL");
+
+       drm_bool_type_e is_allowed = DRM_UNKNOWN;
+       drm_action_type_e action = DRM_HAS_VALID_SETAS_STATUS;
+       drm_action_allowed_data_s action_data;
+       int ret = -1;
+
+       memset(&action_data, 0x00, sizeof(drm_action_allowed_data_s));
+
+       ret = drm_is_action_allowed(action, &action_data, &is_allowed);
+       if(ret != DRM_RETURN_SUCCESS)\r
+       {
+               MSG_IVUG_ERROR("drm_is_action_allowed failed: %d", ret);
+               return false;
+       }
+
+       if(is_allowed == DRM_TRUE)
+       {
+               MSG_IVUG_ERROR("Possible to setas. file=%s", path);
+               return true;
+       }
+       else
+       {
+               MSG_IVUG_ERROR("Impossible to setas. file=%s", path);
+               return false;
+       }
+}
+\r
+
+drm_data_t * ivug_drm_check_constraint(const char* file_path)\r
+{
+
+       drm_constraint_info_s constraint_info;
+       drm_permission_type_e perm_type = DRM_PERMISSION_TYPE_DISPLAY;
+       int ret = -1;
+
+       memset(&constraint_info, 0x0, sizeof(drm_constraint_info_s));
+
+       ret = drm_get_constraint_info(file_path, perm_type, &constraint_info);
+       if(ret != DRM_RETURN_SUCCESS)\r
+       {
+               MSG_IVUG_ERROR("drm_get_constraint_info Failed!!, ret=0x%x", ret);
+               return NULL;
+       }
+
+       drm_data_t *result = calloc(1, sizeof(drm_data_t));
+
+       if(constraint_info.const_type.is_unlimited)
+       {
+               MSG_IVUG_HIGH("Unlimited:for permission=%d", perm_type);
+
+               result->constraints = IVUG_DRM_RESULT_UNLIMITED;
+               result->data = -1;
+               return result;
+       }
+
+       if(constraint_info.const_type.is_accumulated){
+               MSG_IVUG_HIGH("Accumulated Constraint is present");
+               MSG_IVUG_HIGH("accumulated_original_seconds=%d",
+                               constraint_info.accumulated_original_seconds);
+               MSG_IVUG_HIGH("accumulated_remaining_seconds=%d",
+                               constraint_info.accumulated_remaining_seconds);
+
+               result->constraints = IVUG_DRM_RESULT_ACCUMULATED;
+               result->data = -1;
+               return result;
+       }
+
+       if(constraint_info.const_type.is_count){
+               MSG_IVUG_HIGH("Count Constraint is present");
+               MSG_IVUG_HIGH("original_count=%d",
+                               constraint_info.original_count);
+               MSG_IVUG_HIGH("remaining_count=%d",
+                               constraint_info.remaining_count);
+
+               result->constraints = IVUG_DRM_RESULT_COUNT;
+               result->data = constraint_info.remaining_count;
+               return result;
+       }
+
+       if(constraint_info.const_type.is_datetime){
+               MSG_IVUG_HIGH("DATETIME Constraint is present");
+               MSG_IVUG_HIGH("start_time:"
+                               "Year=%d,Month=%d,Day=%d,Hour=%d, minute=%d, Second=%d",
+                       constraint_info.start_time.tm_year,
+                       constraint_info.start_time.tm_mon,
+                       constraint_info.start_time.tm_mday,
+                       constraint_info.start_time.tm_hour,
+                       constraint_info.start_time.tm_min,
+                       constraint_info.start_time.tm_sec);
+
+               MSG_IVUG_HIGH("end_time:"
+                               "Year=%d,Month=%d,Day=%d,Hour=%d, minute=%d, Second=%d",
+                       constraint_info.end_time.tm_year,
+                       constraint_info.end_time.tm_mon,
+                       constraint_info.end_time.tm_mday,
+                       constraint_info.end_time.tm_hour,
+                       constraint_info.end_time.tm_min,
+                       constraint_info.end_time.tm_sec);
+
+               result->constraints = IVUG_DRM_RESULT_DATETIME;
+               //result->data = constraint.curCount;
+               result->data = -1;
+               return result;
+       }
+
+       if(constraint_info.const_type.is_individual){
+               MSG_IVUG_HIGH("INDIVIDUAL Constraint is present");
+               MSG_IVUG_HIGH("individual_identity_type=%d "
+                               "individual_id=%s",
+                               constraint_info.individual_identity_type,
+                               constraint_info.individual_id);
+
+               result->constraints = IVUG_DRM_RESULT_INDIVIDUAL;
+               result->data = -1;
+               return result;
+       }
+
+       if(constraint_info.const_type.is_interval){
+               MSG_IVUG_HIGH("INTERVAL Constraint is present");
+               MSG_IVUG_HIGH("interval_time:"
+                               "Year=%d,Month=%d,Day=%d,Hour=%d, minute=%d, Second=%d",
+                       constraint_info.interval_time.tm_year,
+                       constraint_info.interval_time.tm_mon,
+                       constraint_info.interval_time.tm_mday,
+                       constraint_info.interval_time.tm_hour,
+                       constraint_info.interval_time.tm_min,
+                       constraint_info.interval_time.tm_sec);
+
+               result->constraints = IVUG_DRM_RESULT_INTERVAL_DAYS;
+               result->data = ((constraint_info.interval_time.tm_year*MOUNTH_COUNT+constraint_info.interval_time.tm_mon)*
+                                                       DAY_COUNT+constraint_info.interval_time.tm_mday);
+               return result;
+       }
+
+       if(constraint_info.const_type.is_system){
+               MSG_IVUG_HIGH("SYSTEM Constraint is present");
+               MSG_IVUG_HIGH("system_identity_type=%d "
+                               "system_id=%s",
+                               constraint_info.system_identity_type,
+                               constraint_info.system_id);
+
+               result->constraints = IVUG_DRM_RESULT_SYSTEM;
+               result->data = -1;
+               return result;
+       }
+
+       if(constraint_info.const_type.is_timedcount){
+               MSG_IVUG_HIGH("TIMED-COUNT Constraint is present");
+               MSG_IVUG_HIGH("timed_original_count=%d",
+                               constraint_info.timed_original_count);
+
+               MSG_IVUG_HIGH("timed_remaining_count=%d",
+                               constraint_info.timed_remaining_count);
+
+               MSG_IVUG_HIGH("timed_count_timer=%d",
+                               constraint_info.timed_count_timer);
+
+               result->constraints = IVUG_DRM_RESULT_TIMED_COUNT;
+               result->data = -1;
+               return result;
+       }
+
+       MSG_IVUG_WARN("Undefined constraints");
+       free(result);
+
+       return NULL;
+}
+
diff --git a/common/src/ivug-exif.c b/common/src/ivug-exif.c
new file mode 100755 (executable)
index 0000000..97fe9d9
--- /dev/null
@@ -0,0 +1,1460 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *       http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * The Exif specification defines an Orientation Tag to indicate the orientation of the
+ * camera relative to the captured scene. This can be used by the camera either to
+ * indicate the orientation automatically by an orientation sensor,
+ * or to allow the user to indicate the orientation manually by a menu switch,
+ * without actually transforming the image data itself.
+ * Here is an explanation given by TsuruZoh Tachibanaya in
+ * his description of the Exif file format:
+ *
+ * The orientation of the camera relative to the scene, when the image was captured.
+ * The relation of the '0th row' and '0th column' to visual position is shown as below.
+ *
+ * Value        0th Row                0th Column
+ *   1   top             left side
+ *   2   top             right side
+ *   3   bottom                  right side
+ *   4   bottom                  left side
+ *   5   left side          top
+ *   6   right side        top
+ *   7   right side        bottom
+ *   8   left side          bottom
+ *
+ * Read this table as follows (thanks to Peter Nielsen for clarifying this - see also below):
+ * Entry #6 in the table says that the 0th row in the stored image is the right side of
+ * the captured scene, and the 0th column in the stored image is the top side of
+ * the captured scene.
+ *
+ * Here is another description given by Adam M. Costello:
+ *
+ * For convenience, here is what the letter F would look like if it were tagged correctly
+ * and displayed by a program that ignores the orientation tag
+ * (thus showing the stored image):
+ *
+ *       1             2         3      4            5                 6                   7                  8
+ *
+ *  888888  888888       88    88      8888888888  88                             88  8888888888
+ *  88               88        88    88      88  88          88  88                  88  88          88  88
+ *  8888        8888     8888   8888   88                8888888888  8888888888               88
+ *  88               88        88    88
+ *  88               88  888888   888888
+*/
+
+#include "ivug-debug.h"
+#include "ivug-exif.h"
+
+#undef LOG_LVL
+#define LOG_LVL (DBG_MSG_LVL_MED | DBG_MSG_LVL_DEBUG)
+
+#undef LOG_CAT
+#define LOG_CAT "IV-UTIL"
+
+
+#if 0
+
+#include <strings.h>
+#include <string.h>
+
+static int _save_exif_orientation(FILE *src_fp, char *value, bool bSave)
+{
+       MSG_ASSERT(src_fp != NULL);
+
+       unsigned char tmp[2048] = {0};
+       size_t io_size = 0;
+       io_size = fread(tmp, sizeof(char), 18, src_fp);
+       if (strcasecmp((const char *)&tmp[2], "Exif")){
+               MSG_ERROR("This is not a EXIF file!");
+               goto ERROR;
+       }
+
+       while (1) {
+               /*Read Marker*/
+               memset(tmp, 0, 2048);
+               io_size = fread(tmp, sizeof(char), 8, src_fp);
+               if (io_size < 1) {
+                       MSG_ERROR("Encode error!");
+                       goto ERROR;
+               }
+               /*When marker is Orientation*/
+               if (tmp[0] == 0x12 && tmp[1] == 0x01) {
+                       if (bSave) {
+                               io_size = fwrite(value, 1, 1, src_fp);
+                               MSG_HIGH("write value: %d!", value[0]);
+                       } else {
+                               memset(tmp, 0, 2048);
+                               io_size = fread(value, sizeof(char), 1, src_fp);
+                               MSG_HIGH("Read value: %d!", value[0]);
+                       }
+                       if (io_size < 1) {
+                               MSG_ERROR("Write or read error!");
+                               goto ERROR;
+                       }
+                       MSG_HIGH("Read or write value: %d!", value[0]);
+                       break;
+               } else if (tmp[0] == 0x69 && tmp[1] == 0x87) {
+                       break;
+               } else {
+                       if (-1 == fseek(src_fp, 4, SEEK_CUR)) {
+                               MSG_ERROR("fseek error!");
+                               goto ERROR;
+                       }
+               }
+
+       }
+       return 0;
+ ERROR:
+       return -1;
+}
+
+
+static int _save_jfif_orientation(FILE *src_fp, char *value, bool bSave)
+{
+       MSG_ASSERT(src_fp != NULL);
+
+       unsigned char tmp[2048] = {0};
+       size_t io_size = 0;
+       io_size = fread(tmp, sizeof(char), 36, src_fp);
+
+       if (strcasecmp((const char *)&tmp[2], "jfif"))
+       {
+               MSG_ERROR("This is not a jfif file!");
+               goto ERROR;
+       }
+       if (tmp[17] < 0xE1 || tmp[17] > 0xEF)
+       {
+               MSG_ERROR("This file is no orientation!");
+               goto ERROR;
+       }
+
+       while (1) {
+               /*Read Marker*/
+               memset(tmp, 0, 2048);
+               io_size = fread(tmp, sizeof(char), 8, src_fp);
+               if (io_size < 1)
+               {
+                       MSG_ERROR("Encode error!");
+                       goto ERROR;
+               }
+
+               MSG_HIGH("tmp[0] is %02x, tmp[1] is %02x", tmp[0], tmp[1]);
+
+               /*When marker is Orientation*/
+               if (tmp[0] == 0x01 && tmp[1] == 0x12) {
+                       memset(tmp, 0, 2048);
+                       io_size = fread(tmp, sizeof(char), 1, src_fp);
+                       if (io_size < 1) {
+                               MSG_ERROR("Write error!");
+                               goto ERROR;
+                       }
+                       if (bSave) {
+                               io_size = fwrite(value, 1, 1, src_fp);
+                       } else {
+                               memset(tmp, 0, 2048);
+                               io_size = fread(value, sizeof(char), 1, src_fp);
+                       }
+                       if (io_size < 1) {
+                               MSG_ERROR("Write or read error!");
+                               goto ERROR;
+                       }
+                       MSG_HIGH("Read or write value: %d!", value[0]);
+                       break;
+               } else if (tmp[0] == 0x87 && tmp[1] == 0x69) {
+                       break;
+               } else {
+                       if (-1 == fseek(src_fp, 4, SEEK_CUR)) {
+                               MSG_ERROR("fseek error!");
+                               goto ERROR;
+                       }
+               }
+
+       }
+       return 0;
+ ERROR:
+       return -1;
+
+}
+
+static int _jpeg_rotate(const char *file_path, char *value, bool bSave)
+{
+       MSG_ASSERT(file_path != NULL);
+
+       int ret = -1;
+       FILE *src_fp = fopen(file_path, "rb+");
+       if (NULL == src_fp)
+       {
+               MSG_ERROR("Open file error! %s", file_path);
+               return -1;
+       }
+
+       unsigned char tmp[2048] = {0};
+       size_t io_size = 0;
+
+       io_size = fread(tmp, sizeof(char), 2, src_fp);
+
+       if (io_size < 1 || 0xFF != tmp[0] || 0xD8 != tmp[1])
+       {
+               MSG_ERROR("This is not a JPEG file!");
+               goto ERROR;
+       }
+
+       /*Read APP1 lable*/
+       memset(tmp, 0, 2048);
+       io_size = fread(tmp, sizeof(char), 2, src_fp);
+       if (io_size < 1 || 0xFF != tmp[0])
+       {
+               MSG_ERROR("This is not a EXIF file!");
+               goto ERROR;
+       }
+
+       if (tmp[1] == 0xE0)
+       {
+               ret = _save_jfif_orientation(src_fp, value, bSave);
+       }
+       else if (tmp[1] == 0xE1)
+       {
+               ret = _save_exif_orientation(src_fp, value, bSave);
+       }
+       else
+       {
+               MSG_ERROR("This is not a EXIF file!");
+               goto ERROR;
+       }
+
+ ERROR:
+       fclose(src_fp);
+       return ret;
+}
+#endif
+
+#if 1
+
+
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <Elementary.h>
+
+#define GL_EXIF_BUF_LEN_MAX 65536L
+#define GL_EXIF_BUF_TIME_LEN_MAX 20
+#define GL_EXIF_DEFAULT_YEAR 1900
+
+#define GL_EXIF_SOI 0xD8
+#define GL_EXIF_TAG 0xFF
+#define GL_EXIF_APP0 0xE0
+#define GL_EXIF_APP1 0xE1
+#define GL_EXIF_JFIF_00 0x00
+#define GL_EXIF_JFIF_01 0x01
+#define GL_EXIF_JFIF_02 0x02
+
+#define GL_EXI_TMP_JPEG_FILE "/opt/media/.gallery_tmp_write_exif.jpg"
+
+/* Write one byte, testing for EOF */
+static int __gl_exif_write_1_byte(FILE *fd, int c)
+{
+       if (fputc(c, fd) < 0) {
+               MSG_ERROR("fputc failed!");
+               return -1;
+       }
+
+       return 0;
+}
+
+/* Read one byte, testing for EOF */
+static int __gl_exif_read_1_byte(FILE *fd)
+{
+       int c = 0;
+
+       /* Return next input byte, or EOF if no more */
+       c = getc(fd);
+       if (c == EOF) {
+               MSG_ERROR("Premature EOF in JPEG file!");
+               return -1;
+       }
+
+       return c;
+}
+
+/* Read 2 bytes, convert to unsigned int */
+/* All 2-byte quantities in JPEG markers are MSB first */
+static int __gl_exif_read_2_bytes(FILE *fd, unsigned int *len)
+{
+       int c1 = 0;
+       int c2 = 0;
+
+       /* Return next input byte, or EOF if no more */
+       c1 = getc(fd);
+       if (c1 == EOF) {
+               MSG_ERROR("Premature EOF in JPEG file!");
+               return -1;
+       }
+
+       /* Return next input byte, or EOF if no more */
+       c2 = getc(fd);
+       if (c2 == EOF) {
+               MSG_ERROR("Premature EOF in JPEG file!");
+               return -1;
+       }
+
+       if (len)
+               *len = (((unsigned int)c1) << 8) + ((unsigned int)c2);
+
+       return 0;
+}
+
+/* Add raw exif tag and data */
+static int __gl_exif_add_header(FILE *fd, unsigned int *orientation)
+{
+       int i = 0;
+       int ret = -1;
+       char *time_buf = NULL;
+       unsigned int offset = 0;
+
+       /* raw EXIF header data */
+       const unsigned char exif1[] = {
+               GL_EXIF_TAG, GL_EXIF_SOI, GL_EXIF_TAG, GL_EXIF_APP1
+       };
+       /* Write File head, check for JPEG SOI + Exif APP1 */
+       for (i = 0; i < 4; i++) {
+               if (__gl_exif_write_1_byte(fd, exif1[i]) < 0)
+                       goto GL_EXIF_FAILED;
+       }
+       /* SET the marker parameter length count */
+       /* Length includes itself, so must be at least 2
+           Following Exif data length must be at least 6; 30+36 bytes*/
+       const unsigned char exif2[] = { 0x00, 0x42 };
+       for (i = 0; i < 2; i++) {
+               if (__gl_exif_write_1_byte(fd, exif2[i]) < 0)
+                       goto GL_EXIF_FAILED;
+       }
+
+       /* Write Exif head -- "Exif" */
+       const unsigned char exif3[] = { 0x45, 0x78, 0x69, 0x66, 0x00, 0x00 };
+       for (i = 0; i < 6; i++) {
+               if (__gl_exif_write_1_byte(fd, exif3[i]) < 0)
+                       goto GL_EXIF_FAILED;
+       }
+
+       /* Set byte order and Tag Mark , "II(0x4949)" */
+       const unsigned char exif4[] = { 0x49, 0x49, 0x2A, 0x00 };
+       for (i = 0; i < 4; i++) {
+               if (__gl_exif_write_1_byte(fd, exif4[i]) < 0)
+                       goto GL_EXIF_FAILED;
+       }
+       offset += 4;
+
+       /* Set first IFD offset (offset to IFD0) , II-08000000 */
+       const unsigned char exif5[] = { 0x08, 0x00, 0x00, 0x00 };
+       for (i = 0; i < 4; i++) {
+               if (__gl_exif_write_1_byte(fd, exif5[i]) < 0)
+                       goto GL_EXIF_FAILED;
+       }
+       offset += 4;
+
+       /* IFD: Image File Directory */
+       /* Set the number of directory entries contained in this IFD, - EEEE ;
+         * 2 entry: orientation, data time */
+       const unsigned char exif6[] = { 0x02, 0x00 };
+       for (i = 0; i < 2; i++) {
+               if (__gl_exif_write_1_byte(fd, exif6[i]) < 0)
+                       goto GL_EXIF_FAILED;
+       }
+       offset += 2;
+
+       /* Add Orientation Tag in IFD0; 0x0112 */
+       const unsigned char exif7[] = { 0x12, 0x01 };
+       for (i = 0; i < 2; i++) {
+               if (__gl_exif_write_1_byte(fd, exif7[i]) < 0)
+                       goto GL_EXIF_FAILED;
+       }
+       offset += 2;
+
+       MSG_HIGH("Write: %d", *orientation);
+       const unsigned char exif8[] = { 0x03, 0x00, 0x01, 0x00, 0x00, 0x00 };
+       for (i = 0; i < 6; i++) {
+               if (__gl_exif_write_1_byte(fd, exif8[i]) < 0)
+                       goto GL_EXIF_FAILED;
+       }
+       offset += 6;
+
+       /* Set the Orientation value */
+       if (__gl_exif_write_1_byte(fd, (unsigned char)(*orientation)) < 0)
+               goto GL_EXIF_FAILED;
+
+       const unsigned char exif9[] = { 0x00, 0x00, 0x00 };
+       for (i = 0; i < 3; i++) {
+               if (__gl_exif_write_1_byte(fd, exif9[i]) < 0)
+                       goto GL_EXIF_FAILED;
+       }
+       offset += 4;
+
+       /* Add Data Time Tag in IFD0; 0x0132 */
+       const unsigned char exif10[] = { 0x32, 0x01 };
+       for (i = 0; i < 2; i++) {
+               if (__gl_exif_write_1_byte(fd, exif10[i]) < 0)
+                       goto GL_EXIF_FAILED;
+       }
+       offset += 2;
+
+       /* Type: strings */
+       const unsigned char exif11[] = { 0x02, 0x00 };
+       for (i = 0; i < 2; i++) {
+               if (__gl_exif_write_1_byte(fd, exif11[i]) < 0)
+                       goto GL_EXIF_FAILED;
+       }
+       offset += 2;
+
+       /* Data lengh, byte count */
+       const unsigned char exif12[] = { 0x14, 0x00, 0x00, 0x00 };
+       for (i = 0; i < 4; i++) {
+               if (__gl_exif_write_1_byte(fd, exif12[i]) < 0)
+                       goto GL_EXIF_FAILED;
+       }
+       offset += 8;
+
+       /* 20 bytes larger than 4 bytes,
+         * so next 4 bytes is data offset start from "II"(0x4949)*/
+
+       MSG_HIGH("offset: %2X", offset + 8);
+       /* Too add data offset, plus 4 bytes self and plus 4 bytes IFD terminator */
+       if (__gl_exif_write_1_byte(fd, (unsigned char)(offset + 4)) < 0)
+               goto GL_EXIF_FAILED;
+
+       const unsigned char exif13[] = { 0x00, 0x00, 0x00 };
+       for (i = 0; i < 3; i++) {
+               if (__gl_exif_write_1_byte(fd, exif13[i]) < 0)
+                       goto GL_EXIF_FAILED;
+       }
+
+       /*After last directory entry, there is a 4bytes of data('LLLLLLLL' at the chart),
+         * it means an offset to next IFD. If its value is '0x00000000',
+         * it means this is the last IFD and there is no linked IFD */
+       const unsigned char exif14[] = { 0x00, 0x00, 0x00, 0x00 };
+       for (i = 0; i < 4; i++) {
+               if (__gl_exif_write_1_byte(fd, exif14[i]) < 0)
+                       goto GL_EXIF_FAILED;
+       }
+
+       /* Date Time of image was last modified.
+         * Data format is "YYYY:MM:DD HH:MM:SS"+0x00, total 20bytes
+         */
+       time_t t;
+       struct tm tms;
+       struct tm *tm;
+
+       t = time (NULL);
+       tm = localtime_r(&t, &tms);
+
+       time_buf = (char *)calloc(1, GL_EXIF_BUF_TIME_LEN_MAX);
+       if (time_buf == NULL) {
+               MSG_ERROR("Faild to allocate memory!");
+               goto GL_EXIF_FAILED;
+       }
+       snprintf(time_buf, GL_EXIF_BUF_TIME_LEN_MAX,
+                "%04i:%02i:%02i %02i:%02i:%02i",
+                tm->tm_year + GL_EXIF_DEFAULT_YEAR, tm->tm_mon + 1,
+                tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
+
+       MSG_HIGH("time_buf: %s", time_buf);
+       if (fwrite(time_buf, 1, GL_EXIF_BUF_TIME_LEN_MAX, fd) != GL_EXIF_BUF_TIME_LEN_MAX) {
+               MSG_WARN("Write size are diff!");
+               goto GL_EXIF_FAILED;
+       }
+
+       ret = 0;
+
+ GL_EXIF_FAILED:
+
+       MSG_HIGH("All done");
+       if (time_buf)
+               free(time_buf);
+       return ret;
+}
+
+/* Add exif to jfif 1.00, to add exif for some cases */
+static int __gl_exif_rw_jfif_1dot00(const char *file_path, unsigned int *orientation)
+{
+       unsigned char tmp[GL_EXIF_BUF_LEN_MAX] = { 0, };
+       FILE *fd = NULL;
+       int ret = -1;
+       int tmp_exif = -1;
+
+       if ((fd = fopen(file_path, "rb+")) == NULL) {
+               MSG_ERROR("Can't open %s!", file_path);
+               return -1;
+       }
+
+       char *tmp_file = GL_EXI_TMP_JPEG_FILE;
+       FILE *tmp_fd = NULL;
+       if ((tmp_fd = fopen(tmp_file, "wb+")) == NULL) {
+               MSG_ERROR("Can't open %s!", tmp_file);
+               goto GL_EXIF_FAILED;
+       }
+
+       /* Remove header of JFIF from 0 to first 0xFF */
+       bool b_tag_ff = false;
+       while(1) {
+               tmp_exif = __gl_exif_read_1_byte(fd);
+               if (tmp_exif < 0)
+                       goto GL_EXIF_FAILED;
+
+               tmp[0] = (unsigned char)tmp_exif;
+
+               MSG_HIGH("- %02X", tmp[0]);
+               if (!b_tag_ff) {
+                       if (tmp[0] == GL_EXIF_TAG) {
+                               MSG_WARN("0xFF!");
+                               b_tag_ff = true;
+                       }
+                       /* Move back 1 byte */
+                       fseek(tmp_fd, -1, SEEK_CUR);
+                       break;
+               }
+       }
+
+       /* Add raw EXIF header data */
+       if (__gl_exif_add_header(tmp_fd, orientation) < 0)
+               goto GL_EXIF_FAILED;
+
+       size_t r_size = 0;
+       memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
+       /* Write JPEG image data from first 0xFF to tmp file after EXIF header */
+       while ((r_size = fread(tmp, 1, sizeof(tmp), fd)) > 0) {
+               MSG_HIGH("r_size: %ld", r_size);
+               if (fwrite(tmp, 1, r_size, tmp_fd) != r_size)
+                       MSG_WARN("Write and read size are diff!");
+
+               memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
+       }
+
+       fclose(fd);
+       fd = fopen(file_path, "wb");
+       if (!fd) {
+               MSG_ERROR("Error creating file %s!", file_path);
+               goto GL_EXIF_FAILED;
+       }
+
+       memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
+       /* Write back tmp file after to JPEG image */
+       fseek(tmp_fd, 0, SEEK_SET);
+       while ((r_size = fread(tmp, 1, sizeof(tmp), tmp_fd)) > 0) {
+               MSG_HIGH("r_size: %ld", r_size);
+               if (fwrite(tmp, 1, r_size, fd) != r_size)
+                       MSG_WARN("Write and read size are diff!");
+
+               memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
+       }
+
+       ret = 0;
+
+ GL_EXIF_FAILED:
+
+       if (fd)
+               fclose(fd);
+       if (tmp_fd)
+               fclose(tmp_fd);
+
+       if (tmp_file) {
+               /* Delete tmp file */
+               if (!ecore_file_unlink(tmp_file))
+                       MSG_ERROR("Delete file failed");
+       }
+
+       MSG_HIGH("All done");
+       return ret;
+}
+
+/* Add exif to jfif 1.01, older version, don't have exif */
+static int __gl_exif_rw_jfif_1dot01(const char *file_path, unsigned int *orientation)
+{
+       unsigned char tmp[GL_EXIF_BUF_LEN_MAX] = { 0, };
+       FILE *fd = NULL;
+       int ret = -1;
+
+       if ((fd = fopen(file_path, "rb+")) == NULL) {
+               MSG_ERROR("Can't open %s!", file_path);
+               return -1;
+       }
+
+       char *tmp_file = GL_EXI_TMP_JPEG_FILE;
+       FILE *tmp_fd = NULL;
+       if ((tmp_fd = fopen(tmp_file, "wb+")) == NULL) {
+               MSG_ERROR("Can't open %s!", tmp_file);
+               goto GL_EXIF_FAILED;
+       }
+
+       /* Add raw EXIF header data */
+       if (__gl_exif_add_header(tmp_fd, orientation) < 0)
+               goto GL_EXIF_FAILED;
+
+       size_t r_size = 0;
+       /* Remove start of JPEG image data section, 20 bytes */
+       r_size = fread(tmp, sizeof(char), 20, fd);
+
+       memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
+       /* Write JPEG image data to tmp file after EXIF header */
+       while ((r_size = fread(tmp, 1, sizeof(tmp), fd)) > 0) {
+               MSG_HIGH("r_size: %ld", r_size);
+               if (fwrite(tmp, 1, r_size, tmp_fd) != r_size)
+                       MSG_WARN("Write and read size are diff!");
+
+               memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
+       }
+
+       fclose(fd);
+       fd = fopen(file_path, "wb");
+       if (!fd) {
+               MSG_ERROR("Error creating file %s!", file_path);
+               goto GL_EXIF_FAILED;
+       }
+
+       memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
+       /* Write back tmp file after to JPEG image */
+       fseek(tmp_fd, 0, SEEK_SET);
+       while ((r_size = fread(tmp, 1, sizeof(tmp), tmp_fd)) > 0) {
+               MSG_HIGH("r_size: %ld", r_size);
+               if (fwrite(tmp, 1, r_size, fd) != r_size)
+                       MSG_WARN("Write and read size are diff!");
+
+               memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
+       }
+
+       ret = 0;
+
+ GL_EXIF_FAILED:
+
+       if (fd)
+               fclose(fd);
+       if (tmp_fd)
+               fclose(tmp_fd);
+
+       if (tmp_file) {
+               /* Delete tmp file */
+               if (!ecore_file_unlink(tmp_file))
+                       MSG_ERROR("Delete file failed");
+       }
+
+       MSG_HIGH("All done");
+       return ret;
+}
+
+/* Add exif to jfif 1.02, to add exif for some cases */
+static int __gl_exif_rw_jfif_1dot02(const char *file_path, unsigned int *orientation)
+{
+       unsigned char tmp[GL_EXIF_BUF_LEN_MAX] = { 0, };
+       FILE *fd = NULL;
+       int ret = -1;
+       int tmp_exif = -1;
+
+       if ((fd = fopen(file_path, "rb+")) == NULL) {
+               MSG_ERROR("Can't open %s!", file_path);
+               return -1;
+       }
+
+       char *tmp_file = GL_EXI_TMP_JPEG_FILE;
+       FILE *tmp_fd = NULL;
+       if ((tmp_fd = fopen(tmp_file, "wb+")) == NULL) {
+               MSG_ERROR("Can't open %s!", tmp_file);
+               goto GL_EXIF_FAILED;
+       }
+
+       /* Copy header of JFIF from 0 to first 0xFF */
+       bool b_tag_ff = false;
+       while(1) {
+               tmp_exif = __gl_exif_read_1_byte(fd);
+               if (tmp_exif < 0)
+                       goto GL_EXIF_FAILED;
+
+               tmp[0] = (unsigned char)tmp_exif;
+
+               MSG_HIGH("- %02X", tmp[0]);
+               if (!b_tag_ff) {
+                       if (tmp[0] == GL_EXIF_TAG) {
+                               MSG_WARN("0xFF!");
+                               b_tag_ff = true;
+                       }
+                       /* Move back 1 byte */
+                       fseek(tmp_fd, -1, SEEK_CUR);
+                       break;
+               }
+
+               if (__gl_exif_write_1_byte(tmp_fd, tmp[0]) < 0)
+                       goto GL_EXIF_FAILED;
+
+       }
+
+       /* Add raw EXIF header data */
+       if (__gl_exif_add_header(tmp_fd, orientation) < 0)
+               goto GL_EXIF_FAILED;
+
+       size_t r_size = 0;
+       memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
+       /* Write JPEG image data from first 0xFF to tmp file after EXIF header */
+       while ((r_size = fread(tmp, 1, sizeof(tmp), fd)) > 0) {
+               MSG_HIGH("r_size: %ld", r_size);
+               if (fwrite(tmp, 1, r_size, tmp_fd) != r_size)
+                       MSG_WARN("Write and read size are diff!");
+
+               memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
+       }
+
+       fclose(fd);
+       fd = fopen(file_path, "wb");
+       if (!fd) {
+               MSG_ERROR("Error creating file %s!", file_path);
+               goto GL_EXIF_FAILED;
+       }
+
+       memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
+       /* Write back tmp file after to JPEG image */
+       fseek(tmp_fd, 0, SEEK_SET);
+       while ((r_size = fread(tmp, 1, sizeof(tmp), tmp_fd)) > 0) {
+               MSG_HIGH("r_size: %ld", r_size);
+               if (fwrite(tmp, 1, r_size, fd) != r_size)
+                       MSG_WARN("Write and read size are diff!");
+
+               memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
+       }
+
+       ret = 0;
+
+ GL_EXIF_FAILED:
+
+       if (fd)
+               fclose(fd);
+       if (tmp_fd)
+               fclose(tmp_fd);
+
+       if (tmp_file) {
+               /* Delete tmp file */
+               if (!ecore_file_unlink(tmp_file))
+                       MSG_ERROR("Delete file failed");
+       }
+
+       MSG_HIGH("All done");
+       return ret;
+}
+
+static int __gl_exif_rw_jfif(FILE *fd, const char *file_path,
+                            unsigned int *orientation, bool b_write)
+{
+       unsigned char tmp[GL_EXIF_BUF_LEN_MAX] = { 0, };
+       int i = 0;
+       unsigned int length = 0;
+       int tmp_exif = -1;
+       bool is_motorola = false; /* Flag for byte order */
+       unsigned int offset = 0;
+       int ret = -1;
+       unsigned char version = 0x00;
+
+       if (__gl_exif_read_2_bytes(fd, &length) < 0)
+               goto GL_EXIF_FAILED;
+       MSG_HIGH("length: %d", length);
+
+       for (i = 0; i < 5; i++) {
+               tmp_exif = __gl_exif_read_1_byte(fd);
+               if (tmp_exif < 0)
+                       goto GL_EXIF_FAILED;
+               tmp[i] = (unsigned char)tmp_exif;
+       }
+
+       /* JFIF0 */
+       if (tmp[0] != 0x4A || tmp[1] != 0x46 || tmp[2] != 0x49 ||
+           tmp[3] != 0x46 || tmp[4] != 0x00) {
+               MSG_ERROR("Not met Jfif!");
+               goto GL_EXIF_FAILED;
+       }
+
+       for (i = 0; i < 2; i++) {
+               tmp_exif = __gl_exif_read_1_byte(fd);
+               if (tmp_exif < 0)
+                       goto GL_EXIF_FAILED;
+               tmp[i] = (unsigned char)tmp_exif;
+       }
+
+       /* Check JFIF version */
+       if (tmp[0] == 0x01 && tmp[1] == GL_EXIF_JFIF_00) {
+               MSG_HIGH("Jfif 1.00");
+       } else if (tmp[0] == 0x01 && tmp[1] == GL_EXIF_JFIF_01) {
+               MSG_HIGH("Jfif 1.01");
+       } else if (tmp[0] == 0x01 && tmp[1] == GL_EXIF_JFIF_02) {
+               MSG_HIGH("Jfif 1.02");
+       } else {
+               MSG_ERROR("Unknow Jfif version[%d.%d]!", tmp[0], tmp[1]);
+               goto GL_EXIF_FAILED;
+       }
+
+       /* Save version */
+       version = tmp[1];
+
+       /* Find APP1 */
+       bool b_tag_ff = false;
+       while(1) {
+               tmp_exif = __gl_exif_read_1_byte(fd);
+               if (tmp_exif < 0)
+                       goto GL_EXIF_FAILED;
+
+               tmp[0] = (unsigned char)tmp_exif;
+
+               MSG_HIGH("- %02X", tmp[0]);
+               if (!b_tag_ff) {
+                       /* Get first tag */
+                       if (tmp[0] == GL_EXIF_TAG) {
+                               MSG_WARN("0xFF!");
+                               b_tag_ff = true;
+                       }
+                       continue;
+               }
+
+               /* Get APP1 */
+               if (tmp[0] == GL_EXIF_APP1) {
+                       MSG_WARN("Exif in APP1!");
+                       break;
+               }
+
+               MSG_WARN("No Exif in APP1!");
+
+               /* Close file */
+               fclose(fd);
+               if (!b_write) {
+                       /* Normal orientation = 0degree = 1 */
+                       *orientation = 1;
+                       return 0;
+               }
+
+               if (version == GL_EXIF_JFIF_00) {
+                       return __gl_exif_rw_jfif_1dot00(file_path, orientation);
+               } else if (version == GL_EXIF_JFIF_01) {
+                       return __gl_exif_rw_jfif_1dot01(file_path, orientation);
+               } else {
+                       return __gl_exif_rw_jfif_1dot02(file_path, orientation);
+               }
+       }
+
+       /* Find Exif */
+       while(1) {
+               tmp_exif = __gl_exif_read_1_byte(fd);
+               if (tmp_exif < 0)
+                       goto GL_EXIF_FAILED;
+
+               tmp[0] = (unsigned char)tmp_exif;
+               if (tmp[0] != 0x45)
+                       continue;
+
+               for (i = 0; i < 5; i++) {
+                       tmp_exif = __gl_exif_read_1_byte(fd);
+                       if (tmp_exif < 0)
+                               goto GL_EXIF_FAILED;
+
+                       tmp[i] = (unsigned char)tmp_exif;
+                       MSG_HIGH("- %02X", tmp[i]);
+               }
+               if (tmp[0] == 0x78 && tmp[1] == 0x69 && tmp[2] == 0x66 &&
+                   tmp[3] == 0x00 && tmp[4] == 0x00) {
+                       MSG_WARN("Met Exif!");
+                       break;
+               } else {
+                       MSG_WARN("Not met Exif!");
+                       goto GL_EXIF_FAILED;
+               }
+       }
+
+       /* Read Exif body */
+       for (i = 0; i < 4; i++) {
+               tmp_exif = __gl_exif_read_1_byte(fd);
+               if (tmp_exif < 0)
+                       goto GL_EXIF_FAILED;
+               tmp[i] = (unsigned char)tmp_exif;
+       }
+
+       /* Check byte order and Tag Mark , "II(0x4949)" or "MM(0x4d4d)" */
+       if (tmp[0] == 0x49 && tmp[1] == 0x49 && tmp[2] == 0x2A &&
+           tmp[3] == 0x00) {
+               MSG_HIGH("Intel");
+               is_motorola = false;
+       } else if (tmp[0] == 0x4D && tmp[1] == 0x4D && tmp[2] == 0x00 &&
+                  tmp[3] == 0x2A) {
+               MSG_HIGH("Motorola");
+               is_motorola = true;
+       } else {
+               goto GL_EXIF_FAILED;
+       }
+
+       for (i = 0; i < 4; i++) {
+               tmp_exif = __gl_exif_read_1_byte(fd);
+               if (tmp_exif < 0)
+                       goto GL_EXIF_FAILED;
+
+               tmp[i] = (unsigned char)tmp_exif;
+               MSG_HIGH("- %02X", tmp[i]);
+       }
+
+       /* Get first IFD offset (offset to IFD0) , MM-08000000, II-00000008 */
+       if (is_motorola) {
+               if (tmp[4] != 0 && tmp[5] != 0)
+                       goto GL_EXIF_FAILED;
+               offset = tmp[6];
+               offset <<= 8;
+               offset += tmp[7];
+       } else {
+               if (tmp[7] != 0 && tmp[6] != 0)
+                       goto GL_EXIF_FAILED;
+               offset = tmp[5];
+               offset <<= 8;
+               offset += tmp[4];
+       }
+       MSG_HIGH("offset: %d", offset);
+
+       /* IFD: Image File Directory */
+       /* Get the number of directory entries contained in this IFD, - 2 bytes, EE */
+       unsigned int tags_cnt = 0;
+       for (i = 0; i < 2; i++) {
+               tmp_exif = __gl_exif_read_1_byte(fd);
+               if (tmp_exif < 0)
+                       goto GL_EXIF_FAILED;
+
+               tmp[i] = (unsigned char)tmp_exif;
+       }
+       if (is_motorola) {
+               tags_cnt = tmp[0];
+               tags_cnt <<= 8;
+               tags_cnt += tmp[1];
+       } else {
+               tags_cnt = tmp[1];
+               tags_cnt <<= 8;
+               tags_cnt += tmp[0];
+       }
+       MSG_HIGH("tags_cnt: %d", tags_cnt);
+       if (tags_cnt == 0) {
+               MSG_ERROR("tags_cnt == 0 - 2");
+               goto GL_EXIF_FAILED;
+       }
+
+       /* Search for Orientation Tag in IFD0 */
+       unsigned int tag_num = 0;
+       while (1) {
+               /* Every directory entry size is 12 */
+               for (i = 0; i < 12; i++) {
+                       tmp_exif = __gl_exif_read_1_byte(fd);
+                       if (tmp_exif < 0)
+                               goto GL_EXIF_FAILED;
+
+                       tmp[i] = (unsigned char)tmp_exif;
+               }
+               /* Get Tag number */
+               if (is_motorola) {
+                       tag_num = tmp[0];
+                       tag_num <<= 8;
+                       tag_num += tmp[1];
+               } else {
+                       tag_num = tmp[1];
+                       tag_num <<= 8;
+                       tag_num += tmp[0];
+               }
+               /* found Orientation Tag */
+               if (tag_num == 0x0112) {
+                       MSG_WARN("Found orientation tag!");
+                       break;
+               }
+               if (--tags_cnt == 0) {
+                       MSG_ERROR("tags_cnt == 0");
+                       goto GL_EXIF_FAILED;
+               }
+       }
+
+       /* |TT|ff|NNNN|DDDD|  ---  TT - 2 bytes, tag NO. ;ff - 2 bytes, data format
+            NNNN - 4 bytes, entry count;  DDDD - 4 bytes Data value */
+       if (b_write) {
+               MSG_HIGH("Write: %d", *orientation);
+               /* Set the Orientation value */
+               if (is_motorola)
+                       tmp[9] = (unsigned char)(*orientation);
+               else
+                       tmp[8] = (unsigned char)(*orientation);
+
+               /* Move pointer back to the entry start point */
+               fseek(fd, -12, SEEK_CUR);
+               fwrite(tmp, 1, 10, fd);
+       } else {
+               /* Get the Orientation value */
+               if (is_motorola) {
+                       if (tmp[8] != 0) {
+                               MSG_ERROR("tmp[8] != 0");
+                               goto GL_EXIF_FAILED;
+                       }
+                       *orientation = (unsigned int)tmp[9];
+               } else {
+                       if (tmp[9] != 0) {
+                               MSG_ERROR("tmp[9] != 0");
+                               goto GL_EXIF_FAILED;
+                       }
+                       *orientation = (unsigned int)tmp[8];
+               }
+               if (*orientation > 8) {
+                       MSG_ERROR("*orient > 8");
+                       goto GL_EXIF_FAILED;
+               }
+               MSG_HIGH("Read: %d", *orientation);
+       }
+
+       ret = 0;
+
+ GL_EXIF_FAILED:
+
+       fclose(fd);
+       MSG_HIGH("All done");
+       return ret;
+}
+
+static int __gl_exif_rw_orient(const char *file_path, unsigned int *orient, bool b_write)
+{
+       MSG_HIGH("b_write: %d", b_write);
+       unsigned int length = 0;
+       unsigned int i = 0;
+       bool is_motorola = false; /* Flag for byte order */
+       unsigned int offset = 0;
+       unsigned int jfif_offset = 0;
+       unsigned int tags_cnt = 0;
+       unsigned int tag_num = 0;
+       int tmp_exif = -1;
+       unsigned char exif_data[GL_EXIF_BUF_LEN_MAX] = { 0, };
+       FILE *fd = NULL;
+       int ret = -1;
+
+       if (b_write) {
+               if ((fd = fopen(file_path, "rb+")) == NULL) {
+                       MSG_ERROR("Can't open %s!", file_path);
+                       return -1;
+               }
+       } else {
+               if ((fd = fopen(file_path, "rb")) == NULL) {
+                       MSG_ERROR("Can't open %s!", file_path);
+                       return -1;
+               }
+       }
+
+       /* Read File head, check for JPEG SOI + Exif APP1 */
+       for (i = 0; i < 4; i++) {
+               tmp_exif = __gl_exif_read_1_byte(fd);
+               if (tmp_exif < 0)
+                       goto GL_EXIF_FAILED;
+
+               exif_data[i] = (unsigned char)tmp_exif;
+       }
+
+       if (exif_data[0] == GL_EXIF_TAG && exif_data[1] == GL_EXIF_SOI) {
+               MSG_HIGH("JPEG file");
+       } else {
+               MSG_ERROR("Not a JPEG file!");
+               goto GL_EXIF_FAILED;
+       }
+
+       if (exif_data[2] == GL_EXIF_TAG && exif_data[3] == GL_EXIF_APP1) {
+               MSG_WARN("Exif in APP1!");
+       } else if (exif_data[2] == GL_EXIF_TAG &&
+                  exif_data[3] == GL_EXIF_APP0) {
+               MSG_WARN("Jfif in APP0!");
+               int ret = __gl_exif_rw_jfif(fd, file_path, orient, b_write);
+               return ret;
+       } else {
+               MSG_ERROR("Not a Exif in APP1 or Jiff in APP2[%d]!", exif_data[3]);
+               goto GL_EXIF_FAILED;
+       }
+
+       /* Get the marker parameter length count */
+       if (__gl_exif_read_2_bytes(fd, &length) < 0)
+               goto GL_EXIF_FAILED;
+       MSG_HIGH("length: %d", length);
+       /* Length includes itself, so must be at least 2
+           Following Exif data length must be at least 6 */
+       if (length < 8) {
+               MSG_ERROR("length < 8");
+               goto GL_EXIF_FAILED;
+       }
+       length -= 8;
+
+        /* Length of an IFD entry */
+       if (length < 12) {
+               MSG_ERROR("length < 12");
+               goto GL_EXIF_FAILED;
+       }
+
+       /* Read Exif head, check for "Exif" */
+       for (i = 0; i < 6; i++) {
+               tmp_exif = __gl_exif_read_1_byte(fd);
+               if (tmp_exif < 0)
+                       goto GL_EXIF_FAILED;
+
+               exif_data[i] = (unsigned char)tmp_exif;
+               MSG_HIGH("- %02X", exif_data[i]);
+       }
+
+       if (exif_data[0] != 0x45 || exif_data[1] != 0x78 ||
+           exif_data[2] != 0x69 || exif_data[3] != 0x66 ||
+           exif_data[4] != 0x00 || exif_data[5] != 0x00) {
+               MSG_ERROR("Not met Exif!");
+               goto GL_EXIF_FAILED;
+       }
+
+       /* Read Exif body */
+       for (i = 0; i < length; i++) {
+               tmp_exif = __gl_exif_read_1_byte(fd);
+               if (tmp_exif < 0)
+                       goto GL_EXIF_FAILED;
+               exif_data[i] = (unsigned char)tmp_exif;
+       }
+
+       /* Check byte order and Tag Mark , "II(0x4949)" or "MM(0x4d4d)" */
+       if (exif_data[0] == 0x49 && exif_data[1] == 0x49 &&
+           exif_data[2] == 0x2A && exif_data[3] == 0x00) {
+               MSG_HIGH("Intel");
+               is_motorola = false;
+       } else if (exif_data[0] == 0x4D && exif_data[1] == 0x4D &&
+                exif_data[2] == 0x00 && exif_data[3] == 0x2A) {
+               MSG_HIGH("Motorola");
+               is_motorola = true;
+       } else {
+               goto GL_EXIF_FAILED;
+       }
+
+       /* Get first IFD offset (offset to IFD0) , MM-00000008, II-08000000 */
+       if (is_motorola) {
+               if (exif_data[4] != 0 && exif_data[5] != 0)
+                       goto GL_EXIF_FAILED;
+               offset = exif_data[6];
+               offset <<= 8;
+               offset += exif_data[7];
+       } else {
+               if (exif_data[7] != 0 && exif_data[6] != 0)
+                       goto GL_EXIF_FAILED;
+               offset = exif_data[5];
+               offset <<= 8;
+               offset += exif_data[4];
+       }
+       /* check end of data segment */
+       if (offset > length - 2) {
+               MSG_ERROR("offset > length - 2");
+               goto GL_EXIF_FAILED;
+       }
+       /* IFD: Image File Directory */
+       /* Get the number of directory entries contained in this IFD, - EEEE */
+       if (is_motorola) {
+               tags_cnt = exif_data[offset];
+               tags_cnt <<= 8;
+               tags_cnt += exif_data[offset+1];
+       } else {
+               tags_cnt = exif_data[offset+1];
+               tags_cnt <<= 8;
+               tags_cnt += exif_data[offset];
+       }
+       if (tags_cnt == 0) {
+               MSG_ERROR("tags_cnt == 0 - 2");
+               goto GL_EXIF_FAILED;
+       }
+       offset += 2;
+
+       /* check end of data segment */
+       if (offset > length - 12) {
+               MSG_ERROR("offset > length - 12");
+               goto GL_EXIF_FAILED;
+       }
+
+       /* Search for Orientation Tag in IFD0 */
+       while (1) {
+               /* Get Tag number */
+               if (is_motorola) {
+                       tag_num = exif_data[offset];
+                       tag_num <<= 8;
+                       tag_num += exif_data[offset+1];
+               } else {
+                       tag_num = exif_data[offset+1];
+                       tag_num <<= 8;
+                       tag_num += exif_data[offset];
+               }
+               /* found Orientation Tag */
+               if (tag_num == 0x0112) {
+                       MSG_WARN("Found orientation tag!");
+                       break;
+               }
+               if (--tags_cnt == 0) {
+                       MSG_ERROR("tags_cnt == 0");
+                       goto GL_EXIF_FAILED;
+               }
+               /* Every directory entry size is 12 */
+               offset += 12;
+       }
+
+       if (b_write) {
+               MSG_HIGH("Write: %d", *orient);
+               /* Set the Orientation value */
+               if (is_motorola)
+                       exif_data[offset+9] = (unsigned char)(*orient);
+               else
+                       exif_data[offset+8] = (unsigned char)(*orient);
+
+               fseek(fd, jfif_offset + (4 + 2 + 6 + 2) + offset, SEEK_SET);
+               fwrite(exif_data + 2 + offset, 1, 10, fd);
+       } else {
+               /* Get the Orientation value */
+               if (is_motorola) {
+                       if (exif_data[offset+8] != 0) {
+                               MSG_ERROR("exif_data[offset+8] != 0");
+                               goto GL_EXIF_FAILED;
+                       }
+                       *orient = (unsigned int)exif_data[offset+9];
+               } else {
+                       if (exif_data[offset+9] != 0) {
+                               MSG_ERROR("exif_data[offset+9] != 0");
+                               goto GL_EXIF_FAILED;
+                       }
+                       *orient = (unsigned int)exif_data[offset+8];
+               }
+               if (*orient > 8) {
+                       MSG_ERROR("*orient > 8");
+                       goto GL_EXIF_FAILED;
+               }
+               MSG_HIGH("Read: %d", *orient);
+       }
+
+       ret = 0;
+
+ GL_EXIF_FAILED:
+
+       fclose(fd);
+       MSG_HIGH("All done");
+       return ret;
+}
+
+
+#endif
+
+#if 0
+#include <libexif/exif-data.h>
+#include <libjpeg/jpeg-data.h>
+
+
+static inline bool _get_exif_short(ExifData *ed, ExifTag tag, short *value)
+{
+       ExifEntry *entry = NULL;
+       /** get exifentry*/
+       entry = exif_data_get_entry(ed, tag);
+       if (!entry)
+       {
+               MSG_ERROR("Cannot find entry");
+               return false;
+       }
+
+       /** get value of the entry*/
+       *value = exif_get_short(entry->data, exif_data_get_byte_order(entry->parent->parent));
+
+       return true;
+}
+
+static inline bool _set_exif_short(ExifData *ed, ExifTag tag, short value)
+{
+       ExifEntry *entry = NULL;
+       /** get exifentry*/
+       entry = exif_data_get_entry(ed, tag);
+       if (!entry)
+       {
+               MSG_ERROR("Cannot find entry");
+               return false;
+       }
+
+       /** set value of the entry*/
+       exif_set_short(entry->data, exif_data_get_byte_order(entry->parent->parent), value);
+
+       return true;
+}
+
+int GetEXIFOrientation(const char *filepath, int *orientation)
+{
+       ExifData *ed = NULL;
+
+       ed = exif_data_new_from_file(filepath);
+       if (ed == NULL)
+       {
+               MSG_ERROR("Cannot get exif data from %s", filepath);
+               return -1;
+       }
+
+// EXIF
+       if(_get_exif_short(ed, EXIF_TAG_ORIENTATION, orientation) == false)
+       {
+               MSG_ERROR("Get orientation failed");
+               /* Free the EXIF data */
+               exif_data_unref(ed);
+               return -1;
+       }
+
+       MSG_HIGH("Orentation : %d", *orientation);
+
+       /* Free the EXIF data */
+       exif_data_unref(ed);
+
+       return 0;
+}
+
+
+int SetEXIFOrientation(const char *filepath, int orientation)
+{
+       JPEGData *jdata;
+       unsigned char *d = NULL;
+       unsigned int ds;
+
+
+       ExifData *ed = NULL;
+
+       ed = exif_data_new_from_file(filepath);
+       if (ed == NULL)
+       {
+               MSG_ERROR("Cannot get exif data from %s", filepath);
+               return -1;
+       }
+
+       if(_set_exif_short(ed, EXIF_TAG_ORIENTATION, orientation) == false)
+       {
+               MSG_ERROR("Get orientation failed");
+               /* Free the EXIF data */
+               exif_data_unref(ed);
+               return -1;
+       }
+
+
+       /* Parse the JPEG file. */
+       jdata = jpeg_data_new ();
+       jpeg_data_load_file (jdata, filepath);
+
+       /* Make sure the EXIF data is not too big. */
+       exif_data_save_data (ed, &d, &ds);
+       if (ds)
+       {
+               free (d);
+               if (ds > 0xffff)
+                       MSG_ERROR("Too much EXIF data(%i bytes). Only %i bytes are allowed."),  ds, 0xffff);
+       }
+
+       jpeg_data_set_exif_data (jdata, ed);
+
+       /* Save the modified image. */
+       jpeg_data_save_file (jdata, filepath);
+       jpeg_data_unref (jdata);
+
+
+// EXIF
+       MSG_HIGH("Orentation : %d", *orientation);
+
+       /* Free the EXIF data */
+       exif_data_unref(ed);
+       return 0;
+}
+#endif
+
+
+/* 1 : top left
+   2 : top right
+   3 : bottom right
+   4 : bottom left
+   5 : left top
+   6 : right top
+   7 : right bottom
+   8 : left bottom */
+
+#define IVUG_EXIF_ROTATE_0 (1)
+#define IVUG_EXIF_ROTATE_90 (6)
+#define IVUG_EXIF_ROTATE_180 (3)
+#define IVUG_EXIF_ROTATE_270 (8)
+
+
+int ivug_exif_get_rotate(const char *file, int *degree)
+{
+       MSG_ASSERT(file != NULL);
+
+       unsigned int orientation = 0;
+
+       int ret = __gl_exif_rw_orient(file, &orientation, false);
+       if (-1 != ret && 0 != orientation)
+       {
+               switch (orientation)
+               {
+               case IVUG_EXIF_ROTATE_0:
+                       *degree = 0;
+                       break;
+               case IVUG_EXIF_ROTATE_90:
+                       *degree = 90;
+                       break;
+               case IVUG_EXIF_ROTATE_180:
+                       *degree = 180;
+                       break;
+               case IVUG_EXIF_ROTATE_270:
+                       *degree = 270;
+                       break;
+               default:
+                       *degree = 0;
+                       MSG_ERROR("Invalid Orientation : %d", orientation);
+                       break;
+               }
+
+               MSG_HIGH("Get Degree: %d' %s", *degree, file);
+               return 0;
+
+       }
+
+       MSG_ERROR("Unknown Degree: %s", file);
+       return -1;
+}
+
+
+
+int ivug_exif_set_rotate(const char *file, int degree)
+{
+       MSG_ASSERT(file != NULL);
+
+       MSG_HIGH("Set Degree: %d' %s", degree, file);
+
+       unsigned int orientation;
+
+       switch (degree){
+       case 0:
+       case 360:
+               orientation = IVUG_EXIF_ROTATE_0;
+               break;
+       case 90:
+       case -270:
+               orientation = IVUG_EXIF_ROTATE_90;
+               break;
+       case 180:
+       case -180:
+               orientation = IVUG_EXIF_ROTATE_180;
+               break;
+       case 270:
+       case -90:
+               orientation = IVUG_EXIF_ROTATE_270;
+               break;
+       default:
+               orientation = IVUG_EXIF_ROTATE_0;;
+               MSG_ERROR("Invalid Degree : %d", degree);
+               break;
+       }
+
+       int ret = __gl_exif_rw_orient(file, &orientation, true);
+
+       return ret;
+}
+
+
diff --git a/common/src/ivug-file-info.c b/common/src/ivug-file-info.c
new file mode 100755 (executable)
index 0000000..b4f985e
--- /dev/null
@@ -0,0 +1,740 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-file-info.h"
+#include "ivug-debug.h"
+#include "ivug-drm.h"
+#include "ivug-util.h"
+
+#include <libexif/exif-data.h> //for exif
+#include <metadata_extractor.h>
+#include <string.h>
+#include <Evas.h>
+#include <Ecore_Evas.h>
+#include <Evas.h>
+#include <Efreet_Mime.h>
+
+#include <mime_type.h>
+
+#define BUF_LEN (255)
+
+static const char *_conver_error(int err)
+{
+       switch(err)
+       {
+               case METADATA_EXTRACTOR_ERROR_NONE:
+                       return "Successful";
+               case METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER:
+                       return "Invalid parameter";
+               case METADATA_EXTRACTOR_ERROR_OUT_OF_MEMORY:
+                       return "Out of memory";
+               case METADATA_EXTRACTOR_ERROR_FILE_EXISTS:
+                       return "File already exists";
+               case METADATA_EXTRACTOR_ERROR_OPERATION_FAILED:
+                       return "Operation failed";
+               default:
+               {
+                       static char error[128];
+                       sprintf(error, "Unknow Error : %d(0x%08x)", err, err);
+                       return error;
+               }
+       }
+       return NULL;
+}
+
+static bool _get_exif_string(ExifData *ed, ExifTag tag, const char *buf, int buf_len)
+{
+       ExifEntry *entry = NULL;
+       /** get exifentry*/
+       entry = exif_data_get_entry(ed, tag);
+       if (!entry)
+       {
+               return false;
+       }
+
+       /** get value of the entry*/
+       if(exif_entry_get_value(entry, (char *)buf, buf_len) == NULL)
+       {
+               return false;
+       }
+       return true;
+}
+
+static bool _get_exif_short(ExifData *ed, ExifTag tag, int *value)
+{
+       ExifEntry *entry = NULL;
+       /** get exifentry*/
+       entry = exif_data_get_entry(ed, tag);
+       if (!entry)
+       {
+               return false;
+       }
+
+       /** get value of the entry*/
+       *value = exif_get_short(entry->data, exif_data_get_byte_order(entry->parent->parent));
+
+       return true;
+}
+
+
+bool _get_video_gps_info(const char *filepath, double *latitude, double *longitude)
+{
+       IV_ASSERT(filepath != NULL);
+       IV_ASSERT(latitude != NULL);
+       IV_ASSERT(longitude != NULL);
+
+       int ret = METADATA_EXTRACTOR_ERROR_NONE;
+       metadata_extractor_h metadata;
+
+       char *latitude_str;
+       char *longitude_str;
+
+       *latitude = 0.0;
+       *longitude = 0.0;
+
+       ret = metadata_extractor_create(&metadata);
+       if(ret != METADATA_EXTRACTOR_ERROR_NONE)
+       {
+               MSG_UTIL_ERROR("Fail metadata_extractor_create [%s]", _conver_error(ret));
+               return false;
+       }
+
+       ret = metadata_extractor_set_path(metadata, filepath);
+       if(ret != METADATA_EXTRACTOR_ERROR_NONE)
+       {
+               MSG_UTIL_ERROR("Fail metadata_extractor_set_path [%s]", _conver_error(ret));
+               ret = metadata_extractor_destroy(metadata);
+               MSG_UTIL_HIGH("metadata_extractor_destroy [%s]", _conver_error(ret));
+               return false;
+       }
+
+       ret = metadata_extractor_get_metadata(metadata, METADATA_LATITUDE, &latitude_str);
+       if(ret != METADATA_EXTRACTOR_ERROR_NONE)
+       {
+               MSG_UTIL_ERROR("Fail metadata_extractor_get_metadata [%s]", _conver_error(ret));
+               ret = metadata_extractor_destroy(metadata);
+               MSG_UTIL_HIGH("metadata_extractor_destroy [%s]", _conver_error(ret));
+               return false;
+       }
+
+       ret = metadata_extractor_get_metadata(metadata, METADATA_LONGITUDE, &longitude_str);
+       if(ret != METADATA_EXTRACTOR_ERROR_NONE)
+       {
+               MSG_UTIL_ERROR("Fail metadata_extractor_get_metadata [%s]", _conver_error(ret));
+               ret = metadata_extractor_destroy(metadata);
+               MSG_UTIL_HIGH("metadata_extractor_destroy [%s]", _conver_error(ret));
+               return false;
+       }
+
+       MSG_UTIL_LOW("lat = %s, longi = %s", latitude_str, longitude_str);
+       *latitude = ivug_atod(latitude_str);
+       *longitude = ivug_atod(longitude_str);
+
+       ret = metadata_extractor_destroy(metadata);
+       if(ret != METADATA_EXTRACTOR_ERROR_NONE)
+       {
+               MSG_UTIL_ERROR("Fail metadata_extractor_destroy [%s]", _conver_error(ret));
+       }
+
+       return true;
+}
+
+/* LATITUDE : -90 ~ +90, LONGITUDE : -180 ~ +180) */
+bool _get_gps_info_from_exifdata(ExifData *ed, double *latitude, double *longitude)
+{
+       IV_ASSERT(ed != NULL);
+       IV_ASSERT(latitude != NULL);
+       IV_ASSERT(longitude != NULL);
+
+       ExifIfd ifd;
+       ExifTag tag;
+
+       char buf[BUF_LEN+1] = {'\0',};
+
+       double multiplier = 1.0;
+
+       ifd = EXIF_IFD_GPS;
+       tag = EXIF_TAG_GPS_LATITUDE_REF;
+
+       if(_get_exif_string(ed, tag, buf, BUF_LEN) == false)
+       {
+               return false;
+       }
+
+       if(buf[0] == 'S')       /* SOUTH */
+       {
+               multiplier = -1.0;
+       }
+
+       tag = EXIF_TAG_GPS_LATITUDE;
+
+       if(_get_exif_string(ed, tag, buf, BUF_LEN) == false)
+       {
+               return false;
+       }
+
+       {
+               buf[strlen(buf)] = '\0';
+               double tmp_arr[3] = { 0.0, 0.0, 0.0 };
+               int count = 0;
+               char* p = strtok(buf, ", ");
+               /** split the buf by , */
+               while(p != NULL)
+               {
+                       tmp_arr[count] = ivug_atod(p);
+                       count++;
+                       p=strtok(NULL, ", ");
+               }
+
+               if( count != 3 )
+               {
+                       MSG_UTIL_ERROR("Cannot get latitude info : %s", p);
+                       return false;
+               }
+               *latitude = multiplier*(tmp_arr[0] + tmp_arr[1]/60 + tmp_arr[2]/3600);
+       }
+
+       multiplier = 1.0;
+       tag = EXIF_TAG_GPS_LONGITUDE_REF;
+
+       if(_get_exif_string(ed, tag, buf, BUF_LEN) == false)
+       {
+               return false;
+       }
+
+       if(buf[0] == 'W')       /* WEST */
+       {
+               multiplier = -1.0;
+       }
+
+       tag = EXIF_TAG_GPS_LONGITUDE;
+
+       if(_get_exif_string(ed, tag, buf, BUF_LEN) == false)
+       {
+               return false;
+       }
+
+       {
+               buf[strlen(buf)] = '\0';
+               double tmp_arr[3] = { 0.0, 0.0, 0.0 };
+               int count = 0;
+               char* p = strtok(buf, ", ");
+               /** split the buf by , */
+               while(p != NULL)
+               {
+                       tmp_arr[count] = ivug_atod(p);
+                       count++;
+                       p=strtok(NULL, ", ");
+               }
+
+               if( count != 3 )
+               {
+                       MSG_UTIL_ERROR("Cannot get Longitude info : %s", p);
+                       return false;
+               }
+
+               *longitude = multiplier*(tmp_arr[0] + tmp_arr[1]/60 + tmp_arr[2]/3600);
+       }
+
+       return true;
+}
+\r
+bool _get_image_gps_info(const char* filepath, double *latitude, double *longitude)
+{
+       IV_ASSERT(filepath != NULL);
+       IV_ASSERT(latitude != NULL);
+       IV_ASSERT(longitude != NULL);
+
+       ExifData *ed = NULL;
+
+       /** get exifdata*/
+       ed = exif_data_new_from_file(filepath);
+       if (!ed)
+       {
+               return false;
+       }
+
+       if(_get_gps_info_from_exifdata(ed, latitude, longitude) == false)
+       {
+               exif_data_unref(ed);
+               return false;
+       }
+
+       exif_data_unref(ed);
+
+       return true;
+}
+
+bool _get_orientation_from_exifdata(ExifData *ed, /*OUT*/int *orient)
+{
+       MSG_DETAIL_HIGH("_get_orientation_from_exifdata");
+       ExifIfd ifd;
+       ExifTag tag;
+
+       ifd = EXIF_IFD_EXIF;
+       tag = EXIF_TAG_ORIENTATION;
+
+       if(_get_exif_short(ed, tag, orient) == false)
+       {
+               return false;
+       }
+
+       MSG_DETAIL_HIGH("orientation = %d", *orient);
+       /* 1 : top left
+          2 : top right
+          3 : bottom right
+          4 : bottom left
+          5 : left top
+          6 : right top
+          7 : right bottom
+          8 : left bottom */
+       return true;
+}
+
+/* out value must be freed */
+bool _get_maker_from_exifdata(ExifData *ed, /*OUT*/char *maker)
+{
+       MSG_DETAIL_HIGH("_get_maker_from_exifdata");
+       ExifIfd ifd;
+       ExifTag tag;
+
+       char buf[BUF_LEN+1] = {'\0',};
+
+       ifd = EXIF_IFD_EXIF;
+       tag = EXIF_TAG_MAKE;
+
+       if(_get_exif_string(ed, tag, buf, BUF_LEN) == false)
+       {
+               return false;
+       }
+       MSG_DETAIL_HIGH("Maker = %s", buf);
+
+       maker = strdup(buf);
+       return true;
+}
+
+/* out value must be freed */
+bool _get_model_from_exifdata(ExifData *ed, /*OUT*/char *model)
+{
+       MSG_DETAIL_HIGH("_get_model_from_exifdata");
+       ExifIfd ifd;
+       ExifTag tag;
+
+       char buf[BUF_LEN+1] = {'\0',};
+
+       ifd = EXIF_IFD_EXIF;
+       tag = EXIF_TAG_MODEL;
+
+       if(_get_exif_string(ed, tag, buf, BUF_LEN) == false)
+       {
+               return false;
+       }
+       MSG_DETAIL_HIGH("Model = %s", buf);
+
+       model = strdup(buf);
+       return true;
+}
+
+bool _get_flash_from_exifdata(ExifData *ed, /*OUT*/int *status)
+{
+       MSG_DETAIL_HIGH("_get_flash_from_exifdata");
+       ExifIfd ifd;
+       ExifTag tag;
+
+       ifd = EXIF_IFD_EXIF;
+       tag = EXIF_TAG_FLASH;
+
+       if(_get_exif_short(ed, tag, status) == false)
+       {
+               return false;
+       }
+
+       MSG_DETAIL_HIGH("Flash status = %d", *status);
+       /* LSB
+          0b : Flash did not fire
+          1b : Flash fired */
+       return true;
+}
+
+/* out value must be freed */
+bool _get_focal_length_from_exifdata(ExifData *ed, /*OUT*/char *length)
+{
+       MSG_DETAIL_HIGH("_get_focal_length_from_exifdata");
+       ExifIfd ifd;
+       ExifTag tag;
+
+       char buf[BUF_LEN+1] = {'\0',};
+
+       ifd = EXIF_IFD_EXIF;
+       tag = EXIF_TAG_FOCAL_LENGTH;
+
+       if(_get_exif_string(ed, tag, buf, BUF_LEN) == false)
+       {
+               return false;
+       }
+       MSG_DETAIL_HIGH("Focal length = %s", buf);
+
+       length = strdup(buf);
+       return true;
+}
+
+bool _get_white_balance_from_exifdata(ExifData *ed, int *white_balance)
+{
+       MSG_DETAIL_HIGH("_get_white_balance_from_exifdata");
+       ExifIfd ifd;
+       ExifTag tag;
+
+       ifd = EXIF_IFD_EXIF;
+       tag = EXIF_TAG_WHITE_BALANCE;
+
+       if(_get_exif_short(ed, tag, white_balance) == false)
+       {
+               return false;
+       }
+
+       MSG_DETAIL_HIGH("White balance = %d", *white_balance);
+       /* 0 : auto white balance
+          1 : menual white balance */
+       return true;
+}
+
+
+static bool _get_image_resolution(const char *path, int * /* OUT */ pWidth, int * /* OUT */pHeight)
+{
+       IV_ASSERT(path != NULL);
+
+       int width = 0;
+       int height = 0;
+
+       Evas *canvas;
+       Ecore_Evas *ee;
+
+       ee = ecore_evas_buffer_new(1, 1);
+       if (!ee)
+       {
+               MSG_DETAIL_ERROR("Cannot get EVAS");
+               return false;
+       }
+
+       canvas = ecore_evas_get(ee);
+
+       Evas_Object *img = evas_object_image_add(canvas);
+
+       evas_object_image_file_set(img, NULL, NULL);
+       evas_object_image_load_orientation_set(img, EINA_TRUE);
+       evas_object_image_load_scale_down_set(img, 0);
+
+       evas_object_image_file_set(img, path, NULL);
+       Evas_Load_Error error = evas_object_image_load_error_get(img);
+       if ( error != EVAS_LOAD_ERROR_NONE)
+       {
+               MSG_DETAIL_ERROR("Decoding Error(%d) : %s", error, path);
+               evas_object_del(img);
+               ecore_evas_free(ee);
+               return false;
+       }
+
+       evas_object_image_size_get(img, &width, &height);
+
+       evas_object_image_file_set(img, NULL, NULL);
+       evas_object_del(img);
+
+       ecore_evas_free(ee);
+
+       *pWidth = width;
+       *pHeight = height;
+
+       MSG_DETAIL_HIGH("widht & height is [%d, %d]",  width, height);
+
+       return true;
+}
+
+
+\r
+static bool
+_get_video_resolution(const char *path, int * /* OUT */ pWidth, int * /* OUT */pHeight)
+{
+       IV_ASSERT(path != NULL);
+
+       int ret = METADATA_EXTRACTOR_ERROR_NONE;
+       metadata_extractor_h metadata;
+
+       char *width_str;
+       char *height_str;
+
+       ret = metadata_extractor_create(&metadata);
+       if(ret != METADATA_EXTRACTOR_ERROR_NONE)
+       {
+               MSG_UTIL_ERROR("Fail metadata_extractor_create [%s]", _conver_error(ret));
+               return false;
+       }
+
+       ret = metadata_extractor_set_path(metadata, path);
+       if(ret != METADATA_EXTRACTOR_ERROR_NONE)
+       {
+               MSG_UTIL_ERROR("Fail metadata_extractor_set_path [%s]", _conver_error(ret));
+               ret = metadata_extractor_destroy(metadata);
+               MSG_UTIL_HIGH("metadata_extractor_destroy [%s]", _conver_error(ret));
+               return false;
+       }
+
+       ret = metadata_extractor_get_metadata(metadata, METADATA_VIDEO_WIDTH, &width_str);
+       if(ret != METADATA_EXTRACTOR_ERROR_NONE)
+       {
+               MSG_UTIL_ERROR("Fail metadata_extractor_get_metadata [%s]", _conver_error(ret));
+               ret = metadata_extractor_destroy(metadata);
+               MSG_UTIL_HIGH("metadata_extractor_destroy [%s]", _conver_error(ret));
+               return false;
+       }
+
+       ret = metadata_extractor_get_metadata(metadata, METADATA_VIDEO_HEIGHT, &height_str);
+       if(ret != METADATA_EXTRACTOR_ERROR_NONE)
+       {
+               MSG_UTIL_ERROR("Fail metadata_extractor_get_metadata [%s]", _conver_error(ret));
+               ret = metadata_extractor_destroy(metadata);
+               MSG_UTIL_HIGH("metadata_extractor_destroy [%s]", _conver_error(ret));
+               return false;
+       }
+
+       MSG_UTIL_LOW("w = %s, h = %s", width_str, height_str);
+       *pWidth = ivug_atoi(width_str);
+       *pHeight = ivug_atoi(height_str);
+
+       ret = metadata_extractor_destroy(metadata);
+       if(ret != METADATA_EXTRACTOR_ERROR_NONE)
+       {
+               MSG_UTIL_ERROR("Fail metadata_extractor_destroy [%s]", _conver_error(ret));
+       }
+
+       return true;
+}
+
+
+
+static char*
+_get_drm_get_extension(const char* path)
+{
+#define EXT_SIZE               128
+#define EXT_SPLITTER   '.'
+
+       IV_ASSERT(path != NULL );
+
+       char *mime_type = ivug_drm_get_mime(path);
+       MSG_IVUG_HIGH("mime_type: %s", mime_type);
+
+       char **ext = NULL;
+       int length = -1;
+       int ret = -1;
+       char *result_ext = NULL;
+
+       ret = mime_type_get_file_extension(mime_type, &ext, &length);
+       free(mime_type);
+
+       if(ret != MIME_TYPE_ERROR_NONE)
+       {
+               MSG_IVUG_ERROR("mime_type_get_file_extension failed: %d", ret);
+               return NULL;
+       }
+       if(length <= 0)
+       {
+               MSG_IVUG_ERROR("mime_type_get_file_extension length is invalid: %d", length);
+               return NULL;
+       }
+
+       int i;
+       for(i=0; i<length; i++)
+       {
+               MSG_IVUG_HIGH("[%d]ext = %s", i, ext[i]);
+       }
+
+       result_ext = strdup(ext[length-1]);
+
+       for(i=0; i<length; i++)
+       {
+               free(ext[i]);
+       }
+       free(ext);
+
+       return result_ext;
+}
+
+bool ivug_fileinfo_get_image_resolution(const char *path, int * /* OUT */ pWidth, int * /* OUT */pHeight)
+{
+       if ( path == NULL )
+       {
+               MSG_UTIL_ERROR("Cannot get image resolution. path is NULL");
+               return false;
+       }
+
+       if(ivug_is_file_exist(path) == false)
+       {
+               MSG_UTIL_ERROR("%s : %s is not exist", __func__, path);
+               return false;
+       }
+
+       if(ivug_drm_is_drm_file(path) == true)
+       {
+               return false;\r
+       }
+       else
+       {
+               return _get_image_resolution(path, pWidth, pHeight);
+       }
+
+       return false;
+}
+
+
+bool ivug_fileinfo_get_video_resolution(const char *path, int * /* OUT */ pWidth, int * /* OUT */pHeight)
+{
+       if ( path == NULL )
+       {
+               MSG_UTIL_ERROR("Cannot get video resolution. path is NULL");
+               return false;
+       }
+
+       if(ivug_is_file_exist(path) == false)
+       {
+               MSG_UTIL_ERROR("%s : %s is not exist", __func__, path);
+               return false;
+       }
+
+       if(ivug_drm_is_drm_file(path) == true)
+       {
+// TODO : Currently, Not support to get video resolution for drm.
+               return false;
+       }
+       else
+       {
+               return _get_video_resolution(path, pWidth, pHeight);
+       }
+
+       return false;
+}
+
+bool ivug_fileinfo_get_video_gps_info(const char *path, double *latitude, double *longitude)
+{
+       if ( path == NULL )
+       {
+               MSG_UTIL_ERROR("Cannot get video gps location. path is NULL");
+               return false;
+       }
+
+       if(ivug_is_file_exist(path) == false)
+       {
+               MSG_UTIL_ERROR("%s : %s is not exist", __func__, path);
+               return false;
+       }
+
+       if(ivug_drm_is_drm_file(path) == true)
+       {
+// TODO : Currently, Not support to get video gps info for drm.
+               return false;
+       }
+       else
+       {
+               return _get_video_gps_info(path, latitude, longitude);
+       }
+
+       return false;
+}
+
+
+bool ivug_fileinfo_get_image_gps_info(const char* path, double *latitude, double *longitude)
+{
+       if ( path == NULL )
+       {
+               MSG_UTIL_ERROR("Cannot get image gps location. path is NULL");
+               return false;
+       }
+
+       if(ivug_is_file_exist(path) == false)
+       {
+               MSG_UTIL_ERROR("%s : %s is not exist", __func__, path);
+               return false;
+       }
+
+       if(ivug_drm_is_drm_file(path) == true)
+       {
+               return false;\r
+       }
+       else
+       {
+               return _get_image_gps_info(path, latitude, longitude);
+       }
+
+       return false;
+}
+
+
+char *ivug_fileinfo_get_file_extension(const char *path)
+{
+       if ( path == NULL )
+       {
+               MSG_UTIL_ERROR("Cannot get file extension. path is NULL");
+               return NULL;
+       }
+
+       if(ivug_drm_is_drm_file(path) == true)
+       {
+               return _get_drm_get_extension(path);
+       }
+       else
+       {
+               char *ext = NULL;
+
+               ext = strrchr(path, '.');
+
+               if ( (ext != NULL) && ((ext+1) != NULL) )
+               {
+                       return strdup(ext + 1);
+               }
+       }
+
+       return NULL;
+
+}
+
+char *ivug_fileinfo_get_mime_type(const char *path)
+{
+       if ( path == NULL )
+       {
+               MSG_UTIL_ERROR("Cannot get mine type. path is NULL");
+               return NULL;
+       }
+
+       //check mine type.
+       char *mime_type = NULL;
+       if(ivug_drm_is_drm_file(path) == true)
+       {
+               mime_type = ivug_drm_get_mime(path);
+       }
+       else
+       {
+               efreet_mime_init();
+               const char *type = NULL;
+               type = efreet_mime_type_get(ivug_get_filename(path));
+               if ( type != NULL )
+               {
+                       mime_type = strdup(type);
+               }
+               efreet_mime_shutdown();
+       }
+
+       return mime_type;
+}
+
+
diff --git a/common/src/ivug-message.c b/common/src/ivug-message.c
new file mode 100755 (executable)
index 0000000..efe8318
--- /dev/null
@@ -0,0 +1,548 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-message.h"
+
+#include <sys/types.h> // gettid()
+#include <pthread.h>
+
+#include <Eina.h>
+#include <Ecore.h>
+
+#undef UNIT_TEST
+
+#ifdef UNIT_TEST
+/*
+       Build gcc fmradio_message.c `pkg-config --cflags --libs eina dlog ecore ecore-input`
+*/
+#include <dlog.h>
+
+#include <assert.h>
+#include <Ecore_Input.h>
+
+#undef LOG_TAG
+#define LOG_TAG "UTT_MESSAGE"
+
+#define MSG_ASSERT(expr) do { if( !(expr) ) { LOG(LOG_INFO, LOG_TAG, "[%s] ASSERT : " #expr, __func__ ); assert(0); } }while(0)
+
+#define MSG_FATAL(...)         do { LOG(LOG_INFO, LOG_TAG, ##__VA_ARGS__); assert(0); } while(0)
+#define MSG_WARN(...)  LOG(LOG_INFO, LOG_TAG, ##__VA_ARGS__)
+#define MSG_ERROR(...)         LOG(LOG_INFO, LOG_TAG, ##__VA_ARGS__)
+#define MSG_HIGH(...)  LOG(LOG_INFO, LOG_TAG, ##__VA_ARGS__)
+#define MSG_MED(...)   LOG(LOG_INFO, LOG_TAG, ##__VA_ARGS__)
+#else
+
+#include "ivug-debug.h"
+
+#define LOG_LVL DBG_MSG_LVL_HIGH
+#define LOG_CAT "IV-MESSAGE"
+
+#endif
+
+#define MAX_COMMAND_LENGTH (30)                // Max length of each command
+
+typedef struct {
+       int param1;
+       int param2;
+       int param3;
+       void *param4;
+
+       char command[MAX_COMMAND_LENGTH];
+} MyData;
+
+typedef struct {
+       FnMessage callback;
+       void *client_data;
+
+       bool delete_me;
+} RegisteredCallback;
+
+typedef struct {
+       EINA_INLIST;
+
+       char command[MAX_COMMAND_LENGTH];
+       Eina_List/*<RegisteredCallback>*/ *cblist;
+} CommandList;
+
+typedef struct {
+       Ecore_Pipe *pipe;
+
+       Eina_Inlist *command_list;
+       int registered_count;
+
+       pthread_mutex_t pipe_mutex;
+
+} _MessageHandle, *_PMessageHandle;
+
+#define PRINT_ERRNO(errno, fmt, arg...) \
+       do { \
+               char szError[256]; \
+               int perr; \
+               perr = strerror_r(errno, szError, sizeof(szError)); \
+               \
+               if ( perr ) { \
+                       MSG_ERROR(fmt " %s", ##arg, szError); \
+               } \
+               else { \
+                       MSG_ERROR(fmt " Errno=%d", ##arg, errno); \
+               } \
+       } while(0)
+
+
+RegisteredCallback *_find_callback(Eina_List *cb_list, FnMessage cb)
+{
+       Eina_List *l;
+       RegisteredCallback *pCallback;
+
+       EINA_LIST_FOREACH(cb_list,l, pCallback)
+       {
+               if (( pCallback->callback == cb))
+               {
+                       return pCallback;
+               }
+       }
+
+// Not found!.
+       return NULL;
+}
+
+
+CommandList *_find_command(Eina_Inlist *command_list, const char *command)
+{
+       CommandList *l;
+
+       EINA_INLIST_FOREACH(command_list, l)
+       {
+               if ( strncmp(l->command, command, MAX_COMMAND_LENGTH ) == 0 )
+               {
+                       return l;
+               }
+       }
+
+       return NULL;
+}
+
+
+static void _cleanup(_PMessageHandle pmessage)
+{
+       CommandList *pData;
+       Eina_Inlist *l2;
+
+       EINA_INLIST_FOREACH_SAFE(pmessage->command_list, l2, pData)
+       {
+               RegisteredCallback *pCallback = NULL;
+               Eina_List *l, *l_next;
+
+               EINA_LIST_FOREACH_SAFE(pData->cblist, l, l_next, pCallback)
+               {
+                       if ( pCallback->delete_me == true )
+                       {
+                               pData->cblist = eina_list_remove_list(pData->cblist, l);
+                               pCallback->delete_me = false;
+                               free(pCallback);
+                               pmessage->registered_count--;
+                       }
+               }
+
+               if ( eina_list_count(pData->cblist) == 0 )
+               {
+                       pmessage->command_list = eina_inlist_remove(pmessage->command_list, EINA_INLIST_GET(pData));
+
+                       MSG_HIGH("Remve cmd slot for %s", pData->command);
+                       free(pData);
+               }
+       }
+
+}
+
+
+void pipe_cb(void *data, void *buffer, unsigned int nbyte)
+{
+       _PMessageHandle pmessage = (_PMessageHandle)data;
+       MyData *mydata = buffer;
+
+       if ( nbyte != sizeof(MyData) )
+       {
+               MSG_ERROR("Invalid command!!. pipe=0x%08x nByte=%d", pmessage->pipe, nbyte);
+               return ;
+       }
+
+       MSG_MED("Read from pipe. Pipe=0x%08x nByte=%d Cmd=%s Param1=%d", pmessage->pipe, nbyte , mydata->command, mydata->param1 );
+
+//     dump_message(pmessage);
+
+       CommandList *pData;
+
+       pData = _find_command(pmessage->command_list, mydata->command);
+
+// Clean up deleted callback
+       if ( pData != NULL )            // Add new command
+       {
+               RegisteredCallback *pCallback = NULL;
+               Eina_List *l;
+
+               EINA_LIST_FOREACH(pData->cblist, l, pCallback)
+               {
+                       if ( pCallback->delete_me == false )
+                       {
+                       pCallback->callback(mydata->param1, mydata->param2, mydata->param3, mydata->param4, pCallback->client_data);    // Call user function
+               }
+               }
+
+               _cleanup(pmessage);
+               return;
+       }
+
+       MSG_ERROR("Unknown command. pipe=0x%08x nByte=%d [%s:%d]", pmessage->pipe, nbyte, mydata->command, mydata->param1);
+}
+
+
+MessageHandle create_message_handle()
+{
+       _PMessageHandle pmessage = (_PMessageHandle) malloc( sizeof(_MessageHandle) );
+
+       if ( pmessage == NULL )
+       {
+               MSG_FATAL("Cannot allocate memory. Size=%d", sizeof(_MessageHandle));
+               return NULL;
+       }
+
+       memset(pmessage, 0x00, sizeof(_MessageHandle) );
+
+       if ( pthread_mutex_init(&pmessage->pipe_mutex, NULL) != 0 ) // if falied,
+       {
+               PRINT_ERRNO(errno, "Mutex init error" );
+
+               free(pmessage);
+               return NULL;
+       }
+
+       pmessage->pipe = ecore_pipe_add(pipe_cb, pmessage);
+
+       if (pmessage->pipe == NULL )
+       {
+               MSG_ERROR("Failed to creating ecore pipe");
+               if ( pthread_mutex_destroy(&pmessage->pipe_mutex) != 0 )
+               {
+                       PRINT_ERRNO(errno, "Mutex destroy error" );
+                       // Go through
+               }
+
+               free(pmessage);
+               return NULL;
+       }
+
+       return (MessageHandle)pmessage;
+}
+
+bool remove_message_handle(MessageHandle handle)
+{
+       _PMessageHandle pmessage = (_PMessageHandle)handle;
+
+       // this function can be called in signal handler. so assert() cannot be used in this function
+       if (pmessage == NULL )
+       {
+               MSG_WARN("Message handle is NULL");
+               return true;
+       }
+
+       MSG_HIGH("Remove message handle. Handle=0x%08x", handle);
+       if (pmessage->pipe != NULL )
+       {
+               ecore_pipe_del(pmessage->pipe);
+               pmessage->pipe = NULL;
+       }
+
+       if ( pthread_mutex_destroy(&pmessage->pipe_mutex) != 0 )
+       {
+               PRINT_ERRNO(errno, "Mutex destroy error" );
+
+               // Go through
+       }
+
+       CommandList *pData;
+
+       EINA_INLIST_FOREACH(pmessage->command_list, pData)
+       {
+               RegisteredCallback *pCallback = NULL;
+               EINA_LIST_FREE(pData->cblist, pCallback)
+               {
+                       free(pCallback);
+                       pmessage->registered_count--;
+               }
+       }
+
+       while (pmessage->command_list)
+       {
+               Eina_Inlist *aux = pmessage->command_list;
+               pmessage->command_list = eina_inlist_remove(pmessage->command_list, pmessage->command_list);
+               free(aux);
+       }
+
+       MSG_HIGH("Registered Count=%d", pmessage->registered_count);
+
+       free(pmessage);
+
+       return true;
+}
+
+bool send_message(MessageHandle handle, const char *command,  int param1, int param2, int param3, void *param4)
+{
+       _PMessageHandle pmessage = (_PMessageHandle)handle;
+
+       if ( pthread_mutex_lock(&pmessage->pipe_mutex) != 0 )
+       {
+               PRINT_ERRNO(errno, "Mutex lock error" );
+
+               return false;
+       }
+
+       MyData data = {0,};
+
+       data.param1 = param1;
+       data.param2 = param2;
+       data.param3 = param3;
+       data.param4 = param4;
+
+       strncpy(data.command, command, MAX_COMMAND_LENGTH-1);
+
+       MSG_MED("Write to pipe. tID=0x%08x Pipe=0x%08x Cmd=%s Param1=%d", pthread_self(), pmessage->pipe, data.command, data.param1);
+
+       MSG_ASSERT(pmessage->pipe != NULL);
+
+       if ( ecore_pipe_write(pmessage->pipe, &data, sizeof(MyData)) == EINA_FALSE)
+       {
+               MSG_ERROR("Writing to pipe is failed. pipe=0x%08x size=%d", pmessage->pipe, sizeof(MyData));
+
+               if ( pthread_mutex_unlock(&pmessage->pipe_mutex) != 0 )
+               {
+                       PRINT_ERRNO(errno, "Mutex unlock error" );
+
+                       // Go through
+               }
+
+               return false;
+       }
+
+       if ( pthread_mutex_unlock(&pmessage->pipe_mutex) != 0 )
+       {
+               PRINT_ERRNO(errno, "Mutex unlock error" );
+
+               // Go through
+       }
+
+       return true;
+}
+
+bool register_message(MessageHandle handle, const char *command,  FnMessage cb, void *data)
+{
+
+       MSG_ASSERT(handle != NULL);
+       MSG_ASSERT(command != NULL);
+       MSG_ASSERT(cb != NULL);
+
+       _PMessageHandle pmessage = (_PMessageHandle)handle;
+
+       CommandList *pData;
+
+       pData = _find_command(pmessage->command_list, command);
+
+       if ( pData == NULL )            // Add new command
+       {
+               pData = (CommandList *)calloc(1, sizeof(CommandList));
+
+               strncpy(pData->command, command, MAX_COMMAND_LENGTH - 1);
+
+               pmessage->command_list = eina_inlist_append(pmessage->command_list, EINA_INLIST_GET(pData));
+
+               MSG_MED("Add new cmd slot for %s", command);
+       }
+
+// Find callback list.
+       RegisteredCallback *pCallback;
+
+       pCallback = _find_callback(pData->cblist, cb);
+
+       if ( pCallback == NULL )
+       {
+               pCallback = (RegisteredCallback *)malloc(sizeof(RegisteredCallback));
+
+               pCallback->callback = cb;
+               pCallback->client_data = data;
+               pCallback->delete_me = false;
+
+               pData->cblist = eina_list_append(pData->cblist, pCallback);
+       }
+       else
+       {
+               pCallback->delete_me = false;           // Reuse slot.
+
+               if ( pCallback->client_data != data )
+               {
+                       MSG_WARN("Already registered. CB is different. Old=0x%08x New=0x%08x", pCallback->client_data,data );
+                       pCallback->client_data = data;          // Overwirte callback data.
+
+                       return true;
+               }
+
+               MSG_ERROR("Already registered.");
+               return false;
+       }
+
+       pmessage->registered_count++;
+
+       MSG_MED("Registered command : %s cb=0x%08x", command, cb);
+
+       return true;
+}
+
+bool unregister_message(MessageHandle handle, const char *command, FnMessage cb)
+{
+       MSG_ASSERT(handle != NULL);
+       MSG_ASSERT(command != NULL);
+
+       _PMessageHandle pmessage = (_PMessageHandle)handle;
+
+       CommandList *pData;
+
+       pData = _find_command(pmessage->command_list, command);
+
+       if ( pData == NULL )
+       {
+               MSG_ERROR("Unknown command : %s cb=0x%08x", command, cb);
+               return false;
+       }
+
+       RegisteredCallback *pCallback;
+
+       pCallback = _find_callback(pData->cblist, cb);
+
+       if ( pCallback != NULL )
+       {
+               pCallback->callback =           (FnMessage)0xDEADDEAD;
+               pCallback->client_data =        (void *)0xDEADBEAF;
+               pCallback->delete_me = true;
+
+               return true;
+       }
+
+       MSG_ERROR("Unknown command : %s cb=0x%08x", command, cb);
+
+       return false;
+}
+
+
+void dump_message(MessageHandle handle)
+{
+       _PMessageHandle pmessage = (_PMessageHandle)handle;
+       CommandList *pData;
+
+       MSG_HIGH("*****************************");
+       MSG_HIGH("  Total : %d CommandList=0x%08x", pmessage->registered_count, pmessage->command_list);
+
+       EINA_INLIST_FOREACH(pmessage->command_list, pData)
+       {
+               MSG_HIGH("  Command : \"%s\" 0x%08x", pData->command, pData );
+
+               RegisteredCallback *pCallback = NULL;
+               Eina_List *l;
+
+               EINA_LIST_FOREACH(pData->cblist, l, pCallback)
+               {
+                       MSG_HIGH("    Callback=0x%08x, Data=0x%08x", pCallback->callback, pCallback->client_data);
+
+               }
+       }
+
+       MSG_HIGH("*****************************");
+
+}
+
+
+#ifdef UNIT_TEST
+
+void mycmd1(int param1, int param2, int param3, void *param4, void *client_data)
+{
+       printf("Received MyCmd1\n");
+
+       printf("param1 = %s, param2 = %s, param3 = %s, param4 = %s\n",
+               (char *)param1, (char *)param2, (char *)param3, (char *)param4);
+}
+
+void mycmd2(int param1, int param2, int param3, void *param4, void *client_data)
+{
+       printf("Received MyCmd2\n");
+}
+
+void mycmd3(int param1, int param2, int param3, void *param4, void *client_data)
+{
+       printf("Received MyCmd3\n");
+}
+
+
+Eina_Bool on_timer1(void *data)
+{
+       MessageHandle hMessage = data;
+
+       send_message(hMessage, "mycmd1", (int)"My", (int)"Name", (int)"Is", NULL);
+
+       //send_message(hMessage, "mycmd2", 0, 0, 0, NULL);
+}
+
+static Eina_Bool _keydown_event(void *data, int type, void *event)
+{
+       Ecore_Event_Key *ev = event;
+
+       printf("Key event : %s", ev->keyname);
+
+       return true;
+}
+
+int main(void)
+{
+       ecore_init();
+       ecore_event_init();
+       eina_init();
+
+       MessageHandle hMessage = create_message_handle();
+
+       register_message(hMessage, "mycmd1", mycmd1, NULL);
+       register_message(hMessage, "mycmd2", mycmd2, NULL);
+       register_message(hMessage, "mycmd3", mycmd3, NULL);
+
+       dump_message(hMessage);
+
+       unregister_message(hMessage, "mycmd3", mycmd3);
+
+       dump_message(hMessage);
+
+       ecore_timer_add(0.5, on_timer1, hMessage);
+
+       ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _keydown_event, NULL);
+
+       ecore_main_loop_begin();
+
+       remove_message_handle(hMessage);
+
+       ecore_event_shutdown();
+       ecore_shutdown();
+       eina_shutdown();
+
+       return 0;
+}
+
+#endif
+
diff --git a/common/src/ivug-util.c b/common/src/ivug-util.c
new file mode 100755 (executable)
index 0000000..abc5702
--- /dev/null
@@ -0,0 +1,353 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+
+#include "ivug-define.h"
+#include "ivug-uuid.h"
+
+#include "ivug-util.h"
+#include "ivug-debug.h"
+#include "ivug-file-info.h"
+
+#include "ivug-db.h"
+
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <math.h>
+
+#include <power.h>
+#include <string.h>
+
+#include <sys/stat.h>  // mkdir
+#include <sys/types.h> // mkdir
+
+#include <glib.h>
+
+/*
+       If filepath is web url, return TRUE.
+
+*/
+bool ivug_is_web_uri(const char* uri)
+{
+//check file url type. local , http, ftp.
+       IV_ASSERT(uri != NULL);
+
+       static const char* web_protocal_name[] =
+       {
+               "http://",
+               "https://",
+               "ftp://",
+               NULL,
+       };
+
+       int i = 0;
+       while (web_protocal_name[i] != NULL)
+       {
+               if ( strlen(uri) > strlen(web_protocal_name[i]) )
+               {
+                       if (strncmp(uri, web_protocal_name[i], strlen(web_protocal_name[i])) == 0)
+                       {
+                               return true;
+                       }
+               }
+
+               i++;
+       }
+
+       MSG_UTIL_MED("Not web uri. %s", uri);
+
+       return false;
+}
+
+
+unsigned int get_distance(int prevX, int prevY, int X, int Y)
+{
+       int dx = prevX - X;
+       int dy = prevY - Y;
+
+       return sqrt(dx*dx + dy*dy);
+}
+
+
+
+#define USE_ECORE_FILE
+
+#include <Ecore_File.h>
+
+/*
+       Remove fname file.
+       Returns true fname is not exist or removed sucessfully
+*/
+bool ivug_remove_file(const char *filepath)
+{
+       char error_msg[256];
+       if (ecore_file_exists(filepath) == EINA_FALSE)
+       {
+               MSG_UTIL_ERROR("Already removed.%s", filepath);
+               return true;
+       }
+
+#ifdef USE_ECORE_FILE
+       if ( ecore_file_unlink(filepath) == EINA_FALSE)
+       {
+               MSG_UTIL_ERROR("Cannot remove file : %s %s", filepath, strerror_r(errno, error_msg, sizeof(error_msg)) );
+               return false;
+       }
+
+       return true;
+#else
+       if ( unlink(filepath) != 0 )
+       {
+               MSG_UTIL_ERROR("Cannot remove file : %s %s", filepath, strerror_r(errno, error_msg, sizeof(error_msg)) );
+               return false;
+       }
+
+       return true;
+#endif
+}
+
+bool ivug_rename_file(const char *src, const char *dst)
+{
+       if (ecore_file_exists(src) == EINA_FALSE)
+       {
+               MSG_UTIL_ERROR("Source file is not exist : %s", src);
+               return false;
+       }
+
+       if (dst == NULL)
+       {
+               MSG_UTIL_ERROR("Destination file is NULL");
+               return false;
+       }
+
+       char error_msg[256];
+
+       if ( rename(src, dst) < 0)
+       {
+               MSG_UTIL_ERROR("Cannot rename from %s to %s : %s", src, dst, strerror_r(errno, error_msg, sizeof(error_msg)) );
+               return false;
+       }
+
+       return true;
+}
+
+bool ivug_copy_file(const char *filename, const char *dest)
+{
+#define DIR_MASK_DEFAULT 0775
+       if ( filename == NULL)
+       {
+               MSG_MAIN_ERROR("File does not existfilepath=%s", filename);
+               return false;
+       }
+
+       if(ecore_file_cp(filename, dest) == EINA_FALSE)
+       {
+               MSG_MAIN_ERROR("ecore_file_cp failed. From %s To %s", filename, dest);
+               return false;
+       }
+
+       return true;
+}
+
+
+char *
+ivug_mktemp(char* filepath, char*ext)
+{
+       ivug_retv_if(!filepath || !ext, NULL);
+
+       MSG_IVUG_HIGH("filepath %s, ext %s", filepath, ext);
+
+       char tempname[IVUG_MAX_FILE_PATH_LEN+1] = {0};
+       snprintf(tempname, sizeof(tempname), "%s_0.%s",filepath, ext);
+       int i = 1;
+
+// TODO : Will implement with another algorithm
+       while(ecore_file_exists(tempname) == EINA_TRUE )
+       {
+               snprintf(tempname, sizeof(tempname),"%s_%d.%s", filepath, i, ext);
+               i++;
+       }
+
+       MSG_IVUG_HIGH( " tempname %s, i %d", tempname, i);
+
+       return strdup(tempname);
+}
+
+
+/*
+       Check whether given filepath file exists
+
+       CAUTION : filepath cannot be NULL.
+*/
+bool ivug_is_file_exist(const char* filepath)
+{
+       IV_ASSERT(filepath != NULL);
+
+       if ( ecore_file_exists(filepath) == EINA_TRUE)
+       {
+               return true;
+       }
+
+       return false;
+}
+
+
+/*
+       Returns start pointer of filename within filepath.
+       No memory allocated in this function. so user do not free returned pointer.
+
+       CAUTION : filepath cannot be NULL.
+*/
+const char * ivug_get_filename(const char *filepath)
+{
+       if ( filepath == NULL )
+       {
+               MSG_UTIL_WARN("File path is NULL");
+               return "NULL";
+       }
+
+#ifdef USE_ECORE_FILE
+       return ecore_file_file_get(filepath);
+#else
+
+#define DIRECORY_SPLITTER '/'
+       const char*pFileName = NULL;
+
+       pFileName  =  strrchr(filepath, DIRECORY_SPLITTER);
+       pFileName = (NULL == pFileName)? "": (pFileName+1);
+
+       return pFileName;
+#endif
+
+}
+
+bool ivug_prohibit_lcd_off(void)
+{
+       MSG_UTIL_MED("START : Sleep disabled");
+       return (power_lock_state(POWER_STATE_NORMAL, 0)==0 ? true : false);
+}
+
+bool ivug_allow_lcd_off(void)
+{
+       MSG_UTIL_MED("END : Sleep disabled");
+       return (power_unlock_state(POWER_STATE_NORMAL)==0 ? true : false);
+}
+
+int ivug_atoi(const char *number)
+{
+       char *endptr = NULL;
+       long val = 0;
+
+       errno = 0;
+
+       val = strtol(number, &endptr, 10);
+
+       if((errno == ERANGE && (val == LONG_MAX || val == LONG_MIN)) || (errno != 0 && val == 0))
+       {
+               MSG_UTIL_ERROR("strtol, val = %d", val);
+               return -1;
+       }
+
+       if(endptr == number)
+       {
+               MSG_UTIL_ERROR("No digits were found, number = %s", number);
+               return -1;
+       }
+
+       return (int)val;
+}
+
+double ivug_atod(const char *number)
+{
+       char *endptr = NULL;
+       double val = 0;
+
+       errno = 0;
+
+       val = strtod(number, &endptr);
+
+       if((errno == ERANGE && (val == -HUGE_VAL || val == HUGE_VAL)) || (errno != 0 && val == 0))
+       {
+               MSG_UTIL_ERROR("strtod, val = %d", val);
+               return -1;
+       }
+
+       if(endptr == number)
+       {
+               MSG_UTIL_ERROR("No digits were found, number = %s", number);
+               return -1;
+       }
+
+       return val;
+}
+
+char * ivug_generate_file_name(const char *filepath)
+{
+       IV_ASSERT(filepath != NULL);
+
+       MSG_SETAS_HIGH("filepath %s", filepath);
+
+       char tempname[IVUG_MAX_FILE_PATH_LEN+1] = {0,};
+       char *ext = ivug_fileinfo_get_file_extension(filepath);
+       char *filename = ecore_file_strip_ext(ecore_file_file_get(filepath));
+       char *dir = ecore_file_dir_get(filepath);
+
+       int i = 0;
+
+       for(i=1; i<IVUG_MAX_FILE_PATH_LEN; i++)
+       {
+               snprintf(tempname, sizeof(tempname), "%s/%s_%d.%s", dir, filename, i, ext);
+               if(ecore_file_exists(tempname) == EINA_FALSE)
+                       break;
+       }
+       if(ext)
+       {
+               free(ext);
+       }
+       if(i == IVUG_MAX_FILE_PATH_LEN)
+       {
+               MSG_UTIL_ERROR("Cannot make file");
+               return NULL;
+       }
+
+       MSG_UTIL_HIGH( "tempname: %s", tempname);
+
+       return strdup(tempname);
+}
+
+char * ivug_strip_string(char* name)
+{
+       MSG_UTIL_HIGH("Input name: %s", name);
+       /* Check name length */
+       if (strlen(name) == 0)
+       {
+               MSG_UTIL_WARN("Inserted text is empty!");
+               return NULL;
+       }
+       MSG_UTIL_HIGH("Inserted name: %s, length: %d", name, strlen(name));
+
+       /* Removes leading and trailing whitespace */
+       g_strstrip(name);
+       if (strlen(name) == 0)
+       {
+               MSG_UTIL_WARN("name includes only space!");
+               return NULL;
+       }
+       return name;
+}
+
+
diff --git a/common/src/ivug-uuid.c b/common/src/ivug-uuid.c
new file mode 100755 (executable)
index 0000000..4c8c2b1
--- /dev/null
@@ -0,0 +1,96 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-uuid.h"
+#include <stdio.h>             // for NULL
+#include <stdlib.h>            // free
+#include <string.h>            // strdup
+
+UUID uuid_assign(UUID id)
+{
+#ifdef _USE_MEDIAINFO_STRINGID_
+       if ( id == NULL )
+               return NULL;
+
+       return strdup(id);
+#else
+       return id;
+#endif
+}
+
+
+void uuid_free(UUID id)
+{
+#ifdef _USE_MEDIAINFO_STRINGID_
+       if ( id != NULL )
+               free((void *)id);
+#endif
+}
+
+
+int uuid_compare(UUID id1, UUID id2)
+{
+#ifdef _USE_MEDIAINFO_STRINGID_
+       return strcmp(id1, id2);
+#else
+       return id1 - id2;
+#endif
+}
+
+const char *uuid_getchar(UUID id)
+{
+#ifdef _USE_MEDIAINFO_STRINGID_
+       if ( id == NULL )
+       {
+               return "NULL";
+       }
+
+       return id;
+#else
+       {
+               static char buffer[255];
+
+               sprintf(buffer, "%d", id);
+
+               return buffer;
+       }
+#endif
+
+}
+
+
+UUID uuid_getuuid(const char *szID)
+{
+       if ( szID == NULL )
+       {
+               return INVALID_UUID;
+       }
+
+#ifdef _USE_MEDIAINFO_STRINGID_
+       return strdup(szID);
+#else
+       return ivug_atoi(szID);
+#endif
+
+}
+
+bool uuid_is_valid(UUID id)
+{
+       return (id != INVALID_UUID) ? true : false;
+}
+
+
+
diff --git a/feature/CMakeLists.txt b/feature/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..690bd1e
--- /dev/null
@@ -0,0 +1,53 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(ivug_feature C CXX)
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(VERSION 0.1.0)
+
+SET(SRCS
+       src/ivug-vibration.c
+       src/ivug-ext-ug.c
+)
+
+INCLUDE_DIRECTORIES(
+       ${CMAKE_SOURCE_DIR}/include
+       ${IVUG_SOURCE_COMMON_DIR}/include
+       include
+)
+
+MESSAGE("Checking " ${PROJECT_NAME}\r)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(${PROJECT_NAME}_pkgs REQUIRED
+       evas
+       ecore
+       ecore-x
+       elementary
+       dlog
+       ui-gadget-1                                                             # Motion
+       capi-system-haptic
+       capi-system-sensor
+)
+
+FOREACH(flag ${${PROJECT_NAME}_pkgs_CFLAGS})
+       SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -Wall")
+SET(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS})
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DLOG_LVL=DBG_MSG_LVL_HIGH")
+ADD_DEFINITIONS("-DLOG_CAT=\"IV-FEATURE\"")
+
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION} )
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${${PROJECT_NAME}_pkgs_LDFLAGS}
+       ivug_common
+)
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib)
+
diff --git a/feature/include/ivug-email.h b/feature/include/ivug-email.h
new file mode 100755 (executable)
index 0000000..1b409a8
--- /dev/null
@@ -0,0 +1,50 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_EMAIL_H__
+#define __IVUG_EMAIL_H__
+
+#include <Evas.h>
+
+typedef struct
+{
+       void *email_handle;
+       Evas_Smart_Cb callback;
+       void *data;
+}email_handle_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+email_handle_t * ivug_email_create();
+
+bool ivug_email_destroy(email_handle_t *e_handle);
+
+bool ivug_email_set_message(email_handle_t *e_handle, const char *title, const char *content);
+
+bool ivug_email_set_file(email_handle_t *e_handle, const char *filepath);
+
+bool ivug_email_set_recipient(email_handle_t *e_handle, const char *address);
+
+bool ivug_email_send_message(email_handle_t *e_handle, Evas_Smart_Cb callback, void *data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //__IVUG_EMAIL_H__
+
diff --git a/feature/include/ivug-ext-ug.h b/feature/include/ivug-ext-ug.h
new file mode 100755 (executable)
index 0000000..c44839d
--- /dev/null
@@ -0,0 +1,48 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_EXT_UG_H__
+#define __IVUG_EXT_UG_H__
+
+#include <stdbool.h>
+#include <ui-gadget.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void (*ug_destroy_cb)(ui_gadget_h ug, void *data);
+typedef void (*ug_result_cb)(ui_gadget_h ug, service_h service, void *data);
+
+
+/*
+       Launch extern module.
+*/
+bool ivug_ext_launch_videoplayer_simple(const char *filepath);
+bool ivug_ext_launch_videoplayer(const char *uri);
+\r
+ui_gadget_h  ivug_ext_launch_contact(const char *uri, ug_destroy_cb func, void *data);
+\r
+
+bool ivug_ext_launch_browser(const char *uri);\r
+bool ivug_ext_launch_default(const char *uri, const char *operation, const char *pkg, void *data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //__IVUG_EXT_UG_H__
+
diff --git a/feature/include/ivug-vibration.h b/feature/include/ivug-vibration.h
new file mode 100755 (executable)
index 0000000..0523683
--- /dev/null
@@ -0,0 +1,49 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_VIBRATION_H__
+#define __IVUG_VIBRATION_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdbool.h>
+
+#define INVALID_HAPTIC_HANDLE (-1)
+#define VIBRATION_DURATION (500)               // 500 ms
+
+/*
+       If success, returns handle. otherwise -1.
+*/
+int ivug_vibration_create(void);
+
+/*
+       duration in ms
+*/
+bool ivug_vibration_play(int handle, int duration);
+
+bool ivug_vibration_stop(int handle);
+
+bool ivug_vibration_delete(int handle);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __IVUG_VIBRATION_H__
+
diff --git a/feature/src/ivug-ext-ug.c b/feature/src/ivug-ext-ug.c
new file mode 100755 (executable)
index 0000000..e8d1e4e
--- /dev/null
@@ -0,0 +1,500 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include <ui-gadget.h>
+
+#include <app.h>
+#include <Elementary.h>
+
+#include "ivug-ext-ug.h"
+#include "ivug-util.h"
+#include "ivug-debug.h"
+
+//definition
+#define CONTACT_UG_NAME                "contacts-list-efl"\r
+\r
+#define VIDEOPLAYER_PKG_NAME   "org.tizen.video-player"\r
+#define BROWSER_PKG_NAME               "org.tizen.browser"\r
+\r
+#define MIME_TYPE_LEN                  255\r
+
+typedef struct {
+       ug_destroy_cb destroy_func;
+       ug_result_cb result_func;
+       void *cb_data;
+}ext_ug_t;
+
+static bool _data_print(service_h service, const char *key, void *user_data)
+{
+       MSG_IVUG_HIGH("  %s", key);
+
+       return true;
+}
+
+static void print_service_data(service_h service)
+{
+       int ret = service_foreach_extra_data(service, _data_print, NULL);
+
+       if(SERVICE_ERROR_NONE != ret)
+       {
+               MSG_IVUG_ERROR("service_foreach_extra_data ERROR");
+       }
+}
+
+static void
+_ivug_ext_ug_layout_cb(ui_gadget_h ug, enum ug_mode mode, void *priv)
+{
+    Evas_Object *base, *win;
+
+       if (!ug ) return;
+
+    base = ug_get_layout(ug);
+    if (!base)
+    {
+       ug_destroy(ug);
+       return;
+    }
+
+    win = ug_get_window();
+
+    switch (mode)
+       {
+       case UG_MODE_FULLVIEW:
+               MSG_IMAGEVIEW_HIGH("Creating UG layout");
+               evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+               elm_win_resize_object_add(win, base);
+               evas_object_show(base);
+       break;
+    default:
+               MSG_IMAGEVIEW_ERROR("Unhandled Mode : %d", mode);
+               break;
+    }
+}
+
+
+static void
+_ivug_ext_ug_result_cb(ui_gadget_h ug, service_h result, void *priv)
+{
+       if (!ug ) return;
+
+       if (result)
+       {
+               print_service_data(result);
+       }
+
+       ext_ug_t *ug_struct = (ext_ug_t *)priv;
+
+       if(ug_struct->result_func)
+               ug_struct->result_func(ug, result, ug_struct->cb_data);
+}
+
+
+static void
+_ivug_ext_ug_destroy_cb(ui_gadget_h ug, void *priv)
+{
+       if (!ug ) return;
+
+       ext_ug_t *ug_struct = (ext_ug_t *)priv;
+
+       MSG_IMAGEVIEW_HIGH("Destroy ug");
+       ug_destroy(ug);
+
+       ug_struct->destroy_func(ug, ug_struct->cb_data);
+
+       free(ug_struct);
+}
+
+ui_gadget_h _ivug_ext_launch_ug(const char *pkgname, service_h service, ug_destroy_cb func, void *data)
+{
+       ui_gadget_h ug = NULL;
+       struct ug_cbs cbs = {0, };
+
+       ext_ug_t *ug_struct = calloc(1, sizeof(ug_struct));
+       ug_struct->result_func = NULL;
+       ug_struct->destroy_func = func;
+       ug_struct->cb_data = data;
+
+       cbs.layout_cb = _ivug_ext_ug_layout_cb;
+       cbs.result_cb = _ivug_ext_ug_result_cb;
+       cbs.destroy_cb = _ivug_ext_ug_destroy_cb;
+       cbs.priv = ug_struct;
+
+       ug = ug_create( NULL, pkgname, UG_MODE_FULLVIEW, service, &cbs );
+
+       return ug;
+}
+
+ui_gadget_h _ivug_ext_launch_ug_with_result(const char *pkgname,
+       service_h service, ug_result_cb result_func, ug_destroy_cb destroy_func, void *data)
+{
+       ui_gadget_h ug = NULL;
+       struct ug_cbs cbs = {0, };
+
+       ext_ug_t *ug_struct = calloc(1, sizeof(ug_struct));
+       ug_struct->result_func = result_func;
+       ug_struct->destroy_func = destroy_func;
+       ug_struct->cb_data = data;
+
+       cbs.layout_cb = _ivug_ext_ug_layout_cb;
+       cbs.result_cb = _ivug_ext_ug_result_cb;
+       cbs.destroy_cb = _ivug_ext_ug_destroy_cb;
+       cbs.priv = ug_struct;
+
+       ug = ug_create( NULL, pkgname, UG_MODE_FULLVIEW, service, &cbs );
+
+       return ug;
+}
+
+
+void ivug_ext_service_reply_cb(service_h request, service_h reply, service_result_e result, void *user_data)
+{
+       MSG_IMAGEVIEW_HIGH("ivug_ext_service_reply_cb");
+       switch(result)
+       {
+               case SERVICE_RESULT_SUCCEEDED:
+                       MSG_IMAGEVIEW_HIGH("SERVICE_RESULT_SUCCEEDED");
+                       break;
+               case SERVICE_RESULT_FAILED:
+                       MSG_IMAGEVIEW_HIGH("SERVICE_RESULT_FAILED");
+                       break;
+               case SERVICE_RESULT_CANCELED:
+                       MSG_IMAGEVIEW_HIGH("SERVICE_RESULT_CANCELED");
+                       break;
+               default:
+                       MSG_IMAGEVIEW_ERROR("unhandled value %d", result);
+                       break;
+       }
+}\r
+
+
+ui_gadget_h  ivug_ext_launch_contact(const char *uri, ug_destroy_cb func, void *data)
+{
+       MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
+
+       int ret = -1;
+
+       service_h handle;
+       ui_gadget_h ug = NULL;
+
+       ret = service_create(&handle);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_create failed, %d", ret);
+               return NULL;
+       }
+
+       /*ret = service_set_operation(handle, SERVICE_OPERATION_VIEW);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_operation failed, %d", ret);
+               goto MESSAGE_END;
+       }*/
+
+       ret = service_set_uri (handle, uri);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto CONTACT_END;
+       }
+
+       ret = service_add_extra_data(handle, "type", "41");
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto CONTACT_END;
+       }
+
+       ret = service_add_extra_data(handle, "ct_path", uri);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto CONTACT_END;
+       }
+
+       /*const char *pkgname = CONTACT_UG_NAME;
+
+       ret = service_set_package(handle, pkgname);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto CONTACT_END;
+       }*/
+
+       ug = _ivug_ext_launch_ug(CONTACT_UG_NAME, handle, func, data);
+
+CONTACT_END:
+       if(service_destroy(handle) != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", ret);
+               return NULL;
+       }
+
+       return (ret == SERVICE_ERROR_NONE ? ug : NULL);
+}
+\r
+bool ivug_ext_launch_videoplayer(const char *uri)
+{
+       MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
+
+       int ret = -1;
+
+       service_h handle;
+
+       ret = service_create(&handle);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_create failed, %d", ret);
+               return false;
+       }
+
+       ret = service_set_operation(handle, SERVICE_OPERATION_VIEW);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_operation failed, %d", ret);
+               goto VIDEO_PLAYER_END;
+       }
+
+       ret = service_set_uri (handle, uri);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto VIDEO_PLAYER_END;
+       }
+
+       ret = service_add_extra_data(handle, "path", uri);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto VIDEO_PLAYER_END;
+       }
+
+       ret = service_add_extra_data(handle, "launching_application", "image_viewer");
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto VIDEO_PLAYER_END;
+       }
+
+       const char *pkgname = VIDEOPLAYER_PKG_NAME;
+
+       ret = service_set_package(handle, pkgname);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto VIDEO_PLAYER_END;
+       }
+
+       ret = service_send_launch_request(handle, ivug_ext_service_reply_cb, NULL);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_send_launch_request failed, %d", ret);
+               goto VIDEO_PLAYER_END;
+       }
+
+VIDEO_PLAYER_END:
+       if(service_destroy(handle) != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", ret);
+               return false;
+       }
+
+       return (ret == SERVICE_ERROR_NONE ? true : false);
+}
+
+bool ivug_ext_launch_videoplayer_simple(const char *uri)
+{
+       MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
+
+       int ret = -1;
+
+       service_h handle;
+
+       ret = service_create(&handle);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_create failed, %d", ret);
+               return false;
+       }
+
+       ret = service_set_operation(handle, SERVICE_OPERATION_VIEW);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_operation failed, %d", ret);
+               goto VIDEO_PLAYER_SIMPLE_END;
+       }
+
+       ret = service_set_uri (handle, uri);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto VIDEO_PLAYER_SIMPLE_END;
+       }
+
+       ret = service_add_extra_data(handle, "path", uri);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto VIDEO_PLAYER_SIMPLE_END;
+       }
+
+       // Camera -> Image Viewer -> Video player, In this case, launching_application bundle's value should be "light_play_view"
+       ret = service_add_extra_data(handle, "launching_application", "light_play_view");
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto VIDEO_PLAYER_SIMPLE_END;
+       }
+
+       const char *pkgname = VIDEOPLAYER_PKG_NAME;
+
+       ret = service_set_package(handle, pkgname);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto VIDEO_PLAYER_SIMPLE_END;
+       }
+
+       ret = service_send_launch_request(handle, ivug_ext_service_reply_cb, NULL);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_send_launch_request failed, %d", ret);
+               goto VIDEO_PLAYER_SIMPLE_END;
+       }
+
+VIDEO_PLAYER_SIMPLE_END:
+       if(service_destroy(handle) != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", ret);
+               return false;
+       }
+
+       return (ret == SERVICE_ERROR_NONE ? true : false);
+}
+\r
+\r
+
+bool ivug_ext_launch_browser(const char *uri)
+{
+       MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
+
+       int ret = -1;
+
+       service_h handle;
+
+       ret = service_create(&handle);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_create failed, %d", ret);
+               return false;
+       }
+
+       ret = service_set_operation(handle, SERVICE_OPERATION_VIEW);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_operation failed, %d", ret);
+               goto BROWSER_END;
+       }
+
+       ret = service_add_extra_data(handle, "url", uri);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto BROWSER_END;
+       }
+
+       const char *pkgname = BROWSER_PKG_NAME;
+
+       ret = service_set_package(handle, pkgname);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto BROWSER_END;
+       }
+
+       ret = service_send_launch_request(handle, ivug_ext_service_reply_cb, NULL);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_send_launch_request failed, %d", ret);
+               goto BROWSER_END;
+       }
+
+BROWSER_END:
+       if(service_destroy(handle) != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", ret);
+               return false;
+       }
+
+       return (ret == SERVICE_ERROR_NONE ? true : false);
+}
+
+\r
+
+bool ivug_ext_launch_default(const char *uri, const char *operation, const char *pkg, void *data)
+{
+       MSG_IMAGEVIEW_HIGH("%s.", __func__);
+
+       int ret = -1;
+       int destroy_ret = -1;
+
+       service_h handle;
+
+       ret = service_create(&handle);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_create failed, %d", ret);
+               return NULL;
+       }
+
+       ret = service_set_operation(handle, operation);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_operation %s failed, %d", operation, ret);
+               goto LAUNCH_END;
+       }
+
+       ret = service_set_uri (handle, uri);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri %s failed, %d", uri, ret);
+               goto LAUNCH_END;
+       }
+
+       ret = service_set_package(handle, pkg);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_package %s failed, %d", pkg, ret);
+               goto LAUNCH_END;
+       }
+
+       ret = service_send_launch_request(handle, ivug_ext_service_reply_cb, NULL);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_send_launch_request failed, %d", ret);
+               goto LAUNCH_END;
+       }
+
+LAUNCH_END:
+       destroy_ret = service_destroy(handle);
+       if(destroy_ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", destroy_ret);
+               return NULL;
+       }
+
+       return (ret == SERVICE_ERROR_NONE ? true : false);
+}
+
diff --git a/feature/src/ivug-vibration.c b/feature/src/ivug-vibration.c
new file mode 100755 (executable)
index 0000000..8ffcf4d
--- /dev/null
@@ -0,0 +1,118 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-vibration.h"
+#include "ivug-debug.h"
+
+#include <stdio.h>
+#include <haptic.h>
+
+static const char *_conver_error(int err)
+{
+       switch(err)
+       {
+               case HAPTIC_ERROR_NONE:
+                       return "Successful";
+               case HAPTIC_ERROR_INVALID_PARAMETER:
+                       return "Invalid parameter";
+               case HAPTIC_ERROR_NO_SUCH_FILE:
+                       return "No such file";
+               case HAPTIC_ERROR_NOT_SUPPORTED_FORMAT:
+                       return "Not supported file format";
+               case HAPTIC_ERROR_NOT_INITIALIZED:
+                       return \r"Not initialized";
+               case HAPTIC_ERROR_OPERATION_FAILED:
+                       return "Operation failed";
+               default:
+               {
+                       static char error[128];
+                       sprintf(error, "Unknow Error : %d(0x%08x)", err, err);
+                       return error;
+               }
+       }
+
+       return NULL;
+
+}
+
+
+int ivug_vibration_create()
+{
+       int ret = HAPTIC_ERROR_NONE;
+
+       ret = haptic_initialize();
+
+       if (ret != HAPTIC_ERROR_NONE)
+       {
+               MSG_UTIL_ERROR("device_haptic_open failed. %s", _conver_error(ret));
+               return -1;
+       }
+
+       int vib_index = 0;              // Means all vibratior.
+
+       return vib_index;
+}
+
+bool ivug_vibration_play(int handle, int duration)
+{
+       int ret = HAPTIC_ERROR_NONE;
+
+       MSG_UTIL_HIGH("Vibration start. Handle=%d duration=%f", handle, duration);
+
+       ret = haptic_vibrate_monotone(handle, duration, HAPTIC_LEVEL_3);
+
+       if (ret != HAPTIC_ERROR_NONE)
+       {
+               MSG_UTIL_ERROR("haptic_vibrate_monotone error Handle=%d. %s", handle, _conver_error(ret));
+               return false;
+       }
+
+       return true;
+}
+
+bool ivug_vibration_stop(int handle)
+{
+       MSG_UTIL_HIGH("Vibration stop. Handle=%d", handle);
+
+       int ret = HAPTIC_ERROR_NONE;
+
+       ret = haptic_stop_device(handle);
+       if (ret != 0)
+       {
+               MSG_UTIL_ERROR("haptic_stop_device failed. %s",  _conver_error(ret));
+       }
+
+       return true;
+}
+
+
+bool ivug_vibration_delete(int handle)
+{
+       MSG_UTIL_HIGH("Vibration deinit. Handle=%d", handle);
+
+       int ret = HAPTIC_ERROR_NONE;
+
+       ret = haptic_deinitialize();
+
+       if (ret != HAPTIC_ERROR_NONE)
+       {
+               MSG_UTIL_ERROR("device_haptic_close failed. %s", _conver_error(ret));
+       }
+
+       return true;
+}
+
+
diff --git a/include/ivug-datatypes.h b/include/ivug-datatypes.h
new file mode 100755 (executable)
index 0000000..4348b5e
--- /dev/null
@@ -0,0 +1,61 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_DATATYPES_H__
+#define __IVUG_DATATYPES_H__
+
+#include "ivug-define.h"
+#include <stdbool.h>
+
+#ifdef _USE_MEDIAINFO_STRINGID_
+       typedef const char *UUID;
+
+       #define INVALID_UUID ((UUID)NULL)
+#else
+       typedef int UUID;
+
+       #define INVALID_UUID ((UUID)-1)
+#endif
+
+typedef enum {
+       IVUG_VIEW_BY_INVAILD = 0x00,
+       IVUG_VIEW_BY_FILE,
+       IVUG_VIEW_BY_ALL,
+       IVUG_VIEW_BY_FAVORITES,
+       IVUG_VIEW_BY_FOLDER,
+       IVUG_VIEW_BY_PLACES,
+       IVUG_VIEW_BY_CONTACT_ID,
+} ivug_view_by;
+
+typedef enum {
+       IVUG_MEDIA_TYPE_ALL = 0x00, //default value
+       IVUG_MEDIA_TYPE_IMAGE,
+       IVUG_MEDIA_TYPE_VIDEO,
+       IVUG_MEDIA_TYPE_MAX,
+} ivug_media_type;
+
+
+typedef enum {
+       IVUG_MEDIA_SORT_NONE = 0x00,  /**< No sort */
+       IVUG_MEDIA_ASC_BY_NAME,         /**< Ascending sort as file name */
+       IVUG_MEDIA_DESC_BY_NAME,        /**< Descending sort as file name */
+       IVUG_MEDIA_ASC_BY_DATE,         /**< Ascending sort as created date */
+       IVUG_MEDIA_DESC_BY_DATE,        /**< Descending sort as created date */
+} ivug_sort_type;
+
+
+#endif                 // __IVUG_DATATYPES_H__
+
diff --git a/include/ivug-define.h b/include/ivug-define.h
new file mode 100755 (executable)
index 0000000..6c706ea
--- /dev/null
@@ -0,0 +1,51 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+/*
+       ONLY system widely used definition.
+*/
+
+#pragma once
+
+/*
+# use string UUID
+ADD_DEFINITIONS("-D_USE_MEDIAINFO_STRINGID_")
+*/
+#define _USE_MEDIAINFO_STRINGID_
+
+#define USE_RESCAN_FILE_PATH_AT_LIST\r
+
+#define IVUG_MAX_FILE_PATH_LEN (4096)
+
+#define DIR_MASK_DEFAULT 0775
+
+#define USE_CUSTOM_STYLE
+
+/*\r
+       Time analysis data will be stored as file
+*/
+#define TA_SAVETO_FILE
+
+// Temp. will be removed.
+#ifdef TARGET\r
+// todo about arm\r
+#endif
+
+#define USE_NEW_DB_API
+
+#define ZOOM_LEVEL_STEP (0.7)\r
+#define ZOOM_LEVEL_MAX (4)\r
+
diff --git a/main/layout/crop-view/T06_controlbar_bg.png b/main/layout/crop-view/T06_controlbar_bg.png
new file mode 100755 (executable)
index 0000000..864585c
Binary files /dev/null and b/main/layout/crop-view/T06_controlbar_bg.png differ
diff --git a/main/layout/gengrid/00_winset_thumbs_bg.png b/main/layout/gengrid/00_winset_thumbs_bg.png
new file mode 100755 (executable)
index 0000000..6226c90
Binary files /dev/null and b/main/layout/gengrid/00_winset_thumbs_bg.png differ
diff --git a/main/layout/gengrid/00_winset_thumbs_focus_bg.png b/main/layout/gengrid/00_winset_thumbs_focus_bg.png
new file mode 100755 (executable)
index 0000000..3f0e9c4
Binary files /dev/null and b/main/layout/gengrid/00_winset_thumbs_focus_bg.png differ
diff --git a/main/layout/icons/T01_btn_paused.png b/main/layout/icons/T01_btn_paused.png
new file mode 100755 (executable)
index 0000000..dae1d84
Binary files /dev/null and b/main/layout/icons/T01_btn_paused.png differ
diff --git a/main/layout/images/theme/blue/00_winset_control_toolbar_bg.png b/main/layout/images/theme/blue/00_winset_control_toolbar_bg.png
new file mode 100755 (executable)
index 0000000..33148b2
Binary files /dev/null and b/main/layout/images/theme/blue/00_winset_control_toolbar_bg.png differ
diff --git a/main/layout/images/theme/blue/00_winset_control_top_arrow.png b/main/layout/images/theme/blue/00_winset_control_top_arrow.png
new file mode 100755 (executable)
index 0000000..3f2ee50
Binary files /dev/null and b/main/layout/images/theme/blue/00_winset_control_top_arrow.png differ
diff --git a/main/layout/images/theme/blue/00_winset_control_top_bg.png b/main/layout/images/theme/blue/00_winset_control_top_bg.png
new file mode 100755 (executable)
index 0000000..10a24a7
Binary files /dev/null and b/main/layout/images/theme/blue/00_winset_control_top_bg.png differ
diff --git a/main/layout/images/theme/blue/00_winset_title_bg.png b/main/layout/images/theme/blue/00_winset_title_bg.png
new file mode 100755 (executable)
index 0000000..edaec4a
Binary files /dev/null and b/main/layout/images/theme/blue/00_winset_title_bg.png differ
diff --git a/main/layout/images/theme/blue/00_winset_title_line.png b/main/layout/images/theme/blue/00_winset_title_line.png
new file mode 100755 (executable)
index 0000000..62c098e
Binary files /dev/null and b/main/layout/images/theme/blue/00_winset_title_line.png differ
diff --git a/main/layout/images/theme/blue/T01_Edit Field_clear.png b/main/layout/images/theme/blue/T01_Edit Field_clear.png
new file mode 100755 (executable)
index 0000000..8335151
Binary files /dev/null and b/main/layout/images/theme/blue/T01_Edit Field_clear.png differ
diff --git a/main/layout/images/theme/blue/T01_title_btn.png b/main/layout/images/theme/blue/T01_title_btn.png
new file mode 100755 (executable)
index 0000000..20c31f1
Binary files /dev/null and b/main/layout/images/theme/blue/T01_title_btn.png differ
diff --git a/main/layout/images/theme/blue/T01_title_btn_press.png b/main/layout/images/theme/blue/T01_title_btn_press.png
new file mode 100755 (executable)
index 0000000..49861ed
Binary files /dev/null and b/main/layout/images/theme/blue/T01_title_btn_press.png differ
diff --git a/main/layout/images/theme/white/00_winset_control_toolbar_bg.png b/main/layout/images/theme/white/00_winset_control_toolbar_bg.png
new file mode 100755 (executable)
index 0000000..c46882d
Binary files /dev/null and b/main/layout/images/theme/white/00_winset_control_toolbar_bg.png differ
diff --git a/main/layout/images/theme/white/00_winset_control_top_arrow.png b/main/layout/images/theme/white/00_winset_control_top_arrow.png
new file mode 100755 (executable)
index 0000000..508c2c8
Binary files /dev/null and b/main/layout/images/theme/white/00_winset_control_top_arrow.png differ
diff --git a/main/layout/images/theme/white/00_winset_control_top_bg.png b/main/layout/images/theme/white/00_winset_control_top_bg.png
new file mode 100755 (executable)
index 0000000..d92230a
Binary files /dev/null and b/main/layout/images/theme/white/00_winset_control_top_bg.png differ
diff --git a/main/layout/images/theme/white/00_winset_title_bg.png b/main/layout/images/theme/white/00_winset_title_bg.png
new file mode 100755 (executable)
index 0000000..2e7fc72
Binary files /dev/null and b/main/layout/images/theme/white/00_winset_title_bg.png differ
diff --git a/main/layout/images/theme/white/00_winset_title_line.png b/main/layout/images/theme/white/00_winset_title_line.png
new file mode 100755 (executable)
index 0000000..e287978
Binary files /dev/null and b/main/layout/images/theme/white/00_winset_title_line.png differ
diff --git a/main/layout/images/theme/white/T01_Edit Field_clear.png b/main/layout/images/theme/white/T01_Edit Field_clear.png
new file mode 100755 (executable)
index 0000000..8335151
Binary files /dev/null and b/main/layout/images/theme/white/T01_Edit Field_clear.png differ
diff --git a/main/layout/images/theme/white/T01_title_btn.png b/main/layout/images/theme/white/T01_title_btn.png
new file mode 100755 (executable)
index 0000000..20c31f1
Binary files /dev/null and b/main/layout/images/theme/white/T01_title_btn.png differ
diff --git a/main/layout/images/theme/white/T01_title_btn_press.png b/main/layout/images/theme/white/T01_title_btn_press.png
new file mode 100755 (executable)
index 0000000..49861ed
Binary files /dev/null and b/main/layout/images/theme/white/T01_title_btn_press.png differ
diff --git a/main/layout/ivug-crop-view.edc b/main/layout/ivug-crop-view.edc
new file mode 100755 (executable)
index 0000000..d368067
--- /dev/null
@@ -0,0 +1,278 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#define CROP_VIEW_CONTROLBAR_BG "T06_controlbar_bg.png"
+
+
+#define PADDING_VISIBILITY 0
+
+#define MENU_VISIBLE 1
+#define MENU_INVISIBLE 0
+
+collections {
+   group {
+               name: "crop_view";
+               images {
+                       image: CROP_VIEW_CONTROLBAR_BG COMP;
+               }
+
+               /*script {
+                       public menu_state = MENU_VISIBLE;
+               }*/
+               parts{
+                       part {
+                               name: "bg";
+                               type: RECT;
+                               scale:1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       color: 0 0 0 255;
+                                       rel1.relative: 0.0 0.0;
+                                       rel2.relative: 1.0 1.0;
+                               }
+                       }
+
+                       part{
+                               name: "photocam";
+                               type: SWALLOW;
+                               mouse_events: 1;
+                               repeat_events: 0;
+                               scale: 1; //allow scaling
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0 0; to:bg; }
+                                       rel2 { relative: 1 1; to:bg; }
+                               }
+                        }
+#if 0
+                        part{
+                                name: "thumbnail";
+                                type: SWALLOW;
+                                scale: 1; //allow scaling
+                                description {
+                                        state: "default" 0.0;
+                                        align: 0.5 0.5;
+                                        rel1 { relative: 0 0; to:bg; }
+                                        rel2 { relative: 1 1; to:bg; }
+                                }
+                       }
+#endif
+                       part{
+                               name: "scissorbox";
+                               type: SWALLOW;
+                               mouse_events: 1;
+                               repeat_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       rel1 { relative: 0 0; to:bg; }
+                                       rel2 { relative: 1 1; to:bg; }
+                               }
+                        }
+
+                       part {
+                               name: "event";
+                               type: RECT;
+                               repeat_events: 1;
+                               mouse_events: 1;
+                               scale:1;
+                               description {
+                                       state: "default" 0.0;
+                                       color: 0 0 0 0;
+                                       visible: 1;
+                                       rel1.relative: 0.0 0.0;
+                                       rel2.relative: 1.0 1.0;
+                               }
+                       }
+
+                       part {
+                               name: "clipper";
+                               type: RECT;
+                               scale:1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible:1;
+                                       color: 255 255 255 255;
+                               }
+                               description {
+                                       state: "hide" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 0;
+                               };
+
+                       }
+
+                        part {
+                               name: "controlbar.bg";
+                               type: IMAGE;
+                               mouse_events: 0;
+                               scale: 1;
+                               clip_to: "clipper";
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       rel1 { relative: 0.0 1.0;   }
+                                       rel2 { relative: 1.0 1.0;   }
+                                       align: 0.5 1.0;
+                                       min: 0 126;
+
+                                       image {
+                                               normal: CROP_VIEW_CONTROLBAR_BG;
+                                       }
+
+                               }
+
+                        }
+
+                       part {
+                               name: "padding.left.13";
+                               type: RECT;
+                               scale:1;
+                               description {
+                                       state: "default" 0.0;
+                                       color: 128 0 0 255;
+                                       visible: PADDING_VISIBILITY;
+                                       min: 13 0;
+                                       fixed: 1 0;
+                                       align: 0.0 0.5;
+                                       rel1.relative: 0.0 0.0;
+                                       rel2.relative: 0.0 1.0;
+                               }
+                       }
+
+                       part {
+                               name: "padding.right.13";
+                               type: RECT;
+                               scale:1;
+                               description {
+                                       state: "default" 0.0;
+                                       color: 0 255 0 255;
+                                       visible: PADDING_VISIBILITY;
+                                       min: 13 0;
+                                       fixed: 1 0;
+                                       align: 1.0 0.5;
+                                       rel1.relative: 1.0 0.0;
+                                       rel2.relative: 1.0 1.0;
+                               }
+                       }
+
+                       part {
+                               name: "padding.bottom.20";
+                               type: RECT;
+                               scale:1;
+                               description {
+                                       state: "default" 0.0;
+                                       color: 0 255 255 255;
+                                       visible: PADDING_VISIBILITY;
+                                       min: 0 20;
+                                       fixed: 0 1;
+                                       align: 0.5 1.0;
+                                       rel1.relative: 0.0 1.0;
+                                       rel2.relative: 1.0 1.0;
+                               }
+                       }
+
+                       part {
+                               name: "btn.save";
+                               type: SWALLOW;
+                               scale:1;
+                               clip_to: "clipper";
+                               description {
+                                       state: "default" 0.0;
+                                       color: 0 0 255 255;
+                                       visible: 1;
+                                       align: 0.0 1.0;
+                                       min: 118 74;
+                                       fixed: 1 1;
+                                       rel1 {
+                                               relative: 1.0 0.0;
+                                               to_x: "padding.left.13";
+                                               to_y: "padding.bottom.20";
+                                       }
+                                       rel2 {
+                                               relative: 1.0 0.0;
+                                               to_x: "padding.left.13";
+                                               to_y: "padding.bottom.20";
+                                       }
+                               }
+                       }
+
+                       part {
+                               name: "btn.cancel";
+                               type: SWALLOW;
+                               scale:1;
+                               clip_to: "clipper";
+                               description {
+                                       state: "default" 0.0;
+                                       color: 0 0 255 255;
+                                       visible: 1;
+                                       align: 1.0 1.0;
+                                       min: 118 74;
+                                       fixed: 1 1;
+                                       rel1 {
+                                               relative: 0.0 0.0;
+                                               to_x: "padding.right.13";
+                                               to_y: "padding.bottom.20";
+                                       }
+                                       rel2 {
+                                               relative: 0.0 0.0;
+                                               to_x: "padding.right.13";
+                                               to_y: "padding.bottom.20";
+                                       }
+                               }
+                       }
+               }
+
+               programs {
+                       /*program {
+                               name: "menu.show";
+                               source: "event";
+                               signal: "mouse,clicked,1";
+                               script {
+                                       if (get_int(menu_state) == MENU_VISIBLE)
+                                       {
+                                               set_state(PART:"clipper", "hide", 0.0);
+                                               set_int(menu_state, MENU_INVISIBLE );
+                                       }
+                                       else
+                                       {
+                                               set_state(PART:"clipper", "default", 0.0);
+                                               set_int(menu_state, MENU_VISIBLE );
+                                       }
+                               }
+                       }*/
+
+                       program {
+                               name: "hide_menu";
+                               signal: "elm,state,hide";
+                               source: "event";
+                               action: STATE_SET "hide" 0.0;
+                               target: "clipper";
+                       }
+
+                       program {
+                               name: "show_menu";
+                               signal: "elm,state,show";
+                               source: "event";
+                               action: STATE_SET "default" 0.0;
+                               target: "clipper";
+                       }
+               }
+
+       }
+}
diff --git a/main/layout/ivug-gengrid.edc b/main/layout/ivug-gengrid.edc
new file mode 100755 (executable)
index 0000000..ef9d56e
--- /dev/null
@@ -0,0 +1,211 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include "ivug-theme.edc"\r
+\r
+\r
+#define MARGIN (0)\r
+#define MARGIN_TOP (0)\r
+#define MARGIN_BOTTOM (0)\r
+\r
+collections {\r
+\r
+   styles {\r
+      style { name: "gengrid_textblock_style";\r
+         base: "font=SLP:style=Medium font_size="GENGRID_FONT_STYLE_18_INC" color="GENGRID_PART_TEXTBLOCK_STYLE_COLOR_INC" align=center wrap=mixed ellipsis=1.0 text_class=slp_medium";\r
+         tag: "br" "\n";\r
+         tag: "ps" "ps";\r
+         tag: "tab" "\t";\r
+         tag: "b" "+ font=SLP:style=Bold";\r
+      }\r
+   }\r
+\r
+   group { name: "elm/gengrid/item/thumblist/default";\r
+      data.item: "contents" "elm.swallow.icon elm.swallow.end";\r
+      images {\r
+         image : "00_winset_thumbs_bg.png" COMP;\r
+         image : "00_winset_thumbs_focus_bg.png" COMP;\r
+      }\r
+      parts {\r
+         part { name: "bg";\r
+            type: RECT;\r
+            description { state: "default" 0.0;\r
+               color: GENGRID_PART_BG_COLOR_INC;\r
+            }\r
+         }\r
+         part { name: "left_top_padding";\r
+            type: RECT;\r
+            scale : 1;\r
+            description { state: "default" 0.0;\r
+               min: MARGIN MARGIN_TOP;\r
+               align: 0.0 0.0;\r
+               visible: 0;\r
+               rel1.to: "bg";\r
+               rel2 {\r
+                  relative: 0.0 0.0;\r
+                  to: "bg";\r
+               }\r
+            }\r
+         }\r
+         part { name: "right_bottom_padding";\r
+            type: RECT;\r
+            scale: 1;\r
+            description { state: "default" 0.0;\r
+               min: MARGIN MARGIN_BOTTOM;\r
+               align: 1.0 1.0;\r
+               visible: 0;\r
+               rel1 {\r
+                  relative: 1.0 1.0;\r
+                  to: "bg";\r
+               }\r
+               rel2.to: "bg";\r
+            }\r
+         }\r
+\r
+         part { name: "item_real_bg";\r
+            type: RECT;\r
+            description { state: "default" 0.0;\r
+               color: 0 0 0 255;\r
+               rel1 {\r
+                  relative: 1.0 1.0;\r
+                  to: "left_top_padding";\r
+               }\r
+               rel2 {\r
+                  relative: 0.0 0.0;\r
+                  to: "right_bottom_padding";\r
+               }\r
+            }\r
+         }\r
+         part { name: "item_real_bg_left_top_padding";\r
+            type: RECT;\r
+            scale : 1;\r
+            description { state: "default" 0.0;\r
+               min: 2 2;\r
+               align: 0.0 0.0;\r
+               visible: 0;\r
+               rel1.to: "item_real_bg";\r
+               rel2 {\r
+                  relative: 0.0 0.0;\r
+                  to: "item_real_bg";\r
+               }\r
+            }\r
+         }\r
+         part { name: "item_real_bg_right_bottom_padding";\r
+            type: RECT;\r
+            scale : 1;\r
+            description { state: "default" 0.0;\r
+               min: 2 2;\r
+               align: 1.0 1.0;\r
+               visible: 0;\r
+               rel1 {\r
+                  relative: 1.0 1.0;\r
+                  to: "item_real_bg";\r
+               }\r
+               rel2.to: "item_real_bg";\r
+            }\r
+         }\r
+\r
+         part { name: "elm.swallow.icon";\r
+            type: SWALLOW;\r
+            description { state: "default" 0.0;\r
+               rel1 {\r
+                  relative: 1.0 1.0;\r
+                  to: "item_real_bg_left_top_padding";\r
+               }\r
+               rel2 {\r
+                  relative: 0.0 0.0;\r
+                  to: "item_real_bg_right_bottom_padding";\r
+               }\r
+            }\r
+         }\r
+\r
+         part { name: "elm.swallow.end";\r
+            type: SWALLOW;\r
+            description { state: "default" 0.0;\r
+               rel1.to: "elm.swallow.icon";\r
+               rel2.to: "elm.swallow.icon";\r
+            }\r
+         }\r
+         part { name: "focus_bg_left_top_padding";\r
+            type: RECT;\r
+            scale : 1;\r
+            description { state: "default" 0.0;\r
+               min: MARGIN MARGIN_TOP;\r
+               align: 0.0 0.0;\r
+               visible: 0;\r
+               rel1.to: "bg";\r
+               rel2 {\r
+                  relative: 0.0 0.0;\r
+                  to: "bg";\r
+               }\r
+            }\r
+         }\r
+         part { name: "focus_bg_right_bottom_padding";\r
+            type: RECT;\r
+            scale: 1;\r
+            description { state: "default" 0.0;\r
+               min: MARGIN MARGIN_BOTTOM;\r
+               align: 1.0 1.0;\r
+               visible: 0;\r
+               rel1 {\r
+                  relative: 1.0 1.0;\r
+                  to: "bg";\r
+               }\r
+               rel2.to: "bg";\r
+            }\r
+         }\r
+         part { name: "focus_bg";\r
+            type: IMAGE;\r
+            description { state: "default" 0.0;\r
+               visible: 0;\r
+               rel1 {\r
+                  relative: 1.0 1.0;\r
+                  to: "focus_bg_left_top_padding";\r
+               }\r
+               rel2 {\r
+                  relative: 0.0 0.0;\r
+                  to: "focus_bg_right_bottom_padding";\r
+               }\r
+               image.normal: "00_winset_thumbs_focus_bg.png";\r
+            }\r
+            description { state: "enabled" 0.0;\r
+               inherit: "default" 0.0;\r
+               visible: 1;\r
+            }\r
+         }\r
+      }\r
+#if 1\r
+      programs {\r
+         program { name: "go_mouse_down";\r
+                signal:  "elm,state,selected";\r
+                source:  "app";\r
+            action: STATE_SET "enabled" 0.0;\r
+            target: "focus_bg";\r
+            transition: ACCELERATE 0.1;\r
+         }\r
+         program { name: "go_mouse_up";\r
+                signal:  "elm,state,unselected";\r
+                source:  "app";\r
+            action: STATE_SET "default" 0.0;\r
+            target: "focus_bg";\r
+            transition: DECELERATE 0.1;\r
+         }\r
+#endif\r
+\r
+   }\r
+\r
+}\r
+\r
diff --git a/main/layout/ivug-name-view.edc b/main/layout/ivug-name-view.edc
new file mode 100755 (executable)
index 0000000..3bc8b91
--- /dev/null
@@ -0,0 +1,96 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#define NAME_ENTRY_MIN_W_INC           1280
+#define NAME_ENTRY_BG_MIN_H_INC                112
+#define NAME_ENTRY_MIN_H_INC           48
+
+#define NAME_ENTRY_BOTTOM_LINE_COLOR_INC 82 82 82 255
+
+#define NAME_ENTRY_PART_OFFSET         16
+
+collections {
+
+  group {
+               name: "name_view";
+               parts{
+                       part {
+                               name: "name_view.swallow.bg";
+                               type: SWALLOW;
+                               mouse_events: 1;
+                               scale:1;
+
+                               description {
+                                       state: "default" 0.0;
+                                       rel1.relative: 0.0 0.0;
+                                       rel2.relative: 1.0 1.0;
+                               }
+                       }
+                        part {
+                               name: "bg_entry";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale:1;
+
+                               description {
+                                       state: "default" 0.0;
+                                       min: 0 NAME_ENTRY_BG_MIN_H_INC;
+                                       max: NAME_ENTRY_MIN_W_INC NAME_ENTRY_BG_MIN_H_INC;
+                                       fixed:1 1;
+                                       rel1 { relative: 0.0  0.0; to: "name_view.swallow.bg";}
+                                       rel2 { relative: 1.0  0.0; to: "name_view.swallow.bg"; offset: 0 64;}
+                                       color: 0 0 0 0; //Fixme, set bg transparent.
+                                       //color: 255 255 255 255;
+                                       align: 0 0;
+                               }
+                       }
+                       part {
+                               name: "bottom_line";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale:1;
+
+                               description {
+                                       min : 0 1; //minimum size for gap filler
+                                       fixed: 1 1;
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 1.0; to: "bg_entry";}
+                                       rel2 { relative: 1.0 1.0; to: "bg_entry"; offset: 0 1;}
+                                       color: NAME_ENTRY_BOTTOM_LINE_COLOR_INC;
+                                       align: 0 0;
+                               }
+                       }
+                       part {
+                               name: "entry_part";
+                               type: SWALLOW;
+                               mouse_events: 1;
+                               scale:1;
+
+                               description {
+                                       min : 0 NAME_ENTRY_MIN_H_INC; //minimum size for gap filler
+                                       max: NAME_ENTRY_MIN_W_INC NAME_ENTRY_MIN_H_INC;
+                                       fixed: 1 1;
+                                       align: 0.0 0.5;
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 0.0; to: "bg_entry"; offset: NAME_ENTRY_PART_OFFSET 0;}
+                                       rel2 { relative: 1.0 1.0; to: "bg_entry"; offset: -NAME_ENTRY_PART_OFFSET 0;}
+                                       align: 0 0;
+                               }
+                       }
+               }
+       }
+}
+
diff --git a/main/layout/ivug-popup.edc b/main/layout/ivug-popup.edc
new file mode 100755 (executable)
index 0000000..15649a6
--- /dev/null
@@ -0,0 +1,172 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+/* referenced by elm_demo "popup_checkview" in popup_custom.edc */\r
+collections {\r
+       group { name: "popup_checkview";\r
+               parts{\r
+                       part { name: "background";\r
+                               type: RECT;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       color: 0 0 0 0;\r
+                                       visible: 1;\r
+                                       rel1 { relative: 0.0 0.0; }\r
+                                       rel2 { relative: 1.0 1.0; }\r
+                               }\r
+                       }\r
+\r
+                       part { name: "pad_t";\r
+                               scale : 1;\r
+                               mouse_events: 0;\r
+                               repeat_events: 1;\r
+                               description { state: "default" 0.0;\r
+                                       align: 0.5 0.0;\r
+                                       min: 0 14;\r
+                                       fixed: 0 1;\r
+                                       rel1 {\r
+                                               relative: 1.0 0.0;to_x: "pad_l";\r
+                                       }\r
+                                       rel2 {\r
+                                               relative: 0.0 0.0;to_x: "pad_r";\r
+                                       }\r
+                               }\r
+                       }\r
+                       part { name: "pad_l";\r
+                               scale: 1;\r
+                               description { state: "default" 0.0;\r
+                                       min : 10 0;\r
+                                       fixed: 1 0;\r
+                                       rel1 {\r
+                                          relative: 0.0 0.0;\r
+                                       }\r
+                                       rel2 {\r
+                                          relative: 0.0 1.0;\r
+                                       }\r
+                                       align: 0.0 0.0;\r
+                               }\r
+                       }\r
+                       part { name: "pad_r";\r
+                               scale: 1;\r
+                               description { state: "default" 0.0;\r
+                                       min : 10 0;\r
+                                       fixed: 1 0;\r
+                                       rel1 {\r
+                                          relative: 1.0 0.0;\r
+                                       }\r
+                                       rel2 {\r
+                                          relative: 1.0 1.0;\r
+                                       }\r
+                                       align: 1.0 0.0;\r
+                               }\r
+                       }\r
+                       part{ name:"elm.swallow.content";\r
+                               type: SWALLOW;\r
+                               scale : 1;\r
+                               description { state: "default" 0.0;\r
+                                       min: 380 0;\r
+                                       align: 0.5 0.5;\r
+                                       fixed: 1 0;\r
+                                       rel1 {\r
+                                          relative: 0.5 1.0;\r
+                                          to: "pad_t";\r
+                                       }\r
+                                       rel2 {\r
+                                          relative: 0.5 0.0;\r
+                                          to: "pad_b";\r
+                                       }\r
+                               }\r
+                       }\r
+                       part { name: "pad_b";\r
+                               scale : 1;\r
+                               mouse_events: 0;\r
+                               repeat_events: 1;\r
+                               description { state: "default" 0.0;\r
+                                       align: 0.5 1.0;\r
+                                       min: 0 100;\r
+                                       fixed: 0 1;\r
+                                       rel1 {\r
+                                          relative: 1.0 1.0;to_x: "pad_l";\r
+                                       }\r
+                                       rel2 {\r
+                                          relative: 0.0 1.0;to_x: "pad_r";\r
+                                       }\r
+                               }\r
+                       }\r
+                       part { name: "elm.swallow.end";\r
+                               type: SWALLOW;\r
+                               scale : 1;\r
+                               mouse_events: 1;\r
+                               repeat_events: 1;\r
+                               description { state: "default" 0.0;\r
+                                       align: 0.0 1.0;\r
+                                       rel1 {\r
+                                          relative: 0.1 0.0;\r
+                                          to: "pad_b";\r
+                                       }\r
+                                       rel2 {\r
+                                          relative: 1.0 1.0;\r
+                                          to: "pad_b";\r
+                                       }\r
+                               }\r
+                       }\r
+                       part { name: "elm.text";\r
+                               type: TEXT;\r
+                               scale : 1;\r
+                               mouse_events: 0;\r
+                               description { state: "default" 0.0;\r
+                                       text {\r
+                                               font: "SLP:style=Medium";\r
+                                               size: 36;\r
+                                               min: 0 0;\r
+                                               align: 0.5 0.5;\r
+                                               text_class: "slp_medium";\r
+                                       }\r
+                                       color: 0 0 0 255;\r
+                                       align: 0.0 1.0;\r
+                                       rel1 {\r
+                                          relative: 0.2 0.0;\r
+                                          to: "pad_b";\r
+                                       }\r
+                                       rel2 {\r
+                                          relative: 0.8 1.0;\r
+                                          to: "pad_b";\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+\r
+       group { name: "popup_entryview";\r
+               parts{\r
+                       part{ name:"elm.swallow.content";\r
+                               type: SWALLOW;\r
+                               scale : 1;\r
+                               description { state: "default" 0.0;\r
+                                       align: 0.5 0.5;\r
+                                       rel1 {\r
+                                               relative: 0.0 0.0;\r
+                                       }\r
+                                       rel2 {\r
+                                               relative: 1.0 1.0;\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
diff --git a/main/layout/ivug-theme.edc b/main/layout/ivug-theme.edc
new file mode 100755 (executable)
index 0000000..0129d0e
--- /dev/null
@@ -0,0 +1,171 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+/*
+* Refer to themes/groups/naviframe.edc
+*/
+
+#define WHITE_THEME
+
+#ifdef BLUE_THEME
+
+#define GENLIST_PART_FONT_INDEX_LIST_COLOR_INC 240 240 240 255
+#define GENLIST_DIALOGUE_GROUP_BG_COLOR_INC 15 15 15 255
+
+#define GENLIST_PART_TEXT_PRESS_STYLE_COLOR_INC "#F9F9F9FF"
+#define GENLIST_PART_MATCH_TAG_COLOR_INC "+ color=#3F8DAD"
+
+#define GENLIST_PART_FONT_LIST_MAIN_TEXT_UNREAD_STYLE_COLOR_INC "#F9F9F9FF"
+#define GENLIST_PART_FONT_LIST_SUB_TEXT_STYLE_COLOR_INC "#646464FF"
+#define GENLIST_PART_FONT_FLEXIBLE_TEXT_MAIN_STYLE_COLOR_INC "#F9F9F9FF"
+#define GENLIST_PART_FONT_FLEXIBLE_TEXT_SUB_STYLE_COLOR_INC "#959595FF"
+#define GENLIST_PART_FONT_MULTILINE_TEXT_STYLE_COLOR_INC "#959595FF"
+#define GENLIST_PART_FONT_3LINE_MAIN_TEXT_READ_STYLE_COLOR_INC "#F9F9F9FF"
+#define GENLIST_PART_FONT_3LINE_MAIN_TEXT_UNREAD_STYLE_COLOR_INC "#F9F9F9FF"
+#define GENLIST_PART_FONT_3LINE_MAIN_TEXT_FOCUS_STYLE_COLOR_INC "#F9F9F9FF"
+#define GENLIST_PART_FONT_3LINE_MAIN_TEXT_2_STYLE_COLOR_INC "#F9F9F9FF"//"#688998FF"
+#define GENLIST_PART_FONT_3LINE_MAIN_TEXT_2_FOCUS_STYLE_COLOR_INC "#F9F9F9FF"
+#define GENLIST_PART_FONT_HELP_TEXT_STYLE_COLOR_INC "#929292FF"
+
+#define GENLIST_PART_BG_COLOR_INC 0 0 0 0
+
+#define GENLIST_PART_FONT_LIST_SUB_TEXT_COLOR_INC 249 249 249 255
+#define GENLIST_PART_TEXT_PRESS_COLOR_INC 249 249 249 255
+
+#define GENLIST_PART_FONT_LIST_MAIN_TEXT_UNREAD_COLOR_INC 100 100 100 255
+
+#define GENLIST_PART_DISCLIP_COLOR_INC 255 255 255 64
+
+#define GENLIST_PART_LIST_BG_COLOR_INC 0 0 0 0
+#define GENLIST_PART_LIST_LINE_COLOR_INC 68 68 68 0
+#define GENLIST_PART_LIST_PRESS_COLOR_INC 0 140 210 255
+
+#define LAYOUT_INDICATOR_HEIGHT_INC 50
+#define LAYOUT_INDICATOR_COLOR_INC 41 61 94 255        // Same as Naviframe
+
+#define NAVIFRAME_TEXT_PADDING_INC 144
+#define NAVIFRAME_TEXT_PADDING_MORE_BUTTON_INC 278
+#define NAVIFRAME_TEXT_PADDING_ICON_VISIBLE_INC 186
+
+#define NAVIFRAME_TITLE_H_INC 100
+#define NAVIFRAME_OH_CLOSED_H_INC 8
+#define NAVIFRAME_OH_OPENED_H_INC 106
+#define NAVIFRAME_OH_CONTENT_H_INC 74
+#define NAVIFRAME_OH_PADDING_INC 16
+#define NAVIFRAME_OH_OPENED_DOUBLE_H_INC 196
+#define NAVIFRAME_OH_SHADOW_H_INC 0
+#define NAVIFRAME_INDICATOR_W_INC 128
+#define NAVIFRAME_PADDING_EXPANDED_INC 141
+#define NAVIFRAME_TITLE_FONT_SIZE_INC 36
+#define NAVIFRAME_ICON_SIZE_INC 32 32
+#define NAVIFRAME_ICON_PADDING_INC 16 0
+#define NAVIFRAME_OH_ARROW_SIZE_INC 19 12
+#define NAVIFRAME_TITLE_TEXT_COLOR_INC 235 236 237 255
+#define NAVIFRAME_TITLE_BG_COLOR_INC 41 61 94 255
+#define NAVIFRAME_TITLE_LEFT_SEPARATOR_COLOR_INC 3 3 3 255
+#define NAVIFRAME_TITLE_RIGHT_SEPARATOR_COLOR_INC 52 52 52 255
+#define NAVIFRAME_OH_BORDER_INC 0 0 4 0
+
+#define NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 10
+#define NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 10
+#define NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC 124 80
+#define NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 144
+#define NAVIFRAME_NO_BUTTON_ICON_PADDING_INC 52
+#define NAVIFRAME_CONTROLBAR_BG_COLOR_INC 25 35 51 255
+#define CONTROLBAR_LARGE_HEIGHT_INC 122
+#define CONTROLBAR_SMALL_HEIGHT_INC 114
+#define NAVIFRAME_PREV_BTN_W_INC 124
+#define NAVIFRAME_CONTROLBAR_PADDING_INC 5
+#define NAVIFRAME_SEGMENT_TITLE_H_INC 136
+
+#define NAVIFRAME_TITLE_SEGMENT_FONT_SIZE_INC 28
+#define NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC 50
+#define NAVIFRAME_TITLE_SEGMENT_H_INC 74
+
+#elif WHITE_THEME
+
+#define GENLIST_PART_FONT_INDEX_LIST_COLOR_INC 0 94 160 255
+#define GENLIST_DIALOGUE_GROUP_BG_COLOR_INC 236 240 242 255
+
+#define GENLIST_PART_TEXT_PRESS_STYLE_COLOR_INC "#F9F9F9FF"
+#define GENLIST_PART_MATCH_TAG_COLOR_INC "+ color=#3F8DAD"
+
+#define GENLIST_PART_FONT_LIST_MAIN_TEXT_UNREAD_STYLE_COLOR_INC "#000000FF"
+#define GENLIST_PART_FONT_LIST_SUB_TEXT_STYLE_COLOR_INC "#959595FF"
+#define GENLIST_PART_FONT_FLEXIBLE_TEXT_MAIN_STYLE_COLOR_INC "#000000FF"
+#define GENLIST_PART_FONT_FLEXIBLE_TEXT_SUB_STYLE_COLOR_INC "#959595FF"
+#define GENLIST_PART_FONT_MULTILINE_TEXT_STYLE_COLOR_INC "#959595FF"
+#define GENLIST_PART_FONT_3LINE_MAIN_TEXT_READ_STYLE_COLOR_INC "#7C7C7CFF"
+#define GENLIST_PART_FONT_3LINE_MAIN_TEXT_UNREAD_STYLE_COLOR_INC "#000000FF"
+#define GENLIST_PART_FONT_3LINE_MAIN_TEXT_FOCUS_STYLE_COLOR_INC "#F9F9F9FF"
+#define GENLIST_PART_FONT_3LINE_MAIN_TEXT_2_STYLE_COLOR_INC "#7C7C7CFF"
+#define GENLIST_PART_FONT_3LINE_MAIN_TEXT_2_FOCUS_STYLE_COLOR_INC "#F9F9F9FF"
+#define GENLIST_PART_FONT_HELP_TEXT_STYLE_COLOR_INC "#7C7C7CFF"
+
+#define GENLIST_PART_BG_COLOR_INC 0 0 0 0
+
+#define GENLIST_PART_FONT_LIST_SUB_TEXT_COLOR_INC 0 0 0 255
+#define GENLIST_PART_TEXT_PRESS_COLOR_INC 0 0 0 255
+
+#define GENLIST_PART_FONT_LIST_MAIN_TEXT_UNREAD_COLOR_INC 0 0 0 255
+
+#define GENLIST_PART_DISCLIP_COLOR_INC 255 255 255 64
+
+#define GENLIST_PART_LIST_BG_COLOR_INC 0 0 0 0
+#define GENLIST_PART_LIST_LINE_COLOR_INC 68 68 68 0
+#define GENLIST_PART_LIST_PRESS_COLOR_INC 0 140 210 255
+
+#define LAYOUT_INDICATOR_HEIGHT_INC 50
+#define LAYOUT_INDICATOR_COLOR_INC 0 0 0 255
+
+#define NAVIFRAME_TITLE_H_INC 108
+#define NAVIFRAME_SEGMENT_TITLE_H_INC 126
+#define NAVIFRAME_OH_OPENED_H_INC 114
+#define NAVIFRAME_OH_CONTENT_H_INC 72
+#define NAVIFRAME_OH_PADDING_INC 16
+#define NAVIFRAME_OH_SHADOW_INC 10
+#define NAVIFRAME_OH_ARROW_SIZE_INC 28 24
+#define NAVIFRAME_OH_OPENED_DOUBLE_H_INC 202
+#define NAVIFRAME_PREV_BTN_W_INC 124
+#define NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC 120 72
+#define NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 144
+#define NAVIFRAME_TEXT_PADDING_INC 142
+#define NAVIFRAME_NO_BUTTON_ICON_PADDING_INC 48
+#define NAVIFRAME_TEXT_PADDING_ICON_VISIBLE_INC 48
+#define NAVIFRAME_TITLE_SEGMENT_H_INC 62
+#define NAVIFRAME_TITLE_SEGMENT_FONT_SIZE_INC 38
+#define NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC 54
+#define NAVIFRAME_TITLE_FONT_SIZE_INC 52
+#define NAVIFRAME_SUBTITLE_FONT_SIZE_INC 32
+#define NAVIFRAME_ICON_SIZE_INC 32 32
+#define NAVIFRAME_ICON_PADDING_INC 16 0
+#define NAVIFRAME_TITLE_TEXT_COLOR_INC 249 249 249 255
+#define NAVIFRAME_SUBTITLE_TEXT_COLOR_INC 249 249 249 255
+#define NAVIFRAME_OH_BORDER_INC 1 1 2 12
+
+#define CONTROLBAR_LARGE_HEIGHT_INC 122
+#define CONTROLBAR_SMALL_HEIGHT_INC 114
+
+#define GENGRID_FONT_STYLE_18_INC "26"
+// #define GENGRID_PART_BG_COLOR_INC 0 0 0 0
+#define GENGRID_PART_BG_COLOR_INC 0 0 0 0
+// #define GENGRID_PART_ITEM_BG_COLOR_INC 239 239 239 255
+#define GENGRID_PART_ITEM_BG_COLOR_INC 0 0 0 255
+#define GENGRID_PART_REORDER_BG_COLOR_INC 0 0 0 128
+#define GENGRID_PART_TEXTBLOCK_STYLE_COLOR_INC "#F9F9F9"
+
+#endif
+
diff --git a/main/res/images/01_Control icon/00_winset_btn_prev.png b/main/res/images/01_Control icon/00_winset_btn_prev.png
new file mode 100755 (executable)
index 0000000..d45184d
Binary files /dev/null and b/main/res/images/01_Control icon/00_winset_btn_prev.png differ
diff --git a/main/res/images/01_Control icon/01_controlbar_icon_trim.png b/main/res/images/01_Control icon/01_controlbar_icon_trim.png
new file mode 100755 (executable)
index 0000000..53dba05
Binary files /dev/null and b/main/res/images/01_Control icon/01_controlbar_icon_trim.png differ
diff --git a/main/res/images/01_Control icon/01_controllbar_icon_close.png b/main/res/images/01_Control icon/01_controllbar_icon_close.png
new file mode 100755 (executable)
index 0000000..91b04e5
Binary files /dev/null and b/main/res/images/01_Control icon/01_controllbar_icon_close.png differ
diff --git a/main/res/images/01_Control icon/T01_1_controlbar_icon_detail.png b/main/res/images/01_Control icon/T01_1_controlbar_icon_detail.png
new file mode 100755 (executable)
index 0000000..9e746c8
Binary files /dev/null and b/main/res/images/01_Control icon/T01_1_controlbar_icon_detail.png differ
diff --git a/main/res/images/01_Control icon/T01_1_title_icon_set_as.png b/main/res/images/01_Control icon/T01_1_title_icon_set_as.png
new file mode 100755 (executable)
index 0000000..72b74da
Binary files /dev/null and b/main/res/images/01_Control icon/T01_1_title_icon_set_as.png differ
diff --git a/main/res/images/01_Control icon/T01_Option tray_Edit.png b/main/res/images/01_Control icon/T01_Option tray_Edit.png
new file mode 100755 (executable)
index 0000000..a6aef95
Binary files /dev/null and b/main/res/images/01_Control icon/T01_Option tray_Edit.png differ
diff --git a/main/res/images/01_Control icon/T01_Title_icon_more.png b/main/res/images/01_Control icon/T01_Title_icon_more.png
new file mode 100755 (executable)
index 0000000..651c8e1
Binary files /dev/null and b/main/res/images/01_Control icon/T01_Title_icon_more.png differ
diff --git a/main/res/images/01_Control icon/T01_controlbar_icon_add.png b/main/res/images/01_Control icon/T01_controlbar_icon_add.png
new file mode 100755 (executable)
index 0000000..e60bfb9
Binary files /dev/null and b/main/res/images/01_Control icon/T01_controlbar_icon_add.png differ
diff --git a/main/res/images/01_Control icon/T01_controlbar_icon_save.png b/main/res/images/01_Control icon/T01_controlbar_icon_save.png
new file mode 100755 (executable)
index 0000000..39baa6a
Binary files /dev/null and b/main/res/images/01_Control icon/T01_controlbar_icon_save.png differ
diff --git a/main/res/images/01_Control icon/T01_controlbar_icon_share.png b/main/res/images/01_Control icon/T01_controlbar_icon_share.png
new file mode 100755 (executable)
index 0000000..f21b00c
Binary files /dev/null and b/main/res/images/01_Control icon/T01_controlbar_icon_share.png differ
diff --git a/main/res/images/Popup_icon/T01_1_popup_icon_Crop.png b/main/res/images/Popup_icon/T01_1_popup_icon_Crop.png
new file mode 100755 (executable)
index 0000000..40cff3c
Binary files /dev/null and b/main/res/images/Popup_icon/T01_1_popup_icon_Crop.png differ
diff --git a/main/res/images/Popup_icon/T01_1_popup_icon_Paste from Clipboard.png b/main/res/images/Popup_icon/T01_1_popup_icon_Paste from Clipboard.png
new file mode 100755 (executable)
index 0000000..14b8895
Binary files /dev/null and b/main/res/images/Popup_icon/T01_1_popup_icon_Paste from Clipboard.png differ
diff --git a/main/res/po/.pot b/main/res/po/.pot
new file mode 100755 (executable)
index 0000000..1f0dd57
--- /dev/null
@@ -0,0 +1,142 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-10-12 09:32+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/util/mb_util.c:318
+msgid "IDS_COM_SK_DELETE"
+msgstr ""
+
+#: src/util/mb_util.c:321
+msgid "IDS_COM_POP_CLOSE_A"
+msgstr ""
+
+#: src/util/mb_util.c:474 src/features/slide_view.c:3238
+msgid "Done"
+msgstr ""
+
+#. UI_contextpopup_insert_text( context_popup, 3, _("Message"), _("Email"), _("Bluetooth"));
+#: src/util/mb_util.c:812 src/util/mb_util.c:819
+msgid "IDS_COM_BODY_MESSAGE"
+msgstr ""
+
+#: src/util/mb_util.c:813 src/util/mb_util.c:820
+msgid "IDS_COM_BODY_EMAIL"
+msgstr ""
+
+#: src/util/mb_util.c:814
+msgid "IDS_COM_BODY_BLUETOOTH"
+msgstr ""
+
+#. UI_contextpopup_insert_text( context_popup, 2, _("Wallpaper"), _("Caller ID"));
+#: src/util/mb_util.c:825
+msgid "IDS_MEDIABR_OPT_WALLPAPER"
+msgstr ""
+
+#: src/util/mb_util.c:826
+msgid "IDS_MEDIABR_OPT2_CALLER_ID"
+msgstr ""
+
+#. struct appdata *pAppData = (struct appdata*)pUserData;
+#: video/MpUtil.c:300 video/MpUtil.c:303 video/MpVideoAppCtrl.c:165
+#: video/MpVideoAppCtrl.c:169
+msgid "IDS_COM_BODY_LOW_BATTERY"
+msgstr ""
+
+#: video/MpUtil.c:886
+msgid "IDS_COM_SK_OK"
+msgstr ""
+
+#: video/MpUtil.c:901 src/features/set_as.c:504
+msgid "IDS_IMGE_BUTTON_CANCEL"
+msgstr ""
+
+#: video/MpVideoAppCtrl.c:189
+msgid "IDS_SL_HEADER_CONFIRM"
+msgstr ""
+
+#: video/MpVideoAppCtrl.c:189 video/MpVideoAppCtrl.c:358
+msgid "Current mode is silent mode<br> Continue play?"
+msgstr ""
+
+#: video/MpVideoAppCtrl.c:358
+msgid "Confirm"
+msgstr ""
+
+#. Popup
+#: video/MpVideoAppCtrl.c:1144
+msgid "Bluetooth disconnected"
+msgstr ""
+
+#. 6.
+#: video/PlayViewCtrl.c:929
+msgid "IDS_VPL_DETAILS_BACK"
+msgstr ""
+
+#: video/PlayViewCtrl.c:1045
+msgid "<Prev"
+msgstr ""
+
+#: video/PlayViewCtrl.c:1080
+msgid "IDS_IMGE_OPT2_SHARE"
+msgstr ""
+
+#. chenhanwu
+#: video/PlayViewCtrl.c:1081 src/features/set_as.c:491
+#: src/features/set_as.c:502
+msgid "IDS_ST_POP_SET_AS"
+msgstr ""
+
+#. chenhanwu
+#. chenhanwu
+#: video/PlayViewCtrl.c:1083 src/features/slide_view.c:2829
+msgid "IDS_COM_BODY_DELETE"
+msgstr ""
+
+#: video/PlayViewCtrl.c:1102
+msgid "IDS_VPL_HEADER_VIDEO_LIST"
+msgstr ""
+
+#: video/PlayViewCtrl.c:1103
+msgid "IDS_VPL_OPT_KEEP_ASPECT_RATIO"
+msgstr ""
+
+#. elm_softkey_panel_item_add(pAppData->pSoftkey, NULL, _("IDS_VPL_OPT_CONNECTED_HOME"), SoftkeyAllshare_cb, pAppData);
+#: video/PlayViewCtrl.c:1108
+msgid "IDS_VPL_OPT_SUBTITLES"
+msgstr ""
+
+#: video/PlayViewCtrl.c:1111
+msgid "IDS_VPL_OPT_DETAILS"
+msgstr ""
+
+#. edje_edit_state_text_set(pAppData->pSubtitlePopupEdj, "subtitle_popup_text", "default 0.0", _("IDS_VPL_OPT_DISPLAY_SUBTITLE"));
+#: video/PlayViewCtrl.c:1431 video/PlayViewCtrl.c:1583
+msgid "IDS_VPL_OPT_DISPLAY_SUBTITLE"
+msgstr ""
+
+#. chenhanwu
+#: src/features/set_as.c:503
+msgid "IDS_COM_SK_DONE"
+msgstr ""
+
+#: src/features/slide_view.c:1952 src/features/slide_view.c:2002
+msgid "Prev"
+msgstr ""
+
+#: src/features/slide_view.c:3242
+msgid "IDS_COM_SK_CANCEL"
+msgstr ""
diff --git a/main/res/po/ar.po b/main/res/po/ar.po
new file mode 100755 (executable)
index 0000000..9fe1d75
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "الوقت المتراكم"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "إضافة علامة"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "تمت الإضافة"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "أي"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "الاستخدامات المتوفرة"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "أساسي"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "صورة المتصل"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "العدد"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "تاريخ الإنشاء"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "الشاشة"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "أدخل اسم الرمز"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "المدخل خالي"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "تنفيذ"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "تنسيق الملف"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "موقع الملف"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "التحويل"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "خلفية الشاشة الرئيسية"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "غير ممكن"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "فردي"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "الفترة"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "ملف صورة غير صالح"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "المدى"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "المواقع"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "خلفية شاشة القفل"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "خط الطول"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "تم بلوغ أقصى عدد من الأحرف (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "غير متاح"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "علامة جديدة"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "تم رفض الإذن"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "ممكن"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "طباعة"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "طباعة عبر البلوتوث"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "الدقة"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "حالة الحقوق"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "تمت إزالة بطاقة SD"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "تحديد جهاز"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "اسم الخادم"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "تعيين"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "تعيين خلفية للشاشة الرئيسية وشاشة القفل"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "مشاركة"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "عرض الصور"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "عداد محدد زمنيا"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "شذب"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "غير محدود"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "الصلاحية"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "التاجر"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "نقل الملف"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "عدم العرض مرة أخرى"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "انقر مع الاستمرار فوق نقطتين ثم قم بإمالة الجهاز للخلف والأمام لتصغير الشاشة أو تكبيرها"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "تعرف على الإمالة"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "كافة الألبومات"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "علامة"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "خلفية ‏‫شاشة القفل والشاشة الرئيسية‬"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "استخدام الحركة"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "إنشاء ع."
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "شاشتا القفل والرئيسية"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "نسخ إلى الحافظة"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "قص"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "الشاشة الرئيسية"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "قفل الشاشة"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "تدوير لليسار"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "تدوير لليمين"
+
diff --git a/main/res/po/bg.po b/main/res/po/bg.po
new file mode 100755 (executable)
index 0000000..406ee05
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Натрупано време"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Добави таг"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Добавен"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Всеки"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Налични употреби"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Базово"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Изобр. повикващ"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Броене"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Дата на създаване"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Дисплей"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Въведете име на таг"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Празен запис"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Изпълни"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Формат на файла"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Местоположение на файла"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Препращане"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Тапет начален екран"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Невъзможно"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Индивидуален"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Интервал"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Невалиден файл на изображение"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Геогр. ширина"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Местоположения"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Тапет заключен екран"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Геогр. дължина"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Достигнат е максималният брой знаци (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "н.д."
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Нов таг"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Отказано разрешение"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Lъзможно"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Отпечатаване"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Печат чрез Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Разделителна способност"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Състояние на правата"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD картата е извадена"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Избор на устр-во"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Име на сървър"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Задаване като"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Задаване на тапет за началния екран и екрана за заключване"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Споделям"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Слайдшоу"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Отброяване по време"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Орязване"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Неограничен"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Валидност"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Доставчик"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Прехвърляне на файл"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Не показвай отново"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Чукнете и задръжте в две точки, след което наклонете устройството напред-назад, за да намалите или увеличите екрана"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Научете за накланянето"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Всички албуми"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Таг"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Тапет на началния екран и на заключен екран"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "С движение"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Създ. таг"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Начален и заключен екран"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Копирай в клипборда"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Изрязване"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Начален екран"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Заключен екран"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Завъртане наляво"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Завъртане надясно"
+
diff --git a/main/res/po/ca.po b/main/res/po/ca.po
new file mode 100755 (executable)
index 0000000..ff84b36
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Temps acumulat"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Afeg etiq"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Afegit"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Qualsevol"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Usos disponibles"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Bàsic"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Imatge de la persona que truca"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Comptatge"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Data creació"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Pantalla"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Introduir nom d'etiqueta"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "L'entrada és buida"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Executar"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Format del fitxer"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Ubicació del fitxer"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Reenviant"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Fons pantalla inici"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "No és possible"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Individual"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Interval"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Arxiu d'imatges no vàlid"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Latitud"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Ubicacions"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Bloq fons pant inici"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Longitud"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "S'ha assolit el nombre màxim de caràcters (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "N/D"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Nova etiqueta"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Permís denegat"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Possible"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Imprimir"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Imprimir mitjançant Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Resolució"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Estat correcte"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "Sense targeta SD"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Seleccioni dispositiu"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Nom del servidor"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Definir com a"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Definir fons de la pantalla d'inici i bloquejar pantalla"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Compartir"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Presentació de diapositives"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Compte contrarellotge"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Acoblar"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Il·limitat"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Validesa"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Proveïdor"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Transferència de fitxer"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "No tornar a mostrar"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Mantingui tocats dos punts i inclini el dispositiu endavant i endarrere per reduir o ampliar la pantalla"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Més info inclinació"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Tots els àlbums"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Etiqueta"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Fons de pantalla de pantalla d'inici i bloqueig"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Utilitzar moviment"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Crear etiq"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Pantalla inici i bloqueig"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Copiar al porta-retalls"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Retallar"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Pantalla d'inici"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Bloquejar pantalla"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Girar cap a l'esquerra"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Girar cap a la dreta"
+
diff --git a/main/res/po/cs.po b/main/res/po/cs.po
new file mode 100755 (executable)
index 0000000..39fd66a
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Celkový čas"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Přid. zn."
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Přidáno"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Vše"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Počet použití k dispozici"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Základní"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Obrázek volajícího"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Počet"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Datum vytvoření"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Displej"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Zadejte název značky"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Prázdná položka"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Provést"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Formát souboru"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Umístění souboru"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Předání"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Pozadí dom. obrazovky"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Nemožné"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Individuální"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Interval"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Neplatný soubor obrázku"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Zeměpisná šířka"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Polohy"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Zamknout pozadí obr."
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Zeměpisná délka"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Bylo dosaženo maximálního počtu znaků (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "Nepoužito"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Nová značka"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Povolení bylo odepřeno"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Možné"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Tisk"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Tisk přes Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Rozlišení"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Stav práv"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD karta byla vyjmuta"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Zvolte umístění"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Název serveru"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Nastavit jako"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Nastavit pozadí pro domovskou obrazovku a zamknout obrazovku"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Sdílet"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Prezentace"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Násobek času"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Oříznout"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Neomezeno"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Platnost"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Dodavatel"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Přenos souboru"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Znovu nezobrazovat"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Chcete-li zmenšit nebo zvětšit displej, klepněte na dvě místa a držte je, a potom naklánějte zařízení dozadu a dopředu"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Informace o naklonění"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Všechna alba"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Značka"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Pozadí domovské obrazovky a zamknutého displeje"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Použít pohyb"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Vytv. zn."
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Domovská a zamknutá obrazovka"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Kopírovat do schránky"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Oříznout"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Domovská obrazovka"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Zamknout displej"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Otočit doleva"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Otočit doprava"
+
diff --git a/main/res/po/csv2po_v2 b/main/res/po/csv2po_v2
new file mode 100755 (executable)
index 0000000..d925512
Binary files /dev/null and b/main/res/po/csv2po_v2 differ
diff --git a/main/res/po/da.po b/main/res/po/da.po
new file mode 100755 (executable)
index 0000000..126f85d
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Samlet tid"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Tilføj kode"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Tilføjet"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Vilkårlig"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Gange tilbage"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Grundlæggende"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Opkalderbillede"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Antal"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Dato oprettet"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Skærm"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Indtast navn på kode"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Posten er tom"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Udfør"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Filformat"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Filplacering"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Viderestiller"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Baggr. for startskærm"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Ikke mulig"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Individuel"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Interval"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Ugyldig billedfil"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Breddegrad"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Steder"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Baggrund for skærmlås"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Længdegrad"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Det maksimale antal tegn (%d) er nået"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "Ikke tilgængelig"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Ny kode"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Tilladelse afslået"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Muligt"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Udskriv"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Udskriv via Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Opløsning"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Status for rettigheder"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD-kort fjernet"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Vælg enhed"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Servernavn"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Vælg som"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Angiv baggrund for startskærm, og lås skærm"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Del"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Diasshow"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Tidsforbrug"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Beskær"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Ubegrænset"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Gyldighed"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Sælger"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Filoverførsel"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Vis ikke igen"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Tryk og hold på to punkter, og vip enheden frem og tilbage for at reducere eller forstørre skærmen"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Lær om vip"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Alle album"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Kode"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Baggrund for startskærm og låseskærm"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Brug bevægelse"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Opret kode"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Start- og låseskærm"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Kopiér til udklipsholder"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Beskær"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Startskærm"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Lås skærm"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Roter mod uret"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Roter med uret"
+
diff --git a/main/res/po/en_US.po b/main/res/po/en_US.po
new file mode 100755 (executable)
index 0000000..3bed3f6
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Accumulated time"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Add tag"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Added"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Any"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Available uses"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Basic"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Caller image"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Count"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Date created"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Display"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Enter tag name"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Entry is empty"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Execute"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "File format"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "File location"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Forwarding"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Home screen wallpaper"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Impossible"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Individual"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Interval"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Invalid image file"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Latitude"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Locations"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Lock screen wallpaper"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Longitude"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Maximum number of characters (%d) reached"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "N/A"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "New tag"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Permission denied"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Possible"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Print"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Print via Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Resolution"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Right status"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD card removed"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Select device"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Server name"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Set as"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Set wallpaper for home screen and lock screen"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Share"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Slide show"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Timed count"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Trim"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Unlimited"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Validity"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Vendor"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "File transfer"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Do not show again"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Tap and hold at two points then tilt device back and forth to reduce or enlarge screen"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Learn about tilt"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "All albums"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Tag"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Home and lock screen wallpaper"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Use motion"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Create tag"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Home and lock screens"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Copy to clipboard"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Crop"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Home screen"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Lock screen"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Rotate left"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Rotate right"
+
diff --git a/main/res/po/fi.po b/main/res/po/fi.po
new file mode 100755 (executable)
index 0000000..6c6986b
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Kertynyt aika"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Lis. tunn."
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Lisätty"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Mikä tahansa"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Jäljellä olevat käyttökerrat"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Perus"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Soittajan kuva"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Määrä"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Luontipäivämäärä"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Näyttö"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Anna tunnisteen nimi"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Tyhjä tieto"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Suorita"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Tiedostomuoto"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Tiedoston sijainti"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Edelleenlähetys"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Alkunäytön taustakuva"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Mahdoton"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Yksittäinen"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Väli"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Virheellinen kuvatiedosto"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Leveysaste"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Sijainnit"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Luk. näytön taustak."
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Pituusaste"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Merkkien enimmäismäärä (%d) on saavutettu"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "-"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Uusi tunniste"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Lupa evätty"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Mahdollinen"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Tulosta"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Tulosta Bluetoothin kautta"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Tarkkuus"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Oikeustila"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD-kortti on poistettu"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Valitse laite"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Palvelimen nimi"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Aseta"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Määritä alkunäytön ja lukitusnäytön taustakuvat"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Jaa"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Diaesitys"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Ajoitettu määrä"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Rajaa"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Rajoittamaton"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Kelpoisuus"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Toimittaja"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Tiedostonsiirto"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Älä näytä uudestaan"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Pienennä tai suurenna näyttöä pitämällä kahta pistettä painettuna ja kallistelemalla laitetta edestakaisin"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Perehdy kallistukseen"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Kaikki albumit"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Tunniste"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Alku- ja lukitusnäytön taustakuva"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Käytä liikettä"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Luo tunn."
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Alku- ja lukitusnäytöt"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Kopioi leikepöydälle"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Rajaa"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Alkunäyttö"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Lukitusnäyttö"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Kierrä vastapäivään"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Kierrä myötäpäivään"
+
diff --git a/main/res/po/he.po b/main/res/po/he.po
new file mode 100755 (executable)
index 0000000..2fa99b5
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "זמן מצטבר"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "הוסף תגית"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "נוסף"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "כלשהו"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "שימושים זמינים"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "בסיסי"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "תמונת מתקשר"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "ספירה"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "תאריך יצירה"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "תצוגה"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "הזן שם תג"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "הרשומה ריקה"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "בצע"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "תבנית קובץ"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "מיקום קובץ"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "העברה"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "הטפט של מסך הבית"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "לא אפשרי"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "נפרד"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "מרווח זמן"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "קובץ תמונה לא חוקי"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "קו רוחב"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "מיקומים"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "נעל את הטפט של המסך"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "קו אורך"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "הגעת למגבלה של התווים (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "לא זמין"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "תג חדש"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "ההרשאה נדחתה"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "אפשרי"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "הדפסה"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "הדפס דרך Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "רזולוציה"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "מצב זכויות"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "כרטיס SD הוסר"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "בחר התקן"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "שם שרת"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "הגדר כ"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "הגדר את הטפט עבור מסך הבית ומסך הנעילה"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "שתף"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "הצגת שקופיות"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "ספירה מתוזמנת"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "חיתוך"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "לא מוגבל"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "תקפות"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "ספק"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "העברת קובץ"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "אל תציג שוב"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "הקש והחזק בשתי נקודות ואז הטה את המכשיר קדימה ואחורה כדי להקטין או להגדיל את התצוגה"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "למד אודות הטייה"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "כל האלבומים"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "תגית"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "רקע מסך לעמוד הבית ולנעילה"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "השתמש בתנועה"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "צור תגית"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "מסכי הבית והנעילה"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "העתק ללוח"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "חתוך"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "מסך ראשי"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "מסך נעילה"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "סובב שמאלה"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "סובב ימינה"
+
diff --git a/main/res/po/hi.po b/main/res/po/hi.po
new file mode 100755 (executable)
index 0000000..00c34ca
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "संचित समय"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "टैग जोड़ें"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "जोड़ा गया"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "कोई"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "उपलब्ध उपयोग"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "बेसिक"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "कॉलर छवि"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "गणना"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "दिनांक निर्मित"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "प्रदर्शन"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "टैग नाम दर्ज करें"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "प्रविष्टि खाली है"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "निष्पादित करें"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "फ़ाइल फॉर्मेट"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "फ़ाइल स्थान"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "अग्रेषण"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "होम स्क्रीन वॉलपेपर"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "असंभव"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "अलग"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "अन्तराल"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "अमान्य इमेज फ़ाइल"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "अक्षांश"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "स्थान"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "लॉक स्क्रीन वॉलपेपर"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "देशांतर"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "वर्णों की अधिकतम संख्या (%d) तक पहुँच गया"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "लागू नहीं"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "नया टैग"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "अनुमति से इनकार"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "संभव"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "प्रिंट करें"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "ब्लूटूथ द्वारा प्रिंट करें"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "रेज़ोल्यूशन"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "सही स्थिति"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD कार्ड निकाला गया"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "डिवाइस चुनें"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "सर्वर नाम"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "के रूप में सेट करें"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "होम स्क्रीन और लॉक स्‍क्रीन के लिए वॉलपेपर सेट करें"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "शेयर करें"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "स्लाइड शो"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "समयसीमित गणन"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "ट्रिम करें"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "असीमित"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "वैधता"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "विक्रेता"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "फाइल स्थानांतरण"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "दुबारा न दिखाएँ"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "दो बिंदुओं पर टैप करें रखें फिर स्‍क्रीन छोटी या बड़ी करने के लिए पीछे और आगे डिवाइस टिल्ट करें"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "झुकाव के बारे में अधिक जानें"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "सभी एलबम्‍स"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "टैग"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "होम और लॉक स्क्रीन वॉलपेपर"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "गति का उपयोग करें"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "टैग बनाएँ"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "होम और लॉक स्‍क्रीन"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "क्लिपबोर्ड में कॉपी करें"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "क्रॉप"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "होम स्क्रीन"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "स्क्रीन लॉक करें"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "बाएँ घुमाएँ"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "दाएँ घुमाएँ"
+
diff --git a/main/res/po/hr.po b/main/res/po/hr.po
new file mode 100755 (executable)
index 0000000..4e70f10
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Ukupno vrijeme"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Dodaj oznaku"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Dodano"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Bilo koji"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Preostalo upotreba"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Osnovno"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Slika pozivatelja"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Broj"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Datum"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Zaslon"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Unesite naziv oznake"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Unos prazan"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Pokreni"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Format datoteke"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Lokacija datoteke"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Prosljeđivanje"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Pozadina poč. zaslona"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Nemoguće"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Individualno"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Interval"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Neispravna datoteka"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Geo. širina"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Lokacije"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Pozadina za zaslon zaključavanja"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Geo. duljina"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Maksimalan broj znakova (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "nema"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Nova oznaka"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Dozvola odbijena"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Moguće"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Ispis"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Ispis putem Bluetootha"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Rezolucija"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Prava"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD kartica izvađena"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Odaberite uređaj"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Ime poslužitelja"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Postavi za"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Postavite pozadinu za početni zaslon i zaslon zaključavanja"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Dijeli"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Prezentacija"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Preostalo vrijeme"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Skrati"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Neograničeno"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Valjanost"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Dobavljač"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Prijenos podataka"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Ne prikazuj više"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Dotaknite i zadržite na dvije točke, a zatim nagnite uređaj naprijed i natrag za povećavanje i smanjivanje zaslona"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Info o nagibu"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Svi albumi"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Oznaka"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Pozadina početnog i zaslona zaključavanja"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Koristi pokrete"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Nova oznaka"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Početni i zaslon zaključavanja"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Kopiraj u međuspremnik"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Izreži"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Početni zaslon"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Zaslon zaključavanja"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Rotiraj ulijevo"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Rotiraj udesno"
+
diff --git a/main/res/po/hu.po b/main/res/po/hu.po
new file mode 100755 (executable)
index 0000000..5b61e49
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Összesített idő"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Új címke"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Hozzáadva"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Bármely"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Lehetséges felhasználás"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Alapvető"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Hívó képe"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Számláló"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Létrehozás dátuma"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Kijelző"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Adja meg a címke nevét"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "A bejegyzés üres"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Végrehajt"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Fájlformátum"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Fájl helye"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Továbbítás"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Kezdőképernyő háttere"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Nem lehetséges"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Egyéni"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Intervallum"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Érvénytelen képfájl"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Szélesség"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Helyek"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Zárolt képernyő háttere"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Hosszúság"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Elérte a karakterek maximális számát (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "nincs adat"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Új címke"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Engedély megtagadva"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Lehetséges"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Nyomtatás"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Nyomtatás Bluetooth-on"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Felbontás"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Jogi státusz"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD-kártya eltávolítva"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Válasszon eszközt"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Szerver neve"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Beállít, mint"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "A kezdőképernyő és a zárolt képernyő hátterének beállítása"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Megosztás"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Diavetítés"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Időszámláló"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Vágás"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Korlátlan"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Érvényesség"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Szállító"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Fájlátvitel"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Ne jelenjen meg ismét"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Tartsa két ujját a képernyőn, majd döntse az eszközt előre vagy hátra a képernyő nagyításához vagy kicsinyítéséhez"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Döntés – infó"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Összes album"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Címke"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Kezdő- és zárolt képernyő háttere"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Hangulatjelek használata"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Létrehozás"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Kezdő- és zárolt képernyő"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Másolás a vágólapra"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Körbevág"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Kezdőképernyő"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Képernyő lezárása"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Forgatás balra"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Forgatás jobbra"
+
diff --git a/main/res/po/id.po b/main/res/po/id.po
new file mode 100755 (executable)
index 0000000..7995a7e
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Waktu diakumulasi"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Beri tag"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Ditambahkan"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Sembarang"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Tersedia utk digunakan"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Dasar"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Gambar pemanggil"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Jumlah"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Tanggal dibuat"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Tampilan"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Masukkan nama tag"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Entri kosong"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Melaksanakan"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Format file"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Lokasi file"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Meneruskan"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Wallpaper layar depan"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Tdk memungkinkan"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Perorangan"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Interval"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "File gambar tidak berlaku"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Latitude"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Lokasi"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Kunci layar wallpaper"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Garis bujur"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Jumlah maksimum karakter (%d) tercapai"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "Tdk ada"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Tag baru"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Izin ditolak"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Memungkinkan"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Cetak"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Mencetak lewat Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Resolusi"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Status benar"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "Kartu SD dicabut"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Pilih perangkat"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Nama server"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Atur sebagai"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Atur wallpaper untuk home screen dan kunci layar"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Berbagi"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Tampilan slide"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Hitungan berangsur"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Pangkas"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Tdk terbatas"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Berlaku"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Vendor"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Pemindahan file"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Jangan tampilkan lagi"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Ketuk dan tahan pada dua titik lalu miringkan perangkat ke depan dan belakang untuk memperkecil atau memperbesar layar"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Pelajari tentang kemiringan"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Semua album"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Tag"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Wallpaper beranda dan layar kunci"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Gunakan gerak"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Buat tag"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Beranda dan kunci layar"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Simpan ke papan klip"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Kerat"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Layar depan"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Kunci layar"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Putar kiri"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Putar kanan"
+
diff --git a/main/res/po/lt.po b/main/res/po/lt.po
new file mode 100755 (executable)
index 0000000..a9e0c60
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Apskaičiuotas laikas"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Prid. žymą"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Pridėta"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Bet kuris"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Galimi panaudojimai"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Pagrindinis"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Skambintojo vaizdas"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Skaičiuoti"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Sukūrimo data"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Ekranas"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Įveskite žymos pavadinimą"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Įrašas tuščias"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Vykdyti"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Failo formatas"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Failo vieta"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Persiuntimas"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Pradžios ekrano fonas"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Neįmanoma"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Atskiras"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Intervalas"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Neteisingas paveikslėlio failas"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Platuma"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Vietos"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Ekrano užrakin. fonas"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Ilguma"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Pasiektas didžiausias simbolių skaičius (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "Netaikoma"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Nauja gairė"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Leidimas atmestas"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Įmanoma"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Spausdinti"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Spausdinti per „Bluetooth“"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Raiška"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Teisių būsena"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "Išimta SD kortelė"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Pasirinkite įrenginį"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Serverio pavadinimas"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Nustatyti kaip"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Nustatyti pradžios ir užrakinimo ekrano foną"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Dalytis"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Skaidrių demonstravimas"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Laiko skaičiavimas"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Nukirpti"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Neribota"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Galiojimas"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Tiekėjas"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Failo perkėlimas"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Daugiau nerodyti"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Padėkite du pirštus ant ekrano ir pakreipkite įrenginį pirmyn bei atgal norėdami sumažinti arba padidinti ekraną"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Apie pakreipimą"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Visi albumai"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Žyma"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Pradžios ir užrakinimo ekranų fonas"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Naudoti judesį"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Kurti žymą"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Pradžios ir užrakinimo ekranai"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Kopijuoti į iškarpinę"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Apkarpyti"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Pradžios ekranas"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Užrakinimo ekranas"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Sukti į kairę"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Sukti į dešinę"
+
diff --git a/main/res/po/lv.po b/main/res/po/lv.po
new file mode 100755 (executable)
index 0000000..42aa63d
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Uzkrāts laiks"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Piev. atz."
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Pievienots"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Jebkurš"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Atlikušās lietošanas reizes"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Pamata"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Zvanītāja attēls"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Skaits"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Izveidošanas datums"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Displejs"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Ievadiet atzīmes nosaukumu"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Ieraksts nav norādīts"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Izpildīt"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Faila formāts"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Faila atrašanās vieta"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Pārsūtīšana"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Sāk.ekrān.fona attēls"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Nav iespējams"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Individuāls"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Intervāls"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Nederīgs attēla fails"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Platums"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Atrašanās vietas"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Bloķēt ekr. fona att."
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Garums"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Sasniegts maksimālais rakstzīmju skaits (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "Nav pieejams"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Jauna atzīme"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Atļauja liegta"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Iespējams"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Drukāt"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Drukāt, izmantojot Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Izšķirtspēja"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Pareizais statuss"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD karte ir izņemta"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Atlasīt ierīci"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Servera nosaukums"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Iestatīt kā"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Iestatīt sākuma ekrāna fona attēlu un bloķēt ekrānu"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Koplietot"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Slaidrāde"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Skaits ar laika uzskaiti"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Apgriezt"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Neierobežots"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Derīgums"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Piegādātājs"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Failu pārsūtīšana"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Nerādīt vēlreiz"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Lai samazinātu vai palielinātu ekrānu, pieskarieties diviem punktiem un turiet tos, pēc tam sasveriet ierīci uz priekšu un atpakaļ"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Informācija par sasvēršanu"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Visi albumi"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Atzīme"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Sākuma un bloķēšanas ekrāna fona attēls"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Lietot kustību"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Izv. atz."
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Sākuma un bloķēšanas ekrāni"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Kopēt starpliktuvē"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Apgriezt"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Sākuma ekrāns"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Bloķēšanas ekrāns"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Pagriezt pa kreisi"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Pagriezt pa labi"
+
diff --git a/main/res/po/ms.po b/main/res/po/ms.po
new file mode 100755 (executable)
index 0000000..3d4ffab
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Masa terkumpul"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Tambah teg"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Ditambahkan"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Sebarang"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Kegunaan boleh didpti"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Asas"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Imej pemanggil"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Bilang"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Tarikh dicipta"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Paparan"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Masukkan nama teg"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Masukan adalah kosong"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Lakukan"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Format fail"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Lokasi fail"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Memajukan"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Hiasan latar skrin utama"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Mustahil"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Individu"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Selang"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Fail imej tidak sah"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Latitud"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Lokasi"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Hiasan latar skrin kunci"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Longitud"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Bilangan maksimum aksara (%d) dicapai"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "N/A"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Teg baru"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Kebenaran dinafikan"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Mungkin"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Cetak"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Cetak melalui Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Resolusi"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Status hak"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "Kad SD dialihkan keluar"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Pilih peranti"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Nama pelayan"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Tetap sebagai"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Tetapkan hiasan latar untuk skrin utama dan skrin kunci"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Kongsi"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Persembahan slaid"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Kiraan termasa"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Rapikan"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Tiada had"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Kesahan"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Vendor"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Pemindahan fail"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Jangan tunjuk lagi"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Tekan dan pegang di dua titik kemudian mencondongkan peranti ke belakang and depan untuk mengurangkan atau membesarkan skrin"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Belajar mengenai condong"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Semua album"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Teg"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Hiasan latar skrin utama dan skrin kunci"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Guna gerakan"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Cipta teg"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Skrin utama dan skrin kunci"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Salin ke papan keratan"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Pangkas"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Skrin utama"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Skrin kunci"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Putar ke kiri"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Putar ke kanan"
+
diff --git a/main/res/po/no.po b/main/res/po/no.po
new file mode 100755 (executable)
index 0000000..124603f
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Akkumulert tid"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Legg til tagg"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Lagt til"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Alle"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Kan brukes antall ganger"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Grunnleggende"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Anropsbilde"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Antall"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Opprettet dato"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Skjerm"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Angi taggnavn"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Oppføringen er tom"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Utfør"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Filformat"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Filplassering"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Videresending"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Startskjermbakgrunn"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Umulig"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Individuell"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Intervall"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Ugyldig bildefil"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Breddegrad"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Plasseringer"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Skjermlåsbakgrunn"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Lengdegrad"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Maksimalt antall tegn (%d) er nådd"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "N/A"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Ny tagg"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Tillatelse avslått"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Mulig"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Skriv ut"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Skriv ut via Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Oppløsning"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Rettighetsstatus"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD-kort fjernet"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Velg enhet"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Servernavn"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Bruk som"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Angi bakgrunn for startskjerm og skjermlås"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Del"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Bildefremvisning"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Gjenværende tid"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Beskjær"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Ubegrenset"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Gyldighet"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Leverandør"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Filoverføring"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Ikke vis igjen"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Trykk og hold på to punkter og vipp enheten bakover og fremover for å forminske eller forstørre skjermen"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Lær om vipping"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Alle album"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Tagg"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Start- og skjermlåsbakgrunn"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Bruk bevegelse"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Oppr. tagg"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Startskjerm og skjermlås"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Kopier til utklippstavle"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Beskjær"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Startskjermbilde"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Skjermlås"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Roter mot klokken"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Roter med klokken"
+
diff --git a/main/res/po/pl.po b/main/res/po/pl.po
new file mode 100755 (executable)
index 0000000..6135001
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Łączny czas połączeń"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Dod.etyk."
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Dodano"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Dowolny"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Dostępne zastosowania"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Podstawowy"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Zdjęcie kontaktu"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Liczba"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Data utworzenia"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Wyświetlacz"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Wprowadź nazwę znacznika"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Wpis jest pusty"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Wykonaj"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Format pliku"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Lokalizacja pliku"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Przesyłanie"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Tapeta ekranu start."
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Niemożliwe"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Osobiste"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Okres"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Nieprawidłowy plik obrazu"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Szerokość geogr."
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Lokalizacje"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Tapeta ekranu blokady"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Długość geogr."
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Osiągnięto maksymalną liczbę znaków (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "Brak"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Nowa etykieta"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Nie udzielono zezwolenia"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Możliwe"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Drukuj"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Drukuj przez Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Rozdzielczość"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Status uprawnienia"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "Wyjęto kartę pamięci"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Wybierz urządzenie"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Nazwa serwera"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Ustaw jako"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Ustaw tapetę ekranu startowego i ekranu blokady"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Udostępnij"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Pokaz slajdów"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Licznik synchronizowany"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Przytnij"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Nieograniczony"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Ważność"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Dostawca"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Przesyłanie plików"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Nie wyświetlaj ponownie"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Dotknij i przytrzymaj w dwóch punktach, a następnie obróć urządzenie w jedną stronę i z powrotem, aby pomniejszyć lub powiększyć ekran"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Poznaj funkcję obracania"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Wszystkie albumy"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Etykieta"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Tapeta ekranu startowego i ekranu blokady"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Użycie ruchu"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Utw.etyk."
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Ekrany startowy i blokowania"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Kopiuj do schowka"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Przytnij"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Ekran startowy"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Ekran blokady"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Obróć w lewo"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Obróć w prawo"
+
diff --git a/main/res/po/ro.po b/main/res/po/ro.po
new file mode 100755 (executable)
index 0000000..7466e6d
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Timp cumulat"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Ad. eti."
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Adăugat"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Oricare"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Utilizări disponibile"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "De bază"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Imagine apelant"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Contor"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Data creării"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Ecran"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Introduceţi numele unei etichete"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Locaţie liberă"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Executare"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Format fişier"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Locaţie fişier"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Redirecţionare"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Fundal ecran pornire"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Imposibil"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Individual"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Interval"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Fişier de imagini nevalid"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Latitudine"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Locaţii"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Bloc. fundal ec. por."
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Longitudine"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Numărul maxim de caractere (%d) a fost atins"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "Nedisponibil"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Etichetă nouă"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Permisiunea a fost refuzată"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Posibil"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Imprimare"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Imprimare prin Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Rezoluţie"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Stare drepturi"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "Cartela SD a fost eliminată"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Selectare dispozitiv"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Nume server"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Setare ca"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Setare fundal pentru ecran de pornire şi blocare ecran."
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Partajare"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Expuneri diapozitive"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Numărătoare temporizată"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Decupare"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Nelimitat"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Valabilitate"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Distribuitor"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Transfer fişier"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Nu se mai afişează"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Atingeţi şi menţineţi două puncte, apoi înclinaţi dispozitivul înainte şi înapoi pentru a micşora sau pentru a mări ecranul"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Aflaţi despre înclinare"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Toate albumele"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Etichetă"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Fundal ecran de pornire şi de blocare"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Utilizare mişcare"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Creare"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Ecrane de pornire şi de blocare"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Copiere în clipboard"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Tăiere"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Ecran de pornire"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Blocare ecran"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Rotire stânga"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Rotire dreapta"
+
diff --git a/main/res/po/sk.po b/main/res/po/sk.po
new file mode 100755 (executable)
index 0000000..db0400d
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Akumulovaný čas"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Pr. znač."
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Pridané"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Všetko"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Počet použití k dispozícii"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Základný"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Obrázok volajúceho"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Počet"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Dátum vytvorenia"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Displej"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Zadajte názov značky"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Prázdna položka"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Vykonať"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Formát súboru"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Umiestnenie súboru"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Preposlanie"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Tapeta úv. obrazovky"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Nemožné"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Jednotlivé"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Interval"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Neplatný súbor s obrázkom"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Zemepisná šírka"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Umiestnenia"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Tapeta uzamk. obraz."
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Zemepisná dĺžka"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Dosiahol sa maximálny počet znakov (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "Nedá sa použiť"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Nová značka"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Povolenie odmietnuté"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Možné"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Tlač"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Tlačiť cez Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Rozlíšenie"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Stav práv"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "Karta SD je odstránená"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Vyberte zariadenie"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Názov servera"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Nastaviť ako"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Nastaviť tapetu úvodnej obrazovky a uzamknúť obrazovku"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Zdieľať"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Prezentácia"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Časovaný počet"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Orezať"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Neobmedzené"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Platnosť"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Dodávateľ"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Prenos súboru"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Už nezobrazovať"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Ťuknite na dva body, podržte ich stlačené a potom naklonením zariadenia tam a späť môžete zmenšiť alebo zväčšiť obrazovku"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Informácie o naklonení"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Všetky albumy"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Značka"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Tapeta domovskej a zamknutej obrazovky"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Použiť pohyb"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Vytv. zn."
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Domovská obrazovka a zamknutá obrazovka"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Kopírovať do schránky"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Orezať"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Úvodná obrazovka"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Uzamknúť obrazovku"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Otočiť doľava"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Otočiť doprava"
+
diff --git a/main/res/po/sl.po b/main/res/po/sl.po
new file mode 100755 (executable)
index 0000000..1517a89
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Skupni čas"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Dodaj ozn."
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Dodano"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Karkoli"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Število uporab"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Osnovno"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Slika klicatelja"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Štetje"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Datum ustvarjanja"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Zaslon"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Vnesite ime oznake"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Prazen vnos"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Izvedi"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Zapis datoteke"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Lokacija datoteke"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Posredovanje"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Ozadje za dom. zaslon"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Nemogoče"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Posamezno"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Interval"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Neveljavna slikovna datoteka"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Zemljepisna širina"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Lokacije"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Ozadje za zak. zaslon"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Zemljepisna dolžina"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Doseženo je največje število znakov (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "Ni nastavljeno"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Nova oznaka"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Dovoljenje zavrnjeno"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Mogoče"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Tiskanje"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Tiskanje prek Bluetootha"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Ločljivost"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Stanje pravic"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "Kartica SD je bila odstranjena"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Izberite napravo"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Ime strežnika"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Nastavi kot"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Nastavi ozadje za domači zaslon in zakleni zaslon"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Deli"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Diaprojekcija"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Časovno število"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Obreži"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Neomejeno"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Veljavnost"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Ponudnik"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Prenos datotek"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Ne kaži več"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Pritisnite in držite na dveh točkah, nato pa nagnite napravo nazaj in naprej, da zmanjšate ali razširite zaslon"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Več o nagibu"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Vsi albumi"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Oznaka"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Ozadje za domači in zaklenjen zaslon"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Uporabi gibanje"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Ustv. ozn."
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Domači in zaklenjen zaslon"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Kopiraj v odložišče"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Obreži"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Domači zaslon"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Zakleni zaslon"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Zavrti v levo"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Zavrti v desno"
+
diff --git a/main/res/po/sr.po b/main/res/po/sr.po
new file mode 100755 (executable)
index 0000000..5d44e7b
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Akumulirano vreme"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Označi"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Dodato"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Sve"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Moguće upotrebe"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Osnovni"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Slika pozivaoca"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Broj"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Datum kreiranja"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Ekran"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Unesi naziv oznake"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Unos je prazan"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Izvrši"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Format fajla"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Lokacija fajla"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Prosleđivanje"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Tapet početnog ekrana"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Nemoguće"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Pojedinačno"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Interval"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Neispravna slika"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Geografska širina"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Lokacije"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Tapet zaključ. ekrana"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Geografska dužina"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Dostignut maksimalan broj karaktera (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "Nema"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Nova oznaka"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Dozvola odbijena"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "moguće"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Štampaj"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Štampaj putem Bluetooth-a"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Rezolucija"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Pravni status"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD kartica izvađena"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Izaberi uređaj"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Naziv servera"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Postavi kao"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Podesi tapete za početni i zaključani ekran"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Podeli"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Slajd-šou"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Preostalo vreme"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Odseci"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Neograničeno"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Važenje"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Dobavljač"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Prenos fajlova"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Ne prikazuj ponovo"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Kucni i drži u dve tačke, pa nagni uređaj u nazad ili napred da smanjiš ili povećaš prikaz"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Saznaj o naginjanju"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Svi albumi"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Oznaka"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Tapet početnog i zaključanog ekrana"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Koristi pokrete"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Označi"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Početni i zaključani ekrani"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Kopiraj u privremenu memoriju"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Opseci"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Početni ekran"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Zaključavanje ekrana"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Rotiraj ulevo"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Rotiraj udesno"
+
diff --git a/main/res/po/sv.po b/main/res/po/sv.po
new file mode 100755 (executable)
index 0000000..6ddfd51
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Sammanlagd tid"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Lägg till tagg"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Tillagd"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Alla"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Tillgängliga tillämpningar"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Grundläggande"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Foto-ID"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Antal"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Skapat den"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Display"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Ange taggnamn"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Posten är tom"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Exekvera"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Filformat"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Filplats"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Vidarebefordra"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Bakg. för startsidan"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Ej möjlig"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Individuell"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Intervall"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Ogiltig bildfil"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Latitud"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Platser"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Bakgrund för låsskärm"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Longitud"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Högsta antal tecken (%d) har uppnåtts"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "Saknas"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Ny tagg"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Tillstånd nekades"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Möjlig"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Skriv ut"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Skriv ut via Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Upplösning"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Rättighetsstatus"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD-kortet har tagits bort"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Välj enhet"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Servernamn"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Använd som"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Ange bakgrund för startsidan och låsskärmen"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Dela"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Bildspel"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Tidsgräns för räkning"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Beskär"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Obegränsad"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Giltighet"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Leverantör"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Filöverföring"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Visa inte igen"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Tryck och håll ned på två punkter och vinkla sedan enheten framåt eller bakåt för att förstora eller förminska skärmen"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Lär dig mer om luta"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Alla album"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Tagg"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Bakgrund för start- och låsskärmen"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Använd rörelse"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Skapa tagg"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Hem och låsskärmar"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Kopiera till Urklipp"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Beskär"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Startsida"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Låsskärm"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Rotera moturs"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Rotera medurs"
+
diff --git a/main/res/po/th.po b/main/res/po/th.po
new file mode 100755 (executable)
index 0000000..f63c307
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "เวลา​สะสม"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "เพิ่ม​แท็ก"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "เพิ่ม​แล้ว"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "ใดๆ"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "อนุญาต​ใช้"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "พื้น​ฐาน"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "รูป​ภาพ​ผู้​โทร"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "ผล​รวม"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "วัน​ที่​ผลิต"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "จอภาพ"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "ใส่​ชื่อ​แท็ก"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "รายการ​ว่าง"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "ทำ​งาน"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "รูป​แบบ​ไฟล์"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "ตำแหน่ง​ไฟล์"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "ส่ง​ต่อ"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "วอ​ลเปเปอร์​หน้า​จอ​หลัก"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "ไม่​ได้"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "ที​ละ​รายการ"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "ช่วง​เวลา"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "ไฟล์​รูป​ภาพ​ใช้​ไม่​ได้"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "ละติจูด"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "ตำแหน่ง"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "วอ​ลเปเปอร์​ล็อก​หน้า​จอ"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "ลอง​ติ​จู​ด"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "ถึง​จำนวน​ตัว​อักษร​สูง​สุด (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "ไม่​ระบุ"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "แท็ก​ใหม่"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "ไม่​อนุญาต"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "ได้"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "พิมพ์"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "พิมพ์​ผ่า​นบ​ลู​ทู​ธ"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "ความ​ละเอียด"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "สถานะ​สิทธิ"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "ถอด SD ​การ์ด​แล้ว"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "เลือก​อุปกรณ์"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "ชื่อ​เซิร์ฟเวอร์"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "ตั้ง​เป็น"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "ตั้ง​วอ​ลเปเปอร์​สำหรับ​หน้า​จอ​หลัก​และ​การ​ล็อก​หน้า​จอ"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "แชร์"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "เลื่อนชม"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "นับ​เวลา​ที่​ผ่าน"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "ตัด​แต่ง"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "ไม่​จำกัด"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "การอนุมัติ"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "ผู้​ให้​บริการ"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "การ​ถ่าย​โอน​ไฟล์"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "ห้าม​แสดง​อีก"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "สัมผัส​ค้าง​ไว้​ทั้ง​สอง​จุด​แล้ว​เอียง​อุปกรณ์​ไป​มา​เพื่อ​ลด​หรือ​ขยาย​หน้า​จอ"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "เรียน​รู้​การ​เอียง"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "อัลบั้ม​ทั้ง​หมด"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "แท็ก"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "วอลเปเปอร์หน้าหลักและหน้าจอล็อค"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "ใช้​การ​เคลื่อน​ไหว"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "สร้าง​แท็ก"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "หน้าจอหลักและหน้าจอล็อค"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "คัด​ลอก​ไป​ยัง​คลิ​ป​บอร์ด"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "ตัด​บาง​ส่วน"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "หน้า​จอ​หลัก"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "ล็อก​หน้า​จอ"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "หมุน​ซ้าย"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "หมุน​ขวา"
+
diff --git a/main/res/po/uk.po b/main/res/po/uk.po
new file mode 100755 (executable)
index 0000000..bf5325a
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Загальний час"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Додати тег"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Додано"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Any"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Доступні використання"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Основний"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Зображення абонента"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Кількість"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Дату створено"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Дисплей"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Ввести ім’я тегу"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Запис порожній"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Виконати"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Формат файла"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Розташування файла"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Переадресація"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Заставка екр. оформ."
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Неможливо"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Індивідуальні"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Інтервал"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Хибний файл зображення"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Широта"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Розташування"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Блок. екр. заставки"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Довгота"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Досягнуто максимальної кількості символів: %d"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "Н/Д"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Новий тег"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "У дозволі відмовлено"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Можливо"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Друк"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Друк через Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Роздільна здатність"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Стан прав"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "Карту пам’яті видалено"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Вибрати пристрій"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Ім’я сервера"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Встановити як"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Встановлення заставки для екрана оформлення та екрана блокування"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Надіслати"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Слайд-шоу"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Тривалість використання"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Обробити"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Необмежено"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Термін дії"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Постачальник"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Передача файла"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Більше не показувати"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Натисніть і утримуйте у двох точках, а потім нахиляйте пристрій назад або вперед, щоб зменшити або збільшити зображення на екрані"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Відомості про нахил"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Усі альбоми"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Тег"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Заставка для екранів оформлення та блокування"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Використовувати рух"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Створ. тег"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Екрани оформлення та блокування"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Копіювати в буфер обміну"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Обрізати"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Головний екран"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Екран блокування"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Обернути ліворуч"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Обернути праворуч"
+
diff --git a/main/res/po/vi.po b/main/res/po/vi.po
new file mode 100755 (executable)
index 0000000..c82c054
--- /dev/null
@@ -0,0 +1,186 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Thời gian gộp"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Thêm từ khóa"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Đã thêm"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Bất kỳ"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Các ứng dụng"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Cơ bản"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Ảnh người gọi"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Đếm"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Ngày tạo"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Hiển thị"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Nhập tên từ khóa"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Mục nhập trống"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Thực hiện"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Định dạng file"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Vị trí file"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Chuyển tiếp"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Hình nền chờ"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Không thể được"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Cá nhân"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Interval"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "File ảnh không hợp lệ"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Vĩ độ"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Vị trí"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Hình nền khóa"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Kinh độ"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Đã đạt số ký tự tối đa (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "N/A"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Thẻ mới"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Cho phép đã từ chối"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Có thể"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "In"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "In qua Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Độ phân giải"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Trạng thái bản quyền"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "Đã tháo thẻ nhớ SD"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Chọn thiết bị"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Tên Server"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Chọn làm"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Đặt hình nền cho màn hình chính và khóa màn hình"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Chia sẻ"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Xem từng hình"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Bộ đếm thời gian"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Cắt một đoạn"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Không giới hạn"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Hiệu lực"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Người bán hàng"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Chuyển file"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Không hiện lại"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Chạm và giữ ở hai điểm sau đó nghiêng điện thoại tới lui để thu nhỏ hoặc phóng to màn hình"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Tìm hiểu về "nghiêng""
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Tất cả album"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Tag"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Màn hình nền trang chủ và màn hình khóa"
+
+msgid "IDS_IV_OPT_USE_MOTION"
+msgstr "Sử dụng chuyển động"
+
+msgid "IDS_MEDIABR_OPT_CREATE_TAG"
+msgstr "Tạo thẻ"
+
+msgid "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"
+msgstr "Màn hình chờ và màn hình khóa"
+
+msgid "IDS_IV_OPT_COPY_TO_CLIPBOARD"
+msgstr "Chép vào bảng tạm"
+
+msgid "IDS_IV_BODY_CROP"
+msgstr "Xén"
+
+msgid "IDS_IV_BODY_HOME_SCREEN"
+msgstr "Màn hình chờ"
+
+msgid "IDS_IV_BODY_LOCK_SCREEN"
+msgstr "Màn hình khóa"
+
+msgid "IDS_IV_OPT_ROTATE_LEFT"
+msgstr "Xoay trái"
+
+msgid "IDS_IV_OPT_ROTATE_RIGHT"
+msgstr "Xoay phải"
+
diff --git a/main/src/control/ivug-context.c b/main/src/control/ivug-context.c
new file mode 100755 (executable)
index 0000000..d6b8b95
--- /dev/null
@@ -0,0 +1,364 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-common.h"
+#include "ivug-util.h"
+
+#include "ivug-db.h"
+
+#include <ui-gadget-module.h>          // ug_destroy_me
+#include "ivug-context.h"
+
+#define MAX_INSTALNCE (5)
+
+typedef struct
+{
+       ui_gadget_h ug;                 // ug handle
+
+       Evas_Object *parent_win;
+// EFL theme
+       Elm_Theme *th;
+
+// Window Geometry
+       int win_w, win_h;       //size
+       int rot;                //window rotation value ( 0~360 )
+
+       callback_handle_t *callback_handle;
+
+} AppData;
+
+static Eina_List *ContextList = NULL;
+
+Elm_Theme*
+gGetSystemTheme(void)
+{
+       AppData *ugContext;
+       ugContext = eina_list_data_get(ContextList);
+
+       IV_ASSERT(ugContext != NULL);
+
+       return ugContext->th;
+}
+
+void
+gGetSystemDimension(int *w, int *h)
+{
+       AppData *ugContext;
+       ugContext = eina_list_data_get(ContextList);
+
+       IV_ASSERT(ugContext != NULL);
+       IV_ASSERT(w != NULL);
+       IV_ASSERT(h != NULL);
+
+       *w = ugContext->win_w;
+       *h = ugContext->win_h;
+}
+
+
+void
+gSetRotationDegree(int degree)
+{
+       AppData *ugContext;
+       ugContext = eina_list_data_get(ContextList);
+
+       IV_ASSERT(ugContext != NULL);
+
+       ugContext->rot = degree;
+}
+
+
+
+int
+gGetRotationDegree(void)
+{
+#if 0
+       AppData *ugContext;
+       ugContext = eina_list_data_get(ContextList);
+
+       IV_ASSERT(ugContext != NULL);
+
+       return ugContext->rot;
+#else
+       return elm_win_rotation_get(ug_get_window());
+#endif
+
+}
+
+int gGetScreenWidth()
+{
+       AppData *ugContext;
+       ugContext = eina_list_data_get(ContextList);
+
+       IV_ASSERT(ugContext != NULL);
+
+       return ugContext->win_w;
+
+}
+
+int gGetScreenHeight()
+{
+       AppData *ugContext;
+       ugContext = eina_list_data_get(ContextList);
+
+       IV_ASSERT(ugContext != NULL);
+
+       return ugContext->win_h;
+
+}
+
+ui_gadget_h
+gGetUGHandle(void)
+{
+       AppData *ugContext;
+       ugContext = eina_list_data_get(ContextList);
+
+       IV_ASSERT(ugContext != NULL);
+
+       MSG_IMAGEVIEW_HIGH("Get ug handle = 0x%08x", ugContext->ug);
+
+       return ugContext->ug;
+}
+
+Evas_Object *
+gGetCurrentWindow(void)
+{
+       AppData *ugContext;
+       ugContext = eina_list_data_get(ContextList);
+
+       IV_ASSERT(ugContext != NULL);
+
+       MSG_IMAGEVIEW_HIGH("Get ug handle = 0x%08x", ugContext->ug);
+
+       return ugContext->parent_win;
+}
+
+callback_handle_t *
+gGetCallbackHandle(void)
+{
+       AppData *ugContext;
+       ugContext = eina_list_data_get(ContextList);
+
+       IV_ASSERT(ugContext != NULL);
+
+       return ugContext->callback_handle;
+}
+
+
+#define IVUG_NAVIFRAME_NAME EDJ_PATH"/ivug-naviframe.edj"
+#define IVUG_TOOLBAR_NAME EDJ_PATH"/ivug-toolbar.edj"
+#define IVUG_BUTTON_NAME EDJ_PATH"/ivug-button.edj"
+#define IVUG_SELECTION_INFO_NAME       EDJ_PATH"/ivug-selectioninfo.edj"
+#define IVUG_GENLIST   EDJ_PATH"/ivug-genlist.edj"
+#define IVUG_GENGRID   EDJ_PATH"/ivug-gengrid.edj"
+
+static char *edj[] = {
+       IVUG_NAVIFRAME_NAME,
+       IVUG_TOOLBAR_NAME,
+       IVUG_BUTTON_NAME,
+       IVUG_SELECTION_INFO_NAME,
+       IVUG_GENLIST,
+       IVUG_GENGRID,
+       NULL,
+};
+
+bool
+ivug_context_init(ui_gadget_h ug)
+{
+       AppData *Context = malloc(sizeof(AppData));
+       if(Context == NULL)
+       {
+               MSG_IVUG_ERROR("Cannot allock memory");
+               return false;
+       }
+
+       Context->ug = ug;
+       Context->parent_win = ug_get_window();
+
+       if ( Context->parent_win )
+       {
+               Context->rot = elm_win_rotation_get(Context->parent_win);
+       }
+       else
+       {
+               MSG_IMAGEVIEW_WARN("Cannot get parent window. rotation angle set as 0");
+               Context->rot = 0;
+       }
+
+//get window width, height
+       int w, h;
+
+       evas_object_geometry_get(Context->parent_win, NULL, NULL, &w, &h);
+       MSG_IMAGEVIEW_HIGH("Screen WH(%dx%d)", w, h);
+//     ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
+       Context->win_w = w;
+       Context->win_h = h;
+
+       int i = 0;
+
+       Context->th = elm_theme_new();
+
+       IV_ASSERT(Context->th != NULL);
+
+       elm_theme_ref_set(Context->th, NULL);
+
+       for ( i = 0; edj[i] != NULL; i++)
+       {
+               elm_theme_extension_add(Context->th, edj[i]);
+       }
+
+       ContextList = eina_list_prepend(ContextList, Context);
+
+       MSG_IVUG_HIGH("Append to list. Context=0x%08x", Context);
+
+#ifdef USE_NEW_DB_API
+       ivug_db_create();
+#endif
+
+       Context->callback_handle = ivug_callback_register();
+       if(Context->callback_handle == NULL)
+       {
+               MSG_IVUG_ERROR("ivug_callback_register error");
+               goto ERROR;
+       }
+
+       bindtextdomain(IVUG_TEXT_DOMAIN, IVUG_LOCALEDIR);       //bind text domain
+       return TRUE;
+
+/**** Error routine ****/
+ERROR:
+
+       if(Context->callback_handle)
+       {
+               ivug_callback_unregister(Context->callback_handle);
+       }
+
+#ifdef USE_NEW_DB_API
+       ivug_db_destroy();
+#endif
+
+       Context = eina_list_data_get(ContextList);
+       ContextList = eina_list_remove_list(ContextList, ContextList);
+
+       if(Context->th)
+       {
+               int i = 0;
+               for ( i = 0; edj[i] != NULL; i++)
+               {
+                       elm_theme_extension_del(Context->th, edj[i]);
+               }
+
+               elm_theme_free(Context->th);
+       }
+
+       MSG_IVUG_HIGH("Remove from list. Context=0x%08x, ug=0x%08x", Context, Context->ug);
+
+       free(Context);
+
+       return false;
+}
+
+
+bool
+ivug_context_deinit(ui_gadget_h ug)
+{
+       AppData *Context;
+
+       Eina_List *l = NULL;
+       Eina_List *l_next = NULL;
+
+       EINA_LIST_FOREACH_SAFE(ContextList, l, l_next, Context)
+       {
+               if(Context == NULL)
+               {
+                       MSG_SDATA_ERROR("Context is NULL");
+                       return false;
+               }
+               if (Context->ug == ug)
+               {
+                       ContextList = eina_list_remove_list(ContextList, l);
+                       break;
+               }
+       }
+
+       if(Context->callback_handle)
+       {
+               ivug_callback_unregister(Context->callback_handle);
+       }
+
+#ifdef USE_NEW_DB_API
+       PERF_CHECK_BEGIN(LVL2, "ivug_db_destroy");
+       ivug_db_destroy();
+       PERF_CHECK_END(LVL2, "ivug_db_destroy");
+#endif
+
+       PERF_CHECK_BEGIN(LVL2, "elm_theme_free");
+       if(Context->th)
+       {
+               int i = 0;
+               for ( i = 0; edj[i] != NULL; i++)
+               {
+                       elm_theme_extension_del(Context->th, edj[i]);
+               }
+               elm_theme_free(Context->th);
+       }
+       PERF_CHECK_END(LVL2, "elm_theme_free");
+
+       MSG_IVUG_HIGH("Remove from list. Context=0x%08x, ug=0x%08x", Context, Context->ug);
+
+       free(Context);
+
+       return true;
+}
+
+
+void ivug_context_destroy_me(const char *file, int line)
+{
+#if 0
+       int x = 0;
+       int y = 0;
+       int w = 0;
+       int h = 0;
+
+       MSG_MAIN_WARN("Apply event blocker");
+       pMainView->event_blocker = evas_object_rectangle_add(evas_object_evas_get(pMainView->layout));
+       evas_object_geometry_get(pMainView->layout, &x, &y, &w, &h);
+       evas_object_move(pMainView->event_blocker, x, y);
+       evas_object_resize(pMainView->event_blocker, w, h);
+       evas_object_color_set(pMainView->event_blocker, 0, 0, 0, 0);
+       evas_object_show(pMainView->event_blocker);
+
+       if(/* It is launched by app service */)
+       {
+               MSG_MAIN_HIGH("Hide UG");
+               elm_win_lower(ug_get_window());
+               return;
+       }
+#endif
+       AppData *ugContext;
+       ugContext = eina_list_data_get(ContextList);
+
+       //IV_ASSERT(ugContext != NULL);
+       if (NULL != ugContext) {
+
+               MSG_IMAGEVIEW_HIGH("Get ug handle = 0x%08x", ugContext->ug);
+               ug_destroy_me(ugContext->ug);
+       } else {
+               MSG_IMAGEVIEW_HIGH("ugContext is NULL.");
+       }
+
+}
+
+
diff --git a/main/src/control/ivug-context.h b/main/src/control/ivug-context.h
new file mode 100755 (executable)
index 0000000..69e9270
--- /dev/null
@@ -0,0 +1,71 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+
+#ifndef __IVUG_CONTEXT_H__
+#define __IVUG_CONTEXT_H__
+
+#include "ivug-common.h"
+#include "ivug-callback.h"
+#include <ui-gadget.h>
+
+/*
+       Managing context(instance)
+*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+bool
+ivug_context_deinit(ui_gadget_h ug);
+
+bool
+ivug_context_init(ui_gadget_h ug);
+
+void
+ivug_context_destroy_me(const char *file, int line);
+
+#define DESTROY_ME() \
+       do { \
+               ivug_context_destroy_me(__FILE__, __LINE__); \
+       } while(0)
+
+void
+gSetRotationDegree(int degree);
+
+Elm_Theme*
+gGetSystemTheme(void);
+
+int
+gGetRotationDegree(void);
+
+ui_gadget_h
+gGetUGHandle(void);
+
+Evas_Object *
+gGetCurrentWindow(void);
+
+callback_handle_t *
+gGetCallbackHandle(void);
+
+int gGetScreenWidth();
+int gGetScreenHeight();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //__IVUG_CONTEXT_H__
\ No newline at end of file
diff --git a/main/src/control/ivug-crop-ug.cpp b/main/src/control/ivug-crop-ug.cpp
new file mode 100755 (executable)
index 0000000..13bcb40
--- /dev/null
@@ -0,0 +1,142 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include <Elementary.h>
+#include <ui-gadget.h>
+#include <ui-gadget-module.h>          // ug_destroy_me, ug_send_result
+
+#include "ivug-crop-view.h"
+#include "ivug-crop-ug.h"
+
+#include "ivug-debug.h"
+#include "ivug-string.h"
+#include "ivug-context.h"
+
+#undef LOG_LVL
+#define LOG_LVL DBG_MSG_LVL_MED
+
+#undef LOG_CAT
+#define LOG_CAT "IV-CROP-UG"
+
+static void
+_send_result(ui_gadget_h ug, const char *key1, const char *val1, const char *key2, const char *val2)
+{
+       ivug_ret_if(!ug);
+
+       service_h service;
+       service_create(&service);
+
+       if(key1 && val1)
+       {
+               MSG_HIGH("Bundle 1 : [%s = %s]", key1, val1);
+               service_add_extra_data(service, key1, val1);
+       }
+       if(key2 && val2)
+       {
+               MSG_HIGH("Bundle 2 : [%s = %s]", key2, val2);
+               service_add_extra_data(service, key2, val2);
+       }
+       ug_send_result(gGetUGHandle(), service);
+
+       service_destroy(service);
+}
+
+static void  _ivug_crop_view_ok_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       char *path = (char *)event_info;
+
+       evas_object_smart_callback_del(obj, "ok,clicked", _ivug_crop_view_ok_clicked_cb);
+
+       _send_result(gGetUGHandle(), "crop_image_path", path, NULL, NULL);
+
+       MSG_HIGH("Start destroy ug");
+       ug_destroy_me(gGetUGHandle());
+}
+
+static void  _ivug_crop_view_cancel_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       //ivug_crop_ug_destroy((IvugCropUG *)data);
+
+       evas_object_smart_callback_del(obj, "cancel,clicked", _ivug_crop_view_cancel_clicked_cb);
+
+       _send_result(gGetUGHandle(), "crop_image_path", NULL, NULL, NULL);
+
+       MSG_HIGH("Start destroy ug");
+       ug_destroy_me(gGetUGHandle());
+}
+
+static void  _ivug_crop_view_destroyed_cb(void *data, Evas_Object *obj, void *event_info)
+{\r
+       IvugCropUG *crop_ug = (IvugCropUG *)data;
+
+       crop_ug->crop_view = NULL;
+}
+
+IvugCropUG * ivug_crop_ug_create(Evas_Object *parent, int w, int h, bool bRatioFix, const char *filepath)
+{
+       IvugCropUG *crop_ug = (IvugCropUG *)calloc(1, sizeof(IvugCropUG));
+
+       IvugCropView *crop_view = NULL;
+       Evas_Object *layout = NULL;
+
+       crop_view = ivug_crop_view_create(parent);
+       if(crop_view == NULL)
+       {
+               MSG_ERROR("ivug_crop_view_create error");
+               return NULL;
+       }
+
+       ivug_crop_view_box_size_set(crop_view, w, h);
+       ivug_crop_view_file_set(crop_view, filepath);
+       ivug_crop_view_box_ratio_fix(crop_view, bRatioFix);
+
+       layout = ivug_crop_view_get_object(crop_view);
+
+       evas_object_smart_callback_add(layout, "ok,clicked", _ivug_crop_view_ok_clicked_cb, crop_ug);
+       evas_object_smart_callback_add(layout, "cancel,clicked", _ivug_crop_view_cancel_clicked_cb, crop_ug);
+       evas_object_smart_callback_add(layout, "destroyed", _ivug_crop_view_destroyed_cb, crop_ug);
+
+       crop_ug->crop_view = crop_view;
+       crop_ug->layout = layout;
+       crop_ug->parent = parent;
+
+       return crop_ug;
+}
+
+Evas_Object * ivug_crop_ug_get_layout(IvugCropUG * crop_ug)
+{
+       IV_ASSERT(crop_ug != NULL);
+
+       return crop_ug->layout;
+}
+
+bool ivug_crop_ug_destroy(IvugCropUG * crop_ug)
+{
+       IV_ASSERT(crop_ug != NULL);
+
+       if(crop_ug->crop_view)
+       {
+               ivug_crop_view_destroy(crop_ug->crop_view);
+               crop_ug->crop_view = NULL;
+       }
+       crop_ug->layout = NULL;
+
+       free(crop_ug);
+
+       return true;
+}
+
+
diff --git a/main/src/control/ivug-crop-ug.h b/main/src/control/ivug-crop-ug.h
new file mode 100755 (executable)
index 0000000..d1921a1
--- /dev/null
@@ -0,0 +1,44 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_CROP_UG_H__
+#define __IVUG_CROP_UG_H__
+
+#include "ivug-crop-view.h"
+
+typedef struct {
+       IvugCropView *crop_view;
+       Evas_Object *layout;
+       Evas_Object *parent;
+} IvugCropUG;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+IvugCropUG * ivug_crop_ug_create(Evas_Object *parent, int w, int h, bool bRatioFix, const char *filepath);
+
+Evas_Object * ivug_crop_ug_get_layout(IvugCropUG * crop_ug);
+
+bool ivug_crop_ug_destroy(IvugCropUG * crop_ug);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif                 // __IVUG_CROP_UG_H__
+
diff --git a/main/src/control/ivug-detail-info.c b/main/src/control/ivug-detail-info.c
new file mode 100755 (executable)
index 0000000..d6f7f9f
--- /dev/null
@@ -0,0 +1,703 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-detail-info.h"
+
+#include <vconf.h>
+#include <vconf-keys.h>
+
+#include <drm_client.h>
+
+#include <runtime_info.h>
+
+#include <glib.h>
+
+#include <unicode/udat.h>
+#include <unicode/ustring.h>
+#include <unicode/uloc.h>
+#include <unicode/ucal.h>
+#include <unicode/udatpg.h>
+#include <unicode/utmscale.h>
+
+#include "ivug-details-view.h"
+#include <libexif/exif-data.h>
+
+#include "ivug-drm.h"
+#include "ivug-file-info.h"
+
+#define NOMAL_BUF              128
+
+#define DETAILS_DIR_PATH_LEN_MAX       4096
+
+enum IVUG_SIZE_TYPE
+{
+       SIZE_BYTE = 0,
+       SIZE_KB,
+       SIZE_MB,
+       SIZE_GB
+};
+
+/*
+       Shuld free returned value after use
+*/
+static char*
+_get_icu_time_string(const char *locale, const char *customSkeleton, const char *timezone, UDate date)
+{
+#define UG_ICU_ARR_LENGTH                      256
+
+       IV_ASSERT(customSkeleton != NULL);
+       IV_ASSERT(timezone != NULL);
+
+       /*
+               Copy a byte string encoded in the default codepage to a ustring.
+               Copies at most n characters. The result will be null terminated if the length of src is less than n. Performs a host byte to UChar conversion
+       */
+       UChar ucustomSkeleton[UG_ICU_ARR_LENGTH] = {0,};
+
+       if(u_uastrncpy(ucustomSkeleton, customSkeleton, UG_ICU_ARR_LENGTH) == NULL)
+       {
+               MSG_UTIL_ERROR("u_uastrncpy() error.");
+               return NULL;
+       }
+
+       UChar utimezone[UG_ICU_ARR_LENGTH] = {0,};
+
+       if ( u_uastrncpy(utimezone, timezone, UG_ICU_ARR_LENGTH) == NULL )
+       {
+               MSG_UTIL_ERROR("u_uastrncpy() error.");
+               return NULL;
+       }
+
+       UErrorCode status = U_ZERO_ERROR;
+       UDateTimePatternGenerator *generator;
+       UDateFormat     *formatter;
+
+       UChar bestPattern[UG_ICU_ARR_LENGTH] = {0,};
+       UChar formatted[UG_ICU_ARR_LENGTH] = {0,};
+       char formattedString[UG_ICU_ARR_LENGTH] = {0,};
+       int32_t bestPatternLength, formattedLength;
+
+       ucal_setDefaultTimeZone(utimezone , &status);
+
+       if (U_FAILURE(status))
+       {
+               MSG_UTIL_ERROR("ucal_setDefaultTimeZone() is failed");
+               return NULL;
+       }
+
+       uloc_setDefault(getenv("LC_TIME"), &status);
+
+       if (U_FAILURE(status))
+       {
+               MSG_UTIL_ERROR("ucal_setDefaultTimeZone() is failed");
+               return NULL;
+       }
+
+       generator = udatpg_open(locale, &status);
+       if(generator == NULL)
+       {
+               return NULL;
+       }
+
+       bestPatternLength = udatpg_getBestPattern(generator, ucustomSkeleton, u_strlen(ucustomSkeleton), bestPattern, UG_ICU_ARR_LENGTH, &status);
+       if(bestPatternLength <= 0)
+       {
+               return NULL;
+       }
+
+       formatter = udat_open(UDAT_IGNORE, UDAT_IGNORE, locale, NULL, -1, bestPattern, -1, &status);
+       if(formatter == 0)
+       {
+               return NULL;
+       }
+
+       formattedLength = udat_format(formatter, date, formatted, UG_ICU_ARR_LENGTH, NULL, &status);
+       if(formattedLength <= 0)
+       {
+               return NULL;
+       }
+
+       u_austrcpy(formattedString, formatted);
+       udatpg_close(generator);
+       udat_close(formatter);
+
+       if(strlen(formattedString) == 0)
+       {
+               return NULL;
+       }
+
+       return strdup(formattedString);
+}
+
+
+/*
+       Should free returned value after use
+*/
+static char *
+_get_drm_availabile_string(drm_permission_type_e permissionType)
+{
+       switch(permissionType)
+       {
+               case DRM_PERMISSION_TYPE_ANY:
+                       return strdup(IDS_ANY);
+                       break;
+
+               case DRM_PERMISSION_TYPE_PLAY:
+                       return strdup(IDS_PLAY);
+                       break;
+
+               case DRM_PERMISSION_TYPE_COLLABORATIVE_PLAY:
+                       return strdup(IDS_COLLABORATIVE_PLAY);
+                       break;
+
+               case DRM_PERMISSION_TYPE_DISPLAY:
+                       return strdup(IDS_DISPLAY);
+                       break;
+
+               case DRM_PERMISSION_TYPE_EXECUTE:
+                       return strdup(IDS_EXECUTE);
+                       break;
+
+               case DRM_PERMISSION_TYPE_PRINT:
+                       return strdup(IDS_PRINT);
+                       break;
+
+               case DRM_PERMISSION_TYPE_EXPORT_COPY:
+                         return strdup(IDS_COPY);
+                       break;
+
+               case DRM_PERMISSION_TYPE_EXPORT_MOVE:
+                         return strdup(IDS_MOVE);
+                       break;
+
+               default:
+                       return strdup(IDS_N_A);
+                       break;
+
+       }
+}
+
+static char*
+_get_icu_date(time_t mtime)
+{
+#define UG_DATE_FORMAT_12                      "yMMMdhms"
+#define UG_DATE_FORMAT_24                      "yMMMdHms"
+
+       char* skeleton = NULL;
+
+       bool hours_24 = false;
+       int ret = -1;
+
+       ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_24HOUR_CLOCK_FORMAT_ENABLED, &hours_24);
+       if(ret != RUNTIME_INFO_ERROR_NONE)
+       {
+               MSG_DETAIL_ERROR("Cannot get 24 hours format");
+               return NULL;
+       }
+
+       if(hours_24 == true)
+       {
+               skeleton = UG_DATE_FORMAT_24;
+       }
+       else
+       {
+               skeleton = UG_DATE_FORMAT_12;
+       }
+
+       char *locale = vconf_get_str(VCONFKEY_REGIONFORMAT);            /* eg. en_US.UTF-8*/
+       if(locale == NULL)
+       {
+               MSG_DETAIL_ERROR("Cannot get region format.");
+               locale = "en_US.UTF-8";         // Default value.
+       }
+
+       char *timezone = NULL;
+
+       timezone = vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_ID); // eg Asia/Seoul
+       if(timezone == NULL)
+       {
+// TODO : How to get default time zone????
+               MSG_DETAIL_ERROR("Cannot get time zone");
+               return NULL;
+       }
+
+       MSG_DETAIL_HIGH("Locale:%s TimeZone:%s TimeFormat:%s", locale, skeleton, timezone);
+
+       char* datestr = NULL;
+
+       datestr = _get_icu_time_string(locale, skeleton, timezone, (UDate)mtime * 1000);
+
+       if(datestr == NULL)
+       {
+               MSG_DETAIL_ERROR("Cannot get time string");
+               return NULL;
+       }
+
+       MSG_DETAIL_HIGH("ICU Date : %s", datestr);
+       return datestr;
+
+}
+
+static char *
+_get_filesize_string(size_t size)
+{
+#define FILE_SIZE_LEN_MAX                      64
+
+       MSG_DETAIL_HIGH("Entered size = %d", size);
+
+       char *tmp = (char *)calloc(1, sizeof(char)*(FILE_SIZE_LEN_MAX+1));
+       if (tmp == NULL)
+       {
+               return NULL;
+       }
+
+       if(size > (1<<30))      // GB
+       {
+               snprintf(tmp,FILE_SIZE_LEN_MAX,"%.1f GB", (double)size/(1<<30));
+       }
+       else if(size > (1<<20)) // MB
+       {
+               snprintf(tmp,FILE_SIZE_LEN_MAX,"%.1f MB", (double)size/(1<<20));
+       }
+       else if(size > (1<<10)) // KB
+       {
+               snprintf(tmp,FILE_SIZE_LEN_MAX,"%zu KB", size/(1<<10));
+       }
+       else    // Byte
+       {
+               snprintf(tmp,FILE_SIZE_LEN_MAX,"%zu B", size);
+       }
+
+       MSG_DETAIL_HIGH("Result Size = %s", tmp);
+       return tmp;
+}
+
+void
+ivug_details_info_set_file_information(ivug_file_info_t * const pFileInfo, const char *path)
+{
+       ivug_ret_if( NULL == pFileInfo );
+       ivug_ret_if( NULL == path );
+
+/*** get file path*/
+       pFileInfo->filepath = strdup(path);
+
+       struct stat statbuf;
+
+       if(stat(path,&statbuf) == -1)
+       {
+               MSG_DETAIL_ERROR("Cannot get stat()");
+               return ;
+       }
+
+       pFileInfo->size = statbuf.st_size;
+       pFileInfo->date = statbuf.st_mtime;
+
+       pFileInfo->create_date = _get_icu_date(pFileInfo->date);
+
+       if ( pFileInfo->create_date == NULL )
+       {
+               pFileInfo->create_date = strdup(IDS_N_A);
+       }
+
+       pFileInfo->file_ext = ivug_fileinfo_get_file_extension(path);
+
+       if ( pFileInfo->file_ext == NULL )
+       {
+               pFileInfo->file_ext = strdup(IDS_UNKNOWN);
+       }
+
+       pFileInfo->filesize = _get_filesize_string(pFileInfo->size);
+
+       MSG_DETAIL_HIGH("Basic Info : ext=%s size=%s", pFileInfo->file_ext, pFileInfo->filesize);
+
+       return ;
+
+}
+
+
+void
+ivug_details_info_set_gps_info(ivug_file_info_t * const pFileInfo, const char *path)
+{
+#define UG_EXIF_ARR_LENGTH                     255
+
+       ivug_retm_if(!pFileInfo, "data is NULL");
+       ivug_retm_if(!path, "path is NULL");
+
+       pFileInfo->longitude = calloc(1, sizeof(char)*UG_EXIF_ARR_LENGTH);
+       if(pFileInfo->longitude == NULL)
+       {
+               return;
+       }
+
+       pFileInfo->latitude = calloc(1, sizeof(char)*UG_EXIF_ARR_LENGTH);
+       if(pFileInfo->latitude == NULL)
+       {
+               return;
+       }
+
+
+       double longtitude = 0.0;
+       double latitude = 0.0;
+
+       bool bret = false;
+
+       if(pFileInfo->file_type == IVUG_DETAIL_IMAGE_TYPE)              // this will be removed!!!!
+       {
+               bret = ivug_fileinfo_get_image_gps_info(path, &latitude, &longtitude);
+       }
+       else if(pFileInfo->file_type == IVUG_DETAIL_VIDEO_TYPE)
+       {
+               bret = ivug_fileinfo_get_video_gps_info(path, &latitude, &longtitude);
+       }
+
+       if ( bret == false)
+       {
+               latitude = 0;
+               longtitude = 0;
+       }
+
+       if(latitude != 0.0)
+       {
+               snprintf(pFileInfo->latitude, UG_EXIF_ARR_LENGTH, "%.5f", latitude);
+       }
+       else
+       {
+               snprintf(pFileInfo->latitude, UG_EXIF_ARR_LENGTH, "%s", IDS_UNKNOWN);
+       }
+       if(longtitude != 0.0)
+       {
+               snprintf(pFileInfo->longitude, UG_EXIF_ARR_LENGTH, "%.5f", longtitude);
+       }
+       else
+       {
+               snprintf(pFileInfo->longitude, UG_EXIF_ARR_LENGTH, "%s", IDS_UNKNOWN);
+       }
+}
+
+void
+ivug_details_info_set_resolution(ivug_file_info_t * const pFileInfo, const char *path, int stype)
+{
+       ivug_retm_if(!pFileInfo, "data is NULL");
+       ivug_retm_if(!path, "path is NULL");
+
+       MSG_DETAIL_HIGH("slide type is %d", stype);
+
+       pFileInfo->resolution = (char *)malloc(sizeof(char)*NOMAL_BUF+1);
+       if(pFileInfo->resolution == NULL)
+       {
+               return ;
+       }
+       memset(pFileInfo->resolution,0,(sizeof(char)* NOMAL_BUF + 1));
+
+
+       int width, height;
+
+       switch(stype)
+       {
+               /*Image type && !drm*/
+               case SLIDE_TYPE_IMAGE:
+                       pFileInfo->file_type = IVUG_DETAIL_IMAGE_TYPE;
+
+                       if ( ivug_fileinfo_get_image_resolution(path, &width, &height) == false)
+                       {
+                               snprintf(pFileInfo->resolution, NOMAL_BUF, "%s", IDS_N_A);
+                       }
+                       else
+                       {
+                               snprintf(pFileInfo->resolution, NOMAL_BUF,"%dX%d", width, height);
+                       }
+
+                       break;
+
+               /*      Video type */
+               case SLIDE_TYPE_VIDEO:
+                       pFileInfo->file_type = IVUG_DETAIL_VIDEO_TYPE;
+
+                       if ( ivug_fileinfo_get_video_resolution(path, &width, &height) == false)
+                       {
+                               snprintf(pFileInfo->resolution, NOMAL_BUF, "%s", IDS_N_A);
+                       }
+                       else
+                       {
+                               snprintf(pFileInfo->resolution, NOMAL_BUF,"%dX%d", width, height);
+                       }
+
+
+                       break;
+
+               case SLIDE_TYPE_STREAMING:
+                       pFileInfo->file_type = IVUG_DETAIL_VIDEO_TYPE;
+                       break;
+
+               default:
+                       break;
+
+       }
+
+}
+
+void
+ivug_details_info_set_location(ivug_file_info_t * const pFileInfo, const char *path)
+{
+       ivug_retm_if(!pFileInfo, "data is NULL");
+       ivug_retm_if(!path, "path is NULL");
+
+       pFileInfo->file_location = strdup(path);
+}
+
+void
+ivug_details_info_set_filename(ivug_file_info_t * const pFileInfo, const char *path)
+{
+       ivug_retm_if(!pFileInfo, "data is NULL");
+       ivug_retm_if(!path, "path is NULL");
+
+       /** get file name */
+       pFileInfo->filename = ecore_file_strip_ext(ecore_file_file_get(path));
+}
+
+void _add_string(char *org, char *add_string)
+{
+       char *string = strdup(add_string);
+       if(org == NULL)
+       {
+               org = string;
+       }
+       else
+       {
+               org = g_strconcat(org, "/", string, NULL);
+               free(string);
+       }
+}
+
+void
+ivug_details_info_set_drm_info(ivug_file_info_t * const pFileInfo, const char *path)
+{
+#define VALIDITY_SIZE  80
+
+#define MOUNTH_COUNT   12                                      //used for drm file info,
+#define DAY_COUNT              30
+#define HOUR_COUNT             24
+#define SECOND_COUNT   3600.0
+
+       ivug_retm_if(!pFileInfo, "data is NULL");
+       ivug_retm_if(!path, "path is NULL");
+
+       pFileInfo->vendor = NULL;
+       pFileInfo->forwarding = NULL;
+       pFileInfo->available_uses = NULL;
+       pFileInfo->type = NULL;
+
+       bool valid_ro = false;
+
+       valid_ro = ivug_drm_has_valid_ro(path);
+
+       if(false == valid_ro)
+       {
+               MSG_DETAIL_WARN("%s is not valid right object", path);
+               return ;
+       }
+
+// Get Vendor
+       pFileInfo->vendor = ivug_drm_get_drm_vendor_info(path);
+
+       if ( pFileInfo->vendor == NULL )
+       {
+               // Set default value.
+               pFileInfo->vendor = strdup(IDS_UNKNOWN);
+       }
+
+// Get forwarding
+       if ( ivug_drm_get_forwarding_info(path) == true )
+       {
+               pFileInfo->forwarding = strdup(IDS_POSSIBLE);
+       }
+       else
+       {
+               pFileInfo->forwarding = strdup(IDS_IMPOSSIBLE);
+       }
+
+// Get Validity/Type/Available
+
+       drm_constraint_info_s constraint_info;
+       int ret = -1;
+       int i = -1;
+       char *string = NULL;
+       char validity[VALIDITY_SIZE] = "";
+
+       for(i=DRM_PERMISSION_TYPE_NONE; i<=DRM_PERMISSION_TYPE_EXPORT_MOVE; i++)
+       {
+               memset(&constraint_info, 0x0, sizeof(drm_constraint_info_s));
+
+               ret = drm_get_constraint_info(path, i, &constraint_info);
+               if(ret != DRM_RETURN_SUCCESS)
+               {
+                       MSG_IVUG_ERROR("drm_get_constraint_info Failed!!, perm_type=%d ret=0x%x", i, ret);
+                       continue;
+               }
+
+               string = _get_drm_availabile_string(i);
+               _add_string(pFileInfo->available_uses, string);
+               free(string);
+
+               if(constraint_info.const_type.is_unlimited)
+               {
+                       MSG_IVUG_HIGH("Unlimited:for permission=%d", i);
+
+                       _add_string(pFileInfo->type, IDS_UNLIMITED);
+                       _add_string(pFileInfo->validity, IDS_UNLIMITED);
+               }
+
+               if(constraint_info.const_type.is_accumulated){
+                       MSG_IVUG_HIGH("Accumulated Constraint is present");
+                       MSG_IVUG_HIGH("accumulated_original_seconds=%d",
+                                       constraint_info.accumulated_original_seconds);
+                       MSG_IVUG_HIGH("accumulated_remaining_seconds=%d",
+                                       constraint_info.accumulated_remaining_seconds);
+
+                       _add_string(pFileInfo->type, IDS_ACCUMULATED_TIME);
+                       snprintf(validity, sizeof(validity),"Total %.1f hours",
+                               constraint_info.accumulated_remaining_seconds/SECOND_COUNT);
+                       _add_string(pFileInfo->validity, validity);
+               }
+
+               if(constraint_info.const_type.is_count){
+                       MSG_IVUG_HIGH("Count Constraint is present");
+                       MSG_IVUG_HIGH("original_count=%d",
+                                       constraint_info.original_count);
+                       MSG_IVUG_HIGH("remaining_count=%d",
+                                       constraint_info.remaining_count);
+
+                       _add_string(pFileInfo->type, IDS_COUNT);
+                       snprintf(validity, sizeof(validity),"%d left", constraint_info.remaining_count);
+                       _add_string(pFileInfo->validity, validity);
+               }
+
+               if(constraint_info.const_type.is_datetime){
+                       MSG_IVUG_HIGH("DATETIME Constraint is present");
+                       MSG_IVUG_HIGH("start_time:"
+                                       "Year=%d,Month=%d,Day=%d,Hour=%d, minute=%d, Second=%d",
+                               constraint_info.start_time.tm_year,
+                               constraint_info.start_time.tm_mon,
+                               constraint_info.start_time.tm_mday,
+                               constraint_info.start_time.tm_hour,
+                               constraint_info.start_time.tm_min,
+                               constraint_info.start_time.tm_sec);
+
+                       MSG_IVUG_HIGH("end_time:"
+                                       "Year=%d,Month=%d,Day=%d,Hour=%d, minute=%d, Second=%d",
+                               constraint_info.end_time.tm_year,
+                               constraint_info.end_time.tm_mon,
+                               constraint_info.end_time.tm_mday,
+                               constraint_info.end_time.tm_hour,
+                               constraint_info.end_time.tm_min,
+                               constraint_info.end_time.tm_sec);
+
+                       _add_string(pFileInfo->type, IDS_TIME);
+                       snprintf(validity, sizeof(validity),"%d.%d.%d %d:%d ~  %d.%d.%d %d:%d:%d",
+                                       constraint_info.start_time.tm_mday,
+                                       constraint_info.start_time.tm_mon,
+                                       constraint_info.start_time.tm_year,
+                                       constraint_info.start_time.tm_hour,
+                                       constraint_info.start_time.tm_sec,
+                                       constraint_info.end_time.tm_mday,
+                                       constraint_info.end_time.tm_mon,
+                                       constraint_info.end_time.tm_year,
+                                       constraint_info.end_time.tm_hour,
+                                       constraint_info.end_time.tm_min,
+                                       constraint_info.end_time.tm_sec
+                                       );
+                       _add_string(pFileInfo->validity, validity);
+               }
+
+               if(constraint_info.const_type.is_individual){
+                       MSG_IVUG_HIGH("INDIVIDUAL Constraint is present");
+                       MSG_IVUG_HIGH("individual_identity_type=%d "
+                                       "individual_id=%s",
+                                       constraint_info.individual_identity_type,
+                                       constraint_info.individual_id);
+
+                       _add_string(pFileInfo->type, IDS_INDIVIDUAL);
+                       _add_string(pFileInfo->validity, IDS_INDIVIDUAL);
+               }
+
+               if(constraint_info.const_type.is_interval){
+                       MSG_IVUG_HIGH("INTERVAL Constraint is present");
+                       MSG_IVUG_HIGH("interval_time:"
+                                       "Year=%d,Month=%d,Day=%d,Hour=%d, minute=%d, Second=%d",
+                               constraint_info.interval_time.tm_year,
+                               constraint_info.interval_time.tm_mon,
+                               constraint_info.interval_time.tm_mday,
+                               constraint_info.interval_time.tm_hour,
+                               constraint_info.interval_time.tm_min,
+                               constraint_info.interval_time.tm_sec);
+
+                       _add_string(pFileInfo->type, IDS_INTERVAL);
+                       if(constraint_info.interval_time.tm_year == 0
+                               && constraint_info.interval_time.tm_mon == 0
+                               && constraint_info.interval_time.tm_mday == 0
+                               && constraint_info.interval_time.tm_hour == 0)
+                       {
+                               snprintf(validity, sizeof(validity),"Total %d miniutes", constraint_info.interval_time.tm_min);
+                       }
+                       else
+                       {
+                               snprintf(validity, sizeof(validity),"Total %d hours",
+                                               ((constraint_info.interval_time.tm_year*MOUNTH_COUNT
+                                                       + constraint_info.interval_time.tm_mon)*DAY_COUNT
+                                                       + constraint_info.interval_time.tm_mday)*HOUR_COUNT
+                                                       + constraint_info.interval_time.tm_hour
+                                               );
+                       }
+                       _add_string(pFileInfo->validity, validity);
+               }
+
+               if(constraint_info.const_type.is_system){
+                       MSG_IVUG_HIGH("SYSTEM Constraint is present");
+                       MSG_IVUG_HIGH("system_identity_type=%d "
+                                       "system_id=%s",
+                                       constraint_info.system_identity_type,
+                                       constraint_info.system_id);
+
+                       _add_string(pFileInfo->type, IDS_SYSTEM);
+                       _add_string(pFileInfo->validity, IDS_SYSTEM);
+               }
+
+               if(constraint_info.const_type.is_timedcount){
+                       MSG_IVUG_HIGH("TIMED-COUNT Constraint is present");
+                       MSG_IVUG_HIGH("timed_original_count=%d",
+                                       constraint_info.timed_original_count);
+
+                       MSG_IVUG_HIGH("timed_remaining_count=%d",
+                                       constraint_info.timed_remaining_count);
+
+                       MSG_IVUG_HIGH("timed_count_timer=%d",
+                                       constraint_info.timed_count_timer);
+
+                       _add_string(pFileInfo->type, IDS_TIMED_COUNT);
+                       snprintf(validity, sizeof(validity),"%d (%d sec)",
+                                                       constraint_info.timed_remaining_count,
+                                                       constraint_info.timed_count_timer
+                                       );
+                       _add_string(pFileInfo->validity, validity);
+               }
+
+               MSG_IVUG_WARN("Undefined constraints");
+       }
+
+       return;
+}
+
+
diff --git a/main/src/control/ivug-detail-info.h b/main/src/control/ivug-detail-info.h
new file mode 100755 (executable)
index 0000000..b98f14b
--- /dev/null
@@ -0,0 +1,85 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_DETAIL_COMMON_H__
+#define __IVUG_DETAIL_COMMON_H__
+
+#include <unicode/udat.h>
+
+#include "ivug-common.h"
+#include "ivug-drm.h"
+
+typedef enum {
+       IVUG_DETAIL_ERROR_TYPE = -1,
+       IVUG_DETAIL_IMAGE_TYPE,
+       IVUG_DETAIL_VIDEO_TYPE
+} ivug_detail_file_t;
+
+typedef struct {
+/** Common info*/
+       time_t          date;           // Seconds since 1970-1-1
+       size_t          size;
+
+       ivug_detail_file_t file_type;
+
+       char *filesize;
+       char *filepath;
+       char *filename;
+       char *file_ext;
+       char *file_location;
+       char *contains;
+       char *create_date;
+
+/**resolution */
+    char *resolution;
+
+/**Gps info */
+       char *latitude;
+       char *longitude;
+
+/** Drm info */
+       char *vendor;
+       char *forwarding;
+       char *available_uses;
+       char *type;
+       char *validity;
+}ivug_file_info_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// TODO : Remove dependacy ivug-detail-view and ivug-detail-info.
+
+void ivug_details_info_set_file_information(ivug_file_info_t * const pFileInfo, const char *path);
+
+void ivug_details_info_set_gps_info(ivug_file_info_t * const pFileInfo, const char *path);
+
+void ivug_details_info_set_resolution(ivug_file_info_t * const pFileInfo, const char *path, int stype);
+
+void ivug_details_info_set_location(ivug_file_info_t * const pFileInfo, const char *path);
+
+void ivug_details_info_set_filename(ivug_file_info_t * const pFileInfo, const char *path);
+
+void ivug_details_info_set_drm_info(ivug_file_info_t * const pFileInfo,const char *path);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __IVUG_DETAIL_COMMON_H__
+
diff --git a/main/src/control/ivug-filter.c b/main/src/control/ivug-filter.c
new file mode 100755 (executable)
index 0000000..56e08f7
--- /dev/null
@@ -0,0 +1,161 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-datatypes.h"
+#include "ivug-filter.h"
+
+#include <Eina.h>
+
+#include "ivug-debug.h"
+#include "ivug-uuid.h"
+#include "ivug-util.h"
+#include "ivug-context.h"
+
+Filter_struct *ivug_data_filter_create(const ivug_parameter *param)
+{
+       IV_ASSERT(param != NULL);
+
+       Filter_struct *filter_str = calloc(1, sizeof(Filter_struct));
+       IV_ASSERT(filter_str != NULL);
+
+       filter_str->type = FILTER_DB;
+
+       filter_str->view_by = param->view_by;
+       filter_str->media_type = param->media_type;
+       filter_str->sort_type = param->sort_type;
+       filter_str->index = param->start_index;
+
+       DB_Filter *filter = calloc(1, sizeof(DB_Filter));
+
+       IV_ASSERT(filter != NULL);
+
+       MSG_SDATA_HIGH("param->view_by is %d", param->view_by);
+       switch(param->view_by)
+       {
+       case IVUG_VIEW_BY_PLACES:
+               filter->place.max_longitude = param->max_longitude;
+               filter->place.min_longitude = param->min_longitude;
+               filter->place.max_latitude = param->max_latitude;
+               filter->place.min_latitude = param->min_latitude;
+               break;
+
+       case IVUG_VIEW_BY_FILE:
+               filter->file_path = strdup(param->filepath);
+               break;
+       case IVUG_VIEW_BY_ALL:
+               filter->album_id = uuid_assign(param->album_id);
+               break;
+       case IVUG_VIEW_BY_FOLDER:
+               filter->album_id = uuid_assign(param->album_id);
+               break;
+       case IVUG_VIEW_BY_INVAILD:
+       default:
+               MSG_SDATA_WARN("Invalid ViewBy : %d", param->view_by);
+               break;
+
+       }
+
+       filter_str->db_filter = filter;
+
+       return filter_str;
+
+}
+
+void ivug_data_filter_delete(Filter_struct *filter_str)
+{
+       IV_ASSERT(filter_str != NULL);
+
+       MSG_SDATA_HIGH("Removing filter struct. Type=%d", filter_str->type);
+
+       if(filter_str->type == FILTER_DB)
+       {
+               DB_Filter *filter = filter_str->db_filter;
+               switch(filter_str->view_by)
+               {
+               case IVUG_VIEW_BY_PLACES:
+                       break;
+               case IVUG_VIEW_BY_FILE:
+                       if ( filter->file_path )
+                       {
+                               free(filter->file_path);
+                       }
+                       break;
+               case IVUG_VIEW_BY_ALL:
+                       uuid_free(filter->album_id);
+                       break;
+
+               case IVUG_VIEW_BY_FOLDER:
+                       uuid_free(filter->album_id);
+                       break;
+
+               case IVUG_VIEW_BY_INVAILD:
+               default:
+                       MSG_SDATA_WARN("Invalid ViewBy : %d", filter_str->view_by);
+                       break;
+               }
+               free(filter);
+       }
+       free(filter_str);
+}
+
+
+Filter_struct *ivug_data_filter_copy(const Filter_struct *filter_str)
+{
+       IV_ASSERT(filter_str != NULL);
+       Filter_struct *cFilter_str = malloc(sizeof(Filter_struct));
+       IV_ASSERT(cFilter_str != NULL);
+
+       memcpy(cFilter_str, filter_str, sizeof(Filter_struct));
+
+       if(filter_str->type == FILTER_DB)
+       {
+               DB_Filter *filter = filter_str->db_filter;
+               DB_Filter *cFilter = malloc(sizeof(DB_Filter));
+               memcpy(cFilter, filter, sizeof(DB_Filter));
+
+               switch(filter_str->view_by)
+               {
+               case IVUG_VIEW_BY_PLACES:
+                       break;
+
+               case IVUG_VIEW_BY_FILE:
+                       cFilter->file_path = strdup( filter->file_path );
+
+                       if ( filter->file_path )
+                       {
+                               free(filter->file_path);
+                       }
+                       break;
+
+               case IVUG_VIEW_BY_ALL:
+                       cFilter->album_id = uuid_assign( filter->album_id );
+                       break;
+
+               case IVUG_VIEW_BY_FOLDER:
+                       cFilter->album_id = uuid_assign( filter->album_id );
+                       break;
+
+               case IVUG_VIEW_BY_INVAILD:
+               default:
+                       MSG_SDATA_WARN("Invalid ViewBy : %d", filter_str->view_by);
+                       break;
+               }
+
+               cFilter_str->db_filter = cFilter;
+       }
+       return cFilter_str;
+}
+
diff --git a/main/src/control/ivug-filter.h b/main/src/control/ivug-filter.h
new file mode 100755 (executable)
index 0000000..482740d
--- /dev/null
@@ -0,0 +1,41 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_FILTER_H__
+#define __IVUG_FILTER_H__
+
+#include "ivug-parameter.h"
+#include "ivug-medialist.h"
+#include <Eina.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+Filter_struct *ivug_data_filter_create(const ivug_parameter *param);
+
+Filter_struct *ivug_data_filter_copy(const Filter_struct *filter);
+
+void ivug_data_filter_delete(Filter_struct *filter);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __IVUG_FILTER_H__
+
diff --git a/main/src/control/ivug-popup.c b/main/src/control/ivug-popup.c
new file mode 100755 (executable)
index 0000000..78c9d5e
--- /dev/null
@@ -0,0 +1,643 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-popup.h"
+#include "ivug-vibration.h"
+
+#define NOTIFY_TIMEOUT 3.0
+
+#define IVUG_POPUP_EDJ_NAME EDJ_PATH"/ivug-popup.edj"
+
+typedef struct _Ivug_Popup
+{
+       Evas_Object *parent;
+       Evas_Object *popup;
+       Evas_Object *layout;
+
+       Evas_Object *obj;
+
+       int selected_index;
+
+       Popup_Response response;
+
+       int haptic_handle;
+
+       Evas_Smart_Cb callback;
+       void *data;
+
+}Ivug_Popup;
+
+typedef struct
+{
+       int index;
+       char *name;
+       Evas_Object *radio_main;
+       Ivug_Popup *p_iv_popup;
+} ivug_radio_popup_item;
+
+static Ivug_Popup * ivug_popup_create()
+{
+       Ivug_Popup *iv_popup = calloc(1, sizeof(Ivug_Popup));
+
+       iv_popup->haptic_handle = INVALID_HAPTIC_HANDLE;
+
+       return iv_popup;
+}
+
+static void ivug_popup_delete(Ivug_Popup *iv_popup)
+{
+       if ( iv_popup->haptic_handle != INVALID_HAPTIC_HANDLE )
+       {
+               ivug_vibration_stop(iv_popup->haptic_handle);
+               ivug_vibration_delete(iv_popup->haptic_handle);
+
+               iv_popup->haptic_handle = INVALID_HAPTIC_HANDLE;
+       }
+
+       if(iv_popup->popup)
+       {
+               evas_object_del(iv_popup->popup);
+               iv_popup->popup = NULL;
+       }
+
+       if(iv_popup->layout)
+       {
+               evas_object_del(iv_popup->layout);
+               iv_popup->layout = NULL;
+       }
+
+       free(iv_popup);
+}
+
+static void _on_popup_response(void *data, Evas_Object *obj, void *event_info )
+{
+       IV_ASSERT(data != NULL);
+
+       Ivug_Popup *iv_popup = (Ivug_Popup *)data;
+       Popup_Response response = (Popup_Response)evas_object_data_get(obj, "response");
+       MSG_IMAGEVIEW_HIGH("response callback=%d", response);
+
+       if(iv_popup->callback)
+       {
+               iv_popup->callback(iv_popup->data, iv_popup->popup, (void *)response);
+       }
+
+       ivug_popup_delete(iv_popup);
+}
+
+
+static void _on_ctxpopup_dismissed( void *data, Evas_Object *obj, void *event_info )
+{
+// Triggered when clicked outside ctxpopup
+       MSG_IMAGEVIEW_HIGH("Dismissed response");
+
+       Ivug_Popup *iv_popup = (Ivug_Popup *)data;
+
+       ivug_popup_delete(iv_popup);
+}
+
+Evas_Object*
+ivug_deletepopup_show(Evas_Object* parent, const char* title,
+                                       const char* contents, Evas_Smart_Cb response, void* user_data)
+{
+       Evas_Object *popup;
+       Evas_Object *btn_delete;
+       Evas_Object *btn_cancel;
+       //create popup
+
+       IV_ASSERT(response != NULL);
+
+       Ivug_Popup *iv_popup = ivug_popup_create();
+
+       popup = elm_popup_add(parent);
+       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_text_set(popup, contents);
+       elm_object_part_text_set(popup, "title,text", title);
+
+       btn_delete = elm_button_add(popup);
+       elm_object_style_set(btn_delete, "popup_button/default");
+       elm_object_text_set(btn_delete, IDS_DELETE);
+       elm_object_part_content_set(popup, "button1", btn_delete);
+       evas_object_data_set(btn_delete, "response", (void *)POPUP_RESPONSE_OK);
+       evas_object_smart_callback_add(btn_delete, "clicked", _on_popup_response, iv_popup);
+
+       btn_cancel = elm_button_add(popup);
+       elm_object_style_set(btn_cancel, "popup_button/default");
+       elm_object_text_set(btn_cancel, IDS_CANCEL);
+       elm_object_part_content_set(popup, "button2", btn_cancel);
+       evas_object_data_set(btn_cancel, "response", (void *)POPUP_RESPONSE_CANCEL);
+       evas_object_smart_callback_add(btn_cancel, "clicked", _on_popup_response, iv_popup);
+
+       iv_popup->popup = popup;
+       iv_popup->callback = response;
+       iv_popup->data = user_data;
+
+    evas_object_show(popup);
+
+       return popup;
+}
+
+
+Evas_Object*
+ivug_2btn_popup_show(Evas_Object* parent, const char* title,
+                                       const char* contents, Evas_Smart_Cb response, void* user_data)
+{
+       IV_ASSERT(response != NULL);
+
+       Ivug_Popup *iv_popup = ivug_popup_create();
+
+       Evas_Object *popup;
+       Evas_Object *btn_yes;
+       Evas_Object *btn_no;
+       //create popup
+
+       popup = elm_popup_add(parent);
+       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_text_set(popup, contents);
+       if(title)
+       {
+               elm_object_part_text_set(popup, "title,text", title);
+       }
+
+       btn_yes = elm_button_add(popup);
+       elm_object_style_set(btn_yes, "popup_button/default");
+       elm_object_text_set(btn_yes, IDS_YES);
+       elm_object_part_content_set(popup, "button1", btn_yes);
+       evas_object_data_set(btn_yes, "response", (void *)POPUP_RESPONSE_OK);
+       evas_object_smart_callback_add(btn_yes, "clicked", _on_popup_response, iv_popup);
+
+       btn_no = elm_button_add(popup);
+       elm_object_style_set(btn_no, "popup_button/default");
+       elm_object_text_set(btn_no, IDS_NO);
+       elm_object_part_content_set(popup, "button2", btn_no);
+       evas_object_data_set(btn_no, "response", (void *)POPUP_RESPONSE_CANCEL);
+       evas_object_smart_callback_add(btn_no, "clicked", _on_popup_response, iv_popup);
+
+       iv_popup->popup = popup;
+       iv_popup->callback = response;
+       iv_popup->data = user_data;
+
+       evas_object_show(popup);
+       evas_object_layer_set(popup, EVAS_LAYER_MAX);
+
+       return popup;
+}\r
+\r
+Evas_Object*\r
+ivug_1btn_popup_show(Evas_Object* parent, const char* title,\r
+                                       const char* contents, Evas_Smart_Cb response, void* user_data)\r
+{\r
+       IV_ASSERT(response != NULL);\r
+\r
+       Ivug_Popup *iv_popup = ivug_popup_create();\r
+\r
+       Evas_Object *popup;\r
+       Evas_Object *btn_yes;\r
+       //create popup\r
+\r
+       popup = elm_popup_add(parent);\r
+       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_object_text_set(popup, contents);\r
+       if(title)\r
+       {\r
+               elm_object_part_text_set(popup, "title,text", title);\r
+       }\r
+\r
+       btn_yes = elm_button_add(popup);\r
+       elm_object_style_set(btn_yes, "popup_button/default");\r
+       elm_object_text_set(btn_yes, IDS_OK);\r
+       elm_object_part_content_set(popup, "button1", btn_yes);\r
+       evas_object_data_set(btn_yes, "response", (void *)POPUP_RESPONSE_OK);\r
+       evas_object_smart_callback_add(btn_yes, "clicked", _on_popup_response, iv_popup);\r
+\r
+       iv_popup->popup = popup;\r
+       iv_popup->callback = response;\r
+       iv_popup->data = user_data;\r
+\r
+       evas_object_show(popup);\r
+       evas_object_layer_set(popup, EVAS_LAYER_MAX);\r
+\r
+       return popup;\r
+}\r
+\r
+static void _on_longpress_popup_selected(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+
+       Ivug_Popup *iv_popup = (Ivug_Popup *)data;
+
+       const char *label = elm_object_item_text_get((Elm_Object_Item *)event_info);
+       if(label == NULL)
+       {
+               MSG_MAIN_ERROR("label is NULL");
+               ivug_popup_delete(iv_popup);
+               return;
+       }
+       MSG_MAIN_HIGH("text(%s) is clicked", label);
+
+       Longpress_Popup_Response response = LPPOPUP_RESPONSE_NONE;
+       if(strncmp(label, IDS_COPY, strlen(label)) == 0)
+       {
+               response = LPPOPUP_RESPONSE_COPY;
+       }
+       else
+       {
+               MSG_MAIN_WARN("Unknown Share type : %s", label);
+       }
+       MSG_MAIN_HIGH("response=%d", response);
+
+       if(iv_popup->callback)
+       {
+               iv_popup->callback(iv_popup->data, iv_popup->popup, (void *)response);
+       }
+
+       ivug_popup_delete(iv_popup);
+}
+
+Evas_Object*
+ivug_longpress_popup_show(Evas_Object *parent, int x, int y, Evas_Smart_Cb response, void *data)
+{
+       Ivug_Popup *iv_popup = ivug_popup_create();
+
+       Evas_Object* ctx_popup = NULL;
+
+       ctx_popup = elm_ctxpopup_add(parent);
+
+       elm_ctxpopup_item_append(ctx_popup, IDS_COPY, NULL, _on_longpress_popup_selected, iv_popup);
+
+       evas_object_smart_callback_add(ctx_popup, "dismissed", _on_ctxpopup_dismissed, iv_popup);
+
+       evas_object_move(ctx_popup, x, y);
+
+       iv_popup->popup = ctx_popup;
+       iv_popup->callback = response;
+       iv_popup->data = data;
+
+       evas_object_show(ctx_popup);
+
+       return ctx_popup;
+}
+
+void
+_ivug_rename_enter_click_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_Popup *iv_popup = (Ivug_Popup *)data;
+       IV_ASSERT(iv_popup != NULL);
+
+       Evas_Object *entry = iv_popup->obj;
+
+       char *name = elm_entry_markup_to_utf8 ( elm_entry_entry_get(entry) );
+
+       MSG_IMAGEVIEW_HIGH("name = %s", name);
+
+       if(name)
+       {
+               char *new_name = NULL;
+               new_name = ivug_strip_string(name);
+               if(new_name == NULL)
+               {
+                       MSG_IMAGEVIEW_ERROR( "rename failed");
+                       free(name);
+                       ecore_imf_context_input_panel_hide(elm_entry_imf_context_get(entry));
+                       return;
+               }
+               elm_object_text_set(entry, new_name);
+               if(iv_popup->callback)
+               {
+                       iv_popup->callback(iv_popup->data, iv_popup->popup, (void *)POPUP_RESPONSE_OK);
+               }
+               ivug_popup_delete(iv_popup);
+       }
+       else
+       {
+               //ecore_imf_context_input_panel_hide(elm_entry_imf_context_get(entry));
+       }
+}
+
+void
+_ivug_rename_entry_changed(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_Popup *iv_popup = (Ivug_Popup *)data;
+       IV_ASSERT(iv_popup != NULL);
+
+       Evas_Object *entry = iv_popup->obj;
+       Evas_Object *btn_ok = elm_object_part_content_get(iv_popup->popup, "button1");
+
+       char *content = elm_entry_markup_to_utf8 ( elm_entry_entry_get(entry) );
+
+       if (strlen(content) == 0)
+       {
+               MSG_IMAGEVIEW_HIGH("ISF1 : %s", content);
+               elm_object_disabled_set(btn_ok, EINA_TRUE);
+       }
+       else
+       {
+               MSG_IMAGEVIEW_HIGH("ISF : %s", content);
+               elm_object_disabled_set(btn_ok, EINA_FALSE);
+       }
+       free(content);
+}
+
+void
+_ivug_rename_maxlength_reached(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_Popup *iv_popup = (Ivug_Popup *)data;
+       IV_ASSERT(iv_popup != NULL);
+
+       if ( iv_popup->haptic_handle == INVALID_HAPTIC_HANDLE )
+       {
+               iv_popup->haptic_handle = ivug_vibration_create();
+       }
+       else
+       {
+               ivug_vibration_stop(iv_popup->haptic_handle);
+       }
+
+       ivug_vibration_play(iv_popup->haptic_handle ,VIBRATION_DURATION);
+
+}
+
+Evas_Object *ivug_rename_popup_show(Evas_Object *parent, const char *filename, Evas_Smart_Cb response, void *data)
+{
+       Evas_Object *popup = NULL;
+       Evas_Object *entry = NULL;
+       Evas_Object *layout = NULL;
+
+       Ivug_Popup *iv_popup = ivug_popup_create();
+
+       popup = elm_popup_add(parent);
+       if(!popup)
+       {
+               MSG_IMAGEVIEW_ERROR("popup is NULL");
+               goto ENTRY_POPUP_FREE;
+       }
+       //evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       //elm_object_style_set(popup, "menustyle");
+       elm_object_part_text_set(popup, "title,text", "Rename");
+
+       layout = elm_layout_add(popup);
+       if(!layout)
+       {
+               MSG_IMAGEVIEW_ERROR("layout is NULL");
+               goto ENTRY_POPUP_FREE;
+       }
+       if(elm_layout_file_set(layout, IVUG_POPUP_EDJ_NAME, "popup_entryview") == EINA_FALSE)
+       {
+               MSG_IMAGEVIEW_ERROR("elm_layout_file_set error");;
+               goto ENTRY_POPUP_FREE;
+       }
+       //evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+       entry = elm_entry_add(popup);
+       elm_entry_scrollable_set(entry, EINA_TRUE);
+       elm_entry_single_line_set(entry, EINA_TRUE);
+       elm_object_text_set(entry, filename);
+       elm_entry_cursor_end_set(entry);
+       elm_object_part_content_set(layout, "elm.swallow.content", entry);
+       elm_object_content_set(popup, layout);
+
+       evas_object_smart_callback_add(entry, "activated", _ivug_rename_enter_click_cb, iv_popup);
+       evas_object_smart_callback_add(entry, "changed", _ivug_rename_entry_changed, iv_popup);
+
+       static Elm_Entry_Filter_Limit_Size limit_filter_data;
+       limit_filter_data.max_char_count = 64;
+       limit_filter_data.max_byte_count = 0;
+       elm_entry_markup_filter_append(entry, elm_entry_filter_limit_size, &limit_filter_data);
+       evas_object_smart_callback_add(entry, "maxlength,reached", _ivug_rename_maxlength_reached, (void *)iv_popup);
+
+       evas_object_show(layout);
+
+       Evas_Object *btn_ok = elm_button_add(popup);
+       elm_object_style_set(btn_ok, "popup_button/default");
+       elm_object_text_set(btn_ok, IDS_OK);
+       elm_object_part_content_set(popup, "button1", btn_ok);
+       evas_object_data_set(btn_ok, "response", (void *)POPUP_RESPONSE_OK);
+       evas_object_smart_callback_add(btn_ok, "clicked", _ivug_rename_enter_click_cb, iv_popup);
+
+       Evas_Object *btn_cancel = elm_button_add(popup);
+       elm_object_style_set(btn_cancel, "popup_button/default");
+       elm_object_text_set(btn_cancel, IDS_CANCEL);
+       elm_object_part_content_set(popup, "button2", btn_cancel);
+       evas_object_data_set(btn_cancel, "response", (void *)POPUP_RESPONSE_CANCEL);
+       evas_object_smart_callback_add(btn_cancel, "clicked", _on_popup_response, iv_popup);
+
+       iv_popup->popup = popup;
+       iv_popup->callback = response;
+       iv_popup->data = data;
+       iv_popup->obj = entry;
+
+       evas_object_show(popup);
+
+       return popup;
+
+ENTRY_POPUP_FREE:
+       if(popup)
+       {
+               evas_object_del(popup);
+       }
+       if(layout)
+       {
+               evas_object_del(layout);
+       }
+       if(entry)
+       {
+               evas_object_del(entry);
+       }
+       return NULL;
+}
+
+static void _block_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+
+       Ivug_Popup *iv_popup = (Ivug_Popup *)data;
+       Popup_Response response = (Popup_Response)evas_object_data_get(obj, "response");
+       MSG_IMAGEVIEW_HIGH("response callback=%d", response);
+
+       if(iv_popup->callback)
+       {
+               iv_popup->callback(iv_popup->data, iv_popup->popup, (void *)response);
+       }
+
+       ivug_popup_delete(iv_popup);
+}
+
+static char *
+_gl_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       ivug_radio_popup_item *popup_item = (ivug_radio_popup_item *)data;
+       //int index = popup_item->index;
+
+       if (strcmp(part, "elm.text") == 0)
+       {
+               return strdup(popup_item->name);
+       }
+       return NULL;
+}
+
+static Evas_Object *
+_gl_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       ivug_radio_popup_item *popup_item = (ivug_radio_popup_item *)data;
+
+       Evas_Object *radio;
+       Evas_Object *radio_main = popup_item->radio_main;
+       int index = popup_item->index;
+       int selected_index = popup_item->p_iv_popup->selected_index;
+
+       if (strcmp(part, "elm.icon") == 0 || strcmp(part, "elm.swallow.icon") == 0)
+       {
+               radio = elm_radio_add(obj);
+               elm_radio_state_value_set(radio, index);
+               elm_radio_group_add(radio, radio_main);
+               if (index == selected_index)
+                       elm_radio_value_set(radio, selected_index);
+               evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+               evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+               return radio;
+       }
+
+       return NULL;
+}
+
+static void
+_gl_del(void *data, Evas_Object *obj)
+{
+       ivug_radio_popup_item *popup_item = (ivug_radio_popup_item *)data;
+
+       if(popup_item->name)
+       {
+               free(popup_item->name);
+               popup_item->name = NULL;
+       }
+
+       free(popup_item);
+
+       return;
+}
+
+static void
+_gl_sel(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+
+       Ivug_Popup *iv_popup = (Ivug_Popup *)data;
+
+       Elm_Object_Item *item = (Elm_Object_Item *) event_info;
+       ivug_radio_popup_item *popup_item = NULL;
+
+       MSG_IMAGEVIEW_HIGH("_gl_sel");
+
+       if (item)
+       {
+               popup_item = (ivug_radio_popup_item *)elm_object_item_data_get(item);
+               iv_popup->selected_index = popup_item->index;
+               elm_genlist_item_update(item);
+
+               if(iv_popup->callback)
+               {
+                       iv_popup->callback(iv_popup->data, iv_popup->popup, (void *)iv_popup->selected_index);
+               }
+
+               ivug_popup_delete(iv_popup);
+       }
+}
+
+Evas_Object *ivug_radio_popoup_show(Evas_Object *parent, char *title,
+                               int selected_index, Eina_List *name_list, Evas_Smart_Cb response, void *data)
+{
+#define GET_POPUP_HEIGHT(icnt) (((113*icnt-1) > 408) ? (408) : (113*icnt-1))
+#define GET_POPUP_WIDTH(icnt)  (614)
+
+       Evas_Object *popup;
+       int index = 0;
+       Elm_Object_Item *item;
+       Evas_Object *genlist;
+       Evas_Object *btn_close;
+       Evas_Object *radio_main;
+
+       static Elm_Genlist_Item_Class itc = {0,};
+
+       ivug_radio_popup_item *popup_item;
+
+       Ivug_Popup *iv_popup = ivug_popup_create();
+
+       popup = elm_popup_add(parent);
+       elm_object_style_set(popup, "min_menustyle");
+       elm_object_part_text_set(popup, "title,text", title);
+       evas_object_smart_callback_add(popup, "block,clicked", _block_clicked_cb, iv_popup);
+       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+       btn_close = elm_button_add(popup);
+       elm_object_style_set(btn_close, "popup_button/default");
+       elm_object_text_set(btn_close, IDS_CLOSE);
+       elm_object_part_content_set(popup, "button1", btn_close);
+       evas_object_data_set(btn_close, "response", (void *)POPUP_RESPONSE_OK);
+       evas_object_smart_callback_add(btn_close, "clicked", _on_popup_response, iv_popup);
+
+       itc.item_style = "1text.1icon.2";
+       itc.func.text_get = _gl_text_get;
+       itc.func.content_get = _gl_content_get;
+       itc.func.state_get = NULL;
+       itc.func.del = _gl_del;
+
+       genlist = elm_genlist_add(popup);
+       evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_propagate_events_set(genlist, EINA_FALSE);
+
+       radio_main = elm_radio_add(genlist);
+       elm_radio_state_value_set(radio_main, -1);
+       elm_radio_value_set(radio_main, -1);
+       evas_object_propagate_events_set(radio_main, EINA_FALSE);
+
+       Eina_List *l = NULL;
+       char *name = NULL;
+
+       EINA_LIST_FOREACH(name_list, l, name)
+       {
+               popup_item = calloc(1, sizeof(ivug_radio_popup_item));
+               popup_item->index = index++;
+               popup_item->name = strdup(name);
+               popup_item->radio_main = radio_main;
+               popup_item->p_iv_popup = iv_popup;
+
+               item = elm_genlist_item_append(genlist, &itc, (void *)popup_item, NULL,
+                       ELM_GENLIST_ITEM_NONE, _gl_sel, iv_popup);
+       }
+
+       Evas_Object *box;
+       box = elm_box_add(popup);
+       evas_object_size_hint_min_set(box, GET_POPUP_WIDTH(index-1) * elm_config_scale_get(), GET_POPUP_HEIGHT(index-1) * elm_config_scale_get());
+       evas_object_show(genlist);
+       elm_box_pack_end(box, genlist);
+       elm_object_content_set(popup, box);
+       //elm_object_content_set(popup, genlist);
+
+       iv_popup->popup = popup;
+       iv_popup->callback = response;
+       iv_popup->data = data;
+       iv_popup->obj = radio_main;
+       iv_popup->selected_index = selected_index;
+
+       evas_object_show(popup);
+
+       return popup;
+}
+
+
diff --git a/main/src/control/ivug-popup.h b/main/src/control/ivug-popup.h
new file mode 100755 (executable)
index 0000000..dd1a1ba
--- /dev/null
@@ -0,0 +1,82 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_POPUP_H__
+#define __IVUG_POPUP_H__
+
+#include "ivug-common.h"
+
+typedef enum _Popup_Response
+{
+       POPUP_RESPONSE_NONE = -1,
+       POPUP_RESPONSE_TIMEOUT = -2,
+       POPUP_RESPONSE_OK = -3,
+       POPUP_RESPONSE_CANCEL = -4,
+       POPUP_RESPONSE_CLOSE = -5
+}Popup_Response;
+
+typedef enum _Longpress_Popup_Response
+{
+       LPPOPUP_RESPONSE_NONE = 0,
+       LPPOPUP_RESPONSE_COPY,
+       LPPOPUP_RESPONSE_MANUALLY_DETECT,
+}Longpress_Popup_Response;
+
+// Selected data
+
+#ifdef __cplusplus
+extern "C" {
+#endif\r
+\r
+Evas_Object* ivug_1btn_popup_show(Evas_Object* parent, const char* title,\r
+                                       const char* contents, Evas_Smart_Cb response, void* user_data);\r
+\r
+
+/*
+       Create & show popup with 2 button (Yes/No)
+*/
+Evas_Object* ivug_2btn_popup_show(Evas_Object* parent, const char* title,
+       const char* contents, Evas_Smart_Cb response, void* user_data);
+
+/*
+       Create & show popup with no button.
+       TODO : Rename function
+*/
+\r
+Evas_Object*
+ivug_deletepopup_show(Evas_Object* parent, const char* title,
+                                       const char* contents, Evas_Smart_Cb response, void* user_data);
+
+
+/*
+       Create show copy popup in coordinate (x,y)
+*/
+Evas_Object* ivug_longpress_popup_show(Evas_Object *parent, int x, int y, Evas_Smart_Cb response, void *data);
+
+Evas_Object* ivug_deletepopup_show(Evas_Object* parent, const char* title,
+               const char* contents, Evas_Smart_Cb response, void* user_data);
+
+Evas_Object *ivug_rename_popup_show(Evas_Object *parent, const char *filename, Evas_Smart_Cb response, void *data);
+
+Evas_Object *ivug_radio_popoup_show(Evas_Object *parent, char *title,
+                               int selected_index, Eina_List *name_list, Evas_Smart_Cb response, void *data);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif //__IVUG_POPUP_H__
diff --git a/main/src/control/ivug-selectioninfo.c b/main/src/control/ivug-selectioninfo.c
new file mode 100755 (executable)
index 0000000..10aa0c8
--- /dev/null
@@ -0,0 +1,151 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-common.h"
+
+#include <Elementary.h>
+
+#include "ivug-selectioninfo.h"
+
+#define NOTIFY_TIMEOUT 3.0
+
+static void
+_ivug_selectioninfo_timeout_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       ivug_ret_if(obj == NULL);
+
+       evas_object_del(obj);
+       obj = NULL;
+}
+
+static void _on_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       Evas_Coord x,y,w,h;
+       evas_object_geometry_get(obj, &x, &y, &w, &h);
+
+       MSG_IMAGEVIEW_HIGH("Selection resized geomtery XYWH(%d,%d,%d,%d) angle=%d", x, y, w, h, gGetRotationDegree());
+
+       Evas_Object* layout = elm_object_content_get(obj);
+       ivug_retm_if(layout == NULL, "Notify content is NULL");
+
+       //Get the selectioninfo text
+       const char* text = edje_object_part_text_get(_EDJ(layout), "elm.text");
+
+#ifdef USE_CUSTOM_STYLE
+       elm_object_theme_set(layout, gGetSystemTheme());
+
+       int rot_angle = gGetRotationDegree();
+       if ( (rot_angle == 0) || (rot_angle == 180) )
+       {
+               elm_layout_theme_set(layout, "standard", "selectioninfo", "vertical/bottom_86");
+       }
+       else
+       {
+               elm_layout_theme_set(layout, "standard", "selectioninfo", "horizontal/bottom_64");
+       }
+#endif
+
+       if(text)
+       {
+               //Reset the text, because the text will be missed if no reset
+               edje_object_part_text_set(_EDJ(layout), "elm.text", text);
+       }
+
+}
+
+
+Evas_Object*
+ivug_selectioninfo_create(Evas_Object* parent, const char* text)
+{
+       Evas_Object *notify;
+
+       notify = elm_notify_add(parent);
+       ivug_retv_if(notify == NULL, NULL);
+       elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM);
+       evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(notify, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_smart_callback_add(notify, "timeout", _ivug_selectioninfo_timeout_cb, NULL);
+       elm_notify_timeout_set(notify, NOTIFY_TIMEOUT);
+
+       int rot_angle = gGetRotationDegree();
+
+       Evas_Object* layout = elm_layout_add(parent);
+
+#ifdef USE_CUSTOM_STYLE
+       elm_object_theme_set(layout, gGetSystemTheme());
+
+       if ( (rot_angle == 0) || (rot_angle == 180) )
+       {
+               elm_layout_theme_set(layout, "standard", "selectioninfo", "vertical/bottom_86");
+       }
+       else
+       {
+               elm_layout_theme_set(layout, "standard", "selectioninfo", "horizontal/bottom_64");
+       }
+#endif
+
+       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       elm_object_content_set(notify, layout);
+       edje_object_part_text_set(_EDJ(layout), "elm.text", text);
+
+       evas_object_event_callback_add(notify, EVAS_CALLBACK_RESIZE, _on_resize, NULL);
+
+       evas_object_show(notify);
+
+       return notify;
+}
+
+Evas_Object*
+ivug_notify_create(Evas_Object* parent, const char* text)
+{
+       Evas_Object *notify;
+
+       notify = elm_notify_add(parent);
+       ivug_retv_if(notify == NULL, NULL);
+       elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM);
+       evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(notify, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+       int rot_angle = gGetRotationDegree();
+
+       Evas_Object* layout = elm_layout_add(parent);
+
+#ifdef USE_CUSTOM_STYLE
+       elm_object_theme_set(layout, gGetSystemTheme());
+
+       if ( (rot_angle == 0) || (rot_angle == 180) )
+       {
+               elm_layout_theme_set(layout, "standard", "selectioninfo", "vertical/bottom_86");
+       }
+       else
+       {
+               elm_layout_theme_set(layout, "standard", "selectioninfo", "horizontal/bottom_64");
+       }
+#endif
+
+       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       elm_object_content_set(notify, layout);
+       edje_object_part_text_set(_EDJ(layout), "elm.text", text);
+
+       evas_object_event_callback_add(notify, EVAS_CALLBACK_RESIZE, _on_resize, NULL);
+
+       evas_object_show(notify);
+
+       return notify;
+}
+
diff --git a/main/src/control/ivug-selectioninfo.h b/main/src/control/ivug-selectioninfo.h
new file mode 100755 (executable)
index 0000000..ceb01a4
--- /dev/null
@@ -0,0 +1,33 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_SELECTIONINFO_H__
+#define __IVUG_SELECTIONINFO_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* time out applied */
+Evas_Object * ivug_selectioninfo_create(Evas_Object* parent, const char* contents);
+
+Evas_Object * ivug_notify_create(Evas_Object* parent, const char* text);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __IVUG_SELECTIONINFO_H__
diff --git a/main/src/control/ivug-setas.cpp b/main/src/control/ivug-setas.cpp
new file mode 100755 (executable)
index 0000000..18db6fe
--- /dev/null
@@ -0,0 +1,321 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *       http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <Elementary.h>
+
+#include "ivug-common.h"
+
+#include "ivug-debug.h"
+#include "ivug-util.h"
+#include "ivug-image.h"
+
+#include "ivug-setas.h"
+
+/*
+       Used for storing cropped image.
+*/
+#define IVUG_HOME_SCREEN_TEMP_PATH     DATA_PATH"/.homescreen_tmp.jpg"
+#define IVUG_LOCK_SCREEN_TEMP_PATH     DATA_PATH"/.lockscreen_tmp.jpg"
+
+
+static Eina_Bool _crop_image(Evas_Object *photocam, Evas_Coord_Rectangle *rect, const char *save_file, const char *option)
+{
+       if (ivug_remove_file(save_file) == false)
+       {
+               MSG_SETAS_ERROR( "Delete file %s: failed", save_file);
+               return EINA_FALSE;
+       }
+
+       Evas_Object *ret_image = NULL;
+
+       ret_image = ivug_image_region_image_get(photocam, rect->x, rect->y, rect->w , rect->h);
+
+       if(ret_image == NULL)
+       {
+               MSG_SETAS_ERROR("Region get faied.");
+               return EINA_FALSE;
+       }
+
+       if (evas_object_image_save(ret_image, save_file, NULL, option) == EINA_FALSE)
+       {
+               MSG_SETAS_ERROR("evas_object_image_save error. %s", save_file);
+               MSG_SETAS_ERROR("setas image save faied.");
+               evas_object_del(ret_image);
+               return EINA_FALSE;
+       }
+
+       evas_object_del(ret_image);
+
+       return EINA_TRUE;
+}
+
+
+static Eina_Bool _photocam_image_save(Evas_Object *photocam, Evas_Coord_Rectangle *rect, const char* tmp_file, const char* final_file)
+{
+//2. Crop image and save it as tmp file
+       Eina_Bool ret;
+
+       if ( tmp_file == NULL )
+       {
+               if (ivug_remove_file(final_file) == false)              // Remove dest file
+               {
+                       MSG_SETAS_ERROR( "Delete file %s failed", final_file);
+                       goto error;
+               }
+
+               ret = _crop_image(photocam, rect, final_file, "quality=100 compress=9");
+               if(ret == EINA_FALSE)
+               {
+                       MSG_SETAS_ERROR("crop image failed!");
+                       goto error;
+               }
+
+       }
+       else
+       {
+       // save ½ÇÆнàÇöÀçÀÇ image¸¦ º¸È£Çϱâ À§ÇØ ¸ÕÀú tmp¿¡ ÀúÀåÇÑ ´ÙÀ½ rename ÇÑ´Ù.
+               ret = _crop_image(photocam, rect, tmp_file, "quality=100 compress=9");
+               if(ret == EINA_FALSE)
+               {
+                       MSG_SETAS_ERROR("crop image failed!");
+                       goto error;
+               }
+
+       //3. Delete the lockscreen file if exist
+               if (ivug_remove_file(final_file) == false)
+               {
+                       MSG_SETAS_ERROR( "Delete file %s failed", final_file);
+                       goto error;
+               }
+
+       //4. rename the tmp file to lock screen file
+               if(ivug_rename_file(tmp_file, final_file) == false)
+               {
+                       MSG_SETAS_ERROR( "Rename file %s to %s failed", tmp_file, final_file);
+                       goto error;
+               }
+       }
+
+       return EINA_TRUE;
+error:
+
+       if(ivug_remove_file(tmp_file) == false)
+       {
+               MSG_SETAS_ERROR( "Delete file %s failed", tmp_file);
+       }
+
+       return EINA_FALSE;
+}
+
+Eina_Bool
+_ivug_setas_save_home_screen(Evas_Object *photocam, Evas_Coord_Rectangle *rect, const char *dest)
+{
+       MSG_SETAS_HIGH("Change Home Screen");
+
+       Eina_Bool ret = EINA_FALSE;
+
+       ret = _photocam_image_save(photocam, rect, IVUG_HOME_SCREEN_TEMP_PATH, dest);
+
+       if(ret == EINA_FALSE)
+       {
+               MSG_SETAS_ERROR("Create screen file failed");
+               return EINA_FALSE;
+       }
+
+       return EINA_TRUE;
+}
+
+Eina_Bool
+_ivug_setas_save_lock_screen(Evas_Object *photocam, Evas_Coord_Rectangle *rect, const char *dest)
+{
+       MSG_SETAS_HIGH("Change Lock Screen");
+
+       Eina_Bool ret = EINA_FALSE;
+
+       ret = _photocam_image_save(photocam, rect, IVUG_LOCK_SCREEN_TEMP_PATH, dest);
+
+       if(ret == EINA_FALSE)
+       {
+               MSG_SETAS_ERROR( "Create screen file failed");
+               return EINA_FALSE;
+       }
+
+       return EINA_TRUE;
+}
+
+Eina_Bool
+_ivug_setas_save_homenlock_screen(Evas_Object *photocam, Evas_Coord_Rectangle *rect, const char *home, const char *lock)
+{
+       MSG_SETAS_HIGH("Change Home&Lock Screen");
+
+// Set homescreen image
+       Eina_Bool ret = EINA_FALSE;
+
+       ret = _photocam_image_save(photocam, rect, IVUG_HOME_SCREEN_TEMP_PATH, home);
+
+       if(ret == EINA_FALSE)
+       {
+               MSG_SETAS_ERROR( "Create screen file failed");
+               return EINA_FALSE;
+       }
+
+       if (ivug_remove_file(IVUG_LOCK_SCREEN_TEMP_PATH) == false)
+       {
+               MSG_SETAS_ERROR( "Detele file %s: failed", IVUG_LOCK_SCREEN_TEMP_PATH);
+               return EINA_FALSE;
+       }
+
+// Make a copy from home screen to lock screen
+       if( ecore_file_cp(home, IVUG_LOCK_SCREEN_TEMP_PATH) == EINA_FALSE)
+       {
+               MSG_SETAS_ERROR( "File copy failed");
+               return EINA_FALSE;
+       }
+
+       if(ivug_rename_file(IVUG_LOCK_SCREEN_TEMP_PATH, lock) == false)
+       {
+               MSG_SETAS_ERROR( "Rename file %s to %s failed", IVUG_LOCK_SCREEN_TEMP_PATH, lock );
+               if(ivug_remove_file(IVUG_LOCK_SCREEN_TEMP_PATH)== false)
+               {
+                       MSG_SETAS_ERROR( "delete tmp lock file failed %s", IVUG_LOCK_SCREEN_TEMP_PATH);
+               }
+
+               return EINA_FALSE;
+       }
+
+       sync(); //sync copied file.
+
+       return EINA_TRUE;
+}
+
+
+#if 0
+static Eina_Bool
+_ivug_setas_view_create_croped_image(Evas_Object *photocam, const char *save_file,
+       Evas_Coord_Rectangle rect, int width, int height, bool bFreeSize)
+{
+       IV_ASSERT(photocam != NULL);
+       IV_ASSERT(save_file != NULL);
+
+       if(bFreeSize == true)
+       {
+               width = rect.w;
+               height = rect.h;
+       }
+
+       if(width <= 0 || height <= 0)
+       {
+               MSG_SETAS_ERROR("input size parameter is invalid, w = %d, h = %d", width, height);
+               return EINA_FALSE;
+       }
+
+       Evas_Object *ret_image = NULL;
+
+       MSG_SETAS_HIGH("SCissorbox Rect:(%d,%d,%d,%d) Final=(%d,%d)", rect.x, rect.y, rect.w, rect.h, width, height);
+
+       ret_image = ivug_image_region_image_get(photocam, rect.x, rect.y, rect.w, rect.h);
+       if(ret_image == NULL)
+       {
+               MSG_SETAS_ERROR("Region get faied.");
+               return EINA_FALSE;
+       }
+
+       if (evas_object_image_save(ret_image, save_file, NULL, "quality=100 compress=9") == EINA_FALSE)
+       {
+               MSG_SETAS_ERROR("evas_object_image_save error. %s", save_file);
+               evas_object_del(ret_image);
+               return EINA_FALSE;
+       }
+       else
+       {
+               int fd = open(save_file, O_RDONLY);
+               if(fd < 0)
+               {
+                       MSG_SETAS_ERROR("%s open error[%d]", save_file, fd);
+                       evas_object_del(ret_image);
+                       return EINA_FALSE;
+               }
+               fsync(fd);
+               int ret = close(fd);
+               if(ret < 0)
+               {
+                       MSG_SETAS_ERROR("%s open error[%d]", save_file, ret);
+               }
+       }
+
+       evas_object_del(ret_image);
+
+       return EINA_TRUE;
+}
+
+
+static void
+_ivug_setas_save_callerimage(Evas_Object *photocam, Evas_Coord_Rectangle *rect, char *filepath)
+{
+       MSG_SETAS_HIGH("Save CallerID");
+
+       char* save_file = SET_AS_CALL_ID_PATH;
+
+       Evas_Coord_Rectangle box_rect;
+
+       ivug_scissorbox_region_get(pSetAsView->select_box, &(box_rect.x), &(box_rect.y), &(box_rect.w), &(box_rect.h));
+
+       Eina_Bool crop_sel_ret = _ivug_setas_view_create_croped_image(photocam,
+                       save_file, box_rect, pSetAsView->box_width, pSetAsView->box_height, pSetAsView->bFreeSize);
+       if(crop_sel_ret == EINA_FALSE)
+       {
+               MSG_SETAS_ERROR( "Crop selector image failed!");
+       }
+
+       const char *lcd_file = SET_AS_CALL_ID_LCD_PATH;         // ?????
+
+       Eina_Bool crop_lcd_ret = EINA_FALSE;
+
+       crop_lcd_ret = _ivug_setas_view_create_fit_image(pSetAsView->layout, pSetAsView->photocam, lcd_file);
+       if(crop_lcd_ret == EINA_FALSE)
+       {
+               MSG_SETAS_ERROR( "Crop lcd image failed!");
+       }
+
+       if(pSetAsView->mode == IVUG_SETAS_UG || pSetAsView->mode == IVUG_SETAS_APPSVC)
+       {
+               if ( crop_lcd_ret == EINA_TRUE && crop_sel_ret == EINA_TRUE )
+               {
+                       _ivug_setas_view_send_result(gGetUGHandle(), "crop_image_path", save_file, "image_path", lcd_file);
+               }
+       }
+}
+#endif
+
+Eina_Bool
+_ivug_setas_save_cropimage(Evas_Object *photocam, Evas_Coord_Rectangle *rect, const char *filepath)
+{
+       MSG_SETAS_HIGH("Save Cropped");
+
+       Eina_Bool ret = EINA_FALSE;
+
+       ret = _photocam_image_save(photocam, rect, NULL, filepath);
+
+       if(ret == EINA_FALSE)
+       {
+               MSG_SETAS_ERROR( "Create cropimage file failed");
+               return EINA_FALSE;
+       }
+
+       return EINA_TRUE;
+}
+
+
diff --git a/main/src/control/ivug-setas.h b/main/src/control/ivug-setas.h
new file mode 100755 (executable)
index 0000000..9564954
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *       http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __IVUG_SETAS_H__
+#define __IVUG_SETAS_H__
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+Eina_Bool
+_ivug_setas_save_home_screen(Evas_Object *photocam, Evas_Coord_Rectangle *rect, const char *dest);
+
+Eina_Bool
+_ivug_setas_save_lock_screen(Evas_Object *photocam, Evas_Coord_Rectangle *rect, const char *dest);
+
+Eina_Bool
+_ivug_setas_save_homenlock_screen(Evas_Object *photocam, Evas_Coord_Rectangle *rect, const char *home, const char *lock);
+
+Eina_Bool
+_ivug_setas_save_cropimage(Evas_Object *photocam, Evas_Coord_Rectangle *rect, const char *filepath);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __IVUG_SETAS_H__
+
diff --git a/main/src/control/ivug-widget.c b/main/src/control/ivug-widget.c
new file mode 100755 (executable)
index 0000000..502a13c
--- /dev/null
@@ -0,0 +1,215 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-common.h"
+#include "ivug-widget.h"
+
+#include <ui-gadget-module.h>
+
+#include <Elementary.h>
+
+static void _on_obj_deleted(void * data, Evas * e, Evas_Object * obj, void * event_info)
+{
+       char *szMsg = (char *)data;
+       IV_ASSERT(szMsg != NULL);
+
+       MSG_MAIN_HIGH("On Object deleted. %s", szMsg);
+
+       free(szMsg);
+}
+
+void ivug_on_obj_deleted(Evas_Object* obj, const char *msg, const char *func, int line)
+{
+       static char buf[1024];
+
+       sprintf(buf, "%s(L%d):%s", func, line, msg);
+
+       evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _on_obj_deleted, strdup(buf));
+}
+
+Evas_Object* ivug_bg_add(Evas_Object* parent, int r, int g, int b)
+{
+    IV_ASSERT(parent != NULL);
+
+       Evas_Object *bg = elm_bg_add(parent);
+       evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(bg, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+//     elm_win_resize_object_add(parent, bg);
+
+       elm_bg_color_set(bg, r,  g, b);
+
+       evas_object_show(bg);
+
+       return bg;
+}
+
+Evas_Object *
+ivug_layout_add(Evas_Object *parent, const char *edj, const char *group)
+{
+       IV_ASSERT(parent != NULL);
+
+       Evas_Object *layout;
+
+       layout = elm_layout_add(parent);
+
+       if ( layout == NULL )
+       {
+               MSG_SETAS_ERROR("Cannot create layout");
+               return NULL;
+       }
+
+       if (elm_layout_file_set(layout, edj, group) == EINA_FALSE)
+       {
+               MSG_SETAS_ERROR("edj loading fail, filepath=%s Group=%s", edj, group);
+               evas_object_del(layout);
+               return NULL;
+       }
+
+       evas_object_size_hint_expand_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_fill_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+#ifdef USE_WIN_AS_PARENT
+       elm_win_resize_object_add( ug_get_window(), layout);
+#else
+       Evas_Coord x, y, w, h;
+       evas_object_geometry_get(parent, &x, &y, &w, &h);
+
+       evas_object_move(layout, x, y);
+       evas_object_resize(layout, w, h);
+#endif
+
+       return layout;
+}
+
+Evas_Object*
+ivug_default_layout_add( Evas_Object *win)
+{
+       IV_ASSERT(win != NULL);
+
+       Evas_Object *layout;
+       layout = elm_layout_add(win);
+
+       if ( layout == NULL )
+       {
+               MSG_SETAS_ERROR("Cannot create layout");
+               return NULL;
+       }
+
+       Eina_Bool ret = EINA_FALSE;
+
+       const char *profile = elm_config_profile_get();
+       if (!strcmp(profile,"mobile"))
+       {
+               ret = elm_layout_theme_set(layout, "layout", "application", "default");
+               MSG_SETAS_HIGH("layout/application/default");
+       }
+       else if (!strcmp(profile,"desktop"))
+       {
+               ret = elm_layout_theme_set(layout, "layout", "application", "noindicator");
+               MSG_SETAS_HIGH("layout/application/noindicator");
+       }
+
+       if (ret == EINA_FALSE)
+       {
+               MSG_SETAS_ERROR("theme set fail");
+               evas_object_del(layout);
+               return NULL;
+       }
+
+       evas_object_size_hint_expand_set( layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_fill_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL );
+
+#ifdef USE_WIN_AS_PARENT
+       elm_win_resize_object_add( ug_get_window(), layout);
+#else
+       Evas_Coord x, y, w, h;
+       evas_object_geometry_get(parent, &x, &y, &w, &h);
+
+       evas_object_move(layout, x, y);
+       evas_object_resize(layout, w, h);
+#endif
+
+       evas_object_show(layout);
+       return layout;
+}
+
+
+Evas_Object *ivug_button_add(Evas_Object *parent, const char *style, const char *caption, Evas_Object *icon, Evas_Smart_Cb pFunc, const void *  data )
+{
+       IV_ASSERT(parent != NULL);
+
+       Evas_Object *btn;
+
+       btn = elm_button_add(parent);
+       if ( btn == NULL )
+       {
+               return NULL;
+       }
+
+       if ( style )
+               elm_object_style_set(btn, style);
+
+       if ( caption )
+               elm_object_text_set(btn, caption);
+
+       if ( icon )
+               elm_object_part_content_set(btn, "icon", icon);
+
+       elm_object_focus_allow_set(btn, EINA_FALSE);
+       evas_object_propagate_events_set(btn, EINA_FALSE);
+
+       evas_object_smart_callback_add(btn, "clicked", pFunc, (void*)data);
+
+       return btn;
+}
+
+Evas_Object *ivug_icon_add(Evas_Object *parent, const char *edjname, const char *groupname)
+{
+       Evas_Object *icon;
+
+       icon = elm_icon_add(parent);
+
+       if ( elm_icon_file_set(icon, edjname, groupname) == EINA_FALSE)
+       {
+               MSG_IVUG_ERROR("Cannot file set. EDJ=%s Group=%s", edjname, groupname);
+               evas_object_del(icon);
+               return NULL;
+       }
+
+       evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+       elm_icon_resizable_set(icon, 1, 1);
+       evas_object_size_hint_expand_set(icon, 1, 1);
+
+       return icon;
+}
+
+Evas_Object *ivug_controlbar_add(Evas_Object *parent, const char *style)
+{
+       Evas_Object *toolbar = elm_toolbar_add(parent);
+       if (!toolbar)
+       {
+               MSG_MAIN_ERROR("tool bar failed");
+               return NULL;
+       }
+       elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_EXPAND);
+       if(style)
+               elm_object_style_set(toolbar, style);
+       //elm_toolbar_homogeneous_set(toolbar, EINA_FALSE);
+
+       return toolbar;
+}
+
diff --git a/main/src/control/ivug-widget.h b/main/src/control/ivug-widget.h
new file mode 100755 (executable)
index 0000000..9433e46
--- /dev/null
@@ -0,0 +1,61 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_WIDGET_H__
+#define __IVUG_WIDGET_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+       Internal use only... use macro DELETE_LOG instead
+*/
+void ivug_on_obj_deleted(Evas_Object* obj, const char *msg, const char *func, int line);
+
+
+#define DELETE_NOTIFY(obj)     \
+       ivug_on_obj_deleted(obj, #obj, __func__, __LINE__)
+
+/*
+       Create elm_bg with color - r,g,b
+*/
+Evas_Object *
+ivug_bg_add(Evas_Object* parent, int r, int g, int b);
+
+Evas_Object *
+ivug_layout_add(Evas_Object *win, const char *edjname, const char *groupname);
+
+Evas_Object*
+ivug_default_layout_add( Evas_Object *win);
+
+Evas_Object *
+ivug_button_add(Evas_Object *parent, const char *style, const char *caption, Evas_Object *icon, Evas_Smart_Cb pFunc, const void *data );
+
+Evas_Object *
+ivug_icon_add(Evas_Object *parent, const char *edjname, const char *groupname);
+
+Evas_Object *
+ivug_controlbar_add(Evas_Object *parent, const char *style);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __IVUG_WIDGET_H__
+
diff --git a/main/src/include/ivug-common.h b/main/src/include/ivug-common.h
new file mode 100755 (executable)
index 0000000..6ebc0e2
--- /dev/null
@@ -0,0 +1,80 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_COMMON_H__
+#define __IVUG_COMMON_H__
+
+#include "ivug-define.h"
+#include "ivug-datatypes.h"
+#include "ivug-uuid.h"
+
+#include <Elementary.h>
+#include <assert.h>
+
+#include "statistics.h"
+#include "ivug-debug.h"
+#include "ivug-string.h"
+#include "ivug-util.h"
+#include "ivug-define.h"
+#include "ivug-config.h"
+#include "ivug-widget.h"
+#include "ivug-context.h"
+
+/*
+Definition "PREFIX" is declared in CMakelist.txt
+       PREFIX is "/opt/ug"
+       PACKAGE is "ug-image-viewer-efl"
+
+       Path name does not include trailing /.
+
+       DATA_PATH is /opt/ug/data
+*/
+
+#define LOCALE_PATH                                    PREFIX"/res/locale"
+#define IMAGE_PATH                                             PREFIX"/res/images/"PACKAGE
+#define EDJ_PATH                                               PREFIX"/res/edje/"PACKAGE
+#define DATA_PATH                                              DATADIR"/"PACKAGE
+
+/*
+       Home screen and Lock screen image should be put in DATA_PATH.
+*/
+
+
+#define USE_WIN_AS_PARENT
+
+#define NAVI_OPTION_BTN_STYLE  "naviframe/title/default"//"multiline"
+
+#define WHITE_THEME
+
+#ifdef WHITE_THEME
+#define IVUG_DEFAULT_BG_COLOR          249
+#else
+#define IVUG_DEFAULT_BG_COLOR          48
+#endif
+
+#define USE_DEFAULT_DOWNLOADS_FOLDER
+
+#ifdef USE_DEFAULT_DOWNLOADS_FOLDER
+#define DEFAULT_DOWNLOADS_FOLDER "/opt/media/Downloads"
+#endif
+
+
+#define _EDJ(o)                        elm_layout_edje_get(o)
+
+#define MENUBAR_TIMEOUT_SEC (5.0f)     // 5sec
+
+#endif /* __IVUG_COMMON_H__ */
+
diff --git a/main/src/include/ivug-crop-view.h b/main/src/include/ivug-crop-view.h
new file mode 100755 (executable)
index 0000000..40b278a
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_CROP_VIEW_H__
+#define __IVUG_CROP_VIEW_H__
+
+typedef struct {
+       Evas_Object *layout;
+       Evas_Object *notify;
+
+       Evas_Object *photocam;
+       Evas_Object *cropbox;
+
+       Evas_Object *gesture;
+
+       bool bShowMenu;
+       char *file_path;
+       char *result_path;\r
+\r
+       Ecore_Timer *timer;\r
+\r
+       Evas_Object *btn_ok;\r
+
+       int w;
+       int h;
+} IvugCropView;
+
+/*
+       signals
+               "loaded" with error code
+               "ok,clicked"            - Button "OK" clicked with filepath
+               "cancel,clicked"        - Button "Cancel" clicked
+               "destroyed"
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+IvugCropView *ivug_crop_view_create(Evas_Object *parent);
+
+bool ivug_crop_view_box_size_set(IvugCropView *pCropView, int w, int h);
+
+bool ivug_crop_view_box_ratio_fix(IvugCropView *pCropView, bool bFix);
+
+bool ivug_crop_view_file_set(IvugCropView *pCropView, const char *file);
+
+void ivug_crop_view_destroy(IvugCropView *pCropView);
+
+Evas_Object *ivug_crop_view_get_object(IvugCropView *pCropView);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif                 // __IVUG_CROP_VIEW_H__
+
diff --git a/main/src/include/ivug-details-view.h b/main/src/include/ivug-details-view.h
new file mode 100755 (executable)
index 0000000..97b2658
--- /dev/null
@@ -0,0 +1,78 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __DETAILS_VIEW_H__
+#define __DETAILS_VIEW_H__
+
+#include <unicode/udat.h>
+#include "ivug-datatypes.h"
+#include "ivug-media.h"
+#include "ivug-name-view.h"
+
+#include "ivug-detail-info.h"
+
+/*
+       "renamed"
+*/
+
+typedef struct {
+       Evas_Object *parent;
+       Evas_Object *bg;
+
+       Evas_Object *layout;
+       Evas *evas;
+       Evas_Object *genlist;
+
+/*
+         |---------------|
+         | naviframe           |
+         |---------------|
+         |                               |
+         |     genlist           |
+         |                               |
+         |---------------|
+*/
+
+/* Genlist class */
+       Elm_Genlist_Item_Class itc;
+       Elm_Genlist_Item_Class title_itc;
+       Elm_Genlist_Item_Class multiline_icon_itc;
+       Elm_Genlist_Item_Class multiline_itc;
+
+       ivug_file_info_t        file_Info;
+
+       Ivug_NameView *pAddTagView;
+       Media_Data *mdata;
+} Ivug_DetailsView;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+Ivug_DetailsView *ivug_details_view_screen_create(Evas_Object *parent, Media_Data *mdata, ivug_view_by view_by);
+
+void ivug_details_view_destroy(Ivug_DetailsView *pDetailsView);
+
+Evas_Object *ivug_details_view_object_get(Ivug_DetailsView *pDetailsView);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif         // __DETAILS_VIEW_H__
+
+
diff --git a/main/src/include/ivug-main-view.h b/main/src/include/ivug-main-view.h
new file mode 100755 (executable)
index 0000000..c41a70b
--- /dev/null
@@ -0,0 +1,211 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_MAIN_VIEWER_H__
+#define __IVUG_MAIN_VIEWER_H__
+
+#include "ivug-common.h"
+#include "ivug-parameter.h"
+#include "ivug-medialist.h"
+
+#include "ivug-name-view.h"
+#include "ivug-details-view.h"
+#include "ivug-setas-view.h"
+
+#define MAX_CTRL_ITEM_CNT 5
+#define MAX_NAVI_ITEM_CNT 3
+
+//navigation bar type
+typedef enum {
+       NAVI_BAR_TYPE_NONE = 0x00,
+       NAVI_BAR_TYPE_EMPTY,                    // no control bar
+       NAVI_BAR_TYPE_IMAGE,                    // [Set, Info] default
+       NAVI_BAR_TYPE_FILE,                             // [Set, Info] default
+       NAVI_BAR_TYPE_VIDEO,                    // [Set, Info] default
+       NAVI_BAR_TYPE_SELECT,                   // [Ok, Cancel] from take photo
+} ivug_toolbar;
+
+//control bar type
+typedef enum {
+       CTRL_BAR_TYPE_NONE = 0x00,
+       CTRL_BAR_TYPE_EMPTY,                            // not exist ctrl bar
+       CTRL_BAR_TYPE_FILE,                                     // [Delete,Share,Set,Info]  file manager, video at gallery
+       CTRL_BAR_TYPE_IMAGE,                            // [Delete,Share, Slide show] from gallery
+       CTRL_BAR_TYPE_VIDEO,                            // [Delete,Share, Slide show] from gallery
+} ivug_ctrlbar;
+
+typedef enum {
+// only shows in ctrlbar
+       TOOLBUTTON_DELETE,
+       TOOLBUTTON_SHARE,
+       TOOLBUTTON_SLIDESHOW,
+
+// shows in either toolbar or ctrlbar
+       TOOLBUTTON_SETAS,
+       TOOLBUTTON_DETAILS,
+
+// only shows in toolbar
+       TOOLBUTTON_OK,
+       TOOLBUTTON_CANCEL,
+
+// Navigation hearder
+       TOOLBUTTON_TOOL,
+
+// NULL button for spacing
+       TOOLBUTTON_NULL,
+       TOOLBUTTON_MAX,
+} ToolButtonType;
+
+typedef enum {
+       TOOLBUTTON_IN_NONE,
+       TOOLBUTTON_IN_TOOLBAR,
+       TOOLBUTTON_IN_CTRLBAR,
+} TooButtonPos;
+
+typedef struct {
+       Elm_Object_Item *item;          // Control bar item in navigation header. ex) SetAs, Favorite, Info
+       TooButtonPos pos;
+} ControlBar_Item;
+
+
+typedef struct _SlideShow SlideShow;
+
+typedef struct {
+       Evas_Object *parent;
+       Evas_Object *layout     ;               /*Layout widget based on EDJ*/
+
+       Evas_Object *navi_bar;
+       Evas_Object *empty_layout;
+       Elm_Object_Item *navi_it;
+       Evas_Object* slider;                    //image viewer slider
+
+       Evas_Object *area_obj;          //lcd area except indicator
+
+       Evas_Object* selectioninfo;\r
+\r
+       Evas_Object *zoom_slider;\r
+       int zoom_level;\r
+
+/*
+   |------------------|
+   | navi_bar            |
+   |------------------|
+   | tool_bar            |
+   |------------------|
+   |                             |
+   |                             |
+   |                             |
+   |                             |
+   |------------------|
+   | ctrl_bar            |
+   |------------------|
+*/
+
+// Toolbar
+       Evas_Object *tool_bar;
+       ivug_toolbar tool_bar_type;
+
+// Controlbar
+       Evas_Object *ctrl_bar;
+       ivug_ctrlbar ctrl_bar_type;
+
+       ControlBar_Item items[TOOLBUTTON_MAX];
+
+       bool bSetThmByUser;
+
+       Evas_Object* popup;                     //popup
+
+       Evas_Object* longpress_popup;           //long press popup
+       bool bLongpressEnd;
+
+// child view.
+       Ivug_SetAsView *pSetAsView;
+
+       Ivug_DetailsView *pDetailsView;
+
+// List
+       Media_List *mList;
+
+//flag
+       bool bShowMenu;
+       bool bFootSteps;
+
+       ivug_mode mode;
+       ivug_view_by view_by;
+
+       ui_gadget_h ext_ug;
+
+       Ecore_Event_Handler *keydown_handler;
+
+       Ecore_Timer *exit_timer;
+       Ecore_Timer *hide_timer;
+       int hide_count;
+
+       Ecore_Timer *popup_timer;
+
+       char *album_name;
+
+// Slide show;
+       SlideShow *ssHandle;
+} Ivug_MainView;\r
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+       Create MainView layout
+*/
+Ivug_MainView *
+ivug_main_view_create(Evas_Object* parent, ivug_mode mode, ivug_view_by view_by);
+
+Evas_Object *
+ivug_main_view_object_get(Ivug_MainView *pMainView);
+
+void ivug_main_view_start(Ivug_MainView *pMainView);
+
+/*
+       Load media list from parameter.
+*/
+bool ivug_main_view_load_list(Ivug_MainView *pMainView, ivug_parameter *ivug_param);
+
+/*
+       Start slide show.
+*/
+void ivug_main_view_start_slideshow(Ivug_MainView *pMainView, Eina_Bool bSlideFirst);
+
+void ivug_main_view_resume(Ivug_MainView *pMainView);
+void ivug_main_view_pause(Ivug_MainView *pMainView);
+
+
+void ivug_main_view_destroy(Ivug_MainView *pMainView);
+
+
+/*
+       Control GUI
+*/
+void ivug_main_view_show_menu_bar(Ivug_MainView *pMainView);
+void ivug_main_view_hide_menu_bar(Ivug_MainView *pMainView);
+
+void ivug_main_view_set_hide_timer(Ivug_MainView *pMainView);
+void ivug_main_view_del_hide_timer(Ivug_MainView *pMainView);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //__IVUG_MAIN_VIEWER_H__
+
diff --git a/main/src/include/ivug-name-view.h b/main/src/include/ivug-name-view.h
new file mode 100755 (executable)
index 0000000..4e76df7
--- /dev/null
@@ -0,0 +1,78 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_NAME_VIEW_H__
+#define __IVUG_NAME_VIEW_H__
+
+#include "ivug-common.h"
+#include "ivug-media.h"
+
+typedef enum {
+       NAME_VIEW_RESPONSE_OK,
+       NAME_VIEW_RESPONSE_CANCEL,
+} ivug_name_response;
+
+typedef void (*FNResponse)(ivug_name_response resp, const char *string, void *pClientData);
+
+typedef struct _Ivug_NameView
+{
+       Evas_Object *bg;
+       Evas_Object *layout;
+       Evas_Object *content;
+
+       Evas_Object *navibar;
+
+       Evas_Object *editfield;
+       Evas_Object *entry;
+       Evas_Object *btn_done;
+
+       int haptic_handle;              // Negative if invalid
+
+       FNResponse fnresponse;
+       void *clientdata;
+
+} Ivug_NameView;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+Ivug_NameView *
+ivug_name_view_create(Evas_Object *parent, const char *title);
+
+void
+ivug_name_view_set_title(Ivug_NameView *pNameView, const char *title);
+
+void
+ivug_name_view_set_entry(Ivug_NameView *pNameView, const char *str);
+
+void
+ivug_name_view_set_response_callback(Ivug_NameView *pNameView, FNResponse resp, void *data);
+
+void
+ivug_name_view_destroy(Ivug_NameView *pNameView);
+
+Evas_Object *
+ivug_name_view_object_get(Ivug_NameView *pNameView);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __IVUG_NAME_VIEW_H__
+
+
diff --git a/main/src/include/ivug-setas-view.h b/main/src/include/ivug-setas-view.h
new file mode 100755 (executable)
index 0000000..5b7cce6
--- /dev/null
@@ -0,0 +1,103 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_SETAS_VIEW_H__
+#define __IVUG_SETAS_VIEW_H__
+
+#include "ivug-common.h"
+
+typedef enum {
+       NOTI_SUCCESS,
+       NOTI_FAIL,
+} TEXT_POPUP_TYPE;
+
+typedef enum {
+       IVUG_CTRLBAR_SET_SCREEN_HOME,
+       IVUG_CTRLBAR_SET_SCREEN_LOCK,
+       IVUG_CTRLBAR_SET_SCREEN_BOTH,
+       IVUG_CTRLBAR_SET_SCREEN_UNDEFINED,              // Show select popup when click ok button.
+       IVUG_CTRLBAR_SET_SCREEN_CALLERID,
+       IVUG_CTRLBAR_SET_SCREEN_VIDEO_CALL_ID,
+       IVUG_CTRLBAR_SET_SCREEN_MAX
+} ivug_set_screen_type;
+
+typedef enum {
+       IVUG_SETAS_NORMAL,      // launched from mainview
+       IVUG_SETAS_UG,          // ug mode
+       IVUG_SETAS_APPSVC       // appsvc mode
+} ivug_setas_mode;
+
+typedef enum {
+       SETAS_ERROR_TYPE_NONE,
+       SETAS_ERROR_TYPE_UNKNOWN_FORMAT,
+       SETAS_ERROR_TYPE_PERMISSION_DENIED,
+       SETAS_ERROR_TYPE_INVALID_FILE,
+       SETAS_ERROR_TYPE_GENERAL,
+} SetAs_Error;
+
+typedef struct {
+       Evas_Object *ly_effect;         // Layout for transition effect
+
+       Evas_Object *content;           // content
+       Evas_Object *genlist_popup;
+
+       char *filename;
+
+       ivug_setas_mode Mode;
+       ivug_set_screen_type Type;
+} Ivug_SetAsView;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+Ivug_SetAsView *
+ivug_setas_view_screen_ug_create(Evas_Object *parent, const char* filepath, ivug_setas_mode mode, ivug_set_screen_type type);
+
+Ivug_SetAsView *
+ivug_setas_view_callerid_ug_create(Evas_Object *parent, const char* filepath, ivug_setas_mode mode, int output_width, int output_height);
+
+Ivug_SetAsView *
+ivug_setas_view_video_call_id_ug_create(Evas_Object *parent, const char* filepath, ivug_setas_mode mode, int output_width, int output_height);
+
+void
+ivug_setas_view_destroy(Ivug_SetAsView *data);
+
+Evas_Object *
+ivug_setas_view_object_get(Ivug_SetAsView *pSetAsView);
+
+// Called by main_view
+Ivug_SetAsView *
+ivug_setas_view_screen_create(Evas_Object *parent, const char* filepath, ivug_setas_mode mode, ivug_set_screen_type screen_type);
+
+
+#if 0
+Ivug_SetAsView *
+ivug_setas_view_add(Evas_Object *parent);
+
+void
+ivug_setas_view_source_file_set(Ivug_SetAsView *pSetAsView, const char* filepath);
+
+void
+ivug_setas_view_mode_set(Ivug_SetAsView *pSetAsView, ivug_set_screen_type screen_type);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif //__IVUG_SETAS_VIEW_H__
diff --git a/main/src/include/ivug-slider-item.h b/main/src/include/ivug-slider-item.h
new file mode 100755 (executable)
index 0000000..d1b9dca
--- /dev/null
@@ -0,0 +1,181 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#pragma once
+
+#include "ivug-common.h"
+#include "ivug-medialist.h"
+#include "ivug-slider.h"
+
+typedef struct _Slide_Item Slide_Item;
+
+typedef void (*OnSliderStateChanged)(slide_state_t state, Slide_Item *si, void *client_data);
+
+typedef enum
+{
+       SITEM_TYPE_UNKNOWN,
+       SITEM_TYPE_IMAGE,
+       SITEM_TYPE_VIDEO,
+} sitem_type_t;
+
+struct _Slide_Item {
+       int x, y, w, h;                 // Object geometry
+//Data
+       slide_state_t state;
+       sitem_type_t type;
+
+       Media_Item *mitem;
+
+//flag
+       Eina_Bool thumbnail_show;
+
+// UI
+       Evas_Object* layout;
+       Evas_Object* thumbnail; // thumbnail
+
+       Evas_Object* vIcon;             //video play icon
+
+       Evas_Object* photocam;  // photocam
+
+       Evas_Object* progress;  //progress bar
+
+// Callback
+       bool bMenuVisible;
+       OnSliderStateChanged cb;
+       void *client_data;
+};\r
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// GUI related
+Slide_Item*
+ivug_slider_item_add(Evas_Object *slider);
+
+void
+ivug_slider_item_del(Slide_Item *si);
+
+// Geometry
+void
+ivug_slider_item_hide(Slide_Item *si);
+
+void
+ivug_slider_item_show(Slide_Item *si);
+
+void
+ivug_slider_item_move(Slide_Item *si, int x, int y);
+
+void
+ivug_slider_item_resize(Slide_Item *si, int w, int h);
+
+void
+ivug_slider_item_clip_set(Slide_Item *si, Evas_Object *clipper);
+
+void
+ivug_slider_item_clip_unset(Slide_Item *si);
+
+
+// Callback
+bool
+ivug_slider_item_set_callback(Slide_Item* si, OnSliderStateChanged cb, void *data);
+
+
+// Data
+const Media_Item *
+ivug_slider_item_data_get(Slide_Item *si);
+
+/*
+       When item is NULL, Data is cleared
+*/
+bool
+ivug_slider_item_data_set(Slide_Item *si, Media_Item *item);
+
+bool
+ivug_slider_item_icon_click_check(Slide_Item *si, int x, int y);
+
+drm_data_t *
+ivug_slider_item_check_drm_constraint(Slide_Item *si);
+
+
+// Item state
+bool
+ivug_slider_item_load(Slide_Item *si);
+
+void
+ivug_slider_item_play(Slide_Item* si);
+
+void
+ivug_slider_item_pause(Slide_Item* si);                // --> Hide
+
+void
+ivug_slider_item_resume(Slide_Item* si);       // --> Show
+
+void
+ivug_slider_item_stop(Slide_Item* si);
+
+void
+ivug_slider_item_video_play(Slide_Item* si);
+
+void
+ivug_slider_item_video_pause(Slide_Item* si);
+
+
+// Control
+bool
+ivug_slider_item_region_size_get(Slide_Item *si, int *x, int *y, int *w, int *h);
+
+void
+ivug_slider_item_hold_set(Slide_Item *si, Eina_Bool hold);             // Ignore mouse event
+
+void
+ivug_slider_item_zoom_reset(Slide_Item *si, Eina_Bool bAnim, int center_x, int center_y);
+
+void
+ivug_slider_item_zoom_set(Slide_Item *si, double zoom, int center_x, int center_y);
+
+double
+ivug_slider_item_zoom_get(Slide_Item* si);
+
+bool
+ivug_slider_item_image_rotate_set(Slide_Item *si, int angle);
+
+
+void
+ivug_slider_item_hide_menu(Slide_Item* si);
+
+void
+ivug_slider_item_show_menu(Slide_Item* si);
+
+Eina_Bool
+ivug_slider_item_video_is_playing(Slide_Item* si);
+
+
+Evas_Object *
+ivug_slider_item_image_get(Slide_Item* si);
+
+void
+ivug_slider_item_image_size_get(Slide_Item* si, int *w, int *h);
+
+int
+ivug_slider_item_zoom_level_get(Slide_Item* si);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
diff --git a/main/src/include/ivug-slider.h b/main/src/include/ivug-slider.h
new file mode 100755 (executable)
index 0000000..4ca46ee
--- /dev/null
@@ -0,0 +1,132 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_SLIDER_H__
+#define __IVUG_SLIDER_H__
+
+#include <Elementary.h>
+#include "ivug-medialist.h"
+#include "ivug-drm.h"
+
+typedef enum {
+       SLIDE_STATE_NONE = 0x00,
+       SLIDE_STATE_SET,        // Thumbnail is displayed.
+
+       SLIDE_STATE_DRM_CHECKING,                       // wait for drm popup
+
+       SLIDE_STATE_READY,              // Got original media
+
+       SLIDE_STATE_LOADING,                    // Load main image or drm decryption.
+       SLIDE_STATE_LOADED,                             // Image is shown
+
+// Error state
+       SLIDE_STATE_NO_RIGHT,
+       SLIDE_STATE_ERROR,
+} slide_state_t;
+
+
+typedef enum {
+       SLIDE_TO_RIGHT = 0x00,
+       SLIDE_TO_LEFT,
+       SLIDE_INSTANTLY,
+} slide_dir_t;
+
+typedef enum {
+       LONGTAP_ENDED,
+       LONGTAP_CANCELED,
+} longtap_state;
+
+
+/*
+       Slider signal list.
+
+       "slider,clicked" : when click once
+       "slider,longpressed" : when long pressed on slider
+       "slider,clicked,icon" : video icon clicked.
+       "slider,item,changed" :
+
+       "slider,item,state,changed"
+       "slider,item,deleted"
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+Evas_Object*
+ivug_slider_add(Evas_Object* parent);
+
+void
+ivug_slider_start(Evas_Object *obj);
+
+Eina_Bool
+ivug_slider_set_medialist(Evas_Object* obj, Media_List *mList, Media_Item *current);
+
+void
+ivug_slider_set_item(Evas_Object* obj, Media_Item *item, slide_dir_t dir);
+
+/*
+       Delete current media item
+*/
+void
+ivug_slider_delete_item(Evas_Object* obj);
+
+Media_Item *
+ivug_slider_get_item(Evas_Object* obj);
+
+slide_state_t
+ivug_slider_get_state(Evas_Object* obj);
+
+/*
+       Go background - stop animation
+*/
+void
+ivug_slider_pause(Evas_Object* obj);
+
+/*
+       Go foreground - start animation
+*/
+void
+ivug_slider_resume(Evas_Object* obj);
+
+void
+ivug_slider_skip(Evas_Object* obj);
+
+bool
+ivug_slider_load(Evas_Object* obj);
+
+void
+ivug_slider_dump_photocam(Evas_Object* obj);
+
+void
+ivug_slider_set_menu_visibility(Evas_Object* obj, Eina_Bool bVisible);
+
+unsigned int
+ivug_slider_zoom_level_get(Evas_Object *obj);
+
+void
+ivug_slider_zoom_in(Evas_Object *obj);
+
+void
+ivug_slider_zoom_out(Evas_Object *obj);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __IVUG_SLIDER_H__
+
diff --git a/main/src/include/ivug-string.h b/main/src/include/ivug-string.h
new file mode 100755 (executable)
index 0000000..77ea725
--- /dev/null
@@ -0,0 +1,166 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_STRING_H__
+#define __IVUG_STRING_H__
+
+#include <libintl.h>
+#include <app.h>
+
+/* Original code is in appcore-common.h */
+#define gettext_noop(str) (str) /**< keyword for xgettext  to extract translatable strings */
+#define N_(str) gettext_noop(str)  /**< gettext_noop alias */
+
+
+#define LOCALE_PATH                                            PREFIX"/res/locale" /*TODO!!!*/
+
+#ifndef PACKAGE
+#error PACKAGE is not defined
+#endif
+
+#ifndef LOCALE_PATH
+#error LOCALE_PATH is not defined
+#endif
+
+//string
+#define IVUG_TEXT_DOMAIN PACKAGE
+#define IVUG_LOCALEDIR LOCALE_PATH
+
+/***********************************************/
+/* String has to be sorted in ascending order. */
+/***********************************************/
+
+// Not yet translated
+
+#define IDS_DRM_INTERVAL_BASED_DAYS    _("You can use %s for %d days. Would you like to open it now?")
+#define IDS_DRM_TIME_BASED_GET _("%s is about to be locked. Do you want to get more licenses?")
+#define IDS_DRM_COUNT_BASED_OPEN_ONE   _("You have one more use of %s. Do you want to open it now?")
+#define IDS_DRM_COUNT_BASED_OPEN_MANY  _("You have %d more uses of %s. Do you want to open it now?")
+#define IDS_DRM_COUNT_BASED_ONE_MORE_GET       _("You have one more use of %s. Do you want to get more licenses?")
+#define IDS_DRM_COUNT_BASED_NO_MORE_GET        _("You have no more use of %s. Do you want to get more licenses?")
+#define IDS_DRM_UNLOCK _("%s is currently locked. Do you want to unlock it now?")
+
+#define IDS_COLLABORATIVE_PLAY _("Collaborative play")
+
+#define IDS_CALLER_ID_NOTIFY   _("Selected area wiil be applied to caller image")
+#define IDS_CROP_NOTIFY                        _("Select image area")
+#define IDS_CHANGE_NAME                        _("Change name")
+#define IDS_MMS                                        _("MMS")
+#define IDS_SHARE_VIA                  _("Share via")
+#define IDS_DO_NOT_SEND                        _("Do not send")
+#define IDS_SEND                               _("Send")
+#define IDS_ENTER_NAME                 _("Enter name")
+
+#define IDS_NULL                               _("")
+
+/* Registered string in STMS IV */
+#define IDS_ACCUMULATED_TIME   (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_ACCUMULATED_TIME"))
+#define IDS_ADDED                              (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_ADDED"))
+#define IDS_ALL_ALBUMS                 (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_HEADER_ALL_ALBUMS"))
+#define IDS_ANY                                (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_ANY"))
+#define IDS_AVAILABLE_USES             (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_AVAILABLE_USES"))
+#define IDS_BASIC                              (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_BASIC"))
+#define IDS_CALLER_IMAGE               (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_CALLER_IMAGE"))
+#define IDS_COPY_TO_CLIPBOARD  (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_COPY_TO_CLIPBOARD"))
+#define IDS_COUNT                              (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_COUNT"))
+#define IDS_CROP                               (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_CROP"))
+#define IDS_DATE_CREATED               (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_DATE_CREATED"))
+#define IDS_DISPLAY                    (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_DISPLAY"))
+#define IDS_ENTRY_IS_EMPTY             (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_ENTRY_IS_EMPTY"))
+#define IDS_EXECUTE                    (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_EXECUTE"))
+#define IDS_FORMAT                             (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_FILE_FORMAT"))
+#define IDS_FILE_LOCATION              (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_FILE_LOCATION"))
+#define IDS_FILE_TRANSFER              (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_FILE_TRANSFER"))
+#define IDS_FORWARDING                         (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_FORWARDING"))
+#define IDS_HOME_AND_LOCK_SCREEN_WALLPAPER (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"))
+#define IDS_HOME_AND_LOCK_SCREENS (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_HOME_AND_LOCK_SCREENS"))
+#define IDS_HOME_SCREEN                        (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_HOME_SCREEN"))
+#define IDS_HOME_SCREEN_WALLPAPER (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"))
+#define IDS_IMPOSSIBLE                         (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_IMPOSSIBLE"))
+#define IDS_INDIVIDUAL                         (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_INDIVIDUAL"))
+#define IDS_INTERVAL                   (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_INTERVAL"))
+#define IDS_INVALID_IMAGE_FILE (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_INVALID_IMAGE_FILE"))
+#define IDS_LATITUDE                   (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_LATITUDE"))
+#define IDS_LOCK_SCREEN                        (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_LOCK_SCREEN"))
+#define IDS_LOCK_SCREEN_WALLPAPER (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"))
+#define IDS_LONGITUDE                  (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_LONGITUDE"))
+#define IDS_MAX_CHAR_LENGTH_REACHED (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"))
+#define IDS_N_A                                (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_N_A"))
+#define IDS_PERMISSION_DENIED  (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_PERMISSION_DENIED"))
+#define IDS_POSSIBLE                   (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_POSSIBLE"))
+#define IDS_PRINT                              (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_PRINT"))
+#define IDS_PRINT_VIA_BLUETOOH (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"))
+#define IDS_RESOLUTION                         (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_RESOLUTION"))
+#define IDS_RIGHT_STATUS               (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_RIGHT_STATUS"))
+#define IDS_ROTATE_LEFT                (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_ROTATE_LEFT"))
+#define IDS_ROTATE_RIGHT               (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_ROTATE_RIGHT"))
+#define IDS_SD_CARD_REMOVED            (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_SD_CARD_REMOVED"))
+#define IDS_SELECT_DEVICE              (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_SELECT_DEVICE"))
+#define IDS_SERVER_NAME                (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_SERVER_NAME"))
+#define IDS_SET_AS                             (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_SET_AS"))
+#define IDS_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"))
+#define IDS_SHARE                              (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_SHARE"))
+#define IDS_SLIDE_SHOW                 (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_SLIDE_SHOW"))
+#define IDS_TIMED_COUNT                (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_TIMED_COUNT"))
+#define IDS_TRIM                               (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_TRIM"))
+#define IDS_UNLIMITED                  (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_UNLIMITED"))
+#define IDS_VALIDITY                   (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_VALIDITY"))
+#define IDS_VENDOR                             (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_VENDOR"))
+
+
+// System string.
+
+#define IDS_APPLICATION_NOT_INSTALLED (dgettext("sys_string", "IDS_COM_BODY_APPLICATION_NOT_INSTALLED"))
+#define IDS_BACK                       (dgettext("sys_string", "IDS_COM_BODY_BACK"))
+#define IDS_CANCEL                     (dgettext("sys_string", "IDS_COM_SK_CANCEL"))
+#define IDS_CLOSE                      (dgettext("sys_string", "IDS_COM_BODY_CLOSE"))
+#define IDS_COPY                       (dgettext("sys_string", "IDS_COM_BODY_COPY"))
+#define IDS_COPIED_TO_CLIPBOARD                (dgettext("sys_string", "IDS_COM_POP_COPIED_TO_CLIPBOARD"))
+#define IDS_DETAILS                    (dgettext("sys_string", "IDS_COM_BODY_DETAILS"))
+#define IDS_DELETE_MSG         (dgettext("sys_string", "IDS_COM_POP_DELETE_Q"))
+#define IDS_DELETE                     (dgettext("sys_string", "IDS_COM_BODY_DELETE"))
+#define IDS_DELETED            (dgettext("sys_string", "IDS_COM_POP_DELETED"))
+#define IDS_DONE                       (dgettext("sys_string", "IDS_COM_SK_DONE"))
+#define IDS_DOWNLOAD           (dgettext("sys_string", "IDS_COM_SK_DOWNLOAD"))
+#define IDS_DOWNLOAD_FAILED    (dgettext("sys_string", "IDS_COM_POP_DOWNLOAD_FAILED"))
+#define IDS_EDIT                       (dgettext("sys_string", "IDS_COM_BODY_EDIT"))
+#define IDS_ERROR                      (dgettext("sys_string", "IDS_COM_POP_ERROR"))
+#define IDS_FAILED                     (dgettext("sys_string", "IDS_COM_POP_FAILED"))
+#define IDS_FAVOURITES         (dgettext("sys_string", "IDS_COM_BODY_FAVOURITES"))
+#define IDS_LOADING            (dgettext("sys_string", "IDS_COM_BODY_LOADING"))
+#define IDS_LOCATION           (dgettext("sys_string", "IDS_COM_BODY_LOCATION"))
+#define IDS_MORE                       (dgettext("sys_string", "IDS_COM_BODY_MORE"))
+#define IDS_MOVE                       (dgettext("sys_string", "IDS_COM_BODY_MOVE"))
+#define IDS_NAME                       (dgettext("sys_string", "IDS_COM_BODY_DETAILS_NAME"))
+#define IDS_NO                         (dgettext("sys_string", "IDS_COM_SK_NO"))
+#define IDS_NO_NAME                    (dgettext("sys_string", "IDS_COM_BODY_NO_NAME"))
+#define IDS_OK                                 (dgettext("sys_string", "IDS_COM_SK_OK"))
+#define IDS_PLAY                       (dgettext("sys_string", "IDS_COM_SK_PLAY"))
+#define IDS_SAVE                       (dgettext("sys_string", "IDS_COM_SK_SAVE"))
+#define IDS_SAVED                      (dgettext("sys_string", "IDS_COM_POP_SAVED"))
+#define IDS_SET                                (dgettext("sys_string", "IDS_COM_SK_SET"))
+#define IDS_SIZE                       (dgettext("sys_string", "IDS_COM_BODY_SIZE"))
+#define IDS_SUCCESS            (dgettext("sys_string", "IDS_COM_POP_SUCCESS"))
+#define IDS_SYSTEM                     (dgettext("sys_string", "IDS_COM_BODY_SYSTEM"))
+#define IDS_TIME                       (dgettext("sys_string", "IDS_COM_POP_TIME"))
+#define IDS_TYPE                       (dgettext("sys_string", "IDS_COM_POP_TYPE"))
+#define IDS_UNKNOWN            (dgettext("sys_string", "IDS_COM_BODY_UNKNOWN"))
+#define IDS_YES                        (dgettext("sys_string", "IDS_COM_SK_YES"))
+
+
+#endif // __IVUG_STRING_H__
+
+
diff --git a/main/src/slider/ivug-slider-item.cpp b/main/src/slider/ivug-slider-item.cpp
new file mode 100755 (executable)
index 0000000..490bcc5
--- /dev/null
@@ -0,0 +1,1203 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-common.h"
+
+#include "ivug-slider-item.h"
+
+#include "ivug-image.h"
+#include "ivug-drm.h"
+
+#include "ivug-config.h"
+
+
+#define DEFAULT_THUMBNAIL_PATH                 IMAGE_PATH"/T01_Nocontents_broken.png"
+#define DRM_NO_RIGHT_IMAGE_PATH                        IMAGE_PATH"/image_drm_no_rights.jpg"
+
+#define IVUG_SLIDER_EDJ                                EDJ_PATH"/ivug-slider.edj"
+
+#undef USE_IMAGE_THUMBNAIL
+#define USE_VIDEO_THUMBNAIL
+
+/*
+       Use elm_icon istead of elm_image. elm_icon preserve image ratio. and seems more faster.
+*/
+
+// Forward declaration
+
+static bool
+_show_thumbnail( Slide_Item* si, const char *filepath)
+{
+// TODO : When image orientatin is not 0 degree, rotate thumbnail also
+       IV_ASSERT(si != NULL);
+
+       if (si->thumbnail == NULL)
+       {
+               MSG_SITEM_FATAL("slide item or thumbnail object is NULL");
+               return false;
+       }
+
+       if ( filepath == NULL )
+       {
+               // Set default filepath.
+               filepath = DEFAULT_THUMBNAIL_PATH;
+       }
+
+       MSG_SITEM_MED("Set thumbnail : %s",  ivug_get_filename(filepath));
+
+       if (ivug_is_file_exist(filepath) == false )
+       {
+               MSG_SITEM_ERROR("Cannot find thumbnail : %s", filepath);
+               filepath = DEFAULT_THUMBNAIL_PATH;
+       }
+
+       if (elm_icon_file_set(si->thumbnail, filepath, NULL) == EINA_FALSE)
+       {
+               MSG_SITEM_ERROR("Cannot load thumbnail : %s", filepath);
+               return false;
+       }
+
+       evas_object_repeat_events_set(si->thumbnail, EINA_FALSE);
+       edje_object_signal_emit((si->layout), "elm,state,show_thumbnail", "slider");
+
+       return true;
+}
+
+static bool
+_hide_thumbnail(Slide_Item* si)
+{
+       IV_ASSERT(si != NULL);
+
+       evas_object_repeat_events_set(si->thumbnail, EINA_TRUE);
+
+       edje_object_signal_emit((si->layout), "elm,state,hide_thumbnail", "slider");
+
+       return true;
+}
+
+static void _show_progressbar(Slide_Item *si)
+{
+       IV_ASSERT(si != NULL);
+
+       if ( si->progress )
+       {
+               elm_progressbar_pulse(si->progress, EINA_TRUE); //start pulse.
+       }
+       edje_object_signal_emit((si->layout), "elm,state,show,progress", "slider");
+}
+
+static void _hide_progressbar(Slide_Item *si)
+{
+       IV_ASSERT(si != NULL);
+
+       if ( si->progress )
+       {
+               elm_progressbar_pulse(si->progress, EINA_FALSE); //stop pulse.
+       }
+       edje_object_signal_emit((si->layout), "elm,state,hide,progress", "slider");
+}
+
+
+static void _show_videoicon(Slide_Item *si)
+{
+       IV_ASSERT(si != NULL);
+
+       edje_object_signal_emit((si->layout), "elm,state,show_icon", "slider"); // Hide video play icon
+}
+
+static void _hide_videoicon(Slide_Item *si)
+{
+       IV_ASSERT(si != NULL);
+
+       edje_object_signal_emit((si->layout), "elm,state,hide_icon", "slider"); // Hide video play icon
+
+//     edje_object_signal_emit((si->layout), "elm,state,hide_icon", "slider"); // Hide video play icon
+}
+
+static bool _start_drm_consume(Slide_Item *si)
+{
+       return true;\r
+}
+
+static bool _stop_drm_consume(Slide_Item *si)
+{
+       return true;\r
+}
+
+static bool _pause_drm_consume(Slide_Item *si)
+{
+       return true;\r
+}
+
+static bool _resume_drm_consume(Slide_Item *si)
+{\r
+       return true;\r
+}\r
+
+
+static sitem_type_t _get_sitem_type(Media_Type mtype)
+{
+       switch(mtype)
+       {
+       case SLIDE_TYPE_IMAGE:
+               return SITEM_TYPE_IMAGE;
+
+       case SLIDE_TYPE_VIDEO:
+       case SLIDE_TYPE_STREAMING:
+               return SITEM_TYPE_VIDEO;
+
+       case SLIDE_TYPE_NONE:
+       case SLIDE_TYPE_UNKNOWN:
+       default:
+               return SITEM_TYPE_UNKNOWN;
+       }
+
+       return SITEM_TYPE_UNKNOWN;
+}
+
+
+
+
+inline
+void _call_user_callback(Slide_Item* si)
+{
+       if ( si->cb )
+       {
+               (si->cb)(si->state, si, si->client_data);
+       }
+}
+
+
+static void
+_photocam_loaded_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+
+       Slide_Item* si = static_cast<Slide_Item*>(data);
+
+//hide progress.
+       _hide_progressbar(si);
+
+       if ( si->mitem == NULL)
+       {
+               MSG_SITEM_ERROR("Debug Me! Data item is NULL.");
+               return;
+       }
+
+       Media_Data* mdata = ivug_medialist_get_data(si->mitem);
+       if(mdata == NULL)
+       {
+               MSG_SITEM_ERROR("ivug_medialist_get_data failed.");
+               si->state = SLIDE_STATE_ERROR;
+               return;
+       }
+
+#if 0
+       typedef enum _Evas_Load_Error
+       {
+          EVAS_LOAD_ERROR_NONE = 0, /**< No error on load */
+          EVAS_LOAD_ERROR_GENERIC = 1, /**< A non-specific error occurred */
+          EVAS_LOAD_ERROR_DOES_NOT_EXIST = 2, /**< File (or file path) does not exist */
+          EVAS_LOAD_ERROR_PERMISSION_DENIED = 3, /**< Permission deinied to an existing file (or path) */
+          EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 4, /**< Allocation of resources failure prevented load */
+          EVAS_LOAD_ERROR_CORRUPT_FILE = 5, /**< File corrupt (but was detected as a known format) */
+          EVAS_LOAD_ERROR_UNKNOWN_FORMAT = 6 /**< File is not a known format */
+       } Evas_Load_Error; /**< Load error you can get from loading of files - see evas_load_error_str() too */
+#endif
+
+//     Evas_Load_Error error = static_cast<Evas_Load_Error>(reinterpret_cast<int>(event_info));
+       Evas_Load_Error error = evas_object_image_load_error_get(ivug_image_internal_image_get(si->photocam));
+
+       if ( error != EVAS_LOAD_ERROR_NONE )
+       {
+               MSG_SITEM_ERROR("Image loading failed. Error=%d File=%s", error, mdata->filepath);
+               si->state = SLIDE_STATE_ERROR;
+
+               evas_object_hide(si->photocam);
+
+               if ( error == EVAS_LOAD_ERROR_PERMISSION_DENIED)
+               {
+                       _show_thumbnail(si, DRM_NO_RIGHT_IMAGE_PATH);
+               }
+               else
+               {
+                       _show_thumbnail(si, DEFAULT_THUMBNAIL_PATH);
+               }
+
+               _call_user_callback(si);
+
+               return ;
+       }
+
+       si->state = SLIDE_STATE_LOADED;
+
+       int w, h;
+
+       ivug_image_image_size_get(si->photocam, &w, &h);
+
+       if (mdata->slide_type == SLIDE_TYPE_VIDEO || mdata->slide_type == SLIDE_TYPE_STREAMING)         //if slide type is video,
+       {
+               // TODO : Never get here..
+               MSG_SITEM_FATAL("slide type is video. thumbnail image ");
+               return;
+       }
+
+       evas_object_show(obj);  //photocam show.
+
+//hide thumbnail.
+       MSG_SITEM_HIGH("Thumbnail Hide");
+
+#ifdef USE_IMAGE_THUMBNAIL
+       _hide_thumbnail(si);
+#endif
+
+       _call_user_callback(si);
+
+       MSG_SITEM_HIGH("Photocam Pre-loaded. File=%s", ivug_get_filename(mdata->filepath));
+}
+
+
+static bool _set_mitem(Slide_Item* si, Media_Item *item)
+{
+       Media_Data *mdata = ivug_medialist_get_data(item);
+       IV_ASSERT(mdata != NULL);
+
+       si->mitem = item;
+
+       si->type = _get_sitem_type(mdata->slide_type);
+
+       evas_object_smart_callback_add(si->photocam, "loaded", _photocam_loaded_cb, si);
+
+       if ( si->type == SITEM_TYPE_IMAGE )
+       {
+               _hide_videoicon(si);
+
+#ifdef USE_IMAGE_THUMBNAIL
+// Set thumbnail
+               _show_thumbnail(si, mdata->thumbnail_path);
+#endif
+               edje_object_part_swallow(si->layout, "slider.contents", si->photocam);
+
+               MSG_SITEM_HIGH("SItem type is IMAGE");
+       }
+       else if ( si->type == SITEM_TYPE_VIDEO )
+       {
+               elm_icon_file_set(si->vIcon, EDJ_PATH"/ivug-icons.edj", "btn.video.play");
+               _show_thumbnail(si, mdata->thumbnail_path);
+               _show_videoicon(si);
+
+               MSG_SITEM_HIGH("SItem type is VIDEO");
+       }
+       else
+       {
+               MSG_SITEM_HIGH("SItem type is UNKNOWN");
+               _show_thumbnail(si, mdata->thumbnail_path);
+               _hide_videoicon(si);
+       }
+
+       switch(mdata->slide_type)
+       {
+               case SLIDE_TYPE_IMAGE:
+                       MSG_SITEM_HIGH("Set image. %s", ivug_get_filename(mdata->filepath));
+
+                       if(mdata->bIsDRMContent == EINA_FALSE)
+                       {
+                               si->state = SLIDE_STATE_READY;
+                       }
+                       else
+                       {
+                               si->state = SLIDE_STATE_DRM_CHECKING;
+                       }
+               break;
+
+               case SLIDE_TYPE_VIDEO:
+               case SLIDE_TYPE_STREAMING:
+                       MSG_SITEM_HIGH("Set video. %s", ivug_get_filename(mdata->filepath));
+
+                       si->state = SLIDE_STATE_READY;  // Video dont need to load photocam
+                       break;
+
+               case SLIDE_TYPE_UNKNOWN:
+                       MSG_SITEM_ERROR("Unknown image. %s", ivug_get_filename(mdata->filepath));
+
+                       si->state = SLIDE_STATE_ERROR;
+
+                       break;
+
+               default:
+                       MSG_SITEM_ERROR("slide type invaild. Type=%d", mdata->slide_type);
+                       si->state = SLIDE_STATE_ERROR;
+                       return true;
+                       break;
+
+       }
+
+       return true;
+}
+
+
+static bool _unset_mitem(Slide_Item* si)
+{
+       Media_Data *mdata = ivug_medialist_get_data(si->mitem);
+
+       si->state = SLIDE_STATE_NONE;
+
+       if ( mdata == NULL )
+       {
+               MSG_SITEM_ERROR("Data is NULL");
+               return true;
+       }
+
+       MSG_SITEM_HIGH("Clear Image. %s", ivug_get_filename(mdata->filepath));
+
+// Unswallow photocam/videocam
+       edje_object_part_unswallow(si->layout, edje_object_part_swallow_get(si->layout, "slider.contents"));
+
+       switch(si->type)
+       {
+       case SITEM_TYPE_IMAGE:
+               evas_object_hide(si->photocam);
+               evas_object_smart_callback_del_full(si->photocam, "loaded", _photocam_loaded_cb, si);
+               ivug_image_unset(si->photocam); //init photocam.
+               break;
+       case SITEM_TYPE_VIDEO:
+               break;
+       default:
+               break;
+       }
+
+// Resetting GUI
+       _hide_progressbar(si);
+       _hide_thumbnail(si);
+       _hide_videoicon(si);
+
+       si->type = SITEM_TYPE_UNKNOWN;
+       si->mitem = NULL;
+
+       MSG_SITEM_HIGH("Slider Item is cleared.");
+
+       return true;
+}
+
+
+static void _on_event_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+       MSG_SLIDER_HIGH("Event layer clicked : %s Layer=%d", evas_object_name_get(obj), evas_object_layer_get(obj));
+}
+
+
+Slide_Item*
+ivug_slider_item_add(Evas_Object *slider)
+{
+       Slide_Item* si = NULL;
+
+       PERF_CHECK_BEGIN(LVL6, "init variable");
+
+       //create item
+       si = (Slide_Item*)calloc(1, sizeof (Slide_Item));
+
+       if ( si == NULL )
+       {
+               MSG_SITEM_FATAL("Cannot allocated memory : %d.", sizeof (Slide_Item));
+               return NULL;
+       }
+
+       si->state = SLIDE_STATE_NONE;           //set slide state
+       si->type = SITEM_TYPE_UNKNOWN;
+
+       PERF_CHECK_END(LVL6, "init variable");
+
+//Create the slider item layout
+       PERF_CHECK_BEGIN(LVL6, "create slider item layout");
+
+       Evas_Object *layout = edje_object_add(evas_object_evas_get(slider));
+       if(edje_object_file_set(layout, IVUG_SLIDER_EDJ, "slider") == EINA_FALSE)
+       {
+               MSG_SITEM_ERROR("Cannot load file : %s", IVUG_SLIDER_EDJ);
+               free(si);
+
+               return NULL;
+       }
+
+       evas_object_name_set(layout, "Slider item edj");
+       evas_object_event_callback_add(layout, EVAS_CALLBACK_MOUSE_DOWN, _on_event_mouse_down, NULL);
+
+       si->layout = layout;
+
+       PERF_CHECK_END(LVL6, "create slider item layout");
+
+//set thumbnail.
+       PERF_CHECK_BEGIN(LVL6, "set thumbnail");
+
+       si->thumbnail = elm_icon_add(slider);
+       evas_object_name_set(si->thumbnail, "Thumbnail");
+       evas_object_event_callback_add(si->thumbnail, EVAS_CALLBACK_MOUSE_DOWN, _on_event_mouse_down, NULL);
+
+       edje_object_part_swallow(si->layout, "slider.thumbnail", si->thumbnail);
+
+       PERF_CHECK_END(LVL6, "set thumbnail");
+
+//set progress
+       PERF_CHECK_BEGIN(LVL6, "set progress");
+
+       PERF_CHECK_BEGIN(LVL7, "elm_progressbar_add");
+       si->progress = elm_progressbar_add(slider);
+       elm_object_style_set(si->progress, "list_process");
+       elm_progressbar_pulse(si->progress, EINA_FALSE);
+       PERF_CHECK_END(LVL7, "elm_progressbar_add");
+
+       PERF_CHECK_BEGIN(LVL7, "swallow progress");
+       edje_object_part_swallow(si->layout, "slider.progress", si->progress);
+       PERF_CHECK_END(LVL7, "swallow progress");
+
+       PERF_CHECK_END(LVL6, "set progress");
+
+//Add the photocam
+       PERF_CHECK_BEGIN(LVL6, "ivug_image_create");
+
+       si->photocam =  ivug_image_create(si->layout);
+       evas_object_name_set(si->photocam, "photocam");
+
+       PERF_CHECK_END(LVL6, "ivug_image_create");
+
+       PERF_CHECK_BEGIN(LVL6, "video icon");
+
+// z-order be decided along added order
+       evas_object_smart_member_add(si->layout, slider);
+
+       si->vIcon = elm_icon_add(slider);
+       elm_icon_file_set(si->vIcon, EDJ_PATH"/ivug-icons.edj", "btn.video.play");
+
+       evas_object_name_set(si->vIcon, "video icon");
+       evas_object_event_callback_add(si->vIcon, EVAS_CALLBACK_MOUSE_DOWN, _on_event_mouse_down, NULL);
+
+       edje_object_part_swallow(si->layout, "slider.icon", si->vIcon);
+//     evas_object_smart_member_add(si->vIcon, slider);
+       PERF_CHECK_END(LVL6, "video icon");
+
+       si->bMenuVisible = true;                // Default visibility is true
+
+       MSG_SITEM_HIGH("Creating slider item. 0x%08x.", si);
+
+       return si;
+}
+
+
+void
+ivug_slider_item_resize(Slide_Item* si, int w, int h)
+{
+       IV_ASSERT(si != NULL );
+
+       if ( si->w == w && si->h == h ) return;
+       // TODO : Impelement
+       MSG_SITEM_HIGH("SLIDER Resize to WH(%d,%d)", w, h );
+
+// w,h is not Image's scale, but Object's scale
+       si->w = w;
+       si->h = h;
+
+//     MSG_SITEM_HIGH("resize layout: %d, %d", si->w, si->h);
+       evas_object_resize(si->layout, si->w, si->h);
+
+}
+
+
+void ivug_slider_item_move(Slide_Item* si, int x, int y)
+{
+       IV_ASSERT(si != NULL );
+
+       MSG_SITEM_MED("SLIDER Move to XY(%d,%d)", x, y);
+
+       if ( si->x == x && si->y == y) return;
+
+       //photocam
+       si->x = x;
+       si->y = y;
+
+       if ( si->w == 0 || si->h == 0) return;
+
+       evas_object_move(si->layout, x, y);
+
+// Center align
+//     evas_object_move();
+//     si->vIcon
+
+}
+
+void ivug_slider_item_del(Slide_Item* si)
+{
+       IV_ASSERT(si != NULL );
+
+       MSG_SITEM_HIGH("Removing Slider Item");
+
+       ivug_slider_item_stop(si);
+
+       si->mitem = NULL;       // for error handling
+
+       if (si->photocam)
+       {
+               evas_object_del(si->photocam);
+               si->photocam = NULL;
+       }
+
+       if (si->thumbnail)
+       {
+               evas_object_del(si->thumbnail);
+               si->thumbnail = NULL;
+       }
+
+       if (si->progress)
+       {
+               evas_object_del(si->progress);
+               si->progress = NULL;
+       }
+
+       if(si->layout)
+       {
+               evas_object_del(si->layout);
+               si->layout = NULL;
+       }
+
+       if ( si->vIcon )
+       {
+               evas_object_del(si->vIcon);
+               si->vIcon = NULL;
+       }
+
+       free(si);
+
+       si = NULL;
+
+       MSG_SITEM_HIGH("Removed Slider Item");
+
+}
+
+void ivug_slider_item_hide(Slide_Item* si)
+{
+       IV_ASSERT(si != NULL );
+
+       MSG_SITEM_HIGH("Hide slide item");
+       evas_object_hide(si->layout);
+}
+
+
+void ivug_slider_item_show(Slide_Item* si)
+{
+       IV_ASSERT(si != NULL );
+
+       MSG_SITEM_HIGH("Show slide item");
+       evas_object_show(si->layout);
+}
+
+
+void
+ivug_slider_item_clip_set(Slide_Item* si, Evas_Object *clipper)
+{
+       IV_ASSERT(si != NULL );
+// no need to check layout is NULL
+       int x, y, w, h;
+
+       evas_object_geometry_get(clipper, &x, &y, &w, &h);
+
+       MSG_SITEM_HIGH("Clip SET!! Geometry(%d,%d,%d,%d)", x, y, w, h);
+
+       evas_object_clip_set(si->layout, clipper);
+}
+
+void
+ivug_slider_item_clip_unset(Slide_Item* si)
+{
+       IV_ASSERT(si != NULL );
+// no need to check layout is NULL
+       evas_object_clip_unset(si->layout);
+}
+
+bool
+ivug_slider_item_data_set(Slide_Item* si, Media_Item *item)
+{
+       IV_ASSERT(si != NULL );
+
+       if ( item == NULL )
+       {
+               if ( si->state == SLIDE_STATE_NONE )
+               {
+                       MSG_SITEM_WARN("Slide item is already cleared. just return. Mitem=0x%08x", si->mitem);
+                       return true;
+               }
+
+// Remove callback because when photocam_file_set(with file name=NULL) trigger "loaded" callback
+               _unset_mitem(si);
+       }
+       else
+       {
+               if ( si->state != SLIDE_STATE_NONE )
+               {
+                       MSG_SITEM_WARN("State is not none. State=%d Unset First", si->state);
+                       _unset_mitem(si);
+               }
+
+               _set_mitem(si, item);
+       }
+
+       return true;
+}
+
+
+// Ready to Loading
+bool
+ivug_slider_item_load(Slide_Item *si)
+{
+       IV_ASSERT(si != NULL);
+
+       if (si->state != SLIDE_STATE_READY)
+       {
+               MSG_SITEM_ERROR("Invalid state : %d", si->state);
+               return false;
+       }
+
+       Media_Data *mdata = ivug_medialist_get_data(si->mitem);
+       IV_ASSERT(mdata != NULL);
+
+       if(mdata->filepath == NULL)
+       {
+               MSG_SITEM_ERROR("file path is NULL");
+               return false;
+       }
+
+       MSG_SITEM_HIGH("Load file. %s", ivug_get_filename(mdata->filepath));
+
+       char path[IVUG_MAX_FILE_PATH_LEN] = {0,};
+
+       if ( mdata->bIsDRMContent == EINA_TRUE )
+       {
+               _hide_progressbar(si);\r
+
+               MSG_SITEM_ERROR("Image loading failed. RO expired File=%s", mdata->filepath);\r
+               si->state = SLIDE_STATE_ERROR;\r
+\r
+               evas_object_hide(si->photocam);\r
+               _show_thumbnail(si, DRM_NO_RIGHT_IMAGE_PATH);\r
+\r
+               _call_user_callback(si);\r
+\r
+               return false;\r
+       }\r
+       else
+       {
+               strncpy(path, mdata->filepath, sizeof(path));
+       }
+
+       switch(mdata->slide_type)
+       {
+               case SLIDE_TYPE_IMAGE:
+               {
+                       si->state = SLIDE_STATE_LOADING;
+
+                       if (ivug_image_file_set(si->photocam, path, NULL) != EVAS_LOAD_ERROR_NONE)
+                       {
+                               MSG_SITEM_ERROR("Failed photocam to set file file=%s", path);
+                               si->state = SLIDE_STATE_ERROR;
+
+                               _call_user_callback(si);
+                               return false;
+                       }
+
+                       return true;
+
+               }
+               break;
+       case SLIDE_TYPE_VIDEO:
+               si->state = SLIDE_STATE_LOADED;
+
+               break;
+       case SLIDE_TYPE_STREAMING:
+               si->state = SLIDE_STATE_LOADED;
+               return true;
+
+               break;
+
+       default:
+               MSG_SITEM_ERROR("slide type invaild. Type=%d", mdata->slide_type);
+               return false;
+               break;
+       }
+
+       return true;
+}
+
+void ivug_slider_item_play(Slide_Item* si)
+{
+       IV_ASSERT(si != NULL );
+
+       Media_Data *mdata = ivug_medialist_get_data(si->mitem);
+
+       MSG_SITEM_HIGH("Start sitem. %s", mdata->filepath);
+
+       if ( si->state != SLIDE_STATE_LOADED )
+       {
+               MSG_SITEM_ERROR("Play. but state is %d", si->state);
+       }
+
+       if(mdata->bIsDRMContent == true)
+       {
+               _start_drm_consume(si);
+       }
+
+// Start animation
+       if ( si->type == SITEM_TYPE_IMAGE )
+       {
+               ivug_image_animated_set(si->photocam, EINA_TRUE);
+       }
+}
+
+void ivug_slider_item_stop(Slide_Item* si)
+{
+       IV_ASSERT(si != NULL );
+
+       if ( si->state != SLIDE_STATE_LOADED )
+       {
+               // When very first/last image and invalid
+               return;
+       }
+
+       Media_Data *mdata = ivug_medialist_get_data(si->mitem);
+       MSG_SITEM_HIGH("Stop sitem. %s", mdata->filepath);
+
+       if(mdata->bIsDRMContent == true)
+       {
+               _stop_drm_consume(si);
+       }
+
+       if (si->type == SITEM_TYPE_VIDEO)
+       {
+       // Nothing to do
+       }
+       else if ( si->type == SITEM_TYPE_IMAGE )
+       {
+               ivug_image_animated_set(si->photocam, EINA_FALSE);
+       }
+}
+
+
+void ivug_slider_item_pause(Slide_Item* si)
+{
+       IV_ASSERT(si != NULL );
+
+       if ( si->state != SLIDE_STATE_LOADED )
+       {
+               // When very first/last image and invalid
+               return;
+       }
+
+       Media_Data *mdata = ivug_medialist_get_data(si->mitem);
+       MSG_SITEM_HIGH("Pause sitem. %s", mdata->filepath);
+
+       if(mdata->bIsDRMContent == true)
+       {
+               _pause_drm_consume(si);
+       }
+
+       if (si->type == SITEM_TYPE_VIDEO)
+       {
+               // Nothing to do
+       }
+       else if ( si->type == SITEM_TYPE_IMAGE )
+       {
+               ivug_image_animated_set(si->photocam, EINA_FALSE);
+       }
+}
+
+void ivug_slider_item_resume(Slide_Item* si)
+{
+       IV_ASSERT(si != NULL );
+
+       if ( si->state != SLIDE_STATE_LOADED )
+       {
+               // When very first/last image and invalid
+               return;
+       }
+
+       Media_Data *mdata = ivug_medialist_get_data(si->mitem);
+       MSG_SITEM_HIGH("Resume sitem. %s", mdata->filepath);
+
+       if(mdata->bIsDRMContent == true)
+       {
+               _resume_drm_consume(si);
+       }
+
+       if (si->type == SITEM_TYPE_IMAGE)
+       {
+               ivug_image_animated_set(si->photocam, EINA_TRUE);
+       }
+}
+
+bool
+ivug_slider_item_set_callback(Slide_Item* si, OnSliderStateChanged cb, void *data)
+{
+       IV_ASSERT(si != NULL );
+
+       si->cb = cb;
+       si->client_data = data;
+
+       return true;
+}
+
+const Media_Item *
+ivug_slider_item_data_get(Slide_Item *si)
+{
+       IV_ASSERT(si != NULL);
+
+       return si->mitem;
+}
+
+// Photocam
+bool
+ivug_slider_item_region_size_get(Slide_Item* si, int *x, int *y, int *w, int *h)
+{
+       IV_ASSERT(si != NULL );
+
+       if ( si->mitem == NULL)
+       {
+               MSG_SITEM_ERROR("Debug Me! Data item is NULL.");
+               return false;
+       }
+
+       Media_Data *mdata = ivug_medialist_get_data(si->mitem);
+
+       if ( mdata == NULL )
+       {
+               MSG_SITEM_ERROR("slide type is NULL. Item=0x%08x", si);
+               return false;           // TODO : Temp..
+       }
+
+       switch(si->type)
+       {
+               case SITEM_TYPE_IMAGE:
+               {
+                       ivug_image_region_get(si->photocam, x, y, w, h);
+               }
+               break;
+
+               case SITEM_TYPE_VIDEO:
+               {
+                       return false;
+               }
+               break;
+
+               case SITEM_TYPE_UNKNOWN:
+                       return false;
+               break;
+
+               default:
+                       MSG_SITEM_ERROR("Unknwon type: %d", si->type);
+                       return false;
+               break;
+       }
+
+       return true;
+}
+
+
+
+void
+ivug_slider_item_hold_set(Slide_Item* si, Eina_Bool hold)
+{
+       IV_ASSERT(si != NULL );
+
+       switch(si->type)
+       {
+               case SITEM_TYPE_IMAGE:
+               {
+                       ivug_image_hold_set(si->photocam, hold);
+               }
+               break;
+
+               case SITEM_TYPE_VIDEO:
+               {
+
+               }
+               break;
+
+               case SITEM_TYPE_UNKNOWN:
+               default:
+                       MSG_SITEM_ERROR("Unknwon type: %d", si->type);
+               break;
+       }
+
+
+}
+
+
+void
+ivug_slider_item_zoom_reset(Slide_Item* si, Eina_Bool bAnim, int center_x, int center_y)
+{
+       IV_ASSERT(si != NULL );
+
+       switch(si->type)
+       {
+               case SITEM_TYPE_IMAGE:
+               {
+                       Evas_Point pt;
+
+                       pt.x = center_x;
+                       pt.y = center_y;
+
+                       ivug_image_zoom_reset(si->photocam, &pt);
+               }
+               break;
+
+               case SITEM_TYPE_VIDEO:
+               {
+
+               }
+               break;
+
+               case SITEM_TYPE_UNKNOWN:
+               break;
+
+               default:
+                       MSG_SITEM_ERROR("Unknwon type: %d", si->type);
+                       break;
+
+       }
+
+}
+
+
+void
+ivug_slider_item_zoom_set(Slide_Item* si, double zoom, int center_x, int center_y)
+{
+       IV_ASSERT(si != NULL );
+
+       switch(si->type)
+       {
+               case SITEM_TYPE_IMAGE:
+               {
+                       Evas_Point Center;
+
+                       Center.x = center_x;
+                       Center.y = center_y;
+                       ivug_image_zoom_set(si->photocam, zoom, &Center);
+
+               }
+               break;
+
+               case SITEM_TYPE_VIDEO:
+               break;
+
+               case SITEM_TYPE_UNKNOWN:
+               break;
+
+               default:
+                       MSG_SITEM_ERROR("Unknwon type: %d", si->type);
+                       break;
+
+       }
+
+}
+
+double
+ivug_slider_item_zoom_get(Slide_Item* si)
+{
+       IV_ASSERT(si != NULL );
+
+       double ret = 1.0;
+
+       switch(si->type)
+       {
+               case SITEM_TYPE_IMAGE:
+               {
+                       ret = ivug_image_zoom_get(si->photocam);
+               }
+               break;
+
+               case SITEM_TYPE_VIDEO:
+               break;
+
+               case SITEM_TYPE_UNKNOWN:
+               break;
+
+               default:
+                       MSG_SITEM_ERROR("Unknwon type: %d", si->type);
+                       break;
+
+       }
+
+
+       return ret;
+}
+
+bool
+ivug_slider_item_icon_click_check(Slide_Item *si, int x, int y)
+{
+       MSG_SITEM_HIGH("Check play icon clicked. SI=0x%08x, XY(%d,%d)", si, x, y);
+
+       IV_ASSERT(si != NULL );
+
+       Media_Data *mdata = ivug_medialist_get_data(si->mitem);
+
+       if ( mdata == NULL )
+       {
+               MSG_SITEM_ERROR("Debug Me! Data item is NULL.");
+               return false;
+       }
+
+       if ( mdata->slide_type == SLIDE_TYPE_VIDEO || mdata->slide_type == SLIDE_TYPE_STREAMING )
+       {
+               if (si->vIcon)
+               {
+                       Evas_Coord ix,iy,iw,ih;
+
+                       evas_object_geometry_get(si->vIcon, &ix, &iy, &iw, &ih);
+
+                       bool bInside =  !(  (x) > (ix + iw) || (x) < (ix)
+                                                               || (y) > (iy + iw) || (y) < (iy) );
+
+                       MSG_SITEM_HIGH("Item XYWH(%d,%d,%d,%d) XY(%d,%d) bInside=%d", ix,iy,iw,ih, x, y, bInside);
+
+                       return bInside;
+               }
+       }
+
+       MSG_SITEM_HIGH("Slide type = %d", mdata->slide_type);
+       return false;
+}
+
+drm_data_t * ivug_slider_item_check_drm_constraint(Slide_Item *si)
+{
+       IV_ASSERT(si != NULL);
+
+       Media_Data *mdata = ivug_medialist_get_data(si->mitem);
+       if(mdata == NULL)
+       {
+               MSG_SLIDER_ERROR("mdata is NULL");
+               return NULL;
+       }
+
+       if(mdata->bIsDRMContent == EINA_FALSE)
+       {
+               MSG_SLIDER_HIGH("It is not DRM file, path = %s", mdata->filepath);
+               return NULL;
+       }
+
+       MSG_SITEM_HIGH("before check valid");
+       if(ivug_drm_has_valid_ro(mdata->filepath) == 0)
+       {
+               MSG_SLIDER_HIGH("RO is invalid, path = %s", mdata->filepath);
+               si->state = SLIDE_STATE_ERROR;
+               _show_thumbnail(si, DRM_NO_RIGHT_IMAGE_PATH);
+               evas_object_smart_callback_call(si->photocam, "loaded", (void *)EVAS_LOAD_ERROR_PERMISSION_DENIED);
+               //for lauch WAP purchase page
+               drm_data_t *result = (drm_data_t *)calloc(1, sizeof(drm_data_t));
+               result->constraints = IVUG_DRM_RESULT_LIMITED;
+               result->data = -1;
+               return result;
+       }
+       MSG_SITEM_HIGH("RO is valid, path = %s", mdata->filepath);
+
+       return ivug_drm_check_constraint(mdata->filepath);
+}
+
+
+// Video specific APIs
+
+void ivug_slider_item_video_play(Slide_Item* si)
+{
+       IV_ASSERT(si != NULL );
+
+       MSG_SITEM_HIGH("Start Video play");
+
+       if (si->type == SITEM_TYPE_VIDEO)
+       {
+
+       }
+
+}
+
+
+void ivug_slider_item_video_pause(Slide_Item* si)
+{
+       IV_ASSERT(si != NULL );
+
+       MSG_SITEM_HIGH("Pause Video play");
+
+       if (si->type == SITEM_TYPE_VIDEO)
+       {
+       }
+}
+
+
+Eina_Bool ivug_slider_item_video_is_playing(Slide_Item* si)
+{
+       return false;
+
+       if (si->type == SITEM_TYPE_VIDEO )
+       {
+
+       }
+
+       return false;
+
+}
+
+void ivug_slider_item_hide_menu(Slide_Item* si)
+{
+       IV_ASSERT(si != NULL );
+
+       MSG_SITEM_HIGH("Hide menu");
+
+       si->bMenuVisible = false;
+
+       return ;
+}
+
+
+void ivug_slider_item_show_menu(Slide_Item* si)
+{
+       IV_ASSERT(si != NULL );
+
+       MSG_SITEM_HIGH("Show menu");
+
+       si->bMenuVisible = true;
+
+       return ;
+}
+
+Evas_Object *
+ivug_slider_item_image_get(Slide_Item* si)
+{
+       IV_ASSERT(si != NULL );
+
+       if ( (si->type == SITEM_TYPE_IMAGE) && (si->state == SLIDE_STATE_LOADED) )
+       {
+               return ivug_image_internal_image_get(si->photocam);
+       }
+
+       return NULL;
+
+}
+
+
+void ivug_slider_item_image_size_get(Slide_Item* si, int *w, int *h)
+{
+       IV_ASSERT(si != NULL );
+
+       if ( (si->type == SITEM_TYPE_IMAGE) && (si->state == SLIDE_STATE_LOADED) )
+       {
+               ivug_image_image_size_get(si->photocam, w, h);
+       }
+}
+
diff --git a/main/src/slider/ivug-slider-mouse.cpp b/main/src/slider/ivug-slider-mouse.cpp
new file mode 100755 (executable)
index 0000000..78f9f04
--- /dev/null
@@ -0,0 +1,819 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-common.h"
+#include "ivug-slider-item.h"
+#include "ivug-slider.h"
+
+#include "ivug-slider-priv.h"
+#include "ECoreAnimator.h"
+
+#define LOGNTAP_THRESHOLD      (100)           // allow moving distance(pixel)
+
+#define LOG_LVL DBG_MSG_LVL_HIGH
+#define LOG_CAT "IV-SMOUSE"
+
+
+void
+_ivug_slider_pass_event_to_item(struct Smart_Data *sd, Eina_Bool bPass)
+{
+       sd->bPassEvent = bPass;
+
+       if ( bPass == EINA_TRUE)
+       {
+               MSG_SLIDER_MED("Photocam can get Event");
+       }
+       else
+       {
+               MSG_SLIDER_MED("Photocam can not get Event");
+       }
+
+       for (int i = 0; i < MAX_SLIDE; i++)
+       {
+               ivug_slider_item_hold_set(sd->slide[i], !bPass);
+       }
+}
+
+#define _ivug_slider_edge_state_get(si) __ivug_slider_edge_state_get(si, __func__, __LINE__)
+
+slide_edge_t __ivug_slider_edge_state_get(Slide_Item *si, const char *func, int line)
+{
+       int nx, ny, nw, nh;
+
+       slide_edge_t result = EDGE::SLIDE_NO_EDGE;
+
+       if ( ivug_slider_item_region_size_get(si, &nx, &ny, &nw, &nh) == false)
+       {
+               // false means video file item. in this case, no photocam exists.
+               MSG_HIGH("[%s:%4d] Slide fit. Thumbnail only", func, line);
+               result = EDGE::SLIDE_FIT;
+
+               return result;
+       }
+       else
+       {
+               if ( nw <= (si->w + IMAGE_SCROLL_MARGIN) && (nh <= si->h + IMAGE_SCROLL_MARGIN))
+               {
+                       MSG_HIGH("[%20s:%4d] Slide fit", func, line);
+                       result = EDGE::SLIDE_FIT;
+               }
+               else
+               {
+                       if ( nx >= si->x - IMAGE_MOVE_MARGIN)
+                       {
+                               MSG_HIGH("[%20s:%4d] image edge left. N(%d,%d) Si(%d,%d)", func, line, nx, nw, si->x, si->w);
+
+                               result = (result | EDGE::SLIDE_LEFT_EDGE);
+                       }
+
+                       if ( nx + nw <= si->x + si->w + IMAGE_MOVE_MARGIN)
+                       {       //edge right
+                               MSG_HIGH("[%20s:%4d] image edge right. N(%d,%d) Si(%d,%d)", func, line, nx, nw, si->x, si->w);
+                               result = (result | EDGE::SLIDE_RIGHT_EDGE);
+                       }
+#if UNUSED
+                       if ( ny >= si->y )
+                       {
+                               MSG_HIGH("[%20s:%4d] image edge top", func, line);
+                               result = (result | EDGE::SLIDE_TOP_EDGE);
+                       }
+
+                       if ( ny + nh <= si->y + si->h)
+                       {       //edge right
+                               MSG_HIGH("[%20s:%4d] image edge bottom", func, line);
+                               result = (result | EDGE::SLIDE_BOTTOM_EDGE);
+                       }
+#endif
+
+               }
+       }
+
+       if ( result == EDGE::SLIDE_NO_EDGE )
+       {
+               MSG_HIGH("[%20s:%4d] image over screen. Edge=%d N(%d,%d,%d,%d) Si(%d,%d,%d,%d)", func, line, result, nx, ny, nw, nh, si->x, si->y, si->w, si->h);
+       }
+
+       return result;
+}
+
+static void _put_originate(struct Smart_Data *sd, shift_direction_t dir, int momentum)
+{
+       if ( dir == SLIDE_SHIFT_TO_LEFT )
+       {
+               if ( sd->slide[PREV_SLIDE]->state == SLIDE_STATE_NONE )
+               {
+                       dir = SLIDE_SHIFT_NONE;
+               }
+       }
+
+       if ( dir == SLIDE_SHIFT_TO_RIGHT )
+       {
+               if ( sd->slide[NEXT_SLIDE]->state == SLIDE_STATE_NONE )
+               {
+                       dir = SLIDE_SHIFT_NONE;
+               }
+       }
+
+       int src_x, dst_x;
+
+       switch(dir)
+       {
+       case SLIDE_SHIFT_TO_LEFT:
+               src_x = sd->slide[CENTER_SLIDE]->x;
+               dst_x = sd->x + sd->slide[CENTER_SLIDE]->w + IMAGE_BETWEEN_MARGIN;
+
+               MSG_HIGH("Scroll --->. Move from %d, %d", src_x, dst_x);
+
+               _ivug_slider_start_slide(sd, src_x, dst_x, momentum);
+               break;
+
+       case SLIDE_SHIFT_TO_RIGHT:
+               src_x = sd->slide[CENTER_SLIDE]->x;
+               dst_x = sd->x -sd->slide[CENTER_SLIDE]->w - IMAGE_BETWEEN_MARGIN;
+
+               MSG_HIGH("Scroll <---. Move from %d, %d", src_x, dst_x);
+
+               _ivug_slider_start_slide(sd, src_x, dst_x, momentum);
+               break;
+
+       case SLIDE_SHIFT_NONE:
+               src_x = sd->slide[CENTER_SLIDE]->x;
+               dst_x = sd->x;
+
+               MSG_HIGH("Scroll to center. Move from %d, %d", src_x , dst_x);
+
+               if (src_x == dst_x )
+               {
+                       MSG_SLIDER_WARN("No need to animation");
+                       return ;
+               }
+               // Defaut velocity
+               _ivug_slider_start_slide(sd, src_x, dst_x, ANIN_VELOCITY);
+
+               break;
+       }
+
+}
+
+shift_direction_t _get_shift_direction(struct Smart_Data *sd)
+{
+#define SHIFT_THRESHOLD        (0.0f)
+
+       Slide_Item* si = sd->slide[CENTER_SLIDE];
+
+       if ( abs( si->x - sd->x ) < 10 )
+       {
+               MSG_HIGH("Shift None. si->x=%d sd->x=%d", si->x, sd->x);
+               return SLIDE_SHIFT_NONE;
+       }
+
+       if ( (si->x - sd->x) > sd->w * SHIFT_THRESHOLD )
+       {
+               // Scroll to --->
+               MSG_HIGH("Shift ---->. si->x=%d sd->x=%d", si->x, sd->x);
+               return SLIDE_SHIFT_TO_LEFT;
+       }
+       else if ((si->x - sd->x) + si->w < sd->w * (1.0f - SHIFT_THRESHOLD) )
+       {
+               // Scroll to <---
+               MSG_HIGH("Shift <----. si->x=%d sd->x=%d", si->x, sd->x);
+               return SLIDE_SHIFT_TO_RIGHT;
+       }
+
+       return SLIDE_SHIFT_NONE;
+
+}
+
+
+Evas_Event_Flags _zoom_start(void *data, void *event_info)
+{
+       Elm_Gesture_Zoom_Info *p = (Elm_Gesture_Zoom_Info *) event_info;
+       MSG_LOW("zoom start <%d,%d> <%f>", p->x, p->y, p->zoom);
+
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get((Evas_Object *)data);
+       Slide_Item* si = sd->slide[CENTER_SLIDE];
+
+       MSG_HIGH("%s MoveX=%d", __func__, si->x);
+
+       sd->bZooming = false;
+
+       if ( abs(si->x - sd->x) < IMAGE_MOVE_MARGIN)
+       {
+               _ivug_slider_slide_move(sd, 0, si->y);  // Move to Center
+               _ivug_slider_pass_event_to_item(sd, EINA_TRUE);
+               sd->bZooming = true;
+       }
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags _zoom_move(void *data, void *event_info)
+{
+       Elm_Gesture_Zoom_Info *p = (Elm_Gesture_Zoom_Info *) event_info;
+       MSG_LOW("zoom move <%d,%d> <%f>", p->x, p->y, p->zoom);
+
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get((Evas_Object *)data);
+       Slide_Item* si = sd->slide[CENTER_SLIDE];
+
+       if ( sd->bZooming == false ) return EVAS_EVENT_FLAG_NONE;
+
+       MSG_MED("%s MoveX=%d", __func__, si->x);
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags _zoom_end(void *data, void *event_info)
+{
+       Elm_Gesture_Zoom_Info *p = (Elm_Gesture_Zoom_Info *) event_info;
+       MSG_LOW("zoom end <%d,%d> <%f>", p->x, p->y, p->zoom);
+
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get((Evas_Object *)data);
+       Slide_Item* si = sd->slide[CENTER_SLIDE];
+
+       if ( sd->bZooming == false )
+       {
+// Flick image
+               shift_direction_t dir = _get_shift_direction(sd);
+               _put_originate(sd, dir, ANIN_VELOCITY);
+
+               return EVAS_EVENT_FLAG_NONE;
+       }
+
+       MSG_HIGH("%s. CenteSize WH(%d,%d)", __func__, si->w, si->h);    // Si->w,h didnot change. after zoom
+
+       sd->edge = _ivug_slider_edge_state_get(si);     // Update Edge
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags _zoom_abort(void *data, void *event_info)
+{
+       Elm_Gesture_Zoom_Info *p = (Elm_Gesture_Zoom_Info *) event_info;
+       MSG_LOW("zoom abort <%d,%d> <%f>", p->x, p->y, p->zoom);
+
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get((Evas_Object *)data);
+       Slide_Item* si = sd->slide[CENTER_SLIDE];
+
+       if ( sd->bZooming == false )
+       {
+// Flick image
+               shift_direction_t dir = _get_shift_direction(sd);
+               _put_originate(sd, dir, ANIN_VELOCITY);
+
+               return EVAS_EVENT_FLAG_NONE;
+       }
+
+       MSG_HIGH("%s. CenteSize WH(%d,%d)", __func__, si->w, si->h);    // Si->w,h didnot change. after zoom
+
+       sd->edge = _ivug_slider_edge_state_get(si);     // Update Edge
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags _momentum_start(void *data, void *event_info)
+{
+       Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) event_info;
+       MSG_HIGH("momentum_start <%d,%d>", p->x2, p->y2);
+
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get((Evas_Object *)data);
+       Slide_Item* si = sd->slide[CENTER_SLIDE];
+
+//save down position.
+       sd->prev_x = p->x2;
+       sd->prev_y = p->y2;
+
+// End animation
+       sd->anim->Stop();
+
+// Update Center!.
+
+       sd->edge = _ivug_slider_edge_state_get(si);
+
+       sd->bMomentumStarted = true;
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags _momentum_move(void *data, void *event_info)
+{
+       Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) event_info;
+       // _momentum_move is comming when pinch zoom
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       MSG_LOW("momentum move <%d,%d>, <%d,%d>, p->n=%d", p->x1, p->y1, p->x2, p->y2, p->n);
+
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get((Evas_Object *)data);
+       Slide_Item* si = sd->slide[CENTER_SLIDE];
+
+       int dist_down_x = p->x2 - p->x1;
+       int dist_down_y = p->y2 - p->y1;
+
+       if(sqrt(dist_down_x*dist_down_x + dist_down_y*dist_down_y) > LOGNTAP_THRESHOLD)
+       {
+               MSG_LOW("Long press cancel");
+               sd->bLongtapEnable = false;
+       }
+
+       if(sd->bLongtapEnable == true)
+       {
+               int longtap_dx = p->x2 - sd->longtap_prev_x;
+               int longtap_dy = p->y2 - sd->longtap_prev_y;
+
+               if(sqrt(longtap_dx*longtap_dx + longtap_dy*longtap_dy) > LOGNTAP_THRESHOLD)
+               {
+                       MSG_LOW("Long press cancel");
+                       evas_object_smart_callback_call(sd->obj, "slider,longpress,end", (void*)LONGTAP_ENDED);
+               }
+       }
+
+//     MSG_HIGH("%s. XY(%d,%d)", __func__, cur->x, cur->y);
+       if ( sd->edge == EDGE::SLIDE_NO_EDGE )
+       {
+               MSG_HIGH("Photocam handle this event");
+               return EVAS_EVENT_FLAG_NONE;
+       }
+
+       int dx, dy;
+
+       dx = p->x2 - sd->prev_x;
+       dy = p->y2 - sd->prev_y;
+
+       if ( dx == 0 ) return EVAS_EVENT_FLAG_NONE;
+
+       sd->prev_x = p->x2;
+       sd->prev_y = p->y2;
+
+       int dst_x, dst_y;
+
+       dst_x = si->x + (dx);
+       dst_y = si->y + (dy);
+
+       if ( sd->edge == EDGE::SLIDE_FIT)
+       {
+               MSG_HIGH("Case 1. edge=%d, X=%d dx=%d si->x=%d", sd->edge, dst_x, dx, si->x);
+               _ivug_slider_pass_event_to_item(sd, EINA_FALSE);
+
+               if ( dst_x >= 0 && sd->slide[PREV_SLIDE]->state == SLIDE_STATE_NONE)
+               {
+                       MSG_HIGH("first file");
+                       dst_x = 0;
+               }
+
+               if ( dst_x < 0 && sd->slide[NEXT_SLIDE]->state == SLIDE_STATE_NONE)
+               {
+                       MSG_HIGH("last file");
+                       dst_x = 0;
+               }
+
+               _ivug_slider_slide_move(sd, dst_x , si->y);
+
+               return EVAS_EVENT_FLAG_NONE;
+       }
+
+       if ( (si->x - sd->x) * (dst_x - sd->x) < 0 )
+       {
+               MSG_HIGH("Case a. edge=%d, X=%d dx=%d si->x=%d", sd->edge, dst_x, dx, si->x);
+
+               dst_x = 0;
+               _ivug_slider_pass_event_to_item(sd, EINA_TRUE);
+               _ivug_slider_slide_move(sd, dst_x , si->y);
+
+               return EVAS_EVENT_FLAG_NONE;
+       }
+
+       if ( si->x != sd->x )
+       {
+               MSG_HIGH("Case 2. edge=%d, X=%d dx=%d si->x=%d", sd->edge, dst_x, dx, si->x);
+
+               _ivug_slider_pass_event_to_item(sd, EINA_FALSE);
+
+               if ( dst_x >= 0 && sd->slide[PREV_SLIDE]->state == SLIDE_STATE_NONE)
+               {
+                       MSG_HIGH("first file");
+                       dst_x = 0;
+               }
+
+               if ( dst_x < 0 && sd->slide[NEXT_SLIDE]->state == SLIDE_STATE_NONE)
+               {
+                       MSG_HIGH("last file");
+                       dst_x = 0;
+               }
+
+               _ivug_slider_slide_move(sd, dst_x , si->y);
+
+               return EVAS_EVENT_FLAG_NONE;
+       }
+
+       if ( sd->edge & EDGE::SLIDE_LEFT_EDGE)
+       {
+               if ( dx > 0 ) // Mouse -->
+               {
+                       MSG_HIGH("Case 3. edge=%d, X=%d dx=%d si->x=%d", sd->edge, dst_x, dx, si->x);
+
+                       _ivug_slider_pass_event_to_item(sd, EINA_FALSE);
+
+                       if ( dst_x >= 0 && sd->slide[PREV_SLIDE]->state == SLIDE_STATE_NONE)
+                       {
+                               MSG_HIGH("first file");
+                               dst_x = 0;
+                       }
+
+                       _ivug_slider_slide_move(sd, dst_x , si->y);
+
+                       return EVAS_EVENT_FLAG_NONE;
+               }
+               else
+               {
+                       MSG_HIGH("Case 4. edge=%d, X=%d dx=%d si->x=%d", sd->edge, dst_x, dx, si->x);
+
+                       _ivug_slider_pass_event_to_item(sd, EINA_TRUE);
+               }
+       }
+
+       if ( sd->edge & EDGE::SLIDE_RIGHT_EDGE)
+       {
+               if ( dx < 0 ) // Mouse <--
+               {
+                       MSG_HIGH("Case 5. edge=%d, X=%d dx=%d si->x=%d", sd->edge, dst_x, dx, si->x);
+
+                       _ivug_slider_pass_event_to_item(sd, EINA_FALSE);
+
+                       if ( dst_x < 0 && sd->slide[NEXT_SLIDE]->state == SLIDE_STATE_NONE)
+                       {
+                               MSG_HIGH("last file");
+                               dst_x = 0;
+                       }
+
+                       _ivug_slider_slide_move(sd, dst_x , si->y);
+
+                       return EVAS_EVENT_FLAG_NONE;
+               }
+               else
+               {
+
+                       MSG_HIGH("Case 6. edge=%d, X=%d dx=%d si->x=%d", sd->edge, dst_x, dx, si->x);
+
+                       _ivug_slider_pass_event_to_item(sd, EINA_TRUE);
+
+               }
+       }
+
+       sd->edge = _ivug_slider_edge_state_get(si);
+       return EVAS_EVENT_FLAG_NONE;
+
+}
+
+Evas_Event_Flags _momentum_end(void *data, void *event_info)
+{
+       Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) event_info;
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       MSG_HIGH("momentum end Cur=<%d,%d> M=<%d,%d>", p->x2, p->y2, p->mx, p->my);
+
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get((Evas_Object *)data);
+
+       Slide_Item *si = sd->slide[CENTER_SLIDE];
+
+       MSG_HIGH("Mouse Up : si->XYWH(%d,%d,%d,%d)", si->x, si->y, si->w, si->h);
+
+// Find Scroll Direction
+       sd->edge = _ivug_slider_edge_state_get(si);
+
+       shift_direction_t dir = SLIDE_SHIFT_NONE;
+
+       bool isFlick = abs(p->mx) < 1500 ? false : true;
+
+       if ( isFlick == true )
+       {
+// momentumÀÌ 0ÀÌ ¾Æ´Ñ °æ¿ì(flick animation Áß°£¿¡ ´Ù½Ã click½Ã) center¸¦ ¾÷µ¥ÀÌÆ® Çؾߵdzª? ±×·¸°Ô Çϸ頺ε巯¿ö Áúµí.. Çѵ¥.. ÀÏ´Ü pass
+               MSG_UTIL_HIGH("Velocity = %d Momentum=%d", sd->momentum, p->mx);
+
+               sd->momentum += p->mx;
+
+               if ( (sd->edge & EDGE::SLIDE_LEFT_EDGE) && p->mx > 0)
+               {
+                       // Flick
+                       if (  p->mx + (si->x - sd->x) > sd->w )
+                       {
+                               // Flick right
+                               MSG_HIGH("Flick Right ----------->");
+                               dir = SLIDE_SHIFT_TO_LEFT;
+                       }
+               }
+
+               if ( (sd->edge & EDGE::SLIDE_RIGHT_EDGE) && p->mx < 0)
+               {
+                       // Flick
+                       if (  p->mx + ((si->x - sd->x) + si->w ) < 0 )
+                       {
+                               // Flick left
+                               MSG_HIGH("Flick Left <-----------");
+                               dir = SLIDE_SHIFT_TO_RIGHT;
+                       }
+               }
+
+               MSG_UTIL_HIGH("Velocity2 = %d", sd->momentum);
+               _put_originate(sd, dir, sd->momentum);
+
+       }
+       else
+       {
+               MSG_HIGH("Si->x=%d", si->x);
+
+               dir = _get_shift_direction(sd);
+               _put_originate(sd, dir, ANIN_VELOCITY);
+
+       }
+
+       sd->bLongtapEnable = true;
+
+       sd->bMomentumStarted = false;
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags _momentum_abort(void *data, void *event_info)
+{
+       Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) event_info;
+
+       MSG_HIGH("momentum abort Cur=<%d,%d> M=<%d,%d> N=%d", p->x2, p->y2, p->mx, p->my, p->n);
+
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get((Evas_Object *)data);
+
+       Slide_Item *si = sd->slide[CENTER_SLIDE];
+
+       MSG_HIGH("Mouse Up : si->XYWH(%d,%d,%d,%d)", si->x, si->y, si->w, si->h);
+
+// Find Scroll Direction
+       sd->edge = _ivug_slider_edge_state_get(si);
+
+       shift_direction_t dir = SLIDE_SHIFT_NONE;
+
+       bool isFlick = abs(p->mx) < 1500 ? false : true;
+
+       if ( isFlick == true )
+       {
+               if ( (sd->edge & EDGE::SLIDE_LEFT_EDGE) && p->mx > 0)
+               {
+                       // Flick
+                       if (  p->mx + ((si->x - sd->x) ) > sd->w )
+                       {
+                               // Flick right
+                               MSG_HIGH("Flick Right");
+                               dir = SLIDE_SHIFT_TO_LEFT;
+                       }
+               }
+
+               if ( (sd->edge & EDGE::SLIDE_RIGHT_EDGE) && p->mx < 0)
+               {
+                       // Flick
+                       if (  p->mx + ((si->x - sd->x) + si->w ) < 0 )
+                       {
+                               // Flick left
+                               MSG_HIGH("Flick Left");
+                               dir = SLIDE_SHIFT_TO_RIGHT;
+                       }
+               }
+       }
+       else
+       {
+               MSG_HIGH("Si->x=%d", si->x);
+               dir = _get_shift_direction(sd);
+       }
+
+       _put_originate(sd, dir, ANIN_VELOCITY);
+
+       sd->bLongtapEnable = true;
+
+       sd->bMomentumStarted = false;
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+
+
+Evas_Event_Flags _flick_start(void *data, void *event_info)
+{
+       Elm_Gesture_Line_Info *p = (Elm_Gesture_Line_Info *) event_info;
+
+       MSG_LOW("flick started x1,x2=(%d,%d) tx=%u mx=%d n=%u",
+                 p->momentum.x1, p->momentum.x2, p->momentum.tx,
+                 p->momentum.mx, p->momentum.n);
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+
+Evas_Event_Flags _flick_move(void *data, void *event_info)
+{
+       Elm_Gesture_Line_Info *p = (Elm_Gesture_Line_Info *) event_info;
+
+       MSG_LOW("flick moving x1,x2=(%d,%d) tx=%u mx=%d n=%u",
+                 p->momentum.x1, p->momentum.x2, p->momentum.tx,
+                 p->momentum.mx, p->momentum.n);
+
+       return EVAS_EVENT_FLAG_NONE;
+
+}
+
+
+Evas_Event_Flags _flick_end(void *data, void *event_info)
+{
+       Elm_Gesture_Line_Info *p = (Elm_Gesture_Line_Info *) event_info;
+
+       MSG_LOW("flick ended x1,x2=(%d,%d) tx=%u mx=%d n=%u",
+                 p->momentum.x1, p->momentum.x2, p->momentum.tx,
+                 p->momentum.mx, p->momentum.n);
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+
+Evas_Event_Flags _flick_abort(void *data, void *event_info)
+{
+       Elm_Gesture_Line_Info *p = (Elm_Gesture_Line_Info *) event_info;
+
+       MSG_LOW("flick aborted x1,x2=(%d,%d) tx=%u mx=%d n=%u",
+                 p->momentum.x1, p->momentum.x2, p->momentum.tx,
+                 p->momentum.mx, p->momentum.n);
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+
+
+Evas_Event_Flags _dbl_click_start(void *data , void *event_info)
+{
+       Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
+
+       MSG_HIGH("Double click start");
+
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags _dbl_click_end(void *data , void *event_info)
+{
+   Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
+
+   MSG_HIGH("Double click end");
+
+   if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+   return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags _dbl_click_abort(void *data , void *event_info)
+{
+   Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
+
+   MSG_HIGH("Double click abort");
+
+   if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+   return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags n_finger_tap_start(void *data , void *event_info)
+{
+       Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
+
+       MSG_HIGH("Finger tab start. Time=%d", p->timestamp);
+
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+
+Evas_Event_Flags n_finger_tap_end(void *data , void *event_info)
+{
+       Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
+
+       MSG_HIGH("Finger tab end. Time=%d", p->timestamp);
+
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get((Evas_Object *)data);
+
+       Slide_Item *si = sd->slide[CENTER_SLIDE];
+
+       if ( ivug_slider_item_icon_click_check(si, p->x, p->y ) == true )
+       {
+               evas_object_smart_callback_call(sd->obj, "slider,clicked,icon", si);    // Clicked video icon
+       }
+       else
+       {
+               evas_object_smart_callback_call(sd->obj, "slider,clicked", si);
+       }
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags n_finger_tap_abort(void *data , void *event_info)
+{
+       Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
+
+       MSG_HIGH("Finger tab aborted. Time=%d", p->timestamp);
+
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+
+Evas_Event_Flags n_long_tap_start(void *data , void *event_info)
+{
+       Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
+
+       MSG_HIGH("Long tab start, x=%d, y=%d", p->x, p->y);
+
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get((Evas_Object *)data);
+
+       if(sd->bLongtapEnable == false)
+       {
+               MSG_HIGH("It is not long tap case");
+               return EVAS_EVENT_FLAG_NONE;
+       }
+
+       if(sd->bMomentumStarted == true) // compare down and longpressed position
+       {
+       sd->longtap_prev_x = p->x;
+       sd->longtap_prev_y = p->y;
+
+       int longtap_dx = sd->prev_x - sd->longtap_prev_x;
+       int longtap_dy = sd->prev_y - sd->longtap_prev_y;
+
+       if(sqrt(longtap_dx*longtap_dx + longtap_dy*longtap_dy) > LOGNTAP_THRESHOLD)
+       {
+               MSG_HIGH("It is not long tap");
+               return EVAS_EVENT_FLAG_NONE;
+       }
+       }
+
+       evas_object_smart_callback_call(sd->obj, "slider,longpressed", p);
+
+       return EVAS_EVENT_FLAG_NONE;
+
+}
+
+Evas_Event_Flags n_long_tap_move(void *data , void *event_info)
+{
+       Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
+
+       MSG_HIGH("Long tab move");
+
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags n_long_tap_end(void *data , void *event_info)
+{
+       Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
+
+       MSG_HIGH("Long tab end");
+
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       MSG_HIGH("Long press end");
+
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get((Evas_Object *)data);
+
+       evas_object_smart_callback_call(sd->obj, "slider,longpress,end", (void*)LONGTAP_ENDED);
+
+       return EVAS_EVENT_FLAG_NONE;
+
+}
+
+Evas_Event_Flags n_long_tap_abort(void *data , void *event_info)
+{
+       Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
+
+       MSG_HIGH("Long tab abort");
+
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       return EVAS_EVENT_FLAG_NONE;
+
+}
+
+
diff --git a/main/src/slider/ivug-slider-priv.h b/main/src/slider/ivug-slider-priv.h
new file mode 100755 (executable)
index 0000000..6c81284
--- /dev/null
@@ -0,0 +1,188 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_SLIDER_PRIV_H__
+#define __IVUG_SLIDER_PRIV_H__
+
+#include "ivug-define.h"
+#include "ivug-medialist.h"
+
+/*********************************************************************/
+/* Configuration                                                                                                 */
+/*********************************************************************/
+
+/* elm_config_finger_size_get = 40 */
+#define IMAGE_BETWEEN_MARGIN           (30)                                    // The value is width between photocam(unit is pixel).
+#define IMAGE_MOVE_MARGIN                      ((int)IMAGE_BETWEEN_MARGIN*0.8)
+/* If moved width is larger than IMAGE_SCROLL_MARGIN, image is scrolled */
+#define IMAGE_SCROLL_MARGIN            (5) /* vertical move doen't over 5 pixel width */
+#define LONG_PRESS_MARGIN                      ((int)(elm_config_finger_size_get() / 3))
+
+
+#define ANIN_VELOCITY (5000)
+
+
+typedef int slide_edge_t;
+
+namespace EDGE {
+       const int SLIDE_NO_EDGE = (1<<0);               // 1
+
+       const int SLIDE_LEFT_EDGE = (1<<1);             // 2
+       const int SLIDE_RIGHT_EDGE = (1<<2);    // 4
+
+       const int SLIDE_FIT = SLIDE_LEFT_EDGE | SLIDE_RIGHT_EDGE;
+};
+
+typedef enum {
+       SLIDE_SHIFT_NONE = 0x00,
+       SLIDE_SHIFT_TO_RIGHT,           // <---------------------Mouse
+       SLIDE_SHIFT_TO_LEFT,            // Mouse--------------------->
+} shift_direction_t;
+
+
+//ENUM
+typedef enum {
+       CENTER_SLIDE,
+       NEXT_SLIDE,
+       PREV_SLIDE,
+       MAX_SLIDE,
+} slide_index_t;
+
+class ECoreAnimator;
+class CAnimator;
+
+#define USE_CALC_JOB
+
+// slider
+typedef struct Smart_Data
+{
+       Evas_Object *obj;                               // smart object itself.
+       Evas_Coord x, y, w, h;                  // Geometry of slider
+
+       Evas_Object *clipper;
+
+//silde
+       Slide_Item* slide[MAX_SLIDE];
+
+//data list
+       Eina_Bool bShow;
+
+       Media_List*     media_list;             // Storing entire media list.
+
+// for flick anim
+       CAnimator *tween;
+       ECoreAnimator *anim;
+
+       shift_direction_t last_dir;
+       int momentum;
+
+//Mouse event handler
+       Evas_Object *event_obj; // Mouse event receiver.
+       Evas_Object *gesture;
+
+       bool bPassEvent;
+       bool bZooming;
+
+       int prev_x;
+       int prev_y;
+
+       bool bLongtapEnable;
+       bool bMomentumStarted;
+       int longtap_prev_x;
+       int longtap_prev_y;
+
+       slide_edge_t edge;
+
+       Ecore_Idler *load_idler;
+       Ecore_Idler *item_load_idler;
+
+       unsigned int zoom_level;
+
+#ifdef USE_CALC_JOB
+       Ecore_Job *calc_job;
+#endif
+
+} _Smart_Data;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+// Common function between slide show and slider.
+
+void _ivug_slider_slide_move(struct Smart_Data *sd, Evas_Coord x, Evas_Coord y);
+
+// Common function between slide and slide mouse.
+
+void _ivug_slider_start_slide(struct Smart_Data *sd, int src_x, int dst_x, int momentum);
+
+void _ivug_slider_slide_shift(struct Smart_Data *sd, shift_direction_t direction);
+
+Evas_Event_Flags _zoom_start(void *data, void *event_info);
+
+Evas_Event_Flags _zoom_move(void *data, void *event_info);
+
+Evas_Event_Flags _zoom_end(void *data, void *event_info);
+
+Evas_Event_Flags _zoom_abort(void *data, void *event_info);
+
+Evas_Event_Flags _momentum_start(void *data, void *event_info);
+
+Evas_Event_Flags _momentum_move(void *data, void *event_info);
+
+Evas_Event_Flags _momentum_end(void *data, void *event_info);
+
+Evas_Event_Flags _momentum_abort(void *data, void *event_info);
+
+Evas_Event_Flags _dbl_click_start(void *data , void *event_info);
+
+Evas_Event_Flags _dbl_click_end(void *data , void *event_info);
+
+Evas_Event_Flags _dbl_click_abort(void *data , void *event_info);
+
+Evas_Event_Flags _flick_start(void *data, void *event_info);
+
+Evas_Event_Flags _flick_move(void *data, void *event_info);
+
+Evas_Event_Flags _flick_end(void *data, void *event_info);
+
+Evas_Event_Flags _flick_abort(void *data, void *event_info);
+
+Evas_Event_Flags n_finger_tap_start(void *data , void *event_info);
+
+Evas_Event_Flags n_finger_tap_end(void *data , void *event_info);
+
+Evas_Event_Flags n_finger_tap_abort(void *data , void *event_info);
+
+Evas_Event_Flags n_long_tap_start(void *data , void *event_info);
+
+Evas_Event_Flags n_long_tap_move(void *data , void *event_info);
+
+Evas_Event_Flags n_long_tap_end(void *data , void *event_info);
+
+Evas_Event_Flags n_long_tap_abort(void *data , void *event_info);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
+#endif // __IVUG_SLIDER_PRIV_H__
+
diff --git a/main/src/slider/ivug-slider.cpp b/main/src/slider/ivug-slider.cpp
new file mode 100755 (executable)
index 0000000..1504e2a
--- /dev/null
@@ -0,0 +1,1201 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include <ui-gadget-module.h>          // ug_destroy_me, ug_send_result
+
+#include "ivug-slider.h"
+#include "ivug-common.h"
+
+#include "ivug-parameter.h"
+#include "ivug-define.h"
+#include "ivug-config.h"
+
+#include "ivug-util.h"
+#include "ivug-medialist.h"
+#include "ivug-media.h"
+
+#include "ivug-drm.h"
+#include "ivug-mouse-event.h"
+#include "ivug-slider-item.h"
+
+#include "ivug-slider-priv.h"
+
+#include "ivug-image.h"
+
+#include "Animation.h"
+#include "ECoreAnimator.h"
+#include "ivug-slideshow.h"
+#include "EFLUtil.h"
+
+#define LOG_CAT "IV-SLIDER"
+
+/* local subsystem globals */
+static Evas_Smart *_smart_ = NULL;
+
+#define USE_CLIPPER
+
+// Forward declaration
+void _ivug_slider_slide_resize(struct Smart_Data *sd, Evas_Coord w, Evas_Coord h);
+void _ivug_slider_slide_move(struct Smart_Data *sd, Evas_Coord x, Evas_Coord y);
+
+const char *_GetStateString(slide_state_t state)
+{
+       static const char *szState[] =
+       {
+               "None",
+               "Set",
+               "Downloading",
+               "DRM Checking",
+               "Ready",
+               "Loading",
+               "Loaded",
+               "Download Failed",
+               "No Right",
+               "Error",
+       };
+
+       return szState[state];
+}
+
+static Eina_Bool _idler_loading_func(void* data)
+{
+       struct Smart_Data *sd = static_cast<struct Smart_Data *>(data);
+
+       sd->load_idler = NULL;
+       MSG_SLIDER_HIGH("Do idle loading");
+
+       int i;
+       if ( sd->slide[CENTER_SLIDE]->state == SLIDE_STATE_READY )      // Center image must be loaded even while other image is loading.
+       {
+               ivug_slider_item_load(sd->slide[CENTER_SLIDE]);
+               goto end;
+       }
+
+       for ( i = 0; i < MAX_SLIDE ; i++)
+       {
+               if ( sd->slide[i]->state == SLIDE_STATE_LOADING )
+               {
+                       goto end;
+               }
+       }
+
+       if ( sd->slide[NEXT_SLIDE]->state == SLIDE_STATE_READY )
+       {
+               ivug_slider_item_load(sd->slide[NEXT_SLIDE]);
+               goto end;
+       }
+
+       if ( sd->slide[PREV_SLIDE]->state == SLIDE_STATE_READY )
+       {
+               ivug_slider_item_load(sd->slide[PREV_SLIDE]);
+               goto end;
+       }
+
+       MSG_SLIDER_WARN("Set Data loading State=%s,%s,%s",
+               _GetStateString(sd->slide[PREV_SLIDE]->state),
+               _GetStateString(sd->slide[CENTER_SLIDE]->state),
+               _GetStateString(sd->slide[NEXT_SLIDE]->state)
+       );
+
+end:
+       return ECORE_CALLBACK_CANCEL;
+
+}
+
+static void _do_load(struct Smart_Data *sd)
+{
+       if ( sd->load_idler )
+       {
+               ecore_idler_del(sd->load_idler);
+               sd->load_idler = NULL;
+       }
+
+       MSG_SLIDER_HIGH("Add idler for loading.");\r
+       sd->load_idler = ecore_idler_add(_idler_loading_func, sd);\r
+}
+
+static void _ivug_slider_on_center_changed(Evas_Object *obj, Slide_Item *old, Slide_Item *cur)
+{
+       IV_ASSERT(old != cur );
+
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+
+       if ( old != NULL )
+       {
+               ivug_slider_item_zoom_reset(old, EINA_TRUE, 0, 0);
+
+               ivug_slider_item_pause(old);            // Pause DRM consume/Animation
+       }
+
+       if(cur->state == SLIDE_STATE_LOADED)
+       {
+               ivug_slider_item_play(cur);
+       }
+       else
+       {
+               MSG_SLIDER_ERROR("Invalid state : %s", _GetStateString(cur->state));
+       }
+
+       MSG_SLIDER_HIGH("Center item changed. State=%s", _GetStateString(cur->state));
+
+       evas_object_smart_callback_call(sd->obj, "slider,item,changed", cur);
+}
+
+void _ivug_slider_item_state_changed(slide_state_t state, Slide_Item *si, void *client_data)
+{
+       struct Smart_Data *sd = static_cast<struct Smart_Data *>(client_data);
+       IV_ASSERT(sd != NULL);
+
+       if ( sd->slide[CENTER_SLIDE] == si )
+       {
+               MSG_SLIDER_HIGH("Center Item state changed. Old=%s New=%s", _GetStateString(state), _GetStateString(si->state));
+
+               if ( state == SLIDE_STATE_LOADED )
+               {
+                       ivug_slider_item_play(si);
+                       evas_object_smart_callback_call(sd->obj, "slider,item,state,changed", si);
+               }
+               else
+               {
+                       evas_object_smart_callback_call(sd->obj, "slider,item,state,changed", si);
+               }
+       }
+
+       _do_load(sd);
+
+}
+
+static void _on_event_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+       MSG_SLIDER_HIGH("Event layer clicked : %s Layer=%d", evas_object_name_get(obj), evas_object_layer_get(obj));
+}
+
+static Eina_Bool _item_loader(void* data)
+{
+       IV_ASSERT(data != NULL);
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get((Evas_Object *)data);
+
+       sd->item_load_idler = NULL;
+
+       Slide_Item *si = sd->slide[CENTER_SLIDE];
+
+       si->state = SLIDE_STATE_READY;
+
+       ivug_slider_item_load(si);
+
+       return ECORE_CALLBACK_CANCEL;
+}
+
+static void _sizing_eval(void *data)
+{
+       struct Smart_Data *sd = (struct Smart_Data *)data;
+
+       sd->calc_job = NULL;
+
+       MSG_SLIDER_HIGH("Object geometry resized. (%d,%d,%d,%d)", sd->x, sd->y , sd->w , sd->h);
+
+#ifdef USE_CLIPPER
+       evas_object_move(sd->clipper, sd->x, sd->y);
+       evas_object_resize(sd->clipper, sd->w, sd->h);
+#endif
+
+       evas_object_move(sd->event_obj, sd->x, sd->y);
+       evas_object_resize(sd->event_obj, sd->w, sd->h);
+
+       evas_object_smart_changed(sd->obj);
+}
+
+static void
+_ivug_slider_smart_add(Evas_Object *obj)
+{
+       MSG_SLIDER_HIGH("Slider Add : 0x%08x", obj);
+
+       PERF_CHECK_BEGIN(LVL4, "slider smart add");
+
+       struct Smart_Data *sd = (struct Smart_Data *)calloc(1, sizeof(struct Smart_Data));
+       ivug_ret_if(!sd);
+       evas_object_smart_data_set(obj, sd);
+
+       sd->obj = obj;
+       sd->momentum = 0;
+
+       sd->anim = new ECoreAnimator();
+
+       sd->edge = EDGE::SLIDE_FIT;
+       sd->last_dir = SLIDE_SHIFT_TO_RIGHT;    /* default for first loading*/
+       sd->bPassEvent = false;
+
+       //create slider item.
+       for (int idx = 0; idx < MAX_SLIDE; idx++)
+       {
+               PERF_CHECK_BEGIN(LVL5, "add slider item");
+               sd->slide[idx] = ivug_slider_item_add(obj);
+               PERF_CHECK_END(LVL5, "add slider item");
+
+               ivug_slider_item_set_callback(sd->slide[idx], _ivug_slider_item_state_changed, sd);
+       }
+
+       sd->event_obj = evas_object_rectangle_add(evas_object_evas_get(obj));
+       evas_object_name_set(sd->event_obj, "slider-event");
+       evas_object_color_set(sd->event_obj , 0, 0, 0, 0);              // Fully Transparent object.
+       evas_object_size_hint_align_set(sd->event_obj, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_size_hint_weight_set(sd->event_obj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_repeat_events_set(sd->event_obj, EINA_TRUE);
+       evas_object_show(sd->event_obj);
+
+       evas_object_smart_member_add(sd->event_obj, obj);
+
+       sd->gesture = elm_gesture_layer_add(sd->event_obj);
+       elm_gesture_layer_hold_events_set(sd->gesture, EINA_FALSE);
+
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_START, _zoom_start, obj);
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_MOVE, _zoom_move, obj);
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_END, _zoom_end, obj);
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_ABORT, _zoom_abort, obj);
+
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_START, _momentum_start, obj);
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_MOVE, _momentum_move, obj);
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_END, _momentum_end, obj);
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_ABORT, _momentum_abort, obj);
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_FLICKS, ELM_GESTURE_STATE_START, _flick_start, obj);
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_FLICKS, ELM_GESTURE_STATE_END, _flick_move, obj);
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_FLICKS, ELM_GESTURE_STATE_END, _flick_end, obj);
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_FLICKS, ELM_GESTURE_STATE_ABORT, _flick_abort, obj);
+
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_STATE_START, _dbl_click_start, obj);
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_STATE_END, _dbl_click_end, obj);
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_STATE_ABORT, _dbl_click_abort, obj);
+
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_TAPS, ELM_GESTURE_STATE_START, n_finger_tap_start, obj);
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_TAPS, ELM_GESTURE_STATE_END, n_finger_tap_end, obj);
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_TAPS, ELM_GESTURE_STATE_ABORT, n_finger_tap_abort, obj);
+
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_LONG_TAPS, ELM_GESTURE_STATE_START, n_long_tap_start, obj);
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_LONG_TAPS, ELM_GESTURE_STATE_MOVE, n_long_tap_move, obj);
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_LONG_TAPS, ELM_GESTURE_STATE_END, n_long_tap_end, obj);
+       elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_LONG_TAPS, ELM_GESTURE_STATE_ABORT, n_long_tap_abort, obj);
+
+       if ( elm_gesture_layer_attach(sd->gesture, sd->event_obj) == EINA_FALSE)
+       {
+               MSG_SLIDER_ERROR("Cannot attach event rect");
+       }
+       evas_object_name_set(sd->gesture, "Slider:Getsture");
+
+       evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_DOWN, _on_event_mouse_down, NULL);
+       evas_object_event_callback_add(sd->event_obj, EVAS_CALLBACK_MOUSE_DOWN, _on_event_mouse_down, NULL);
+
+       sd->bLongtapEnable = true;
+
+#if 0
+       for (int idx = 0; idx < MAX_SLIDE; idx++)
+       {
+               // Video iconÀÌ event¸¦ ¸ÕÀú ¹Þ°Ô Çϱâ À§ÇØ z orderÀ» º¯°æ ÇÑ´Ù.
+               evas_object_stack_above(sd->slide[idx]->vIcon, sd->event_obj);
+       }
+#endif
+
+
+#ifdef USE_CLIPPER
+       sd->clipper = evas_object_rectangle_add(evas_object_evas_get(obj));
+       evas_object_color_set(sd->clipper, 255,255,255,255);
+       evas_object_smart_member_add(sd->clipper, obj);
+       evas_object_name_set(sd->clipper, "slider-clipper");
+
+       MSG_SLIDER_HIGH("Create clipper(0x%08x)", sd->clipper);
+
+       evas_object_show(sd->clipper);
+#endif
+
+       PERF_CHECK_END(LVL4, "slider smart add");
+
+       return;
+
+}
+
+static void
+_ivug_slider_smart_del(Evas_Object *obj)
+{
+       MSG_SLIDER_HIGH("Slider delete. obj=0x%08x", obj);
+
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+       ivug_ret_if(!sd);
+
+       if ( sd->tween) delete sd->tween;
+       sd->tween = NULL;
+
+       if ( sd->anim) delete sd->anim;
+       sd->anim = NULL;
+
+       if ( sd->item_load_idler )
+       {
+               ecore_idler_del(sd->item_load_idler);
+               sd->item_load_idler = NULL;
+       }
+
+       if ( sd->load_idler )
+       {
+               ecore_idler_del(sd->load_idler);
+               sd->load_idler = NULL;
+       }
+
+       if ( sd->calc_job ) ecore_job_del(sd->calc_job);
+       sd->calc_job = NULL;
+
+       if ( sd->event_obj )
+       {
+               evas_object_del(sd->event_obj);
+               sd->event_obj = NULL;
+       }
+
+       if ( sd->gesture )
+       {
+               evas_object_del(sd->gesture);
+               sd->gesture = NULL;
+       }
+
+       for (int i = 0; i < MAX_SLIDE ; i++)    //delete layout
+       {
+               ivug_slider_item_del(sd->slide[i]);
+               sd->slide[i] = NULL;
+       }
+
+#ifdef USE_CLIPPER
+       if ( sd->clipper )
+       {
+               evas_object_del(sd->clipper);
+               sd->clipper = NULL;
+       }
+#endif
+
+       free(sd);
+
+}
+
+
+static void
+_ivug_slider_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
+{
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+       MSG_ASSERT(sd != NULL);
+
+       if ((sd->x == x) && (sd->y == y)) return;
+
+       MSG_SLIDER_MED("Slider Move : XY(%d,%d)", x, y);
+
+       sd->x = x;
+       sd->y = y;
+
+#ifdef USE_CALC_JOB
+       if ( sd->calc_job ) ecore_job_del(sd->calc_job);
+       sd->calc_job = NULL;
+
+       sd->calc_job = ecore_job_add(_sizing_eval, sd);
+#else
+       evas_object_smart_changed(obj);
+#endif
+
+}
+
+static void
+_ivug_slider_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
+{
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+       MSG_ASSERT(sd != NULL);
+
+       if ((sd->w == w) && (sd->h == h)) return;
+
+       MSG_SLIDER_MED("Slider Resize : WH(%d,%d)", w,h);
+
+       sd->w = w;
+       sd->h = h;
+
+#ifdef USE_CALC_JOB
+       if ( sd->calc_job ) ecore_job_del(sd->calc_job);
+       sd->calc_job = NULL;
+
+       sd->calc_job = ecore_job_add(_sizing_eval, sd);
+#else
+       evas_object_smart_changed(obj);
+#endif
+
+}
+
+static void
+_ivug_slider_smart_show(Evas_Object *obj)
+{
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+       MSG_ASSERT(sd != NULL);
+
+       if ( sd->bShow == EINA_TRUE) return;
+
+       sd->bShow = EINA_TRUE;
+
+       MSG_SLIDER_HIGH("Slider Show");
+
+       ivug_slider_item_show(sd->slide[CENTER_SLIDE]);
+       ivug_slider_item_show(sd->slide[NEXT_SLIDE]);
+       ivug_slider_item_show(sd->slide[PREV_SLIDE]);
+
+       evas_object_show(sd->event_obj);
+       evas_object_show(sd->clipper);
+}
+
+static void
+_ivug_slider_smart_hide(Evas_Object *obj)
+{
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+       MSG_ASSERT(sd != NULL);
+
+       if ( sd->bShow == EINA_FALSE) return;
+
+       sd->bShow = EINA_FALSE;
+
+       MSG_SLIDER_HIGH("Slider Hide");
+
+       ivug_slider_item_hide(sd->slide[CENTER_SLIDE]);
+       ivug_slider_item_hide(sd->slide[NEXT_SLIDE]);
+       ivug_slider_item_hide(sd->slide[PREV_SLIDE]);
+
+       evas_object_hide(sd->event_obj);
+       evas_object_hide(sd->clipper);
+}
+
+static void
+_ivug_slider_smart_clip_set(Evas_Object *obj, Evas_Object * clip)
+{
+       int x, y, w, h;
+       evas_object_geometry_get(clip, &x, &y, &w, &h);
+       MSG_SLIDER_HIGH("Slider Clip set : Clipper=0x%08x (%d,%d,%d,%d)", x, y, w, h);
+
+#ifdef USE_CLIPPER
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+
+       for (int i = 0; i < MAX_SLIDE; i++)
+       {       //set resize
+               ivug_slider_item_clip_set(sd->slide[i], sd->clipper);
+       }
+
+       evas_object_clip_set(sd->event_obj, sd->clipper);
+#endif
+
+}
+
+static void
+_ivug_slider_smart_clip_unset(Evas_Object *obj)
+{
+       MSG_SLIDER_HIGH("Slider Clip unset");
+
+#ifdef USE_CLIPPER
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+
+       for (int i = 0; i < MAX_SLIDE; i++)
+       {       //set resize
+               ivug_slider_item_clip_unset(sd->slide[i]);
+       }
+
+       evas_object_clip_unset(sd->event_obj);
+#endif
+
+}
+
+static void
+_ivug_slider_smart_calculate(Evas_Object *obj)
+{
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+       if ((sd->w == 0) || (sd->h == 0)) return;
+
+       MSG_SLIDER_MED("Slider Calculate : XYWH(%d,%d, %d,%d)", sd->x, sd->y, sd->w, sd->h);
+
+       sd->anim->Stop();
+
+       _ivug_slider_slide_resize(sd, sd->w, sd->h);
+       _ivug_slider_slide_move(sd, sd->x, sd->y);
+}
+
+// Smart Object
+static void
+_ivug_slider_smart_init(void)
+{
+       if (_smart_) return;
+       {
+               const char* name = eina_stringshare_add("ivug-slider");
+               MSG_SLIDER_MED("name=%s", name);
+               static Evas_Smart_Class sc =
+               {
+                       NULL,
+                       EVAS_SMART_CLASS_VERSION,
+                       _ivug_slider_smart_add,
+                       _ivug_slider_smart_del,
+                       _ivug_slider_smart_move,
+                       _ivug_slider_smart_resize,
+                       _ivug_slider_smart_show,
+                       _ivug_slider_smart_hide,
+                       NULL,
+                       _ivug_slider_smart_clip_set,
+                       _ivug_slider_smart_clip_unset,
+                       _ivug_slider_smart_calculate,
+                       NULL,
+                       NULL,
+                       NULL,
+                       NULL,
+                       NULL,
+                       NULL
+               };      //Evas_smart_Class
+               sc.name = name;
+               _smart_ = evas_smart_class_new(&sc);
+       }
+}
+
+
+/******* slide UI function *******/
+
+void
+_ivug_slider_slide_move(struct Smart_Data *sd, Evas_Coord x, Evas_Coord y)
+{
+       IV_ASSERT(sd != NULL);
+
+       MSG_SLIDER_LOW("Slider move. XY(%d,%d)", x, y);
+#if 0
+       int nOffset = 100;              // For debugging
+       x += nOffset;
+#endif
+// TODO : If size is smaller than screen's, image should be put in middle
+       ivug_slider_item_move(sd->slide[CENTER_SLIDE], x, y);
+
+// TODO : so as to increas perf, dont draw slide under certain condition
+       ivug_slider_item_move(sd->slide[PREV_SLIDE], x - sd->slide[PREV_SLIDE]->w - IMAGE_BETWEEN_MARGIN , y);
+       ivug_slider_item_move(sd->slide[NEXT_SLIDE], x + sd->slide[CENTER_SLIDE]->w + IMAGE_BETWEEN_MARGIN , y);
+}
+
+void
+_ivug_slider_slide_resize(struct Smart_Data *sd, Evas_Coord w, Evas_Coord h)
+{
+       IV_ASSERT(sd != NULL);
+
+       ivug_slider_item_resize(sd->slide[CENTER_SLIDE], sd->w, sd->h);
+       ivug_slider_item_resize(sd->slide[PREV_SLIDE], sd->w, sd->h);
+       ivug_slider_item_resize(sd->slide[NEXT_SLIDE], sd->w, sd->h);
+}
+
+
+static void _ivug_slider_on_tween(double value, void *data)
+{
+       struct Smart_Data *sd = (struct Smart_Data *)data;
+
+       _ivug_slider_slide_move(sd, value, sd->y);
+}
+
+static void _ivug_slider_on_moment(double value, void *data)
+{
+       struct Smart_Data *sd = (struct Smart_Data *)data;
+
+       sd->momentum = value;
+}
+
+static bool _ivug_slider_on_ecore_animator(double value, void *pData)
+{
+       struct Smart_Data *sd = (struct Smart_Data *)pData;
+
+       if ( sd->tween->IsFinished() )
+       {
+               MSG_SLIDER_HIGH("animation ended");
+
+               shift_direction_t direction = SLIDE_SHIFT_NONE;
+
+               if ( (sd->slide[CENTER_SLIDE]->x - sd->x) + sd->slide[CENTER_SLIDE]->w < 0 )
+               {
+                       direction = SLIDE_SHIFT_TO_RIGHT;
+               }
+               else if ( (sd->slide[CENTER_SLIDE]->x - sd->x) > sd->w )
+               {
+                       direction = SLIDE_SHIFT_TO_LEFT;
+               }
+
+               _ivug_slider_slide_shift(sd, direction);                // Change center item
+
+               delete sd->tween;
+               sd->tween = NULL;
+               return false;
+       }
+
+       MSG_SLIDER_LOW("On Animaion. %f ", value);
+
+       sd->tween->Update(value);
+
+       return true;
+}
+
+void
+_ivug_slider_start_slide(struct Smart_Data *sd, int src_x, int dst_x, int momentum)
+ {
+ // Slider Move animation.
+       IV_ASSERT(sd != NULL);
+
+// TODO : If transition is preceeding, change slide item,
+       sd->anim->Stop();
+
+       if ( sd->tween ) delete sd->tween;
+       sd->tween = NULL;
+
+       if ( src_x == dst_x )
+       {
+               MSG_SLIDER_ERROR("Src and Dest are same.");
+               return;
+       }
+
+       double duration;
+
+       duration = (src_x - dst_x) / (double)momentum;
+
+       duration = fabs(duration);
+
+       sd->tween = new CGroupAnimator();
+
+       sd->tween->AddAnimator(new CSingleAnimator(src_x, dst_x, duration, CTranstionFunc::LinearTransit, _ivug_slider_on_tween, sd));
+       sd->tween->AddAnimator(new CSingleAnimator(sd->momentum, 0, duration, CTranstionFunc::LinearTransit, _ivug_slider_on_moment, sd));
+
+       sd->anim->Start(_ivug_slider_on_ecore_animator, (void *)sd);
+
+       MSG_SLIDER_HIGH("Start scroll anim from %d~%d duration=%f Momentyum=%d~%d", src_x, dst_x, duration, sd->momentum, sd->momentum + (src_x - dst_x));
+
+}
+
+void
+_ivug_slider_slide_shift(struct Smart_Data *sd, shift_direction_t direction)
+{
+       IV_ASSERT(sd != NULL);
+
+       if ( direction == SLIDE_SHIFT_NONE )
+       {
+               MSG_SLIDER_ERROR("Shift none!. just return");
+               return;
+       }
+
+       sd->zoom_level = 0;     //reset zoom level
+
+       Media_Item *item = NULL;
+       Slide_Item *NewItem = NULL;
+
+       if ( direction == SLIDE_SHIFT_TO_RIGHT )
+       {
+               MSG_SLIDER_HIGH( "Slide shited. <-----");
+
+               NewItem = sd->slide[PREV_SLIDE];
+
+               item = ivug_medialist_get_next(sd->media_list, sd->slide[NEXT_SLIDE]->mitem);
+
+               sd->slide[PREV_SLIDE] = sd->slide[CENTER_SLIDE];
+               sd->slide[CENTER_SLIDE] = sd->slide[NEXT_SLIDE];
+               sd->slide[NEXT_SLIDE] = NewItem;
+
+       }
+       else
+       {
+               MSG_SLIDER_HIGH( "Slide shited. ----->");
+
+               NewItem = sd->slide[NEXT_SLIDE];
+               item = ivug_medialist_get_prev(sd->media_list, sd->slide[PREV_SLIDE]->mitem);
+
+               sd->slide[NEXT_SLIDE] = sd->slide[CENTER_SLIDE];
+               sd->slide[CENTER_SLIDE] = sd->slide[PREV_SLIDE];
+               sd->slide[PREV_SLIDE] = NewItem;
+       }
+
+       ivug_slider_item_data_set(NewItem, item); //set data.
+
+       _do_load(sd);
+
+       MSG_SLIDER_HIGH("Center slide. XY(%d,%d)", sd->slide[CENTER_SLIDE]->x , sd->slide[CENTER_SLIDE]->y);
+
+       sd->last_dir = direction;
+
+       if ( direction == SLIDE_SHIFT_TO_RIGHT )
+       {
+               _ivug_slider_on_center_changed(sd->obj, sd->slide[PREV_SLIDE], sd->slide[CENTER_SLIDE]);
+       }
+       else
+       {
+               _ivug_slider_on_center_changed(sd->obj, sd->slide[NEXT_SLIDE], sd->slide[CENTER_SLIDE]);
+       }
+
+}
+
+
+Evas_Object*
+ivug_slider_add(Evas_Object* parent)
+{
+       Evas_Object *obj = NULL;
+       _ivug_slider_smart_init();      //init smart object for ivug slider
+
+       PERF_CHECK_BEGIN(LVL3, "evas_object_smart_add");
+
+       obj = evas_object_smart_add(evas_object_evas_get(parent), _smart_);     //create smart object.
+       evas_object_name_set(obj, "Slider");
+
+       ivug_retv_if(!obj, NULL);
+
+       PERF_CHECK_END(LVL3, "evas_object_smart_add");
+
+       MSG_SLIDER_HIGH("Slider Added Obj(0x%08x) Evas(0x%08x) Parent(0x%08x)", obj, evas_object_evas_get(parent), parent);
+
+       return obj;
+}
+
+void
+ivug_slider_start(Evas_Object *obj)
+{
+       IV_ASSERT(obj != NULL);
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+
+       MSG_SLIDER_HIGH("Slider start");
+
+}
+
+
+Media_Item *
+ivug_slider_get_item(Evas_Object* obj)
+{
+       IV_ASSERT(obj != NULL);
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+
+       return sd->slide[CENTER_SLIDE]->mitem;
+}
+
+slide_state_t
+ivug_slider_get_state(Evas_Object* obj)
+{
+       IV_ASSERT(obj != NULL);
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+       IV_ASSERT(sd != NULL);
+
+       return sd->slide[CENTER_SLIDE]->state;
+}
+
+void
+ivug_slider_delete_item(Evas_Object* obj)
+{
+       IV_ASSERT(obj != NULL);
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+       IV_ASSERT(sd != NULL);
+
+       ivug_slider_item_stop(sd->slide[CENTER_SLIDE]);
+
+       shift_direction_t direction = SLIDE_SHIFT_NONE;
+
+       if (sd->slide[NEXT_SLIDE]->state != SLIDE_STATE_NONE)
+       {
+               MSG_SLIDER_HIGH("right slide state : %s", _GetStateString(sd->slide[NEXT_SLIDE]->state));
+               direction = SLIDE_SHIFT_TO_RIGHT;
+       }
+       else if (sd->slide[PREV_SLIDE]->state != SLIDE_STATE_NONE)
+       {
+               MSG_SLIDER_HIGH("left slide state : %s", _GetStateString(sd->slide[PREV_SLIDE]->state));
+               direction = SLIDE_SHIFT_TO_LEFT;
+       }
+
+       MSG_SLIDER_HIGH("shift direction = %d ", direction);
+
+       ivug_medialist_delete_item(sd->media_list,  sd->slide[CENTER_SLIDE]->mitem );   //delete data.
+       ivug_slider_item_data_set(sd->slide[CENTER_SLIDE], NULL);
+
+       Media_Item* item = NULL;
+
+//move slide.
+       if (  direction  ==  SLIDE_SHIFT_TO_RIGHT )             // <-------------- Next image
+       {
+               Slide_Item *tmp = sd->slide[CENTER_SLIDE];
+
+               item = ivug_medialist_get_next(sd->media_list, sd->slide[NEXT_SLIDE]->mitem); //get next data.
+
+               sd->slide[CENTER_SLIDE] = sd->slide[NEXT_SLIDE];
+               sd->slide[NEXT_SLIDE] = tmp;
+
+               if(item != NULL)
+               {
+                       ivug_slider_item_data_set(sd->slide[NEXT_SLIDE],  item);
+                       ivug_slider_item_load(sd->slide[NEXT_SLIDE]);
+               }
+               else
+               {
+                       MSG_SLIDER_WARN("Item is NULL");
+               }
+       }
+       else if ( direction  ==  SLIDE_SHIFT_TO_LEFT)           // Prev Image ----------->
+       {
+               Slide_Item *tmp = sd->slide[CENTER_SLIDE];
+
+               item = ivug_medialist_get_prev(sd->media_list, sd->slide[PREV_SLIDE]->mitem);
+
+               sd->slide[CENTER_SLIDE] = sd->slide[PREV_SLIDE];
+               sd->slide[PREV_SLIDE] = tmp;
+
+               if(item != NULL)
+               {
+                       ivug_slider_item_data_set(sd->slide[PREV_SLIDE], item);
+                       ivug_slider_item_load(sd->slide[PREV_SLIDE]);
+               }
+               else
+               {
+                       MSG_SLIDER_WARN("Item is NULL");
+               }
+       }
+       else            // Shift none
+       {
+               MSG_SLIDER_WARN("Direction is NONE");
+       }
+
+       _ivug_slider_slide_move(sd, 0 , 0);     //draw item
+
+       _ivug_slider_on_center_changed(sd->obj, NULL, sd->slide[CENTER_SLIDE]);
+
+//     evas_object_smart_callback_call(sd->obj, "slider,item,deleted", sd->slide[CENTER_SLIDE]);
+
+}
+
+Eina_Bool
+ivug_slider_set_medialist(Evas_Object* obj, Media_List *mList, Media_Item *current)
+{
+       IV_ASSERT(obj != NULL);
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+       IV_ASSERT(current != NULL);
+
+       sd->media_list = mList;
+
+       //set init
+       PERF_CHECK_BEGIN(LVL4, "set center");
+
+       ivug_slider_item_data_set(sd->slide[CENTER_SLIDE], current);
+       ivug_slider_item_load(sd->slide[CENTER_SLIDE]);
+
+       PERF_CHECK_END(LVL4, "set center");
+
+       Media_Item *item = ivug_medialist_get_next(sd->media_list, current);
+
+       PERF_CHECK_BEGIN(LVL4, "set next");
+
+       ivug_slider_item_data_set(sd->slide[NEXT_SLIDE], item);
+
+       PERF_CHECK_END(LVL4, "set next");
+
+       item = ivug_medialist_get_prev(sd->media_list, current);
+
+       PERF_CHECK_BEGIN(LVL4, "set prev");
+
+       ivug_slider_item_data_set(sd->slide[PREV_SLIDE], item);
+
+       PERF_CHECK_END(LVL4, "set prev");
+
+       PERF_CHECK_BEGIN(LVL4, "_ivug_slider_on_center_changed");
+
+       _ivug_slider_on_center_changed(sd->obj, NULL, sd->slide[CENTER_SLIDE]);
+
+       PERF_CHECK_END(LVL4, "_ivug_slider_on_center_changed");
+
+       return EINA_TRUE;
+}//ivug slider set list
+
+void
+ivug_slider_set_item(Evas_Object* obj, Media_Item *newItem, slide_dir_t dir)
+{
+       IV_ASSERT(obj != NULL);
+       IV_ASSERT(newItem != NULL);
+
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+
+       MSG_SLIDER_HIGH("Slider set item. Dir=%d", dir);
+
+       Media_Item *mitem = NULL;
+
+       if ( ivug_slider_item_data_get(sd->slide[CENTER_SLIDE]) == newItem )
+       {
+               MSG_SLIDER_HIGH("Same item.");
+               return ;
+       }
+
+       switch(dir)
+       {
+               case SLIDE_TO_RIGHT:            // <--------------- Next image
+                       ivug_slider_item_data_set(sd->slide[NEXT_SLIDE], newItem);
+
+                       _ivug_slider_start_slide(sd, sd->slide[CENTER_SLIDE]->x , sd->slide[CENTER_SLIDE]->w + IMAGE_BETWEEN_MARGIN, ANIN_VELOCITY);
+
+                       mitem = ivug_medialist_get_prev(sd->media_list, newItem);
+
+                       ivug_slider_item_data_set(sd->slide[PREV_SLIDE], mitem);
+                       break;
+               case SLIDE_TO_LEFT:                     // Prev Image ------------------>
+                       ivug_slider_item_data_set(sd->slide[PREV_SLIDE], newItem);
+
+                       _ivug_slider_start_slide(sd, sd->slide[CENTER_SLIDE]->x , sd->slide[CENTER_SLIDE]->w + IMAGE_BETWEEN_MARGIN, ANIN_VELOCITY);
+
+                       mitem = ivug_medialist_get_next(sd->media_list, newItem);
+
+                       ivug_slider_item_data_set(sd->slide[NEXT_SLIDE], mitem);
+                       break;
+               case SLIDE_INSTANTLY:
+// For avoid blinking, set item in next_slide and then swap with center
+                       ivug_slider_item_data_set(sd->slide[NEXT_SLIDE], newItem);
+
+                       Slide_Item *sitem = sd->slide[CENTER_SLIDE];
+                       sd->slide[CENTER_SLIDE] = sd->slide[NEXT_SLIDE];
+                       sd->slide[NEXT_SLIDE] = sitem;
+
+                       _ivug_slider_slide_move(sd, 0, 0);
+
+                       mitem = ivug_medialist_get_next(sd->media_list, newItem);
+                       ivug_slider_item_data_set(sd->slide[NEXT_SLIDE], mitem);
+
+                       mitem = ivug_medialist_get_prev(sd->media_list, newItem);
+                       ivug_slider_item_data_set(sd->slide[PREV_SLIDE], mitem);
+
+                       _ivug_slider_on_center_changed(sd->obj, sitem , sd->slide[CENTER_SLIDE]);
+                       break;
+       }
+
+}
+
+
+// Goto Background
+void
+ivug_slider_pause(Evas_Object *obj)
+{
+       IV_ASSERT(obj != NULL);
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+
+       MSG_SLIDER_HIGH("Slider pause");
+
+       ivug_slider_item_pause(sd->slide[CENTER_SLIDE]);
+}
+
+// Goto Foreground
+void
+ivug_slider_resume(Evas_Object *obj)
+{
+       IV_ASSERT(obj != NULL);
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+
+       MSG_SLIDER_HIGH("Slider resume");
+
+       ivug_slider_item_resume(sd->slide[CENTER_SLIDE]);
+}
+
+void
+ivug_slider_skip(Evas_Object* obj)
+{
+       ivug_ret_if(!obj);              // TODO
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+
+       if ( sd->last_dir == SLIDE_SHIFT_TO_RIGHT) // <--------------
+       {
+               if(sd->slide[NEXT_SLIDE]->mitem == NULL)
+               {
+                       MSG_SLIDER_HIGH("next is NULL");
+                       if(sd->slide[PREV_SLIDE]->mitem == NULL)
+                       {
+                               MSG_SLIDER_HIGH("prev is NULL too, exit Image viewer");
+                               ug_destroy_me(gGetUGHandle());
+                               return;
+                       }
+                       _ivug_slider_start_slide(sd, sd->slide[CENTER_SLIDE]->x , sd->slide[CENTER_SLIDE]->w + IMAGE_BETWEEN_MARGIN, ANIN_VELOCITY);
+               }
+               else
+               {
+                       _ivug_slider_start_slide(sd, sd->slide[CENTER_SLIDE]->x , -sd->slide[CENTER_SLIDE]->w - IMAGE_BETWEEN_MARGIN, ANIN_VELOCITY);
+               }
+       }
+       else if (sd->last_dir == SLIDE_SHIFT_TO_LEFT)  // -------------->
+       {
+               if(sd->slide[PREV_SLIDE]->mitem == NULL)
+               {
+                       MSG_SLIDER_HIGH("prev is NULL");
+                       if(sd->slide[NEXT_SLIDE]->mitem == NULL)
+                       {
+                               MSG_SLIDER_HIGH("mext is NULL too, exit Image viewer");
+                               ug_destroy_me(gGetUGHandle());
+                               return;
+                       }
+                       _ivug_slider_start_slide(sd, sd->slide[CENTER_SLIDE]->x , -sd->slide[CENTER_SLIDE]->w - IMAGE_BETWEEN_MARGIN, ANIN_VELOCITY);
+               }
+               else
+               {
+                       _ivug_slider_start_slide(sd, sd->slide[CENTER_SLIDE]->x , sd->slide[CENTER_SLIDE]->w + IMAGE_BETWEEN_MARGIN, ANIN_VELOCITY);
+               }
+       }
+}
+
+bool ivug_slider_load(Evas_Object* obj)
+{
+       IV_ASSERT(obj != NULL);
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+
+       ivug_retv_if(!sd, EINA_FALSE);  //check smart data.
+
+       if ( sd->item_load_idler )
+       {
+               ecore_idler_del(sd->item_load_idler);
+               sd->item_load_idler = NULL;
+       }
+
+       sd->item_load_idler = ecore_idler_add(_item_loader, (void *)obj);
+
+       return true;
+}
+
+void
+ivug_slider_set_menu_visibility(Evas_Object* obj, Eina_Bool bVisible)
+{
+       IV_ASSERT(obj != NULL);
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+
+       Slide_Item *si = sd->slide[CENTER_SLIDE];
+
+       if ( bVisible == EINA_TRUE )
+       {
+               ivug_slider_item_show_menu(si);
+       }
+       else
+       {
+               ivug_slider_item_hide_menu(si);
+       }
+}
+
+
+
+
+// For debugging.
+void ivug_slider_dump_photocam(Evas_Object* obj)
+{
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+
+//     EFL::dump_obj(sd->slide[CENTER_SLIDE]->photocam, 0);
+//     EFL::dump_obj(obj, 0);
+
+       Evas_Object *clipper;
+
+       clipper = evas_object_clip_get(obj);
+       if (clipper)
+       {
+               Eina_List *clippees;
+
+               Eina_List *l;
+
+               clippees = (Eina_List *)evas_object_clipees_get(clipper);
+               MSG_SLIDER_HIGH("Clipper clips %i objects", eina_list_count(clippees));
+
+               void *data;
+
+               EINA_LIST_FOREACH(clippees, l, data)
+               {
+                       Evas_Object *obj_tmp = (Evas_Object *)data;
+
+                       int x, y, w, h;
+                       evas_object_geometry_get(obj_tmp, &x, &y, &w, &h);
+
+                       MSG_SLIDER_HIGH("Obj=%s(%s) Geometry(%d,%d,%d,%d)",
+                               evas_object_name_get(obj_tmp), evas_object_type_get(obj_tmp),
+                               x, y, w, h);
+               //      evas_object_show(obj_tmp);
+               }
+       }
+
+
+       Evas *e = evas_object_evas_get(sd->slide[CENTER_SLIDE]->photocam);
+
+       int w, h;
+
+       evas_output_size_get(e, &w, &h);
+
+       int vx, vy, vw, vh;
+
+       evas_output_viewport_get(e, &vx, &vy, &vw, &vh);
+
+       EFL::dump_obj(sd->obj);
+
+       MSG_SLIDER_HIGH("Evas Size(%d,%d) Viewport(%d,%d,%d,%d)", w, h, vx, vy, vw, vh);
+
+}
+
+unsigned int
+ivug_slider_zoom_level_get(Evas_Object *obj)
+{
+       IV_ASSERT(obj != NULL);
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+
+       MSG_SLIDER_HIGH("Slider zoom level");
+
+       return sd->zoom_level;
+}
+
+void
+ivug_slider_zoom_in(Evas_Object *obj)
+{
+       IV_ASSERT(obj != NULL);
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+
+       MSG_SLIDER_HIGH("Slider zoom in");
+
+       if(sd->zoom_level > ZOOM_LEVEL_MAX)
+       {
+               MSG_MAIN_ERROR("zoom_level is %d", sd->zoom_level);
+               return;
+       }
+
+       Slide_Item *si = sd->slide[CENTER_SLIDE];
+
+       double zoom = 0.0;
+       Evas_Coord ix = 0, iy= 0, iw= 0, ih= 0;
+
+       evas_object_geometry_get(si->photocam, &ix, &iy, &iw, &ih);
+
+       zoom = ivug_slider_item_zoom_get(si);
+       zoom *= ZOOM_LEVEL_STEP;
+       ivug_slider_item_zoom_set(si, zoom, iw/2, ih/2);
+
+       ivug_slider_item_hold_set(si, EINA_FALSE);
+
+       sd->zoom_level++;
+}
+
+void
+ivug_slider_zoom_out(Evas_Object *obj)
+{
+       IV_ASSERT(obj != NULL);
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+
+       MSG_SLIDER_HIGH("Slider zoom in");
+
+       if(sd->zoom_level == 0)
+       {
+               MSG_MAIN_ERROR("zoom_level is 0");
+               return;
+       }
+
+       Slide_Item *si = sd->slide[CENTER_SLIDE];
+
+       double zoom = 0.0;
+       Evas_Coord ix = 0, iy= 0, iw= 0, ih= 0;
+
+       evas_object_geometry_get(si->photocam, &ix, &iy, &iw, &ih);
+
+       zoom = ivug_slider_item_zoom_get(si);
+       zoom /= ZOOM_LEVEL_STEP;
+       ivug_slider_item_zoom_set(si, zoom, iw/2, ih/2);
+
+       ivug_slider_item_hold_set(si, EINA_FALSE);
+
+       sd->zoom_level--;
+}
+
diff --git a/main/src/view/ivug-crop-view.cpp b/main/src/view/ivug-crop-view.cpp
new file mode 100755 (executable)
index 0000000..49411d0
--- /dev/null
@@ -0,0 +1,494 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include <Elementary.h>
+#include <fcntl.h>
+
+#include "ivug-crop-view.h"
+#include "EFLUtil.h"
+#include "ivug-debug.h"
+#include "ivug-image.h"
+#include "ivug-scissorbox.h"
+#include "ivug-context.h"
+#include "ivug-util.h"
+#include "ivug-selectioninfo.h"
+
+#undef LOG_LVL
+#define LOG_LVL DBG_MSG_LVL_MED
+
+#undef LOG_CAT
+#define LOG_CAT "IV-CROP"
+
+#define EDJ_PATH PREFIX"/res/edje/"PACKAGE
+
+static void _on_layout_resized(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       IvugCropView *pCropView = static_cast<IvugCropView *>(data);
+       ///////////////////////////////////////////////////////////////////
+       int org_x, org_y, org_w, org_h;
+
+       ivug_image_region_get(pCropView->photocam, &org_x, &org_y, &org_w, &org_h);
+
+       if(org_w == 0 || org_h == 0)
+               return;
+
+       MSG_MED("org_x=%d, org_y=%d, org_w=%d, org_h=%d", org_x, org_y, org_w, org_h);
+
+       int org_sx, org_sy, org_sw, org_sh;
+       ivug_scissorbox_region_get(pCropView->cropbox, &org_sx, &org_sy, &org_sw, &org_sh);
+
+       MSG_MED("org_sx=%d, org_sy=%d, org_sw=%d, org_sh=%d", org_sx, org_sy, org_sw, org_sh);
+
+       int dx = org_sx-org_x;
+       int dy = org_sy-org_y;
+
+       int lcd_x, lcd_y, lcd_w, lcd_h;
+
+       evas_object_geometry_get(obj, &lcd_x, &lcd_y, &lcd_w, &lcd_h);
+       MSG_MED("lcd_x=%d, lcd_y=%d, lcd_w=%d, lcd_h=%d", lcd_x, lcd_y, lcd_w, lcd_h);
+
+       int ph, pw;
+
+       int img_w, img_h;
+       int ext_w, ext_h;
+
+       img_w = org_w;
+       img_h = org_h;
+       ext_w = lcd_w;
+       ext_h = lcd_h;
+
+       ph = (img_h * ext_w) / img_w;
+
+       if (ph > ext_h)
+       {
+               pw = (img_w * ext_h) / img_h;
+               ph = ext_h;
+       }
+       else
+       {
+               pw = ext_w;
+       }
+
+       double zoom = 0.0;
+
+       if ( img_w > img_h)
+       {
+               zoom = (double)pw / img_w;
+       }
+       else
+       {
+               zoom = (double)ph / img_h;
+       }
+
+       int sx, sy, sw, sh;
+
+       sw = org_sw*zoom;
+       sh = org_sh*zoom;
+       dx *= zoom;
+       dy *= zoom;
+
+       sx = (ext_w-img_w*zoom)/2 + dx;
+       sy = (ext_h-img_h*zoom)/2 + dy;
+
+       ivug_scissorbox_boundary_set(pCropView->cropbox, (ext_w-img_w*zoom)/2, (ext_h-img_h*zoom)/2, img_w*zoom, img_h*zoom);
+
+       ///////////////////////////////////////////////////////////////////
+
+       MSG_MED("sx=%d, sy=%d, sw=%d, sh=%d", sx, sy, sw, sh);
+
+       ivug_scissorbox_region_set(pCropView->cropbox, sx, sy, sw, sh);
+}
+
+void  _on_test(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_HIGH("Test signal received");
+}
+\r
+static Eina_Bool _on_crop_timer_expired(void *data)\r
+{\r
+       IvugCropView *pCropView = static_cast<IvugCropView *>(data);\r
+\r
+       pCropView->timer = NULL;\r
+\r
+       elm_object_disabled_set(pCropView->btn_ok, EINA_FALSE);\r
+
+       MSG_HIGH("Image preloaded");\r
+\r
+       int x, y, w, h;
+       ivug_image_region_get(pCropView->photocam,  &x, &y, &w, &h);
+
+       // Check error!.
+
+       MSG_HIGH("Photcam image Geometry : %d,%d,%d,%d", x, y, w, h);
+
+       // Get Internal image and set that as scissorbox client
+       Evas_Object *subObj = ivug_image_internal_image_get(pCropView->photocam);
+
+       // Move crop box
+       ivug_scissorbox_attach(pCropView->cropbox, subObj);
+
+       int nW = 0;
+       int nH = 0;
+
+       if(pCropView->w > 0 && pCropView->h > 0)
+       {
+               nW = pCropView->w;
+               nH = pCropView->h;
+       }
+       else
+       {
+               nW = w / 2;
+               nH = h / 2;
+       }
+
+       ivug_scissorbox_region_set(pCropView->cropbox, x + (w - nW) / 2, y + (h - nH) / 2, nW, nH);
+
+       pCropView->notify = ivug_notify_create(pCropView->layout, IDS_CROP_NOTIFY);\r
+\r
+       return ECORE_CALLBACK_CANCEL;\r
+}\r
+\r
+void  _on_preloaded(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+
+       IvugCropView *pCropView = static_cast<IvugCropView *>(data);
+
+       MSG_HIGH("Image preloaded");\r
+\r
+       double zoom = ivug_image_zoom_get(pCropView->photocam);\r
+\r
+       MSG_HIGH("zoom = %g", zoom);\r
+\r
+       pCropView->timer = ecore_timer_add(0.5, _on_crop_timer_expired, data);\r
+\r
+       return;\r
+}
+
+static void
+_ivug_crop_view_response_cb( void *data, Evas_Object *obj, void *event_info )
+{
+       IV_ASSERT(obj != NULL);
+       IV_ASSERT(data != NULL);
+
+       MSG_HIGH( "response callback=%d",(int)event_info);
+       IvugCropView *pCropView = static_cast<IvugCropView *>(data);
+
+       evas_object_hide(obj);          // popup
+       evas_object_del(obj);
+
+       // Remove view.
+       evas_object_smart_callback_call(pCropView->layout, "destroyed", NULL);
+
+       evas_object_smart_callback_call(pCropView->layout, "ok,clicked", pCropView->result_path);
+
+       ivug_crop_view_destroy(pCropView);
+}
+
+
+static Evas_Object*
+_show_exit_popup( Evas_Object *parent, const char *title, const char *desc, void *data)
+{
+       MSG_HIGH( "title: %s, desc %s", title, desc);
+
+       Evas_Object* style1_popup = elm_popup_add(parent);
+       evas_object_size_hint_weight_set(style1_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_popup_timeout_set(style1_popup, (double)2.0);
+       elm_object_text_set(style1_popup, desc);
+       elm_object_part_text_set(style1_popup, "title,text", title);
+
+       evas_object_smart_callback_add(style1_popup, "timeout", _ivug_crop_view_response_cb, data);
+
+       evas_object_show(style1_popup);
+       evas_object_layer_set(style1_popup, EVAS_LAYER_MAX);
+
+       return style1_popup;
+}
+
+static void  _on_btn_save(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+
+       IvugCropView *pCropView = static_cast<IvugCropView *>(data);
+       int rx, ry, rw, rh;
+       Evas_Object *ret_image = NULL;
+
+       char* save_file = ivug_generate_file_name(pCropView->file_path);
+       if(save_file == NULL)
+       {
+               MSG_SETAS_ERROR("Cannot generate file name");
+               goto SAVE_FAILED;
+       }
+
+       MSG_HIGH("Save clicked. %s", save_file);
+
+// Get region
+       ivug_scissorbox_region_get(pCropView->cropbox, &rx, &ry, &rw, &rh);
+
+// Save File
+       MSG_HIGH("SCissorbox Rect:(%d,%d,%d,%d)", rx, ry, rw, rh);
+
+       ret_image = ivug_image_region_image_get(pCropView->photocam, rx, ry, rw, rh);
+
+       if(ret_image == NULL)
+       {
+               MSG_ERROR("Region get faied.");
+               goto SAVE_FAILED;
+       }
+
+       if (evas_object_image_save(ret_image, save_file, NULL, "quality=100 compress=9") == EINA_FALSE)
+       {
+               MSG_ERROR("evas_object_image_save error. %s", save_file);
+               goto SAVE_FAILED;
+       }
+
+// Check again!
+       {
+               int fd = open(save_file, O_RDONLY);
+               if(fd < 0)
+               {
+                       MSG_ERROR("%s open error[%d]", save_file, fd);
+                       goto SAVE_FAILED;
+               }
+
+               int ret = close(fd);
+               if(ret < 0)
+               {
+                       MSG_ERROR("%s open error[%d]", save_file, ret);
+               }
+       }
+
+       pCropView->result_path = strdup(save_file);
+
+       _show_exit_popup(pCropView->layout, IDS_CROP, IDS_SUCCESS, data);
+
+       evas_object_del(ret_image);
+       free(save_file);
+
+       return;
+
+SAVE_FAILED:
+       _show_exit_popup(pCropView->layout, IDS_CROP, IDS_FAILED, data);
+
+       if(ret_image)
+               evas_object_del(ret_image);
+       if(save_file)
+               free(save_file);
+
+       return;
+}
+
+static void  _on_btn_cancel(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+
+       IvugCropView *pCropView = static_cast<IvugCropView *>(data);
+
+       MSG_HIGH("Cancel clicked");
+
+       evas_object_smart_callback_call(pCropView->layout, "destroyed", NULL);
+
+       evas_object_smart_callback_call(pCropView->layout, "cancel,clicked", NULL);
+
+       ivug_crop_view_destroy(pCropView);
+}
+
+static Evas_Event_Flags _finger_tap_end(void *data , void *event_info)
+{
+       Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
+
+       MSG_HIGH("Finger tab end. evt=%d", p->timestamp);
+
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       IvugCropView *pCropView = static_cast<IvugCropView *>(data);
+       IV_ASSERT(pCropView != NULL);
+
+       if(pCropView->bShowMenu)
+       {
+               MSG_HIGH("Hide");
+               elm_win_indicator_mode_set((Evas_Object*)ug_get_window(), ELM_WIN_INDICATOR_HIDE);
+               evas_object_hide(pCropView->notify);
+               edje_object_signal_emit(_EDJ(pCropView->layout), "elm,state,hide", "event");
+       }
+       else
+       {
+               MSG_HIGH("Show");
+               elm_win_indicator_mode_set((Evas_Object*)ug_get_window(), ELM_WIN_INDICATOR_SHOW);
+               evas_object_show(pCropView->notify);
+               edje_object_signal_emit(_EDJ(pCropView->layout), "elm,state,show", "event");
+       }
+
+       pCropView->bShowMenu = !pCropView->bShowMenu;
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+void _add_gesture_layer(Evas_Object *parent, IvugCropView *pCropView)
+{
+       IV_ASSERT(pCropView != NULL);
+
+       Evas_Object *gesture = pCropView->gesture;
+
+       gesture = elm_gesture_layer_add(parent);
+       elm_gesture_layer_hold_events_set(gesture, EINA_TRUE);
+
+       elm_gesture_layer_cb_set(gesture, ELM_GESTURE_N_TAPS, ELM_GESTURE_STATE_END, _finger_tap_end, (void *)pCropView);
+
+       if ( elm_gesture_layer_attach(gesture, pCropView->photocam) == EINA_FALSE)
+       {
+               MSG_ERROR("Cannot attach event rect");
+       }
+
+       evas_object_name_set(gesture, "Crop:Getsture");
+}
+
+IvugCropView *ivug_crop_view_create(Evas_Object *parent)
+{
+       IvugCropView *pCropView = (IvugCropView *)calloc(1, sizeof(IvugCropView));
+
+       Evas_Object *layout;
+
+       layout = EFL::create_layout(parent, EDJ_PATH"/ivug-crop-view.edj", "crop_view");
+
+       if ( layout == NULL )
+       {
+               MSG_ERROR("Cannot create crop view");
+               delete pCropView;
+
+               return NULL;
+       }
+
+       pCropView->layout = layout;
+       evas_object_event_callback_add(layout,  EVAS_CALLBACK_RESIZE, _on_layout_resized, pCropView );
+       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND );
+
+       pCropView->photocam  = ivug_image_create(layout);
+       ivug_image_animated_set(pCropView->photocam, EINA_FALSE);
+       ivug_image_hold_set(pCropView->photocam , EINA_TRUE);                   // Disable mouse events
+       evas_object_smart_callback_add(pCropView->photocam, "loaded", _on_preloaded, pCropView);
+
+       elm_object_part_content_set(layout, "photocam", pCropView->photocam );
+
+       pCropView->bShowMenu = true;
+       _add_gesture_layer(layout, pCropView);
+
+       pCropView->cropbox = ivug_scissorbox_add(layout);
+       ivug_scissorbox_type_set(pCropView->cropbox, SCISSOR_BOX_TYPE_2);
+
+       elm_object_part_content_set(layout, "scissorbox", pCropView->cropbox);
+
+// Create button
+       Evas_Object *btn = NULL;
+
+       btn = EFL::create_button(layout, "btn_style1", NULL, IDS_SAVE);
+       evas_object_smart_callback_add(btn, "clicked", _on_btn_save, (void *)pCropView);
+       elm_object_part_content_set(layout, "btn.save", btn);\r
+\r
+       pCropView->btn_ok = btn;\r
+
+       btn = EFL::create_button(layout, "btn_style1", NULL, IDS_CANCEL);
+       evas_object_smart_callback_add(btn, "clicked", _on_btn_cancel, (void *)pCropView);
+       elm_object_part_content_set(layout, "btn.cancel", btn);
+
+       MSG_HIGH("Create CropView");
+
+       evas_object_smart_callback_add(layout, "test", _on_test, NULL);\r
+\r
+       elm_object_disabled_set(pCropView->btn_ok, EINA_TRUE);\r
+
+       elm_win_resize_object_add(gGetCurrentWindow(), layout);
+
+       evas_object_show(layout);
+
+       pCropView->w = 0;
+       pCropView->h = 0;
+
+       return pCropView;
+
+}
+
+bool ivug_crop_view_box_size_set(IvugCropView *pCropView, int w, int h)
+{
+       IV_ASSERT(pCropView != NULL);
+
+       pCropView->w = w;
+       pCropView->h = h;
+
+       return true;
+}
+
+bool ivug_crop_view_box_ratio_fix(IvugCropView *pCropView, bool bFix)
+{
+       IV_ASSERT(pCropView != NULL);
+
+       ivug_scissorbox_ratio_fix(pCropView->cropbox, bFix);
+
+       return true;
+}
+
+bool ivug_crop_view_file_set(IvugCropView *pCropView, const char *file)
+{
+       IV_ASSERT(pCropView != NULL);
+
+       Evas_Load_Error err;
+
+       if ( pCropView->file_path )
+       {
+               free(pCropView->file_path);
+       }
+
+       pCropView->file_path = strdup(file);
+
+       err = ivug_image_file_set(pCropView->photocam, file, NULL);
+       evas_object_smart_callback_call(pCropView->layout, "test", NULL);
+
+       return true;
+}
+
+void ivug_crop_view_destroy(IvugCropView *pCropView)
+{
+       IV_ASSERT(pCropView != NULL);
+
+       MSG_HIGH("Destroy CropView");\r
+\r
+       if(pCropView->timer)\r
+       {\r
+               ecore_timer_del(pCropView->timer);\r
+               pCropView->timer = NULL;\r
+       }\r
+
+       if ( pCropView->file_path )
+               free(pCropView->file_path);
+
+       if ( pCropView->result_path)
+               free(pCropView->result_path);
+
+       if ( pCropView->layout )
+               evas_object_del(pCropView->layout);
+
+       delete pCropView;
+}
+
+Evas_Object *ivug_crop_view_get_object(IvugCropView *pCropView)
+{
+       IV_ASSERT(pCropView != NULL);
+
+       return pCropView->layout;
+}
+
+
+
diff --git a/main/src/view/ivug-main-view-menu.cpp b/main/src/view/ivug-main-view-menu.cpp
new file mode 100755 (executable)
index 0000000..6326801
--- /dev/null
@@ -0,0 +1,920 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-common.h"
+#include "ivug-main-view.h"
+#include "ivug-main-view-toolbar.h"
+#include "ivug-main-view-menu.h"
+
+#include "ivug-slider.h"
+#include "ivug-listpopup.h"
+#include "ivug-ext-ug.h"
+#include "ivug-popup.h"
+#include "ivug-selectioninfo.h"
+
+#include "ivug-media.h"
+#include "ivug-slideshow.h"
+
+#include "ivug-file-info.h"
+
+#include "ivug-exif.h"
+
+#include <Ecore_File.h>
+#include <ui-gadget-module.h>          // ug_destroy_me, ug_send_result
+#include <app_manager.h>               //app_manager_get_app_name\r
+
+#include "ivug-crop-view.h"\r
+\r
+enum {
+       IVUG_SHARE_TYPE_MESSAGE = 0x00,
+       IVUG_SHARE_TYPE_EMAIL,
+       IVUG_SHARE_TYPE_BLUETOOTH,
+       IVUG_SHARE_TYPE_PRINT_VIA_BLUETOOTH,
+       IVUG_SHARE_TYPE_SNS,
+       IVUG_SHARE_TYPE_WIFI,
+       IVUG_SHARE_TYPE_PRINT,
+};
+
+//set as
+enum {
+       IVUG_SET_AS_TYPE_HOME = 0x00,
+       IVUG_SET_AS_TYPE_LOCK,
+       IVUG_SET_AS_TYPE_BOTH,
+       IVUG_SET_AS_TYPE_CALLER_ID,
+};
+
+#undef IVUG_DEFINE_EXIF_ROTATE
+
+#define POPUP_ICON_DIRECTORY_PATH      IMAGE_PATH"/Popup_icon"
+
+#define ICON_PATH_CROP                                         POPUP_ICON_DIRECTORY_PATH"/T01_1_popup_icon_Crop.png"
+#define ICON_PATH_PASTE_FROM_CLIPBOARD         POPUP_ICON_DIRECTORY_PATH"/T01_1_popup_icon_Paste from Clipboard.png"
+
+static void\r
+_on_ext_ug_destroy_cb(ui_gadget_h ug, void *priv)
+{
+       if (!ug ) return;
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)priv;
+
+       MSG_IMAGEVIEW_HIGH("UG destroyed");
+
+       pMainView->ext_ug = NULL;
+
+       ivug_main_view_set_hide_timer(pMainView);
+}
+
+static void _on_selectioninfo_deleted(void * data, Evas * e, Evas_Object * obj, void * event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       MSG_MAIN_HIGH("selection info deleted");
+
+       pMainView->selectioninfo = NULL;
+}
+
+void _ivug_selectioninfo_create(Ivug_MainView *pMainView, const char *string)
+{
+       IV_ASSERT(pMainView != NULL);
+
+       if(pMainView->selectioninfo)
+       {
+               evas_object_del(pMainView->selectioninfo);
+               pMainView->selectioninfo = NULL;
+       }
+
+       pMainView->selectioninfo = ivug_selectioninfo_create(pMainView->layout, string);
+       IV_ASSERT(pMainView->selectioninfo != NULL);
+
+       evas_object_event_callback_add(pMainView->selectioninfo, EVAS_CALLBACK_DEL, _on_selectioninfo_deleted, pMainView);
+}
+
+
+void _delete_details_view(Ivug_MainView *pMainView )
+{
+       Evas_Object *detail_view_layout = elm_object_item_part_content_unset(pMainView->navi_it, "elm.swallow.detail");
+
+       MSG_MAIN_HIGH("Delete detail view. old layout=0x%08x", detail_view_layout);
+
+       ivug_details_view_destroy(pMainView->pDetailsView);  // Delete detail view.
+       pMainView->pDetailsView = NULL;
+
+}
+
+static void
+_on_setasview_deleted(void *data, Evas *e , Evas_Object *obj , void *event_info )
+{
+       ivug_retm_if(!data, "data is NULL");
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       MSG_MAIN_HIGH("SetAS View is destroyed");
+
+       pMainView->pSetAsView = NULL;
+
+       ivug_main_view_set_hide_timer(pMainView);
+}
+
+static void
+_on_popup_response(void *data, Evas_Object *obj, void *event_info)\r
+{
+       IV_ASSERT(data != NULL);
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       ivug_main_view_set_hide_timer(pMainView);
+}
+
+void _on_share_selected(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView->ext_ug == NULL);
+
+       Ivug_ListPopup_Item *item = (Ivug_ListPopup_Item *)event_info;
+
+       const char *label = (const char *)ivug_listpopup_item_get_data(item);
+
+       if(label == NULL)
+       {
+               MSG_MAIN_ERROR("label is NULL");
+               evas_object_del(obj);
+               ivug_main_view_set_hide_timer(pMainView);
+               return;
+       }
+       MSG_MAIN_HIGH("text(%s) is clicked", label);
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+
+       if(mdata == NULL)
+       {
+               MSG_MAIN_ERROR("sd is NULL");
+               evas_object_del(obj);
+               return;
+       }
+
+       char *path = NULL;
+       path = mdata->filepath;
+
+       bool ret = false;
+
+       ret = ivug_ext_launch_default(path, SERVICE_OPERATION_SEND, label, data);
+
+       /* appsvc failed or ug_create failed */
+       if(ret == false)
+       {
+               ivug_1btn_popup_show(pMainView->layout, NULL, IDS_APPLICATION_NOT_INSTALLED, _on_popup_response, pMainView);\r
+       }
+
+       evas_object_del(obj);
+}
+
+void _on_setas_selected(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+
+       Ivug_ListPopup_Item *item = (Ivug_ListPopup_Item *)event_info;
+
+       const char *label = (const char *)ivug_listpopup_item_get_data(item);
+
+       if(label == NULL)
+       {
+               MSG_MAIN_ERROR("label is NULL");
+               evas_object_del(obj);
+               ivug_main_view_set_hide_timer(pMainView);
+               return;
+       }
+       MSG_MAIN_HIGH("text(%s) is clicked", label);
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+       if(mdata == NULL)
+       {
+               MSG_MAIN_ERROR("sd is NULL");
+               evas_object_del(obj);
+               ivug_main_view_set_hide_timer(pMainView);
+               return;
+       }
+
+       Evas_Object *setasOjbect;
+
+       if(strncmp(label, IDS_HOME_SCREEN, strlen(label)) == 0)
+       {
+               pMainView->pSetAsView = ivug_setas_view_screen_create(pMainView->layout, mdata->filepath,
+                               IVUG_SETAS_NORMAL, IVUG_CTRLBAR_SET_SCREEN_HOME);
+               setasOjbect = ivug_setas_view_object_get(pMainView->pSetAsView);
+               evas_object_event_callback_add(setasOjbect, EVAS_CALLBACK_DEL, _on_setasview_deleted, pMainView);
+       }
+       else if(strncmp(label, IDS_LOCK_SCREEN, strlen(label)) == 0)
+       {
+               pMainView->pSetAsView = ivug_setas_view_screen_create(pMainView->layout, mdata->filepath,
+                               IVUG_SETAS_NORMAL, IVUG_CTRLBAR_SET_SCREEN_LOCK);
+               setasOjbect = ivug_setas_view_object_get(pMainView->pSetAsView);
+               evas_object_event_callback_add(setasOjbect, EVAS_CALLBACK_DEL, _on_setasview_deleted, pMainView);
+       }
+       else if(strncmp(label, IDS_HOME_AND_LOCK_SCREENS, strlen(label)) == 0)
+       {
+               pMainView->pSetAsView = ivug_setas_view_screen_create(pMainView->layout, mdata->filepath,
+                               IVUG_SETAS_NORMAL, IVUG_CTRLBAR_SET_SCREEN_BOTH);
+               setasOjbect = ivug_setas_view_object_get(pMainView->pSetAsView);
+               evas_object_event_callback_add(setasOjbect, EVAS_CALLBACK_DEL, _on_setasview_deleted, pMainView);
+       }
+       else if(strncmp(label, IDS_CALLER_IMAGE, strlen(label)) == 0)
+       {
+               pMainView->ext_ug = ivug_ext_launch_contact(mdata->filepath, _on_ext_ug_destroy_cb, data);
+       }
+
+       evas_object_del(obj);
+}
+
+static void
+_on_delete_selected(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       int response_id = (int)event_info;
+       if(response_id == POPUP_RESPONSE_CANCEL)
+       {
+               MSG_MAIN_HIGH("cancel selected");
+               ivug_main_view_set_hide_timer(pMainView);
+               return;
+       }
+
+       if(pMainView->pDetailsView)
+       {
+               MSG_MAIN_HIGH("Delete details view.");
+               _change_close_to_details(pMainView);
+               _delete_details_view(pMainView);
+       }
+
+       MSG_MAIN_HIGH("Removing current slide.");
+
+       ivug_main_view_set_hide_timer(pMainView);
+
+       _ivug_selectioninfo_create(pMainView, IDS_DELETED);
+
+       ivug_slider_delete_item(pMainView->slider);             // this routine fire "item.changed"
+}
+
+static void
+_on_rename_selected(void *data, Evas_Object *obj, void *event_info)
+{
+       int response_id = (int)event_info;
+       IV_ASSERT(data != NULL);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       MSG_MAIN_HIGH("DRM popup selected : %d", response_id);
+
+       if(response_id == POPUP_RESPONSE_CANCEL)
+       {
+               MSG_MAIN_HIGH("cancel selected");
+       }
+       else
+       {
+               MSG_MAIN_HIGH("unlock process");
+
+               Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+               Media_Data *mdata = ivug_medialist_get_data(mitem);
+
+               IV_ASSERT(mdata != NULL);
+
+               const char *old_fullpath = mdata->filepath;
+               char *old_dir = ecore_file_dir_get(old_fullpath);
+               char *ext = ivug_fileinfo_get_file_extension(old_fullpath);
+
+               Evas_Object *popup = obj;
+               Evas_Object *layout = elm_object_content_get(popup);
+               Evas_Object *entry = elm_object_part_content_get(layout, "elm.swallow.content");
+
+               const char *new_name = elm_entry_entry_get(entry);
+               char new_fullpath[IVUG_MAX_FILE_PATH_LEN] = {0,};
+               snprintf(new_fullpath, sizeof(new_fullpath),"%s/%s.%s", old_dir, new_name, ext);
+
+               if(ivug_rename_file(old_fullpath, new_fullpath) == false)
+               {
+                       MSG_MAIN_ERROR("ivug_rename_file failed");
+               }
+               else
+               {
+                       MSG_MAIN_HIGH("Rename %s -> %s", old_fullpath, new_fullpath);
+                       free(mdata->filepath);
+                       mdata->filepath = strdup(new_fullpath);
+               }
+       }
+       ivug_main_view_set_hide_timer(pMainView);
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// Button handlers
+//
+
+static void _dismissed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       //evas_object_del(obj);
+       ivug_main_view_set_hide_timer(pMainView);
+
+       if(pMainView->popup)
+       {
+               MSG_MAIN_HIGH("Removing popup 1");
+               evas_object_del(pMainView->popup);
+               pMainView->popup = NULL;
+       }
+       else
+       {
+               MSG_MAIN_HIGH("Removing popup 2");
+               evas_object_del(obj);
+       }
+
+       MSG_MAIN_HIGH("Popup dismissed");
+}
+
+#ifndef USE_DEFAULT_DOWNLOADS_FOLDER
+static bool
+_iter_album_list(media_handle media, void *user_data)
+{
+       ivug_listpopup_itemlist items = (ivug_listpopup_itemlist)user_data;
+
+       char *name = ivug_db_get_folder_name(media);
+       char *path = ivug_db_get_folder_path(media);
+
+       if(strlen(name) == 0)
+       {
+               ivug_listpopup_itemlist_add(items, 0, NULL, IDS_NO_NAME, (void *)strdup(path), false);          // TODO : Memory leak uuid.
+       }
+       else
+       {
+               ivug_listpopup_itemlist_add(items, 0, NULL, name, (void *)strdup(path), false);
+       }
+
+       if(name)
+               free(name);
+       if(path)
+               free(path);
+
+    return 0;
+}
+#endif
+
+void on_btn_back_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+// Back from main view
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       MSG_MAIN_WARN("Back key from main view pressed");
+
+       ivug_main_view_del_hide_timer(pMainView);
+
+// otherwise, from gallery, ug will be terminated
+       evas_object_smart_callback_del(obj, "clicked", on_btn_back_clicked);
+
+// Slider should be removed before mList is freed.
+       if ( pMainView->slider )
+       {
+               evas_object_del(pMainView->slider);
+               pMainView->slider = NULL;
+       }
+
+       if ( pMainView->pSetAsView )
+       {
+               MSG_MAIN_HIGH("SetAS View Destroy");
+               ivug_setas_view_destroy(pMainView->pSetAsView);
+               pMainView->pSetAsView = NULL;
+       }
+
+       if ( pMainView->pDetailsView )
+       {
+               MSG_MAIN_HIGH("Details View Destroy");
+
+               ivug_details_view_destroy(pMainView->pDetailsView);
+               pMainView->pDetailsView = NULL;
+       }
+
+#if 1
+       if(pMainView->layout)           // Remove topmost parent in main view.
+       {
+               evas_object_del(pMainView->layout);
+               pMainView->layout = NULL;
+       }
+
+       if(pMainView->empty_layout)
+       {
+               evas_object_del(pMainView->empty_layout);
+               pMainView->empty_layout = NULL;
+       }
+#else
+
+       evas_object_hide(pMainView->parent);
+
+       evas_render(evas_object_evas_get(pMainView->parent));
+
+#endif
+
+       if ( pMainView->mList )
+       {
+               MSG_MAIN_HIGH("Remove media list");
+               ivug_medialist_del(pMainView->mList);           // ivug_medialist_del() is not working on destroy cb.
+               pMainView->mList = NULL;
+       }
+
+#if 0
+       /* comment below, because t show main view and this back btn,
+          *firstly slide show view is mouse up, then ivug_ss_delete() will be invoked in taht mouse up cb
+       */
+       /* free slideshow */
+       if ( pMainView->ssHandle )
+       {
+               ivug_ss_delete(pMainView->ssHandle);
+       }
+#endif
+       DESTROY_ME();
+}
+
+void on_btn_setas_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       if(pMainView->popup)
+       {
+               MSG_MAIN_ERROR("popup already exist");
+               return;
+       }
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+
+       IV_ASSERT(mdata != NULL);
+
+       if ( mdata->filepath == NULL)
+       {
+               MSG_MAIN_ERROR("File path is NULL");
+               return;
+       }
+
+       ivug_main_view_del_hide_timer(pMainView);
+
+       Evas_Object* popup = NULL;
+       popup = ivug_listpopup_add(pMainView->layout);
+
+       evas_object_smart_callback_add(popup, "popup,dismissed", _dismissed_cb, pMainView);
+       evas_object_smart_callback_add(popup, "popup,selected", _on_setas_selected, pMainView);
+
+       if (mdata->bIsDRMContent)
+       {
+               Ivug_ListPopup_Item *it = NULL;
+
+               bool bDisableWallpaper = !ivug_drm_is_possible_to_setas(mdata->filepath, IVUG_DRM_SETAS_WALLPAPER);
+               bool bDisableCallerImage = !ivug_drm_is_possible_to_setas(mdata->filepath, IVUG_DRM_SETAS_CALLERID);
+
+               it = ivug_listpopup_item_append(popup, NULL, IDS_HOME_SCREEN, IDS_HOME_SCREEN);
+
+               if(bDisableWallpaper == true)
+               {
+                       ivug_listpopup_item_disabled_set(it);
+               }
+
+               it = ivug_listpopup_item_append(popup, NULL, IDS_LOCK_SCREEN, IDS_LOCK_SCREEN);
+
+               if(bDisableWallpaper == true)
+               {
+                       ivug_listpopup_item_disabled_set(it);
+               }
+
+               it = ivug_listpopup_item_append(popup, NULL, IDS_HOME_AND_LOCK_SCREENS, IDS_HOME_AND_LOCK_SCREENS);
+               if(bDisableWallpaper == true)
+               {
+                       ivug_listpopup_item_disabled_set(it);
+               }
+
+               it = ivug_listpopup_item_append(popup, NULL, IDS_CALLER_IMAGE, IDS_CALLER_IMAGE);
+               if(bDisableCallerImage == true)
+               {
+                       ivug_listpopup_item_disabled_set(it);
+               }
+       }
+       else
+       {
+               ivug_listpopup_item_append(popup, NULL, IDS_HOME_SCREEN, IDS_HOME_SCREEN);
+               ivug_listpopup_item_append(popup, NULL, IDS_LOCK_SCREEN, IDS_LOCK_SCREEN);
+               ivug_listpopup_item_append(popup, NULL, IDS_HOME_AND_LOCK_SCREENS, IDS_HOME_AND_LOCK_SCREENS);
+               ivug_listpopup_item_append(popup, NULL, IDS_CALLER_IMAGE, IDS_CALLER_IMAGE);
+
+       }
+
+       const Elm_Object_Item *item = pMainView->items[TOOLBUTTON_SETAS].item;
+       Evas_Object *button = elm_toolbar_item_object_get(item);
+
+       Evas_Coord x, y;
+       Evas_Coord w, h;
+       evas_object_geometry_get(button, &x, &y, &w, &h);
+       MSG_MAIN_MED("x = %d, y = %d, w = %d, h = %d", x, y, w, h);
+
+
+       ivug_listpopup_context_show(popup, pMainView->area_obj, x+w/2, y+h);
+       IVUG_FUNC_LEAVE();
+       return;
+}
+
+
+static void
+_ivug_detail_view_renamed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       if(pMainView->view_by == IVUG_VIEW_BY_FILE)
+       {
+               const char *title = (const char *)event_info;
+               elm_object_item_part_text_set(pMainView->navi_it, "elm.text.title", title);
+       }
+}
+
+void on_btn_details_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_MAIN_HIGH("ENTER : Btn detail view clicked. obj=0x%08x data=0x%08x", obj, data);
+       ivug_ret_if(!obj||!data);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       if(pMainView->pDetailsView)
+       {
+               MSG_MAIN_ERROR("details view already created");
+               return;
+       }
+       if(pMainView->bShowMenu == false)
+       {
+               MSG_MAIN_ERROR("details view is hiding now");
+               return;
+       }
+
+       ivug_main_view_del_hide_timer(pMainView);
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+       IV_ASSERT(mdata != NULL);
+
+       pMainView->pDetailsView = ivug_details_view_screen_create(pMainView->navi_bar, mdata, pMainView->view_by);
+
+       if(!pMainView->pDetailsView)
+       {
+               MSG_MAIN_ERROR("create details view failed");
+               ivug_main_view_set_hide_timer(pMainView);
+               return;
+       }
+
+       Evas_Object *detail_layout = ivug_details_view_object_get(pMainView->pDetailsView);
+
+       elm_object_item_part_content_set(pMainView->navi_it, "elm.swallow.detail", detail_layout);
+
+       evas_object_smart_callback_add(detail_layout, "renamed", _ivug_detail_view_renamed_cb, pMainView);
+
+       _change_details_to_close(pMainView);
+
+       MSG_MAIN_HIGH("LEAVE : Btn detail view clicked. obj=0x%08x data=0x%08x", obj, data);
+}
+
+
+
+void on_btn_delete_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       ivug_main_view_del_hide_timer(pMainView);
+
+       ivug_deletepopup_show(pMainView->layout, NULL, IDS_DELETE_MSG, _on_delete_selected, pMainView);
+
+       return;
+}
+
+bool _share_pkg_cb(service_h service, const char *package, void *user_data)
+{
+       Evas_Object* popup = (Evas_Object*)user_data;
+
+       char *name = NULL;
+
+       app_manager_get_app_name(package, &name);
+
+       ivug_listpopup_item_append(popup, NULL, name, (void *)strdup(package));
+
+       free(name);
+
+       return true;
+}
+
+void on_btn_share_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       if(pMainView->popup)
+       {
+               MSG_MAIN_ERROR("popup already exist");
+               return;
+       }
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+       IV_ASSERT(mdata != NULL);
+
+       if ( mdata->filepath == NULL)
+       {
+               MSG_MAIN_ERROR("File path is NULL");
+               return;
+       }
+
+       ivug_main_view_del_hide_timer(pMainView);
+
+       Evas_Object* popup = NULL;
+       popup = ivug_listpopup_add(pMainView->layout);
+
+       evas_object_smart_callback_add(popup, "popup,dismissed", _dismissed_cb, pMainView);
+       evas_object_smart_callback_add(popup, "popup,selected", _on_share_selected, pMainView);
+
+       service_h service;
+       service_create(&service);
+       service_set_operation(service, SERVICE_OPERATION_SEND);
+       service_set_uri(service, mdata->filepath);
+       service_foreach_app_matched(service, _share_pkg_cb, (void *)popup);
+
+       const Elm_Object_Item *item = pMainView->items[TOOLBUTTON_SHARE].item;
+       Evas_Object *button = elm_toolbar_item_object_get(item);
+
+       Evas_Coord x, y;
+       Evas_Coord w, h;
+       evas_object_geometry_get(button, &x, &y, &w, &h);
+       MSG_MAIN_MED("x = %d, y = %d, w = %d, h = %d", x, y, w, h);
+
+       ivug_listpopup_context_show(popup, pMainView->area_obj, x+w/2, y+h);
+}
+
+void on_btn_slideshow_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       MSG_MAIN_HIGH("Start slide show");
+
+/*
+       Just for debugging.
+*/
+#if 0
+       ivug_slider_dump_photocam(pMainView->slider);
+       return;
+
+#endif
+       if ( strcmp (elm_object_widget_type_get(obj), "toolbar") != 0 )
+       {
+               MSG_MAIN_FATAL("Not toolbar");
+               return;
+       }
+
+       Elm_Object_Item *ctrl_bar_item = (Elm_Object_Item *)event_info;
+
+       if(elm_object_item_disabled_get(ctrl_bar_item) == EINA_TRUE)
+       {
+               MSG_MAIN_WARN("Slide show already started");
+               return;
+       }
+
+       elm_object_item_disabled_set(ctrl_bar_item, EINA_TRUE);
+
+       if(pMainView->pDetailsView)
+       {
+               MSG_MAIN_HIGH("Exit details view");
+               _change_close_to_details(pMainView);
+               _delete_details_view(pMainView);
+               ivug_main_view_set_hide_timer(pMainView);       // for hide_count
+       }
+
+       ivug_main_view_start_slideshow(pMainView, EINA_TRUE);
+
+}
+
+void on_btn_details_close_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       MSG_MAIN_HIGH("ENTER : Btn detail close clicked. obj=0x%08x data=0x%08x", obj, data);
+
+       _change_close_to_details(pMainView);
+       _delete_details_view(pMainView);
+
+       ivug_main_view_set_hide_timer(pMainView);
+
+       MSG_MAIN_HIGH("LEAVE : Btn detail close clicked. obj=0x%08x data=0x%08x", obj, data);
+}
+
+/*
+       Used for only view type is select
+*/
+void on_btn_selectok_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       MSG_MAIN_HIGH("Select OK.");
+
+       service_h service;
+       service_create(&service);
+
+       service_add_extra_data(service, "Result", "Ok");
+       ug_send_result(gGetUGHandle(), service);
+
+       service_destroy(service);
+
+       DESTROY_ME();
+
+}
+/*
+       Used for only view type is select
+*/
+void on_btn_selectcancel_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       MSG_MAIN_HIGH("Select Cancel");
+
+//send result to caller
+       service_h service;
+       service_create(&service);
+
+       service_add_extra_data(service, "Result", "Cancel");
+       ug_send_result(gGetUGHandle(), service);
+
+       service_destroy(service);
+
+       DESTROY_ME();
+
+}
+
+void on_btn_rename_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+
+       IV_ASSERT(mdata != NULL);
+
+       ivug_main_view_del_hide_timer(pMainView);
+
+       char *old_fullpath = mdata->filepath;
+       const char *old_name = ecore_file_file_get(old_fullpath);
+
+       ivug_rename_popup_show(pMainView->layout, ecore_file_strip_ext(old_name), _on_rename_selected, pMainView);
+
+}
+
+static void
+_on_copy_selected(void *data, Evas_Object *obj)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       //get current file path.
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+       if (mdata == NULL)
+       {
+               MSG_MAIN_ERROR("slider data is NULL");
+               return;
+       }
+
+       char *path = NULL;
+       int len = 0;
+
+       if(mdata->slide_type == SLIDE_TYPE_VIDEO)
+       {
+               path = mdata->thumbnail_path;
+       }
+       else
+       {
+               path = mdata->filepath;
+       }
+       len = strlen(path)+1;
+
+       if (len < IVUG_MAX_FILE_PATH_LEN)
+       {
+               MSG_MAIN_HIGH("file path = %s", path);
+               elm_cnp_selection_set(pMainView->layout, ELM_SEL_TYPE_CLIPBOARD, ELM_SEL_FORMAT_IMAGE, path, len);
+               _ivug_selectioninfo_create(pMainView, IDS_COPIED_TO_CLIPBOARD);
+       }
+       else
+       {
+               MSG_MAIN_ERROR("slider file path is too long");
+               _ivug_selectioninfo_create(pMainView, IDS_FAILED);
+       }
+       evas_object_del(obj);
+}
+
+static void
+_on_crop_selected(void *data, Evas_Object *obj)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       //get current file path.
+       Media_Item *WMitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(WMitem);
+
+       if (mdata == NULL)
+       {
+               MSG_MAIN_ERROR("slider data is NULL");
+               return;
+       }
+
+       MSG_MAIN_HIGH("Create Crop view");
+
+       IvugCropView *pCropView = ivug_crop_view_create(pMainView->layout);
+
+       ivug_crop_view_file_set(pCropView, mdata->filepath);
+
+       evas_object_del(obj);           // Remove ctx popup
+}
+
+static void _on_tool_selected(void *data, Evas_Object *obj, void *event_info)
+{
+// obj is ctxpopup!.
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       Ivug_ListPopup_Item *item = (Ivug_ListPopup_Item *)event_info;
+
+       const char *label = (const char *)ivug_listpopup_item_get_data(item);
+       if(label == NULL)
+       {
+               ivug_main_view_set_hide_timer(pMainView);
+               return;
+       }
+
+       MSG_MAIN_HIGH("text(%s) is clicked", label);
+
+       if(strncmp(label, IDS_COPY_TO_CLIPBOARD, strlen(label)) == 0)
+       {
+               _on_copy_selected(data, obj);
+               ivug_main_view_set_hide_timer(pMainView);
+       }
+       else if(strncmp(label, IDS_CROP, strlen(label)) == 0)
+       {
+               _on_crop_selected(data, obj);
+       }
+}
+
+void on_btn_tool_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+
+       IV_ASSERT(mdata != NULL);
+
+       ivug_main_view_del_hide_timer(pMainView);
+
+       Evas_Object* popup = NULL;
+       popup = ivug_listpopup_add(pMainView->area_obj);
+
+       evas_object_smart_callback_add(popup, "popup,dismissed", _dismissed_cb, pMainView);
+       evas_object_smart_callback_add(popup, "popup,selected", _on_tool_selected, pMainView);
+
+       if(mdata->slide_type == SLIDE_TYPE_IMAGE)
+       {
+               ivug_listpopup_item_append(popup, ICON_PATH_CROP, IDS_CROP, IDS_CROP);
+       }
+
+       const Elm_Object_Item *item = pMainView->items[TOOLBUTTON_TOOL].item;
+       Evas_Object *button = elm_toolbar_item_object_get(item);
+
+       Evas_Coord x, y;
+       Evas_Coord w, h;
+       evas_object_geometry_get(button, &x, &y, &w, &h);
+       MSG_MAIN_MED("x = %d, y = %d, w = %d, h = %d", x, y, w, h);
+
+       ivug_listpopup_context_show(popup, pMainView->area_obj, x+w/2, y+h);
+
+}
+
diff --git a/main/src/view/ivug-main-view-menu.h b/main/src/view/ivug-main-view-menu.h
new file mode 100755 (executable)
index 0000000..2842481
--- /dev/null
@@ -0,0 +1,50 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_MAINVIEW_MENU_H__
+#define __IVUG_MAINVIEW_MENU_H__
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+       Button handlers for main view
+*/
+
+void on_btn_selectcancel_clicked(void *data, Evas_Object *obj, void *event_info);
+void on_btn_selectok_clicked(void *data, Evas_Object *obj, void *event_info);
+void on_btn_slideshow_clicked(void *data, Evas_Object *obj, void *event_info);
+void on_btn_share_clicked(void *data, Evas_Object *obj, void *event_info);
+void on_btn_delete_clicked(void *data, Evas_Object *obj, void *event_info);
+void on_btn_details_clicked(void *data, Evas_Object *obj, void *event_info);
+void on_btn_setas_clicked(void *data, Evas_Object *obj, void *event_info);
+void on_btn_back_clicked(void *data, Evas_Object *obj, void *event_info);
+void on_btn_details_close_clicked(void *data, Evas_Object *obj, void *event_info);
+
+void on_btn_rename_clicked(void *data, Evas_Object *obj, void *event_info);
+void on_btn_tool_clicked(void *data, Evas_Object *obj, void *event_info);
+
+void _ivug_selectioninfo_create(Ivug_MainView *pMainView, const char *string);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif                 // __IVUG_MAINVIEW_MENU_H__
+
diff --git a/main/src/view/ivug-main-view-toolbar.cpp b/main/src/view/ivug-main-view-toolbar.cpp
new file mode 100755 (executable)
index 0000000..0cdaaa8
--- /dev/null
@@ -0,0 +1,478 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-common.h"
+#include "ivug-main-view.h"
+#include "ivug-main-view-menu.h"
+
+#include "ivug-slider.h"
+
+#define CONTROL_ICON_DIRECTORY_PATH    IMAGE_PATH"/01_Control icon"
+
+#define ICON_PATH_DELETE               CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_delete.png"
+#define ICON_PATH_SHARE                CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_share.png"
+#define ICON_PATH_SETAS                CONTROL_ICON_DIRECTORY_PATH"/T01_1_title_icon_set_as.png"
+#define ICON_PATH_SLIDESHOW    CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_slideshow.png"
+#define ICON_PATH_INFO                 CONTROL_ICON_DIRECTORY_PATH"/T01_1_controlbar_icon_detail.png"
+#define ICON_PATH_SAVE                 CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_save.png"
+#define ICON_PATH_CLOSE                        CONTROL_ICON_DIRECTORY_PATH"/01_controllbar_icon_close.png"
+#define ICON_PATH_MORE                 CONTROL_ICON_DIRECTORY_PATH"/T01_Title_icon_more.png"
+
+static void _toolbar_item_append(ControlBar_Item * /*INOUT*/item, Evas_Object *parent, const char *iconpath, const char *caption, Evas_Smart_Cb fnClick, void *data)
+{
+       item->item = elm_toolbar_item_append(parent, iconpath, NULL, fnClick, data);
+
+       item->pos = TOOLBUTTON_IN_TOOLBAR;
+}
+
+static void _ctrlbar_item_append(ControlBar_Item * /*INOUT*/item, Evas_Object *parent, const char *iconpath, const char *caption, Evas_Smart_Cb fnClick, void *data)
+{
+       item->item = elm_toolbar_item_append(parent, iconpath, NULL, fnClick, data);
+
+       item->pos = TOOLBUTTON_IN_CTRLBAR;
+}
+
+static void _toolbutton_set_disabled(ControlBar_Item * /*INOUT*/item)
+{
+       if ( item->item == NULL )
+               return;
+
+       /*if(item->pos == TOOLBUTTON_IN_TOOLBAR)
+       {
+               Evas_Object *button = elm_object_item_part_content_get(item->item, "object");
+               elm_object_disabled_set(button, EINA_TRUE);
+       }
+       else*/
+       {
+               elm_object_item_disabled_set(item->item, EINA_TRUE);
+       }
+}
+
+static void _toolbutton_set_enabled(ControlBar_Item * /*INOUT*/item)
+{
+       if ( item->item == NULL )
+               return;
+
+       /*if(item->pos == TOOLBUTTON_IN_TOOLBAR)
+       {
+               Evas_Object *button = elm_object_item_part_content_get(item->item, "object");
+               elm_object_disabled_set(button, EINA_FALSE);
+       }
+       else*/
+       {
+               elm_object_item_disabled_set(item->item, EINA_FALSE);
+       }
+}
+
+
+ivug_toolbar
+_get_tool_bar_type(ivug_mode mode, Media_Type slide_type )
+{
+       ivug_toolbar tool_bar_type = NAVI_BAR_TYPE_NONE;
+
+       //calc navi bar style , temporary code.
+       static  const char *szType[] = {
+               "[ INVALID  ]",
+               "[          ]",
+               "[Set,  Info]",
+               "[Ok, Cancel]",
+       };
+
+
+       switch (mode)
+       {
+               case IVUG_MODE_NORMAL:
+               case IVUG_MODE_CAMERA:
+               case IVUG_MODE_SLIDESHOW:
+                       tool_bar_type = NAVI_BAR_TYPE_EMPTY;
+                       if (slide_type == SLIDE_TYPE_IMAGE)
+                       {
+                               tool_bar_type = NAVI_BAR_TYPE_IMAGE;
+                       }
+                       else if (slide_type == SLIDE_TYPE_VIDEO)
+                       {
+                               tool_bar_type = NAVI_BAR_TYPE_VIDEO;
+                       }
+                       else if (slide_type == SLIDE_TYPE_STREAMING)
+                       {
+                               tool_bar_type = NAVI_BAR_TYPE_EMPTY;
+                       }
+                       else
+                       {
+                               tool_bar_type = NAVI_BAR_TYPE_EMPTY;
+                       }
+               break;
+               case IVUG_MODE_SINGLE:
+               case IVUG_MODE_FILE:
+                       tool_bar_type = NAVI_BAR_TYPE_FILE;
+
+               break;
+               case IVUG_MODE_DISPLAY:
+                       tool_bar_type = NAVI_BAR_TYPE_SELECT;
+
+               break;
+               default:
+                       MSG_MAIN_ERROR("Unhandled mode : %d", mode);
+                       tool_bar_type = NAVI_BAR_TYPE_EMPTY;
+
+                       break;
+       }
+
+       MSG_MAIN_MED("Mode=%d Slide=%d ToolBar=%s", mode, slide_type, szType[tool_bar_type]);
+
+       return tool_bar_type;
+}
+
+
+ivug_ctrlbar
+_get_ctrl_bar_type(ivug_mode mode, Media_Type slide_type)
+{
+       // this is temporary code.
+       ivug_ctrlbar type = CTRL_BAR_TYPE_FILE;
+
+       static const char *szType[] = {
+               "[ Invalid ]",
+               "[ None ]",
+               "[Delete,Share,Set,Info]",
+               "[Share, Set, Save, Info]",
+               "[Delete,Share, Slide show]",
+       };
+
+       switch (mode)
+       {
+               case IVUG_MODE_NORMAL:
+               case IVUG_MODE_CAMERA:
+               case IVUG_MODE_SLIDESHOW:
+                       if (slide_type == SLIDE_TYPE_IMAGE)
+                       {
+                               type = CTRL_BAR_TYPE_IMAGE;
+                       }
+                       else if (slide_type == SLIDE_TYPE_VIDEO)
+                       {
+                               type = CTRL_BAR_TYPE_VIDEO;
+                       }
+                       else if (slide_type == SLIDE_TYPE_UNKNOWN)
+                       {
+                               type = CTRL_BAR_TYPE_IMAGE;
+                       }
+                       else
+                       {
+                               MSG_MAIN_ERROR("Unhandled slide type : %d", slide_type);
+                               type = CTRL_BAR_TYPE_FILE;
+                       }
+               break;
+               case IVUG_MODE_SINGLE:
+               case IVUG_MODE_FILE:
+                       type = CTRL_BAR_TYPE_FILE;
+               break;
+               case IVUG_MODE_DISPLAY:
+                       type = CTRL_BAR_TYPE_EMPTY;
+               break;
+               case IVUG_MODE_SETAS:
+                       type = CTRL_BAR_TYPE_EMPTY;
+               break;
+               default:
+                       MSG_MAIN_ERROR("Unhandled mode : %d", mode);
+                       type = CTRL_BAR_TYPE_FILE;
+       }
+
+       MSG_MAIN_MED("Mode=%d Slide=%d CtrlBar=%s", mode, slide_type, szType[type]);
+
+       return type;
+
+}
+
+
+
+
+Evas_Object *_create_ctrl_bar(Evas_Object *parent)
+{
+       Evas_Object *toolbar = elm_toolbar_add(parent);
+
+//create control bar
+       if (toolbar == NULL)
+       {
+               MSG_MAIN_ERROR("controlbar create failed");
+               return NULL;
+       }
+
+       elm_object_style_set(toolbar, "default");
+       elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_EXPAND);
+
+       //elm_toolbar_homogeneous_set(toolbar, EINA_FALSE);
+
+       MSG_MAIN_HIGH("Create ctrl_bar. Obj=0x%08x", toolbar);
+
+       return toolbar;
+
+}
+
+Evas_Object *_create_tool_bar(Evas_Object *parent)
+{
+       Evas_Object *toolbar;
+
+       toolbar = ivug_controlbar_add(parent, "naviframe");
+
+       MSG_MAIN_HIGH("Create tool_bar. Obj=0x%08x", toolbar);
+
+       return toolbar;
+}
+
+
+
+void _update_tool_bar(Ivug_MainView *pMainView, ivug_toolbar barType)
+{
+
+/*
+   |------------------|
+   |elm_navigation_bar|
+   |------------------|
+   |  tool_bar           |
+   |------------------|
+   |                             |
+   |                             |
+   |                             |
+   |                             |
+   |------------------|
+   |   ctrl_bar          |
+   |------------------|
+*/
+       Evas_Object *tool_bar = pMainView->tool_bar;
+
+       MSG_MAIN_HIGH("Update tool_bar. Type=%d", barType);
+
+//remove old control bar item.
+       int i = 0;
+
+       for ( i = 0; i< TOOLBUTTON_MAX ; i++)
+       {
+               if ( pMainView->items[i].pos == TOOLBUTTON_IN_TOOLBAR )
+               {
+                       elm_object_item_del(pMainView->items[i].item);
+                       pMainView->items[i].item = NULL;
+                       pMainView->items[i].pos = TOOLBUTTON_IN_NONE;
+               }
+       }
+
+       switch(barType)
+       {
+       case NAVI_BAR_TYPE_IMAGE:
+               _toolbar_item_append(&pMainView->items[TOOLBUTTON_SHARE], tool_bar, ICON_PATH_SHARE, NULL, on_btn_share_clicked, pMainView);
+               _toolbar_item_append(&pMainView->items[TOOLBUTTON_SETAS], tool_bar, ICON_PATH_SETAS, NULL, on_btn_setas_clicked, pMainView);
+               _toolbar_item_append(&pMainView->items[TOOLBUTTON_TOOL], tool_bar, ICON_PATH_MORE, NULL, on_btn_tool_clicked, pMainView);
+
+               break;
+       case NAVI_BAR_TYPE_VIDEO:
+               _toolbar_item_append(&pMainView->items[TOOLBUTTON_SHARE], tool_bar, ICON_PATH_SHARE, NULL, on_btn_share_clicked, pMainView);
+               _toolbar_item_append(&pMainView->items[TOOLBUTTON_TOOL], tool_bar, ICON_PATH_MORE, NULL, on_btn_tool_clicked, pMainView);
+
+               break;
+       case NAVI_BAR_TYPE_FILE:
+               _toolbar_item_append(&pMainView->items[TOOLBUTTON_SHARE], tool_bar, ICON_PATH_SHARE, NULL, on_btn_share_clicked, pMainView);
+               _toolbar_item_append(&pMainView->items[TOOLBUTTON_SETAS], tool_bar, ICON_PATH_SETAS, NULL, on_btn_setas_clicked, pMainView);
+               _toolbar_item_append(&pMainView->items[TOOLBUTTON_TOOL], tool_bar, ICON_PATH_MORE, NULL, on_btn_tool_clicked, pMainView);
+
+               break;
+       case NAVI_BAR_TYPE_SELECT:
+               _toolbar_item_append(&pMainView->items[TOOLBUTTON_OK], tool_bar, ICON_PATH_SAVE, NULL, on_btn_selectok_clicked, pMainView);
+               _toolbar_item_append(&pMainView->items[TOOLBUTTON_CANCEL], tool_bar, ICON_PATH_CLOSE, NULL, on_btn_selectcancel_clicked, pMainView);
+
+               break;
+       default:
+               MSG_MAIN_ERROR("Unhandled... %d", barType);
+               break;
+
+       }
+
+}
+
+
+void _update_ctrl_bar(Ivug_MainView *pMainView, ivug_ctrlbar barType)
+{
+       Evas_Object *ctrl_bar = pMainView->ctrl_bar;
+
+       MSG_MAIN_HIGH("Update ctrl_bar. barType=%d", barType);
+
+//remove old control bar item.
+       int i = 0;
+
+       for ( i = 0; i< TOOLBUTTON_MAX ; i++)
+       {
+               if ( pMainView->items[i].pos == TOOLBUTTON_IN_CTRLBAR )
+               {
+                       elm_object_item_del(pMainView->items[i].item);
+                       pMainView->items[i].item = NULL;
+                       pMainView->items[i].pos = TOOLBUTTON_IN_NONE;
+               }
+       }
+
+/*
+       IVUG_MODE_NORMAL =>
+               Depends on content
+                       Image [Delete,Share, Slide show]  -> CTRL_BAR_TYPE_IMAGE
+                       Video [Delete,Share, Slide show]  -> CTRL_BAR_TYPE_VIDEO
+
+       IVUG_MODE_SINGLE, IVUG_MODE_FILE,  => CTRL_BAR_TYPE_FILE [Delete,Share,Set,Info]
+       IVUG_MODE_DISPLAY => CTRL_BAR_TYPE_EMPTY
+
+       if ((mode == IVUG_MODE_FILE) || (mode == IVUG_MODE_SINGLE))
+               barType == CTRL_BAR_TYPE_FILE
+
+*/
+       switch(barType)
+       {
+       case CTRL_BAR_TYPE_FILE:
+               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_DELETE], ctrl_bar, ICON_PATH_DELETE, NULL, on_btn_delete_clicked, pMainView);
+               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_DETAILS], ctrl_bar, ICON_PATH_INFO, NULL, on_btn_details_clicked, pMainView);
+               break;
+
+       case CTRL_BAR_TYPE_IMAGE:
+               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_DELETE], ctrl_bar, ICON_PATH_DELETE, NULL, on_btn_delete_clicked, pMainView);
+               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_SLIDESHOW], ctrl_bar, ICON_PATH_SLIDESHOW, NULL, on_btn_slideshow_clicked, pMainView);
+               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_DETAILS], ctrl_bar, ICON_PATH_INFO, NULL, on_btn_details_clicked, pMainView);
+               break;
+
+       case CTRL_BAR_TYPE_VIDEO:
+               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_DELETE], ctrl_bar, ICON_PATH_DELETE, NULL, on_btn_delete_clicked, pMainView);
+               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_SLIDESHOW], ctrl_bar, ICON_PATH_SLIDESHOW, NULL, on_btn_slideshow_clicked, pMainView);
+               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_DETAILS], ctrl_bar, ICON_PATH_INFO, NULL, on_btn_details_clicked, pMainView);
+               break;
+
+       default:
+               MSG_MAIN_ERROR("Unhandled ctrl bar type=%d", barType);
+               break;
+       }
+
+//     ivug_main_view_on_rotate( pMainView, gGetRotationDegree());     // TODO
+}
+
+
+void _update_toolbuttons(Ivug_MainView *pMainView)
+{
+// If Inavalid image, disable all buttons.
+       slide_state_t state = ivug_slider_get_state(pMainView->slider);
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+
+       _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_NULL]);
+
+       if ( state == SLIDE_STATE_ERROR)
+       {
+               _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_SETAS]);
+               _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_TOOL]);
+
+               return ;
+       }
+
+// Enable all button
+       int i = 0;
+       for ( i = 0; i< TOOLBUTTON_MAX ; i++)
+       {
+               _toolbutton_set_enabled(&pMainView->items[i]);
+       }
+
+// If Video, DRM, disable SetAs button
+// If Video when CTRL_BAR_TYPE_FILE, disable Set
+
+       if (mdata->slide_type == SLIDE_TYPE_STREAMING)
+       {
+               _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_SHARE]);
+               _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_SETAS]);
+       }
+       // If uneditable video, disable Editor
+       else if (mdata->slide_type == SLIDE_TYPE_VIDEO)
+       {
+               _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_TOOL]);
+       }
+
+       if(mdata->bIsDRMContent == EINA_TRUE)
+       {
+               _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_TOOL]);
+               if(ivug_drm_is_possible_to_setas(mdata->filepath, IVUG_DRM_SETAS_WALLPAPER) == false &&
+                          ivug_drm_is_possible_to_setas(mdata->filepath, IVUG_DRM_SETAS_CALLERID) == false)
+               {
+                       _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_SETAS]);
+               }
+               if(ivug_drm_get_forwarding_info(mdata->filepath) == false)
+               {
+                       _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_SHARE]);
+               }
+       }
+}
+
+void _change_details_to_close(Ivug_MainView *pMainView)
+{
+       IV_ASSERT(pMainView != NULL);
+
+       Evas_Object *btn;
+
+// Change "details" to "close"
+       if ( pMainView->items[TOOLBUTTON_DETAILS].pos == TOOLBUTTON_IN_CTRLBAR )        // If detail button is in ctrl_bar
+       {
+               // Remove details item & Add close item
+               btn = elm_object_item_part_content_unset(pMainView->items[TOOLBUTTON_DETAILS].item, "object");
+               evas_object_del(btn);
+
+               elm_object_item_del(pMainView->items[TOOLBUTTON_DETAILS].item);
+               pMainView->items[TOOLBUTTON_DETAILS].item = NULL;
+
+               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_DETAILS], pMainView->ctrl_bar, ICON_PATH_CLOSE, NULL, on_btn_details_close_clicked, pMainView);
+       }
+       else
+       {
+               // Remove details item & Add close item
+               btn = elm_object_item_part_content_unset(pMainView->items[TOOLBUTTON_DETAILS].item, "object");
+               evas_object_del(btn);
+
+               elm_object_item_del(pMainView->items[TOOLBUTTON_DETAILS].item);
+               pMainView->items[TOOLBUTTON_DETAILS].item = NULL;
+
+               _toolbar_item_append(&pMainView->items[TOOLBUTTON_DETAILS], pMainView->tool_bar, ICON_PATH_CLOSE, NULL, on_btn_details_close_clicked, pMainView);
+       }
+
+}
+
+void _change_close_to_details(Ivug_MainView *pMainView)
+{
+       IV_ASSERT(pMainView != NULL);
+
+       Evas_Object *btn;
+
+       if ( pMainView->items[TOOLBUTTON_DETAILS].pos == TOOLBUTTON_IN_CTRLBAR )        // If detail button is in ctrl_bar
+       {
+               // Remove details item & Add close item
+               btn = elm_object_item_part_content_unset(pMainView->items[TOOLBUTTON_DETAILS].item, "object");
+               evas_object_del(btn);
+
+               elm_object_item_del(pMainView->items[TOOLBUTTON_DETAILS].item);
+               pMainView->items[TOOLBUTTON_DETAILS].item = NULL;
+
+               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_DETAILS], pMainView->ctrl_bar, ICON_PATH_INFO, NULL, on_btn_details_clicked, pMainView);
+       }
+       else
+       {
+               // Remove details item & Add close item
+               btn = elm_object_item_part_content_unset(pMainView->items[TOOLBUTTON_DETAILS].item, "object");
+               evas_object_del(btn);
+
+               elm_object_item_del(pMainView->items[TOOLBUTTON_DETAILS].item);
+               pMainView->items[TOOLBUTTON_DETAILS].item = NULL;
+
+               _toolbar_item_append(&pMainView->items[TOOLBUTTON_DETAILS], pMainView->tool_bar, ICON_PATH_INFO, NULL, on_btn_details_clicked, pMainView);
+       }
+}
+
diff --git a/main/src/view/ivug-main-view-toolbar.h b/main/src/view/ivug-main-view-toolbar.h
new file mode 100755 (executable)
index 0000000..080a5e0
--- /dev/null
@@ -0,0 +1,43 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_MAIN_VIEW_TOOLBAR_H__
+#define __IVUG_MAIN_VIEW_TOOLBAR_H__
+
+
+/*
+       Get ctrl/tool bar type from slide type.
+*/
+ivug_ctrlbar _get_ctrl_bar_type(ivug_mode mode, Media_Type slide_type);
+ivug_toolbar _get_tool_bar_type(ivug_mode mode, Media_Type slide_type );
+
+Evas_Object *_create_ctrl_bar(Evas_Object *parent);
+Evas_Object *_create_tool_bar(Evas_Object *parent);
+
+
+void _update_ctrl_bar(Ivug_MainView *pMainView, ivug_ctrlbar barType);
+void _update_tool_bar(Ivug_MainView *pMainView, ivug_toolbar barType);
+
+/*
+       Enable / Disable buttons on tool bar
+*/
+void _update_toolbuttons(Ivug_MainView *pMainView);
+
+
+void _change_close_to_details(Ivug_MainView *pMainView);
+void _change_details_to_close(Ivug_MainView *pMainView);
+
+#endif // __IVUG_MAIN_VIEW_TOOLBAR_H__
diff --git a/main/src/view/ivug-main-view.cpp b/main/src/view/ivug-main-view.cpp
new file mode 100755 (executable)
index 0000000..3f258e0
--- /dev/null
@@ -0,0 +1,1775 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include <ui-gadget-module.h>          // ug_destroy_me, ug_send_result
+#include <vconf.h>
+#include <vconf-keys.h>
+#include <utilX.h>                     // Key event
+
+#include "ivug-common.h"
+#include "ivug-parameter.h"
+
+#include "ivug-main-view.h"
+#include "ivug-main-view-toolbar.h"
+#include "ivug-main-view-menu.h"
+
+#include "ivug-filter.h"
+
+#include "ivug-ext-ug.h"
+
+#include "ivug-util.h"
+#include "ivug-medialist.h"
+#include "ivug-media.h"
+
+#include "ivug-popup.h"
+#include "ivug-selectioninfo.h"
+
+#include "ivug-slider-item.h"
+#include "ivug-slider.h"
+
+#include "ivug-setas-view.h"
+#include "ivug-name-view.h"
+#include "ivug-details-view.h"
+
+#include "ivug-listpopup.h"
+#include "ivug-slideshow.h"
+
+#include "ivug-ext-ug.h"
+
+#include "ivug-drm.h"
+#include "EFLUtil.h"
+
+#include "ivug-image.h"
+
+#undef HIDE_INDICATOR          // For testing.
+#define TEST_MOUSE_EVENT
+
+#define DEFAULT_THUMBNAIL_PATH                 IMAGE_PATH"/T01_Nocontents_broken.png"
+
+#define LONGTAP_TIMEOUT        (2.0) // 2secs
+
+// EDJE
+#define IVUG_MAIN_EDJ  EDJ_PATH"/ivug-main.edj"
+///////////////////////////////////////////////////////////////////////////////////////////////////
+//
+//
+static bool _destory_slideshow_and_ug(Ivug_MainView *pMainView, int state, bool bMmc_out);
+static void _on_slideshow_finished(void *data, Evas_Object *obj, void *event_info);
+
+
+static void
+_send_result_footsteps(ui_gadget_h ug)
+{
+//result bundle key
+#define IVUG_RESULT_BUNDLE_KEY_EXIT "EXIT"
+
+//result bundle value
+#define IVUG_RESULT_BUNDLE_VALUE_NORMAL                        "NORMAL"
+
+       ivug_ret_if(!ug);
+
+       service_h service;
+       service_create(&service);
+
+       service_add_extra_data(service, IVUG_RESULT_BUNDLE_KEY_EXIT, IVUG_RESULT_BUNDLE_VALUE_NORMAL);
+       ug_send_result(gGetUGHandle(), service);
+
+       service_destroy(service);
+}
+
+static void _update_title(Ivug_MainView *pMainView)
+{
+#define MAX_TITLE_LEN  256
+
+       static char title[MAX_TITLE_LEN];
+       static char subtitle[MAX_TITLE_LEN];
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+
+
+       if (mdata == NULL)
+       {
+               MSG_MAIN_ERROR("slider data is NULL");
+               return;
+       }
+
+       if (pMainView->view_by == IVUG_VIEW_BY_FOLDER || pMainView->view_by == IVUG_VIEW_BY_ALL)
+       {
+               snprintf(title, sizeof(title), "%s", pMainView->album_name);
+               snprintf(subtitle, sizeof(subtitle), "%d/%d",
+                       mdata->index + 1,
+                       ivug_medialist_get_count(pMainView->mList));    //get title.
+
+               elm_object_item_part_text_set(pMainView->navi_it, "subtitle", subtitle);
+       }
+       else if(mdata->filepath != NULL)
+       {
+               const char* filename = ivug_get_filename(mdata->filepath);
+               if(filename)
+               {
+                       snprintf(title, sizeof(title), "%s", filename);
+               }
+       }
+
+       IV_ASSERT(pMainView->navi_bar != NULL);
+
+       MSG_MAIN_HIGH("Update title : %s", title);
+
+       elm_object_item_text_set(pMainView->navi_it, title);
+
+}
+
+static bool _is_mmc_inserted(void)
+{
+       int noti_message;
+       int ret = -1;
+
+       ret = vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &noti_message);
+
+       if ( ret != 0 ) // falied
+       {
+               MSG_NOTI_ERROR("Get %s is failed", VCONFKEY_SYSMAN_MMC_STATUS);
+               return false;
+       }
+
+       if(noti_message==VCONFKEY_SYSMAN_MMC_MOUNTED)
+       {
+               return true;
+       }
+
+       return false;
+
+}
+
+
+static void
+_on_longpress_popup_selected(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+// Destroy copy popup
+       pMainView->longpress_popup = NULL;              // object is removed automatically
+
+       int response = (int)event_info;
+
+       Media_Item *mtiem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mtiem);
+       if (mdata == NULL)
+       {
+               MSG_MAIN_ERROR("slider data is NULL");
+               return;
+       }
+
+       if(response == LPPOPUP_RESPONSE_COPY)
+       {
+               //get current file path.
+
+               char *path = NULL;
+               int len = 0;
+               // This Will add to the article
+               char buf[IVUG_MAX_FILE_PATH_LEN] = {0,};
+
+               if(mdata->slide_type == SLIDE_TYPE_STREAMING)
+               {
+                       path = mdata->fileurl;
+                       len = strlen(mdata->fileurl)+1;
+                       strncpy(buf, mdata->fileurl, IVUG_MAX_FILE_PATH_LEN);
+               }
+               else
+               {
+                       path = mdata->filepath;
+                       len = strlen(mdata->filepath)+strlen("file://")+1;
+                       snprintf(buf, IVUG_MAX_FILE_PATH_LEN, "file://%s", mdata->filepath);
+               }
+
+               if (len < IVUG_MAX_FILE_PATH_LEN)
+               {
+                       MSG_MAIN_HIGH("file path = %s, file url =%s", path, buf);
+                       elm_cnp_selection_set(pMainView->layout, ELM_SEL_TYPE_CLIPBOARD, ELM_SEL_FORMAT_IMAGE, buf, sizeof(buf));
+                       _ivug_selectioninfo_create(pMainView, IDS_COPIED_TO_CLIPBOARD);
+               }
+               else
+               {
+                       MSG_MAIN_ERROR("slider file path is too long");
+               }
+       }
+}
+
+static Eina_Bool _on_key_down(void *user_data, int type, void *event)
+{
+       if (!user_data) {
+               MSG_IMAGEVIEW_ERROR("user data is NULL");
+               return ECORE_CALLBACK_PASS_ON;
+       }
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)user_data;
+
+       Ecore_Event_Key *key_event = (Ecore_Event_Key *) event;
+
+       if (!strcmp(key_event->keyname, KEY_END))
+       {
+               MSG_IMAGEVIEW_HIGH("Bakc(End) key");
+       }
+       else if (!strcmp(key_event->keyname, KEY_SELECT))
+       {
+               MSG_IMAGEVIEW_HIGH("Home key");
+       }
+       else if (!strcmp(key_event->keyname, KEY_POWER))
+       {
+               MSG_IMAGEVIEW_HIGH("Power key");
+               if ( pMainView->ssHandle )
+               {
+                       ivug_ss_stop(pMainView->ssHandle);
+               }
+       }
+
+       MSG_IMAGEVIEW_LOW("Key down : %s", key_event->keyname);
+
+       return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool _on_exit_timer_expired(void *data)
+{
+       ivug_retv_if(!data, ECORE_CALLBACK_CANCEL);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       pMainView->exit_timer = NULL;
+
+       DESTROY_ME();
+
+       return ECORE_CALLBACK_CANCEL;
+}
+
+static void _on_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = static_cast<Ivug_MainView *>(data);
+       IV_ASSERT(pMainView != NULL);
+
+       Evas_Coord x,y,w,h;
+       evas_object_geometry_get(obj, &x, &y, &w, &h);
+       /**
+       *  during slideshow, after rotation, resize cb of slideshow obj cannot be invoked,
+           so invoke it manually
+       */
+       if(pMainView->ssHandle)
+               ivug_ss_resize(pMainView->ssHandle);
+       MSG_MAIN_HIGH("MainView resized geomtery XYWH(%d,%d,%d,%d) Rotate=%d", x, y, w, h, gGetRotationDegree());
+}
+
+static void
+_on_popup_response(void *data, Evas_Object *obj, void *event_info)\r
+{
+       IV_ASSERT(data != NULL);
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       ivug_main_view_set_hide_timer(pMainView);
+}
+
+static bool _destory_slideshow_and_ug(Ivug_MainView *pMainView,
+       int state,
+       bool bMmc_out)
+{
+       IV_ASSERT(pMainView != NULL);
+       evas_object_smart_callback_del_full(ivug_ss_object_get(pMainView->ssHandle),
+               "slideshow,finished", _on_slideshow_finished, pMainView);
+
+       ivug_allow_lcd_off();
+       /*from gallery ablum*/
+       if(pMainView->mode == IVUG_MODE_SLIDESHOW || bMmc_out)
+       {
+               MSG_MAIN_HIGH("image viewer end cause slide show ended");
+               DESTROY_ME();
+               return true;
+       }
+       if(state == SLIDE_SHOW_STOPPED)
+       {
+               if(pMainView->bFootSteps == true)       // does not exit when View By is by Place
+               {
+                       MSG_MAIN_HIGH("image viewer end cause footsteps slide show ended");
+                       _send_result_footsteps(gGetUGHandle());
+                       DESTROY_ME();
+                       return true;
+               }
+       }
+       return false;
+}
+
+
+static void _on_mmc_state_changed(keynode_t* node, void *data)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       if (NULL == pMainView) {
+               return;
+       }
+
+       if(_is_mmc_inserted() == false  )
+       {
+               MSG_IMAGEVIEW_WARN("MMC Removed!. Request destroy UG=0x%08x", gGetUGHandle());
+
+               if ( pMainView->ext_ug )
+               {
+                       MSG_IMAGEVIEW_HIGH("Extern UG is running");
+               }
+
+               if(pMainView->ssHandle)
+               {
+                       ivug_1btn_popup_show(ivug_ss_object_get(pMainView->ssHandle), IDS_ERROR, IDS_SD_CARD_REMOVED, _on_popup_response, pMainView);\r
+                       pMainView->ssHandle->state = SLIDE_SHOW_STOPPED;
+                       _destory_slideshow_and_ug(pMainView, pMainView->ssHandle->state, true);
+               } else {
+                       ivug_1btn_popup_show(pMainView->layout, IDS_ERROR, IDS_SD_CARD_REMOVED, _on_popup_response, pMainView);\r
+                       pMainView->exit_timer = ecore_timer_add(0.2, _on_exit_timer_expired, data);
+               }
+       }
+}
+
+static void _show_zoom_icon(void *data)
+{
+       ivug_ret_if(!data);
+
+       MSG_MAIN_ERROR("_show_zoom_icon");
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       /*unsigned int zoom_level = ivug_slider_zoom_level_get(pMainView->slider);\r
+       if(zoom_level == 0)
+       {
+               edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,btn_zoom_out,disable","elm");
+               edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,btn_zoom_in,enable","elm");
+       }
+       else if(zoom_level == ZOOM_LEVEL_MAX)
+       {
+               edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,btn_zoom_in,disable","elm");
+               edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,btn_zoom_out,enable","elm");
+       }
+       else*/\r
+       {
+               edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,btn_zoom_out,enable","elm");
+               edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,btn_zoom_in,enable","elm");
+       }\r
+\r
+       edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,zoom_slider,show","elm");\r
+}
+
+static void _update_main_view(Ivug_MainView *pMainView)
+{
+       if (NULL == pMainView) {
+               return;
+       }
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+
+       if(mdata == NULL)
+       {
+               MSG_MAIN_ERROR("mdata is NULL");
+               return;
+       }
+
+       PERF_CHECK_BEGIN(LVL6, "Set menu title");
+
+       _update_title(pMainView);
+
+       PERF_CHECK_END(LVL6, "Set menu title");
+
+       ivug_ctrlbar ctrlBarType;
+       ivug_toolbar toolBarType;
+
+       ctrlBarType = _get_ctrl_bar_type(pMainView->mode, mdata->slide_type);
+       toolBarType = _get_tool_bar_type(pMainView->mode, mdata->slide_type);
+
+       if ( toolBarType != pMainView->tool_bar_type )          // when change toolbar Type
+       {
+               PERF_CHECK_BEGIN(LVL6, "add toolbar item");
+
+               MSG_MAIN_HIGH("ToolBar update. Old=%d Cur=%d", toolBarType , pMainView->tool_bar_type);
+
+               if ( toolBarType == NAVI_BAR_TYPE_EMPTY )
+               {
+                       elm_object_item_part_content_unset(pMainView->navi_it, "optionheader");         // Unset toolbar
+               }
+               else
+               {
+                       elm_object_item_part_content_set(pMainView->navi_it, "optionheader", pMainView->tool_bar);
+
+                       _update_tool_bar(pMainView, toolBarType);
+               }
+
+               pMainView->tool_bar_type = toolBarType;
+
+               PERF_CHECK_END(LVL6, "add toolbar item");
+       }
+
+       if ( ctrlBarType != pMainView->ctrl_bar_type )  // when change ctrlbar Type
+       {
+               PERF_CHECK_BEGIN(LVL6, "add contolbar item");
+
+               MSG_MAIN_HIGH("CtrlBar update. Old=%d Cur=%d", ctrlBarType , pMainView->ctrl_bar_type);
+               _update_ctrl_bar(pMainView, ctrlBarType);
+               pMainView->ctrl_bar_type = ctrlBarType;
+
+               PERF_CHECK_END(LVL6, "add contolbar item");
+       }
+
+// Enable or Disable toolbar buttons.
+       _update_toolbuttons(pMainView);
+
+       _show_zoom_icon(pMainView);
+}
+
+static void
+_ivug_main_drm_popup_purchase_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       int response_id = (int)event_info;
+       IV_ASSERT(data != NULL);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       MSG_MAIN_HIGH("DRM popup selected : %d", response_id);
+
+       if(response_id == POPUP_RESPONSE_CANCEL)
+       {
+               MSG_MAIN_HIGH("cancel selected");
+#ifdef USE_SLIDE_SKIP
+               MSG_MAIN_HIGH("shift again");
+               ivug_slider_skip(pMainView->slider);
+#else
+               ivug_slider_load(pMainView->slider);
+#endif
+       }
+       else
+       {
+               MSG_MAIN_HIGH("unlock process");
+
+               Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+               Media_Data *mdata = ivug_medialist_get_data(mitem);
+
+               char *url = ivug_drm_get_right_url(mdata->filepath);
+               if (url != NULL)
+               {
+                       MSG_MAIN_HIGH("path = %s, right url : %s", mdata->filepath, url);
+                       ivug_ext_launch_browser(url);
+                       free(url);
+               }
+               else
+               {
+                       MSG_MAIN_ERROR("ivug_drm_get_right_url error. path = %s", mdata->filepath);
+               }
+       }
+}
+
+
+static void
+_ivug_main_drm_popup_response_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       int response_id = (int)event_info;
+       IV_ASSERT(data != NULL);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       MSG_MAIN_HIGH("DRM popup selected : %d", response_id);
+
+       if(response_id == POPUP_RESPONSE_CANCEL)
+       {
+               MSG_MAIN_HIGH("cancel selected");
+#ifdef USE_SLIDE_SKIP
+               MSG_MAIN_HIGH("shift again");
+               ivug_slider_skip(pMainView->slider);
+#else
+               ivug_slider_load(pMainView->slider);
+#endif
+
+       }
+       else
+       {
+               ivug_slider_load(pMainView->slider);
+       }
+}
+
+
+void _ivug_main_view_drm_process(drm_constraints result, int info, void *data)
+{
+#define MAX_DBUFFER_SIZE       2048
+
+       ivug_ret_if(!data);
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       char string[MAX_DBUFFER_SIZE] = "";
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+       slide_state_t state = ivug_slider_get_state(pMainView->slider);
+
+       if(mdata == NULL)
+       {
+               MSG_MAIN_ERROR("mdata is NULL");
+               return;
+       }
+
+       switch(result)
+       {
+               case IVUG_DRM_RESULT_LIMITED:
+                       MSG_MAIN_HIGH("Limited");
+                       snprintf(string, sizeof(string),
+                                       IDS_DRM_UNLOCK,
+                                       ecore_file_file_get(mdata->filepath));
+                       ivug_2btn_popup_show(pMainView->layout, NULL, string, _ivug_main_drm_popup_purchase_cb, pMainView);
+                       break;
+               case IVUG_DRM_RESULT_UNLIMITED:
+                       MSG_MAIN_HIGH("Unlimited");
+                       if(state != SLIDE_STATE_LOADED)
+                       {
+                               ivug_slider_load(pMainView->slider);
+                       }
+                       break;
+               case IVUG_DRM_RESULT_COUNT:
+                       MSG_MAIN_HIGH("Count = %d", info);
+                       if(info > 2)
+                       {
+                               ivug_slider_load(pMainView->slider);
+                       }
+                       else if(info == 2)
+                       {
+                               snprintf(string, sizeof(string),
+                                       IDS_DRM_COUNT_BASED_OPEN_MANY, 2,
+                                       ecore_file_file_get(mdata->filepath));
+                               ivug_2btn_popup_show(pMainView->layout, NULL, string, _ivug_main_drm_popup_response_cb, pMainView);
+                       }
+                       else
+                       {
+                               snprintf(string, sizeof(string),
+                                       IDS_DRM_COUNT_BASED_OPEN_ONE,
+                                       ecore_file_file_get(mdata->filepath));
+                               ivug_2btn_popup_show(pMainView->layout, NULL, string, _ivug_main_drm_popup_response_cb, pMainView);
+                       }
+                       break;
+               case IVUG_DRM_RESULT_INTERVAL_DAYS:
+                       MSG_MAIN_HIGH("Interval days = %d", info);
+                       snprintf(string, sizeof(string),
+                                       IDS_DRM_INTERVAL_BASED_DAYS,
+                                       ecore_file_file_get(mdata->filepath),
+                                       info);
+                       ivug_2btn_popup_show(pMainView->layout, NULL, string, _ivug_main_drm_popup_response_cb, pMainView);
+                       break;
+               case IVUG_DRM_RESULT_ACCUMULATED:
+                       MSG_MAIN_HIGH("Accumulated time = %d", info);
+                       /* TODO : get more license popup? */
+                       break;
+               case IVUG_DRM_RESULT_DATETIME:
+               case IVUG_DRM_RESULT_TIMED_COUNT:
+               case IVUG_DRM_RESULT_SYSTEM:
+               default :
+                       ivug_slider_load(pMainView->slider);
+                       break;
+       }
+}
+
+
+static void
+_on_slider_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_MAIN_HIGH("Main View Clicked");
+       IV_ASSERT(data != NULL);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+// TODO : Bug. menu bar is blinking when stopping slide show.
+       if (pMainView->bShowMenu)
+       {
+               ivug_main_view_hide_menu_bar(pMainView);
+       }
+       else
+       {
+               ivug_main_view_show_menu_bar(pMainView);
+       }
+
+}
+
+static void
+_on_slider_icon_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_MAIN_HIGH("Main View Video icon Clicked");
+       IV_ASSERT(data != NULL);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+       if (mdata == NULL)
+       {
+               MSG_MAIN_ERROR("slide data is NULL");
+               return;
+       }
+
+       if (pMainView->mode == IVUG_MODE_FILE || pMainView->mode == IVUG_MODE_DISPLAY || pMainView->mode == IVUG_MODE_SINGLE )
+       {       // TODO : Need description
+               MSG_MAIN_HIGH("Launching simple video player. Mode=%d", pMainView->mode);
+               ivug_ext_launch_videoplayer_simple(mdata->filepath);
+       }
+       else
+       {
+               MSG_MAIN_HIGH("Launching normal video player");
+               ivug_ext_launch_videoplayer(mdata->filepath);
+       }
+
+}
+
+static Eina_Bool _ivug_long_press_timer_expired(void *data)
+{
+       ivug_retv_if(!data, ECORE_CALLBACK_CANCEL);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       MSG_SETAS_HIGH("long press timer expired");
+
+       pMainView->popup_timer = NULL;
+
+       if(pMainView->bLongpressEnd == false)   // still press
+       {
+               if(pMainView->longpress_popup)
+               {
+                       IVUG_DEBUG_WARNING("copy popup remove");
+                       evas_object_del(pMainView->longpress_popup);
+                       pMainView->longpress_popup = NULL;
+               }
+       }
+
+
+       return ECORE_CALLBACK_CANCEL;
+}
+
+static void
+_on_slider_long_pressed(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
+       ivug_ret_if(!data||!p);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       MSG_MAIN_HIGH("LongPressed XY(%d,%d)", p->x, p->y);
+
+       int x = p->x;
+       int y = p->y;
+
+       if ( ivug_slider_get_state(pMainView->slider) != SLIDE_STATE_LOADED)
+       {
+               MSG_MAIN_ERROR("Long pressed. but state is not ready");
+               return;
+       }
+
+       pMainView->longpress_popup = ivug_longpress_popup_show(pMainView->slider, x, y, _on_longpress_popup_selected, pMainView);
+       if (pMainView->longpress_popup == NULL)
+       {
+               IVUG_DEBUG_WARNING("long press popup create failed");
+               return ;
+       }
+
+       pMainView->bLongpressEnd = false;
+       pMainView->popup_timer = ecore_timer_add(LONGTAP_TIMEOUT, _ivug_long_press_timer_expired, pMainView);
+}
+
+static void
+_on_slider_long_press_end(void *data, Evas_Object *obj, void *event_info)
+{
+       //Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
+       //ivug_ret_if(!data||!p);
+       ivug_ret_if(!data);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       pMainView->bLongpressEnd = true;
+
+       if(pMainView->popup_timer)
+       {
+               ecore_timer_del(pMainView->popup_timer);
+               pMainView->popup_timer = NULL;
+       }
+
+       if((int)event_info == LONGTAP_CANCELED)
+       {
+               if(pMainView->longpress_popup)
+               {
+                       IVUG_DEBUG_WARNING("copy popup remove");
+                       evas_object_del(pMainView->longpress_popup);
+                       pMainView->longpress_popup = NULL;
+               }
+       }
+}
+
+static void _on_remove_main_view_ui(Ivug_MainView *pMainView)
+{
+       IV_ASSERT(pMainView != NULL);
+
+       ivug_main_view_del_hide_timer(pMainView);
+
+       // Slider should be removed before mList is freed.
+       if ( pMainView->slider )
+       {
+               evas_object_del(pMainView->slider);
+               pMainView->slider = NULL;
+       }
+
+       if ( pMainView->pSetAsView )
+       {
+               MSG_MAIN_HIGH("SetAS View Destroy");
+               ivug_setas_view_destroy(pMainView->pSetAsView);
+               pMainView->pSetAsView = NULL;
+       }
+
+       if ( pMainView->pDetailsView )
+       {
+               MSG_MAIN_HIGH("Details View Destroy");
+
+               ivug_details_view_destroy(pMainView->pDetailsView);
+               pMainView->pDetailsView = NULL;
+       }
+
+       if(pMainView->layout)           // Remove topmost parent in main view.
+       {
+               evas_object_del(pMainView->layout);
+               pMainView->layout = NULL;
+       }
+
+       if(pMainView->empty_layout)
+       {
+               evas_object_del(pMainView->empty_layout);
+               pMainView->empty_layout = NULL;
+       }
+
+       if ( pMainView->mList )
+       {
+               MSG_MAIN_HIGH("Remove media list");
+               ivug_medialist_del(pMainView->mList);           // ivug_medialist_del() is not working on destroy cb.
+               pMainView->mList = NULL;
+       }
+
+       DESTROY_ME();
+}
+
+
+static void
+_on_slider_item_changed(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       Slide_Item *sitem = (Slide_Item *)event_info;
+
+       MSG_MAIN_HIGH("Image slider changed callback. ");
+
+       if ( sitem == NULL || sitem->mitem == NULL)
+       {
+               // There is no item existed. terminate UG
+               MSG_MAIN_ERROR("No item is remained. exit UG. Sitem=0x%08x", sitem);
+               _on_remove_main_view_ui(pMainView);
+               //DESTROY_ME();
+
+               return;
+       }
+
+       if(pMainView->selectioninfo != NULL)
+       {
+               MSG_MAIN_MED("Delete small noti");
+               evas_object_del(pMainView->selectioninfo);
+               pMainView->selectioninfo = NULL;
+       }
+
+       if (pMainView->longpress_popup)
+       {
+               MSG_MAIN_MED("Delete copy popup");
+               evas_object_del(pMainView->longpress_popup);
+               pMainView->longpress_popup = NULL;
+       }
+
+// TODO : DRM consumption
+       drm_data_t *drm_data = ivug_slider_item_check_drm_constraint(sitem);
+       if(drm_data)
+       {
+               _ivug_main_view_drm_process(drm_data->constraints, drm_data->data, pMainView);
+               free(drm_data);
+       }
+
+// Update Main View.
+       if ( pMainView->bShowMenu == true )
+       {
+               PERF_CHECK_BEGIN(LVL5, "Update main view");
+               _update_main_view(pMainView);
+               PERF_CHECK_END(LVL5, "Update main view");
+       }\r
+\r
+       pMainView->zoom_level = 1;\r
+       elm_slider_value_set(pMainView->zoom_slider, 1.0);\r
+}
+
+
+static void
+_on_slider_item_state_changed(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_MAIN_HIGH("Image slider item state changed callback. ");
+       ivug_ret_if(!data);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       Slide_Item *sitem = (Slide_Item *)event_info;
+
+       if ( sitem == NULL || sitem->mitem == NULL)
+       {
+               // There is no item existed. terminate UG
+               MSG_MAIN_ERROR("No item is remained. exit UG");
+               DESTROY_ME();
+
+               return;
+       }
+
+// TODO : DRM consumption
+
+// Update Main View.
+       if ( pMainView->bShowMenu == true )
+       {
+               _update_toolbuttons(pMainView);
+       }
+}
+
+void _on_receive_mouse_down (void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       if (NULL == pMainView) {
+               return;
+       }
+
+       ivug_main_view_del_hide_timer(pMainView);
+
+       MSG_MAIN_HIGH("Event layer clicked : %s %s Layer=%d",evas_object_name_get(obj), evas_object_type_get(obj), evas_object_layer_get(obj));
+}
+
+#ifdef TEST_MOUSE_EVENT
+void _on_receive_mouse_down1 (void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       char *name = (char *)data;
+
+       MSG_MAIN_HIGH("Event layer clicked : %s %s Layer=%d",evas_object_name_get(obj), name, evas_object_layer_get(obj));
+}
+#endif
+
+
+void _on_receive_mouse_up (void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       if (NULL == pMainView) {
+               return;
+       }
+
+       ivug_main_view_set_hide_timer(pMainView);
+}
+
+static void
+_on_menu_state_changed(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+       Ivug_MainView *pMainView = static_cast<Ivug_MainView *>(data);
+       if (NULL == pMainView) {
+               return;
+       }
+
+       MSG_MAIN_HIGH("Receive %s %s", emission, source);
+
+       if ( strncmp(emission, "menu,show,finished", strlen(emission)) == 0 )
+       {
+               elm_object_disabled_set(pMainView->ctrl_bar, EINA_FALSE);
+       }
+       else
+       {
+               evas_object_hide(pMainView->ctrl_bar);
+               elm_object_disabled_set(pMainView->ctrl_bar, EINA_TRUE);
+       }
+}
+
+
+#if 0
+static void
+_need_prev(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = static_cast<Ivug_MainView *>(data);
+       if (NULL == pMainView) {
+               return;
+       }
+
+       Thumblist_Block_Index *block = (Thumblist_Block_Index *)event_info;
+
+       Media_Item *iter = (Media_Item *)block->item_data;
+       Media_Data *pData;
+       int i = 0;
+
+       PERF_CHECK_BEGIN("Load thumb list");
+
+       for ( i = 0 ; i < block->count; i++)
+       {
+               iter = ivug_medialist_get_prev(pMainView->mList, iter);
+
+               if ( iter == NULL ) break;
+
+               pData = ivug_medialist_get_data(iter);
+
+               PERF_CHECK_BEGIN("  Prepend Item");
+               if ( pData->thumbnail_path == NULL )
+                       ivug_thumblist_prepend_item(pMainView->thumbs, DEFAULT_THUMBNAIL_PATH, iter);
+               else
+                       ivug_thumblist_prepend_item(pMainView->thumbs, pData->thumbnail_path, iter);
+
+               PERF_CHECK_END("  Prepend Item");
+       }
+
+       PERF_CHECK_END("Load thumb list");
+}
+
+static void
+_need_next(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = static_cast<Ivug_MainView *>(data);
+       if (NULL == pMainView) {
+               return;
+       }
+
+       Thumblist_Block_Index *block = (Thumblist_Block_Index *)event_info;
+
+       Media_Item *iter = (Media_Item *)block->item_data;
+       Media_Data *pData;
+       int i = 0;
+
+       PERF_CHECK_BEGIN("Load thumb list");
+
+       for ( i = 0 ; i < block->count; i++)
+       {
+               iter = ivug_medialist_get_next(pMainView->mList, iter);
+
+               if ( iter == NULL ) break;
+
+               pData = ivug_medialist_get_data(iter);
+
+               PERF_CHECK_BEGIN("  Append Item");
+
+               if ( pData->thumbnail_path == NULL )
+                       ivug_thumblist_append_item(pMainView->thumbs, DEFAULT_THUMBNAIL_PATH, iter);
+               else
+                       ivug_thumblist_append_item(pMainView->thumbs, pData->thumbnail_path, iter);
+
+               PERF_CHECK_END("  Append Item");
+       }
+
+       PERF_CHECK_END("Load thumb list");
+
+}
+#endif
+
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// External APIs
+//
+
+static char * _ivug_get_folder_name(char *filepath)
+{
+       char *folder = ecore_file_dir_get(filepath);
+
+       char *name = NULL;
+
+       name = strrchr(folder, '/');
+       if ( (name != NULL) && ((name+1) != NULL) )
+       {
+               return strdup(name + 1);
+       }
+
+       return NULL;
+}
+
+
+bool
+ivug_main_view_load_list(Ivug_MainView *pMainView, ivug_parameter *ivug_param)
+{
+       MSG_MAIN_HIGH("Load media list.");
+
+       PERF_CHECK_BEGIN(LVL2, "create media list");
+       if (NULL == pMainView) {
+               return false;
+       }
+
+       Media_List *mlist = ivug_medialist_create();
+       if (mlist == NULL)
+       {
+               MSG_MAIN_ERROR("Creating media list failed");
+               return false;
+       }
+       PERF_CHECK_END(LVL2, "create media list");
+
+       PERF_CHECK_BEGIN(LVL2, "create filter");
+
+       Filter_struct *filter = ivug_data_filter_create(ivug_param);
+       if (filter == NULL)
+       {
+               MSG_MAIN_ERROR("Creating filter failed");
+               free(mlist);
+               return false;
+       }
+
+       PERF_CHECK_END(LVL2, "create filter");
+
+       Media_Item *current = NULL;
+       Media_Data *pData = NULL;
+
+       {
+               PERF_CHECK_BEGIN(LVL2, "media list load");
+               current = ivug_medialist_load(mlist, filter);
+               PERF_CHECK_END(LVL2, "media list load");
+       }
+
+       if(current == NULL)
+       {
+               MSG_MAIN_ERROR("Media list load failed");
+               goto LOAD_LIST_FAILED;
+       }
+
+       pData = ivug_medialist_get_data(current);
+       if(pData == NULL)
+       {
+               MSG_MAIN_ERROR("current data is NULL");
+               goto LOAD_LIST_FAILED;
+       }
+       if(pData->fileurl == NULL)
+       {
+               MSG_MAIN_ERROR("current fileurl is NULL");
+               goto LOAD_LIST_FAILED;
+       }
+
+
+#ifdef USE_RESCAN_FILE_PATH_AT_LIST
+       if(strncmp(pData->fileurl, ivug_param->filepath, strlen(pData->fileurl)) != 0)
+       {
+               current = ivug_medialist_find_item_by_filename(mlist, ivug_param->filepath);
+               if(current == NULL)
+               {
+                       MSG_MAIN_ERROR("Media list load failed, %s is not exist at list", ivug_param->filepath);
+                       goto LOAD_LIST_FAILED;
+               }
+       }
+#endif
+
+       if(ivug_param->view_by == IVUG_VIEW_BY_ALL)
+       {
+               pMainView->album_name = strdup(IDS_ALL_ALBUMS);
+       }
+       else if(ivug_param->view_by == IVUG_VIEW_BY_FOLDER)
+       {
+               // TODO : it is not run!! DB problem!!!
+               /*
+               media_handle m_handle = ivug_db_get_folder_handle(ecore_file_dir_get(ivug_param->filepath));
+               if(m_handle == NULL)
+               {
+                       MSG_IVUG_FATAL("View by Folder. but media handle is NULL" );
+                       return NULL;
+               }
+
+               pMainView->album_name = ivug_db_get_folder_name(m_handle);
+               */
+               pMainView->album_name = _ivug_get_folder_name(ivug_param->filepath);
+               if(pMainView->album_name == NULL)
+               {
+                       pMainView->album_name = strdup(IDS_NO_NAME);
+               }
+       }
+
+       if(ivug_param->footsteps == true)
+       {
+               pMainView->bFootSteps = true;
+       }
+
+       pMainView->mList = mlist;
+
+       PERF_CHECK_BEGIN(LVL2, "media list set");
+       if(ivug_slider_set_medialist(pMainView->slider, mlist, current) == EINA_FALSE)
+       {
+               MSG_MAIN_ERROR("ivug_slider_set_medialist error");
+               goto LOAD_LIST_FAILED;
+       }
+       PERF_CHECK_END(LVL2, "media list set");
+
+       return true;
+
+LOAD_LIST_FAILED:
+       if(filter)
+               ivug_data_filter_delete(filter);
+       if(mlist)
+               ivug_medialist_del(mlist);
+       pMainView->mList = NULL;
+       return false;
+}
+
+static void
+_on_slideshow_finished(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_MAIN_HIGH("_on_slideshow_finished");
+       IV_ASSERT(data != NULL);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       int ss_state = (int)event_info;
+       bool bDestoryed = false;
+       bDestoryed = _destory_slideshow_and_ug(pMainView, ss_state, false);
+       if (bDestoryed) {
+               return;
+       }
+
+       Media_Item * item = NULL;
+       item = ivug_ss_item_get(pMainView->ssHandle);
+       ivug_ss_delete(pMainView->ssHandle);
+       if(item) {
+               ivug_slider_set_item(pMainView->slider, item, SLIDE_INSTANTLY);
+       }
+       pMainView->ssHandle = NULL;
+
+//     ivug_slider_load(pMainView->slider);
+
+       ivug_slider_load(pMainView->slider);
+
+       ivug_main_view_show_menu_bar(pMainView);
+}
+
+static void
+_ivug_main_view_zoom_out_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+       ivug_ret_if(!obj);
+       ivug_ret_if(!data);
+
+       MSG_MAIN_ERROR("_ivug_main_view_zoom_out_cb");
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       ivug_slider_zoom_out(pMainView->slider);
+
+       _show_zoom_icon(data);
+}
+
+static void
+_ivug_main_view_zoom_in_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+       ivug_ret_if(!obj);
+       ivug_ret_if(!data);
+
+       MSG_MAIN_ERROR("_ivug_main_view_zoom_in_cb");
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       ivug_slider_zoom_in(pMainView->slider);
+
+       _show_zoom_icon(data);
+}
+\r
+static void _zoom_slider_change_cb(void *data, Evas_Object *obj, void *event_info)\r
+{\r
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;\r
+\r
+       int value = (int)elm_slider_value_get(pMainView->zoom_slider);\r
+\r
+       MSG_MAIN_HIGH("value = %d", value);\r
+\r
+       while(pMainView->zoom_level > 0\r
+               && pMainView->zoom_level <= ZOOM_LEVEL_MAX+1\r
+               && value != pMainView->zoom_level)\r
+       {\r
+               if(value > pMainView->zoom_level)\r
+               {\r
+                       ivug_slider_zoom_in(pMainView->slider);\r
+                       pMainView->zoom_level++;\r
+               }\r
+               else if(value < pMainView->zoom_level)\r
+               {\r
+                       ivug_slider_zoom_out(pMainView->slider);\r
+                       pMainView->zoom_level--;\r
+               }\r
+       }\r
+}\r
+
+Ivug_MainView *
+ivug_main_view_create(Evas_Object* parent, ivug_mode mode, ivug_view_by view_by)
+{
+       IV_ASSERT(parent != NULL);
+
+       MSG_MAIN_HIGH("Creating main view. Parent=0x%08x Mode=%d ViewBy=%d", parent, mode, view_by);
+
+       PERF_CHECK_BEGIN(LVL2, "Create layout");
+
+//create main view layout
+       Ivug_MainView *pMainView = (Ivug_MainView *)calloc(1, sizeof(Ivug_MainView) );
+       IV_ASSERT(pMainView != NULL);
+
+// Set default value
+       pMainView->parent = parent;
+       pMainView->mode = mode;
+       pMainView->view_by = view_by;
+       if(mode != IVUG_MODE_SLIDESHOW)
+       {
+               pMainView->bShowMenu = true;
+       }
+       else
+       {
+               pMainView->bShowMenu = false;
+       }
+
+       pMainView->hide_count = -1;
+
+       Evas_Object *layout;
+       layout = elm_layout_add(parent);
+       if ( layout == NULL)    //if failed
+       {
+               MSG_MAIN_ERROR("main layout create failed");
+               free(pMainView);
+               return NULL;
+       }
+
+       pMainView->layout = layout;
+       evas_object_name_set(pMainView->layout, "Main Layout");
+
+       PERF_CHECK_END(LVL2, "Create layout");
+
+       PERF_CHECK_BEGIN(LVL2, "elm_layout_file_set");
+       if (elm_layout_file_set(layout, IVUG_MAIN_EDJ, "mainview") == EINA_FALSE)
+       {
+               MSG_MAIN_ERROR("edj loading fail, file=%s group=%s", IVUG_MAIN_EDJ, IVUG_MAIN_EDJ);
+               evas_object_del(layout);
+               free(pMainView);
+               return NULL;
+       }
+
+       edje_object_signal_callback_add(_EDJ(pMainView->layout),
+                               "menu,hide,finished",
+                               "edc",
+                               _on_menu_state_changed,
+                               (void *)pMainView);
+
+       edje_object_signal_callback_add(_EDJ(pMainView->layout),
+                               "menu,show,finished",
+                               "edc",
+                               _on_menu_state_changed,
+                               (void *)pMainView);
+
+       evas_object_show(layout);
+
+       PERF_CHECK_END(LVL2, "elm_layout_file_set");
+
+// Navigation bar
+       PERF_CHECK_BEGIN(LVL2, "elm_naviframe_add");
+
+       pMainView->navi_bar = elm_naviframe_add(layout);
+       if ( pMainView->navi_bar == NULL)
+       {
+               MSG_MAIN_ERROR("navigation bar failed");
+               ivug_main_view_destroy(pMainView);
+               return NULL;
+       }
+       evas_object_name_set(pMainView->navi_bar, "Main naviframe");
+
+// Layout life cycle is controlled by application explictily.
+       elm_naviframe_content_preserve_on_pop_set(pMainView->navi_bar, EINA_TRUE);
+
+#ifdef USE_CUSTOM_STYLE
+       elm_object_theme_set(pMainView->navi_bar, gGetSystemTheme() );
+#endif
+       const char *profile = elm_config_profile_get();
+       if (!strcmp(profile,"mobile"))
+       {
+               elm_object_style_set(pMainView->navi_bar, "ivug-main/default");
+       }
+       else if (!strcmp(profile,"desktop"))
+       {
+               elm_object_style_set(pMainView->navi_bar, "ivug-main/noindicator");
+       }
+
+       elm_object_part_content_set(layout, "mainview.navibar", pMainView->navi_bar);   //swallow
+
+       PERF_CHECK_END(LVL2, "elm_naviframe_add");
+
+       PERF_CHECK_BEGIN(LVL2, "elm_layout_add");
+
+       pMainView->empty_layout = elm_layout_add(layout);       //create centents layout.
+       if (elm_layout_file_set(pMainView->empty_layout, IVUG_MAIN_EDJ, "navi_content") == EINA_FALSE)
+       {
+               IVUG_DEBUG_WARNING("layout sawllow failed");
+               ivug_main_view_destroy(pMainView);
+               return NULL;
+       }
+
+       evas_object_name_set(pMainView->empty_layout, "Empty layout");
+       PERF_CHECK_END(LVL2,"elm_layout_add");
+
+//create slider
+       PERF_CHECK_BEGIN(LVL2, "ivug_slider_add");
+
+       pMainView->slider = ivug_slider_add(pMainView->empty_layout);
+       if (pMainView->slider == NULL)
+       {
+               MSG_MAIN_ERROR("image slider create failed");
+               ivug_main_view_destroy(pMainView);
+               return NULL;
+       }
+
+       elm_object_part_content_set(pMainView->empty_layout, "mainview.slider", pMainView->slider);     //swallow
+
+       PERF_CHECK_END(LVL2, "ivug_slider_add");\r
+\r
+       Evas_Object *slider = elm_slider_add(pMainView->empty_layout);\r
+       //elm_slider_indicator_show_set(slider, EINA_TRUE);\r
+       //evas_object_size_hint_weight_set(slider, EVAS_HINT_EXPAND, 0.0);\r
+       //evas_object_size_hint_align_set(slider, EVAS_HINT_FILL, 0.5);\r
+       elm_slider_indicator_format_set(slider, "%1.0f");\r
+       elm_slider_min_max_set(slider, 1, 5);\r
+       elm_slider_value_set(slider, 1);\r
+\r
+       //evas_object_smart_callback_add(slider, "slider,drag,start", _slider_ebook_drag_start_cb, slider);\r
+       //evas_object_smart_callback_add(slider, "slider,drag,stop", _slider_ebook_drag_stop_cb, slider);\r
+       evas_object_smart_callback_add(slider, "changed", _zoom_slider_change_cb, pMainView);\r
+\r
+       elm_object_part_content_set(pMainView->empty_layout, "zoom_slider_area", slider);       //swallow\r
+\r
+       pMainView->zoom_slider = slider;\r
+       pMainView->zoom_level = 1;\r
+
+       PERF_CHECK_BEGIN(LVL2, "ivug_button_add");
+       Evas_Object *back_btn = ivug_button_add(pMainView->navi_bar, "naviframe/end_btn/default", IDS_BACK, NULL, on_btn_back_clicked, pMainView);
+       PERF_CHECK_END(LVL2, "ivug_button_add");
+
+       PERF_CHECK_BEGIN(LVL2, "elm_naviframe_item_push");
+       pMainView->navi_it = elm_naviframe_item_push(pMainView->navi_bar, IDS_LOADING , back_btn, NULL, pMainView->empty_layout, NULL);
+       PERF_CHECK_END(LVL2, "elm_naviframe_item_push");
+
+       //if (pMainView->mode != IVUG_MODE_DISPLAY && pMainView->mode != IVUG_MODE_SLIDESHOW)           // Display mode has no control bar in bottom.
+       if (pMainView->mode != IVUG_MODE_DISPLAY)               // Display mode has no control bar in bottom.
+       {
+               PERF_CHECK_BEGIN(LVL2, "create ctrl bar");
+               pMainView->ctrl_bar = _create_ctrl_bar(pMainView->navi_bar);
+               evas_object_name_set(pMainView->ctrl_bar, "Main Controlbar");
+               elm_object_item_part_content_set(pMainView->navi_it, "controlbar", pMainView->ctrl_bar);
+               PERF_CHECK_END(LVL2, "create ctrl bar");
+       }
+
+       PERF_CHECK_BEGIN(LVL2, "create tool bar");
+       pMainView->tool_bar = _create_tool_bar(pMainView->navi_bar);
+       evas_object_name_set(pMainView->tool_bar, "Main Toolbar");
+       PERF_CHECK_END(LVL2, "create tool bar");
+
+       PERF_CHECK_BEGIN(LVL2, "add event handler");
+
+//     elm_object_part_content_set(layout, "mainview.slider", pMainView->slider);      //swallow
+
+//register mouse call back.
+       evas_object_smart_callback_add(pMainView->slider, "slider,clicked", _on_slider_clicked, pMainView);
+       evas_object_smart_callback_add(pMainView->slider, "slider,longpressed", _on_slider_long_pressed, pMainView);
+       evas_object_smart_callback_add(pMainView->slider, "slider,longpress,end", _on_slider_long_press_end, pMainView);
+       evas_object_smart_callback_add(pMainView->slider, "slider,clicked,icon", _on_slider_icon_clicked, pMainView);
+
+       evas_object_smart_callback_add(pMainView->slider, "slider,item,changed", _on_slider_item_changed, pMainView);
+       evas_object_smart_callback_add(pMainView->slider, "slider,item,state,changed", _on_slider_item_state_changed, pMainView);
+
+       evas_object_event_callback_add(pMainView->slider, EVAS_CALLBACK_MOUSE_DOWN, _on_receive_mouse_down, pMainView);
+       evas_object_event_callback_add(pMainView->slider, EVAS_CALLBACK_MOUSE_UP, _on_receive_mouse_up, pMainView);
+
+       //MSG_MAIN_HIGH("binded main win address is %p\n", main_win);
+
+#ifdef TEST_MOUSE_EVENT
+       evas_object_event_callback_add(pMainView->navi_bar, EVAS_CALLBACK_MOUSE_DOWN, _on_receive_mouse_down1, (void *)"navigarion");
+       evas_object_event_callback_add(pMainView->layout, EVAS_CALLBACK_MOUSE_DOWN, _on_receive_mouse_down1, (void *)"layout");
+       evas_object_event_callback_add(pMainView->slider, EVAS_CALLBACK_MOUSE_DOWN, _on_receive_mouse_down1, (void *)"slider");
+       evas_object_event_callback_add(const_cast<Evas_Object *>(edje_object_part_object_get(_EDJ(pMainView->layout) , "clip")), EVAS_CALLBACK_MOUSE_DOWN, _on_receive_mouse_down1, (void *)"clip");
+       evas_object_event_callback_add(const_cast<Evas_Object *>(edje_object_part_object_get(_EDJ(pMainView->layout) , "mainview.navibar")), EVAS_CALLBACK_MOUSE_DOWN, _on_receive_mouse_down1, (void *)"navi swallow");
+       evas_object_event_callback_add(pMainView->ctrl_bar, EVAS_CALLBACK_MOUSE_DOWN, _on_receive_mouse_down1, (void *)"controlbar");
+#endif
+
+       evas_object_event_callback_add(pMainView->layout, EVAS_CALLBACK_RESIZE, _on_resize, pMainView);
+
+       // zoom icon
+       edje_object_signal_callback_add(_EDJ(pMainView->empty_layout),
+                                       "mainview,zoom_out,clicked",
+                                       "",
+                                       _ivug_main_view_zoom_out_cb,
+                                       (void *)pMainView);
+       edje_object_signal_callback_add(_EDJ(pMainView->empty_layout),
+                                       "mainview,zoom_in,clicked",
+                                       "",
+                                       _ivug_main_view_zoom_in_cb,
+                                       (void *)pMainView);
+
+       _show_zoom_icon(pMainView);
+
+       int ret = -1;
+       MSG_IMAGEVIEW_HIGH("Register System notifications");
+       ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, _on_mmc_state_changed, pMainView);
+       if ( ret == -1 )
+       {
+               MSG_IMAGEVIEW_ERROR("Register %s is failed", VCONFKEY_SYSMAN_MMC_STATUS);
+       }
+
+       pMainView->keydown_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _on_key_down, (void *)pMainView);
+
+       MSG_MAIN_HIGH("Main View Created");
+
+// For debugging.
+       DELETE_NOTIFY(pMainView->layout);
+
+       PERF_CHECK_END(LVL2, "add event handler");
+
+       return pMainView;
+
+}
+
+void ivug_main_view_start_slideshow(Ivug_MainView *pMainView, Eina_Bool bSlideFirst)
+{
+       IV_ASSERT(pMainView != NULL);
+
+       // Stop animation & movie play before slideshow is started.
+       ivug_slider_pause(pMainView->slider);
+
+       // TODO : After slideshow is finished, how can I resume???
+
+       ivug_prohibit_lcd_off();
+       ivug_main_view_hide_menu_bar(pMainView);
+
+       Media_Item *current = ivug_slider_get_item(pMainView->slider);
+
+       pMainView->ssHandle = ivug_ss_create(pMainView->layout);
+
+// Register callback
+       evas_object_smart_callback_add(ivug_ss_object_get(pMainView->ssHandle),  "slideshow,finished", _on_slideshow_finished, pMainView);
+
+       ivug_ss_start(pMainView->ssHandle, current, pMainView->mList, bSlideFirst);\r
+}
+
+
+Evas_Object *
+ivug_main_view_object_get(Ivug_MainView *pMainView)
+{
+       IV_ASSERT(pMainView != NULL);
+
+       return pMainView->layout;
+}
+
+void
+ivug_main_view_start(Ivug_MainView *pMainView)
+{
+       IV_ASSERT(pMainView != NULL);
+
+       if(pMainView->mode == IVUG_MODE_SLIDESHOW || pMainView->bFootSteps == true)
+       {
+               MSG_MAIN_HIGH("Slide show running");
+               ivug_main_view_start_slideshow(pMainView, EINA_FALSE);
+               return;
+       }
+
+       ivug_main_view_set_hide_timer(pMainView);
+
+       PERF_CHECK_BEGIN(LVL2, "slider start");
+       ivug_slider_start(pMainView->slider);
+       PERF_CHECK_END(LVL2, "slider start");
+
+       pMainView->area_obj = evas_object_rectangle_add(evas_object_evas_get(pMainView->layout));
+       evas_object_size_hint_expand_set(pMainView->area_obj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_fill_set(pMainView->area_obj, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_color_set(pMainView->area_obj, 0,0,0,0);
+       elm_object_part_content_set(pMainView->layout, "mainview.area", pMainView->area_obj);
+
+       evas_object_show(pMainView->area_obj);
+}
+
+
+void
+ivug_main_view_resume(Ivug_MainView *pMainView)
+{
+       IV_ASSERT(pMainView != NULL);
+
+       MSG_MAIN_HIGH("Main View Update");
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+
+       IV_ASSERT(mdata != NULL);
+
+// TODO : Check this routine!.
+// TODO : Should implement again!!
+
+       if (mdata->slide_type == SLIDE_TYPE_IMAGE || mdata->slide_type == SLIDE_TYPE_VIDEO )
+       {
+               if(mdata->filepath && ecore_file_exists(mdata->filepath)) // Current file is not deleted
+               {
+                       MSG_MAIN_HIGH("Current filepath : %s", mdata->filepath);
+               }
+               else
+               {
+                       /*if file is not exist ug terminated temporally */
+                       MSG_MAIN_ERROR("Center file is not exist. stype=%d name=%s", mdata->slide_type, mdata->filepath);
+                       DESTROY_ME();
+                       return ;
+               }
+       }
+       else
+       {
+               MSG_MAIN_ERROR("Unhandled slide type : %d", mdata->slide_type);
+       }
+
+// When resume, menu bar will be appeared.
+       ivug_main_view_show_menu_bar(pMainView);
+
+       ivug_slider_resume(pMainView->slider);
+}
+
+void
+ivug_main_view_pause(Ivug_MainView *pMainView)
+{
+       IV_ASSERT(pMainView != NULL);
+
+       if ( pMainView->ssHandle )
+       {
+               ivug_ss_stop(pMainView->ssHandle);
+       }
+
+       ivug_slider_pause(pMainView->slider);
+
+       if(pMainView->bShowMenu == true)
+       {
+               ivug_main_view_del_hide_timer(pMainView);
+       }
+       // Stop photocam If AGIF
+}
+
+
+void
+ivug_main_view_destroy(Ivug_MainView *pMainView)
+{
+       IV_ASSERT(pMainView != NULL);
+
+       MSG_MAIN_HIGH("ENTER : Main View Destroy. pMainView=0x%08x", pMainView);
+
+       ivug_main_view_del_hide_timer(pMainView);\r
+
+       if (pMainView->popup_timer)
+       {
+               ecore_timer_del(pMainView->popup_timer);
+               pMainView->popup_timer = NULL;
+       }
+\r
+       if (pMainView->ext_ug)
+       {
+               MSG_MAIN_HIGH("External UG Destroy");
+               ug_destroy(pMainView->ext_ug);
+               pMainView->ext_ug = NULL;
+       }
+
+       if (pMainView->exit_timer)
+       {
+               ecore_timer_del(pMainView->exit_timer);
+               pMainView->exit_timer = NULL;
+       }\r
+\r
+       if ( pMainView->zoom_slider )\r
+       {
+               evas_object_del(pMainView->zoom_slider);\r
+               pMainView->zoom_slider = NULL;\r
+       }\r
+
+       if ( pMainView->slider )
+       {
+               evas_object_del(pMainView->slider);
+               pMainView->slider = NULL;
+       }
+
+       int ret = -1;
+
+       MSG_MAIN_HIGH("Unregister system notifications");
+
+       if(pMainView->keydown_handler)
+       {
+               ecore_event_handler_del(pMainView->keydown_handler);
+               pMainView->keydown_handler = NULL;
+       }
+
+       ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, _on_mmc_state_changed);
+       if ( ret == -1 )
+       {
+               MSG_MAIN_ERROR("Unegister %s is failed", VCONFKEY_SYSMAN_MMC_STATUS);
+       }
+
+       if(pMainView->album_name)
+       {
+               free(pMainView->album_name);
+       }
+
+       if(pMainView->area_obj)
+       {
+               evas_object_del(pMainView->area_obj);
+               pMainView->area_obj = NULL;
+       }
+
+// Who remove medialist?????
+       _on_remove_main_view_ui(pMainView);
+
+       EFL::dump_obj(pMainView->parent, 0);
+       free(pMainView);
+
+       MSG_MAIN_HIGH("LEAVE : Main View Destroy.");
+
+       return ;
+}
+
+static Eina_Bool _on_hide_timer_expired(void *data)
+{
+       ivug_retv_if(!data, ECORE_CALLBACK_CANCEL);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       pMainView->hide_timer = NULL;
+
+       ivug_main_view_hide_menu_bar(pMainView);
+
+       return ECORE_CALLBACK_CANCEL;
+}
+
+void ivug_main_view_set_hide_timer(Ivug_MainView *pMainView)
+{
+       IV_ASSERT(pMainView != NULL);
+
+       pMainView->hide_count++;
+       if(pMainView->hide_count < 0)
+       {
+               return ;
+       }
+
+       if(pMainView->mode == IVUG_MODE_DISPLAY || pMainView->mode == IVUG_MODE_SETAS)
+       {
+               return;
+       }
+
+       if(pMainView->bShowMenu == EINA_TRUE)
+       {
+               if(pMainView->hide_timer)
+               {
+                       ecore_timer_del(pMainView->hide_timer);
+               }
+               pMainView->hide_timer = ecore_timer_add(MENUBAR_TIMEOUT_SEC, _on_hide_timer_expired, (void *)pMainView);
+       }
+}
+
+void ivug_main_view_del_hide_timer(Ivug_MainView *pMainView)
+{
+       IV_ASSERT(pMainView != NULL);
+
+       pMainView->hide_count--;
+       MSG_MAIN_HIGH("hide_count = %d", pMainView->hide_count);
+
+       if(pMainView->hide_timer)
+       {
+               ecore_timer_del(pMainView->hide_timer);
+               pMainView->hide_timer = NULL;
+       }
+}
+
+void
+ivug_main_view_show_menu_bar(Ivug_MainView *pMainView)
+{
+       MSG_MAIN_HIGH("Show Menu");
+       if (NULL == pMainView) {
+               return;
+       }
+
+       pMainView->bShowMenu = true;
+       evas_object_show(pMainView->ctrl_bar);
+
+       _update_main_view(pMainView);
+
+#ifdef HIDE_INDICATOR
+       elm_win_indicator_mode_set(ug_get_window(), ELM_WIN_INDICATOR_HIDE);
+#else
+       elm_win_indicator_mode_set((Evas_Object *)ug_get_window(), ELM_WIN_INDICATOR_SHOW);
+#endif
+//     edje_object_signal_emit(_EDJ(pMainView->layout), "mainview,show,menu", "elm");
+
+       edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,show", "user");
+
+       elm_naviframe_item_title_visible_set(pMainView->navi_it, EINA_TRUE);
+       elm_object_item_signal_emit(pMainView->navi_it, "elm,state,controlbar,open", "");
+
+       ivug_slider_set_menu_visibility(pMainView->slider, EINA_TRUE);
+
+#ifdef TEST_MOUSE_EVENT
+       Eina_List *l = const_cast<Eina_List *>(evas_object_clipees_get(pMainView->navi_bar));
+
+       MSG_MAIN_HIGH("Clipper clips %i objects", eina_list_count(l));
+
+       void *obj;
+       Eina_List *l1;
+
+       EINA_LIST_FOREACH(l, l1, obj)
+       {
+               MSG_MAIN_HIGH("Object Type : %s", evas_object_name_get((Evas_Object *)obj));
+       }
+
+       Evas_Object *above;
+       Evas_Object *below;
+
+       above = evas_object_above_get(pMainView->navi_bar);
+       MSG_MAIN_HIGH("Navi Above : 0x%08x %s %s", above, evas_object_name_get(above), evas_object_type_get(above));
+
+       below = evas_object_below_get(pMainView->navi_bar);
+       MSG_MAIN_HIGH("Navi Below : 0x%08x %s %s", below, evas_object_name_get(below), evas_object_type_get(below));
+
+       above = evas_object_above_get(pMainView->slider);
+       MSG_MAIN_HIGH("Slider Above : 0x%08x %s %s", above, evas_object_name_get(above), evas_object_type_get(above));
+
+       below = evas_object_below_get(pMainView->slider);
+       MSG_MAIN_HIGH("Slider Below : 0x%08x %s %s", below, evas_object_name_get(below), evas_object_type_get(below));
+#endif
+
+       ivug_main_view_set_hide_timer(pMainView);
+
+}
+
+void
+ivug_main_view_hide_menu_bar(Ivug_MainView *pMainView)
+{
+       MSG_MAIN_HIGH("Hide Menu");
+       if (NULL == pMainView) {
+               return;
+       }
+
+       ivug_main_view_del_hide_timer(pMainView);
+
+       pMainView->bShowMenu = false;
+
+       elm_object_disabled_set(pMainView->ctrl_bar, EINA_TRUE);
+
+       edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,hide", "user");
+
+       elm_win_indicator_mode_set((Evas_Object *)ug_get_window(), ELM_WIN_INDICATOR_HIDE);
+
+//     edje_object_signal_emit(_EDJ(pMainView->layout), "mainview,hide,menu","elm");
+       elm_naviframe_item_title_visible_set(pMainView->navi_it, EINA_FALSE);
+       elm_object_item_signal_emit(pMainView->navi_it, "elm,state,controlbar,close", "");
+
+       // zoom icon
+       edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,btn_zoom_out,hide","elm");
+       edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,btn_zoom_in,hide","elm");\r
+       edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,zoom_slider,hide","elm");\r
+
+       ivug_slider_set_menu_visibility(pMainView->slider, EINA_FALSE);
+
+}
+
diff --git a/main/src/view/ivug-name-view.c b/main/src/view/ivug-name-view.c
new file mode 100755 (executable)
index 0000000..e032e61
--- /dev/null
@@ -0,0 +1,436 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include <Ecore_X.h>
+#include "ivug-common.h"
+
+#include "ivug-name-view.h"
+#include "ivug-popup.h"
+
+#include "ivug-media.h"
+#include "ivug-vibration.h"
+
+static void
+_ivug_rename_view_enter_click_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_IMAGEVIEW_HIGH("inside ...");
+       Ivug_NameView *pNameView = (Ivug_NameView *)data;
+       IV_ASSERT(pNameView != NULL);
+
+       Evas_Object *entry = elm_object_part_content_get(pNameView->editfield, "elm.swallow.content");
+
+       char *name = elm_entry_markup_to_utf8 ( elm_entry_entry_get(entry) );
+
+       MSG_IMAGEVIEW_HIGH("name = %s", name);
+
+       if(name)
+       {
+               char *new_name = NULL;
+               new_name = ivug_strip_string(name);
+               if(new_name == NULL)
+               {
+                       MSG_IMAGEVIEW_ERROR("ivug_strip_string failed");
+                       free (name);
+                       ecore_imf_context_input_panel_hide(elm_entry_imf_context_get(entry));
+                       return;
+               }
+
+               if ( pNameView->fnresponse )
+               {
+                       (pNameView->fnresponse)(NAME_VIEW_RESPONSE_OK, new_name, pNameView->clientdata);
+               }
+
+               free(name);
+
+               ivug_name_view_destroy(pNameView);
+       }
+       else
+       {
+               ecore_imf_context_input_panel_hide(elm_entry_imf_context_get(entry));
+       }
+}
+
+void
+_ivug_name_view_maxlength_reached(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_NameView *pNameView = (Ivug_NameView *)data;
+       IV_ASSERT(pNameView != NULL);
+
+       if ( pNameView->haptic_handle == INVALID_HAPTIC_HANDLE )
+       {
+               pNameView->haptic_handle = ivug_vibration_create();
+       }
+       else
+       {
+               ivug_vibration_stop(pNameView->haptic_handle);
+       }
+
+       ivug_vibration_play(pNameView->haptic_handle ,VIBRATION_DURATION);
+
+}\r
+\r
+static void\r
+_on_popup_response(void *data, Evas_Object *obj, void *event_info)\r
+{\r
+       IV_ASSERT(data != NULL);\r
+       Ivug_NameView *pNameView = (Ivug_NameView *)data;\r
+\r
+       ivug_name_view_destroy(pNameView);\r
+}\r
+\r
+
+static void
+_ivug_name_view_done_cb(void *data, Evas_Object* obj, void* event_info )
+{
+       MSG_IMAGEVIEW_HIGH( "pNameView Done ");
+       Ivug_NameView *pNameView = (Ivug_NameView *)data;
+       IV_ASSERT(pNameView != NULL);
+
+       Evas_Object *entry = elm_object_part_content_get(pNameView->editfield, "elm.swallow.content");
+
+       char *name = elm_entry_markup_to_utf8 ( elm_entry_entry_get(entry) );
+
+       MSG_IMAGEVIEW_HIGH("name = %s", name);
+
+       if(name)
+       {
+               char *new_name = NULL;
+               new_name = ivug_strip_string(name);
+               if(new_name == NULL)
+               {
+                       MSG_IMAGEVIEW_ERROR( "ivug_strip_string failed");
+                       ivug_1btn_popup_show(pNameView->layout, IDS_ERROR, IDS_ENTRY_IS_EMPTY, _on_popup_response, pNameView);\r
+                       free (name);\r
+                       return;
+               }
+
+               if ( pNameView->fnresponse )
+               {
+                       (pNameView->fnresponse)(NAME_VIEW_RESPONSE_OK, new_name, pNameView->clientdata);
+               }
+
+               free(name);
+       }
+
+       ivug_name_view_destroy(pNameView);
+}
+
+static void
+_ivug_name_view_cancel_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_IMAGEVIEW_HIGH("pNameView Back");
+       Ivug_NameView *pNameView = (Ivug_NameView *)data;
+       IV_ASSERT(pNameView != NULL);
+
+       if ( pNameView->fnresponse )
+       {
+               (pNameView->fnresponse)(NAME_VIEW_RESPONSE_CANCEL, NULL, pNameView->clientdata);
+       }
+
+       ivug_name_view_destroy(pNameView);
+}
+
+static void _ivug_name_view_on_entry_changed(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_NameView *pNameView = (Ivug_NameView *)data;
+       IV_ASSERT(pNameView != NULL);
+
+       if (elm_object_focus_get(pNameView->editfield))
+       {
+               if (elm_entry_is_empty(obj))
+                       elm_object_signal_emit(pNameView->editfield, "elm,state,eraser,hide", "elm");
+               else
+                       elm_object_signal_emit(pNameView->editfield, "elm,state,eraser,show", "elm");
+       }
+
+       Evas_Object *entry;
+
+       entry = elm_object_part_content_get(pNameView->editfield, "elm.swallow.content");
+
+       char *content = elm_entry_markup_to_utf8 ( elm_entry_entry_get(entry) );
+
+       if (strlen(content) == 0)
+       {
+               MSG_IMAGEVIEW_HIGH("ISF1 : %s", content);
+               elm_object_part_text_set(pNameView->editfield, "elm.guidetext", IDS_ENTER_NAME);
+               //elm_object_disabled_set(pNameView->btn_done, EINA_TRUE);
+       }
+       else
+       {
+               MSG_IMAGEVIEW_HIGH("ISF : %s", content);
+               elm_object_part_text_set(pNameView->editfield, "elm.guidetext", IDS_NULL);
+               elm_object_disabled_set(pNameView->btn_done, EINA_FALSE);
+       }
+
+       free(content );
+
+}
+
+static void _ivug_name_view_on_entry_changed_user(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_IMAGEVIEW_HIGH("Entry changed by user");
+}
+
+static void _ivug_name_view_on_entry_focused(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_IMAGEVIEW_HIGH("_ivug_name_view_on_entry_focused");
+       if (!elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+       elm_object_signal_emit(data, "elm,state,guidetext,hide", "elm");
+}
+
+static void _ivug_name_view_on_entry_unfocused(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_IMAGEVIEW_HIGH("_ivug_name_view_on_entry_unfocused");
+       if (elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,guidetext,show", "elm");
+       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+}
+
+
+static void
+_ivug_name_view_eraser_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+       elm_entry_entry_set(data, "");
+}
+
+static Evas_Object *_ivug_name_view_editfield_create(void *data, Evas_Object *obj)
+{
+       Ivug_NameView *pNameView = (Ivug_NameView *)data;
+
+       Evas_Object *editfield = elm_layout_add(obj);
+       elm_layout_theme_set(editfield, "layout", "editfield", "default");
+
+       Evas_Object *entry = elm_entry_add(editfield);
+       elm_entry_single_line_set(entry, EINA_TRUE);
+       elm_entry_scrollable_set(entry, EINA_TRUE);
+
+       evas_object_smart_callback_add(entry, "activated", _ivug_rename_view_enter_click_cb, pNameView);
+       evas_object_smart_callback_add(entry, "changed", _ivug_name_view_on_entry_changed, pNameView);
+       evas_object_smart_callback_add(entry, "changed,user", _ivug_name_view_on_entry_changed_user, pNameView);
+       evas_object_smart_callback_add(entry, "focused", _ivug_name_view_on_entry_focused, editfield);
+       evas_object_smart_callback_add(entry, "unfocused", _ivug_name_view_on_entry_unfocused, editfield);
+
+       elm_object_part_content_set(editfield, "elm.swallow.content", entry);
+       elm_object_signal_callback_add(editfield, "elm,eraser,clicked", "elm", _ivug_name_view_eraser_clicked_cb, entry);
+
+       static Elm_Entry_Filter_Limit_Size limit_filter_data;
+       limit_filter_data.max_char_count = 64;
+       limit_filter_data.max_byte_count = 0;
+       elm_entry_markup_filter_append(entry, elm_entry_filter_limit_size, &limit_filter_data);
+
+       evas_object_smart_callback_add(entry, "maxlength,reached", _ivug_name_view_maxlength_reached, (void *) pNameView);
+
+       elm_object_part_text_set(editfield, "elm.guidetext", IDS_ENTER_NAME);
+
+       MSG_IMAGEVIEW_HIGH("entry = %s", elm_entry_entry_get(entry));
+
+       pNameView->entry = entry;
+
+       pNameView->editfield = editfield;
+
+       return pNameView->editfield;
+
+}
+
+static Evas_Object *_ivug_name_view_create_content(Ivug_NameView *pNameView, Evas_Object *parent)
+{
+       ivug_retvm_if(!pNameView, NULL, "pNameView is NULL");
+       ivug_retvm_if(!parent, NULL, "parent is NULL");
+
+       Eina_Bool ret = EINA_FALSE;
+
+       Evas_Object *content_lay = elm_layout_add(parent);
+       evas_object_size_hint_weight_set(content_lay, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_fill_set(content_lay, EVAS_HINT_FILL, EVAS_HINT_FILL );
+       ret = elm_layout_file_set(content_lay, EDJ_PATH"/ivug-name-view.edj", "name_view");
+       MSG_IMAGEVIEW_HIGH("ret is %d", ret);
+       ivug_retvm_if(ret == EINA_FALSE, NULL, "elm_layout_file_set ailed");
+
+       Evas_Object *editfield = _ivug_name_view_editfield_create(pNameView, content_lay);
+       elm_object_part_content_set(content_lay, "entry_part", editfield);
+
+       evas_object_show(editfield);
+
+       return content_lay;
+}
+
+Ivug_NameView *
+ivug_name_view_create(Evas_Object *parent, const char *title)
+{
+       MSG_IMAGEVIEW_HIGH( "... ");
+
+       IV_ASSERT(parent != NULL);
+
+       Ivug_NameView *pNameView = calloc(1, sizeof(Ivug_NameView));
+       // TODO : ASSERT
+       if ( pNameView == NULL)
+       {
+               MSG_IMAGEVIEW_ERROR("Cannot allocated memory");
+               return NULL;
+       }
+
+       pNameView->haptic_handle = INVALID_HAPTIC_HANDLE;               // Invalid
+
+       MSG_IMAGEVIEW_HIGH( "Add Name View creation");
+
+       pNameView->layout = ivug_default_layout_add(parent);
+
+       if ( pNameView->layout == NULL)
+       {
+               MSG_IMAGEVIEW_ERROR("Cannot create layout");
+               free(pNameView);
+               return NULL;
+       }
+
+       pNameView->bg = ivug_bg_add(pNameView->layout, IVUG_DEFAULT_BG_COLOR, IVUG_DEFAULT_BG_COLOR, IVUG_DEFAULT_BG_COLOR);
+
+       if ( pNameView->bg == NULL)
+       {
+               MSG_IMAGEVIEW_ERROR("Cannot create bg");
+               free(pNameView);
+               return NULL;
+       }
+
+       elm_object_part_content_set(pNameView->layout, "elm.swallow.bg", pNameView->bg);
+
+       Evas_Object *navi_bar;
+       navi_bar = elm_naviframe_add(pNameView->layout);
+
+       if ( navi_bar == NULL)
+       {
+               MSG_IMAGEVIEW_ERROR("Cannot create navigation bar");
+               free(pNameView);
+               return NULL;
+       }
+#ifdef USE_CUSTOM_STYLE
+       elm_object_theme_set(navi_bar, gGetSystemTheme());
+#endif
+       elm_object_style_set(navi_bar, "ivug/default");
+
+       elm_object_part_content_set(pNameView->layout, "elm.swallow.content", navi_bar );
+       evas_object_show(navi_bar);
+
+       pNameView->navibar = navi_bar;
+
+       pNameView->content = _ivug_name_view_create_content(pNameView, navi_bar);
+       if(pNameView->content == NULL)
+       {
+               MSG_IMAGEVIEW_ERROR("Cannot create navigation bar");
+               free(pNameView);
+               return NULL;
+       }
+
+       Evas_Object *cancel_button, *done_button;
+
+       cancel_button = ivug_button_add(navi_bar, NAVI_OPTION_BTN_STYLE, IDS_CANCEL, NULL, _ivug_name_view_cancel_cb, pNameView );
+
+       done_button = ivug_button_add(navi_bar, NAVI_OPTION_BTN_STYLE, IDS_DONE, NULL, _ivug_name_view_done_cb, pNameView );
+
+       pNameView->btn_done = done_button;
+
+       //elm_object_disabled_set(done_button, EINA_TRUE);
+
+       Elm_Object_Item *navi_it = NULL;
+       navi_it = elm_naviframe_item_push(pNameView->navibar, title, NULL, NULL, pNameView->content, NULL);
+
+       elm_entry_cursor_end_set(pNameView->entry);
+       evas_object_show(pNameView->entry);
+       elm_object_focus_set(pNameView->entry, EINA_TRUE);      // show keypad
+
+       elm_object_item_part_content_set(navi_it, "title_left_btn", done_button);
+       elm_object_item_part_content_set(navi_it, "title_right_btn", cancel_button);
+
+       return pNameView;
+}
+
+
+void
+ivug_name_view_destroy(Ivug_NameView *pNameView)
+{
+       ivug_ret_if(pNameView == NULL);
+
+       MSG_IMAGEVIEW_HIGH( "Destroy Name View");
+
+       if ( pNameView->haptic_handle != INVALID_HAPTIC_HANDLE )
+       {
+               ivug_vibration_stop(pNameView->haptic_handle);
+               ivug_vibration_delete(pNameView->haptic_handle);
+
+               pNameView->haptic_handle = INVALID_HAPTIC_HANDLE;
+       }
+
+
+       if(pNameView->layout)
+       {
+               evas_object_del(pNameView->layout);
+               pNameView->layout = NULL;
+       }
+
+       free(pNameView);
+       pNameView = NULL;
+
+       MSG_IMAGEVIEW_HIGH("Name view removed");
+}
+
+
+Evas_Object *
+ivug_name_view_object_get(Ivug_NameView *pNameView)
+{
+       IV_ASSERT(pNameView != NULL);
+
+       return pNameView->layout;
+
+}
+
+void
+ivug_name_view_set_response_callback(Ivug_NameView *pNameView, FNResponse resp, void *data)
+{
+       IV_ASSERT(pNameView != NULL);
+
+       if ( pNameView->fnresponse != NULL )
+       {
+               MSG_IMAGEVIEW_WARN("Old response callback is overwritten");
+       }
+
+       pNameView->fnresponse = resp;
+       pNameView->clientdata = data;
+
+}
+
+void
+ivug_name_view_set_title(Ivug_NameView *pNameView, const char *title)
+{
+       IV_ASSERT(pNameView!=NULL);
+
+       Elm_Object_Item *navi_it;
+
+       navi_it = elm_naviframe_top_item_get(pNameView->navibar);
+
+       elm_object_item_part_text_set(navi_it, "elm.text.title", title);
+}
+
+void
+ivug_name_view_set_entry(Ivug_NameView *pNameView, const char *str)
+{
+       IV_ASSERT(pNameView!=NULL);
+
+       elm_entry_entry_set(pNameView->entry, str);
+
+       elm_entry_cursor_end_set(pNameView->entry);
+}
+
+
diff --git a/main/src/view/ivug-setas-view-callerid.cpp b/main/src/view/ivug-setas-view-callerid.cpp
new file mode 100755 (executable)
index 0000000..f3f22c9
--- /dev/null
@@ -0,0 +1,653 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *       http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <Elementary.h>
+
+#include "ivug-setas-view-callerid.h"
+#include "ivug-setas-view.h"
+
+#include "ivug-selectioninfo.h"
+
+#include "ivug-image.h"
+#include "ivug-drm.h"
+#include "EFLUtil.h"
+#include "ivug-scissorbox.h"
+
+#define EDJ_PATH PREFIX"/res/edje/"PACKAGE
+
+#define SETAS_EDJ_FILE EDJ_PATH"/ivug-setas.edj"
+
+#define CLICK_TIME_MAX         (500)                           // click time.
+#define CLICK_WIDTH_MIN        (elm_config_finger_size_get() >> 1)     //click width, if mouse move under this value and under click time, it is click.
+#define CLICK_INTERVAL_TIME 0.15
+
+/* it is temp define, because scroll, scroll,anim,end is called earlyer.
+   So find bound of scissor box again after SETAS_INTERVAL_TIME */
+#define SETAS_INTERVAL_TIME 0.1
+#define SETAS_INTERVAL_TIME_FIRST_LOAD 0.3
+
+#define POPUP_ICON_DIRECTORY_PATH      IMAGE_PATH"/Popup_icon"
+
+#define CONTROL_ICON_DIRECTORY_PATH IMAGE_PATH"/01_Control icon"
+#define ICON_PATH_SAVE                         CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_save.png"
+#define ICON_PATH_PREV                         CONTROL_ICON_DIRECTORY_PATH"/00_winset_btn_prev.png"
+
+typedef struct {
+       Evas_Object *layout;
+       Evas_Object *btn_layout;                // ????
+       Evas_Object *notify;
+       Evas_Object *photocam;
+
+       Evas_Object *gesture;
+
+       Elm_Object_Item *btn_ok;
+       Elm_Object_Item *btn_cancel;
+
+       bool bShowMenu;         // Current state for button's visibility
+
+       char *drm_filepath;
+
+       Ecore_Timer *timer;
+
+       struct {
+               Evas_Object *box;
+               double ratio;
+
+               Eina_Bool bAspectPreserve;
+       } crop;
+
+
+} TSetAsData;
+
+#define SETAS_DATA(obj) \
+               (TSetAsData *)evas_object_data_get((Evas_Object *)(obj), "pSetAsData")
+
+
+
+static void
+_ConvertARGB888toY(unsigned char* pBuf, unsigned char* pGrayBuf, int width, int height)
+{
+/*
+       User should malloc output buffer
+*/
+       unsigned char* pSrc = (unsigned char*) pBuf;
+       unsigned char* pDSt = (unsigned char*) pGrayBuf;
+
+       unsigned char* pEnd = pDSt + height * width;
+
+       while (pDSt < pEnd)
+       {
+               pSrc++;         // throw Alpaha value
+
+               unsigned long r = *pSrc++;
+               unsigned long g = *pSrc++;
+               unsigned long b = *pSrc++;
+
+               *pDSt++ = (308 * r + 600 * g + 116 * b) >> 10;
+       }
+}
+
+static void _put_scissorbox(Evas_Object *obj)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(obj);
+
+       Evas_Object *image = ivug_image_internal_image_get(pSetAsData->photocam);
+
+       Evas_Coord_Rectangle rect;
+
+       {
+               int image_w = 0;
+               int image_h = 0;
+               double ratio = pSetAsData->crop.ratio;
+
+               ivug_image_image_size_get(pSetAsData->photocam, &image_w, &image_h);    // Get original image size.
+
+               int px, py, pw, ph;
+               ivug_image_region_get(pSetAsData->photocam,  &px, &py, &pw, &ph);
+
+               int ix, iy, iw, ih;
+
+               if ( image_w > image_h )        // Landscape image
+               {
+                       if(ratio > 1.0) // height is larger
+                       {
+                               iw = image_h / (2 * ratio);
+                               ih = image_h / 2;
+                       }
+                       else
+                       {
+                               iw = image_h / 2;
+                               ih = (image_h * ratio) / 2;
+                       }
+               }
+               else
+               {
+                       if(ratio > 1.0) // height is larger
+                       {
+                               iw = image_w / (2 * ratio);
+                               ih = image_w / 2;
+                       }
+                       else
+                       {
+                               iw = image_w / 2;
+                               ih = (image_w * ratio) / 2;
+                       }
+               }
+
+               ix = (image_w - iw)/2;
+               iy = (image_h - ih)/2;
+
+
+               rect.x = (double)ix * pw / image_w + px;
+               rect.y = (double)iy * ph / image_h + py;
+
+               rect.w = (double)iw * pw / image_w;
+               rect.h = (double)ih * ph / image_h;
+
+               MSG_SETAS_WARN("Zoom Put Box in LCD XYWH(%d,%d,%d,%d)",
+                       rect.x, rect.y, rect.w, rect.h);
+
+               ivug_scissorbox_region_set(pSetAsData->crop.box, rect.x, rect.y, rect.w, rect.h);
+
+       }
+
+       ivug_scissorbox_attach(pSetAsData->crop.box, image);            // Attach to photocam
+
+}
+
+static void
+_on_btn_ok_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(data);
+       IV_ASSERT(pSetAsData != NULL);
+
+       MSG_SETAS_HIGH("OK button clicked");
+#if 0
+
+       edje_object_signal_callback_del(_EDJ(pSetAsData->btn_layout),
+                                       "setasview,set,clicked",
+                                       "",
+                                       _on_btn_ok_clicked);
+#endif
+       evas_object_smart_callback_call(pSetAsData->layout, "ok,clicked", NULL);
+
+       if ( pSetAsData->crop.box )
+       {
+               evas_object_del(pSetAsData->crop.box);
+               pSetAsData->crop.box = NULL;
+       }
+
+}
+
+
+static void
+_on_btn_cancel_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(data);
+       IV_ASSERT(pSetAsData != NULL);
+
+       MSG_SETAS_HIGH("Cancel button clicked");
+       evas_object_smart_callback_call(pSetAsData->layout, "cancel,clicked", NULL);
+
+       if ( pSetAsData->crop.box )
+       {
+               evas_object_del(pSetAsData->crop.box);
+               pSetAsData->crop.box = NULL;
+       }
+
+//     _ivug_setas_view_remove(pSetAsData);
+}
+
+static Eina_Bool _on_detect_expired(void *data)
+{
+       ivug_retv_if(!data, ECORE_CALLBACK_CANCEL);
+
+       TSetAsData *pSetAsData = SETAS_DATA(data);
+
+       pSetAsData->timer = NULL;
+
+       _put_scissorbox(pSetAsData->layout);
+
+       elm_object_item_disabled_set(pSetAsData->btn_ok, EINA_FALSE);
+
+       evas_object_smart_callback_call(pSetAsData->layout, "loaded", NULL);
+
+       pSetAsData->notify = ivug_notify_create(pSetAsData->layout, IDS_CALLER_ID_NOTIFY);
+
+       return ECORE_CALLBACK_CANCEL;
+}
+
+
+static void
+_on_photocam_loaded(void *data, Evas_Object *obj, void *event_info)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(data);
+       MSG_SETAS_HIGH("Photocam preloaded");
+#if 0
+       typedef enum _Evas_Load_Error
+       {
+          EVAS_LOAD_ERROR_NONE = 0, /**< No error on load */
+          EVAS_LOAD_ERROR_GENERIC = 1, /**< A non-specific error occurred */
+          EVAS_LOAD_ERROR_DOES_NOT_EXIST = 2, /**< File (or file path) does not exist */
+          EVAS_LOAD_ERROR_PERMISSION_DENIED = 3, /**< Permission deinied to an existing file (or path) */
+          EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 4, /**< Allocation of resources failure prevented load */
+          EVAS_LOAD_ERROR_CORRUPT_FILE = 5, /**< File corrupt (but was detected as a known format) */
+          EVAS_LOAD_ERROR_UNKNOWN_FORMAT = 6 /**< File is not a known format */
+       } Evas_Load_Error; /**< Load error you can get from loading of files - see evas_load_error_str() too */
+#endif
+
+//     Evas_Load_Error error = static_cast<Evas_Load_Error>((int)event_info);
+       Evas_Load_Error error = evas_object_image_load_error_get(ivug_image_internal_image_get(obj));
+
+       if ( error != EVAS_LOAD_ERROR_NONE )
+       {
+               MSG_SETAS_ERROR("Error occured during decoding. Error=%d", error);
+
+               if ( error == EVAS_LOAD_ERROR_UNKNOWN_FORMAT )
+               {
+                       evas_object_smart_callback_call(pSetAsData->layout, "load,failed", (void *)SETAS_ERROR_TYPE_UNKNOWN_FORMAT);
+               }
+               else if ( error == EVAS_LOAD_ERROR_PERMISSION_DENIED )
+               {
+                       evas_object_smart_callback_call(pSetAsData->layout, "load,failed", (void *)SETAS_ERROR_TYPE_PERMISSION_DENIED);
+               }
+               else
+               {
+                       evas_object_smart_callback_call(pSetAsData->layout, "load,failed", (void *)SETAS_ERROR_TYPE_INVALID_FILE);
+               }
+
+               return;
+       }
+
+// Remove thumbnail
+       Evas_Object *object = elm_object_part_content_unset(pSetAsData->layout, "setasview.thumbnail");
+       if(object != NULL)
+       {
+               evas_object_del(object);
+       }
+
+       MSG_SETAS_HIGH("Photocam loaded.");
+
+       pSetAsData->timer = ecore_timer_add(0.5, _on_detect_expired, data);
+}
+
+
+static void _on_moved(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+//     TSetAsData *pSetAsData = SETAS_DATA(data);
+
+}
+
+static void _on_resized(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(data);
+       ///////////////////////////////////////////////////////////////////
+       int org_x, org_y, org_w, org_h;
+
+       ivug_image_region_get(pSetAsData->photocam, &org_x, &org_y, &org_w, &org_h);
+
+       if(org_w == 0 || org_h == 0)
+               return;
+
+       MSG_SETAS_MED("org_x=%d, org_y=%d, org_w=%d, org_h=%d", org_x, org_y, org_w, org_h);
+
+       int org_sx, org_sy, org_sw, org_sh;
+       ivug_scissorbox_region_get(pSetAsData->crop.box, &org_sx, &org_sy, &org_sw, &org_sh);
+
+       MSG_SETAS_MED("org_sx=%d, org_sy=%d, org_sw=%d, org_sh=%d", org_sx, org_sy, org_sw, org_sh);
+
+       int dx = org_sx-org_x;
+       int dy = org_sy-org_y;
+
+       int lcd_x, lcd_y, lcd_w, lcd_h;
+
+       evas_object_geometry_get(obj, &lcd_x, &lcd_y, &lcd_w, &lcd_h);
+       MSG_SETAS_MED("lcd_x=%d, lcd_y=%d, lcd_w=%d, lcd_h=%d", lcd_x, lcd_y, lcd_w, lcd_h);
+
+       int ph, pw;
+
+       int img_w, img_h;
+       int ext_w, ext_h;
+
+       img_w = org_w;
+       img_h = org_h;
+       ext_w = lcd_w;
+       ext_h = lcd_h;
+
+       ph = (img_h * ext_w) / img_w;
+
+       if (ph > ext_h)
+       {
+               pw = (img_w * ext_h) / img_h;
+               ph = ext_h;
+       }
+       else
+       {
+               pw = ext_w;
+       }
+
+       double zoom = 0.0;
+
+       if ( img_w > img_h)
+       {
+               zoom = (double)pw / img_w;
+       }
+       else
+       {
+               zoom = (double)ph / img_h;
+       }
+
+       int sx, sy, sw, sh;
+
+       sw = org_sw*zoom;
+       sh = org_sh*zoom;
+       dx *= zoom;
+       dy *= zoom;
+
+       sx = (ext_w-img_w*zoom)/2 + dx;
+       sy = (ext_h-img_h*zoom)/2 + dy;
+
+       ivug_scissorbox_boundary_set(pSetAsData->crop.box, (ext_w-img_w*zoom)/2, (ext_h-img_h*zoom)/2, img_w*zoom, img_h*zoom);
+
+       ///////////////////////////////////////////////////////////////////
+
+       MSG_SETAS_MED("sx=%d, sy=%d, sw=%d, sh=%d", sx, sy, sw, sh);
+
+       ivug_scissorbox_region_set(pSetAsData->crop.box, sx, sy, sw, sh);
+}
+
+static void _on_removed(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(data);
+
+       MSG_SETAS_HIGH("Remoing SetAsData");
+
+       if(pSetAsData->timer)
+       {
+               ecore_timer_del(pSetAsData->timer);
+               pSetAsData->timer = NULL;
+       }
+
+       if(pSetAsData->notify)
+       {
+               evas_object_del(pSetAsData->notify);
+               pSetAsData->notify = NULL;
+       }
+
+       if(pSetAsData->crop.box)
+       {
+               evas_object_del(pSetAsData->crop.box);
+               pSetAsData->crop.box = NULL;
+       }
+
+       if(pSetAsData->photocam)
+       {
+               evas_object_del(pSetAsData->photocam);
+               pSetAsData->photocam = NULL;
+       }
+
+       if(pSetAsData->drm_filepath)
+       {
+               ivug_remove_file(pSetAsData->drm_filepath);
+               free(pSetAsData->drm_filepath);
+               pSetAsData->drm_filepath = NULL;
+       }
+
+       free(pSetAsData);
+
+}
+
+static Evas_Event_Flags _finger_tap_end(void *data , void *event_info)
+{
+       Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
+
+       MSG_SETAS_HIGH("Finger tab end. evt=%d", p->timestamp);
+
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       TSetAsData *pSetAsData = (TSetAsData *)data;
+       IV_ASSERT(pSetAsData != NULL);
+
+       if(pSetAsData->bShowMenu)
+       {
+               MSG_SETAS_HIGH("Hide");
+               elm_win_indicator_mode_set((Evas_Object*)ug_get_window(), ELM_WIN_INDICATOR_HIDE);
+               evas_object_hide(pSetAsData->notify);
+               edje_object_signal_emit(_EDJ(pSetAsData->btn_layout), "elm,state,hide", "event");
+       }
+       else
+       {
+               MSG_SETAS_HIGH("Show");
+               elm_win_indicator_mode_set((Evas_Object*)ug_get_window(), ELM_WIN_INDICATOR_SHOW);
+               evas_object_show(pSetAsData->notify);
+               edje_object_signal_emit(_EDJ(pSetAsData->btn_layout), "elm,state,show", "event");
+       }
+
+       pSetAsData->bShowMenu = !pSetAsData->bShowMenu;
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+void _add_gesture_layer(Evas_Object *parent, TSetAsData *pSetAsData)
+{
+       IV_ASSERT(pSetAsData != NULL);
+
+       Evas_Object *gesture = pSetAsData->gesture;
+
+       gesture = elm_gesture_layer_add(parent);
+       elm_gesture_layer_hold_events_set(gesture, EINA_TRUE);
+
+       elm_gesture_layer_cb_set(gesture, ELM_GESTURE_N_TAPS, ELM_GESTURE_STATE_END, _finger_tap_end, (void *)pSetAsData);
+
+       if ( elm_gesture_layer_attach(gesture, pSetAsData->photocam) == EINA_FALSE)
+       {
+               MSG_SETAS_ERROR("Cannot attach event rect");
+       }
+
+       evas_object_name_set(gesture, "CallerID:Getsture");
+}
+
+Evas_Object *_ivug_setas_callerid_create_layout(Evas_Object *parent)
+{
+       TSetAsData *pSetAsData = (TSetAsData *)calloc(1, sizeof(TSetAsData));
+
+       if ( pSetAsData == NULL )
+       {
+               MSG_SETAS_ERROR("Cannot alloc pSetasData");
+               return NULL;
+       }
+
+       Elm_Object_Item *item[4];
+       Evas_Object *controlbar = NULL;
+
+       pSetAsData->layout = ivug_layout_add(parent , SETAS_EDJ_FILE, "setas_view");
+       if ( pSetAsData->layout == NULL )
+       {
+               MSG_SETAS_ERROR("Cannot create layout.");
+               goto error;
+       }
+       evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_MOVE, _on_moved, pSetAsData->layout);
+       evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_RESIZE, _on_resized, pSetAsData->layout);
+
+       pSetAsData->crop.box = ivug_scissorbox_add(pSetAsData->layout);
+
+       if ( pSetAsData->crop.box == NULL )
+       {
+               MSG_SETAS_ERROR("Cannot create layout.");
+               goto error;
+       }
+
+       evas_object_smart_member_add(pSetAsData->crop.box, pSetAsData->layout);
+// Create child
+       pSetAsData->btn_layout = ivug_layout_add(pSetAsData->layout , SETAS_EDJ_FILE, "setas_view_btn");
+       if ( pSetAsData->btn_layout == NULL )
+       {
+               MSG_SETAS_ERROR("Cannot create btn_layout.");
+               goto error;
+       }
+       evas_object_smart_member_add(pSetAsData->btn_layout, pSetAsData->layout);
+
+
+       Evas_Object *photocam;
+       photocam = ivug_image_create(pSetAsData->layout);
+       ivug_image_animated_set(photocam, EINA_FALSE);  // Show first frame only when AGIF
+       ivug_image_hold_set(photocam , EINA_TRUE);                      // Disable mouse events
+
+       evas_object_name_set(photocam, "setas_photocam");
+
+       evas_object_smart_callback_add(photocam, "loaded", _on_photocam_loaded, (void *)pSetAsData->layout);
+       elm_object_part_content_set(pSetAsData->layout, "setasview.photocam", photocam);
+       evas_object_show(photocam);
+
+       pSetAsData->photocam = photocam;
+
+       pSetAsData->bShowMenu = true;
+       _add_gesture_layer(pSetAsData->layout, pSetAsData);
+
+       controlbar = ivug_controlbar_add(pSetAsData->layout, "default");
+
+       item[0] = elm_toolbar_item_append(controlbar, ICON_PATH_SAVE, NULL, _on_btn_ok_clicked, (void *)pSetAsData->layout);
+       item[1] = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL);
+       item[2] = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL);
+       item[3] = elm_toolbar_item_append(controlbar, ICON_PATH_PREV, NULL, _on_btn_cancel_clicked, (void *)pSetAsData->layout);
+
+       elm_object_item_disabled_set(item[1], EINA_TRUE);
+       elm_object_item_disabled_set(item[2], EINA_TRUE);
+
+       pSetAsData->btn_layout = ivug_layout_add(pSetAsData->layout , SETAS_EDJ_FILE, "setas_view_btn");
+       if ( pSetAsData->btn_layout == NULL )
+       {
+               MSG_SETAS_ERROR("Cannot create btn_layout.");
+               goto error;
+       }
+
+       elm_object_part_content_set(pSetAsData->btn_layout, "controlbar", controlbar);
+
+       //Evas_Object *back_btn = ivug_button_add(controlbar, "naviframe/end_btn/default", IDS_BACK, NULL, _on_btn_cancel_clicked, pSetAsData->layout);
+
+       //elm_object_part_content_set(pSetAsData->btn_layout, "elm.swallow.prev_btn", back_btn);
+
+       evas_object_smart_member_add(pSetAsData->btn_layout, pSetAsData->layout);
+
+       pSetAsData->btn_ok = item[0];
+       pSetAsData->btn_cancel = item[3];
+       elm_object_item_disabled_set(pSetAsData->btn_ok, EINA_TRUE);
+
+       MSG_SETAS_HIGH("Create setas layout");
+
+       evas_object_data_set( pSetAsData->layout, "pSetAsData", pSetAsData);
+       evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_DEL, _on_removed, pSetAsData->layout);
+
+       return pSetAsData->layout;
+
+error:
+       if ( pSetAsData->crop.box )
+               evas_object_del(pSetAsData->crop.box);
+
+       if ( pSetAsData->btn_layout )
+               evas_object_del(pSetAsData->btn_layout);
+
+       if ( pSetAsData->layout )
+               evas_object_del(pSetAsData->layout);
+
+       if ( pSetAsData )
+               free(pSetAsData);
+
+       return NULL;
+}
+
+
+bool _ivug_setas_callerid_load_file(Evas_Object *obj, const char *filepath)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(obj);
+
+       MSG_SETAS_HIGH("Load image file : %s", filepath);
+
+       Evas_Load_Error error = EVAS_LOAD_ERROR_NONE;
+
+       if(ivug_drm_is_drm_file(filepath))
+       {
+               MSG_SETAS_HIGH("DRM File : %s", filepath);
+               error = EVAS_LOAD_ERROR_PERMISSION_DENIED;
+       }
+       else
+       {
+               error = ivug_image_file_set(pSetAsData->photocam, filepath, "noAnim");
+       }
+
+       if ( error != EVAS_LOAD_ERROR_NONE )
+       {
+               // TODO : What is good for error handing??????
+               MSG_SETAS_ERROR("FileSet Error=%d", error);
+
+               if ( error == EVAS_LOAD_ERROR_UNKNOWN_FORMAT )
+               {
+                       evas_object_smart_callback_call(pSetAsData->layout, "load,failed", (void *)SETAS_ERROR_TYPE_UNKNOWN_FORMAT);
+                       return false;
+               }
+               else if ( error == EVAS_LOAD_ERROR_PERMISSION_DENIED )
+               {
+                       evas_object_smart_callback_call(pSetAsData->layout, "load,failed", (void *)SETAS_ERROR_TYPE_PERMISSION_DENIED);
+                       return false;
+               }
+               else
+               {
+                       evas_object_smart_callback_call(pSetAsData->layout, "load,failed", (void *)SETAS_ERROR_TYPE_INVALID_FILE);
+                       return false;
+               }
+
+               return false;
+       }
+
+       return true;
+}
+
+Evas_Object *_ivug_setas_callerid_internal_image_get(Evas_Object *obj)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(obj);
+
+       MSG_SETAS_HIGH("Internal image get!");
+
+       return pSetAsData->photocam;
+}
+
+bool _ivug_setas_callerid_select_region_get(Evas_Object *obj, int *x, int *y, int *w, int *h)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(obj);
+
+       if ( pSetAsData->crop.box == NULL)
+       {
+               return false;
+       }
+
+       ivug_scissorbox_region_get(pSetAsData->crop.box, x, y, w, h);
+
+       return true;
+}
+
+
+void _ivug_setas_callerid_aspect_ratio_set(Evas_Object *obj, double ratio)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(obj);
+
+       pSetAsData->crop.bAspectPreserve = TRUE;
+       pSetAsData->crop.ratio = ratio;
+
+       ivug_scissorbox_ratio_fix( pSetAsData->crop.box, EINA_TRUE);
+}
+
+
+
diff --git a/main/src/view/ivug-setas-view-callerid.h b/main/src/view/ivug-setas-view-callerid.h
new file mode 100755 (executable)
index 0000000..fcdb17c
--- /dev/null
@@ -0,0 +1,49 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_SETAS_CALLERID_H__
+#define __IVUG_SETAS_CALLERID_H__
+
+#include "ivug-common.h"
+
+// This functions are used for Crop(AUL) and CallerID(UG)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+       "load,failed"                   - Image decoding error
+       "ok,clicked"                    - Button "OK" clicked
+       "cancel,clicked"                - Button "Cancel" clicked
+*/
+Evas_Object *_ivug_setas_callerid_create_layout(Evas_Object *parent);
+
+bool _ivug_setas_callerid_load_file(Evas_Object *obj, const char *filepath);
+
+Evas_Object *_ivug_setas_callerid_internal_image_get(Evas_Object *obj);
+
+bool _ivug_setas_callerid_select_region_get(Evas_Object *obj, int *x, int *y, int *w, int *h);
+
+void _ivug_setas_callerid_aspect_ratio_set(Evas_Object *obj, double ratio);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif //__IVUG_SETAS_CALLERID_H__
\ No newline at end of file
diff --git a/main/src/view/ivug-setas-view-wallpaper.cpp b/main/src/view/ivug-setas-view-wallpaper.cpp
new file mode 100755 (executable)
index 0000000..0360f13
--- /dev/null
@@ -0,0 +1,349 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *       http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <Elementary.h>
+
+#include "ivug-setas-view-wallpaper.h"
+#include "ivug-setas-view.h"
+
+#include "ivug-image.h"
+#include "ivug-drm.h"
+#include "EFLUtil.h"
+
+#define EDJ_PATH PREFIX"/res/edje/"PACKAGE
+
+#define SETAS_EDJ_FILE EDJ_PATH"/ivug-setas.edj"
+
+#define CLICK_TIME_MAX         (500)                           // click time.
+#define CLICK_WIDTH_MIN        (elm_config_finger_size_get() >> 1)     //click width, if mouse move under this value and under click time, it is click.
+#define CLICK_INTERVAL_TIME 0.15
+
+/* it is temp define, because scroll, scroll,anim,end is called earlyer.
+   So find bound of scissor box again after SETAS_INTERVAL_TIME */
+#define SETAS_INTERVAL_TIME 0.1
+#define SETAS_INTERVAL_TIME_FIRST_LOAD 0.3
+
+#define POPUP_ICON_DIRECTORY_PATH      IMAGE_PATH"/Popup_icon"
+
+#define CONTROL_ICON_DIRECTORY_PATH IMAGE_PATH"/01_Control icon"
+#define ICON_PATH_SAVE                         CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_save.png"
+#define ICON_PATH_PREV                         CONTROL_ICON_DIRECTORY_PATH"/00_winset_btn_prev.png"
+
+typedef struct {
+       Evas_Object *layout;
+       Evas_Object *btn_layout;                // ????
+       Evas_Object *photocam;
+
+       Evas_Object *btn_ok;
+       Evas_Object *btn_cancel;
+
+       bool bShowMenu;         // Current state for button's visibility
+
+       char *drm_filepath;
+} TSetAsData;
+
+#define SETAS_DATA(obj) \
+               (TSetAsData *)evas_object_data_get((Evas_Object *)(obj), "pSetAsData")
+
+
+static void
+_show_menu(Evas_Object *layout)
+{
+       IV_ASSERT(layout != NULL);
+
+
+}
+
+static void
+_hide_menu(Evas_Object *layout)
+{
+       IV_ASSERT(layout != NULL);
+
+}
+
+
+static void
+_on_btn_ok_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(data);
+       IV_ASSERT(pSetAsData != NULL);
+
+       MSG_SETAS_HIGH("OK button clicked");
+#if 0
+
+       edje_object_signal_callback_del(_EDJ(pSetAsData->btn_layout),
+                                       "setasview,set,clicked",
+                                       "",
+                                       _on_btn_ok_clicked);
+#endif
+
+       evas_object_smart_callback_call(pSetAsData->layout, "ok,clicked", NULL);
+}
+
+
+static void
+_on_btn_cancel_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(data);
+       IV_ASSERT(pSetAsData != NULL);
+
+       MSG_SETAS_HIGH("Cancel button clicked");
+       evas_object_smart_callback_call(pSetAsData->layout, "cancel,clicked", NULL);
+
+//     _ivug_setas_view_remove(pSetAsData);
+}
+
+static void
+_on_photocam_loaded(void *data, Evas_Object *obj, void *event_info)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(data);
+       MSG_SETAS_HIGH("Photocam preloaded");
+#if 0
+       typedef enum _Evas_Load_Error
+       {
+          EVAS_LOAD_ERROR_NONE = 0, /**< No error on load */
+          EVAS_LOAD_ERROR_GENERIC = 1, /**< A non-specific error occurred */
+          EVAS_LOAD_ERROR_DOES_NOT_EXIST = 2, /**< File (or file path) does not exist */
+          EVAS_LOAD_ERROR_PERMISSION_DENIED = 3, /**< Permission deinied to an existing file (or path) */
+          EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 4, /**< Allocation of resources failure prevented load */
+          EVAS_LOAD_ERROR_CORRUPT_FILE = 5, /**< File corrupt (but was detected as a known format) */
+          EVAS_LOAD_ERROR_UNKNOWN_FORMAT = 6 /**< File is not a known format */
+       } Evas_Load_Error; /**< Load error you can get from loading of files - see evas_load_error_str() too */
+#endif
+
+       Evas_Load_Error error = static_cast<Evas_Load_Error>((int)event_info);
+
+       if ( error != EVAS_LOAD_ERROR_NONE )
+       {
+               MSG_SETAS_ERROR("Error occured during decoding. Error=%d", error);
+
+               if ( error == EVAS_LOAD_ERROR_UNKNOWN_FORMAT )
+               {
+                       evas_object_smart_callback_call(pSetAsData->layout, "load,failed", (void *)SETAS_ERROR_TYPE_UNKNOWN_FORMAT);
+               }
+               else if ( error == EVAS_LOAD_ERROR_PERMISSION_DENIED )
+               {
+                       evas_object_smart_callback_call(pSetAsData->layout, "load,failed", (void *)SETAS_ERROR_TYPE_PERMISSION_DENIED);
+               }
+               else
+               {
+                       evas_object_smart_callback_call(pSetAsData->layout, "load,failed", (void *)SETAS_ERROR_TYPE_INVALID_FILE);
+               }
+
+               return;
+       }
+
+// Remove thumbnail
+       Evas_Object *object = elm_object_part_content_unset(pSetAsData->layout, "setasview.thumbnail");
+       if(object != NULL)
+       {
+               evas_object_del(object);
+       }
+
+       MSG_SETAS_HIGH("Photocam loaded.");
+       elm_object_disabled_set(pSetAsData->btn_ok, EINA_FALSE);
+
+
+       evas_object_smart_callback_call(pSetAsData->layout, "loaded", NULL);
+
+
+}
+
+
+static void _on_moved(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+//     TSetAsData *pSetAsData = SETAS_DATA(data);
+
+}
+
+static void _on_resized(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+//     TSetAsData *pSetAsData = SETAS_DATA(data);
+
+}
+
+static void _on_removed(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(data);
+
+       MSG_SETAS_HIGH("Remoing SetAsData");
+
+       if(pSetAsData->photocam)
+       {
+               evas_object_del(pSetAsData->photocam);
+               pSetAsData->photocam = NULL;
+       }
+
+       if(pSetAsData->drm_filepath)
+       {
+               ivug_remove_file(pSetAsData->drm_filepath);
+               free(pSetAsData->drm_filepath);
+               pSetAsData->drm_filepath = NULL;
+       }
+
+       free(pSetAsData);
+
+}
+
+
+static void
+_on_bg_clicked(void *data, Evas_Object* obj, const char *emission, const char *source )
+{
+       MSG_SETAS_HIGH("BG Clicked");
+
+       TSetAsData *pSetAsData = SETAS_DATA(data);
+
+       MSG_SETAS_HIGH("Bar flag is = %d", pSetAsData->bShowMenu);
+       if(pSetAsData->bShowMenu == true)
+       {
+               pSetAsData->bShowMenu = false;
+               _hide_menu(pSetAsData->btn_layout);
+       }
+       else
+       {
+               pSetAsData->bShowMenu = true;
+               _show_menu(pSetAsData->btn_layout);
+       }
+}
+
+Evas_Object *_ivug_setas_create_layout(Evas_Object *parent)
+{
+       TSetAsData *pSetAsData = (TSetAsData *)calloc(1, sizeof(TSetAsData));
+
+       if ( pSetAsData == NULL )
+       {
+               MSG_SETAS_ERROR("Cannot alloc pSetasData");
+               return NULL;
+       }
+
+       pSetAsData->layout = ivug_layout_add(parent , SETAS_EDJ_FILE, "setas_view");
+       if ( pSetAsData->layout == NULL )
+       {
+               MSG_SETAS_ERROR("Cannot create layout.");
+               free(pSetAsData);
+               return NULL;
+       }
+       evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_MOVE, _on_moved, pSetAsData->layout);
+       evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_RESIZE, _on_resized, pSetAsData->layout);
+
+       Evas_Object *photocam;
+       photocam = ivug_image_create(pSetAsData->layout);
+       ivug_image_animated_set(photocam, EINA_FALSE);  // Show first frame only when AGIF
+       evas_object_name_set(photocam, "setas_photocam");
+
+       evas_object_smart_callback_add(photocam, "loaded", _on_photocam_loaded, (void *)pSetAsData->layout);
+       elm_object_part_content_set(pSetAsData->layout, "setasview.photocam", photocam);
+       evas_object_show(photocam);
+
+       pSetAsData->photocam = photocam;
+
+       Evas_Object *controlbar = ivug_controlbar_add(pSetAsData->layout, "default");
+       Elm_Object_Item *item[4];
+
+       item[0] = elm_toolbar_item_append(controlbar, ICON_PATH_SAVE, NULL, _on_btn_ok_clicked, (void *)pSetAsData->layout);
+       item[1] = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL);
+       item[2] = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL);
+       item[3] = elm_toolbar_item_append(controlbar, ICON_PATH_PREV, NULL, _on_btn_cancel_clicked, (void *)pSetAsData->layout);
+
+       elm_object_item_disabled_set(item[1], EINA_TRUE);
+       elm_object_item_disabled_set(item[2], EINA_TRUE);
+
+       pSetAsData->btn_layout = ivug_layout_add(pSetAsData->layout , SETAS_EDJ_FILE, "setas_view_btn");
+       if ( pSetAsData->btn_layout == NULL )
+       {
+               MSG_SETAS_ERROR("Cannot create btn_layout.");
+               evas_object_del(pSetAsData->layout);
+               free(pSetAsData);
+               return NULL;
+       }
+
+       elm_object_part_content_set(pSetAsData->btn_layout, "controlbar", controlbar);
+
+       //Evas_Object *back_btn = ivug_button_add(controlbar, "naviframe/end_btn/default", IDS_BACK, NULL, _on_btn_cancel_clicked, pSetAsData->layout);
+
+       //elm_object_part_content_set(pSetAsData->btn_layout, "elm.swallow.prev_btn", back_btn);
+
+       evas_object_smart_member_add(pSetAsData->btn_layout, pSetAsData->layout);
+
+       edje_object_signal_callback_add(_EDJ(pSetAsData->layout),
+                               "setasview,bg,clicked", "edc",
+                               _on_bg_clicked,
+                               (void *)pSetAsData->layout);
+
+       pSetAsData->bShowMenu = true;
+       elm_object_disabled_set(pSetAsData->btn_ok, EINA_TRUE);
+
+       MSG_SETAS_HIGH("Create setas layout");
+
+       evas_object_data_set(pSetAsData->layout, "pSetAsData", pSetAsData);
+       evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_DEL, _on_removed, pSetAsData->layout);
+
+       return pSetAsData->layout;
+}
+
+bool _ivug_setas_load_file(Evas_Object *obj, const char *filepath)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(obj);
+
+       MSG_SETAS_HIGH("Load image file : %s", filepath);
+
+       Evas_Load_Error error = EVAS_LOAD_ERROR_NONE;
+
+       if(ivug_drm_is_drm_file(filepath))
+       {
+               MSG_SETAS_HIGH("DRM File : %s", filepath);
+               error = EVAS_LOAD_ERROR_PERMISSION_DENIED;
+       }
+       else
+       {
+               error = ivug_image_file_set(pSetAsData->photocam, filepath, "noAnim");
+       }
+
+       if ( error != EVAS_LOAD_ERROR_NONE )
+       {
+               // TODO : What is good for error handing??????
+               MSG_SETAS_ERROR("FileSet Error=%d", error);
+
+               if ( error == EVAS_LOAD_ERROR_UNKNOWN_FORMAT )
+               {
+                       evas_object_smart_callback_call(pSetAsData->layout, "load,failed", (void *)SETAS_ERROR_TYPE_UNKNOWN_FORMAT);
+                       return false;
+               }
+               else if ( error == EVAS_LOAD_ERROR_PERMISSION_DENIED )
+               {
+                       evas_object_smart_callback_call(pSetAsData->layout, "load,failed", (void *)SETAS_ERROR_TYPE_PERMISSION_DENIED);
+                       return false;
+               }
+               else
+               {
+                       evas_object_smart_callback_call(pSetAsData->layout, "load,failed", (void *)SETAS_ERROR_TYPE_INVALID_FILE);
+                       return false;
+               }
+
+               return false;
+       }
+
+       return true;
+}
+
+Evas_Object *_ivug_setas_internal_image_get(Evas_Object *obj)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(obj);
+
+       return pSetAsData->photocam;
+}
+
+
diff --git a/main/src/view/ivug-setas-view-wallpaper.h b/main/src/view/ivug-setas-view-wallpaper.h
new file mode 100755 (executable)
index 0000000..090a7fa
--- /dev/null
@@ -0,0 +1,43 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_SETAS_WALLPAPER_H__
+#define __IVUG_SETAS_WALLPAPER_H__
+
+#include "ivug-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+       "load,failed"                   - Image decoding error
+       "ok,clicked"                    - Button "OK" clicked
+       "cancel,clicked"                - Button "Cancel" clicked
+*/
+Evas_Object *_ivug_setas_create_layout(Evas_Object *parent);
+
+bool _ivug_setas_load_file(Evas_Object *obj, const char *filepath);
+
+Evas_Object *_ivug_setas_internal_image_get(Evas_Object *obj);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif //__IVUG_SETAS_WALLPAPER_H__
\ No newline at end of file
diff --git a/medialist/CMakeLists.txt b/medialist/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..810ad7d
--- /dev/null
@@ -0,0 +1,50 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(ivug_medialist C CXX)
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(VERSION 0.1.0)
+
+INCLUDE_DIRECTORIES(
+       include
+       src
+       ${CMAKE_SOURCE_DIR}/include
+       ${IVUG_SOURCE_COMMON_DIR}/include
+       ${IVUG_SOURCE_FEATURE_DIR}/include
+)
+
+SET(SRCS
+       src/ivug-medialist.c
+       src/ivug-mediadata.c
+       src/ivug-data-list.c
+)
+
+MESSAGE("Checking " ${PROJECT_NAME}\r)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(${PROJECT_NAME}_pkgs REQUIRED
+       elementary
+       dlog
+       ui-gadget-1
+       eina
+       ecore
+       capi-content-media-content
+)
+
+FOREACH(flag ${${PROJECT_NAME}_pkgs_CFLAGS})
+       SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -Wall")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS}")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION} )
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${${PROJECT_NAME}_pkgs_LDFLAGS}
+ivug_common ivug_feature)
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib)
+
diff --git a/medialist/include/ivug-media.h b/medialist/include/ivug-media.h
new file mode 100755 (executable)
index 0000000..6d65b2f
--- /dev/null
@@ -0,0 +1,74 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_MEDIA_H__
+#define __IVUG_MEDIA_H__
+
+#include "ivug-datatypes.h"
+#include "ivug-db.h"
+
+#include <Eina.h>
+#include <stdbool.h>
+
+//slide type
+typedef enum {
+       SLIDE_TYPE_NONE = 0x00,
+       SLIDE_TYPE_IMAGE,
+       SLIDE_TYPE_VIDEO,
+       SLIDE_TYPE_STREAMING,
+       SLIDE_TYPE_UNKNOWN,             // File is exists but it's type is unknown.
+} Media_Type;
+
+// Meida_Data can be one in File, DB, PTP, DLNA
+
+/*
+       This struct represents data for slide.
+       thumbnail_path is slide's thumbnail image path.
+       fileurl is saved item in media service. and drm.
+       filepath is local file path. if fileurl is http://.../test.jpg, filepath is NULL, when complete download filepath change to saved local file path.
+*/
+typedef struct {
+       media_handle m_hadle;
+
+       int index;
+
+//Data
+       Media_Type slide_type;                  //image, video
+       bool bIsDRMContent;
+
+       UUID mediaID;                                   // Unique Media ID
+
+       char* thumbnail_path;                   // thumbnail image file path.
+       char* fileurl;                                  // file url.
+       char* filepath;                                 // file path in local file system.
+       char* drm_filepath;
+} Media_Data;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+bool ivug_mediadata_delete(Media_Data * mdata);
+
+bool ivug_mediadata_free(Media_Data * mdata);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __IVUG_MEDIA_H__
diff --git a/medialist/include/ivug-medialist.h b/medialist/include/ivug-medialist.h
new file mode 100755 (executable)
index 0000000..aa89b11
--- /dev/null
@@ -0,0 +1,101 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_MEDIALIST_H__
+#define __IVUG_MEDIALIST_H__
+
+#include "ivug-datatypes.h"
+#include "ivug-media.h"
+
+#include "ivug-define.h"
+
+typedef void *Media_Item;
+
+typedef enum {
+       FILTER_DB,
+}filter_type_e;
+
+typedef struct _DB_Filter{
+
+       union {         /*      CAUTION : Union type. check view_by variable before free()*/
+               char *file_path;
+               struct {
+                       double max_longitude;
+                       double min_longitude;
+                       double max_latitude;
+                       double min_latitude;
+               } place;
+
+               UUID album_id;          // Cluster id
+       };
+
+} DB_Filter;
+
+typedef struct _Filter_struct{
+       filter_type_e type;
+       ivug_view_by view_by;
+       ivug_media_type media_type;
+       ivug_sort_type sort_type;
+       int index;
+
+       DB_Filter *db_filter;
+}Filter_struct;
+
+
+/* Opaque pointer for media list. */
+typedef void *Media_List;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+Media_List * ivug_medialist_create();
+
+Media_Item * ivug_medialist_find_item_by_filename(Media_List *mList, const char* filepath);
+
+Media_Item *ivug_medialist_load(Media_List *mList, const Filter_struct *filter);
+
+void ivug_medialist_del(Media_List *mList);
+
+/*
+       return total count
+*/
+int ivug_medialist_get_count(Media_List *mList);
+
+int ivug_medialist_get_index(Media_List *mList, Media_Item *item);
+
+
+Media_Item *ivug_medialist_get_first(Media_List *mList);
+Media_Item *ivug_medialist_get_last(Media_List *mList);
+
+Media_Item *ivug_medialist_get_next(Media_List *mList, Media_Item *item);
+Media_Item *ivug_medialist_get_prev(Media_List *mList, Media_Item *item);
+
+void ivug_medialist_delete_item(Media_List *mList, Media_Item *item);
+
+Media_Data *ivug_medialist_get_data(Media_Item *item);
+
+Media_Item *ivug_medialist_get_random_item(Media_List *mList);
+Media_Item *ivug_medialist_get_shuffle_item(Media_List *mList, Media_Item *item);
+
+Media_Item *ivug_medialist_find_item_by_index(Media_List *mList, int index);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //__IVUG_MEDIALIST_H__
+
diff --git a/medialist/src/ivug-data-list.c b/medialist/src/ivug-data-list.c
new file mode 100755 (executable)
index 0000000..71fface
--- /dev/null
@@ -0,0 +1,273 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-data-list.h"
+#include "ivug-uuid.h"
+
+#include "ivug-debug.h"
+#include "ivug-media.h"
+#include "ivug-mediadata.h"
+#include "ivug-medialist.h"
+
+#include "ivug-db.h"
+
+#include <Eina.h>
+
+#include <media_content.h>
+
+static char *_strerror_db(int error)
+{
+       switch(error)
+       {
+       case MEDIA_CONTENT_ERROR_INVALID_PARAMETER:
+               return "Invalid parameter";
+       case MEDIA_CONTENT_ERROR_OUT_OF_MEMORY :
+               return "Out of memory";
+       case MEDIA_CONTENT_ERROR_DB_FAILED :
+               return "DB operation failed";
+       default:
+               {
+                       static char buf[40];
+                       sprintf(buf, "Error Code=%d", error);
+                       return buf;
+               }
+
+       }
+}
+
+//Eina List Function.
+
+static bool
+_ivug_list_media_item_cb(media_info_h item, void *user_data)
+{
+       IV_ASSERT(user_data != NULL);
+
+       media_info_h media = NULL;
+       media_info_clone(&media, item);
+
+       Eina_List **list = (Eina_List **)user_data;
+       *list = eina_list_append(*list, media);
+
+       return true;
+}
+
+
+Eina_List *
+ivug_list_load_DB_items(const Filter_struct *filter, int stp, int endp)
+{
+       IV_ASSERT(filter != NULL);
+
+       DB_Filter *db_filter = filter->db_filter;
+       char *string = NULL;
+
+       if (filter->view_by == IVUG_VIEW_BY_FILE)
+       {
+               Eina_List *list = NULL;
+               Media_Data *mData = ivug_alloc_mediadata_from_filepath(db_filter->file_path);
+
+               list = eina_list_append(list, mData);
+               return list;
+       }
+
+       filter_handle media_filter = NULL;
+       ivug_db_create_filter(&media_filter);
+
+       if(filter->view_by == IVUG_VIEW_BY_PLACES)
+       {
+               string = calloc(1, sizeof(char)*IVUG_MAX_CONDITION_LEN);
+               snprintf(string, IVUG_MAX_CONDITION_LEN,
+                       "(MEDIA_LONGITUDE >= %f AND MEDIA_LONGITUDE <= %f AND MEDIA_LATITUDE >= %f AND MEDIA_LATITUDE <= %f)",
+                       db_filter->place.min_longitude, db_filter->place.max_longitude,
+                       db_filter->place.min_latitude, db_filter->place.max_latitude);
+       }
+       ivug_db_set_filter(media_filter, filter->view_by, filter->media_type, string);
+
+       ivug_db_set_filter_offset(media_filter, stp, endp);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       Eina_List *item_list = NULL;
+
+       switch(filter->view_by)
+       {
+               case IVUG_VIEW_BY_FOLDER:
+                       ret = media_folder_foreach_media_from_db(db_filter->album_id,
+                                               media_filter, _ivug_list_media_item_cb, &item_list);
+                       break;
+
+               case IVUG_VIEW_BY_ALL:
+                       ret = media_info_foreach_media_from_db(media_filter, _ivug_list_media_item_cb, &item_list);
+                       break;
+
+               case IVUG_VIEW_BY_FAVORITES:
+                       ret = media_info_foreach_media_from_db(media_filter, _ivug_list_media_item_cb, &item_list);
+                       break;
+
+               case IVUG_VIEW_BY_PLACES:
+                       ret = media_info_foreach_media_from_db(media_filter, _ivug_list_media_item_cb, &item_list);
+                       break;
+
+               default:
+                       MSG_SDATA_FATAL("Invalid View By=%d", filter->view_by);
+                       return NULL;
+       }
+
+       ivug_db_destroy_filter(media_filter);
+
+       if ( ret != MEDIA_CONTENT_ERROR_NONE )
+       {
+               MSG_SDATA_ERROR("[%s] Error=%d VieBy=%d", __func__, ret, filter->view_by);
+               return NULL;
+       }
+
+// Creating media_list.
+       Eina_List *slide_list = NULL;
+
+       Eina_List *item;
+       media_info_h mitem = NULL;
+
+       Media_Data *mdata = NULL;
+
+       int i = 0;
+
+       EINA_LIST_FOREACH(item_list, item, mitem)
+       {
+               mdata = ivug_alloc_mediadata_from_media_handle(mitem);
+               mdata->index = i + stp;
+
+               i++;
+
+               IV_ASSERT(mdata != NULL);
+
+               MSG_SDATA_LOW("Add Mdata. Mdata=0x%08x %s", mdata, mdata->filepath);
+               slide_list = eina_list_append(slide_list, mdata);
+       }
+
+       EINA_LIST_FREE(item_list, mitem)
+       {
+               media_info_destroy(mitem);
+       }
+
+       MSG_SDATA_HIGH("Item header=0x%08x Item loaded(%d~%d)", slide_list, stp, endp);
+
+       return slide_list;
+}
+
+int ivug_list_get_item_cnt(const Filter_struct *filter)
+{
+       filter_h media_filter = NULL;
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       int count = 0;
+
+       char *string = NULL;
+
+       DB_Filter *db_filter = filter->db_filter;
+
+       ivug_db_create_filter((filter_handle*)&media_filter);
+       if(filter->view_by == IVUG_VIEW_BY_PLACES)
+       {
+               string = calloc(1, sizeof(char)*IVUG_MAX_CONDITION_LEN);
+               snprintf(string, IVUG_MAX_CONDITION_LEN,
+                       "(MEDIA_LONGITUDE >= %f AND MEDIA_LONGITUDE <= %f AND MEDIA_LATITUDE >= %f AND MEDIA_LATITUDE <= %f)",
+                       db_filter->place.min_longitude, db_filter->place.max_longitude,
+                       db_filter->place.min_latitude, db_filter->place.max_latitude);
+       }
+       ivug_db_set_filter(media_filter, filter->view_by, filter->media_type, string);
+
+       switch(filter->view_by)
+       {
+               case IVUG_VIEW_BY_ALL:
+                       ret = media_info_get_media_count_from_db(media_filter, &count);
+                       if(ret != MEDIA_CONTENT_ERROR_NONE)
+                       {
+                               MSG_SDATA_ERROR("media_info_get_media_count_from_db is failed, err = %s", _strerror_db(ret));
+                               goto GET_COUNT_ERROR;
+                       }
+                       MSG_SDATA_HIGH("IVUG_VIEW_BY_ALL. MediaType=%d Count=%d", filter->media_type, count);
+                       break;
+               case IVUG_VIEW_BY_PLACES:
+                       ret = media_info_get_media_count_from_db(media_filter, &count);
+                       if(ret != MEDIA_CONTENT_ERROR_NONE)
+                       {
+                               MSG_SDATA_ERROR("media_info_get_media_count_from_db is failed, err = %s", _strerror_db(ret));
+                               goto GET_COUNT_ERROR;
+                       }
+                       MSG_SDATA_HIGH("IVUG_VIEW_BY_PLACES. Count=%d", count);
+                       break;
+               case IVUG_VIEW_BY_FOLDER:
+                       if(db_filter->album_id == NULL)
+                       {
+                               MSG_SDATA_ERROR("album_id is NULL");
+                               goto GET_COUNT_ERROR;
+                       }
+                       ret = media_folder_get_media_count_from_db(db_filter->album_id, media_filter, &count);
+                       if(ret != MEDIA_CONTENT_ERROR_NONE)
+                       {
+                               MSG_SDATA_ERROR("media_folder_get_media_count_from_db is failed, err = %s", _strerror_db(ret));
+                               goto GET_COUNT_ERROR;
+                       }
+                       MSG_SDATA_HIGH("IVUG_VIEW_BY_FOLDER. Count=%d", count);
+                       break;
+               case IVUG_VIEW_BY_FAVORITES:
+                       ret = media_info_get_media_count_from_db(media_filter, &count);
+                       if(ret != MEDIA_CONTENT_ERROR_NONE)
+                       {
+                               MSG_SDATA_ERROR("media_info_get_media_count_from_db is failed, err = %s", _strerror_db(ret));
+                               goto GET_COUNT_ERROR;
+                       }
+                       MSG_SDATA_HIGH("IVUG_VIEW_BY_FAVORITES. Count=%d", count);
+                       break;
+               case IVUG_VIEW_BY_FILE:
+                       count = 1;      // item count is always 1 when by file
+                       break;
+               default:
+                       MSG_SDATA_ERROR("Unhandled view_by : %d", filter->view_by);
+                       goto GET_COUNT_ERROR;
+                       break;
+       }
+
+       MSG_SDATA_HIGH("ivug_db_get_count success, count = %d", count);
+
+       ivug_db_destroy_filter(media_filter);
+       return count;
+
+GET_COUNT_ERROR:
+       MSG_SDATA_ERROR("ivug_db_get_count FAILED");
+
+       ivug_db_destroy_filter(media_filter);
+       return -1;
+}
+
+void ivug_list_delete_items(Eina_List *items)
+{
+       Media_Data* mdata;
+
+       if ( items == NULL )
+       {
+               MSG_SDATA_HIGH("Item list is NULL.");
+               return;
+       }
+
+       MSG_SDATA_HIGH("Removing items. Count=%d", eina_list_count(items));
+
+       EINA_LIST_FREE(items, mdata)
+       {
+               ivug_free_mediadata(mdata);
+       }
+}
+
diff --git a/medialist/src/ivug-data-list.h b/medialist/src/ivug-data-list.h
new file mode 100755 (executable)
index 0000000..94fd945
--- /dev/null
@@ -0,0 +1,41 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_DATA_LIST_H__
+#define __IVUG_DATA_LIST_H__
+
+#include "ivug-medialist.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+       stp/endp is botn -1 when want to retrieve all items.
+*/
+Eina_List *ivug_list_load_DB_items(const Filter_struct *filter, int stp, int endp);
+
+int ivug_list_get_item_cnt(const Filter_struct *filter);
+
+void ivug_list_delete_items(Eina_List *items);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
diff --git a/medialist/src/ivug-mediadata.c b/medialist/src/ivug-mediadata.c
new file mode 100755 (executable)
index 0000000..b593bea
--- /dev/null
@@ -0,0 +1,380 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-define.h"
+#include "ivug-datatypes.h"
+#include "ivug-uuid.h"
+#include "ivug-debug.h"
+#include "ivug-mediadata.h"
+#include "ivug-util.h"
+#include "ivug-drm.h"
+#include "ivug-file-info.h"
+
+#include "ivug-db.h"
+
+#include <media_content.h>
+
+#define IMAGE_PATH             PREFIX"/res/images/"PACKAGE
+#define DEFAULT_THUMBNAIL_PATH         IMAGE_PATH"/T01_Nocontents_broken.png"
+
+static char *_strerror_db(int error)
+{
+       switch(error)
+       {
+       case MEDIA_CONTENT_ERROR_INVALID_PARAMETER:
+               return "Invalid parameter";
+       case MEDIA_CONTENT_ERROR_OUT_OF_MEMORY :
+               return "Out of memory";
+       case MEDIA_CONTENT_ERROR_DB_FAILED :
+               return "DB operation failed";
+       default:
+               {
+                       static char buf[40];
+                       sprintf(buf, "Error Code=%d", error);
+                       return buf;
+               }
+
+       }
+}
+
+Media_Data *ivug_alloc_mediadata_from_media_handle(media_handle media)
+{
+       IV_ASSERT(media != NULL);
+
+       Media_Data * mdata = NULL;
+       mdata = (Media_Data *) calloc(1, sizeof(Media_Data));
+       if (mdata == NULL)
+       {
+               MSG_SDATA_ERROR("Cannot allocate memory");
+               return NULL;
+       }
+
+       media_info_h item = (media_info_h)media;
+
+       int ret = media_info_clone((media_info_h*)&(mdata->m_hadle), item);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_SDATA_ERROR("media_info_foreach_media_from_db is failed, err = %s", _strerror_db(ret));
+               goto ALLOC_MHANDLE_ERROR;
+       }
+
+       char *uuid = NULL;
+
+       ret = media_info_get_media_id(item, &uuid);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_SDATA_ERROR("media_info_foreach_media_from_db is failed, err = %s", _strerror_db(ret));
+               goto ALLOC_MHANDLE_ERROR;
+       }
+       mdata->mediaID = uuid_assign(uuid);
+       free(uuid);
+
+       //file url
+       ret = media_info_get_file_path(item, &(mdata->fileurl));
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_SDATA_ERROR("media_info_foreach_media_from_db is failed, err = %s", _strerror_db(ret));
+               goto ALLOC_MHANDLE_ERROR;
+       }
+       if (mdata->fileurl == NULL)
+       {
+               goto ALLOC_MHANDLE_ERROR;
+       }
+
+       ret = media_info_get_thumbnail_path(item, &(mdata->thumbnail_path));
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_SDATA_ERROR("media_info_foreach_media_from_db is failed, err = %s", _strerror_db(ret));
+               goto ALLOC_MHANDLE_ERROR;
+       }
+       if(mdata->thumbnail_path == NULL)
+       {
+               mdata->thumbnail_path = strdup(DEFAULT_THUMBNAIL_PATH);
+       }
+
+       ret = media_info_is_drm(item, &(mdata->bIsDRMContent));
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_SDATA_ERROR("media_info_foreach_media_from_db is failed, err = %s", _strerror_db(ret));
+               goto ALLOC_MHANDLE_ERROR;
+       }
+
+       media_content_type_e media_type = 0;
+       ret = media_info_get_media_type(item, &media_type);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_SDATA_ERROR("media_info_foreach_media_from_db is failed, err = %s", _strerror_db(ret));
+               goto ALLOC_MHANDLE_ERROR;
+       }
+
+       if(media_type == MEDIA_CONTENT_TYPE_IMAGE)
+       {
+               MSG_SDATA_MED("Local image : %s. %s", uuid_getchar( mdata->mediaID ), mdata->fileurl);
+
+               mdata->slide_type = SLIDE_TYPE_IMAGE;
+               mdata->filepath = strdup(mdata->fileurl);
+
+               if (ivug_drm_is_drm_file(mdata->filepath) == EINA_TRUE)
+               {
+                       mdata->bIsDRMContent = EINA_TRUE;
+               }
+
+       }
+       else if(media_type == MEDIA_CONTENT_TYPE_VIDEO)
+       {
+               MSG_SDATA_MED("Local video : %s. %s", uuid_getchar(mdata->mediaID), mdata->fileurl);
+
+               mdata->slide_type = SLIDE_TYPE_VIDEO;
+               mdata->filepath = strdup(mdata->fileurl);
+
+               if (ivug_drm_is_drm_file(mdata->filepath) == EINA_TRUE)
+               {
+                       mdata->bIsDRMContent = EINA_TRUE;
+               }
+
+       }
+
+       return mdata;
+
+ALLOC_MHANDLE_ERROR:
+       if(mdata)
+       {
+               ivug_free_mediadata(mdata);
+       }
+       return NULL;
+}
+
+Media_Data *ivug_alloc_mediadata_from_filepath(const char *filepath)
+{
+       IV_ASSERT(filepath != NULL);
+
+       Media_Data * mdata = NULL;
+
+       media_handle m_handle = ivug_db_get_file_handle(filepath);
+       if(m_handle)
+       {
+               mdata = ivug_alloc_mediadata_from_media_handle(m_handle);
+               if(mdata != NULL)
+               {
+                       MSG_SDATA_HIGH("File path founded in DB.");
+                       return mdata;
+               }
+       }
+       // Some file does not have media handle ex) USB host, Not inserted in DB yet
+
+       MSG_SDATA_WARN("Cannot find in DB.");
+
+       mdata = (Media_Data *) calloc(1, sizeof(Media_Data));
+       if (mdata == NULL)
+       {
+               MSG_SDATA_ERROR("Cannot allocate memory");
+               return NULL;
+       }
+       mdata->mediaID = INVALID_UUID;  //copy id WMitem
+
+       if (ivug_drm_is_drm_file(filepath) == EINA_TRUE)
+       {
+               mdata->bIsDRMContent = true;
+       }
+       char *mime_type = NULL;
+       mime_type = ivug_fileinfo_get_mime_type(filepath);
+       if (mime_type == NULL)
+       {
+               MSG_SDATA_WARN("file path is not vaild = %s", filepath);
+               mdata->slide_type = SLIDE_TYPE_UNKNOWN;
+               mdata->fileurl = NULL;
+               mdata->filepath = NULL;
+               return mdata;
+       }
+
+       Media_Type slide_type = SLIDE_TYPE_NONE;
+       //image
+       if (strncmp(mime_type, "image/", strlen("image/")) == 0)
+       {
+               slide_type = SLIDE_TYPE_IMAGE;
+       }
+       else if (strncmp(mime_type, "video/", strlen("video/")) == 0)
+       {
+               slide_type = SLIDE_TYPE_VIDEO;
+       }
+       else
+       {
+               slide_type = SLIDE_TYPE_NONE;
+       }
+       MSG_SDATA_HIGH("File=%s Mime=%s", filepath, mime_type);
+       free(mime_type);                //free strdup
+       if (slide_type == SLIDE_TYPE_IMAGE)
+       {
+               mdata->slide_type = SLIDE_TYPE_IMAGE;
+               mdata->fileurl = strdup(filepath);
+               if (mdata->fileurl == NULL)
+               {
+                       MSG_SDATA_ERROR("strdup return NULL");
+                       goto ERROR;
+               }
+               mdata->filepath = strdup(filepath);
+               if (mdata->filepath == NULL)
+               {
+                       MSG_SDATA_ERROR("strdup return NULL");
+                       free(mdata->fileurl);
+                       goto ERROR;
+               }
+       }
+       else if (slide_type == SLIDE_TYPE_VIDEO)
+       {
+               mdata->slide_type = SLIDE_TYPE_VIDEO;
+               mdata->fileurl = strdup(filepath);
+               if (mdata->fileurl == NULL)
+               {
+                       MSG_SDATA_ERROR("strdup return NULL");
+                       goto ERROR;
+               }
+               mdata->filepath = strdup(filepath);
+               if (mdata->filepath == NULL)
+               {
+                       MSG_SDATA_ERROR("strdup return NULL");
+                       free(mdata->fileurl);
+                       goto ERROR;
+               }
+       }
+       else
+       {
+               MSG_SDATA_WARN("file path is not vaild = %s", filepath);
+               mdata->slide_type = SLIDE_TYPE_UNKNOWN;
+               mdata->fileurl = NULL;
+               mdata->filepath = NULL;
+       }
+       return mdata;
+ERROR:
+       if (mdata)
+       {
+               ivug_free_mediadata(mdata);
+       }
+       return NULL;
+}
+
+void ivug_free_mediadata(Media_Data * mdata)
+{
+       IV_ASSERT(mdata != NULL);
+
+#ifdef USE_NEW_DB_API
+       if(mdata->m_hadle)
+       {
+               media_info_destroy(mdata->m_hadle);
+               mdata->m_hadle = NULL;
+       }
+#endif
+
+       uuid_free(mdata->mediaID);
+
+       //file path
+       if (mdata->filepath)
+       {
+               //IVUG_DEBUG_MSG("filepath =%s", sd->filepath);
+               free(mdata->filepath);
+               mdata->filepath = NULL;
+       }
+
+       //file url
+       if (mdata->fileurl)
+       {
+               MSG_SDATA_MED("Remove media data. %s", mdata->fileurl);
+               free(mdata->fileurl);
+               mdata->fileurl = NULL;
+       }
+
+       if (mdata->thumbnail_path)
+       {
+               free(mdata->thumbnail_path);
+               mdata->thumbnail_path = NULL;
+       }
+
+       if (mdata->drm_filepath)
+       {
+               if ( ivug_remove_file(mdata->drm_filepath) == false)
+               {
+                       MSG_SDATA_ERROR("Cannot delete drm file : %s", mdata->drm_filepath);
+                       // Go though
+               }
+
+               free(mdata->drm_filepath);
+               mdata->drm_filepath = NULL;
+       }
+
+       free(mdata);
+}
+
+bool ivug_mediadata_delete(Media_Data * mdata)
+{
+       IV_ASSERT(mdata != NULL);
+
+       if (uuid_is_valid(mdata->mediaID) == true )
+       {
+               int ret = media_info_delete_from_db(mdata->mediaID);
+               if (ret == MEDIA_CONTENT_ERROR_NONE)
+               {
+                       if (mdata->filepath)
+                       {
+                               MSG_SDATA_HIGH("File removed. %s", mdata->filepath);
+                               if (ivug_remove_file(mdata->filepath) == false)
+                               {
+                                       MSG_SDATA_ERROR("file remove error : %s", mdata->filepath);
+                               }
+                       }
+                       else
+                       {
+                               MSG_SDATA_ERROR("File path is NULL", mdata->filepath);
+                       }
+               }
+               else
+               {
+                       MSG_SDATA_ERROR("media_info_delete_from_db faild=%d uuid=%s file=%s", ret, uuid_getchar(mdata->mediaID), mdata->filepath);
+                       return false;
+               }
+       }
+       else
+       {
+               MSG_SDATA_WARN("Invalid UUID. Path=%s", mdata->filepath);
+
+               if (mdata->filepath)
+               {
+                       MSG_SDATA_HIGH("File removed. %s", mdata->filepath);
+
+                       if (ivug_remove_file(mdata->filepath) == false)
+                       {
+                               MSG_SDATA_ERROR("file remove error : %s", mdata->filepath);
+                       }
+               }
+               else
+               {
+                       MSG_SDATA_ERROR("File path is NULL", mdata->filepath);
+               }
+
+       }
+
+       if (mdata->drm_filepath)
+       {
+               if ( ivug_remove_file(mdata->drm_filepath) == false)
+               {
+                       MSG_SDATA_ERROR("Cannot delete drm file : %s", mdata->drm_filepath);
+                       // Go though
+               }
+       }
+
+       return true;
+}
+
+
diff --git a/medialist/src/ivug-mediadata.h b/medialist/src/ivug-mediadata.h
new file mode 100755 (executable)
index 0000000..f1f7b61
--- /dev/null
@@ -0,0 +1,52 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_MEDIADATA_H__
+#define __IVUG_MEDIADATA_H__
+
+#include "ivug-media.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+  * Converting Media_Data from filepath
+  * @param filepath[in]
+  *
+**/
+Media_Data *ivug_alloc_mediadata_from_filepath(const char* filepath);
+
+/**
+  * Converting WMitem to Media_Data
+  * @param item[in]
+  *
+**/
+
+Media_Data *ivug_alloc_mediadata_from_media_handle(media_handle media);
+
+/**
+  * Free memory used by Media_Data
+  * @param mdata[in]
+  *
+**/
+void ivug_free_mediadata(Media_Data* mdata);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __IVUG_MEDIADATA_H__
diff --git a/medialist/src/ivug-medialist.c b/medialist/src/ivug-medialist.c
new file mode 100755 (executable)
index 0000000..39ff16f
--- /dev/null
@@ -0,0 +1,687 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *       http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ivug-define.h"
+
+#include "ivug-debug.h"
+#include "ivug-medialist.h"
+
+#include "ivug-mediadata.h"
+
+#include "ivug-data-list.h"
+
+#include "ivug-db.h"
+
+#include <Ecore.h>
+
+#undef DEBUG_DUMP_LIST
+
+#define LOAD_BLOCK_COUNT (100)
+
+#undef UNIT_TEST
+#define UT_USE_DB
+#define UT_TOTAL (50)
+#define UT_INDEX (49)
+
+typedef struct {
+       Eina_List *header;       // Start pointer for media list
+       int count;       // Total count
+
+       Ecore_Thread *thread;   // Loading thread
+       Eina_Lock mutex;
+       Eina_Condition condition;
+       Eina_Lock end_mutex;
+
+       Eina_Bool bTerminate;   //
+
+       bool bLoading;                  // Is thread loading on progress?
+       Filter_struct *filter_str;
+
+       Eina_List *shufflelist; // Shuffle liste
+
+} _Media_List;
+
+
+typedef struct {
+       _Media_List *_mList;
+       const Filter_struct *filter_str;
+
+       int center_block;
+       int max_block;
+} ThreadParam;
+
+typedef enum {
+       BLOCK_LEFT,
+       BLOCK_RIGHT,
+} BlockType;
+
+typedef struct {
+       _Media_List *_mList;
+
+       BlockType direction;
+       Eina_List *list;
+} ThreadMSG;
+
+static int _get_block_num(int index)
+{
+       return (index / LOAD_BLOCK_COUNT);
+}
+
+static Eina_List *_load_block(const Filter_struct *filter, int block_num)
+{
+       int stp = block_num * LOAD_BLOCK_COUNT;
+       int endp = ((block_num + 1) * LOAD_BLOCK_COUNT) - 1;
+
+       Eina_List *header = NULL;
+
+#ifdef UT_USE_DB
+       header = ivug_list_load_DB_items(filter, stp, endp);
+#else
+       Eina_List *header = NULL;
+
+       int i;
+       Media_Data *data;
+
+       for (i = stp; i <= endp; i++)
+       {
+               data = malloc(sizeof(Media_Data));
+               data->index = i;
+
+               header = eina_list_append(header, data);
+       }
+#endif
+
+       MSG_SDATA_HIGH("Loaded block : %d", block_num);
+
+       return header;
+}
+
+
+static void _doLoad(Ecore_Thread *thread, _Media_List *_mList, const Filter_struct *filter, int center, int max_block)
+{
+       bool bRightEnd = false;
+       bool bLeftEnd = false;
+       int iter = 1;
+
+       Eina_List *left;
+       Eina_List *right;
+
+       while((bLeftEnd && bRightEnd) == false)
+       {
+               if ( center + iter <= max_block )
+               {
+                       right = _load_block(filter, center + iter);
+
+#if 0
+                       if ( ecore_thread_check(thread) == EINA_TRUE )
+                       {
+                               MSG_SDATA_HIGH("Check True");
+                               ivug_list_delete_items(right);
+                               break;
+                       }
+#else
+                       if ( _mList->bTerminate == EINA_TRUE )
+                       {
+                               MSG_SDATA_HIGH("Check True");
+                               ivug_list_delete_items(right);
+                               return;
+                       }
+#endif
+                       IV_ASSERT(right != NULL);
+                       _mList->header = eina_list_merge (_mList->header, right);
+               }
+               else
+               {
+                       bRightEnd = true;
+               }
+
+               if ( center - iter >= 0)
+               {
+                       left = _load_block(filter , center - iter);
+
+#if 0
+                       if ( ecore_thread_check(thread) == EINA_TRUE )
+                       {
+                               MSG_SDATA_HIGH("Check True");
+                               ivug_list_delete_items(left);
+                               break;
+                       }
+#else
+                       if ( _mList->bTerminate == EINA_TRUE )
+                       {
+                               MSG_SDATA_HIGH("Check True");
+                               ivug_list_delete_items(left);
+                               return;
+                       }
+#endif
+                       IV_ASSERT(left != NULL);
+
+                       _mList->header = eina_list_merge (left, _mList->header);
+
+               }
+               else
+               {
+                       bLeftEnd = true;
+               }
+
+               iter++;
+               usleep(100);
+       }
+
+       MSG_SDATA_HIGH("EinaCount=%d Count=%d", eina_list_count(_mList->header), _mList->count);
+}
+
+
+static void loader_heavy(void *data, Ecore_Thread *thread)
+{
+       MSG_SDATA_HIGH("Thread started. tID=0x%08x", thread);
+       ThreadParam *pParam = data;
+
+#if 0
+       if ( ecore_thread_check(thread) == EINA_TRUE )
+       {
+               MSG_SDATA_HIGH("Check True");
+               return;
+       }
+#else
+
+       if ( pParam->_mList->bTerminate == EINA_TRUE )
+       {
+               MSG_SDATA_HIGH("Check True");
+               return;
+       }
+#endif
+
+       eina_lock_new(&pParam->_mList->mutex);
+       eina_condition_new(&pParam->_mList->condition, &pParam->_mList->mutex);
+
+       MSG_SDATA_HIGH("Load : Begin");
+
+       _doLoad(thread, pParam->_mList, pParam->filter_str, pParam->center_block, pParam->max_block);
+
+       MSG_SDATA_HIGH("Load : End");
+
+       pParam->_mList->thread = NULL;
+
+       eina_lock_take(&pParam->_mList->mutex);
+       eina_condition_signal(&pParam->_mList->condition);
+       eina_lock_release(&pParam->_mList->mutex);
+
+}
+
+
+static void loader_end(void *data, Ecore_Thread *thread)
+{
+//     ThreadParam *pParam = data;
+
+       //  MSG_SDATA_HIGH("Thread Ended. EinaCount=%d Count=%d", eina_list_count(pParam->_mList), pParam->_mList->count);
+       MSG_SDATA_HIGH("Thread Ended. tID=0x%08x", thread);
+
+       PERF_CHECK_END(LVL3, "Deffered loading");
+}
+
+static void loader_cancel(void *data, Ecore_Thread *thread)
+{
+       MSG_SDATA_HIGH("Thread canceled. tID=0x%08x", thread);
+
+       PERF_CHECK_END(LVL3, "Deffered loading");
+}
+
+static int _sort_cb(const void *d1, const void *d2)
+{
+       return (rand() % 4 - 2) ;
+}
+
+static Media_Item *_find_item(Media_List *mList, int index)
+{
+       IV_ASSERT(mList != NULL);
+       _Media_List *_mList = (_Media_List *)mList;
+
+       Eina_List *l;
+       Media_Data *data;
+
+       EINA_LIST_FOREACH(_mList->header, l, data)
+       {
+               if ( data->index == index)
+               {
+                       return (Media_Item *)l;
+               }
+       }
+
+       return NULL;
+}
+
+
+#ifdef DEBUG_DUMP_LIST
+static void _print_shuffle(void *data)
+{
+       MSG_SDATA_HIGH("Item : %d", (int)data);
+}
+
+static void _dump_list(Eina_List *list, void (*func)(void *))
+{
+       Eina_List *l;
+       void *data;
+
+       EINA_LIST_FOREACH(list, l, data)
+       {
+               func(data);
+       }
+
+}
+#endif
+
+
+Media_List *ivug_medialist_create()
+{
+       _Media_List *_mList = calloc(1, sizeof(_Media_List));
+       IV_ASSERT(_mList != NULL);
+
+       srand((unsigned)time(NULL));
+
+       MSG_SDATA_HIGH("Create media list : 0x%08x", _mList);
+
+       return (Media_List *)_mList;
+}
+
+Media_Item * ivug_medialist_find_item_by_filename(Media_List *mList, const char* filepath)
+{
+       IV_ASSERT(mList != NULL);
+       IV_ASSERT(filepath != NULL);
+       _Media_List *_mList = (_Media_List *)mList;
+
+       Eina_List *l;
+       Media_Data *data;
+
+       EINA_LIST_FOREACH(_mList->header, l, data)
+       {
+               if(strncmp(data->fileurl, filepath, strlen(data->fileurl)) == 0)
+               {
+                       return (Media_Item *)l;
+               }
+       }
+       MSG_SDATA_ERROR("Cannot find file path %s at list", filepath);
+       return NULL;
+}
+
+Media_Item *ivug_medialist_load(Media_List *mList, const Filter_struct *filter)
+{
+       IV_ASSERT(mList != NULL);
+       _Media_List *_mList = (_Media_List *)mList;
+
+       MSG_SDATA_HIGH("Create slide data list. index=%d", filter->index);
+
+       if ( _mList->header != NULL )
+       {
+               MSG_SDATA_FATAL("Header is not NULL");
+               return NULL;
+       }
+//     _mList->filter = ivug_data_filter_copy(filter);
+
+       int db_idx = 0;
+
+#ifdef UNIT_TEST
+       _mList->count = UT_TOTAL;
+       db_idx = UT_INDEX;
+
+#else
+       PERF_CHECK_BEGIN(LVL3, "MediaList - Get list count");
+
+       _mList->count = ivug_list_get_item_cnt(filter);
+
+       PERF_CHECK_END(LVL3, "MediaList - Get list count");
+
+       MSG_SDATA_HIGH("Total item count=%d", _mList->count);
+       db_idx = filter->index - 1;
+#endif
+
+       if ( _mList->count < db_idx)
+       {
+               MSG_SDATA_ERROR("Invalid param");
+               return NULL;
+       }
+
+       int block_num = _get_block_num(db_idx);
+       int block_max = _get_block_num(_mList->count - 1);
+
+       MSG_SDATA_HIGH("Total=%d Current=%d Block Count=%d", _mList->count, db_idx, block_max);
+
+       PERF_CHECK_BEGIN(LVL3, "MediaList - load first block");
+
+       // Load Center
+       _mList->header = _load_block(filter, block_num);         // Load current block
+
+       PERF_CHECK_END(LVL3, "MediaList - load first block");
+
+       if(_mList->header == NULL)
+       {
+               MSG_SDATA_FATAL("MediaList is NULL");
+               return NULL;
+       }
+
+// find current data;
+       MSG_SDATA_HIGH("Header=0x%08x Current nTh=%d", _mList->header, db_idx - (block_num * LOAD_BLOCK_COUNT));
+
+       PERF_CHECK_BEGIN(LVL3, "MediaList - Find current");
+
+       Eina_List *current = eina_list_nth_list(_mList->header, db_idx - (block_num * LOAD_BLOCK_COUNT));
+
+       PERF_CHECK_END(LVL3, "MediaList - Find current");
+
+       if(current == NULL)
+       {
+               MSG_SDATA_HIGH("current is NULL");
+               return NULL;
+       }
+
+
+       PERF_CHECK_BEGIN(LVL3, "MediaList - shuffle");
+
+       int i;
+       _mList->shufflelist = NULL;
+       for ( i = 0; i < _mList->count; i++)
+       {
+               _mList->shufflelist = eina_list_append(_mList->shufflelist, (void *)i);
+       }
+
+       _mList->shufflelist = eina_list_sort(_mList->shufflelist, eina_list_count(_mList->shufflelist), _sort_cb);
+
+       PERF_CHECK_END(LVL3, "MediaList - shuffle");
+
+       // _dump_list(_mList->shufflelist, _print_shuffle);
+       //  MSG_SDATA_HIGH("ParamPath=%s CurrentPath=%s", param->filepath, _mList->current->filepath);
+
+       if ( block_max == 0 && eina_list_count(_mList->header) < LOAD_BLOCK_COUNT )
+       {
+               MSG_SDATA_HIGH("Deffered loading is not needed. BolckMax=%d FirstBlockCount=%d", block_max, eina_list_count(_mList->header));
+               return (Media_Item *)current;
+       }
+
+       ThreadParam *pParam = NULL;
+
+       pParam = malloc(sizeof(ThreadParam));
+
+       pParam->filter_str = filter;
+       pParam->_mList = _mList;
+       pParam->center_block = block_num;
+       pParam->max_block = block_max;
+
+       _mList->bLoading = true;
+
+       eina_lock_new(&_mList->end_mutex);
+
+       MSG_SDATA_HIGH("Starting thread");
+
+       PERF_CHECK_BEGIN(LVL3, "Deffered loading");
+
+       _mList->thread = ecore_thread_run(loader_heavy, loader_end, loader_cancel, pParam);
+       MSG_SDATA_HIGH("Thread ID= 0x%08x", _mList->thread);
+       MSG_SDATA_HIGH("Create slide data list END");
+
+       return (Media_Item *)current;
+}
+
+void
+ivug_medialist_del(Media_List *mList)
+{
+       IV_ASSERT(mList != NULL);
+       _Media_List *_mList = (_Media_List *)mList;
+
+       MSG_SDATA_HIGH("Removing all media data");
+
+       if ( _mList->thread )
+       {
+               MSG_SDATA_HIGH("1. Thread cancel");
+#if 0
+               if ( ecore_thread_cancel(_mList->thread) == EINA_TRUE )
+               {
+                       MSG_SDATA_HIGH("Thread canceled");
+               }
+#endif
+          _mList->bTerminate = EINA_TRUE;
+
+       eina_condition_wait(&_mList->condition);
+       eina_lock_release(&_mList->mutex);
+
+               _mList->thread = NULL;
+               MSG_SDATA_HIGH("2. Thread cancel");
+       }
+
+       ivug_list_delete_items(_mList->header);
+       _mList->header = NULL;
+
+       eina_list_free(_mList->shufflelist);
+       _mList->shufflelist = NULL;
+       free(_mList);
+
+}
+
+
+int ivug_medialist_get_count(Media_List *mList)
+{
+       IV_ASSERT(mList != NULL);
+       _Media_List *_mList = (_Media_List *)mList;
+
+       return _mList->count;
+}
+
+int ivug_medialist_get_index(Media_List *mList, Media_Item *item)
+{
+       IV_ASSERT(mList != NULL);
+
+       Media_Data *pData;
+
+       MSG_SDATA_HIGH("Loading is not finished");
+       pData = (Media_Data *)eina_list_data_get((Eina_List *)item);
+
+       return pData->index + 1;
+
+
+#if 0
+       PERF_CHECK_BEGIN("Get Index");
+
+       for (tmp = _mList->header, i= 0;  tmp != NULL ; tmp = eina_list_next(tmp), i++)
+       {
+       if ( item == tmp )
+       {
+       PERF_CHECK_END("Get Index");
+       return i+1; // This index starts from 1
+       }
+       }
+
+       PERF_CHECK_END("Get Index");
+
+
+       return 0;                // Cannot find.
+#endif
+
+}
+
+Media_Item *ivug_medialist_get_first(Media_List *mList)
+{
+       IV_ASSERT(mList != NULL);
+       _Media_List *_mList = (_Media_List *)mList;
+
+       return (Media_Item *)_mList->header;
+}
+
+
+Media_Item *ivug_medialist_get_last(Media_List *mList)
+{
+       IV_ASSERT(mList != NULL);
+       _Media_List *_mList = (_Media_List *)mList;
+
+       return (Media_Item *)eina_list_last(_mList->header);
+}
+
+Media_Item *ivug_medialist_get_next(Media_List *mList, Media_Item *item)
+{
+       IV_ASSERT(mList != NULL);
+
+       IV_ASSERT(item != NULL);
+       Eina_List *next = eina_list_next((Eina_List *)item);
+
+       return (Media_Item *)next;
+}
+
+
+Media_Item *ivug_medialist_get_prev(Media_List *mList, Media_Item *item)
+{
+       IV_ASSERT(mList != NULL);
+
+       IV_ASSERT(item != NULL);
+       Eina_List *prev = eina_list_prev((Eina_List *)item);
+
+       return (Media_Item *)prev;
+
+}
+
+Media_Data *ivug_medialist_get_data(Media_Item *item)
+{
+       IV_ASSERT(item != NULL);
+
+       return (Media_Data *)eina_list_data_get((Eina_List *)item);
+}
+
+
+void ivug_medialist_delete_item(Media_List *mList, Media_Item *item)
+{
+       PERF_CHECK_BEGIN(LVL1, "MediaList - delete");
+
+       IV_ASSERT(mList != NULL);
+       _Media_List *_mList = (_Media_List *)mList;
+
+       Media_Data *pData = (Media_Data *)eina_list_data_get((Eina_List *)item);
+
+       Eina_List *list = eina_list_next((Eina_List *)item);
+       Eina_List *l;
+       Media_Data *data;
+
+       EINA_LIST_FOREACH(list, l, data)
+       {
+               data->index = data->index - 1;
+       }
+
+       _mList->header = eina_list_remove_list(_mList->header, (Eina_List *)item);
+
+       // Change index
+       if ( ivug_mediadata_delete(pData) == false )
+       {
+               MSG_SDATA_HIGH("Cannot delete mediadata");
+       }
+       ivug_free_mediadata(pData);
+
+       // Shuffle list?
+       _mList->count--;
+
+       Eina_List *found = eina_list_data_find_list(_mList->shufflelist, (void *)_mList->count);
+
+       _mList->shufflelist = eina_list_remove(_mList->shufflelist, found);
+
+       MSG_SDATA_HIGH("Item removed. Total=%d", _mList->count);
+
+       PERF_CHECK_END(LVL1, "MediaList - delete");
+}
+
+
+Media_Item *ivug_medialist_get_random_item(Media_List *mList)
+{
+       IV_ASSERT(mList != NULL);
+       _Media_List *_mList = (_Media_List *)mList;
+
+       int count = eina_list_count(_mList->header);
+
+       return (Media_Item *)eina_list_nth_list(_mList->header, random() % count);
+}
+
+Media_Item *ivug_medialist_get_shuffle_item(Media_List *mList, Media_Item *item)
+{
+       IV_ASSERT(mList != NULL);
+       _Media_List *_mList = (_Media_List *)mList;
+
+       Media_Data *pData = (Media_Data *)eina_list_data_get((Eina_List *)item);
+
+       Eina_List *found = eina_list_data_find_list(_mList->shufflelist, (void *)pData->index);
+
+       if ( found != NULL )
+       {
+               Media_Item *next;
+               Eina_List *iter;
+
+               iter = eina_list_next(found);
+
+               if ( iter == NULL )
+               {
+                       int nFirstIdx = (int)eina_list_data_get(_mList->shufflelist);
+
+                       next = _find_item(mList, nFirstIdx);
+
+                       MSG_SDATA_HIGH("End reached. rewind to first. Index=%d", nFirstIdx);
+
+                       return next;
+               }
+
+               do {
+                       next = _find_item(mList, (int)eina_list_data_get(iter));
+
+                       if ( next == NULL )
+                       {
+                               MSG_SDATA_HIGH("Index : %d is not loaded", (int)eina_list_data_get(iter));
+                               _mList->shufflelist = eina_list_demote_list(_mList->shufflelist, iter);
+                       }
+
+                       iter = eina_list_next(found);
+
+               } while(next == NULL);
+
+               Media_Data *nData = (Media_Data *)eina_list_data_get((Eina_List *)next);
+
+               MSG_SDATA_HIGH("Shuffle : %d->%d", pData->index, nData->index );
+
+//             _dump_list(_mList->shufflelist, _print_shuffle);
+               return next;
+       }
+
+       MSG_SDATA_ERROR("Cannot find data. Index=%d", pData->index);
+       return NULL;
+}
+
+Media_Item *
+ivug_medialist_find_item_by_index(Media_List *mList, int index)
+{
+       IV_ASSERT(mList != NULL);
+
+       _Media_List *_mList = (_Media_List *)mList;
+
+       Media_Data *current = NULL;
+       Eina_List *l = NULL;
+
+       EINA_LIST_FOREACH(_mList->header, l, current)
+       {
+               if(current == NULL)
+               {
+                       MSG_IVUG_ERROR("album list is NULL");
+                       break;
+               }
+               if(current->index == index)
+               {
+                       return (Media_Item *)l;
+               }
+       }
+       return NULL;
+}
+
+
diff --git a/packaging/changelog b/packaging/changelog
new file mode 100755 (executable)
index 0000000..ce82553
--- /dev/null
@@ -0,0 +1,3232 @@
+ug-image-viewer-efl (1.6.34) unstable; urgency=low
+
+  * fix desktop mode GUI
+  * Tag: ug-image-viewer-efl_1.6.34
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 06 Aug 2012 16:44:48 +0900
+
+ug-image-viewer-efl (1.6.33) unstable; urgency=low
+
+  * fix build error
+  * Tag: ug-image-viewer-efl_1.6.33
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 06 Aug 2012 11:55:17 +0900
+
+ug-image-viewer-efl (1.6.32) unstable; urgency=low
+
+  * fix web downloader api
+  * Tag: ug-image-viewer-efl_1.6.32
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 06 Aug 2012 10:55:28 +0900
+
+ug-image-viewer-efl (1.6.31) unstable; urgency=low
+
+  * fix cropbox bound bug
+  * Tag: ug-image-viewer-efl_1.6.31
+
+ -- root <jcastle.ahn@samsung.com>  Sat, 04 Aug 2012 11:39:00 +0900
+
+ug-image-viewer-efl (1.6.30) unstable; urgency=low
+
+  * fix setas control bar
+  * Tag: ug-image-viewer-efl_1.6.30
+
+ -- root <jcastle.ahn@samsung.com>  Fri, 03 Aug 2012 10:40:17 +0900
+
+ug-image-viewer-efl (1.6.29) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.29
+
+ -- root <jcastle.ahn@samsung.com>  Wed, 01 Aug 2012 20:06:32 +0900
+
+ug-image-viewer-efl (1.6.28) unstable; urgency=low
+
+  * change face dependency
+  * Tag: ug-image-viewer-efl_1.6.28
+
+ -- root <jcastle.ahn@samsung.com>  Wed, 01 Aug 2012 14:36:29 +0900
+
+ug-image-viewer-efl (1.6.27) unstable; urgency=low
+
+  * apply manifest
+  * Tag: ug-image-viewer-efl_1.6.27
+
+ -- root <jcastle.ahn@samsung.com>  Tue, 31 Jul 2012 19:23:26 +0900
+
+ug-image-viewer-efl (1.6.26) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.26
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 30 Jul 2012 09:43:41 +0900
+
+ug-image-viewer-efl (1.6.25) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.25
+
+ -- root <jcastle.ahn@samsung.com>  Sat, 28 Jul 2012 16:39:40 +0900
+
+ug-image-viewer-efl (1.6.24) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.24
+
+ -- root <jcastle.ahn@samsung.com>  Sat, 28 Jul 2012 13:32:23 +0900
+
+ug-image-viewer-efl (1.6.23) unstable; urgency=low
+
+  * fix crop BS
+  * Tag: ug-image-viewer-efl_1.6.23
+
+ -- root <jcastle.ahn@samsung.com>  Fri, 27 Jul 2012 17:17:46 +0900
+
+ug-image-viewer-efl (1.6.22) unstable; urgency=low
+
+  * rename player handle
+  * Tag: ug-image-viewer-efl_1.6.22
+
+ -- root <jcastle.ahn@samsung.com>  Fri, 27 Jul 2012 15:49:06 +0900
+
+ug-image-viewer-efl (1.6.21) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.21
+
+ -- root <jcastle.ahn@samsung.com>  Fri, 27 Jul 2012 14:21:01 +0900
+
+ug-image-viewer-efl (1.6.20) unstable; urgency=low
+
+  * fix emulater BS
+  * Tag: ug-image-viewer-efl_1.6.20
+
+ -- root <jcastle.ahn@samsung.com>  Fri, 27 Jul 2012 14:05:31 +0900
+
+ug-image-viewer-efl (1.6.19) unstable; urgency=low
+
+  * fix camera folder path, motion popup text color
+  * Tag: ug-image-viewer-efl_1.6.19
+
+ -- root <jcastle.ahn@samsung.com>  Thu, 26 Jul 2012 19:59:08 +0900
+
+ug-image-viewer-efl (1.6.18) unstable; urgency=low
+
+  * fix BS when crop failed
+  * Tag: ug-image-viewer-efl_1.6.18
+
+ -- root <jcastle.ahn@samsung.com>  Thu, 26 Jul 2012 11:22:14 +0900
+
+ug-image-viewer-efl (1.6.17) unstable; urgency=low
+
+  * apply white theme
+  * Tag: ug-image-viewer-efl_1.6.17
+
+ -- root <jcastle.ahn@samsung.com>  Thu, 26 Jul 2012 09:26:53 +0900
+
+ug-image-viewer-efl (1.6.16) unstable; urgency=low
+
+  * change api
+  * Tag: ug-image-viewer-efl_1.6.16
+
+ -- root <jcastle.ahn@samsung.com>  Wed, 25 Jul 2012 13:26:03 +0900
+
+ug-image-viewer-efl (1.6.15) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.15 
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 23 Jul 2012 21:24:32 +0900
+
+ug-image-viewer-efl (1.6.14) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.14
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 23 Jul 2012 17:03:57 +0900
+
+ug-image-viewer-efl (1.6.13) unstable; urgency=low
+
+  * fix BS
+  * Tag: ug-image-viewer-efl_1.6.13
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 23 Jul 2012 14:57:46 +0900
+
+ug-image-viewer-efl (1.6.12) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.12
+
+ -- root <jcastle.ahn@samsung.com>  Fri, 20 Jul 2012 15:51:05 +0900
+
+ug-image-viewer-efl (1.6.11) unstable; urgency=low
+
+  * apply motion zoom
+  * Tag: ug-image-viewer-efl_1.6.11
+
+ -- root <jcastle.ahn@samsung.com>  Fri, 20 Jul 2012 15:16:09 +0900
+
+ug-image-viewer-efl (1.6.10) unstable; urgency=low
+
+  * apply managed UG api.
+  * Tag: ug-image-viewer-efl_1.6.10
+
+ -- root <jcastle.ahn@samsung.com>  Wed, 18 Jul 2012 19:29:52 +0900
+
+ug-image-viewer-efl (1.6.9) unstable; urgency=low
+
+  * fix build error
+  * Tag: ug-image-viewer-efl_1.6.9
+
+ -- root <jcastle.ahn@samsung.com>  Tue, 17 Jul 2012 18:34:39 +0900
+
+ug-image-viewer-efl (1.6.8) unstable; urgency=low
+
+  * fix slide show BS
+  * Tag: ug-image-viewer-efl_1.6.8
+
+ -- root <jcastle.ahn@samsung.com>  Tue, 17 Jul 2012 18:16:06 +0900
+
+ug-image-viewer-efl (1.6.7) unstable; urgency=low
+
+  * update image viewer
+  * Tag: ug-image-viewer-efl_1.6.7
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 16 Jul 2012 16:22:35 +0900
+
+ug-image-viewer-efl (1.6.6) unstable; urgency=low
+
+  * apply video call id
+  * Tag: ug-image-viewer-efl_1.6.6 
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 16 Jul 2012 11:57:58 +0900
+
+ug-image-viewer-efl (1.6.5) unstable; urgency=low
+
+  * fix crop box style, phone ug name
+  * Tag: ug-image-viewer-efl_1.6.5
+
+ -- root <jcastle.ahn@samsung.com>  Fri, 13 Jul 2012 14:43:26 +0900
+
+ug-image-viewer-efl (1.6.3) unstable; urgency=low
+
+  * fix bs when delete item
+  * Tag: ug-image-viewer-efl_1.6.3
+
+ -- root <jcastle.ahn@samsung.com>  Thu, 12 Jul 2012 19:20:07 +0900
+
+ug-image-viewer-efl (1.6.2) unstable; urgency=low
+
+  * fix bs
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.6.2
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 11 Jul 2012 17:10:47 +0900
+
+ug-image-viewer-efl (1.6.1) unstable; urgency=low
+
+  * fix slideshow bs, hide menu at setas
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.6.1
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 10 Jul 2012 18:42:34 +0900
+
+ug-image-viewer-efl (1.6.0) unstable; urgency=low
+
+  * apply new DB api
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.6.0
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 05 Jul 2012 10:33:11 +0900
+
+ug-image-viewer-efl (1.5.19) unstable; urgency=low
+
+  * fix bug, launch speed
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.19
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 06 Jul 2012 17:39:24 +0900
+
+ug-image-viewer-efl (1.5.18) unstable; urgency=low
+
+  * fix bundle bug
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.18
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 04 Jul 2012 15:39:55 +0900
+
+ug-image-viewer-efl (1.5.17) unstable; urgency=low
+
+  * show popup at save fail
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.17
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 03 Jul 2012 21:23:44 +0900
+
+ug-image-viewer-efl (1.5.16) unstable; urgency=low
+
+  * fix bug, fix GUI
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.16
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 02 Jul 2012 20:29:25 +0900
+
+ug-image-viewer-efl (1.5.15) unstable; urgency=low
+
+  * enable face method, apply blue theme
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.15
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 29 Jun 2012 20:28:10 +0900
+
+ug-image-viewer-efl (1.5.14) unstable; urgency=low
+
+  * enable allshare
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.14
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 27 Jun 2012 19:30:33 +0900
+
+ug-image-viewer-efl (1.5.13) unstable; urgency=low
+
+  * apply face tag
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git 
+  * Tag: ug-image-viewer-efl_1.5.13
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 25 Jun 2012 21:10:37 +0900
+
+ug-image-viewer-efl (1.5.12) unstable; urgency=low
+
+  * fix set as GUI
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.12
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 18 Jun 2012 10:35:45 +0900
+
+ug-image-viewer-efl (1.5.11) unstable; urgency=low
+
+  * Fix B/S when set wallpaper
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.11
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 13 Jun 2012 13:27:27 +0900
+
+ug-image-viewer-efl (1.5.10) unstable; urgency=low
+
+  * remove mss
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.10
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 11 Jun 2012 17:52:04 +0900
+
+ug-image-viewer-efl (1.5.9) unstable; urgency=low
+
+  * check drm at file set
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.9
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 07 Jun 2012 19:11:45 +0900
+
+ug-image-viewer-efl (1.5.8) unstable; urgency=low
+
+  * fix error, apply asf(disabled) 
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.8
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 07 Jun 2012 10:05:15 +0900
+
+ug-image-viewer-efl (1.5.7) unstable; urgency=low
+
+  * fix ux feedback
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.7
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 04 Jun 2012 17:36:31 +0900
+
+ug-image-viewer-efl (1.5.6) unstable; urgency=low
+
+  * update slideshow
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.6
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 04 Jun 2012 11:04:51 +0900
+
+ug-image-viewer-efl (1.5.5) unstable; urgency=low
+
+  * fix rotate reset bs at invalid file
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.5
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 29 May 2012 10:41:25 +0900
+
+ug-image-viewer-efl (1.5.4) unstable; urgency=low
+
+  * apply rotate function
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.4
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 25 May 2012 19:30:31 +0900
+
+ug-image-viewer-efl (1.5.3) unstable; urgency=low
+
+  * update drm, fix bug
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.3
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 25 May 2012 10:28:04 +0900
+
+ug-image-viewer-efl (1.5.2) unstable; urgency=low
+
+  * update slide show effect
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.2
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 23 May 2012 15:22:11 +0900
+
+ug-image-viewer-efl (1.5.1) unstable; urgency=low
+
+  * apply copy popup
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.1
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 21 May 2012 10:32:32 +0900
+
+ug-image-viewer-efl (1.5.0) unstable; urgency=low
+
+  * Add thumblist. Implement scroller. 
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.0
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 16 May 2012 10:50:02 +0900
+
+ug-image-viewer-efl (1.4.47) unstable; urgency=low
+
+  * enable done btn
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.47
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 15 May 2012 17:17:55 +0900
+
+ug-image-viewer-efl (1.4.46) unstable; urgency=low
+
+  * fix slide show bug
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.46
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 14 May 2012 16:31:10 +0900
+
+ug-image-viewer-efl (1.4.45) unstable; urgency=low
+
+  * fix bug
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.45
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 14 May 2012 11:41:37 +0900
+
+ug-image-viewer-efl (1.4.44) unstable; urgency=low
+
+  * update version
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.44
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 08 May 2012 14:35:32 +0900
+
+ug-image-viewer-efl (1.4.43) unstable; urgency=low
+
+  * apply motion panning, tool button
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.43
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 07 May 2012 10:59:40 +0900
+
+ug-image-viewer-efl (1.4.42) unstable; urgency=low
+
+  * fix string
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.42
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 03 May 2012 12:06:51 +0900
+
+ug-image-viewer-efl (1.4.41) unstable; urgency=low
+
+  * remove useless code
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.41
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 13 Apr 2012 11:35:33 +0900
+
+ug-image-viewer-efl (1.4.40) unstable; urgency=low
+
+  * fix BS at abnomal exit case
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.40
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 12 Apr 2012 13:54:12 +0900
+
+ug-image-viewer-efl (1.4.39) unstable; urgency=low
+
+  * fix BS
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.39
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 10 Apr 2012 18:03:27 +0900
+
+ug-image-viewer-efl (1.4.38) unstable; urgency=low
+
+  * apply url-downloader
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.38
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 06 Apr 2012 13:59:07 +0900
+
+ug-image-viewer-efl (1.4.37) unstable; urgency=low
+
+  * capi-uix-face API is changed
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.37
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 29 Mar 2012 20:05:16 +0900
+
+ug-image-viewer-efl (1.4.36) unstable; urgency=low
+
+  * fix detail bug, red box bug, allshare icon
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.36
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 29 Mar 2012 17:02:47 +0900
+
+ug-image-viewer-efl (1.4.35) unstable; urgency=low
+
+  * fix jira issue(motion popup), disable toolbar button
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.35
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 27 Mar 2012 13:48:58 +0900
+
+ug-image-viewer-efl (1.4.34) unstable; urgency=low
+
+  * apply capi at setas
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.34
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 26 Mar 2012 13:47:07 +0900
+
+ug-image-viewer-efl (1.4.33) unstable; urgency=low
+
+  * fix add tag view
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.33
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 23 Mar 2012 10:48:47 +0900
+
+ug-image-viewer-efl (1.4.32) unstable; urgency=low
+
+  * add timeout callback
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.32
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 22 Mar 2012 09:41:07 +0900
+
+ug-image-viewer-efl (1.4.31) unstable; urgency=low
+
+  * fix BS
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.31
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 20 Mar 2012 10:37:46 +0900
+
+ug-image-viewer-efl (1.4-30) unstable; urgency=low
+
+  * update naviframe, genlist
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-30
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 15 Mar 2012 21:22:49 +0900
+
+ug-image-viewer-efl (1.4-29) unstable; urgency=low
+
+  * fix bug
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-29
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 14 Mar 2012 18:54:39 +0900
+
+ug-image-viewer-efl (1.4-28) unstable; urgency=low
+
+  * update EFL 1.0
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-28
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 13 Mar 2012 20:58:59 +0900
+
+ug-image-viewer-efl (1.4-27) unstable; urgency=low
+
+  * change to CAPI, remove editfield api
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-27
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 28 Feb 2012 17:43:07 +0900
+
+ug-image-viewer-efl (1.4-26) unstable; urgency=low
+
+  * Can set resolution at set as view
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-26
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 23 Feb 2012 19:22:46 +0900
+
+ug-image-viewer-efl (1.4-25) unstable; urgency=low
+
+  * update changelog
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-25
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 23 Feb 2012 17:41:57 +0900
+
+ug-image-viewer-efl (1.4-24) unstable; urgency=low
+
+  * fix bug
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-24
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 20 Feb 2012 20:26:27 +0900
+
+ug-image-viewer-efl (1.4-23) unstable; urgency=low
+
+  * update efl api
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-23
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 15 Feb 2012 20:40:50 +0900
+
+ug-image-viewer-efl (1.4-22) unstable; urgency=low
+
+  * fix bugs
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-22
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 08 Feb 2012 11:26:49 +0900
+
+ug-image-viewer-efl (1.4-21) unstable; urgency=low
+
+  * add slider_pause, slider_resume
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-21
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 03 Feb 2012 14:31:47 +0900
+
+ug-image-viewer-efl (1.4-20) unstable; urgency=low
+
+  * fix bug
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-20
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 02 Feb 2012 19:08:14 +0900
+
+ug-image-viewer-efl (1.4-19) unstable; urgency=low
+
+  * enable setas button
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-19
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 01 Feb 2012 14:39:00 +0900
+
+ug-image-viewer-efl (1.4-18) unstable; urgency=low
+
+  * upload for minfo
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-18
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 31 Jan 2012 17:07:10 +0900
+
+ug-image-viewer-efl (1.4-17) unstable; urgency=low
+
+  * implement media list
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-17
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 27 Jan 2012 17:50:50 +0900
+
+ug-image-viewer-efl (1.4-16) unstable; urgency=low
+
+  * change face detect api
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-16
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 26 Jan 2012 19:48:19 +0900
+
+ug-image-viewer-efl (1.4-15) unstable; urgency=low
+
+  * change idler to job
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-15
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 25 Jan 2012 16:02:23 +0900
+
+ug-image-viewer-efl (1.4-14) unstable; urgency=low
+
+  * fix crash for setas view
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-14
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 20 Jan 2012 14:57:32 +0900
+
+ug-image-viewer-efl (1.4-13) unstable; urgency=low
+
+  * change share option
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-13
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 19 Jan 2012 19:25:03 +0900
+
+ug-image-viewer-efl (1.4-12) unstable; urgency=low
+
+  * media svc api change
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-12
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 18 Jan 2012 16:52:36 +0900
+
+ug-image-viewer-efl (1.4-11) unstable; urgency=low
+
+  * remove editfield edc
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-11
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 17 Jan 2012 17:31:54 +0900
+
+ug-image-viewer-efl (1.4-10) unstable; urgency=low
+
+  * update naviframe, entry edc
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-10
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 17 Jan 2012 15:32:50 +0900
+
+ug-image-viewer-efl (1.4-9) unstable; urgency=low
+
+  * update changelog
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-9
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 16 Jan 2012 13:57:32 +0900
+
+ug-image-viewer-efl (1.4-8) unstable; urgency=low
+
+  * code refine
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-8
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 06 Jan 2012 10:52:07 +0900
+
+ug-image-viewer-efl (1.4-7) unstable; urgency=low
+
+  * apply string
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-7
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 26 Dec 2011 15:48:47 +0900
+
+ug-image-viewer-efl (1.4-6) unstable; urgency=low
+
+  * Update Changelog
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-6
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 22 Dec 2011 10:16:04 +0900
+
+ug-image-viewer-efl (1.4-5) unstable; urgency=low
+
+  * Update changelog
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-5
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 20 Dec 2011 10:08:15 +0800
+
+ug-image-viewer-efl (1.4-4) unstable; urgency=low
+
+  * Update changelog
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-4
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 19 Dec 2011 16:45:24 +0800
+
+ug-image-viewer-efl (1.4-3) unstable; urgency=low
+
+  * update changelog
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-3
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 19 Dec 2011 13:52:58 +0900
+
+ug-image-viewer-efl (1.4-2) unstable; urgency=low
+
+  * enable facebook appsvc
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-2
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 14 Dec 2011 15:09:23 +0900
+
+ug-image-viewer-efl (1.4-1) unstable; urgency=low
+
+  * version up
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-1
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 13 Dec 2011 12:35:01 +0900
+
+ug-image-viewer-efl (1.4-0) unstable; urgency=low
+
+  * upload refactoring
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-0
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 09 Dec 2011 17:17:46 +0900
+
+ug-image-viewer-efl (1.3-77) unstable; urgency=low
+
+  * prepare code open
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-77
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 07 Dec 2011 10:48:42 +0900
+
+ug-image-viewer-efl (1.3-76) unstable; urgency=low
+
+  * fix CQ H0100137612(BS at wma file)
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-76
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 28 Nov 2011 17:10:49 +0900
+
+ug-image-viewer-efl (1.3-75) unstable; urgency=low
+
+  * close detail view at web album
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-75
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 24 Nov 2011 20:52:51 +0900
+
+ug-image-viewer-efl (1.3-74) unstable; urgency=low
+
+  * version for upload
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-74
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 24 Nov 2011 19:48:40 +0900
+
+ug-image-viewer-efl (1.3-73) unstable; urgency=low
+
+  * update changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-73
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 23 Nov 2011 13:11:47 +0900
+
+ug-image-viewer-efl (1.3-72) unstable; urgency=low
+
+  * Details view is popped from naviframe when destroy.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-72
+
+ -- root <hw4444.kim@samsung.com>  Tue, 22 Nov 2011 20:17:20 +0900
+
+ug-image-viewer-efl (1.3-71) unstable; urgency=low
+
+  * delete event blocker, destroy detail view
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-71
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 16 Nov 2011 20:05:37 +0900
+
+ug-image-viewer-efl (1.3-70) unstable; urgency=low
+
+  * fix Lockup issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-70
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 15 Nov 2011 18:53:40 +0900
+
+ug-image-viewer-efl (1.3-69) unstable; urgency=low
+
+  * fix GUI
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-69
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 14 Nov 2011 21:27:06 +0900
+
+ug-image-viewer-efl (1.3-68) unstable; urgency=low
+
+  * fix popup width, change back key concept
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-68
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 10 Nov 2011 17:02:20 +0900
+
+ug-image-viewer-efl (1.3-67) unstable; urgency=low
+
+  * fix prevet, set as bug, log, mss, photocam
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-67
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 09 Nov 2011 15:32:32 +0900
+
+ug-image-viewer-efl (1.3-66) unstable; urgency=low
+
+  * fix places view BS, Modify all share icon position Response popup immediately.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-66
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 03 Nov 2011 17:39:14 +0900
+
+ug-image-viewer-efl (1.3-65) unstable; urgency=low
+
+  * change editfield focus method
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-65
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 02 Nov 2011 16:17:04 +0900
+
+ug-image-viewer-efl (1.3-64) unstable; urgency=low
+
+  * apply minfo api change
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-64
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 02 Nov 2011 16:13:55 +0900
+
+ug-image-viewer-efl (1.3-63) unstable; urgency=low
+
+  * fix detail view effect, add scroll bar
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-63
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 31 Oct 2011 20:58:30 +0900
+
+ug-image-viewer-efl (1.3-62) unstable; urgency=low
+
+  * fix share popup at web album, fix click event duration
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-62
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 31 Oct 2011 18:03:57 +0900
+
+ug-image-viewer-efl (1.3-61) unstable; urgency=low
+
+  * change appsvc to ug, fix web download, fix add tag view max length effect
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-61
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 27 Oct 2011 15:38:52 +0900
+
+ug-image-viewer-efl (1.3-60) unstable; urgency=low
+
+  * Fix details issue launch from myfile and adjust details view layout
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-60
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 26 Oct 2011 13:02:01 +0900
+
+ug-image-viewer-efl (1.3-59) unstable; urgency=low
+
+  * fix BS while destroying, fix bundle value at allshare video
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-59
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 25 Oct 2011 16:53:42 +0900
+
+ug-image-viewer-efl (1.3-58) unstable; urgency=low
+
+  * get application list from appsvc at share
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-58
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 24 Oct 2011 14:34:34 +0900
+
+ug-image-viewer-efl (1.3-57) unstable; urgency=low
+
+  * Fix scissorbox issue & implement new details view
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-57
+
+ -- Li Suxia <suxia.li@samsung.com>  Sat, 22 Oct 2011 10:37:43 +0800
+
+ug-image-viewer-efl (1.3-56) unstable; urgency=low
+
+  * send result to caller when file type not supported
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-56
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 19 Oct 2011 17:51:23 +0900
+
+ug-image-viewer-efl (1.3-55) unstable; urgency=low
+
+  * fix UI bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-55
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 18 Oct 2011 13:48:30 +0900
+
+ug-image-viewer-efl (1.3-54) unstable; urgency=low
+
+  * update scissor box when rotated, update set as view
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-54
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 13 Oct 2011 20:31:20 +0900
+
+ug-image-viewer-efl (1.3-53) unstable; urgency=low
+
+  * add trim menu at video file
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-53
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 12 Oct 2011 21:10:51 +0900
+
+ug-image-viewer-efl (1.3-52) unstable; urgency=low
+
+  * slide show end when flicked
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-52
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 11 Oct 2011 22:48:19 +0900
+
+ug-image-viewer-efl (1.3-51) unstable; urgency=low
+
+  * fix CQ and bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-51
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 11 Oct 2011 21:17:37 +0900
+
+ug-image-viewer-efl (1.3-50) unstable; urgency=low
+
+  * fix UI
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-50
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 11 Oct 2011 12:59:59 +0900
+
+ug-image-viewer-efl (1.3-49) unstable; urgency=low
+
+  * apply HD GUI, navi frame
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-49
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 10 Oct 2011 20:11:32 +0900
+
+ug-image-viewer-efl (1.3-48) unstable; urgency=low
+
+  * apply app service twitter, picasa
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-48
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 06 Oct 2011 19:42:59 +0900
+
+ug-image-viewer-efl (1.3-47) unstable; urgency=low
+
+  * change save view to save popup
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-47
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 06 Oct 2011 13:39:58 +0900
+
+ug-image-viewer-efl (1.3-46) unstable; urgency=low
+
+  * fix Details view bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-46
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 05 Oct 2011 19:33:59 +0900
+
+ug-image-viewer-efl (1.3-45) unstable; urgency=low
+
+  * apply scale decoding and footstep, update slide show, fix bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-45
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 04 Oct 2011 20:14:35 +0900
+
+ug-image-viewer-efl (1.3-44) unstable; urgency=low
+
+  * apply allshare
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-44
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 30 Sep 2011 14:59:37 +0900
+
+ug-image-viewer-efl (1.3-43) unstable; urgency=low
+
+  * enable dissolve effect, footsteps, enter key
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-43
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 29 Sep 2011 14:17:09 +0900
+
+ug-image-viewer-efl (1.3-42) unstable; urgency=low
+
+  * code clean, change set as view GUI
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-42
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 22 Sep 2011 17:32:51 +0900
+
+ug-image-viewer-efl (1.3-41) unstable; urgency=low
+
+  * Fix minor GUI bugs.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-41
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Mon, 19 Sep 2011 19:32:15 +0900
+
+ug-image-viewer-efl (1.3-40) unstable; urgency=low
+
+  * enable motion, prevent mouse event when destroy, enable scroll margin
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-40
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Sat, 17 Sep 2011 15:18:06 +0900
+
+ug-image-viewer-efl (1.3-39) unstable; urgency=low
+
+  * Disable any events just before terminate ug.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-39
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Fri, 16 Sep 2011 22:35:07 +0900
+
+ug-image-viewer-efl (1.3-38) unstable; urgency=low
+
+  * Remove copy popup when flicking.
+  * Apply new GUI guide
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-38
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Fri, 16 Sep 2011 18:23:03 +0900
+
+ug-image-viewer-efl (1.3-37) unstable; urgency=low
+
+  * Upload for verification
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-37
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 15 Sep 2011 19:51:59 +0900
+
+ug-image-viewer-efl (1.3-36) unstable; urgency=low
+
+  * Fix issue thoat file_unset is not called sometimes
+  * Popup shows longer when setting wallpaper
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-36
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 14 Sep 2011 12:44:12 +0900
+
+ug-image-viewer-efl (1.3-35) unstable; urgency=low
+
+  * fix minor BUG
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-35
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 09 Sep 2011 20:46:13 +0900
+
+ug-image-viewer-efl (1.3-34) unstable; urgency=low
+
+  * modify zoom, UI, set as exif
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-34
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 09 Sep 2011 14:55:33 +0900
+
+ug-image-viewer-efl (1.3-33) unstable; urgency=low
+
+  * Implement tap zoom
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-33
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 08 Sep 2011 16:44:19 +0900
+
+ug-image-viewer-efl (1.3-32) unstable; urgency=low
+
+  * include image-vewer-ext-engine only armel build
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-32
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 07 Sep 2011 20:58:41 +0900
+
+ug-image-viewer-efl (1.3-31) unstable; urgency=low
+
+  * add dependency image-viewer-ext-engine
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-31
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 07 Sep 2011 19:45:13 +0900
+
+ug-image-viewer-efl (1.3-30) unstable; urgency=low
+
+  * disable allshare
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-30
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 02 Sep 2011 15:06:18 +0900
+
+ug-image-viewer-efl (1.3-29) unstable; urgency=low
+
+  * update changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-29
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 31 Aug 2011 20:06:40 +0900
+
+ug-image-viewer-efl (1.3-28) unstable; urgency=low
+
+  * avoid appsvc bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-28
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 31 Aug 2011 14:58:02 +0900
+
+ug-image-viewer-efl (1.3-27) unstable; urgency=low
+
+  * prepare source open
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-27
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 30 Aug 2011 15:01:55 +0900
+
+ug-image-viewer-efl (1.3-26) unstable; urgency=low
+
+  * apply DRM image operation
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-26
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 17 Aug 2011 20:14:44 +0900
+
+ug-image-viewer-efl (1.3-25) unstable; urgency=low
+
+  * apply agif, remove widget type, add margin,, apply pm api
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-25
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 16 Aug 2011 20:08:24 +0900
+
+ug-image-viewer-efl (1.3-24) unstable; urgency=low
+
+  * fix BS when copy popup at web image
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-24
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 05 Aug 2011 11:27:33 +0900
+
+ug-image-viewer-efl (1.3-23) unstable; urgency=low
+
+  * Fix B/S when delete item in 2 items
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-23
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 04 Aug 2011 21:04:55 +0900
+
+ug-image-viewer-efl (1.3-22) unstable; urgency=low
+
+  * Fix B/S when delete item in myfile
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-22
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Thu, 04 Aug 2011 17:52:27 +0900
+
+ug-image-viewer-efl (1.3-21) unstable; urgency=low
+
+  * Ctrl bar is disabled during downloading.
+  * Change internal slider APIs
+  * Bug fixed that cannot get next item when flick continously.
+  * Implement details view
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-21
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Tue, 02 Aug 2011 20:27:02 +0900
+
+ug-image-viewer-efl (1.3-20) unstable; urgency=low
+
+  * fix save view bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-20
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 28 Jul 2011 20:08:08 +0900
+
+ug-image-viewer-efl (1.3-19) unstable; urgency=low
+
+  * code refactoring
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-19
+
+ -- Jisugn Ahn <jcastle.ahn@samsung.com>  Tue, 26 Jul 2011 20:23:05 +0900
+
+ug-image-viewer-efl (1.3-18) unstable; urgency=low
+
+  * fix control bar, button style, shuffle, Eina_Bool
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-18
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 22 Jul 2011 18:05:16 +0900
+
+ug-image-viewer-efl (1.3-17) unstable; urgency=low
+
+  * fix emulator BS
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-17
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 21 Jul 2011 21:54:32 +0900
+
+ug-image-viewer-efl (1.3-16) unstable; urgency=low
+
+  * apply new slide show
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-16
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 21 Jul 2011 19:50:17 +0900
+
+ug-image-viewer-efl (1.3-15) unstable; urgency=low
+
+  * apply transition effect
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-15
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 20 Jul 2011 17:54:45 +0900
+
+ug-image-viewer-efl (1.3-14) unstable; urgency=low
+
+  * fix build error, rotate error
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-14
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 11 Jul 2011 22:07:52 +0900
+
+ug-image-viewer-efl (1.3-13) unstable; urgency=low
+
+  * ImageViewer is terminated when MMC is removed.
+  * Add tag view is refined
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-13
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Thu, 07 Jul 2011 19:43:59 +0900
+
+ug-image-viewer-efl (1.3-12) unstable; urgency=low
+
+  * fix cq, scissor box, svace
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-12
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 04 Jul 2011 20:14:32 +0900
+
+ug-image-viewer-efl (1.3-11) unstable; urgency=low
+
+  * apply all share, fix delete BS
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-11
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 01 Jul 2011 19:17:02 +0900
+
+ug-image-viewer-efl (1.3-10) unstable; urgency=low
+
+  * apply window loading
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-10
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 29 Jun 2011 20:16:35 +0900
+
+ug-image-viewer-efl (1.3-09) unstable; urgency=low
+
+  * Fixed CQ
+  * Implement mouse event handler.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-09
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Tue, 28 Jun 2011 10:47:43 +0900
+
+ug-image-viewer-efl (1.3-08) unstable; urgency=low
+
+  * Remove dependancy between ugd and other view.
+  * Fix prevents bug
+  * Support for multi instance
+  * Refactoring SetAs View
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-08
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Fri, 24 Jun 2011 19:37:35 +0900
+
+ug-image-viewer-efl (1.3-07) unstable; urgency=low
+
+  * Upload for CQ defects fix, reupload
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-07
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 22 Jun 2011 16:22:26 +0800
+
+ug-image-viewer-efl (1.3-06) lucid; urgency=low
+
+  * Upload for CQ defects fix
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-06
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 22 Jun 2011 14:56:26 +0800
+
+ug-image-viewer-efl (1.3-05) unstable; urgency=low
+
+  * Improvement pinch zoom algorithm.
+  * Decrease animation time from 500ms to 200ms
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-05
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Tue, 14 Jun 2011 15:50:33 +0900
+
+ug-image-viewer-efl (1.3-04) unstable; urgency=low
+
+  * apply sns finalize
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-04
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 08 Jun 2011 15:34:25 +0900
+
+ug-image-viewer-efl (1.3-03) unstable; urgency=low
+
+  * update changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-03
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 08 Jun 2011 14:18:52 +0900
+
+ug-image-viewer-efl (1.3-02) unstable; urgency=low
+
+  * update changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-02
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 03 Jun 2011 19:00:26 +0900
+
+ug-image-viewer-efl (1.3-01) unstable; urgency=low
+
+  * Fix bug that video file does not flicked.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-01
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Thu, 02 Jun 2011 09:51:42 +0900
+
+ug-image-viewer-efl (1.3-00) unstable; urgency=low
+
+  * Refactoring slide item
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-00
+
+ -- Jisung ahn <jcastle.ahn@samsung.com>  Thu, 02 Jun 2011 09:51:42 +0900
+
+ug-image-viewer-efl (1.2-12) unstable; urgency=low
+
+  * fix control bar, block sns finalize, add test program, fix crop bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-12
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 01 Jun 2011 21:29:06 +0900
+
+ug-image-viewer-efl (1.2-11) unstable; urgency=low
+
+  * code clean, fix bs, rotate bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-11
+
+ -- Jisung ahn <jcastle.ahn@samsung.com>  Mon, 30 May 2011 20:48:29 +0900
+
+ug-image-viewer-efl (1.2-10) unstable; urgency=low
+
+  * fix bug, apply setas view click event
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-10
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 26 May 2011 20:56:01 +0900
+
+ug-image-viewer-efl (1.2-9) unstable; urgency=low
+
+  * mouse event change ecore to evas, popup style change
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-9
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 25 May 2011 19:34:02 +0900
+
+ug-image-viewer-efl (1.2-8) unstable; urgency=low
+
+  * fix icon, drm problem, warning, etc...
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-8
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 24 May 2011 16:27:54 +0900
+
+ug-image-viewer-efl (1.2-7) unstable; urgency=low
+
+  * Block exif
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-7
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 24 May 2011 11:44:09 +0900
+
+ug-image-viewer-efl (1.2-6) unstable; urgency=low
+
+  * Fix string issue, and update list issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-6
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 24 May 2011 10:35:04 +0800
+
+ug-image-viewer-efl (1.2-5) unstable; urgency=low
+
+  * fixed black screen when web image resume
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-5
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 19 May 2011 17:50:32 +0900
+
+ug-image-viewer-efl (1.2-4) unstable; urgency=low
+
+  * updated changelog. fix installation error
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-4
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 19 May 2011 12:43:10 +0900
+
+ug-image-viewer-efl (1.2-3) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-3
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 19 May 2011 12:15:30 +0900
+
+ug-image-viewer-efl (1.2-2) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-2
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 19 May 2011 11:50:30 +0900
+
+ug-image-viewer-efl (1.2-1) unstable; urgency=low
+
+  * changed media-svc to libmedia-info
+  * removed elm_priv.h
+  * inserted bundle key for video player
+  * modified myphotocam mouse event
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-1
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Wed, 18 May 2011 16:51:19 +0900
+
+ug-image-viewer-efl (1.2-00) unstable; urgency=low
+
+  * Change directory structures
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-00
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Wed, 18 May 2011 11:03:04 +0900
+
+ug-image-viewer-efl (1.1-38) unstable; urgency=low
+
+  * fixed black screen error, improvement image viewer loading time, fixed
+    some bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-38
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 18 May 2011 10:52:02 +0900
+
+ug-image-viewer-efl (1.1-37) unstable; urgency=low
+
+  * Fix delete & tag message
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-37
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 12 May 2011 21:44:41 +0800
+
+ug-image-viewer-efl (1.1-36) unstable; urgency=low
+
+  * fixed BS
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-36
+
+ -- DongJin Choi <milkelf.choi@samsung.com> Thu, 12 May 2011 21:11:10 +0900
+
+ug-image-viewer-efl (1.1-35) unstable; urgency=low
+
+  * Upload again
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-35
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 11 May 2011 14:14:11 +0800
+
+ug-image-viewer-efl (1.1-34) unstable; urgency=low
+
+  * Fix DRM issue & implement pause/resume
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-34
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 11 May 2011 11:24:11 +0800
+
+ug-image-viewer-efl (1.1-33) unstable; urgency=low
+
+  * changed sns-framework pkg name to social-service
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-33
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 02 May 2011 20:06:10 +0900
+
+ug-image-viewer-efl (1.1-32) unstable; urgency=low
+
+  * Replace setas genlist with default
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-32
+
+ -- LiSuxia <suxia.li@samsung.com>  Tue, 03 May 2011 20:25:10 +0800
+
+ug-image-viewer-efl (1.1-31) unstable; urgency=low
+
+  * disable animation GIF
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-31
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 02 May 2011 20:06:10 +0900
+
+ug-image-viewer-efl (1.1-30) unstable; urgency=low
+
+  * inserted evas_norender function at exit image viewer UG
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-30
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 02 May 2011 19:06:10 +0900
+
+ug-image-viewer-efl (1.1-29) unstable; urgency=low
+
+  * exit elm_photocam_file_set function when Animation gif loading error
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-29
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 28 Apr 2011 20:21:11 +0900
+
+ug-image-viewer-efl (1.1-28) unstable; urgency=low
+
+  * changed macro name & updated calc_job function
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-28
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 28 Apr 2011 16:28:10 +0900
+
+ug-image-viewer-efl (1.1-27) unstable; urgency=low
+
+  * fixed bulid break.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-27
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 28 Apr 2011 10:41:10 +0900
+
+ug-image-viewer-efl (1.1-26) unstable; urgency=low
+
+  * changed BT launch method & fixed some bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-26
+
+ -- DongJin Choi <milkelf.choi@samsung.com> Wed, 27 Apr 2011 21:07:30 +0900
+
+ug-image-viewer-efl (1.1-25) unstable; urgency=low
+
+  * Fix full build break
+
+ -- Mike McCormack <mj.mccormack@samsung.com>  Wed, 27 Apr 2011 19:19:17 +0900
+
+ug-image-viewer-efl (1.1-24) unstable; urgency=low
+
+  * Add media-type support & fix issues: title, face detect
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-24
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 26 Apr 2011 17:14:31 +0800
+
+ug-image-viewer-efl (1.1-23) unstable; urgency=low
+
+  * fixed sizing error & fixed some bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-23
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 25 Apr 2011 11:59:30 +0900
+
+ug-image-viewer-efl (1.1-22) unstable; urgency=low
+
+  * Fix issues on crop image
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-22
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 21 Apr 2011 19:14:33 +0800
+
+ug-image-viewer-efl (1.1-21) unstable; urgency=low
+
+  * fixed some error, changed snsfw name, inserted web album view function
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-21
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Wed, 20 Apr 2011 21:01:30 +0800
+
+ug-image-viewer-efl (1.1-20) unstable; urgency=low
+
+  * Fix issue on destroy & modify controlbar option for video
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-20
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 20 Apr 2011 17:01:30 +0800
+
+ug-image-viewer-efl (1.1-19) unstable; urgency=low
+
+  * fixed error in caller id mode
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-19
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 19 Apr 2011 23:57:39 +0900
+
+ug-image-viewer-efl (1.1-18) unstable; urgency=low
+
+  * Fix issue on destroy slider
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-18
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 19 Apr 2011 12:56:37 +0800
+
+ug-image-viewer-efl (1.1-17) unstable; urgency=low
+
+  * Dim option for video & DRM file
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-17
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 18 Apr 2011 17:11:14 +0800
+
+ug-image-viewer-efl (1.1-16) unstable; urgency=low
+
+  * re-upload
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-16
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Fri, 15 Apr 2011 16:15:39 +0900
+
+ug-image-viewer-efl (1.1-15) unstable; urgency=low
+
+  * inserted tag option
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-15
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Fri, 15 Apr 2011 14:22:39 +0900
+
+ug-image-viewer-efl (1.1-14) unstable; urgency=low
+
+  * fixed delete slide error
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-14
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Fri, 15 Apr 2011 10:22:39 +0900
+
+ug-image-viewer-efl (1.1-13) unstable; urgency=low
+
+  * Reupload
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-13
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 14 Apr 2011 17:06:33 +0800
+
+ug-image-viewer-efl (1.1-12) unstable; urgency=low
+
+  * Fix popup bs & implement view by favourite
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-12
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 14 Apr 2011 18:58:33 +0800
+
+ug-image-viewer-efl (1.1-11) lucid; urgency=low
+
+  * Fix popup bs & implement view by favourite
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-11
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 14 Apr 2011 18:45:26 +0800
+
+ug-image-viewer-efl (1.1-10) unstable; urgency=low
+
+  * fixed display mode error
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-10
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 14 Apr 2011 17:59:39 +0900
+
+ug-image-viewer-efl (1.1-9) unstable; urgency=low
+
+  * reupload image ug, because snsfw, updated changed log
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-9
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 12 Apr 2011 16:12:39 +0900
+
+ug-image-viewer-efl (1.1-8) unstable; urgency=low
+
+  * fixed build break
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-8
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 12 Apr 2011 16:12:39 +0900
+
+ug-image-viewer-efl (1.1-7) unstable; urgency=low
+
+  * fixed build break , wink, face detection engine
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-6
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 12 Apr 2011 10:04:39 +0900
+
+ug-image-viewer-efl (1.1-6) unstable; urgency=low
+
+  * fixed build break in i386
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-6
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 12 Apr 2011 09:44:19 +0900
+
+ug-image-viewer-efl (1.1-5) unstable; urgency=low
+
+  * fixed build break i386
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-5
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 12 Apr 2011 08:41:26 +0900
+
+ug-image-viewer-efl (1.1-4) unstable; urgency=low
+
+  * fixed build break i386
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-4
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 12 Apr 2011 07:50:28 +0900
+
+ug-image-viewer-efl (1.1-3) unstable; urgency=low
+
+  * fixed build break
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-3
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 12 Apr 2011 07:33:26 +0900
+
+ug-image-viewer-efl (1.1-2) unstable; urgency=low
+
+  * fixed build break
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-2
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 11 Apr 2011 22:04:17 +0900
+
+ug-image-viewer-efl (1.1-1) unstable; urgency=low
+
+  * enable new image viewer
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-1
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 11 Apr 2011 20:44:49 +0900
+
+ug-image-viewer-efl (1.0-182) unstable; urgency=low
+
+  * remove deprecated api of ctxpopup
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-182
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 07 Apr 2011 21:00:26 +0900
+
+ug-image-viewer-efl (1.0-181) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-181
+
+ -- Li Suxia <suxia.li@samsung.com>  Sat, 02 Apr 2011 10:22:15 +0900
+
+ug-image-viewer-efl (1.0-180) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-180
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 24 Mar 2011 14:15:06 +0900
+
+ug-image-viewer-efl (1.0-179) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-179
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 22 Mar 2011 13:54:33 +0900
+
+ug-image-viewer-efl (1.0-178) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-178
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 21 Mar 2011 21:39:52 +0900
+
+ug-image-viewer-efl (1.0-176) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-176
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Fri, 18 Mar 2011 11:28:22 +0900
+
+ug-image-viewer-efl (1.0-175) unstable; urgency=low
+
+  * fixed BS
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-175
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Fri, 18 Mar 2011 11:05:58 +0900
+
+ug-image-viewer-efl (1.0-174) unstable; urgency=low
+
+  * inserted image-viewer base photocam
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-174
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 15 Mar 2011 09:46:46 +0900
+
+ug-image-viewer-efl (1.0-173) unstable; urgency=low
+
+  * modify snsfw api return value.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-173
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 14 Mar 2011 15:55:13 +0900
+
+ug-image-viewer-efl (1.0-172) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-172
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 10 Mar 2011 19:59:20 +0900
+
+ug-image-viewer-efl (1.0-171) unstable; urgency=low
+
+  * remove sns framework wrong used code.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-171
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 10 Mar 2011 18:58:32 +0900
+
+ug-image-viewer-efl (1.0-170) unstable; urgency=low
+
+  * Upload again.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-170
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 10 Mar 2011 09:23:50 +0900
+
+ug-image-viewer-efl (1.0-169) unstable; urgency=low
+
+  * Update git info.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-169
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 09 Mar 2011 19:57:27 +0900
+
+ug-image-viewer-efl (1.0-168) unstable; urgency=low
+
+  * Update changelog again
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-168
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 09 Mar 2011 19:01:06 +0900
+
+ug-image-viewer-efl (1.0-167) unstable; urgency=low
+
+  * update changelog & add stat.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-167
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 09 Mar 2011 14:46:18 +0900
+
+ug-image-viewer-efl (1.0-166) unstable; urgency=low
+
+  * change sns launch method aul -> ug.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-166
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 08 Mar 2011 10:43:07 +0900
+
+ug-image-viewer-efl (1.0-165) unstable; urgency=low
+
+  * Update changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-165
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 04 Mar 2011 15:41:03 +0900
+
+ug-image-viewer-efl (1.0-164) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-164
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 28 Feb 2011 21:05:38 +0900
+
+ug-image-viewer-efl (1.0-163) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-163
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 28 Feb 2011 21:03:30 +0900
+
+ug-image-viewer-efl (1.0-162) unstable; urgency=low
+
+  * fixed web download image problem.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-162
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 28 Feb 2011 20:25:45 +0900
+
+ug-image-viewer-efl (1.0-161) unstable; urgency=low
+
+  * Apply new UI for setas wallpaper
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-161
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 25 Feb 2011 16:36:41 +0800
+
+ug-image-viewer-efl (1.0-160) unstable; urgency=low
+
+  * Fix pause/resume issue for win rotate
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-160
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 23 Feb 2011 17:55:26 +0800
+
+ug-image-viewer-efl (1.0-159) unstable; urgency=low
+
+  * fixed some CQ, crash log
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-159
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 22 Feb 2011 20:12:27 +0900
+
+ug-image-viewer-efl (1.0-158) unstable; urgency=low
+
+  * Enable control bar for single mode & return result for SETAS
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-158
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 22 Feb 2011 17:55:16 +0800
+
+ug-image-viewer-efl (1.0-157) unstable; urgency=low
+
+  * Fix pause/resume issue related with win rotate
+  * Fix set home & lock screen related issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-157
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 21 Feb 2011 17:56:34 +0800
+
+ug-image-viewer-efl (1.0-155) unstable; urgency=low
+
+  * Fix rectangle select issue & zoom rate issue & create lcd size image.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-155
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 18 Feb 2011 17:28:29 +0800
+
+ug-image-viewer-efl (1.0-154) unstable; urgency=low
+
+  * fixed black screen problem when multi down , serveral times.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-154
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 17 Feb 2011 14:03:36 +0900
+
+ug-image-viewer-efl (1.0-153) unstable; urgency=low
+
+  * Revise navibar & control bar for camera UG
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-153
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 17 Feb 2011 09:19:25 +0800
+
+ug-image-viewer-efl (1.0-152) unstable; urgency=low
+
+  * Support selector for callerID ug, fix sort by issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-152
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 16 Feb 2011 08:35:18 +0800
+
+ug-image-viewer-efl (1.0-151) unstable; urgency=low
+
+  * Implement callerID & wallpaper ug, refine single ug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-151
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 14 Feb 2011 08:43:20 +0800
+
+ug-image-viewer-efl (1.0-150) unstable; urgency=low
+
+  * sensor framework disable when image viewer go to background
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-150
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 10 Feb 2011 14:36:02 +0900
+
+ug-image-viewer-efl (1.0-149) unstable; urgency=low
+
+  * inserted pmapi package
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-149
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 08 Feb 2011 18:06:24 +0900
+
+ug-image-viewer-efl (1.0-148) unstable; urgency=low
+
+  * rollback End key policy
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-148
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 07 Feb 2011 14:14:31 +0900
+
+ug-image-viewer-efl (1.0-147) unstable; urgency=low
+
+  * fixed Gallery BS problem ( remove undefined symbol mb_app_common_set_property)
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-147
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Sat, 05 Feb 2011 09:25:23 +0900
+
+ug-image-viewer-efl (1.0-146) unstable; urgency=low
+
+  * fixed some bug.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-146
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 01 Feb 2011 21:55:05 +0900
+
+ug-image-viewer-efl (1.0-145) unstable; urgency=low
+
+  * inserted gethering sns service list code.
+  * removed undefined function. ( mb_app_common_set_category )
+  * image-viewer destory, when ums connected.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-145
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 01 Feb 2011 21:07:01 +0900
+
+ug-image-viewer-efl (1.0-144) unstable; urgency=low
+
+  * Fixed web image issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-144
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 31 Jan 2011 09:16:39 +0800
+
+ug-image-viewer-efl (1.0-143) unstable; urgency=low
+
+  * Fixed black screen issue for web image & popup issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-143
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 26 Jan 2011 17:37:11 +0800
+
+ug-image-viewer-efl (1.0-142) unstable; urgency=low
+
+  * Fixed BS related END KEY
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-142
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 25 Jan 2011 14:58:34 +0900
+
+ug-image-viewer-efl (1.0-141) unstable; urgency=low
+
+  * remove unused code in image_resize & image blend function & modify code related NFC
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-141
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 24 Jan 2011 14:17:27 +0900
+
+ug-image-viewer-efl (1.0-139) unstable; urgency=low
+
+  * Fix update slideshow issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-139
+
+ -- Li Suxia <suxia.li@samsung.com>  Sat, 22 Jan 2011 11:02:07 +0800
+
+ug-image-viewer-efl (1.0-138) unstable; urgency=low
+
+  * Fix buidl break
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-138
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 19 Jan 2011 20:06:11 +0800
+
+ug-image-viewer-efl (1.0-137) unstable; urgency=low
+
+  * Apply new dir policy & fix ug close cb issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-137
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 19 Jan 2011 17:58:32 +0800
+
+ug-image-viewer-efl (1.0-136) unstable; urgency=low
+
+  * Fixed BS at the Web Image Down Load
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-136
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 18 Jan 2011 18:40:41 +0900
+
+ug-image-viewer-efl (1.0-135) unstable; urgency=low
+
+  * Fix H0100118455: previous change error
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-135
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 17 Jan 2011 11:50:31 +0800
+
+ug-image-viewer-efl (1.0-134) unstable; urgency=low
+
+  * Fix H0100118455
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-134
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 17 Jan 2011 10:54:17 +0800
+
+ug-image-viewer-efl (1.0-133) unstable; urgency=low
+
+  * Upload to fix H0100112470
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-133
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 13 Jan 2011 16:04:33 +0800
+
+ug-image-viewer-efl (1.0-132) unstable; urgency=low
+
+  * enable UG BACK KEY
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-132
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 13 Jan 2011 11:48:01 +0900
+
+ug-image-viewer-efl (1.0-131) unstable; urgency=low
+
+  * Remove heynoti depends
+  * Fix H0100116919 again: previous change merge conflict
+  * changed eml_popup_timeout_set parameter type
+  * Add support for view by tag
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-131
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Wed, 12 Jan 2011 15:20:27 +0900
+
+ug-image-viewer-efl (1.0-130) unstable; urgency=low
+
+  * Update geo list by media-svc change
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-130
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 05 Jan 2011 17:16:27 +0800
+
+ug-image-viewer-efl (1.0-129) unstable; urgency=low
+
+  * Fix set issue: button not work & exit after done
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-129
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 05 Jan 2011 14:20:03 +0800
+
+ug-image-viewer-efl (1.0-128) unstable; urgency=low
+
+  * Fix buildbreak on Elm_softkey related
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-128
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 04 Jan 2011 13:59:53 +0800
+
+ug-image-viewer-efl (1.0-127) unstable; urgency=low
+
+  * fixed long press error
+  * Update footstep by gallery request
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-127
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 04 Jan 2011 12:09:35 +0900
+
+ug-image-viewer-efl (1.0-126) unstable; urgency=low
+
+  * Exit imageviewer once slideshow is finished from footst..
+  * fixed long press action. CQ H0100114062
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-126
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 30 Dec 2010 17:47:28 +0900
+
+ug-image-viewer-efl (1.0-125) unstable; urgency=low
+
+  * Fix delete issue & bs on launch myfile detail ug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-125
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 28 Dec 2010 08:33:51 +0800
+
+ug-image-viewer-efl (1.0-124) unstable; urgency=low
+
+  * fixed tag name
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-124
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 27 Dec 2010 11:10:11 +0900
+
+ug-image-viewer-efl (1.0-123) unstable; urgency=low
+
+  * Regarding Text display error
+  * Comment out appcore api in video.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-123
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 27 Dec 2010 11:04:13 +0900
+
+ug-image-viewer-efl (1.0-122) unstable; urgency=low
+
+  * Remove depends on appcore
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-122
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 24 Dec 2010 15:05:57 +0800
+
+ug-image-viewer-efl (1.0-121) unstable; urgency=low
+
+  * Remove appcore_set_i18n
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-121
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 22 Dec 2010 10:49:02 +0800
+
+ug-image-viewer-efl (1.0-120) unstable; urgency=low
+
+  * Fix web image download cancel BS
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-120
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 21 Dec 2010 15:07:54 +0800
+
+ug-image-viewer-efl (1.0-119) unstable; urgency=low
+
+  * Remove bluetooth-app in makefile
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-119
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 20 Dec 2010 13:21:18 +0800
+
+ug-image-viewer-efl (1.0-118) unstable; urgency=low
+
+  * Remove video depends & applog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-118
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 20 Dec 2010 11:32:43 +0800
+
+ug-image-viewer-efl (1.0-117) unstable; urgency=low
+
+  * Fix exit issue for video change
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-117
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 17 Dec 2010 17:38:13 +0800
+
+ug-image-viewer-efl (1.0-116) unstable; urgency=low
+
+  * Upload again for web issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-116
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 16 Dec 2010 10:27:46 +0800
+
+ug-image-viewer-efl (1.0-115) unstable; urgency=low
+
+  * Comment out object del for BS
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-115
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 15 Dec 2010 18:24:19 +0800
+
+ug-image-viewer-efl (1.0-114) unstable; urgency=low
+
+  * Fix pkg install issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-114
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 15 Dec 2010 09:41:45 +0800
+
+ug-image-viewer-efl (1.0-113) unstable; urgency=low
+
+  * Fix view by places issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-113
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 14 Dec 2010 19:25:04 +0800
+
+ug-image-viewer-efl (1.0-112) unstable; urgency=low
+
+  * Add view by place & fix i18n issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-112
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 14 Dec 2010 18:54:34 +0800
+
+ug-image-viewer-efl (1.0-111) unstable; urgency=low
+
+  * Add share by twitter, print via bluetooth, update web image download
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-111
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 14 Dec 2010 10:31:57 +0800
+
+ug-image-viewer-efl (1.0-110) unstable; urgency=low
+
+  * Update Po to fix multi-language issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-110
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 10 Dec 2010 16:53:48 +0800
+
+ug-image-viewer-efl (1.0-109) unstable; urgency=low
+
+  * Fix break for sns
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-109
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 10 Dec 2010 08:44:05 +0800
+
+ug-image-viewer-efl (1.0-108) unstable; urgency=low
+
+  * Fix break for Edje_Edit.h
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-108
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 08 Dec 2010 17:31:20 +0800
+
+ug-image-viewer-efl (1.0-107) unstable; urgency=low
+
+  * add proction code to video
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-107
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 08 Dec 2010 17:16:56 +0800
+
+ug-image-viewer-efl (1.0-106) unstable; urgency=low
+
+  * add proction code to video
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-106
+
+ -- Li Wen <wen2.li@samsung.com>  Fri, 03 Dec 2010 18:34:08 +0800
+
+ug-image-viewer-efl (1.0-105) unstable; urgency=low
+
+  * Fix BS on object del
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-105
+
+ -- Li Wen <wen2.li@samsung.com>  Fri, 03 Dec 2010 17:34:08 +0800
+
+ug-image-viewer-efl (1.0-104) unstable; urgency=low
+
+  * Change video capture code
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-104
+
+ -- Li Wen <wen2.li@samsung.com>  Wed, 01 Dec 2010 17:28:20 +0800
+
+ug-image-viewer-efl (1.0-103) unstable; urgency=low
+
+  * Revise multi-language support
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-103
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 01 Dec 2010 16:58:20 +0800
+
+ug-image-viewer-efl (1.0-102) unstable; urgency=low
+
+  * Revert GUI change & fix delete controlbar BS
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-102
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 30 Nov 2010 17:05:16 +0800
+
+ug-image-viewer-efl (1.0-101) unstable; urgency=low
+
+  * Change bluetooth launch
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-101
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 29 Nov 2010 18:28:32 +0800
+
+ug-image-viewer-efl (1.0-100) unstable; urgency=low
+
+  * Support Korea language & enable web image download
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-100
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 29 Nov 2010 18:17:17 +0800
+
+ug-image-viewer-efl (1.0-99) unstable; urgency=low
+
+  * Fix issue: unable to launch image-editor
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-99
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 29 Nov 2010 09:01:09 +0800
+
+ug-image-viewer-efl (1.0-98) unstable; urgency=low
+
+  * Support open file not in default dir
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-98
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 26 Nov 2010 16:36:42 +0800
+
+ug-image-viewer-efl (1.0-97) unstable; urgency=low
+
+  * Upload for view by all
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-97
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 26 Nov 2010 13:27:57 +0800
+
+ug-image-viewer-efl (1.0-96) unstable; urgency=low
+
+  * Enable web image download
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-96
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 23 Nov 2010 17:03:06 +0800
+
+ug-image-viewer-efl (1.0-95) unstable; urgency=low
+
+  * fix adding bookmark BS issue.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-95
+
+ -- Li Wen <wen2.li@samsung.com>  Mon, 22 Nov 2010 21:08:46 +0800
+
+ug-image-viewer-efl (1.0-94) unstable; urgency=low
+
+  * change to Syspopup_launch(volume, NULL)
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-94
+
+ -- Li Wen <wen2.li@samsung.com>  Mon, 22 Nov 2010 14:08:46 +0800
+
+ug-image-viewer-efl (1.0-93) unstable; urgency=low
+
+  * Upload for SINGLE mode issue fix
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-93
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 19 Nov 2010 13:08:46 +0800
+
+ug-image-viewer-efl (1.0-92) unstable; urgency=low
+
+  * Reupload for build error
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-92
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 18 Nov 2010 16:12:13 +0800
+
+ug-image-viewer-efl (1.0-91) unstable; urgency=low
+
+  * Fix editor issue and photocam issue.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-91
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 18 Nov 2010 15:02:57 +0800
+
+ug-image-viewer-efl (1.0-90) unstable; urgency=low
+
+  * Remove UI window & add dbg package
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-90
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 18 Nov 2010 09:52:37 +0800
+
+ug-image-viewer-efl (1.0-89) unstable; urgency=low
+
+  * Fix web download & copy & ctxpopup position issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-89
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 16 Nov 2010 16:33:24 +0800
+
+ug-image-viewer-efl (1.0-88) unstable; urgency=low
+
+  * Remove mm_session & enable web image download
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-88
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 15 Nov 2010 17:51:21 +0800
+
+ug-image-viewer-efl (1.0-87) unstable; urgency=low
+
+  * enabel ug-imageviewer's own wrapper
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-87
+
+ -- Gao Wei <wi.gao@samsung.com>  Mon, 15 Nov 2010 14:49:49 +0800
+
+ug-image-viewer-efl (1.0-86) unstable; urgency=low
+
+  * Fix slideshow & play lock up issue & refine copy
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-86
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 12 Nov 2010 14:49:49 +0800
+
+ug-image-viewer-efl (1.0-85) unstable; urgency=low
+
+  * enabling ug's own mb-svc-wrapper
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-85
+
+ -- Gao Wei <wi.gao@samsung.com>  Fri, 12 Nov 2010 10:47:19 +0800
+
+ug-image-viewer-efl (1.0-84) unstable; urgency=low
+
+  * Enable video-player for camera
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-84
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 11 Nov 2010 16:55:57 +0800
+
+ug-image-viewer-efl (1.0-83) unstable; urgency=low
+
+  * Fix set as issue: only close button show
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-83
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 10 Nov 2010 15:04:47 +0800
+
+ug-image-viewer-efl (1.0-82) unstable; urgency=low
+
+  * re-packaging
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-82
+
+ -- Gao Wei <wi.gao@samsung.com>  Mon, 08 Nov 2010 10:47:19 +0800
+
+ug-image-viewer-efl (1.0-81) unstable; urgency=low
+
+  * Enable EXIF & Change phtocao bounce by EFL
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-81
+
+ -- Li Suxia <suxia.li@samsung.com>  Sat, 06 Nov 2010 14:47:19 +0800
+
+ug-image-viewer-efl (1.0-80) unstable; urgency=low
+
+  * Reupload by media-svc
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-80
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 05 Nov 2010 13:38:48 +0800
+
+ug-image-viewer-efl (1.0-79) unstable; urgency=low
+
+  * Seperate image-viewer from ug & remove apputil dependency
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-79
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 05 Nov 2010 08:42:51 +0800
+
+ug-image-viewer-efl (1.0-78) unstable; urgency=low
+
+  * Comment out EXIF
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-78
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 04 Nov 2010 17:09:18 +0800
+
+ug-image-viewer-efl (1.0-77) unstable; urgency=low
+
+  * Fix email issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-77
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 04 Nov 2010 17:01:56 +0800
+
+ug-image-viewer-efl (1.0-76) unstable; urgency=low
+
+  * Reupload for media-svc change and fix drag issue on video
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-76
+
+ -- Hyunjun Ko <zzoon.ko@samsung.com>  Wed, 03 Oct 2010 19:40:12 +0800
+
+ug-image-viewer-efl (1.0-75) unstable; urgency=low
+
+  * Reupload for media-svc change
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-75
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 03 Nov 2010 15:43:41 +0800
+
+ug-image-viewer-efl (1.0-74) unstable; urgency=low
+
+  * Fix pinch zoom issue: disable bounce animator
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-74
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 03 Nov 2010 11:24:49 +0800
+
+ug-image-viewer-efl (1.0-73) unstable; urgency=low
+
+  * Fix Set as issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-73
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 01 Nov 2010 17:30:21 +0800
+
+ug-image-viewer-efl (1.0-72) unstable; urgency=low
+
+  * Fix delete issue on receive event after destroy
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-72
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 29 Oct 2010 18:04:13 +0800
+
+ug-image-viewer-efl (1.0-71) unstable; urgency=low
+
+  * Fix delete issue on continuous click
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-71
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 29 Oct 2010 10:58:21 +0800
+
+ug-image-viewer-efl (1.0-70) unstable; urgency=low
+
+  * Reupload because of mistake
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-70
+
+ -- Hyunjun Ko <zzoon.ko@samsung.com>  Wed, 27 Oct 2010 16:40:12 +0800
+
+ug-image-viewer-efl (1.0-69) unstable; urgency=low
+
+  * Reupload with media svc change.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-69
+
+ -- Hyunjun Ko <zzoon.ko@samsung.com>  Wed, 27 Oct 2010 16:25:12 +0800
+
+ug-image-viewer-efl (1.0-68) unstable; urgency=low
+
+  * Disable log info for demo
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-68
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 27 Oct 2010 14:05:34 +0800
+
+ug-image-viewer-efl (1.0-67) unstable; urgency=low
+
+  * Fix delete issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-67
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 27 Oct 2010 11:50:56 +0800
+
+ug-image-viewer-efl (1.0-66) unstable; urgency=low
+
+  * Fix album delete error
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-66
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 27 Oct 2010 09:08:12 +0800
+
+ug-image-viewer-efl (1.0-65) unstable; urgency=low
+
+  * Add test code
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-65
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 26 Oct 2010 17:53:01 +0800
+
+ug-image-viewer-efl (1.0-63) unstable; urgency=low
+
+  * Fix exit issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-63
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 26 Oct 2010 14:46:53 +0800
+
+ug-image-viewer-efl (1.0-62) unstable; urgency=low
+
+  * Add error handler
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-62
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 25 Oct 2010 18:06:55 +0800
+
+ug-image-viewer-efl (1.0-61) unstable; urgency=low
+
+  * Reupload with media svc change.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-61
+
+ -- Hyunjun Ko <zzoon.ko@samsung.com>  Sat, 23 Oct 2010 14:00:12 +0800
+
+ug-image-viewer-efl (1.0-60) unstable; urgency=low
+
+  * Upload with media svc change.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-60
+
+ -- Tang Feng <feng.tang@samsung.com>  Sat, 23 Oct 2010 12:45:36 +0800
+
+ug-image-viewer-efl (1.0-59) unstable; urgency=low
+
+  * Fix BS temp on free folder list.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-59
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 22 Oct 2010 17:42:36 +0800
+
+ug-image-viewer-efl (1.0-58) unstable; urgency=low
+
+  * Support add to home in videoplayer
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-58
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 22 Oct 2010 16:39:25 +0800
+
+ug-image-viewer-efl (1.0-57) unstable; urgency=low
+
+  * Add pre/next function for video
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-57
+
+ -- Li Wen <wen2.li@samsung.com>  Wed, 21 Oct 2010 17:15:22 +0800
+
+ug-image-viewer-efl (1.0-56) unstable; urgency=low
+
+  * Add support for git&wbmp
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-56
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 20 Oct 2010 17:45:22 +0800
+
+ug-image-viewer-efl (1.0-55) unstable; urgency=low
+
+  * Add sort type support & aul launch not mime-based
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-55
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 20 Oct 2010 10:47:31 +0800
+
+ug-image-viewer-efl (1.0-54) unstable; urgency=low
+
+  * Remove media-browser-svc completely
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-54
+
+ -- Li Wen <wen2.li@samsung.com>  Tue, 20 Oct 2010 09:56:02 +0800
+
+ug-image-viewer-efl (1.0-53) unstable; urgency=low
+
+  * Fix slideshow timer BS and indicator issue & build break
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-53
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 19 Oct 2010 15:56:02 +0800
+
+ug-image-viewer-efl (1.0-52) unstable; urgency=low
+
+  * Modified to use new api in media-svc
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-52
+
+ -- Hyunjun Ko <zzoon.ko@samsung.com>  Mon, 18 Oct 2010 22:40:12 +0800
+
+ug-image-viewer-efl (1.0-51) unstable; urgency=low
+
+  * Fix album edit bug
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-51
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 18 Oct 2010 16:31:13 +0800
+
+ug-image-viewer-efl (1.0-50) unstable; urgency=low
+
+  * Fix thumbpath for video file
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-49
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 15 Oct 2010 16:44:42 +0800
+
+ug-image-viewer-efl (1.0-49) unstable; urgency=low
+
+  * Add places view.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-49
+
+ -- Sangjin Han <sjhan.han@samsung.com>  Thu, 14 Oct 2010 15:39:00 +0900
+
+ug-image-viewer-efl (1.0-48) unstable; urgency=low
+
+  * Remove FM-SVC dependency
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-48
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 13 Oct 2010 18:22:51 +0800
+
+ug-image-viewer-efl (1.0-47) unstable; urgency=low
+
+  * Enable to use new media-svc
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-47
+
+ -- Hyunjun Ko <zzoon.ko@samsung.com>  Tue, 12 Oct 2010 20:33:12 +0800
+
+ug-image-viewer-efl (1.0-46) unstable; urgency=low
+
+  * Fix drm path issue & support landscape for videoplayer
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-46
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 11 Oct 2010 18:17:12 +0800
+
+ug-image-viewer-efl (1.0-45) unstable; urgency=low
+
+  * Fix flicking issue during zoom & merge video-player
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-45
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 11 Oct 2010 10:12:14 +0800
+
+ug-image-viewer-efl (1.0-44) unstable; urgency=low
+  * Adjust Copy feature & Fix grab key issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-44
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 08 Oct 2010 16:43:48 +0800
+
+ug-image-viewer-efl (1.0-43) unstable; urgency=low
+
+  * Fix some CMakeLists.txt for the new build system.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-43
+
+ -- Sangjin Han <sjhan.han@samsung.com>  Wed, 06 Oct 2010 18:09:00 +0900
+
+ug-image-viewer-efl (1.0-42) unstable; urgency=low
+
+  * Add USE_MEDIA_SVC define
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-42
+
+ -- Sangjin Han <sjhan.han@samsung.com>  Fri, 01 Oct 2010 16:55:20 +0900
+
+ug-image-viewer-efl (1.0-41) unstable; urgency=low
+
+  * Change sound header file & remove libcommunities dependency
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-41
+
+ -- Byungwook Jang <bw.jang@samsung.com>  Thu, 30 Sep 2010 14:52:44 +0900
+
+ug-image-viewer-efl (1.0-40) unstable; urgency=low
+
+  * Implement aul & Fix favor icon issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-40
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 29 Sep 2010 15:53:04 +0800
+
+ug-image-viewer-efl (1.0-39) unstable; urgency=low
+
+  * Replace navigation bar by navi-ext for 3 buttons
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-39
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 28 Sep 2010 17:47:40 +0800
+
+ug-image-viewer-efl (1.0-38) unstable; urgency=low
+
+  * Fix BS for Home&End key
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-38
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 27 Sep 2010 18:27:42 +0800
+
+ug-image-viewer-efl (1.0-37) unstable; urgency=low
+
+  * Adjust set as process & video-player for scalable UI
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-37
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 27 Sep 2010 17:26:16 +0800
+
+ug-image-viewer-efl (1.0-36) unstable; urgency=low
+
+  * Fix indicator issue(hide video indicator)
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-36
+
+ -- Li Wen <wen2.li@samsung.com>  Sun, 26 Sep 2010 19:40:18 +0800
+
+ug-image-viewer-efl (1.0-35) unstable; urgency=low
+
+  * Fix indicator issue(hide video indicator)
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-35
+
+ -- Li Suxia <suxia.li@samsung.com>  Sun, 26 Sep 2010 18:40:18 +0800
+
+ug-image-viewer-efl (1.0-34) unstable; urgency=low
+
+  * Fix slide show for video-image
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-34
+
+ -- Li Suxia <suxia.li@samsung.com>  Sun, 26 Sep 2010 17:43:44 +0800
+
+ug-image-viewer-efl (1.0-33) unstable; urgency=low
+
+  * Fix flick not smooth issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-33
+
+ -- Li Suxia <suxia.li@samsung.com>  Sat, 25 Sep 2010 19:58:22 +0800
+
+ug-image-viewer-efl (1.0-32) unstable; urgency=low
+
+  * Fix video-image slideshow
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-32
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 21 Sep 2010 18:13:48 +0800
+
+ug-image-viewer-efl (1.0-31) unstable; urgency=low
+
+  * Fix slideshow for video-image
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-31
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 20 Sep 2010 17:39:13 +0800
+
+ug-image-viewer-efl (1.0-30) unstable; urgency=low
+
+  * Enable navibar cb in video-player & for upload
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-30
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 20 Sep 2010 13:08:59 +0800
+
+ug-image-viewer-efl (1.0-29) unstable; urgency=low
+
+  * Fix pinch zoom flick issue.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-29
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 17 Sep 2010 17:28:36 +0800
+
+ug-image-viewer-efl (1.0-28) unstable; urgency=low
+
+  * Fix pinch zoom flick issue.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-28
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 16 Sep 2010 17:37:33 +0800
+
+ug-image-viewer-efl (1.0-27) unstable; urgency=low
+
+  * Fix repeat-event issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-27
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 15 Sep 2010 11:33:23 +0800
+
+ug-image-viewer-efl (1.0-26) unstable; urgency=low
+
+  * Fix rotate issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-26
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 14 Sep 2010 17:32:51 +0800
+
+ug-image-viewer-efl (1.0-25) unstable; urgency=low
+
+  * Enable Set_as feature
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-25
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 14 Sep 2010 09:46:24 +0800
+
+ug-image-viewer-efl (1.0-24) unstable; urgency=low
+
+  * Reupload for EFL upgrade
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-24
+
+ -- Li Suxia <suxia.li@samsung.com>  Sat, 11 Sep 2010 16:37:21 +0800
+
+ug-image-viewer-efl (1.0-23) unstable; urgency=low
+
+  * Upload for EFL upgrade
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-23
+
+ -- Li Suxia  <suxia.li@samsung.com>  Sat, 10 Sep 2010 16:31:55 +0800
+
+ug-image-viewer-efl (1.0-22) unstable; urgency=low
+
+  * Enable pinch zoom & adjust video slide.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-22
+
+ -- Li Suxia  <suxia.li@samsung.com>  Thu, 09 Sep 2010 20:15:55 +0800
+
+ug-image-viewer-efl (1.0-21) unstable; urgency=low
+
+  * fix the bug of favorites
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-21
+
+ -- Gao Wei  <wi.gao@samsung.com>  Tue, 08 Sep 2010 08:15:18 +0800
+
+ug-image-viewer-efl (1.0-19) unstable; urgency=low
+
+  *Fix language issue for myfile
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-19
+
+ -- Li Suxia  <suxia.li@samsung.com>  Tue, 07 Sep 2010 13:15:18 +0800
+
+ug-image-viewer-efl (1.0-18) unstable; urgency=low
+
+  * Fix issue related with camera.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-18
+
+ -- Li Suxia  <suxia.li@samsung.com>  Mon, 06 Sep 2010 15:30:17 +0800
+
+ug-image-viewer-efl (1.0-17) unstable; urgency=low
+
+  * Fix indicator & disable pinch zoom.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-17
+
+ -- Li Suxia  <suxia.li@samsung.com>  Sat, 04 Sep 2010 17:32:32 +0800
+
+ug-image-viewer-efl (1.0-16) unstable; urgency=low
+
+  * Fix context popup issue, enable image-editor & set as wallpaper.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-16
+
+ -- Li Suxia  <suxia.li@samsung.com>  Fri, 03 Sep 2010 08:35:01 +0800
+
+ug-image-viewer-efl (1.0-15) unstable; urgency=low
+
+  * Fix issue related with image-editor launch.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-15
+
+ -- Li Suxia  <suxia.li@samsung.com>  Wed, 01 Sep 2010 17:44:31 +0800
+
+ug-image-viewer-efl (1.0-14) unstable; urgency=low
+
+  * Fix rotate issue.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-14
+
+ -- Li Suxia  <suxia.li@samsung.com>  Wed, 01 Sep 2010 08:13:29 +0800
+
+ug-image-viewer-efl (1.0-13) unstable; urgency=low
+
+  * Fix landscape issue for quick view.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-13
+
+ -- Li Suxia  <suxia.li@samsung.com>  Mon, 30 Aug 2010 17:48:42 +0800
+
+ug-image-viewer-efl (1.0-12) unstable; urgency=low
+
+  * fix build error in i686
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-12
+
+ -- Gao Wei  <wi.gao@samsung.com>  Fri, 27 Aug 2010 16:15:25 +0800
+
+ug-image-viewer-efl (1.0-10) unstable; urgency=low
+
+  * change mouse policy for UG_IVa
+  * remove common.h from db_handler.h
+  * Fix landscape bug.
+  * merge video codes into image viewera
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-10
+
+ -- Gao Wei  <wi.gao@samsung.com>  Fri, 27 Aug 2010 09:15:25 +0800
+
+ug-image-viewer-efl (1.0-8) unstable; urgency=low
+
+  * enable gallery to use IV_UG
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-8
+
+ -- Gao Wei  <wi.gao@samsung.com>  Wed, 25 Aug 2010 09:15:25 +0800
+
+ug-image-viewer-efl (1.0-7) unstable; urgency=low
+
+  * Update param parse and integrat videoplayer ug
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-7
+
+ -- Li Suxia  <suxia.li@samsung.com>  Tue, 24 Aug 2010 17:03:49 +0800
+
+ug-image-viewer-efl (1.0-6) unstable; urgency=low
+
+  * ug will not cluster gallery's db
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-6
+
+ -- Gao Wei  <wi.gao@samsung.com>  Thu, 23 Aug 2010 14:15:25 +0800
+
+ug-image-viewer-efl (1.0-5) unstable; urgency=low
+
+  * lay the evas_object_image under ly_standard
+  * Update parse param.
+  * Fix context popup position.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-5
+
+ -- Gao Wei  <wi.gao@samsung.com>  Thu, 21 Aug 2010 11:15:25 +0800
+
+ug-image-viewer-efl (1.0-4) unstable; urgency=low
+
+  * Upload initial version: image view, slide show
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-4
+
+ -- Li Suxia  <suxia.li@samsung.com>  Thu, 19 Aug 2010 11:15:25 +0800
+
+ug-image-viewer-efl (1.0-1) unstable; urgency=low
+
+  * Upload initial version: image view, slide show
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-1
+
+ -- Li Suxia  <suxia.li@samsung.com>  Thu, 19 Aug 2010 10:09:25 +0800
+
+ug-image-viewer-efl (1.0-0) unstable; urgency=low
+
+   * Initial version
+
+ -- Li Suxia  <suxia.li@samsung.com>  Mon, 16 Aug 2010 14:00:29 +0900
diff --git a/res/images/T01_Nocontents_broken.png b/res/images/T01_Nocontents_broken.png
new file mode 100755 (executable)
index 0000000..9326d0a
Binary files /dev/null and b/res/images/T01_Nocontents_broken.png differ
diff --git a/res/manifest/ug-image-viewer-efl.png b/res/manifest/ug-image-viewer-efl.png
new file mode 100755 (executable)
index 0000000..33d37ff
Binary files /dev/null and b/res/manifest/ug-image-viewer-efl.png differ
diff --git a/res/manifest/ug-image-viewer-efl.xml b/res/manifest/ug-image-viewer-efl.xml
new file mode 100755 (executable)
index 0000000..0b8cf38
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="image-viewer-efl" version="0.3.0-1" install-location="internal-only">
+       <label>image-viewer-efl</label>
+       <author email="jcastle.ahn@samsung.com" href="www.samsung.com">Jisung Ahn</author>
+       <author email="hw4444.kim@samsung.com" href="www.samsung.com">Hyunwoo Kim</author>
+       <description>Image viewer Application</description>
+       <ui-application appid="image-viewer-efl" exec="/opt/ug/bin/image-viewer-efl" nodisplay="true" multiple="true" type="capp" taskmanage="false">
+               <icon>ug-image-viewer-efl.png</icon>
+               <label>Image viewer</label>
+               <label xml:lang="en-us">Image viewer</label>
+               <label xml:lang="nl-nl">Image viewer</label>
+               <label xml:lang="de-de">Image viewer</label>
+               <label xml:lang="zh-hk">Image viewer</label>
+               <label xml:lang="zh-cn">Image viewer</label>
+               <label xml:lang="ru-ru">Image viewer</label>
+               <label xml:lang="zh-tw">Image viewer</label>
+               <label xml:lang="ja-jp">画像​ビューア</label>
+               <label xml:lang="es-es">Image viewer</label>
+               <label xml:lang="el-gr">Image viewer</label>
+               <label xml:lang="it-it">Image viewer</label>
+               <label xml:lang="tr-tr">Image viewer</label>
+               <label xml:lang="pt-pt">Image viewer</label>
+               <label xml:lang="fr-fr">Image viewer</label>
+               <label xml:lang="ko-kr">이미지 뷰어</label>
+       </ui-application>
+</manifest>
diff --git a/slideshow/CMakeLists.txt b/slideshow/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..a6bfa40
--- /dev/null
@@ -0,0 +1,82 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(ivug_slideshow C CXX)
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(VERSION 0.1.0)
+
+SET(SRCS
+# Effect files
+       src/ivug-slideshow.cpp
+       src/effect/ivug-xcapture.c
+       src/effect/ivug-blind.c
+       src/effect/ivug-iris.c
+       src/effect/ivug-fade.c
+       src/effect/ivug-dissolve.c
+       src/effect/ivug-effect.c
+       src/effect/ivug-slide.c
+       src/effect/ivug-anim.c
+)
+
+
+INCLUDE_DIRECTORIES(
+       ${CMAKE_SOURCE_DIR}/include
+       ${IVUG_SOURCE_WIDGET_DIR}/include
+       ${IVUG_SOURCE_COMMON_DIR}/include
+       ${IVUG_SOURCE_MEDIA_DIR}/include
+       ${IVUG_SOURCE_FEATURE_DIR}/include
+       include
+       src/effect/include
+)
+
+MESSAGE("Checking " ${PROJECT_NAME}\r)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(${PROJECT_NAME}_pkgs REQUIRED
+       elementary
+       ecore
+       ecore-evas
+       edje
+       eina
+       evas
+       dlog
+       ecore-x
+       xext
+       xcomposite
+       vconf
+       ui-gadget-1
+       glib-2.0
+       capi-system-power
+       capi-appfw-application
+)
+
+FOREACH(flag ${${PROJECT_NAME}_pkgs_CFLAGS})
+       SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -Wall")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS}")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DLOG_LVL=DBG_MSG_LVL_HIGH")
+ADD_DEFINITIONS("-DLOG_CAT=\"IV-WIDGET\"")
+
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION} )
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${${PROJECT_NAME}_pkgs_LDFLAGS}
+       ivug_common ivug_medialist ivug_widget ivug_feature
+)
+
+#install resouce files.
+# Lack of a trailing slash means install this directory, trailing slash means
+# install everything in this directory.
+
+BUILD_EDJ(ivug-ss-ly.edc                       ivug-ss-ly.edj          res/layout      icons)
+
+# Install image files.
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/images/ DESTINATION ${CMAKE_INSTALL_PREFIX}/res/images/${IVUG_PACKAGE_NAME})
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib)
+
diff --git a/slideshow/include/ivug-slideshow.h b/slideshow/include/ivug-slideshow.h
new file mode 100755 (executable)
index 0000000..1c90f5f
--- /dev/null
@@ -0,0 +1,137 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#pragma once
+
+// Slide Show
+
+/*
+       Start slide show.
+
+       if bSlideFirst == EINA_TRUE, slide and then wait interval time
+       if bSlideFirst == EINA_FALSE, wait interval time and then slide
+*/
+#include <Elementary.h>
+#include <Ecore_X.h>
+#include <glib.h>
+
+#include "ivug-medialist.h"
+#include "ivug-config.h"
+#include "ivug-effect.h"
+
+#define DATA_PATH                                              DATADIR"/"PACKAGE
+
+typedef void (*ivug_slideshow_finish_cb)(Media_Data *cur_sd, void* user_data);
+
+typedef enum {
+       SLIDE_SHOW_STOPPED = 0x00,
+       SLIDE_SHOW_INTERRUPTED,
+       SLIDE_SHOW_RUNNING,
+       SLIDE_SHOW_PAUSE,
+} slideshow_state_t;
+
+typedef struct
+{
+       void *pSlideshow; //SlideShow *
+       Evas_Object *layout;
+       Evas_Object *photocam;
+       Evas_Object *thumbnail;
+
+       Media_Item *mitem;
+
+       int x;  // Need??
+       int y;
+
+} Slide_Layout;
+
+typedef struct _SlideShow
+{
+       Evas_Object *obj;               // Slide show view.
+       Evas_Object *event;             // Mouse event
+
+/* slide show setting */
+       double ss_interval_time;
+       slide_show_mode ss_mode;
+
+/* slide show effect*/
+       Effect_Type effect_type;
+       Effect_Engine* effect_engine;
+
+//slider show.
+       slideshow_state_t state;
+
+       Ecore_Timer *ss_timer;  //slide show timer
+       Ecore_Timer *click_timer;
+       ivug_slideshow_finish_cb ss_func;               // Callback for slide show finished
+       void* ss_user_data;
+       Eina_Bool bSS_StopFlag; /* request slide show stop flag */
+
+// Data
+       Media_List *media_list;
+       Media_Item *ss_Header;          // Start point
+
+// Layout.
+       int sCurrent;           // 0 or 1
+       Slide_Layout sLayout[2];
+
+// State variables.
+       int screen_w;
+       int screen_h;
+
+
+       Ecore_Idler *load_idler;
+}SlideShow;
+
+SlideShow *
+ivug_ss_create(Evas_Object *parent);
+
+bool
+ivug_ss_start(SlideShow *pSlideShow , Media_Item *current, Media_List *list, Eina_Bool bSlideFirst);
+
+bool
+ivug_ss_resume(SlideShow *pSlideShow);
+
+bool
+ivug_ss_pause(SlideShow *pSlideShow);
+
+bool
+ivug_ss_stop(SlideShow *pSlideShow);
+
+void
+ivug_ss_delete(SlideShow *pSlideShow);
+
+void
+ivug_ss_resize(SlideShow *pSlideShow);
+
+Media_Item *
+ivug_ss_item_get(SlideShow *pSlideShow);
+
+Evas_Object *
+ivug_ss_object_get(SlideShow *pSlideShow);
+
+bool
+ivug_ss_set_music(SlideShow *pSlideShow, const char *path);
+
+void
+ivug_ss_get_screen_size(int *width, int *height);
+
+Media_Item *
+ivug_ss_get_next_item(Media_List *mList,
+                       Media_Item *header,
+                       Media_Item *current,
+                       slide_show_mode mode);
+
+
diff --git a/slideshow/res/images/T01_Noise.png b/slideshow/res/images/T01_Noise.png
new file mode 100755 (executable)
index 0000000..d76dbfa
Binary files /dev/null and b/slideshow/res/images/T01_Noise.png differ
diff --git a/slideshow/res/layout/icons/T01_btn_play.png b/slideshow/res/layout/icons/T01_btn_play.png
new file mode 100755 (executable)
index 0000000..a19a8e0
Binary files /dev/null and b/slideshow/res/layout/icons/T01_btn_play.png differ
diff --git a/slideshow/res/layout/ivug-ss-ly.edc b/slideshow/res/layout/ivug-ss-ly.edc
new file mode 100755 (executable)
index 0000000..6018b80
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *       http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+collections {
+       group {
+               name: "view.slideshow";
+               parts {
+                       part { name: "bg";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       color: 0 0 0 255;
+                                       visible: 1;
+                                       rel1 { relative: 0.0 0.0;}
+                                       rel2 { relative: 1.0 1.0;}
+                               }
+                       }
+               }
+
+       }
+}
+
+
+collections {
+       group {
+               name: "slayout";
+               images {
+                       image: "T01_btn_play.png" COMP;
+               }
+               parts {
+       /* add bg to unsend events to slider layer */
+                       part { name: "bg";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 1;
+                               //repeat_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       color: 0 0 0 255;
+                                       rel1 { relative: 0.0 0.0;}
+                                       rel2 { relative: 1.0 1.0;}
+                               }
+                       }
+                       part { name: "content";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       rel1 { relative: 0.0 0.0;}
+                                       rel2 { relative: 1.0 1.0;}
+                               }
+                       }
+                       part { name: "thumbnail";
+                               type: SWALLOW;
+                               mouse_events: 1;
+                               scale: 1;
+                               description {
+                       state: "default" 0.0;
+                                       align: 0.5 0.5;
+                               visible: 0;
+                               rel1 { relative: 0.0 0.0; }
+                               rel2 { relative: 1.0 1.0; }
+                       }
+
+                               description {
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                               visible: 1;
+                }
+                   }
+                       part { name: "play.icon";
+                               type: IMAGE;
+                               mouse_events: 1;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       align: 0.5 0.5;
+                                       visible: 0;
+                                       fixed: 1 1;
+                                       max: 72 72;
+                                       rel1 { relative: 0.0 0.0; }
+                                       rel2 { relative: 1.0 1.0; }
+                                       image.normal: "T01_btn_play.png";
+                               }
+
+                               description {
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name: "show_thumbnail";
+                               signal: "elm,state,show_thumbnail";
+                               source: "slideshow";
+                               action: STATE_SET "show" 0.0;
+                               target: "thumbnail";
+                       }
+
+                       program {
+                               name: "hide_thumbnail";
+                               signal: "elm,state,hide_thumbnail";
+                               source: "slideshow";
+                               action: STATE_SET "default" 0.0;
+                               target: "thumbnail";
+                       }
+                       program {
+                               name: "show_icon";
+                               signal: "elm,state,show_play_icon";
+                               source: "slideshow";
+                               action: STATE_SET "show" 0.0;
+                               target: "play.icon";
+                       }
+
+                       program {
+                               name: "hide_icon";
+                               signal: "elm,state,hide_play_icon";
+                               source: "slideshow";
+                               action: STATE_SET "default" 0.0;
+                               target: "play.icon";
+                       }
+               }
+       }
+}
diff --git a/slideshow/src/effect/include/ivug-anim.h b/slideshow/src/effect/include/ivug-anim.h
new file mode 100755 (executable)
index 0000000..1735e4e
--- /dev/null
@@ -0,0 +1,64 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_ANIM_H__
+#define __IVUG_ANIM_H__
+
+#include <stdbool.h>
+
+typedef enum {
+       ANIM_TYPE_LINEAR,
+       ANIM_TYPE_QUARTIC_INOUT,
+       ANIM_TYPE_QUINTIC_INOUT,
+       ANIM_TYPE_SINE,
+} anim_type_t;
+
+/*
+       t: current time b: start time c: change in value d: duration
+*/
+typedef double (*anim_transit_func_t) (double t, double b, double c, double d);
+
+typedef struct {
+/* private */
+       double duration;
+       double t_start;
+       double t_varing;
+
+       anim_transit_func_t transit_func;
+
+       void *user_data;
+} anim_handle_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+anim_handle_t *create_animation();
+
+void delete_animation(anim_handle_t *anim);
+
+bool update_animation(anim_handle_t *anim, double current, double *value);
+
+bool set_animation_type(anim_handle_t *anim, anim_type_t type);
+
+bool set_animation(anim_handle_t *anim, int start, int end, double duration);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/slideshow/src/effect/include/ivug-effect.h b/slideshow/src/effect/include/ivug-effect.h
new file mode 100755 (executable)
index 0000000..80e604f
--- /dev/null
@@ -0,0 +1,98 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_EFFECT_H__
+#define __IVUG_EFFECT_H__
+
+#include <stdbool.h>
+#include <Elementary.h>
+#include "ivug-anim.h"
+
+#define        EFFECT_LBYTES_ARGB8888(w)       (((w) * 4))
+#define MAX_PERCENT                    (100.0f)
+#define MIN_PERCENT                    (0.0f)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *Effect_Data ;
+
+typedef void (*FuncFinished)(void *data);
+
+typedef struct {
+       Effect_Data eng_data;
+
+       FuncFinished pFinishedCB;
+       void *ClientData;
+
+       double t_base;          // start time.
+       anim_handle_t *anim;
+       Ecore_Animator *animator;
+
+       struct {
+               Effect_Data (*init) (Evas_Object *src, Evas_Object *dst);
+               bool (*set_size) (Effect_Data data, int screen_w, int screen_h, int rotation);
+               void (*animate) (Effect_Data data, double percent);
+               void (*pause) (Effect_Data data);               /* Not used*/
+               void (*resume) (Effect_Data data);              /* Not used*/
+               void (*finalize) (Effect_Data data);
+
+               double (*get_duration)(Effect_Data data);
+       } func;
+
+} Effect_Engine;
+
+typedef enum _Effect_Type {
+       EFFECT_NONE,
+       EFFECT_IRIS,
+       EFFECT_DISSOLVE,
+       EFFECT_SLIDE,
+       EFFECT_DISSOLVE_FADE,
+       EFFECT_SPLIT,
+       EFFECT_MAX
+} Effect_Type;
+
+
+
+
+
+Effect_Engine *ivug_effect_add(Effect_Type type);
+
+bool ivug_effect_init(Effect_Engine *engine, Evas_Object *src, Evas_Object *dst);
+bool ivug_effect_set_size(Effect_Engine *engine, int w, int h, int rotation);
+bool ivug_effect_start(Effect_Engine *engine, FuncFinished pFunc, void *data);
+bool ivug_effect_pause(Effect_Engine *engine);
+bool ivug_effect_resume(Effect_Engine *engine);
+bool ivug_effect_finalize(Effect_Engine *engine);
+
+
+/*
+       Private function for adding effect. Do not use below functions directly..
+*/
+Effect_Engine *ivug_fade_add(void);
+Effect_Engine *ivug_iris_add(void);
+Effect_Engine *ivug_dissolve_add(void);
+Effect_Engine *ivug_blind_add(void);
+Effect_Engine *ivug_slide_add(void);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif                         /* __IVUG_EFFECT_H__ */
diff --git a/slideshow/src/effect/ivug-anim.c b/slideshow/src/effect/ivug-anim.c
new file mode 100755 (executable)
index 0000000..5c46a87
--- /dev/null
@@ -0,0 +1,177 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+
+#include <stddef.h>            /* for NULL */
+#include <memory.h>
+#include <stdlib.h>
+
+#include "ivug-debug.h"
+#include "ivug-anim.h"
+
+/*
+       t: current time b: start time c: change in value d: duration
+*/
+static double _anim_linear(double t, double b, double c, double d)
+{
+       if(d != 0.0)
+               t /= d;
+       return b + c * (t);
+}
+
+static double _anim_sine(double t, double b, double c, double d)
+{
+/* TODO : Consider below table reconstruct. need only 0.0 ~ 1.0 range*/
+       static const double const SIN_TABLE[91] = {
+               0.0000f, 0.0174f, 0.0349f, 0.0523f, 0.0698f,
+               0.0872f, 0.1045f, 0.1219f, 0.1392f, 0.1564f,
+               0.1736f, 0.1908f, 0.2079f, 0.2249f, 0.2419f,
+               0.2588f, 0.2756f, 0.2924f, 0.3090f, 0.3256f,
+               0.3420f, 0.3584f, 0.3746f, 0.3907f, 0.4067f,
+               0.4226f, 0.4384f, 0.4540f, 0.4695f, 0.4848f,
+               0.5000f, 0.5150f, 0.5299f, 0.5446f, 0.5592f,
+               0.5736f, 0.5878f, 0.6018f, 0.6157f, 0.6293f,
+               0.6528f, 0.6561f, 0.6691f, 0.6820f, 0.6947f,
+               0.7071f, 0.7193f, 0.7314f, 0.7431f, 0.7547f,
+               0.7660f, 0.7772f, 0.7880f, 0.7986f, 0.8090f,
+               0.8191f, 0.8290f, 0.8387f, 0.8480f, 0.8571f,
+               0.8660f, 0.8746f, 0.8829f, 0.8910f, 0.8988f,
+               0.9063f, 0.9135f, 0.9205f, 0.9272f, 0.9336f,
+               0.9397f, 0.9455f, 0.9511f, 0.9563f, 0.9613f,
+               0.9659f, 0.9703f, 0.9744f, 0.9781f, 0.9816f,
+               0.9848f, 0.9877f, 0.9903f, 0.9926f, 0.9945f,
+               0.9962f, 0.9976f, 0.9986f, 0.9994f, 0.9998f,
+               1.0f
+       };
+
+       if(d != 0.0)
+               t /= d;                 /* normalize */
+
+       int idx = (int)(90.0 * t);
+
+       return b + c * (SIN_TABLE[idx]);
+
+}
+
+static double _anim_ease_inout_quartic(double t, double b,
+                                               double c, double d)
+{
+       if(d != 0.0)
+               t /= d;
+       double ts = t * t;
+       double tc = ts * t;
+       return b + c * (-2 * tc + 3 * ts);
+
+}
+
+static double _anim_ease_inout_quintic(double t, double b,
+                                               double c, double d)
+{
+       if(d != 0.0)
+               t /= d;
+       double ts = t * t;
+       double tc = ts * t;
+       return b + c * (6 * tc * ts + -15 * ts * ts + 10 * tc);
+}
+
+anim_handle_t *create_animation()
+{
+       anim_handle_t *anim;
+
+       anim = calloc(1, sizeof(anim_handle_t));
+
+       if (anim == NULL) {
+               MSG_IVUG_ERROR("Cannot allocate memory");
+               return NULL;
+       }
+
+       return anim;
+
+}
+
+void delete_animation(anim_handle_t *anim)
+{
+       IV_ASSERT(anim != NULL);
+
+       free(anim);
+
+}
+
+bool set_animation_type(anim_handle_t *anim, anim_type_t type)
+{
+       IV_ASSERT(anim != NULL);
+
+       switch (type) {
+       case ANIM_TYPE_LINEAR:
+               anim->transit_func = _anim_linear;
+               break;
+       case ANIM_TYPE_QUARTIC_INOUT:
+               anim->transit_func = _anim_ease_inout_quartic;
+               break;
+
+       case ANIM_TYPE_QUINTIC_INOUT:
+               anim->transit_func = _anim_ease_inout_quintic;
+               break;
+
+       case ANIM_TYPE_SINE:
+               anim->transit_func = _anim_sine;
+               break;
+       default:
+               MSG_IVUG_ERROR("Invalid transition type=%d", type);
+               return false;
+               break;
+       }
+
+       return true;
+}
+
+bool set_animation(anim_handle_t *anim, int start, int end, double duration)
+{
+       IV_ASSERT(anim != NULL);
+
+       //MSG_IVUG_HIGH("Set Anim. Start=%d End=%d Dur=%f", start, end, duration);
+       anim->duration = duration;
+       anim->t_start = start;
+       anim->t_varing = end - start;
+
+       return true;
+}
+
+bool update_animation(anim_handle_t *anim, double current, double *value)
+{
+       //MSG_IVUG_HIGH("update_animation");
+       IV_ASSERT(anim != NULL);
+       IV_ASSERT(anim->transit_func != NULL);
+
+       if (current >= anim->duration) {
+               *value = anim->t_start + anim->t_varing;
+               //MSG_IVUG_HIGH("End Start:%f Varing:%f Duration=%f",
+                            //anim->t_start, anim->t_varing, anim->duration);
+
+               //MSG_IVUG_HIGH("End Current=%f Value=%f", current, *value);
+
+               return false;   /* End of animation */
+       }
+
+       MSG_EFFECT_LOW("Start:%f Varing:%f Duration=%f Current=%f", anim->t_start, anim->t_varing, anim->duration, current);
+
+       *value = anim->transit_func(current, anim->t_start, anim->t_varing,
+                                        anim->duration);
+
+       MSG_EFFECT_LOW("Value = %f", *value);
+
+       return true;
+}
diff --git a/slideshow/src/effect/ivug-blind.c b/slideshow/src/effect/ivug-blind.c
new file mode 100755 (executable)
index 0000000..6d4b533
--- /dev/null
@@ -0,0 +1,313 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-debug.h"
+#include "ivug-xcapture.h"
+#include "ivug-effect.h"
+
+/* Currently only 4 is supported */
+#define DEFAULT_MAP_COUNT              (4)
+#define DEFAULT_FOCUL_DISTANCE         (10000)
+
+#define DEFAULT_START_ANGLE            (0.0f)
+#define DEFAULT_END_ANGLE              (90.0f)
+
+#define MAX_BLIND_NUM  8
+
+typedef struct _Blind_Rotation Blind_Rotation;
+
+struct _Blind_Rotation {
+       bool cw;                /* Clockwise rotation */
+       float from, to;         /* rotate angle: 0 ~ 360 */
+};
+
+typedef struct _Blind_Data Blind_Data;
+
+struct _Blind_Data {
+       int bx;
+       int by;
+       int bw;
+       int bh;
+
+       Evas_Object * img[MAX_BLIND_NUM];
+
+       Evas_Object * dst;
+
+       Evas * evas;
+
+       Blind_Rotation rotation;
+};
+
+static bool
+__ivug_blind_image_create(Evas *e, Blind_Data *engine,
+                               int *src_data)
+{
+       ivug_retvm_if(e == NULL, false, "Evas is NULL");
+       ivug_retvm_if(engine == NULL, false, "engine is NULL");
+       ivug_retvm_if(src_data == NULL, false, "src_data is NULL");
+
+       Blind_Data *eng_data = engine;
+
+       ivug_retvm_if((eng_data->bw <= 0 || eng_data->bh <= 0), false,
+                     "bw or bh is 0: [%d, %d]", eng_data->bw, eng_data->bh);
+
+       int index;
+       int row = 0;
+       int col = 0;
+
+       int *psrc = src_data;
+       int *dst_data = NULL;
+
+       for (index = 0; index < MAX_BLIND_NUM; index++) {
+               eng_data->img[index] = evas_object_image_filled_add(e);
+               evas_object_image_size_set(eng_data->img[index], eng_data->bw,
+                                          eng_data->bh);
+               evas_object_image_fill_set(eng_data->img[index], 0, 0,
+                                          eng_data->bw, eng_data->bh);
+               evas_object_image_data_update_add(eng_data->img[index], 0, 0,
+                                                 eng_data->bw, eng_data->bh);
+
+               dst_data =
+                       evas_object_image_data_get(eng_data->img[index],
+                                                  EINA_TRUE);
+
+               row = eng_data->bw;
+               col = eng_data->bh;
+               while (col--) {
+                       while (row--) {
+                               *dst_data++ = *psrc++;
+                       }
+
+                       row = eng_data->bw;
+               }
+
+               evas_object_resize(eng_data->img[index], eng_data->bw,
+                                  eng_data->bh);
+               evas_object_move(eng_data->img[index], eng_data->bx,
+                                eng_data->by + eng_data->bh * index);
+               evas_object_show(eng_data->img[index]);
+       }
+
+       return true;
+}
+
+static Effect_Data __ivug_blind_init(Evas_Object *src, Evas_Object *dst)
+{
+       IV_ASSERT(src != NULL);
+
+       Blind_Data *eng_data = calloc(1, sizeof(Blind_Data));
+       if (eng_data == NULL) {
+               MSG_EFFECT_ERROR("Memory calloc failed");
+               return NULL;
+       }
+
+       eng_data->evas = evas_object_evas_get(src);
+
+       Evas_Coord x, y, w, h;
+       evas_object_geometry_get(src, &x, &y, &w, &h);
+
+       eng_data->bx = x;
+       eng_data->by = y;
+
+       eng_data->dst = dst;
+
+       evas_object_stack_below(dst, src);
+       evas_object_move(dst, 0, 0);
+
+       eng_data->rotation.cw = true;
+       eng_data->rotation.from = DEFAULT_START_ANGLE;
+       eng_data->rotation.to = DEFAULT_END_ANGLE;
+
+       /* Need hide the img_object here */
+       evas_object_hide(src);
+
+       return (Effect_Data)eng_data;
+}
+
+static bool __ivug_blind_set_size(void *data, int screen_w, int screen_h, int rotation)
+{
+       IVUG_FUNC_ENTER();
+
+       ivug_retvm_if((screen_w <= 0
+                      || screen_h <= 0), false,
+                     "screen_w or screen_h <= 0: [%d, %d]", screen_w,
+                     screen_h);
+
+       Blind_Data *eng_data = (Blind_Data *) data;
+
+       /* Get the data from ecore evas */
+       int size = 0;
+       int *src_data = (int *)ivug_xcapture_screen_data_get(&size, rotation);
+       ivug_retvm_if(src_data == NULL, false, "screen data is NULL");
+
+       if (size != screen_h * EFFECT_LBYTES_ARGB8888(screen_w)) {
+               MSG_EFFECT_ERROR("Screen data size is invalid: %d", size);
+
+               free(src_data);
+               src_data = NULL;
+
+               return false;
+       }
+
+       eng_data->bw = screen_w;
+       eng_data->bh = screen_h / MAX_BLIND_NUM;
+
+       MSG_EFFECT_HIGH("eng_data->bw = %d, eng_data->bh = %d", eng_data->bw,
+                       eng_data->bh);
+
+       int index;
+       for (index = 0; index < MAX_BLIND_NUM; index++) {
+               evas_object_del(eng_data->img[index]);
+               eng_data->img[index] = NULL;
+       }
+
+       bool ret = __ivug_blind_image_create(eng_data->evas,
+                                            eng_data, src_data);
+       if (ret == false) {
+               MSG_EFFECT_ERROR("Create effect image failed");
+
+               free(src_data);
+               src_data = NULL;
+
+               return false;
+       }
+
+       free(src_data);
+       src_data = NULL;
+
+       evas_object_move(eng_data->dst, 0, 0);
+
+       IVUG_FUNC_LEAVE();
+
+       return true;
+}
+
+static void _ivug_blind_rotation_op(void *data, double frame)
+{
+       IVUG_FUNC_ENTER();
+
+       Blind_Data *eng_data = (Blind_Data *) data;
+       ivug_retm_if(eng_data == NULL, "eng_data is NULL");
+
+       Blind_Rotation *rotation = &(eng_data->rotation);
+
+       float degree;
+
+       degree = rotation->from + (float)(frame * rotation->to);
+
+       if (!rotation->cw) {
+               degree *= -1;
+       }
+
+       MSG_EFFECT_MED("frame = %f, degree = %f", frame, degree);
+
+       int offset = eng_data->bh / 2;
+       int y;
+
+       Evas_Map *map = NULL;
+       int index;
+       for (index = 0; index < MAX_BLIND_NUM; index++) {
+               map = evas_map_new(DEFAULT_MAP_COUNT);
+               if (map == NULL) {
+                       MSG_EFFECT_ERROR("Create map failed");
+                       break;
+               }
+
+               evas_map_smooth_set(map, EINA_TRUE);
+               evas_map_util_points_populate_from_object_full(map,
+                                                              eng_data->img
+                                                              [index], 0);
+
+               y = index * eng_data->bh + offset;
+
+               evas_map_util_3d_rotate(map, degree, 0, 0, eng_data->bw / 2, y, 0);
+               evas_map_util_3d_perspective(map, eng_data->bw / 2, y, 0,
+                                            DEFAULT_FOCUL_DISTANCE);
+
+               evas_object_map_enable_set(eng_data->img[index], EINA_TRUE);
+               evas_object_map_set(eng_data->img[index], map);
+               evas_map_free(map);
+       }
+
+       IVUG_FUNC_LEAVE();
+}
+
+static void __ivug_blind_anim(void *data, double percent)
+{
+/*      IVUG_FUNC_ENTER(); */
+
+       ivug_retm_if(data == NULL, "data is NULL");
+
+       Blind_Data *eng_data = (Blind_Data *) data;
+
+       ivug_retm_if((percent < MIN_PERCENT
+                     || percent > MAX_PERCENT),
+                    "Invalide value: percent = [%f]", percent);
+
+       double frame = percent / MAX_PERCENT;
+       _ivug_blind_rotation_op(eng_data, frame);
+
+/*      IVUG_FUNC_LEAVE(); */
+}
+
+static void __ivug_blind_pause(void *data)
+{
+       IVUG_FUNC_ENTER();
+
+       IVUG_FUNC_LEAVE();
+}
+
+static void __ivug_blind_resume(void *data)
+{
+       IVUG_FUNC_ENTER();
+
+       IVUG_FUNC_LEAVE();
+}
+
+static void __ivug_blind_finialize(void *data)
+{
+       IVUG_FUNC_ENTER();
+
+       ivug_retm_if(data == NULL, "data is NULL");
+
+       Blind_Data *eng_data = (Blind_Data *) data;
+
+       int index;
+       for (index = 0; index < MAX_BLIND_NUM; index++) {
+               evas_object_del(eng_data->img[index]);
+               eng_data->img[index] = NULL;
+       }
+
+       free(eng_data);
+       eng_data = NULL;
+
+       IVUG_FUNC_LEAVE();
+}
+
+Effect_Engine *ivug_blind_add(void)
+{
+       Effect_Engine *eng_blind = calloc(1, sizeof(Effect_Engine));
+       ivug_retvm_if(eng_blind == NULL, NULL, "calloc failed");
+
+       eng_blind->func.init = &__ivug_blind_init;
+       eng_blind->func.set_size = &__ivug_blind_set_size;
+       eng_blind->func.animate = &__ivug_blind_anim;
+       eng_blind->func.pause = &__ivug_blind_pause;
+       eng_blind->func.resume = &__ivug_blind_resume;
+       eng_blind->func.finalize = &__ivug_blind_finialize;
+
+       return eng_blind;
+}
diff --git a/slideshow/src/effect/ivug-dissolve.c b/slideshow/src/effect/ivug-dissolve.c
new file mode 100755 (executable)
index 0000000..37f5e57
--- /dev/null
@@ -0,0 +1,369 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+
+#include "ivug-debug.h"
+
+#include "ivug-xcapture.h"
+#include "ivug-effect.h"
+
+#define BLOCK_ROW_NUM  20
+#define BLOCK_COL_NUM  12
+
+#define DISSOLVE_NUM   240             // 20 * 12
+
+/* TODO: Optimize the order */
+const int const DISSOLVE_TABLE[DISSOLVE_NUM] = {
+       201, 8, 82, 163, 181, 215, 0, 126, 30, 106,
+       162, 122, 216, 18, 99, 70, 223, 89, 22, 191,
+       103, 235, 154, 230, 50, 231, 14, 135, 60, 10,
+       114, 210, 53, 113, 17, 199, 42, 165, 229, 100,
+       97, 45, 125, 34, 15, 64, 48, 202, 150, 80,
+       130, 2, 61, 86, 159, 239, 207, 95, 164, 168,
+       55, 75, 169, 6, 145, 149, 173, 208, 205, 4,
+       124, 13, 116, 194, 198, 175, 94, 176, 81, 144,
+       184, 180, 187, 66, 72, 206, 24, 225, 220, 59,
+       3, 182, 93, 237, 16, 227, 54, 119, 183, 38,
+       101, 107, 21, 23, 143, 186, 233, 28, 213, 52,
+       136, 31, 179, 228, 7, 129, 185, 123, 147, 131,
+       111, 234, 192, 33, 139, 203, 160, 137, 47, 40,
+       141, 172, 65, 157, 43, 88, 218, 44, 83, 62,
+       217, 178, 193, 109, 189, 151, 115, 39, 91, 19,
+       138, 76, 190, 209, 79, 63, 158, 196, 85, 214,
+       56, 152, 108, 27, 222, 46, 156, 177, 105, 37,
+       71, 96, 26, 87, 221, 68, 110, 117, 78, 112,
+       188, 74, 77, 92, 69, 170, 238, 120, 35, 51,
+       211, 146, 11, 148, 58, 5, 174, 41, 161, 84,
+       12, 121, 171, 25, 1, 226, 166, 195, 134, 153,
+       212, 142, 29, 9, 155, 132, 67, 200, 73, 127,
+       197, 232, 140, 224, 104, 167, 90, 102, 57, 204,
+       133, 128, 49, 118, 32, 219, 20, 236, 36, 98
+};
+
+typedef struct _Dissolve_Data Dissolve_Data;
+
+struct _Dissolve_Data {
+       int screen_w;
+       int screen_h;
+
+       int screen_x;
+       int screen_y;
+
+       int block_w;            /*  block width*/
+       int block_h;            /*  block height*/
+
+       int n_row;              /*  row number*/
+       int n_col;              /*  col number*/
+
+       Evas_Object **diss_img;
+       Evas * evas;
+       Evas_Object *src;
+       Evas_Object *dst;
+};
+
+static bool
+__ivug_dissolve_image_create(Evas *evas, Dissolve_Data * eng_data,
+                            int *src_data)
+{
+       ivug_retvm_if(evas == NULL, false, "Evas is NULL");
+       ivug_retvm_if(eng_data == NULL, false, "eng_data is NULL");
+       ivug_retvm_if(src_data == NULL, false, "src_data is NULL");
+
+       ivug_retvm_if((eng_data->block_w <= 0 || eng_data->block_h <= 0), false,
+                     "screen_w or screen_h is: [%d, %d]", eng_data->block_w,
+                     eng_data->block_h);
+
+       ivug_retvm_if((eng_data->n_row <= 0 || eng_data->n_col <= 0), false,
+                     "n_row or n_col is: [%d, %d]", eng_data->n_row,
+                     eng_data->n_col);
+
+       int *psrc = NULL;
+       Evas_Object *img_obj = NULL;
+       int *dst_data = NULL;
+
+       int i, j;
+       int start_pos = 0;
+       int index;
+       for (i = 0; i < eng_data->n_row; i++) {
+               for (j = 0; j < eng_data->n_col; j++) {
+                       img_obj = evas_object_image_filled_add(evas);
+                       evas_object_image_size_set(img_obj, eng_data->block_w,
+                                                  eng_data->block_h);
+
+                       /* Locate at the left-top corner*/
+                       start_pos =
+                               i * eng_data->screen_w * eng_data->block_h +
+                               j * eng_data->block_w;
+                       psrc = src_data + start_pos;
+//                     MSG_EFFECT_HIGH("start_pos is %d", start_pos);
+
+                       /* Set the image data*/
+                       dst_data = evas_object_image_data_get(img_obj,
+                                                             EINA_TRUE);
+                       int row = eng_data->block_w;
+                       int col = eng_data->block_h;
+
+                       while (col--) {
+                               while (row--) {
+                                       *dst_data++ = *psrc++;
+                               }
+
+                               row = eng_data->block_w;
+                               psrc += (eng_data->n_col - 1) * row;
+                       }
+
+                       evas_object_image_alpha_set(img_obj, EINA_TRUE);
+                       evas_object_resize(img_obj, eng_data->block_w,
+                                          eng_data->block_h);
+
+                       /* Change the position*/
+                       int pos_x, pos_y;
+                       pos_x = eng_data->screen_x + j * eng_data->block_w;
+                       pos_y = eng_data->screen_y + i * eng_data->block_h;
+
+//                     MSG_EFFECT_HIGH("[pos_x, pos_y] is [%d, %d]\n", pos_x,
+//                                     pos_y);
+                       evas_object_move(img_obj, pos_x, pos_y);
+                       evas_object_show(img_obj);
+
+                       index = i * eng_data->n_col + j;
+                       eng_data->diss_img[index] = img_obj;
+               }
+       }
+
+       return true;
+}
+
+static Effect_Data __ivug_dissolve_init(Evas_Object *src, Evas_Object *dst)
+{
+       IVUG_FUNC_ENTER();
+
+       IV_ASSERT(src != NULL);
+
+       Dissolve_Data *eng_data = calloc(1, sizeof(Dissolve_Data));
+       if (eng_data == NULL) {
+               MSG_EFFECT_ERROR("calloc for eng_data failed");
+               return NULL;
+       }
+
+       eng_data->evas = evas_object_evas_get(src);
+
+       eng_data->src = src;
+       eng_data->dst = dst;
+
+       evas_object_stack_below(dst, src);
+       evas_object_move(dst, 0, 0);
+
+       /* Need hide the img_object here*/
+       evas_object_hide(src);
+
+       IVUG_FUNC_LEAVE();
+
+       return (Effect_Data)eng_data;
+}
+
+static bool __ivug_dissolve_set_size(void *data, int screen_w, int screen_h, int rotation)
+{
+       IVUG_FUNC_ENTER();
+
+       IV_ASSERT(data != NULL);
+
+       ivug_retvm_if((screen_w <= 0
+                      || screen_h <= 0), false,
+                     "screen_w or screen_h <= 0: [%d, %d]", screen_w,
+                     screen_h);
+
+       MSG_EFFECT_HIGH("[screen_w, screen_h] = [%d, %d]", screen_w, screen_h);
+
+       Dissolve_Data *eng_data = (Dissolve_Data *) data;
+
+       /* Get the data from ecore evas*/
+       int size = 0;
+       char *src_data = ivug_xcapture_screen_data_get(&size, rotation);
+       ivug_retvm_if(src_data == NULL, false, "screen data is NULL");
+
+       if (size != screen_h * EFFECT_LBYTES_ARGB8888(screen_w)) {
+               MSG_EFFECT_ERROR("Screen data size is invalid: %d", size);
+
+               free(src_data);
+               src_data = NULL;
+
+               return false;
+       }
+
+       Evas_Coord x, y, w, h;
+       evas_object_geometry_get(eng_data->src, &x, &y, &w, &h);
+       eng_data->screen_x = x;
+       eng_data->screen_y = y;
+       eng_data->screen_w = w;
+       eng_data->screen_h = h;
+
+       if(rotation == 0 || rotation == 180)
+       {
+               eng_data->n_row = BLOCK_ROW_NUM;
+               eng_data->n_col = BLOCK_COL_NUM;
+       }
+       else
+       {
+               eng_data->n_row = BLOCK_COL_NUM;
+               eng_data->n_col = BLOCK_ROW_NUM;
+       }
+       eng_data->block_h = eng_data->screen_h / eng_data->n_row;
+       eng_data->block_w = eng_data->screen_w / eng_data->n_col;
+
+       MSG_EFFECT_HIGH("[n_row, n_col] is [%d, %d]", eng_data->n_row,
+                       eng_data->n_col);
+       MSG_EFFECT_HIGH("[block_h, block_w] is [%d, %d]", eng_data->block_h,
+                       eng_data->block_w);
+
+       int block_num = eng_data->n_row * eng_data->n_col;
+       MSG_EFFECT_HIGH("block_num is %d", block_num);
+
+       int i;
+       if(eng_data->diss_img != NULL)
+       {
+               for (i = 0; i < block_num; i++) {
+                       if (eng_data->diss_img[i]) {
+                               evas_object_del(eng_data->diss_img[i]);
+                       }
+                       eng_data->diss_img[i] = NULL;
+               }
+               free(eng_data->diss_img);
+       }
+
+       eng_data->diss_img = (Evas_Object **)calloc(1, block_num *
+                                                   sizeof(Evas_Object *));
+
+       bool ret = __ivug_dissolve_image_create(eng_data->evas, eng_data,
+                                               (int *)src_data);
+       if (!ret) {
+               MSG_EFFECT_ERROR("Create images failed");
+
+               free(src_data);
+               src_data = NULL;
+
+               return false;
+       }
+
+       free(src_data);
+       src_data = NULL;
+
+       evas_object_move(eng_data->dst, 0, 0);
+
+       IVUG_FUNC_LEAVE();
+
+       return true;
+}
+
+static void __ivug_dissolve_image_data_clear(Evas_Object *image)
+{
+       ivug_retm_if(!image, "image object is NULL");
+
+       int w, h;
+       evas_object_image_size_get(image, &w, &h);
+       ivug_retm_if(w <= 0, "image width is less than 0");
+       ivug_retm_if(h <= 0, "image height is less than  0");
+
+       int *data = evas_object_image_data_get(image, EINA_TRUE);
+       ivug_retm_if(!data, "data is NULL");
+
+       int size = w * h;
+
+       memset(data, 0x0, size * sizeof(int));
+       evas_object_image_data_update_add(image, 0, 0, w, h);
+}
+
+static void __ivug_dissolve_anim(void *data, double percent)
+{
+/*       IVUG_FUNC_ENTER();*/
+
+       Dissolve_Data *eng_data = (Dissolve_Data *) data;
+
+       ivug_retm_if(eng_data == NULL, "data is NULL");
+       ivug_retm_if(eng_data->diss_img == NULL, "dissolve image is NULL");
+
+       int count = (eng_data->n_row * eng_data->n_col) * percent / MAX_PERCENT;
+       MSG_EFFECT_MED("percent = %f, count = %d", percent, count);
+
+       /* TODO: Start from last cleared pos */
+       int i;
+       for (i = 0; i < count; i++) {
+               MSG_EFFECT_MED("diss_array[%d] = %d", i, DISSOLVE_TABLE[i]);
+               __ivug_dissolve_image_data_clear(eng_data->
+                                                diss_img[DISSOLVE_TABLE[i]]);
+       }
+
+/*       IVUG_FUNC_LEAVE();*/
+}
+
+static void __ivug_dissolve_pause(void *data)
+{
+       IVUG_FUNC_ENTER();
+
+       IVUG_FUNC_LEAVE();
+}
+
+static void __ivug_dissolve_resume(void *data)
+{
+       IVUG_FUNC_ENTER();
+
+       IVUG_FUNC_LEAVE();
+}
+
+static void __ivug_dissolve_finialize(void *data)
+{
+       IVUG_FUNC_ENTER();
+
+       ivug_retm_if(data == NULL, "data is NULL");
+
+       Dissolve_Data *eng_data = (Dissolve_Data *) data;
+
+       if (eng_data->diss_img) {
+               int block_num = eng_data->n_row * eng_data->n_col;
+               int i;
+
+               for (i = 0; i < block_num; i++) {
+                       if (eng_data->diss_img[i]) {
+                               evas_object_del(eng_data->diss_img[i]);
+                       }
+
+                       eng_data->diss_img[i] = NULL;
+               }
+
+               free(eng_data->diss_img);
+               eng_data->diss_img = NULL;
+       }
+
+       free(eng_data);
+       eng_data = NULL;
+
+       IVUG_FUNC_LEAVE();
+}
+
+Effect_Engine *ivug_dissolve_add(void)
+{
+       Effect_Engine *eng_dissolve = calloc(1, sizeof(Effect_Engine));
+       ivug_retvm_if(eng_dissolve == NULL, NULL, "calloc failed");
+
+       eng_dissolve->func.init = &__ivug_dissolve_init;
+       eng_dissolve->func.set_size = &__ivug_dissolve_set_size;
+       eng_dissolve->func.animate = &__ivug_dissolve_anim;
+       eng_dissolve->func.pause = &__ivug_dissolve_pause;
+       eng_dissolve->func.resume = &__ivug_dissolve_resume;
+       eng_dissolve->func.finalize = &__ivug_dissolve_finialize;
+
+       return eng_dissolve;
+}
diff --git a/slideshow/src/effect/ivug-effect.c b/slideshow/src/effect/ivug-effect.c
new file mode 100755 (executable)
index 0000000..4ac07b3
--- /dev/null
@@ -0,0 +1,233 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-debug.h"
+#include "ivug-effect.h"
+
+#define SIN_TABLE_NUM  91
+
+/* Animation acceleration table */
+static const float const EFFECT_SIN_TABLE[SIN_TABLE_NUM] = {
+       0.0000f, 0.0174f, 0.0349f, 0.0523f, 0.0698f,
+       0.0872f, 0.1045f, 0.1219f, 0.1392f, 0.1564f,
+       0.1736f, 0.1908f, 0.2079f, 0.2249f, 0.2419f,
+       0.2588f, 0.2756f, 0.2924f, 0.3090f, 0.3256f,
+       0.3420f, 0.3584f, 0.3746f, 0.3907f, 0.4067f,
+       0.4226f, 0.4384f, 0.4540f, 0.4695f, 0.4848f,
+       0.5000f, 0.5150f, 0.5299f, 0.5446f, 0.5592f,
+       0.5736f, 0.5878f, 0.6018f, 0.6157f, 0.6293f,
+       0.6528f, 0.6561f, 0.6691f, 0.6820f, 0.6947f,
+       0.7071f, 0.7193f, 0.7314f, 0.7431f, 0.7547f,
+       0.7660f, 0.7772f, 0.7880f, 0.7986f, 0.8090f,
+       0.8191f, 0.8290f, 0.8387f, 0.8480f, 0.8571f,
+       0.8660f, 0.8746f, 0.8829f, 0.8910f, 0.8988f,
+       0.9063f, 0.9135f, 0.9205f, 0.9272f, 0.9336f,
+       0.9397f, 0.9455f, 0.9511f, 0.9563f, 0.9613f,
+       0.9659f, 0.9703f, 0.9744f, 0.9781f, 0.9816f,
+       0.9848f, 0.9877f, 0.9903f, 0.9926f, 0.9945f,
+       0.9962f, 0.9976f, 0.9986f, 0.9994f, 0.9998f,
+       1.0f
+};
+
+#define SLIDESHOW_ANI_TIME (1.0f)
+
+
+static Eina_Bool
+_on_effect_animator(void *data)
+{
+       IV_ASSERT( data != NULL);
+       Effect_Engine *engine = data;
+
+       double value = 0.0;
+
+       if (update_animation(engine->anim, ecore_loop_time_get() - engine->t_base, &value) == false )    // If last frame
+       {
+               engine->animator = NULL;
+
+               MSG_EFFECT_HIGH("Last effect frame. value=%f", value);
+
+               engine->func.animate(engine->eng_data, value);          // Draw last frame.
+               // Inform to user.
+               if ( engine->pFinishedCB )
+               {
+                       engine->pFinishedCB(engine->ClientData);
+               }
+
+               return ECORE_CALLBACK_CANCEL;
+       }
+
+       engine->func.animate(engine->eng_data, value);
+
+       return ECORE_CALLBACK_RENEW;
+}
+
+
+bool ivug_effect_init(Effect_Engine *engine, Evas_Object *src, Evas_Object *dst)
+{
+       IV_ASSERT(engine != NULL );
+
+       void *data = engine->func.init(src, dst);
+       if (data == NULL) {
+               MSG_EFFECT_ERROR("init returned data is NULL");
+
+               return false;
+       }
+
+       engine->eng_data = data;
+
+       engine->anim = create_animation();
+       return true;
+}
+
+bool ivug_effect_set_size(Effect_Engine *engine, int w, int h, int rotation)
+{
+       IV_ASSERT(engine != NULL );
+       IV_ASSERT(engine->eng_data != NULL);
+
+       if (engine->func.set_size == NULL)
+       {
+               MSG_EFFECT_ERROR("engine->func.set_size is NULL");
+               return false;
+       }
+
+       MSG_EFFECT_HIGH("set size. WH(%d,%d) Rotation(%d)", w, h, rotation);
+       return engine->func.set_size(engine->eng_data, w, h, rotation);
+}
+
+
+bool ivug_effect_start(Effect_Engine *engine, FuncFinished pFunc, void *data)
+{
+       ivug_retvm_if(engine == NULL, false, "engine is NULL");
+
+       IV_ASSERT(engine->func.animate != NULL);
+       IV_ASSERT(engine->eng_data != NULL);
+
+// Set up slide show animator
+       engine->t_base = ecore_loop_time_get();
+
+       double duration = SLIDESHOW_ANI_TIME;
+
+       if (engine->func.get_duration )
+       {
+               duration = engine->func.get_duration(engine->eng_data);
+       }
+
+       set_animation_type(engine->anim, ANIM_TYPE_LINEAR);
+       set_animation(engine->anim, 0, 100, duration);  // 0~100% during 1 seconds
+
+       engine->pFinishedCB = pFunc;
+       engine->ClientData = data;
+
+       if (engine->animator == NULL)
+       {
+               engine->animator = ecore_animator_add(_on_effect_animator, engine);
+       }
+
+       return true;
+}
+
+bool ivug_effect_pause(Effect_Engine *engine)
+{
+/* Unused. */
+       return true;
+}
+
+bool ivug_effect_resume(Effect_Engine *engine)
+{
+/* Unused. */
+       return true;
+}
+
+bool ivug_effect_finalize(Effect_Engine *engine)
+{
+       ivug_retvm_if(engine == NULL, false, "engine is NULL");
+
+       if ( engine->animator )
+       {
+               ecore_animator_del(engine->animator);
+               engine->animator = NULL;
+       }
+
+       if (engine->eng_data)
+       {
+               if (engine->func.finalize)
+               {
+                       MSG_EFFECT_HIGH("finalize");
+                       engine->func.finalize(engine->eng_data);
+               }
+               else
+               {
+                       MSG_EFFECT_ERROR("engine->func.finalize is NULL");
+               }
+
+               engine->eng_data = NULL;
+       }
+       else
+       {
+               MSG_EFFECT_ERROR("engine->eng_data is NULL");
+       }
+
+       if ( engine->anim )
+       {
+               delete_animation(engine->anim);
+       }
+
+       free(engine);
+       engine = NULL;
+
+       return true;
+}
+
+Effect_Engine *ivug_effect_add(Effect_Type type)
+{
+       Effect_Engine *eng = NULL;
+
+       switch (type) {
+       case EFFECT_DISSOLVE_FADE:
+               eng = ivug_fade_add();
+               break;
+
+       case EFFECT_SPLIT:
+               eng = ivug_blind_add();
+               break;
+
+       case EFFECT_IRIS:
+               eng = ivug_iris_add();
+               break;
+
+       case EFFECT_DISSOLVE:
+               eng = ivug_dissolve_add();
+               break;
+
+       case EFFECT_SLIDE:
+               eng = ivug_slide_add();
+               break;
+
+       default:
+               MSG_EFFECT_ERROR("Unknown effect type=%d", type);
+               /*Default effect, keeping with gallery setting*/
+               eng = ivug_slide_add();
+               break;
+       }
+
+       if (eng == NULL)
+       {
+               MSG_EFFECT_ERROR("Cannot create effect enigne. type=%d", type);
+               return NULL;
+       }
+
+       return eng;
+}
diff --git a/slideshow/src/effect/ivug-fade.c b/slideshow/src/effect/ivug-fade.c
new file mode 100755 (executable)
index 0000000..725dbf5
--- /dev/null
@@ -0,0 +1,160 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-debug.h"
+#include "ivug-effect.h"
+
+typedef struct _Fade_Data Fade_Data;
+
+struct _Fade_Data {
+       Evas_Object *src;
+       Evas_Object *dst;
+
+       Evas_Object *object;
+       Evas_Object *orig_cliper;
+
+       Evas_Object *cliper;
+
+       Evas * evas;
+
+       int screen_w;
+       int screen_h;
+};
+
+static void *__ivug_fade_init(Evas_Object *src, Evas_Object *dst)
+{
+       IVUG_FUNC_ENTER();
+
+       Fade_Data *eng_data = calloc(1, sizeof(Fade_Data));
+       ivug_retvm_if(eng_data == NULL, NULL, "calloc return NULL");
+
+       eng_data->evas = evas_object_evas_get(src);
+
+       eng_data->src = src;
+       eng_data->dst = dst;
+
+// Move object to 0,0
+       evas_object_stack_below(dst, src);
+
+       evas_object_move(dst, 0, 0);
+       evas_object_move(src, 0, 0);
+
+       Evas_Object *orig_cliper = evas_object_clip_get(src);
+       eng_data->orig_cliper = orig_cliper;
+
+       IVUG_FUNC_LEAVE();
+
+       return (Effect_Data)eng_data;
+}
+
+static bool __ivug_fade_set_size(void *data, int screen_w, int screen_h, int rotation)
+{
+       IVUG_FUNC_ENTER();
+
+       ivug_retvm_if(data == NULL, false, "data is NULL");
+
+       Fade_Data *eng_data = (Fade_Data *) data;
+
+       Evas_Coord x, y, w, h;
+       evas_object_geometry_get(eng_data->src, &x, &y, &w, &h);
+
+       eng_data->screen_w = screen_w;
+       eng_data->screen_h = screen_h;
+
+       if (eng_data->cliper) {
+               evas_object_clip_unset(eng_data->src);
+               evas_object_del(eng_data->cliper);
+               eng_data->cliper = NULL;
+       }
+
+       Evas_Object *clip = evas_object_rectangle_add(eng_data->evas);
+       evas_object_color_set(clip, 255, 255, 255, 255);
+       evas_object_resize(clip, screen_w, screen_h);
+       evas_object_move(clip, x, y);
+       evas_object_show(clip);
+
+       evas_object_clip_set(eng_data->src, clip);
+       eng_data->cliper = clip;
+
+       evas_object_move(eng_data->dst, 0, 0);
+
+       IVUG_FUNC_LEAVE();
+
+       return true;
+}
+
+static void __ivug_fade_anim(void *data, double percent)
+{
+       Fade_Data *eng_data = (Fade_Data *) data;
+
+       ivug_retm_if(eng_data == NULL, "data is NULL");
+       ivug_retm_if(eng_data->cliper == NULL, "cliper is NULL");
+
+       int alpha = 255 * (MAX_PERCENT - percent) / MAX_PERCENT;
+       evas_object_color_set(eng_data->cliper, alpha, alpha, alpha, alpha);
+
+       MSG_EFFECT_MED("alpha = %d", alpha);
+}
+
+static void __ivug_fade_pause(void *data)
+{
+       MSG_EFFECT_HIGH("Fade paused");
+}
+
+static void __ivug_fade_resume(void *data)
+{
+       MSG_EFFECT_HIGH("Fade resumed");
+}
+
+static void __ivug_fade_finialize(void *data)
+{
+       MSG_EFFECT_HIGH("Fade destroy");
+
+       ivug_retm_if(data == NULL, "data is NULL");
+
+       Fade_Data *eng_data = (Fade_Data *) data;
+
+       if (eng_data->cliper) {
+               evas_object_clip_unset(eng_data->src);
+               evas_object_del(eng_data->cliper);
+               eng_data->cliper = NULL;
+       }
+
+       if (eng_data->src && eng_data->orig_cliper)
+       {
+               evas_object_clip_set(eng_data->src, eng_data->orig_cliper);
+       }
+
+       free(eng_data);
+       eng_data = NULL;
+
+}
+
+Effect_Engine *ivug_fade_add(void)
+{
+       Effect_Engine *eng_fade = calloc(1, sizeof(Effect_Engine));
+       ivug_retvm_if(eng_fade == NULL, NULL, "calloc failed");
+
+       eng_fade->func.init = &__ivug_fade_init;
+       eng_fade->func.set_size = &__ivug_fade_set_size;
+       eng_fade->func.animate = &__ivug_fade_anim;
+       eng_fade->func.pause = &__ivug_fade_pause;
+       eng_fade->func.resume = &__ivug_fade_resume;
+       eng_fade->func.finalize = &__ivug_fade_finialize;
+
+       return eng_fade;
+}
+
diff --git a/slideshow/src/effect/ivug-iris.c b/slideshow/src/effect/ivug-iris.c
new file mode 100755 (executable)
index 0000000..904305e
--- /dev/null
@@ -0,0 +1,178 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-debug.h"
+#include "ivug-effect.h"
+
+
+typedef struct _Iris_Data Iris_Data;
+
+struct _Iris_Data {
+       Evas_Object *src;
+       Evas_Object *dst;
+
+       Evas_Object *orig_cliper;
+
+       Evas_Object *cliper;
+
+       Evas * evas;
+
+       int screen_w;
+       int screen_h;
+};
+
+static Effect_Data __ivug_iris_init(Evas_Object *src, Evas_Object *dst)
+{
+       IVUG_FUNC_ENTER();
+
+       Iris_Data *eng_data = calloc(1, sizeof(Iris_Data));
+       ivug_retvm_if(eng_data == NULL, NULL, "calloc return NULL");
+
+       eng_data->evas = evas_object_evas_get(src);
+       ivug_retvm_if(eng_data->evas == NULL, NULL, "Get evas is NULL");
+
+       eng_data->src = src;
+       eng_data->dst = dst;
+
+       Evas_Object *orig_cliper = evas_object_clip_get(src);
+       eng_data->orig_cliper = orig_cliper;
+
+       evas_object_stack_below(dst, src);
+       evas_object_move(dst, 0, 0);
+
+       IVUG_FUNC_LEAVE();
+
+       return (Effect_Data)eng_data;
+}
+
+static bool __ivug_iris_set_size(void *data, int screen_w, int screen_h, int rotation)
+{
+       IVUG_FUNC_ENTER();
+
+       ivug_retvm_if((screen_w <= 0
+                          || screen_h <= 0), false,
+                         "screen_w or screen_h <= 0: [%d, %d]", screen_w,
+                         screen_h);
+
+       Iris_Data *eng_data = (Iris_Data *) data;
+
+       Evas_Coord x, y, w, h;
+       evas_object_geometry_get(eng_data->src, &x, &y, &w, &h);
+       eng_data->screen_w = screen_w;
+       eng_data->screen_h = screen_h;
+
+       if (eng_data->cliper) {
+               evas_object_del(eng_data->cliper);
+               eng_data->cliper = NULL;
+       }
+
+       Evas_Object *clip = evas_object_rectangle_add(eng_data->evas);
+       evas_object_resize(clip, screen_w, screen_h);
+       evas_object_move(clip, x, y);
+       evas_object_show(clip);
+       evas_object_clip_set(eng_data->src, clip);
+       eng_data->cliper = clip;
+
+       evas_object_move(eng_data->dst, 0, 0);
+
+       IVUG_FUNC_LEAVE();
+
+       return true;
+
+}
+
+static void __ivug_iris_anim(void *data, double percent)
+{
+/*      IVUG_FUNC_ENTER(); */
+
+       Iris_Data *eng_data = (Iris_Data *) data;
+
+       ivug_retm_if(eng_data == NULL, "data is NULL");
+       ivug_retm_if(eng_data->cliper == NULL, "cliper is NULL");
+
+       int w = eng_data->screen_w;
+       int h = eng_data->screen_h;
+       int x, y;
+
+       w = w * (MAX_PERCENT - percent) / MAX_PERCENT;
+       h = h * (MAX_PERCENT - percent) / MAX_PERCENT;
+
+       x = (eng_data->screen_w - w) / 2;
+       y = (eng_data->screen_h - h) / 2;
+
+       MSG_EFFECT_MED("percent=%f, [x, y, w, h] = [%d, %d, %d, %d]", percent, x, y, w, h);
+
+       evas_object_resize(eng_data->cliper, w, h);
+       evas_object_move(eng_data->cliper, x, y);
+
+/*      IVUG_FUNC_LEAVE(); */
+}
+
+static void __ivug_iris_pause(void *data)
+{
+       IVUG_FUNC_ENTER();
+
+       IVUG_FUNC_LEAVE();
+}
+
+static void __ivug_iris_resume(void *data)
+{
+       IVUG_FUNC_ENTER();
+
+       IVUG_FUNC_LEAVE();
+}
+
+static void __ivug_iris_finialize(void *data)
+{
+       IVUG_FUNC_ENTER();
+
+       ivug_retm_if(data == NULL, "data is NULL");
+
+       Iris_Data *eng_data = (Iris_Data *) data;
+
+       if (eng_data->cliper) {
+               evas_object_del(eng_data->cliper);
+               eng_data->cliper = NULL;
+       }
+
+       if (eng_data->src && eng_data->orig_cliper) {
+               evas_object_clip_set(eng_data->src, eng_data->orig_cliper);
+       }
+
+       free(eng_data);
+       eng_data = NULL;
+
+       IVUG_FUNC_LEAVE();
+}
+
+Effect_Engine *ivug_iris_add(void)
+{
+       IVUG_FUNC_ENTER();
+
+       Effect_Engine *eng_iris = calloc(1, sizeof(Effect_Engine));
+       ivug_retvm_if(eng_iris == NULL, NULL, "calloc failed");
+
+       eng_iris->func.init = &__ivug_iris_init;
+       eng_iris->func.set_size = &__ivug_iris_set_size;
+       eng_iris->func.animate = &__ivug_iris_anim;
+       eng_iris->func.pause = &__ivug_iris_pause;
+       eng_iris->func.resume = &__ivug_iris_resume;
+       eng_iris->func.finalize = &__ivug_iris_finialize;
+
+       IVUG_FUNC_LEAVE();
+
+       return eng_iris;
+}
diff --git a/slideshow/src/effect/ivug-slide.c b/slideshow/src/effect/ivug-slide.c
new file mode 100755 (executable)
index 0000000..d7958f8
--- /dev/null
@@ -0,0 +1,148 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-debug.h"
+#include "ivug-effect.h"
+#include <ui-gadget.h>
+#include <ui-gadget-module.h>
+#include <Ecore_X.h>
+
+
+typedef struct {
+       Evas_Object *src;
+       Evas_Object *dst;
+
+       int screen_w;
+       int screen_h;
+} Priv_Data;
+
+#define IMAGE_BETWEEN_MARGIN (30)
+
+static Effect_Data __ivug_slide_init(Evas_Object *src, Evas_Object *dst)
+{
+       Priv_Data *pData = calloc(1, sizeof(Priv_Data));
+       IV_ASSERT(pData != NULL);
+
+       pData->src = src;
+       pData->dst = dst;
+
+       evas_object_stack_below(dst, src);
+
+       evas_object_move(pData->src, 0, 0);
+
+       return (Effect_Data)pData;
+}
+
+static bool __ivug_slide_set_size(void *data, int screen_w, int screen_h, int rotation)
+{
+       Priv_Data *pData = (Priv_Data *)data;
+       IV_ASSERT(pData != NULL);
+
+       pData->screen_w = screen_w;
+       pData->screen_h = screen_h;
+
+       return true;
+}
+
+static void _ivug_slide_get_screen_dimension(int *width, int *height)
+{
+       int rotation = elm_win_rotation_get((Evas_Object *)ug_get_window());
+
+       int screen_w = 0;
+       int screen_h = 0;
+       ecore_x_window_size_get(ecore_x_window_root_first_get(), &screen_w, &screen_h);
+       if(rotation == 0 || rotation == 180)
+       {
+               *width = screen_w;
+               *height = screen_h;
+       }
+       else if(rotation == 90 || rotation == 270)
+       {
+               *width = screen_h;
+               *height = screen_w;
+       }
+}
+
+static void __ivug_slide_anim(Effect_Data data, double percent)
+{
+       Priv_Data *pData = (Priv_Data *)data;
+
+       int first = 0;
+       int last = -pData->screen_w -IMAGE_BETWEEN_MARGIN;
+       //MSG_EFFECT_HIGH("pData->screen_w is %d", pData->screen_w);
+       //MSG_EFFECT_HIGH("last is %d", last);
+       int value = (double)first * (1.0f - percent / 100.0f) + (double)last * (percent / 100.0f);
+
+       //MSG_EFFECT_HIGH("Slide animation. Value=%d %f", value, percent);
+
+       Evas_Coord ow, oh;
+       /*
+       *  during animation between 2 images, after rotation, 'w' gotten is 0
+       *  it's wrong, so let's use _ivug_slide_get_screen_dimension() to update
+       *pData->screen_w and pData->screen_h
+       */
+       _ivug_slide_get_screen_dimension(&pData->screen_w, &pData->screen_h);
+
+       ow = pData->screen_w;
+       oh = pData->screen_h;
+       //MSG_EFFECT_HIGH("in __ivug_slide_anim, pData->screen_w, pData->screen_h is %d, %d\n", ow, oh);
+       //MSG_EFFECT_HIGH("src des pos x is %d, %d\n", value ,oy);
+       //MSG_EFFECT_HIGH("dst des pos x is %d, %d\n", value + ow + IMAGE_BETWEEN_MARGIN ,oy);
+       evas_object_move(pData->src, value, 0);
+       evas_object_move(pData->dst, value + ow + IMAGE_BETWEEN_MARGIN, 0);
+
+}
+
+static void __ivug_slide_pause(Effect_Data data)
+{
+
+}
+
+static void __ivug_slide_resume(Effect_Data data)
+{
+
+}
+
+static void __ivug_slide_finialize(Effect_Data data)
+{
+       Priv_Data *pData = (Priv_Data *)data;
+
+       free(pData);
+
+}
+
+static double __ivug_slide_get_duration(Effect_Data data)
+{
+       return 0.2f;
+}
+
+
+
+Effect_Engine *ivug_slide_add(void)
+{
+       Effect_Engine *eng_slide = calloc(1, sizeof(Effect_Engine));
+       ivug_retvm_if(eng_slide == NULL, NULL, "calloc failed");
+
+       eng_slide->func.init = __ivug_slide_init;
+       eng_slide->func.set_size = __ivug_slide_set_size;
+       eng_slide->func.animate = __ivug_slide_anim;
+       eng_slide->func.pause = __ivug_slide_pause;
+       eng_slide->func.resume = __ivug_slide_resume;
+       eng_slide->func.finalize = __ivug_slide_finialize;
+       eng_slide->func.get_duration = __ivug_slide_get_duration;
+
+       return eng_slide;
+}
diff --git a/slideshow/src/effect/ivug-xcapture.c b/slideshow/src/effect/ivug-xcapture.c
new file mode 100755 (executable)
index 0000000..9de815d
--- /dev/null
@@ -0,0 +1,339 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include <Elementary.h>
+#include <Ecore_X.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <assert.h>
+#include <errno.h>
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/extensions/Xcomposite.h>
+#include <X11/extensions/XShm.h>
+#include <X11/Xatom.h>
+
+#include "ivug-debug.h"
+
+#define MAX_ERROR_MSG_LEN      256
+
+struct xcapture_t {
+       XImage *xim;
+       XShmSegmentInfo si;
+       int size;
+       Pixmap pix;
+};
+
+static int __ivug_xcapture_get_window_attribute(Window id,
+                                               int *depth, Visual **visual,
+                                               int *width, int *height)
+{
+       IV_ASSERT(id);
+       XWindowAttributes attr;
+
+       if (!XGetWindowAttributes(ecore_x_display_get(), id, &attr)) {
+               MSG_EFFECT_ERROR("XGetWindowAttributes failed\n");
+               return -1;
+       }
+
+       if (attr.map_state == IsViewable && attr.class == InputOutput) {
+               *depth = attr.depth;
+               *width = attr.width;
+               *height = attr.height;
+               *visual = attr.visual;
+       }
+
+       return 0;
+}
+
+static struct xcapture_t *__ivug_xcapture(unsigned long id)
+{
+       IV_ASSERT(id);
+
+       struct xcapture_t *handle = NULL;
+       int depth = 0;
+       int width = 0;
+       int height = 0;
+       Visual *visual = NULL;
+       char error_msg[MAX_ERROR_MSG_LEN] = { 0, };
+
+       handle = malloc(sizeof(struct xcapture_t));
+       if (!handle) {
+               MSG_EFFECT_ERROR
+                       ("Failed to allocate memory for __ivug_xcapture\n");
+               return NULL;
+       }
+
+       MSG_EFFECT_MED("Window : 0x%lX\n", id);
+       if (__ivug_xcapture_get_window_attribute
+           (id, &depth, &visual, &width, &height) < 0) {
+               MSG_EFFECT_ERROR("Failed to get the attributes from 0x%x\n",
+                                (unsigned int)id);
+               free(handle);
+               return NULL;
+       }
+
+       MSG_EFFECT_MED("WxH : %dx%d\n", width, height);
+       MSG_EFFECT_MED("Depth : %d\n", depth >> 3);
+
+       /* NOTE: just add one more depth.... */
+       handle->si.shmid = shmget(IPC_PRIVATE,
+                                 width * height * ((depth >> 3) + 1),
+                                 IPC_CREAT | 0666);
+       if (handle->si.shmid < 0) {
+               MSG_EFFECT_ERROR("Failed to get SHM %s\n",
+                                strerror_r(errno, error_msg,
+                                           sizeof(error_msg)));
+               free(handle);
+               return NULL;
+       }
+
+       handle->si.readOnly = False;
+       handle->si.shmaddr = shmat(handle->si.shmid, NULL, 0);
+       if (handle->si.shmaddr == (char *)-1) {
+               MSG_EFFECT_ERROR("Failed to attach shm %s\n",
+                                strerror_r(errno, error_msg,
+                                           sizeof(error_msg)));
+
+               shmctl(handle->si.shmid, IPC_RMID, 0);
+               free(handle);
+               return NULL;
+       }
+
+       handle->xim = XShmCreateImage(ecore_x_display_get(), visual, depth,
+                                     ZPixmap, NULL, &handle->si, width,
+                                     height);
+       if (!handle->xim) {
+               MSG_EFFECT_ERROR("Failed create an image %s\n",
+                                strerror_r(errno, error_msg,
+                                           sizeof(error_msg)));
+
+               shmdt(handle->si.shmaddr);
+               shmctl(handle->si.shmid, IPC_RMID, 0);
+               free(handle);
+               return NULL;
+       }
+
+       handle->size = handle->xim->bytes_per_line * handle->xim->height;
+       handle->xim->data = handle->si.shmaddr;
+
+       handle->pix = XCompositeNameWindowPixmap(ecore_x_display_get(), id);
+
+       if (XShmAttach(ecore_x_display_get(), &handle->si) == False) {
+               MSG_EFFECT_ERROR("Failed to attach\n");
+       }
+
+       if (XShmGetImage(ecore_x_display_get(), id, handle->xim, 0, 0,
+                        0xFFFFFFFF) == False) {
+               MSG_EFFECT_ERROR("Failed to get image\n");
+       }
+
+       XSync(ecore_x_display_get(), False);
+       return handle;
+}
+
+static void __ivug_xcapture_destroy(struct xcapture_t *handle)
+{
+       ivug_retm_if(!handle, "handle is NULL");
+
+       XShmDetach(ecore_x_display_get(), &handle->si);
+       XFreePixmap(ecore_x_display_get(), handle->pix);
+       XDestroyImage(handle->xim);
+
+       shmdt(handle->si.shmaddr);
+       shmctl(handle->si.shmid, IPC_RMID, 0);
+
+       free(handle);
+}
+
+static inline void *__ivug_xcapture_get_data(struct xcapture_t *handle,
+                                            int *size)
+{
+       ivug_retvm_if(!handle, NULL, "handle is NULL");
+
+       if (size) {
+               *size = handle->size;
+       }
+
+       return handle->xim->data;
+}
+
+
+// TODO : Will rotate using pixman.. refer x11-server-utils-ex
+static void __ivug_xcapture_data_rotate_180cw(unsigned int **dst,
+                                             unsigned int *src, int width,
+                                             int height)
+{
+       ivug_retm_if(!src, "src is NULL");
+
+       unsigned int *p1, *p2, tmp;
+       int x, hw;
+
+       /* memcpy */
+       *dst = malloc(width * height * sizeof(unsigned int));
+       memcpy(*dst, src, width * height * sizeof(unsigned int));
+
+       /* set width, height */
+       hw = width * height;
+       x = (hw / 2);
+       p1 = *dst;
+       p2 = *dst + hw - 1;
+       for (; --x > 0;) {
+               tmp = *p1;
+               *p1 = *p2;
+               *p2 = tmp;
+               p1++;
+               p2--;
+       }
+}
+
+static void __ivug_xcapture_data_rotate_90cw(unsigned int **dst,
+                                            unsigned int *src, int width,
+                                            int height)
+{
+       ivug_retm_if(!src, "src is NULL");
+
+       unsigned int *to = NULL, *from = NULL;
+       int x, y, w, hw;
+
+       /* memcpy */
+       *dst = malloc(width * height * sizeof(unsigned int));
+       memcpy(*dst, src, width * height * sizeof(unsigned int));
+
+       /* set width, height */
+       w = height;
+       height = width;
+       width = w;
+       hw = width * height;
+
+       to = *dst + w - 1;
+       hw = -hw - 1;
+       from = src;
+
+       for (x = width; --x >= 0;) {
+               for (y = height; --y >= 0;) {
+                       *to = *from;
+                       from++;
+                       to += w;
+               }
+
+               to += hw;
+       }
+}
+
+static void __ivug_xcapture_data_rotate_270cw(unsigned int **dst,
+                                             unsigned int *src, int width,
+                                             int height)
+{
+       ivug_retm_if(!src, "src is NULL");
+
+       unsigned int *to, *from;
+       int x, y, w, hw;
+
+       /* memcpy */
+       *dst = malloc(width * height * sizeof(unsigned int));
+       memcpy(*dst, src, width * height * sizeof(unsigned int));
+
+       /* set width, height */
+       w = height;
+       height = width;
+       width = w;
+
+       hw = width * height;
+
+       to = *dst + hw - w;
+       w = -w;
+       hw = hw + 1;
+       from = src;
+
+       for (x = width; --x >= 0;) {
+               for (y = height; --y >= 0;) {
+                       *to = *from;
+                       from++;
+                       to += w;
+               }
+
+               to += hw;
+       }
+}
+
+static char *__ivug_xcapture_data_get(Ecore_X_Window win, int *size,
+                                     int rotation)
+{
+       struct xcapture_t *handle = NULL;
+
+       handle = __ivug_xcapture(win);
+       if (!handle) {
+               MSG_EFFECT_ERROR("__ivug_xcapture failed");
+               return NULL;
+       }
+
+       int data_size = 0;
+       char *image = __ivug_xcapture_get_data(handle, &data_size);
+       if (!image || data_size == 0) {
+               MSG_EFFECT_ERROR("__ivug_xcapture_get_data failed");
+
+               __ivug_xcapture_destroy(handle);
+               return NULL;
+       }
+
+       MSG_EFFECT_MED("handle->xim: width = %d, height = %d\n",
+                       handle->xim->width, handle->xim->height);
+
+       /* Free the data when unused */
+       int width = 0;
+       int height = 0;
+       char *data = NULL;
+
+       width = handle->xim->bytes_per_line / sizeof(int);
+       height = handle->xim->height;
+
+       if (rotation == 180) {
+               __ivug_xcapture_data_rotate_180cw((unsigned int **)&data,
+                                                 (unsigned int *)image, width,
+                                                 height);
+       } else if (rotation == 90) {
+               __ivug_xcapture_data_rotate_90cw((unsigned int **)&data,
+                                                (unsigned int *)image, width,
+                                                height);
+       } else if (rotation == 270) {
+               __ivug_xcapture_data_rotate_270cw((unsigned int **)&data,
+                                                 (unsigned int *)image, width,
+                                                 height);
+       } else {                /* all other cases treated as angle 0 */
+
+               data = (char *)calloc(1, data_size);
+               memcpy(data, image, data_size);
+       }
+
+       __ivug_xcapture_destroy(handle);
+
+       if (size) {
+               *size = data_size;
+       }
+
+       return data;
+}
+
+char *ivug_xcapture_screen_data_get(int *size, int rotation)
+{
+       Ecore_X_Window root;
+       root = ecore_x_window_focus_get();
+
+       /* Free the memory allocated when unused */
+       return __ivug_xcapture_data_get(root, size, rotation);
+}
diff --git a/slideshow/src/effect/ivug-xcapture.h b/slideshow/src/effect/ivug-xcapture.h
new file mode 100755 (executable)
index 0000000..30a3bc9
--- /dev/null
@@ -0,0 +1,30 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_XCAPTURE_H__
+#define __IVUG_XCAPTURE_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+       char *ivug_xcapture_screen_data_get(int *size, int rotation);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif                         /* __IVUG_XCAPTURE_H__ */
diff --git a/slideshow/src/effect/template.c b/slideshow/src/effect/template.c
new file mode 100755 (executable)
index 0000000..656d041
--- /dev/null
@@ -0,0 +1,82 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-common.h"
+#include "ivug-effect.h"
+
+
+typedef struct {
+       Evas_Object *src;
+       Evas_Object *dst;
+
+       Evas_Object *object;
+       Evas_Object *orig_cliper;
+
+       Evas_Object *cliper;
+
+       int screen_w;
+       int screen_h;
+} effect_data;
+
+
+static Effect_Data __ivug_init(Evas_Object *src, Evas_Object *dst, int screen_w, int screen_h, int rotation)
+{
+       IVUG_FUNC_ENTER();
+
+       IVUG_FUNC_LEAVE();
+}
+
+static void __ivug_anim(Effect_Data data, double percent)
+{
+/*      IVUG_FUNC_ENTER(); */
+
+/*      IVUG_FUNC_LEAVE(); */
+}
+
+static void __ivug_pause(Effect_Data data)
+{
+       IVUG_FUNC_ENTER();
+
+       IVUG_FUNC_LEAVE();
+}
+
+static void __ivug_resume(Effect_Data data)
+{
+       IVUG_FUNC_ENTER();
+
+       IVUG_FUNC_LEAVE();
+}
+
+static void __ivug_spin_finialize(Effect_Data data)
+{
+       IVUG_FUNC_ENTER();
+
+       IVUG_FUNC_LEAVE();
+}
+
+Effect_Engine *ivug_xxx_add(void)
+{
+       Effect_Engine *eng_spin = calloc(1, sizeof(Effect_Engine));
+       ivug_retvm_if(eng_spin == NULL, NULL, "calloc failed");
+
+       eng_spin->func.init = &__ivug_init;
+       eng_spin->func.animate = &__ivug_anim;
+       eng_spin->func.pause = &__ivug_pause;
+       eng_spin->func.resume = &__ivug_resume;
+       eng_spin->func.finalize = &__ivug_finialize;
+
+       return eng_spin;
+}
diff --git a/slideshow/src/ivug-slideshow.cpp b/slideshow/src/ivug-slideshow.cpp
new file mode 100755 (executable)
index 0000000..2b14f35
--- /dev/null
@@ -0,0 +1,1002 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include <stdlib.h>
+#include <ui-gadget-module.h>
+#include "ivug-anim.h"
+#include "ivug-slideshow.h"
+#include "ivug-debug.h"
+
+#include "ivug-config.h"
+#include "ivug-define.h"
+#include "ivug-datatypes.h"
+#include "ivug-uuid.h"
+#include "ivug-util.h"
+
+#include "ivug-image.h"
+
+#include <Elementary.h>
+#include <assert.h>
+
+#include "statistics.h"
+
+#include "EFLUtil.h"
+
+#undef USE_IVUG_IMAGE
+
+#undef LOG_LVL
+#define LOG_LVL DBG_MSG_LVL_MED
+
+#undef LOG_CAT
+#define LOG_CAT "IV-SLIDESHOW"
+
+/*
+       Basic functionality is implemented.
+       but codes have many bugs. plz check this.
+
+       TODO:
+               Resize is not handled.
+               Mouse routine is not handled.
+               Decoding faied is not processed.
+
+               Not test except slide effect.
+
+*/
+#define EDJ_PATH PREFIX"/res/edje/"PACKAGE
+#define IVUG_SS_LY_EDJ_PATH    EDJ_PATH"/ivug-ss-ly.edj"
+
+#define IVUG_IMAGE_BETWEEN_MARGIN      (30)
+#define IVUG_IMAGE_MOVE_MARGIN                         ((int)IVUG_IMAGE_BETWEEN_MARGIN*0.8)
+#define IVUG_IMAGE_SCROLL_MARGIN               (5)
+
+#define _EDJ(o)                        elm_layout_edje_get(o)
+
+void ivug_ss_get_screen_size(int *width, int *height)
+{
+       int rotation = elm_win_rotation_get((Evas_Object *)ug_get_window());
+
+       int screen_w = 0;
+       int screen_h = 0;
+       ecore_x_window_size_get(ecore_x_window_root_first_get(), &screen_w, &screen_h);
+       if(rotation == 0 || rotation == 180)
+       {
+               *width = screen_w;
+               *height = screen_h;
+       }
+       else if(rotation == 90 || rotation == 270)
+       {
+               *width = screen_h;
+               *height = screen_w;
+       }
+}
+
+Media_Item *ivug_ss_get_next_item(Media_List *mList,
+                       Media_Item *header,
+                       Media_Item *current,
+                       slide_show_mode mode)
+{
+       Media_Item *item = NULL;
+
+       MSG_HIGH("Get Next Item : Header=0x%08x Current=0x%08x", header, current);
+
+       MSG_HIGH("Get Next : Header=0x%08x Current=0x%08x",
+                        header, current);
+       switch(mode)
+       {
+       case SLIDE_SHOW_MODE_REPEAT:
+               item = ivug_medialist_get_next(mList, current);
+               if ( item == NULL )
+               {
+                       item = ivug_medialist_get_first(mList);
+               }
+               break;
+
+       case SLIDE_SHOW_MODE_NORMAL:
+               item = ivug_medialist_get_next(mList, current);
+               break;
+
+       case SLIDE_SHOW_MODE_SHUFFLE_REPEAT:
+               item = ivug_medialist_get_shuffle_item(mList, current);
+               if ( item == NULL )
+               {
+                       MSG_ERROR("Never touch here");
+               }
+               break;
+
+       case SLIDE_SHOW_MODE_SHUFFLE:
+               item = ivug_medialist_get_shuffle_item(mList, current);
+               if ( item == header )
+               {
+                       MSG_ERROR("Reach end");
+                       return NULL;
+               }
+               break;
+
+       default:
+               MSG_ERROR("Unknown mode : %d", mode);
+               item = NULL;
+               break;
+       }
+
+       return item;
+
+}
+
+
+static void
+_moved(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+       SlideShow *pSlideShow = (SlideShow *)data;
+
+       Evas_Coord ox, oy, ow, oh;
+       evas_object_geometry_get(obj, &ox, &oy, &ow, &oh);
+
+       MSG_HIGH("Moved (%d,%d,%d,%d)", ox, oy, ow, oh);
+
+       evas_object_move(pSlideShow->event, ox, oy);
+}
+
+static void
+_resized(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+       SlideShow *pSlideShow = (SlideShow *)data;
+
+       Evas_Coord ox, oy, ow, oh;
+       evas_object_geometry_get(obj, &ox, &oy, &ow, &oh);
+
+       MSG_HIGH("Resized (%d,%d,%d,%d)", ox, oy, ow, oh);
+
+       evas_object_resize(pSlideShow->event, ow, oh);
+
+       evas_object_resize(pSlideShow->sLayout[pSlideShow->sCurrent].layout, ow, oh);
+       evas_object_resize(pSlideShow->sLayout[(pSlideShow->sCurrent + 1) % 2].layout, ow, oh);
+}
+
+static void
+_shown(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+       MSG_HIGH("SlideShow is Shown");
+}
+
+static void
+_hidden(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+       MSG_HIGH("SlideShow is Hidden");
+}
+
+
+static void
+_shown1(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+       MSG_HIGH("%s is Shown", evas_object_name_get(obj));
+}
+
+static void
+_hidden1(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+       MSG_HIGH("%s is Hidden", evas_object_name_get(obj));
+}
+
+static bool _ivug_ss_set_content(Slide_Layout *pSlide, Media_Item *item)
+{
+       Media_Data *mdata;
+       int ret = EVAS_LOAD_ERROR_NONE;
+
+       pSlide->mitem = item;
+
+       if(pSlide->mitem == NULL)
+       {
+               MSG_ERROR("Mitem is NULL");
+               return false;
+       }
+
+       mdata = ivug_medialist_get_data(item);
+       IV_ASSERT(mdata != NULL);
+
+       MSG_HIGH("Start Loading : %s", mdata->filepath);
+
+       if(mdata->slide_type == SLIDE_TYPE_VIDEO || mdata->slide_type == SLIDE_TYPE_STREAMING)
+       {
+               /* Display play icon */
+               edje_object_signal_emit(elm_layout_edje_get(pSlide->layout),
+                                       "elm,state,show_play_icon",
+                                       "slideshow");
+
+
+#ifdef USE_IVUG_IMAGE
+               ret = ivug_image_file_set(pSlide->photocam, mdata->thumbnail_path, NULL);
+#else
+               ret = elm_photocam_file_set(pSlide->photocam, mdata->thumbnail_path);
+#endif
+               if(EVAS_LOAD_ERROR_NONE != ret) {
+                       MSG_HIGH("elm_photocam_file_set failed");
+                       return false;
+               }
+       }
+       else
+       {
+               /* Hide play icon */
+               edje_object_signal_emit(elm_layout_edje_get(pSlide->layout),
+                                       "elm,state,hide_play_icon",
+                                       "slideshow");
+#ifdef USE_IVUG_IMAGE
+               ret = ivug_image_file_set(pSlide->photocam, mdata->filepath, NULL);
+#else
+               ret = elm_photocam_file_set(pSlide->photocam, mdata->filepath);
+#endif
+               if(EVAS_LOAD_ERROR_NONE != ret) {
+                       MSG_HIGH("elm_photocam_file_set failed");
+                       return false;
+               }
+
+               if (elm_icon_file_set(pSlide->thumbnail, mdata->thumbnail_path, NULL) == EINA_FALSE)
+               {
+                       MSG_ERROR("Cannot load thumbnail : %s", mdata->thumbnail_path);
+               }
+               else
+               {
+                       edje_object_signal_emit(_EDJ(pSlide->layout), "elm,state,show_thumbnail", "slideshow");
+               }
+       }
+       MSG_HIGH("Load : %s", mdata->filepath);
+       elm_photocam_zoom_mode_set(pSlide->photocam, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
+       elm_photocam_paused_set(pSlide->photocam, true);
+       evas_object_size_hint_weight_set(pSlide->photocam, EVAS_HINT_EXPAND,
+                                                                        EVAS_HINT_EXPAND);
+
+       return true;
+}
+
+
+static void _ivug_ss_update_pos(SlideShow *pSlideShow, Evas_Coord x, Evas_Coord y)
+{
+       IV_ASSERT(pSlideShow != NULL);
+
+       MSG_HIGH("Update Pos(%d,%d) sCurrent=%d", x, y, pSlideShow->sCurrent);
+
+//     x = x - 360;
+
+       Slide_Layout *sLyCurrent = &pSlideShow->sLayout[pSlideShow->sCurrent];
+       Slide_Layout *sLyNext = &pSlideShow->sLayout[(pSlideShow->sCurrent + 1) % 2];
+
+       evas_object_move(sLyCurrent->layout, x, y);
+       evas_object_move(sLyNext->layout,
+                               x + pSlideShow->screen_w + IVUG_IMAGE_BETWEEN_MARGIN ,
+                               y);
+}
+static bool _ivug_ss_load_next_image(SlideShow *pSlideShow)
+{
+       ivug_retv_if(!pSlideShow, false);
+       MSG_HIGH("");
+
+       Slide_Layout* sLyCurrent = &pSlideShow->sLayout[pSlideShow->sCurrent];
+       Slide_Layout* sLy = &pSlideShow->sLayout[(pSlideShow->sCurrent + 1) % 2];
+
+       Media_Item *next = NULL;
+       Media_Item *current = sLyCurrent->mitem;
+       do {
+               next = ivug_ss_get_next_item(pSlideShow->media_list,
+                               pSlideShow->ss_Header,
+                               current,
+                               pSlideShow->ss_mode);
+
+               if(next == NULL) {
+                       sLy->mitem = NULL;
+                       return false;
+               }
+               current = next;
+       }while(!_ivug_ss_set_content(sLy, next));
+
+       if(next) {
+               evas_object_show(sLy->layout);
+       }
+
+       return true;
+}
+
+void _ivug_ss_effect_finished(void *data)
+{
+       ivug_ret_if(!data);
+       SlideShow *pSlideShow = (SlideShow *) data;
+       MSG_HIGH("slideshow Effect ended");
+
+       if(pSlideShow->effect_engine)
+       {
+               MSG_HIGH("ivug_effect_finalize");
+               ivug_effect_finalize(pSlideShow->effect_engine);
+               pSlideShow->effect_engine = NULL;
+       }
+
+       /* Increse current index */
+       pSlideShow->sCurrent = (pSlideShow->sCurrent + 1) % 2;
+       _ivug_ss_update_pos(pSlideShow, 0, 0);          // Reset position
+
+       Slide_Layout *sLyCurrent = &pSlideShow->sLayout[pSlideShow->sCurrent];
+       Slide_Layout *sLyNext = &pSlideShow->sLayout[(pSlideShow->sCurrent + 1) % 2];
+
+       Media_Item *next = NULL;
+
+       next = ivug_ss_get_next_item(pSlideShow->media_list,
+                       pSlideShow->ss_Header,
+                       sLyCurrent->mitem,
+                       pSlideShow->ss_mode);
+
+       if(next == NULL) {
+               sLyNext->mitem = NULL;
+               MSG_ERROR("Cannot find next item");
+               return;
+       }
+
+       _ivug_ss_set_content(sLyNext, next);
+
+// Reset visibilaty because effect can hide layout
+       evas_object_show(sLyCurrent->layout);
+       evas_object_show(sLyNext->layout);
+
+       MSG_HIGH("pSlideShow->bSS_StopFlag = %d", pSlideShow->bSS_StopFlag);
+
+       if(pSlideShow->bSS_StopFlag == EINA_TRUE)
+       {
+               pSlideShow->state = SLIDE_SHOW_STOPPED;
+               pSlideShow->ss_Header = NULL;
+               evas_object_smart_callback_call(ivug_ss_object_get(pSlideShow), "slideshow,finished", (void *)SLIDE_SHOW_STOPPED);
+//             ivug_ss_delete(pSlideShow);
+
+               pSlideShow->bSS_StopFlag = EINA_FALSE;
+       }
+       //EFL::dump_obj(pSlideShow->obj, 0);
+}
+
+Evas_Object *_ivug_ss_create_layout(Evas_Object *parent, const char *edj_path, const char *group)
+{
+       MSG_ASSERT(parent != NULL);
+       MSG_ASSERT(edj_path != NULL);
+       MSG_ASSERT(group != NULL);
+
+       Evas_Object *ly = NULL;
+       ly = elm_layout_add(parent);
+
+       ivug_retv_if(!ly, NULL);
+
+       if (elm_layout_file_set(ly , edj_path, group ) == EINA_FALSE)
+       {
+               MSG_ERROR("Cannot create layout. %s %s", edj_path, group);
+               evas_object_del(ly);
+               return NULL;
+       }
+       evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(ly, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+       evas_object_show(ly);
+       return ly;
+}
+
+// Slide Show related functions.
+static Eina_Bool _ivug_ss_on_slide_interval(void *data)
+{
+       MSG_ASSERT(data != NULL);
+
+       SlideShow *pSlideShow = (SlideShow*)data;
+
+       MSG_HIGH("On Slide Interval");
+       /* stopped by other operation */
+       if (pSlideShow->state == SLIDE_SHOW_STOPPED)
+       {
+               pSlideShow->ss_timer = NULL;
+               MSG_ERROR("Slide show already stopped");
+               return ECORE_CALLBACK_CANCEL;
+       }
+
+       Slide_Layout *sLyCurrent = &pSlideShow->sLayout[pSlideShow->sCurrent];
+       Slide_Layout *sLyNext = &pSlideShow->sLayout[(pSlideShow->sCurrent + 1) % 2];
+
+       /* Next item is NULL */
+       if(sLyNext->mitem == NULL)
+       {
+               MSG_HIGH("Next item is NULL");
+               pSlideShow->ss_timer = NULL;
+               pSlideShow->ss_Header = NULL;
+               /* exit slide show after whole animation is over */
+               ivug_ss_stop(pSlideShow);
+
+               return ECORE_CALLBACK_CANCEL;
+       }
+
+       /* Slideshow Effect */
+       Effect_Engine *eng = ivug_effect_add(pSlideShow->effect_type);
+       MSG_ASSERT(eng != NULL);
+
+       pSlideShow->effect_engine = eng;
+
+       ivug_effect_init(pSlideShow->effect_engine, sLyCurrent->layout, sLyNext->layout);
+
+       int rotation = elm_win_rotation_get((Evas_Object *)ug_get_window());
+       ivug_ss_get_screen_size(&pSlideShow->screen_w, &pSlideShow->screen_h);
+
+       if(ivug_effect_set_size(pSlideShow->effect_engine, pSlideShow->screen_w, pSlideShow->screen_h, rotation) == false)
+       {
+               pSlideShow->ss_timer = NULL;
+               ivug_effect_finalize(pSlideShow->effect_engine);
+               return ECORE_CALLBACK_CANCEL;
+       }
+
+//     EFL::dump_obj(pSlideShow->obj, 0);
+
+       ivug_effect_start(pSlideShow->effect_engine, _ivug_ss_effect_finished, pSlideShow);
+
+       return ECORE_CALLBACK_RENEW;
+}
+
+
+
+static Effect_Type _ivug_ss_get_trans_effect(ivug_effect_type type)
+{
+       MSG_MED("type %d", type);
+       switch(type)
+       {
+               case IVUG_EFFECT_TYPE_SLIDE:
+                       return EFFECT_SLIDE;
+               case IVUG_EFFECT_TYPE_IRIS:
+                       return EFFECT_IRIS;
+               case IVUG_EFFECT_TYPE_DISSOLVE:
+                       return EFFECT_DISSOLVE;
+               case IVUG_EFFECT_TYPE_DISSOLVE_FADE:
+                       return EFFECT_DISSOLVE_FADE;
+               case IVUG_EFFECT_TYPE_SPLIT:
+                       return EFFECT_SPLIT;
+               default:
+                       break;
+       }
+       return EFFECT_NONE;
+}
+
+
+
+
+void _ivug_ss_on_mouse_down(void *data, Evas *e,
+       Evas_Object *obj, void *event_info)
+{
+       SlideShow *pSlideShow = (SlideShow *) data;
+
+       MSG_HIGH("_ivug_ss_on_mouse_down, state is %d", pSlideShow->state);
+
+       if (pSlideShow->click_timer) {
+               ecore_timer_del(pSlideShow->click_timer);
+               pSlideShow->click_timer = NULL;
+       }
+
+       if(pSlideShow->ss_timer) {
+               ecore_timer_del(pSlideShow->ss_timer);
+               pSlideShow->ss_timer = NULL;
+       }
+}
+
+void _ivug_ss_on_mouse_move(void *data, Evas *e,
+       Evas_Object *obj, void *event_info)
+{
+       MSG_LOW("_ivug_ss_on_mouse_move");
+       return;
+}
+
+static Eina_Bool _ivug_ss_clicked_timer_cb(void *data)
+{
+       SlideShow *pSlideShow = (SlideShow *)data;
+       if (NULL == pSlideShow) {
+               return ECORE_CALLBACK_CANCEL;
+       }
+
+       if(pSlideShow->click_timer)
+       {
+               ecore_timer_del(pSlideShow->click_timer);
+               pSlideShow->click_timer = NULL;
+       }
+
+       if(pSlideShow->state == SLIDE_SHOW_RUNNING) {
+               ivug_ss_stop(pSlideShow);
+               //EFL::dump_obj(pSlideShow->obj, 0);
+               return ECORE_CALLBACK_CANCEL;
+       }
+
+       MSG_HIGH("-------------_ivug_ss_clicked_timer_cb--------------");
+
+       pSlideShow->state = SLIDE_SHOW_INTERRUPTED;
+       evas_object_smart_callback_call(ivug_ss_object_get(pSlideShow), "slideshow,finished", (void *)SLIDE_SHOW_INTERRUPTED);
+
+       return ECORE_CALLBACK_CANCEL;
+}
+void _ivug_ss_on_mouse_up(void *data, Evas *e,
+       Evas_Object *obj, void *event_info)
+{
+       SlideShow *pSlideShow = (SlideShow *)data;
+       if (NULL == pSlideShow) {
+               return;
+       }
+       MSG_HIGH("_ivug_ss_on_mouse_up, pSlideShow->v is %d", pSlideShow->state);
+
+       if(pSlideShow->click_timer)
+       {
+               ecore_timer_del(pSlideShow->click_timer);
+               pSlideShow->click_timer = NULL;
+       }
+       pSlideShow->click_timer = ecore_timer_add(0.3f, _ivug_ss_clicked_timer_cb, data);
+
+}
+
+static Eina_Bool
+_ivug_ss_auto_finish_timer_cb(void *data)
+{
+       ivug_retv_if(!data, ECORE_CALLBACK_CANCEL);
+
+       SlideShow *pSlideShow = (SlideShow*)data;
+       /* exit slide show after whole animation is over */
+       ivug_ss_stop(pSlideShow);
+       return ECORE_CALLBACK_CANCEL;
+}
+
+
+static void
+_ivug_ss_photocam_loaded_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+
+       Slide_Layout* sLy = static_cast<Slide_Layout*>(data);
+       SlideShow *pSlideShow = (SlideShow *)sLy->pSlideshow;
+
+       if ( sLy->mitem == NULL)
+       {
+               MSG_ERROR("Debug Me! Data item is NULL.");
+               return;
+       }
+
+       Media_Data* mdata = ivug_medialist_get_data(sLy->mitem);
+       if(mdata == NULL)
+       {
+               MSG_ERROR("ivug_medialist_get_data failed.");
+               return;
+       }
+
+       Evas_Load_Error error = static_cast<Evas_Load_Error>(reinterpret_cast<int>(event_info));
+       if ( error != EVAS_LOAD_ERROR_NONE )
+       {
+               MSG_ERROR("Image loading failed. Error=%d File=%s", error, mdata->filepath);
+
+               Slide_Layout *sLyCurrent = &pSlideShow->sLayout[pSlideShow->sCurrent];
+               Slide_Layout *sLyNext = &pSlideShow->sLayout[(pSlideShow->sCurrent + 1) % 2];
+
+               Media_Item *next = NULL;
+
+               next = ivug_ss_get_next_item(pSlideShow->media_list,
+                               pSlideShow->ss_Header,
+                               sLyCurrent->mitem,
+                               pSlideShow->ss_mode);
+
+               _ivug_ss_set_content(sLyNext, next);
+               return;
+
+               MSG_HIGH("Photocam Pre-loaded. File=%s", ivug_get_filename(mdata->filepath));
+               MSG_SITEM_ERROR("Image loading failed. Error=%d File=%s",
+                               error, mdata->filepath);
+               _ivug_ss_load_next_image((SlideShow *)sLy->pSlideshow);
+               return;
+       }
+       edje_object_signal_emit(_EDJ(pSlideShow->sLayout[pSlideShow->sCurrent].layout), "elm,state,hide_thumbnail", "slideshow");
+
+       MSG_SITEM_HIGH("Photocam Pre-loaded. File=%s",
+                       ivug_get_filename(mdata->filepath));
+
+       return;
+}
+
+static bool _ivug_ss_create_image_layout(Evas_Object *parent, Slide_Layout *sLayout)
+{
+       /* Create Layout for the current item */
+       sLayout->layout = _ivug_ss_create_layout(parent, IVUG_SS_LY_EDJ_PATH, "slayout");
+
+       if(sLayout->layout == NULL) {
+               MSG_ERROR("Cannot create current layout");
+               return false;
+       }
+#ifdef USE_IVUG_IMAGE
+       sLayout->photocam = ivug_image_create(sLayout->layout);
+#else
+       sLayout->photocam = elm_photocam_add(sLayout->layout);
+#endif
+       evas_object_size_hint_expand_set(sLayout->photocam, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(sLayout->photocam, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+       elm_object_part_content_set(sLayout->layout, "content", sLayout->photocam);
+
+       sLayout->thumbnail = elm_icon_add(sLayout->layout);
+       evas_object_name_set(sLayout->thumbnail, "Thumbnail");
+       elm_object_part_content_set(sLayout->layout, "thumbnail", sLayout->thumbnail);
+
+#ifdef USE_IVUG_IMAGE
+#else
+       elm_photocam_zoom_mode_set(sLayout->photocam, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
+       elm_photocam_paused_set(sLayout->photocam, EINA_TRUE);
+#endif
+
+       evas_object_smart_callback_add(sLayout->photocam,
+                                       "loaded",
+                                       _ivug_ss_photocam_loaded_cb,
+                                       sLayout);
+
+       evas_object_smart_member_add(sLayout->photocam, sLayout->layout);
+       evas_object_smart_member_add(sLayout->thumbnail, sLayout->layout);
+
+       evas_object_show(sLayout->photocam);
+       evas_object_show(sLayout->layout);
+
+       return true;
+}
+
+SlideShow *ivug_ss_create(Evas_Object *parent)
+{
+       SlideShow *pSlideShow = NULL;
+       MSG_IVUG_HIGH("ivug_ss_create");
+       pSlideShow = (SlideShow*)calloc(1,sizeof(SlideShow));
+       if (pSlideShow == NULL) {
+               return NULL;
+       }
+       pSlideShow->state = SLIDE_SHOW_STOPPED;
+
+       pSlideShow->obj = _ivug_ss_create_layout(parent, IVUG_SS_LY_EDJ_PATH, "view.slideshow");
+       MSG_ASSERT(pSlideShow->obj != NULL);
+
+       evas_object_name_set(pSlideShow->obj, "slideshow");
+       pSlideShow->obj = _ivug_ss_create_layout(parent, IVUG_SS_LY_EDJ_PATH,
+                       "view.slideshow");
+       evas_object_name_set(pSlideShow->obj, "slideshow");
+
+
+       /* Create Layout for the current item */
+       if ( _ivug_ss_create_image_layout(pSlideShow->obj, &pSlideShow->sLayout[0]) == false)
+       {
+               MSG_ERROR("Cannot create current layout");
+               free(pSlideShow);
+               return NULL;
+       }
+       pSlideShow->sLayout[0].pSlideshow = pSlideShow;
+       evas_object_name_set(pSlideShow->sLayout[0].layout, "Layout 0");
+
+       /* Create Layout for the next item */
+       if ( _ivug_ss_create_image_layout(pSlideShow->obj, &pSlideShow->sLayout[1]) == false)
+       {
+               MSG_ERROR("Cannot create current layout");
+               elm_object_part_content_unset(pSlideShow->sLayout[0].layout, "content");
+               evas_object_del(pSlideShow->sLayout[0].photocam);
+               evas_object_del(pSlideShow->sLayout[0].layout);
+               free(pSlideShow);
+               return NULL;
+       }
+
+       pSlideShow->sLayout[1].pSlideshow = pSlideShow;
+       evas_object_name_set(pSlideShow->sLayout[1].layout, "Layout 1");
+
+       evas_object_event_callback_add(pSlideShow->sLayout[0].layout, EVAS_CALLBACK_SHOW, _shown1, NULL);
+       evas_object_event_callback_add(pSlideShow->sLayout[0].layout, EVAS_CALLBACK_HIDE, _hidden1, NULL);
+
+       evas_object_event_callback_add(pSlideShow->sLayout[1].layout, EVAS_CALLBACK_SHOW, _shown1, NULL);
+       evas_object_event_callback_add(pSlideShow->sLayout[1].layout, EVAS_CALLBACK_HIDE, _hidden1, NULL);
+
+       /* Event rect */
+       pSlideShow->event = evas_object_rectangle_add(evas_object_evas_get(parent));
+       evas_object_name_set(pSlideShow->event, "ss_event");
+       evas_object_color_set(pSlideShow->event, 0,0,0,0);
+
+       evas_object_show(pSlideShow->event);
+
+       //EFL::dump_obj(pSlideShow->obj, 0);
+
+       evas_object_event_callback_add(pSlideShow->obj, EVAS_CALLBACK_MOVE, _moved, pSlideShow);
+       evas_object_event_callback_add(pSlideShow->obj, EVAS_CALLBACK_RESIZE, _resized, pSlideShow);
+       evas_object_event_callback_add(pSlideShow->obj, EVAS_CALLBACK_SHOW, _shown, pSlideShow);
+       evas_object_event_callback_add(pSlideShow->obj, EVAS_CALLBACK_HIDE, _hidden, pSlideShow);
+
+// Event
+       evas_object_event_callback_add(pSlideShow->event, EVAS_CALLBACK_MOUSE_DOWN, _ivug_ss_on_mouse_down, pSlideShow);
+       evas_object_event_callback_add(pSlideShow->event, EVAS_CALLBACK_MOUSE_MOVE, _ivug_ss_on_mouse_move, pSlideShow);
+       evas_object_event_callback_add(pSlideShow->event, EVAS_CALLBACK_MOUSE_UP, _ivug_ss_on_mouse_up, pSlideShow);
+
+       return pSlideShow;
+}
+
+
+bool ivug_ss_start(SlideShow *pSlideShow , Media_Item *current, Media_List *list, Eina_Bool bSlideFirst)
+{
+       MSG_ASSERT(pSlideShow != NULL);
+
+       ivug_effect_type ivug_effect = IVUG_EFFECT_TYPE_SLIDE;
+
+       ivug_config_get_slideshow_setting(&(pSlideShow->ss_mode), &(pSlideShow->ss_interval_time), &ivug_effect);
+
+       ivug_config_get_slideshow_setting(&(pSlideShow->ss_mode),
+                       &(pSlideShow->ss_interval_time), &ivug_effect);
+       MSG_HIGH("Start slide show. Interval=%f Effect=%d ",
+                       pSlideShow->ss_interval_time, ivug_effect);
+
+       ivug_ss_get_screen_size(&pSlideShow->screen_w, &pSlideShow->screen_h);
+
+       MSG_HIGH("Start slide show. Interval=%f Effect=%d Screen(%d,%d)", pSlideShow->ss_interval_time, ivug_effect, pSlideShow->screen_w, pSlideShow->screen_h);
+
+       if(pSlideShow->ss_interval_time < 0)
+       {
+               MSG_ERROR("slide show interval time is invalid !!!");
+               return false;
+       }
+
+       if (pSlideShow->state == SLIDE_SHOW_RUNNING )
+       {
+               MSG_ERROR("Debug me!!! Slide show is running. remove previous one.");
+               ivug_ss_stop(pSlideShow);
+       }
+
+       if (pSlideShow->effect_engine != NULL )
+       {
+               MSG_FATAL("Debug Me!!!");
+               return false;
+       }
+
+       pSlideShow->sCurrent = 0;
+       pSlideShow->bSS_StopFlag = EINA_FALSE;
+       pSlideShow->ss_Header = current;
+       pSlideShow->effect_type = _ivug_ss_get_trans_effect(ivug_effect);
+       pSlideShow->media_list = list;
+
+       MSG_ASSERT(pSlideShow->obj != NULL);
+       evas_object_move(pSlideShow->obj, 0,0);
+       evas_object_resize(pSlideShow->obj, pSlideShow->screen_w, pSlideShow->screen_h);
+
+       _ivug_ss_update_pos(pSlideShow, 0, 0);
+
+       Slide_Layout *sLyCurrent = &pSlideShow->sLayout[pSlideShow->sCurrent];
+       Slide_Layout *sLyNext = &pSlideShow->sLayout[(pSlideShow->sCurrent + 1) % 2];
+
+       _ivug_ss_set_content(sLyCurrent, current);
+
+       Media_Item *next = NULL;
+
+       next = ivug_ss_get_next_item(pSlideShow->media_list,
+                       pSlideShow->ss_Header,
+                       sLyCurrent->mitem,
+                       pSlideShow->ss_mode);
+
+       if(next == NULL)
+       {
+               /* if last image is tapped, then after some time, back to main view directly */
+               pSlideShow->ss_timer = NULL;
+               pSlideShow->ss_Header = NULL;
+               pSlideShow->state = SLIDE_SHOW_RUNNING;
+
+               pSlideShow->ss_timer = ecore_timer_add(pSlideShow->ss_interval_time, _ivug_ss_auto_finish_timer_cb, pSlideShow);
+               return false;
+       }
+
+       _ivug_ss_set_content(sLyNext, next);
+
+       pSlideShow->state = SLIDE_SHOW_RUNNING;
+
+#if 0
+       if(_ivug_ss_on_slide_interval(pSlideShow) == false)
+       {
+               pSlideShow->ss_timer = NULL;
+               pSlideShow->ss_Header = NULL;
+
+               /* exit slide show after whole animation is over */
+               ivug_ss_stop(pSlideShow);
+               return false;
+       }
+#endif
+//     EFL::dump_obj(pSlideShow->obj, 0);
+
+       pSlideShow->ss_timer = ecore_timer_add(pSlideShow->ss_interval_time, _ivug_ss_on_slide_interval, pSlideShow);
+
+       MSG_HIGH("Slide show started!");
+
+       return true;
+}
+
+
+bool ivug_ss_stop(SlideShow *pSlideShow)
+{
+       MSG_ASSERT(pSlideShow != NULL);
+
+       MSG_HIGH("Slide show stopping");
+
+       if (pSlideShow->state != SLIDE_SHOW_RUNNING)
+       {
+               MSG_HIGH("pSlideShow->state != SLIDE_SHOW_RUNNING");
+               return true;
+       }
+
+       pSlideShow->bSS_StopFlag = EINA_TRUE;
+
+       //delete timmer
+       if(pSlideShow->ss_timer) {
+               ecore_timer_del(pSlideShow->ss_timer);
+               pSlideShow->ss_timer = NULL;
+       }
+
+       if(pSlideShow->click_timer) {
+               ecore_timer_del(pSlideShow->click_timer);
+               pSlideShow->click_timer = NULL;
+       }
+       if(pSlideShow->event) {
+               evas_object_del(pSlideShow->event);
+               pSlideShow->event = NULL;
+       }
+       if(pSlideShow->effect_engine == NULL)
+       {
+               MSG_HIGH("Slide effect_engine = NULL");
+               pSlideShow->state = SLIDE_SHOW_STOPPED;
+               pSlideShow->ss_Header = NULL;
+               // TODO : Mis-implementation
+               evas_object_smart_callback_call(ivug_ss_object_get(pSlideShow), "slideshow,finished", (void *)SLIDE_SHOW_STOPPED);
+               pSlideShow->bSS_StopFlag = EINA_FALSE;
+       }
+       //MSG_HIGH("Stop slide show. but not run state");
+
+       return true;
+}
+
+bool ivug_ss_resume(SlideShow *pSlideShow)
+{
+       MSG_HIGH("Slide show Resume");
+       MSG_ASSERT(pSlideShow != NULL);
+
+       if(pSlideShow->ss_timer)
+       {
+               ecore_timer_thaw(pSlideShow->ss_timer);
+       }
+
+       pSlideShow->state = SLIDE_SHOW_RUNNING;
+       //MSG_HIGH("ivug_resume_slideshow");
+
+       return true;
+}
+
+bool ivug_ss_pause(SlideShow *pSlideShow)
+{
+       MSG_HIGH("Slide show Pause");
+
+       MSG_ASSERT(pSlideShow != NULL);
+
+       if(pSlideShow->ss_timer)
+       {
+               ecore_timer_freeze(pSlideShow->ss_timer);
+       }
+
+       pSlideShow->state = SLIDE_SHOW_PAUSE;
+
+       return true;
+}
+
+Media_Item * ivug_ss_item_get(SlideShow *pSlideShow)
+{
+       MSG_ASSERT(pSlideShow != NULL);
+
+       return pSlideShow->sLayout[(pSlideShow->sCurrent) % 2].mitem;
+}
+
+void ivug_ss_delete(SlideShow *pSlideShow)
+{
+       MSG_HIGH("Slide show Delete");
+
+       if(!pSlideShow)
+       {
+               MSG_ERROR("Already deleted!!");
+               return;
+       }
+
+       evas_object_event_callback_del(pSlideShow->event, EVAS_CALLBACK_MOUSE_DOWN, _ivug_ss_on_mouse_down);
+       evas_object_event_callback_del(pSlideShow->event, EVAS_CALLBACK_MOUSE_MOVE, _ivug_ss_on_mouse_move);
+       evas_object_event_callback_del(pSlideShow->event, EVAS_CALLBACK_MOUSE_UP, _ivug_ss_on_mouse_up);
+
+       if(pSlideShow->effect_engine)
+               ivug_effect_finalize(pSlideShow->effect_engine);
+
+       if(pSlideShow->ss_timer) {
+               ecore_timer_del(pSlideShow->ss_timer);
+               pSlideShow->ss_timer = NULL;
+       }
+       if(pSlideShow->click_timer) {
+               ecore_timer_del(pSlideShow->click_timer);
+               pSlideShow->click_timer = NULL;
+       }
+
+
+       for ( int i = 0 ; i < 2; i++)
+       {
+               if(pSlideShow->sLayout[i].photocam) {
+                       evas_object_del(pSlideShow->sLayout[i].photocam);
+                       pSlideShow->sLayout[i].photocam = NULL;
+               }
+               if(pSlideShow->sLayout[(pSlideShow->sCurrent) % 2].layout)
+                       pSlideShow->sLayout[(pSlideShow->sCurrent) % 2].photocam =
+                               elm_object_part_content_unset(pSlideShow->sLayout[(pSlideShow->sCurrent) % 2].layout,
+                               "content");
+
+               if(pSlideShow->sLayout[(pSlideShow->sCurrent) % 2].photocam) {
+                       evas_object_del(pSlideShow->sLayout[(pSlideShow->sCurrent) % 2].photocam);
+                       pSlideShow->sLayout[(pSlideShow->sCurrent) % 2].photocam = NULL;
+               }
+               if(pSlideShow->sLayout[(pSlideShow->sCurrent + 1) % 2].layout)
+                       pSlideShow->sLayout[(pSlideShow->sCurrent + 1) % 2].photocam =
+                               elm_object_part_content_unset(pSlideShow->sLayout[(pSlideShow->sCurrent + 1) % 2].layout,
+                               "content");
+
+               if(pSlideShow->sLayout[i].layout) {
+                       evas_object_del(pSlideShow->sLayout[i].layout);
+                       pSlideShow->sLayout[i].layout = NULL;
+               }
+
+       }
+
+       if ( pSlideShow->event )
+       {
+               evas_object_del(pSlideShow->event);
+               pSlideShow->event = NULL;
+       }
+
+       if ( pSlideShow->obj )
+       {
+               evas_object_del(pSlideShow->obj);
+               pSlideShow->obj = NULL;
+       }
+
+       if(pSlideShow)
+       {
+               free(pSlideShow);
+               pSlideShow = NULL;
+       }
+       return;
+}
+
+void ivug_ss_resize(SlideShow *pSlideShow)
+{
+       /* resize slide show layout and move them to right pos after rotation */
+       if(pSlideShow && pSlideShow->obj && pSlideShow->event) {
+               ivug_ss_get_screen_size(&pSlideShow->screen_w, &pSlideShow->screen_h);
+               evas_object_resize(pSlideShow->obj, pSlideShow->screen_w, pSlideShow->screen_h);
+               Evas_Coord ox, oy, ow, oh;
+               evas_object_geometry_get(pSlideShow->obj, &ox, &oy, &ow, &oh);
+
+               //MSG_HIGH("Moved (%d,%d,%d,%d)", ox, oy, ow, oh);
+               if(pSlideShow->event)
+               {
+                       evas_object_move(pSlideShow->event, ox, oy);
+               }
+
+               if(pSlideShow->sLayout[pSlideShow->sCurrent].layout)
+               {
+                       evas_object_move(pSlideShow->sLayout[pSlideShow->sCurrent].layout, ox, oy);
+               }
+               if(pSlideShow->sLayout[(pSlideShow->sCurrent + 1) % 2].layout)
+               {
+                       evas_object_move(pSlideShow->sLayout[(pSlideShow->sCurrent + 1) % 2].layout, ox + pSlideShow->screen_w + IVUG_IMAGE_BETWEEN_MARGIN, oy);
+               }
+               //MSG_HIGH("_ivug_ss_resize_obj, Moved (%d,%d,%d,%d)", ox, oy, ow, oh);
+       }
+}
+
+
+
+Evas_Object *ivug_ss_object_get(SlideShow *pSlideShow)
+{
+       MSG_ASSERT(pSlideShow != NULL);
+       return pSlideShow->obj;
+}
+
diff --git a/widget/CMakeLists.txt b/widget/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..556afa4
--- /dev/null
@@ -0,0 +1,79 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(ivug_widget C CXX)
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(VERSION 0.1.0)
+
+SET(SRCS
+# Helper files
+       src/common/Scroller.cpp
+       src/common/Primitives.cpp
+       src/util/EFLUtil.cpp
+       src/util/ivug-listpopup.c
+
+#Image
+       src/image/ivug-image-photocam.cpp
+
+# ScissorBox
+       src/scissorbox/ScissorBox.cpp
+       src/scissorbox/ivug-scissorbox.cpp
+)
+
+INCLUDE_DIRECTORIES(
+       ${IVUG_SOURCE_COMMON_DIR}/include
+       ${IVUG_SOURCE_FEATURE_DIR}/include
+       include
+       src/common
+       src/animation
+       src/image
+       src/thumblist
+       src/scissorbox
+)
+
+MESSAGE("Checking " ${PROJECT_NAME}\r)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(${PROJECT_NAME}_pkgs REQUIRED
+       elementary
+       ecore
+       ecore-evas
+       edje
+       eina
+       evas
+       dlog
+)
+
+FOREACH(flag ${${PROJECT_NAME}_pkgs_CFLAGS})
+       SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -Wall")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS}")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DLOG_LVL=DBG_MSG_LVL_HIGH")
+ADD_DEFINITIONS("-DLOG_CAT=\"IV-WIDGET\"")
+
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION} )
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${${PROJECT_NAME}_pkgs_LDFLAGS}
+       ivug_common ivug_feature
+)
+
+BUILD_EDJ(ivug-scroller.edc            ivug-scroller.edj               res/layout      images)
+
+#install resouce files.
+# Lack of a trailing slash means install this directory, trailing slash means
+# install everything in this directory.
+
+# Install image files.
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/images/ DESTINATION ${CMAKE_INSTALL_PREFIX}/res/images/${IVUG_PACKAGE_NAME})
+
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib)
+
+
+
diff --git a/widget/include/Animation.h b/widget/include/Animation.h
new file mode 100755 (executable)
index 0000000..7730935
--- /dev/null
@@ -0,0 +1,114 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#pragma once
+
+#include <Ecore.h>
+#include "Transit.h"
+
+#include <list>
+#include "Exception.h"
+
+using namespace std;
+
+// Composite pattern
+class CAnimator
+{
+public:
+       CAnimator() {};
+
+       virtual ~CAnimator() {};
+
+       virtual void Update(double delta_t) = 0;
+       virtual bool IsFinished() = 0;
+
+       virtual void AddAnimator(CAnimator *animator) {
+               throw new CException(CException::IO_ERROR);
+       };
+
+protected:
+};
+
+
+class CSingleAnimator : public CAnimator
+{
+private:
+       CSingleAnimator() {};
+public:
+// TODO. Using factory
+       CSingleAnimator(double first, double last, double duration, TranstionFunc transition, AnimationCB callback, void *data) {
+               m_actor = new CActor(first, last, duration, transition, callback, data);
+       };
+
+       virtual ~CSingleAnimator() { delete m_actor;};
+
+// Overrides
+       void Update(double delta_t) {
+               m_actor->Update(delta_t);
+       };
+
+       bool IsFinished() { return m_actor->IsFinished(); };
+
+private:
+       CActor *m_actor;
+};
+
+class CGroupAnimator : public CAnimator {
+public:
+       CGroupAnimator() {};
+       virtual ~CGroupAnimator() { ClearAll(); };
+
+       void AddAnimator(CAnimator *animator) {
+               m_actorlist.push_back(animator);
+
+               m_actorlist.back()->Update(0);
+       };
+
+       void ClearAll() {
+               for ( list<CAnimator *>::iterator iter = m_actorlist.begin(); iter != m_actorlist.end(); iter++ )
+               {
+                       delete *iter;
+               }
+
+               m_actorlist.clear();
+
+       };
+
+       bool IsFinished() {
+               return m_actorlist.empty();
+       };
+
+       void Update(double delta_t) {
+               for ( list<CAnimator *>::iterator iter = m_actorlist.begin(); iter != m_actorlist.end(); )
+               {
+                       (*iter)->Update(delta_t);
+
+                       if ( (*iter)->IsFinished() == true )
+                       {
+                               iter = m_actorlist.erase(iter);
+                       }
+                       else
+                       {
+                               iter++;
+                       }
+               }
+       };
+
+private:
+       list<CAnimator *> m_actorlist;
+
+};
+
diff --git a/widget/include/ECoreAnimator.h b/widget/include/ECoreAnimator.h
new file mode 100755 (executable)
index 0000000..74bed7b
--- /dev/null
@@ -0,0 +1,124 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#pragma once
+
+typedef bool (*CallbackFUNC)(double delta, void *data);
+
+#if 0
+template <typename T, bool (T::*callback)(double)>
+struct func_bind
+{
+       static T obj;
+       static bool call(double value) { return (obj.*callback)(value); };
+};
+
+template <typename T, bool (T::*callback)(double)>
+T func_bind<T, callback>::obj;
+#else
+
+template <class ObjType, class FunType, class ParmType>
+class UserMemFunctor
+{
+public:
+    UserMemFunctor(ObjType& obj, FunType fun) : m_obj(obj), m_func(fun) {}
+    void operator()(ParmType& p) { (m_obj.*m_func)(p); }
+private:
+    ObjType& m_obj;
+    FunType m_func;
+};
+#endif
+
+// TODO : Implement using Functor.
+
+class ECoreAnimator {
+       static Eina_Bool _on_anim(void *data)
+       {
+               ECoreAnimator *thiz = static_cast<ECoreAnimator *>(data);
+
+               return thiz->OnAnimation();
+       }
+
+public:
+       ECoreAnimator() : m_animator(NULL), m_bStarted(false) {};
+       ~ECoreAnimator() {
+               Stop();
+       };
+
+       void Start(CallbackFUNC cb, void *data)
+       {
+               m_cb = cb;
+               m_data = data;
+
+               m_count = 0;
+               m_animator = ecore_animator_add(_on_anim, this);
+               m_bStarted = true;
+       }
+
+       void Stop() {
+               if ( m_bStarted )
+               {
+                       m_bStarted = false;
+                       ecore_animator_del(m_animator);
+                       m_animator = NULL;
+               }
+       };
+
+       Eina_Bool OnAnimation() {
+               double current;
+
+               if ( m_count == 0 )
+               {
+                       current = m_prev = ecore_loop_time_get();
+               }
+               else
+               {
+                       current = ecore_loop_time_get();
+               }
+
+               m_count++;
+
+               if ( m_cb(current - m_prev, m_data) == false)
+               {
+                       Stop();
+                       return ECORE_CALLBACK_CANCEL;
+               }
+
+               m_prev = current;
+               return ECORE_CALLBACK_RENEW;
+       };
+
+       bool IsRunning() const {
+               return m_bStarted;
+       };
+
+private:
+       Ecore_Animator *m_animator;
+
+//     template <typename T, bool (T::*callback)()>
+//     func_bind<T, callback> m_f;
+       CallbackFUNC m_cb;
+       void *m_data;
+
+       double m_prev;
+       bool m_bStarted;
+
+       int m_count;
+
+};
+
+
+
diff --git a/widget/include/EFLUtil.h b/widget/include/EFLUtil.h
new file mode 100755 (executable)
index 0000000..72fb218
--- /dev/null
@@ -0,0 +1,61 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#pragma once
+
+#include <Elementary.h>
+
+namespace EFL {
+       void get_evas_geometry(Evas_Object *obj, const char *prefix);
+
+       Evas_Object *create_gesture(Evas_Object *parent);
+
+       Evas_Object *create_rect(Evas_Object *parent);
+
+       Evas_Object *create_clipper(Evas_Object *parent);
+
+       Evas_Object *create_layout(Evas_Object *parent, const char *edj, const char *group);
+
+       Evas_Object *create_button(Evas_Object *parent, const char *style, const char *icon, const char *caption);
+
+       void dump_obj(Evas_Object *obj, int lvl = 0);
+
+       // Returned value Should be freed after using
+       char * current_render_method(Evas *e);
+
+       Evas_Object *create_window(const char *title, int w, int h);
+
+};
+
+namespace util {
+       typedef enum {
+               eImageCodec_JPEG,
+               eImageCodec_GIF,
+               eImageCodec_PNG,
+               eImageCodec_IMAGE,                      // tif.. other image files
+               eImageCodec_UNKNOWN,
+       } Image_Codec_Type;
+
+       Image_Codec_Type
+       get_codec_type(const unsigned char *buffer, unsigned int size);
+
+       Image_Codec_Type
+       get_codec_type(const char *filename);
+
+       bool is_openGL_enabled(Evas *e);
+};
+
+
diff --git a/widget/include/EvasSmartObj.h b/widget/include/EvasSmartObj.h
new file mode 100755 (executable)
index 0000000..4fd5fc4
--- /dev/null
@@ -0,0 +1,168 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#pragma once
+
+#include <Evas.h>
+#include "Primitives.h"
+#include "ivug-debug.h"
+
+template<typename T>
+class CEvasSmartObject {
+protected:
+       static const Evas_Smart_Cb_Description _signals[];
+
+public:
+       CEvasSmartObject() : m_obj(NULL) {};
+       virtual ~CEvasSmartObject() {
+               if ( m_obj )
+                       evas_object_del(m_obj);
+               m_obj= NULL;
+       };
+
+       static void SetClassName(const char *classname)
+       {
+               if (_smart_ == NULL )
+               {       // Damm buggy! Implement using template
+                       const char* name = eina_stringshare_add(classname);
+                       MSG_HIGH("Create smart class name=%s", name);
+                       static Evas_Smart_Class sc =
+                       {
+                               NULL,
+                               EVAS_SMART_CLASS_VERSION,
+                               NULL,
+                               _del,
+                               _move,
+                               _resize,
+                               _show,
+                               _hide,
+                               _color_set,
+                               _clip_set,
+                               _clip_unset,
+                               _calculate,
+                               NULL,
+                               NULL,
+                               NULL,           // Parent
+                               NULL,
+                               NULL,
+                               NULL
+                       };      //Evas_smart_Class
+                       sc.name = name;
+                       _smart_ = evas_smart_class_new(&sc);
+               }
+       }
+
+       virtual Evas_Object *CreateObject(Evas_Object *parent)
+       {
+               m_obj = evas_object_smart_add(evas_object_evas_get(parent), _smart_);   //create smart object.
+               evas_object_smart_data_set(m_obj, this);
+
+               MSG_ASSERT(m_obj != NULL);
+
+               return m_obj;
+       }
+
+private:
+       static void _del(Evas_Object * obj)
+       {
+               CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+
+               thiz->remove();
+       };
+
+       static void _move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
+       {
+               CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+               thiz->move(x, y);
+       };
+
+       static void _resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
+       {
+               CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+               thiz->resize(w, h);
+       };
+
+       static void _show(Evas_Object *obj)
+       {
+               CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+               thiz->show();
+       };
+
+       static void _hide(Evas_Object *obj)
+       {
+               CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+               thiz->hide();
+       };
+
+       static void _calculate(Evas_Object *obj)
+       {
+               CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+               thiz->draw();
+       };
+
+       static void _color_set(Evas_Object *obj, int r, int g, int b, int a)
+       {
+               CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+               thiz->color_set(r,g,b,a);
+       };
+
+       static void _clip_set(Evas_Object *obj, Evas_Object * clip)
+       {
+               CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+               thiz->clip_set(clip);
+       };
+
+       static void _clip_unset(Evas_Object *obj)
+       {
+               CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+               thiz->clip_unset();
+       };
+
+protected:
+       virtual void move(int x, int y) {
+               m_rect.Left(x);
+               m_rect.Top(y);
+       };
+
+       virtual void resize(int w, int h) {
+               m_rect.Width(w);
+               m_rect.Height(h);
+       };
+
+       virtual void remove() {};
+       virtual void show() {};
+       virtual void hide() {};
+       virtual void draw() {};
+       virtual void color_set(int r, int g, int b, int a) {};
+       virtual void clip_set(Evas_Object *clipper) {};
+       virtual void clip_unset() {};
+
+public:
+       Evas_Object *GetObject() const { return m_obj; };
+
+       const CRect GetGeometry() const { return m_rect; };
+
+public:
+       CRect m_rect;
+
+       Evas_Object *m_obj;
+
+       static Evas_Smart *_smart_;
+
+};
+
+template<typename T> Evas_Smart *CEvasSmartObject<T>::_smart_ = NULL;
+
diff --git a/widget/include/Exception.h b/widget/include/Exception.h
new file mode 100755 (executable)
index 0000000..6e324da
--- /dev/null
@@ -0,0 +1,33 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#pragma once
+
+class CException {
+public:
+       typedef enum {
+               IO_ERROR,
+       } error_code;
+
+       CException(error_code err) : m_err(err) {};
+       ~CException() {};
+
+private:
+       error_code m_err;
+};
+
+
+
diff --git a/widget/include/Object.h b/widget/include/Object.h
new file mode 100755 (executable)
index 0000000..0da15bb
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *       http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+
+#include "EvasSmartObj.h"
+
+class CObject : public CEvasSmartObject<CObject> {
+
+public:
+       CObject() : CEvasSmartObject<CObject>() {
+               CEvasSmartObject<CObject>::SetClassName("CObject");
+       };
+
+       virtual ~CObject() {};
+
+
+};
+
diff --git a/widget/include/Primitives.h b/widget/include/Primitives.h
new file mode 100755 (executable)
index 0000000..300815c
--- /dev/null
@@ -0,0 +1,272 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#pragma once
+
+#include <algorithm>
+
+class CSize {
+public:
+       static const CSize Zero;
+
+       CSize(int _w = 0, int _h = 0) {
+               w = _w;
+               h = _h;
+       };
+
+       CSize(const CSize &rhs) {
+               SetSize(rhs.w, rhs.h);
+       };
+
+       void GetSize(int &w, int &h) const {
+               w = this->w;
+               h = this->h;
+       };
+
+       void SetSize(int _w, int _h) {
+               w = _w;
+               h = _h;
+       };
+
+       const CSize operator *(double mul) const {
+               return CSize(w * mul, h *mul);
+       }
+
+       const CSize operator /(double mul) const {
+               return CSize(w / mul, h / mul);
+       }
+
+       const CSize operator +(const CSize &rhs) const {
+               return CSize(w + rhs.Width(), h + rhs.Height());
+       }
+
+       int Width() const { return w;};
+       int Height() const { return h;};
+
+       void Width(int _w) { w = _w; };
+       void Height(int _h) { h = _h; };
+
+       void Swap() { std::swap(w,h); };
+
+private:
+       int w, h;
+};
+
+
+class CPoint {
+public:
+       static const CPoint Zero;
+
+       CPoint(int _x = 0, int _y = 0) {
+               x = _x;
+               y = _y;
+       };
+
+       void GetPoint(int &x, int &y) const {
+               x = this->x;
+               y = this->y;
+       };
+
+       void MoveTo(int x_, int y_) {
+               x = x_;
+               y = y_;
+       };
+
+       void MoveBy(int x_, int y_) {
+               x += x_;
+               y += y_;
+       };
+
+       const CPoint operator -(const CPoint &rhs) const {
+               return CPoint(x - rhs.X(), y - rhs.Y());
+       };
+
+       const CPoint operator +(const CPoint &rhs) const {
+               return CPoint(x + rhs.X(), y + rhs.Y());
+       };
+
+       const CPoint operator +(const CSize &rhs) const {
+               return CPoint(x + rhs.Width(), y + rhs.Height());
+       };
+
+       bool operator !=(const CPoint &rhs) const {
+               return (y != rhs.Y()) ||  (y != rhs.Y()) ;
+       };
+
+
+       int X() const { return x; };
+       int Y() const { return y; };
+
+       void X(int _x) { x = _x; };
+       void Y(int _y) { y = _y; };
+
+private:
+       int x, y;
+};
+
+
+
+class CRect {
+public:
+       static const CRect Zero;
+//     with north-west gravity default.
+public:
+
+       CRect(int _x = 0, int _y = 0, int _w = 0, int _h = 0) {
+               SetRect(_x, _y, _w, _h);
+       };
+
+       CRect(const CRect &rhs) {
+               SetRect(rhs.Left(), rhs.Top(), rhs.Width(), rhs.Height());
+       }
+
+       CRect(const CPoint &_topleft, const CSize &_size) {
+               SetRect(_topleft.X(), _topleft.Y(), _size.Width(), _size.Height());
+       }
+
+       CRect(const CPoint &_topleft, const CPoint &_bottomright) {
+                       topleft = _topleft;
+                       bottomright = _bottomright;
+       }
+
+       ~CRect() {};
+
+       const CRect operator /(double mul) const {
+               return CRect(Left(), Top(), Width() / mul, Height() / mul);
+       }
+
+       bool operator !=(const CRect &rhs) const {
+               return ( topleft.X() != rhs.Left() ) || ( topleft.Y() != rhs.Top() ) ||
+                       ( bottomright.X() != rhs.Right() ) || ( bottomright.Y() != rhs.Bottom() );
+       };
+
+
+       void SetRect(int _x, int _y, int _w, int _h) {
+               topleft.X(_x);
+               topleft.Y(_y);
+
+               SetSize(_w,_h);
+       };
+
+       void MoveTo(const CPoint &_topleft)
+       {
+               CSize cSize = GetSize();
+
+               topleft = _topleft;
+               SetSize(cSize);
+       }
+
+       void MoveTo(int _x, int _y)
+       {
+               CSize cSize = GetSize();
+
+               topleft = CPoint(_x,_y);
+               SetSize(cSize);
+       }
+
+       void MoveBy(const CPoint &_dpoint)              // Difference move
+       {
+               topleft = topleft + _dpoint;
+               bottomright = bottomright + _dpoint;
+       }
+
+       void MoveBy(int dx, int dy)             // Difference move
+       {
+               topleft = topleft + CPoint(dx, dy);
+               bottomright = bottomright + CPoint(dx, dy);
+       }
+
+       void Resize(int _w, int _h)
+       {
+               SetSize(_w, _h);
+       }
+
+       const CPoint GetCenter() const { return CPoint(topleft.X() + Width() / 2, topleft.Y() + Height() / 2); };
+// Getter
+       const CSize GetSize() const { return CSize(Width() , Height() ); };
+
+       int Left() const { return topleft.X(); };
+       int Right() const { return bottomright.X(); };
+       int Top() const { return topleft.Y(); };
+       int Bottom() const { return bottomright.Y(); };
+
+       const CPoint &TopLeft() const { return topleft; };
+       const CPoint &BottomRight() const { return bottomright; };
+
+       bool IsValid() {
+               return !( Width() < 0 || Height() < 0 );
+       };
+
+// Setter
+       void SetSize(const CSize &newsize) {
+               Width(newsize.Width());
+               Height(newsize.Height());
+       };
+
+       void SetSize(int w, int h) {
+               Width(w);
+               Height(h);
+       };
+
+       void Left(int _V) { int W = Width(); topleft.X(_V); bottomright.X(_V + W); };
+       void Right(int _V) { int W = Width(); bottomright.X(_V); topleft.X(_V - W); };
+       void Top(int _V) { int H = Height(); topleft.Y(_V); bottomright.Y(_V + H); };
+       void Bottom(int _V) { int H = Height(); bottomright.Y(_V); topleft.Y(_V - H);};
+
+
+       int Width() const { return bottomright.X() - topleft.X(); };
+       int Height() const { return bottomright.Y() - topleft.Y(); };
+       void Width(int _W) { bottomright.X(topleft.X() + _W); };
+       void Height(int _H) { bottomright.Y(topleft.Y() + _H); };
+
+       bool Intersect(const CRect &rhs) const {
+               return ( ( Left() < rhs.Right() ) && ( Top() < rhs.Bottom() ) && ( Right() > rhs.Left() ) && ( Bottom() > rhs.Top() ));
+       };
+
+       void Inflate(int x1, int y1, int x2, int y2) {
+               topleft.X( topleft.X() + x1);
+               topleft.Y( topleft.Y() + y1);
+
+               bottomright.X( bottomright.X() + x2);
+               bottomright.Y( bottomright.Y() + y2);
+       };
+
+       friend CRect UnionRect(const CRect &rect1, const CRect &rect2);
+       friend CRect IntersectRect(const CRect &rect1, const CRect &rect2);
+
+       bool Inside(const CPoint &rhs) const {
+               return (Left() < rhs.X()) && (rhs.X() < Left() + Width() ) && (Top() < rhs.Y()) && (rhs.Y() < Top() + Height() );
+       };
+
+       bool Inside(const CRect &rhs) const {
+               return (Left() <= rhs.Left()) && (rhs.Right() <= Right() ) && (Top() <= rhs.Top()) && (rhs.Bottom() <= Bottom() );
+       };
+
+       void Scale(double ratio_x, double ratio_y) {
+               topleft.X( topleft.X() * ratio_x);
+               bottomright.X( bottomright.X() * ratio_x);
+
+
+               topleft.Y( topleft.Y() * ratio_y);
+               bottomright.Y( bottomright.Y() * ratio_y);
+       };
+
+private:
+       CPoint topleft;
+       CPoint bottomright;
+};
+
+
diff --git a/widget/include/ScrollerClient.h b/widget/include/ScrollerClient.h
new file mode 100755 (executable)
index 0000000..e033f1c
--- /dev/null
@@ -0,0 +1,122 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#pragma once
+
+#include <Elementary.h>
+#include "Object.h"
+
+#include "Scroller.h"
+
+#undef DISABLE_ORIGIN
+
+class CScrollerClient : public CObject {
+       friend class CScroller;
+public:
+       CScrollerClient(Evas_Object *parent) : m_zoom(0.0f), m_size(0,0), m_update(0), m_origin(0,0), m_scroller(NULL) {
+               CreateObject(parent);
+       };
+
+       virtual ~CScrollerClient(){
+               MSG_HIGH("CScrollerClient destructor");
+       };
+
+public:
+       const CRect GetClientRect() const {
+               // Returns window rect(LCD coordinate)
+               return CRect(topleft, m_extent);
+       };
+
+       virtual void Move(int x, int y) { topleft.MoveTo(x,y);  };
+       virtual void MoveBy(int dx, int dy) { topleft.MoveBy(dx,dy); };
+
+       virtual void PanX(int x) { topleft.X(x);        };
+       virtual void PanY(int y) { topleft.Y(y);        };
+
+       virtual void Draw() { MSG_HIGH("Scroller client Draw"); };
+
+       virtual void BeginUpdate() {
+               m_update++;
+
+               MSG_HIGH("Begin update. Count=%d", m_update);
+       };
+       virtual void EndUpdate() {
+               m_update--;
+
+               MSG_HIGH("End update. Count=%d", m_update);
+       };
+
+#ifndef DISABLE_ORIGIN
+       virtual void SetOrigin(int x, int y) {
+               MSG_LOW("Set Origin (%d,%d)", x, y);
+               m_origin = CPoint(x,y);
+       };
+
+       const CPoint \r&GetOrigin() const {
+               return m_origin;
+       };
+
+#endif
+       // Scroller client original size
+       virtual void SetSize(const CSize &size) {
+               MSG_HIGH("CScrollerClient SetSize(%d,%d)", size.Width(), size.Height());
+
+               m_size = size;
+       };
+       virtual const CSize &GetClientSize() const { return m_size; };
+       virtual double Zoom() const { return m_zoom; };
+       virtual void Zoom(double zoom) {
+               m_zoom = zoom;
+
+               m_extent = m_size * m_zoom;
+
+               MSG_LOW("Set Zoom=%f", m_zoom);
+       };
+
+       void Changed() {
+               m_scroller->OnChanged(this);
+       };
+
+private:
+       void SetScroller(CScroller *scroller) {
+               m_scroller = scroller;
+       };
+
+       void UnSetScroller() {
+               m_scroller = NULL;
+       };
+
+// Need OnResized??
+protected:
+       double m_zoom;
+
+       CPoint topleft;
+       CSize  m_size;                  // original size
+
+       int m_update;
+
+private:
+
+#ifndef DISABLE_ORIGIN
+       CPoint m_origin;
+#endif
+       CSize  m_extent;                // display size
+
+       CScroller *m_scroller;
+
+};
+
+
diff --git a/widget/include/Transit.h b/widget/include/Transit.h
new file mode 100755 (executable)
index 0000000..d0ef0eb
--- /dev/null
@@ -0,0 +1,176 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#pragma once
+
+#include <algorithm>
+
+typedef double (*TranstionFunc)(double t);
+typedef void (*AnimationCB)(double value, void *data);
+
+
+class CTranstionFunc {
+// Normalied transition fuctions.
+public:
+       static double ConstTransit(double t) {
+               return 0;
+       };
+
+       static double LinearTransit(double t) {
+               return t;
+       };
+
+       static double SineTransit(double t) {
+               static const double SIN_TABLE[91] = {
+                       0.0000f, 0.0174f, 0.0349f, 0.0523f, 0.0698f,
+                       0.0872f, 0.1045f, 0.1219f, 0.1392f, 0.1564f,
+                       0.1736f, 0.1908f, 0.2079f, 0.2249f, 0.2419f,
+                       0.2588f, 0.2756f, 0.2924f, 0.3090f, 0.3256f,
+                       0.3420f, 0.3584f, 0.3746f, 0.3907f, 0.4067f,
+                       0.4226f, 0.4384f, 0.4540f, 0.4695f, 0.4848f,
+                       0.5000f, 0.5150f, 0.5299f, 0.5446f, 0.5592f,
+                       0.5736f, 0.5878f, 0.6018f, 0.6157f, 0.6293f,
+                       0.6528f, 0.6561f, 0.6691f, 0.6820f, 0.6947f,
+                       0.7071f, 0.7193f, 0.7314f, 0.7431f, 0.7547f,
+                       0.7660f, 0.7772f, 0.7880f, 0.7986f, 0.8090f,
+                       0.8191f, 0.8290f, 0.8387f, 0.8480f, 0.8571f,
+                       0.8660f, 0.8746f, 0.8829f, 0.8910f, 0.8988f,
+                       0.9063f, 0.9135f, 0.9205f, 0.9272f, 0.9336f,
+                       0.9397f, 0.9455f, 0.9511f, 0.9563f, 0.9613f,
+                       0.9659f, 0.9703f, 0.9744f, 0.9781f, 0.9816f,
+                       0.9848f, 0.9877f, 0.9903f, 0.9926f, 0.9945f,
+                       0.9962f, 0.9976f, 0.9986f, 0.9994f, 0.9998f,
+                       1.0f
+               };
+
+               int idx = (int)(90.0 * t);
+
+               return (SIN_TABLE[idx]);
+       };
+
+       static double EaseInoutTransit(double t) {
+               double ts = t * t;
+               double tc = ts * t;
+               return (-2 * tc + 3 * ts);
+       }
+
+};
+
+
+class CTransit {
+public:
+       CTransit(double first, double last, double duration , TranstionFunc transition) : m_duration(duration), m_current(0), m_start(first), m_last(last),
+               m_transition(transition) {
+       };
+
+
+       CTransit() : m_duration(1.0f), m_current(0), m_transition(CTranstionFunc::ConstTransit) {
+       };
+
+       ~CTransit() {
+       };
+
+       void SetTransitFunction(TranstionFunc transition ) {
+               m_transition = transition;
+               m_current = 0.0f;
+       };
+
+       void SetDuration(double duration)               // X variations(time)
+       {
+               m_duration = m_duration;
+               m_current = 0.0f;
+       }
+
+       void SetInit(double first)      // Y variationns
+       {
+               m_start = first;
+               m_current = 0.0f;
+       }
+
+       void SetEnd(double last)        // Y variationns
+       {
+               m_last = last;
+               m_current = 0.0f;
+       }
+
+       double Update(double dt) {
+               double reminant = std::min(m_duration - m_current, dt );
+
+               m_current += reminant;
+
+               return m_start + m_transition( m_current/m_duration ) * ( m_last - m_start);
+
+       };
+
+       bool IsFinished() {
+               return m_current >= m_duration;
+       };
+
+private:
+       double m_duration;
+       double m_current;
+
+       double m_start;
+       double m_last;
+
+       TranstionFunc m_transition;
+};
+
+
+
+class CActor {
+public:
+       CActor() {
+               m_tween = new CTransit();
+       };
+// TODO : Using functor!
+       CActor(double first, double last, double duration, TranstionFunc transition, AnimationCB callback, void *data) : m_callback(callback), m_data(data) {
+               m_tween = new CTransit(first, last, duration, transition);
+       };
+
+       ~CActor() {
+               delete m_tween;
+               m_tween = NULL;
+       };
+
+       void SetCallback(AnimationCB callback, void *data) {
+               m_callback = callback;
+               m_data = data;
+       };
+
+       void SetConfig(double first, double last, double duration, TranstionFunc transition)
+       {
+               m_tween->SetTransitFunction(transition);
+               m_tween->SetInit(first);
+               m_tween->SetEnd(last);
+               m_tween->SetDuration(duration);
+       }
+
+       void Update(double delta_t)
+       {
+               double value = m_tween->Update(delta_t);
+
+               m_callback(value, m_data);
+       }
+
+       bool IsFinished() const { return m_tween->IsFinished(); };
+private:
+       AnimationCB m_callback;
+       void *m_data;
+
+       CTransit *m_tween;
+};
+
diff --git a/widget/include/ivug-image.h b/widget/include/ivug-image.h
new file mode 100755 (executable)
index 0000000..bd0aba4
--- /dev/null
@@ -0,0 +1,119 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_IMAGE_H__
+#define __IVUG_IMAGE_H__
+
+#include <Evas.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+Evas_Object *
+ivug_image_create(Evas_Object *parent);
+
+
+/*
+       Load & Unload image file
+*/
+Evas_Load_Error
+ivug_image_file_set(Evas_Object *obj, const char *file, const char *key);
+
+Evas_Load_Error
+ivug_image_mem_set(Evas_Object *obj, const char *buffer, unsigned int size, const char *key);
+
+Evas_Load_Error
+ivug_image_unset(Evas_Object *obj);
+
+/*
+       Configuration
+*/
+void
+ivug_image_hold_set(const Evas_Object *obj, Eina_Bool hold);   // If set HOLD, all events including mouse is ignored.
+
+void
+ivug_image_animated_set(const Evas_Object *obj, Eina_Bool bAnimation);         // Determine whether AGIF is animated or not
+
+/*
+       Showing
+*/
+void
+ivug_image_zoom_set(Evas_Object *obj, double zoom, Evas_Point *pCenter);
+
+double
+ivug_image_zoom_get(const Evas_Object *obj);
+
+void
+ivug_image_zoom_reset(Evas_Object *obj, Evas_Point *pCenter);
+
+
+void
+ivug_image_rotate_set(Evas_Object *obj, int degree);
+
+int
+ivug_image_rotate_get(Evas_Object *obj);
+
+
+
+/*
+       Get image's original size.
+*/
+void
+ivug_image_image_size_get(const Evas_Object *obj, int *w, int *h);
+
+Evas_Object *
+ivug_image_internal_image_get(Evas_Object *obj);
+
+void
+ivug_image_decoded_size_get(const Evas_Object *obj, int *w, int *h);
+
+unsigned char *
+ivug_image_decoded_buffer_get(const Evas_Object *obj);
+
+
+/*
+       Get display geometry.
+       x,y,w,h is LCD corrdinate
+*/
+void
+ivug_image_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h);         // Geometry of internal image
+
+/*
+       Crop image and return cropped image as Evas_Object.
+       x,y,w,h is LCD corrdinate
+*/
+Evas_Object *
+ivug_image_region_image_get(Evas_Object *obj, int x, int y, int w, int h );
+
+
+/*
+
+*/
+void ivug_image_coordinate_lcd_to_image(Evas_Object *photocam, int lcd_x, int lcd_y, int *img_x, int *img_y);
+void ivug_image_coordinate_image_to_lcd(Evas_Object *photocam, int img_x, int img_y, int *lcd_x, int *lcd_y);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
+
+#endif         // __IVUG_IMAGE_H__
+
diff --git a/widget/include/ivug-listpopup.h b/widget/include/ivug-listpopup.h
new file mode 100755 (executable)
index 0000000..8147603
--- /dev/null
@@ -0,0 +1,71 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_LISTPOPUP_H__
+#define __IVUG_LISTPOPUP_H__
+
+
+typedef void Ivug_ListPopup_Item;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdbool.h>
+/*
+       Signals
+               "popup,selected"        event_info contains Ivug_ListPopup_Item which is used when append/prepend
+               "popup,dismissed"       closed button pressed, in case of contextual, no dismised callback
+
+*/
+
+Evas_Object *ivug_listpopup_add(Evas_Object *parent);
+
+Ivug_ListPopup_Item *ivug_listpopup_item_append(Evas_Object *obj,  const char *iconpath, const char *caption, void *data);
+Ivug_ListPopup_Item *ivug_listpopup_item_prepend(Evas_Object *obj, const char *iconpath, const char *caption, void *data);
+
+/*
+       Eina list includes (Ivug_ListPopup_Item *) - (Ivug_ListPopup_Item *) - (Ivug_ListPopup_Item *) ....
+*/
+Eina_List *ivug_listpopup_items_get(Evas_Object *obj);
+
+/*
+       Valid only when genlist style popup
+*/
+void ivug_listpopup_button_set(Evas_Object *obj, const char* caption);
+void ivug_listpopup_title_set(Evas_Object *obj, const char* title);
+
+
+void *ivug_listpopup_item_get_data(Ivug_ListPopup_Item *item);
+void ivug_listpopup_item_disabled_set(Ivug_ListPopup_Item *item);
+void ivug_listpopup_item_enabled_set(Ivug_ListPopup_Item *item);
+const char *ivug_listpopup_item_get_text(Ivug_ListPopup_Item *item);
+
+
+/*
+       Show Time!
+*/
+bool ivug_listpopup_popup_show(Evas_Object *obj);
+bool ivug_listpopup_context_show(Evas_Object *obj, Evas_Object *hover, int x, int y);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif         // __IVUG_LISTPOPUP_H__
+
diff --git a/widget/include/ivug-scissorbox.h b/widget/include/ivug-scissorbox.h
new file mode 100755 (executable)
index 0000000..ba06621
--- /dev/null
@@ -0,0 +1,54 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#ifndef __IVUG_SCISSORBOX_H__
+#define __IVUG_SCISSORBOX_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+       SCISSOR_BOX_TYPE_1,             //. Image view
+       SCISSOR_BOX_TYPE_2,             // Image edit
+} eScissorBoxType;
+
+
+Evas_Object *ivug_scissorbox_add(Evas_Object *parent);
+
+void ivug_scissorbox_type_set(Evas_Object *obj, eScissorBoxType type);
+
+void ivug_scissorbox_attach(Evas_Object *obj, Evas_Object *pObj);
+
+void ivug_scissorbox_region_set(Evas_Object *obj, int x, int y, int w, int h);
+void ivug_scissorbox_region_get(Evas_Object *obj, int *x, int *y, int *w, int *h);
+
+
+void ivug_scissorbox_boundary_set(Evas_Object *obj, int x, int y, int w, int h);
+
+
+/*DEFAULT_RATIO_FIX = EINA_TRUE */
+void ivug_scissorbox_ratio_fix(Evas_Object *obj, Eina_Bool bFix);
+
+/* Default value is bOpaque = true */
+void ivug_scissorbox_set_opaque(Evas_Object *obj, Eina_Bool bOpaque);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __IVUG_SCISSORBOX_H__*/
+
diff --git a/widget/res/images/crop/T06_selection.png b/widget/res/images/crop/T06_selection.png
new file mode 100755 (executable)
index 0000000..52c7886
Binary files /dev/null and b/widget/res/images/crop/T06_selection.png differ
diff --git a/widget/res/images/crop/T06_selection_Delete.png b/widget/res/images/crop/T06_selection_Delete.png
new file mode 100755 (executable)
index 0000000..22e9b74
Binary files /dev/null and b/widget/res/images/crop/T06_selection_Delete.png differ
diff --git a/widget/res/images/crop/T06_selection_Resizing_V.png b/widget/res/images/crop/T06_selection_Resizing_V.png
new file mode 100755 (executable)
index 0000000..967937b
Binary files /dev/null and b/widget/res/images/crop/T06_selection_Resizing_V.png differ
diff --git a/widget/res/images/crop/T06_selection_Resizing_h.png b/widget/res/images/crop/T06_selection_Resizing_h.png
new file mode 100755 (executable)
index 0000000..74aefe4
Binary files /dev/null and b/widget/res/images/crop/T06_selection_Resizing_h.png differ
diff --git a/widget/res/images/crop/T06_selection_Rotate.png b/widget/res/images/crop/T06_selection_Rotate.png
new file mode 100755 (executable)
index 0000000..1709767
Binary files /dev/null and b/widget/res/images/crop/T06_selection_Rotate.png differ
diff --git a/widget/res/images/scissorbox/T01_CallerID_hold.png b/widget/res/images/scissorbox/T01_CallerID_hold.png
new file mode 100755 (executable)
index 0000000..b31bc39
Binary files /dev/null and b/widget/res/images/scissorbox/T01_CallerID_hold.png differ
diff --git a/widget/res/images/scissorbox/T01_CallerID_line_W.png b/widget/res/images/scissorbox/T01_CallerID_line_W.png
new file mode 100755 (executable)
index 0000000..f436338
Binary files /dev/null and b/widget/res/images/scissorbox/T01_CallerID_line_W.png differ
diff --git a/widget/res/images/scissorbox/T01_CallerID_line_W_press.png b/widget/res/images/scissorbox/T01_CallerID_line_W_press.png
new file mode 100755 (executable)
index 0000000..2db8179
Binary files /dev/null and b/widget/res/images/scissorbox/T01_CallerID_line_W_press.png differ
diff --git a/widget/res/images/scissorbox/T01_CallerID_line_h.png b/widget/res/images/scissorbox/T01_CallerID_line_h.png
new file mode 100755 (executable)
index 0000000..587a6da
Binary files /dev/null and b/widget/res/images/scissorbox/T01_CallerID_line_h.png differ
diff --git a/widget/res/images/scissorbox/T01_CallerID_line_h_press.png b/widget/res/images/scissorbox/T01_CallerID_line_h_press.png
new file mode 100755 (executable)
index 0000000..2bd8f82
Binary files /dev/null and b/widget/res/images/scissorbox/T01_CallerID_line_h_press.png differ
diff --git a/widget/res/images/scissorbox/T01_CallerID_normal.png b/widget/res/images/scissorbox/T01_CallerID_normal.png
new file mode 100755 (executable)
index 0000000..1787cde
Binary files /dev/null and b/widget/res/images/scissorbox/T01_CallerID_normal.png differ
diff --git a/widget/res/images/scissorbox/T01_CallerID_press.png b/widget/res/images/scissorbox/T01_CallerID_press.png
new file mode 100755 (executable)
index 0000000..fc64933
Binary files /dev/null and b/widget/res/images/scissorbox/T01_CallerID_press.png differ
diff --git a/widget/res/images/scissorbox/T01_btn_optiontray.png b/widget/res/images/scissorbox/T01_btn_optiontray.png
new file mode 100755 (executable)
index 0000000..acaf908
Binary files /dev/null and b/widget/res/images/scissorbox/T01_btn_optiontray.png differ
diff --git a/widget/res/layout/ivug-scroller.edc b/widget/res/layout/ivug-scroller.edc
new file mode 100755 (executable)
index 0000000..935f10b
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *       http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+collections {
+       group {
+               name: "scroller";
+
+               parts {
+                       part {
+                               name: "elm.rect.bg";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       rel1 { relative: 0.0 0.0; }
+                                       rel2 { relative: 1.0 1.0; }
+                                       color: 0 0 0 0;
+                               }
+                       }
+
+               }               // End of parts
+       }
+}
+
+
diff --git a/widget/src/common/BufferCanvas.h b/widget/src/common/BufferCanvas.h
new file mode 100755 (executable)
index 0000000..fce37a6
--- /dev/null
@@ -0,0 +1,54 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#pragma once
+
+class CBufferCanvas {
+public:
+       CBufferCanvas() : m_ee(NULL), m_evas(NULL) {};
+       ~CBufferCanvas() {
+               if ( m_ee)
+                       ecore_evas_free(m_ee);
+       }
+
+       void Create(int w, int h) {
+               m_ee = ecore_evas_buffer_new(w,h);
+               MSG_ASSERT(m_ee != NULL);
+
+               m_evas = ecore_evas_get(m_ee);
+       };
+
+       Evas *GetCanvas() const {
+               return m_evas;
+       };
+
+       const void *GetPixels() const {
+               return ecore_evas_buffer_pixels_get(m_ee);
+       };
+
+       void Render() const {
+               ecore_evas_manual_render(m_ee);
+       };
+
+
+private:
+
+private:
+       Ecore_Evas *m_ee;
+       Evas *m_evas;
+
+
+};
diff --git a/widget/src/common/Primitives.cpp b/widget/src/common/Primitives.cpp
new file mode 100755 (executable)
index 0000000..cfe3b5f
--- /dev/null
@@ -0,0 +1,61 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "Primitives.h"
+#include <algorithm>
+
+
+using namespace std;
+
+
+const CRect CRect::Zero = CRect(0,0,0,0);
+const CSize CSize::Zero = CSize(0,0);
+const CPoint CPoint::Zero = CPoint(0,0);
+
+
+
+CRect UnionRect(const CRect &rect1, const CRect &rect2)
+{
+       return CRect(
+                       CPoint( min(rect1.Left(), rect2.Left()),
+                               min(rect1.Top(), rect2.Top()) ),
+
+                       CPoint( max(rect1.Right(), rect2.Right()),
+                               max(rect1.Bottom(), rect2.Bottom()) )
+                       );
+}
+
+
+CRect IntersectRect(const CRect &rect1, const CRect &rect2)
+{
+       CRect rect(
+                       CPoint( max(rect1.Left(), rect2.Left()),
+                               max(rect1.Top(), rect2.Top()) ),
+
+                       CPoint( min(rect1.Right(), rect2.Right()),
+                               min(rect1.Bottom(), rect2.Bottom()) )
+                       );
+
+       if ( rect.IsValid() == false)
+       {
+               rect = CRect::Zero;
+       }
+
+       return rect;
+}
+
+
+
diff --git a/widget/src/common/Scroller.cpp b/widget/src/common/Scroller.cpp
new file mode 100755 (executable)
index 0000000..01d8100
--- /dev/null
@@ -0,0 +1,1386 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "Scroller.h"
+
+#include "ivug-debug.h"
+#include <algorithm>
+
+#include "EFLUtil.h"
+#include "Animation.h"
+#include "ECoreAnimator.h"
+#include "ScrollerClient.h"
+
+#define EDJ_PATH PREFIX"/res/edje/"PACKAGE
+
+#undef LOG_LVL
+#define LOG_LVL DBG_MSG_LVL_HIGH
+
+#undef LOG_CAT
+#define LOG_CAT "IV-SCROLLER"
+
+#define ENABLE_CLIPPER
+
+// 100 pixel ´ç 100 ms °É¸®µµ·Ï ¿òÁ÷ÀδÙ.
+#define MIN_ZOOM_RATIO (0.85f)
+
+#define SCR_VELOCITY(dist, v) ((((dist) > 0 ? (dist) : -(dist)) *0.1f) / 100)
+
+CScroller::CScroller(const char *name) : CObject(), m_clipper(NULL), m_gesture(NULL), m_event(NULL), m_client(NULL), m_nFinger(0), m_ani(NULL), m_freeze(false), m_resized(false), m_calcjob(NULL)
+{
+       MSG_HIGH("Scroller added : %s", name);
+
+       m_name = name;
+       m_ani_zoom = new ECoreAnimator();
+};
+
+CScroller::~CScroller()
+{
+       MSG_HIGH("Scroller removed");
+       delete m_ani_zoom;
+       m_ani_zoom= NULL;
+
+       if ( m_calcjob )
+       {
+               ecore_job_del(m_calcjob);
+               m_calcjob = NULL;
+       }
+
+       UnsetClient();
+
+       if ( m_obj )            // Scroller itself is removed!
+       {
+               evas_object_del(m_obj);
+       }
+       m_obj = NULL;
+
+
+};
+
+Evas_Event_Flags CScroller::_zoom_start(void *data, void *event_info)
+{
+       Elm_Gesture_Zoom_Info *p = (Elm_Gesture_Zoom_Info *) event_info;
+       MSG_LOW("zoom start <%d,%d> <%f>", p->x, p->y, p->zoom);
+
+       CScroller *thiz = static_cast<CScroller *>(data);
+
+       thiz->zoom_start(CPoint(p->x, p->y), p->zoom);
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags CScroller::_zoom_move(void *data, void *event_info)
+{
+       Elm_Gesture_Zoom_Info *p = (Elm_Gesture_Zoom_Info *) event_info;
+       MSG_LOW("zoom move <%d,%d> <%f>", p->x, p->y, p->zoom);
+
+       CScroller *thiz = static_cast<CScroller *>(data);
+
+       thiz->zoom_move(CPoint(p->x, p->y), p->zoom);
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags CScroller::_zoom_end(void *data, void *event_info)
+{
+       Elm_Gesture_Zoom_Info *p = (Elm_Gesture_Zoom_Info *) event_info;
+       MSG_LOW("zoom end <%d,%d> <%f>", p->x, p->y, p->zoom);
+
+       CScroller *thiz = static_cast<CScroller *>(data);
+
+       thiz->zoom_end(CPoint(p->x, p->y), p->zoom);
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags CScroller::_zoom_abort(void *data, void *event_info)
+{
+       Elm_Gesture_Zoom_Info *p = (Elm_Gesture_Zoom_Info *) event_info;
+       MSG_LOW("zoom abort <%d,%d> <%f>", p->x, p->y, p->zoom);
+
+       CScroller *thiz = static_cast<CScroller *>(data);
+
+       thiz->zoom_abort(CPoint(p->x, p->y), p->zoom);
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags CScroller::_momentum_start(void *data, void *event_info)
+{
+       Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) event_info;
+       MSG_LOW("momentum_start <%d,%d>", p->x2, p->y2);
+
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       CScroller *thiz = static_cast<CScroller *>(data);
+
+       thiz->momentum_start(CPoint(p->x1, p->y1), CPoint(p->x2, p->y2), CSize(p->mx, p->my) );
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags CScroller::_momentum_move(void *data, void *event_info)
+{
+       Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) event_info;
+       MSG_LOW("momentum move <%d,%d>", p->x2, p->y2);
+
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       CScroller *thiz = static_cast<CScroller *>(data);
+
+       thiz->momentum_move(CPoint(p->x1, p->y1), CPoint(p->x2, p->y2), CSize(p->mx, p->my) );
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags CScroller::_momentum_end(void *data, void *event_info)
+{
+       Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) event_info;
+       MSG_LOW("momentum end <%d,%d> <%d,%d>", p->x2, p->y2, p->mx, p->my);
+
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       CScroller *thiz = static_cast<CScroller *>(data);
+
+       thiz->momentum_end(CPoint(p->x1, p->y1), CPoint(p->x2, p->y2), CSize(p->mx, p->my) );
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags CScroller::_momentum_abort(void *data, void *event_info)
+{
+       Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) event_info;
+       MSG_LOW("momentum abort <%d,%d> <%d,%d>", p->x2, p->y2, p->mx, p->my);
+
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       CScroller *thiz = static_cast<CScroller *>(data);
+
+       thiz->momentum_abort(CPoint(p->x1, p->y1), CPoint(p->x2, p->y2), CSize(p->mx, p->my) );
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+Evas_Event_Flags CScroller::_dbl_click_start(void *data , void *event_info)
+{
+       Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
+
+       MSG_HIGH("Double click start");
+
+       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+       return EVAS_EVENT_FLAG_ON_HOLD;
+}
+
+Evas_Event_Flags CScroller::_dbl_click_end(void *data , void *event_info)
+{
+   Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
+
+   MSG_HIGH("Double click end");
+
+   if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+   CScroller *thiz = static_cast<CScroller *>(data);
+
+   thiz->double_click(CPoint(p->x, p->y));
+
+   return EVAS_EVENT_FLAG_ON_HOLD;
+}
+
+Evas_Event_Flags CScroller::_dbl_click_abort(void *data , void *event_info)
+{
+   Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
+
+   MSG_HIGH("Double click abort");
+
+   if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
+
+   return EVAS_EVENT_FLAG_ON_HOLD;
+}
+
+bool CScroller::SetClient(CScrollerClient *client)
+{
+       MSG_HIGH("[%s] Set client.", m_name.c_str());
+
+       if ( client == m_client ) return true;
+
+       if ( m_client != NULL )
+       {
+               // Removing old client first.
+               UnsetClient();
+       }
+
+       m_client = client;
+
+       m_client->SetScroller(this);
+
+       evas_object_smart_member_add(m_client->GetObject(), GetObject());
+       evas_object_stack_below(m_client->GetObject(), m_event);
+
+#ifdef ENABLE_CLIPPER
+       evas_object_clip_set(m_client->GetObject(), m_clipper);
+       evas_object_show(m_clipper);
+#endif
+
+       evas_object_pass_events_set(m_event, EINA_FALSE);
+       evas_object_pass_events_set(m_client->GetObject(), EINA_FALSE);
+
+       CSize img = m_client->GetClientSize();
+
+       if ( img.Width() == 0 || img.Height() == 0 )
+       {
+               MSG_WARN("Not ready to dump client");
+               return true;
+       }
+
+       m_zoom_autofit = GetAutoFitZoom();
+       m_rect_autofit = GetAutoFitGeometry();
+
+       MSG_HIGH("[%s] Set client. AutoFitZoom(%f) Rect(%d,%d,%d,%d)", m_name.c_str(), m_zoom_autofit, m_rect_autofit.Left(), m_rect_autofit.Top(), m_rect_autofit.Width(), m_rect_autofit.Height());
+
+       DoAutoFit();
+
+       return true;
+};
+
+bool CScroller::UnsetClient()
+{
+       if ( m_client == NULL ) return true;
+
+       MSG_HIGH("[%s] Unset client.", m_name.c_str());
+
+       evas_object_pass_events_set(m_event, EINA_TRUE);
+
+#ifdef ENABLE_CLIPPER
+       evas_object_clip_unset(m_client->GetObject());
+       evas_object_hide(m_clipper);
+#endif
+
+       evas_object_smart_member_del(m_client->GetObject());
+
+       m_client->UnSetScroller();
+       m_client = NULL;
+
+       return true;
+};
+
+void CScroller::OnChanged(CScrollerClient *client)
+{
+       MSG_HIGH("[%s] Client changed!", m_name.c_str());
+
+       m_zoom_autofit = GetAutoFitZoom();
+       m_rect_autofit = GetAutoFitGeometry();
+
+       DoAutoFit();
+}
+
+void CScroller::DisableEvent() {
+       MSG_LOW("Disable events");
+
+       m_freeze = true;
+
+//             evas_object_freeze_events_set(m_event, EINA_TRUE);
+//     elm_object_disabled_set(m_gesture, EINA_TRUE);
+};
+
+void CScroller::EnableEvent() {
+       MSG_LOW("Enable events");
+
+//     elm_object_disabled_set(m_gesture, EINA_FALSE);
+//             evas_object_freeze_events_set(m_event, EINA_FALSE);
+
+       m_freeze = false;
+
+};
+
+
+/* (lcd size * BASE_OF_BIG_SIZE_IMAGE) define big size image */
+#define BASE_OF_BIG_SIZE_IMAGE (5)
+
+/* d_size_percent is for bouncing size rate */
+/* return base_size(width or height)/limit_size */
+static double _calc_limit_zoom(int org_w, int org_h,
+                               int img_w, int img_h, int lcd_w, int lcd_h)
+{
+
+       int img_base = 0;
+       int lcd_base = 0;
+       int org_base = 0;
+       int limit = 0;
+
+       MSG_LOW("org w, h = %d, %d, img w, h = %d, %d, lcd w, h = %d, %d",
+                       org_w, org_h, img_w, img_h, lcd_w, lcd_h);
+
+       double lcd_ratio = (double)lcd_h/lcd_w;
+       double org_ratio = (double)org_h/org_w;
+
+       if ( org_ratio > lcd_ratio )
+       {
+               img_base = img_h;
+               lcd_base = lcd_h;
+               org_base = org_h;
+       }
+       else
+       {
+               img_base = img_w;
+               lcd_base = lcd_w;
+               org_base = org_w;
+       }
+
+#if 0
+       /* img region is smaller than lcd region for min zoom */
+       if (img_base < lcd_base)
+       {
+               return (double)(img_base/lcd_base);
+       }
+#else
+       /* (img region*(1-d_size_rate)) is smaller than lcd region for min zoom */
+       if (img_base*(1.2) < lcd_base)
+       {
+               return (double)(img_base*(1.2)/lcd_base);
+       }
+       else
+       {
+               /* (img region*(1+d_size_rate)) for max zoom bouncing */
+               img_base *= (0.8);
+       }
+#endif
+
+       if(lcd_base*BASE_OF_BIG_SIZE_IMAGE < org_base)  /* original img size is larger than (lcd size*3) */
+       {
+               limit = org_base;       /* 1:1 */
+       }
+       else if(lcd_base < org_base)    /* original img size is larger than lcd size */
+       {
+               limit = MAX(org_base*(BASE_OF_BIG_SIZE_IMAGE-1), lcd_base*BASE_OF_BIG_SIZE_IMAGE);
+       }
+       else    /* original img size is smaller than lcd size */
+       {
+               limit = lcd_base*BASE_OF_BIG_SIZE_IMAGE;
+       }
+       if(img_base > limit)
+       {
+               return (double)img_base/limit;
+       }
+       return 1.0;
+}
+
+void CScroller::Zoom(const CPoint &center, double zoom)
+{
+       CPoint topleft;
+       CPoint newCenter;
+
+       topleft = m_client->GetClientRect().TopLeft();
+       newCenter = center - topleft;           // Get Image local coordinate center.
+
+       {
+               CSize zoomed = m_client->GetClientSize();
+               CRect rect = m_client->GetClientRect();
+//             ScreenToClient(rect);
+
+               zoomed = zoomed * zoom;
+
+               MSG_LOW("Current Geo XYWH(%d,%d,%d,%d)", rect.Left(), rect.Top(), rect.Width(), rect.Height());
+               MSG_LOW("Origianl size WH(%d,%d)", m_extent.Width(), m_extent.Height());
+               MSG_LOW("Zoomed size WH(%d,%d) Zoom=%f", zoomed.Width() , zoomed.Height(), zoom);
+
+               MSG_LOW("Zoom %f %f", m_extent.Width() * zoom, m_extent.Height() * zoom);
+               CPoint moved;
+
+               moved.X(newCenter.X() * zoomed.Width() / (double)rect.Width());
+               moved.Y(newCenter.Y() * zoomed.Height() / (double)rect.Height());
+
+               MSG_LOW("Center XY(%d,%d)", center.X() , center.Y());
+               MSG_LOW("Moved XY(%d,%d)", moved.X() , moved.Y());
+
+               CPoint dMove = moved - newCenter;
+
+               MSG_LOW("New Moved XY(%d,%d)", dMove.X() , dMove.Y());
+
+               MSG_LOW("New Geo XYWH(%d,%d,%d,%d)", rect.Left() - dMove.X(), rect.Top() - dMove.Y(), zoomed.Width(), zoomed.Height());
+
+               m_client->Move(rect.Left() - dMove.X(), rect.Top() - dMove.Y());
+               m_client->Zoom(zoom);
+       }
+
+       UpdateClient();
+}
+
+
+static void _on_event_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+       MSG_HIGH("Event layer clicked : %s Layer=%d", evas_object_name_get(obj), evas_object_layer_get(obj));
+}
+
+void CScroller::move(int x, int y)
+{
+       MSG_MED("[%s] Move Scroller to XY(%d,%d)", m_name.c_str(), x, y);
+
+       m_origin.MoveTo(x,y);           // Origin
+
+       if ( m_calcjob )
+       {
+               ecore_job_del(m_calcjob);
+               m_calcjob = NULL;
+       }
+
+       m_calcjob = ecore_job_add(_CalcJob, this);
+}
+
+void CScroller::resize(int w, int h)
+{
+       if ( m_extent.Width() == w && m_extent.Height() == h) return;
+
+       MSG_HIGH("[%s] Resize Scroller to WH(%d,%d)", m_name.c_str(), w, h);
+
+       m_extent.SetSize(w,h);
+       m_resized = true;
+
+       if ( m_calcjob )
+       {
+               ecore_job_del(m_calcjob);
+               m_calcjob = NULL;
+       }
+
+       m_calcjob = ecore_job_add(_CalcJob, this);
+
+
+}
+
+void CScroller::show()
+{
+       MSG_HIGH("[%s] Scroller show", m_name.c_str());
+
+       evas_object_show(m_edje);
+       evas_object_show(m_event);
+
+       if ( m_client )
+               evas_object_show(m_client->GetObject());
+
+}
+
+void CScroller::hide()
+{
+       MSG_HIGH("[%s] Scroller hide", m_name.c_str());
+
+       if ( m_client )
+               evas_object_hide(m_client->GetObject());
+
+       evas_object_hide(m_edje);
+       evas_object_hide(m_event);
+}
+
+void CScroller::draw()
+{
+       if ( m_client == NULL )
+       {
+               MSG_HIGH("[%s] Client NULL", m_name.c_str());
+               return;
+       }
+
+       if ( m_extent.Width() == 0 || m_extent.Height() == 0)
+       {
+               MSG_HIGH("Extent is abnormal");
+               return;
+       }
+
+       UpdateClient();
+
+//     EFL::dump_obj(GetObject(), 0);
+}
+
+void CScroller::UpdateClient()
+{
+       const CRect &sRect = m_client->GetClientRect();
+//     ScreenToClient(sRect);
+       MSG_MED("[%s] Draw. Origin(%d,%d) XYWH(%d,%d,%d,%d)", m_name.c_str(), m_origin.X(), m_origin.Y(), sRect.Left(), sRect.Top(), sRect.Width(), sRect.Height() );
+
+       m_client->SetOrigin(m_origin.X(), m_origin.Y());
+       m_client->Draw();
+
+}
+
+
+CRect CScroller::GetAutoFitGeometry()
+{
+       CSize img = m_client->GetClientSize();
+
+       MSG_LOW("Client size : WH(%d,%d", m_extent.Width(), m_extent.Height());
+       MSG_LOW("Image size : WH(%d,%d)", img.Width(), img.Height());
+
+       int ph, pw;
+
+       ph = (img.Height() * m_extent.Width()) / img.Width();
+
+       if (ph > m_extent.Height())
+       {
+               pw = (img.Width() * m_extent.Height()) / img.Height();
+               ph = m_extent.Height();
+       }
+       else
+       {
+               pw = m_extent.Width();
+       }
+
+// Calculate XY
+       int px, py;
+
+       px = (m_extent.Width() - pw ) / 2;
+       py = (m_extent.Height() - ph ) / 2;
+
+       CRect rect(px, py, pw, ph);
+
+       return rect;
+}
+
+double CScroller::GetAutoFitZoom()
+{
+       double zoom;
+
+       CSize img = m_client->GetClientSize();
+
+       MSG_LOW("Client size : WH(%d,%d)", m_extent.Width(), m_extent.Height());
+       MSG_LOW("Image size : WH(%d,%d)", img.Width(), img.Height());
+
+       if ( img.Width() == 0 || img.Height() == 0 )
+       {
+               MSG_ERROR("Invalid img. ImgWH(%d,%d)", img.Width(), img.Height());
+               return 0.0f;
+       }
+
+       int ph, pw;
+
+       ph = (img.Height() * m_extent.Width()) / img.Width();
+
+       if (ph > m_extent.Height())
+       {
+               pw = (img.Width() * m_extent.Height()) / img.Height();
+               ph = m_extent.Height();
+       }
+       else
+       {
+               pw = m_extent.Width();
+       }
+
+       if ( img.Width() > img.Height())
+       {
+               zoom = (double)pw / img.Width();
+       }
+       else
+       {
+               zoom = (double)ph / img.Height();
+       }
+
+       return zoom;
+}
+
+void CScroller::DoAutoFit()
+{
+       if ( m_client == NULL )
+       {
+               MSG_LOW("Client is NULL. DoAutoFit()");
+               return;
+       }
+
+       if ( m_extent.Width() <= 1 ||  m_extent.Height() <= 1 )         // Damm EFL!!! object resized to (1,115) first and then enlarge up to screen size.
+       {
+               MSG_ERROR("Rect is not configured (%d,%d)", m_extent.Width(), m_extent.Height());
+               return ;
+       }
+
+       if ( m_rect_autofit.Width() == 0 ||  m_rect_autofit.Height() == 0 )
+       {
+               MSG_ERROR("Rect is not configured");
+               return ;
+       }
+
+// Stop animation
+       m_ani_zoom->Stop();
+       if ( m_ani ) delete m_ani;
+       m_ani = NULL;
+
+       m_client->Move(m_rect_autofit.Left(), m_rect_autofit.Top());
+       m_client->Zoom(m_zoom_autofit);
+
+       MSG_HIGH("[%s] DoAutofit : XY(%d,%d,%d,%d) Zoom=%f", m_name.c_str(), m_rect_autofit.Left(), m_rect_autofit.Top(), m_rect_autofit.Width(), m_rect_autofit.Height(), m_zoom_autofit);
+       MSG_LOW("[%s] Origin XY(%d,%d)", m_name.c_str(), m_origin.X(), m_origin.Y());
+
+       UpdateClient();
+
+       m_client->EndUpdate();
+}
+
+Evas_Object *CScroller::CreateObject(Evas_Object *parent)
+{
+       CObject::CreateObject(parent);
+       evas_object_name_set(GetObject(), "Scroller");
+
+       m_edje = edje_object_add(evas_object_evas_get(GetObject()));
+       if (!m_edje)
+       {
+               MSG_ERROR("could not create edje object!");
+               return false;
+       }
+
+       if (!edje_object_file_set(m_edje, EDJ_PATH"/ivug-scroller.edj", "scroller"))
+       {
+               Edje_Load_Error err = edje_object_load_error_get(m_edje);
+               const char *errmsg = edje_load_error_str(err);
+               MSG_ERROR("could not load 'ivug-scroller' from %s: %s",EDJ_PATH"ivug-scroller.edj", errmsg);
+
+               evas_object_del(m_edje);
+               return false;
+       }
+
+       evas_object_name_set(m_edje, "Scroller:Edje");
+       evas_object_event_callback_add( m_edje, EVAS_CALLBACK_MOUSE_DOWN, _on_event_mouse_down, NULL);
+
+       evas_object_smart_member_add(m_edje, GetObject());
+
+// Get Event rect
+       m_event = EFL::create_rect(m_edje);
+       evas_object_name_set(m_event, "Scroller:Event");
+
+       evas_object_pass_events_set(m_event, EINA_TRUE);
+
+       if ( m_event == NULL )
+       {
+               MSG_ERROR("Cannot found event rect");
+               evas_object_del(m_edje);
+               return false;
+       }
+       evas_object_event_callback_add(m_event, EVAS_CALLBACK_MOUSE_DOWN, _on_event_mouse_down, NULL);
+
+       evas_object_smart_member_add(m_event, GetObject());
+
+       m_gesture = EFL::create_gesture(m_event);
+       elm_gesture_layer_hold_events_set(m_gesture, EINA_TRUE);
+
+       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_START, _zoom_start, this);
+       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_MOVE, _zoom_move, this);
+       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_END, _zoom_end, this);
+       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_ABORT, _zoom_abort, this);
+       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_START, _momentum_start, this);
+       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_MOVE, _momentum_move, this);
+       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_END, _momentum_end, this);
+       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_ABORT, _momentum_abort, this);
+
+       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_STATE_START, _dbl_click_start, this);
+       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_STATE_END, _dbl_click_end, this);
+       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_STATE_ABORT, _dbl_click_abort, this);
+
+       if ( elm_gesture_layer_attach(m_gesture, m_event) == EINA_FALSE)
+       {
+               MSG_ERROR("Cannot attach event rect");
+               evas_object_del(m_edje);
+               return false;
+       }
+
+       evas_object_name_set(m_gesture, "Scroller:Getsture");
+
+       evas_object_event_callback_add( m_gesture, EVAS_CALLBACK_MOUSE_DOWN, _on_event_mouse_down, NULL);
+
+// Do not add m_gesture as smart member. this makes event broken!.
+//     evas_object_smart_member_add(m_gesture, GetObject());
+#ifdef ENABLE_CLIPPER
+       m_clipper = EFL::create_clipper(m_edje);
+       evas_object_name_set(m_clipper, "Scroller:Clipper");
+       evas_object_event_callback_add( m_clipper, EVAS_CALLBACK_MOUSE_DOWN, _on_event_mouse_down, NULL);
+
+       evas_object_smart_member_add(m_clipper, GetObject());
+#endif
+
+       evas_object_repeat_events_set(GetObject(), EINA_FALSE);
+
+       MSG_HIGH("Scroller is created.");
+
+       return GetObject();
+}
+
+void CScroller::CalcJob()
+{
+       MSG_MED("[%s] Draw job!!! (%d,%d,%d,%d)", m_name.c_str(), m_origin.X(), m_origin.Y(), m_extent.Width(), m_extent.Height());
+
+       m_calcjob = NULL;
+
+       evas_object_move(m_edje, m_origin.X(), m_origin.Y());
+       evas_object_move(m_event, m_origin.X(), m_origin.Y());
+
+#ifdef ENABLE_CLIPPER
+       evas_object_move(m_clipper, m_origin.X(), m_origin.Y());
+#endif
+
+       if ( m_client)
+       {
+               m_client->SetOrigin(m_origin.X(), m_origin.Y());
+       }
+
+       evas_object_resize(m_edje, m_extent.Width(), m_extent.Height());
+       evas_object_resize(m_event, m_extent.Width(), m_extent.Height());
+
+#ifdef ENABLE_CLIPPER
+       evas_object_resize(m_clipper, m_extent.Width(), m_extent.Height());
+#endif
+
+       if ( m_resized == true && m_client )
+       {
+               m_zoom_autofit = GetAutoFitZoom();
+               m_rect_autofit = GetAutoFitGeometry();
+
+               DoAutoFit();
+
+               m_resized = false;
+       }
+
+       evas_object_smart_changed(GetObject());
+
+}
+
+void CScroller::del()
+{
+       if ( m_edje )
+       {
+               evas_object_del(m_edje);
+       }
+       m_edje = NULL;
+
+       if ( m_event )
+       {
+               evas_object_del(m_event);
+       }
+       m_event = NULL;
+
+       if ( m_gesture )
+       {
+               evas_object_del(m_gesture);
+       }
+       m_gesture = NULL;
+
+#ifdef ENABLE_CLIPPER
+       if ( m_clipper )
+       {
+               evas_object_del(m_clipper);
+       }
+       m_clipper = NULL;
+#endif
+
+
+}
+
+void CScroller::DoAnim()
+{
+       // Get current rect;
+       CRect sRect = m_client->GetClientRect();
+       ScreenToClient(sRect);
+
+       const CSize &img = m_client->GetClientSize();
+
+       int ph, pw;
+
+       ph = (img.Height() * m_extent.Width()) / img.Width();
+
+       if (ph > m_extent.Height())
+       {
+               pw = (img.Width() * m_extent.Height()) / img.Height();
+               ph = m_extent.Height();
+       }
+       else
+       {
+               pw = m_extent.Width();
+       }
+
+       CRect dRect = sRect;            // Destination rect in local coord
+
+       double zoom = m_client->Zoom();
+
+       if ( img.Width() > img.Height())
+       {
+               if ( sRect.Width() < pw )
+               {
+                       MSG_HIGH("Need resize W");
+                       zoom = (double)pw / img.Width();
+                       dRect.Width(pw);
+                       dRect.Height(ph);
+               }
+       }
+       else
+       {
+               if ( sRect.Height() < ph )
+               {
+                       MSG_HIGH("Need resize H");
+                       zoom = (double)ph / img.Height();
+                       dRect.Width(pw);
+                       dRect.Height(ph);
+               }
+       }
+
+// Go Center
+       if ( dRect.Width() < m_extent.Width() )
+       {
+               // Center align
+               dRect.Left( (m_extent.Width() - dRect.Width()) / 2);
+
+               MSG_HIGH("H align %d, %d", dRect.Width(), m_extent.Width());
+       }
+       else
+       {
+               if ( dRect.Right() < m_extent.Width() ) // If reach to edge
+               {
+                       dRect.Right(m_extent.Width());
+               }
+
+               if ( dRect.Left() > 0 ) // If reach to edge
+               {
+                       dRect.Left(0);
+               }
+       }
+
+       if ( dRect.Height() < m_extent.Height() )
+       {
+               dRect.Top( (m_extent.Height() - dRect.Height()) / 2);
+
+               MSG_HIGH("V align %d, %d", dRect.Height(), m_extent.Height());
+       }
+       else
+       {
+               if ( dRect.Bottom() < m_extent.Height() )
+               {
+                       dRect.Bottom(m_extent.Height());
+               }
+
+               if ( dRect.Top() > 0 )          // If reach edge
+               {
+                       dRect.Top(0);
+               }
+       }
+
+       m_ani_zoom->Stop();
+       m_client->EndUpdate();
+
+       if ( m_ani ) delete m_ani;
+       m_ani = new CGroupAnimator();
+
+       if ( zoom != m_client->Zoom() )         // smaller than screen
+       {
+               m_ani->AddAnimator(new CSingleAnimator(m_client->Zoom(), zoom, 0.3f, CTranstionFunc::LinearTransit, CScroller::_on_ani_zoom, this));
+       }
+
+       double t1 = 0.3f;
+
+       if ( sRect.Left() !=  dRect.Left() )
+       {
+               m_ani->AddAnimator(new CSingleAnimator(sRect.Left(), dRect.Left(), t1 , CTranstionFunc::LinearTransit, CScroller::_on_ani_panX, this));
+       }
+
+       double t2 = 0.3f;
+
+       if ( dRect.Top() != sRect.Top() )
+       {
+               m_ani->AddAnimator(new CSingleAnimator(sRect.Top(),  dRect.Top() , t2, CTranstionFunc::LinearTransit, CScroller::_on_ani_panY, this));
+       }
+
+       m_client->BeginUpdate();
+       m_ani_zoom->Start(CScroller::_on_anim, (void *)this);
+
+       MSG_HIGH("Momentum end Animation started. Ani1=(%d~%d,%f) Ani2=(%d~%d,%f)", sRect.Left(), dRect.Left(), t1, sRect.Top(), dRect.Top(), t2);
+
+
+
+}
+
+
+bool CScroller::OnAnimation(double delta) {
+       if ( m_ani->IsFinished() )
+       {
+               MSG_HIGH("animation ended");
+               m_client->EndUpdate();
+               m_freeze = false;
+
+               evas_object_smart_callback_call(GetObject(), "scroll,animate,end", NULL);
+               return false;
+       }
+
+       MSG_LOW("On Animaion. %f ", delta);
+
+       m_ani->Update(delta);
+
+       UpdateClient();
+
+       evas_object_smart_callback_call(GetObject(), "scroll,animate", NULL);
+
+       return true;
+}
+
+bool CScroller::OnAnimationZoom(double value) {
+       MSG_LOW("OnAnimationZoom. %f", value);
+
+       m_client->Zoom(value);
+
+       return true;
+}
+
+bool CScroller::OnAnimationPanX(double value) {
+       MSG_LOW("OnAnimationPanX. %f", value);
+
+       m_client->PanX(value);
+
+       return true;
+}
+
+bool CScroller::OnAnimationPanY(double value) {
+       MSG_LOW("OnAnimationPanY. %f", value);
+
+       m_client->PanY(value);
+
+       return true;
+}
+
+void CScroller::zoom_start(const CPoint &center, double zoom)
+{
+       m_nFinger = 2;
+
+       MSG_HIGH("Zoom started. Current=%f Finger=%d", m_client->Zoom(), m_nFinger);
+       m_prev = center;
+
+       m_zoom = m_client->Zoom();
+       m_prevzoom = zoom;
+}
+
+void CScroller::zoom_move(const CPoint &center, double zoom)
+{
+       if ( m_freeze == true) {
+               MSG_LOW("MFreeze is true");
+               return;
+       }
+
+       CPoint dmove = center - m_prev;
+
+       MSG_MED("Zoom move center(%d,%d) zoom=%f Move(%d,%d)", center, zoom, dmove.X(), dmove.Y());
+
+       m_client->MoveBy(dmove.X(), dmove.Y());
+       m_prev = center;
+       m_prevzoom = zoom;
+
+       double fzoom = m_zoom * zoom;
+
+       CSize zoomed = m_client->GetClientSize();
+       CRect rect = m_client->GetClientRect();
+
+       MSG_MED("1. Rect (%d,%d,%d,%d)", rect.Left(), rect.Right(), rect.Width(), rect.Height() );
+
+       double limit_zoom = _calc_limit_zoom(zoomed.Width(), zoomed.Height(),
+                               rect.Width(), rect.Height(), m_extent.Width(), m_extent.Height());
+
+       if(limit_zoom != 1.0)   // Zoom level is allowed.
+       {
+               if(limit_zoom < 1.0) /* ZOOM_MIN_LIMITED */
+               {
+                       MSG_MED("ZOOM_MIN_LIMITED");
+                       if(m_prevfzoom > fzoom)
+                       {
+                               UpdateClient();
+                               return;
+                       }
+               }
+               else /* ZOOM_MAX_LIMITED */
+               {
+                       MSG_MED("ZOOM_MAX_LIMITED");
+                       if(m_prevfzoom < fzoom)
+                       {
+                               UpdateClient();
+                               return;
+                       }
+               }
+       }
+
+       Zoom(center, fzoom);
+
+       m_prevfzoom = fzoom;
+}
+
+void CScroller::zoom_end(const CPoint &center, double zoom)
+{
+       m_nFinger = 0;
+
+       MSG_HIGH("Zoom ended %d", m_nFinger);
+
+       if ( m_freeze == true) return;
+
+       m_zoom = 0.0f;
+
+       DoAnim();
+       m_freeze = true;
+
+       MSG_HIGH("Zoom ended. Animation started.");
+}
+
+void CScroller::zoom_abort(const CPoint &center, double zoom)
+{
+       m_nFinger = 0;
+
+       MSG_HIGH("Zoom aborted %d", m_nFinger);
+
+       if ( m_freeze == true) return;
+
+       m_zoom = 0.0f;
+
+       DoAnim();
+       m_freeze = true;
+
+       MSG_HIGH("Zoom ended. Animation started.");
+
+}
+
+
+void CScroller::momentum_start(const CPoint &from, const CPoint &to, const CSize &momentum)
+{
+       m_nFinger = 1;
+
+       MSG_MED("MStart : From XY(%d,%d) To XY(%d,%d) %d", from.X(), from.Y(), to.X(), to.Y(), m_nFinger);
+
+       m_prev = from;
+
+       if ( m_freeze == true) return;
+
+       if ( m_client->Zoom() >= m_zoom_autofit)        // If zoom anim is progressing
+       {
+               m_ani_zoom->Stop();
+               m_client->EndUpdate();
+
+               if ( m_ani ) delete m_ani;
+               m_ani = NULL;
+       }
+}
+
+void CScroller::momentum_move(const CPoint &from, const CPoint &to, const CSize &momentum)
+{
+       if ( m_freeze == true) return;
+
+       CPoint dmove = to - m_prev;
+
+       MSG_MED("MMove : From XY(%d,%d) To XY(%d,%d). DMove(%d,%d)", from.X(), from.Y(), to.X(), to.Y(), dmove.X(), dmove.Y());
+
+// Able to scroll?
+       CRect sRect = m_client->GetClientRect();
+       ScreenToClient(sRect);
+
+       if ( dmove.X() )
+       {
+               if ( sRect.Width() <= m_extent.Width() )
+               {
+                       MSG_MED("Case 0 SRect(%d) MSize(%d)", sRect.Width() , m_extent.Width() );
+                       dmove.X(0);
+               }
+               else
+               {
+                       if ( dmove.X() < 0 && sRect.Right() + dmove.X() <= m_extent.Width() )  // Mouse <-----
+                       {
+                               MSG_MED("Case1. dmove.X()=%d Right=%d", dmove.X(), sRect.Right());
+                               dmove.X(m_extent.Width() - sRect.Right());
+                       }
+                       else if ( dmove.X() > 0 && sRect.Left() + dmove.X() >= 0 )
+                       {
+                               MSG_MED("Case2. dmove.X()=%d Left=%d MSizeLeft=%d", dmove.X(), sRect.Left(), 0);
+                               dmove.X(0 - sRect.Left());
+                       }
+               }
+       }
+
+       if ( dmove.Y() )
+       {
+               if ( sRect.Height() <= m_extent.Height() )
+               {
+                       MSG_MED("Case 3 SRect(%d) MSize(%d)", sRect.Height() , m_extent.Height() );
+                       dmove.Y(0);
+               }
+               else
+               {
+                       if ( dmove.Y() < 0 && sRect.Bottom() + dmove.Y() <= m_extent.Height() )
+                       {
+                               MSG_MED("Case4. dmove.X()=%d Right=%d", dmove.Y(), sRect.Bottom());
+                               dmove.Y(m_extent.Height() - sRect.Bottom());
+                       }
+                       else if ( dmove.Y() > 0 && sRect.Top() + dmove.Y() >= 0 )
+                       {
+                               MSG_MED("Case5. dmove.X()=%d Left=%d MSizeLeft=%d", dmove.X(), sRect.Top(), 0);
+                               dmove.Y(0 - sRect.Top());
+                       }
+               }
+       }
+
+       m_client->MoveBy(dmove.X(), dmove.Y());
+
+       UpdateClient();
+
+       m_prev = to;
+}
+
+void CScroller::momentum_end(const CPoint &from, const CPoint &to, const CSize &momentum)
+{
+       m_nFinger = 0;
+
+       MSG_HIGH("MEnd : From XY(%d,%d) To XY(%d,%d) Momentum=(%d,%d) %d", from.X(), from.Y(), to.X(), to.Y(), momentum.Width(), momentum.Height(), m_nFinger);
+
+       if ( m_freeze == true) return;
+
+       CSize nor_momentum = momentum;
+
+       CRect sRect = m_client->GetClientRect();
+       ScreenToClient(sRect);
+
+       CRect dRect = sRect;
+
+       MSG_HIGH("MoveTo %d,%d,%d,%d", dRect.Left(), dRect.Top(), dRect.Right(), dRect.Bottom());
+
+       double zoom = m_zoom_autofit;
+
+       if ( zoom > m_client->Zoom() )
+       {
+               DoAnim();
+
+               MSG_HIGH("Momentum end. Zoom Anim. %f->%f", m_client->Zoom(), zoom );
+               return ;
+       }
+
+       if ( dRect.Width() > m_extent.Width() )
+       {
+               dRect.Left(sRect.Left() + nor_momentum.Width() );
+               if ( nor_momentum.Width() < 0 )   // Finger <<------
+               {
+                       if ( dRect.Right() < m_extent.Width() ) // If reach to edge
+                       {
+                               dRect.Right(m_extent.Width());
+                               MSG_LOW("Case 1a %d,%d dstX(%d)", dRect.Right() , m_extent.Width(), dRect.Left());
+                       }
+                       else
+                       {
+                               MSG_LOW("Case 2a %d dstX(%d)", dRect.Right() , m_extent.Width(), dRect.Left());
+                       }
+               }
+               else if ( nor_momentum.Width() > 0 ) // Finger ----->>>
+               {
+                       if ( dRect.Left() > 0 ) // If reach to edge
+                       {
+                               dRect.Left(0);
+                               MSG_LOW("Case 3a %d,%d dstX(%d)", dRect.Left() , 0, dRect.Left());
+                       }
+                       else
+                       {
+                               MSG_LOW("Case 4a %d dstX(%d)", dRect.Left() , 0, dRect.Left());
+                       }
+               }
+       }
+       else
+       {
+               dRect.Left( (m_extent.Width() - dRect.Width()) / 2);
+       }
+
+       MSG_HIGH("X Anim from %d to %d", sRect.Left(), dRect.Left());
+
+       if ( dRect.Height() > m_extent.Height() )
+       {
+               dRect.Top(sRect.Top() + nor_momentum.Height() );
+               if ( nor_momentum.Height() < 0 )   // finger ^
+               {
+                       if ( dRect.Bottom() < m_extent.Height() )       // If reach to edge
+                       {
+                               dRect.Bottom( m_extent.Height());
+                               MSG_LOW("Case 1b %d,%d dstX(%d)", dRect.Bottom() ,  m_extent.Height(), sRect.Top());
+                       }
+                       else
+                       {
+                               MSG_LOW("Case 2b %d dstX(%d) %d", dRect.Bottom() ,  m_extent.Height(), sRect.Top());
+                       }
+
+               }
+               else if ( nor_momentum.Height() > 0 )  // Finger goes downward
+               {
+                       if ( dRect.Top() > 0 )          // If reach edge
+                       {
+                               dRect.Top(0);
+                               MSG_LOW("Case 3b %d,%d dstX(%d)", dRect.Top() , 0, sRect.Top());
+                       }
+                       else
+                       {
+                               MSG_LOW("Case 4d %d dstX(%d) %d", dRect.Top() , 0, sRect.Top());
+                       }
+               }
+       }
+       else
+       {
+               // Center align
+               dRect.Top((m_extent.Height() - dRect.Height()) / 2);
+       }
+
+       MSG_HIGH("Y Anim from %d to %d", sRect.Top(), dRect.Top());
+
+       m_ani_zoom->Stop();
+       m_client->EndUpdate();
+
+       if ( m_ani ) delete m_ani;
+       m_ani = new CGroupAnimator();
+
+       double t1 = (dRect.Left() - sRect.Left()) / (double)momentum.Width();
+
+       if ( sRect.Left() !=  dRect.Left() )
+       {
+               m_ani->AddAnimator(new CSingleAnimator(sRect.Left(), dRect.Left(), t1 , CTranstionFunc::LinearTransit, CScroller::_on_ani_panX, this));
+       }
+
+       double t2 = (dRect.Top() - sRect.Top()) / (double)momentum.Height();
+
+       if ( dRect.Top() != sRect.Top() )
+       {
+               m_ani->AddAnimator(new CSingleAnimator(sRect.Top(),  dRect.Top() , t2, CTranstionFunc::LinearTransit, CScroller::_on_ani_panY, this));
+       }
+
+       m_client->BeginUpdate();
+       m_ani_zoom->Start(CScroller::_on_anim, (void *)this);
+
+       MSG_HIGH("Momentum end Animation started. Ani1=(%d~%d,%f) Ani2=(%d~%d,%f)", sRect.Left(), dRect.Left(), t1, sRect.Top(), dRect.Top(), t2);
+       MSG_HIGH("Momentum WH(%d,%d)", momentum.Width(), momentum.Height());
+}
+
+
+void CScroller::momentum_abort(const CPoint &from, const CPoint &to, const CSize &momentum)
+{
+       m_nFinger = 0;
+
+       MSG_HIGH("momentum Aborted %d", m_nFinger);
+}
+
+void CScroller::double_click(const CPoint &center)
+{
+       m_ani_zoom->Stop();
+       m_client->EndUpdate();
+
+       double src = m_client->Zoom();
+       double dst;
+
+       CRect sRect = m_client->GetClientRect();
+       ScreenToClient(sRect);
+
+       CRect dRect;
+
+       if ( m_extent.Width() < sRect.Width())
+       {
+               // To autofit
+               dst = m_zoom_autofit;
+               dRect = m_rect_autofit;
+               MSG_HIGH("AAAAAAA %d, %d", m_extent.Width(), sRect.Width());
+       }
+       else
+       {
+               dst = m_client->Zoom() * 4.0f;
+
+               {
+                       CPoint topleft;
+                       CPoint newCenter;
+
+                       topleft = m_client->GetClientRect().TopLeft();
+                       newCenter = center - topleft;           // Get Image local coordinate center.
+
+                       CSize zoomed = m_client->GetClientSize();
+                       CRect rect = m_client->GetClientRect();
+                       ScreenToClient(rect);
+
+                       zoomed = zoomed * dst;
+
+                       MSG_LOW("Current Geo XYWH(%d,%d,%d,%d)", rect.Left(), rect.Top(), rect.Width(), rect.Height());
+                       MSG_LOW("Origianl size WH(%d,%d)", m_extent.Width(), m_extent.Height());
+                       MSG_LOW("Zoomed size WH(%d,%d) Zoom=%f", zoomed.Width() , zoomed.Height(), dst);
+
+                       MSG_LOW("%f %f", m_extent.Width() * dst, m_extent.Height() * dst);
+                       CPoint moved;
+
+                       moved.X(newCenter.X() * zoomed.Width() / (double)rect.Width());
+                       moved.Y(newCenter.Y() * zoomed.Height() / (double)rect.Height());
+
+                       MSG_LOW("Center XY(%d,%d)", center.X() , center.Y());
+                       MSG_LOW("Moved XY(%d,%d)", moved.X() , moved.Y());
+
+                       CPoint dMove = moved - newCenter;
+
+                       MSG_LOW("New Moved XY(%d,%d)", dMove.X() , dMove.Y());
+
+                       MSG_LOW("New Geo XYWH(%d,%d,%d,%d)", rect.Left() - dMove.X(), rect.Top() - dMove.Y(), zoomed.Width(), zoomed.Height());
+
+                       dRect.MoveBy(-dMove.X(), -dMove.Y());
+                       dRect.Width(zoomed.Width());
+                       dRect.Height(zoomed.Height());
+               }
+
+               MSG_LOW("DRect(%d,%d,%d,%d) ViewPort(%d,%d)", dRect.Left(), dRect.Top(), dRect.Width(), dRect.Height(), m_extent.Width(), m_extent.Height());
+
+               if ( dRect.Width() < m_extent.Width() )
+               {
+                       // Center align
+                       dRect.Left( (m_extent.Width() - dRect.Width()) / 2);
+
+                       MSG_HIGH("H align %d, %d", dRect.Width(), m_extent.Width());
+               }
+               else
+               {
+                       if ( dRect.Right() < m_extent.Width() ) // If reach to edge
+                       {
+                               dRect.Right(m_extent.Width());
+                       }
+
+                       if ( dRect.Left() > 0 ) // If reach to edge
+                       {
+                               dRect.Left(0);
+                       }
+               }
+
+               if ( dRect.Height() < m_extent.Height() )
+               {
+                       dRect.Top( (m_extent.Height() - dRect.Height()) / 2);
+
+                       MSG_HIGH("V align %d, %d", dRect.Height(), m_extent.Height());
+               }
+               else
+               {
+                       if ( dRect.Bottom() < m_extent.Height() )
+                       {
+                               dRect.Bottom(m_extent.Height());
+                       }
+
+                       if ( dRect.Top() > 0 )          // If reach edge
+                       {
+                               dRect.Top(0);
+                       }
+               }
+
+               m_freeze = false;
+       }
+
+       if ( m_ani ) delete m_ani;
+       m_ani = new CGroupAnimator();
+
+       double duration = abs(sRect.Width() - dRect.Width()) / 10000.0f;
+
+       m_ani->AddAnimator(new CSingleAnimator(src, dst, duration, CTranstionFunc::LinearTransit, CScroller::_on_ani_zoom, this));
+       m_ani->AddAnimator(new CSingleAnimator(sRect.Left() , dRect.Left(), duration, CTranstionFunc::LinearTransit, CScroller::_on_ani_panX, this));
+       m_ani->AddAnimator(new CSingleAnimator(sRect.Top() , dRect.Top(), duration, CTranstionFunc::LinearTransit, CScroller::_on_ani_panY, this));
+
+       m_client->BeginUpdate();
+       m_ani_zoom->Start(CScroller::_on_anim, (void *)this);
+
+       MSG_HIGH("Double click animation started. Ani1=(%d~%d,%f) Ani2=(%d~%d,%f) Ani3(%f~%f,%f))", sRect.Left(), dRect.Left(), duration, sRect.Top(), dRect.Top(), duration, src, dst, duration);
+
+};
+
+
diff --git a/widget/src/common/Scroller.h b/widget/src/common/Scroller.h
new file mode 100755 (executable)
index 0000000..99f35b2
--- /dev/null
@@ -0,0 +1,197 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#pragma once
+
+#include <Elementary.h>
+
+#include "ivug-debug.h"
+
+#include "Primitives.h"
+#include "Object.h"
+
+#include <string>
+
+using namespace std;
+
+class ECoreAnimator;
+class CAnimator;
+class CScrollerClient;
+
+class CScroller : public CObject {
+
+       static void _CalcJob(void *data) {
+               CScroller *thiz = static_cast<CScroller *>(data);
+
+               thiz->CalcJob();
+
+       };
+public:
+
+// Public APIs
+
+       CScroller(const char *name);
+       ~CScroller();
+
+       Evas_Object *CreateObject(Evas_Object *parent);
+
+       bool SetClient(CScrollerClient *client);
+
+       bool UnsetClient();
+
+       void Zoom(const CPoint &center, double zoom);
+
+       void DisableEvent();
+
+       void EnableEvent();
+
+       void Draw() {
+               MSG_HIGH("Scroller draw");
+       };
+
+       void ScreenToClient(CRect &rect) {
+               rect.MoveBy(-m_origin.X(), -m_origin.Y());
+       };
+
+       void OnChanged(CScrollerClient *client);
+
+private:
+       static Evas_Event_Flags _momentum_end(void *data, void *event_info);
+       static Evas_Event_Flags _momentum_move(void *data, void *event_info);
+       static Evas_Event_Flags _momentum_start(void *data, void *event_info);
+       static Evas_Event_Flags _momentum_abort(void *data, void *event_info);
+
+       static Evas_Event_Flags _zoom_end(void *data, void *event_info);
+       static Evas_Event_Flags _zoom_move(void *data, void *event_info);
+       static Evas_Event_Flags _zoom_start(void *data, void *event_info);
+       static Evas_Event_Flags _zoom_abort(void *data, void *event_info);
+
+       static Evas_Event_Flags _dbl_click_start(void *data , void *event_info);
+       static Evas_Event_Flags _dbl_click_end(void *data , void *event_info);
+       static Evas_Event_Flags _dbl_click_abort(void *data , void *event_info);
+
+       static bool _on_anim(double value, void *pData) {
+               CScroller *thiz = static_cast<CScroller *>(pData);
+
+               return thiz->OnAnimation(value);
+       };
+
+       static void _on_ani_zoom(double value, void *pData) {
+               CScroller *thiz = static_cast<CScroller *>(pData);
+
+               thiz->OnAnimationZoom(value);
+       };
+
+       static void _on_ani_panX(double value, void *pData) {
+               CScroller *thiz = static_cast<CScroller *>(pData);
+
+               thiz->OnAnimationPanX(value);
+       };
+
+
+       static void _on_ani_panY(double value, void *pData) {
+               CScroller *thiz = static_cast<CScroller *>(pData);
+
+               thiz->OnAnimationPanY(value);
+       };
+
+       void CalcJob();
+
+       bool OnAnimationZoom(double value);
+       bool OnAnimationPanX(double value);
+       bool OnAnimationPanY(double value);
+
+       bool OnAnimation(double value);
+
+       void move(int x, int y);
+       void resize(int w, int h);
+       void show();
+       void hide();
+       void draw();
+       void del();
+
+       CRect GetAutoFitGeometry();
+       double GetAutoFitZoom();
+
+// Mouse events
+       void zoom_start(const CPoint &center, double zoom);
+       void zoom_move(const CPoint &center, double zoom);
+       void zoom_end(const CPoint &center, double zoom);
+       void zoom_abort(const CPoint &center, double zoom);
+
+       void momentum_start(const CPoint &from, const CPoint &to, const CSize &momentum);
+       void momentum_move(const CPoint &from, const CPoint &to, const CSize &momentum);
+       void momentum_end(const CPoint &from, const CPoint &to, const CSize &momentum);
+       void momentum_abort(const CPoint &from, const CPoint &to, const CSize &momentum);
+
+       void double_click(const CPoint &center);
+
+       bool NeedResize();
+
+       void UpdateClient();
+
+public:
+       void DoAutoFit();
+       void DoAnim();
+
+       void Test1() {
+               Zoom(CPoint(360,540), 3.6f);
+       };
+
+
+private:
+       Evas_Object *m_edje;
+
+       Evas_Object *m_clipper;
+
+       Evas_Object *m_gesture;         // Gesture detect
+       Evas_Object *m_event;
+
+// Client related
+       CScrollerClient *m_client;
+       string m_name;
+
+private:
+       CPoint  m_origin;               // LCD coordinate.
+       CSize   m_extent;
+
+private:       // Mouse related
+       double m_zoom;
+       CPoint m_prev;  // Previous point for mouse move
+       double m_prevzoom;
+       int m_nFinger;  // Count of touched finger;
+       double m_prevfzoom;
+
+// Animation class
+private:
+       CAnimator *m_ani;
+
+       ECoreAnimator *m_ani_zoom;
+       ECoreAnimator *m_ani_accel;
+
+private:
+       double m_zoom_autofit;
+       CRect m_rect_autofit;
+
+// Status
+private:
+       bool m_freeze;
+       bool m_resized;
+
+       Ecore_Job *m_calcjob;
+
+};
+
diff --git a/widget/src/image/ivug-image-photocam.cpp b/widget/src/image/ivug-image-photocam.cpp
new file mode 100755 (executable)
index 0000000..f2331c0
--- /dev/null
@@ -0,0 +1,487 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-image.h"
+#include "Scroller.h"
+#include "errno.h"
+
+#include "debug.h"
+\r
+\r
+static Evas_Object *_crop_image(const char *file, int /* image coord */crop_x, int crop_y, int crop_w, int crop_h, int final_w, int final_h)\r
+{\r
+// TODO : Should implement no-region image cropping (bmp or gif )\r
+       MSG_HIGH("Crop image XYWH(%d,%d,%d,%d) Dimension(%d,%d)", crop_x, crop_y, crop_w, crop_h, final_w, final_h);\r
+\r
+// 1. Load source image into buffer canvas.\r
+       Ecore_Evas *m_ee;\r
+       m_ee = ecore_evas_buffer_new(final_w, final_h);\r
+       MSG_ASSERT(m_ee != NULL);\r
+\r
+       Evas *evas = ecore_evas_get(m_ee);\r
+\r
+       Evas_Object *img;\r
+\r
+       img = evas_object_image_filled_add(evas);\r
+\r
+       evas_object_image_file_set(img, file, NULL);\r
+\r
+       Evas_Load_Error err = evas_object_image_load_error_get(img);\r
+       if (err != EVAS_LOAD_ERROR_NONE)\r
+       {\r
+               MSG_ERROR("could not load image '%s'. error string is \"%s\"", file, evas_load_error_str(err));\r
+               return NULL;\r
+       }\r
+\r
+       Eina_Bool bRegion = evas_object_image_region_support_get(img);\r
+\r
+       evas_object_image_file_set(img, NULL, NULL);\r
+\r
+       if ( bRegion == EINA_TRUE)\r
+       {\r
+               MSG_HIGH("Region supported");\r
+               evas_object_image_load_orientation_set(img, EINA_TRUE);\r
+               evas_object_image_load_region_set(img, crop_x, crop_y, crop_w, crop_h);\r
+\r
+               evas_object_image_file_set(img, file, NULL);\r
+\r
+               Evas_Load_Error err = evas_object_image_load_error_get(img);\r
+               if (err != EVAS_LOAD_ERROR_NONE)\r
+               {\r
+                       MSG_ERROR("could not load image '%s'. error string is \"%s\"", file, evas_load_error_str(err));\r
+                       return NULL;\r
+               }\r
+       }\r
+       else\r
+       {\r
+               MSG_HIGH("Region not supported.");\r
+\r
+// Load full image\r
+               Evas_Object *src;\r
+\r
+               src = evas_object_image_add(evas);\r
+\r
+               evas_object_image_file_set(src, file, NULL);\r
+\r
+               Evas_Load_Error err = evas_object_image_load_error_get(src);\r
+               if (err != EVAS_LOAD_ERROR_NONE)\r
+               {\r
+                       MSG_ERROR("could not load image '%s'. error string is \"%s\"", file, evas_load_error_str(err));\r
+                       return NULL;\r
+               }\r
+\r
+               int w,h;\r
+               evas_object_image_size_get(src, &w, &h);\r
+\r
+               MSG_HIGH("Image WH(%d,%d)", w, h);\r
+\r
+// Setup cropped buffer\r
+               evas_object_image_size_set(img, crop_w, crop_h);\r
+               evas_object_image_fill_set(img, 0, 0, crop_w, crop_h);\r
+\r
+// Copy image from src to img.\r
+               int *Src = (int *)evas_object_image_data_get(src, EINA_FALSE);          // ImgBuffer's size is same as original image\r
+               MSG_ASSERT(Src != NULL);\r
+\r
+               int *Dest = (int *)evas_object_image_data_get(img, EINA_TRUE);\r
+               MSG_ASSERT(Dest != NULL);\r
+\r
+               int *Tmp = Dest;\r
+\r
+               int ImgW = w;\r
+               int *pRow = Src + (crop_y * ImgW /* stride */ + crop_x) ;               // Src begin buffer\r
+\r
+               int nRow = crop_h;\r
+               int nCol = crop_w;\r
+\r
+               MSG_HIGH("Crop(%d,%d,%d,%d) Stride=%d nRow=%d nCol=%d", crop_x, crop_y, crop_w, crop_h, ImgW, nRow, nCol);\r
+\r
+               while(nRow--)\r
+               {\r
+                       while(nCol--)\r
+                       {\r
+                               // ELM_MSG_HIGH("nRow=%d, nCol=%d, Src=0x%08x Dst=0x%08x", nRow, nCol,  pRow , Dest);\r
+                               *Tmp++ = *pRow++;\r
+                       }\r
+\r
+                       nCol = crop_w;\r
+                       pRow = pRow + (ImgW - crop_w /* stride */ );\r
+               }\r
+               evas_object_image_data_set(src, (void *)Src);   // Unref\r
+               evas_object_del(src);\r
+\r
+               evas_object_image_data_set(img, (void *)Dest);\r
+       }\r
+\r
+       int cw, ch;\r
+\r
+       cw = crop_w;\r
+       ch = crop_h;\r
+\r
+       int ph, pw;\r
+       int px, py;\r
+\r
+// Auto fit. why???????. Used when set wallpaper(image size is smaller than LCD)\r
+       ph = (ch * final_w) / cw;\r
+\r
+       if (ph > final_h)\r
+       {\r
+               pw = (cw * final_h) / ch;\r
+               ph = final_h;\r
+       }\r
+       else\r
+       {\r
+               pw = final_w;\r
+       }\r
+\r
+// Calculate XY\r
+       px = (final_w - pw ) / 2;\r
+       py = (final_h - ph ) / 2;\r
+\r
+       MSG_HIGH("CenterPut XYWH(%d,%d,%d,%d) in Buf(%d,%d)", px, py, pw, ph, final_w, final_h);\r
+\r
+       evas_object_move(img, px, py);\r
+       evas_object_resize(img, pw, ph); // set object size which you want to scale\r
+\r
+       evas_object_show(img);\r
+\r
+//     evas_object_image_save(img, "/opt/ug/data/ug-image-viewer-efl/tt.jpg", NULL, NULL);\r
+\r
+//  Copy Buffer canvas data to image object in current evas\r
+       const void *data = ecore_evas_buffer_pixels_get(m_ee);\r
+       MSG_ASSERT(data != NULL);\r
+\r
+       Evas_Object *result;\r
+       result = evas_object_image_filled_add(evas);\r
+\r
+       evas_object_image_size_set(result, final_w, final_h);\r
+       evas_object_image_data_set(result, const_cast<void *>(data));\r
+       evas_object_image_data_update_add(result, 0, 0, final_w, final_h);\r
+\r
+       MSG_HIGH("Cropped image is created. obj=0x%08x", result);\r
+       return result;\r
+};\r
+\r
+\r
+\r
+// APIs
+EAPI Evas_Object *ivug_image_create(Evas_Object *parent)
+{
+       Evas_Object *obj;
+
+       obj = elm_photocam_add(parent);
+
+       elm_photocam_paused_set(obj, EINA_TRUE);
+       elm_photocam_zoom_mode_set(obj, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
+
+       MSG_HIGH("Create photocam object. obj=0x%08x", obj);
+       return obj;
+}
+
+EAPI Evas_Load_Error ivug_image_file_set(Evas_Object *obj, const char *file, const char *key)
+{
+       Evas_Load_Error err = EVAS_LOAD_ERROR_NONE;
+
+       err = elm_photocam_file_set(obj, file);
+
+       MSG_HIGH("photocam file set. %s error=%d", file, err);
+
+       if ( err != EVAS_LOAD_ERROR_NONE)
+       {
+               MSG_ERROR("Photocam file set error! err=%d", err);
+       }
+
+       return err;
+}
+
+EAPI Evas_Load_Error ivug_image_mem_set(Evas_Object *obj, const unsigned char *buffer, unsigned int size, const char *key)
+{
+       MSG_ERROR("%s is not supported", __func__);
+
+       return EVAS_LOAD_ERROR_GENERIC;
+}
+
+
+EAPI Evas_Load_Error ivug_image_unset(Evas_Object *obj)
+{
+       Evas_Load_Error err = EVAS_LOAD_ERROR_NONE;
+
+       MSG_HIGH("photocam file unset. %s", elm_photocam_file_get(obj));
+
+       err = elm_photocam_file_set(obj, NULL);
+       return err;
+}
+
+EAPI void ivug_image_zoom_set(Evas_Object *obj, double zoom, Evas_Point *pCenter)
+{
+       //elm_photocam_paused_set(obj, EINA_FALSE); //stop photocam animation
+       elm_photocam_zoom_mode_set(obj, ELM_PHOTOCAM_ZOOM_MODE_MANUAL);
+       elm_photocam_zoom_set(obj, zoom);
+}
+
+EAPI double ivug_image_zoom_get(const Evas_Object *obj)
+{
+
+       return elm_photocam_zoom_get(obj);
+}
+
+EAPI void ivug_image_image_size_get(const Evas_Object *obj, int *w, int *h)
+{
+// Return original image size
+       elm_photocam_image_size_get(obj, w, h);
+
+       MSG_HIGH("Image size XYWH(%d,%d)", *w, *h);
+
+}
+
+EAPI void ivug_image_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h)
+{
+       Evas_Object *image;
+
+       image = elm_photocam_internal_image_get(obj);
+
+       if ( image == NULL )
+       {
+               if(x) *x = 0;
+               if(y) *y = 0;
+               if(w) *w = 0;
+               if(h) *h = 0;
+
+               return;
+       }
+
+       evas_object_geometry_get(image, x ,y, w, h);
+//     elm_photocam_image_region_get(obj, x ,y, w, h);
+
+       MSG_HIGH("Region size XYWH(%d,%d,%d,%d)", *x, *y, *w, *h);
+}
+
+EAPI void ivug_image_decoded_size_get(const Evas_Object *obj, int *w, int *h)
+{
+       Evas_Object *image = NULL;
+
+       image = elm_photocam_internal_image_get(obj);
+
+       if ( image == NULL )
+       {
+               if(w) *w = 0;
+               if(h) *h = 0;
+
+               return;
+       }
+
+       int iw, ih;
+
+       elm_photocam_image_size_get(obj, &iw, &ih);
+
+       int scale = evas_object_image_load_scale_down_get(obj);
+
+       if(w) *w = iw / scale;
+       if(h) *h = ih / scale;
+};
+
+
+EAPI unsigned char *ivug_image_decoded_buffer_get(const Evas_Object *obj)
+{
+       Evas_Object *image = NULL;
+
+       image = elm_photocam_internal_image_get(obj);
+
+       if ( image == NULL )
+       {
+               return NULL;
+       }
+
+       return (unsigned char *)evas_object_image_data_get(image, EINA_FALSE /* Get for reading Only*/ );
+}
+
+EAPI void ivug_image_hold_set(const Evas_Object *obj, Eina_Bool hold)
+{
+       MSG_ERROR("%s is not supported", __func__);
+}
+
+EAPI void ivug_image_zoom_reset(Evas_Object *obj, Evas_Point *pCenter)
+{
+       Eina_Bool bPaused = elm_photocam_paused_get(obj);
+
+       elm_photocam_paused_set(obj, EINA_TRUE);
+       elm_photocam_zoom_mode_set(obj, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
+       elm_photocam_paused_set(obj, bPaused);
+
+}
+
+EAPI Evas_Object *ivug_image_region_image_get(Evas_Object *obj, int /* LCD coord */ x, int y, int w, int h )\r
+{
+       MSG_HIGH("Region (%d,%d,%d,%d)", x, y, w, h);\r
+\r
+       Evas_Object *image;\r
+\r
+       image = elm_photocam_internal_image_get(obj);\r
+\r
+       int ix, iy, iw, ih;\r
+\r
+       evas_object_geometry_get(image, &ix, &iy, &iw, &ih);\r
+\r
+       MSG_HIGH("Image geometry get : (%d,%d,%d,%d)", ix, iy, iw, ih);\r
+\r
+       int ow, oh;\r
+       evas_object_image_size_get(image, &ow, &oh);\r
+\r
+       ow = ow * evas_object_image_load_scale_down_get(image);\r
+       oh = oh * evas_object_image_load_scale_down_get(image);\r
+\r
+       MSG_HIGH("Original image size(%d,%d)", ow, oh);\r
+\r
+       int cx, cy, cw, ch;\r
+\r
+// Get intersect rect between xywh and ixywh\r
+       cx = ix;\r
+       if ( x > ix ) cx = x;\r
+\r
+       cy = iy;\r
+       if ( y > iy ) cy = y;\r
+\r
+       cw = w;\r
+       if ( x + w > ix + iw ) cw = iw;\r
+\r
+       ch = h;\r
+       if ( y + h > iy + ih ) ch = ih;\r
+\r
+       MSG_HIGH("Cropped XWYH(%d,%d,%d,%d)", cx, cy, cw, ch);\r
+\r
+// Get rect on image.\r
+       int gx, gy, gw, gh;\r
+\r
+       gx = ( cx - ix ) * (double)ow/iw;;\r
+       gy = ( cy - iy ) * (double)ow/iw;\r
+\r
+       gw = cw * (double)ow/iw;\r
+       gh = ch * (double)oh/ih;\r
+\r
+       MSG_HIGH("On image rect : (%d,%d,%d,%d) Scale=%d", gx, gy, gw, gh, evas_object_image_load_scale_down_get(image));\r
+\r
+       const char *file = NULL;\r
+       const char *key = NULL;\r
+\r
+       evas_object_image_file_get(image, &file, &key);\r
+\r
+       if ( file == NULL )\r
+       {\r
+               MSG_ERROR("File is not loaded");\r
+               return NULL;\r
+       }\r
+\r
+       MSG_HIGH("File = %s %s", file, key );\r
+\r
+       MSG_HIGH("Image size get : (%d,%d)", ow, oh);\r
+\r
+       Evas_Object *result = _crop_image(file, gx, gy, gw, gh, w, h);\r
+\r
+       return result;\r
+}
+
+
+EAPI Evas_Object *
+ivug_image_internal_image_get(Evas_Object *obj)
+{
+       return elm_photocam_internal_image_get(obj);
+}
+
+
+EAPI void ivug_image_animated_set(const Evas_Object *obj, Eina_Bool bAnimation)
+{
+       MSG_ERROR("%s is not supported", __func__);
+}
+
+EAPI void ivug_image_rotate_set(Evas_Object *obj, int degree)
+{
+       MSG_ERROR("%s is not supported", __func__);
+}
+
+EAPI int ivug_image_rotate_get(Evas_Object *obj)
+{
+       MSG_ERROR("%s is not supported", __func__);
+
+       return 0;
+}
+
+EAPI void ivug_image_coordinate_lcd_to_image(Evas_Object *photocam, int lcd_x, int lcd_y, int *img_x, int *img_y)
+{
+       MSG_ASSERT(photocam != NULL);
+
+       int image_w, image_h;
+
+       ivug_image_image_size_get(photocam, &image_w, &image_h);        // Get original image size.
+
+       MSG_UTIL_HIGH("size w=%d, h=%d", image_w, image_h);
+
+       ivug_ret_if(image_w <= 0 || image_h <= 0);
+
+       int gx, gy, gw, gh;
+
+       ivug_image_region_get(photocam,  &gx, &gy, &gw, &gh);
+
+       MSG_UTIL_HIGH("region x=%d, y=%d, w=%d, h=%d", gx, gy, gw, gh);
+
+       int image_x, image_y;
+
+       image_x = lcd_x - gx;
+       image_y = lcd_y - gy;
+
+       image_x = image_x*image_w/gw;
+       image_y = image_y*image_h/gh;
+
+       MSG_UTIL_HIGH("changed x=%d, y=%d", image_x, image_y);
+
+       *img_x = image_x;
+       *img_y = image_y;
+}
+
+EAPI void ivug_image_coordinate_image_to_lcd(Evas_Object *photocam, int img_x, int img_y, int *lcd_x, int *lcd_y)
+{
+       MSG_ASSERT(photocam != NULL);
+
+       int image_w, image_h;
+
+       ivug_ret_if(photocam == NULL);
+
+       ivug_image_image_size_get(photocam, &image_w, &image_h);        // Get original image size.
+
+       MSG_UTIL_HIGH("size w=%d, h=%d", image_w, image_h);
+
+       ivug_ret_if(image_w <= 0 || image_h <= 0);
+
+       int gx, gy, gw, gh;
+
+       ivug_image_region_get(photocam,  &gx, &gy, &gw, &gh);
+
+       MSG_UTIL_HIGH("region x=%d, y=%d, w=%d, h=%d", gx, gy, gw, gh);
+
+       int scr_x, scr_y;
+
+       scr_x = img_x*gw/image_w;
+       scr_y = img_y*gh/image_h;
+
+       scr_x = scr_x+gx;
+       scr_y = scr_y+gy;
+
+       MSG_UTIL_HIGH("changed x=%d, y=%d", scr_x, scr_y);
+
+       *lcd_x = scr_x;
+       *lcd_y = scr_y;
+}
+
+
diff --git a/widget/src/scissorbox/ScissorBox.cpp b/widget/src/scissorbox/ScissorBox.cpp
new file mode 100755 (executable)
index 0000000..6472842
--- /dev/null
@@ -0,0 +1,1727 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *       http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ScissorBox.h"
+
+#undef LOG_LVL
+#define LOG_LVL DBG_MSG_LVL_HIGH
+
+#undef LOG_CAT
+#define LOG_CAT "IV-SCISSOR"
+
+#define IMAGE_PATH PREFIX"/res/images/"PACKAGE
+
+#define CROP_POT_PATH                  IMAGE_PATH"/scissorbox/T01_CallerID_normal.png"
+#define CROP_POT_HOLD_PATH             IMAGE_PATH"/scissorbox/T01_CallerID_hold.png"
+#define CROP_POT_PRESS_PATH    IMAGE_PATH"/scissorbox/T01_CallerID_press.png"
+
+#define CROP_LINEW_PATH                IMAGE_PATH"/scissorbox/T01_CallerID_line_W.png"
+#define CROP_LINEH_PATH                IMAGE_PATH"/scissorbox/T01_CallerID_line_h.png"
+#define CROP_LINEW_PRESS_PATH  IMAGE_PATH"/scissorbox/T01_CallerID_line_W_press.png"
+#define CROP_LINEH_PRESS_PATH  IMAGE_PATH"/scissorbox/T01_CallerID_line_h_press.png"
+
+#define DEFAULT_POT_NUM (4)
+#define DEFAULT_DIM_BG_ALPHA   (102)
+
+#undef ALLOW_RECT_TRACE
+
+class CSelectBox {
+public:
+       enum eState {
+               NORMAL,
+               HOLD,
+               PRESS,
+       };
+
+       enum eGripType {
+               GRIP_LEFT               = (1 << 0),
+               GRIP_RIGHT              = (1 << 1),
+               GRIP_TOP                = (1 << 2),
+               GRIP_BOTTOM     = (1 << 3),
+       };
+
+public:
+       CSelectBox() : m_state(NORMAL), m_ratio(0.0f), m_bPreserve(false), m_rect(), m_bound(0,0,720,1280)
+       {
+       };
+
+       virtual ~CSelectBox() {};
+
+       virtual void Create(Evas_Object *obj) {};
+
+       virtual void Move(int x, int y) {
+               m_rect.Left(x);
+               m_rect.Top(y);
+       };
+
+       virtual void Resize(int w, int h){
+               MSG_HIGH("Box resized %dx%d ratio=%f", w, h, m_ratio);
+
+               m_rect.Width(w);
+
+               if ( m_bPreserve == true )
+               {
+                       m_rect.Height(w * m_ratio);
+               }
+               else
+               {
+                       m_rect.Height(h);
+               }
+       };
+
+       virtual void SetState(eState state) {
+               m_state = state;
+       };
+
+       virtual eState GetState() const {
+               return m_state;
+       };
+
+       virtual void SetRatio(double ratio) {
+               m_bPreserve = true;
+
+               m_ratio = ratio;                // h / w
+       };
+
+       virtual double GetRatio() const {
+               if ( m_bPreserve == true )
+                       return m_ratio;
+
+               return 0.0f;
+       };
+
+       virtual void SetBound(const CRect &rect)
+       {
+               m_bound = rect;
+       }
+
+       virtual const CRect &GetBound() const { return m_bound; };
+       virtual const CRect &GetRegion() const { return m_rect; };
+
+       virtual void Draw() = 0;
+private:
+       eState m_state;
+       double m_ratio;
+       bool m_bPreserve;
+
+protected:
+       CRect m_rect;
+       CRect m_bound;
+};
+
+
+class CBox : public CSelectBox {
+public:
+       const int SHADOW_DEPTH;
+       const int EVENT_GRIP_SIZE;
+       const CSize POT_SIZE;
+
+       static void _line_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info) {};
+       static void _line_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info)     {};
+
+       static void _pot_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info) {
+               CBox *pBox = (CBox *)data;
+
+//             Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down *) event_info;
+
+               pBox->OnGripMouseDown();
+       };
+       static void _pot_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info)
+       {
+               CBox *pBox = (CBox *)data;
+
+               Evas_Event_Mouse_Move *ev = (Evas_Event_Mouse_Move *) event_info;
+
+               eGripType grip = static_cast<eGripType> (reinterpret_cast<int>\r(evas_object_data_get(obj, "grip_type")));
+
+               if ( ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD )
+               {
+                       MSG_HIGH("On Hold");
+               }
+
+               if ( ev->event_flags & EVAS_EVENT_FLAG_ON_SCROLL )
+               {
+                       MSG_HIGH("On Scroller");
+               }
+
+               pBox->OnGripMouseMove(grip, ev->prev.output.x, ev->prev.output.y, ev->cur.output.x, ev->cur.output.y);
+       };
+
+       static void _pot_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info) {
+               CBox *pBox = (CBox *)data;
+
+//             Evas_Event_Mouse_Up *ev = (Evas_Event_Mouse_Up *) event_info;
+
+               pBox->OnGripMouseUp();
+       };
+
+
+       static void _selector_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info) {
+               CBox *pBox = (CBox *)data;
+
+               Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down *) event_info;
+
+               pBox->OnMouseDown(ev->output.x, ev->output.y);
+
+       };
+
+       static void _selector_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info)       {
+               CBox *pBox = (CBox *)data;
+
+               Evas_Event_Mouse_Move *ev = (Evas_Event_Mouse_Move *) event_info;
+
+               MSG_LOW("(%d,%d) --> (%d,%d)", ev->cur.output.x, ev->cur.output.y, ev->prev.output.x, ev->prev.output.y);
+               pBox->OnMouseMove(ev->prev.output.x, ev->prev.output.y, ev->cur.output.x, ev->cur.output.y);
+       };
+
+       static void _selector_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info) {
+               CBox *pBox = (CBox *)data;
+
+               Evas_Event_Mouse_Up *ev = (Evas_Event_Mouse_Up *) event_info;
+
+               pBox->OnMouseUp(ev->output.x, ev->output.y);
+       };
+
+public:
+       CBox() : CSelectBox(), SHADOW_DEPTH(4), EVENT_GRIP_SIZE(60), POT_SIZE(18,18), m_bMouseDown(false), m_bGripMouseDown(false) { };
+
+       virtual ~CBox() {
+               MSG_HIGH("Remove CBox");
+
+               for (int i = 0; i < DEFAULT_POT_NUM; i++)
+               {
+                       evas_object_del(selector_line[i]);
+                       evas_object_del(selector_pot[i]);
+                       evas_object_del(event_pot[i]);
+               }
+
+               evas_object_del(center);
+       };
+
+       void OnMouseDown(int x, int y)
+       {
+               MSG_HIGH("Mouse down XY(%d,%d)", x, y);
+
+               SetState(PRESS);
+               m_bMouseDown = true;
+       }
+
+       void OnMouseMove(int px, int py, int cx, int cy)
+       {
+               // Inform changes to parent.
+               if ( m_bMouseDown == false ) return;
+
+               int dx, dy;
+
+               dx = cx - px;
+               dy = cy - py;
+
+               MSG_HIGH("Mouse move XY(%d,%d) -> XY(%d,%d)", px, py, cx, cy);
+
+               if ( dx == 0 && dy == 0) {
+                       return;
+               };
+
+               if ( m_rect.Left() + dx < m_bound.Left() )
+               {
+                       MSG_HIGH("Left bound");
+                       dx = m_bound.Left() - m_rect.Left();
+               }
+
+               if ( m_rect.Right() + dx > m_bound.Right() )
+               {
+                       MSG_HIGH("Right bound");
+                       dx = m_bound.Right() - m_rect.Right();
+               }
+
+               if ( m_rect.Top() + dy < m_bound.Top() )
+               {
+                       MSG_HIGH("Top bound");
+                       dy = m_bound.Top() - m_rect.Top();
+               }
+
+               if ( m_rect.Bottom() + dy > m_bound.Bottom() )
+               {
+                       MSG_HIGH("Bottom bound");
+                       dy = m_bound.Bottom() - m_rect.Bottom();
+               }
+
+               // Move rect
+               m_rect.MoveBy(dx, dy);
+
+               evas_object_smart_changed(evas_object_smart_parent_get(center));
+
+       }
+
+       void OnMouseUp(int x, int y)
+       {
+               MSG_HIGH("Mouse up XY(%d,%d)", x, y);
+               SetState(NORMAL);
+
+               m_bMouseDown = false;
+//             evas_object_smart_callback_call(sd->obj, SIG_CHANGED, NULL);
+       }
+
+       void OnGripMouseUp()
+       {
+               m_bGripMouseDown = false;
+               SetState(NORMAL);
+       }
+
+       void OnGripMouseDown()
+       {
+               m_bGripMouseDown = true;
+               SetState(HOLD);
+       }
+
+       void OnGripMouseMove(eGripType grip, int px, int py, int cx, int cy)
+       {
+               if ( m_bGripMouseDown == false ) return;
+
+               int dx = cx - px;
+               int dy = cy - py;
+
+               if ( dx == 0 && dy == 0) {
+                       return;
+               };
+
+               if ( GetRatio() != 0.0f )
+               {
+                       _GripMovePreserve(grip, dx, dy);
+               }
+               else
+               {
+                       _GripMove(grip, dx, dy);
+               }
+
+               MSG_HIGH("New Rect %d,%d,%d,%d", m_rect.Left(), m_rect.Top(), m_rect.Width(), m_rect.Height());
+
+               evas_object_smart_changed(evas_object_smart_parent_get(center));
+       }
+
+       virtual void SetState(eState state) {
+               CSelectBox::SetState(state);
+
+               _LoadImage();
+       };
+
+private:
+       void _GripMove(eGripType grip, int dx, int dy) {
+               const int min_size = EVENT_GRIP_SIZE;
+               CRect rect = m_rect;
+
+               int X1 = rect.Left(), Y1 = rect.Top() ,X2 = rect.Right(), Y2 = rect.Bottom();
+
+               if ( grip & GRIP_LEFT )
+               {
+                       X1 = rect.Left() + dx;
+
+                       if ( X1 < m_bound.Left() )
+                       {
+                               MSG_HIGH("Left bound");
+                               X1 = m_bound.Left();
+                       }
+
+                       if ( rect.Width() - dx < min_size )
+                       {
+                               X1 = rect.Right() - min_size;
+
+                               MSG_HIGH("X1 = %d (%d,%d)", X1, rect.Left(), rect.Right());
+                       }
+               }
+
+               if ( grip & GRIP_TOP )
+               {
+                       Y1 = rect.Top() + dy;
+
+                       if ( Y1 < m_bound.Top() )
+                       {
+                               MSG_HIGH("Top bound");
+                               Y1 = m_bound.Top();
+                       }
+
+                       if ( rect.Height() - dy < min_size )
+                       {
+                               Y1 = rect.Bottom() - min_size;
+
+                               MSG_HIGH("Y1 = %d B=%d", Y1, rect.Bottom());
+                       }
+               }
+
+               if ( grip & GRIP_RIGHT )
+               {
+                       X2 = rect.Right() + dx;
+
+                       if ( X2 > m_bound.Right() )
+                       {
+                               MSG_HIGH("Right bound");
+                               X2 = m_bound.Right() ;
+                       }
+
+                       if ( rect.Width() + dx < min_size )
+                       {
+                               X2 = rect.Left() + min_size;
+                       }
+               }
+
+               if ( grip & GRIP_BOTTOM )
+               {
+                       Y2 = rect.Bottom() + dy;
+
+                       if ( Y2 > m_bound.Bottom() )
+                       {
+                               MSG_HIGH("Bottom bound");
+                               Y2 = m_bound.Bottom();
+                       }
+
+                       if ( rect.Height() + dy < min_size )
+                       {
+                               Y2 = rect.Top() + min_size;
+                       }
+               }
+
+               m_rect = CRect(X1, Y1, X2 - X1, Y2 - Y1);
+
+       };
+
+       void _GripMovePreserve(eGripType grip, int dx, int dy) {
+               const int min_size = EVENT_GRIP_SIZE;
+               CRect rect = m_rect;
+
+               int X,Y,W,H;
+
+               double ratio = GetRatio();
+
+               MSG_HIGH("Dx=%d Dy=%d Ratio=%f", dx, dy, ratio);
+
+               enum eDominantDirection
+               {
+                       Direction_X,
+                       Direction_Y
+               } ;
+
+               eDominantDirection dir = Direction_X;
+               int mov_dist;
+               if(abs(dx) < abs(dy))
+               {
+                       dir = Direction_Y;
+                       mov_dist = dy;
+               }
+               else
+               {
+                       mov_dist = dx;
+               }
+
+               if ( (grip & GRIP_LEFT) && (grip & GRIP_TOP)  )
+               {
+                       MSG_HIGH("LEFT,TOP");
+
+                       if ( dir == Direction_X )
+                       {
+                               W = rect.Width() - mov_dist;
+                               H = W * ratio;
+
+                               X = m_rect.Right() - W;
+                               Y = m_rect.Bottom() - H;
+                       }
+                       else
+                       {
+                               H = rect.Height() - mov_dist;
+                               W = H / ratio;
+
+                               X = m_rect.Right() - W;
+                               Y = m_rect.Bottom() - H;
+                       }
+
+
+               }
+
+               if ( (grip & GRIP_RIGHT) && (grip & GRIP_TOP)  )
+               {
+                       MSG_HIGH("RIGHT,TOP");
+
+                       if ( dir == Direction_X )
+                       {
+                               W = rect.Width() + mov_dist;
+                               H = W * ratio;
+
+                               X = m_rect.Left();
+                               Y = m_rect.Bottom() - H;
+                       }
+                       else
+                       {
+                               H = rect.Height() - mov_dist;
+                               W = H / ratio;
+
+                               X = m_rect.Left();
+                               Y = m_rect.Bottom() - H;
+                       }
+
+               }
+
+               if ( (grip & GRIP_RIGHT) && (grip & GRIP_BOTTOM)  )
+               {
+                       MSG_HIGH("RIGHT,BOTTOM");
+                       if ( dir == Direction_X )
+                       {
+                               W = rect.Width() + mov_dist;
+                               H = W * ratio;
+
+                               X = m_rect.Left();
+                               Y = m_rect.Top();
+                       }
+                       else
+                       {
+                               H = rect.Height() + mov_dist;
+                               W = H / ratio;
+
+                               X = m_rect.Left();
+                               Y = m_rect.Top();
+
+                       }
+
+               }
+
+               if ( (grip & GRIP_LEFT) && (grip & GRIP_BOTTOM)  )
+               {
+                       MSG_HIGH("LEFT,BOTTOM");
+
+                       if ( dir == Direction_X )
+                       {
+                               W = rect.Width() - mov_dist;
+                               H = W * ratio;
+
+                               X = m_rect.Right() - W;
+                               Y = m_rect.Top();
+                       }
+                       else
+                       {
+                               H = rect.Height() + mov_dist;
+                               W = H / ratio;
+
+                               X = m_rect.Right() - W;
+                               Y = m_rect.Top();
+                       }
+
+               }
+
+               if ( W < min_size || H < min_size)
+               {
+                       return;
+               }
+
+               if ( X < m_bound.Left() ||  Y < m_bound.Top() ||
+                       X\r+ W > m_bound.Right() || Y+H > m_bound.Bottom() )
+               {
+                       return;
+               }
+
+               m_rect = CRect(X,Y,W,H);
+
+       }
+
+       void _LoadImage() {
+               const char *line_w;
+               const char *line_h;
+               const char *pot;
+
+               if ( GetState() == NORMAL )
+               {
+                       line_w = CROP_LINEW_PATH;
+                       line_h = CROP_LINEH_PATH;
+
+                       pot = CROP_POT_PATH;
+               }
+               else if ( GetState() == PRESS )
+               {
+                       line_w = CROP_LINEW_PRESS_PATH;
+                       line_h = CROP_LINEH_PRESS_PATH;
+
+                       pot = CROP_POT_PRESS_PATH;
+               }
+               else if ( GetState() == HOLD )
+               {
+                       line_w = CROP_LINEW_PATH;
+                       line_h = CROP_LINEH_PATH;
+
+                       pot = CROP_POT_HOLD_PATH;
+               }
+               else
+               {
+                       MSG_FATAL("Invalid state");
+                       return;
+               }
+
+               Evas_Load_Error err;
+
+               for (int i = 0; i < DEFAULT_POT_NUM; i++)
+               {
+                       if(i % 2)       // 1, 3
+                       {
+                               evas_object_image_file_set(selector_line[i], line_w, NULL);
+                               err = evas_object_image_load_error_get(selector_line[i]);
+                               if (err != EVAS_LOAD_ERROR_NONE)
+                               {
+                                       MSG_ERROR("could not load image '%s'. %s",  line_w, evas_load_error_str(err));
+                               }
+                       }
+                       else            // 0, 2
+                       {
+                               evas_object_image_file_set(selector_line[i], line_h, NULL);
+                               err = evas_object_image_load_error_get(selector_line[i]);
+                               if (err != EVAS_LOAD_ERROR_NONE)
+                               {
+                                       MSG_ERROR("could not load image '%s'. %s",  line_h, evas_load_error_str(err));
+                               }
+                       }
+
+                       evas_object_show(selector_line[i]);
+
+               }
+
+               for (int i = 0; i < DEFAULT_POT_NUM; i++)
+               {
+                       evas_object_image_file_set(selector_pot[i], pot, NULL);
+
+                       err = evas_object_image_load_error_get(selector_line[i]);
+                       if (err != EVAS_LOAD_ERROR_NONE)
+                       {
+                               MSG_ERROR("could not load image '%s'. %s",      pot, evas_load_error_str(err));
+                       }
+
+                       evas_object_image_scale_hint_set(selector_pot[i], EVAS_IMAGE_SCALE_HINT_STATIC);
+
+                       evas_object_show(selector_pot[i]);
+               }
+       };
+
+public:
+
+       void Create(Evas_Object *obj) {
+               Evas *e = evas_object_evas_get(obj);
+
+               center = evas_object_rectangle_add(e);
+               evas_object_color_set(center, 0, 0, 0, 0);
+
+               evas_object_event_callback_add(center, EVAS_CALLBACK_MOUSE_DOWN, _selector_mouse_down, this);
+               evas_object_event_callback_add(center, EVAS_CALLBACK_MOUSE_UP, _selector_mouse_up, this);
+               evas_object_event_callback_add(center, EVAS_CALLBACK_MOUSE_MOVE, _selector_mouse_move, this);
+
+               evas_object_smart_member_add(center, obj);
+
+               evas_object_show(center);
+
+               for (int i = 0; i < DEFAULT_POT_NUM; i++)
+               {
+                       selector_line[i] = evas_object_image_filled_add(e);
+
+                       evas_object_event_callback_add(selector_line[i], EVAS_CALLBACK_MOUSE_DOWN, _line_mouse_down, this);
+                       evas_object_event_callback_add(selector_line[i], EVAS_CALLBACK_MOUSE_UP, _line_mouse_up, this);
+
+                       evas_object_smart_member_add(selector_line[i], obj);
+               }
+
+               for (int i = 0; i < DEFAULT_POT_NUM; i++)
+               {
+                       /* Create image icon (pot) */
+                       selector_pot[i] = evas_object_image_filled_add(e);
+
+                       evas_object_image_scale_hint_set(selector_pot[i], EVAS_IMAGE_SCALE_HINT_STATIC);
+
+                       evas_object_smart_member_add(selector_pot[i], obj);
+
+                       /* Create event object above image icon (pot) */
+                       event_pot[i] = evas_object_rectangle_add(e);
+                       evas_object_color_set(event_pot[i], 0, 0, 0, 0);
+
+                       evas_object_event_callback_add(event_pot[i], EVAS_CALLBACK_MOUSE_DOWN, _pot_mouse_down, this);
+                       evas_object_event_callback_add(event_pot[i], EVAS_CALLBACK_MOUSE_UP, _pot_mouse_up, this);
+                       evas_object_event_callback_add(event_pot[i], EVAS_CALLBACK_MOUSE_MOVE, _pot_mouse_move, this);
+
+                       evas_object_resize(event_pot[i], EVENT_GRIP_SIZE, EVENT_GRIP_SIZE);
+
+                       evas_object_smart_member_add(event_pot[i], obj);
+
+                       evas_object_show(event_pot[i]);
+               }
+
+               evas_object_data_set(event_pot[0], "grip_type",(void *)(GRIP_LEFT | GRIP_TOP));
+               evas_object_data_set(event_pot[1], "grip_type",(void *)(GRIP_RIGHT | GRIP_TOP));
+               evas_object_data_set(event_pot[2], "grip_type",(void *)(GRIP_RIGHT | GRIP_BOTTOM));
+               evas_object_data_set(event_pot[3], "grip_type",(void *)(GRIP_LEFT | GRIP_BOTTOM));
+
+               _LoadImage();
+       };
+
+       void Draw() {
+// Check bound.
+               if ( m_bound.Inside(m_rect) == false )
+               {
+                       MSG_ERROR("Out of bound region. Rect(%d,%d,%d,%d) Bound(%d,%d,%d,%d)", m_rect.Left(), m_rect.Top(), m_rect.Width(), m_rect.Height(),
+                               m_bound.Left(), m_bound.Top(), m_bound.Width(), m_bound.Height());
+
+                       // Reset Rect
+               }
+
+               evas_object_move(center, m_rect.Left(), m_rect.Top());
+               evas_object_resize(center, m_rect.Width(), m_rect.Height());
+               // Horizontal
+               evas_object_move(selector_line[0], m_rect.Left(), m_rect.Top());
+               evas_object_resize(selector_line[0], m_rect.Width() , 8);
+
+               evas_object_move(selector_line[2], m_rect.Left(), m_rect.Bottom() - (SHADOW_DEPTH / 2));
+               evas_object_resize(selector_line[2], m_rect.Width() , 8);
+
+               // Vertical
+               evas_object_move(selector_line[1], m_rect.Left(), m_rect.Top());
+               evas_object_resize(selector_line[1], 8, m_rect.Height() );
+
+               evas_object_move(selector_line[3], m_rect.Right() - (SHADOW_DEPTH / 2), m_rect.Top());
+               evas_object_resize(selector_line[3], 8, m_rect.Height());
+
+               evas_object_move(event_pot[0], m_rect.Left() - ( EVENT_GRIP_SIZE / 2), m_rect.Top() - ( EVENT_GRIP_SIZE / 2));
+               evas_object_move(event_pot[1], m_rect.Right() - ( EVENT_GRIP_SIZE / 2), m_rect.Top() - ( EVENT_GRIP_SIZE / 2));
+               evas_object_move(event_pot[2], m_rect.Right() - ( EVENT_GRIP_SIZE / 2), m_rect.Bottom() - ( EVENT_GRIP_SIZE / 2));
+               evas_object_move(event_pot[3], m_rect.Left() - ( EVENT_GRIP_SIZE / 2), m_rect.Bottom() - ( EVENT_GRIP_SIZE / 2));
+
+               // Pot
+               int w, h;
+
+               w = POT_SIZE.Width();
+               h = POT_SIZE.Height();
+
+               evas_object_move(selector_pot[0], m_rect.Left() - 4, m_rect.Top() - 4 );
+               evas_object_resize(selector_pot[0], w, h);
+
+               evas_object_move(selector_pot[1], m_rect.Right() - 8, m_rect.Top() - 4 );
+               evas_object_resize(selector_pot[1], w, h);
+
+               evas_object_move(selector_pot[2], m_rect.Right() - 8, m_rect.Bottom() - 8);
+               evas_object_resize(selector_pot[2], w, h);
+
+               evas_object_move(selector_pot[3], m_rect.Left() - 4, m_rect.Bottom() - 8);
+               evas_object_resize(selector_pot[3], w, h);
+
+       };
+
+private:
+       Evas_Object *selector_line[4];
+       Evas_Object *event_pot[4];
+       Evas_Object *selector_pot[4];
+
+       Evas_Object *center;
+
+       bool m_bMouseDown;
+       bool m_bGripMouseDown;
+
+};
+
+
+#define CROP_SELECT_PATH IMAGE_PATH"/crop/T06_selection.png"
+
+#define CROP_RESIZE_H_PATH IMAGE_PATH"/crop/T06_selection_Resizing_h.png"
+#define CROP_RESIZE_W_PATH IMAGE_PATH"/crop/T06_selection_Resizing_V.png"
+
+#define CROP_ROTATE_PATH IMAGE_PATH"/crop/T06_selection_Rotate.png"
+
+class CBox1 : public CSelectBox {
+public:
+       const int EVENT_GRIP_SIZE;
+       const CSize POT_SIZE;
+
+       static void _line_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info) {};
+       static void _line_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info)     {};
+
+       static void _pot_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info) {
+               CBox1 *pBox = (CBox1 *)data;
+
+//             Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down *) event_info;
+
+               pBox->OnGripMouseDown();
+       };
+       static void _pot_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info)
+       {
+               CBox1 *pBox = (CBox1 *)data;
+
+               Evas_Event_Mouse_Move *ev = (Evas_Event_Mouse_Move *) event_info;
+
+               eGripType grip = static_cast<eGripType> (reinterpret_cast<int>\r(evas_object_data_get(obj, "grip_type")));
+
+               if ( ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD )
+               {
+                       MSG_HIGH("On Hold");
+               }
+
+               if ( ev->event_flags & EVAS_EVENT_FLAG_ON_SCROLL )
+               {
+                       MSG_HIGH("On Scroller");
+               }
+
+               pBox->OnGripMouseMove(grip, ev->prev.output.x, ev->prev.output.y, ev->cur.output.x, ev->cur.output.y);
+       };
+
+       static void _pot_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info) {
+               CBox1 *pBox = (CBox1 *)data;
+
+//             Evas_Event_Mouse_Up *ev = (Evas_Event_Mouse_Up *) event_info;
+
+               pBox->OnGripMouseUp();
+       };
+
+
+       static void _selector_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info) {
+               CBox1 *pBox = (CBox1 *)data;
+
+               Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down *) event_info;
+
+               pBox->OnMouseDown(ev->output.x, ev->output.y);
+
+       };
+
+       static void _selector_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info)       {
+               CBox1 *pBox = (CBox1 *)data;
+
+               Evas_Event_Mouse_Move *ev = (Evas_Event_Mouse_Move *) event_info;
+
+               MSG_LOW("(%d,%d) --> (%d,%d)", ev->cur.output.x, ev->cur.output.y, ev->prev.output.x, ev->prev.output.y);
+               pBox->OnMouseMove(ev->prev.output.x, ev->prev.output.y, ev->cur.output.x, ev->cur.output.y);
+       };
+
+       static void _selector_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info) {
+               CBox1 *pBox = (CBox1 *)data;
+
+               Evas_Event_Mouse_Up *ev = (Evas_Event_Mouse_Up *) event_info;
+
+               pBox->OnMouseUp(ev->output.x, ev->output.y);
+       };
+
+public:
+       CBox1() : CSelectBox(), EVENT_GRIP_SIZE(60), POT_SIZE(56,56), m_bMouseDown(false), m_bGripMouseDown(false)  { };
+
+       virtual ~CBox1() {
+               MSG_HIGH("Remove CBox1");
+
+               for (int i = 0; i < DEFAULT_POT_NUM; i++)
+               {
+                       evas_object_del(selector_pot[i]);
+                       evas_object_del(event_pot[i]);
+               }
+
+               evas_object_del(this->sel_rotate);
+               evas_object_del(select_rect);
+       };
+
+       void OnMouseDown(int x, int y)
+       {
+               MSG_HIGH("Mouse down XY(%d,%d)", x, y);
+
+               SetState(PRESS);
+               m_bMouseDown = true;
+       }
+
+       void OnMouseMove(int px, int py, int cx, int cy)
+       {
+               // Inform changes to parent.
+               if ( m_bMouseDown == false ) return;
+
+               int dx, dy;
+
+               dx = cx - px;
+               dy = cy - py;
+
+               MSG_HIGH("Mouse move XY(%d,%d) -> XY(%d,%d)", px, py, cx, cy);
+
+               if ( dx == 0 && dy == 0) {
+                       return;
+               };
+
+               if ( m_rect.Left() + dx < m_bound.Left() )
+               {
+                       MSG_HIGH("Left bound");
+                       dx = m_bound.Left() - m_rect.Left();
+               }
+
+               if ( m_rect.Right() + dx > m_bound.Right() )
+               {
+                       MSG_HIGH("Right bound");
+                       dx = m_bound.Right() - m_rect.Right();
+               }
+
+               if ( m_rect.Top() + dy < m_bound.Top() )
+               {
+                       MSG_HIGH("Top bound");
+                       dy = m_bound.Top() - m_rect.Top();
+               }
+
+               if ( m_rect.Bottom() + dy > m_bound.Bottom() )
+               {
+                       MSG_HIGH("Bottom bound");
+                       dy = m_bound.Bottom() - m_rect.Bottom();
+               }
+
+               // Move rect
+               m_rect.MoveBy(dx, dy);
+
+               evas_object_smart_changed(evas_object_smart_parent_get(select_rect));
+
+       }
+
+       void OnMouseUp(int x, int y)
+       {
+               MSG_HIGH("Mouse up XY(%d,%d)", x, y);
+               SetState(NORMAL);
+
+               m_bMouseDown = false;
+//             evas_object_smart_callback_call(sd->obj, SIG_CHANGED, NULL);
+       }
+
+       void OnGripMouseUp()
+       {
+               m_bGripMouseDown = false;
+               SetState(NORMAL);
+       }
+
+       void OnGripMouseDown()
+       {
+               m_bGripMouseDown = true;
+               SetState(HOLD);
+       }
+
+       void OnGripMouseMove(eGripType grip, int px, int py, int cx, int cy)
+       {
+               if ( m_bGripMouseDown == false ) return;
+
+               int dx = cx - px;
+               int dy = cy - py;
+
+               if ( dx == 0 && dy == 0) {
+                       return;
+               };
+
+               if ( GetRatio() != 0.0f )
+               {
+                       _GripMovePreserve(grip, dx, dy);
+               }
+               else
+               {
+                       _GripMove(grip, dx, dy);
+               }
+
+               MSG_HIGH("New Rect %d,%d,%d,%d", m_rect.Left(), m_rect.Top(), m_rect.Width(), m_rect.Height());
+
+               evas_object_smart_changed(evas_object_smart_parent_get(select_rect));
+       }
+
+private:
+       void _GripMove(eGripType grip, int dx, int dy) {
+               const int min_size = EVENT_GRIP_SIZE;
+               CRect rect = m_rect;
+
+               int X1 = rect.Left(), Y1 = rect.Top() ,X2 = rect.Right(), Y2 = rect.Bottom();
+
+               if ( grip & GRIP_LEFT )
+               {
+                       X1 = rect.Left() + dx;
+
+                       if ( X1 < m_bound.Left() )
+                       {
+                               MSG_HIGH("Left bound");
+                               X1 = m_bound.Left();
+                       }
+
+                       if ( rect.Width() - dx < min_size )
+                       {
+                               X1 = rect.Right() - min_size;
+
+                               MSG_HIGH("X1 = %d (%d,%d)", X1, rect.Left(), rect.Right());
+                       }
+               }
+
+               if ( grip & GRIP_TOP )
+               {
+                       Y1 = rect.Top() + dy;
+
+                       if ( Y1 < m_bound.Top() )
+                       {
+                               MSG_HIGH("Top bound");
+                               Y1 = m_bound.Top();
+                       }
+
+                       if ( rect.Height() - dy < min_size )
+                       {
+                               Y1 = rect.Bottom() - min_size;
+
+                               MSG_HIGH("Y1 = %d B=%d", Y1, rect.Bottom());
+                       }
+               }
+
+               if ( grip & GRIP_RIGHT )
+               {
+                       X2 = rect.Right() + dx;
+
+                       if ( X2 > m_bound.Right() )
+                       {
+                               MSG_HIGH("Right bound");
+                               X2 = m_bound.Right() ;
+                       }
+
+                       if ( rect.Width() + dx < min_size )
+                       {
+                               X2 = rect.Left() + min_size;
+                       }
+               }
+
+               if ( grip & GRIP_BOTTOM )
+               {
+                       Y2 = rect.Bottom() + dy;
+
+                       if ( Y2 > m_bound.Bottom() )
+                       {
+                               MSG_HIGH("Bottom bound");
+                               Y2 = m_bound.Bottom();
+                       }
+
+                       if ( rect.Height() + dy < min_size )
+                       {
+                               Y2 = rect.Top() + min_size;
+                       }
+               }
+
+               m_rect = CRect(X1, Y1, X2 - X1, Y2 - Y1);
+
+       };
+
+       void _GripMovePreserve(eGripType grip, int dx, int dy) {
+               const int min_size = EVENT_GRIP_SIZE;
+               CRect rect = m_rect;
+
+               int X,Y,W,H;
+
+               double ratio = GetRatio();
+
+               MSG_HIGH("Dx=%d Dy=%d Ratio=%f", dx, dy, ratio);
+
+               enum eDominantDirection
+               {
+                       Direction_X,
+                       Direction_Y
+               } ;
+
+               eDominantDirection dir = Direction_X;
+               int mov_dist;
+               if(abs(dx) < abs(dy))
+               {
+                       dir = Direction_Y;
+                       mov_dist = dy;
+               }
+               else
+               {
+                       mov_dist = dx;
+               }
+
+               if ( (grip & GRIP_LEFT) || (grip & GRIP_TOP)  )
+               {
+                       MSG_HIGH("LEFT,TOP");
+
+                       if ( dir == Direction_X )
+                       {
+                               W = rect.Width() - mov_dist;
+                               H = W * ratio;
+
+                               X = m_rect.Right() - W;
+                               Y = m_rect.Bottom() - H;
+                       }
+                       else
+                       {
+                               H = rect.Height() - mov_dist;
+                               W = H / ratio;
+
+                               X = m_rect.Right() - W;
+                               Y = m_rect.Bottom() - H;
+                       }
+
+
+               }
+
+
+               if ( (grip & GRIP_RIGHT) || (grip & GRIP_BOTTOM)  )
+               {
+                       MSG_HIGH("RIGHT,BOTTOM");
+                       if ( dir == Direction_X )
+                       {
+                               W = rect.Width() + mov_dist;
+                               H = W * ratio;
+
+                               X = m_rect.Left();
+                               Y = m_rect.Top();
+                       }
+                       else
+                       {
+                               H = rect.Height() + mov_dist;
+                               W = H / ratio;
+
+                               X = m_rect.Left();
+                               Y = m_rect.Top();
+
+                       }
+
+               }
+
+
+#if 0
+               if ( (grip & GRIP_RIGHT) && (grip & GRIP_TOP)  )
+               {
+                       MSG_HIGH("RIGHT,TOP");
+
+                       if ( dir == Direction_X )
+                       {
+                               W = rect.Width() + mov_dist;
+                               H = W * m_ratio;
+
+                               X = m_rect.Left();
+                               Y = m_rect.Bottom() - H;
+                       }
+                       else
+                       {
+                               H = rect.Height() - mov_dist;
+                               W = H / m_ratio;
+
+                               X = m_rect.Left();
+                               Y = m_rect.Bottom() - H;
+                       }
+
+               }
+
+               if ( (grip & GRIP_LEFT) && (grip & GRIP_BOTTOM)  )
+               {
+                       MSG_HIGH("LEFT,BOTTOM");
+
+                       if ( dir == Direction_X )
+                       {
+                               W = rect.Width() - mov_dist;
+                               H = W * m_ratio;
+
+                               X = m_rect.Right() - W;
+                               Y = m_rect.Top();
+                       }
+                       else
+                       {
+                               H = rect.Height() + mov_dist;
+                               W = H / m_ratio;
+
+                               X = m_rect.Right() - W;
+                               Y = m_rect.Top();
+                       }
+
+               }
+#endif
+
+               if ( W < min_size || H < min_size)
+               {
+                       return;
+               }
+
+               if ( X < m_bound.Left() ||  Y < m_bound.Top() ||
+                       X\r+ W > m_bound.Right() || Y+H > m_bound.Bottom() )
+               {
+                       return;
+               }
+
+               m_rect = CRect(X,Y,W,H);
+
+       }
+
+       void _LoadImage() {
+
+               Evas_Load_Error err;
+
+               evas_object_image_file_set(select_rect, CROP_SELECT_PATH, NULL);
+               err = evas_object_image_load_error_get(select_rect);
+               if (err != EVAS_LOAD_ERROR_NONE)
+               {
+                       MSG_ERROR("could not load image '%s'. %s",  CROP_SELECT_PATH, evas_load_error_str(err));
+               }
+
+               evas_object_image_border_set(select_rect, 19, 18, 18, 18);
+               evas_object_show(select_rect);
+
+               const char *szPot[] = {
+                       CROP_RESIZE_H_PATH,
+                       CROP_RESIZE_H_PATH,
+                       CROP_RESIZE_W_PATH,
+                       CROP_RESIZE_W_PATH
+               };
+
+               for (int i = 0; i < DEFAULT_POT_NUM; i++)
+               {
+                       evas_object_image_file_set(selector_pot[i], szPot[i], NULL);
+
+                       err = evas_object_image_load_error_get(selector_pot[i]);
+                       if (err != EVAS_LOAD_ERROR_NONE)
+                       {
+                               MSG_ERROR("could not load image '%s'. %s",      szPot[i], evas_load_error_str(err));
+                       }
+
+                       evas_object_image_scale_hint_set(selector_pot[i], EVAS_IMAGE_SCALE_HINT_STATIC);
+
+                       evas_object_show(selector_pot[i]);
+               }
+
+               /*evas_object_image_file_set(sel_rotate, CROP_ROTATE_PATH, NULL);
+
+               err = evas_object_image_load_error_get(sel_rotate);
+               if (err != EVAS_LOAD_ERROR_NONE)
+               {
+                       MSG_ERROR("could not load image '%s'. %s",      CROP_ROTATE_PATH, evas_load_error_str(err));
+               }
+
+               evas_object_image_scale_hint_set(sel_rotate, EVAS_IMAGE_SCALE_HINT_STATIC);
+
+               evas_object_show(sel_rotate);*/
+
+       };
+
+public:
+       virtual void SetState(eState state) {
+               CSelectBox::SetState(state);
+
+               _LoadImage();
+       };
+
+       void Create(Evas_Object *obj) {
+               Evas *e = evas_object_evas_get(obj);
+
+               select_rect = evas_object_image_filled_add(e);
+
+               evas_object_event_callback_add(select_rect, EVAS_CALLBACK_MOUSE_DOWN, _selector_mouse_down, this);
+               evas_object_event_callback_add(select_rect, EVAS_CALLBACK_MOUSE_UP, _selector_mouse_up, this);
+               evas_object_event_callback_add(select_rect, EVAS_CALLBACK_MOUSE_MOVE, _selector_mouse_move, this);
+
+               evas_object_smart_member_add(select_rect, obj);
+
+               for (int i = 0; i < DEFAULT_POT_NUM; i++)
+               {
+                       /* Create image icon (pot) */
+                       selector_pot[i] = evas_object_image_filled_add(e);
+
+                       evas_object_image_scale_hint_set(selector_pot[i], EVAS_IMAGE_SCALE_HINT_STATIC);
+
+                       evas_object_smart_member_add(selector_pot[i], obj);
+
+                       /* Create event object above image icon (pot) */
+                       event_pot[i] = evas_object_rectangle_add(e);
+                       evas_object_color_set(event_pot[i], 0, 0, 0, 0);
+
+                       evas_object_event_callback_add(event_pot[i], EVAS_CALLBACK_MOUSE_DOWN, _pot_mouse_down, this);
+                       evas_object_event_callback_add(event_pot[i], EVAS_CALLBACK_MOUSE_UP, _pot_mouse_up, this);
+                       evas_object_event_callback_add(event_pot[i], EVAS_CALLBACK_MOUSE_MOVE, _pot_mouse_move, this);
+
+                       evas_object_smart_member_add(event_pot[i], obj);
+
+                       evas_object_show(event_pot[i]);
+               }
+
+
+               evas_object_data_set(event_pot[0], "grip_type",(void *)GRIP_LEFT);
+               evas_object_data_set(event_pot[1], "grip_type",(void *)GRIP_RIGHT);
+               evas_object_data_set(event_pot[2], "grip_type",(void *)GRIP_TOP);
+               evas_object_data_set(event_pot[3], "grip_type",(void *)GRIP_BOTTOM);
+
+               sel_rotate = evas_object_image_filled_add(e);
+               evas_object_smart_member_add(sel_rotate, obj);
+
+               _LoadImage();
+       };
+
+       void Draw() {
+// Check bound.
+               if ( m_bound.Inside(m_rect) == false )
+               {
+                       MSG_ERROR("Out of bound region. Rect(%d,%d,%d,%d) Bound(%d,%d,%d,%d)", m_rect.Left(), m_rect.Top(), m_rect.Width(), m_rect.Height(),
+                               m_bound.Left(), m_bound.Top(), m_bound.Width(), m_bound.Height());
+               }
+
+               MSG_HIGH("Rect. %d,%d,%d,%d", m_rect.Left(), m_rect.Top(), m_rect.Width(), m_rect.Height());
+
+               const int margin_l = -10;
+               const int margin_r = -1;
+               const int margin_t = -1;
+               const int margin_b = -9;
+
+               int mx, my, mw, mh;
+
+               mx = m_rect.Left() + margin_l;
+               my = m_rect.Top()  + margin_t;
+               mw = m_rect.Width() - margin_l - margin_r;
+               mh = m_rect.Height() - margin_t - margin_b;
+
+               evas_object_move(select_rect, mx, my);
+               evas_object_resize(select_rect, mw, mh);
+
+// Event handle.
+               evas_object_resize(event_pot[0], EVENT_GRIP_SIZE, EVENT_GRIP_SIZE * 2);
+               evas_object_move(event_pot[0], m_rect.Left() - ( EVENT_GRIP_SIZE / 2), m_rect.Top() + m_rect.Height() / 2  - ( EVENT_GRIP_SIZE ));              // Left
+
+               evas_object_resize(event_pot[1], EVENT_GRIP_SIZE, EVENT_GRIP_SIZE * 2);
+               evas_object_move(event_pot[1], m_rect.Right() - ( EVENT_GRIP_SIZE / 2), m_rect.Top() + m_rect.Height() / 2 - ( EVENT_GRIP_SIZE ));              // Right
+
+               evas_object_resize(event_pot[2], EVENT_GRIP_SIZE * 2, EVENT_GRIP_SIZE);
+               evas_object_move(event_pot[2], m_rect.Left() + m_rect.Width() / 2 - ( EVENT_GRIP_SIZE ), m_rect.Top() - ( EVENT_GRIP_SIZE / 2));        // Top
+
+               evas_object_resize(event_pot[3], EVENT_GRIP_SIZE * 2, EVENT_GRIP_SIZE);
+               evas_object_move(event_pot[3], m_rect.Left() + m_rect.Width() / 2 - ( EVENT_GRIP_SIZE ), m_rect.Bottom() - ( EVENT_GRIP_SIZE / 2));     // Bottom
+
+               // Pot
+               const int lw = 4;
+               const int lh = 4;
+
+               int w, h;
+
+               w = POT_SIZE.Width();
+               h = POT_SIZE.Height();
+// L
+               evas_object_resize(selector_pot[0], w, h);
+               evas_object_move(selector_pot[0], m_rect.Left() - w / 2 + lw, m_rect.Top() + m_rect.Height() / 2 - h / 2 );
+// R
+               evas_object_move(selector_pot[1], m_rect.Right() - w / 2 -lw, m_rect.Top() + m_rect.Height() / 2 - h / 2 );
+               evas_object_resize(selector_pot[1], w, h);
+// T
+               evas_object_move(selector_pot[2], m_rect.Left() + m_rect.Width() / 2 - w / 2 , m_rect.Top() - h / 2 + lh);
+               evas_object_resize(selector_pot[2], w, h);
+// B
+               evas_object_move(selector_pot[3], m_rect.Left() + m_rect.Width() / 2 - w / 2, m_rect.Bottom() - h / 2 - lh);
+               evas_object_resize(selector_pot[3], w, h);
+
+               evas_object_move(sel_rotate, m_rect.Right() - w / 2 - lw , m_rect.Top() - h / 2 + lh);
+               evas_object_resize(sel_rotate, w, h);
+
+       };
+
+private:
+       Evas_Object *select_rect;                       // Center rect
+
+       Evas_Object *event_pot[4];
+       Evas_Object *selector_pot[4];
+
+       Evas_Object *sel_rotate;
+
+       bool m_bMouseDown;
+       bool m_bGripMouseDown;
+};
+
+
+template<>
+const Evas_Smart_Cb_Description CEvasSmartObject<CScissorBox>::_signals[] = {
+       {NULL, NULL},
+};
+
+Evas_Object *CScissorBox::CreateObject(Evas_Object *parent) {
+       CEvasSmartObject<CScissorBox>::CreateObject(parent);
+
+       evas_object_smart_callbacks_descriptions_set(GetObject(), _signals);
+
+       for (int i = 0; i < DEFAULT_POT_NUM; i++)
+       {
+               m_opaque[i] = evas_object_rectangle_add(evas_object_evas_get(parent));
+
+               evas_object_color_set(m_opaque[i], 0, 0, 0, DEFAULT_DIM_BG_ALPHA);
+               evas_object_smart_member_add(m_opaque[i], GetObject());
+               evas_object_repeat_events_set(m_opaque[i], EINA_TRUE);
+       }
+
+       m_box = new CBox();
+
+       m_box->Create( GetObject() );
+
+       m_parent = parent;
+
+       MSG_HIGH("Scissorbox created");
+       return GetObject();
+};
+
+void CScissorBox::remove()
+{
+       MSG_HIGH("Destroy ScissorBox. m_box=0x%08x", m_box);
+
+       if ( m_target )
+       {
+               UnRegisterCB();
+               m_target = NULL;
+       }
+
+       m_parent = NULL;
+
+       for (int i = 0; i < DEFAULT_POT_NUM; i++)
+       {
+               evas_object_hide(m_opaque[i]);
+               evas_object_del(m_opaque[i]);
+       }
+
+       if ( m_job )
+       {
+               ecore_job_del(m_job);
+               m_job = NULL;
+       }
+
+       delete m_box;
+
+       delete this;
+}
+
+
+void CScissorBox::SetOpaque(bool bOpaque)
+{
+#if 0
+       // Determine whether BG is drawn or not.
+       if ( bOpaque == m_bOpaque )
+       {
+               return;
+       }
+#endif
+
+
+/*
+m_rect
+------------------------------
+|                         m_opaque[0]                                   |
+| ___________________________ |
+|                              ----                                               |
+|  m_opaque[3]     |bg |  m_opaque[1]           |
+|_______________----___________ |
+|                                                                                                |
+|         m_opaque[2]                                                   |
+------------------------------
+*/
+       if ( bOpaque == true )
+       {
+               evas_object_show(m_opaque[0]);
+               evas_object_show(m_opaque[1]);
+               evas_object_show(m_opaque[2]);
+               evas_object_show(m_opaque[3]);
+       }
+       else
+       {
+               evas_object_hide(m_opaque[0]);
+               evas_object_hide(m_opaque[1]);
+               evas_object_hide(m_opaque[2]);
+               evas_object_hide(m_opaque[3]);
+       }
+
+       m_bOpaque = bOpaque;
+
+}
+
+
+void CScissorBox::SetPreserveRatio(bool bPreserveRatio)
+{
+       m_bPreserveRatio = bPreserveRatio;
+
+       if ( m_bPreserveRatio == true )
+       {
+               CRect rect = m_box->GetRegion();
+
+               if ( rect.Width() != 0 )
+               {
+                       MSG_HIGH("Set to preserve ratio");
+                       m_box->SetRatio((double)rect.Height() / rect.Width());
+               }
+       }
+
+}
+
+void CScissorBox::SetRegion(int x, int y, int w, int h)
+{
+       MSG_HIGH("Set Region(%d,%d,%d,%d)", x, y, w, h);
+
+       m_box->Move(x,y);
+
+       if ( m_bPreserveRatio == true )
+       {
+               m_box->SetRatio((double)h / w);
+       }
+
+       m_box->Resize(w,h);
+       m_bSetRegion = true;
+
+       evas_object_smart_changed(GetObject());
+}
+
+void CScissorBox::SetBound(int x, int y, int w, int h)
+{
+       MSG_HIGH("Set Bound(%d,%d,%d,%d)", x, y, w, h);
+
+       CRect rect(x, y, w, h);
+       m_box->SetBound(rect);
+
+
+       evas_object_smart_changed(GetObject());
+}
+
+void CScissorBox::SetBoxType(eType type)
+{
+// Remove old one and reload
+       if ( m_boxtype != type )
+       {
+               // Load again
+               if ( m_box )
+               {
+                       const CRect &bound = m_box->GetBound();
+                       const CRect &region = m_box->GetRegion();
+                       double ratio = m_box->GetRatio();
+
+                       delete m_box;
+                       m_box = NULL;
+
+                       if ( type == IMAGE_VIEW )
+                       {
+                               m_box = new CBox;
+                       }
+                       else
+                       {
+                               m_box = new CBox1;
+                       }
+
+                       m_box->Create( GetObject() );
+
+                       m_box->SetBound(bound);
+                       m_box->Move(region.Left(), region.Top());
+                       m_box->Resize(region.Width(), region.Height());
+
+                       if ( m_bPreserveRatio == true )
+                       {
+                               m_box->SetRatio(ratio);
+                       }
+
+               }
+       }
+
+       m_boxtype = type;
+}
+
+
+const CRect &CScissorBox::GetRegion() const
+{
+       return m_box->GetRegion();
+}
+
+
+void CScissorBox::Attach(Evas_Object *obj)
+{
+       MSG_HIGH("Attach client! obj=%s", evas_object_type_get(obj));
+
+       if ( m_target )
+               UnRegisterCB();
+
+       m_target = obj;
+
+       RegisterCB();
+
+       SetOpaque(true);
+
+       OnTargetChanged();
+}
+
+
+void CScissorBox::draw()
+{
+       if ( m_box == NULL ) return;
+
+       if ( m_bOpaque == true)
+       {
+               const CRect &box_rect = m_box->GetRegion();
+
+               if ( box_rect != CRect::Zero )
+               {
+                       int x, y, w, h;
+                       evas_output_viewport_get(evas_object_evas_get(GetObject()), &x, &y,  &w, &h);
+
+                       MSG_LOW("Evas View port Output : %d,%d,%d,%d", x,y,w, h);
+
+                       evas_object_move(m_opaque[0], x, y);
+                       evas_object_resize(m_opaque[0], w, box_rect.Top());
+
+                       evas_object_move(m_opaque[1], box_rect.Right(), box_rect.Top());
+                       evas_object_resize(m_opaque[1], w - box_rect.Right() , box_rect.Height() );
+
+                       evas_object_move(m_opaque[2], x, box_rect.Bottom());
+                       evas_object_resize(m_opaque[2], w , h - box_rect.Bottom() );
+
+                       evas_object_move(m_opaque[3], x, box_rect.Top());
+                       evas_object_resize(m_opaque[3], box_rect.Left() , box_rect.Height() );
+               }
+       }
+
+       m_box->Draw();
+}
+
+void CScissorBox::OnTargetChanged()
+{
+       if ( m_job )
+       {
+               ecore_job_del(m_job);
+       }
+
+       m_job = ecore_job_add(_OnChangedJob, this);
+
+}
+
+void CScissorBox::ApplyChanges()
+{
+       int x, y, w, h;
+
+       int lcd_x, lcd_y, lcd_w, lcd_h;
+
+       evas_object_geometry_get(m_parent, &lcd_x, &lcd_y, &lcd_w, &lcd_h);
+       MSG_HIGH("LCD size (%d,%d,%d,%d)", lcd_x, lcd_y, lcd_w, lcd_h);
+
+       double lcd_ratio = (double)lcd_h/lcd_w;
+
+       if ( m_target == NULL )
+       {
+               x = 0;
+               y = 0;
+               w = lcd_w;
+               h = lcd_h;
+       }
+       else
+       {
+               evas_object_geometry_get(m_target, &x, &y, &w, &h);
+       }
+
+       // evas_object_geometry_get is not corret when image loaded before show effect ended
+       if(lcd_ratio > (double)h/w)
+       {
+               x = 0;
+       }
+       else
+       {
+               x = (lcd_w - w)/2;
+       }
+
+       MSG_HIGH("Target Changed (%d,%d,%d,%d)->(%d,%d,%d,%d)", tRect.Left(), tRect.Top(), tRect.Width(), tRect.Height(), x, y, w, h);
+
+       if ( w == 0 || h == 0 )
+       {
+               MSG_WARN("Size does not changed");
+               return;
+       }
+
+       CRect bound(x,y,w,h);           // Boundary size is same as target
+       m_box->SetBound(bound);
+
+       MSG_HIGH("Set Bound rect(%d,%d,%d,%d)", bound.Left(), bound.Top(), bound.Width(), bound.Height() );
+
+       if ( m_bSetRegion == false )
+       {
+               int nW = w / 2;
+               int nH = h / 2;
+
+               m_box->Move(x + (w - nW) / 2, y + (h - nH) / 2 );
+               m_box->Resize(nW, nH);
+
+               MSG_HIGH("Region is not set yet. BoxRegion(%d,%d,%d,%d)", x + (w - nW) / 2, y + (h - nH) / 2, nW, nH);
+               evas_object_smart_changed(GetObject());
+
+               return;
+       }
+
+#ifdef ALLOW_RECT_TRACE
+       if ( tRect.Width() == 0 || tRect.Height() == 0 )
+       {
+               MSG_WARN("First time");
+               tRect = CRect(x,y,w,h);
+               return;
+       }
+
+       double zRatio = (double)w / tRect.Width();
+
+       const CRect &box_rect = m_box->GetRegion();
+
+// Convert to rect on image;
+       int ix = box_rect.Left() - tRect.Left();
+       int iy = box_rect.Top() - tRect.Top();
+
+       int rx = ix * zRatio;
+       int ry = iy * zRatio;
+       int rw = box_rect.Width() * zRatio;
+       int rh = box_rect.Height() * zRatio;
+
+       m_box->Move(rx + x, ry + y);
+       m_box->Resize(rw, rh);
+
+       MSG_HIGH("%d,%d %d,%d,%d,%d", ix, iy, rx, ry, rw, rh);
+#endif
+       tRect = CRect(x,y,w,h);
+
+#ifndef ALLOW_RECT_TRACE
+       const CRect &box_rect = m_box->GetRegion();
+
+       if ( bound.Inside(box_rect) == false )
+       {
+               MSG_ERROR("Out of bound region. Rect(%d,%d,%d,%d) Bound(%d,%d,%d,%d)", box_rect.Left(), box_rect.Top(), box_rect.Width(), box_rect.Height(),
+                       bound.Left(), bound.Top(), bound.Width(), bound.Height());
+
+               int ph, pw;
+
+               ph = (box_rect.Height() * bound.Width()) / box_rect.Width();
+
+               if (ph > bound.Height())
+               {
+                       pw = (box_rect.Width() * bound.Height()) / box_rect.Height();
+                       ph = bound.Height();
+               }
+               else
+               {
+                       pw = bound.Width();
+               }
+
+               pw = pw / 2;
+               ph = ph / 2;
+
+               MSG_ERROR("New WH(%d,%d)", pw, ph);
+
+               m_box->Move(bound.Left() + (bound.Width() - pw  ) / 2, bound.Top() + (bound.Height() - ph) / 2 );
+               m_box->Resize(pw , ph);
+
+#if 0
+               // Reset Rect
+               int nW = bound.Width() / 2;
+               int nH = bound.Height() / 2;
+
+               if ( nW > nH )
+               {
+                       nW = bound.Width() / 2;
+                       nH = bound.Height() / 2;
+               }
+               else
+               {
+                       nW = bound.Width() / 2;
+                       nH = bound.Height() / 2;
+               }
+
+               m_box->Move(bound.Left() + (bound.Width() - nW) / 2, bound.Top() + (bound.Height() - nH) / 2 );
+               m_box->Resize(nW, nH);
+#endif
+
+       }
+
+#endif         // ALLOW_RECT_TRACE
+
+       evas_object_smart_changed(GetObject());
+
+}
+
+
diff --git a/widget/src/scissorbox/ScissorBox.h b/widget/src/scissorbox/ScissorBox.h
new file mode 100755 (executable)
index 0000000..08b3c9e
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *       http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include "ivug-debug.h"
+#include "EvasSmartObj.h"
+#include "Ecore.h"
+
+using namespace std;
+
+class CSelectBox;
+
+class CScissorBox : public CEvasSmartObject<CScissorBox> {
+public:
+       enum eType {
+               IMAGE_VIEW,
+               IMAGE_EDIT,
+       };
+
+public:
+       CScissorBox() : CEvasSmartObject<CScissorBox>(), m_box(NULL), m_boxtype(IMAGE_VIEW), m_bOpaque(false), m_target(NULL), m_bPreserveRatio(false), m_bSetRegion(false), m_job(NULL) {
+               CEvasSmartObject<CScissorBox>::SetClassName("ScissorBox");
+       };
+
+       virtual ~CScissorBox() {
+               MSG_HIGH("~CScissorBox freed");
+       };
+
+       Evas_Object *CreateObject(Evas_Object *parent);
+
+       void SetOpaque(bool bOpaque);
+       void SetRegion(int x, int y, int w, int h);
+       void SetBound(int x, int y, int w, int h);
+       void SetPreserveRatio(bool bPreserveRatio);
+       void SetBoxType(eType type);
+
+       void Attach(Evas_Object *image);
+
+       const CRect &GetRegion() const;
+
+       void draw();
+       void remove();
+       void resize(int w, int h) {
+               MSG_HIGH("Scissor box resized. WH(%d,%d)", w, h);
+       };
+
+       static void _on_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
+       {
+               //CScissorBox *scissorbox = (CScissorBox *)data;
+
+               //scissorbox->OnTargetChanged();
+       };
+
+       static void _on_move(void *data, Evas *e, Evas_Object *obj, void *event_info) {
+               // CScissorBox *scissorbox = (CScissorBox *)data;
+
+               //scissorbox->OnTargetChanged();
+       };
+
+       static void _OnChangedJob(void *data) {
+               CScissorBox *scissorbox = (CScissorBox *)data;
+
+               scissorbox->ApplyChanges();
+       }
+
+       void OnTargetChanged();
+       void ApplyChanges();
+
+private:
+       void RegisterCB() {
+               MSG_ASSERT(m_target != NULL);
+
+               evas_object_event_callback_add(m_target, EVAS_CALLBACK_RESIZE, _on_resize, this);
+               evas_object_event_callback_add(m_target, EVAS_CALLBACK_MOVE, _on_move, this);
+
+       }
+
+       void UnRegisterCB() {
+               evas_object_event_callback_del_full(m_target, EVAS_CALLBACK_RESIZE, _on_resize, this);
+               evas_object_event_callback_del_full(m_target, EVAS_CALLBACK_MOVE, _on_move, this);
+       };
+
+
+private:
+       CSelectBox *m_box;
+
+       eType m_boxtype;
+
+       bool m_bOpaque;
+       Evas_Object *m_opaque[4];
+
+       Evas_Object *m_target;
+
+       bool m_bPreserveRatio;
+       bool m_bSetRegion;              // If region is set already,
+       Ecore_Job *m_job;
+
+       CRect tRect;            // Target rectangle
+
+       Evas_Object *m_parent;  // parent_layout
+};
+
+
+
diff --git a/widget/src/scissorbox/ivug-scissorbox.cpp b/widget/src/scissorbox/ivug-scissorbox.cpp
new file mode 100755 (executable)
index 0000000..1091ab7
--- /dev/null
@@ -0,0 +1,122 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include <Elementary.h>
+
+#include "ivug-scissorbox.h"
+#include "ivug-debug.h"
+
+#include "ScissorBox.h"
+
+#define SCISSORBOX_CLASS(obj) \
+       static_cast<CScissorBox *>(evas_object_data_get((obj), "CScissorBox"))
+
+
+EAPI Evas_Object *ivug_scissorbox_add(Evas_Object *parent)
+{
+       CScissorBox *scissorbox = new CScissorBox;
+
+       Evas_Object *obj = scissorbox->CreateObject(parent);
+       MSG_ASSERT(obj != NULL);
+
+       evas_object_data_set(obj, "CScissorBox", scissorbox);
+
+       MSG_HIGH("Create scissorBox object. class=0x%08x obj=0x%08x", scissorbox, obj);
+       return obj;
+}
+
+EAPI void ivug_scissorbox_type_set(Evas_Object *obj, eScissorBoxType type)
+{
+       CScissorBox *scissorbox = SCISSORBOX_CLASS(obj);
+       MSG_ASSERT(obj != NULL);
+
+       if ( type == SCISSOR_BOX_TYPE_1 )
+       {
+               scissorbox->SetBoxType(CScissorBox::IMAGE_VIEW);
+       }
+       else
+       {
+               scissorbox->SetBoxType(CScissorBox::IMAGE_EDIT);
+       }
+
+}
+
+EAPI void ivug_scissorbox_attach(Evas_Object *obj, Evas_Object *pObj)
+{
+       CScissorBox *scissorbox = SCISSORBOX_CLASS(obj);
+       MSG_ASSERT(pObj != NULL);
+
+       scissorbox->Attach(pObj);
+}
+
+EAPI void ivug_scissorbox_region_get(Evas_Object *obj, int *x, int *y, int *w, int *h)
+{
+       CScissorBox *scissorbox = SCISSORBOX_CLASS(obj);
+
+       const CRect &region = scissorbox->GetRegion();
+
+       if ( x ) *x = region.Left();
+       if ( y ) *y = region.Top();
+       if ( w ) *w = region.Width();
+       if ( h ) *h = region.Height();
+
+}
+
+EAPI void ivug_scissorbox_region_set(Evas_Object *obj, int x, int y, int w, int h)
+{
+       CScissorBox *scissorbox = SCISSORBOX_CLASS(obj);
+
+       scissorbox->SetRegion(x,y,w,h);
+}
+
+EAPI void ivug_scissorbox_boundary_set(Evas_Object *obj, int x, int y, int w, int h)
+{
+       CScissorBox *scissorbox = SCISSORBOX_CLASS(obj);
+
+       scissorbox->SetBound(x,y,w,h);
+}
+
+
+EAPI void ivug_scissorbox_ratio_fix(Evas_Object *obj, Eina_Bool bFix)
+{
+       CScissorBox *scissorbox = SCISSORBOX_CLASS(obj);
+
+       if ( bFix == EINA_TRUE )
+       {
+               scissorbox->SetPreserveRatio(true);
+       }
+       else
+       {
+               scissorbox->SetPreserveRatio(false);
+       }
+
+}
+
+EAPI void ivug_scissorbox_set_opaque(Evas_Object *obj, Eina_Bool bOpaque)
+{
+       CScissorBox *scissorbox = SCISSORBOX_CLASS(obj);
+
+       if ( bOpaque == EINA_TRUE )
+       {
+               scissorbox->SetOpaque(true);
+       }
+       else
+       {
+               scissorbox->SetOpaque(false);
+       }
+}
+
+
diff --git a/widget/src/util/EFLUtil.cpp b/widget/src/util/EFLUtil.cpp
new file mode 100755 (executable)
index 0000000..923173c
--- /dev/null
@@ -0,0 +1,355 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include <Ecore.h>
+#include "EFLUtil.h"
+#include "ivug-debug.h"
+
+#undef LOG_LVL
+#define LOG_LVL DBG_MSG_LVL_HIGH
+#undef LOG_CAT
+#define LOG_CAT "IV-UTIL"
+
+namespace EFL {
+
+void get_evas_geometry(Evas_Object *obj, const char *prefix)
+{
+       int x, y, w, h;
+
+       evas_object_geometry_get(obj, &x, &y, &w, &h);
+
+       MSG_HIGH("%s XYWH(%d,%d,%d,%d)", prefix);
+}
+
+Evas_Object *create_gesture(Evas_Object *parent)
+{
+       Evas_Object *gesture;
+
+       gesture = elm_gesture_layer_add(parent);
+
+       return gesture;
+}
+
+Evas_Object *create_rect(Evas_Object *parent)
+{
+       Evas_Object *obj;
+
+       obj = evas_object_rectangle_add(evas_object_evas_get(parent));
+
+       evas_object_size_hint_expand_set(obj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_fill_set(obj, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_color_set(obj, 0,0,0,0);
+
+       return obj;
+}
+
+Evas_Object *create_clipper(Evas_Object *parent)
+{
+       Evas_Object *obj;
+
+       obj = evas_object_rectangle_add(evas_object_evas_get(parent));
+
+       evas_object_size_hint_expand_set(obj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_fill_set(obj, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_color_set(obj, 255,255,255,255);
+
+       return obj;
+}
+
+
+Evas_Object *create_layout(Evas_Object *parent, const char *edj, const char *group)
+{
+       MSG_ASSERT(parent != NULL);
+
+       Evas_Object *layout;
+       layout = elm_layout_add(parent);
+
+       if ( layout == NULL )
+       {
+               MSG_ERROR("Cannot create layout");
+               return NULL;
+       }
+
+       if ( elm_layout_file_set(layout, edj, group) == EINA_FALSE)
+       {
+               MSG_ERROR("Layout file set failed! %s in %s", group, edj);
+               evas_object_del(layout);
+               return NULL;
+       }
+
+       evas_object_size_hint_expand_set( layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_fill_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL );
+
+       evas_object_show(layout);
+       return layout;
+}
+
+Evas_Object *create_button(Evas_Object *parent, const char *style, const char *icon, const char *caption)
+{
+       Evas_Object *btn = NULL;
+
+       btn = elm_button_add(parent);
+       elm_object_style_set(btn, style);
+
+       if ( icon )
+       {
+               Evas_Object *ic = NULL;
+               ic = elm_icon_add(btn);
+               elm_icon_file_set(ic, icon, NULL);
+               evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+               elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
+               elm_object_part_content_set(btn, "icon", ic);
+       }
+
+       if ( caption )
+       {
+               elm_object_text_set(btn, caption);
+       }
+
+       return btn;
+}
+
+
+void dump_obj(Evas_Object *obj, int lvl)
+{
+       Eina_List *list = evas_object_smart_members_get(obj);
+
+       if ( lvl == 0 )
+       {
+               int x, y, w, h;
+
+               evas_object_geometry_get(obj, &x, &y, &w, &h);
+               Eina_Bool repeat = evas_object_repeat_events_get(obj);
+               Eina_Bool pass = evas_object_pass_events_get(obj);
+               Eina_Bool visible = evas_object_visible_get(obj);
+               Eina_Bool propagate = evas_object_propagate_events_get(obj);
+
+               MSG_HIGH("Obj=%s(%s,0x%08x) (%d,%d,%d,%d) P%d|R%d|V%d|E%d", evas_object_name_get(obj), evas_object_type_get(obj), obj, x, y, w, h, pass, repeat, visible, propagate);
+               lvl++;
+       }
+
+       Evas_Object *data;
+       Eina_List *l;
+
+       for (l = list, data = (Evas_Object *)eina_list_data_get(l); l; l = eina_list_next(l), data = (Evas_Object *)eina_list_data_get(l))
+       {
+               int x, y, w, h;
+
+               evas_object_geometry_get(data, &x, &y, &w, &h);
+               Eina_Bool repeat = evas_object_repeat_events_get(data);
+               Eina_Bool pass = evas_object_pass_events_get(data);
+               Eina_Bool visible = evas_object_visible_get(data);
+               Eina_Bool propagate = evas_object_propagate_events_get(data);
+
+               if ( lvl == 0 )
+               {
+                       MSG_HIGH("Obj=%s(%s,0x%08x) (%d,%d,%d,%d) P%d|R%d|V%d|E%d", evas_object_name_get(data), evas_object_type_get(data), data,  x, y, w, h, pass, repeat, visible, propagate);
+               }
+               else
+               {
+                       char *space = new char[lvl*2+1];
+
+                       for ( int i = 0; i < lvl*2; i++)
+                       {
+                               space[i] = ' ';
+                       }
+
+                       space[lvl*2] = '\0';
+
+                       MSG_HIGH("%sObj=%s(%s,0x%08x) (%d,%d,%d,%d) P%d|R%d|V%d|E%d", space, evas_object_name_get(data), evas_object_type_get(data), data, x, y, w, h, pass, repeat, visible, propagate);
+
+                       delete[] space;
+               }
+
+               dump_obj(data, lvl+1);
+
+       }
+}
+
+char * current_render_method(Evas *e)
+{
+       char *szRet = NULL;
+
+       //get render list that usable
+       Eina_List *engine_list = evas_render_method_list();
+
+       //id of rendering method
+       int current_id = evas_output_method_get(e);
+
+       //check rendering method same
+       Eina_List *l;
+
+       const char *engine_name;
+
+       for (l = engine_list, engine_name = (const char *)eina_list_data_get(l); l; l = eina_list_next(l),engine_name = (const char *)eina_list_data_get(l))
+       {
+               //id value of specific rendering method
+               int engine_id = evas_render_method_lookup(engine_name);
+
+               //"software_x11", "gl_x11"
+               if (engine_id == current_id)
+               {
+                       MSG_HIGH("current render method is %s!", engine_name);
+                       szRet = strdup(engine_name);
+                       break;
+               }
+       }
+
+       evas_render_method_list_free(engine_list);
+
+       return szRet;
+}
+
+Evas_Object *create_window(const char *title, int w, int h)
+{
+       Evas_Object *win;
+
+       win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+       elm_win_title_set(win, title);
+
+       evas_object_resize(win, w, h);
+       evas_object_show(win);
+
+       return win;
+}
+
+
+
+};
+
+
+namespace util {
+
+Image_Codec_Type
+get_codec_type(const unsigned char *buffer, unsigned int size)
+{
+       if ( size < 8 )
+       {
+               MSG_ERROR("To small buffer size : %d", size);
+               return eImageCodec_UNKNOWN;
+       }
+
+       if ( buffer[0] == 0xff && buffer[1] == 0xd8)            // JPEG
+       {
+               return eImageCodec_JPEG;
+       }
+       else if(buffer[0] == 0x89 && buffer[1] == 0x50 && buffer[2] == 0x4e && buffer[3] == 0x47 &&
+                       buffer[4] == 0x0d && buffer[5] == 0x0a && buffer[6] == 0x1a && buffer[7] == 0x0a        )
+       {
+               return eImageCodec_PNG;
+       }
+       else
+       {
+               // ("GIF87a" or "GIF89a")
+
+               if ( memcmp(buffer, "GIF8", 4) == 0 )
+               {
+                       if (buffer[4] == '9' || buffer[4] == '7' )
+                       {
+                               if ( buffer[5] == 'a')
+                               {
+                                       return eImageCodec_GIF;
+                               }
+                       }
+               }
+       }
+
+       return eImageCodec_IMAGE;
+}
+
+Image_Codec_Type
+get_codec_type(const char *filename)
+{
+       FILE *fp = NULL;
+
+       fp = fopen(filename, "rb");
+
+       if ( fp == NULL )
+       {
+               char error_msg[256];
+               MSG_ERROR("Cannot find %s", filename);
+               MSG_ERROR("Cannot open file : %s", strerror_r(errno, error_msg, sizeof(error_msg)) );
+
+               return eImageCodec_UNKNOWN;
+       }
+
+       unsigned char buffer[8];
+       int readcnt = 0;
+
+       readcnt = fread(&buffer, 1, sizeof(buffer), fp);
+
+       if ( readcnt != sizeof(buffer) )
+       {
+               if(feof(fp))
+               {
+                       MSG_ERROR("End Of File");
+               }
+               if(ferror(fp))
+               {
+                       perror("fread ERROR");
+               }
+               MSG_ERROR("Read Error. file = %s, readcnt = %d", filename, readcnt);
+
+               fclose(fp);
+               return eImageCodec_UNKNOWN;
+       }
+
+       fclose(fp);
+
+       MSG_LOW("ReadCount=%d", readcnt);
+       return get_codec_type(buffer, readcnt);
+
+}
+
+
+bool is_openGL_enabled(Evas *e)
+{
+       MSG_ASSERT(e != NULL );
+
+       Eina_List *engines, *l;
+       int cur_id;
+       int id;
+       void *data;
+
+       engines = evas_render_method_list ();
+       if (!engines) {
+               MSG_ERROR("No engine is specified");
+               return false;
+       }
+
+       cur_id = evas_output_method_get (e);
+
+       EINA_LIST_FOREACH (engines, l, data) {
+               const char *name = (char *)data;
+
+               id = evas_render_method_lookup (name);
+               if (name && id == cur_id)
+               {
+                       if (!strcmp (name, "gl_x11")) {
+                               return true;
+                       }
+                       break;
+               }
+       }
+
+       return false;
+
+}
+
+
+};
+
+
diff --git a/widget/src/util/ivug-listpopup.c b/widget/src/util/ivug-listpopup.c
new file mode 100755 (executable)
index 0000000..6fbdc98
--- /dev/null
@@ -0,0 +1,483 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *       http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+
+#include "ivug-debug.h"
+
+#include <Elementary.h>
+#include "ivug-listpopup.h"
+
+#undef LOG_LVL
+#define LOG_LVL DBG_MSG_LVL_HIGH
+
+#undef LOG_CAT
+#define LOG_CAT "IV-POPUP"
+
+typedef struct {
+       Evas_Object *obj;
+
+       Evas_Object *popup;
+       Evas_Object *parent;
+       Eina_List *list;
+
+       const char *title;
+       const char *caption;
+} ListPopup;
+
+
+typedef struct {
+       Evas_Object *obj;               // This object
+
+       Elm_Object_Item *item;
+
+       const char *iconpath;
+       const char *caption;
+       void *data;
+
+       bool bDisabled;
+
+} ListPopupItem;
+
+#define IV_LISTPOPUP(obj) \
+               (ListPopup *)(evas_object_data_get((obj), "LISTPOPUP"))
+
+static char *
+_on_label_set(void *data, Evas_Object *obj, const char *part)
+{
+       IV_ASSERT( data != NULL);
+
+       ListPopupItem *item = (ListPopupItem *)data;
+
+       return strdup(item->caption); //dump
+}
+
+
+static void
+_on_genlist_selected(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_ASSERT(data != NULL);
+
+       ListPopupItem *item = data;
+//     ListPopup *pListPopup = IV_LISTPOPUP(item->obj);
+
+       MSG_HIGH("Genlist item selected");
+
+       evas_object_smart_callback_call(item->obj, "popup,selected", item);
+
+}
+
+
+static void
+_on_ctxpopup_selected(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_ASSERT(data != NULL);
+
+//
+//     Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       ListPopupItem *item = data;
+//     ListPopup *pListPopup = IV_LISTPOPUP(item->obj);
+
+       MSG_HIGH("Ctxpopup item selected. obj=0x%08x", item->obj);
+
+       evas_object_smart_callback_call(item->obj, "popup,selected", item);
+
+}
+
+
+static void _on_item_del(void *data, Evas_Object *obj)
+{
+       MSG_ASSERT(data != NULL);
+
+       ListPopupItem *item = data;
+
+       MSG_HIGH("Remove item");
+
+       if ( item->caption )
+               eina_stringshare_del(item->caption);
+
+       item->caption = NULL;
+
+       if ( item->iconpath )
+               eina_stringshare_del(item->iconpath);
+       item->iconpath = NULL;
+
+       free(item);
+}
+
+
+static void
+_on_popup_close(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_ASSERT(data != NULL);
+
+       ListPopup *pListPopup = data;
+
+       MSG_HIGH("Genlist Popup Dismissed");
+
+       evas_object_smart_callback_call(pListPopup->obj, "popup,dismissed", NULL);
+}
+
+static void _on_genpopup_deleted(void * data, Evas * e, Evas_Object * obj, void * event_info)
+{
+       MSG_HIGH("Remove genlist popup");
+
+       ListPopup *pListPopup = data;
+
+       if ( pListPopup->title )
+               eina_stringshare_del(pListPopup->title);
+
+       pListPopup->title = NULL;
+
+       if ( pListPopup->popup )
+       {
+               evas_object_del(pListPopup->popup);
+       }
+
+
+       free(pListPopup);
+}
+
+
+static void _on_ctxpopup_deleted(void * data, Evas * e, Evas_Object * obj, void * event_info)
+{
+       MSG_HIGH("Remove ctx popup");
+
+       ListPopup *pListPopup = data;
+
+       if ( pListPopup->title )
+               eina_stringshare_del(pListPopup->title);
+
+       pListPopup->title = NULL;
+
+       EINA_LIST_FREE(pListPopup->list, data)
+       {
+               _on_item_del(data, NULL);
+       }
+
+       pListPopup->list = NULL;
+
+       if ( pListPopup->popup )
+       {
+               evas_object_del(pListPopup->popup);
+       }
+
+
+       free(pListPopup);
+}
+
+static void _on_dismissed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       ListPopup *pListPopup = data;
+
+       MSG_HIGH("Ctx Popup Dismissed");
+       evas_object_smart_callback_call(pListPopup->obj, "popup,dismissed", NULL);
+}
+
+
+Evas_Object *ivug_listpopup_add(Evas_Object *parent)
+{
+       Evas_Object *obj = NULL;
+
+// Creating dummy object because we cannot
+       obj = elm_box_add(parent);
+
+       ListPopup *pListPopup = (ListPopup *)calloc(1, sizeof(ListPopup));
+
+       pListPopup->parent = parent;
+
+       pListPopup->list = NULL;
+       pListPopup->obj = obj;
+       pListPopup->title = NULL;
+       pListPopup->caption = NULL;
+       evas_object_data_set(obj, "LISTPOPUP", (void *)pListPopup);
+
+       MSG_HIGH("List popup is added. obj=0x%08x", obj);
+
+       return obj;
+}
+
+
+Ivug_ListPopup_Item *ivug_listpopup_item_append(Evas_Object *obj, const char *iconpath, const char *caption, void *data)
+{
+       ListPopup *pListPopup = IV_LISTPOPUP(obj);
+
+       ListPopupItem *item = calloc(1,sizeof(ListPopupItem));
+
+       item->obj = obj;
+
+       if (iconpath )
+       {
+               item->iconpath = eina_stringshare_add(iconpath);
+       }
+
+       if ( caption )
+       {
+               item->caption = eina_stringshare_add(caption);
+       }
+
+       item->bDisabled = false;
+       item->data = data;
+
+       MSG_HIGH("Item append: %s", caption);
+
+       pListPopup->list = eina_list_append(pListPopup->list, item);
+
+       return item;
+}
+
+
+Ivug_ListPopup_Item *ivug_listpopup_item_prepend(Evas_Object *obj, const char *iconpath, const char *caption, void *data)
+{
+       ListPopup *pListPopup = IV_LISTPOPUP(obj);
+
+       ListPopupItem *item = malloc(sizeof(ListPopupItem));
+
+       item->obj = obj;
+       item->iconpath = eina_stringshare_add(item->iconpath);
+       item->caption = eina_stringshare_add(item->caption);
+       item->bDisabled = false;
+       item->data = data;
+
+       MSG_HIGH("Item prepend: %s", caption);
+
+       pListPopup->list = eina_list_prepend(pListPopup->list, item);
+
+       return item;
+}
+
+
+Eina_List *ivug_listpopup_items_get(Evas_Object *obj)
+{
+       ListPopup *pListPopup = IV_LISTPOPUP(obj);
+
+       return pListPopup->list;
+}
+
+
+void ivug_listpopup_item_disabled_set(Ivug_ListPopup_Item *item)
+{
+       ListPopupItem *item_ = item;
+
+       item_->bDisabled = true;
+}
+
+void ivug_listpopup_item_enabled_set(Ivug_ListPopup_Item *item)
+{
+       ListPopupItem *item_ = item;
+
+       item_->bDisabled = false;
+
+}
+
+void *ivug_listpopup_item_get_data(Ivug_ListPopup_Item *item)
+{
+       ListPopupItem *item_ = (Ivug_ListPopup_Item *)item;
+
+       return item_->data;
+}
+
+const char *ivug_listpopup_item_get_text(Ivug_ListPopup_Item *item)
+{
+       ListPopupItem *item_ = (Ivug_ListPopup_Item *)item;
+
+       return item_->caption;
+}
+
+
+void ivug_listpopup_title_set(Evas_Object *obj, const char* title)
+{
+       ListPopup *pListPopup = IV_LISTPOPUP(obj);
+
+       MSG_ASSERT(title != NULL);
+
+       pListPopup->title = eina_stringshare_add(title);
+
+       MSG_MED("Popup title set : %s", title);
+}
+
+void ivug_listpopup_button_set(Evas_Object *obj, const char* caption)
+{
+       ListPopup *pListPopup = IV_LISTPOPUP(obj);
+
+       MSG_ASSERT(caption != NULL);
+
+       pListPopup->caption = eina_stringshare_add(caption);
+
+       MSG_MED("Popup caption set : %s", caption);
+}
+
+bool ivug_listpopup_popup_show(Evas_Object *obj)
+{
+       ListPopup *pListPopup = IV_LISTPOPUP(obj);
+
+       if ( pListPopup->popup )
+       {
+               MSG_WARN("Previous popup is remained");
+       }
+
+       Evas_Object *popup;
+// create popup
+       popup = elm_popup_add(pListPopup->parent);
+
+       if (!popup)
+       {
+               MSG_ERROR("Error : popup create failed.");
+               return false;
+       }
+
+       pListPopup->popup = popup;
+
+       elm_object_style_set(popup, "min_menustyle");
+       elm_object_part_text_set(popup, "title,text", pListPopup->title);
+
+       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_weight_set(popup, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+       Evas_Object *btn_close = NULL;
+
+       if ( pListPopup->caption )
+       {
+               btn_close = elm_button_add(popup);
+               elm_object_text_set(btn_close, pListPopup->caption);
+               elm_object_part_content_set(popup, "button1", btn_close);
+       }
+
+// create genlist
+       Evas_Object *genlist;
+       static Elm_Genlist_Item_Class itc = {0,};
+
+       genlist = elm_genlist_add(popup);
+
+       itc.version = ELM_GENLIST_ITEM_CLASS_VERSION;
+       itc.item_style = "1text";
+       itc.func.text_get = _on_label_set;
+       itc.func.content_get = NULL;
+       itc.func.state_get = NULL;
+       itc.func.del = _on_item_del;
+
+       evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+       int count = eina_list_count(pListPopup->list);
+
+       ListPopupItem *pItem = NULL;
+       Eina_List *tmp;
+       Elm_Object_Item *gItem;
+
+       EINA_LIST_FOREACH(pListPopup->list, tmp, pItem)
+       {
+               MSG_MED("Add popup item. %s", pItem->caption);
+               gItem = elm_genlist_item_append(genlist, &itc, pItem, NULL /* parent */, ELM_GENLIST_ITEM_NONE, _on_genlist_selected, pItem);
+               pItem->item = gItem;
+
+               elm_object_item_disabled_set(gItem, pItem->bDisabled);
+       }
+
+
+// Put together
+
+#define GET_POPUP_HEIGHT(icnt) (((113*icnt-1) > 408) ? (408) : (113*icnt-1))
+#define GET_POPUP_WIDTH(icnt)  (614)
+
+       Evas_Object *box;
+       box = elm_box_add(popup);
+       evas_object_size_hint_min_set(box, GET_POPUP_WIDTH(count) * elm_config_scale_get(), GET_POPUP_HEIGHT(count) * elm_config_scale_get());
+       evas_object_show(genlist);
+       elm_box_pack_end(box, genlist);
+       elm_object_content_set(popup, box);
+
+       if ( btn_close )
+       {
+               evas_object_smart_callback_add(btn_close, "clicked", _on_popup_close, pListPopup);
+       }
+
+       evas_object_event_callback_add(pListPopup->obj, EVAS_CALLBACK_DEL, _on_genpopup_deleted, pListPopup);
+
+       MSG_HIGH("Show Genlist Popup");
+
+       evas_object_show(popup);
+
+       return true;
+}
+
+
+bool ivug_listpopup_context_show(Evas_Object *obj, Evas_Object *hover, int x, int y)
+{
+       ListPopup *pListPopup = IV_LISTPOPUP(obj);
+
+       if ( pListPopup->popup )
+       {
+               MSG_WARN("Previous popup is remained");
+       }
+
+       Evas_Object* ctxpopup = NULL;
+       ctxpopup = elm_ctxpopup_add(obj);
+
+       if (!ctxpopup)
+       {
+               MSG_ERROR("Error : popup create failed.");
+               return false;
+       }
+
+       pListPopup->popup = ctxpopup;
+
+       elm_ctxpopup_hover_parent_set(ctxpopup, hover);
+
+       elm_ctxpopup_direction_priority_set(ctxpopup, ELM_CTXPOPUP_DIRECTION_DOWN,
+                                                                                               ELM_CTXPOPUP_DIRECTION_RIGHT,
+                                                                                               ELM_CTXPOPUP_DIRECTION_LEFT,
+                                                                                               ELM_CTXPOPUP_DIRECTION_UP);
+
+
+       ListPopupItem *pItem = NULL;
+       Eina_List *tmp;
+       Elm_Object_Item *gItem;
+
+       Evas_Object *icon;
+
+       EINA_LIST_FOREACH(pListPopup->list, tmp, pItem)
+       {
+               MSG_MED("Add popup item. %s", pItem->caption);
+
+               if ( pItem->iconpath )
+               {
+                       icon = elm_icon_add(ctxpopup);
+                       elm_icon_file_set(icon, pItem->iconpath, NULL);
+               }
+               else
+               {
+                       icon = NULL;
+               }
+
+               gItem = elm_ctxpopup_item_append(ctxpopup, pItem->caption, icon, _on_ctxpopup_selected, pItem);
+               pItem->item = gItem;
+
+               elm_object_item_disabled_set(gItem, pItem->bDisabled);
+       }
+
+       evas_object_event_callback_add(pListPopup->obj, EVAS_CALLBACK_DEL, _on_ctxpopup_deleted, pListPopup);
+
+       evas_object_smart_callback_add(ctxpopup, "dismissed", _on_dismissed_cb, pListPopup);
+
+       evas_object_move(ctxpopup, x, y);
+
+       MSG_HIGH("Show Context Popup(%d,%d)", x, y);
+
+       evas_object_show(ctxpopup);
+
+       return true;
+}
+
+