summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJisung Ahn <jcastle.ahn@samsung.com>2012-08-22 04:50:48 (GMT)
committerJisung Ahn <jcastle.ahn@samsung.com>2012-08-22 04:50:48 (GMT)
commita7dc75acd4634ef69430c60ccb7b22067507af3d (patch)
tree56ae2c60713cc639f24a8df234d66d06799df55f
parenta914248a31229bb81ed4ede970ca23e2490e0387 (diff)
downloadug-image-viewer-efl-a7dc75acd4634ef69430c60ccb7b22067507af3d.zip
ug-image-viewer-efl-a7dc75acd4634ef69430c60ccb7b22067507af3d.tar.gz
ug-image-viewer-efl-a7dc75acd4634ef69430c60ccb7b22067507af3d.tar.bz2
add missing file
Change-Id: Ic21b33793e72879be37296180ad43f19aa5785cb
-rwxr-xr-xcommon/include/ivug-callback.h37
-rwxr-xr-xcommon/include/ivug-config.h59
-rwxr-xr-xcommon/include/ivug-db.h67
-rwxr-xr-xcommon/include/ivug-drm.h92
-rwxr-xr-xcommon/include/ivug-exif.h36
-rwxr-xr-xcommon/include/ivug-file-info.h58
-rwxr-xr-xcommon/include/ivug-message.h44
-rwxr-xr-xcommon/include/ivug-util.h87
-rwxr-xr-xcommon/include/ivug-uuid.h47
-rwxr-xr-xcommon/src/ivug-callback.c50
-rwxr-xr-xcommon/src/ivug-callback.c.bak51
-rwxr-xr-xcommon/src/ivug-config.c223
-rwxr-xr-xcommon/src/ivug-db.c417
-rwxr-xr-xcommon/src/ivug-drm.c363
-rwxr-xr-xcommon/src/ivug-exif.c1460
-rwxr-xr-xcommon/src/ivug-file-info.c740
-rwxr-xr-xcommon/src/ivug-message.c548
-rwxr-xr-xcommon/src/ivug-util.c353
-rwxr-xr-xcommon/src/ivug-uuid.c96
-rwxr-xr-xfeature/CMakeLists.txt53
-rwxr-xr-xfeature/include/ivug-email.h50
-rwxr-xr-xfeature/include/ivug-ext-ug.h48
-rwxr-xr-xfeature/include/ivug-vibration.h49
-rwxr-xr-xfeature/src/ivug-ext-ug.c500
-rwxr-xr-xfeature/src/ivug-vibration.c118
-rwxr-xr-xinclude/ivug-datatypes.h61
-rwxr-xr-xinclude/ivug-define.h51
-rwxr-xr-xmain/layout/crop-view/T06_controlbar_bg.pngbin0 -> 114793 bytes
-rwxr-xr-xmain/layout/gengrid/00_winset_thumbs_bg.pngbin0 -> 3233 bytes
-rwxr-xr-xmain/layout/gengrid/00_winset_thumbs_focus_bg.pngbin0 -> 3145 bytes
-rwxr-xr-xmain/layout/icons/T01_btn_paused.pngbin0 -> 5941 bytes
-rwxr-xr-xmain/layout/images/theme/blue/00_winset_control_toolbar_bg.pngbin0 -> 2798 bytes
-rwxr-xr-xmain/layout/images/theme/blue/00_winset_control_top_arrow.pngbin0 -> 3055 bytes
-rwxr-xr-xmain/layout/images/theme/blue/00_winset_control_top_bg.pngbin0 -> 2807 bytes
-rwxr-xr-xmain/layout/images/theme/blue/00_winset_title_bg.pngbin0 -> 2799 bytes
-rwxr-xr-xmain/layout/images/theme/blue/00_winset_title_line.pngbin0 -> 2813 bytes
-rwxr-xr-xmain/layout/images/theme/blue/T01_Edit Field_clear.pngbin0 -> 3268 bytes
-rwxr-xr-xmain/layout/images/theme/blue/T01_title_btn.pngbin0 -> 3129 bytes
-rwxr-xr-xmain/layout/images/theme/blue/T01_title_btn_press.pngbin0 -> 3126 bytes
-rwxr-xr-xmain/layout/images/theme/white/00_winset_control_toolbar_bg.pngbin0 -> 2879 bytes
-rwxr-xr-xmain/layout/images/theme/white/00_winset_control_top_arrow.pngbin0 -> 3190 bytes
-rwxr-xr-xmain/layout/images/theme/white/00_winset_control_top_bg.pngbin0 -> 2844 bytes
-rwxr-xr-xmain/layout/images/theme/white/00_winset_title_bg.pngbin0 -> 2872 bytes
-rwxr-xr-xmain/layout/images/theme/white/00_winset_title_line.pngbin0 -> 2802 bytes
-rwxr-xr-xmain/layout/images/theme/white/T01_Edit Field_clear.pngbin0 -> 3268 bytes
-rwxr-xr-xmain/layout/images/theme/white/T01_title_btn.pngbin0 -> 3129 bytes
-rwxr-xr-xmain/layout/images/theme/white/T01_title_btn_press.pngbin0 -> 3126 bytes
-rwxr-xr-xmain/layout/ivug-crop-view.edc278
-rwxr-xr-xmain/layout/ivug-gengrid.edc211
-rwxr-xr-xmain/layout/ivug-name-view.edc96
-rwxr-xr-xmain/layout/ivug-popup.edc172
-rwxr-xr-xmain/layout/ivug-theme.edc171
-rwxr-xr-xmain/res/images/01_Control icon/00_winset_btn_prev.pngbin0 -> 3235 bytes
-rwxr-xr-xmain/res/images/01_Control icon/01_controlbar_icon_trim.pngbin0 -> 3523 bytes
-rwxr-xr-xmain/res/images/01_Control icon/01_controllbar_icon_close.pngbin0 -> 1076 bytes
-rwxr-xr-xmain/res/images/01_Control icon/T01_1_controlbar_icon_detail.pngbin0 -> 3273 bytes
-rwxr-xr-xmain/res/images/01_Control icon/T01_1_title_icon_set_as.pngbin0 -> 1520 bytes
-rwxr-xr-xmain/res/images/01_Control icon/T01_Option tray_Edit.pngbin0 -> 5876 bytes
-rwxr-xr-xmain/res/images/01_Control icon/T01_Title_icon_more.pngbin0 -> 3061 bytes
-rwxr-xr-xmain/res/images/01_Control icon/T01_controlbar_icon_add.pngbin0 -> 3009 bytes
-rwxr-xr-xmain/res/images/01_Control icon/T01_controlbar_icon_save.pngbin0 -> 3238 bytes
-rwxr-xr-xmain/res/images/01_Control icon/T01_controlbar_icon_share.pngbin0 -> 3310 bytes
-rwxr-xr-xmain/res/images/Popup_icon/T01_1_popup_icon_Crop.pngbin0 -> 1464 bytes
-rwxr-xr-xmain/res/images/Popup_icon/T01_1_popup_icon_Paste from Clipboard.pngbin0 -> 1547 bytes
-rwxr-xr-xmain/res/po/.pot142
-rwxr-xr-xmain/res/po/ar.po186
-rwxr-xr-xmain/res/po/bg.po186
-rwxr-xr-xmain/res/po/ca.po186
-rwxr-xr-xmain/res/po/cs.po186
-rwxr-xr-xmain/res/po/csv2po_v2bin0 -> 7586 bytes
-rwxr-xr-xmain/res/po/da.po186
-rwxr-xr-xmain/res/po/en_US.po186
-rwxr-xr-xmain/res/po/fi.po186
-rwxr-xr-xmain/res/po/he.po186
-rwxr-xr-xmain/res/po/hi.po186
-rwxr-xr-xmain/res/po/hr.po186
-rwxr-xr-xmain/res/po/hu.po186
-rwxr-xr-xmain/res/po/id.po186
-rwxr-xr-xmain/res/po/lt.po186
-rwxr-xr-xmain/res/po/lv.po186
-rwxr-xr-xmain/res/po/ms.po186
-rwxr-xr-xmain/res/po/no.po186
-rwxr-xr-xmain/res/po/pl.po186
-rwxr-xr-xmain/res/po/ro.po186
-rwxr-xr-xmain/res/po/sk.po186
-rwxr-xr-xmain/res/po/sl.po186
-rwxr-xr-xmain/res/po/sr.po186
-rwxr-xr-xmain/res/po/sv.po186
-rwxr-xr-xmain/res/po/th.po186
-rwxr-xr-xmain/res/po/uk.po186
-rwxr-xr-xmain/res/po/vi.po186
-rwxr-xr-xmain/src/control/ivug-context.c364
-rwxr-xr-xmain/src/control/ivug-context.h71
-rwxr-xr-xmain/src/control/ivug-crop-ug.cpp142
-rwxr-xr-xmain/src/control/ivug-crop-ug.h44
-rwxr-xr-xmain/src/control/ivug-detail-info.c703
-rwxr-xr-xmain/src/control/ivug-detail-info.h85
-rwxr-xr-xmain/src/control/ivug-filter.c161
-rwxr-xr-xmain/src/control/ivug-filter.h41
-rwxr-xr-xmain/src/control/ivug-popup.c643
-rwxr-xr-xmain/src/control/ivug-popup.h82
-rwxr-xr-xmain/src/control/ivug-selectioninfo.c151
-rwxr-xr-xmain/src/control/ivug-selectioninfo.h33
-rwxr-xr-xmain/src/control/ivug-setas.cpp321
-rwxr-xr-xmain/src/control/ivug-setas.h42
-rwxr-xr-xmain/src/control/ivug-widget.c215
-rwxr-xr-xmain/src/control/ivug-widget.h61
-rwxr-xr-xmain/src/include/ivug-common.h80
-rwxr-xr-xmain/src/include/ivug-crop-view.h70
-rwxr-xr-xmain/src/include/ivug-details-view.h78
-rwxr-xr-xmain/src/include/ivug-main-view.h211
-rwxr-xr-xmain/src/include/ivug-name-view.h78
-rwxr-xr-xmain/src/include/ivug-setas-view.h103
-rwxr-xr-xmain/src/include/ivug-slider-item.h181
-rwxr-xr-xmain/src/include/ivug-slider.h132
-rwxr-xr-xmain/src/include/ivug-string.h166
-rwxr-xr-xmain/src/slider/ivug-slider-item.cpp1203
-rwxr-xr-xmain/src/slider/ivug-slider-mouse.cpp819
-rwxr-xr-xmain/src/slider/ivug-slider-priv.h188
-rwxr-xr-xmain/src/slider/ivug-slider.cpp1201
-rwxr-xr-xmain/src/view/ivug-crop-view.cpp494
-rwxr-xr-xmain/src/view/ivug-main-view-menu.cpp920
-rwxr-xr-xmain/src/view/ivug-main-view-menu.h50
-rwxr-xr-xmain/src/view/ivug-main-view-toolbar.cpp478
-rwxr-xr-xmain/src/view/ivug-main-view-toolbar.h43
-rwxr-xr-xmain/src/view/ivug-main-view.cpp1775
-rwxr-xr-xmain/src/view/ivug-name-view.c436
-rwxr-xr-xmain/src/view/ivug-setas-view-callerid.cpp653
-rwxr-xr-xmain/src/view/ivug-setas-view-callerid.h49
-rwxr-xr-xmain/src/view/ivug-setas-view-wallpaper.cpp349
-rwxr-xr-xmain/src/view/ivug-setas-view-wallpaper.h43
-rwxr-xr-xmedialist/CMakeLists.txt50
-rwxr-xr-xmedialist/include/ivug-media.h74
-rwxr-xr-xmedialist/include/ivug-medialist.h101
-rwxr-xr-xmedialist/src/ivug-data-list.c273
-rwxr-xr-xmedialist/src/ivug-data-list.h41
-rwxr-xr-xmedialist/src/ivug-mediadata.c380
-rwxr-xr-xmedialist/src/ivug-mediadata.h52
-rwxr-xr-xmedialist/src/ivug-medialist.c687
-rwxr-xr-xpackaging/changelog3232
-rwxr-xr-xres/images/T01_Nocontents_broken.pngbin0 -> 4880 bytes
-rwxr-xr-xres/manifest/ug-image-viewer-efl.pngbin0 -> 12447 bytes
-rwxr-xr-xres/manifest/ug-image-viewer-efl.xml26
-rwxr-xr-xslideshow/CMakeLists.txt82
-rwxr-xr-xslideshow/include/ivug-slideshow.h137
-rwxr-xr-xslideshow/res/images/T01_Noise.pngbin0 -> 7937 bytes
-rwxr-xr-xslideshow/res/layout/icons/T01_btn_play.pngbin0 -> 6920 bytes
-rwxr-xr-xslideshow/res/layout/ivug-ss-ly.edc146
-rwxr-xr-xslideshow/src/effect/include/ivug-anim.h64
-rwxr-xr-xslideshow/src/effect/include/ivug-effect.h98
-rwxr-xr-xslideshow/src/effect/ivug-anim.c177
-rwxr-xr-xslideshow/src/effect/ivug-blind.c313
-rwxr-xr-xslideshow/src/effect/ivug-dissolve.c369
-rwxr-xr-xslideshow/src/effect/ivug-effect.c233
-rwxr-xr-xslideshow/src/effect/ivug-fade.c160
-rwxr-xr-xslideshow/src/effect/ivug-iris.c178
-rwxr-xr-xslideshow/src/effect/ivug-slide.c148
-rwxr-xr-xslideshow/src/effect/ivug-xcapture.c339
-rwxr-xr-xslideshow/src/effect/ivug-xcapture.h30
-rwxr-xr-xslideshow/src/effect/template.c82
-rwxr-xr-xslideshow/src/ivug-slideshow.cpp1002
-rwxr-xr-xwidget/CMakeLists.txt79
-rwxr-xr-xwidget/include/Animation.h114
-rwxr-xr-xwidget/include/ECoreAnimator.h124
-rwxr-xr-xwidget/include/EFLUtil.h61
-rwxr-xr-xwidget/include/EvasSmartObj.h168
-rwxr-xr-xwidget/include/Exception.h33
-rwxr-xr-xwidget/include/Object.h33
-rwxr-xr-xwidget/include/Primitives.h272
-rwxr-xr-xwidget/include/ScrollerClient.h122
-rwxr-xr-xwidget/include/Transit.h176
-rwxr-xr-xwidget/include/ivug-image.h119
-rwxr-xr-xwidget/include/ivug-listpopup.h71
-rwxr-xr-xwidget/include/ivug-scissorbox.h54
-rwxr-xr-xwidget/res/images/crop/T06_selection.pngbin0 -> 3259 bytes
-rwxr-xr-xwidget/res/images/crop/T06_selection_Delete.pngbin0 -> 5446 bytes
-rwxr-xr-xwidget/res/images/crop/T06_selection_Resizing_V.pngbin0 -> 5852 bytes
-rwxr-xr-xwidget/res/images/crop/T06_selection_Resizing_h.pngbin0 -> 6714 bytes
-rwxr-xr-xwidget/res/images/crop/T06_selection_Rotate.pngbin0 -> 7466 bytes
-rwxr-xr-xwidget/res/images/scissorbox/T01_CallerID_hold.pngbin0 -> 2881 bytes
-rwxr-xr-xwidget/res/images/scissorbox/T01_CallerID_line_W.pngbin0 -> 2802 bytes
-rwxr-xr-xwidget/res/images/scissorbox/T01_CallerID_line_W_press.pngbin0 -> 2808 bytes
-rwxr-xr-xwidget/res/images/scissorbox/T01_CallerID_line_h.pngbin0 -> 2807 bytes
-rwxr-xr-xwidget/res/images/scissorbox/T01_CallerID_line_h_press.pngbin0 -> 2807 bytes
-rwxr-xr-xwidget/res/images/scissorbox/T01_CallerID_normal.pngbin0 -> 2879 bytes
-rwxr-xr-xwidget/res/images/scissorbox/T01_CallerID_press.pngbin0 -> 2845 bytes
-rwxr-xr-xwidget/res/images/scissorbox/T01_btn_optiontray.pngbin0 -> 3151 bytes
-rwxr-xr-xwidget/res/layout/ivug-scroller.edc40
-rwxr-xr-xwidget/src/common/BufferCanvas.h54
-rwxr-xr-xwidget/src/common/Primitives.cpp61
-rwxr-xr-xwidget/src/common/Scroller.cpp1386
-rwxr-xr-xwidget/src/common/Scroller.h197
-rwxr-xr-xwidget/src/image/ivug-image-photocam.cpp487
-rwxr-xr-xwidget/src/scissorbox/ScissorBox.cpp1727
-rwxr-xr-xwidget/src/scissorbox/ScissorBox.h118
-rwxr-xr-xwidget/src/scissorbox/ivug-scissorbox.cpp122
-rwxr-xr-xwidget/src/util/EFLUtil.cpp355
-rwxr-xr-xwidget/src/util/ivug-listpopup.c483
198 files changed, 39367 insertions, 0 deletions
diff --git a/common/include/ivug-callback.h b/common/include/ivug-callback.h
new file mode 100755
index 0000000..fac346c
--- /dev/null
+++ b/common/include/ivug-callback.h
@@ -0,0 +1,37 @@
+/*
+ * 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_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
index 0000000..e6a480c
--- /dev/null
+++ b/common/include/ivug-config.h
@@ -0,0 +1,59 @@
+/*
+ * 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_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
index 0000000..7d6e7de
--- /dev/null
+++ b/common/include/ivug-db.h
@@ -0,0 +1,67 @@
+/*
+ * 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_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
index 0000000..891100c
--- /dev/null
+++ b/common/include/ivug-drm.h
@@ -0,0 +1,92 @@
+/*
+ * 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_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);
+
+/*
+ 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);
+
+/*
+ Decrypt DRM file and allocated in memory.
+
+ CAUTION : this functionn read entire file and allocate memory with size of entire file.
+*/
+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
index 0000000..a76913b
--- /dev/null
+++ b/common/include/ivug-exif.h
@@ -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
index 0000000..7f35502
--- /dev/null
+++ b/common/include/ivug-file-info.h
@@ -0,0 +1,58 @@
+/*
+ * 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_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
index 0000000..5d73980
--- /dev/null
+++ b/common/include/ivug-message.h
@@ -0,0 +1,44 @@
+/*
+ * 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 __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
index 0000000..fa0f99f
--- /dev/null
+++ b/common/include/ivug-util.h
@@ -0,0 +1,87 @@
+/*
+ * 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_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);
+
+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
index 0000000..661515e
--- /dev/null
+++ b/common/include/ivug-uuid.h
@@ -0,0 +1,47 @@
+/*
+ * 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_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
index 0000000..60daad8
--- /dev/null
+++ b/common/src/ivug-callback.c
@@ -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
index 0000000..87aa41a
--- /dev/null
+++ b/common/src/ivug-callback.c.bak
@@ -0,0 +1,51 @@
+/*
+ * 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-config.c b/common/src/ivug-config.c
new file mode 100755
index 0000000..2efd873
--- /dev/null
+++ b/common/src/ivug-config.c
@@ -0,0 +1,223 @@
+/*
+ * 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-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
index 0000000..288fe6e
--- /dev/null
+++ b/common/src/ivug-db.c
@@ -0,0 +1,417 @@
+/*
+ * 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-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
index 0000000..3f090bc
--- /dev/null
+++ b/common/src/ivug-drm.c
@@ -0,0 +1,363 @@
+/*
+ * 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-drm.h"
+
+#include <drm_client.h>
+
+#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
+
+
+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)
+ {
+ 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;
+}
+
+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)
+ {
+ 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;
+ }
+}
+
+
+drm_data_t * ivug_drm_check_constraint(const char* file_path)
+{
+
+ 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)
+ {
+ 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
index 0000000..97fe9d9
--- /dev/null
+++ b/common/src/ivug-exif.c
@@ -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
index 0000000..b4f985e
--- /dev/null
+++ b/common/src/ivug-file-info.c
@@ -0,0 +1,740 @@
+/*
+ * 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-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;
+}
+
+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;
+}
+
+
+
+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;
+ }
+ 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;
+ }
+ 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
index 0000000..efe8318
--- /dev/null
+++ b/common/src/ivug-message.c
@@ -0,0 +1,548 @@
+/*
+ * 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-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
index 0000000..abc5702
--- /dev/null
+++ b/common/src/ivug-util.c
@@ -0,0 +1,353 @@
+/*
+ * 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-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
index 0000000..4c8c2b1
--- /dev/null
+++ b/common/src/ivug-uuid.c
@@ -0,0 +1,96 @@
+/*
+ * 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-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
index 0000000..690bd1e
--- /dev/null
+++ b/feature/CMakeLists.txt
@@ -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} )
+
+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
index 0000000..1b409a8
--- /dev/null
+++ b/feature/include/ivug-email.h
@@ -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.
+ */
+
+#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
index 0000000..c44839d
--- /dev/null
+++ b/feature/include/ivug-ext-ug.h
@@ -0,0 +1,48 @@
+/*
+ * 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_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);
+
+ui_gadget_h ivug_ext_launch_contact(const char *uri, ug_destroy_cb func, void *data);
+
+
+bool ivug_ext_launch_browser(const char *uri);
+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
index 0000000..0523683
--- /dev/null
+++ b/feature/include/ivug-vibration.h
@@ -0,0 +1,49 @@
+/*
+ * 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_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
index 0000000..e8d1e4e
--- /dev/null
+++ b/feature/src/ivug-ext-ug.c
@@ -0,0 +1,500 @@
+/*
+ * 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 <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"
+
+#define VIDEOPLAYER_PKG_NAME "org.tizen.video-player"
+#define BROWSER_PKG_NAME "org.tizen.browser"
+
+#define MIME_TYPE_LEN 255
+
+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;
+ }
+}
+
+
+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);
+}
+
+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);
+}
+
+
+
+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);
+}
+
+
+
+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
index 0000000..8ffcf4d
--- /dev/null
+++ b/feature/src/ivug-vibration.c
@@ -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.
+ */
+
+#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 "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
index 0000000..4348b5e
--- /dev/null
+++ b/include/ivug-datatypes.h
@@ -0,0 +1,61 @@
+/*
+ * 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_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
index 0000000..6c706ea
--- /dev/null
+++ b/include/ivug-define.h
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+/*
+ 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
+
+#define IVUG_MAX_FILE_PATH_LEN (4096)
+
+#define DIR_MASK_DEFAULT 0775
+
+#define USE_CUSTOM_STYLE
+
+/*
+ Time analysis data will be stored as file
+*/
+#define TA_SAVETO_FILE
+
+// Temp. will be removed.
+#ifdef TARGET
+// todo about arm
+#endif
+
+#define USE_NEW_DB_API
+
+#define ZOOM_LEVEL_STEP (0.7)
+#define ZOOM_LEVEL_MAX (4)
+
diff --git a/main/layout/crop-view/T06_controlbar_bg.png b/main/layout/crop-view/T06_controlbar_bg.png
new file mode 100755
index 0000000..864585c
--- /dev/null
+++ b/main/layout/crop-view/T06_controlbar_bg.png
Binary files 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
index 0000000..6226c90
--- /dev/null
+++ b/main/layout/gengrid/00_winset_thumbs_bg.png
Binary files 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
index 0000000..3f0e9c4
--- /dev/null
+++ b/main/layout/gengrid/00_winset_thumbs_focus_bg.png
Binary files differ
diff --git a/main/layout/icons/T01_btn_paused.png b/main/layout/icons/T01_btn_paused.png
new file mode 100755
index 0000000..dae1d84
--- /dev/null
+++ b/main/layout/icons/T01_btn_paused.png
Binary files 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
index 0000000..33148b2
--- /dev/null
+++ b/main/layout/images/theme/blue/00_winset_control_toolbar_bg.png
Binary files 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
index 0000000..3f2ee50
--- /dev/null
+++ b/main/layout/images/theme/blue/00_winset_control_top_arrow.png
Binary files 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
index 0000000..10a24a7
--- /dev/null
+++ b/main/layout/images/theme/blue/00_winset_control_top_bg.png
Binary files 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
index 0000000..edaec4a
--- /dev/null
+++ b/main/layout/images/theme/blue/00_winset_title_bg.png
Binary files 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
index 0000000..62c098e
--- /dev/null
+++ b/main/layout/images/theme/blue/00_winset_title_line.png
Binary files 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
index 0000000..8335151
--- /dev/null
+++ b/main/layout/images/theme/blue/T01_Edit Field_clear.png
Binary files 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
index 0000000..20c31f1
--- /dev/null
+++ b/main/layout/images/theme/blue/T01_title_btn.png
Binary files 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
index 0000000..49861ed
--- /dev/null
+++ b/main/layout/images/theme/blue/T01_title_btn_press.png
Binary files 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
index 0000000..c46882d
--- /dev/null
+++ b/main/layout/images/theme/white/00_winset_control_toolbar_bg.png
Binary files 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
index 0000000..508c2c8
--- /dev/null
+++ b/main/layout/images/theme/white/00_winset_control_top_arrow.png
Binary files 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
index 0000000..d92230a
--- /dev/null
+++ b/main/layout/images/theme/white/00_winset_control_top_bg.png
Binary files 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
index 0000000..2e7fc72
--- /dev/null
+++ b/main/layout/images/theme/white/00_winset_title_bg.png
Binary files 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
index 0000000..e287978
--- /dev/null
+++ b/main/layout/images/theme/white/00_winset_title_line.png
Binary files 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
index 0000000..8335151
--- /dev/null
+++ b/main/layout/images/theme/white/T01_Edit Field_clear.png
Binary files 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
index 0000000..20c31f1
--- /dev/null
+++ b/main/layout/images/theme/white/T01_title_btn.png
Binary files 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
index 0000000..49861ed
--- /dev/null
+++ b/main/layout/images/theme/white/T01_title_btn_press.png
Binary files differ
diff --git a/main/layout/ivug-crop-view.edc b/main/layout/ivug-crop-view.edc
new file mode 100755
index 0000000..d368067
--- /dev/null
+++ b/main/layout/ivug-crop-view.edc
@@ -0,0 +1,278 @@
+/*
+ * 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.
+ */
+
+#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
index 0000000..ef9d56e
--- /dev/null
+++ b/main/layout/ivug-gengrid.edc
@@ -0,0 +1,211 @@
+/*
+ * 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-theme.edc"
+
+
+#define MARGIN (0)
+#define MARGIN_TOP (0)
+#define MARGIN_BOTTOM (0)
+
+collections {
+
+ styles {
+ style { name: "gengrid_textblock_style";
+ 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";
+ tag: "br" "\n";
+ tag: "ps" "ps";
+ tag: "tab" "\t";
+ tag: "b" "+ font=SLP:style=Bold";
+ }
+ }
+
+ group { name: "elm/gengrid/item/thumblist/default";
+ data.item: "contents" "elm.swallow.icon elm.swallow.end";
+ images {
+ image : "00_winset_thumbs_bg.png" COMP;
+ image : "00_winset_thumbs_focus_bg.png" COMP;
+ }
+ parts {
+ part { name: "bg";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: GENGRID_PART_BG_COLOR_INC;
+ }
+ }
+ part { name: "left_top_padding";
+ type: RECT;
+ scale : 1;
+ description { state: "default" 0.0;
+ min: MARGIN MARGIN_TOP;
+ align: 0.0 0.0;
+ visible: 0;
+ rel1.to: "bg";
+ rel2 {
+ relative: 0.0 0.0;
+ to: "bg";
+ }
+ }
+ }
+ part { name: "right_bottom_padding";
+ type: RECT;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: MARGIN MARGIN_BOTTOM;
+ align: 1.0 1.0;
+ visible: 0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "bg";
+ }
+ rel2.to: "bg";
+ }
+ }
+
+ part { name: "item_real_bg";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 0 0 0 255;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "left_top_padding";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "right_bottom_padding";
+ }
+ }
+ }
+ part { name: "item_real_bg_left_top_padding";
+ type: RECT;
+ scale : 1;
+ description { state: "default" 0.0;
+ min: 2 2;
+ align: 0.0 0.0;
+ visible: 0;
+ rel1.to: "item_real_bg";
+ rel2 {
+ relative: 0.0 0.0;
+ to: "item_real_bg";
+ }
+ }
+ }
+ part { name: "item_real_bg_right_bottom_padding";
+ type: RECT;
+ scale : 1;
+ description { state: "default" 0.0;
+ min: 2 2;
+ align: 1.0 1.0;
+ visible: 0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "item_real_bg";
+ }
+ rel2.to: "item_real_bg";
+ }
+ }
+
+ part { name: "elm.swallow.icon";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "item_real_bg_left_top_padding";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "item_real_bg_right_bottom_padding";
+ }
+ }
+ }
+
+ part { name: "elm.swallow.end";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ rel1.to: "elm.swallow.icon";
+ rel2.to: "elm.swallow.icon";
+ }
+ }
+ part { name: "focus_bg_left_top_padding";
+ type: RECT;
+ scale : 1;
+ description { state: "default" 0.0;
+ min: MARGIN MARGIN_TOP;
+ align: 0.0 0.0;
+ visible: 0;
+ rel1.to: "bg";
+ rel2 {
+ relative: 0.0 0.0;
+ to: "bg";
+ }
+ }
+ }
+ part { name: "focus_bg_right_bottom_padding";
+ type: RECT;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: MARGIN MARGIN_BOTTOM;
+ align: 1.0 1.0;
+ visible: 0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "bg";
+ }
+ rel2.to: "bg";
+ }
+ }
+ part { name: "focus_bg";
+ type: IMAGE;
+ description { state: "default" 0.0;
+ visible: 0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "focus_bg_left_top_padding";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "focus_bg_right_bottom_padding";
+ }
+ image.normal: "00_winset_thumbs_focus_bg.png";
+ }
+ description { state: "enabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ }
+#if 1
+ programs {
+ program { name: "go_mouse_down";
+ signal: "elm,state,selected";
+ source: "app";
+ action: STATE_SET "enabled" 0.0;
+ target: "focus_bg";
+ transition: ACCELERATE 0.1;
+ }
+ program { name: "go_mouse_up";
+ signal: "elm,state,unselected";
+ source: "app";
+ action: STATE_SET "default" 0.0;
+ target: "focus_bg";
+ transition: DECELERATE 0.1;
+ }
+#endif
+
+ }
+
+}
+
diff --git a/main/layout/ivug-name-view.edc b/main/layout/ivug-name-view.edc
new file mode 100755
index 0000000..3bc8b91
--- /dev/null
+++ b/main/layout/ivug-name-view.edc
@@ -0,0 +1,96 @@
+/*
+ * 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.
+ */
+
+#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
index 0000000..15649a6
--- /dev/null
+++ b/main/layout/ivug-popup.edc
@@ -0,0 +1,172 @@
+/*
+ * 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.
+ */
+
+/* referenced by elm_demo "popup_checkview" in popup_custom.edc */
+collections {
+ group { name: "popup_checkview";
+ parts{
+ part { name: "background";
+ type: RECT;
+ 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: "pad_t";
+ scale : 1;
+ mouse_events: 0;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ align: 0.5 0.0;
+ min: 0 14;
+ fixed: 0 1;
+ rel1 {
+ relative: 1.0 0.0;to_x: "pad_l";
+ }
+ rel2 {
+ relative: 0.0 0.0;to_x: "pad_r";
+ }
+ }
+ }
+ part { name: "pad_l";
+ scale: 1;
+ description { state: "default" 0.0;
+ min : 10 0;
+ fixed: 1 0;
+ rel1 {
+ relative: 0.0 0.0;
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ }
+ align: 0.0 0.0;
+ }
+ }
+ part { name: "pad_r";
+ scale: 1;
+ description { state: "default" 0.0;
+ min : 10 0;
+ fixed: 1 0;
+ rel1 {
+ relative: 1.0 0.0;
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ }
+ align: 1.0 0.0;
+ }
+ }
+ part{ name:"elm.swallow.content";
+ type: SWALLOW;
+ scale : 1;
+ description { state: "default" 0.0;
+ min: 380 0;
+ align: 0.5 0.5;
+ fixed: 1 0;
+ rel1 {
+ relative: 0.5 1.0;
+ to: "pad_t";
+ }
+ rel2 {
+ relative: 0.5 0.0;
+ to: "pad_b";
+ }
+ }
+ }
+ part { name: "pad_b";
+ scale : 1;
+ mouse_events: 0;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ align: 0.5 1.0;
+ min: 0 100;
+ fixed: 0 1;
+ rel1 {
+ relative: 1.0 1.0;to_x: "pad_l";
+ }
+ rel2 {
+ relative: 0.0 1.0;to_x: "pad_r";
+ }
+ }
+ }
+ part { name: "elm.swallow.end";
+ type: SWALLOW;
+ scale : 1;
+ mouse_events: 1;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ align: 0.0 1.0;
+ rel1 {
+ relative: 0.1 0.0;
+ to: "pad_b";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to: "pad_b";
+ }
+ }
+ }
+ part { name: "elm.text";
+ type: TEXT;
+ scale : 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ text {
+ font: "SLP:style=Medium";
+ size: 36;
+ min: 0 0;
+ align: 0.5 0.5;
+ text_class: "slp_medium";
+ }
+ color: 0 0 0 255;
+ align: 0.0 1.0;
+ rel1 {
+ relative: 0.2 0.0;
+ to: "pad_b";
+ }
+ rel2 {
+ relative: 0.8 1.0;
+ to: "pad_b";
+ }
+ }
+ }
+ }
+ }
+
+ group { name: "popup_entryview";
+ parts{
+ part{ name:"elm.swallow.content";
+ type: SWALLOW;
+ scale : 1;
+ description { state: "default" 0.0;
+ align: 0.5 0.5;
+ rel1 {
+ relative: 0.0 0.0;
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ }
+ }
+ }
+ }
+ }
+}
+
diff --git a/main/layout/ivug-theme.edc b/main/layout/ivug-theme.edc
new file mode 100755
index 0000000..0129d0e
--- /dev/null
+++ b/main/layout/ivug-theme.edc
@@ -0,0 +1,171 @@
+/*
+ * 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.
+ */
+
+/*
+* 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
index 0000000..d45184d
--- /dev/null
+++ b/main/res/images/01_Control icon/00_winset_btn_prev.png
Binary files 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
index 0000000..53dba05
--- /dev/null
+++ b/main/res/images/01_Control icon/01_controlbar_icon_trim.png
Binary files 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
index 0000000..91b04e5
--- /dev/null
+++ b/main/res/images/01_Control icon/01_controllbar_icon_close.png
Binary files 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
index 0000000..9e746c8
--- /dev/null
+++ b/main/res/images/01_Control icon/T01_1_controlbar_icon_detail.png
Binary files 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
index 0000000..72b74da
--- /dev/null
+++ b/main/res/images/01_Control icon/T01_1_title_icon_set_as.png
Binary files 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
index 0000000..a6aef95
--- /dev/null
+++ b/main/res/images/01_Control icon/T01_Option tray_Edit.png
Binary files 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
index 0000000..651c8e1
--- /dev/null
+++ b/main/res/images/01_Control icon/T01_Title_icon_more.png
Binary files 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
index 0000000..e60bfb9
--- /dev/null
+++ b/main/res/images/01_Control icon/T01_controlbar_icon_add.png
Binary files 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
index 0000000..39baa6a
--- /dev/null
+++ b/main/res/images/01_Control icon/T01_controlbar_icon_save.png
Binary files 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
index 0000000..f21b00c
--- /dev/null
+++ b/main/res/images/01_Control icon/T01_controlbar_icon_share.png
Binary files 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
index 0000000..40cff3c
--- /dev/null
+++ b/main/res/images/Popup_icon/T01_1_popup_icon_Crop.png
Binary files 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
index 0000000..14b8895
--- /dev/null
+++ b/main/res/images/Popup_icon/T01_1_popup_icon_Paste from Clipboard.png
Binary files differ
diff --git a/main/res/po/.pot b/main/res/po/.pot
new file mode 100755
index 0000000..1f0dd57
--- /dev/null
+++ b/main/res/po/.pot
@@ -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
index 0000000..9fe1d75
--- /dev/null
+++ b/main/res/po/ar.po
@@ -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
index 0000000..406ee05
--- /dev/null
+++ b/main/res/po/bg.po
@@ -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
index 0000000..ff84b36
--- /dev/null
+++ b/main/res/po/ca.po
@@ -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
index 0000000..39fd66a
--- /dev/null
+++ b/main/res/po/cs.po
@@ -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
index 0000000..d925512
--- /dev/null
+++ b/main/res/po/csv2po_v2
Binary files differ
diff --git a/main/res/po/da.po b/main/res/po/da.po
new file mode 100755
index 0000000..126f85d
--- /dev/null
+++ b/main/res/po/da.po
@@ -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
index 0000000..3bed3f6
--- /dev/null
+++ b/main/res/po/en_US.po
@@ -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
index 0000000..6c6986b
--- /dev/null
+++ b/main/res/po/fi.po
@@ -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
index 0000000..2fa99b5
--- /dev/null
+++ b/main/res/po/he.po
@@ -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
index 0000000..00c34ca
--- /dev/null
+++ b/main/res/po/hi.po
@@ -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
index 0000000..4e70f10
--- /dev/null
+++ b/main/res/po/hr.po
@@ -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
index 0000000..5b61e49
--- /dev/null
+++ b/main/res/po/hu.po
@@ -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
index 0000000..7995a7e
--- /dev/null
+++ b/main/res/po/id.po
@@ -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
index 0000000..a9e0c60
--- /dev/null
+++ b/main/res/po/lt.po
@@ -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
index 0000000..42aa63d
--- /dev/null
+++ b/main/res/po/lv.po
@@ -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
index 0000000..3d4ffab
--- /dev/null
+++ b/main/res/po/ms.po
@@ -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
index 0000000..124603f
--- /dev/null
+++ b/main/res/po/no.po
@@ -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
index 0000000..6135001
--- /dev/null
+++ b/main/res/po/pl.po
@@ -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
index 0000000..7466e6d
--- /dev/null
+++ b/main/res/po/ro.po
@@ -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
index 0000000..db0400d
--- /dev/null
+++ b/main/res/po/sk.po
@@ -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
index 0000000..1517a89
--- /dev/null
+++ b/main/res/po/sl.po
@@ -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
index 0000000..5d44e7b
--- /dev/null
+++ b/main/res/po/sr.po
@@ -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
index 0000000..6ddfd51
--- /dev/null
+++ b/main/res/po/sv.po
@@ -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
index 0000000..f63c307
--- /dev/null
+++ b/main/res/po/th.po
@@ -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
index 0000000..bf5325a
--- /dev/null
+++ b/main/res/po/uk.po
@@ -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
index 0000000..c82c054
--- /dev/null
+++ b/main/res/po/vi.po
@@ -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
index 0000000..d6b8b95
--- /dev/null
+++ b/main/src/control/ivug-context.c
@@ -0,0 +1,364 @@
+/*
+ * 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-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
index 0000000..69e9270
--- /dev/null
+++ b/main/src/control/ivug-context.h
@@ -0,0 +1,71 @@
+/*
+ * 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_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
index 0000000..13bcb40
--- /dev/null
+++ b/main/src/control/ivug-crop-ug.cpp
@@ -0,0 +1,142 @@
+/*
+ * 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 <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)
+{
+ 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
index 0000000..d1921a1
--- /dev/null
+++ b/main/src/control/ivug-crop-ug.h
@@ -0,0 +1,44 @@
+/*
+ * 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_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
index 0000000..d6f7f9f
--- /dev/null
+++ b/main/src/control/ivug-detail-info.c
@@ -0,0 +1,703 @@
+/*
+ * 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-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
index 0000000..b98f14b
--- /dev/null
+++ b/main/src/control/ivug-detail-info.h
@@ -0,0 +1,85 @@
+/*
+ * 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_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
index 0000000..56e08f7
--- /dev/null
+++ b/main/src/control/ivug-filter.c
@@ -0,0 +1,161 @@
+/*
+ * 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-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
index 0000000..482740d
--- /dev/null
+++ b/main/src/control/ivug-filter.h
@@ -0,0 +1,41 @@
+/*
+ * 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_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
index 0000000..78c9d5e
--- /dev/null
+++ b/main/src/control/ivug-popup.c
@@ -0,0 +1,643 @@
+/*
+ * 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-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;
+}
+
+Evas_Object*
+ivug_1btn_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;
+ //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_OK);
+ 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);
+
+ 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;
+}
+
+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
index 0000000..dd1a1ba
--- /dev/null
+++ b/main/src/control/ivug-popup.h
@@ -0,0 +1,82 @@
+/*
+ * 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_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
+
+Evas_Object* ivug_1btn_popup_show(Evas_Object* parent, const char* title,
+ const char* contents, Evas_Smart_Cb response, void* user_data);
+
+
+/*
+ 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
+*/
+
+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
index 0000000..10aa0c8
--- /dev/null
+++ b/main/src/control/ivug-selectioninfo.c
@@ -0,0 +1,151 @@
+/*
+ * 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-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
index 0000000..ceb01a4
--- /dev/null
+++ b/main/src/control/ivug-selectioninfo.h
@@ -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.
+ */
+
+#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
index 0000000..18db6fe
--- /dev/null
+++ b/main/src/control/ivug-setas.cpp
@@ -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
index 0000000..9564954
--- /dev/null
+++ b/main/src/control/ivug-setas.h
@@ -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
index 0000000..502a13c
--- /dev/null
+++ b/main/src/control/ivug-widget.c
@@ -0,0 +1,215 @@
+/*
+ * 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-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
index 0000000..9433e46
--- /dev/null
+++ b/main/src/control/ivug-widget.h
@@ -0,0 +1,61 @@
+/*
+ * 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_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
index 0000000..6ebc0e2
--- /dev/null
+++ b/main/src/include/ivug-common.h
@@ -0,0 +1,80 @@
+/*
+ * 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_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
index 0000000..40b278a
--- /dev/null
+++ b/main/src/include/ivug-crop-view.h
@@ -0,0 +1,70 @@
+/*
+ * 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_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;
+
+ Ecore_Timer *timer;
+
+ Evas_Object *btn_ok;
+
+ 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
index 0000000..97b2658
--- /dev/null
+++ b/main/src/include/ivug-details-view.h
@@ -0,0 +1,78 @@
+/*
+ * 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 __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
index 0000000..c41a70b
--- /dev/null
+++ b/main/src/include/ivug-main-view.h
@@ -0,0 +1,211 @@
+/*
+ * 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_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;
+
+ Evas_Object *zoom_slider;
+ int zoom_level;
+
+/*
+ |------------------|
+ | 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;
+
+#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
index 0000000..4e76df7
--- /dev/null
+++ b/main/src/include/ivug-name-view.h
@@ -0,0 +1,78 @@
+/*
+ * 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_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
index 0000000..5b7cce6
--- /dev/null
+++ b/main/src/include/ivug-setas-view.h
@@ -0,0 +1,103 @@
+/*
+ * 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_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
index 0000000..d1b9dca
--- /dev/null
+++ b/main/src/include/ivug-slider-item.h
@@ -0,0 +1,181 @@
+/*
+ * 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-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;
+};
+
+#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
index 0000000..4ca46ee
--- /dev/null
+++ b/main/src/include/ivug-slider.h
@@ -0,0 +1,132 @@
+/*
+ * 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_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
index 0000000..77ea725
--- /dev/null
+++ b/main/src/include/ivug-string.h
@@ -0,0 +1,166 @@
+/*
+ * 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_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
index 0000000..490bcc5
--- /dev/null
+++ b/main/src/slider/ivug-slider-item.cpp
@@ -0,0 +1,1203 @@
+/*
+ * 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-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;
+}
+
+static bool _stop_drm_consume(Slide_Item *si)
+{
+ return true;
+}
+
+static bool _pause_drm_consume(Slide_Item *si)
+{
+ return true;
+}
+
+static bool _resume_drm_consume(Slide_Item *si)
+{
+ return true;
+}
+
+
+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);
+
+ MSG_SITEM_ERROR("Image loading failed. RO expired File=%s", mdata->filepath);
+ si->state = SLIDE_STATE_ERROR;
+
+ evas_object_hide(si->photocam);
+ _show_thumbnail(si, DRM_NO_RIGHT_IMAGE_PATH);
+
+ _call_user_callback(si);
+
+ return false;
+ }
+ 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
index 0000000..78f9f04
--- /dev/null
+++ b/main/src/slider/ivug-slider-mouse.cpp
@@ -0,0 +1,819 @@
+/*
+ * 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-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
index 0000000..6c81284
--- /dev/null
+++ b/main/src/slider/ivug-slider-priv.h
@@ -0,0 +1,188 @@
+/*
+ * 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_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
index 0000000..1504e2a
--- /dev/null
+++ b/main/src/slider/ivug-slider.cpp
@@ -0,0 +1,1201 @@
+/*
+ * 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 <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.");
+ sd->load_idler = ecore_idler_add(_idler_loading_func, sd);
+}
+
+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
index 0000000..49411d0
--- /dev/null
+++ b/main/src/view/ivug-crop-view.cpp
@@ -0,0 +1,494 @@
+/*
+ * 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 <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");
+}
+
+static Eina_Bool _on_crop_timer_expired(void *data)
+{
+ IvugCropView *pCropView = static_cast<IvugCropView *>(data);
+
+ pCropView->timer = NULL;
+
+ elm_object_disabled_set(pCropView->btn_ok, EINA_FALSE);
+
+ MSG_HIGH("Image preloaded");
+
+ 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);
+
+ return ECORE_CALLBACK_CANCEL;
+}
+
+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");
+
+ double zoom = ivug_image_zoom_get(pCropView->photocam);
+
+ MSG_HIGH("zoom = %g", zoom);
+
+ pCropView->timer = ecore_timer_add(0.5, _on_crop_timer_expired, data);
+
+ return;
+}
+
+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, p