sync main branch
authorJisung Ahn <jcastle.ahn@samsung.com>
Fri, 7 Dec 2012 01:23:50 +0000 (10:23 +0900)
committerJisung Ahn <jcastle.ahn@samsung.com>
Fri, 7 Dec 2012 01:45:13 +0000 (10:45 +0900)
Change-Id: Icc72e6e1684119f0b73f9cb1df03c8c10e654718

313 files changed:
CMakeLists.txt
LICENSE [changed mode: 0755->0644]
NOTICE [changed mode: 0755->0644]
common/CMakeLists.txt [changed mode: 0755->0644]
common/include/debug.h [changed mode: 0755->0644]
common/include/ivug-callback.h [changed mode: 0755->0644]
common/include/ivug-config.h [changed mode: 0755->0644]
common/include/ivug-db.h [changed mode: 0755->0644]
common/include/ivug-debug.h [changed mode: 0755->0644]
common/include/ivug-dir.h [new file with mode: 0644]
common/include/ivug-drm-common.h [moved from common/include/ivug-drm.h with 100% similarity, mode: 0644]
common/include/ivug-exif.h [changed mode: 0755->0644]
common/include/ivug-file-info.h [changed mode: 0755->0644]
common/include/ivug-message.h [changed mode: 0755->0644]
common/include/ivug-mouse-event.h [changed mode: 0755->0644]
common/include/ivug-util.h [changed mode: 0755->0644]
common/include/ivug-uuid.h [changed mode: 0755->0644]
common/include/statistics.h [changed mode: 0755->0644]
common/src/debug.c [changed mode: 0755->0644]
common/src/ivug-callback.c [changed mode: 0755->0644]
common/src/ivug-callback.c.bak [changed mode: 0755->0644]
common/src/ivug-config.c [changed mode: 0755->0644]
common/src/ivug-db.c [changed mode: 0755->0644]
common/src/ivug-dir.cpp [new file with mode: 0644]
common/src/ivug-drm-common.c [moved from common/src/ivug-drm.c with 92% similarity, mode: 0644]
common/src/ivug-exif.c [changed mode: 0755->0644]
common/src/ivug-file-info.c [changed mode: 0755->0644]
common/src/ivug-message.c [changed mode: 0755->0644]
common/src/ivug-mouse-event.c [changed mode: 0755->0644]
common/src/ivug-util.c [changed mode: 0755->0644]
common/src/ivug-uuid.c [changed mode: 0755->0644]
common/src/statistics.c [changed mode: 0755->0644]
feature/CMakeLists.txt [changed mode: 0755->0644]
feature/include/ivug-email.h [deleted file]
feature/include/ivug-ext-ug.h [changed mode: 0755->0644]
feature/include/ivug-vibration.h [changed mode: 0755->0644]
feature/src/ivug-ext-ug.c [changed mode: 0755->0644]
feature/src/ivug-vibration.c [changed mode: 0755->0644]
include/ivug-datatypes.h [changed mode: 0755->0644]
include/ivug-define.h [changed mode: 0755->0644]
main/CMakeLists.txt [changed mode: 0755->0644]
main/layout/gengrid/00_winset_thumbs_bg.png [changed mode: 0755->0644]
main/layout/gengrid/00_winset_thumbs_focus_bg.png [changed mode: 0755->0644]
main/layout/genlist/genlist_group_index.edc [changed mode: 0755->0644]
main/layout/genlist/genlist_macro.edc [changed mode: 0755->0644]
main/layout/genlist/genlist_size.edc [changed mode: 0755->0644]
main/layout/genlist/genlist_styles.edc [changed mode: 0755->0644]
main/layout/genlist/genlist_textblock_styles.edc [changed mode: 0755->0644]
main/layout/genlist/ivug-genlist.edc [changed mode: 0755->0644]
main/layout/icons/01_Header icon/01_header_icon_add.png [deleted file]
main/layout/icons/01_Header icon/01_header_icon_edit.png [deleted file]
main/layout/icons/01_Header icon/01_header_icon_others.png [deleted file]
main/layout/icons/T01_Facebook.png [moved from main/layout/icons/01_Header icon/01_header_icon_cancel.png with 86% similarity, mode: 0644]
main/layout/icons/T01_btn_paused.png [changed mode: 0755->0644]
main/layout/icons/T01_btn_play.png [changed mode: 0755->0644]
main/layout/images/00_zoom_in.png [deleted file]
main/layout/images/00_zoom_in_press.png [deleted file]
main/layout/images/00_zoom_out.png [deleted file]
main/layout/images/00_zoom_out_press.png [deleted file]
main/layout/images/T01_btn_thumbnail_play.png [deleted file]
main/layout/images/theme/blue/00_winset_control_toolbar_bg.png [changed mode: 0755->0644]
main/layout/images/theme/blue/00_winset_control_top_arrow.png [changed mode: 0755->0644]
main/layout/images/theme/blue/00_winset_control_top_bg.png [changed mode: 0755->0644]
main/layout/images/theme/blue/00_winset_title_bg.png [changed mode: 0755->0644]
main/layout/images/theme/blue/00_winset_title_line.png [changed mode: 0755->0644]
main/layout/images/theme/blue/T01_Edit Field_clear.png [changed mode: 0755->0644]
main/layout/images/theme/blue/T01_title_btn.png [changed mode: 0755->0644]
main/layout/images/theme/blue/T01_title_btn_press.png [changed mode: 0755->0644]
main/layout/images/theme/white/00_winset_control_toolbar_bg.png [changed mode: 0755->0644]
main/layout/images/theme/white/00_winset_control_top_arrow.png [changed mode: 0755->0644]
main/layout/images/theme/white/00_winset_control_top_bg.png [changed mode: 0755->0644]
main/layout/images/theme/white/00_winset_divider_line.png [moved from main/layout/images/theme/white/00_winset_title_line.png with 95% similarity, mode: 0644]
main/layout/images/theme/white/00_winset_title_bg.png [changed mode: 0755->0644]
main/layout/images/theme/white/T01_Edit Field_clear.png [changed mode: 0755->0644]
main/layout/images/theme/white/T01_title_btn.png [changed mode: 0755->0644]
main/layout/images/theme/white/T01_title_btn_press.png [changed mode: 0755->0644]
main/layout/ivug-base.edc [changed mode: 0755->0644]
main/layout/ivug-crop-view.edc [changed mode: 0755->0644]
main/layout/ivug-details.edc [changed mode: 0755->0644]
main/layout/ivug-effect.edc [changed mode: 0755->0644]
main/layout/ivug-gengrid.edc [changed mode: 0755->0644]
main/layout/ivug-icons.edc [changed mode: 0755->0644]
main/layout/ivug-main.edc [changed mode: 0755->0644]
main/layout/ivug-name-view.edc [changed mode: 0755->0644]
main/layout/ivug-naviframe.edc [changed mode: 0755->0644]
main/layout/ivug-popup.edc [changed mode: 0755->0644]
main/layout/ivug-selectioninfo.edc [changed mode: 0755->0644]
main/layout/ivug-setas.edc [changed mode: 0755->0644]
main/layout/ivug-slider.edc [changed mode: 0755->0644]
main/layout/ivug-slideshow-view.edc [moved from main/src/control/ivug-filter.h with 58% similarity, mode: 0644]
main/layout/ivug-theme.edc [changed mode: 0755->0644]
main/res/images/01_Control icon/00_winset_btn_prev.png [changed mode: 0755->0644]
main/res/images/01_Control icon/01_controlbar_icon_trim.png [changed mode: 0755->0644]
main/res/images/01_Control icon/01_controllbar_icon_close.png [changed mode: 0755->0644]
main/res/images/01_Control icon/T01_1_controlbar_icon_Rotate left.png [new file with mode: 0644]
main/res/images/01_Control icon/T01_1_controlbar_icon_Rotate right.png [new file with mode: 0644]
main/res/images/01_Control icon/T01_1_controlbar_icon_detail.png [changed mode: 0755->0644]
main/res/images/01_Control icon/T01_1_title_icon_device.png [new file with mode: 0644]
main/res/images/01_Control icon/T01_1_title_icon_set_as.png [changed mode: 0755->0644]
main/res/images/01_Control icon/T01_Option tray_Edit.png [changed mode: 0755->0644]
main/res/images/01_Control icon/T01_Title_icon_more.png [changed mode: 0755->0644]
main/res/images/01_Control icon/T01_controlbar_icon_add.png [changed mode: 0755->0644]
main/res/images/01_Control icon/T01_controlbar_icon_addtag.png [moved from main/layout/icons/01_Header icon/01_header_icon_done.png with 68% similarity, mode: 0644]
main/res/images/01_Control icon/T01_controlbar_icon_delete.png [changed mode: 0755->0644]
main/res/images/01_Control icon/T01_controlbar_icon_save.png [changed mode: 0755->0644]
main/res/images/01_Control icon/T01_controlbar_icon_share.png [changed mode: 0755->0644]
main/res/images/01_Control icon/T01_controlbar_icon_slideshow.png [changed mode: 0755->0644]
main/res/images/Popup_icon/T01_1_popup_icon_Crop.png [deleted file]
main/res/images/Popup_icon/T01_1_popup_icon_Paste from Clipboard.png [deleted file]
main/res/images/image_drm_no_rights.jpg [changed mode: 0755->0644]
main/res/po/.pot [deleted file]
main/res/po/update-po.sh [deleted file]
main/src/control/ivug-buddy-ug.cpp [new file with mode: 0644]
main/src/control/ivug-buddy-ug.h [moved from main/src/ug-image-viewer.h with 56% similarity, mode: 0644]
main/src/control/ivug-context.c [changed mode: 0755->0644]
main/src/control/ivug-context.h [changed mode: 0755->0644]
main/src/control/ivug-crop-ug.cpp [changed mode: 0755->0644]
main/src/control/ivug-crop-ug.h [changed mode: 0755->0644]
main/src/control/ivug-detail-info.c [changed mode: 0755->0644]
main/src/control/ivug-detail-info.h [changed mode: 0755->0644]
main/src/control/ivug-parameter.c [changed mode: 0755->0644]
main/src/control/ivug-parameter.h [changed mode: 0755->0644]
main/src/control/ivug-popup.c [changed mode: 0755->0644]
main/src/control/ivug-popup.h [changed mode: 0755->0644]
main/src/control/ivug-selectioninfo.c [changed mode: 0755->0644]
main/src/control/ivug-selectioninfo.h [changed mode: 0755->0644]
main/src/control/ivug-setas.cpp [changed mode: 0755->0644]
main/src/control/ivug-setas.h [changed mode: 0755->0644]
main/src/control/ivug-widget.c [changed mode: 0755->0644]
main/src/control/ivug-widget.h [changed mode: 0755->0644]
main/src/include/ivug-common.h [changed mode: 0755->0644]
main/src/include/ivug-crop-view.h [changed mode: 0755->0644]
main/src/include/ivug-details-view.h [changed mode: 0755->0644]
main/src/include/ivug-main-view.h [changed mode: 0755->0644]
main/src/include/ivug-name-view.h [changed mode: 0755->0644]
main/src/include/ivug-setas-view.h [changed mode: 0755->0644]
main/src/include/ivug-slider-item.h [changed mode: 0755->0644]
main/src/include/ivug-slider.h [changed mode: 0755->0644]
main/src/include/ivug-slideshow-view.h [new file with mode: 0644]
main/src/slider/ivug-slider-item.cpp [changed mode: 0755->0644]
main/src/slider/ivug-slider-mouse.cpp [changed mode: 0755->0644]
main/src/slider/ivug-slider-priv.h [changed mode: 0755->0644]
main/src/slider/ivug-slider.cpp [changed mode: 0755->0644]
main/src/ug-image-viewer.c [deleted file]
main/src/ug-image-viewer.cpp [new file with mode: 0644]
main/src/view/ivug-crop-view.cpp [changed mode: 0755->0644]
main/src/view/ivug-details-view.c [changed mode: 0755->0644]
main/src/view/ivug-main-view-menu.cpp [changed mode: 0755->0644]
main/src/view/ivug-main-view-menu.h [changed mode: 0755->0644]
main/src/view/ivug-main-view-toolbar.cpp [changed mode: 0755->0644]
main/src/view/ivug-main-view-toolbar.h [changed mode: 0755->0644]
main/src/view/ivug-main-view.cpp [changed mode: 0755->0644]
main/src/view/ivug-name-view.c [changed mode: 0755->0644]
main/src/view/ivug-setas-view-callerid.cpp [changed mode: 0755->0644]
main/src/view/ivug-setas-view-callerid.h [changed mode: 0755->0644]
main/src/view/ivug-setas-view-wallpaper.cpp [changed mode: 0755->0644]
main/src/view/ivug-setas-view-wallpaper.h [changed mode: 0755->0644]
main/src/view/ivug-setas-view.c [changed mode: 0755->0644]
main/src/view/ivug-slideshow-view.cpp [new file with mode: 0644]
medialist/CMakeLists.txt [changed mode: 0755->0644]
medialist/include/ivug-filter.h [new file with mode: 0644]
medialist/include/ivug-media.h [changed mode: 0755->0644]
medialist/include/ivug-medialist.h [changed mode: 0755->0644]
medialist/src/ivug-data-list.c [changed mode: 0755->0644]
medialist/src/ivug-data-list.h [changed mode: 0755->0644]
medialist/src/ivug-filter.c [moved from main/src/control/ivug-filter.c with 63% similarity, mode: 0644]
medialist/src/ivug-mediadata.c [changed mode: 0755->0644]
medialist/src/ivug-mediadata.h [changed mode: 0755->0644]
medialist/src/ivug-medialist.c [changed mode: 0755->0644]
packaging/changelog [new file with mode: 0644]
packaging/ug-image-viewer-efl.spec [changed mode: 0755->0644]
res/CMakeLists.txt [new file with mode: 0644]
res/appicon/ug-image-viewer-efl.png [new file with mode: 0644]
res/images/T01_Nocontents_broken.png [changed mode: 0755->0644]
res/include/ivug-string.h [moved from main/src/include/ivug-string.h with 73% similarity, mode: 0644]
res/manifest/ug-image-viewer-efl.png [deleted file]
res/po/CMakeLists.txt [moved from main/res/po/CMakeLists.txt with 93% similarity, mode: 0644]
res/po/ar.po [moved from main/res/po/ar.po with 100% similarity, mode: 0644]
res/po/az.po [moved from main/res/po/az.po with 100% similarity, mode: 0644]
res/po/bg.po [moved from main/res/po/bg.po with 100% similarity, mode: 0644]
res/po/ca.po [moved from main/res/po/ca.po with 100% similarity, mode: 0644]
res/po/cs.po [moved from main/res/po/cs.po with 100% similarity, mode: 0644]
res/po/csv2po_v2 [moved from main/res/po/csv2po_v2 with 100% similarity, mode: 0644]
res/po/da.po [moved from main/res/po/da.po with 100% similarity, mode: 0644]
res/po/de_DE.po [moved from main/res/po/de_DE.po with 100% similarity, mode: 0644]
res/po/el_GR.po [moved from main/res/po/el_GR.po with 100% similarity, mode: 0644]
res/po/en.po [moved from main/res/po/en.po with 100% similarity, mode: 0644]
res/po/en_PH.po [moved from main/res/po/en_PH.po with 100% similarity, mode: 0644]
res/po/en_US.po [moved from main/res/po/en_US.po with 100% similarity, mode: 0644]
res/po/es_ES.po [moved from main/res/po/es_ES.po with 100% similarity, mode: 0644]
res/po/es_MX.po [moved from main/res/po/es_MX.po with 100% similarity, mode: 0644]
res/po/et.po [moved from main/res/po/et.po with 100% similarity, mode: 0644]
res/po/eu.po [moved from main/res/po/eu.po with 100% similarity, mode: 0644]
res/po/fi.po [moved from main/res/po/fi.po with 100% similarity, mode: 0644]
res/po/fr_CA.po [moved from main/res/po/fr_CA.po with 100% similarity, mode: 0644]
res/po/fr_FR.po [moved from main/res/po/fr_FR.po with 100% similarity, mode: 0644]
res/po/ga.po [moved from main/res/po/ga.po with 100% similarity, mode: 0644]
res/po/gl.po [moved from main/res/po/gl.po with 100% similarity, mode: 0644]
res/po/hi.po [moved from main/res/po/hi.po with 100% similarity, mode: 0644]
res/po/hr.po [moved from main/res/po/hr.po with 100% similarity, mode: 0644]
res/po/hu.po [moved from main/res/po/hu.po with 100% similarity, mode: 0644]
res/po/hy.po [moved from main/res/po/hy.po with 100% similarity, mode: 0644]
res/po/is.po [moved from main/res/po/is.po with 100% similarity, mode: 0644]
res/po/it_IT.po [moved from main/res/po/it_IT.po with 100% similarity, mode: 0644]
res/po/ja_JP.po [moved from main/res/po/ja_JP.po with 100% similarity, mode: 0644]
res/po/ka.po [moved from main/res/po/ka.po with 100% similarity, mode: 0644]
res/po/kk.po [moved from main/res/po/kk.po with 100% similarity, mode: 0644]
res/po/ko_KR.po [moved from main/res/po/ko_KR.po with 100% similarity, mode: 0644]
res/po/lt.po [moved from main/res/po/lt.po with 100% similarity, mode: 0644]
res/po/lv.po [moved from main/res/po/lv.po with 100% similarity, mode: 0644]
res/po/mk.po [moved from main/res/po/mk.po with 100% similarity, mode: 0644]
res/po/nb.po [moved from main/res/po/nb.po with 100% similarity, mode: 0644]
res/po/nl_NL.po [moved from main/res/po/nl_NL.po with 100% similarity, mode: 0644]
res/po/pl.po [moved from main/res/po/pl.po with 100% similarity, mode: 0644]
res/po/pt_BR.po [moved from main/res/po/pt_BR.po with 100% similarity, mode: 0644]
res/po/pt_PT.po [moved from main/res/po/pt_PT.po with 100% similarity, mode: 0644]
res/po/ro.po [moved from main/res/po/ro.po with 100% similarity, mode: 0644]
res/po/ru_RU.po [moved from main/res/po/ru_RU.po with 100% similarity, mode: 0644]
res/po/sk.po [moved from main/res/po/sk.po with 100% similarity, mode: 0644]
res/po/sl.po [moved from main/res/po/sl.po with 100% similarity, mode: 0644]
res/po/sr.po [moved from main/res/po/sr.po with 100% similarity, mode: 0644]
res/po/sv.po [moved from main/res/po/sv.po with 100% similarity, mode: 0644]
res/po/tr_TR.po [moved from main/res/po/tr_TR.po with 100% similarity, mode: 0644]
res/po/uk.po [moved from main/res/po/uk.po with 100% similarity, mode: 0644]
res/po/uz.po [moved from main/res/po/uz.po with 100% similarity, mode: 0644]
res/po/zh_CN.po [moved from main/res/po/zh_CN.po with 100% similarity, mode: 0644]
res/po/zh_HK.po [moved from main/res/po/zh_HK.po with 100% similarity, mode: 0644]
res/po/zh_SG.po [moved from main/res/po/zh_SG.po with 100% similarity, mode: 0644]
res/po/zh_TW.po [moved from main/res/po/zh_TW.po with 100% similarity, mode: 0644]
slideshow/CMakeLists.txt [changed mode: 0755->0644]
slideshow/include/ivug-slideshow.h [changed mode: 0755->0644]
slideshow/res/images/T01_Noise.png [changed mode: 0755->0644]
slideshow/res/layout/icons/T01_btn_play.png [changed mode: 0755->0644]
slideshow/res/layout/ivug-ss-ly.edc [changed mode: 0755->0644]
slideshow/src/control/ivug-dali-util.cpp [new file with mode: 0644]
slideshow/src/control/ivug-dali-util.h [new file with mode: 0644]
slideshow/src/control/ivug-slideshow.cpp [moved from slideshow/src/ivug-slideshow.cpp with 86% similarity, mode: 0644]
slideshow/src/dali_effect/include/ivug-app-navigation.h [new file with mode: 0644]
slideshow/src/dali_effect/include/ivug-constraints.h [new file with mode: 0644]
slideshow/src/dali_effect/include/ivug-dali-imageview.h [new file with mode: 0644]
slideshow/src/dali_effect/include/ivug-dali-slideshow-view.h [new file with mode: 0644]
slideshow/src/dali_effect/include/ivug-dali.h [new file with mode: 0644]
slideshow/src/dali_effect/include/ivug-image-view.h [new file with mode: 0644]
slideshow/src/dali_effect/include/ivug-includes.h [new file with mode: 0644]
slideshow/src/dali_effect/include/ivug-slideshow-control.h [new file with mode: 0644]
slideshow/src/dali_effect/include/ivug-slideshow-effect.h [new file with mode: 0644]
slideshow/src/dali_effect/include/ivug-slideshow-face.h [new file with mode: 0644]
slideshow/src/dali_effect/include/ivug-view-stack-info.h [new file with mode: 0644]
slideshow/src/dali_effect/include/ivug-water-ripple-effect.h [new file with mode: 0644]
slideshow/src/dali_effect/src/ivug-app-navigation.cpp [new file with mode: 0644]
slideshow/src/dali_effect/src/ivug-dali-imageview.cpp [new file with mode: 0644]
slideshow/src/dali_effect/src/ivug-dali-slideshow-view.cpp [new file with mode: 0644]
slideshow/src/dali_effect/src/ivug-dali.cpp [new file with mode: 0644]
slideshow/src/dali_effect/src/ivug-image-view.cpp [new file with mode: 0644]
slideshow/src/dali_effect/src/ivug-includes.cpp [new file with mode: 0644]
slideshow/src/dali_effect/src/ivug-slideshow-control.cpp [new file with mode: 0644]
slideshow/src/dali_effect/src/ivug-slideshow-effect.cpp [new file with mode: 0644]
slideshow/src/dali_effect/src/ivug-slideshow-face.cpp [new file with mode: 0644]
slideshow/src/dali_effect/src/ivug-view-stack-info.cpp [new file with mode: 0644]
slideshow/src/dali_effect/src/ivug-water-ripple-effect.cpp [new file with mode: 0644]
slideshow/src/effect/include/ivug-anim.h [changed mode: 0755->0644]
slideshow/src/effect/include/ivug-effect.h [changed mode: 0755->0644]
slideshow/src/effect/ivug-anim.c [changed mode: 0755->0644]
slideshow/src/effect/ivug-blind.c [changed mode: 0755->0644]
slideshow/src/effect/ivug-dissolve.c [changed mode: 0755->0644]
slideshow/src/effect/ivug-effect.c [changed mode: 0755->0644]
slideshow/src/effect/ivug-fade.c [changed mode: 0755->0644]
slideshow/src/effect/ivug-iris.c [changed mode: 0755->0644]
slideshow/src/effect/ivug-slide.c [changed mode: 0755->0644]
slideshow/src/effect/ivug-xcapture.c [changed mode: 0755->0644]
slideshow/src/effect/ivug-xcapture.h [changed mode: 0755->0644]
slideshow/src/effect/template.c [changed mode: 0755->0644]
slideshow/src/include/ivug-slideshow-priv.h [new file with mode: 0644]
ug-image-viewer-efl.manifest [changed mode: 0755->0644]
ug-image-viewer-efl.xml [moved from res/manifest/ug-image-viewer-efl.xml with 90% similarity, mode: 0644]
widget/CMakeLists.txt
widget/include/Animation.h [changed mode: 0755->0644]
widget/include/ECoreAnimator.h [changed mode: 0755->0644]
widget/include/EFLUtil.h [changed mode: 0755->0644]
widget/include/EvasSmartObj.h [changed mode: 0755->0644]
widget/include/Exception.h [changed mode: 0755->0644]
widget/include/Object.h [changed mode: 0755->0644]
widget/include/Primitives.h [changed mode: 0755->0644]
widget/include/ScrollerClient.h [deleted file]
widget/include/Transit.h [changed mode: 0755->0644]
widget/include/ivug-image.h [changed mode: 0755->0644]
widget/include/ivug-listpopup.h [changed mode: 0755->0644]
widget/include/ivug-scissorbox.h [changed mode: 0755->0644]
widget/res/images/crop/T06_selection.png [changed mode: 0755->0644]
widget/res/images/crop/T06_selection_Delete.png [changed mode: 0755->0644]
widget/res/images/crop/T06_selection_Resizing_V.png [changed mode: 0755->0644]
widget/res/images/crop/T06_selection_Resizing_h.png [changed mode: 0755->0644]
widget/res/images/crop/T06_selection_Rotate.png [changed mode: 0755->0644]
widget/res/images/scissorbox/T01_CallerID_hold.png [changed mode: 0755->0644]
widget/res/images/scissorbox/T01_CallerID_line_W.png [changed mode: 0755->0644]
widget/res/images/scissorbox/T01_CallerID_line_W_press.png [changed mode: 0755->0644]
widget/res/images/scissorbox/T01_CallerID_line_h.png [changed mode: 0755->0644]
widget/res/images/scissorbox/T01_CallerID_line_h_press.png [changed mode: 0755->0644]
widget/res/images/scissorbox/T01_CallerID_normal.png [changed mode: 0755->0644]
widget/res/images/scissorbox/T01_CallerID_press.png [changed mode: 0755->0644]
widget/res/images/scissorbox/T01_btn_optiontray.png [deleted file]
widget/res/images/scroller/transparent_bg.png [new file with mode: 0644]
widget/res/layout/ivug-scroller.edc [changed mode: 0755->0644]
widget/src/common/BufferCanvas.h [changed mode: 0755->0644]
widget/src/common/Primitives.cpp [changed mode: 0755->0644]
widget/src/common/Scroller.cpp [deleted file]
widget/src/common/Scroller.h [deleted file]
widget/src/image/ivug-image.cpp [moved from widget/src/image/ivug-image-photocam.cpp with 64% similarity, mode: 0644]
widget/src/scissorbox/ScissorBox.cpp [changed mode: 0755->0644]
widget/src/scissorbox/ScissorBox.h [changed mode: 0755->0644]
widget/src/scissorbox/ivug-scissorbox.cpp [changed mode: 0755->0644]
widget/src/util/EFLUtil.cpp [changed mode: 0755->0644]
widget/src/util/ivug-listpopup.c [changed mode: 0755->0644]

index 9b7858c..7dd8938 100755 (executable)
@@ -3,7 +3,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 SET(IVUG_PACKAGE_NAME "ug-image-viewer-efl")
 
 # BUILD_TC can have TRUE or FALSE
-SET(BUILD_TC FALSE)
+#SET(BUILD_TC TRUE)
 
 IF("${ARCH}" STREQUAL "arm")
        ADD_DEFINITIONS("-DTARGET")
@@ -13,6 +13,7 @@ ADD_DEFINITIONS("-DDATADIR=\"${CMAKE_DATA_DIR}\"")
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 ADD_DEFINITIONS("-DPACKAGE=\"${IVUG_PACKAGE_NAME}\"")
+ADD_DEFINITIONS("-DIVAPI=")
 
 SET(IVUG_SOURCE_COMMON_DIR             "${CMAKE_SOURCE_DIR}/common")
 SET(IVUG_SOURCE_WIDGET_DIR             "${CMAKE_SOURCE_DIR}/widget")
@@ -20,6 +21,14 @@ SET(IVUG_SOURCE_MAIN_DIR             "${CMAKE_SOURCE_DIR}/main")
 SET(IVUG_SOURCE_MEDIA_DIR              "${CMAKE_SOURCE_DIR}/medialist")
 SET(IVUG_SOURCE_SLIDESHOW_DIR  "${CMAKE_SOURCE_DIR}/slideshow")
 SET(IVUG_SOURCE_FEATURE_DIR    "${CMAKE_SOURCE_DIR}/feature")
+SET(IVUG_SOURCE_RESOURCE_DIR   "${CMAKE_SOURCE_DIR}/res")
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS}")
+
+message("CFLAGS="${CMAKE_C_FLAGS})
+message("CXXFLAGS="${CMAKE_CXX_FLAGS})
+message("LDFLAGS="${LDFLAGS})
 
 FUNCTION (BUILD_EDJ _in _out _base _dir)
        ADD_CUSTOM_TARGET(${_out}
@@ -34,19 +43,20 @@ FUNCTION (BUILD_EDJ _in _out _base _dir)
        INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${_base}/${_out} DESTINATION ${CMAKE_INSTALL_PREFIX}/res/edje/${IVUG_PACKAGE_NAME})
 ENDFUNCTION (BUILD_EDJ)
 
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/images/ DESTINATION ${CMAKE_INSTALL_PREFIX}/res/images/${IVUG_PACKAGE_NAME})
-
-#CONFIGURE_FILE(${IVUG_PACKAGE_NAME}.desktop.in ${CMAKE_BINARY_DIR}/${IVUG_PACKAGE_NAME}.desktop)
-#INSTALL(FILES ${CMAKE_BINARY_DIR}/${IVUG_PACKAGE_NAME}.desktop DESTINATION /opt/share/applications)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/manifest/${IVUG_PACKAGE_NAME}.xml DESTINATION /opt/share/packages)
-
 ADD_SUBDIRECTORY(main)
 ADD_SUBDIRECTORY(common)
 ADD_SUBDIRECTORY(medialist)
 ADD_SUBDIRECTORY(widget)
 ADD_SUBDIRECTORY(slideshow)
 ADD_SUBDIRECTORY(feature)
+ADD_SUBDIRECTORY(res)
+
+# Install manifest
+INSTALL(FILES ${IVUG_PACKAGE_NAME}.xml DESTINATION /usr/share/packages)
+
+INSTALL(FILES LICENSE DESTINATION /usr/share/license RENAME ${IVUG_PACKAGE_NAME})
 
 IF (BUILD_TC)
        ADD_SUBDIRECTORY(TC)
 ENDIF()
+
diff --git a/LICENSE b/LICENSE
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/NOTICE b/NOTICE
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index f51ffea..60e6f51
@@ -10,13 +10,14 @@ SET(SRCS
        src/statistics.c
        src/ivug-uuid.c
        src/ivug-util.c
-       src/ivug-drm.c
+       src/ivug-drm-common.c
        src/ivug-file-info.c
        src/ivug-callback.c
        src/ivug-config.c
        src/ivug-message.c
        src/ivug-exif.c
        src/ivug-db.c
+       src/ivug-dir.cpp
 )
 
 INCLUDE_DIRECTORIES(
@@ -25,8 +26,6 @@ INCLUDE_DIRECTORIES(
        src
 )
 
-MESSAGE("Checking " ${PROJECT_NAME}\r)
-
 INCLUDE(FindPkgConfig)
 pkg_check_modules(${PROJECT_NAME}_pkgs REQUIRED
        elementary
@@ -35,26 +34,29 @@ pkg_check_modules(${PROJECT_NAME}_pkgs REQUIRED
        ecore-file
        efreet-mime
        dlog
+       libweb-media                    # needed by ivug-db.h
        drm-client
+       drm-trusted
        libexif
        vconf
+       icu-i18n
        capi-system-power
        capi-media-metadata-extractor
        capi-content-mime-type
        capi-content-media-content
+       capi-system-system-settings
+       capi-system-runtime-info
 )
 
 FOREACH(flag ${${PROJECT_NAME}_pkgs_CFLAGS})
-       SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
+       SET(EXTRA_FLAGS "${EXTRA_FLAGS} ${flag}")
 ENDFOREACH(flag)
 
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -Wall")
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS}")
-
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 
-ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+ADD_LIBRARY(${PROJECT_NAME} STATIC ${SRCS})
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION} )
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS ${EXTRA_FLAGS})
 
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${${PROJECT_NAME}_pkgs_LDFLAGS})
 
old mode 100755 (executable)
new mode 100644 (file)
index daa8583..c6d03a1
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 __ELM_MYPHOTOCAM_DEBUG_H__
 #define __ELM_MYPHOTOCAM_DEBUG_H__
old mode 100755 (executable)
new mode 100644 (file)
index fac346c..de903c6
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
@@ -25,6 +25,10 @@ typedef struct {
        void *data;
 }callback_handle_t;
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 callback_handle_t * ivug_callback_register(void);
 
 void ivug_callback_set_callback(callback_handle_t *handle, callback_func_t callback, void *data);
@@ -33,5 +37,9 @@ void ivug_callback_call(callback_handle_t *handle, void *data1, void *data2, voi
 
 void ivug_callback_unregister(callback_handle_t *handle);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif                         // __IVUG_CALLBACK_H__
 //! End of a file
old mode 100755 (executable)
new mode 100644 (file)
index e6a480c..210e3b4
@@ -1,24 +1,26 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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>
 
+#include "ivug-define.h"
+
 typedef enum {
        SLIDE_SHOW_MODE_NORMAL                  = 0x00,
        SLIDE_SHOW_MODE_REPEAT                  = 0x01,
@@ -32,8 +34,14 @@ typedef enum {
        IVUG_EFFECT_TYPE_IRIS= 0x00,
        IVUG_EFFECT_TYPE_DISSOLVE,
        IVUG_EFFECT_TYPE_SLIDE,
+       IVUG_EFFECT_TYPE_RIPPLE_FADE,
        IVUG_EFFECT_TYPE_DISSOLVE_FADE,
+       IVUG_EFFECT_TYPE_SWIRL,
+       IVUG_EFFECT_TYPE_WATER_RIPPLE,
+       IVUG_EFFECT_TYPE_ZOOM,
        IVUG_EFFECT_TYPE_SPLIT,
+       IVUG_EFFECT_TYPE_3D_RAND,
+       IVUG_EFFECT_TYPE_FACE,
        IVUG_EFFECT_TYPE_MAX,
 } ivug_effect_type;
 
@@ -51,6 +59,13 @@ void ivug_config_get_slideshow_setting(slide_show_mode * /* OUT */ mode,
                                                        double * /* OUT */ interval_time,
                                                        ivug_effect_type * /* OUT */ effect_type);
 
+
+bool ivug_config_get_use_inlineplay(bool *bUse);
+
+bool ivug_config_get_slideshow_music_state(void);
+char *ivug_config_get_slideshow_music_path(void);
+
+
 #ifdef __cplusplus
 }
 #endif
old mode 100755 (executable)
new mode 100644 (file)
index 7cb1c90..8a793da
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
@@ -27,38 +27,57 @@ extern "C" {
 
 typedef void *filter_handle;
 typedef void *media_handle;
+typedef void *tag_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);\r
-\r
-bool ivug_db_rename(media_handle m_handle, const char *dest);\r
+bool ivug_db_destroy(void);
+
+bool ivug_db_update(media_handle media);
+bool ivug_db_refresh(const char *media_id);
+bool ivug_db_rename(media_handle m_handle, const char *dest);
 
 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_insert_file_to_DB(const char* filepath);
+
 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);
+tag_handle ivug_db_get_tag_handle(const char* tagname);
 
 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);
+bool ivug_db_get_all_tag_list(ivug_db_cb callback, void *data);
+
+bool ivug_db_create_tag(tag_handle *tag_h, const char *tag_name);
+bool ivug_db_destroy_tag(tag_handle tag_h);
+bool ivug_db_set_tag(media_handle m_handle, tag_handle t_handle);
+
+bool ivug_db_set_favorite(media_handle media, bool set);
+
+int ivug_db_get_tag_id(tag_handle media);
 
 /*
        below functions returned values should be freed by user
 */
-char *ivug_db_get_file_path(media_handle media);\r
-char *ivug_db_get_thumbnail_path(media_handle media);\r
+char *ivug_db_get_file_path(media_handle media);
+char *ivug_db_get_file_id(media_handle media);
+char *ivug_db_get_thumbnail_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);
+char *ivug_db_get_tag_name(tag_handle media);
+
+bool ivug_db_get_file_size(media_handle media, unsigned long long *size);
 
 
 #ifdef __cplusplus
old mode 100755 (executable)
new mode 100644 (file)
index 8d0b0c9..bc40baa
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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_DEBUG_H_
 #define _IVUG_DEBUG_H_
@@ -91,7 +91,7 @@ enum {
 */
 
 #define MSG_MOUSE_SZCAT "IV-MOUSE"
-#define LVL_MOUSE DBG_MSG_LVL_HIGH
+#define LVL_MOUSE DBG_MSG_LVL_WARN
 
 #define MSG_MOUSE_FATAL(...)   __MSG_FATAL(LVL_MOUSE, MSG_MOUSE_SZCAT, ##__VA_ARGS__)
 #define MSG_MOUSE_ERROR(...)   __MSG_ERROR(LVL_MOUSE, MSG_MOUSE_SZCAT, ##__VA_ARGS__)
@@ -134,7 +134,7 @@ enum {
 #define MSG_SETAS_LOW(...)                     __MSG_LOW(LVL_SETAS, SETAS_SZ, ##__VA_ARGS__)
 
 #define DETAIL_SZ "IV-DETAIL"
-#define LVL_DETAIL DBG_MSG_LVL_MED
+#define LVL_DETAIL DBG_MSG_LVL_WARN
 
 #define MSG_DETAIL_FATAL(...)          __MSG_FATAL(LVL_DETAIL, DETAIL_SZ, ##__VA_ARGS__)
 #define MSG_DETAIL_ERROR(...)          __MSG_ERROR(LVL_DETAIL, DETAIL_SZ, ##__VA_ARGS__)
@@ -143,6 +143,17 @@ enum {
 #define MSG_DETAIL_MED(...)                    __MSG_MED(LVL_DETAIL, DETAIL_SZ, ##__VA_ARGS__)
 #define MSG_DETAIL_LOW(...)                    __MSG_LOW(LVL_DETAIL, DETAIL_SZ, ##__VA_ARGS__)
 
+#define BEST_SZ "IV-BEST"
+#define LVL_BEST DBG_MSG_LVL_HIGH
+
+#define MSG_BEST_FATAL(...)            __MSG_FATAL(LVL_BEST, BEST_SZ, ##__VA_ARGS__)
+#define MSG_BEST_ERROR(...)            __MSG_ERROR(LVL_BEST, BEST_SZ, ##__VA_ARGS__)
+#define MSG_BEST_WARN(...)             __MSG_WARN(LVL_BEST, BEST_SZ, ##__VA_ARGS__)
+#define MSG_BEST_HIGH(...)             __MSG_HIGH(LVL_BEST, BEST_SZ, ##__VA_ARGS__)
+#define MSG_BEST_MED(...)                      __MSG_MED(LVL_BEST, BEST_SZ, ##__VA_ARGS__)
+#define MSG_BEST_LOW(...)                      __MSG_LOW(LVL_BEST, BEST_SZ, ##__VA_ARGS__)
+
+
 #define SDATA_SZ "IV-SDATA"
 #define LVL_SDATA DBG_MSG_LVL_HIGH
 
@@ -164,6 +175,15 @@ enum {
 #define MSG_IMAGEVIEW_MED(...)                 __MSG_MED(LVL_IVCOMMON, IVCOMMON_SZ, ##__VA_ARGS__)
 #define MSG_IMAGEVIEW_LOW(...)                 __MSG_LOW(LVL_IVCOMMON, IVCOMMON_SZ, ##__VA_ARGS__)
 
+#define MSG_IVUG_FATAL(...)                    __MSG_FATAL(LVL_IVCOMMON, IVCOMMON_SZ, ##__VA_ARGS__)
+#define MSG_IVUG_ERROR(...)                            __MSG_ERROR(LVL_IVCOMMON, IVCOMMON_SZ, ##__VA_ARGS__)
+#define MSG_IVUG_WARN(...)                             __MSG_WARN(LVL_IVCOMMON, IVCOMMON_SZ, ##__VA_ARGS__)
+#define MSG_IVUG_HIGH(...)                             __MSG_HIGH(LVL_IVCOMMON, IVCOMMON_SZ, ##__VA_ARGS__)
+#define MSG_IVUG_MED(...)                              __MSG_MED(LVL_IVCOMMON, IVCOMMON_SZ, ##__VA_ARGS__)
+#define MSG_IVUG_LOW(...)                              __MSG_LOW(LVL_IVCOMMON, IVCOMMON_SZ, ##__VA_ARGS__)
+
+
+
 #define MAINVIEW_SZ "IV-MAIN"
 #define LVL_MAINVIEW DBG_MSG_LVL_HIGH
 
@@ -175,7 +195,7 @@ enum {
 #define MSG_MAIN_LOW(...)                      __MSG_LOW(LVL_MAINVIEW, MAINVIEW_SZ, ##__VA_ARGS__)
 
 #define UTIL_SZ "IV-UTIL"
-#define LVL_UTIL DBG_MSG_LVL_HIGH
+#define LVL_UTIL DBG_MSG_LVL_WARN
 
 #define MSG_UTIL_FATAL(...)            __MSG_FATAL(LVL_UTIL, UTIL_SZ, ##__VA_ARGS__)
 #define MSG_UTIL_ERROR(...)            __MSG_ERROR(LVL_UTIL, UTIL_SZ, ##__VA_ARGS__)
@@ -184,18 +204,8 @@ enum {
 #define MSG_UTIL_MED(...)                      __MSG_MED(LVL_UTIL, UTIL_SZ, ##__VA_ARGS__)
 #define MSG_UTIL_LOW(...)                      __MSG_LOW(LVL_UTIL, UTIL_SZ, ##__VA_ARGS__)
 
-#define IVUG_SZ "IV-COMMON"
-#define LVL_IVUG DBG_MSG_LVL_HIGH
-
-#define MSG_IVUG_FATAL(...)                            __MSG_FATAL(LVL_IVUG, IVUG_SZ, ##__VA_ARGS__)
-#define MSG_IVUG_ERROR(...)            __MSG_ERROR(LVL_IVUG, IVUG_SZ, ##__VA_ARGS__)
-#define MSG_IVUG_WARN(...)                     __MSG_WARN(LVL_IVUG, IVUG_SZ, ##__VA_ARGS__)
-#define MSG_IVUG_HIGH(...)                     __MSG_HIGH(LVL_IVUG, IVUG_SZ, ##__VA_ARGS__)
-#define MSG_IVUG_MED(...)                      __MSG_MED(LVL_IVUG, IVUG_SZ, ##__VA_ARGS__)
-#define MSG_IVUG_LOW(...)                      __MSG_LOW(LVL_IVUG, IVUG_SZ, ##__VA_ARGS__)
-
 #define NOTI_SZ "IV-NOTI"
-#define LVL_NOTI DBG_MSG_LVL_LOW
+#define LVL_NOTI DBG_MSG_LVL_WARN
 
 #define MSG_NOTI_FATAL(...)                            __MSG_FATAL(LVL_NOTI, NOTI_SZ, ##__VA_ARGS__)
 #define MSG_NOTI_ERROR(...)            __MSG_ERROR(LVL_NOTI, NOTI_SZ, ##__VA_ARGS__)
@@ -204,18 +214,8 @@ enum {
 #define MSG_NOTI_MED(...)                      __MSG_MED(LVL_NOTI, NOTI_SZ, ##__VA_ARGS__)
 #define MSG_NOTI_LOW(...)                      __MSG_LOW(LVL_NOTI, NOTI_SZ, ##__VA_ARGS__)
 
-#define PHOTO_SZ "IV-PHOTO"
-#define LVL_PHOTO DBG_MSG_LVL_HIGH
-
-#define MSG_PHOTO_FATAL(...)                           __MSG_FATAL(LVL_PHOTO, PHOTO_SZ, ##__VA_ARGS__)
-#define MSG_PHOTO_ERROR(...)           __MSG_ERROR(LVL_PHOTO, PHOTO_SZ, ##__VA_ARGS__)
-#define MSG_PHOTO_WARN(...)                    __MSG_WARN(LVL_PHOTO, PHOTO_SZ, ##__VA_ARGS__)
-#define MSG_PHOTO_HIGH(...)                    __MSG_HIGH(LVL_PHOTO, PHOTO_SZ, ##__VA_ARGS__)
-#define MSG_PHOTO_MED(...)                     __MSG_MED(LVL_PHOTO, PHOTO_SZ, ##__VA_ARGS__)
-#define MSG_PHOTO_LOW(...)                     __MSG_LOW(LVL_PHOTO, PHOTO_SZ, ##__VA_ARGS__)
-
 #define EFFECT_SZ "IV-EFFECT"
-#define LVL_EFFECT DBG_MSG_LVL_HIGH
+#define LVL_EFFECT DBG_MSG_LVL_WARN
 
 #define MSG_EFFECT_FATAL(...)                          __MSG_FATAL(LVL_EFFECT, EFFECT_SZ, ##__VA_ARGS__)
 #define MSG_EFFECT_ERROR(...)          __MSG_ERROR(LVL_EFFECT, EFFECT_SZ, ##__VA_ARGS__)
@@ -224,9 +224,8 @@ enum {
 #define MSG_EFFECT_MED(...)                    __MSG_MED(LVL_EFFECT, EFFECT_SZ, ##__VA_ARGS__)
 #define MSG_EFFECT_LOW(...)                    __MSG_LOW(LVL_EFFECT, EFFECT_SZ, ##__VA_ARGS__)
 
-
 #define SLIST_ITEM_SZ "IV-SLIST"
-#define LVL_SLIST_ITEM DBG_MSG_LVL_HIGH
+#define LVL_SLIST_ITEM DBG_MSG_LVL_WARN
 
 #define MSG_SLIST_FATAL(...)           __MSG_FATAL(LVL_SLIST_ITEM, SLIST_ITEM_SZ, ##__VA_ARGS__)
 #define MSG_SLIST_ERROR(...)           __MSG_ERROR(LVL_SLIST_ITEM, SLIST_ITEM_SZ, ##__VA_ARGS__)
diff --git a/common/include/ivug-dir.h b/common/include/ivug-dir.h
new file mode 100644 (file)
index 0000000..90c9961
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef __IVUG_DIR_H__
+#define __IVUG_DIR_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void (*EnumFilesCB)(const char *fname, void *data);
+
+
+/*
+       Enumerate file name in @dir & call user callback function indicated by @pFunc..
+
+       Synchrounous function.
+*/
+bool EnumFilesInDir(const char *dir, EnumFilesCB pFunc, void *data);
+
+/*
+       Retrieve file count in @dir.
+       return -1 when error occured.
+*/
+int GetFilesCountInDir(const char *dir);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif                 // __IVUG_DIR_H__
+
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from common/include/ivug-drm.h
rename to common/include/ivug-drm-common.h
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 7f35502..ce3fa00
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
@@ -47,7 +47,16 @@ char *ivug_fileinfo_get_file_extension(const char *filepath);
        CAUTION : user should free returned string.
 */
 char *ivug_fileinfo_get_mime_type(const char *filepath);
-
+char *ivug_fileinfo_get_focal_length(const char *path);
+char *ivug_fileinfo_get_model_name(const char *path);
+char *ivug_fileinfo_get_maker_name(const char *path);
+char *ivug_fileinfo_get_aperture(const char *path);
+char *ivug_fileinfo_get_exposure_time(const char *path);
+char *ivug_fileinfo_get_iso(const char *path);
+
+int ivug_fileinfo_get_flash_status(const char *path);
+int ivug_fileinfo_get_orientation(const char *path);
+int ivug_fileinfo_get_white_balance(const char *path);
 
 #ifdef __cplusplus
 }
old mode 100755 (executable)
new mode 100644 (file)
index 5d73980..c688226
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
old mode 100755 (executable)
new mode 100644 (file)
index cc2832a..f8393f1
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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
 
old mode 100755 (executable)
new mode 100644 (file)
index a8deb38..f7ebd09
@@ -1,24 +1,26 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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>
 
+#include <time.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -36,7 +38,9 @@ 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);
+char *ivug_get_filename(const char *filepath);
+
+char *ivug_get_directory(const char *filepath);
 
 unsigned int get_distance(int prevX, int prevY, int X, int Y);
 
@@ -65,11 +69,13 @@ bool ivug_is_editable_video_file(char *filepath);
 /*
        returned values should be freed by user
 */
-int ivug_atoi(const char *number);\r
+int ivug_atoi(const char *number);
 
 double ivug_atod(const char *number);
 
-char * ivug_generate_file_name(const char *filepath, const char *extension);\r
+long int ivug_atox(const char *number);
+
+char * ivug_generate_file_name(const char *filepath, const char *extension);
 
 /*
        Removes leading and trailing whitespace from string
@@ -77,6 +83,14 @@ char * ivug_generate_file_name(const char *filepath, const char *extension);
 */
 char * ivug_strip_string(char* name);
 
+bool ivug_is_bestpic(const char *file);
+
+/*
+       returned values should be freed by user
+*/
+char * ivug_get_icu_date(time_t mtime);
+
+
 #ifdef __cplusplus
 }
 #endif
old mode 100755 (executable)
new mode 100644 (file)
index 661515e..a5b8fef
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
old mode 100755 (executable)
new mode 100644 (file)
index fa455de..6d0dfef
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 __STATISTICS_H__
 #define __STATISTICS_H__
old mode 100755 (executable)
new mode 100644 (file)
index 2dc7e7c..3879882
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 <stdio.h>
 #include <stdarg.h>
 #include <unistd.h>
 #include <string.h>            // strrchr
 
+#undef PRINT_TID
+
+#ifdef PRINT_TID
+#include <pthread.h>
+#endif
+
 #ifndef __G_LIB_H__
        #define G_UNLIKELY(x) x
 #endif
@@ -265,9 +271,11 @@ void __custom_debug_msg(debug_msg_type *debug_msg, const char *msg, ...)
                static char buf[2048];
 
                int i ;
-
+#ifdef PRINT_TID
+               i = snprintf(buf, 2048, "%s[F:%-16.16s L:%5d][%08x][%s] ",time_string , pFileName, debug_msg->nline , pthread_self(), level);
+#else
                i = snprintf(buf, 2048, "%s[F:%-16.16s L:%5d][%s] ",time_string , pFileName, debug_msg->nline , level);
-
+#endif
                vsnprintf( buf + i, 2048 - i, msg, va);
 
 // Prevent Format string attack
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 2efd873..9482a7a
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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"
@@ -21,6 +21,7 @@
 
 #include <Elementary.h>
 #include <assert.h>
+#include <system_settings.h>
 
 #include "statistics.h"
 #include "ivug-debug.h"
 #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
+#define VCONFKEY_GALLERY_MUSIC_STATE   "db/setting/gallery/music_state" //boolean
+#define VCONFKEY_GALLERY_MUSIC_PATH            "db/setting/gallery/ss_music"  //char
+
+
 
 enum { STATE_FALSE = 0, STATE_TRUE = 1, };
 
@@ -51,12 +56,18 @@ bool ivug_config_set_lockscreen_image(const char* filepath)
                return FALSE;
        }
 
-       if(vconf_set_str( VCONFKEY_IDLE_LOCK_BGSET, filepath ) < 0)
+       if(system_settings_set_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, filepath) != SYSTEM_SETTINGS_ERROR_NONE)
        {
                MSG_IMAGEVIEW_ERROR("Lockscreen set Error : %s", filepath);
                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;
@@ -74,12 +85,19 @@ bool ivug_config_set_homescreen_image( const char* filepath )
                MSG_IMAGEVIEW_ERROR("Home screen path is NULL");
                return FALSE;
        }
+
+       if(system_settings_set_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, filepath) != SYSTEM_SETTINGS_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("Homescreen set Error : %s", filepath);
+               return FALSE;
+       }
+
 // TODO : Need to check file existence?????
-       if(vconf_set_str(VCONFKEY_BGSET, filepath) < 0)
+       /*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;
@@ -172,14 +190,38 @@ _ivug_config_get_effect_type_by_string(char *effect_str)
        {
                type = IVUG_EFFECT_TYPE_DISSOLVE;
        }
+       else if(!strncmp(effect_str, "RippleFade", strlen(effect_str)))
+       {
+               type = IVUG_EFFECT_TYPE_RIPPLE_FADE;
+       }
        else if(!strncmp(effect_str, "DissolveFade", strlen(effect_str)))
        {
                type = IVUG_EFFECT_TYPE_DISSOLVE_FADE;
        }
+       else if(!strncmp(effect_str, "Swirl", strlen(effect_str)))
+       {
+               type = IVUG_EFFECT_TYPE_SWIRL;
+       }
+       else if(!strncmp(effect_str, "WaterRipple", strlen(effect_str)))
+       {
+               type = IVUG_EFFECT_TYPE_WATER_RIPPLE;
+       }
+       else if(!strncmp(effect_str, "Zoom", strlen(effect_str)))
+       {
+               type = IVUG_EFFECT_TYPE_ZOOM;
+       }
        else if(!strncmp(effect_str, "Split", strlen(effect_str)))
        {
                type = IVUG_EFFECT_TYPE_SPLIT;
        }
+       else if(!strncmp(effect_str, "3DRand", strlen(effect_str)))
+       {
+               type = IVUG_EFFECT_TYPE_3D_RAND;
+       }
+       else if(!strncmp(effect_str, "Face slide show", strlen(effect_str)))
+       {
+               type = IVUG_EFFECT_TYPE_FACE;
+       }
        else //Set all other cases as default NONE
        {
                MSG_SLIDER_WARN("Invalid type : %s", effect_str);
@@ -216,8 +258,60 @@ ivug_config_get_slideshow_setting(slide_show_mode *mode,
 
        /* 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);
+       if (effect) {
+               free(effect);
+               effect = NULL;
+       }
+}
+
+
+
+bool ivug_config_get_use_inlineplay(bool *state)
+{
+       int value = STATE_FALSE;
+
+       if(vconf_get_bool("db/private/setting/gallery/inline_video_state", &value) < 0)
+       {
+               MSG_IMAGEVIEW_ERROR("vconf_get_bool failed, set as inline video state as default: false");
+               *state = false;
+               return true;
+       }
+
+       if(value == STATE_TRUE)
+       {
+               *state = true;
+       }
+       else
+       {
+               *state = false;
+       }
+
+       return true;
+}
+
+char *ivug_config_get_slideshow_music_path(void)
+{
+       char *music_str = NULL;
+       music_str = vconf_get_str(VCONFKEY_GALLERY_MUSIC_PATH);
+       if(!music_str)
+       {
+               MSG_IMAGEVIEW_ERROR("vconf_get_str failed");
+       }
+       MSG_IMAGEVIEW_HIGH("music is: %s", music_str);
+       return music_str;
 }
 
+bool ivug_config_get_slideshow_music_state(void)
+{
+       int music_state = STATE_FALSE;
+       if(vconf_get_bool(VCONFKEY_GALLERY_MUSIC_STATE, &music_state) < 0)
+       {
+               MSG_IMAGEVIEW_ERROR("vconf_get_bool failed, set as default: false");
+               return false;
+       }
+
+       MSG_IMAGEVIEW_HIGH("music state is: %d", music_state);
+       return (music_state == STATE_TRUE ? true : false);
+}
 
old mode 100755 (executable)
new mode 100644 (file)
index 3a1a61a..5fbf7e1
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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"
@@ -29,6 +29,7 @@ typedef struct _Ivug_DB
 {
        ivug_db_cb callback;
        media_handle *m_handle;
+       tag_handle *t_handle;
        void *data;
 }Ivug_DB;
 
@@ -81,22 +82,22 @@ bool ivug_db_destroy(void)
        MSG_HIGH("ivug_db_destroy success");
        return true;
 }
-\r
-bool ivug_db_rename(media_handle m_handle, const char *dest)\r
-{\r
-       media_info_h minfo = (media_info_h)m_handle;\r
-       int ret = MEDIA_CONTENT_ERROR_NONE;\r
-\r
-       ret = media_info_move_to_db(minfo, dest);\r
-       if(ret != MEDIA_CONTENT_ERROR_NONE)\r
-       {\r
-               MSG_ERROR("media_info_move_to_db is failed, err = %s", _strerror_db(ret));\r
-               return false;\r
-       }\r
-\r
-       return true;\r
-}\r
-\r
+
+bool ivug_db_rename(media_handle m_handle, const char *dest)
+{
+       media_info_h minfo = (media_info_h)m_handle;
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_move_to_db(minfo, dest);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_info_move_to_db is failed, err = %s dest=%s", _strerror_db(ret), dest);
+               return false;
+       }
+
+       return true;
+}
+
 bool ivug_db_destroy_file_handle(media_handle m_handle)
 {
        media_info_h minfo = (media_info_h)m_handle;
@@ -162,7 +163,7 @@ bool ivug_db_set_filter_condition(filter_handle media_filter, const char *condit
 {
        IV_ASSERT(condition != NULL);
 
-       MSG_HIGH("condition str = %s", condition);
+       MSG_HIGH("Set DB Filter : %s", condition);
        int ret = media_filter_set_condition(media_filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT);
        if(ret != MEDIA_CONTENT_ERROR_NONE)
        {
@@ -217,7 +218,14 @@ bool ivug_db_set_filter(filter_handle filter, ivug_view_by view_by,        ivug_media_t
                }
        }
 
-       ret = media_filter_set_order(media_filter, MEDIA_CONTENT_ORDER_DESC, MEDIA_MODIFIED_TIME, MEDIA_CONTENT_COLLATE_NOCASE);
+       if(view_by == IVUG_VIEW_BY_TAG)
+       {
+               ret = media_filter_set_order(media_filter, MEDIA_CONTENT_ORDER_ASC, MEDIA_DISPLAY_NAME, MEDIA_CONTENT_COLLATE_NOCASE);
+       }
+       else
+       {
+               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));
@@ -252,6 +260,27 @@ bool ivug_db_set_filter_offset(filter_handle filter, int stp, int endp)
        return true;
 }
 
+media_handle ivug_db_insert_file_to_DB(const char* filepath)
+{
+       IV_ASSERT(filepath != NULL);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       if (ivug_is_web_uri(filepath) == true)
+               return false;
+
+       media_handle m_handle = NULL;
+
+       ret = media_info_insert_to_db(filepath, (media_info_h *)&m_handle);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_info_insert_to_db is failed, err = %s", _strerror_db(ret));
+               return NULL;
+       }
+
+       return m_handle;
+}
+
 bool _media_item_cb(media_info_h item, void *user_data)
 {
        media_handle *m_handle = (media_handle *)user_data;
@@ -268,6 +297,9 @@ media_handle ivug_db_get_file_handle(const char* filepath)
        int ret = MEDIA_CONTENT_ERROR_NONE;
        filter_handle media_filter = NULL;
 
+       if (ivug_is_web_uri(filepath) == true)
+               return NULL;
+
        char buf[1024] = {0,};
        snprintf(buf, sizeof(buf), "MEDIA_PATH=\'%s\'", filepath);
 
@@ -398,17 +430,27 @@ char *ivug_db_get_file_path(media_handle media)
        media_info_get_file_path(file_item, &name);
 
        return name;
-}\r
-\r
-char *ivug_db_get_thumbnail_path(media_handle media)\r
-{\r
-       media_info_h file_item = (media_info_h)media;\r
-       char *name = NULL;\r
-\r
-       media_info_get_thumbnail_path(file_item, &name);\r
-\r
-       return name;\r
-}\r
+}
+
+char *ivug_db_get_file_id(media_handle media)
+{
+       media_info_h file_item = (media_info_h)media;
+       char *id = NULL;
+
+       media_info_get_media_id(file_item, &id);
+
+       return id;
+}
+
+char *ivug_db_get_thumbnail_path(media_handle media)
+{
+       media_info_h file_item = (media_info_h)media;
+       char *name = NULL;
+
+       media_info_get_thumbnail_path(file_item, &name);
+
+       return name;
+}
 
 char *ivug_db_get_folder_name(media_handle media)
 {
@@ -440,3 +482,235 @@ char *ivug_db_get_folder_path(media_handle media)
        return path;
 }
 
+static bool _media_tag_list_cb(media_tag_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_tag_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_tag_foreach_tag_from_db(media_filter, _media_tag_list_cb, iv_db);
+
+       free(iv_db);
+
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_tag_foreach_tag_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_tag_name(tag_handle media)
+{
+       media_tag_h tag_item = (media_tag_h)media;
+       char *name = NULL;
+
+       media_tag_get_name(tag_item, &name);
+
+       return name;
+}
+
+int ivug_db_get_tag_id(tag_handle media)
+{
+       media_tag_h tag_item = (media_tag_h)media;
+       int id = 0;
+
+       media_tag_get_tag_id(tag_item, &id);
+
+       return id;
+}
+
+bool ivug_db_create_tag(tag_handle *tag_h, const char *tag_name)
+{
+       media_tag_h *tag = (media_tag_h *)tag_h;
+
+       int ret = media_tag_insert_to_db(tag_name, tag);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_tag_insert_to_db, err = %s", _strerror_db(ret));
+               return false;
+       }
+
+       ret = media_tag_update_to_db(*tag);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_tag_update_to_db, err = %s", _strerror_db(ret));
+               return false;
+       }
+
+       return true;
+}
+
+bool ivug_db_destroy_tag(tag_handle tag_h)
+{
+       media_tag_h tag = (media_tag_h )tag_h;
+
+       int ret = media_tag_destroy(tag);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_tag_destroy, err = %s", _strerror_db(ret));
+               return false;
+       }
+
+       return true;
+}
+
+bool ivug_db_set_tag(media_handle m_handle, tag_handle t_handle)
+{
+       media_tag_h tag = (media_tag_h)t_handle;
+
+       char *media_id = NULL;
+
+       int ret = media_info_get_media_id(m_handle, &media_id);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_info_get_media_id, err = %s", _strerror_db(ret));
+               return false;
+       }
+       if(media_id == NULL)
+       {
+               MSG_ERROR("media_info_get_media_id, media_id = NULL");
+               return false;
+       }
+
+       ret = media_tag_add_media(tag, (const char *)media_id);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_tag_add_media, err = %s", _strerror_db(ret));
+               return false;
+       }
+
+       ret = media_tag_update_to_db(tag);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_tag_update_to_db, err = %s", _strerror_db(ret));
+               MSG_ERROR("or media tag already inserted");
+       }
+
+       return true;
+}
+
+bool ivug_db_update(media_handle media)
+{
+       media_info_h file_item = (media_info_h)media;
+
+       int ret = media_info_update_to_db (file_item);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_info_update_to_db, err = %s", _strerror_db(ret));
+               return false;
+       }
+       return true;
+}
+
+bool ivug_db_refresh(const char *media_id)
+{
+       int ret = media_info_refresh_metadata_to_db(media_id);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_info_refresh_metadata_to_db, err = %s", _strerror_db(ret));
+               return false;
+       }
+       return true;
+}
+
+static bool _media_tag_item_cb(media_tag_h item, void *user_data)
+{
+       tag_handle *t_handle = (tag_handle *)user_data;
+
+       media_tag_clone((media_tag_h *)t_handle, item);
+
+       return false;   //only 1 item
+}
+
+tag_handle ivug_db_get_tag_handle(const char* tagname)
+{
+       IV_ASSERT(tagname != NULL);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_handle media_filter = NULL;
+
+       char buf[1024] = {0,};
+       snprintf(buf, sizeof(buf), "TAG_NAME=\'%s\'", tagname);
+
+       tag_handle t_handle = NULL;
+
+       ivug_db_create_filter(&media_filter);
+       ivug_db_set_filter_condition(media_filter, buf);
+       ret = media_tag_foreach_tag_from_db(media_filter, _media_tag_item_cb, &t_handle);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_tag_foreach_tag_from_db is failed, err = %s", _strerror_db(ret));
+               goto GET_ITEM_ERROR;
+       }
+       ivug_db_destroy_filter(media_filter);
+
+       return t_handle;
+
+GET_ITEM_ERROR:
+       if(media_filter)
+               ivug_db_destroy_filter(media_filter);
+
+       return NULL;
+}
+
+bool ivug_db_set_favorite(media_handle media, bool set)
+{
+       media_info_h item = (media_info_h)media;
+
+       int ret = media_info_set_favorite(item, set);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_info_set_favorite, err = %s", _strerror_db(ret));
+               return false;
+       }
+
+       ret = media_info_update_to_db(item);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_info_update_to_db, err = %s", _strerror_db(ret));
+               return false;
+       }
+
+       return true;
+}
+
+bool ivug_db_get_file_size(media_handle media, unsigned long long *size)
+{
+       media_info_h item = (media_info_h)media;
+
+       int ret = media_info_get_size(item, size);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               MSG_ERROR("media_info_get_size, err = %s", _strerror_db(ret));
+               return false;
+       }
+
+       return true;
+}
+
+
diff --git a/common/src/ivug-dir.cpp b/common/src/ivug-dir.cpp
new file mode 100644 (file)
index 0000000..73cc3ee
--- /dev/null
@@ -0,0 +1,84 @@
+#include "ivug-dir.h"
+
+#include <stdio.h>
+#include <dirent.h>
+#include <stdlib.h>
+
+#include <linux/limits.h>
+
+bool EnumFilesInDir(const char *dir, EnumFilesCB pFunc, void *data)
+{
+       struct dirent *dptr;
+
+       DIR *dirp;
+
+       if((dirp=opendir(dir))==NULL)
+       {
+               printf("Cannot open dir : %s", dir);
+               return false;
+       }
+
+       static char fullpath[PATH_MAX];
+
+       while( (dptr = readdir(dirp)) != NULL )
+       {
+               if ( dptr->d_type == DT_REG )           // Only for gegular file
+               {
+                       if ( pFunc )
+                       {
+                               sprintf(fullpath, "%s/%s", dir, dptr->d_name);
+
+                               pFunc(fullpath, data);
+                       }
+               }
+       }
+
+       closedir(dirp);
+
+       return true;
+}
+
+
+int GetFilesCountInDir(const char *dir)
+{
+
+       struct dirent *dptr;
+       DIR *dirp;
+
+       if( (dirp=opendir(dir)) == NULL)
+       {
+               printf("Cannot open dir : %s", dir);
+               return -1;
+       }
+
+       int nCount = 0;
+
+       while( (dptr = readdir(dirp)) != NULL )
+       {
+               if ( dptr->d_type == DT_REG )           // Only for gegular file
+               {
+                       nCount++;
+               }
+       }
+
+       closedir(dirp);
+
+       return nCount;
+}
+
+
+#if 0
+void _MyCB(const char *fname, void *data)
+{
+       printf("%s\n", fname);
+}
+
+
+int main(int argc, char *argv[])
+{
+       EnumFilesInDir("/home/rookie/slp2.0", _MyCB, NULL);
+}
+#endif
+
+
+
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from common/src/ivug-drm.c
rename to common/src/ivug-drm-common.c
index 3f090bc..a50db3a
@@ -13,8 +13,9 @@
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
  */\r
-#include "ivug-drm.h"
-
+\r
+#include <glib.h>              // for g_strlcpy\r
+\r
 #include <drm_client.h>
 \r
 #include <sys/types.h>
@@ -29,6 +30,9 @@
 #include "ivug-debug.h"
 #include "ivug-file-info.h"
 #include "ivug-util.h"
+\r
+#include "ivug-drm-common.h"\r
+\r
 
 #include <Ecore_File.h>                //ecore_file_dir_is_empty
 
@@ -67,15 +71,15 @@ bool
 ivug_drm_get_forwarding_info(const char *path)
 {
        IV_ASSERT(path != NULL);
-
-       ivug_retvm_if(!path, false, "path is NULL");
-
+\r
        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));
+       memset(&action_data, 0x00, sizeof(drm_action_allowed_data_s));\r
+\r
+       g_strlcpy(action_data.file_path, path, sizeof(action_data.file_path));\r
 
        ret = drm_is_action_allowed(action, &action_data, &is_allowed);
        if(ret != DRM_RETURN_SUCCESS)\r
@@ -223,12 +227,32 @@ bool ivug_drm_is_possible_to_setas(const char* path, _ivug_drm_setas_type type)
 
 drm_data_t * ivug_drm_check_constraint(const char* file_path)\r
 {
-
+\r
+       drm_file_info_s info;\r
        drm_constraint_info_s constraint_info;
-       drm_permission_type_e perm_type = DRM_PERMISSION_TYPE_DISPLAY;
+       drm_permission_type_e perm_type = DRM_PERMISSION_TYPE_DISPLAY;\r
+       drm_data_t *result = NULL;\r
        int ret = -1;
-
-       memset(&constraint_info, 0x0, sizeof(drm_constraint_info_s));
+\r
+       memset(&info, 0x0, sizeof(drm_file_info_s));\r
+\r
+       ret = drm_get_file_info(file_path, &info);\r
+       if(ret != DRM_RETURN_SUCCESS)\r
+       {
+               MSG_IVUG_ERROR("drm_get_file_info Failed!!, ret=0x%x", ret);\r
+               return NULL;
+       }\r
+\r
+       if (info.oma_info.method == DRM_METHOD_TYPE_FORWARD_LOCK)\r
+       {\r
+               MSG_IVUG_HIGH("DRM_METHOD_TYPE_FORWARD_LOCK");\r
+               result = calloc(1, sizeof(drm_data_t));\r
+               result->constraints = IVUG_DRM_RESULT_UNLIMITED;\r
+               result->data = -1;
+               return result;\r
+       }\r
+\r
+       memset(&constraint_info, 0x0, sizeof(drm_constraint_info_s));\r
 
        ret = drm_get_constraint_info(file_path, perm_type, &constraint_info);
        if(ret != DRM_RETURN_SUCCESS)\r
@@ -237,7 +261,7 @@ drm_data_t * ivug_drm_check_constraint(const char* file_path)
                return NULL;
        }
 
-       drm_data_t *result = calloc(1, sizeof(drm_data_t));
+       result = calloc(1, sizeof(drm_data_t));\r
 
        if(constraint_info.const_type.is_unlimited)
        {
old mode 100755 (executable)
new mode 100644 (file)
index 97fe9d9..56043d3
  * 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
 #include "ivug-exif.h"
 
 #undef LOG_LVL
-#define LOG_LVL (DBG_MSG_LVL_MED | DBG_MSG_LVL_DEBUG)
+#define LOG_LVL (DBG_MSG_LVL_HIGH | 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;
-       }
+#define LOG_CAT "IV-EXIF"
 
-       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;
-       }
+#define gl_dbgE MSG_ERROR
+#define gl_dbgW MSG_WARN
 
- ERROR:
-       fclose(src_fp);
-       return ret;
-}
-#endif
+#define gl_dbg MSG_MED
 
-#if 1
+#define GL_CHECK_VAL(expr, val) \
+       do { \
+               if(!expr) { \
+                       MSG_ERROR("[%s] Return value %d", #expr, val );\
+                       return (val); \
+               } \
+       } while (0)
 
 
 #include <stdlib.h>
@@ -262,13 +98,28 @@ static int _jpeg_rotate(const char *file_path, char *value, bool bSave)
 #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"
+
+#define GL_EXI_TMP_JPEG_FILE "/opt/usr/media/.gallery_tmp_write_exif.jpg"
+
+#define GL_EXIF_IFD_DATA_FORMAT_UNSIGNED_BYTE 1
+#define GL_EXIF_IFD_DATA_FORMAT_ASCII_STRINGS 1
+#define GL_EXIF_IFD_DATA_FORMAT_UNSIGNED_SHORT 2
+#define GL_EXIF_IFD_DATA_FORMAT_UNSIGNED_LONG 4
+#define GL_EXIF_IFD_DATA_FORMAT_UNSIGNED_RATIONAL 8
+#define GL_EXIF_IFD_DATA_FORMAT_SIGNED_BYTE 1
+#define GL_EXIF_IFD_DATA_FORMAT_UNDEFINED 1
+#define GL_EXIF_IFD_DATA_FORMAT_SIGNED_SHORT 2
+#define GL_EXIF_IFD_DATA_FORMAT_SIGNED_LONG 4
+#define GL_EXIF_IFD_DATA_FORMAT_SIGNED_RATIONAL 8
+#define GL_EXIF_IFD_DATA_FORMAT_SIGNED_FLOAT 4
+#define GL_EXIF_IFD_DATA_FORMAT_DOUBLE_FLOAT 8
+
 
 /* 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!");
+               gl_dbgE("fputc failed!");
                return -1;
        }
 
@@ -283,7 +134,7 @@ static int __gl_exif_read_1_byte(FILE *fd)
        /* Return next input byte, or EOF if no more */
        c = getc(fd);
        if (c == EOF) {
-               MSG_ERROR("Premature EOF in JPEG file!");
+               gl_dbgE("Premature EOF in JPEG file!");
                return -1;
        }
 
@@ -300,14 +151,14 @@ static int __gl_exif_read_2_bytes(FILE *fd, unsigned int *len)
        /* Return next input byte, or EOF if no more */
        c1 = getc(fd);
        if (c1 == EOF) {
-               MSG_ERROR("Premature EOF in JPEG file!");
+               gl_dbgE("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!");
+               gl_dbgE("Premature EOF in JPEG file!");
                return -1;
        }
 
@@ -320,6 +171,8 @@ static int __gl_exif_read_2_bytes(FILE *fd, unsigned int *len)
 /* Add raw exif tag and data */
 static int __gl_exif_add_header(FILE *fd, unsigned int *orientation)
 {
+       GL_CHECK_VAL(orientation, -1);
+       GL_CHECK_VAL(fd, -1);
        int i = 0;
        int ret = -1;
        char *time_buf = NULL;
@@ -384,7 +237,7 @@ static int __gl_exif_add_header(FILE *fd, unsigned int *orientation)
        }
        offset += 2;
 
-       MSG_HIGH("Write: %d", *orientation);
+       gl_dbg("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)
@@ -430,7 +283,7 @@ static int __gl_exif_add_header(FILE *fd, unsigned int *orientation)
        /* 20 bytes larger than 4 bytes,
          * so next 4 bytes is data offset start from "II"(0x4949)*/
 
-       MSG_HIGH("offset: %2X", offset + 8);
+       gl_dbg("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;
@@ -462,7 +315,7 @@ static int __gl_exif_add_header(FILE *fd, unsigned int *orientation)
 
        time_buf = (char *)calloc(1, GL_EXIF_BUF_TIME_LEN_MAX);
        if (time_buf == NULL) {
-               MSG_ERROR("Faild to allocate memory!");
+               gl_dbgE("Faild to allocate memory!");
                goto GL_EXIF_FAILED;
        }
        snprintf(time_buf, GL_EXIF_BUF_TIME_LEN_MAX,
@@ -470,9 +323,9 @@ static int __gl_exif_add_header(FILE *fd, unsigned int *orientation)
                 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);
+       gl_dbg("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!");
+               gl_dbgW("Write size are diff!");
                goto GL_EXIF_FAILED;
        }
 
@@ -480,51 +333,107 @@ static int __gl_exif_add_header(FILE *fd, unsigned int *orientation)
 
  GL_EXIF_FAILED:
 
-       MSG_HIGH("All done");
+       gl_dbg("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)
+/* Add exif to jfif , don't have exif */
+static int __gl_exif_add_exif_to_jfif(const char *file_path, unsigned int *orientation)
 {
+       GL_CHECK_VAL(orientation, -1);
+       GL_CHECK_VAL(file_path, -1);
        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);
+               gl_dbgE("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);
+               gl_dbgE("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)
+       /* 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) {
+               gl_dbg("r_size: %ld", r_size);
+               if (fwrite(tmp, 1, r_size, tmp_fd) != r_size)
+                       gl_dbgW("Write and read size are diff!");
+
+               memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
+       }
+
+       fclose(fd);
+       fd = fopen(file_path, "wb");
+       if (!fd) {
+               gl_dbgE("Error creating file %s!", file_path);
                        goto GL_EXIF_FAILED;
+       }
 
-               tmp[0] = (unsigned char)tmp_exif;
+       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) {
+               gl_dbg("r_size: %ld", r_size);
+               if (fwrite(tmp, 1, r_size, fd) != r_size)
+                       gl_dbgW("Write and read size are diff!");
 
-               MSG_HIGH("- %02X", tmp[0]);
-               if (!b_tag_ff) {
-                       if (tmp[0] == GL_EXIF_TAG) {
-                               MSG_WARN("0xFF!");
-                               b_tag_ff = true;
+               memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
+       }
+
+       ret = 0;
+
+ GL_EXIF_FAILED:
+
+       if (fd)
+               fclose(fd);
+       if (tmp_fd)
+               fclose(tmp_fd);
+
+       /* Delete tmp file */
+       if (!ecore_file_unlink(tmp_file))
+               gl_dbgE("Delete file failed");
+
+       gl_dbg("All done");
+       return ret;
                        }
-                       /* Move back 1 byte */
-                       fseek(tmp_fd, -1, SEEK_CUR);
-                       break;
+
+#if 0
+/* Add exif to jfif 1.00, to add exif for some cases */
+static int __gl_exif_rw_jfif_1dot00(char *file_path, unsigned int *orientation)
+{
+       GL_CHECK_VAL(orientation, -1);
+       GL_CHECK_VAL(file_path, -1);
+       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) {
+               gl_dbgE("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) {
+               gl_dbgE("Can't open %s!", tmp_file);
+               goto GL_EXIF_FAILED;
        }
 
        /* Add raw EXIF header data */
@@ -532,12 +441,15 @@ static int __gl_exif_rw_jfif_1dot00(const char *file_path, unsigned int *orienta
                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 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);
+               gl_dbg("r_size: %ld", r_size);
                if (fwrite(tmp, 1, r_size, tmp_fd) != r_size)
-                       MSG_WARN("Write and read size are diff!");
+                       gl_dbgW("Write and read size are diff!");
 
                memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
        }
@@ -545,7 +457,7 @@ static int __gl_exif_rw_jfif_1dot00(const char *file_path, unsigned int *orienta
        fclose(fd);
        fd = fopen(file_path, "wb");
        if (!fd) {
-               MSG_ERROR("Error creating file %s!", file_path);
+               gl_dbgE("Error creating file %s!", file_path);
                goto GL_EXIF_FAILED;
        }
 
@@ -553,9 +465,9 @@ static int __gl_exif_rw_jfif_1dot00(const char *file_path, unsigned int *orienta
        /* 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);
+               gl_dbg("r_size: %ld", r_size);
                if (fwrite(tmp, 1, r_size, fd) != r_size)
-                       MSG_WARN("Write and read size are diff!");
+                       gl_dbgW("Write and read size are diff!");
 
                memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
        }
@@ -569,32 +481,32 @@ static int __gl_exif_rw_jfif_1dot00(const char *file_path, unsigned int *orienta
        if (tmp_fd)
                fclose(tmp_fd);
 
-       if (tmp_file) {
                /* Delete tmp file */
                if (!ecore_file_unlink(tmp_file))
-                       MSG_ERROR("Delete file failed");
-       }
+                       gl_dbgE("Delete file failed");
 
-       MSG_HIGH("All done");
+       gl_dbg("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)
+static int __gl_exif_rw_jfif_1dot01(char *file_path, unsigned int *orientation)
 {
+       GL_CHECK_VAL(orientation, -1);
+       GL_CHECK_VAL(file_path, -1);
        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);
+               gl_dbgE("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);
+               gl_dbgE("Can't open %s!", tmp_file);
                goto GL_EXIF_FAILED;
        }
 
@@ -609,9 +521,9 @@ static int __gl_exif_rw_jfif_1dot01(const char *file_path, unsigned int *orienta
        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);
+               gl_dbg("r_size: %ld", r_size);
                if (fwrite(tmp, 1, r_size, tmp_fd) != r_size)
-                       MSG_WARN("Write and read size are diff!");
+                       gl_dbgW("Write and read size are diff!");
 
                memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
        }
@@ -619,7 +531,7 @@ static int __gl_exif_rw_jfif_1dot01(const char *file_path, unsigned int *orienta
        fclose(fd);
        fd = fopen(file_path, "wb");
        if (!fd) {
-               MSG_ERROR("Error creating file %s!", file_path);
+               gl_dbgE("Error creating file %s!", file_path);
                goto GL_EXIF_FAILED;
        }
 
@@ -627,9 +539,9 @@ static int __gl_exif_rw_jfif_1dot01(const char *file_path, unsigned int *orienta
        /* 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);
+               gl_dbg("r_size: %ld", r_size);
                if (fwrite(tmp, 1, r_size, fd) != r_size)
-                       MSG_WARN("Write and read size are diff!");
+                       gl_dbgW("Write and read size are diff!");
 
                memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
        }
@@ -643,80 +555,485 @@ static int __gl_exif_rw_jfif_1dot01(const char *file_path, unsigned int *orienta
        if (tmp_fd)
                fclose(tmp_fd);
 
-       if (tmp_file) {
                /* Delete tmp file */
                if (!ecore_file_unlink(tmp_file))
-                       MSG_ERROR("Delete file failed");
-       }
+                       gl_dbgE("Delete file failed");
 
-       MSG_HIGH("All done");
+       gl_dbg("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)
+static int __gl_exif_rw_jfif_1dot02(char *file_path, unsigned int *orientation)
 {
+       GL_CHECK_VAL(orientation, -1);
+       GL_CHECK_VAL(file_path, -1);
        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);
+               gl_dbgE("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);
+               gl_dbgE("Can't open %s!", tmp_file);
                goto GL_EXIF_FAILED;
        }
 
-       /* Copy header of JFIF from 0 to first 0xFF */
+       /* 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 from first 0xFF to tmp file after EXIF header */
+       while ((r_size = fread(tmp, 1, sizeof(tmp), fd)) > 0) {
+               gl_dbg("r_size: %ld", r_size);
+               if (fwrite(tmp, 1, r_size, tmp_fd) != r_size)
+                       gl_dbgW("Write and read size are diff!");
+
+               memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
+       }
+
+       fclose(fd);
+       fd = fopen(file_path, "wb");
+       if (!fd) {
+               gl_dbgE("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) {
+               gl_dbg("r_size: %ld", r_size);
+               if (fwrite(tmp, 1, r_size, fd) != r_size)
+                       gl_dbgW("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);
+       /* Delete tmp file */
+       if (!ecore_file_unlink(tmp_file))
+               gl_dbgE("Delete file failed");
+
+       gl_dbg("All done");
+       return ret;
+}
+#endif
+
+/* Add  orientation tag to jpegs which have exif tag but do not have orientation tag: include jfif and exif*/
+static int __gl_exif_add_orientation_tag(const char *file_path,
+                                               unsigned int *orientation){
+
+       GL_CHECK_VAL(orientation, -1);
+       GL_CHECK_VAL(file_path, -1);
+       unsigned char tmp[GL_EXIF_BUF_LEN_MAX] = { 0, };
+       FILE *fd = NULL;
+       int ret = -1;
+       int tmp_exif = -1;
+       int i = 0;
+       unsigned int length = 0;
+       bool is_motorola = false; /* Flag for byte order */
+       unsigned int offset = 0;
+       size_t r_size = 0;
+       const unsigned char ifd_data_format[13] = {
+               /*add 0 to ifd_data_format[0] ,for  easy to use*/
+               0,
+               GL_EXIF_IFD_DATA_FORMAT_UNSIGNED_BYTE,
+               GL_EXIF_IFD_DATA_FORMAT_ASCII_STRINGS,
+               GL_EXIF_IFD_DATA_FORMAT_UNSIGNED_SHORT,
+               GL_EXIF_IFD_DATA_FORMAT_UNSIGNED_LONG,
+               GL_EXIF_IFD_DATA_FORMAT_UNSIGNED_RATIONAL,
+               GL_EXIF_IFD_DATA_FORMAT_SIGNED_BYTE,
+               GL_EXIF_IFD_DATA_FORMAT_UNDEFINED,
+               GL_EXIF_IFD_DATA_FORMAT_SIGNED_SHORT,
+               GL_EXIF_IFD_DATA_FORMAT_SIGNED_LONG,
+               GL_EXIF_IFD_DATA_FORMAT_SIGNED_RATIONAL,
+               GL_EXIF_IFD_DATA_FORMAT_SIGNED_FLOAT,
+               GL_EXIF_IFD_DATA_FORMAT_DOUBLE_FLOAT
+
+       };
+
+       if ((fd = fopen(file_path, "rb+")) == NULL) {
+               gl_dbgE("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) {
+               gl_dbgE("Can't open %s!", tmp_file);
+               goto GL_EXIF_FAILED;
+       }
+       /* 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;
 
+               /*copy data from jpeg to tmp_fd (from "FF D8" to " FF E1",because those data we needn't modify)*/
+               if (__gl_exif_write_1_byte(tmp_fd, tmp_exif) < 0)
+                       goto GL_EXIF_FAILED;
+
                tmp[0] = (unsigned char)tmp_exif;
 
-               MSG_HIGH("- %02X", tmp[0]);
+               gl_dbg("- %02X", tmp[0]);
                if (!b_tag_ff) {
+                       /* Get first tag */
                        if (tmp[0] == GL_EXIF_TAG) {
-                               MSG_WARN("0xFF!");
+                               gl_dbgW("0xFF!");
                                b_tag_ff = true;
                        }
-                       /* Move back 1 byte */
-                       fseek(tmp_fd, -1, SEEK_CUR);
+                       continue;
+               }
+
+               /* Get APP1 */
+               if (tmp[0] == GL_EXIF_APP1) {
+                       gl_dbgW("Exif in APP1!");
                        break;
+               } else {
+                       gl_dbgW("0x%02X!",tmp[0]);
+                       b_tag_ff = false;
                }
+       }
+
+       /* Get the marker parameter length count */
+       if (__gl_exif_read_2_bytes(fd, &length) < 0)
+               goto GL_EXIF_FAILED;
+       gl_dbg("length: %d", length);
+       /* Length includes itself, so must be at least 2
+           Following Exif data length must be at least 6 */
+       if (length < 8) {
+               gl_dbgE("length < 8");
+               goto GL_EXIF_FAILED;
+       }
+       /*modify  the marker parameter length, orientation tag is 12*/
+       length += 12;
+       gl_dbgW("modified length: %d", length);
+       tmp[0] =( length >> 8 )& 0xff ;
+       tmp[1] = length & 0xff ;
+       for(i = 0; i < 2; i++){
+               if (__gl_exif_write_1_byte(tmp_fd, tmp[i]) < 0)
+                       goto GL_EXIF_FAILED;
+       }
+
+       for (i = 0; i < 6; i++) {
+               tmp_exif = __gl_exif_read_1_byte(fd);
+               if (tmp_exif < 0)
+                       goto GL_EXIF_FAILED;
 
-               if (__gl_exif_write_1_byte(tmp_fd, tmp[0]) < 0)
+               tmp[i] = (unsigned char)tmp_exif;
+               gl_dbg("- %02X", tmp[i]);
+               if (__gl_exif_write_1_byte(tmp_fd, tmp[i]) < 0)
+                       goto GL_EXIF_FAILED;
+       }
+       if (tmp[0] == 0x45 && tmp[1] == 0x78 && tmp[2] == 0x69 && tmp[3] == 0x66 &&
+       tmp[4] == 0x00 && tmp[5] == 0x00) {
+               gl_dbgW("Met Exif!");
+       } else {
+               gl_dbgW("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;
+               if (__gl_exif_write_1_byte(tmp_fd, tmp[i]) < 0)
+                       goto GL_EXIF_FAILED;
+       }
 
+       /* Check byte order and Tag Mark , "II(0x4949)" or "MM(0x4d4d)" */
+       if (tmp[0] == 0x49 && tmp[1] == 0x49 && tmp[2] == 0x2A &&
+           tmp[3] == 0x00) {
+               gl_dbg("Intel");
+               is_motorola = false;
+       } else if (tmp[0] == 0x4D && tmp[1] == 0x4D && tmp[2] == 0x00 &&
+                  tmp[3] == 0x2A) {
+               gl_dbg("Motorola");
+               is_motorola = true;
+       } else {
+               goto GL_EXIF_FAILED;
        }
 
-       /* Add raw EXIF header data */
-       if (__gl_exif_add_header(tmp_fd, orientation) < 0)
+       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;
+               gl_dbg("- %02X", tmp[i]);
+               if (__gl_exif_write_1_byte(tmp_fd, tmp[i]) < 0)
                goto GL_EXIF_FAILED;
+       }
 
-       size_t r_size = 0;
+       /* Get first IFD offset (offset to IFD0) , MM-08000000, II-00000008 */
+       if (is_motorola) {
+               if (tmp[0] != 0 && tmp[1] != 0)
+                       goto GL_EXIF_FAILED;
+               offset = tmp[2];
+               offset <<= 8;
+               offset += tmp[3];
+       } else {
+               if (tmp[3] != 0 && tmp[2] != 0)
+                       goto GL_EXIF_FAILED;
+               offset = tmp[1];
+               offset <<= 8;
+               offset += tmp[0];
+       }
+       gl_dbg("offset: %d", offset);
+       /*if offset >8, copy data from there to IFD start position*/
+       if(offset > 8){
+               for (i = 0; i < (offset - 8); i++) {
+                       tmp_exif = __gl_exif_read_1_byte(fd);
+                       if (tmp_exif < 0)
+                       goto GL_EXIF_FAILED;
+
+                       tmp[i] = (unsigned char)tmp_exif;
+                       gl_dbg("- %02X", tmp[i]);
+                       if (__gl_exif_write_1_byte(tmp_fd, tmp[i]) < 0)
+                       goto GL_EXIF_FAILED;
+               }
+       }
+
+       /* 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];
+       }
+       gl_dbg("tags_cnt: %d", tags_cnt);
+       /*modify tags num,add orientation tag */
+       tags_cnt += 1;
+       gl_dbg("modified tags_cnt: %d", tags_cnt);
+       if (is_motorola) {
+               tmp[0] = (tags_cnt >> 8) & 0xff;
+               tmp[1] = tags_cnt & 0xff;
+       } else {
+               tmp[0] = tags_cnt & 0xff;
+               tmp[1] = (tags_cnt >> 8) & 0xff;
+       }
+       for (i = 0; i < 2; i++) {
+               gl_dbg("modified- %02X", tmp[i]);
+               if (__gl_exif_write_1_byte(tmp_fd, tmp[i]) < 0)
+               goto GL_EXIF_FAILED;
+
+       }
+       /* Add   Orientation Tag in IFD0 */
+       unsigned int tag_num = 0;
+       unsigned char orientation_tag[12] = { 0, };
+       bool b_found_position = false;
+       int j = 0;
+       unsigned int data_type = 0;
+       unsigned int unit_num = 0;
+       unsigned int data_length = 0;
+       unsigned int offset_value = 0;
+       /*initialize orientation_tag value*/
+       if (is_motorola) {
+               orientation_tag[0] = 0x01;
+               orientation_tag[1] = 0x12;
+
+               orientation_tag[2] = 0x00;
+               orientation_tag[3] = 0x03;
+
+               orientation_tag[4] = 0x00;
+               orientation_tag[5] = 0x00;
+               orientation_tag[6] = 0x00;
+               orientation_tag[7] = 0x01;
+
+               orientation_tag[8] = 0x00;
+               orientation_tag[9] = 0x00;
+               orientation_tag[10] = 0x00;
+               orientation_tag[11] = (unsigned char)(*orientation);
+
+       } else {
+               orientation_tag[0] = 0x12;
+               orientation_tag[1] = 0x01;
+               orientation_tag[2] = 0x03;
+               orientation_tag[3] = 0x00;
+               orientation_tag[4] = 0x01;
+               orientation_tag[5] = 0x00;
+               orientation_tag[6] = 0x00;
+               orientation_tag[7] = 0x00;
+               orientation_tag[8] = (unsigned char)(*orientation);
+               orientation_tag[9] = 0x00;
+               orientation_tag[10] = 0x00;
+               orientation_tag[11] = 0x00;
+       }
+
+       while(1){
+               if (--tags_cnt == 0) {
+                       break;
+               }
+
+               /* 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];
+               }
+               gl_dbgW("tag num %02X!" , tag_num);
+               /* to find Orientation Tag position */
+               if (tag_num < 0x0112) {
+
+               } else if (tag_num > 0x0112){
+                       if(!b_found_position){
+                               for(j = 0; j < 12 ;j++){
+                                       gl_dbg("orientation_tag- %02X", orientation_tag[j]);
+                                       if (__gl_exif_write_1_byte(tmp_fd, orientation_tag[j]) < 0)
+                                       goto GL_EXIF_FAILED;
+                               }
+                               b_found_position = true;
+                       }
+                       if (is_motorola) {
+                               data_type = tmp[2];
+                               data_type <<= 8;
+                               data_type += tmp[3];
+
+                               unit_num = tmp[4];
+                               unit_num <<= 8;
+                               unit_num += tmp[5];
+                               unit_num <<= 8;
+                               unit_num += tmp[6];
+                               unit_num <<= 8;
+                               unit_num += tmp[7];
+                       } else {
+                               data_type = tmp[3];
+                               data_type <<= 8;
+                               data_type += tmp[2];
+
+                               unit_num = tmp[7];
+                               unit_num <<= 8;
+                               unit_num += tmp[6];
+                               unit_num <<= 8;
+                               unit_num += tmp[5];
+                               unit_num <<= 8;
+                               unit_num += tmp[4];
+                       }
+                       gl_dbgW("data_type %02X!" , data_type);
+                       gl_dbgW("unit_num %02X!" , unit_num);
+                       if((data_type < 1) ||(data_type > 12)){
+                               gl_dbgE("Wrong data type!");
+                       goto GL_EXIF_FAILED;
+                       }
+
+                       data_length = ifd_data_format[data_type] * unit_num;
+                       gl_dbgW("data_length %02X!" , data_length);
+                       /*data_length >4 ,next 4 bytes  store the offset, so need to modify the offset*/
+                       if(data_length > 4){
+                               if (is_motorola) {
+                                       offset_value = tmp[8];
+                                       offset_value <<= 8;
+                                       offset_value += tmp[9];
+                                       offset_value <<= 8;
+                                       offset_value += tmp[10];
+                                       offset_value <<= 8;
+                                       offset_value += tmp[11];
+                                       gl_dbgW("offset_value %02X!" , offset_value);
+                                       /*add orientation offset*/
+                                       offset_value += 12;
+                                       gl_dbgW("changed offset_value %02X!" , offset_value);
+                                       tmp[8] = (offset_value >> 24) & 0xff;
+                                       tmp[9] = (offset_value >> 16) & 0xff;
+                                       tmp[10] = (offset_value >> 8) & 0xff;
+                                       tmp[11] = offset_value & 0xff;
+                                       gl_dbg("tmp[8] %02X!" , tmp[8]);
+                                       gl_dbg("tmp[9] %02X!" , tmp[9]);
+                                       gl_dbg("tmp[10] %02X!" , tmp[10]);
+                                       gl_dbg("tmp[11] %02X!" , tmp[11]);
+                               } else {
+                                       offset_value = tmp[11];
+                                       offset_value <<= 8;
+                                       offset_value += tmp[10];
+                                       offset_value <<= 8;
+                                       offset_value += tmp[9];
+                                       offset_value <<= 8;
+                                       offset_value += tmp[8];
+                                       gl_dbgW("offset_value %02X!" , offset_value);
+                                       /*add orientation offset*/
+                                       offset_value += 12;
+                                       gl_dbgW("changed offset_value %02X!" , offset_value);
+
+                                       tmp[11] = (offset_value >> 24) & 0xff;
+                                       tmp[10] = (offset_value >> 16) & 0xff;
+                                       tmp[9] = (offset_value >> 8) & 0xff;
+                                       tmp[8] = offset_value & 0xff;
+                                       gl_dbg("tmp[8] %02X!" , tmp[8]);
+                                       gl_dbg("tmp[9] %02X!" , tmp[9]);
+                                       gl_dbg("tmp[10] %02X!" , tmp[10]);
+                                       gl_dbg("tmp[11] %02X!" , tmp[11]);
+
+       }
+
+                       }
+
+               }
+               for(i = 0; i < 12 ;i++){
+                       gl_dbg("- %02X", tmp[i]);
+                       if (__gl_exif_write_1_byte(tmp_fd,tmp[i]) < 0)
+               goto GL_EXIF_FAILED;
+
+               }
+               memset(tmp, 0x00, 12);
+
+       }
        memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
-       /* Write JPEG image data from first 0xFF to tmp file after EXIF header */
+       /* 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);
+               gl_dbg("r_size: %ld", r_size);
                if (fwrite(tmp, 1, r_size, tmp_fd) != r_size)
-                       MSG_WARN("Write and read size are diff!");
+                       gl_dbgW("Write and read size are diff!");
 
                memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
        }
-
        fclose(fd);
+       fd = NULL;
        fd = fopen(file_path, "wb");
        if (!fd) {
-               MSG_ERROR("Error creating file %s!", file_path);
+               gl_dbgE("Error creating file %s!", file_path);
                goto GL_EXIF_FAILED;
        }
 
@@ -724,10 +1041,9 @@ static int __gl_exif_rw_jfif_1dot02(const char *file_path, unsigned int *orienta
        /* 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);
+               gl_dbg("r_size: %ld", r_size);
                if (fwrite(tmp, 1, r_size, fd) != r_size)
-                       MSG_WARN("Write and read size are diff!");
-
+                       gl_dbgW("Write and read size are diff!");
                memset(tmp, 0x00, GL_EXIF_BUF_LEN_MAX);
        }
 
@@ -735,24 +1051,30 @@ static int __gl_exif_rw_jfif_1dot02(const char *file_path, unsigned int *orienta
 
  GL_EXIF_FAILED:
 
-       if (fd)
+       if (fd){
                fclose(fd);
-       if (tmp_fd)
+               fd = NULL;
+       }
+
+       if (tmp_fd){
                fclose(tmp_fd);
+               tmp_fd = NULL;
+       }
 
-       if (tmp_file) {
                /* Delete tmp file */
                if (!ecore_file_unlink(tmp_file))
-                       MSG_ERROR("Delete file failed");
-       }
+                       gl_dbgE("Delete file failed");
 
-       MSG_HIGH("All done");
+       gl_dbg("All done");
        return ret;
 }
 
 static int __gl_exif_rw_jfif(FILE *fd, const char *file_path,
                             unsigned int *orientation, bool b_write)
 {
+       GL_CHECK_VAL(fd, -1);
+       GL_CHECK_VAL(file_path, -1);
+       GL_CHECK_VAL(orientation, -1);
        unsigned char tmp[GL_EXIF_BUF_LEN_MAX] = { 0, };
        int i = 0;
        unsigned int length = 0;
@@ -760,11 +1082,11 @@ static int __gl_exif_rw_jfif(FILE *fd, const char *file_path,
        bool is_motorola = false; /* Flag for byte order */
        unsigned int offset = 0;
        int ret = -1;
-       unsigned char version = 0x00;
+       /*unsigned char version = 0x00; */
 
        if (__gl_exif_read_2_bytes(fd, &length) < 0)
                goto GL_EXIF_FAILED;
-       MSG_HIGH("length: %d", length);
+       gl_dbg("length: %d", length);
 
        for (i = 0; i < 5; i++) {
                tmp_exif = __gl_exif_read_1_byte(fd);
@@ -776,7 +1098,7 @@ static int __gl_exif_rw_jfif(FILE *fd, const char *file_path,
        /* JFIF0 */
        if (tmp[0] != 0x4A || tmp[1] != 0x46 || tmp[2] != 0x49 ||
            tmp[3] != 0x46 || tmp[4] != 0x00) {
-               MSG_ERROR("Not met Jfif!");
+               gl_dbgE("Not met Jfif!");
                goto GL_EXIF_FAILED;
        }
 
@@ -789,18 +1111,18 @@ static int __gl_exif_rw_jfif(FILE *fd, const char *file_path,
 
        /* Check JFIF version */
        if (tmp[0] == 0x01 && tmp[1] == GL_EXIF_JFIF_00) {
-               MSG_HIGH("Jfif 1.00");
+               gl_dbg("Jfif 1.00");
        } else if (tmp[0] == 0x01 && tmp[1] == GL_EXIF_JFIF_01) {
-               MSG_HIGH("Jfif 1.01");
+               gl_dbg("Jfif 1.01");
        } else if (tmp[0] == 0x01 && tmp[1] == GL_EXIF_JFIF_02) {
-               MSG_HIGH("Jfif 1.02");
+               gl_dbg("Jfif 1.02");
        } else {
-               MSG_ERROR("Unknow Jfif version[%d.%d]!", tmp[0], tmp[1]);
+               gl_dbgE("Unknow Jfif version[%d.%d]!", tmp[0], tmp[1]);
                goto GL_EXIF_FAILED;
        }
 
        /* Save version */
-       version = tmp[1];
+       /*version = tmp[1]; */
 
        /* Find APP1 */
        bool b_tag_ff = false;
@@ -811,11 +1133,11 @@ static int __gl_exif_rw_jfif(FILE *fd, const char *file_path,
 
                tmp[0] = (unsigned char)tmp_exif;
 
-               MSG_HIGH("- %02X", tmp[0]);
+               gl_dbg("- %02X", tmp[0]);
                if (!b_tag_ff) {
                        /* Get first tag */
                        if (tmp[0] == GL_EXIF_TAG) {
-                               MSG_WARN("0xFF!");
+                               gl_dbgW("0xFF!");
                                b_tag_ff = true;
                        }
                        continue;
@@ -823,11 +1145,11 @@ static int __gl_exif_rw_jfif(FILE *fd, const char *file_path,
 
                /* Get APP1 */
                if (tmp[0] == GL_EXIF_APP1) {
-                       MSG_WARN("Exif in APP1!");
+                       gl_dbgW("Exif in APP1!");
                        break;
                }
 
-               MSG_WARN("No Exif in APP1!");
+               gl_dbgW("No Exif in APP1!");
 
                /* Close file */
                fclose(fd);
@@ -836,7 +1158,8 @@ static int __gl_exif_rw_jfif(FILE *fd, const char *file_path,
                        *orientation = 1;
                        return 0;
                }
-
+               return __gl_exif_add_exif_to_jfif(file_path, orientation);
+#if 0
                if (version == GL_EXIF_JFIF_00) {
                        return __gl_exif_rw_jfif_1dot00(file_path, orientation);
                } else if (version == GL_EXIF_JFIF_01) {
@@ -844,6 +1167,7 @@ static int __gl_exif_rw_jfif(FILE *fd, const char *file_path,
                } else {
                        return __gl_exif_rw_jfif_1dot02(file_path, orientation);
                }
+#endif
        }
 
        /* Find Exif */
@@ -862,14 +1186,14 @@ static int __gl_exif_rw_jfif(FILE *fd, const char *file_path,
                                goto GL_EXIF_FAILED;
 
                        tmp[i] = (unsigned char)tmp_exif;
-                       MSG_HIGH("- %02X", tmp[i]);
+                       gl_dbg("- %02X", tmp[i]);
                }
                if (tmp[0] == 0x78 && tmp[1] == 0x69 && tmp[2] == 0x66 &&
                    tmp[3] == 0x00 && tmp[4] == 0x00) {
-                       MSG_WARN("Met Exif!");
+                       gl_dbgW("Met Exif!");
                        break;
                } else {
-                       MSG_WARN("Not met Exif!");
+                       gl_dbgW("Not met Exif!");
                        goto GL_EXIF_FAILED;
                }
        }
@@ -885,11 +1209,11 @@ static int __gl_exif_rw_jfif(FILE *fd, const char *file_path,
        /* 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");
+               gl_dbg("Intel");
                is_motorola = false;
        } else if (tmp[0] == 0x4D && tmp[1] == 0x4D && tmp[2] == 0x00 &&
                   tmp[3] == 0x2A) {
-               MSG_HIGH("Motorola");
+               gl_dbg("Motorola");
                is_motorola = true;
        } else {
                goto GL_EXIF_FAILED;
@@ -901,24 +1225,24 @@ static int __gl_exif_rw_jfif(FILE *fd, const char *file_path,
                        goto GL_EXIF_FAILED;
 
                tmp[i] = (unsigned char)tmp_exif;
-               MSG_HIGH("- %02X", tmp[i]);
+               gl_dbg("- %02X", tmp[i]);
        }
 
        /* Get first IFD offset (offset to IFD0) , MM-08000000, II-00000008 */
        if (is_motorola) {
-               if (tmp[4] != 0 && tmp[5] != 0)
+               if (tmp[0] != 0 && tmp[1] != 0)
                        goto GL_EXIF_FAILED;
-               offset = tmp[6];
+               offset = tmp[2];
                offset <<= 8;
-               offset += tmp[7];
+               offset += tmp[3];
        } else {
-               if (tmp[7] != 0 && tmp[6] != 0)
+               if (tmp[3] != 0 && tmp[2] != 0)
                        goto GL_EXIF_FAILED;
-               offset = tmp[5];
+               offset = tmp[1];
                offset <<= 8;
-               offset += tmp[4];
+               offset += tmp[0];
        }
-       MSG_HIGH("offset: %d", offset);
+       gl_dbg("offset: %d", offset);
 
        /* IFD: Image File Directory */
        /* Get the number of directory entries contained in this IFD, - 2 bytes, EE */
@@ -939,9 +1263,9 @@ static int __gl_exif_rw_jfif(FILE *fd, const char *file_path,
                tags_cnt <<= 8;
                tags_cnt += tmp[0];
        }
-       MSG_HIGH("tags_cnt: %d", tags_cnt);
+       gl_dbg("tags_cnt: %d", tags_cnt);
        if (tags_cnt == 0) {
-               MSG_ERROR("tags_cnt == 0 - 2");
+               gl_dbgE("tags_cnt == 0 - 2");
                goto GL_EXIF_FAILED;
        }
 
@@ -968,11 +1292,22 @@ static int __gl_exif_rw_jfif(FILE *fd, const char *file_path,
                }
                /* found Orientation Tag */
                if (tag_num == 0x0112) {
-                       MSG_WARN("Found orientation tag!");
+                       gl_dbgW("Found orientation tag!");
                        break;
                }
                if (--tags_cnt == 0) {
-                       MSG_ERROR("tags_cnt == 0");
+                       gl_dbgW("tags_cnt == 0, no found orientation tag!");
+                       if (b_write) {
+                               gl_dbgW("to add an orientation tag!");
+                               fclose(fd);
+                               fd = NULL;
+                               return __gl_exif_add_orientation_tag(file_path, orientation);
+
+                       } else{
+                               /* Normal orientation = 0degree = 1 */
+                               *orientation = 1;
+                               ret = 0;
+                       }
                        goto GL_EXIF_FAILED;
                }
        }
@@ -980,7 +1315,7 @@ static int __gl_exif_rw_jfif(FILE *fd, const char *file_path,
        /* |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);
+               gl_dbg("Write: %d", *orientation);
                /* Set the Orientation value */
                if (is_motorola)
                        tmp[9] = (unsigned char)(*orientation);
@@ -994,22 +1329,22 @@ static int __gl_exif_rw_jfif(FILE *fd, const char *file_path,
                /* Get the Orientation value */
                if (is_motorola) {
                        if (tmp[8] != 0) {
-                               MSG_ERROR("tmp[8] != 0");
+                               gl_dbgE("tmp[8] != 0");
                                goto GL_EXIF_FAILED;
                        }
                        *orientation = (unsigned int)tmp[9];
                } else {
                        if (tmp[9] != 0) {
-                               MSG_ERROR("tmp[9] != 0");
+                               gl_dbgE("tmp[9] != 0");
                                goto GL_EXIF_FAILED;
                        }
                        *orientation = (unsigned int)tmp[8];
                }
                if (*orientation > 8) {
-                       MSG_ERROR("*orient > 8");
+                       gl_dbgE("*orient > 8");
                        goto GL_EXIF_FAILED;
                }
-               MSG_HIGH("Read: %d", *orientation);
+               gl_dbg("Read: %d", *orientation);
        }
 
        ret = 0;
@@ -1017,13 +1352,14 @@ static int __gl_exif_rw_jfif(FILE *fd, const char *file_path,
  GL_EXIF_FAILED:
 
        fclose(fd);
-       MSG_HIGH("All done");
+       gl_dbg("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);
+       GL_CHECK_VAL(file_path, -1);
+       gl_dbg("b_write: %d", b_write);
        unsigned int length = 0;
        unsigned int i = 0;
        bool is_motorola = false; /* Flag for byte order */
@@ -1038,12 +1374,12 @@ static int __gl_exif_rw_orient(const char *file_path, unsigned int *orient, bool
 
        if (b_write) {
                if ((fd = fopen(file_path, "rb+")) == NULL) {
-                       MSG_ERROR("Can't open %s!", file_path);
+                       gl_dbgE("Can't open %s!", file_path);
                        return -1;
                }
        } else {
                if ((fd = fopen(file_path, "rb")) == NULL) {
-                       MSG_ERROR("Can't open %s!", file_path);
+                       gl_dbgE("Can't open %s!", file_path);
                        return -1;
                }
        }
@@ -1058,39 +1394,39 @@ static int __gl_exif_rw_orient(const char *file_path, unsigned int *orient, bool
        }
 
        if (exif_data[0] == GL_EXIF_TAG && exif_data[1] == GL_EXIF_SOI) {
-               MSG_HIGH("JPEG file");
+               gl_dbg("JPEG file");
        } else {
-               MSG_ERROR("Not a JPEG file!");
+               gl_dbgE("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!");
+               gl_dbgW("Exif in APP1!");
        } else if (exif_data[2] == GL_EXIF_TAG &&
                   exif_data[3] == GL_EXIF_APP0) {
-               MSG_WARN("Jfif in APP0!");
+               gl_dbgW("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]);
+               gl_dbgE("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);
+       gl_dbg("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");
+               gl_dbgE("length < 8");
                goto GL_EXIF_FAILED;
        }
        length -= 8;
 
         /* Length of an IFD entry */
        if (length < 12) {
-               MSG_ERROR("length < 12");
+               gl_dbgE("length < 12");
                goto GL_EXIF_FAILED;
        }
 
@@ -1101,13 +1437,13 @@ static int __gl_exif_rw_orient(const char *file_path, unsigned int *orient, bool
                        goto GL_EXIF_FAILED;
 
                exif_data[i] = (unsigned char)tmp_exif;
-               MSG_HIGH("- %02X", exif_data[i]);
+               gl_dbg("- %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!");
+               gl_dbgE("Not met Exif!");
                goto GL_EXIF_FAILED;
        }
 
@@ -1122,11 +1458,11 @@ static int __gl_exif_rw_orient(const char *file_path, unsigned int *orient, bool
        /* 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");
+               gl_dbg("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");
+               gl_dbg("Motorola");
                is_motorola = true;
        } else {
                goto GL_EXIF_FAILED;
@@ -1148,9 +1484,10 @@ static int __gl_exif_rw_orient(const char *file_path, unsigned int *orient, bool
        }
        /* check end of data segment */
        if (offset > length - 2) {
-               MSG_ERROR("offset > length - 2");
+               gl_dbgE("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) {
@@ -1163,14 +1500,14 @@ static int __gl_exif_rw_orient(const char *file_path, unsigned int *orient, bool
                tags_cnt += exif_data[offset];
        }
        if (tags_cnt == 0) {
-               MSG_ERROR("tags_cnt == 0 - 2");
+               gl_dbgE("tags_cnt == 0 - 2");
                goto GL_EXIF_FAILED;
        }
        offset += 2;
 
        /* check end of data segment */
        if (offset > length - 12) {
-               MSG_ERROR("offset > length - 12");
+               gl_dbgE("offset > length - 12");
                goto GL_EXIF_FAILED;
        }
 
@@ -1188,19 +1525,31 @@ static int __gl_exif_rw_orient(const char *file_path, unsigned int *orient, bool
                }
                /* found Orientation Tag */
                if (tag_num == 0x0112) {
-                       MSG_WARN("Found orientation tag!");
+                       gl_dbgW("Found orientation tag!");
                        break;
                }
                if (--tags_cnt == 0) {
-                       MSG_ERROR("tags_cnt == 0");
+                       gl_dbgW("tags_cnt == 0, no found orientation tag!");
+                       if (b_write) {
+                               gl_dbgW("to add an orientation tag!");
+                               fclose(fd);
+                               fd = NULL;
+                               return __gl_exif_add_orientation_tag(file_path, orient);
+
+                       } else{
+                               /* Normal orientation = 0degree = 1 */
+                               *orient = 1;
+                               ret = 0;
+                       }
                        goto GL_EXIF_FAILED;
                }
+
                /* Every directory entry size is 12 */
                offset += 12;
        }
 
        if (b_write) {
-               MSG_HIGH("Write: %d", *orient);
+               gl_dbg("Write: %d", *orient);
                /* Set the Orientation value */
                if (is_motorola)
                        exif_data[offset+9] = (unsigned char)(*orient);
@@ -1213,22 +1562,22 @@ static int __gl_exif_rw_orient(const char *file_path, unsigned int *orient, bool
                /* Get the Orientation value */
                if (is_motorola) {
                        if (exif_data[offset+8] != 0) {
-                               MSG_ERROR("exif_data[offset+8] != 0");
+                               gl_dbgE("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");
+                               gl_dbgE("exif_data[offset+9] != 0");
                                goto GL_EXIF_FAILED;
                        }
                        *orient = (unsigned int)exif_data[offset+8];
                }
                if (*orient > 8) {
-                       MSG_ERROR("*orient > 8");
+                       gl_dbgE("*orient > 8");
                        goto GL_EXIF_FAILED;
                }
-               MSG_HIGH("Read: %d", *orient);
+               gl_dbg("Read: %d", *orient);
        }
 
        ret = 0;
@@ -1236,135 +1585,11 @@ static int __gl_exif_rw_orient(const char *file_path, unsigned int *orient, bool
  GL_EXIF_FAILED:
 
        fclose(fd);
-       MSG_HIGH("All done");
+       gl_dbg("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
@@ -1406,16 +1631,16 @@ int ivug_exif_get_rotate(const char *file, int *degree)
                        break;
                default:
                        *degree = 0;
-                       MSG_ERROR("Invalid Orientation : %d", orientation);
+                       gl_dbgE("Invalid Orientation : %d", orientation);
                        break;
                }
 
-               MSG_HIGH("Get Degree: %d' %s", *degree, file);
+               gl_dbg("Get Degree: %d' %s", *degree, file);
                return 0;
 
        }
 
-       MSG_ERROR("Unknown Degree: %s", file);
+       gl_dbgE("Unknown Degree: %s", file);
        return -1;
 }
 
@@ -1425,7 +1650,7 @@ int ivug_exif_set_rotate(const char *file, int degree)
 {
        MSG_ASSERT(file != NULL);
 
-       MSG_HIGH("Set Degree: %d' %s", degree, file);
+       gl_dbg("Set Degree: %d' %s", degree, file);
 
        unsigned int orientation;
 
@@ -1448,7 +1673,7 @@ int ivug_exif_set_rotate(const char *file, int degree)
                break;
        default:
                orientation = IVUG_EXIF_ROTATE_0;;
-               MSG_ERROR("Invalid Degree : %d", degree);
+               gl_dbgE("Invalid Degree : %d", degree);
                break;
        }
 
old mode 100755 (executable)
new mode 100644 (file)
index b4f985e..e8ea479
@@ -1,22 +1,24 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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-file-info.h"
 #include "ivug-debug.h"
-#include "ivug-drm.h"
+#include "ivug-drm-common.h"
 #include "ivug-util.h"
 
 #include <libexif/exif-data.h> //for exif
@@ -251,7 +253,46 @@ bool _get_gps_info_from_exifdata(ExifData *ed, double *latitude, double *longitu
 
        return true;
 }
-\r
+
+bool _get_drm_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;
+
+       unsigned char *buffer = NULL;
+       unsigned int buf_size = 0;
+
+       buffer = ivug_data_drm_get_buffer_from_file(filepath, &buf_size);               // Returned buffer should be freed by user
+
+       if ( (buffer == NULL) || (buf_size == 0))
+       {
+               MSG_DETAIL_ERROR("Cannot get file buf");
+               return false;
+       }
+
+       ed = exif_data_new_from_data(buffer, buf_size);
+       if (!ed)
+       {
+               free(buffer);
+               return false;
+       }
+
+       if(_get_gps_info_from_exifdata(ed, latitude, longitude) == false)
+       {
+               exif_data_unref(ed);
+               free(buffer);
+               return false;
+       }
+
+       exif_data_unref(ed);
+       free(buffer);
+
+       return true;
+}
+
 bool _get_image_gps_info(const char* filepath, double *latitude, double *longitude)
 {
        IV_ASSERT(filepath != NULL);
@@ -305,7 +346,7 @@ bool _get_orientation_from_exifdata(ExifData *ed, /*OUT*/int *orient)
 }
 
 /* out value must be freed */
-bool _get_maker_from_exifdata(ExifData *ed, /*OUT*/char *maker)
+static bool _get_maker_from_exifdata(ExifData *ed, /*OUT*/char **maker)
 {
        MSG_DETAIL_HIGH("_get_maker_from_exifdata");
        ExifIfd ifd;
@@ -322,12 +363,12 @@ bool _get_maker_from_exifdata(ExifData *ed, /*OUT*/char *maker)
        }
        MSG_DETAIL_HIGH("Maker = %s", buf);
 
-       maker = strdup(buf);
+       *maker = strdup(buf);
        return true;
 }
 
 /* out value must be freed */
-bool _get_model_from_exifdata(ExifData *ed, /*OUT*/char *model)
+static bool _get_model_from_exifdata(ExifData *ed, /*OUT*/char **model)
 {
        MSG_DETAIL_HIGH("_get_model_from_exifdata");
        ExifIfd ifd;
@@ -344,7 +385,7 @@ bool _get_model_from_exifdata(ExifData *ed, /*OUT*/char *model)
        }
        MSG_DETAIL_HIGH("Model = %s", buf);
 
-       model = strdup(buf);
+       *model = strdup(buf);
        return true;
 }
 
@@ -370,7 +411,7 @@ bool _get_flash_from_exifdata(ExifData *ed, /*OUT*/int *status)
 }
 
 /* out value must be freed */
-bool _get_focal_length_from_exifdata(ExifData *ed, /*OUT*/char *length)
+static bool _get_focal_length_from_exifdata(ExifData *ed, /*OUT*/char **length)
 {
        MSG_DETAIL_HIGH("_get_focal_length_from_exifdata");
        ExifIfd ifd;
@@ -387,7 +428,7 @@ bool _get_focal_length_from_exifdata(ExifData *ed, /*OUT*/char *length)
        }
        MSG_DETAIL_HIGH("Focal length = %s", buf);
 
-       length = strdup(buf);
+       *length = strdup(buf);
        return true;
 }
 
@@ -411,6 +452,66 @@ bool _get_white_balance_from_exifdata(ExifData *ed, int *white_balance)
        return true;
 }
 
+bool _get_aperture_from_exifdata(ExifData *ed, /*OUT*/char **aperture)
+{
+       MSG_DETAIL_HIGH("_get_aperture_from_exifdata");
+       ExifIfd ifd;
+       ExifTag tag;
+
+       char buf[BUF_LEN+1] = {'\0',};
+
+       ifd = EXIF_IFD_EXIF;
+       tag = EXIF_TAG_APERTURE_VALUE;
+
+       if(_get_exif_string(ed, tag, buf, BUF_LEN) == false)
+       {
+               return false;
+       }
+       MSG_DETAIL_HIGH("Aperture = %s", buf);
+
+       *aperture = strdup(buf);
+       return true;
+}
+
+bool _get_exposure_time_from_exifdata(ExifData *ed, /*OUT*/char **exposure)
+{
+       MSG_DETAIL_HIGH("_get_exposure_time_from_exifdata");
+       ExifIfd ifd;
+       ExifTag tag;
+
+       char buf[BUF_LEN+1] = {'\0',};
+
+       ifd = EXIF_IFD_EXIF;
+       tag = EXIF_TAG_EXPOSURE_TIME;
+
+       if(_get_exif_string(ed, tag, buf, BUF_LEN) == false)
+       {
+               return false;
+       }
+       MSG_DETAIL_HIGH("Exposure time = %s", buf);
+
+       *exposure = strdup(buf);
+       return true;
+}
+
+bool _get_iso_from_exifdata(ExifData *ed, /*OUT*/int *iso)
+{
+       MSG_DETAIL_HIGH("_get_iso_from_exifdata");
+       ExifIfd ifd;
+       ExifTag tag;
+
+       ifd = EXIF_IFD_EXIF;
+       tag = EXIF_TAG_ISO_SPEED_RATINGS;
+
+       if(_get_exif_short(ed, tag, iso) == false)
+       {
+               return false;
+       }
+       MSG_DETAIL_HIGH("ISO = %d", *iso);
+
+       return true;
+}
+
 
 static bool _get_image_resolution(const char *path, int * /* OUT */ pWidth, int * /* OUT */pHeight)
 {
@@ -463,7 +564,61 @@ static bool _get_image_resolution(const char *path, int * /* OUT */ pWidth, int
 }
 
 
-\r
+static bool _get_drm_image_resolution(const char *path, int * /* OUT */ pWidth, int * /* OUT */pHeight)
+{
+       IV_ASSERT(path != NULL);
+
+       unsigned char *buffer = NULL;
+       unsigned int buf_size = 0;
+
+       buffer = ivug_data_drm_get_buffer_from_file(path, &buf_size);    // Returned buffer should be freed by user
+
+       if ( buffer == NULL )
+       {
+               MSG_DETAIL_ERROR("Cannot get file buf");
+               return false;
+       }
+
+       int width = 0;
+       int height = 0;
+
+       Evas *canvas;
+       Ecore_Evas *ee;
+
+       ee = ecore_evas_buffer_new(1, 1);               // Dummy canvas for decoding image
+       if (!ee)
+       {
+               MSG_DETAIL_ERROR("Cannot get EVAS");
+               free(buffer);
+               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_memfile_set(img, buffer, buf_size, NULL, NULL);       // There is no return value
+       evas_object_image_size_get(img, &width, &height);
+
+       evas_object_image_file_set(img, NULL, NULL);
+       evas_object_del(img);
+
+       free(buffer);
+
+       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)
 {
@@ -551,6 +706,8 @@ _get_drm_get_extension(const char* path)
        if(length <= 0)
        {
                MSG_IVUG_ERROR("mime_type_get_file_extension length is invalid: %d", length);
+               if(ext)
+                       free(ext);
                return NULL;
        }
 
@@ -587,7 +744,7 @@ bool ivug_fileinfo_get_image_resolution(const char *path, int * /* OUT */ pWidth
 
        if(ivug_drm_is_drm_file(path) == true)
        {
-               return false;\r
+               return _get_drm_image_resolution(path, pWidth, pHeight);
        }
        else
        {
@@ -669,7 +826,7 @@ bool ivug_fileinfo_get_image_gps_info(const char* path, double *latitude, double
 
        if(ivug_drm_is_drm_file(path) == true)
        {
-               return false;\r
+               return _get_drm_image_gps_info(path, latitude, longitude);
        }
        else
        {
@@ -737,4 +894,267 @@ char *ivug_fileinfo_get_mime_type(const char *path)
        return mime_type;
 }
 
+char *ivug_fileinfo_get_focal_length(const char *path)
+{
+       if ( path == NULL )
+       {
+               MSG_UTIL_ERROR("Cannot get mine type. path is NULL");
+               return NULL;
+       }
+
+       ExifData *ed = NULL;
+
+       /** get exifdata*/
+       ed = exif_data_new_from_file(path);
+       if (!ed)
+       {
+               return NULL;
+       }
+
+       char *length = NULL;
+       if(_get_focal_length_from_exifdata(ed, &length) == false)
+       {
+               exif_data_unref(ed);
+               return NULL;
+       }
+
+       exif_data_unref(ed);
+
+       return length;
+}
+
+char *ivug_fileinfo_get_model_name(const char *path)
+{
+       if ( path == NULL )
+       {
+               MSG_UTIL_ERROR("Cannot get mine type. path is NULL");
+               return NULL;
+       }
+
+       ExifData *ed = NULL;
+
+       /** get exifdata*/
+       ed = exif_data_new_from_file(path);
+       if (!ed)
+       {
+               return NULL;
+       }
+
+       char *model = NULL;
+       if(_get_model_from_exifdata(ed, &model) == false)
+       {
+               exif_data_unref(ed);
+               return NULL;
+       }
+
+       exif_data_unref(ed);
+
+       return model;
+}
+
+char *ivug_fileinfo_get_maker_name(const char *path)
+{
+       if ( path == NULL )
+       {
+               MSG_UTIL_ERROR("Cannot get mine type. path is NULL");
+               return NULL;
+       }
+
+       ExifData *ed = NULL;
+
+       /** get exifdata*/
+       ed = exif_data_new_from_file(path);
+       if (!ed)
+       {
+               return NULL;
+       }
+
+       char *maker = NULL;
+       if(_get_maker_from_exifdata(ed, &maker) == false)
+       {
+               exif_data_unref(ed);
+               return NULL;
+       }
+
+       exif_data_unref(ed);
+
+       return maker;
+}
+
+int ivug_fileinfo_get_flash_status(const char *path)
+{
+       if ( path == NULL )
+       {
+               MSG_UTIL_ERROR("Cannot get mine type. path is NULL");
+               return -1;
+       }
+
+       ExifData *ed = NULL;
+
+       /** get exifdata*/
+       ed = exif_data_new_from_file(path);
+       if (!ed)
+       {
+               return -1;
+       }
+
+       int status = 0;
+       if(_get_flash_from_exifdata(ed, &status) == false)
+       {
+               exif_data_unref(ed);
+               return -1;
+       }
+
+       exif_data_unref(ed);
+
+       return status;
+}
+
+int ivug_fileinfo_get_orientation(const char *path)
+{
+       if ( path == NULL )
+       {
+               MSG_UTIL_ERROR("Cannot get mine type. path is NULL");
+               return -1;
+       }
+
+       ExifData *ed = NULL;
+
+       /** get exifdata*/
+       ed = exif_data_new_from_file(path);
+       if (!ed)
+       {
+               return -1;
+       }
+
+       int orient = 0;
+       if(_get_orientation_from_exifdata(ed, &orient) == false)
+       {
+               exif_data_unref(ed);
+               return -1;
+       }
+
+       exif_data_unref(ed);
+
+       return orient;
+}
+
+int ivug_fileinfo_get_white_balance(const char *path)
+{
+       if ( path == NULL )
+       {
+               MSG_UTIL_ERROR("Cannot get mine type. path is NULL");
+               return -1;
+       }
+
+       ExifData *ed = NULL;
+
+       /** get exifdata*/
+       ed = exif_data_new_from_file(path);
+       if (!ed)
+       {
+               return -1;
+       }
+
+       int status = 0;
+       if(_get_white_balance_from_exifdata(ed, &status) == false)
+       {
+               exif_data_unref(ed);
+               return -1;
+       }
+
+       exif_data_unref(ed);
+
+       return status;
+}
+
+char *ivug_fileinfo_get_aperture(const char *path)
+{
+       if ( path == NULL )
+       {
+               MSG_UTIL_ERROR("Cannot get mine type. path is NULL");
+               return NULL;
+       }
+
+       ExifData *ed = NULL;
+
+       /** get exifdata*/
+       ed = exif_data_new_from_file(path);
+       if (!ed)
+       {
+               return NULL;
+       }
+
+       char *aperture = NULL;
+       if(_get_aperture_from_exifdata(ed, &aperture) == false)
+       {
+               exif_data_unref(ed);
+               return NULL;
+       }
+
+       exif_data_unref(ed);
+
+       return aperture;
+}
+
+char *ivug_fileinfo_get_exposure_time(const char *path)
+{
+       if ( path == NULL )
+       {
+               MSG_UTIL_ERROR("Cannot get mine type. path is NULL");
+               return NULL;
+       }
+
+       ExifData *ed = NULL;
+
+       /** get exifdata*/
+       ed = exif_data_new_from_file(path);
+       if (!ed)
+       {
+               return NULL;
+       }
+
+       char *exposure = NULL;
+       if(_get_exposure_time_from_exifdata(ed, &exposure) == false)
+       {
+               exif_data_unref(ed);
+               return NULL;
+       }
+
+       exif_data_unref(ed);
+
+       return exposure;
+}
+
+char *ivug_fileinfo_get_iso(const char *path)
+{
+       if ( path == NULL )
+       {
+               MSG_UTIL_ERROR("Cannot get mine type. path is NULL");
+               return NULL;
+       }
+
+       char buf[BUF_LEN] = {0,};
+       ExifData *ed = NULL;
+
+       /** get exifdata*/
+       ed = exif_data_new_from_file(path);
+       if (!ed)
+       {
+               return NULL;
+       }
+
+       int iso = -1;
+       if(_get_iso_from_exifdata(ed, &iso) == false)
+       {
+               exif_data_unref(ed);
+               return NULL;
+       }
+
+       exif_data_unref(ed);
+
+       snprintf(buf, sizeof(buf), "%d", iso);
+
+       return strdup(buf);
+}
 
old mode 100755 (executable)
new mode 100644 (file)
index efe8318..c5c6fea
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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"
 
@@ -138,7 +138,7 @@ CommandList *_find_command(Eina_Inlist *command_list, const char *command)
 
 static void _cleanup(_PMessageHandle pmessage)
 {
-       CommandList *pData;
+       CommandList *pData = NULL;
        Eina_Inlist *l2;
 
        EINA_INLIST_FOREACH_SAFE(pmessage->command_list, l2, pData)
@@ -163,6 +163,7 @@ static void _cleanup(_PMessageHandle pmessage)
 
                        MSG_HIGH("Remve cmd slot for %s", pData->command);
                        free(pData);
+                       pData = NULL;
                }
        }
 
@@ -378,7 +379,7 @@ bool register_message(MessageHandle handle, const char *command,  FnMessage cb,
 
        if ( pCallback == NULL )
        {
-               pCallback = (RegisteredCallback *)malloc(sizeof(RegisteredCallback));
+               pCallback = (RegisteredCallback *)calloc(1, sizeof(RegisteredCallback));
 
                pCallback->callback = cb;
                pCallback->client_data = data;
old mode 100755 (executable)
new mode 100644 (file)
index e58240a..44db19d
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 <stdbool.h>
@@ -575,7 +575,7 @@ ivug_mouse_event_add(Evas_Object *obj, mouse_callback_t *pCallback, void *client
        pData->pClientData = client_data;
        pData->m_state = MOUSE_DOWN_NONE;
        pData->multi_min_idx = INVALID_DEVICE_ID;
-       strncpy(pData->alias, alias, sizeof(pData->alias));
+       strncpy(pData->alias, alias, sizeof(pData->alias) -1);
 
        memcpy(&pData->cb, pCallback, sizeof(mouse_callback_t));
 
old mode 100755 (executable)
new mode 100644 (file)
index 17a4bd2..6150c9a
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 <glib.h>
 
+#include <vconf.h>
+#include <vconf-keys.h>
+
+#include <runtime_info.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>
+
 /*
        If filepath is web url, return TRUE.
 
@@ -207,12 +219,31 @@ bool ivug_is_file_exist(const char* filepath)
 
 
 /*
+       USer should freed returned value!
+*/
+char *ivug_get_directory(const char *filepath)
+{
+       if ( filepath == NULL )
+       {
+               MSG_UTIL_WARN("File path is NULL");
+               return "NULL";
+       }
+
+#ifdef USE_ECORE_FILE
+       return ecore_file_dir_get(filepath);
+#else
+       #error "Not implemented yet."
+#endif
+}
+
+
+/*
        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)
+char * ivug_get_filename(const char *filepath)
 {
        if ( filepath == NULL )
        {
@@ -228,9 +259,13 @@ const char * ivug_get_filename(const char *filepath)
        const char*pFileName = NULL;
 
        pFileName  =  strrchr(filepath, DIRECORY_SPLITTER);
-       pFileName = (NULL == pFileName)? "": (pFileName+1);
 
-       return pFileName;
+       if ( pFileName == NULL)         // If not found
+       {
+               return filepath;
+       }
+
+       return (pFileName+1);
 #endif
 
 }
@@ -247,6 +282,31 @@ bool ivug_allow_lcd_off(void)
        return (power_unlock_state(POWER_STATE_NORMAL)==0 ? true : false);
 }
 
+long int ivug_atox(const char *number)
+{
+       char *endptr = NULL;
+       long long int val = 0;
+
+       errno = 0;
+
+       val = strtoll(number, &endptr, 16);
+
+       if((errno == ERANGE && (val == LLONG_MAX || val == LLONG_MIN)) || (errno != 0 && val == 0))
+       {
+               MSG_UTIL_ERROR("ERANGE = %d, LONG_MAX = %d, LONG_MIN = %d", ERANGE, LLONG_MAX, LLONG_MIN);
+               MSG_UTIL_ERROR("strtol, val = %d, 0x%x, errno = %d, ", val, val, errno);
+               return -1L;
+       }
+
+       if(endptr == number)
+       {
+               MSG_UTIL_ERROR("No digits were found, number = %s", number);
+               return -1L;
+       }
+
+       return (long int)val;
+}
+
 int ivug_atoi(const char *number)
 {
        char *endptr = NULL;
@@ -295,53 +355,53 @@ double ivug_atod(const char *number)
        return val;
 }
 
-char * ivug_generate_file_name(const char *filepath, const char *extension)\r
-{\r
-       IV_ASSERT(filepath != NULL);\r
-\r
-       MSG_SETAS_HIGH("filepath %s", filepath);\r
-\r
-       char tempname[IVUG_MAX_FILE_PATH_LEN+1] = {0,};\r
-       char *ext = NULL;\r
-       char *filename = ecore_file_strip_ext(ecore_file_file_get(filepath));\r
-       char *dir = ecore_file_dir_get(filepath);\r
-\r
-       if(extension)\r
-       {\r
-               ext = strdup(extension);\r
-       }\r
-       else\r
-       {\r
-               ext = ivug_fileinfo_get_file_extension(filepath);\r
-       }\r
-\r
-       int i = 0;\r
-\r
-       for(i=1; i<IVUG_MAX_FILE_PATH_LEN; i++)\r
-       {\r
-               snprintf(tempname, sizeof(tempname), "%s/%s_%d.%s", dir, filename, i, ext);\r
-               if(ecore_file_exists(tempname) == EINA_FALSE)\r
-                       break;\r
-       }\r
-\r
-       if(filename)\r
-       {\r
-               free(filename);\r
-       }\r
-       if(ext)\r
-       {\r
-               free(ext);\r
-       }\r
-       if(i == IVUG_MAX_FILE_PATH_LEN)\r
-       {\r
-               MSG_UTIL_ERROR("Cannot make file");\r
-               return NULL;\r
-       }\r
-\r
-       MSG_UTIL_HIGH( "tempname: %s", tempname);\r
-\r
-       return strdup(tempname);\r
-}\r
+char * ivug_generate_file_name(const char *filepath, const char *extension)
+{
+       IV_ASSERT(filepath != NULL);
+
+       MSG_SETAS_HIGH("filepath %s", filepath);
+
+       char tempname[IVUG_MAX_FILE_PATH_LEN+1] = {0,};
+       char *ext = NULL;
+       char *filename = ecore_file_strip_ext(ecore_file_file_get(filepath));
+       char *dir = ecore_file_dir_get(filepath);
+
+       if(extension)
+       {
+               ext = strdup(extension);
+       }
+       else
+       {
+               ext = ivug_fileinfo_get_file_extension(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(filename)
+       {
+               free(filename);
+       }
+       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)
 {
@@ -365,3 +425,189 @@ char * ivug_strip_string(char* name)
 }
 
 
+
+bool ivug_is_bestpic(const char *file)
+{
+       ivug_retv_if(file == NULL, false);
+
+       const char szBest[] = "_bestshot";              // sizeof(szBest) = 10;
+
+       const char *find = NULL;
+
+       find = strrchr(file, '.');
+
+       if(find == NULL)
+       {
+               // All files should have extension
+               return false;
+       }
+
+       unsigned int dist = find - file;
+
+       if ( dist < sizeof(szBest) -1)
+       {
+               return false;
+       }
+
+       if ( strncmp(find - sizeof(szBest) + 1 , szBest , sizeof(szBest) - 1) == 0 )
+       {
+               return true;
+       }
+
+       return false;
+
+}
+
+/*
+       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);
+}
+
+char*
+ivug_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_UTIL_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_UTIL_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_UTIL_ERROR("Cannot get time zone");
+               return NULL;
+       }
+
+       MSG_UTIL_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_UTIL_ERROR("Cannot get time string");
+               return NULL;
+       }
+
+       MSG_UTIL_HIGH("ICU Date : %s", datestr);
+       return datestr;
+
+}
+
old mode 100755 (executable)
new mode 100644 (file)
index 4c8c2b1..5ce803f
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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
old mode 100755 (executable)
new mode 100644 (file)
index 9b8284b..8c243b5
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 <sys/time.h>  // gettimeofday
 
 #define EXPORT_API
 #endif
 
-#ifdef _WIN32
-#include <time.h>
-#include <Windows.h>
-
-#pragma comment(lib,"Ws2_32.lib")
-
-#define _CRT_SECURE_NO_WARNINGS
-#define _CRT_NONSTDC_NO_DEPRECATE
-#define _CRT_SECURE_NO_DEPRECATE
-
-#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
-  #define DELTA_EPOCH_IN_MICROSECS  11644473600000000Ui64
-#else
-  #define DELTA_EPOCH_IN_MICROSECS  11644473600000000ULL
-#endif
-
-struct timezone
-{
-  int  tz_minuteswest; /* minutes W of Greenwich */
-  int  tz_dsttime;     /* type of dst correction */
-};
-
-int gettimeofday(struct timeval *tv, struct timezone *tz)
-{
-  FILETIME ft;
-  unsigned __int64 tmpres = 0;
-  static int tzflag;
-
-  if (NULL != tv)
-  {
-    GetSystemTimeAsFileTime(&ft);
-
-    tmpres |= ft.dwHighDateTime;
-    tmpres <<= 32;
-    tmpres |= ft.dwLowDateTime;
-
-    /*converting file time to unix epoch*/
-    tmpres /= 10;  /*convert into microseconds*/
-    tmpres -= DELTA_EPOCH_IN_MICROSECS;
-    tv->tv_sec = (long)(tmpres / 1000000UL);
-    tv->tv_usec = (long)(tmpres % 1000000UL);
-  }
-
-  if (NULL != tz)
-  {
-    if (!tzflag)
-    {
-      _tzset();
-      tzflag++;
-    }
-    tz->tz_minuteswest = _timezone / 60;
-    tz->tz_dsttime = _daylight;
-  }
-
-  return 0;
-}
-
-#else
 #include <sys/time.h>
 #include <sys/utsname.h>
 #include <sys/resource.h>
 #include <unistd.h>
-#endif
-
 
 #include <stdarg.h>
 #include "statistics.h"
@@ -164,6 +104,8 @@ int IV_PERF_INIT(void)
        }
 
        g_accum_first_time = MAX_UINT64;
+       g_accum_index = 0;
+       g_accum_longest_name = 0;
 
        return 0;
 }
@@ -487,7 +429,7 @@ void iv_ta_accum_show_result_fp(FILE *fp)
 
 }
 
-
+#if 0
 #define _CONSTRUCTOR __attribute__ ((constructor))
 #define _DESTRUCTOR __attribute__ ((destructor))
 
@@ -501,6 +443,7 @@ static void _DESTRUCTOR _DLLExit(void)
        IV_PERF_DEINIT();
 
 }
+#endif
 
 
 #ifdef STANDALONE
old mode 100755 (executable)
new mode 100644 (file)
index 690bd1e..9c7f505
@@ -15,8 +15,6 @@ INCLUDE_DIRECTORIES(
        include
 )
 
-MESSAGE("Checking " ${PROJECT_NAME}\r)
-
 INCLUDE(FindPkgConfig)
 pkg_check_modules(${PROJECT_NAME}_pkgs REQUIRED
        evas
@@ -25,24 +23,31 @@ pkg_check_modules(${PROJECT_NAME}_pkgs REQUIRED
        elementary
        dlog
        ui-gadget-1                                                             # Motion
-       capi-system-haptic
+       libface-svc
+       liballshare
+       liballshare-core
+       contacts-service2
+       capi-network-nfc
+       haptic
+       capi-messaging-email
+       capi-messaging-messages
        capi-system-sensor
+       capi-web-url-download
+       capi-media-player
 )
 
 FOREACH(flag ${${PROJECT_NAME}_pkgs_CFLAGS})
-       SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
+       SET(EXTRA_FLAGS "${EXTRA_FLAGS} ${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})
+ADD_LIBRARY(${PROJECT_NAME} STATIC ${SRCS})
 
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION} )
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS ${EXTRA_FLAGS})
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
 
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${${PROJECT_NAME}_pkgs_LDFLAGS}
diff --git a/feature/include/ivug-email.h b/feature/include/ivug-email.h
deleted file mode 100755 (executable)
index 1b409a8..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-
-#ifndef __IVUG_EMAIL_H__
-#define __IVUG_EMAIL_H__
-
-#include <Evas.h>
-
-typedef struct
-{
-       void *email_handle;
-       Evas_Smart_Cb callback;
-       void *data;
-}email_handle_t;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-email_handle_t * ivug_email_create();
-
-bool ivug_email_destroy(email_handle_t *e_handle);
-
-bool ivug_email_set_message(email_handle_t *e_handle, const char *title, const char *content);
-
-bool ivug_email_set_file(email_handle_t *e_handle, const char *filepath);
-
-bool ivug_email_set_recipient(email_handle_t *e_handle, const char *address);
-
-bool ivug_email_send_message(email_handle_t *e_handle, Evas_Smart_Cb callback, void *data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__IVUG_EMAIL_H__
-
old mode 100755 (executable)
new mode 100644 (file)
index c44839d..098394c
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
@@ -27,17 +27,47 @@ extern "C" {
 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);
 
+#define OPERATION_NAME_CALL "http://tizen.org/appcontrol/operation/call"
 
 /*
        Launch extern module.
 */
+bool ivug_ext_launch_videoplayer_allshare(const char *filepath, int mssID);
 bool ivug_ext_launch_videoplayer_simple(const char *filepath);
 bool ivug_ext_launch_videoplayer(const char *uri);
-\r
+
+ui_gadget_h  ivug_ext_launch_wifi_file_transfer(const char *uri, ug_destroy_cb func, void *data);
+ui_gadget_h  ivug_ext_launch_bluetooth_print(const char *uri, ug_destroy_cb func, void *data);
+ui_gadget_h  ivug_ext_launch_bluetooth_send(const char *uri, ug_destroy_cb func, void *data);
+
 ui_gadget_h  ivug_ext_launch_contact(const char *uri, ug_destroy_cb func, void *data);
-\r
+ui_gadget_h  ivug_ext_launch_message(const char *uri, ug_destroy_cb func, void *data);
+bool ivug_ext_launch_message_through_number(const char *number);
+bool ivug_ext_launch_email_through_addr(const char *addr);
+
+ui_gadget_h  ivug_ext_launch_select_music(ug_result_cb result_func, ug_destroy_cb destroy_func, void *data);
+ui_gadget_h  ivug_ext_launch_select_contact(ug_result_cb result_func, ug_destroy_cb destroy_func, void *data);
+
+bool ivug_ext_launch_videoeditor(const char *uri);
+bool ivug_ext_launch_browser(const char *uri);
+bool ivug_ext_launch_email(const char *uri);
+bool ivug_ext_launch_email_account_set(void *data);
+bool ivug_ext_launch_facebook_profile(void *data, const char *id);
+
+/*
+       Actually, each sns pkg needs different parameter. so hard-coding cannot be removed.
+*/
+bool ivug_ext_launch_sns(const char *pkgname, const char *uri);
+
+
+/*
+       Below functions are not used at Now, but should be needed soon.
+*/
+bool ivug_ext_launch_picasa(const char *uri);
+bool ivug_ext_launch_facebook(const char *uri);
+bool ivug_ext_launch_twitter(const char *uri);
+bool ivug_ext_launch_print(const char *uri);
 
-bool ivug_ext_launch_browser(const char *uri);\r
 bool ivug_ext_launch_default(const char *uri, const char *operation, const char *pkg, void *data);
 
 #ifdef __cplusplus
old mode 100755 (executable)
new mode 100644 (file)
index 0523683..bcbec5a
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
@@ -23,22 +23,24 @@ extern "C" {
 
 #include <stdbool.h>
 
-#define INVALID_HAPTIC_HANDLE (-1)
+#define INVALID_HAPTIC_HANDLE (NULL)
 #define VIBRATION_DURATION (500)               // 500 ms
 
+typedef void * vibration_h;
+
 /*
-       If success, returns handle. otherwise -1.
+       If success, returns handle. otherwise NULL.
 */
-int ivug_vibration_create(void);
+vibration_h ivug_vibration_create(void);
 
 /*
        duration in ms
 */
-bool ivug_vibration_play(int handle, int duration);
+bool ivug_vibration_play(vibration_h handle, int duration);
 
-bool ivug_vibration_stop(int handle);
+bool ivug_vibration_stop(vibration_h handle);
 
-bool ivug_vibration_delete(int handle);
+bool ivug_vibration_delete(vibration_h handle);
 
 
 #ifdef __cplusplus
old mode 100755 (executable)
new mode 100644 (file)
index c85bec0..07fa788
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 "ivug-util.h"
 #include "ivug-debug.h"
 
+
 //definition
-#define CONTACT_UG_NAME                "contacts-list-efl"\r
-\r
-#define VIDEOPLAYER_PKG_NAME   "org.tizen.video-player"\r
-#define BROWSER_PKG_NAME               "org.tizen.browser"\r
-\r
-#define MIME_TYPE_LEN                  255\r
+#define MESSAGE_UG_NAME                "msg-composer-efl"
+#define EMAIL_UG_NAME                  "email-composer-efl"
+#define CONTACT_UG_NAME                "contacts-list-efl"
+#define MYFILE_DETAIL_UG_NAME  "myfile-detail-efl"
+#define BLUETOOTH_UG_NAME              "setting-bluetooth-efl"
+#define MYFILE_UG_NAME                 "myfile-efl"
+
+#define CONTACT_SELECT_UG_NAME "contacts-tabui-efl"
+
+#define VIDEOPLAYER_PKG_NAME   "com.samsung.video-player"
+#define BLUETOOTH_PKG_NAME             "com.samsung.bluetooth"
+#define BROWSER_PKG_NAME               "com.samsung.browser"
+#define MESSAGE_PKG_NAME               "com.samsung.message"
+#define EMAIL_PKG_NAME                         "com.samsung.email"
+
+
+#define FACEBOOK_PKG_NAME              "com.samsung.facebook"
+
+#define WIFI_FILE_TRANSFER_UG_NAME     "fileshare-efl"
+
+#define PRINT_PKG_NAME "com.samsung.mobileprint"
+
+#define OPERATION_NAME_PRINT "http://tizen.org/appcontrol/operation/PRINT"
+
+#define SERVICE_PRINT_FILES_TYPE "service_print_files_type"
+
+#define MIME_TYPE_LEN                  255
 
 typedef struct {
        ug_destroy_cb destroy_func;
        ug_result_cb result_func;
        void *cb_data;
 }ext_ug_t;
+#if 0
+static void
+_bundle_print(const char *key, const char *val, void *data)
+{
+       MSG_IVUG_HIGH("  %s:%s", key, val);
+}
+#endif
 
 static bool _data_print(service_h service, const char *key, void *user_data)
 {
-       MSG_IVUG_HIGH("  %s", key);
+       char *value;
+
+       char **value_array;
+       int array_len = 1;
+       int i;
+       bool array = false;
+
+       service_is_extra_data_array(service, key, &array);
+       if(array == false)
+       {
+               service_get_extra_data(service, key, &value);
+               MSG_IVUG_HIGH("  %s : %s", key, value);
+               free(value);
+       }
+       else
+       {
+               service_get_extra_data_array(service, key, &value_array, &array_len);
+               MSG_IVUG_HIGH("  %s :", key);
+               for(i=0; i<array_len; i++)
+               {
+                       MSG_IVUG_HIGH(" %s", value_array[i]);
+               }
+               for(i=0; i<array_len; i++)
+               {
+                       free(value_array[i]);
+               }
+               free(value_array);
+       }
 
        return true;
 }
@@ -122,7 +178,7 @@ ui_gadget_h _ivug_ext_launch_ug(const char *pkgname, service_h service, ug_destr
        ui_gadget_h ug = NULL;
        struct ug_cbs cbs = {0, };
 
-       ext_ug_t *ug_struct = calloc(1, sizeof(ug_struct));
+       ext_ug_t *ug_struct = calloc(1, sizeof(ext_ug_t));
        ug_struct->result_func = NULL;
        ug_struct->destroy_func = func;
        ug_struct->cb_data = data;
@@ -143,7 +199,7 @@ ui_gadget_h _ivug_ext_launch_ug_with_result(const char *pkgname,
        ui_gadget_h ug = NULL;
        struct ug_cbs cbs = {0, };
 
-       ext_ug_t *ug_struct = calloc(1, sizeof(ug_struct));
+       ext_ug_t *ug_struct = calloc(1, sizeof(ext_ug_t));
        ug_struct->result_func = result_func;
        ug_struct->destroy_func = destroy_func;
        ug_struct->cb_data = data;
@@ -177,14 +233,14 @@ void ivug_ext_service_reply_cb(service_h request, service_h reply, service_resul
                        MSG_IMAGEVIEW_ERROR("unhandled value %d", result);
                        break;
        }
-}\r
-
+}
 
-ui_gadget_h  ivug_ext_launch_contact(const char *uri, ug_destroy_cb func, void *data)
+ui_gadget_h  ivug_ext_launch_wifi_file_transfer(const char *uri, ug_destroy_cb func, void *data)
 {
        MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
 
        int ret = -1;
+       int destroy_ret = -1;
 
        service_h handle;
        ui_gadget_h ug = NULL;
@@ -200,56 +256,58 @@ ui_gadget_h  ivug_ext_launch_contact(const char *uri, ug_destroy_cb func, void *
        if(ret != SERVICE_ERROR_NONE)
        {
                MSG_IMAGEVIEW_ERROR("service_set_operation failed, %d", ret);
-               goto MESSAGE_END;
+               goto WIFI_TRANSFER_END;
        }*/
 
        ret = service_set_uri (handle, uri);
        if(ret != SERVICE_ERROR_NONE)
        {
                MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
-               goto CONTACT_END;
+               goto WIFI_TRANSFER_END;
        }
 
-       ret = service_add_extra_data(handle, "type", "41");
+       ret = service_add_extra_data(handle, "filecount", "1");
        if(ret != SERVICE_ERROR_NONE)
        {
                MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
-               goto CONTACT_END;
+               goto WIFI_TRANSFER_END;
        }
 
-       ret = service_add_extra_data(handle, "ct_path", uri);
+       ret = service_add_extra_data(handle, "files", uri);
        if(ret != SERVICE_ERROR_NONE)
        {
                MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
-               goto CONTACT_END;
+               goto WIFI_TRANSFER_END;
        }
 
-       /*const char *pkgname = CONTACT_UG_NAME;
+       /*const char *pkgname = WIFI_FILE_TRANSFER_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;
+               goto WIFI_TRANSFER_END;
        }*/
 
-       ug = _ivug_ext_launch_ug(CONTACT_UG_NAME, handle, func, data);
+       ug = _ivug_ext_launch_ug(WIFI_FILE_TRANSFER_UG_NAME, handle, func, data);
 
-CONTACT_END:
-       if(service_destroy(handle) != SERVICE_ERROR_NONE)
+WIFI_TRANSFER_END:
+       destroy_ret = service_destroy(handle);
+       if(destroy_ret != SERVICE_ERROR_NONE)
        {
-               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", ret);
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", destroy_ret);
                return NULL;
        }
 
        return (ret == SERVICE_ERROR_NONE ? ug : NULL);
 }
-\r
-bool ivug_ext_launch_videoplayer(const char *uri)
+
+bool ivug_ext_launch_videoeditor(const char *uri)
 {
        MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
 
        int ret = -1;
+       int destroy_ret = -1;
 
        service_h handle;
 
@@ -264,28 +322,35 @@ bool ivug_ext_launch_videoplayer(const char *uri)
        if(ret != SERVICE_ERROR_NONE)
        {
                MSG_IMAGEVIEW_ERROR("service_set_operation failed, %d", ret);
-               goto VIDEO_PLAYER_END;
+               goto VIDEO_EDITOR_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;
+               goto VIDEO_EDITOR_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;
+               goto VIDEO_EDITOR_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;
+               goto VIDEO_EDITOR_END;
+       }
+
+       ret = service_add_extra_data(handle, "edit_mode", "trim");
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto VIDEO_EDITOR_END;
        }
 
        const char *pkgname = VIDEOPLAYER_PKG_NAME;
@@ -294,103 +359,169 @@ bool ivug_ext_launch_videoplayer(const char *uri)
        if(ret != SERVICE_ERROR_NONE)
        {
                MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
-               goto VIDEO_PLAYER_END;
+               goto VIDEO_EDITOR_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;
+               goto VIDEO_EDITOR_END;
        }
 
-VIDEO_PLAYER_END:
-       if(service_destroy(handle) != SERVICE_ERROR_NONE)
+VIDEO_EDITOR_END:
+       destroy_ret = service_destroy(handle);
+       if(destroy_ret != SERVICE_ERROR_NONE)
        {
-               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", ret);
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", destroy_ret);
                return false;
        }
 
        return (ret == SERVICE_ERROR_NONE ? true : false);
 }
 
-bool ivug_ext_launch_videoplayer_simple(const char *uri)
+ui_gadget_h  ivug_ext_launch_message(const char *uri, ug_destroy_cb func, void *data)
 {
        MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
 
        int ret = -1;
+       int destroy_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 false;
+               return NULL;
        }
 
-       ret = service_set_operation(handle, SERVICE_OPERATION_VIEW);
+       /*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;
-       }
+               goto MESSAGE_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;
+               goto MESSAGE_END;
        }
 
-       ret = service_add_extra_data(handle, "path", uri);
+       if (ivug_is_web_uri(uri) == true)
+       {
+               ret = service_add_extra_data(handle, "BODY", uri);
+               if(ret != SERVICE_ERROR_NONE)
+               {
+                       MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+                       goto MESSAGE_END;
+               }
+       }
+       else
+       {
+               ret = service_add_extra_data(handle, "ATTACHFILE", uri);
+               if(ret != SERVICE_ERROR_NONE)
+               {
+                       MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+                       goto MESSAGE_END;
+               }
+       }
+
+       /*const char *pkgname = MESSAGE_UG_NAME;
+
+       ret = service_set_package(handle, pkgname);
        if(ret != SERVICE_ERROR_NONE)
        {
-               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
-               goto VIDEO_PLAYER_SIMPLE_END;
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto MESSAGE_END;
+       }*/
+
+       ug = _ivug_ext_launch_ug(MESSAGE_UG_NAME, handle, func, data);
+
+MESSAGE_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 ? ug : NULL);
+}
 
-       // 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");
+bool  ivug_ext_launch_message_through_number(const char *number)
+{
+       MSG_IMAGEVIEW_HIGH("%s. Number=%s", __func__, number);
+
+       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 false;
+       }
+
+       ret = service_set_operation(handle, SERVICE_OPERATION_SEND_TEXT);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_operation failed, %d", ret);
+               goto MESSAGE_CT_END;
+       }
+
+       /*ret = service_set_uri (handle, uri);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto MESSAGE_CT_END;
+       }*/
+
+       ret = service_add_extra_data(handle, SERVICE_DATA_TO, number);
        if(ret != SERVICE_ERROR_NONE)
        {
                MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
-               goto VIDEO_PLAYER_SIMPLE_END;
+               goto MESSAGE_CT_END;
        }
 
-       const char *pkgname = VIDEOPLAYER_PKG_NAME;
+       const char *pkgname = MESSAGE_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;
+               goto MESSAGE_CT_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;
+               goto MESSAGE_CT_END;
        }
 
-VIDEO_PLAYER_SIMPLE_END:
-       if(service_destroy(handle) != SERVICE_ERROR_NONE)
+MESSAGE_CT_END:
+       destroy_ret = service_destroy(handle);
+       if(destroy_ret != SERVICE_ERROR_NONE)
        {
-               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", ret);
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", destroy_ret);
                return false;
        }
 
        return (ret == SERVICE_ERROR_NONE ? true : false);
 }
-\r
-\r
 
-bool ivug_ext_launch_browser(const char *uri)
+
+bool  ivug_ext_launch_email(const char *uri)
 {
        MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
 
        int ret = -1;
+       int destroy_ret = -1;
 
        service_h handle;
 
@@ -401,51 +532,84 @@ bool ivug_ext_launch_browser(const char *uri)
                return false;
        }
 
-       ret = service_set_operation(handle, SERVICE_OPERATION_VIEW);
+       ret = service_set_operation(handle, SERVICE_OPERATION_SEND);
        if(ret != SERVICE_ERROR_NONE)
        {
                MSG_IMAGEVIEW_ERROR("service_set_operation failed, %d", ret);
-               goto BROWSER_END;
+               goto EMAIL_END;
        }
 
-       ret = service_add_extra_data(handle, "url", uri);
+       ret = service_set_uri(handle, uri);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto EMAIL_END;
+       }
+
+       Ecore_X_Window win_id = elm_win_xwindow_get(ug_get_window());
+       ret = service_set_window(handle, win_id);
        if(ret != SERVICE_ERROR_NONE)
        {
                MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
-               goto BROWSER_END;
+               goto EMAIL_END;
        }
 
-       const char *pkgname = BROWSER_PKG_NAME;
+       ret = service_add_extra_data(handle, "RUN_TYPE", "5");
+               if(ret != SERVICE_ERROR_NONE)
+               {
+                       MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+                       goto EMAIL_END;
+               }
+
+       if (ivug_is_web_uri(uri) == true)
+       {
+               ret = service_add_extra_data(handle, "BODY", uri);
+               if(ret != SERVICE_ERROR_NONE)
+               {
+                       MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+                       goto EMAIL_END;
+               }
+       }
+       else
+       {
+               ret = service_add_extra_data(handle, "ATTACHMENT", uri);
+               if(ret != SERVICE_ERROR_NONE)
+               {
+                       MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+                       goto EMAIL_END;
+               }
+       }
+
+       const char *pkgname = EMAIL_UG_NAME;
 
        ret = service_set_package(handle, pkgname);
        if(ret != SERVICE_ERROR_NONE)
        {
-               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
-               goto BROWSER_END;
+               MSG_IMAGEVIEW_ERROR("service_set_package failed, %d", ret);
+               goto EMAIL_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;
+               goto EMAIL_END;
        }
 
-BROWSER_END:
-       if(service_destroy(handle) != SERVICE_ERROR_NONE)
+EMAIL_END:
+       destroy_ret = service_destroy(handle);
+       if(destroy_ret != SERVICE_ERROR_NONE)
        {
-               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", ret);
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", destroy_ret);
                return false;
        }
 
        return (ret == SERVICE_ERROR_NONE ? true : false);
 }
 
-\r
-
-bool ivug_ext_launch_default(const char *uri, const char *operation, const char *pkg, void *data)
+bool  ivug_ext_launch_email_through_addr(const char *addr)
 {
-       MSG_IMAGEVIEW_HIGH("%s.", __func__);
+       MSG_IMAGEVIEW_HIGH("%s. Number=%s", __func__, addr);
 
        int ret = -1;
        int destroy_ret = -1;
@@ -456,45 +620,128 @@ bool ivug_ext_launch_default(const char *uri, const char *operation, const char
        if(ret != SERVICE_ERROR_NONE)
        {
                MSG_IMAGEVIEW_ERROR("service_create failed, %d", ret);
-               return NULL;
+               return false;
        }
 
-       ret = service_set_operation(handle, operation);
+       ret = service_set_operation(handle, SERVICE_OPERATION_SEND_TEXT);
        if(ret != SERVICE_ERROR_NONE)
        {
-               MSG_IMAGEVIEW_ERROR("service_set_operation %s failed, %d", operation, ret);
-               goto LAUNCH_END;
+               MSG_IMAGEVIEW_ERROR("service_set_operation failed, %d", ret);
+               goto EMAIL_CT_END;
        }
 
-       ret = service_set_uri (handle, uri);
+       const char *pkgname = EMAIL_UG_NAME;
+
+       ret = service_set_app_id(handle, pkgname);
        if(ret != SERVICE_ERROR_NONE)
        {
-               MSG_IMAGEVIEW_ERROR("service_set_uri %s failed, %d", uri, ret);
-               goto LAUNCH_END;
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto EMAIL_CT_END;
        }
 
-       ret = service_set_package(handle, pkg);
+       Ecore_X_Window win_id = elm_win_xwindow_get(ug_get_window());
+       ret = service_set_window(handle, win_id);
        if(ret != SERVICE_ERROR_NONE)
        {
-               MSG_IMAGEVIEW_ERROR("service_set_package %s failed, %d", pkg, ret);
-               goto LAUNCH_END;
-       }\r
-\r
-       ret = service_set_window(handle, ug_get_window());\r
-       if(ret != SERVICE_ERROR_NONE)\r
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto EMAIL_CT_END;
+       }
+
+       /*ret = service_set_uri (handle, uri);
+       if(ret != SERVICE_ERROR_NONE)
        {
-               MSG_IMAGEVIEW_ERROR("service_set_window %s failed, %d", pkg, ret);\r
-               goto LAUNCH_END;
-       }\r
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto EMAIL_CT_END;
+       }*/
+
+       ret = service_add_extra_data(handle, SERVICE_DATA_TO, addr);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto EMAIL_CT_END;
+       }
+       /*
+       service_add_extra_data(service, SERVICE_DATA_CC, email_address);
+       service_add_extra_data(service, SERVICE_DATA_BCC, email_address);
+       service_add_extra_data(service, SERVICE_DATA_SUBJECT, subject_text);
+       service_add_extra_data(service, SERVICE_DATA_TEXT, body_text);
+       */
 
        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;
+               goto EMAIL_CT_END;
        }
 
-LAUNCH_END:
+EMAIL_CT_END:
+       destroy_ret = service_destroy(handle);
+       if(destroy_ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", destroy_ret);
+               return false;
+       }
+
+       return (ret == SERVICE_ERROR_NONE ? true : false);
+}
+
+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;
+       int destroy_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:
        destroy_ret = service_destroy(handle);
        if(destroy_ret != SERVICE_ERROR_NONE)
        {
@@ -502,6 +749,1067 @@ LAUNCH_END:
                return NULL;
        }
 
+       return (ret == SERVICE_ERROR_NONE ? ug : NULL);
+}
+
+ui_gadget_h  ivug_ext_launch_bluetooth_send(const char *uri, ug_destroy_cb func, void *data)
+{
+       MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
+
+       int ret = -1;
+       int destroy_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 BT_END;
+       }*/
+
+       ret = service_set_uri (handle, uri);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto BT_END;
+       }
+
+       ret = service_add_extra_data(handle, "launch-type", "send");
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto BT_END;
+       }
+
+       ret = service_add_extra_data(handle, "filecount", "1");
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto BT_END;
+       }
+
+       ret = service_add_extra_data(handle, "files", uri);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto BT_END;
+       }
+
+       /*const char *pkgname = BLUETOOTH_UG_NAME;
+
+       ret = service_set_package(handle, pkgname);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto BT_END;
+       }*/
+
+       ug = _ivug_ext_launch_ug(BLUETOOTH_UG_NAME, handle, func, data);
+
+BT_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 ? ug : NULL);
+}
+
+ui_gadget_h  ivug_ext_launch_bluetooth_print(const char *uri, ug_destroy_cb func, void *data)
+{
+       MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
+
+       int ret = -1;
+       int destroy_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 BT_END;
+       }*/
+
+       ret = service_set_uri (handle, uri);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto BT_PRINT_END;
+       }
+
+       ret = service_add_extra_data(handle, "launch-type", "print");
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto BT_PRINT_END;
+       }
+
+       ret = service_add_extra_data(handle, "filecount", "1");
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto BT_PRINT_END;
+       }
+
+       ret = service_add_extra_data(handle, "files", uri);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto BT_PRINT_END;
+       }
+
+       /*const char *pkgname = BLUETOOTH_UG_NAME;
+
+       ret = service_set_package(handle, pkgname);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto BT_PRINT_END;
+       }*/
+
+       ug = _ivug_ext_launch_ug(BLUETOOTH_UG_NAME, handle, func, data);
+
+BT_PRINT_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 ? ug : NULL);
+}
+
+
+bool ivug_ext_launch_videoplayer(const char *uri)
+{
+       MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
+
+       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 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:
+       destroy_ret = service_destroy(handle);
+       if(destroy_ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", destroy_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;
+       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 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:
+       destroy_ret = service_destroy(handle);
+       if(destroy_ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", destroy_ret);
+               return false;
+       }
+
+       return (ret == SERVICE_ERROR_NONE ? true : false);
+}
+
+bool ivug_ext_launch_videoplayer_allshare(const char *uri, int mssID)
+{
+#define MID_MAX_LEN     (8)
+
+       MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
+
+       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 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_ALLSHARE_END;
+       }
+
+       ret = service_set_uri (handle, uri);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto VIDEO_PLAYER_ALLSHARE_END;
+       }
+
+       char temp[MID_MAX_LEN] = {0,};
+       snprintf(temp, sizeof(temp), "%d", mssID);
+
+       ret = service_add_extra_data(handle, "video_list_type", "all_share");
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto VIDEO_PLAYER_ALLSHARE_END;
+       }
+
+       ret = service_add_extra_data(handle, "MSS_MediaID", temp);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto VIDEO_PLAYER_ALLSHARE_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_ALLSHARE_END;
+       }
+
+       ret = service_add_extra_data(handle, "launching_application", "simple_viewer");
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto VIDEO_PLAYER_ALLSHARE_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_ALLSHARE_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_ALLSHARE_END;
+       }
+
+VIDEO_PLAYER_ALLSHARE_END:
+       destroy_ret = service_destroy(handle);
+       if(destroy_ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", destroy_ret);
+               return false;
+       }
+
+       return (ret == SERVICE_ERROR_NONE ? true : false);
+}
+
+
+bool ivug_ext_launch_twitter(const char *uri)
+{
+       MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
+
+       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 false;
+       }
+
+       if ( ivug_is_web_uri(uri) == true)
+       {
+               ret = service_set_operation(handle, SERVICE_OPERATION_SEND_TEXT);
+               if(ret != SERVICE_ERROR_NONE)
+               {
+                       MSG_IMAGEVIEW_ERROR("service_set_operation failed, %d", ret);
+                       goto TWITTER_END;
+               }
+               ret = service_add_extra_data(handle, SERVICE_DATA_TEXT, uri);
+               if(ret != SERVICE_ERROR_NONE)
+               {
+                       MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+                       goto TWITTER_END;
+               }
+       }
+       else
+       {
+               ret = service_set_operation(handle, SERVICE_OPERATION_SEND);
+               if(ret != SERVICE_ERROR_NONE)
+               {
+                       MSG_IMAGEVIEW_ERROR("service_set_operation failed, %d", ret);
+                       goto TWITTER_END;
+               }
+               ret = service_set_uri (handle, uri);
+               if(ret != SERVICE_ERROR_NONE)
+               {
+                       MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+                       goto TWITTER_END;
+               }
+       }
+
+       const char *pkgname = "com.samsung.twitter";
+
+       ret = service_set_package(handle, pkgname);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto TWITTER_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 TWITTER_END;
+       }
+
+TWITTER_END:
+       destroy_ret = service_destroy(handle);
+       if(destroy_ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", destroy_ret);
+               return false;
+       }
+
+       return (ret == SERVICE_ERROR_NONE ? true : false);
+}
+
+bool ivug_ext_launch_facebook(const char *uri)
+{
+       MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
+
+       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 false;
+       }
+
+       if ( ivug_is_web_uri(uri) == true)
+       {
+               ret = service_set_operation(handle, SERVICE_OPERATION_SEND_TEXT);
+               if(ret != SERVICE_ERROR_NONE)
+               {
+                       MSG_IMAGEVIEW_ERROR("service_set_operation failed, %d", ret);
+                       goto FACEBOOK_END;
+               }
+               ret = service_add_extra_data(handle, SERVICE_DATA_TEXT, uri);
+               if(ret != SERVICE_ERROR_NONE)
+               {
+                       MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+                       goto FACEBOOK_END;
+               }
+       }
+       else
+       {
+               ret = service_set_operation(handle, SERVICE_OPERATION_SEND);
+               if(ret != SERVICE_ERROR_NONE)
+               {
+                       MSG_IMAGEVIEW_ERROR("service_set_operation failed, %d", ret);
+                       goto FACEBOOK_END;
+               }
+               ret = service_set_uri (handle, uri);
+               if(ret != SERVICE_ERROR_NONE)
+               {
+                       MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+                       goto FACEBOOK_END;
+               }
+       }
+
+       const char *pkgname = "com.samsung.facebook";
+
+       ret = service_set_package(handle, pkgname);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto FACEBOOK_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 FACEBOOK_END;
+       }
+
+FACEBOOK_END:
+       destroy_ret = service_destroy(handle);
+       if(destroy_ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", destroy_ret);
+               return false;
+       }
+
+       return (ret == SERVICE_ERROR_NONE ? true : false);
+}
+
+bool ivug_ext_launch_picasa(const char *uri)
+{
+       MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
+
+       int ret = -1;
+       int destroy_ret = -1;
+       char xwin_id_str[12] = {0,};
+
+       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_SEND);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_operation failed, %d", ret);
+               goto PICASA_END;
+       }
+       ret = service_set_uri (handle, uri);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto PICASA_END;
+       }
+
+       const char *pkgname = "com.samsung.picasa";
+
+       ret = service_set_package(handle, pkgname);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto PICASA_END;
+       }
+
+       Ecore_X_Window xwin_id = elm_win_xwindow_get(ug_get_window());
+       eina_convert_itoa(xwin_id, xwin_id_str);
+       ret = service_add_extra_data(handle, "XWINDOW_ID", xwin_id_str);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto PICASA_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 PICASA_END;
+       }
+
+PICASA_END:
+       destroy_ret = service_destroy(handle);
+       if(destroy_ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", destroy_ret);
+               return false;
+       }
+
+       return (ret == SERVICE_ERROR_NONE ? true : false);
+}
+
+bool ivug_ext_launch_sns(const char *pkgname, const char *uri)
+{
+       if(strcmp(pkgname, "com.samsung.twitter") == 0)
+       {
+               return ivug_ext_launch_twitter(uri);
+       }
+       else if(strcmp(pkgname, "com.samsung.facebook") == 0)
+       {
+               return ivug_ext_launch_facebook(uri);
+       }
+       else if(strcmp(pkgname, "com.samsung.picasa") == 0)
+       {
+               return ivug_ext_launch_picasa(uri);
+       }
+       else if(strcmp(pkgname, "com.samsung.youtube") == 0)
+       {
+               return ivug_ext_launch_default(uri, SERVICE_OPERATION_SEND, pkgname, NULL);
+       }
+       else
+       {
+               MSG_IMAGEVIEW_ERROR("Unknown package name:%s", pkgname);
+       }
+
+       return true;
+}
+
+bool ivug_ext_launch_browser(const char *uri)
+{
+       MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
+
+       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 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:
+       destroy_ret = service_destroy(handle);
+       if(destroy_ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", destroy_ret);
+               return false;
+       }
+
+       return (ret == SERVICE_ERROR_NONE ? true : false);
+}
+
+bool ivug_ext_launch_print(const char *uri)
+{
+       MSG_IMAGEVIEW_HIGH("%s. URI=%s", __func__, uri);
+
+       int ret = -1;
+       int destroy_ret = -1;
+       const char *pkgname = PRINT_PKG_NAME;
+
+       if(uri == NULL)
+       {
+               MSG_IMAGEVIEW_ERROR("URI is NULL");
+               return false;
+       }
+
+       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, OPERATION_NAME_PRINT);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_operation failed, %d", ret);
+               goto PRINT_END;
+       }
+
+       ret = service_set_package(handle, pkgname);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_package failed, %d", ret);
+               goto PRINT_END;
+       }
+
+       ret = service_set_uri (handle, uri);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto PRINT_END;
+       }
+
+       ret = service_add_extra_data(handle, SERVICE_PRINT_FILES_TYPE, "IMG");
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto PRINT_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 PRINT_END;
+       }
+
+PRINT_END:
+       destroy_ret = service_destroy(handle);
+       if(destroy_ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", destroy_ret);
+               return false;
+       }
+
+       return (ret == SERVICE_ERROR_NONE ? true : false);
+}
+
+
+ui_gadget_h  ivug_ext_launch_select_music(ug_result_cb result_func, ug_destroy_cb destroy_func, void *data)
+{
+       MSG_IMAGEVIEW_HIGH("%s", __func__);
+
+       const char *pa_cur_ringtone = NULL;
+       const char *dir_path = NULL;
+
+       int ret = -1;
+       int destroy_ret = -1;
+
+       service_h handle;
+       ui_gadget_h ug = NULL;
+
+       pa_cur_ringtone = "/opt/share/settings/Ringtones/Over the horizon.mp3";
+       dir_path = "/opt/share/settings/Ringtones/";
+
+       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 MYFILE_END;
+       }*/
+
+       ret = service_add_extra_data(handle, "marked_mode", pa_cur_ringtone);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto MYFILE_END;
+       }
+
+       ret = service_add_extra_data(handle, "path", dir_path);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto MYFILE_END;
+       }
+
+       ret = service_add_extra_data(handle, "select_type", "SINGLE_FILE");
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto MYFILE_END;
+       }
+
+       ret = service_add_extra_data(handle, "drm_type", "DRM_ALL");
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto MYFILE_END;
+       }
+
+       /*const char *pkgname = MYFILE_UG_NAME;
+
+       ret = service_set_package(handle, pkgname);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto MYFILE_END;
+       }*/
+
+       ug = _ivug_ext_launch_ug_with_result(MYFILE_UG_NAME, handle, result_func, destroy_func, data);
+
+MYFILE_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 ? ug : NULL);
+}
+
+ui_gadget_h  ivug_ext_launch_select_contact(ug_result_cb result_func, ug_destroy_cb destroy_func, void *data)
+{
+       MSG_IMAGEVIEW_HIGH("%s", __func__);
+
+       int ret = -1;
+       int destroy_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 SELECT_CONTACT_END;
+       }*/
+
+       ret = service_add_extra_data(handle, "type", "11");
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto SELECT_CONTACT_END;
+       }
+
+       /*const char *pkgname = CONTACT_SELECT_UG_NAME;
+
+       ret = service_set_package(handle, pkgname);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_uri failed, %d", ret);
+               goto SELECT_CONTACT_END;
+       }*/
+
+       char xwin_id_str[12] = {0,};
+       Ecore_X_Window xwin_id = elm_win_xwindow_get(ug_get_window());
+       eina_convert_itoa(xwin_id, xwin_id_str);
+       ret = service_add_extra_data(handle, "XWINDOW_ID", xwin_id_str);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto SELECT_CONTACT_END;
+       }
+
+       ug = _ivug_ext_launch_ug_with_result(CONTACT_SELECT_UG_NAME, handle, result_func, destroy_func, data);
+
+SELECT_CONTACT_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 ? ug : NULL);
+}
+
+bool  ivug_ext_launch_email_account_set(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 false;
+       }
+
+       ret = service_add_extra_data(handle, "RUN_TYPE", "9");
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto EMAIL_ACCOUNT_END;
+       }
+
+       ret = service_set_package(handle, EMAIL_PKG_NAME);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_package failed, %d", ret);
+               goto EMAIL_ACCOUNT_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 EMAIL_ACCOUNT_END;
+       }
+
+EMAIL_ACCOUNT_END:
+       destroy_ret = service_destroy(handle);
+       if(destroy_ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", destroy_ret);
+               return false;
+       }
+
+       return (ret == SERVICE_ERROR_NONE ? true : false);
+}
+
+bool ivug_ext_launch_facebook_profile(void *data, const char *id)
+{
+       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 false;
+       }
+
+       ret = service_add_extra_data(handle, "fb.appcontrol.launch.type", "profile");
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto FACEBOOK_END;
+       }
+
+       ret = service_add_extra_data(handle, "fb.appcontrol.launch.info", id);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_add_extra_data failed, %d", ret);
+               goto FACEBOOK_END;
+       }
+
+       ret = service_set_operation(handle, "http://tizen.org/fb/appcontrol/operation/view");
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_operation failed, %d", ret);
+               goto FACEBOOK_END;
+       }
+
+       ret = service_set_package(handle, FACEBOOK_PKG_NAME);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_package failed, %d", ret);
+               goto FACEBOOK_END;
+       }
+
+       ret = service_send_launch_request(handle, ivug_ext_service_reply_cb, data);
+       if(ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_send_launch_request failed, %d", ret);
+               goto FACEBOOK_END;
+       }
+
+FACEBOOK_END:
+       destroy_ret = service_destroy(handle);
+       if(destroy_ret != SERVICE_ERROR_NONE)
+       {
+               MSG_IMAGEVIEW_ERROR("service_destroy failed, %d", destroy_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 false;
+       }
+
+       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;
+       }
+
+       if(pkg)
+       {
+               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 false;
+       }
+
        return (ret == SERVICE_ERROR_NONE ? true : false);
 }
 
old mode 100755 (executable)
new mode 100644 (file)
index 8ffcf4d..942f76e
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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"
@@ -28,14 +28,12 @@ static const char *_conver_error(int err)
                        return "Successful";
                case HAPTIC_ERROR_INVALID_PARAMETER:
                        return "Invalid parameter";
-               case HAPTIC_ERROR_NO_SUCH_FILE:
-                       return "No such file";
-               case HAPTIC_ERROR_NOT_SUPPORTED_FORMAT:
-                       return "Not supported file format";
                case HAPTIC_ERROR_NOT_INITIALIZED:
-                       return \r"Not initialized";
+                       return "Not initialized";
                case HAPTIC_ERROR_OPERATION_FAILED:
                        return "Operation failed";
+               case HAPTIC_ERROR_NOT_SUPPORTED_DEVICE:
+                       return "Not supported device";
                default:
                {
                        static char error[128];
@@ -49,47 +47,52 @@ static const char *_conver_error(int err)
 }
 
 
-int ivug_vibration_create()
+vibration_h ivug_vibration_create()
 {
        int ret = HAPTIC_ERROR_NONE;
+       haptic_device_h handle = NULL;
 
-       ret = haptic_initialize();
+       ret = haptic_open(HAPTIC_DEVICE_ALL, &handle);
 
        if (ret != HAPTIC_ERROR_NONE)
        {
                MSG_UTIL_ERROR("device_haptic_open failed. %s", _conver_error(ret));
-               return -1;
+               return NULL;
        }
 
-       int vib_index = 0;              // Means all vibratior.
+       MSG_UTIL_HIGH("Vibration init. Handle=%x", handle);
 
-       return vib_index;
+       return (vibration_h)handle;
 }
 
-bool ivug_vibration_play(int handle, int duration)
+bool ivug_vibration_play(vibration_h v_handle, int duration)
 {
+       IV_ASSERT(v_handle!=NULL);
        int ret = HAPTIC_ERROR_NONE;
+       haptic_device_h handle = (haptic_device_h)v_handle;
 
-       MSG_UTIL_HIGH("Vibration start. Handle=%d duration=%f", handle, duration);
+       MSG_UTIL_HIGH("Vibration start. Handle=%x duration=%d", handle, duration);
 
-       ret = haptic_vibrate_monotone(handle, duration, HAPTIC_LEVEL_3);
+       ret = haptic_vibrate_monotone(handle, duration, NULL);
 
        if (ret != HAPTIC_ERROR_NONE)
        {
-               MSG_UTIL_ERROR("haptic_vibrate_monotone error Handle=%d. %s", handle, _conver_error(ret));
+               MSG_UTIL_ERROR("haptic_vibrate_monotone error Handle=%x. %s", handle, _conver_error(ret));
                return false;
        }
 
        return true;
 }
 
-bool ivug_vibration_stop(int handle)
+bool ivug_vibration_stop(vibration_h v_handle)
 {
-       MSG_UTIL_HIGH("Vibration stop. Handle=%d", handle);
-
+       IV_ASSERT(v_handle!=NULL);
        int ret = HAPTIC_ERROR_NONE;
+       haptic_device_h handle = (haptic_device_h)v_handle;
+
+       MSG_UTIL_HIGH("Vibration stop. Handle=%x", handle);
 
-       ret = haptic_stop_device(handle);
+       ret = haptic_stop_all_effects(handle);
        if (ret != 0)
        {
                MSG_UTIL_ERROR("haptic_stop_device failed. %s",  _conver_error(ret));
@@ -99,13 +102,15 @@ bool ivug_vibration_stop(int handle)
 }
 
 
-bool ivug_vibration_delete(int handle)
+bool ivug_vibration_delete(vibration_h v_handle)
 {
-       MSG_UTIL_HIGH("Vibration deinit. Handle=%d", handle);
-
+       IV_ASSERT(v_handle!=NULL);
        int ret = HAPTIC_ERROR_NONE;
+       haptic_device_h handle = (haptic_device_h)v_handle;
+
+       MSG_UTIL_HIGH("Vibration deinit. Handle=%x", handle);
 
-       ret = haptic_deinitialize();
+       ret = haptic_close(handle);
 
        if (ret != HAPTIC_ERROR_NONE)
        {
old mode 100755 (executable)
new mode 100644 (file)
index 4348b5e..5f9a9b7
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
@@ -35,9 +35,16 @@ typedef enum {
        IVUG_VIEW_BY_FILE,
        IVUG_VIEW_BY_ALL,
        IVUG_VIEW_BY_FAVORITES,
-       IVUG_VIEW_BY_FOLDER,
+       IVUG_VIEW_BY_TAG,
+       IVUG_VIEW_BY_FOLDER,            // Same as DB Album. will be renamed to BY_ALBUM
        IVUG_VIEW_BY_PLACES,
+       IVUG_VIEW_BY_ALLSHARE,
+       IVUG_VIEW_BY_PTP,
+       IVUG_VIEW_BY_WEB,
+       IVUG_VIEW_BY_WEBALBUM,
        IVUG_VIEW_BY_CONTACT_ID,
+       IVUG_VIEW_BY_CONTACT_GROUP,
+       IVUG_VIEW_BY_DIRECTORY,
 } ivug_view_by;
 
 typedef enum {
old mode 100755 (executable)
new mode 100644 (file)
index 6c706ea..2ef31ee
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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.
@@ -26,7 +26,7 @@ ADD_DEFINITIONS("-D_USE_MEDIAINFO_STRINGID_")
 */
 #define _USE_MEDIAINFO_STRINGID_
 
-#define USE_RESCAN_FILE_PATH_AT_LIST\r
+#define USE_RESCAN_FILE_PATH_AT_LIST
 
 #define IVUG_MAX_FILE_PATH_LEN (4096)
 
@@ -34,18 +34,24 @@ ADD_DEFINITIONS("-D_USE_MEDIAINFO_STRINGID_")
 
 #define USE_CUSTOM_STYLE
 
-/*\r
+/*
        Time analysis data will be stored as file
 */
 #define TA_SAVETO_FILE
 
 // Temp. will be removed.
-#ifdef TARGET\r
-// todo about arm\r
+#ifdef TARGET  // i386 does not support face function
+#define ENABLE_FACE_MENU
 #endif
 
 #define USE_NEW_DB_API
 
-#define ZOOM_LEVEL_STEP (0.7)\r
-#define ZOOM_LEVEL_MAX (4)\r
+//#define USE_FACE
+//#define USE_ALLSHARE
+//#define USE_MOTION
+//#define USE_PTP
+//#define USE_THUMBLIST
+//#define USE_SCROLLER
+//#define USE_DRM_EXT
+//#define USE_WEBALBUM
 
old mode 100755 (executable)
new mode 100644 (file)
index 252c54c..7a679e1
@@ -11,13 +11,15 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
 SET(SRCS
 # Entry point
-       src/ug-image-viewer.c
+       src/ug-image-viewer.cpp
 
 # View related
        src/view/ivug-main-view.cpp
        src/view/ivug-main-view-toolbar.cpp
        src/view/ivug-main-view-menu.cpp
 
+       src/view/ivug-slideshow-view.cpp
+
        src/view/ivug-name-view.c
        src/view/ivug-details-view.c
        src/view/ivug-crop-view.cpp
@@ -35,7 +37,6 @@ SET(SRCS
 # Control related
        src/control/ivug-parameter.c
        src/control/ivug-context.c
-       src/control/ivug-filter.c
        src/control/ivug-detail-info.c
        src/control/ivug-setas.cpp
        src/control/ivug-crop-ug.cpp
@@ -51,6 +52,7 @@ INCLUDE_DIRECTORIES(
        ${IVUG_SOURCE_WIDGET_DIR}/include
        ${IVUG_SOURCE_COMMON_DIR}/include
        ${IVUG_SOURCE_MEDIA_DIR}/include
+       ${IVUG_SOURCE_RESOURCE_DIR}/include
        src
        src/include
        src/control
@@ -58,11 +60,10 @@ INCLUDE_DIRECTORIES(
        ${IVUG_SOURCE_SLIDESHOW_DIR}/include
 
 # Below include directory should be removed for make module more indepentatly
-       ${IVUG_SOURCE_SLIDESHOW_DIR}/src/effect/include
+#      ${IVUG_SOURCE_SLIDESHOW_DIR}/src/effect/include
+#      ${IVUG_SOURCE_SLIDESHOW_DIR}/src/dali_effect/include
 )
 
-MESSAGE("Checking " ${PROJECT_NAME}\r)
-
 INCLUDE(FindPkgConfig)
 pkg_check_modules(pkgs REQUIRED
        elementary
@@ -78,38 +79,24 @@ pkg_check_modules(pkgs REQUIRED
        ecore-evas
        utilX
        ui-gadget-1
+       libweb-media
+       libmedia-utils
+       media-thumbnail
        drm-client
-       icu-i18n
        glib-2.0
        vconf
+       liballshare
+       liballshare-core
+       shortcut
        capi-appfw-application
        capi-appfw-app-manager
-       capi-system-runtime-info
+       capi-media-player
 )
 
-
 FOREACH(flag ${pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+       SET(EXTRA_FLAGS "${EXTRA_FLAGS} ${flag}")
 ENDFOREACH(flag)
 
-#if("${CMAKE_SYSTEM_VERSION}" STREQUAL "arm")
-#      pkg_check_modules(armpkgs REQUIRED
-#      )
-#
-#      FOREACH(flag ${armpkgs_CFLAGS})
-#              SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-#      ENDFOREACH(flag)
-#
-#endif()
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-
-message("CFLAGS="${CMAKE_C_FLAGS})
-message("CXXFLAGS="${CMAKE_CXX_FLAGS})
-message("LDFLAGS="${LDFLAGS})
-message("LDFLAGS1="${pkgs_LDFLAGS})
-
 ADD_DEFINITIONS("-DUG_MODULE_API=__attribute__ \(\(visibility\(\"default\"\)\)\)")
 ADD_DEFINITIONS("-DPACKAGE=\"${PROJECT_NAME}\"")
 
@@ -117,6 +104,7 @@ ADD_DEFINITIONS("-DPACKAGE=\"${PROJECT_NAME}\"")
 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION_MAJOR})
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS ${EXTRA_FLAGS})
 
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
 
@@ -146,6 +134,7 @@ BUILD_EDJ(ivug-gengrid.edc                  ivug-gengrid.edj                layout          gengrid)
 BUILD_EDJ(ivug-setas.edc                       ivug-setas.edj                  layout          ${THEME_FOLDER}/${THEME})
 BUILD_EDJ(ivug-naviframe.edc           ivug-naviframe.edj              layout          ${THEME_FOLDER}/${THEME})
 BUILD_EDJ(ivug-name-view.edc           ivug-name-view.edj              layout          ${THEME_FOLDER}/${THEME})
+BUILD_EDJ(ivug-slideshow-view.edc      ivug-slideshow-view.edj layout          ${THEME_FOLDER}/${THEME})
 BUILD_EDJ(ivug-genlist.edc                     ivug-genlist.edj                layout/genlist  ../${THEME_FOLDER}/${THEME})
 
 
@@ -155,7 +144,5 @@ INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/images/ DESTINATION ${CMAKE_IN
 #
 INSTALL(DIRECTORY DESTINATION ${CMAKE_DATA_DIR}/${PROJECT_NAME})
 
-# i18n
-ADD_SUBDIRECTORY(res/po)
 
 
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index fe95b95..a6fc0f9
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-
-#define GENLIST_PART_INDEX_LIST_BASE_EVENT_INC \
-     part { name: "base_event";\
-        type: RECT;\
-        repeat_events: 0;\
-        description { state: "default" 0.0;\
-           color: 0 0 0 0;\
-        }\
-     }
-
-#define GENLIST_PART_INDEX_LIST_BASE_IMAGE_INC \
-               part { name: "base_image";\
-                  repeat_events: 1;\
-                  description { state: "default" 0.0;\
-                         rel1.to: "rect";\
-                         rel2.to: "rect";\
-                  }\
-               }
-
-   group { name: "elm/genlist/item/ivug/grouptitle/default";
-      alias: "elm/genlist/item_odd/ivug/grouptitle/default";
-      alias: "elm/genlist/item_compress/ivug/grouptitle/default";
-      alias: "elm/genlist/item_compress_odd/ivug/grouptitle/default";
-
-      data.item: "stacking" "above";
-      data.item: "selectraise" "on";
-      data.item: "texts" "elm.text";
-      data.item: "treesize" "GENLIST_TREESIZE_32_INC";
-
-      images {
-         //image: "00_index_list_bg.png" COMP;
-      }
-      parts {
-         GENLIST_PART_INDEX_LIST_BASE_EVENT_INC
-         GENLIST_PART_PADDING_LEFT( GENLIST_PADDING_16_INC )
-         GENLIST_PART_PADDING_RIGHT( GENLIST_PADDING_16_INC )
-         part { name: "rect";
-            type: RECT;
-            repeat_events: 1;
-            scale: 1;
-            description { state: "default" 0.0;
-               min: 0 GENLIST_HEIGHT_49_INC;
-               color: GENLIST_DIALOGUE_GROUP_BG_COLOR_INC;
-            }
-            description { state: "alpha_off" 0.0;
-               min: 0 GENLIST_SIZE_48_INC;
-               color: GENLIST_DIALOGUE_GROUP_BG_COLOR_INC;
-            }
-         }
-         GENLIST_PART_INDEX_LIST_BASE_IMAGE_INC
-
-         part { name: "elm.text";
-            type: TEXT;
-            scale: 1;
-            description { state: "default" 0.0;
-               align: 0.0 0.5;
-               rel1 {
-                  relative: 1.0 0.0;
-                  to_x: "elm.padding.left";
-               }
-               rel2 {
-                  relative: 0.0 1.0;
-                  offset: 0 0;
-                  to_x: "elm.padding.right";
-               }
-               color: GENLIST_PART_FONT_INDEX_LIST_COLOR_INC;
-               text {
-                  font: "SLP:style=Medium";
-                  size: GENLIST_FONT_32_INC;
-                  min: 1 1;
-                  align: 0.0 0.5;
-                  text_class: "slp_medium";
-               }
-            }
-         }
-      }
-       program {
-          name:    "enable_alpha";
-          signal:  "elm,state,alpha,enable";
-          source:  "elm";
-          action:  STATE_SET "default" 0.0;
-          target:  "rect";
-       }
-       program {
-          name:    "disable_alpha";
-          signal:  "elm,state,alpha,disable";
-          source:  "elm";
-          action:  STATE_SET "alpha_off" 0.0;
-          target:  "rect";
-       }
-      program {
-          name: "selected";
-         source: "rect";
-         signal: "mouse,clicked,1";
-         action:  SIGNAL_EMIT "elm,title_action,item,click" "elm";
-      }
-   }
+/*
+ * 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.
+ */
+
+ // 2.1.1
+       group { name: "elm/genlist/item/groupindex/default";
+          alias: "elm/genlist/item_odd/groupindex/default";
+          alias: "elm/genlist/item_compress/groupindex/default";
+          alias: "elm/genlist/item_compress_odd/groupindex/default";
+               alias: "elm/genlist/item/grouptitle/default";
+          alias: "elm/genlist/item_odd/grouptitle/default";
+          alias: "elm/genlist/item_compress/grouptitle/default";
+          alias: "elm/genlist/item_compress_odd/grouptitle/default";
+
+          data.item: "stacking" "above";
+          data.item: "selectraise" "on";
+          data.item: "texts" "elm.text";
+          data.item: "treesize" "GENLIST_TREESIZE_DEFAULT";
+
+          GENLIST_IMAGE_GROUPINDEX
+          parts {
+                 GENLIST_PART_BASE
+                 GENLIST_PART_INDEX_BG_IMAGE
+                 GENLIST_PART_PADDING_LEFT_SIZE(24)
+                 GENLIST_PART_PADDING_RIGHT_SIZE(24)
+                 GENLIST_PART_PADDING_TOP_SIZE(20)
+                 GENLIST_PART_PADDING_BOTTOM_SIZE(14)
+                 GENLIST_PART_TEXT("elm.text",
+                        GENLIST_DESCRIPTION_LRT("elm.padding.left", "elm.padding.right", "elm.padding.top",
+                               GENLIST_PARAM_INDEX_LIST
+                               min: 0 38; fixed: 1 1;)
+                        GENLIST_DESCRIPTION_INDEX_LIST
+                 )
+                 GENLIST_PART_INDEX_LINE("elm.padding.left", "elm.padding.right", "elm.text", "elm.padding.bottom")
+          }
+          programs {
+                 GENLIST_PROGRAM_DISABLED( target: "elm.text"; target: "index_line"; )
+                 GENLIST_PROGRAM_SELECT( target: "elm.text"; target: "index_line"; )
+          }
+       }
+
+ //2.1.3
+       group { name: "elm/genlist/item/groupindex.icon/default";
+          alias: "elm/genlist/item_odd/groupindex.icon/default";
+          alias: "elm/genlist/item_compress/groupindex.icon/default";
+          alias: "elm/genlist/item_compress_odd/groupindex.icon/default";
+
+          data.item: "stacking" "above";
+          data.item: "selectraise" "on";
+          data.item: "treesize" "GENLIST_TREESIZE_DEFAULT";
+          data.item: "texts" "elm.text";
+          data.item: "contents" "elm.icon";
+
+          GENLIST_IMAGE_GROUPINDEX
+          parts {
+                 GENLIST_PART_INDEX_BG_IMAGE
+                 GENLIST_PART_BASE
+                 GENLIST_PART_PADDING_LEFT_SIZE(24)
+                 GENLIST_PART_PADDING_RIGHT_SIZE(24)
+                 GENLIST_PART_PADDING_TOP_SIZE(6)
+                 GENLIST_PART_PADDING_BOTTOM_SIZE(6)
+                 GENLIST_PART_ICON("elm.icon",
+                        GENLIST_DESCRIPTION_L("elm.padding.left",
+                        min: 64 64; max: 64 64; )
+                 )
+                 GENLIST_PART_PADDING_L_SIZE("elm.padding.icon.right", "elm.icon", 16)
+                 GENLIST_PART_TEXT("elm.text",
+                        GENLIST_DESCRIPTION_LRT("elm.padding.icon.right", "elm.padding.right", "elm.padding.top",
+                               GENLIST_PARAM_INDEX_LIST
+                               min: 0 36; fixed: 0 1;)
+                        GENLIST_DESCRIPTION_INDEX_LIST
+                 )
+                 GENLIST_PART_INDEX_LINE("elm.padding.icon.right", "elm.padding.right", "elm.text", "elm.padding.bottom")
+          }
+          programs {
+                 GENLIST_PROGRAM_DISABLED( target: "elm.text"; target: "index_line"; )
+                 GENLIST_PROGRAM_SELECT( target: "elm.text"; target: "index_line"; )
+          }
+       }
+#if 0
+ //2.1.4
+       group { name: "elm/genlist/tree/groupindex.expandable/default";
+          alias: "elm/genlist/tree_odd/groupindex.expandable/default";
+          data.item: "stacking" "above";
+          data.item: "selectraise" "on";
+          data.item: "texts" "elm.text";
+          data.item: "treesize" "GENLIST_TREESIZE_DEFAULT";
+          images {
+                 image: "00_index list_bg.png" COMP;
+                 image: "00_indexlist_icon_closed.png" COMP;
+                 image: "00_indexlist_icon_opened.png" COMP;
+                 image: "00_indexlist_icon_line.png" COMP;
+          }
+          parts {
+                 GENLIST_PART_DISCLIP
+                 GENLIST_PART_BG_IMAGE
+                 GENLIST_PART_BASE
+                 GENLIST_PART_BOTTOM_LINE
+                 GENLIST_PART_PADDING_LEFT
+                 GENLIST_PART_PADDING_RIGHT_SIZE_EDIT( 23 )
+                 //GENLIST_PART_TEXT_INDEX_LIST("elm.text", "elm.padding.left", "elm.divider")
+                 part { name: "elm.divider";
+                        scale: 1;
+                        GENLIST_DESCRIPTION_R("elm.padding.arrow.left",
+                               min: 2 68;
+                               max: 2 68;
+                               fixed: 1 1;
+                               image.normal: "00_indexlist_icon_line.png";
+                        )
+                 }
+                 GENLIST_PART_PADDING_R_SIZE("elm.padding.arrow.left", "arrow", 23)
+                 part { name: "arrow";
+                        ignore_flags: ON_HOLD;
+                        mouse_events: 0;
+                        scale: 1;
+                        GENLIST_DESCRIPTION_R("elm.padding.right",
+                               min: 42 42;
+                               max: 42 42;
+                               fixed: 1 1;
+                               image.normal: "00_indexlist_icon_opened.png";
+                        )
+                        description { state: "active" 0.0;
+                               inherit: "default" 0.0;
+                               image.normal: "00_indexlist_icon_closed.png";
+                        }
+                 }
+          }
+          programs {
+                 GENLIST_PROGRAM_DISABLED_BOTTOMLINE( target: "elm.text"; )
+                 GENLIST_PROGRAM_SELECT_BOTTOMLINE( target: "elm.text";)
+                 GENLIST_PROOGRAM_EXPAND("arrow", target: "arrow"; )
+          }
+       }
+
+ //2.1.5
+       group { name: "elm/genlist/tree/groupindex.expandable.icon/default";
+          alias: "elm/genlist/tree_odd/groupindex.expandable.icon/default";
+          data.item: "stacking" "above";
+          data.item: "selectraise" "on";
+          data.item: "texts" "elm.text";
+          data.item: "treesize" "GENLIST_TREESIZE_DEFAULT";
+          data.item: "contents" "elm.icon";
+          images {
+                 image: "00_indexlist_icon_closed.png" COMP;
+                 image: "00_indexlist_icon_opened.png" COMP;
+                 image: "00_indexlist_icon_line.png" COMP;
+                 image: "00_index list_bg.png" COMP;
+          }
+          parts {
+                 GENLIST_PART_DISCLIP
+                 GENLIST_PART_BG_IMAGE
+                 GENLIST_PART_BASE
+                 GENLIST_PART_BOTTOM_LINE
+                 GENLIST_PART_PADDING_LEFT
+                 GENLIST_PART_PADDING_RIGHT_SIZE_EDIT( 23 )
+                 GENLIST_PART_ICON("elm.icon", GENLIST_DESCRIPTION_L("elm.padding.left", ))
+                 GENLIST_PART_PADDING_L_SIZE("elm.padding.icon.right", "elm.icon", GENLIST_PADDING_SIZE_DEFAULT)
+                 //GENLIST_PART_TEXT_INDEX_LIST("elm.text", "elm.padding.icon.right", "elm.divider")
+                 part { name: "elm.divider";
+                        scale: 1;
+                        GENLIST_DESCRIPTION_R("elm.padding.arrow.left",
+                               min: 2 68;
+                               max: 2 68;
+                               fixed: 1 1;
+                               image.normal: "00_indexlist_icon_line.png";
+                        )
+                 }
+                 GENLIST_PART_PADDING_R_SIZE("elm.padding.arrow.left", "arrow", 23)
+                 part { name: "arrow";
+                        ignore_flags: ON_HOLD;
+                        mouse_events: 0;
+                        scale: 1;
+                        GENLIST_DESCRIPTION_R("elm.padding.right",
+                               min: 42 42;
+                               max: 42 42;
+                               fixed: 1 1;
+                               image.normal: "00_indexlist_icon_opened.png";
+                        )
+                        description { state: "active" 0.0;
+                               inherit: "default" 0.0;
+                               image.normal: "00_indexlist_icon_closed.png";
+                        }
+                 }
+          }
+          programs {
+                 GENLIST_PROGRAM_DISABLED_BOTTOMLINE( target: "elm.text"; )
+                 GENLIST_PROGRAM_SELECT_BOTTOMLINE( target: "elm.text";)
+                 GENLIST_PROOGRAM_EXPAND("arrow", target: "arrow"; )
+          }
+       }
+
+ // FIXME: it seems that belows are not used anymore.
+       group { name : "elm/genlist/item/groupindex.readmessage/default";
+          alias: "elm/genlist/item_odd/groupindex.readmessage/default";
+          alias: "elm/genlist/item_compress/groupindex.readmessage/default";
+          alias: "elm/genlist/item_compress_odd/groupindex.readmessage/default";
+          alias : "elm/genlist/item/grouptitle.readmessage/default";
+          alias: "elm/genlist/item_odd/grouptitle.readmessage/default";
+          alias: "elm/genlist/item_compress/grouptitle.readmessage/default";
+          alias: "elm/genlist/item_compress_odd/grouptitle.readmessage/default";
+
+          data.item: "stacking" "above";
+          data.item: "selectraise" "on";
+          data.item: "texts" "elm.text";
+          data.item: "treesize" "GENLIST_TREESIZE_DEFAULT";
+
+          parts {
+                 part { name: "base";
+                        type: RECT;
+                        repeat_events: 1;
+                        scale: 1;
+                        description { state: "default" 0.0;
+                               min: 0 GENLIST_HEIGHT_62_INC;
+                               color: GENLIST_LIST_BG_COLOR;
+                        }
+                 }
+                 GENLIST_PART_PADDING_LEFT_SIZE( GENLIST_PADDING_24_INC )
+                 GENLIST_PART_PADDING_RIGHT_SIZE_EDIT( GENLIST_PADDING_24_INC )
+                 part { name: "text_base";
+                        type: RECT;
+                        repeat_events: 1;
+                        scale: 1;
+                        description { state: "default" 0.0;
+                               color: GENLIST_PART_BUBBLE_DATE_BG_COLOR_INC;
+                               rel2.relative: 1.0 0.62;
+                        }
+                 }
+                 part { name: "elm.text";
+                        type: TEXT;
+                        scale: 1;
+                        description { state: "default" 0.0;
+                               rel1 {
+                                  relative: 1.0 0.0;
+                                  to_x: "elm.padding.left";
+                                  to_y: "text_base";
+                               }
+                               rel2 {
+                                  relative: 0.0 1.0;
+                                  to_x: "elm.padding.right";
+                                  to_y: "text_base";
+                               }
+                               color: GENLIST_TEXT_COLOR_BUBBLE_READ_MESSAGE;
+                               text {
+                                  font: "SLP:style=Regular";
+                                  size: GENLIST_FONT_28_INC;
+                                  min: 0 1;
+                                  align: 0.0 0.5;
+                                  text_class: "list_item";
+                               }
+                        }
+                 }
+          }
+          programs {
+          }
+       }
+       group { name : "elm/genlist/item/groupindex.sentmessage/default";
+          alias: "elm/genlist/item_odd/groupindex.sentmessage/default";
+          alias: "elm/genlist/item_compress/groupindex.sentmessage/default";
+          alias: "elm/genlist/item_compress_odd/groupindex.sentmessage/default";
+          alias : "elm/genlist/item/grouptitle.sentmessage/default";
+          alias: "elm/genlist/item_odd/grouptitle.sentmessage/default";
+          alias: "elm/genlist/item_compress/grouptitle.sentmessage/default";
+          alias: "elm/genlist/item_compress_odd/grouptitle.sentmessage/default";
+
+          data.item: "stacking" "above";
+          data.item: "selectraise" "on";
+          data.item: "texts" "elm.text";
+          data.item: "treesize" "GENLIST_TREESIZE_DEFAULT";
+
+          parts {
+                 part { name: "base";
+                        type: RECT;
+                        repeat_events: 1;
+                        scale: 1;
+                        description { state: "default" 0.0;
+                               min: 0 GENLIST_HEIGHT_62_INC;
+                               color: GENLIST_LIST_BG_COLOR;
+                        }
+                 }
+                 GENLIST_PART_PADDING_LEFT_SIZE( GENLIST_PADDING_24_INC )
+                 GENLIST_PART_PADDING_RIGHT_SIZE_EDIT( GENLIST_PADDING_24_INC )
+                 part { name: "text_base";
+                        type: RECT;
+                        repeat_events: 1;
+                        scale: 1;
+                        description { state: "default" 0.0;
+                               color: GENLIST_PART_BUBBLE_DATE_BG_COLOR_INC;
+                               rel2.relative: 1.0 0.62;
+                        }
+                 }
+                 part { name: "elm.text";
+                        type: TEXT;
+                        scale: 1;
+                        description { state: "default" 0.0;
+                               rel1 {
+                                  relative: 1.0 0.0;
+                                  to_x: "elm.padding.left";
+                                  to_y: "text_base";
+                               }
+                               rel2 {
+                                  relative: 0.0 1.0;
+                                  to_x: "elm.padding.right";
+                                  to_y: "text_base";
+                               }
+                               color: GENLIST_TEXT_COLOR_BUBBLE_READ_MESSAGE;
+                               text {
+                                  font: "SLP:style=Regular";
+                                  size: GENLIST_FONT_28_INC;
+                                  min: 0 1;
+                                  align: 1.0 0.5;
+                                  text_class: "list_item";
+                               }
+                        }
+                 }
+          }
+          programs {
+          }
+       }
+
+       /////////// will be removed ////////
+       group { name : "elm/genlist/item/groupindex.dialogue/default";
+          alias: "elm/genlist/item_odd/groupindex.dialogue/default";
+          alias: "elm/genlist/item_compress/groupindex.dialogue/default";
+          alias: "elm/genlist/item_compress_odd/groupindex.dialogue/default";
+          alias : "elm/genlist/item/grouptitle.dialogue/default";
+          alias: "elm/genlist/item_odd/grouptitle.dialogue/default";
+          alias: "elm/genlist/item_compress/grouptitle.dialogue/default";
+          alias: "elm/genlist/item_compress_odd/grouptitle.dialogue/default";
+
+          data.item: "stacking" "above";
+          data.item: "selectraise" "on";
+          data.item: "texts" "elm.text";
+          data.item: "treesize" "GENLIST_TREESIZE_DEFAULT";
+
+          parts {
+                 GENLIST_PART_BASE__( GENLIST_HEIGHT_65_INC )
+                 GENLIST_PART_PADDING_LEFT
+                 GENLIST_PART_PADDING_RIGHT_EDIT
+
+                 part { name: "elm.text";
+                        type: TEXT;
+                        scale: 1;
+                        description { state: "default" 0.0;
+                               rel1 {
+                                  relative: 1.0 0.5;
+                                  to_x: "elm.padding.left";
+                               }
+                               rel2 {
+                                  relative: 0.0 1.0;
+                                  to_x: "elm.padding.right";
+                               }
+                               color: GENLIST_DIALOGUE_GROUP_TITLE_COLOR;
+                               text {
+                                  font: "SLP:style=Medium";
+                                  size: GENLIST_FONT_28_INC;
+                                  min: 0 1;
+                                  align: 0.0 0.0;
+                                  text_class: "list_item";
+                               }
+                        }
+                 }
+                 part { name: "bottom_line";
+                        type: RECT;
+                        description { state: "default" 0.0;
+                               min: 0 1;
+                               fixed: 0 1;
+                               color: GENLIST_LIST_LINE1_COLOR;
+                               rel1 {
+                                  relative: 0.0 1.0;
+                                  offset: 0 -1;
+                               }
+                        }
+                 }
+                 GENLIST_PART_DISCLIP
+          }
+       }
+       group { name : "elm/genlist/item/groupindex.dialogue.seperator/default";
+          alias: "elm/genlist/item_odd/groupindex.dialogue.seperator/default";
+          alias: "elm/genlist/item_compress/groupindex.dialogue.seperator/default";
+          alias: "elm/genlist/item_compress_odd/groupindex.dialogue.seperator/default";
+          alias : "elm/genlist/item/grouptitle.dialogue.seperator/default";
+          alias: "elm/genlist/item_odd/grouptitle.dialogue.seperator/default";
+          alias: "elm/genlist/item_compress/grouptitle.dialogue.seperator/default";
+          alias: "elm/genlist/item_compress_odd/grouptitle.dialogue.seperator/default";
+
+          data.item: "stacking" "above";
+          data.item: "selectraise" "on";
+          data.item: "treesize" "GENLIST_TREESIZE_DEFAULT";
+
+          parts {
+                 GENLIST_PART_BASE__( GENLIST_HEIGHT_33_INC )
+                 part { name: "bottom_line";
+                        type: RECT;
+                        description { state: "default" 0.0;
+                               min: 0 1;
+                               fixed: 0 1;
+                               color: GENLIST_LIST_LINE1_COLOR;
+                               rel1 {
+                                  relative: 0.0 1.0;
+                                  offset: 0 -1;
+                               }
+                        }
+                 }
+                 GENLIST_PART_DISCLIP
+          }
+       }
+       /////////////////////////////////////////////////
+#endif
 
old mode 100755 (executable)
new mode 100644 (file)
index 55ab855..928a5d7
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-
-#define GENLIST_PART_BASE( param_item_height ) \
-         part { name: "base"; \
-                type: RECT; \
-                repeat_events: 1; \
-                scale: 1; \
-                description { state: "default" 0.0; \
-                       min: 0 param_item_height; \
-                       color: GENLIST_PART_BG_COLOR_INC; \
-                } \
-         }
+/*
+ * 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 GENLIST_PART_BG \
-         part { name: "bg"; \
-                type: RECT; \
-                clip_to: "disclip"; \
-                mouse_events: 0; \
-                description { state: "default" 0.0; \
-                       color: GENLIST_PART_BG_COLOR_INC; \
-                } \
-                description { state: "hide" 0.0; \
-                       inherit: "default" 0.0; \
-                       rel1 { relative: 0.025 0.0; } \
-                       rel2 { relative: 1.025 1.0; } \
-                } \
-                description { state: "hide" 0.1;  \
-                       inherit: "default" 0.0; \
-                       rel1 { relative: 0.13 0.0; } \
-                       rel2 { relative: 1.13 1.0; } \
-                } \
-                description { state: "hide" 0.2; \
-                       inherit: "default" 0.0; \
-                       rel1 { relative: 0.5 0.0; } \
-                       rel2 { relative: 1.5 1.0; } \
-                } \
-                description { state: "hide" 0.3; \
-                       inherit: "default" 0.0; \
-                       rel1 { relative: 1.0 0.0; } \
-                       rel2 { relative: 2.0 1.0; } \
-                } \
-         }
+//****************************************************************************//
+// *******************************  Default size macro **********************//
+//**************************************************************************//
+// if size is different for each theme, split it into each theme inc.
+
+#define GENLIST_HEIGHT_1LINE              112
+#define GENLIST_HEIGHT_2LINE_MAIN         54
+#define GENLIST_HEIGHT_2LINE_SUB          42
+#define GENLIST_HEIGHT_3LINE_MAIN         54
+#define GENLIST_HEIGHT_3LINE_SUB1         42
+#define GENLIST_HEIGHT_3LINE_SUB2         38
+#define GENLIST_HEIGHT_MULTILINE_SUB      38
+#define GENLIST_PART_LIST_LINE_HEIGHT     1
+#define GENLIST_HEIGHT_GROUPTITLE         46
+
+#define GENLIST_PADDING_SIZE_DEFAULT            16
+#define GENLIST_PADDING_SIZE_LEFT               26
+#define GENLIST_PADDING_SIZE_RIGHT              26
+#define GENLIST_PADDING_SIZE_TOP_2LINE          22
+#define GENLIST_PADDING_SIZE_BOTTOM_2LINE       22
+#define GENLIST_PADDING_SIZE_TOP_3LINE          17
+#define GENLIST_PADDING_SIZE_BOTTOM_3LINE       17
+#define GENLIST_PADDING_SIZE_NDEPTH             26
+
+#define DIALOGUE_PADDING_SCROLLER         16
+#define DIALOGUE_PADDING_SIZE_LEFT        16+20
+#define DIALOGUE_PADDING_SIZE_RIGHT       16+20
+
+#define GENLIST_ICON_BIG_SIZE             74
+#define GENLIST_ICON_SMALL_SIZE           38
+#define GENLIST_ICON_STAR_SIZE            38
+#define GENLIST_ICON_THUMBNAIL1_SIZE      104
+#define GENLIST_BTN_01_HEIGHT             74
+#define GENLIST_BTN_02_SIZE               74
+#define GENLIST_ICON_ONOFF_WIDTH          132
+#define GENLIST_ICON_ONOFF_HEIGHT         70
+#define GENLIST_ICON_CHECK_RADIO_SIZE     64
+#define GENLIST_ICON_COLORBAR_SIZE        7
+#define GENLIST_ICON_PASSWORD_SIZE        82
+
+#define GENLIST_TREESIZE_DEFAULT          26
+
+//#define GENLIST_DIALOGUE_SEPARATOR_DEFAULT_HEIGHT 40
+
+//****************************************************************************//
+// *****************  EDJE description have 24 patterns **********************//
+ //**************************************************************************//
+// ------------------
+// |  PART == HERE  |
+// ------------------
+ #define GENLIST_DESCRIPTION_ENVELOP( PART, PARAM ) \
+      description { state: "default" 0.0;\
+         rel1 { \
+            relative: 0 0; \
+            to: PART; \
+         }\
+         rel2 {\
+            relative: 1 1;\
+            to: PART; \
+         }\
+         PARAM\
+      }
+
+//      |   top  |
+// ---------------------
+// left |  HERE  | right
+// ---------------------
+//      | bottom |
+#define GENLIST_DESCRIPTION( left, right, top, bottom, param ) \
+      description { state: "default" 0.0;\
+         rel1 { \
+            relative: 1 1; \
+            to_x: left; \
+            to_y: top; \
+         }\
+         rel2 {\
+            relative: 0 0;\
+            to_x: right;\
+            to_y: bottom;\
+         }\
+         param\
+      }
+
+// ---------------------
+// left |--> HERE
+// ---------------------
+#define GENLIST_DESCRIPTION_L( left, param ) \
+      description { state: "default" 0.0;\
+         align: 0 0.5; \
+         fixed: 1 0; \
+         rel1 { \
+            relative: 1 0; \
+            to_x: left; \
+            to_y: "base"; \
+         }\
+         rel2 { \
+            relative: 1 1;\
+            to_x: left; \
+            to_y: "base"; \
+         }\
+         param\
+      }
+
+// ---------------------
+//   HERE  <--| right
+// ---------------------
+#define GENLIST_DESCRIPTION_R( right, param ) \
+      description { state: "default" 0.0;\
+         align: 1 0.5; \
+         fixed: 1 0; \
+         rel1 { \
+            relative: 0 0; \
+            to_x: right; \
+            to_y: "base"; \
+         }\
+         rel2 {\
+            relative: 0 1;\
+            to_x: right; \
+            to_y: "base"; \
+         }\
+         param\
+      }
+
+// --------------------------
+// left |--> HERE  <--| right
+// --------------------------
+#define GENLIST_DESCRIPTION_LR( left, right, param ) \
+      description { state: "default" 0.0;\
+         rel1 { \
+            relative: 1 0; \
+            to_x: left; \
+            to_y: "base"; \
+         }\
+         rel2 {\
+            relative: 0 1;\
+            to_x: right;\
+            to_y: "base"; \
+         }\
+         param\
+      }
+
+//   |  top     |
+// -----------------
+//  |  HERE  <--| right
+// -----------------
+//  | bottom   |
+#define GENLIST_DESCRIPTION_RTB( right, top, bottom, param ) \
+      description { state: "default" 0.0;\
+         align: 1 0.5;\
+         rel1 { \
+            relative: 0 1; \
+            to_x: right; \
+            to_y: top; \
+         }\
+         rel2 {\
+            relative: 0 0;\
+            to_x: right;\
+            to_y: bottom;\
+         }\
+         param\
+      }
+
+// left |  HERE  | right
+// ---------------------
+//      | bottom |
+#define GENLIST_DESCRIPTION_LRB( left, right, bottom, param ) \
+      description { state: "default" 0.0;\
+         align: 0.5 1;\
+         rel1 { \
+            relative: 1 0; \
+            to_x: left; \
+            to_y: bottom; \
+         }\
+         rel2 {\
+            relative: 0 0;\
+            to_x: right;\
+            to_y: bottom;\
+         }\
+         param\
+      }
+
+//      |   top  |
+// ---------------------
+// left |  HERE  | right
+#define GENLIST_DESCRIPTION_LRT( left, right, top, param ) \
+      description { state: "default" 0.0;\
+         align: 0.5 0;\
+         rel1 { \
+            relative: 1 1; \
+            to_x: left; \
+            to_y: top; \
+         }\
+         rel2 {\
+            relative: 0 1;\
+            to_x: right;\
+            to_y: top;\
+         }\
+         param\
+      }
+
+//      |       top  |
+// ---------------------
+// left | -->  HERE  |
+#define GENLIST_DESCRIPTION_LT( left, top, param ) \
+      description { state: "default" 0.0;\
+         align: 0 0;\
+         rel1 { \
+            relative: 1 1; \
+            to_x: left; \
+            to_y: top; \
+         }\
+         rel2 {\
+            relative: 1 1;\
+            to_x: left;\
+            to_y: top;\
+         }\
+         param\
+      }
+
+// left |  --> HERE  |
+// ---------------------
+//      |     bottom |
+#define GENLIST_DESCRIPTION_LB( left, bottom, param ) \
+      description { state: "default" 0.0;\
+         align: 0 1;\
+         rel1 { \
+            relative: 1 0; \
+            to_x: left; \
+            to_y: bottom; \
+         }\
+         rel2 {\
+            relative: 1 0;\
+            to_x: left;\
+            to_y: bottom;\
+         }\
+         param\
+      }
+
+//      |     top  |
+// ---------------------
+// left |--> HERE  |
+// ---------------------
+//      |   bottom |
+#define GENLIST_DESCRIPTION_LTB( left, top, bottom, param ) \
+      description { state: "default" 0.0;\
+         align: 0 0.5;\
+         rel1 { \
+            relative: 1 1; \
+            to_x: left; \
+            to_y: top; \
+         }\
+         rel2 {\
+            relative: 1 0;\
+            to_x: left;\
+            to_y: bottom;\
+         }\
+         param\
+      }
+
+//      |   top  |
+// ---------------------
+//     |  HERE <--| right
+#define GENLIST_DESCRIPTION_RT( right, top, param ) \
+      description { state: "default" 0.0;\
+         align: 1 0;\
+         rel1 { \
+            relative: 0 1; \
+            to_x: right; \
+            to_y: top; \
+         }\
+         rel2 {\
+            relative: 0 1;\
+            to_x: right;\
+            to_y: top;\
+         }\
+         param\
+      }
+
+//  | HERE <-- | right
+// ---------------------
+//  |  bottom  |
+#define GENLIST_DESCRIPTION_RB( right, bottom, param ) \
+      description { state: "default" 0.0;\
+         align: 1 1;\
+         rel1 { \
+            relative: 0 0; \
+            to_x: right; \
+            to_y: bottom; \
+         }\
+         rel2 {\
+            relative: 0 0;\
+            to_x: right;\
+            to_y: bottom;\
+         }\
+         param\
+      }
+
+// |   top  |
+// ----------
+// |  HERE  |
+// ----------
+// | bottom |
+#define GENLIST_DESCRIPTION_TB( top, bottom, param ) \
+      description { state: "default" 0.0;\
+         align: 0.5 0.5;\
+         rel1 { \
+            relative: 0 1; \
+            to_y: top; \
+         }\
+         rel2 {\
+            relative: 1 0;\
+            to_y: bottom;\
+         }\
+         param\
+      }
+
+#define GENLIST_DATA_ITEM_NORMAL \
+      data.item: "stacking" "above"; \
+      data.item: "selectraise" "on"; \
+      data.item: "flips" "elm.flip.icon elm.flip.content"; \
+      data.item: "treesize" GENLIST_TREESIZE_DEFAULT;
+
+/*****************************************************************************/
+/******************************* Dialogue group ******************************/
+/*****************************************************************************/
+#define GENLIST_DIALOGUE_INHERIT_BODY( _PARTS ) \
+      data.item: "treesize" 0; \
+      GENLIST_IMAGES_DIALOGUE_BG_IMAGE \
+      parts { \
+         GENLIST_PART_BG_IMAGE_DIALOGUE \
+         GENLIST_PART_BOTTOM_LINE_OFF \
+         GENLIST_PART_PADDING_LEFT_SIZE( DIALOGUE_PADDING_SIZE_LEFT ) \
+         GENLIST_PART_PADDING_RIGHT_SIZE_EDIT( DIALOGUE_PADDING_SIZE_RIGHT ) \
+         _PARTS \
+         GENLIST_PART_FLIP \
+      }
+
+//****************************************************************************//
+// ****************************** BG Image **********************************//
+//****************************************************************************//
+#define GENLIST_IMAGE_GROUPINDEX \
+      images { \
+         image: "00_index list_bg.png" COMP; \
+      }
+#define GENLIST_PART_INDEX_BG_IMAGE \
+         part { name: "bg_image"; \
+            type: RECT; \
+            scale: 1; \
+            mouse_events: 0; \
+            description { state: "default" 0.0; \
+               color: GENLIST_GROUPINDEX_LIST_BG_COLOR; \
+            } \
+            description { state: "selected" 0.0; \
+               inherit: "default" 0.0; \
+               color: GENLIST_GROUPINDEX_LIST_PRESS_COLOR; \
+            } \
+            GENLIST_DESCRIPTION_FADEOUT \
+         }
 
 #define GENLIST_PART_BG_IMAGE \
-         part { name: "bg_image"; \
-                type: RECT; \
-                clip_to: "disclip"; \
-                mouse_events: 0; \
-                description { state: "default" 0.0; \
-                       color: GENLIST_PART_LIST_BG_COLOR_INC; \
-                } \
-                description { state: "selected" 0.0; \
-                       inherit: "default" 0.0; \
-                       color: GENLIST_PART_LIST_PRESS_COLOR_INC; \
-                } \
-         }
+         part { name: "bg_image_clip"; \
+            type: RECT; \
+            scale: 1; \
+            mouse_events: 0; \
+            description { state: "default" 0.0; \
+               color: 0 0 0 0; \
+            } \
+            description { state: "2depth" 0.0; \
+               color: 0 0 0 0; \
+            } \
+         } \
+         part { name: "bg_image"; \
+            type: RECT; \
+            scale: 1; \
+            mouse_events: 0; \
+            description { state: "default" 0.0; \
+               color: GENLIST_LIST_BG_COLOR; \
+            } \
+            description { state: "selected" 0.0; \
+               color: GENLIST_LIST_PRESS_COLOR; \
+            } \
+            description { state: "disabled" 0.0; \
+               color: GENLIST_LIST_DIM_COLOR; \
+            } \
+            GENLIST_DESCRIPTION_FADEOUT \
+         }
+
+#define GENLIST_IMAGES_DIALOGUE_BG_IMAGE \
+         images { \
+            image : "00_list_group_bg.png" COMP; \
+            image : "00_list_group_bg_top.png" COMP; \
+            image : "00_list_group_bg_center.png" COMP; \
+            image : "00_list_group_bg_bottom.png" COMP; \
+            image : "00_list_group_bg_press.png" COMP; \
+            image : "00_list_group_bg_top_press.png" COMP; \
+            image : "00_list_group_bg_center_press.png" COMP; \
+            image : "00_list_group_bg_bottom_press.png" COMP; \
+         }
 
+#define GENLIST_PARAM_BG_IMAGE_DIALOGUE \
+         rel1 { \
+            to_x: "bg_image_left"; \
+            relative: 1 0; \
+         } \
+         rel2 { \
+            to_x: "bg_image_right"; \
+            relative: 0 1; \
+         }
+
+#define GENLIST_PART_BG_IMAGE_DIALOGUE \
+         part { name: "bg_image_clip"; \
+            type: RECT; \
+            scale: 1; \
+            mouse_events: 0; \
+            description { state: "default" 0.0; \
+               color: 255 255 255 255; \
+            } \
+            description { state: "2depth" 0.0; \
+               color: 220 218 211 255; \
+            } \
+         } \
+         part { name: "bg_image_left"; \
+            type: SPACER; \
+            scale: 1; \
+            mouse_events: 0; \
+            description { state: "default" 0.0; \
+               min: 16 0; \
+               max: 16 -1; \
+               fixed: 1 0; \
+               align: 0 0.5; \
+               rel2.relative: 0 1; \
+            } \
+         } \
+         part { name: "bg_image_right"; \
+            type: SPACER; \
+            scale: 1; \
+            mouse_events: 0; \
+            description { state: "default" 0.0; \
+               min: 16 0; \
+               max: 16 -1; \
+               fixed: 1 0; \
+               align: 1 0.5; \
+               rel1.relative: 1 0; \
+            } \
+            description { state: "editmode" 0.0; \
+               inherit: "default" 0.0; \
+               min: (GENLIST_PADDING_SIZE_DEFAULT*2+GENLIST_ICON_BIG_SIZE) 0; \
+               max: (GENLIST_PADDING_SIZE_DEFAULT*2+GENLIST_ICON_BIG_SIZE) 0; \
+            } \
+         } \
+         part { name: "bg_image"; \
+            clip_to: "bg_image_clip"; \
+            type: IMAGE; \
+            scale: 1; \
+            mouse_events: 0; \
+            description { state: "default" 0.0; \
+               color: 255 255 255 255; \
+               GENLIST_PARAM_BG_IMAGE_DIALOGUE \
+               image { \
+                  normal: "00_list_group_bg.png"; \
+                  border: 14 14 10 10; \
+                  border_scale: 1; \
+               } \
+            } \
+            description { state: "selected" 0.0; \
+               color: 255 255 255 255; \
+               GENLIST_PARAM_BG_IMAGE_DIALOGUE \
+               image { \
+                  normal: "00_list_group_bg_press.png"; \
+                  border: 14 14 10 10; \
+                  border_scale: 1; \
+               } \
+            } \
+            description { state: "top" 0.0; \
+               GENLIST_PARAM_BG_IMAGE_DIALOGUE \
+               image { \
+                  normal: "00_list_group_bg_top.png"; \
+                  border: 14 14 10 2; \
+                  border_scale: 1; \
+               } \
+            } \
+            description { state: "top_selected" 0.0; \
+               GENLIST_PARAM_BG_IMAGE_DIALOGUE \
+               image { \
+                  normal: "00_list_group_bg_top_press.png"; \
+                  border: 14 14 10 2; \
+                  border_scale: 1; \
+               } \
+            } \
+            description { state: "center" 0.0; \
+               GENLIST_PARAM_BG_IMAGE_DIALOGUE \
+               image { \
+                  normal: "00_list_group_bg_center.png"; \
+                  border: 14 14 2 2; \
+                  border_scale: 1; \
+               } \
+            } \
+            description { state: "center_selected" 0.0; \
+               GENLIST_PARAM_BG_IMAGE_DIALOGUE \
+               image { \
+                  normal: "00_list_group_bg_center_press.png"; \
+                  border: 14 14 2 2; \
+                  border_scale: 1; \
+               } \
+            } \
+            description { state: "bottom" 0.0; \
+               GENLIST_PARAM_BG_IMAGE_DIALOGUE \
+               image { \
+                  normal: "00_list_group_bg_bottom.png"; \
+                  border: 14 14 2 10; \
+                  border_scale: 1; \
+               } \
+            } \
+            description { state: "bottom_selected" 0.0; \
+               GENLIST_PARAM_BG_IMAGE_DIALOGUE \
+               image { \
+                  normal: "00_list_group_bg_bottom_press.png"; \
+                  border: 14 14 2 10; \
+                  border_scale: 1; \
+               } \
+            } \
+            description { state: "disabled" 0.0; \
+               inherit: "default"; \
+               color: 255 255 255 255; \
+            } \
+            GENLIST_DESCRIPTION_FADEOUT \
+         }
+
+//****************************************************************************//
+// ****************************** BASE  ********************************//
+//****************************************************************************//
+#define GENLIST_PART_BASE \
+         part { name: "base"; \
+            type: RECT; \
+            repeat_events: 1; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               align: 0.5 0.5; \
+               color: 0 0 0 0; \
+            } \
+         } \
+         GENLIST_PART_PERSPECTIVE_POINT
+
+#define GENLIST_PART_BASE_REORDER \
+         part { name: "base"; \
+            type: RECT; \
+            repeat_events: 1; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               align: 0.5 0.5; \
+               color: 0 0 0 0; \
+               rel1 { \
+                  relative: 1 0; \
+                  to_x: "reorder.padding.left"; \
+               } \
+               rel2 { \
+                  relative: 0 1; \
+                  to_x: "reorder.padding.right"; \
+               } \
+            } \
+         } \
+         part { name: "reorder.padding.left"; \
+            type: SPACER; \
+            scale: 1; \
+            mouse_events: 0; \
+            description { state: "default" 0.0; \
+               rel2.relative: 0 1; \
+               align: 0 0.5; \
+            } \
+            description { state: "reorder" 0.0; \
+               inherit: "default" 0.0; \
+               min: 16 0; \
+               max: 16 -1; \
+            } \
+         } \
+         part { name: "reorder.padding.right"; \
+            type: SPACER; \
+            scale: 1; \
+            mouse_events: 0; \
+            description { state: "default" 0.0; \
+               rel1.relative: 1 0; \
+               align: 1 0.5; \
+            } \
+            description { state: "reorder" 0.0; \
+               inherit: "default" 0.0; \
+               min: 16 0; \
+               max: 16 -1; \
+            } \
+         } \
+         GENLIST_PART_PERSPECTIVE_POINT
+
+//****************************************************************************//
+// ****************************** LINE ********************************//
+//****************************************************************************//
 #define GENLIST_PART_BOTTOM_LINE \
-         part { name: "bottom_line"; \
-                type: RECT; \
-                mouse_events: 0; \
-                description { state: "default" 0.0; \
-                       min: 0 1; \
-                       fixed: 0 1; \
-                       visible: 1; \
-                       color: GENLIST_PART_LIST_LINE_COLOR_INC; \
-                       rel1 { \
-                          relative: 0.0 1.0; \
-                          offset: 0 -1; \
-                       } \
-                } \
-         }
-
-#define GENLIST_PART_BOTTOM_EFFECT_LINE \
-         part { name: "bottom_line"; \
-                type: RECT; \
-                mouse_events: 0; \
-                description { state: "default" 0.0; \
-                       min: 0 1; \
-                       fixed: 0 1; \
-                       visible: 1; \
-                       color: GENLIST_PART_LIST_LINE_COLOR_INC; \
-                       rel1 { \
-                          relative: 0.0 1.0; \
-                          offset: 0 -1; \
-                       } \
-                } \
-                GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) \
-                GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) \
-         }
-
-#define GENLIST_PART_PADDING_TOP( param_padding_size ) \
-       part { name: "elm.padding.top"; \
-                type: RECT; \
-                scale: 1; \
-                description { \
-                       state: "default" 0.0; \
-                       min: 0 param_padding_size; \
-                       fixed: 0 1; \
-                       visible: 0; \
-                       rel2.relative: 1.0 0.0; \
-                       align: 0.0 0.0; \
-                } \
-         }
-
-#define GENLIST_PART_PADDING_TEXT_TOP( param_padding_size ) \
-       part { name: "elm.padding.text.top"; \
-                type: RECT; \
-                scale: 1; \
-                description { \
-                       state: "default" 0.0; \
-                       min: 0 param_padding_size; \
-                       fixed: 0 1; \
-                       visible: 0; \
-                       rel2.relative: 1.0 0.0; \
-                       align: 0.0 0.0; \
-                } \
-         }
-
-#define GENLIST_PART_PADDING_BOTTOM( param_padding_size ) \
-       part { name: "elm.padding.bottom"; \
-                type: RECT; \
-                scale: 1; \
-                description { state: "default" 0.0; \
-                       min: 0 param_padding_size; \
-                       fixed: 0 1; \
-                       visible: 0; \
-                       rel1.relative: 0.0 1.0; \
-                       align: 0.0 1.0; \
-                } \
-         }
-
-#define GENLIST_PART_PADDING_LEFT( param_padding_size ) \
-         part { name: "elm.padding.left"; \
-                type: RECT; \
-                scale: 1; \
-                description { state: "default" 0.0; \
-                       min: param_padding_size 0; \
-                       fixed: 1 0; \
-                       visible: 0; \
-                       rel2.relative: 0.0 1.0; \
-                       align: 0.0 0.0; \
-                } \
-         }
-
-#define GENLIST_PART_PADDING_RIGHT( param_padding_size ) \
-       part { name: "elm.padding.right"; \
-                type: RECT; \
-                scale: 1; \
-                description { state: "default" 0.0; \
-                       min: param_padding_size 0; \
-                       fixed: 1 0; \
-                       visible: 0; \
-                       rel1.relative: 1.0      0.0; \
-                       align: 1.0 0.0; \
-                } \
-         }
-
-#define GENLIST_PART_DIALOGUE_BASE( param_item_height ) \
-         part { name: "base"; \
-                type: RECT; \
-                clip_to: "disclip"; \
-                repeat_events: 1; \
-                scale: 1; \
-                description { state: "default" 0.0; \
-                       min: 0 param_item_height; \
-                       color: LAYOUT_GROUP_LIST_BG_COLOR_INC; \
-                } \
-         }
+         part { name: "bottom_line"; \
+            type: RECT; \
+            scale: 1; \
+            mouse_events: 0; \
+            description { state: "default" 0.0; \
+               min: 0 GENLIST_PART_LIST_LINE_HEIGHT; \
+               max: -1 GENLIST_PART_LIST_LINE_HEIGHT; \
+               fixed: 0 1; \
+               align: 0.5 1; \
+               color: GENLIST_LIST_LINE1_COLOR; \
+               rel1.to: "bottom_line2"; \
+               rel2.to: "bottom_line2"; \
+               rel2.relative: 1 0; \
+            } \
+            description { state: "reorder" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 0; \
+            } \
+            description { state: "selected" 0.0; \
+               inherit: "default" 0.0; \
+               color: GENLIST_LIST_PRESS_COLOR; \
+            } \
+            description { state: "disabled" 0.0; \
+               inherit: "default" 0.0; \
+               color: GENLIST_LIST_DIM_COLOR; \
+            } \
+            GENLIST_DESCRIPTION_FADEOUT \
+         } \
+         part { name: "bottom_line2"; \
+            type: RECT; \
+            scale: 1; \
+            mouse_events: 0; \
+            description { state: "default" 0.0; \
+               min: 0 GENLIST_PART_LIST_LINE_HEIGHT; \
+               max: -1 GENLIST_PART_LIST_LINE_HEIGHT; \
+               fixed: 0 1; \
+               align: 0.5 1; \
+               color: GENLIST_LIST_LINE2_COLOR; \
+               rel1.to_x: "elm.padding.left"; \
+               rel1.relative: 1 0; \
+               rel2.to_x: "elm.padding.right"; \
+               rel2.relative: 0 1; \
+            } \
+            description { state: "selected" 0.0; \
+               inherit: "default" 0.0; \
+               color: GENLIST_LIST_PRESS_COLOR; \
+            } \
+            description { state: "reorder" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 0; \
+            } \
+            description { state: "disabled" 0.0; \
+               inherit: "default" 0.0; \
+               color: GENLIST_LIST_DIM_COLOR; \
+            } \
+            GENLIST_DESCRIPTION_FADEOUT \
+         }
 
-#define GENLIST_PART_DIALOGUE_ITEM \
-         part { name: "elm.rect.dialogue"; \
-                type: RECT; \
-                scale: 1; \
-                description { state: "default" 0.0; \
-                       min: GENLIST_PADDING_12_INC 0; \
-                       fixed: 1 0; \
-                       color: GENLIST_DIALOGUE_GROUP_LEFT_BG_COLOR_INC; \
-                       rel2.relative: 0.0 1.0; \
-                       align: 0.0 0.0; \
-                } \
-         }
-
-#define GENLIST_PART_DIALOGUE_EXPANDABLE_ITEM \
-         part { name: "elm.rect.dialogue"; \
-                type: RECT; \
-                scale: 1; \
-                description { state: "default" 0.0; \
-                       min: GENLIST_PADDING_12_INC 0; \
-                       fixed: 1 0; \
-                       color: GENLIST_DIALOGUE_GROUP_LEFT_BG_COLOR_INC; \
-                       rel2.relative: 0.0 1.0; \
-                       align: 0.0 0.0; \
-                } \
-                GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) \
-                GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) \
-         }
-
-#define GENLIST_PART_SWALLOW_END( param_padding_size ) \
-         part { name: "elm.padding.left.swallow.end";\
-                clip_to: "disclip"; \
-                type: RECT;\
-                scale: 1;\
-                description { state: "default" 0.0;\
-                       min: param_padding_size 0;\
-                       fixed: 1 0;\
-                       visible: 0; \
-                       rel1.to_x: "elm.swallow.end";\
-                       rel2 {\
-                          relative: 0.0  1.0;\
-                          to_x: "elm.swallow.end";\
-                       }\
-                       align: 1.0 0.5;\
-                }\
-         }\
-         part { name: "elm.swallow.end";\
-                clip_to: "disclip"; \
-                type: SWALLOW;\
-                scale: 1;\
-                description { state: "default" 0.0;\
-                       fixed: 1 0;\
-                       align: 1.0 0.5;\
-                       rel1.to_x: "elm.padding.right";\
-                       rel2 {\
-                          relative: 0.0  1.0;\
-                          to_x: "elm.padding.right";\
-                       }\
-                }\
-         }
-
-#define GENLIST_PART_DISCLIP \
-        part { name: "disclip"; \
-                type: RECT; \
-                description { state: "default" 0.0; \
-                } \
-                description { state: "disabled" 0.0; \
-                       inherit: "default" 0.0; \
-                       color: GENLIST_PART_DISCLIP_COLOR_INC; \
-                } \
-         }
-
-#define GENLIST_EXPANDABLE_PART_PERSPECTIVE_POINT() \
-        part { name: "point"; \
-                type: RECT; \
-                scale: 1; \
-                                        description { \
-                                                        state: "default" 0.0; \
-                                                        color: 0 0 0 0; \
-                                                        rel1 { relative: 0.0 0.0; } \
-                                                        rel2 { relative: 1.0 0.0; } \
-                                        } \
-                        }
-
-#define GENLIST_PART_MAP_START( param_x, param_y, param_z ) \
-        description { state: "map_transition" 0.0; \
-                               inherit: "default" 0.0; \
-                               color: 50 50 50 100; \
-                               map { \
-                                  perspective: "point"; \
-                                  on: 1; \
-                                  smooth: 1; \
-                                  perspective_on: 1; \
-                                  backface_cull: 1; \
-                                  rotation { \
-                                         center: "point"; \
-                                         x: param_x; \
-                                         y: param_y; \
-                                         z: param_z; \
-                                  } \
-                          } \
-                        } \
-                        description { \
-                                        state: "hide" 0.0; \
-                                        inherit: "default" 0.0; \
-                                        visible: 0; \
-                        }
-
-#define GENLIST_PART_MAP_FINISH( param_x, param_y, param_z ) \
-                        description { \
-                                        state: "map_rotate" 0.0; \
-                                        inherit: "default" 0.0; \
-                                        map { \
-                                                        perspective: "point"; \
-                                                        on: 1; \
-                                                        smooth: 1; \
-                                                        perspective_on: 1; \
-                                                        backface_cull: 1; \
-                                                        rotation { \
-                                                                        center: "point"; \
-                                                                        x: param_x; \
-                                                                        y: param_y; \
-                                                                        z: param_z; \
-                                                        } \
-                                       } \
-                       } \
-
-#define GENLIST_PART_MAP_BASE( param_item_height ) \
-         part { name: "base"; \
-                type: RECT; \
-                repeat_events: 1; \
-                scale: 1; \
-                description { state: "default" 0.0; \
-                       min: 0 param_item_height; \
-                       color: GENLIST_PART_BG_COLOR_INC; \
-                } \
-                GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) \
-                GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) \
-         }
-
-#define GENLIST_EXPANDABLE_PART_BASE( GE_HEIGHT , GE_COLOR ) \
-         part { name: "base"; \
-                type: RECT; \
-                repeat_events: 1; \
-                scale: 1; \
-                description { state: "default" 0.0; \
-                       min: 0 GE_HEIGHT; \
-                       color: GE_COLOR; \
-                } \
-                description { state: "selected" 0.0; \
-                       inherit: "default" 0.0; \
-                       color: GENLIST_PART_LIST_PRESS_COLOR_INC; \
-                } \
-                GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) \
-                GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) \
-         }
-
-#define GENLIST_PROGRAM_MAP_ROTATE_EXPAND_START() \
-                        name: "rotaion_transition"; \
-                        signal: "flip_item"; \
-                        action: STATE_SET "map_transition" 0.0; \
-                        after: "rotation";
-
-#define GENLIST_PROGRAM_MAP_ROTATE_EXPAND_FINISH( second ) \
-                        name: "rotation"; \
-                        action: STATE_SET "map_rotate" 0.0; \
-                        transition: LINEAR second; \
-                        after: "rotation_end";
-
-#define GENLIST_PROGRAM_MAP_EXPAND_END() \
-                        name: "rotation_end"; \
-                        action: STATE_SET "default" 0.0;
-
-#define GENLIST_PROGRAM_MAP_ROTATE_CONTRACT_START() \
-                        name: "rotation_transition2"; \
-                        signal: "elm,state,contract_flip"; \
-                        action: STATE_SET "map_rotate" 0.0; \
-                        after: "rotation2";
-
-#define GENLIST_PROGRAM_MAP_ROTATE_CONTRACT_FINISH( second ) \
-                        name: "rotation2"; \
-                        action: STATE_SET "map_transition" 0.0; \
-                        transition: LINEAR second; \
-                        after: "rotation3";
-
-#define GENLIST_PROGRAM_MAP_CONTRACT_END() \
-                        name: "rotation3"; \
-                        action: STATE_SET "hide" 0.0;
-
-#define GENLIST_PART_EXPANDABLE2_NOSHADOW_BASE( param_item_height ) \
-         part { name: "base"; \
-                type: RECT; \
-                repeat_events: 1; \
-                scale: 1; \
-                description { state: "default" 0.0; \
-                       min: 0 param_item_height; \
-                       color: GENLIST_PART_EXPANDABLE_2ND_DEPTH_BG_COLOR_INC; \
-                } \
-                GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) \
-                GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) \
-         }
-
-#define GENLIST_PART_EXPANDABLE_SWALLOW_PADDING \
-         part { name: "elm.swallow.pad"; \
-                type: SWALLOW; \
-                description { state: "default" 0.0; \
-                       fixed: 1 0; \
-                       align: 0.0 0.5; \
-                       rel1 { \
-                          relative: 1.0 0.0;\
-                          to_x: "elm.padding.left"; \
-                       } \
-                       rel2.to_x: "elm.padding.left"; \
-                } \
-                GENLIST_PART_MAP_START(-90.0, 0.0, 0.0) \
-                GENLIST_PART_MAP_FINISH(0.0, 0.0, 0.0) \
-         } \
-
-#define GENLIST_PART_PADDING_LEFT_SLIDE( param_padding_size ) \
-         part { name: "elm.padding.left"; \
-                type: RECT; \
-                scale: 1; \
-                description { \
-                       state: "default" 0.0; \
-                       min: param_padding_size 0; \
-                       fixed: 1 0; \
-                       visible: 0; \
-                       rel1 { relative: 0.0 0.0; to: "bg"; } \
-                       rel2 { relative: 0.0 1.0; to: "bg"; } \
-                       align: 0.0 0.0; \
-                } \
-         }
-
-/* only for demo */
-#define GENLIST_PART_BUTTON( param_name, param_text_name, param_text, param_left, param_right, param_top, param_bottom ) \
-       part { name: param_name; \
-         mouse_events: 1; \
-         description { state: "default" 0.0; \
-                visible: 1; \
-                rel1 { relative: param_left param_top; offset: 0 0; } \
-                rel2 { relative: param_right param_bottom; offset: -1 -1; } \
-                image { \
-                       normal: "btn_normal.png"; \
-                       border: 10 10 10 10; \
-                       border_scale: 1; \
-                } \
-                image.middle: SOLID; \
-                fill.smooth: 0; \
-         } \
-         description { state: "selected" 0.0;  \
-                inherit: "default" 0.0;  \
-                image { \
-                       normal: "btn_selected.png"; \
-                } \
-         } \
-   } \
-   part { name: param_text_name;  \
-         type: TEXT;  \
-         mouse_events: 0; \
-         scale: 1; \
-         description {  \
-                align: 0.0 0.0; \
-                state: "default" 0.0;  \
-                color: 0 0 0 255;      \
-                rel1 { relative: 0.0 0.0; to: param_name; } \
-                rel2 { relative: 1.0 1.0; to: param_name; } \
-                text {  \
-                       text: param_text; \
-                       font: "SLP:style=Roman"; \
-                       size: 24;  \
-                       min: 1 1;  \
-                       align: 0.5 0.5;  \
-                       text_class: "slp_roman"; \
-                }      \
-         }  \
-   }
-
-/* only for demo */
-#define GENLIST_PROGRAM_BUTTON( param_name_focused, param_name_normal, param_part_name ) \
-   program { name: param_name_focused; \
-         source: param_part_name; \
-         signal: "mouse,down,1"; \
-         action:  STATE_SET "selected" 0.0;  \
-         target: param_part_name; \
-   } \
-   program { name: param_name_normal; \
-         source: param_part_name; \
-         signal: "mouse,up,1"; \
-         action:  STATE_SET "default" 0.0;  \
-         target: param_part_name; \
-   }
-
-#define GENLIST_PROGRAM_SLIDE_WITH_AFTER( param_name, param_state, param_next ) \
-   program { name: param_name; \
-         action:  STATE_SET "hide" param_state; \
-         target: "bg"; \
-         transition: LINEAR 0.3; \
-         after: param_next; \
-   }
-
-#define GENLIST_PROGRAM_SLIDE( param_name, param_state_name, param_state_value ) \
-   program { name: param_name; \
-         action:  STATE_SET param_state_name param_state_value; \
-         target: "bg"; \
-         transition: LINEAR 0.3; \
-   }
-
-#define DESC_FLIP_IMAGE( param_state_value, param_image_file_name ) \
-   description { state: "flipping" param_state_value; \
-         inherit: "default" 0.0; \
-         image { normal: param_image_file_name; } \
-   }
-
-#define DESC_TEXT_HIDE( param_state_value ) \
-description { state: "hide" param_state_value; \
-   inherit: "default" 0.0; \
-   color: 0 0 0 (255*(1-param_state_value/0.20)); \
-}
-
-#define GENLIST_EDIT_PART_BASE( param_item_height ) \
-         part { name: "base"; \
-                type: RECT; \
-                repeat_events: 0; \
-                scale: 1; \
-                description { state: "default" 0.0; \
-                       min: 0 param_item_height; \
-                       color: 0 0 0 0; \
-                } \
-         }
+#define GENLIST_PART_BOTTOM_LINE_OFF \
+         part { name: "bottom_line"; \
+            type: RECT; \
+            scale: 1; \
+            mouse_events: 0; \
+            description { state: "default" 0.0; \
+               visible: 0; \
+            } \
+            description { state: "reorder" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 0; \
+            } \
+            description { state: "selected" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 0; \
+            } \
+            description { state: "disabled" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 0; \
+            } \
+            GENLIST_DESCRIPTION_FADEOUT_RECT \
+         } \
+         part { name: "bottom_line2"; \
+            type: RECT; \
+            scale: 1; \
+            mouse_events: 0; \
+            description { state: "default" 0.0; \
+               visible: 0; \
+            } \
+            description { state: "reorder" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 0; \
+            } \
+            description { state: "selected" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 0; \
+            } \
+            description { state: "disabled" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 0; \
+            } \
+            GENLIST_DESCRIPTION_FADEOUT_RECT \
+         }
+
+#define GENLIST_PART_DIVIDER_MARGIN \
+         GENLIST_PART_SPACER("elm.padding.divider.top", \
+            GENLIST_DESCRIPTION_ENVELOP("base", \
+               align: 0.5 0; \
+               min: 0 30; \
+               max: -1 30; \
+               fixed: 0 1; \
+               rel2.relative: 1 0; \
+            ) \
+         ) \
+         GENLIST_PART_SPACER("elm.padding.divider.bottom", \
+            GENLIST_DESCRIPTION_ENVELOP("base", \
+               align: 0.5 1; \
+               min: 0 30; \
+               max: -1 30; \
+               fixed: 0 1; \
+               rel1.relative: 0 1; \
+            ) \
+         ) \
+
+#define GENLIST_PART_DIVIDER_L(LEFT) \
+         GENLIST_PART_DIVIDER_MARGIN \
+         GENLIST_PART_RECT("elm.divider1", \
+            mouse_events: 0; \
+            GENLIST_DESCRIPTION_LTB(LEFT, "elm.padding.divider.top", "elm.padding.divider.bottom", \
+               min: 1 0; \
+               max: 1 -1; \
+               fixed: 1 0; \
+               color: GENLIST_LIST_DIVIDER1_COLOR; \
+            ) \
+            GENLIST_DESCRIPTION_FADEOUT_RECT \
+         ) \
+         GENLIST_PART_RECT("elm.divider2", \
+            mouse_events: 0; \
+            GENLIST_DESCRIPTION_LTB("elm.divider1", "elm.padding.divider.top", "elm.padding.divider.bottom", \
+               min: 1 0; \
+               max: 1 -1; \
+               fixed: 1 0; \
+               color: GENLIST_LIST_DIVIDER2_COLOR; \
+            ) \
+            GENLIST_DESCRIPTION_FADEOUT_RECT \
+         )
+
+#define GENLIST_PART_DIVIDER_R(RIGHT) \
+         GENLIST_PART_DIVIDER_MARGIN \
+         GENLIST_PART_RECT("elm.divider1", \
+            mouse_events: 0; \
+            GENLIST_DESCRIPTION_RTB("elm.divider2", "elm.padding.divider.top", "elm.padding.divider.bottom", \
+               min: 1 0; \
+               max: 1 -1; \
+               fixed: 1 0; \
+               color: GENLIST_LIST_DIVIDER1_COLOR; \
+            ) \
+            GENLIST_DESCRIPTION_FADEOUT_RECT \
+         ) \
+         GENLIST_PART_RECT("elm.divider2", \
+            mouse_events: 0; \
+            GENLIST_DESCRIPTION_RTB(RIGHT, "elm.padding.divider.top", "elm.padding.divider.bottom", \
+               min: 1 0; \
+               max: 1 -1; \
+               fixed: 1 0; \
+               color: GENLIST_LIST_DIVIDER2_COLOR; \
+            ) \
+            GENLIST_DESCRIPTION_FADEOUT_RECT \
+         )
+
+#define GENLIST_PART_CENTER_LINE_LT(LEFT, TOP) \
+         GENLIST_PART_SPACER("elm.padding.divider.left", \
+            GENLIST_DESCRIPTION_L(LEFT, \
+               min: 16 0; \
+               max: 16 -1; \
+               fixed: 1 0; \
+            ) \
+         ) \
+         GENLIST_PART_SPACER("elm.padding.divider.right", \
+            GENLIST_DESCRIPTION_ENVELOP("base", \
+               min: 16 0; \
+               max: 16 -1; \
+               fixed: 1 0; \
+               align: 1 0.5; \
+               rel1.relative: 1 0; \
+            ) \
+         ) \
+         GENLIST_PART_RECT("center_line", \
+            mouse_events: 0; \
+            GENLIST_DESCRIPTION_LRT("elm.padding.divider.left", "elm.padding.divider.right", TOP, \
+               min: 0 1; \
+               max: -1 1; \
+               fixed: 0 1; \
+               color: GENLIST_LIST_DIVIDER1_COLOR; \
+            ) \
+            GENLIST_DESCRIPTION_FADEOUT_RECT \
+         ) \
+         GENLIST_PART_RECT("center_line2", \
+            GENLIST_DESCRIPTION_LRT("elm.padding.divider.left", "elm.padding.divider.right", "center_line", \
+               min: 0 1; \
+               max: -1 1; \
+               fixed: 0 1; \
+               color: GENLIST_LIST_DIVIDER2_COLOR; \
+            ) \
+            GENLIST_DESCRIPTION_FADEOUT_RECT \
+         )
+
+#define GENLIST_PART_COLORBAR \
+         GENLIST_PART_SPACER("elm.padding.colorbar.top", \
+             GENLIST_DESCRIPTION_ENVELOP("base", \
+               align: 0.5 0; \
+               fixed: 0 1; \
+               min: 0 4; \
+               max: -1 4; \
+               rel2.relative: 1 0; \
+             ) \
+         ) \
+         GENLIST_PART_SPACER("elm.padding.colorbar.bottom", \
+             GENLIST_DESCRIPTION_ENVELOP("base", \
+               align: 0.5 1; \
+               fixed: 0 1; \
+               min: 0 4; \
+               max: -1 4; \
+               rel1.relative: 0 1; \
+             ) \
+         ) \
+         GENLIST_PART_ICON("elm.swallow.colorbar", \
+            GENLIST_DESCRIPTION_LTB("bg_image", "elm.padding.colorbar.top", "elm.padding.colorbar.bottom", \
+               min: GENLIST_ICON_COLORBAR_SIZE 0; \
+               max: GENLIST_ICON_COLORBAR_SIZE -1; \
+               fixed: 1 0; \
+               rel1.relative: 0 1; \
+               rel2.relative: 0 0; \
+            ) \
+            GENLIST_DESCRIPTION_FADEOUT \
+         )
+
+//****************************************************************************//
+//********************************* PADDING **********************************//
+//****************************************************************************//
+#define GENLIST_PART_EXPANDED_PAD \
+         part { name: "elm.swallow.pad"; \
+            type: SWALLOW; \
+            scale: 1; \
+            mouse_events: 0; \
+            description { state: "default" 0.0; \
+               visible: 0; \
+               min: 0 0; \
+               fixed: 1 0; \
+               align: 0.0 0.5; \
+               rel1.to: "base"; \
+               rel2.to: "base"; \
+               rel2.relative: 0.0 1.0; \
+            } \
+         } \
+
+#define GENLIST_PART_PADDING( NAME, SIZE, REL1, REL2 ) \
+      GENLIST_PART_SPACER(NAME, \
+         description { state: "default" 0.0; \
+            min: SIZE 0; \
+            max: SIZE -1; \
+            fixed: 1 0; \
+            align: 0.5 0.5; \
+            rel1 { \
+               relative: REL1; \
+               to: "base"; \
+            } \
+            rel2 { \
+               relative: REL2; \
+               to: "base"; \
+            } \
+         } \
+      )
+
+#define GENLIST_PART_PADDING_LEFT \
+         GENLIST_PART_EXPANDED_PAD \
+         GENLIST_PART_SPACER("elm.padding.left", \
+            GENLIST_DESCRIPTION_L("elm.swallow.pad",  \
+               min: GENLIST_PADDING_SIZE_LEFT 0; \
+               max: GENLIST_PADDING_SIZE_LEFT -1; \
+               fixed: 1 0; \
+            ) \
+         )
+
+#define GENLIST_PART_PADDING_LEFT_SIZE( SIZE ) \
+         GENLIST_PART_EXPANDED_PAD \
+         GENLIST_PART_SPACER("elm.padding.left", \
+            GENLIST_DESCRIPTION_L("elm.swallow.pad",  \
+               min: SIZE 0; \
+               max: SIZE -1; \
+               fixed: 1 0; \
+            ) \
+         )
+
+#define GENLIST_PART_EDITBTN \
+         part { name: "elm.icon.edit"; \
+            type: SWALLOW; \
+            scale: 1; \
+            GENLIST_DESCRIPTION_R("elm.padding.edit.right", \
+               fixed: 1 1; \
+               visible: 0; \
+               min: GENLIST_ICON_BIG_SIZE GENLIST_ICON_BIG_SIZE; \
+               max: GENLIST_ICON_BIG_SIZE GENLIST_ICON_BIG_SIZE; \
+            ) \
+            description { state: "editmode" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+            } \
+         } \
+         GENLIST_PART_SPACER("elm.padding.edit.right", \
+            description { state: "default" 0.0; \
+               fixed: 1 0; \
+               align: 1.0 0.5; \
+               rel1.to: "base"; \
+               rel2.to: "base"; \
+               rel1.relative: 1 0; \
+               min: GENLIST_PADDING_SIZE_RIGHT 0; \
+               max: GENLIST_PADDING_SIZE_RIGHT -1; \
+            } \
+         )
+
+#define GENLIST_PART_PADDING_RIGHT \
+         GENLIST_PART_SPACER("elm.padding.right", \
+            description { state: "default" 0.0; \
+               min: GENLIST_PADDING_SIZE_RIGHT 0; \
+               max: GENLIST_PADDING_SIZE_RIGHT -1; \
+               fixed: 1 0; \
+               align: 1.0 0.5; \
+               rel1.to: "base"; \
+               rel2.to: "base"; \
+               rel1.relative: 1 0; \
+            } \
+         )
+
+#define GENLIST_PART_PADDING_RIGHT_SIZE( SIZE ) \
+         GENLIST_PART_SPACER("elm.padding.right", \
+            description { state: "default" 0.0; \
+               min: SIZE 0; \
+               max: SIZE -1; \
+               fixed: 1 0; \
+               align: 1.0 0.5; \
+               rel1.to: "base"; \
+               rel2.to: "base"; \
+               rel1.relative: 1 0; \
+            } \
+         )
+
+#define GENLIST_PART_PADDING_RIGHT_EDIT \
+         GENLIST_PART_SPACER("elm.padding.right", \
+            description { state: "default" 0.0; \
+               min: GENLIST_PADDING_SIZE_RIGHT 0; \
+               max: GENLIST_PADDING_SIZE_RIGHT -1; \
+               fixed: 1 0; \
+               align: 1.0 0.5; \
+               rel1.to: "base"; \
+               rel2.to: "base"; \
+               rel1.relative: 1 0; \
+            } \
+            description { state: "editmode" 0.0; \
+               inherit: "default" 0.0; \
+               min: (DIALOGUE_PADDING_SIZE_RIGHT+GENLIST_ICON_BIG_SIZE+GENLIST_PADDING_SIZE_RIGHT) 0; \
+               max: (DIALOGUE_PADDING_SIZE_RIGHT+GENLIST_ICON_BIG_SIZE+GENLIST_PADDING_SIZE_RIGHT) -1; \
+            } \
+         ) \
+         GENLIST_PART_EDITBTN
+
+#define GENLIST_PART_PADDING_RIGHT_SIZE_EDIT( SIZE ) \
+         GENLIST_PART_SPACER("elm.padding.right", \
+            description { state: "default" 0.0; \
+               min: SIZE 0; \
+               max: SIZE -1; \
+               fixed: 1 0; \
+               align: 1.0 0.5; \
+               rel1.to: "base"; \
+               rel2.to: "base"; \
+               rel1.relative: 1 0; \
+            } \
+            description { state: "editmode" 0.0; \
+               inherit: "default" 0.0; \
+               min: (DIALOGUE_PADDING_SIZE_RIGHT+SIZE+GENLIST_ICON_BIG_SIZE) 0; \
+               max: (DIALOGUE_PADDING_SIZE_RIGHT+SIZE+GENLIST_ICON_BIG_SIZE) -1; \
+            } \
+         ) \
+         GENLIST_PART_EDITBTN
+
+#define GENLIST_PART_PADDING_TOP_2LINE \
+         GENLIST_PART_SPACER("elm.padding.top", \
+            description { \
+               state: "default" 0.0; \
+               min: 0 GENLIST_PADDING_SIZE_TOP_2LINE; \
+               max: -1 GENLIST_PADDING_SIZE_TOP_2LINE; \
+               fixed: 0 1; \
+               rel1.to: "base"; \
+               rel2.to: "base"; \
+               rel2.relative: 1.0 0.0; \
+               align: 0.5 0.0; \
+            } \
+         )
+
+#define GENLIST_PART_PADDING_TOP_SIZE( SIZE ) \
+         GENLIST_PART_SPACER("elm.padding.top", \
+            description { \
+               state: "default" 0.0; \
+               min: 0 SIZE; \
+               max: -1 SIZE; \
+               fixed: 0 1; \
+               rel1.to: "base"; \
+               rel2.to: "base"; \
+               rel2.relative: 1.0 0.0; \
+               align: 0.5 0.0; \
+            } \
+         )
+
+
+#define GENLIST_PART_PADDING_BOTTOM_2LINE \
+         GENLIST_PART_SPACER("elm.padding.bottom", \
+            description { state: "default" 0.0; \
+               min: 0 GENLIST_PADDING_SIZE_BOTTOM_2LINE; \
+               max: -1 GENLIST_PADDING_SIZE_BOTTOM_2LINE; \
+               fixed: 0 1; \
+               rel1.to: "base"; \
+               rel2.to: "base"; \
+               rel1.relative: 0.0 1.0; \
+               align: 0.5 1.0; \
+            } \
+         )
+
+#define GENLIST_PART_PADDING_BOTTOM_SIZE( SIZE ) \
+         GENLIST_PART_SPACER("elm.padding.bottom", \
+            description { state: "default" 0.0; \
+               min: 0 SIZE; \
+               max: -1 SIZE; \
+               fixed: 0 1; \
+               rel1.to: "base"; \
+               rel2.to: "base"; \
+               rel1.relative: 0.0 1.0; \
+               align: 0.5 1.0; \
+            } \
+         )
+
+#define GENLIST_PART_PADDING_R( NAME, RIGHT ) \
+         GENLIST_PART_SPACER(NAME, \
+            description { state: "default" 0.0; \
+               fixed: 1 0; \
+               min: GENLIST_PADDING_SIZE_DEFAULT 0; \
+               max: GENLIST_PADDING_SIZE_DEFAULT -1; \
+               align: 1 0.5; \
+               rel1 { \
+                  relative: 0 0; \
+                  to_x: RIGHT; \
+               } \
+               rel2 { \
+                  relative: 0 1; \
+                  to_x: RIGHT; \
+               } \
+            } \
+         )
+
+#define GENLIST_PART_PADDING_R_SIZE( NAME, RIGHT, SIZE ) \
+         GENLIST_PART_SPACER(NAME, \
+            description { state: "default" 0.0; \
+               fixed: 1 0; \
+               min: SIZE 0; \
+               max: SIZE -1; \
+               align: 1 0.5; \
+               rel1 { \
+                  relative: 0 0; \
+                  to_x: RIGHT; \
+               } \
+               rel2 { \
+                  relative: 0 1; \
+                  to_x: RIGHT; \
+               } \
+            } \
+         )
+
+#define GENLIST_PART_PADDING_L( NAME, LEFT ) \
+         GENLIST_PART_SPACER(NAME, \
+            description { state: "default" 0.0; \
+               fixed: 1 0; \
+               min: GENLIST_PADDING_SIZE_DEFAULT 0; \
+               max: GENLIST_PADDING_SIZE_DEFAULT -1; \
+               align: 0 0.5; \
+               rel1 { \
+                  relative: 1 0; \
+                  to_x: LEFT; \
+               } \
+               rel2 { \
+                  relative: 1 1; \
+                  to_x: LEFT; \
+               } \
+            } \
+         )
+
+#define GENLIST_PART_PADDING_L_SIZE( NAME, LEFT, SIZE ) \
+         GENLIST_PART_SPACER(NAME, \
+            description { state: "default" 0.0; \
+               fixed: 1 0; \
+               min: SIZE 0; \
+               max: SIZE -1; \
+               align: 0 0.5; \
+               rel1 { \
+                  relative: 1 0; \
+                  to_x: LEFT; \
+               } \
+               rel2 { \
+                  relative: 1 1; \
+                  to_x: LEFT; \
+               } \
+            } \
+         )
+
+
+#define GENLIST_PART_PADDING_T_SIZE( NAME, TOP, SIZE ) \
+         GENLIST_PART_SPACER(NAME, \
+            description { state: "default" 0.0; \
+               min: 0 SIZE; \
+               max: -1 SIZE; \
+               fixed: 0 1; \
+               align: 0.5 0; \
+               rel1 { \
+                  relative: 0 1; \
+                  to: TOP; \
+               } \
+               rel2 { \
+                  relative: 1 1; \
+                  to: TOP; \
+               } \
+            } \
+         )
+
+#define GENLIST_PART_PADDING_B_SIZE( NAME, BOTTOM, SIZE ) \
+         GENLIST_PART_SPACER(NAME, \
+            description { state: "default" 0.0; \
+               min: 0 SIZE; \
+               max: -1 SIZE; \
+               fixed: 0 1; \
+               align: 0.5 1; \
+               rel1 { \
+                  relative: 0.5 0; \
+                  to: BOTTOM; \
+               } \
+               rel2 { \
+                  relative: 0.5 0; \
+                  to: BOTTOM; \
+               } \
+            } \
+         )
+
+#define GENLIST_PART_PERSPECTIVE_POINT \
+         GENLIST_PART_RECT("point", \
+            description { \
+               state: "default" 0.0; \
+               color: 0 0 0 0; \
+               rel1 { relative: 0.0 0.0; } \
+               rel2 { relative: 1.0 0.0; } \
+            } \
+         )
+
+#define GENLIST_DESCRIPTION_ROTATE( param_x, param_y, param_z ) \
+   description { state: "map_contracted" 0.0; \
+      inherit: "default" 0.0; \
+      map { \
+         perspective: "point"; \
+         on: 1; \
+         smooth: 1; \
+         perspective_on: 1; \
+         backface_cull: 1; \
+         rotation { \
+            center: "point"; \
+            x: param_x; \
+            y: param_y; \
+            z: param_z; \
+         } \
+      } \
+   } \
+   description { state: "map_expanded" 0.0; \
+      inherit: "default" 0.0; \
+      map { \
+         perspective: "point"; \
+         on: 1; \
+         smooth: 1; \
+         perspective_on: 1; \
+         backface_cull: 1; \
+         rotation { \
+            center: "point"; \
+            x: 0; \
+            y: 0; \
+            z: 0; \
+         } \
+      } \
+   } \
+   description { \
+      state: "hide" 0.0; \
+      inherit: "default" 0.0; \
+      visible: 0; \
+   }
+
+#define GENLIST_PROGRAM_ROTATE( TARGET ) \
+   program { name: "map_expand_start"; \
+      signal: "flip_item"; \
+      action: STATE_SET "map_contracted" 0.0; \
+      target: "bg_image"; \
+      TARGET \
+      after: "map_expanding"; \
+   } \
+   program { name: "map_expanding"; \
+      action: STATE_SET "hide" 0.0; \
+      transition: LINEAR 0.2; \
+      target: "bg_image"; \
+      TARGET \
+      after: "map_expand_end"; \
+   } \
+   program { name: "map_expand_end"; \
+      action: STATE_SET "default" 0.0; \
+      target: "bg_image"; \
+      TARGET \
+   } \
+   program { name: "map_contract_start"; \
+      signal: "elm,state,contract_flip"; \
+      action: STATE_SET "map_expanded" 0.0; \
+      target: "bg_image"; \
+      TARGET \
+      after: "map_contracting"; \
+   } \
+   program { name: "map_contracting"; \
+      action: STATE_SET "map_contracted" 0.0; \
+      transition: LINEAR 0.3; \
+      target: "bg_image"; \
+      TARGET \
+      after: "map_contract_end"; \
+   } \
+   program { name: "map_contract_end"; \
+      action: STATE_SET "hide" 0.0; \
+      target: "bg_image"; \
+      TARGET \
+   }
+
+// FIXME: swallow part cannot be fade out ???
+#define GENLIST_DESCRIPTION_FADEOUT_ICON \
+   description { state: "fadeout" 0.0; \
+      inherit: "default" 0.0; \
+      visible: 0; \
+   } \
+   description { state: "fadein" 0.0; \
+      inherit: "default" 0.0; \
+      visible: 0; \
+   } \
+
+#define GENLIST_DESCRIPTION_FADEOUT_RECT \
+   description { state: "fadeout" 0.0; \
+      inherit: "default" 0.0; \
+      color: 0 0 0 50; \
+      visible: 0; \
+   } \
+   description { state: "fadein" 0.0; \
+      inherit: "default" 0.0; \
+   } \
 
+#define GENLIST_DESCRIPTION_FADEOUT \
+   description { state: "fadeout" 0.0; \
+      inherit: "default" 0.0; \
+      color: 255 255 255 50; \
+      visible: 0; \
+   } \
+   description { state: "fadein" 0.0; \
+      inherit: "default" 0.0; \
+   } \
+
+#define GENLIST_PROGRAM_EXPAND_FADE( TARGET ) \
+   program { name: "expand"; \
+      signal: "flip_item"; \
+      action: STATE_SET "2depth" 0.0; \
+      target: "bg_image_clip"; \
+      after: "expand_start_fade"; \
+   } \
+   program { name: "expand_start_fade"; \
+      action: STATE_SET "fadeout" 0.0; \
+      after: "expand_end_fade"; \
+      target: "bg_image"; \
+      TARGET \
+   } \
+   program { name: "expand_end_fade"; \
+      action: STATE_SET "default" 0.0; \
+      transition: DECELERATE 0.3; \
+      target: "bg_image"; \
+      TARGET \
+   } \
+   program { name: "contract_fade"; \
+      signal: "elm,state,contract_flip"; \
+      action: STATE_SET "fadein" 0.0; \
+      after: "contract_end_fade"; \
+      target: "bg_image"; \
+      TARGET \
+   } \
+   program { name: "contract_end_fade"; \
+      action: STATE_SET "fadeout" 0.0; \
+      transition: ACCELERATE 0.3; \
+      target: "bg_image"; \
+      TARGET \
+   }
+
+#define GENLIST_PROGRAM_EXPAND_ROOT( TARGET ) \
+         program { \
+            name: "go_expanded"; \
+            signal: "elm,state,expanded"; \
+            source: "elm"; \
+            action: STATE_SET "active" 0.0; \
+            target: "bg_image"; \
+            TARGET \
+         } \
+         program { \
+            name: "go_contracted"; \
+            signal: "elm,state,contracted"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "bg_image"; \
+            TARGET \
+         } \
+         program { \
+            name: "show"; \
+            signal: "elm,state,show"; \
+            action: STATE_SET "default" 0.0; \
+            target: "bg_image"; \
+            TARGET \
+         } \
+         program { \
+            name: "hide"; \
+            signal: "elm,state,hide"; \
+            action: STATE_SET "hide" 0.0; \
+            target: "bg_image"; \
+            TARGET \
+         }
+
+#define GENLIST_PROGRAM_EXPANDABLE( SRC ) \
+        program { \
+            name: "expand"; \
+            signal: "mouse,up,1"; \
+            SRC \
+            action: SIGNAL_EMIT "elm,action,expand,toggle" "elm"; \
+         } \
+
+// 2.2.7 Genlist_Edit mode (Rename)
+// FIXME: padding is not needed when swallow content is NULL.
+// But how can edje kwno existence of swallow content?
 #define GENLIST_PART_FLIP \
-         part { name: "elm.flip.content"; \
-                clip_to: "disclip"; \
-                type: SWALLOW; \
-                mouse_events: 1; \
-                scale: 1; \
-                description { state: "default" 0.0; \
-                       visible: 0; \
-                       fixed: 1 1; \
-                       rel1 { \
-                          relative: 1.0  0.5; \
-                          to_x: "elm.padding.left"; \
-                       } \
-                       rel2 { \
-                          relative: 0.0  0.5; \
-                          to_x: "elm.padding.right"; \
-                       } \
-                } \
-                description { state: "flip_enabled" 0.0; \
-                       inherit: "default" 0.0; \
-                       visible: 1; \
-                } \
-         }
+         part { name: "elm.flip.event_block";\
+            type: RECT;\
+            mouse_events: 0; \
+            repeat_events: 0;\
+            description { state: "default" 0.0;\
+               visible: 0; \
+            } \
+            description { state: "flip_enabled" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+               color: GENLIST_LIST_BG_COLOR;\
+            }\
+         }\
+         part { name: "elm.flip.padding.left"; \
+            type: RECT; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               min: 26 0; \
+               max: 26 -1; \
+               fixed: 1 0; \
+               visible: 0; \
+               align: 0 0.5; \
+               rel1 { \
+                  relative: 0 0; \
+                  to: "base"; \
+               } \
+               rel2 { \
+                  relative: 0 1; \
+                  to: "base"; \
+               } \
+            } \
+         } \
+         part { name: "elm.flip.padding.right"; \
+            type: RECT; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               min: 26 0; \
+               max: 26 -1; \
+               fixed: 1 0; \
+               visible: 0; \
+               align: 1 0.5; \
+               rel1 { \
+                  relative: 1 0; \
+                  to: "base"; \
+               } \
+               rel2 { \
+                  relative: 1 1; \
+                  to: "base"; \
+               } \
+            } \
+         } \
+         part { name: "elm.flip.content"; \
+            type: SWALLOW; \
+            scale: 1; \
+            GENLIST_DESCRIPTION_LR("elm.flip.padding.left", "elm.flip.padding.icon.left", \
+               aspect: 1 1; visible: 0; ) \
+            description { state: "flip_enabled" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+            } \
+         } \
+         GENLIST_PART_PADDING_R("elm.flip.padding.icon.left", "elm.flip.icon") \
+         GENLIST_PART_ICON( "elm.flip.icon", \
+            GENLIST_DESCRIPTION_R("elm.flip.padding.right", \
+               visible: 0; \
+               aspect: 1 1; \
+               align: 1 0.5; \
+               max: 154 74;) \
+            description { state: "flip_enabled" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+            } \
+         )
 
-#define GENLIST_DESCRIPTION_INVISIBLE_SELECTED \
-                description { state: "selected" 1.0; \
-                       inherit: "default" 0.0; \
-                       visible: 0; \
-                }
+//****************************************************************************//
+// *******************************  Programs ********************************//
+//**************************************************************************//
+// signal: elm,state,%s,active
+//   a "check" item named %s went active
+// signal: elm,state,%s,passive
+//   a "check" item named %s went passive
+// default is passive
+#define GENLIST_PROGRAM_DISABLED( TARGET ) \
+         program { name: "enabled"; \
+            signal: "elm,state,enabled"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "bg_image"; \
+            TARGET \
+         } \
+         program { name: "disabled"; \
+            signal: "elm,state,disabled"; \
+            source: "elm"; \
+            action: STATE_SET "disabled" 0.0; \
+            target: "bg_image"; \
+            TARGET \
+         }
 
-#define GENLIST_DESCRIPTION_FLIP_ENABLED \
-                description { state: "flip_enabled" 0.0; \
-                       inherit: "default" 0.0; \
-                       visible: 0; \
-                }
+#define GENLIST_PROGRAM_DISABLED_BOTTOMLINE( TARGET ) \
+         program { name: "enabled"; \
+            signal: "elm,state,enabled"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "bg_image"; \
+            target: "bottom_line"; \
+            target: "bottom_line2"; \
+            TARGET \
+         } \
+         program { name: "disabled"; \
+            signal: "elm,state,disabled"; \
+            source: "elm"; \
+            action: STATE_SET "disabled" 0.0; \
+            target: "bg_image"; \
+            target: "bottom_line"; \
+            target: "bottom_line2"; \
+            TARGET \
+         }
 
-#define GENLIST_PROGRAM_SCRIPT_FLIP_SELECT_1TEXT \
-                script { \
-                       new st[31]; \
-                       new Float:vl; \
-                       get_state(PART:"elm.text", st, 30, vl); \
-                       set_state(PART:"bg_image", "selected", 0.0); \
-                       if (!strcmp(st, "flip_enabled")) \
-                          set_state(PART:"elm.text", "selected", 1.0); \
-                       else \
-                          set_state(PART:"elm.text", "selected", 0.0); \
-                }
-
-#define GENLIST_PROGRAM_SCRIPT_FLIP_SELECT_2TEXT \
-                script { \
-                       new st[31]; \
-                       new Float:vl; \
-                       get_state(PART:"elm.text.1", st, 30, vl); \
-                       set_state(PART:"bg_image", "selected", 0.0); \
-                       if (!strcmp(st, "flip_enabled")) { \
-                          set_state(PART:"elm.text.1", "selected", 1.0); \
-                          set_state(PART:"elm.text.2", "selected", 1.0); \
-                       } \
-                       else { \
-                          set_state(PART:"elm.text.1", "selected", 0.0); \
-                          set_state(PART:"elm.text.2", "selected", 0.0); \
-                       } \
-                }
-
-#define GENLIST_PROGRAM_SCRIPT_FLIP_SELECT_3TEXT \
-                script { \
-                       new st[31]; \
-                       new Float:vl; \
-                       get_state(PART:"elm.text.1", st, 30, vl); \
-                       set_state(PART:"bg_image", "selected", 0.0); \
-                       if (!strcmp(st, "flip_enabled")) { \
-                          set_state(PART:"elm.text.1", "selected", 1.0); \
-                          set_state(PART:"elm.text.2", "selected", 1.0); \
-                          set_state(PART:"elm.text.3", "selected", 1.0); \
-                       } \
-                       else { \
-                          set_state(PART:"elm.text.1", "selected", 0.0); \
-                          set_state(PART:"elm.text.2", "selected", 0.0); \
-                          set_state(PART:"elm.text.3", "selected", 0.0); \
-                       } \
-                }
+#define GENLIST_PROGRAM_SELECT( TARGET ) \
+         program { name: "selected"; \
+            signal: "elm,state,selected"; \
+            source: "elm"; \
+            action: STATE_SET "selected" 0.0; \
+            target: "bg_image"; \
+            TARGET \
+         } \
+         program { name: "unselected"; \
+            signal: "elm,state,unselected"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "bg_image"; \
+            TARGET \
+            transition: LINEAR 0.1; \
+         }
+
+#define GENLIST_PROGRAM_SELECT_BOTTOMLINE( TARGET ) \
+         program { name: "selected"; \
+            signal: "elm,state,selected"; \
+            source: "elm"; \
+            action: STATE_SET "selected" 0.0; \
+            target: "bg_image"; \
+            target: "bottom_line"; \
+            target: "bottom_line2"; \
+            TARGET \
+         } \
+         program { name: "unselected"; \
+            signal: "elm,state,unselected"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "bg_image"; \
+            target: "bottom_line"; \
+            target: "bottom_line2"; \
+            TARGET \
+            transition: LINEAR 0.1; \
+         }
+
+#define GENLIST_PROGRAM_SELECT_DIALOGUE( TARGET ) \
+         program { name: "selected"; \
+            signal: "elm,state,selected"; \
+            source: "elm"; \
+            script { \
+               new st[31]; \
+               new Float:vl; \
+               get_state(PART:"bg_image", st, 30, vl); \
+               if (!strcmp(st, "top")) \
+                  set_state(PART:"bg_image", "top_selected", 0.0); \
+               else if (!strcmp(st, "center")) \
+                  set_state(PART:"bg_image", "center_selected", 0.0); \
+               else if (!strcmp(st, "bottom")) \
+                  set_state(PART:"bg_image", "bottom_selected", 0.0); \
+               else \
+                  set_state(PART:"bg_image", "selected", 0.0); \
+            } \
+            after: "target_selected"; \
+         } \
+         program { name: "unselected"; \
+            signal: "elm,state,unselected"; \
+            source: "elm"; \
+            script { \
+               new st[31]; \
+               new Float:vl; \
+               get_state(PART:"bg_image", st, 30, vl); \
+               if (!strcmp(st, "top_selected")) \
+                  set_state(PART:"bg_image", "top", 0.0); \
+               else if (!strcmp(st, "center_selected"))  \
+                  set_state(PART:"bg_image", "center", 0.0); \
+               else if (!strcmp(st, "bottom_selected"))  \
+                  set_state(PART:"bg_image", "bottom", 0.0); \
+               else \
+                  set_state(PART:"bg_image", "default", 0.0); \
+            } \
+            transition: LINEAR 0.1; \
+            after: "target_unselected"; \
+         } \
+         program { name: "target_selected"; \
+            action: STATE_SET "selected" 0.0; \
+            TARGET \
+         }\
+         program { name: "target_unselected"; \
+            action: STATE_SET "default" 0.0; \
+            TARGET \
+         }\
+         program { name: "bg_top"; \
+            signal: "elm,state,top"; \
+            source: "*"; \
+            action: STATE_SET "top" 0.0; \
+            target: "bg_image"; \
+         } \
+         program { name: "bg_center"; \
+            signal: "elm,state,center"; \
+            source: "*"; \
+            action: STATE_SET "center" 0.0; \
+            target: "bg_image"; \
+         } \
+         program { name: "bg_bottom"; \
+            signal: "elm,state,bottom"; \
+            source: "*"; \
+            action: STATE_SET "bottom" 0.0; \
+            target: "bg_image"; \
+         } \
+         program { name: "bg_default"; \
+            signal: "elm,state,default"; \
+            source: "*"; \
+            action: STATE_SET "default" 0.0; \
+            target: "bg_image"; \
+         }
+
+         #if 0
+         program { name: "flip_enabled"; \
+            signal:  "elm,state,flip,enabled"; \
+            source:  "elm"; \
+            action:  STATE_SET "flip_enabled" 0.0; \
+            after:   "flip_enabled_next"; \
+         } \
+         after:   "flip_disabled_next";
+         program { name:    "flip_disabled_next"; \
+            source:  "elm"; \
+            action:  STATE_SET "default" 0.0; \
+            target: "disclip"; \
+         }
+         #endif
+
+#define GENLIST_PROGRAM_FLIP \
+         program { name: "flip_enabled"; \
+            signal:  "elm,state,flip,enabled"; \
+            source:  "elm"; \
+            action:  STATE_SET "flip_enabled" 0.0; \
+            target: "elm.flip.event_block"; \
+            after: "flip_enabled_next"; \
+         } \
+         program { name: "flip_enabled_next"; \
+            action:  STATE_SET "flip_enabled" 0.0; \
+            transition: DECELERATE 0.5; \
+            target: "elm.flip.content"; \
+            target: "elm.flip.icon"; \
+         } \
+         program { name: "flip_disabled"; \
+            signal:  "elm,state,flip,disabled"; \
+            source:  "elm"; \
+            action:  STATE_SET "default" 0.0; \
+            transition: DECELERATE 0.5; \
+            target: "elm.flip.event_block"; \
+            target: "elm.flip.content"; \
+            target: "elm.flip.icon"; \
+         }
+
+#define GENLIST_PROGRAM_FLIP_TARGET( TARGET ) \
+         program { name: "flip_enabled"; \
+            signal:  "elm,state,flip,enabled"; \
+            source:  "elm"; \
+            action:  STATE_SET "flip_enabled" 0.0; \
+            transition: DECELERATE 0.5; \
+            TARGET; \
+         } \
+         program { name: "flip_disabled"; \
+            signal:  "elm,state,flip,disabled"; \
+            source:  "elm"; \
+            action:  STATE_SET "default" 0.0; \
+            transition: DECELERATE 0.5; \
+            TARGET \
+         }
+
+#define GENLIST_PROGRAM_EDITMODE \
+         program { name: "edit_enabled"; \
+            signal:  "elm,state,edit,enabled"; \
+            source:  "*"; \
+            action:  STATE_SET "editmode" 0.0; \
+            target: "elm.padding.right"; \
+            target: "elm.icon.edit"; \
+            target: "bg_image_right"; \
+         } \
+         program { name: "edit_disabled"; \
+            signal:  "elm,state,edit,disabled"; \
+            source:  "*"; \
+            action:  STATE_SET "editmode" 0.0; \
+            target: "elm.padding.right"; \
+            target: "elm.icon.edit"; \
+            target: "bg_image_right"; \
+         }
+
+#define GENLIST_PROGRAMS_INDEX( TARGET ) \
+         programs { \
+            GENLIST_PROGRAM_DISABLED( TARGET ) \
+         }
+
+#define GENLIST_PROGRAMS_NORMAL( TARGET ) \
+         programs { \
+            GENLIST_PROGRAM_DISABLED_BOTTOMLINE( TARGET ) \
+            GENLIST_PROGRAM_SELECT_BOTTOMLINE( TARGET ) \
+            GENLIST_PROGRAM_EXPAND_FADE( target: "bottom_line"; target: "bottom_line2"; TARGET ) \
+            GENLIST_PROGRAM_FLIP \
+         }
+
+// FIXME: inheritance !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
+// if GENLIST_PROGRAM_EXPAND is here, expanda effect is something wrong.
+// because after can be duplicated when program inheriting.
+#define GENLIST_PROGRAMS_DIALOGUE( TARGET ) \
+         programs { \
+            GENLIST_PROGRAM_DISABLED( TARGET ) \
+            GENLIST_PROGRAM_SELECT_DIALOGUE( TARGET ) \
+            GENLIST_PROGRAM_FLIP \
+            GENLIST_PROGRAM_EDITMODE \
+         }
+
+#define GENLIST_PROGRAMS_MULTILINE( TARGET ) \
+         programs { \
+            GENLIST_PROGRAM_DISABLED( TARGET ) \
+            GENLIST_PROGRAM_SELECT_DIALOGUE( TARGET ) \
+            GENLIST_PROGRAM_FLIP \
+         }
+
+#define GENLIST_PROGRAMS_READ_TEXT1( TARGET ) \
+      script { \
+         public readed = 0; \
+      } \
+      programs { \
+         GENLIST_PROGRAM_DISABLED_BOTTOMLINE( TARGET ) \
+         GENLIST_PROGRAM_FLIP \
+         program { name: "selected"; \
+            signal: "elm,state,selected"; \
+            source: "elm"; \
+            action: STATE_SET "selected" 0.0; \
+            target: "bg_image"; \
+            target: "bottom_line"; \
+            target: "bottom_line2"; \
+            TARGET \
+         } \
+         program { name: "go_passive_target"; \
+            signal: "elm,state,unselected"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            TARGET \
+            after: "go_passive_text1"; \
+         } \
+         program { name: "go_passive_text1"; \
+            transition: LINEAR 0.1; \
+            script { \
+               set_state(PART:"bg_image", "default", 0.0); \
+               set_state(PART:"bottom_line", "default", 0.0); \
+               set_state(PART:"bottom_line2", "default", 0.0); \
+               if (get_int(readed) == 1) \
+                 set_state(PART:"elm.text.1", "read", 0.0); \
+               else \
+                 set_state(PART:"elm.text.1", "default", 0.0); \
+            } \
+         } \
+         program { name: "go_read"; \
+            signal: "elm,state,read"; \
+            source: "*"; \
+            script { \
+              set_int(readed, 1); \
+              set_state(PART:"elm.text.1", "read", 0.0); \
+            } \
+         } \
+         program { name: "go_unread"; \
+            signal: "elm,state,unread"; \
+            source: "*"; \
+            script { \
+              set_int(readed, 0); \
+              set_state(PART:"elm.text.1", "default", 0.0); \
+            } \
+         } \
+      }
+
+//****************************************************************************//
+// *******************************  Icon Part ******************************//
+//***************************************************************************//
+#define GENLIST_PART_ICON(NAME, DESCRIPION) \
+   part { name: NAME; \
+      scale: 1; \
+      type: SWALLOW; \
+      DESCRIPION \
+      GENLIST_DESCRIPTION_FADEOUT_ICON \
+   }
+
+#define GENLIST_PARAM_ICON_BIG \
+         min: GENLIST_ICON_BIG_SIZE GENLIST_ICON_BIG_SIZE; \
+         max: GENLIST_ICON_BIG_SIZE GENLIST_ICON_BIG_SIZE;
+
+#define GENLIST_PARAM_ICON_SMALL \
+         min: GENLIST_ICON_SMALL_SIZE GENLIST_ICON_SMALL_SIZE; \
+         max: GENLIST_ICON_SMALL_SIZE GENLIST_ICON_SMALL_SIZE;
+
+#define GENLIST_PARAM_ICON_BTN_01 \
+         min: 0 GENLIST_BTN_01_HEIGHT; \
+         max: 0 GENLIST_BTN_01_HEIGHT;
+
+#define GENLIST_PARAM_ICON_BTN_02 \
+         min: GENLIST_BTN_02_SIZE GENLIST_BTN_02_SIZE; \
+         max: GENLIST_BTN_02_SIZE GENLIST_BTN_02_SIZE;
+
+#define GENLIST_PARAM_ICON_ONOFF_WIDTH \
+         min: GENLIST_ICON_ONOFF_WIDTH GENLIST_ICON_ONOFF_HEIGHT; \
+         max: GENLIST_ICON_ONOFF_WIDTH GENLIST_ICON_ONOFF_HEIGHT;
+
+#define GENLIST_PARAM_ICON_THUMBNAIL1\
+         min: GENLIST_ICON_THUMBNAIL1_SIZE GENLIST_ICON_THUMBNAIL1_SIZE; \
+         max: GENLIST_ICON_THUMBNAIL1_SIZE GENLIST_ICON_THUMBNAIL1_SIZE;
+
+#define GENLIST_PARAM_ICON_CHECK_RADIO \
+         min: GENLIST_ICON_CHECK_RADIO_SIZE GENLIST_ICON_CHECK_RADIO_SIZE; \
+         max: GENLIST_ICON_CHECK_RADIO_SIZE GENLIST_ICON_CHECK_RADIO_SIZE;
+
+#define GENLIST_PARAM_ICON_STAR \
+         min: GENLIST_ICON_STAR_SIZE GENLIST_ICON_STAR_SIZE; \
+         max: GENLIST_ICON_STAR_SIZE GENLIST_ICON_STAR_SIZE; \
+
+#define GENLIST_PART_ICON_BIG_R(NAME, RIGHT) \
+   GENLIST_PART_ICON(NAME, \
+      GENLIST_DESCRIPTION_R(RIGHT, \
+         fixed: 1 1; \
+         GENLIST_PARAM_ICON_BIG \
+      ) \
+   )
+
+#define GENLIST_PART_ICON_BIG_L(NAME, LEFT) \
+   GENLIST_PART_ICON(NAME, \
+      GENLIST_DESCRIPTION_L(LEFT, \
+         fixed: 1 1; \
+         GENLIST_PARAM_ICON_BIG \
+      ) \
+   )
+
+#define GENLIST_PART_ICON_SMALL_L(NAME, LEFT) \
+   GENLIST_PART_ICON(NAME, \
+      GENLIST_DESCRIPTION_L(LEFT, \
+         GENLIST_PARAM_ICON_SMALL \
+      ) \
+   )
+
+#define GENLIST_PART_ICON_SMALL_LB(NAME, LEFT, BOTTOM) \
+   GENLIST_PART_ICON(NAME, \
+      GENLIST_DESCRIPTION_LB(LEFT, BOTTOM, \
+         fixed: 1 1; \
+        GENLIST_PARAM_ICON_SMALL \
+      ) \
+   )
+
+#define GENLIST_PART_ICON_SMALL_LTB(NAME, LEFT, TOP, BOTTOM) \
+   GENLIST_PART_ICON(NAME, \
+      GENLIST_DESCRIPTION_LTB(LEFT, TOP, BOTTOM, \
+         GENLIST_PARAM_ICON_SMALL \
+      ) \
+   )
+
+#define GENLIST_PART_ICON_SMALL_RTB(NAME, RIGHT, TOP, BOTTOM) \
+   GENLIST_PART_ICON(NAME, \
+      GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
+         GENLIST_PARAM_ICON_SMALL \
+      ) \
+   )
+
+#define GENLIST_PART_ICON_BTN_01_R(NAME, RIGHT) \
+   GENLIST_PART_ICON(NAME, \
+      GENLIST_DESCRIPTION_R(RIGHT, \
+         GENLIST_PARAM_ICON_BTN_01 \
+      ) \
+   )
+
+#define GENLIST_PART_ICON_BTN_02_R(NAME, RIGHT) \
+   GENLIST_PART_ICON(NAME, \
+      GENLIST_DESCRIPTION_R(RIGHT, \
+         GENLIST_PARAM_ICON_BTN_02 \
+      ) \
+   )
+
+#define GENLIST_PART_ICON_BTN_ONOFF_R(NAME, RIGHT) \
+   GENLIST_PART_ICON(NAME, \
+      GENLIST_DESCRIPTION_R(RIGHT, \
+         GENLIST_PARAM_ICON_ONOFF_WIDTH \
+      ) \
+   )
+
+#define GENLIST_PART_ICON_BTN_ONOFF_L(NAME, LEFT) \
+   GENLIST_PART_ICON(NAME, \
+      GENLIST_DESCRIPTION_L(LEFT, \
+         GENLIST_PARAM_ICON_ONOFF_WIDTH \
+      ) \
+   )
+
+#define GENLIST_PART_ICON_THUMBNAIL1_R(NAME, RIGHT) \
+   GENLIST_PART_ICON(NAME, \
+      GENLIST_DESCRIPTION_R(RIGHT, \
+         GENLIST_PARAM_ICON_THUMBNAIL1 \
+      ) \
+   )
+
+#define GENLIST_PART_ICON_CHECK_RADIO_L(NAME, LEFT) \
+   GENLIST_PART_ICON(NAME, \
+      GENLIST_DESCRIPTION_L(LEFT, \
+         GENLIST_PARAM_ICON_CHECK_RADIO \
+      ) \
+   )
+
+#define GENLIST_PART_ICON_STAR_RTB(NAME, RIGHT, TOP, BOTTOM) \
+   GENLIST_PART_ICON(NAME, \
+      GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
+         GENLIST_PARAM_ICON_STAR \
+         fixed: 1 1; \
+      ) \
+   )
+
+/*****************************************************************************/
+/******************************* Genlist IMAGE ********************************/
+/*****************************************************************************/
+#define GENLIST_PART_IMAGE(NAME, DESCRIPION) \
+   part { name: NAME; \
+      scale: 1; \
+      type: IMAGE; \
+      DESCRIPION \
+      GENLIST_DESCRIPTION_FADEOUT \
+   }
+
+#define GENLIST_PARAM_PASSWORD_IMAGE \
+            min: GENLIST_ICON_PASSWORD_SIZE GENLIST_ICON_PASSWORD_SIZE; \
+            max: GENLIST_ICON_PASSWORD_SIZE GENLIST_ICON_PASSWORD_SIZE; \
+            image.normal: "00_search_edit_field_bg_02.png"; \
+            image.border: 4 4 4 4; \
+            image.border_scale: 1;
+
+/*****************************************************************************/
+/******************************* Genlist Bubble ********************************/
+/*****************************************************************************/
+#define GENLIST_PARAM_BUBBLE \
+   image { \
+      normal: "00_list_bubble_bg.png"; \
+      border: 8 8 0 0; \
+   } \
+   rel1.offset: -10 0; \
+   rel2.offset: 10 0;
+
+#define GENLIST_PART_BUBBLE(TEXT_NAME) \
+         GENLIST_PART_IMAGE("elm.bubble", \
+            GENLIST_DESCRIPTION_ENVELOP(TEXT_NAME, \
+               GENLIST_PARAM_BUBBLE \
+               min: 48 38; \
+               max: -1 38; \
+               fixed: 0 1;) \
+            GENLIST_DESCRIPTION_FADEOUT \
+         )
+
+#define GENLIST_IMAGES_EXPANDABLE_BTN \
+         images { \
+            image: "00_button_expand_closed.png" COMP; \
+            image: "00_button_expand_opened.png" COMP; \
+         }
+
+#define GENLIST_PART_EXPANDABLE_ARROW \
+         GENLIST_PART_ICON("touch_arrow", \
+            ignore_flags: ON_HOLD; \
+            GENLIST_DESCRIPTION_ENVELOP("arrow", ) \
+            GENLIST_DESCRIPTION_FADEOUT \
+         ) \
+         GENLIST_PART_IMAGE("arrow", \
+            ignore_flags: ON_HOLD; \
+            mouse_events: 0; \
+            GENLIST_DESCRIPTION_R("elm.padding.right", \
+               fixed: 1 1; \
+               min: 74 74; \
+               max: 74 74; \
+               image.normal: "00_button_expand_closed.png"; \
+            ) \
+            description { state: "active" 0.0; \
+               inherit: "default" 0.0; \
+               image.normal: "00_button_expand_opened.png"; \
+            } \
+            GENLIST_DESCRIPTION_FADEOUT \
+         )
+/*****************************************************************************/
+/******************************* Genlist RECT ********************************/
+/*****************************************************************************/
+#define GENLIST_PART_SPACER(NAME, DESCRIPION) \
+    part { name: NAME; \
+      scale: 1; \
+      mouse_events: 0; \
+      type: SPACER; \
+      DESCRIPION \
+   }
+
+#define GENLIST_PART_RECT(NAME, DESCRIPION) \
+    part { name: NAME; \
+      scale: 1; \
+      type: RECT; \
+      DESCRIPION \
+      GENLIST_DESCRIPTION_FADEOUT_RECT \
+   }
+
+#define GENLIST_PART_INDEX_LINE(LEFT, RIGHT, TOP, BOTTOM) \
+         GENLIST_PART_RECT("index_line", \
+            GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
+               color: GENLIST_GROUPINDEX_LINE_COLOR; \
+               min: 0 4; \
+               max: -1 4;) \
+            description { state: "selected" 0.0; \
+               inherit: "default" 0.0; \
+               color: GENLIST_GROUPINDEX_LINE_FOCUS_COLOR; \
+            } \
+         )
+
+/*****************************************************************************/
+/******************************* Genlist TEXT ********************************/
+/*****************************************************************************/
+#define GENLIST_PART_TEXT(NAME, DESCRIPION) \
+    part { name: NAME; \
+      scale: 1; \
+      mouse_events: 0; \
+      type: TEXT; \
+      DESCRIPION \
+      GENLIST_DESCRIPTION_FADEOUT \
+   }
+
+#define GENLIST_PART_TEXTBLOCK(NAME, DESCRIPION) \
+    part { name: NAME; \
+      scale: 1; \
+      mouse_events: 0; \
+      type: TEXTBLOCK; \
+      DESCRIPION \
+      GENLIST_DESCRIPTION_FADEOUT \
+   }
+
+/*************************** parameters **********************************/
+#define GENLIST_PARAM_TEXT_LIMIT_RB \
+   rel1.to_x: "base"; /* This limits text growing. */\
+   rel1.relative: 0.5 0; /* This limits text growing. */\
+   text.max: 1 0; /* This limits text growing. */
+
+#define GENLIST_PARAM_TEXT_LIMIT_RT \
+   rel1.to_x: "base"; /* This limits text growing. */\
+   rel1.relative: 0.5 1; /* This limits text growing. */\
+   text.max: 1 0; /* This limits text growing. */
+
+// Group Index
+#define GENLIST_PARAM_INDEX_LIST \
+   color: GENLIST_GROUPINDEX_LIST_COLOR; \
+   text { \
+      align: 0 0.5; \
+      min: 0 1; \
+      font: "SLP:style=Bold"; \
+      size: GENLIST_GROUPINDEX_LIST_SIZE; \
+      text_class: "list_item"; \
+   }
+
+// Group Title
+#define GENLIST_PARAM_DIALOGUE_GROUP_TITLE \
+   color: GENLIST_DIALOGUE_GROUP_TITLE_COLOR; \
+   text { \
+      align: 0.0 0.5; \
+      min: 0 1; \
+      font: "SLP:style=Bold"; \
+      size: GENLIST_DIALOGUE_GROUP_TITLE_SIZE; \
+      text_class: "list_item"; \
+   }
+
+// Password style
+#define GENLIST_PARAM_PASSWORD_TITLE \
+   color: DIALOGUE_PASSWORD_TITLE_COLOR; \
+   text { \
+      font: "SLP:style=Bold"; \
+      size: DIALOGUE_PASSWORD_TITLE_SIZE; \
+      min: 0 1; \
+      align: 0 0.5; \
+      text_class: "list_item"; \
+   }
+
+// list main text
+#define GENLIST_PARAM_LISTITEM \
+   color: GENLIST_LIST_MAIN_TEXT_UNREAD_COLOR; \
+   text { \
+      align: 0 0.5; \
+      min: 0 1; \
+      font: "SLP:style=Regular"; \
+      size: GENLIST_LIST_MAIN_TEXT_SIZE; \
+      text_class: "list_item"; \
+   }
+
+#define GENLIST_PARAM_LISTITEM_TB \
+   text { \
+      min: 0 1; \
+      style: "genlist_style_list_main_text_unread"; \
+   }
+
+#define GENLIST_PARAM_LISTITEM_TB_WRAP \
+   text { \
+      min: 0 1; \
+      style: "genlist_style_list_main_text_unread_wrap"; \
+   }
+
+// list subtext
+#define GENLIST_PARAM_SUBITEM_DEFAULT \
+   color: GENLIST_LIST_SUB_TEXT_DEFAULT_COLOR; \
+   text { \
+      align: 0 0.5; \
+      min: 0 1; \
+      font: "SLP:style=Medium"; \
+      size: GENLIST_LIST_SUB_TEXT_SIZE; \
+      text_class: "slp"; \
+   }
+
+#define GENLIST_PARAM_SUBITEM_SETTINGS \
+   color: GENLIST_LIST_SUB_TEXT_SETTINGS_COLOR; \
+   text { \
+      align: 0 0.5; \
+      min: 0 1; \
+      font: "SLP:style=Medium"; \
+      size: GENLIST_LIST_SUB_TEXT_SIZE; \
+      text_class: "slp"; \
+   }
+
+#define GENLIST_PARAM_SUBITEM_DEFAULT_TB \
+   text { \
+      min: 0 1; \
+      style: "genlist_style_list_sub_text_default"; \
+   }
+
+#define GENLIST_PARAM_SUBITEM_DEFAULT_TB_WRAP \
+   text { \
+      min: 0 1; \
+      style: "genlist_style_list_sub_text_default_wrap"; \
+   }
+
+#define GENLIST_PARAM_SUBITEM_SETTINGS_TB \
+   text { \
+      min: 0 1; \
+      style: "genlist_style_list_sub_text_settings"; \
+   }
+
+#define GENLIST_PARAM_APPS_NAME\
+   color: GENLIST_APPS_NAME_COLOR; \
+   text { \
+      align: 0 0.5; \
+      min: 0 1; \
+      font: "SLP:style=Bold"; \
+      size: GENLIST_APPS_NAME_SIZE; \
+      text_class: "list_item"; \
+   }
+
+#define GENLIST_PARAM_APPS_INC\
+   color: GENLIST_APPS_INC_COLOR; \
+   text { \
+      align: 0 0.5; \
+      min: 0 1; \
+      font: "SLP:style=Bold"; \
+      size: GENLIST_APPS_INC_SIZE; \
+      text_class: "list_item"; \
+   }
+
+#define GENLIST_PARAM_APPS_RATING\
+   color: GENLIST_APPS_RATING_COLOR; \
+   text { \
+      align: 0 0.5; \
+      min: 0 1; \
+      font: "SLP:style=Bold"; \
+      size: GENLIST_APPS_RATING_SIZE; \
+      text_class: "list_item"; \
+   }
+
+#define GENLIST_PARAM_APPS_PRICE\
+   color: GENLIST_APPS_PRICE_ORIGINAL_COLOR; \
+   text { \
+      align: 0 0.5; \
+      min: 0 1; \
+      font: "SLP:style=Bold"; \
+      size: GENLIST_APPS_PRICE_SIZE; \
+      text_class: "list_item"; \
+   }
+
+#define GENLIST_PARAM_APPS_PRICE_SALE\
+   color: GENLIST_APPS_PRICE_SALE_COLOR; \
+   text { \
+      align: 0 0.5; \
+      min: 0 1; \
+      font: "SLP:style=Bold"; \
+      size: GENLIST_APPS_PRICE_SIZE; \
+      text_class: "list_item"; \
+   }
+
+#define GENLIST_PARAM_CONTENTS_TEXT \
+   color: GENLIST_CONTENTS_TEXT_COLOR; \
+   text { \
+      align: 0 0.5; \
+      min: 0 1; \
+      font: "SLP:style=Regular"; \
+      size: GENLIST_CONTENTS_TEXT_SIZE; \
+      text_class: "slp"; \
+   }
+
+/*************************** Descriptions **********************************/
+// group index
+#define GENLIST_DESCRIPTION_INDEX_LIST \
+   description { state: "selected" 0.0; \
+      inherit: "default" 0.0; \
+      color: GENLIST_GROUPINDEX_LIST_FOCUS_COLOR; \
+   }
+
+// list main text
+#define GENLIST_DESCRIPTION_LISTITEM_OTHERS \
+   description { state: "disabled" 0.0; \
+      inherit: "default" 0.0; \
+      color: GENLIST_LIST_MAIN_TEXT_UNREAD_DIM_COLOR; \
+   } \
+   description { state: "read" 0.0; \
+      inherit: "default" 0.0; \
+      color: GENLIST_LIST_MAIN_TEXT_READ_COLOR; \
+   } \
+   description { state: "read,disabled" 0.0; \
+      inherit: "default" 0.0; \
+      color: GENLIST_LIST_MAIN_TEXT_READ_DIM_COLOR; \
+   } \
+   description { state: "selected" 0.0; \
+      inherit: "default" 0.0; \
+      color: GENLIST_LIST_MAIN_TEXT_FOCUS_COLOR; \
+   }
+
+#define GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
+   description { state: "disabled" 0.0; \
+      inherit: "default" 0.0; \
+      text.style: "genlist_style_list_main_text_unread_dim"; \
+   } \
+   description { state: "read" 0.0; \
+      inherit: "default" 0.0; \
+      text.style: "genlist_style_list_main_text_read"; \
+   } \
+   description { state: "read,disabled" 0.0; \
+      inherit: "default" 0.0; \
+      text.style: "genlist_style_list_main_text_read_dim"; \
+   } \
+   description { state: "selected" 0.0; \
+      inherit: "default" 0.0; \
+      text.style: "genlist_style_list_main_text_focus"; \
+   }
+
+// list sub text
+#define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
+   description { state: "disabled" 0.0; \
+      inherit: "default" 0.0; \
+      color: GENLIST_LIST_SUB_TEXT_DEFAULT_DIM_COLOR; \
+   } \
+   description { state: "selected" 0.0; \
+      inherit: "default" 0.0; \
+      color: GENLIST_LIST_SUB_TEXT_FOCUS_COLOR; \
+   }
+
+#define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
+   description { state: "disabled" 0.0; \
+      inherit: "default" 0.0; \
+      text.style: "genlist_style_list_sub_text_default_dim"; \
+   } \
+   description { state: "selected" 0.0; \
+      inherit: "default" 0.0; \
+      text.style: "genlist_style_list_sub_text_focus"; \
+   }
+
+#define GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB_WRAP \
+   description { state: "disabled" 0.0; \
+      inherit: "default" 0.0; \
+      text.style: "genlist_style_list_sub_text_default_dim_wrap"; \
+   } \
+   description { state: "selected" 0.0; \
+      inherit: "default" 0.0; \
+      text.style: "genlist_style_list_sub_text_focus_wrap"; \
+   }
+
+#define GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS \
+   description { state: "disabled" 0.0; \
+      inherit: "default" 0.0; \
+      color: GENLIST_LIST_SUB_TEXT_SETTINGS_DIM_COLOR; \
+   } \
+   description { state: "selected" 0.0; \
+      inherit: "default" 0.0; \
+      color: GENLIST_LIST_SUB_TEXT_FOCUS_COLOR; \
+   }
+
+#define GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS_TB \
+   description { state: "disabled" 0.0; \
+      inherit: "default" 0.0; \
+      text.style: "genlist_style_list_sub_text_settings_dim"; \
+   } \
+   description { state: "selected" 0.0; \
+      inherit: "default" 0.0; \
+      text.style: "genlist_style_list_sub_text_focus"; \
+   }
+
+// list main text multiline
+#define GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB_WRAP \
+   description { state: "disabled" 0.0; \
+      inherit: "default" 0.0; \
+      text.style: "genlist_style_list_main_text_unread_dim_wrap"; \
+   } \
+   description { state: "selected" 0.0; \
+      inherit: "default" 0.0; \
+      text.style: "genlist_style_list_main_text_focus_wrap"; \
+   }
+
+/*************************** Parts **********************************/
+#define GENLIST_PART_DIALOGUE_GROUP_HELP_TEXT(NAME, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
+   GENLIST_PART_TEXTBLOCK(NAME, \
+      GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
+         text { \
+            min: 0 1; \
+            style: "genlist_style_dialogue_group_help_text"; \
+         } \
+         PARAM) \
+   )
+
+#define GENLIST_PART_LISTITEM(NAME, DESCRIPTION) \
+   GENLIST_PART_TEXT(NAME, \
+      DESCRIPTION \
+      GENLIST_DESCRIPTION_LISTITEM_OTHERS \
+   )
+
+#define GENLIST_PART_LISTITEM_TB(NAME, DESCRIPTION) \
+   GENLIST_PART_TEXTBLOCK(NAME, \
+      DESCRIPTION \
+      GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
+   )
+
+#define GENLIST_PART_LISTITEM_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
+   GENLIST_PART_TEXT(NAME, \
+      GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
+         min: 0 HEIGHT; \
+         GENLIST_PARAM_LISTITEM \
+         PARAM \
+      ) \
+      GENLIST_DESCRIPTION_LISTITEM_OTHERS \
+   )
+
+#define GENLIST_PART_LISTITEM_TB_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
+   GENLIST_PART_TEXTBLOCK(NAME, \
+      GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
+         min: 0 HEIGHT; \
+         GENLIST_PARAM_LISTITEM_TB \
+         PARAM \
+      ) \
+      GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
+   )
+
+#define GENLIST_PART_LISTITEM_LR(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
+   GENLIST_PART_TEXT(NAME, \
+      GENLIST_DESCRIPTION_LR(LEFT, RIGHT, \
+         min: 0 HEIGHT; \
+         GENLIST_PARAM_LISTITEM \
+         PARAM \
+      ) \
+      GENLIST_DESCRIPTION_LISTITEM_OTHERS \
+   )
+
+#define GENLIST_PART_LISTITEM_LRT_TB(NAME, HEIGHT, LEFT, RIGHT, TOP, PARAM) \
+   GENLIST_PART_TEXTBLOCK(NAME, \
+      GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
+         min: 0 HEIGHT; \
+         GENLIST_PARAM_LISTITEM_TB \
+         PARAM \
+      ) \
+      GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
+   )
+
+#define GENLIST_PART_LISTITEM_LR_TB(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
+   GENLIST_PART_TEXTBLOCK(NAME, \
+      GENLIST_DESCRIPTION_LR(LEFT, RIGHT, \
+         min: 0 HEIGHT; \
+         GENLIST_PARAM_LISTITEM_TB \
+         PARAM \
+      ) \
+      GENLIST_DESCRIPTION_LISTITEM_OTHERS_TB \
+   )
+
+#define GENLIST_PART_SUBITEM_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM, PARAM) \
+   GENLIST_PART_TEXT(NAME, \
+      GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
+         GENLIST_PARAM_SUBITEM_DEFAULT \
+         PARAM \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
+   )
+
+#define GENLIST_PART_SUBITEM(NAME, DESCRIPTION) \
+   GENLIST_PART_TEXT(NAME, \
+      DESCRIPTION \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
+   )
+
+#define GENLIST_PART_SUBITEM_DEFAULT_TB(NAME, DESCRIPTION) \
+   GENLIST_PART_TEXTBLOCK(NAME, \
+      DESCRIPTION \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
+   )
+
+#define GENLIST_PART_SUBITEM_R(NAME, HEIGHT, RIGHT) \
+   GENLIST_PART_TEXT(NAME, \
+      GENLIST_DESCRIPTION_R(RIGHT, \
+         min: 0 HEIGHT; \
+         GENLIST_PARAM_TEXT_LIMIT_RB \
+         GENLIST_PARAM_SUBITEM_DEFAULT \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
+   )
+
+#define GENLIST_PART_SUBITEM_RB(NAME, HEIGHT, RIGHT, BOTTOM) \
+   GENLIST_PART_TEXT(NAME, \
+      GENLIST_DESCRIPTION_RB(RIGHT, BOTTOM, \
+         min: 0 HEIGHT; \
+         fixed: 1 1; \
+         GENLIST_PARAM_TEXT_LIMIT_RB \
+         GENLIST_PARAM_SUBITEM_DEFAULT \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
+   )
+
+#define GENLIST_PART_SUBITEM_RB_TB(NAME, HEIGHT, RIGHT, BOTTOM) \
+   GENLIST_PART_TEXTBLOCK(NAME, \
+      GENLIST_DESCRIPTION_RB(RIGHT, BOTTOM, \
+         min: 0 HEIGHT; \
+         GENLIST_PARAM_TEXT_LIMIT_RB \
+         fixed: 1 1; \
+         GENLIST_PARAM_SUBITEM_DEFAULT_TB \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
+   )
+
+#define GENLIST_PART_SUBITEM_TB_(NAME, HEIGHT, LEFT, RIGHT, TOP, BOTTOM) \
+   GENLIST_PART_TEXTBLOCK(NAME, \
+      GENLIST_DESCRIPTION(LEFT, RIGHT, TOP, BOTTOM, \
+         GENLIST_PARAM_SUBITEM_DEFAULT_TB \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
+   )
+
+#define GENLIST_PART_SUBITEM_R_FIXED(NAME, WIDTH, HEIGHT, RIGHT) \
+   GENLIST_PART_TEXT(NAME, \
+      GENLIST_DESCRIPTION_R(RIGHT, \
+         min: WIDTH HEIGHT; \
+         fixed: 1 1; \
+         GENLIST_PARAM_SUBITEM_DEFAULT \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
+   )
+
+#define GENLIST_PART_SUBITEM_R_FIXED_TB(NAME, WIDTH, HEIGHT, RIGHT) \
+   GENLIST_PART_TEXTBLOCK(NAME, \
+       GENLIST_DESCRIPTION_R(RIGHT, \
+         min: WIDTH HEIGHT; \
+         fixed: 1 0; \
+         GENLIST_PARAM_SUBITEM_DEFAULT_TB \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
+   )
+
+#define GENLIST_PART_SUBITEM_L_FIXED(NAME, WIDTH, HEIGHT, LEFT) \
+   GENLIST_PART_TEXT(NAME, \
+      GENLIST_DESCRIPTION_L(LEFT, \
+         min: WIDTH HEIGHT; \
+         fixed: 1 1; \
+         GENLIST_PARAM_SUBITEM_DEFAULT \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
+   )
+
+#define GENLIST_PART_SUBITEM_LR(NAME, HEIGHT, LEFT, RIGHT, PARAM) \
+   GENLIST_PART_TEXT(NAME, \
+      GENLIST_DESCRIPTION_LR(LEFT, RIGHT, \
+         min: 0 HEIGHT; \
+         GENLIST_PARAM_SUBITEM_DEFAULT \
+         PARAM \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
+   )
+
+#define GENLIST_PART_SUBITEM_LR_TB(NAME, HEIGHT, LEFT, RIGHT) \
+   GENLIST_PART_TEXTBLOCK(NAME, \
+      GENLIST_DESCRIPTION_LR(LEFT, RIGHT, \
+         min: 0 HEIGHT; \
+         GENLIST_PARAM_SUBITEM_DEFAULT_TB \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
+   )
+
+#define GENLIST_PART_SUBITEM_LB(NAME, HEIGHT, LEFT, RIGHT) \
+   GENLIST_PART_TEXT(NAME, \
+      GENLIST_DESCRIPTION_LB(LEFT, BOTTOM, \
+         min: 0 HEIGHT; \
+         GENLIST_PARAM_SUBITEM_DEFAULT_TB \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
+   )
+
+#define GENLIST_PART_SUBITEM_LRB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
+   GENLIST_PART_TEXT(NAME, \
+      GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
+         min: 0 HEIGHT; \
+         fixed: 1 1; /*FIXME: why text need this, but textblock doesn't */ \
+         GENLIST_PARAM_SUBITEM_DEFAULT \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
+   )
+
+#define GENLIST_PART_SUBITEM_LRB_LIMIT(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
+   GENLIST_PART_TEXT(NAME, \
+      GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
+         min: 0 HEIGHT; \
+         fixed: 1 1; /*FIXME: why text need this, but textblock doesn't */ \
+         GENLIST_PARAM_SUBITEM_DEFAULT \
+         fixed: 1 1; align: 0 1; text.max: 1 0;  // This limits text growing. \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
+   )
+
+#define GENLIST_PART_SUBITEM_SETTINGS_LRB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM, PARAM) \
+   GENLIST_PART_TEXT(NAME, \
+      GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
+         min: 0 HEIGHT; \
+         fixed: 1 1; /*FIXME: why text need this, but textblock doesn't */ \
+         GENLIST_PARAM_SUBITEM_SETTINGS\
+         PARAM; \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS \
+   )
+
+#define GENLIST_PART_SUBITEM_LRB_TB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
+   GENLIST_PART_TEXTBLOCK(NAME, \
+      GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
+         min: 0 HEIGHT; \
+         fixed: 1 1; /*FIXME: why text need this, but textblock doesn't */ \
+         GENLIST_PARAM_SUBITEM_DEFAULT_TB \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
+   )
+
+#define GENLIST_PART_SUBITEM_SETTINGS_LRB_TB(NAME, HEIGHT, LEFT, RIGHT, BOTTOM) \
+   GENLIST_PART_TEXTBLOCK(NAME, \
+      GENLIST_DESCRIPTION_LRB(LEFT, RIGHT, BOTTOM, \
+         min: 0 HEIGHT; \
+         GENLIST_PARAM_SUBITEM_SETTINGS_TB \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_SETTINGS_OTHERS_TB \
+   )
+
+#define GENLIST_PART_SUBITEM_LRT(NAME, HEIGHT, LEFT, RIGHT, TOP) \
+   GENLIST_PART_TEXT(NAME, \
+      GENLIST_DESCRIPTION_LRT(LEFT, RIGHT, TOP, \
+         min: 0 HEIGHT; \
+         fixed: 1 1; /*FIXME: why text need this, but textblock doesn't */ \
+         GENLIST_PARAM_SUBITEM_DEFAULT \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
+   )
+
+#define GENLIST_PART_SUBITEM_LTB(NAME, HEIGHT, LEFT, TOP, BOTTOM) \
+   GENLIST_PART_TEXT(NAME, \
+      GENLIST_DESCRIPTION_LTB(LEFT, TOP, BOTTOM, \
+         min: 0 HEIGHT; \
+         fixed: 1 1; /*FIXME: why text need this, but textblock doesn't */ \
+         GENLIST_PARAM_SUBITEM_DEFAULT \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
+   )
+
+#define GENLIST_PART_SUBITEM_RTB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
+   GENLIST_PART_TEXT(NAME, \
+      GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
+         min: 0 HEIGHT; \
+         GENLIST_PARAM_TEXT_LIMIT_RT \
+         GENLIST_PARAM_SUBITEM_DEFAULT \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS \
+   )
+
+#define GENLIST_PART_SUBITEM_RTB_TB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
+   GENLIST_PART_TEXTBLOCK(NAME, \
+      GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
+         min: 0 HEIGHT; \
+         GENLIST_PARAM_TEXT_LIMIT_RT \
+         GENLIST_PARAM_SUBITEM_DEFAULT_TB \
+      ) \
+      GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB \
+   )
+
+#define GENLIST_PARAM_LIST_BUBBLE_TEXT \
+   color: GENLIST_LIST_BUBBLE_TEXT_COLOR; \
+   text { \
+      align: 1 0.5; \
+      min: 0 1; \
+      font: "SLP:style=Bold"; \
+      size: GENLIST_LIST_BUBBLE_TEXT_SIZE; \
+      text_class: "slp"; \
+   }
+
+#define GENLIST_PART_LIST_BUBBLE_TEXT_RTB(NAME, HEIGHT, RIGHT, TOP, BOTTOM) \
+   GENLIST_PART_TEXT(NAME, \
+      GENLIST_DESCRIPTION_RTB(RIGHT, TOP, BOTTOM, \
+         min: 0 HEIGHT; \
+         GENLIST_PARAM_TEXT_LIMIT_RT \
+         GENLIST_PARAM_LIST_BUBBLE_TEXT \
+      ) \
+   )
+
+#if 0
+#define GENLIST_PART_BASE__( param_item_height ) \
+         part { name: "base"; \
+            type: RECT; \
+            repeat_events: 1; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               min: 0 param_item_height; \
+               color: LAYOUT_GROUP_LIST_BG_COLOR_INC; \
+            } \
+         }
+
+#define GENLIST_PART_BG \
+         part { name: "bg"; \
+            type: RECT; \
+            mouse_events: 0; \
+            description { state: "default" 0.0; \
+               color: GENLIST_PART_DIALOGUE_GROUP_BG_COLOR; \
+            } \
+            description { state: "hide" 0.0; \
+               inherit: "default" 0.0; \
+               rel1 { relative: 0.025 0.0; } \
+               rel2 { relative: 1.025 1.0; } \
+            } \
+            description { state: "hide" 0.1;  \
+               inherit: "default" 0.0; \
+               rel1 { relative: 0.13 0.0; } \
+               rel2 { relative: 1.13 1.0; } \
+            } \
+            description { state: "hide" 0.2; \
+               inherit: "default" 0.0; \
+               rel1 { relative: 0.5 0.0; } \
+               rel2 { relative: 1.5 1.0; } \
+            } \
+            description { state: "hide" 0.3; \
+               inherit: "default" 0.0; \
+               rel1 { relative: 1.0 0.0; } \
+               rel2 { relative: 2.0 1.0; } \
+            } \
+         }
+
+/******************************************************************************/
+/** ETC
+/******************************************************************************/
+// FIXME: UX do not define selected state. But I thinkt that it is neededs :(
+
+#define GENLIST_PROOGRAM_EXPAND(SRC, TARGET) \
+   program { \
+      name: "expand"; \
+      signal: "mouse,clicked,1"; \
+      source: SRC; \
+      action: SIGNAL_EMIT "elm,action,expand,toggle" "elm"; \
+   } \
+   program { \
+      name: "go_expanded"; \
+      signal: "elm,state,expanded"; \
+      source: "elm"; \
+      action: STATE_SET "active" 0.0; \
+      TARGET \
+   } \
+   program { \
+      name: "go_contracted"; \
+      signal: "elm,state,contracted"; \
+      source: "elm"; \
+      action: STATE_SET "default" 0.0; \
+      TARGET \
+   }
+
+#define GENLIST_PART_BASE_LIST_H( HEIGHT) \
+         part { name: "base"; \
+            type: RECT; \
+            repeat_events: 1; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               align: 0.5 0.5; \
+               color: 0 0 0 0; \
+               rel2.relative: 1 0; \
+               rel2.to: "bottom_line"; \
+               min: 0 HEIGHT; \
+            } \
+         } \
+         GENLIST_PART_BOTTOM_LINE
+
+#define GENLIST_PART_DIALOGUE_ITEM \
+         part { name: "elm.rect.dialogue"; \
+            type: RECT; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               min: 10 0; \
+               fixed: 1 0; \
+               color: GENLIST_DIALOGUE_GROUP_LEFT_BG_COLOR_INC; \
+               rel2.relative: 0.0 1.0; \
+               align: 0.0 0.0; \
+            } \
+         }
+
+#define GENLIST_PART_DIALOGUE_RIGHT_LINE \
+         part { name: "elm.rect.dialogue.right.line"; \
+            type: RECT; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               min: 1 0; \
+               fixed: 1 0; \
+               rel1 { \
+                  relative: 1.0  0.0; \
+                  offset: -1 0; \
+               } \
+               align: 1.0 0.0; \
+               color: GENLIST_LIST_LINE1_COLOR; \
+            } \
+         }
 
 #define GENLIST_PROGRAM_FLIP_1TEXT \
-         program { name: "flip_enabled"; \
-                signal: "elm,state,flip,enabled"; \
-                source: "elm"; \
-                action: STATE_SET "flip_enabled" 0.0; \
-                target: "elm.text"; \
-                target: "elm.flip.content"; \
-         } \
-         program { name: "flip_disabled"; \
-                signal: "elm,state,flip,disabled"; \
-                source: "elm"; \
-                action: STATE_SET "default" 0.0; \
-                target: "elm.text"; \
-                target: "elm.flip.content"; \
-         }
-
-#define GENLIST_PROGRAM_FLIP_1TEXT_1ICON \
-         program { name: "flip_enabled"; \
-                signal: "elm,state,flip,enabled"; \
-                source: "elm"; \
-                action: STATE_SET "flip_enabled" 0.0; \
-                target: "elm.text"; \
-                target: "elm.icon"; \
-                target: "elm.flip.content"; \
-         } \
-         program { name: "flip_disabled"; \
-                signal: "elm,state,flip,disabled"; \
-                source: "elm"; \
-                action: STATE_SET "default" 0.0; \
-                target: "elm.text"; \
-                target: "elm.icon"; \
-                target: "elm.flip.content"; \
-         }
-
-#define GENLIST_PROGRAM_FLIP_1TEXT_2ICON \
-         program { name: "flip_enabled"; \
-                signal: "elm,state,flip,enabled"; \
-                source: "elm"; \
-                action: STATE_SET "flip_enabled" 0.0; \
-                target: "elm.text"; \
-                target: "elm.icon.1"; \
-                target: "elm.icon.2"; \
-                target: "elm.flip.content"; \
-         } \
-         program { name: "flip_disabled"; \
-                signal: "elm,state,flip,disabled"; \
-                source: "elm"; \
-                action: STATE_SET "default" 0.0; \
-                target: "elm.text"; \
-                target: "elm.icon.1"; \
-                target: "elm.icon.2"; \
-                target: "elm.flip.content"; \
-         }
-
-#define GENLIST_PROGRAM_FLIP_1TEXT_3ICON \
-         program { name: "flip_enabled"; \
-                signal: "elm,state,flip,enabled"; \
-                source: "elm"; \
-                action: STATE_SET "flip_enabled" 0.0; \
-                target: "elm.text"; \
-                target: "elm.icon.1"; \
-                target: "elm.icon.2"; \
-                target: "elm.icon.3"; \
-                target: "elm.flip.content"; \
-         } \
-         program { name: "flip_disabled"; \
-                signal: "elm,state,flip,disabled"; \
-                source: "elm"; \
-                action: STATE_SET "default" 0.0; \
-                target: "elm.text"; \
-                target: "elm.icon.1"; \
-                target: "elm.icon.2"; \
-                target: "elm.icon.3"; \
-                target: "elm.flip.content"; \
-         }
+         program { name: "flip_enabled"; \
+            signal: "elm,state,flip,enabled"; \
+            source: "elm"; \
+            action: STATE_SET "flip_enabled" 0.0; \
+            target: "elm.text"; \
+            target: "elm.flip.content"; \
+         } \
+         program { name: "flip_disabled"; \
+            signal: "elm,state,flip,disabled"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "elm.text"; \
+            target: "elm.flip.content"; \
+         }
 
 #define GENLIST_PROGRAM_FLIP_2TEXT \
-         program { name: "flip_enabled"; \
-                signal: "elm,state,flip,enabled"; \
-                source: "elm"; \
-                action: STATE_SET "flip_enabled" 0.0; \
-                target: "elm.text.1"; \
-                target: "elm.text.2"; \
-                target: "elm.flip.content"; \
-         } \
-         program { name: "flip_disabled"; \
-                signal: "elm,state,flip,disabled"; \
-                source: "elm"; \
-                action: STATE_SET "default" 0.0; \
-                target: "elm.text.1"; \
-                target: "elm.text.2"; \
-                target: "elm.flip.content"; \
-         }
+         program { name: "flip_enabled"; \
+            signal: "elm,state,flip,enabled"; \
+            source: "elm"; \
+            action: STATE_SET "flip_enabled" 0.0; \
+            target: "elm.text.1"; \
+            target: "elm.text.2"; \
+            target: "elm.flip.content"; \
+         } \
+         program { name: "flip_disabled"; \
+            signal: "elm,state,flip,disabled"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "elm.text.1"; \
+            target: "elm.text.2"; \
+            target: "elm.flip.content"; \
+         }
 
 #define GENLIST_PROGRAM_FLIP_2TEXT_1ICON \
-         program { name: "flip_enabled"; \
-                signal: "elm,state,flip,enabled"; \
-                source: "elm"; \
-                action: STATE_SET "flip_enabled" 0.0; \
-                target: "elm.text.1"; \
-                target: "elm.text.2"; \
-                target: "elm.icon"; \
-                target: "elm.flip.content"; \
-         } \
-         program { name: "flip_disabled"; \
-                signal: "elm,state,flip,disabled"; \
-                source: "elm"; \
-                action: STATE_SET "default" 0.0; \
-                target: "elm.text.1"; \
-                target: "elm.text.2"; \
-                target: "elm.icon"; \
-                target: "elm.flip.content"; \
-         }
+         program { name: "flip_enabled"; \
+            signal: "elm,state,flip,enabled"; \
+            source: "elm"; \
+            action: STATE_SET "flip_enabled" 0.0; \
+            target: "elm.text.1"; \
+            target: "elm.text.2"; \
+            target: "elm.icon"; \
+            target: "elm.flip.content"; \
+         } \
+         program { name: "flip_disabled"; \
+            signal: "elm,state,flip,disabled"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "elm.text.1"; \
+            target: "elm.text.2"; \
+            target: "elm.icon"; \
+            target: "elm.flip.content"; \
+         }
 
 #define GENLIST_PROGRAM_FLIP_2TEXT_2ICON \
-         program { name: "flip_enabled"; \
-                signal: "elm,state,flip,enabled"; \
-                source: "elm"; \
-                action: STATE_SET "flip_enabled" 0.0; \
-                target: "elm.text.1"; \
-                target: "elm.text.2"; \
-                target: "elm.icon.1"; \
-                target: "elm.icon.2"; \
-                target: "elm.flip.content"; \
-         } \
-         program { name: "flip_disabled"; \
-                signal: "elm,state,flip,disabled"; \
-                source: "elm"; \
-                action: STATE_SET "default" 0.0; \
-                 target: "elm.text.1"; \
-                target: "elm.text.2"; \
-                target: "elm.icon.1"; \
-                target: "elm.icon.2"; \
-                target: "elm.flip.content"; \
-         }
-
-#define GENLIST_PROGRAM_FLIP_2TEXT_3ICON \
-         program { name: "flip_enabled"; \
-                signal: "elm,state,flip,enabled"; \
-                source: "elm"; \
-                action: STATE_SET "flip_enabled" 0.0; \
-                target: "elm.text.1"; \
-                target: "elm.text.2"; \
-                target: "elm.icon.1"; \
-                target: "elm.icon.2"; \
-                target: "elm.icon.3"; \
-                target: "elm.flip.content"; \
-         } \
-         program { name: "flip_disabled"; \
-                signal: "elm,state,flip,disabled"; \
-                source: "elm"; \
-                action: STATE_SET "default" 0.0; \
-                target: "elm.text.1"; \
-                target: "elm.text.2"; \
-                target: "elm.icon.1"; \
-                target: "elm.icon.2"; \
-                target: "elm.icon.3"; \
-                target: "elm.flip.content"; \
-         }
-
-#define GENLIST_PROGRAM_FLIP_3TEXT \
-         program { name: "flip_enabled"; \
-                signal: "elm,state,flip,enabled"; \
-                source: "elm"; \
-                action: STATE_SET "flip_enabled" 0.0; \
-                target: "elm.text.1"; \
-                target: "elm.text.2"; \
-                target: "elm.text.3"; \
-                target: "elm.flip.content"; \
-         } \
-         program { name: "flip_disabled"; \
-                signal: "elm,state,flip,disabled"; \
-                source: "elm"; \
-                action: STATE_SET "default" 0.0; \
-                target: "elm.text.1"; \
-                target: "elm.text.2"; \
-                target: "elm.text.3"; \
-                target: "elm.flip.content"; \
-         }
-
-#define GENLIST_PROGRAM_FLIP_3TEXT_1ICON \
-         program { name: "flip_enabled"; \
-                signal: "elm,state,flip,enabled"; \
-                source: "elm"; \
-                action: STATE_SET "flip_enabled" 0.0; \
-                target: "elm.text.1"; \
-                target: "elm.text.2"; \
-                target: "elm.text.3"; \
-                target: "elm.icon"; \
-                target: "elm.flip.content"; \
-         } \
-         program { name: "flip_disabled"; \
-                signal: "elm,state,flip,disabled"; \
-                source: "elm"; \
-                action: STATE_SET "default" 0.0; \
-                target: "elm.text.1"; \
-                target: "elm.text.2"; \
-                target: "elm.text.3"; \
-                target: "elm.icon"; \
-                target: "elm.flip.content"; \
-         }
+         program { name: "flip_enabled"; \
+            signal: "elm,state,flip,enabled"; \
+            source: "elm"; \
+            action: STATE_SET "flip_enabled" 0.0; \
+            target: "elm.text.1"; \
+            target: "elm.text.2"; \
+            target: "elm.icon.1"; \
+            target: "elm.icon.2"; \
+            target: "elm.flip.content"; \
+         } \
+         program { name: "flip_disabled"; \
+            signal: "elm,state,flip,disabled"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+             target: "elm.text.1"; \
+            target: "elm.text.2"; \
+            target: "elm.icon.1"; \
+            target: "elm.icon.2"; \
+            target: "elm.flip.content"; \
+         }
 
 #define GENLIST_PROGRAM_FLIP_3TEXT_2ICON \
-         program { name: "flip_enabled"; \
-                signal: "elm,state,flip,enabled"; \
-                source: "elm"; \
-                action: STATE_SET "flip_enabled" 0.0; \
-                target: "elm.text.1"; \
-                target: "elm.text.2"; \
-                target: "elm.text.3"; \
-                target: "elm.icon.1"; \
-                target: "elm.icon.2"; \
-                target: "elm.flip.content"; \
-         } \
-         program { name: "flip_disabled"; \
-                signal: "elm,state,flip,disabled"; \
-                source: "elm"; \
-                action: STATE_SET "default" 0.0; \
-                target: "elm.text.1"; \
-                target: "elm.text.2"; \
-                target: "elm.text.3"; \
-                target: "elm.icon.1"; \
-                target: "elm.icon.2"; \
-                target: "elm.flip.content"; \
-         }
-
-#define GENLIST_PROGRAM_FLIP_3TEXT_3ICON \
-         program { name: "flip_enabled"; \
-                signal: "elm,state,flip,enabled"; \
-                source: "elm"; \
-                action: STATE_SET "flip_enabled" 0.0; \
-                target: "elm.text.1"; \
-                target: "elm.text.2"; \
-                target: "elm.text.3"; \
-                target: "elm.icon.1"; \
-                target: "elm.icon.2"; \
-                target: "elm.icon.3"; \
-                target: "elm.flip.content"; \
-         } \
-         program { name: "flip_disabled"; \
-                signal: "elm,state,flip,disabled"; \
-                source: "elm"; \
-                action: STATE_SET "default" 0.0; \
-                target: "elm.text.1"; \
-                target: "elm.text.2"; \
-                target: "elm.text.3"; \
-                target: "elm.icon.1"; \
-                target: "elm.icon.2"; \
-                target: "elm.icon.3"; \
-                target: "elm.flip.content"; \
-         }
+         program { name: "flip_enabled"; \
+            signal: "elm,state,flip,enabled"; \
+            source: "elm"; \
+            action: STATE_SET "flip_enabled" 0.0; \
+            target: "elm.text.1"; \
+            target: "elm.text.2"; \
+            target: "elm.text.3"; \
+            target: "elm.icon.1"; \
+            target: "elm.icon.2"; \
+            target: "elm.flip.content"; \
+         } \
+         program { name: "flip_disabled"; \
+            signal: "elm,state,flip,disabled"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "elm.text.1"; \
+            target: "elm.text.2"; \
+            target: "elm.text.3"; \
+            target: "elm.icon.1"; \
+            target: "elm.icon.2"; \
+            target: "elm.flip.content"; \
+         }
+
+
+#define GENLIST_DESCRIPTION_INVISIBLE_SELECTED \
+            description { state: "selected" 1.0; \
+               inherit: "default" 0.0; \
+               visible: 0; \
+            }
+
+#define GENLIST_DESCRIPTION_FLIP_ENABLED \
+            description { state: "flip_enabled" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 0; \
+            }
+
+#define GENLIST_PROGRAM_SCRIPT_FLIP_SELECT_1TEXT \
+            script { \
+               new st[31]; \
+               new Float:vl; \
+               get_state(PART:"elm.text", st, 30, vl); \
+               set_state(PART:"bg_image", "selected", 0.0); \
+               if (!strcmp(st, "flip_enabled")) \
+                  set_state(PART:"elm.text", "selected", 1.0); \
+               else \
+                  set_state(PART:"elm.text", "selected", 0.0); \
+            }
+
+
+/* genlist multisense macro - start */
+#define GENLIST_PROGRAM_AFTER_PLAY_BUTTON_PRESS \
+            after: "play_button_press";
+
+#define GENLIST_PROGRAM_PLAY_BUTTON_PRESS \
+         program { name: "play_button_press"; \
+            action: PLAY_SAMPLE "button-pressed" 1.0; \
+         }
+#endif
 
old mode 100755 (executable)
new mode 100644 (file)
index 30cbb6a..0f45fa6
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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.
+ */
 
 /* hd_inc */
 
old mode 100755 (executable)
new mode 100644 (file)
index fd0b4c9..36abe9f
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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.
+ */
 
-group { name: "elm/genlist/item/ivug/2text.2/default";
+// -------------------------------------------------------------------
+// 1 line -------------------------------------------------------
+// -------------------------------------------------------------------
+// 2.2.2.1
+   group { name: "elm/genlist/item/ivug/2text.2/default";
       alias: "elm/genlist/item_odd/ivug/2text.2/default";
       alias: "elm/genlist/item_compress/ivug/2text.2/default";
       alias: "elm/genlist/item_compress_odd/ivug/2text.2/default";
-      data.item: "stacking" "above";
-      data.item: "selectraise" "on";
+
+      GENLIST_DATA_ITEM_NORMAL
       data.item: "texts" "elm.text.1 elm.text.2";
-      data.item: "renames" "elm.edit.rename";
-      images {
-         //image: "00_list_bar_press_1x80.png" COMP;
-      }
+      data.item: "contents" "elm.icon.edit";
+
       parts {
-         GENLIST_PART_BASE( GENLIST_HEIGHT_72_INC )
          GENLIST_PART_BG_IMAGE
+         GENLIST_PART_BASE
          GENLIST_PART_BOTTOM_LINE
-         GENLIST_PART_PADDING_TOP( GENLIST_PADDING_8_INC )
-         GENLIST_PART_PADDING_BOTTOM( GENLIST_PADDING_8_INC )
-         GENLIST_PART_PADDING_LEFT( GENLIST_PADDING_10_INC )
-         GENLIST_PART_PADDING_RIGHT( GENLIST_PADDING_10_INC )
-         part { name: "elm.text.1";
-            clip_to: "disclip";
-            type: TEXT;
-            mouse_events: 0;
-            scale: 1;
-            description { state: "default" 0.0;
-               min: 0 GENLIST_SIZE_26_INC;
-               fixed: 0 1;
-               rel1 {
-                  relative: 1.0 1.0;
-                  to_x: "elm.padding.left";
-                  to_y: "elm.padding.top";
-               }
-               rel2 {
-                  relative: 0.0 1.0;
-                  to_x: "elm.padding.right";
-                  to_y: "elm.padding.top";
-               }
-               align: 0.0 0.0;
-               color: GENLIST_PART_FONT_LIST_MAIN_TEXT_UNREAD_COLOR_INC;
-               text {
-                  font: "SLP:style=Roman";
-                  size: GENLIST_FONT_20_INC;
-                  min: 0 1;
-                  align: 0.0 0.5;
-                  text_class: "slp_roman";
-               }
-            }
-            description { state: "selected" 0.0;
-               inherit: "default" 0.0;
-               color: GENLIST_PART_TEXT_PRESS_COLOR_INC;
-            }
-            GENLIST_DESCRIPTION_FLIP_ENABLED
-         }
-         part { name: "elm.text.2";
-            clip_to: "disclip";
-            type: TEXT;
-            mouse_events: 0;
-            scale: 1;
-            description { state: "default" 0.0;
-               rel1 {
-                  relative: 1.0 1.0;
-                  to_x: "elm.padding.left";
-                  to_y: "elm.text.1";
-               }
-               rel2 {
-                  relative: 0.0 0.0;
-                  to_x: "elm.padding.right";
-                  to_y: "elm.padding.bottom";
-               }
-               align: 0.0 0.0;
-               color: GENLIST_PART_FONT_LIST_SUB_TEXT_COLOR_INC;
-               text {
-                  font: "SLP:style=Medium";
-                  size: GENLIST_FONT_28_INC;
-                  min: 0 1;
-                  align: 0.0 0.5;
-                  text_class: "slp_medium";
-               }
-            }
-            description { state: "selected" 0.0;
-               inherit: "default" 0.0;
-               color: GENLIST_PART_TEXT_PRESS_COLOR_INC;
-            }
-            GENLIST_DESCRIPTION_FLIP_ENABLED
-         }
+         GENLIST_PART_PADDING_LEFT
+         GENLIST_PART_PADDING_RIGHT
+         GENLIST_PART_PADDING_TOP_2LINE
+         GENLIST_PART_PADDING_BOTTOM_2LINE
+
+         GENLIST_PART_LISTITEM_("elm.text.1", GENLIST_HEIGHT_2LINE_MAIN,
+            "elm.padding.left", "elm.padding.right",
+            "elm.padding.top", "elm.text.2",
+         )
+         GENLIST_PART_SUBITEM_LRB("elm.text.2", GENLIST_HEIGHT_2LINE_SUB,
+            "elm.padding.left", "elm.padding.right", "elm.padding.bottom")
          GENLIST_PART_FLIP
-         GENLIST_PART_DISCLIP
-      }
-      programs {
-         // signal: elm,state,%s,active
-         //   a "check" item named %s went active
-         // signal: elm,state,%s,passive
-         //   a "check" item named %s went passive
-         // default is passive
-         program { name: "go_active";
-            signal: "elm,state,selected";
-            source: "elm";
-            action: STATE_SET "selected" 0.0;
-            target: "bg_image";
-            target: "elm.text.1";
-            target: "elm.text.2";
-         }
-         program { name: "go_passive";
-            signal: "elm,state,unselected";
-            source: "elm";
-            action: STATE_SET "default" 0.0;
-            target: "bg_image";
-            target: "elm.text.1";
-            target: "elm.text.2";
-            transition: LINEAR 0.1;
-         }
-         program { name: "go_disabled";
-            signal: "elm,state,disabled";
-            source: "elm";
-            action: STATE_SET "disabled" 0.0;
-            target: "disclip";
-         }
-         program { name: "go_enabled";
-            signal: "elm,state,enabled";
-            source: "elm";
-            action: STATE_SET "default" 0.0;
-            target: "disclip";
-         }
-         GENLIST_PROGRAM_FLIP_2TEXT
       }
+      GENLIST_PROGRAMS_NORMAL( target: "elm.text.1"; target: "elm.text.2"; )
    }
 
-  group { name: "elm/genlist/item_compress/ivug/multiline/2text.1icon/default";
-      alias: "elm/genlist/item_compress_odd/ivug/multiline/2text.1icon/default";
-      data.item: "stacking" "above";
-      data.item: "selectraise" "on";
+// 2.2.2.1 (textblock)
+   group { name: "elm/genlist/item/ivug/2text.2.tb/default";
+      alias: "elm/genlist/item_odd/ivug/2text.2.tb/default";
+      alias: "elm/genlist/item_compress/ivug/2text.2.tb/default";
+      alias: "elm/genlist/item_compress_odd/ivug/2text.2.tb/default";
+
+      GENLIST_DATA_ITEM_NORMAL
       data.item: "texts" "elm.text.1 elm.text.2";
-      data.item: "contents" "elm.icon";
+      data.item: "contents" "elm.icon.edit";
+
       parts {
-         part { name: "base";
-            type: RECT;
-            repeat_events: 1;
-            description { state: "default" 0.0;
-               color: GENLIST_PART_BG_COLOR_INC;
-            }
-         }
          GENLIST_PART_BG_IMAGE
+         GENLIST_PART_BASE
          GENLIST_PART_BOTTOM_LINE
-         GENLIST_PART_PADDING_TOP( GENLIST_PADDING_8_INC )
-         GENLIST_PART_PADDING_BOTTOM( GENLIST_PADDING_8_INC )
-         GENLIST_PART_PADDING_LEFT( GENLIST_PADDING_10_INC )
-         GENLIST_PART_PADDING_RIGHT( GENLIST_PADDING_10_INC )
-         part { name: "elm.text.1";
-            clip_to: "disclip";
-            type: TEXT;
-            mouse_events: 0;
-            scale: 1;
-            description { state: "default" 0.0;
-               min: 0 GENLIST_SIZE_26_INC;
-               fixed: 0 1;
-               rel1 {
-                  relative: 1.0 1.0;
-                  to_x: "elm.padding.left";
-                  to_y: "elm.padding.top";
-               }
-               rel2 {
-                  relative: 0.0 1.0;
-                  to_x: "elm.padding.icon.left";
-                  to_y: "elm.padding.top";
-               }
-               align: 0.0 0.0;
-               color: 160 160 160 255; //GENLIST_PART_FONT_LIST_MAIN_TEXT_UNREAD_COLOR_INC;
-               text {
-                  font: "SLP:style=Roman";
-                  size: GENLIST_FONT_32_INC;
-                  min: 0 1;
-                  align: 0.0 0.5;
-                  text_class: "list_item";
-               }
-            }
-            description { state: "selected" 0.0;
-               inherit: "default" 0.0;
-               color: GENLIST_PART_TEXT_PRESS_COLOR_INC;
-            }
-         }
-         part { name: "elm.icon";
-            clip_to: "disclip";
-            type: SWALLOW;
-            scale: 1;
-            description { state: "default" 0.0;
-               fixed: 1 1;
-               rel1 {
-                  relative: 0.0 1.0;
-                  to_x: "elm.padding.right";
-                  to_y: "elm.padding.top";
-               }
-               rel2 {
-                  relative: 0.0 0.0;
-                  to_x: "elm.padding.right";
-                  to_y: "elm.padding.bottom";
-               }
-               align: 1.0 0.5;
-            }
-            GENLIST_DESCRIPTION_FLIP_ENABLED
-         }
-         part { name: "elm.padding.icon.left";
-            clip_to: "disclip";
-            type: RECT;
-            scale: 1;
-            description { state: "default" 0.0;
-               min: GENLIST_PADDING_16_INC 0;
-               fixed: 1 0;
-               rel1.to_x: "elm.icon";
-               rel2 {
-                  relative: 0.0 1.0;
-                  to_x: "elm.icon";
-               }
-               align: 1.0 0.0;
-               visible: 0;
-            }
-         }
-         part { name: "elm.text.2";
-            clip_to: "disclip";
-            type: TEXTBLOCK;
-            mouse_events: 0;
-            scale: 1;
-            description { state: "default" 0.0;
-               rel1 {
-                  relative: 1.0 1.0;
-                  to_x: "elm.padding.left";
-                  to_y: "elm.text.1";
-               }
-               rel2 {
-                  relative: 0.0 0.0;
-                  to_x: "elm.padding.icon.left";
-                  to_y: "elm.padding.bottom";
-               }
-               text {
-                  style: "genlist_textblock_sub_style";
-                  min: 0 1;
-                  align: 0.0 0.5;
-               }
-            }
-            description { state: "selected" 0.0;
-               inherit: "default" 0.0;
-               text.style: "genlist_textblock_sub_selected_style";
-            }
-         }
-         GENLIST_PART_DISCLIP
+         GENLIST_PART_PADDING_LEFT
+         GENLIST_PART_PADDING_RIGHT
+         GENLIST_PART_PADDING_TOP_2LINE
+         GENLIST_PART_PADDING_BOTTOM_2LINE
+
+         GENLIST_PART_LISTITEM_TB_("elm.text.1", GENLIST_HEIGHT_2LINE_MAIN,
+            "elm.padding.left", "elm.padding.right",
+            "elm.padding.top", "elm.text.2",
+         )
+         GENLIST_PART_SUBITEM_LRB_TB("elm.text.2", GENLIST_HEIGHT_2LINE_SUB,
+            "elm.padding.left", "elm.padding.right", "elm.padding.bottom"
+         )
+         GENLIST_PART_FLIP
       }
-      programs {
-         // signal: elm,state,%s,active
-         //   a "check" item named %s went active
-         // signal: elm,state,%s,passive
-         //   a "check" item named %s went passive
-         // default is passive
-         program { name: "go_active";
-            signal: "elm,state,selected";
-            source: "elm";
-            action: STATE_SET "selected" 0.0;
-            target: "bg_image";
-            target: "elm.text.1";
-            target: "elm.text.2";
-         }
-         program { name: "go_passive";
-            signal: "elm,state,unselected";
-            source: "elm";
-            action: STATE_SET "default" 0.0;
-            target: "bg_image";
-            target: "elm.text.1";
-            target: "elm.text.2";
-            transition: LINEAR 0.1;
-         }
-         program { name: "go_disabled";
-            signal: "elm,state,disabled";
-            source: "elm";
-            action: STATE_SET "disabled" 0.0;
-            target: "disclip";
-         }
-         program { name: "go_enabled";
-            signal: "elm,state,enabled";
-            source: "elm";
-            action: STATE_SET "default" 0.0;
-            target: "disclip";
-         }
+      GENLIST_PROGRAMS_NORMAL( target: "elm.text.1"; target: "elm.text.2"; )
+   }
+
+  // 2.2.2.4
+        group { name: "elm/genlist/item/ivug/multiline/2text.5icon/default";
+      alias: "elm/genlist/item_odd/ivug/multiline/2ext.5icon/default";
+      alias: "elm/genlist/item_compress/ivug/multiline/2text.5icon/default";
+      alias: "elm/genlist/item_compress_odd/ivug/multiline/2text.5icon/default";
+      // FIXME: deprecated name, wiil be removed
+      alias: "elm/genlist/item/multiline/2text.1icon/default";
+      alias: "elm/genlist/item_odd/multiline/2ext.1icon/default";
+      alias: "elm/genlist/item_compress/multiline/2text.1icon/default";
+      alias: "elm/genlist/item_compress_odd/multiline/2text.1icon/default";
+
+      GENLIST_DATA_ITEM_NORMAL
+      data.item: "texts" "elm.text.1 elm.text.2";
+      data.item: "contents" "elm.icon.1 elm.icon.2 elm.icon.3 elm.icon.4 elm.icon.5 elm.icon.edit";
+
+      parts {
+         GENLIST_PART_BG_IMAGE
+         GENLIST_PART_BASE
+         GENLIST_PART_BOTTOM_LINE
+         GENLIST_PART_PADDING_LEFT
+         GENLIST_PART_PADDING_RIGHT
+         GENLIST_PART_PADDING_TOP_SIZE( 16 )
+         GENLIST_PART_PADDING_BOTTOM_SIZE( 16 )
+
+         GENLIST_PART_LISTITEM("elm.text.1",
+            GENLIST_DESCRIPTION_LRT("elm.padding.left", "elm.padding.icon5.left", "elm.padding.top",
+               GENLIST_PARAM_LISTITEM
+               min: 0 GENLIST_HEIGHT_2LINE_MAIN; )
+            GENLIST_DESCRIPTION_LISTITEM_OTHERS
+         )
+         GENLIST_PART_PADDING_R("elm.padding.icon5.left", "elm.icon.5")
+         GENLIST_PART_ICON_STAR_RTB("elm.icon.5",
+            "elm.icon.4", "elm.padding.top", "elm.text.2")
+         GENLIST_PART_ICON_STAR_RTB("elm.icon.4",
+            "elm.icon.3", "elm.padding.top", "elm.text.2")
+         GENLIST_PART_ICON_STAR_RTB("elm.icon.3",
+            "elm.icon.2", "elm.padding.top", "elm.text.2")
+         GENLIST_PART_ICON_STAR_RTB("elm.icon.2",
+            "elm.icon.1", "elm.padding.top", "elm.text.2")
+         GENLIST_PART_ICON_STAR_RTB("elm.icon.1",
+            "elm.padding.right", "elm.padding.top", "elm.text.2")
+
+
+         GENLIST_PART_PADDING_T_SIZE("elm.padding.text1.bottom", "elm.text.1", 16)
+         GENLIST_PART_TEXTBLOCK("elm.text.2",
+            GENLIST_DESCRIPTION("elm.padding.left", "elm.padding.right", "elm.padding.text1.bottom", "elm.padding.bottom",
+            GENLIST_PARAM_SUBITEM_DEFAULT_TB_WRAP
+            min: 0 GENLIST_HEIGHT_MULTILINE_SUB; )
+            GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB_WRAP
+         )
+         GENLIST_PART_FLIP
       }
+      GENLIST_PROGRAMS_NORMAL( target: "elm.text.1"; target: "elm.text.2"; )
    }
 
-   group { name: "elm/genlist/item_compress/ivug/multiline/2text/default";
+
+   // 2.2.4.3
+         group { name: "elm/genlist/item/ivug/multiline/2text/default";
+      alias: "elm/genlist/item_odd/ivug/multiline/2ext/default";
+      alias: "elm/genlist/item_compress/ivug/multiline/2text/default";
       alias: "elm/genlist/item_compress_odd/ivug/multiline/2text/default";
-      alias: "elm/genlist/item_compress/ivug/multiline.2text/default";
-      alias: "elm/genlist/item_compress_odd/ivug/multiline.2text/default";
-      data.item: "stacking" "above";
-      data.item: "selectraise" "on";
+
+      GENLIST_DATA_ITEM_NORMAL
       data.item: "texts" "elm.text.1 elm.text.2";
+      data.item: "contents" "elm.icon.edit";
+
       parts {
-         part { name: "base";
-            type: RECT;
-            repeat_events: 1;
-            description { state: "default" 0.0;
-               color: GENLIST_PART_BG_COLOR_INC;
-            }
-         }
          GENLIST_PART_BG_IMAGE
+         GENLIST_PART_BASE
          GENLIST_PART_BOTTOM_LINE
-         GENLIST_PART_PADDING_TOP( GENLIST_PADDING_8_INC )
-         GENLIST_PART_PADDING_BOTTOM( GENLIST_PADDING_8_INC )
-         GENLIST_PART_PADDING_LEFT( GENLIST_PADDING_10_INC )
-         GENLIST_PART_PADDING_RIGHT( GENLIST_PADDING_10_INC )
-         part { name: "elm.text.1";
-            clip_to: "disclip";
-            type: TEXT;
-            mouse_events: 0;
-            scale: 1;
-            description { state: "default" 0.0;
-               min: 0 GENLIST_SIZE_26_INC;
-               fixed: 0 1;
-               rel1 {
-                  relative: 1.0 1.0;
-                  to_x: "elm.padding.left";
-                  to_y: "elm.padding.top";
-               }
-               rel2 {
-                  relative: 0.0 1.0;
-                  to_x: "elm.padding.right";
-                  to_y: "elm.padding.top";
-               }
-               align: 0.0 0.0;
-               color: 160 160 160 255; //GENLIST_PART_FONT_LIST_MAIN_TEXT_UNREAD_COLOR_INC;
-               text {
-                  font: "SLP:style=Roman";
-                  size: GENLIST_FONT_32_INC;
-                  min: 0 1;
-                  align: 0.0 0.5;
-                  text_class: "list_item";
-               }
-            }
-            description { state: "selected" 0.0;
-               inherit: "default" 0.0;
-               color: GENLIST_PART_TEXT_PRESS_COLOR_INC;
-            }
-         }
-         part { name: "elm.text.2";
-            clip_to: "disclip";
-            type: TEXTBLOCK;
-            mouse_events: 0;
-            scale: 1;
-            description { state: "default" 0.0;
-               rel1 {
-                  relative: 1.0 1.0;
-                  to_x: "elm.padding.left";
-                  to_y: "elm.text.1";
-               }
-               rel2 {
-                  relative: 0.0 0.0;
-                  to_x: "elm.padding.right";
-                  to_y: "elm.padding.bottom";
-               }
-               text {
-                  style: "genlist_textblock_sub_style";
-                  min: 0 1;
-                  align: 0.0 0.5;
-               }
-            }
-            description { state: "selected" 0.0;
-               inherit: "default" 0.0;
-               text.style: "genlist_textblock_sub_selected_style";
-            }
-         }
-         GENLIST_PART_DISCLIP
-      }
-      programs {
-         // signal: elm,state,%s,active
-         //   a "check" item named %s went active
-         // signal: elm,state,%s,passive
-         //   a "check" item named %s went passive
-         // default is passive
-         program { name: "go_active";
-            signal: "elm,state,selected";
-            source: "elm";
-            action: STATE_SET "selected" 0.0;
-            target: "bg_image";
-            target: "elm.text.1";
-            target: "elm.text.2";
-         }
-         program { name: "go_passive";
-            signal: "elm,state,unselected";
-            source: "elm";
-            action: STATE_SET "default" 0.0;
-            target: "bg_image";
-            target: "elm.text.1";
-            target: "elm.text.2";
-            transition: LINEAR 0.1;
-         }
-         program { name: "go_disabled";
-            signal: "elm,state,disabled";
-            source: "elm";
-            action: STATE_SET "disabled" 0.0;
-            target: "disclip";
-         }
-         program { name: "go_enabled";
-            signal: "elm,state,enabled";
-            source: "elm";
-            action: STATE_SET "default" 0.0;
-            target: "disclip";
-         }
+         GENLIST_PART_PADDING_LEFT
+         GENLIST_PART_PADDING_RIGHT
+         GENLIST_PART_PADDING_TOP_2LINE
+         GENLIST_PART_PADDING_BOTTOM_2LINE
+
+         GENLIST_PART_TEXT("elm.text.1",
+            GENLIST_DESCRIPTION_LRT("elm.padding.left", "elm.padding.right", "elm.padding.top",
+               GENLIST_PARAM_LISTITEM
+               min: 0 GENLIST_HEIGHT_2LINE_MAIN; )
+            GENLIST_DESCRIPTION_LISTITEM_OTHERS
+         )
+         GENLIST_PART_PADDING_T_SIZE("elm.padding.text1.bottom", "elm.text.1", 16)
+         GENLIST_PART_TEXTBLOCK("elm.text.2",
+            GENLIST_DESCRIPTION("elm.padding.left", "elm.padding.right", "elm.padding.text1.bottom", "elm.padding.bottom",
+               GENLIST_PARAM_SUBITEM_DEFAULT_TB_WRAP
+               min: 0 GENLIST_HEIGHT_MULTILINE_SUB; )
+            GENLIST_DESCRIPTION_SUBITEM_DEFAULT_OTHERS_TB_WRAP
+         )
+         GENLIST_PART_FLIP
       }
+      GENLIST_PROGRAMS_NORMAL( target: "elm.text.1"; target: "elm.text.2"; )
    }
 
old mode 100755 (executable)
new mode 100644 (file)
index cec6f45..894fd9c
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 TEXTBLOCK_TAG \
-          tag:  "br" "\n";\
-          tag:  "ps" "ps";\
-          tag:  "tab" "\t";\
-          tag:  "b" "+ font=SLP:style=Bold";\
-          tag:  "match" GENLIST_PART_MATCH_TAG_COLOR_INC;
 
- styles {
-       style { name: "text_style"; // TODO: remove this later
-          base: "font=SLP:style=Roman font_size=28 color=#000000 wrap=char ellipsis=1.0 text_class=slp_roman";
-          tag:  "br" "\n";
-          tag:  "ps" "ps";
-          tag:  "tab" "\t";
-          tag:  "b" "+ font=SLP:style=Bold";
-          tag:  "match" "+ color=#E58616FF";
-       }
-       style { name: "genlist_default_textblock_style";
-          base: "font=SLP:style=Roman font_size="GENLIST_FONT_STYLE_44_INC" color="GENLIST_PART_FONT_LIST_MAIN_TEXT_UNREAD_STYLE_COLOR_INC" text_class=slp_roman ellipsis=1.0";
-          TEXTBLOCK_TAG
-       }
-       style { name: "genlist_default_textblock_selected_style";
-          base: "font=SLP:style=Roman font_size="GENLIST_FONT_STYLE_44_INC" color="GENLIST_PART_TEXT_PRESS_STYLE_COLOR_INC" text_class=slp_roman ellipsis=1.0";
-          TEXTBLOCK_TAG
-       }
-       style { name: "genlist_sub_textblock_style";
-          base: "font=SLP:style=Medium font_size="GENLIST_FONT_STYLE_32_INC" color="GENLIST_PART_FONT_LIST_SUB_TEXT_STYLE_COLOR_INC" text_class=slp_medium ellipsis=1.0";
-          TEXTBLOCK_TAG
-       }
-       style { name: "genlist_sub_textblock_selected_style";
-          base: "font=SLP:style=Medium font_size="GENLIST_FONT_STYLE_32_INC" color="GENLIST_PART_TEXT_PRESS_STYLE_COLOR_INC" text_class=slp_medium ellipsis=1.0";
-          TEXTBLOCK_TAG
-       }
-       style { name: "genlist_multiline_textblock_style";
-          base: "font=SLP:style=Medium font_size="GENLIST_FONT_STYLE_32_INC" color="GENLIST_PART_FONT_MULTILINE_TEXT_STYLE_COLOR_INC" wrap=char text_class=slp_medium";
-          TEXTBLOCK_TAG
-       }
-       style { name: "genlist_multiline_textblock_selected_style";
-          base: "font=SLP:style=Medium font_size="GENLIST_FONT_STYLE_32_INC" color="GENLIST_PART_TEXT_PRESS_STYLE_COLOR_INC" wrap=char text_class=slp_medium";
-          TEXTBLOCK_TAG
-       }
-       style { name: "genlist_textblock_style";
-          base: "font=SLP:style=Roman font_size="GENLIST_FONT_STYLE_42_INC" color="GENLIST_PART_FONT_3LINE_MAIN_TEXT_UNREAD_STYLE_COLOR_INC" wrap=char text_class=slp_roman";
-          TEXTBLOCK_TAG
-       }
-       style { name: "genlist_textblock_selected_style";
-          base: "font=SLP:style=Roman font_size="GENLIST_FONT_STYLE_42_INC" color="GENLIST_PART_TEXT_PRESS_STYLE_COLOR_INC" wrap=char text_class=slp_roman";
-          TEXTBLOCK_TAG
-       }
-       style { name: "genlist_textblock_sub_style";
-          base: "font=SLP:style=Medium font_size="GENLIST_FONT_STYLE_36_INC" color="GENLIST_PART_FONT_3LINE_MAIN_TEXT_2_STYLE_COLOR_INC" wrap=char text_class=slp_medium";
-          TEXTBLOCK_TAG
-       }
-       style { name: "genlist_textblock_sub_selected_style";
-          base: "font=SLP:style=Medium font_size="GENLIST_FONT_STYLE_36_INC" color="GENLIST_PART_TEXT_PRESS_STYLE_COLOR_INC" wrap=char text_class=slp_medium";
-          TEXTBLOCK_TAG
-       }
-       style { name: "genlist_textblock_flexible_style";
-          base: "font=SLP:style=Roman font_size="GENLIST_FONT_STYLE_36_INC" color="GENLIST_PART_FONT_FLEXIBLE_TEXT_MAIN_STYLE_COLOR_INC" wrap=char text_class=slp_roman";//fixed by ivug
-          TEXTBLOCK_TAG
-       }
-       style { name: "genlist_textblock_flexible_selected_style";
-          base: "font=SLP:style=Roman font_size="GENLIST_FONT_STYLE_48_INC" color="GENLIST_PART_TEXT_PRESS_STYLE_COLOR_INC" wrap=char text_class=slp_roman";
-          TEXTBLOCK_TAG
-       }
-       style { name: "genlist_textblock_flexible_sub_style";
-          base: "font=SLP:style=Roman font_size="GENLIST_FONT_STYLE_36_INC" color="GENLIST_PART_FONT_FLEXIBLE_TEXT_SUB_STYLE_COLOR_INC" wrap=char text_class=slp_roman";
-          TEXTBLOCK_TAG
-       }
-       style { name: "genlist_textblock_flexible_sub_selected_style";
-          base: "font=SLP:style=Roman font_size="GENLIST_FONT_STYLE_36_INC" color="GENLIST_PART_TEXT_PRESS_STYLE_COLOR_INC" wrap=char text_class=slp_roman";
-          TEXTBLOCK_TAG
-       }
-       style { name: "genlist_textblock_help_style";
-          base: "font=SLP:style=Medium font_size="GENLIST_FONT_STYLE_32_INC" color="GENLIST_PART_FONT_HELP_TEXT_STYLE_COLOR_INC" wrap=mixed text_class=slp_medium";
-          TEXTBLOCK_TAG
-       }
+#define STYLE_TAG \
+      tag:  "br" "\n";\
+      tag:  "ps" "ps";\
+      tag:  "tab" "\t";\
+      tag:  "b" "+ font=SLP:style=Bold";\
+
+#define STYLE_TAG_MATCH \
+      tag:  "match" GENLIST_PART_MATCH_TAG_COLOR; \
+
+// FIXME: Why this is needed? just don't use match color, right? damn textblock bug...
+#define STYLE_TAG_MATCH_FOCUS \
+      tag:  "match" GENLIST_LIST_MAIN_TEXT_FOCUS_COLOR_STYLE; \
+
+
+styles {
+   // ********************** dialgoue group help text
+   style { name: "genlist_style_dialogue_group_help_text";
+      base: "font=SLP:style=Medium font_size="GENLIST_DIALOGUE_GROUP_HELP_TEXT_SIZE" color="GENLIST_DIALOGUE_GROUP_HELP_TEXT_COLOR_STYLE" text_class=list_item wrap=mixed";
+      STYLE_TAG
+      STYLE_TAG_MATCH
+   }
+   // ********************** list main text
+   style { name: "genlist_style_list_main_text_unread";
+      base: "font=SLP:style=Regular font_size="GENLIST_LIST_MAIN_TEXT_SIZE" color="GENLIST_LIST_MAIN_TEXT_UNREAD_COLOR_STYLE" text_class=list_item ellipsis=1.0";
+      STYLE_TAG
+      STYLE_TAG_MATCH
+   }
+   style { name: "genlist_style_list_main_text_unread_dim";
+      base: "font=SLP:style=Regular font_size="GENLIST_LIST_MAIN_TEXT_SIZE" color="GENLIST_LIST_MAIN_TEXT_UNREAD_DIM_COLOR_STYLE" text_class=list_item ellipsis=1.0";
+      STYLE_TAG
+      STYLE_TAG_MATCH
+   }
+   style { name: "genlist_style_list_main_text_read";
+      base: "font=SLP:style=Regular font_size="GENLIST_LIST_MAIN_TEXT_SIZE" color="GENLIST_LIST_MAIN_TEXT_READ_COLOR_STYLE" text_class=list_item ellipsis=1.0";
+      STYLE_TAG
+      STYLE_TAG_MATCH
+   }
+   style { name: "genlist_style_list_main_text_read_dim";
+      base: "font=SLP:style=Regular font_size="GENLIST_LIST_MAIN_TEXT_SIZE" color="GENLIST_LIST_MAIN_TEXT_READ_DIM_COLOR_STYLE" text_class=list_item ellipsis=1.0";
+      STYLE_TAG
+      STYLE_TAG_MATCH
+   }
+   style { name: "genlist_style_list_main_text_focus";
+      base: "font=SLP:style=Regular font_size="GENLIST_LIST_MAIN_TEXT_SIZE" color="GENLIST_LIST_MAIN_TEXT_FOCUS_COLOR_STYLE" text_class=list_item ellipsis=1.0";
+      STYLE_TAG
+      STYLE_TAG_MATCH_FOCUS
+   }
+  // **********************  list main text (multiline)
+   style { name: "genlist_style_list_main_text_unread_wrap";
+      base: "font=SLP:style=Regular font_size="GENLIST_LIST_MAIN_TEXT_SIZE" color="GENLIST_LIST_MAIN_TEXT_UNREAD_COLOR_STYLE" text_class=slp wrap=mixed";
+      STYLE_TAG
+      STYLE_TAG_MATCH
+   }
+   style { name: "genlist_style_list_main_text_unread_dim_wrap";
+      base: "font=SLP:style=Regular font_size="GENLIST_LIST_MAIN_TEXT_SIZE" color="GENLIST_LIST_MAIN_TEXT_UNREAD_DIM_COLOR_STYLE" text_class=slp wrap=mixed";
+      STYLE_TAG
+      STYLE_TAG_MATCH
+   }
+   style { name: "genlist_style_list_main_text_focus_wrap";
+      base: "font=SLP:style=Regular font_size="GENLIST_LIST_MAIN_TEXT_SIZE" color="GENLIST_LIST_MAIN_TEXT_FOCUS_COLOR_STYLE" text_class=slp wrap=mixed";
+      STYLE_TAG
+      STYLE_TAG_MATCH_FOCUS
+   }
+   // ********************** list sub text
+   style { name: "genlist_style_list_sub_text_default";
+      base: "font=SLP:style=Bold font_size="GENLIST_LIST_SUB_TEXT_SIZE" color="GENLIST_LIST_SUB_TEXT_DEFAULT_COLOR_STYLE" text_class=slp ellipsis=1.0";
+      STYLE_TAG
+      STYLE_TAG_MATCH
+   }
+   style { name: "genlist_style_list_sub_text_default_dim";
+      base: "font=SLP:style=Bold font_size="GENLIST_LIST_SUB_TEXT_SIZE" color="GENLIST_LIST_SUB_TEXT_DEFAULT_DIM_COLOR_STYLE" text_class=slp ellipsis=1.0";
+      STYLE_TAG
+      STYLE_TAG_MATCH_FOCUS
+   }
+   style { name: "genlist_style_list_sub_text_settings";
+      base: "font=SLP:style=Bold font_size="GENLIST_LIST_SUB_TEXT_SIZE" color="GENLIST_LIST_SUB_TEXT_SETTINGS_COLOR_STYLE" text_class=slp ellipsis=1.0";
+      STYLE_TAG
+      STYLE_TAG_MATCH
+   }
+   style { name: "genlist_style_list_sub_text_settings_dim";
+      base: "font=SLP:style=Bold font_size="GENLIST_LIST_SUB_TEXT_SIZE" color="GENLIST_LIST_SUB_TEXT_SETTINGS_DIM_COLOR_STYLE" text_class=slp ellipsis=1.0";
+      STYLE_TAG
+      STYLE_TAG_MATCH
+   }
+   style { name: "genlist_style_list_sub_text_focus";
+      base: "font=SLP:style=Bold font_size="GENLIST_LIST_SUB_TEXT_SIZE" color="GENLIST_LIST_SUB_TEXT_FOCUS_COLOR_STYLE" text_class=slp ellipsis=1.0";
+      STYLE_TAG
+      STYLE_TAG_MATCH_FOCUS
+   }
+   // ********************** list sub text (multiline)
+   style { name: "genlist_style_list_sub_text_default_wrap";
+      base: "font=SLP:style=Bold font_size="GENLIST_LIST_SUB_TEXT_SIZE" color="GENLIST_LIST_SUB_TEXT_DEFAULT_COLOR_STYLE" text_class=slp wrap=mixed";
+      STYLE_TAG
+      STYLE_TAG_MATCH
+   }
+   style { name: "genlist_style_list_sub_text_default_dim_wrap";
+      base: "font=SLP:style=Bold font_size="GENLIST_LIST_SUB_TEXT_SIZE" color="GENLIST_LIST_SUB_TEXT_DEFAULT_DIM_COLOR_STYLE" text_class=slp wrap=mixed";
+      STYLE_TAG
+      STYLE_TAG_MATCH
+   }
+   style { name: "genlist_style_list_sub_text_focus_wrap";
+      base: "font=SLP:style=Bold font_size="GENLIST_LIST_SUB_TEXT_SIZE" color="GENLIST_LIST_SUB_TEXT_FOCUS_COLOR_STYLE" text_class=slp wrap=mixed";
+      STYLE_TAG
+      STYLE_TAG_MATCH
+   }
 }
 
old mode 100755 (executable)
new mode 100644 (file)
index 3dd35f2..407c3a5
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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"
 
diff --git a/main/layout/icons/01_Header icon/01_header_icon_add.png b/main/layout/icons/01_Header icon/01_header_icon_add.png
deleted file mode 100755 (executable)
index 43c4984..0000000
Binary files a/main/layout/icons/01_Header icon/01_header_icon_add.png and /dev/null differ
diff --git a/main/layout/icons/01_Header icon/01_header_icon_edit.png b/main/layout/icons/01_Header icon/01_header_icon_edit.png
deleted file mode 100755 (executable)
index ea2535d..0000000
Binary files a/main/layout/icons/01_Header icon/01_header_icon_edit.png and /dev/null differ
diff --git a/main/layout/icons/01_Header icon/01_header_icon_others.png b/main/layout/icons/01_Header icon/01_header_icon_others.png
deleted file mode 100755 (executable)
index 4fc9dfa..0000000
Binary files a/main/layout/icons/01_Header icon/01_header_icon_others.png and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
similarity index 86%
rename from main/layout/icons/01_Header icon/01_header_icon_cancel.png
rename to main/layout/icons/T01_Facebook.png
index 4fb54c3..3312a7d
Binary files a/main/layout/icons/01_Header icon/01_header_icon_cancel.png and b/main/layout/icons/T01_Facebook.png differ
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/main/layout/images/00_zoom_in.png b/main/layout/images/00_zoom_in.png
deleted file mode 100755 (executable)
index 3685b2c..0000000
Binary files a/main/layout/images/00_zoom_in.png and /dev/null differ
diff --git a/main/layout/images/00_zoom_in_press.png b/main/layout/images/00_zoom_in_press.png
deleted file mode 100755 (executable)
index 2eb645f..0000000
Binary files a/main/layout/images/00_zoom_in_press.png and /dev/null differ
diff --git a/main/layout/images/00_zoom_out.png b/main/layout/images/00_zoom_out.png
deleted file mode 100755 (executable)
index 03e0e96..0000000
Binary files a/main/layout/images/00_zoom_out.png and /dev/null differ
diff --git a/main/layout/images/00_zoom_out_press.png b/main/layout/images/00_zoom_out_press.png
deleted file mode 100755 (executable)
index 7e29dc9..0000000
Binary files a/main/layout/images/00_zoom_out_press.png and /dev/null differ
diff --git a/main/layout/images/T01_btn_thumbnail_play.png b/main/layout/images/T01_btn_thumbnail_play.png
deleted file mode 100755 (executable)
index 2ea3599..0000000
Binary files a/main/layout/images/T01_btn_thumbnail_play.png and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
similarity index 95%
rename from main/layout/images/theme/white/00_winset_title_line.png
rename to main/layout/images/theme/white/00_winset_divider_line.png
index e287978..b10e249
Binary files a/main/layout/images/theme/white/00_winset_title_line.png and b/main/layout/images/theme/white/00_winset_divider_line.png differ
old mode 100755 (executable)
new mode 100644 (file)
index 3c2ec3e..ebdf04d
@@ -1,23 +1,37 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *       http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 
 collections {
        group {
                name: "ivug_base";
                parts {
+#if 1
+                       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;}
+                               }
+                       }
+#endif
+
                        part {
                                name: "clip";
                                type: RECT;
old mode 100755 (executable)
new mode 100644 (file)
index e77a470..1876b56
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-#include "ivug-theme.edc"\r
-\r
-#define MENU_VISIBLE 1\r
-#define MENU_INVISIBLE 0\r
-\r
-#define PROGRESSBAR_WIDTH      100\r
-#define PROGRESSBAR_HEIGHT     100\r
-\r
-collections {\r
-   group {\r
-               name: "crop_view";\r
-\r
-               /*script {\r
-                       public menu_state = MENU_VISIBLE;\r
-               }*/\r
-               parts{\r
-                       part {\r
-                               name: "bg";\r
-                               type: RECT;\r
-                               scale:1;\r
-                               description {\r
-                                       state: "default" 0.0;\r
-                                       color: 0 0 0 255;\r
-                                       rel1.relative: 0.0 0.0;\r
-                                       rel2.relative: 1.0 1.0;\r
-                               }\r
-                       }\r
-\r
-                       part{\r
-                               name: "photocam";\r
-                               type: SWALLOW;\r
-                               mouse_events: 1;\r
-                               repeat_events: 0;\r
-                               scale: 1; //allow scaling\r
-                               description {\r
-                                       state: "default" 0.0;\r
-                                       visible: 1;\r
-                                       rel1 { relative: 0 0; to:bg; }\r
-                                       rel2 { relative: 1 1; to:bg; }\r
-                               }\r
-                        }\r
-\r
-                        part{\r
-                                name: "thumbnail";\r
-                                type: SWALLOW;\r
-                                scale: 1; //allow scaling\r
-                                description {\r
-                                        state: "default" 0.0;\r
-                                        align: 0.5 0.5;\r
-                                        visible: 1;\r
-                                        rel1 { relative: 0 0; to:bg; }\r
-                                        rel2 { relative: 1 1; to:bg; }\r
-                                }\r
-                       }\r
-\r
-                       part{\r
-                                name: "progressbar";\r
-                                type: SWALLOW;\r
-                                scale: 1; //allow scaling\r
-                                description {\r
-                                        state: "default" 0.0;\r
-                                        min: PROGRESSBAR_WIDTH PROGRESSBAR_WIDTH;\r
-                                        max: PROGRESSBAR_WIDTH PROGRESSBAR_WIDTH;\r
-                                        fixed: 1 1;\r
-                                        visible: 1;\r
-                                        align: 0.5 0.5;\r
-                                        rel1 { relative: 0 0; to:photocam; }\r
-                                        rel2 { relative: 1 1; to:photocam; }\r
-                                }\r
-                       }\r
-\r
-                       part {\r
-                               name: "event";\r
-                               type: RECT;\r
-                               repeat_events: 1;\r
-                               mouse_events: 1;\r
-                               scale:1;\r
-                               description {\r
-                                       state: "default" 0.0;\r
-                                       color: 0 0 0 0;\r
-                                       visible: 1;\r
-                                       rel1.relative: 0.0 0.0;\r
-                                       rel2.relative: 1.0 1.0;\r
-                               }\r
-                       }\r
-\r
-                       part{\r
-                               name: "scissorbox";\r
-                               type: SWALLOW;\r
-                               mouse_events: 1;\r
-                               repeat_events: 0;\r
-                               scale: 1;\r
-                               description {\r
-                                       state: "default" 0.0;\r
-                                       visible: 1;\r
-                                       rel1 { relative: 0 0; to:bg; }\r
-                                       rel2 { relative: 1 1; to:bg; }\r
-                               }\r
-                        }\r
-               }\r
-       }\r
-}\r
-\r
-collections {\r
-#define BTN_SET_CALLER_IMAGE_WIDTH     86\r
-#define BTN_SET_CALLER_IMAGE_HEIGHT    86\r
-#if 1\r
-       group {\r
-               name: "crop_view_btn";\r
-\r
-               images {\r
-                       image: "00_winset_control_toolbar_bg.png" COMP;\r
-               }\r
-\r
-               parts{\r
-                       part {\r
-                               name: "base";\r
-                               type: RECT;\r
-                               scale:1;\r
-                               mouse_events: 1;\r
-                               repeat_events: 1;\r
-                               description {\r
-                                       state: "default" 0.0;\r
-                                       color: 0 0 0 0;\r
-                                       rel1.relative: 0.0 0.0;\r
-                                       rel2.relative: 1.0 1.0;\r
-                               }\r
-                       }\r
-                        part { name: "controlbar_bg";\r
-                   scale: 1;\r
-                   description { state: "default" 0.0;\r
-                      min: 0 CONTROLBAR_SMALL_HEIGHT_INC;\r
-                      max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;\r
-                      fixed: 0 1;\r
-                      align: 0.0 1.0;\r
-                      visible: 1;\r
-                      rel1 { to: "base"; }\r
-                      rel2 { to: "base"; }\r
-                      //image.normal: "00_winset_control_toolbar_bg.png";\r
-                   }\r
-                   description { state: "hide" 0.0;\r
-                      inherit: "default" 0.0;\r
-                      visible: 0;\r
-                   }\r
-                }\r
-                part { name: "controlbar_clip";\r
-                   type: RECT;\r
-                   mouse_events: 0;\r
-                   description { state: "default" 0.0;\r
-                      rel1.to: "controlbar_bg";\r
-                      rel2.to: "controlbar_bg";\r
-                      visible: 1;\r
-                   }\r
-                   description { state: "hide" 0.0;\r
-                      inherit: "default" 0.0;\r
-                      visible: 0;\r
-                   }\r
-                }\r
-                part { name: "elm.prev_btn_bg";\r
-                   type: RECT;\r
-                   scale: 1;\r
-                   clip_to: "controlbar_clip";\r
-                   description { state: "default" 0.0;\r
-                      min: 0 0;\r
-                      fixed: 1 0;\r
-                      align: 1.0 0.0;\r
-                      rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }\r
-                      rel2.to: "controlbar_bg";\r
-                      visible: 0;\r
-                   }\r
-                   description { state: "visible" 0.0;\r
-                      inherit: "default" 0.0;\r
-                      min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;\r
-                   }\r
-                }\r
-                part { name: "elm.swallow.prev_btn";\r
-                   type: SWALLOW;\r
-                   scale: 1;\r
-                   clip_to: "controlbar_clip";\r
-                   description { state: "default" 0.0;\r
-                      fixed: 1 1;\r
-                      align: 0.5 0.5;\r
-                      rel1.to: "elm.prev_btn_bg";\r
-                      rel2.to: "elm.prev_btn_bg";\r
-                   }\r
-                }\r
-                part { name: "controlbar";\r
-                   type: SWALLOW;\r
-                   scale: 1;\r
-                   clip_to: "controlbar_clip";\r
-                   description { state: "default" 0.0;\r
-                          fixed: 1 1;\r
-                      rel1.to: "controlbar_bg";\r
-                      rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }\r
-                      visible: 1;\r
-                   }\r
-                }\r
-               }\r
-\r
-               programs {\r
-\r
-                       program {\r
-                               name: "hide_menu";\r
-                               signal: "elm,state,hide";\r
-                               source: "event";\r
-                               action: STATE_SET "hide" 0.0;\r
-                               target: "controlbar_clip";\r
-                               target: "controlbar_bg";\r
-                       }\r
-\r
-                       program {\r
-                               name: "show_menu";\r
-                               signal: "elm,state,show";\r
-                               source: "event";\r
-                               action: STATE_SET "default" 0.0;\r
-                               target: "controlbar_clip";\r
-                               target: "controlbar_bg";\r
-                       }\r
-               }\r
-       }\r
-}\r
-\r
+/*
+ * 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 MENU_VISIBLE 1
+#define MENU_INVISIBLE 0
+
+#define PROGRESSBAR_WIDTH      100
+#define PROGRESSBAR_HEIGHT     100
+
+collections {
+   group {
+               name: "crop_view";
+
+               /*script {
+                       public menu_state = MENU_VISIBLE;
+               }*/
+               parts{
+                       part {
+                               name: "bg";
+                               type: RECT;
+                               scale:1;
+                               description {
+                                       state: "default" 0.0;
+                                       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;
+                                       visible: 1;
+                                       rel1 { relative: 0 0; to:bg; }
+                                       rel2 { relative: 1 1; to:bg; }
+                               }
+                        }
+
+                        part{
+                                name: "thumbnail";
+                                type: SWALLOW;
+                                scale: 1; //allow scaling
+                                description {
+                                        state: "default" 0.0;
+                                        align: 0.5 0.5;
+                                        visible: 1;
+                                        rel1 { relative: 0 0; to:bg; }
+                                        rel2 { relative: 1 1; to:bg; }
+                                }
+                       }
+
+                       part{
+                                name: "progressbar";
+                                type: SWALLOW;
+                                scale: 1; //allow scaling
+                                description {
+                                        state: "default" 0.0;
+                                        min: PROGRESSBAR_WIDTH PROGRESSBAR_WIDTH;
+                                        max: PROGRESSBAR_WIDTH PROGRESSBAR_WIDTH;
+                                        fixed: 1 1;
+                                        visible: 1;
+                                        align: 0.5 0.5;
+                                        rel1 { relative: 0 0; to:photocam; }
+                                        rel2 { relative: 1 1; to:photocam; }
+                                }
+                       }
+
+                       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: "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: "crop.contents";
+                               type: SWALLOW;
+                               scale: 1;
+                               repeat_events: 0;
+                               description { state: "default" 0.0;
+                                       color: 255 0 0 100;
+                                       align: 0.0 0.0;
+                                       rel1.relative: 0.0 0.0;
+                                       rel1.to_x: "bg";
+                                       rel1.to_y: "bg";
+                                       rel1.offset: 0 -10;
+                                       rel2.relative: 1.0 0.0;
+                                       rel2.to_x: "bg";
+                                       rel2.to_y: "toolbar_bg";
+                                       visible: 1;
+                               }
+                       }
+
+                       part { name: "toolbar_bg";
+                               type: RECT;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 0 NAVIFRAME_TOOLBAR_HEIGHT_INC;
+                                       max: 999999 NAVIFRAME_TOOLBAR_HEIGHT_INC;
+                                       fixed: 0 1;
+                                       align: 0.0 1.0;
+                                       visible: 0;
+                                       rel1 { to: "bg"; }
+                                       rel2 { to: "bg"; }
+                                       color: NAVIFRAME_TOOLBAR_BG_COLOR_INC;
+                               }
+                       }
+               }
+       }
+}
+
+collections {
+#define BTN_SET_CALLER_IMAGE_WIDTH     86
+#define BTN_SET_CALLER_IMAGE_HEIGHT    86
+#if 1
+       group {
+               name: "crop_view_btn";
+
+               images {
+                       image: "00_winset_control_toolbar_bg.png" COMP;
+               }
+
+               parts{
+                       part {
+                               name: "base";
+                               type: RECT;
+                               scale:1;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       color: 0 0 0 0;
+                                       rel1.relative: 0.0 0.0;
+                                       rel2.relative: 1.0 1.0;
+                               }
+                       }
+                        part { name: "controlbar_bg";
+                   scale: 1;
+                   description { state: "default" 0.0;
+                      min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+                      max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+                      fixed: 0 1;
+                      align: 0.0 1.0;
+                      visible: 1;
+                      rel1 { to: "base"; }
+                      rel2 { to: "base"; }
+                      //image.normal: "00_winset_control_toolbar_bg.png";
+                   }
+                   description { state: "hide" 0.0;
+                      inherit: "default" 0.0;
+                      visible: 0;
+                   }
+                }
+                part { name: "controlbar_clip";
+                   type: RECT;
+                   mouse_events: 0;
+                   description { state: "default" 0.0;
+                      rel1.to: "controlbar_bg";
+                      rel2.to: "controlbar_bg";
+                      visible: 1;
+                   }
+                   description { state: "hide" 0.0;
+                      inherit: "default" 0.0;
+                      visible: 0;
+                   }
+                }
+                part { name: "elm.prev_btn_bg";
+                   type: RECT;
+                   scale: 1;
+                   clip_to: "controlbar_clip";
+                   description { state: "default" 0.0;
+                      min: 0 0;
+                      fixed: 1 0;
+                      align: 1.0 0.0;
+                      rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+                      rel2.to: "controlbar_bg";
+                      visible: 0;
+                   }
+                   description { state: "visible" 0.0;
+                      inherit: "default" 0.0;
+                      min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+                   }
+                }
+                part { name: "elm.swallow.prev_btn";
+                   type: SWALLOW;
+                   scale: 1;
+                   clip_to: "controlbar_clip";
+                   description { state: "default" 0.0;
+                      fixed: 1 1;
+                      align: 0.5 0.5;
+                      rel1.to: "elm.prev_btn_bg";
+                      rel2.to: "elm.prev_btn_bg";
+                   }
+                }
+                part { name: "controlbar";
+                   type: SWALLOW;
+                   scale: 1;
+                   clip_to: "controlbar_clip";
+                   description { state: "default" 0.0;
+                          fixed: 1 1;
+                      rel1.to: "controlbar_bg";
+                      rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+                      visible: 1;
+                   }
+                }
+
+                       part {
+                               name: "selectioninfo";
+                               type: SWALLOW;
+                               description { state: "default" 0.0;
+                                       fixed: 0 1;
+                                       align: 0.5 1.0;
+                                       rel1 {
+                                               relative: 0.0 0.0;      to:"controlbar_bg";
+                                       }
+                                       rel2 {
+                                               relative: 1.0 0.0;      to:"controlbar_bg";
+                                       }
+                               }
+                               description { state: "hide" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+               }
+
+               programs {
+
+                       program {
+                               name: "hide_menu";
+                               signal: "elm,state,hide";
+                               source: "event";
+                               action: STATE_SET "hide" 0.0;
+                               target: "controlbar_clip";
+                               target: "controlbar_bg";
+                               target: "selectioninfo";
+                       }
+
+                       program {
+                               name: "show_menu";
+                               signal: "elm,state,show";
+                               source: "event";
+                               action: STATE_SET "default" 0.0;
+                               target: "controlbar_clip";
+                               target: "controlbar_bg";
+                               target: "selectioninfo";
+                       }
+               }
+       }
+}
+
old mode 100755 (executable)
new mode 100644 (file)
index fbba4d7..5759875
@@ -1,43 +1,28 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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.
+ */
 
 
 /*
        used for details view
  */
 
-#define THUMBNAIL_PADDING_INC 26
-#define THUMBNAIL_WIDTH_INC 322
-
-#define BTN_THUMB_PLAY_W_INC 64
-#define BTN_THUMB_PLAY_H_INC 64
-
-#define CONTROLBAR_LARGE_HEIGHT_INC            122
-#define CONTROLBAR_LARGE_LANDSCAPE_H           108
-
-#define BTN_THUMB_PLAY         "T01_btn_thumbnail_play.png"
-
 collections {
    group {
                name: "details_view";
 
-               images {
-                   image: BTN_THUMB_PLAY COMP;
-               }
-
                parts{
                        part {
                                name: "details_view.swallow.bg";
old mode 100755 (executable)
new mode 100644 (file)
index 7a19e6a..c1c3073
@@ -1,18 +1,20 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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"
 
 collections {
        group {
@@ -36,7 +38,7 @@ collections {
                                        state: "show" 0.0;
                                        rel1 { relative: 0.0 0.0; }
                                        rel2 { relative: 1.0 0.0; }
-                                       min: 0 50;
+                                       min: 0 LAYOUT_INDICATOR_HEIGHT_INC;
                                        fixed: 0 1;
                                        align: 0.5 0.0;
                                        visible: 0;
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 4d499aa..9a8235d
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 DEFINE_ICON(_name, _fname)        \
 images { image: _fname COMP; }                   \
@@ -46,16 +46,11 @@ collections { group { name: _name;                    \
 #define BTN_PLAY_VIDEO                 "T01_btn_play.png"
 #define BTN_PAUSED_VIDEO               "T01_btn_paused.png"
 
+#define ICON_FACEBOOK                  "T01_Facebook.png"
+
 DEFINE_ICON("btn.video.play",                  BTN_PLAY_VIDEO)
 DEFINE_ICON("btn.video.paused",                        BTN_PAUSED_VIDEO)
 
-#define HEADER_ICON_PATH               "01_Header icon"
-
-#define HEADER_ICON_DONE               "01_header_icon_done.png"
-#define HEADER_ICON_CANCEL     "01_header_icon_cancel.png"
-#define HEADER_ICON_ADD                "01_header_icon_add.png"
+DEFINE_ICON("icon.facebook",                   ICON_FACEBOOK)
 
-DEFINE_ICON("navi.icon.done",          HEADER_ICON_PATH"/"HEADER_ICON_DONE)
-DEFINE_ICON("navi.icon.cancel",                HEADER_ICON_PATH"/"HEADER_ICON_CANCEL)
-DEFINE_ICON("navi.icon.add",                   HEADER_ICON_PATH"/"HEADER_ICON_ADD)
 
old mode 100755 (executable)
new mode 100644 (file)
index d1c6b8c..9e54aa4
@@ -1,27 +1,24 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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.
+ */
 
 
 // main view
 
 #include "ivug-theme.edc"
 
-#define NAVI_VIEW_HEIGHT       120
-#define CTRL_VIEW_HEIGHT       114
-
 collections {
 group {
        name: "mainview";
@@ -33,8 +30,8 @@ group {
                        scale: 1;
                        description {
                                state: "default" 0.0;
-                               color: 0 0 0 255;
-                               //color: 255 255 255 255;
+                               //color: 0 0 0 255;
+                               color: 255 255 255 255;
                                visible: 1;
                                rel1 { relative: 0.0 0.0;}
                                rel2 { relative: 1.0 1.0;}
@@ -138,6 +135,19 @@ group {
 group {
                name: "navi_content";
                parts {
+#if 0
+                       part {
+                               name: "clipper";
+                               type: RECT;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0 0; }
+                                       rel2 { relative: 1 1; }
+                                       color: 255 255 255 255;
+                               }
+                       }
+#endif
                        part {
                                name: "base";
                                type: RECT;
@@ -156,217 +166,31 @@ group {
                                type: SWALLOW;
                                mouse_events: 1;
                                scale: 1;
+//                             clip_to: "clipper";
                                description {
-                               state: "default" 0.0;
-                               visible: 1;
-                               rel1 { relative: 0.0 0.0; }
-                               rel2 { relative: 1.0 1.0; }
-                               }
-                       }\r
-\r
-                       part {
-                               name: "controlbar_area";
-                               type: RECT;
-                               scale : 1;
-                               mouse_events:0;
-                               description {
-                                       state: "default" 0.0;
-                                       min : 0 114;
-                                       fixed : 0 1;
-                                       rel1{ relative : 0.0 1.0; }
-                                       rel2{ relative : 1.0 1.0; }
-                                       align: 0.5 1.0;
-                                       color: 0 0 0 0;
-                                       visible : 1;
-                               }\r
-                       }\r
-\r
-                       part {\r
-                               name: "zoom_slider_area";\r
-                               type: SWALLOW;\r
-                               scale : 1;
-                               mouse_events:1;\r
-                               description {
-                                       state: "default" 0.0;\r
-                                       visible : 1;\r
-                                       min : 375 100;\r
-                                       fixed : 0 1;\r
-                                       color: 255 0 0 255;\r
-                                       rel1{ relative : 0.5 0.0; to_y:"controlbar_area";}\r
-                                       rel2{ relative : 0.5 0.0; to_y:"controlbar_area";}\r
-                                       align: 0.5 1.0;\r
-                               }\r
-                               description {\r
-                                       state: "hide" 0.0;\r
-                                       inherit: "default" 0.0;\r
-                                       visible: 0;\r
-                               }\r
-                       }\r
-
-#define ICON_ZOOM_GAP  50
-
-#define ICON_ZOOM_IN           "00_zoom_in.png"
-#define ICON_ZOOM_IN_PRESS     "00_zoom_in_press.png"
-#define ICON_ZOOM_OUT          "00_zoom_out.png"
-#define ICON_ZOOM_OUT_PRESS    "00_zoom_out_press.png"
-
-                       part { name: "mainview.btn_zoom_out";
-                                       set {
-                                               name: "zoom_out_images";
-
-                                               image {
-                                                       image: ICON_ZOOM_OUT COMP;
-                                                       size: 56 56 56 56;
-                                               }
-
-                                               image {
-                                                       image: ICON_ZOOM_OUT_PRESS COMP;
-                                                       size: 56 56 56 56;
-                                               }
-
-                                       }
-
-                                       type: IMAGE;
-                                       scale: 1;
-                                       mouse_events: 1;\r
-                                       description {
-                                               visible: 1;
-                                               fixed: 1 1;
-                                               min: 56 56;
-                                               state: "default" 0.0;
-                                               align: 1.0 0.0;\r
-                                               /*rel1 { relative: ((238+28)/720) 1.0;\r
-                                                        offset: 0.0 -56-CTRL_VIEW_HEIGHT-10;}\r
-                                               rel2 { relative: ((238+28)/720) 1.0;
-                                                        offset: 0.0 -56-CTRL_VIEW_HEIGHT-10;}*/\r
-                                               rel1 { relative: 0.0 1.0;\r
-                                                       to_x: "zoom_slider_area";\r
-                                                       offset: 0.0 -56-CTRL_VIEW_HEIGHT-20;}\r
-                                               rel2 { relative: 0.0 1.0;\r
-                                                       to_x: "zoom_slider_area";\r
-                                                       offset: 0.0 -56-CTRL_VIEW_HEIGHT-20;}\r
-                                               image.normal: ICON_ZOOM_OUT;
-                                       }
-
-                                       description {
-                                               state: "show" 0.0;
-                                               inherit: "default" 0.0;
-                                               visible: 1;
-                                               image.normal: ICON_ZOOM_OUT;
-                                       }
-
-                                       description {
-                                               state: "pressed" 0.0;
-                                               inherit: "default" 0.0;
-                                               visible: 1;
-                                               image.normal: ICON_ZOOM_OUT_PRESS;
-                                       }
-
-                                       description {
-                                               state: "hide" 0.0;
-                                               inherit: "default" 0.0;
-                                               visible: 0;
-                                       }
-
-                                       description {
-                                               state: "disabled" 0.0;
-                                               inherit: "default" 0.0;
-                                               visible: 1;
-                                               image.normal: ICON_ZOOM_OUT;
-                                               color: 170 170 170 255;
-                                       }
-                       }
-
-                       part { name: "mainview.btn_zoom_in";
-                                       set {
-                                               name: "zoom_in_images";
-
-                                               image {
-                                                       image: ICON_ZOOM_IN COMP;
-                                                       size: 56 56 56 56;
-                                               }
-
-                                               image {
-                                                       image: ICON_ZOOM_IN_PRESS COMP;
-                                                       size: 56 56 56 56;
-                                               }
-
-                                       }
-
-                                       type: IMAGE;
-                                       scale: 1;
-                                       mouse_events: 1;\r
-                                       description {
-                                               visible: 1;
-                                               fixed: 1 1;
-                                               min: 56 56;
-                                               state: "default" 0.0;
-                                               align: 0.0 0.0;\r
-                                               /*rel1 { relative: ((720-238-28)/720) 1.0;\r
-                                                        offset: 0.0 -56-CTRL_VIEW_HEIGHT-10;}\r
-                                               rel2 { relative: ((720-238-28)/720) 1.0;
-                                                        offset: 0.0 -56-CTRL_VIEW_HEIGHT-10;}*/\r
-                                               rel1 { relative: 1.0 1.0;\r
-                                                       to_x: "zoom_slider_area";\r
-                                                       offset: 0.0 -56-CTRL_VIEW_HEIGHT-20;}\r
-                                               rel2 { relative: 1.0 1.0;\r
-                                                       to_x: "zoom_slider_area";\r
-                                                       offset: 0.0 -56-CTRL_VIEW_HEIGHT-20;}\r
-                                               image.normal: ICON_ZOOM_IN;
-                                       }
-
-                                       description {
-                                               state: "show" 0.0;
-                                               inherit: "default" 0.0;
-                                               visible: 1;
-                                               image.normal: ICON_ZOOM_IN;
-                                       }
-
-                                       description {
-                                               state: "pressed" 0.0;
-                                               inherit: "default" 0.0;
-                                               visible: 1;
-                                               image.normal: ICON_ZOOM_IN_PRESS;
-                                       }
-
-                                       description {
-                                               state: "hide" 0.0;
-                                               inherit: "default" 0.0;
-                                               visible: 0;
-                                       }
-
-                                       description {
-                                               state: "disabled" 0.0;
-                                               inherit: "default" 0.0;
-                                               visible: 1;
-                                               image.normal: ICON_ZOOM_IN;
-                                               color: 170 170 170 255;
-                                       }
+                       state: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: 0.0 0.0; }
+                               rel2 { relative: 1.0 1.0; }
+               }
                        }
 
                        part {
-                               name: "zoom_out_blocker";
-                               type: RECT;
+                               name: "thumblist_bg";
+                               type: SWALLOW;
                                scale: 1;
+                               mouse_events: 0;
                                repeat_events: 0;
-                               mouse_events: 1;
                                description {
                                        state: "default" 0.0;
-                                       visible: 0;
-                                       rel1 { relative: 0 0; to: "mainview.btn_zoom_out";}
-                                       rel2 { relative: 1 1; to: "mainview.btn_zoom_out";}
-                                       color: 0 0 0 0;
-                               }
-                               description {
-                                       state: "disabled" 0.0;
-                                       inherit: "default" 0.0;
-                                       visible: 1;
-                               }
-                               description {
-                                       state: "show" 0.0;
-                                       inherit: "default" 0.0;
+                                       min: 0 140;
+                                       fixed: 0 1;
+                                       rel1 { to_y: "controlbar_area"; relative: 0.0 0.0; }
+                                       rel2 { to_y: "controlbar_area"; relative: 1.0 0.0; }
+                                       align: 0.5 1.0;
                                        visible: 1;
                                }
+
                                description {
                                        state: "hide" 0.0;
                                        inherit: "default" 0.0;
@@ -375,28 +199,20 @@ group {
                        }
 
                        part {
-                               name: "zoom_in_blocker";
-                               type: RECT;
+                               name: "thumblist";
+                               type: SWALLOW;
                                scale: 1;
-                               repeat_events: 0;
                                mouse_events: 1;
+                               repeat_events: 0;
                                description {
                                        state: "default" 0.0;
-                                       visible: 0;
-                                       rel1 { relative: 0 0; to: "mainview.btn_zoom_in";}
-                                       rel2 { relative: 1 1; to: "mainview.btn_zoom_in";}
+                                       rel1 { to: "thumblist_bg";  }
+                                       rel2 { to: "thumblist_bg";  }
                                        color: 0 0 0 0;
-                               }
-                               description {
-                                       state: "disabled" 0.0;
-                                       inherit: "default" 0.0;
-                                       visible: 1;
-                               }
-                               description {
-                                       state: "show" 0.0;
-                                       inherit: "default" 0.0;
+                                       align: 0.5 1.0;
                                        visible: 1;
                                }
+
                                description {
                                        state: "hide" 0.0;
                                        inherit: "default" 0.0;
@@ -404,128 +220,42 @@ group {
                                }
                        }
 
-               }
+                       part {
+                               name: "controlbar_area";
+                               type: RECT;
+                               scale : 1;
+                               mouse_events:0;
+                               description {
+                                       state: "default" 0.0;
+                                       min : 0 98;
+                                       fixed : 0 1;
+                                       rel1{ relative : 0.0 1.0; }
+                                       rel2{ relative : 1.0 1.0; }
+                                       align: 0.5 1.0;
+                                       color: 0 0 0 0;
+                                       visible : 1;
+                               }
 
-               programs {\r
-                       program {\r
-                               name: "hide_zoom_slider";\r
-                               signal: "elm,state,zoom_slider,hide";\r
-                               source: "elm";
-                               action: STATE_SET "hide" 0.0;
-                               target: "zoom_slider_area";\r
-                       }\r
-                       program {\r
-                               name: "show_zoom_slider";\r
-                               signal: "elm,state,zoom_slider,show";\r
-                               source: "elm";
-                               action: STATE_SET "default" 0.0;\r
-                               target: "zoom_slider_area";\r
-                       }\r
-                       program {
-                               name: "hide_btn_zoom_out";
-                               signal: "elm,state,btn_zoom_out,hide";
-                               source: "elm";
-                               action: STATE_SET "hide" 0.0;
-                               target: "mainview.btn_zoom_out";
-                               target: "zoom_out_blocker";
-                       }
-                       program {
-                               name: "show_btn_zoom_out";
-                               signal: "elm,state,btn_zoom_out,show";
-                               source: "elm";
-                               action: STATE_SET "show" 0.0;
-                               target: "mainview.btn_zoom_out";
-                               target: "zoom_out_blocker";
-                       }
-                       program {
-                               name: "btn_zoom_out_mouse_down";
-                               signal: "mouse,down,1";
-                               source: "mainview.btn_zoom_out";
-                               action: STATE_SET "pressed" 0.0;
-                               target: "mainview.btn_zoom_out";
-                       }
-                       program {
-                               name: "btn_zoom_out_mouse_up";
-                               signal: "mouse,up,1";
-                               source: "mainview.btn_zoom_out";
-                               after: "show_btn_zoom_out";
-                       }
-                       program {
-                               name: "btn_zoom_out_clicked";
-                               signal: "mouse,clicked,1";
-                               source: "mainview.btn_zoom_out";
-                               action: SIGNAL_EMIT "mainview,zoom_out,clicked" "";
                        }
-
-                       program {
-                               name: "hide_btn_zoom_in";
-                               signal: "elm,state,btn_zoom_in,hide";
-                               source: "elm";
+               }
+               programs {
+                       program { name: "hide_menu";
+                               signal: "elm,state,hide";
+                               source: "user";
                                action: STATE_SET "hide" 0.0;
-                               target: "mainview.btn_zoom_in";
-                               target: "zoom_in_blocker";
-                       }
-                       program {
-                               name: "show_btn_zoom_in";
-                               signal: "elm,state,btn_zoom_in,show";
-                               source: "elm";
-                               action: STATE_SET "show" 0.0;
-                               target: "mainview.btn_zoom_in";
-                               target: "zoom_in_blocker";
-                       }
-                       program {
-                               name: "btn_zoom_in_mouse_down";
-                               signal: "mouse,down,1";
-                               source: "mainview.btn_zoom_in";
-                               action: STATE_SET "pressed" 0.0;
-                               target: "mainview.btn_zoom_in";
+                               target: "thumblist";
+                               target: "thumblist_bg";
                        }
-                       program {
-                               name: "btn_zoom_in_mouse_up";
-                               signal: "mouse,up,1";
-                               source: "mainview.btn_zoom_in";
-                               after: "show_btn_zoom_in";
-                       }
-                       program {
-                               name: "btn_zoom_in_clicked";
-                               signal: "mouse,clicked,1";
-                               source: "mainview.btn_zoom_in";
-                               action: SIGNAL_EMIT "mainview,zoom_in,clicked" "";
-                       }
-                       program {
-                               name: "enable_btn_zoom_out";
-                               signal: "elm,state,btn_zoom_out,enable";
-                               source: "elm";
-                               action: STATE_SET "default" 0.0;
-                               target: "zoom_out_blocker";
-                               target: "mainview.btn_zoom_out";
-                       }
-                       program {
-                               name: "disable_btn_zoom_out";
-                               signal: "elm,state,btn_zoom_out,disable";
-                               source: "elm";
-                               action: STATE_SET "disabled" 0.0;
-                               target: "zoom_out_blocker";
-                               target: "mainview.btn_zoom_out";
-                       }
-                       program {
-                               name: "enable_btn_zoom_in";
-                               signal: "elm,state,btn_zoom_in,enable";
-                               source: "elm";
+
+                       program { name: "show_menu";
+                               signal: "elm,state,show";
+                               source: "user";
                                action: STATE_SET "default" 0.0;
-                               target: "zoom_in_blocker";
-                               target: "mainview.btn_zoom_in";
-                       }
-                       program {
-                               name: "disable_btn_zoom_in";
-                               signal: "elm,state,btn_zoom_in,disable";
-                               source: "elm";
-                               action: STATE_SET "disabled" 0.0;
-                               target: "zoom_in_blocker";
-                               target: "mainview.btn_zoom_in";
+                               target: "thumblist";
+                               target: "thumblist_bg";
                        }
                }
+
        }
 
 }
-
old mode 100755 (executable)
new mode 100644 (file)
index 3bc8b91..f25b059
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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
@@ -58,35 +58,35 @@ collections {
                                }
                        }
                        part {
-                               name: "bottom_line";
-                               type: RECT;
-                               mouse_events: 0;
+                               name: "entry_part";
+                               type: SWALLOW;
+                               mouse_events: 1;
                                scale:1;
 
                                description {
-                                       min : 0 1; //minimum size for gap filler
+                                       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 1.0; to: "bg_entry";}
-                                       rel2 { relative: 1.0 1.0; to: "bg_entry"; offset: 0 1;}
-                                       color: NAME_ENTRY_BOTTOM_LINE_COLOR_INC;
+                                       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;
                                }
                        }
                        part {
-                               name: "entry_part";
-                               type: SWALLOW;
-                               mouse_events: 1;
+                               name: "bottom_line";
+                               type: RECT;
+                               mouse_events: 0;
                                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;
+                                       min : 0 1; //minimum size for gap filler
                                        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;}
+                                       rel1 { relative: 0.0 1.0; to: "entry_part";}
+                                       rel2 { relative: 1.0 1.0; to: "entry_part"; offset: 0 1;}
+                                       color: NAME_ENTRY_BOTTOM_LINE_COLOR_INC;
                                        align: 0 0;
                                }
                        }
old mode 100755 (executable)
new mode 100644 (file)
index 0aa6895..f53ad38
@@ -1,21 +1,24 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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
+*
+* 1. "elm/naviframe/item/basic/ivug-main/default"
+* 2. "elm/naviframe/item/basic/ivug-main/noindicator"
 */
 
 #include "ivug-theme.edc"
@@ -29,58 +32,37 @@ collections {
    group { name:"elm/naviframe/base/ivug/default";
       parts {
          part { name: "base";
-            mouse_events: 0;
             description { state: "default" 0.0;
-//             rel1 { relative: 0.0 1.0; to_y:"indicator"; }
             }
          }
       }
    }
    group { name:"elm/naviframe/item/basic/ivug-main/default";
-      alias:"elm/naviframe/item/1line/ivug-main/default";
-      images {
-          image: "00_winset_control_top_bg.png" COMP;
-          image: "00_winset_control_top_arrow.png" COMP;
-          image: "00_winset_title_line.png" COMP;
-          image: "00_winset_control_toolbar_bg.png" COMP;
-          image: "00_winset_title_bg.png" COMP;
-      }
       script {
-         public oh_show = 0;     //optionheader show/hide
-         public oh_close = 0;    //optionheader close/open
-         public cbar_bg = 0;     //Controlbar BG Show call count
-         public left_btn_visible = 0; //whether left btn is shown
-         public icon_visible = 0; //whether icon is shown
-         public right_btn_visible = 0; //whether right btn is shown
-         public more_btn_visible = 0; //whether more btn is shown
-         public large_padded_center_align = 0; //large padding based on button size for center align for 1/2 buttons.
-         public subtitle_visible = 0; //whether subtitle is shown
+         public tbar_bg = 0;     //Toolbar BG Show call count
+         public buttons_visible = 0; //when both buttons are visible
+         public toolbar_buttons_visible = 0; //when both toolbar buttons are visible
+         public tbar_close = 0; //Toolbar lastest Open/Close status
       }
       parts {
          part { name: "base";
             type: RECT;
-            mouse_events: 0;
+            mouse_events:  0;
             description { state: "default" 0.0;
                visible: 0;
-               rel1.relative: 0.0 1.0;
-               rel1.to_y: "indicator";
-               rel2.relative: 1.0 1.0;
             }
             description { state: "left" 0.0;
                inherit: "default" 0.0;
                rel1.relative: -1.0 0.0;
-               rel1.to_y: "indicator";
                rel2.relative: 0.0 1.0;
             }
             description { state: "right" 0.0;
                inherit: "default" 0.0;
                rel1.relative: 1.0 0.0;
-               rel1.to_y: "indicator";
                rel2.relative: 2.0 1.0;
             }
          }
-
-        part { name: "elm.swallow.content";
+         part { name: "elm.swallow.content";
             type: SWALLOW;
             scale: 1;
             mouse_events: 1;
@@ -89,18 +71,11 @@ collections {
             description { state: "default" 0.0;
                align: 0.0 0.0;
                rel1.relative: 0.0 0.0;
+               rel1.to: "base";
                rel2.relative: 1.0 1.0;
-            }
-           }
-         part { name: "content_clip";
-            type: RECT;
-            mouse_events: 0;
-            description { state: "default" 0.0;
-               rel1.to: "elm.swallow.content";
-               rel2.to: "elm.swallow.content";
+               rel2.to: "base";
             }
          }
-
          part { name: "elm.swallow.detail";            // Detail view.
             type: SWALLOW;
             scale: 1;
@@ -110,47 +85,53 @@ collections {
                align: 0.0 0.0;
                rel1.relative: 0.0 1.0;
                rel1.to_x: "base";
-               rel1.to_y: "optionheader_bg";
+               rel1.to_y: "title_bg";
+               rel1.offset: 0 -10;
                rel2.relative: 1.0 0.0;
                rel2.to_x: "base";
-               rel2.to_y: "controlbar_bg";
+               rel2.to_y: "toolbar_bg";
                visible: 1;
             }
          }
 
-       part {
-               name: "indicator";
-               type: RECT;
-               scale: 1;
-               repeat_events : 0;
-               clip_to: "content_clip";
-               description {
-                       state: "default" 0.0;
-                       min: 0 LAYOUT_INDICATOR_HEIGHT_INC;
-//                     max: 0 LAYOUT_INDICATOR_HEIGHT_INC;
-                       rel1.relative: 0.0 0.0;
-                       rel2.relative: 1.0 0.0;
-                       fixed: 0 1;
-                       align: 0.5 0.0;
-                       color: LAYOUT_INDICATOR_COLOR_INC;
-                       visible: 1;
-               }
+                part {
+                       name: "indicator";
+                       type: RECT;
+                       scale: 1;
+                       repeat_events : 0;
+                       clip_to: "content_clip";
+                       description {
+                               state: "default" 0.0;
+                               min: 0 LAYOUT_INDICATOR_HEIGHT_INC;
+       //                      max: 0 LAYOUT_INDICATOR_HEIGHT_INC;
+                               rel1.relative: 0.0 0.0;
+                               rel2.relative: 1.0 0.0;
+                               fixed: 0 1;
+                               align: 0.5 0.0;
+                               color: LAYOUT_INDICATOR_COLOR_INC;
+                               visible: 0;
+                       }
 
-               description {
-                       state: "hide" 0.0;
-                       inherit: "default" 0.0;
-                       visible: 0;
-               }
-       }
+                       description {
+                               state: "hide" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 0;
+                       }
+                }
          part { name: "title_bg";
+            type: RECT;
             scale: 1;
             description { state: "default" 0.0;
                min: 1 NAVIFRAME_TITLE_H_INC;
                align: 0.0 0.0;
                fixed: 0 1;
-               rel1 { relative: 0.0 0.0; to: "base"; }
-               rel2 { relative: 1.0 0.0; to: "base"; }
-               image.normal: "00_winset_title_bg.png";
+               rel1 { relative: 0.0 1.0;
+                      to_x: "base";
+                      to_y: "indicator"; }
+               rel2 { relative: 1.0 1.0;
+                      to_x: "base";
+                      to_y: "indicator"; }
+               color: NAVIFRAME_TITLE_BG_COLOR_INC;
             }
             description { state: "hide" 0.0;
                inherit: "default" 0.0;
@@ -167,187 +148,70 @@ collections {
                rel2 { to: "title_bg"; }
             }
          }
-         part { name: "optionheader_bg";
-            type: IMAGE;
-            scale: 1;
-            description { state: "default" 0.0;
-               min: 1 0;
-               align: 0.5 0;
-               fixed: 0 1;
-               rel1.to: "title_bg";
-               rel1.relative: 0 1;
-               rel2.to: "title_bg";
-               visible: 0;
-               image { normal: "00_winset_control_top_bg.png";
-                  border: NAVIFRAME_OH_BORDER_INC;
-               }
-            }
-            description { state: "show" 0.0;
-               inherit: "default" 0.0;
-               min: 1 NAVIFRAME_OH_OPENED_H_INC;
-               visible: 1;
-            }
-            description { state: "hide" 0.0;
-               inherit: "default" 0.0;
-               min: 0 0;
-               max: 0 0;
-               fixed: 1 1;
-            }
-         }
-         part { name: "optionheader_clip";
+         part { name: "top_padding";
             type: RECT;
             mouse_events: 0;
-            description { state: "default" 0.0;
-               rel1 { to: "optionheader_bg"; }
-               rel2 { to: "optionheader_bg"; }
-            }
-         }
-         part { name: "optionheader_top_padding";
-            type: RECT;
-            scale: 1;
-            clip_to: "optionheader_clip";
-            description { state: "default" 0.0;
-               min: 0 NAVIFRAME_OH_PADDING_INC;
-               rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
-               rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
-               fixed: 0 1;
-               align: 0.0 0.0;
-               visible: 0;
-            }
-         }
-         part { name: "optionheader";
-            type: SWALLOW;
             scale: 1;
-            clip_to: "optionheader_clip";
-            description { state: "default" 0.0;
-               min: 0 NAVIFRAME_OH_CONTENT_H_INC;
-               rel1 { relative: 0.0 1.0; to: "optionheader_top_padding"; }
-               rel2 { relative: 1.0 1.0; to: "optionheader_top_padding"; }
-               fixed: 1 1;
-               align: 0.0 0.0;
-            }
-         }
-         part { name: "optionheader_bottom_padding";
-            type: RECT;
-            scale: 1;
-            clip_to: "optionheader_clip";
-            description { state: "default" 0.0;
-               min: 0 NAVIFRAME_OH_PADDING_INC;
-               rel1 { relative: 0.0 1.0; to: "optionheader"; }
-               rel2 { relative: 1.0 1.0; to: "optionheader"; }
+            description {
+               state: "default" 0.0;
+               min: NAVIFRAME_TITLE_TOP_PADDING_INC;
                fixed: 0 1;
                align: 0.0 0.0;
+               rel1 { relative: 0.0 0.0; to: "title_bg"; }
+               rel2 { relative: 1.0 0.0; to: "title_bg"; }
                visible: 0;
             }
          }
-         part { name: "optionheader_shadow";
+         part { name: "padding_center_text1";
             type: RECT;
             scale: 1;
-            clip_to: "optionheader_clip";
+            mouse_events: 0;
             description { state: "default" 0.0;
-               min: 0 NAVIFRAME_OH_SHADOW_INC;
-               rel1 { relative: 0.0 1.0; to: "optionheader_bottom_padding"; }
-               rel2 { relative: 1.0 1.0; to: "optionheader_bottom_padding"; }
-               fixed: 0 1;
+               min: NAVIFRAME_PADDING_INC;
+               fixed: 1 0;
                align: 0.0 0.0;
+               rel1 { relative: 0.0 0.0; to: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to: "title_bg"; }
                visible: 0;
             }
-         }
-         part { name: "left_btn_separator";
-            type: IMAGE;
-            scale: 1;
-            clip_to: "title_clip";
-            description { state: "default" 0.0;
-               min: 2 48;
-               max: 2 48;
-               fixed: 1 1;
-               align: 1.0 0.5;
-               rel1 { relative: 0.0 0.0; to: "title_left_btn"; }
-               rel2 { relative: 0.0 1.0; to: "title_left_btn"; }
-               image.normal: "00_winset_title_line.png";
-               visible: 0;
-            }
-            description { state: "visible" 0.0;
-               inherit: "default" 0.0;
-               visible: 1;
-            }
-         }
-         part { name: "right_btn_separator";
-            type: IMAGE;
-            scale: 1;
-            clip_to: "title_clip";
-            description { state: "default" 0.0;
-               min: 2 48;
-               max: 2 48;
-               fixed: 1 1;
-               align: 1.0 0.5;
-               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
-               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
-               image.normal: "00_winset_title_line.png";
-               visible: 0;
-            }
-            description { state: "visible" 0.0;
+            description { state: "icon" 0.0;
                inherit: "default" 0.0;
-               visible: 1;
+               min: NAVIFRAME_ICON_PADDING_INC;
             }
          }
-         part { name: "padding_before_text";
+         part { name: "content_clip";
             type: RECT;
-            scale: 1;
             mouse_events: 0;
-            clip_to: "title_clip";
             description { state: "default" 0.0;
-               align: 0.0 0.0;
-               rel1 { relative: 0.0 0.0; to: "title_bg"; }
-               rel2 { relative: 0.0 1.0; to: "title_bg"; }
-               fixed: 1 0;
-               min: NAVIFRAME_ICON_PADDING_INC;
-               visible: 0;
+               rel1.to: "elm.swallow.content";
+               rel2.to: "elm.swallow.content";
             }
          }
-         part { name: "padding_center_text1";
+         part { name: "padding_center_text2";
             type: RECT;
-            scale: 1;
             mouse_events: 0;
-            clip_to: "title_clip";
+            scale: 1;
             description { state: "default" 0.0;
-               min: 0 0;
+               min: NAVIFRAME_PADDING2_INC;
                fixed: 1 0;
-               align: 0.0 0.0;
-               rel1 { relative: 1.0 0.0; to: "padding_before_text"; }
-               rel2 { relative: 1.0 1.0; to: "padding_before_text"; }
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_left_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_left_btn"; }
                visible: 0;
             }
-            description { state: "visible" 0.0;
-               inherit: "default" 0.0;
-               min: 0 0;
-            }
-            description { state: "icon" 0.0;
-               inherit: "default" 0.0;
-               min: NAVIFRAME_NO_BUTTON_ICON_PADDING_INC 0;
-            }
-            description { state: "icon_left_button" 0.0;
-               inherit: "default" 0.0;
-               min: NAVIFRAME_TEXT_PADDING_ICON_VISIBLE_INC 0;
-            }
          }
-         part { name: "padding_center_text2";
+         part { name: "padding_bottom_text";
             type: RECT;
             mouse_events: 0;
             scale: 1;
-            clip_to: "title_clip";
             description { state: "default" 0.0;
-               min: 0 0;
-               fixed: 1 0;
-               align: 1.0 0.5;
-               rel1 { relative: 1.0 0.0; to: "title_bg"; }
+               min: NAVIFRAME_BOTTOM_TEXT_PADDING_INC;
+               fixed: 0 1;
+               align: 0.0 1.0;
+               rel1 { relative: 0.0 1.0; to: "title_bg"; }
                rel2 { relative: 1.0 1.0; to: "title_bg"; }
                visible: 0;
             }
-            description { state: "visible" 0.0;
-               inherit: "default" 0.0;
-               min: NAVIFRAME_TEXT_PADDING_INC 0;
-            }
          }
          part { name: "elm.text.title";
             type: TEXT;
@@ -358,26 +222,26 @@ collections {
                   size: NAVIFRAME_TITLE_FONT_SIZE_INC;
                   min: 0 0;
                   max: 1 0;
-                  align: 0.5 0.5;
-                  text_class: "slp_medium";
+                  align: 0.0 0.5;
+                  text_class: "slp";
                }
                color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
                align: 0.0 0.5;
-               fixed: 1 0;
-               rel1 { relative: 1.0 0.0; to_x: "padding_center_text1"; to_y: "title_bg"; }
-               rel2 { relative: 0.0 1.0; to_x: "padding_center_text2"; to_y: "title_bg"; }
-            }
-            description { state: "right_and_more_button" 0.0;
-               inherit: "default" 0.0;
-               rel2 { relative: 0.0 1.0; to_x: "title_more_btn"; to_y: "title_bg"; }
+               fixed: 1 1;
+               rel1 { relative: 1.0 1.0; to_x: "padding_center_text1"; to_y: "top_padding"; }
+               rel2 { relative: 0.0 0.0; to_x: "padding_center_text2"; to_y: "padding_bottom_text"; }
             }
             description { state: "subtitle_is_set" 0.0;
                inherit: "default" 0.0;
-               rel2 { relative: 0.0 0.7; to_x: "padding_center_text2"; to_y: "title_bg"; }
-            }
-            description { state: "subtitle_right_more_button_is_set" 0.0;
-               inherit: "default" 0.0;
-               rel2 { relative: 0.0 0.7; to_x: "title_more_btn"; to_y: "title_bg"; }
+               text { font: "SLP:style=Medium";
+                  size: NAVIFRAME_TITLE_SMALL_FONT_SIZE_INC;
+                  min: 0 0;
+                  max: 1 0;
+                  align: 0.0 0.2;
+                  text_class: "slp";
+               }
+               align: 0.0 0.0;
+               rel1 { relative: 1.0 0.0; to_x: "padding_center_text1"; to_y: "top_padding"; }
             }
          }
          part { name: "elm.text.subtitle";
@@ -389,11 +253,11 @@ collections {
                   size: NAVIFRAME_SUBTITLE_FONT_SIZE_INC;
                   min: 0 0;
                   max: 1 0;
-                  align: 0.5 0.5;
-                  text_class: "slp_medium";
+                  text_class: "slp";
+                  align: 0.0 1.0;
                }
                color: NAVIFRAME_SUBTITLE_TEXT_COLOR_INC;
-               align: 0.0 0.5;
+               align: 0.0 1.0;
                fixed: 1 0;
                rel1 {
                   relative: 1.0 1.0;
@@ -406,13 +270,18 @@ collections {
                   to_y: "elm.text.title";
                }
             }
-            description { state: "right_and_more_button" 0.0;
-               inherit: "default" 0.0;
-               rel2 {
-                  relative: 0.0 1.0;
-                  to_x: "title_more_btn";
-                  to_y: "elm.text.title";
-               }
+         }
+         part { name: "padding_before_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "elm.text.title"; }
+               rel2 { relative: 0.0 1.0; to: "elm.text.title"; }
+               fixed: 1 0;
+               min: NAVIFRAME_PADDING_INC;
+               visible: 0;
             }
          }
          part { name: "elm.swallow.icon";
@@ -422,11 +291,11 @@ collections {
             description { state: "default" 0.0;
                max: NAVIFRAME_ICON_SIZE_INC;
                fixed: 1 1;
-               rel1 { relative: 0.0 0.0; to: "padding_center_text1"; }
-               rel2 { relative: 0.0 1.0; to: "padding_center_text1"; }
+               rel1 { relative: 0.0 0.0; to: "padding_before_text"; }
+               rel2 { relative: 0.0 1.0; to: "padding_before_text"; }
                aspect: 1.0 1.0;
                aspect_preference: VERTICAL;
-               align: 0.0 0.5;
+               align: 1.0 0.5;
             }
          }
          part { name: "click_event_area";
@@ -445,53 +314,58 @@ collections {
                max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
                fixed: 1 1;
                align: 1 0.5;
-               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
-               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+               rel1 { relative: 0.0 0.0; to: "title_btns_padding"; }
+               rel2 { relative: 0.0 1.0; to: "title_btns_padding"; }
             }
          }
-         part { name: "title_right_btn";
-            type: SWALLOW;
+         part { name: "title_btns_padding";
+            type: RECT;
             scale: 1;
-            clip_to: "title_clip";
             description { state: "default" 0.0;
-               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               min: 0 0;
+               fixed: 1 1;
                align: 1 0.5;
+               visible: 0;
+               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_PADDING2_INC;
+            }
+         }
+         part { name: "bottom_right_padding";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               min: 0 0;
                fixed: 1 1;
-               rel1 { relative: 1.0 0.0; to: "title_bg"; }
+               align: 1.0 1.0;
+               rel1 { relative: 1.0 1.0; to: "title_bg"; }
                rel2 { relative: 1.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_BOTTOM_RIGHT_PADDING_INC;
             }
          }
-         part { name: "title_more_btn";
+         part { name: "title_right_btn";
             type: SWALLOW;
             scale: 1;
             clip_to: "title_clip";
             description { state: "default" 0.0;
                max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
-               fixed: 1 1;
                align: 1 0.5;
-               rel1 { relative: 0.0 0.0; to: "title_left_btn"; }
-               rel2 { relative: 0.0 1.0; to: "title_left_btn"; }
-            }
-         }
-         part { name: "optionheader_arrow";
-            type: IMAGE;
-            scale: 1;
-            description { state: "default" 0.0;
-               min: NAVIFRAME_OH_ARROW_SIZE_INC;
-               max: NAVIFRAME_OH_ARROW_SIZE_INC;
                fixed: 1 1;
-               align: 0.5 0.0;
-               rel1 { relative: 0.0 1.1; to: "title_more_btn"; }
-               rel2 { relative: 1.0 1.2; to: "title_more_btn"; }
-               //image.normal: "00_winset_control_top_arrow.png";
-               color: 255 255 255 0;
-            }
-            description { state: "show" 0.0;
-               inherit: "default" 0.0;
-               color: 255 255 255 255;
+               rel1 { relative: 1.0 1.0; to_x: "title_bg"; to_y: "top_padding"; }
+               rel2 { relative: 0.0 0.0; to: "bottom_right_padding"; }
             }
          }
-         part { name: "controlbar_bg";
+         part { name: "toolbar_bg";
+            type: RECT;
             scale: 1;
             description { state: "default" 0.0;
                min: 0 0;
@@ -501,59 +375,130 @@ collections {
                visible: 0;
                rel1 { to: "base"; }
                rel2 { to: "base"; }
-               image.normal: "00_winset_control_toolbar_bg.png";
+               color: NAVIFRAME_TOOLBAR_BG_COLOR_INC;
             }
-            description { state: "show" 0.0;
+            description { state: "visible" 0.0;
                inherit: "default" 0.0;
-               min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
-               max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+               min: 0 NAVIFRAME_TOOLBAR_HEIGHT_INC;
+               max: 999999 NAVIFRAME_TOOLBAR_HEIGHT_INC;
                visible: 1;
             }
          }
-         part { name: "controlbar_clip";
+         part { name: "more_btn_bg";
             type: RECT;
+            scale: 1;
             mouse_events: 0;
             description { state: "default" 0.0;
-               rel1.to: "controlbar_bg";
-               rel2.to: "controlbar_bg";
+               min: NAVIFRAME_TOOLBAR_BUTTON_BG_PADDING_INC;
+               fixed: 1 0;
+               align: 0.0 0.0;
+               rel1 { relative: 0.0 0.0; to: "toolbar_bg"; }
+               rel2 { relative: 0.0 1.0; to: "toolbar_bg"; }
+               visible: 0;
+            }
+         }
+         part { name: "toolbar_more_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "toolbar_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_PREV_FUNC_BTN_SIZE_INC;
+               fixed: 1 1;
+               rel1.to: "more_btn_bg";
+               rel2.to: "more_btn_bg";
             }
          }
-         part { name: "elm.prev_btn_bg";
+         part { name: "prev_btn_bg";
             type: RECT;
             scale: 1;
-            clip_to: "controlbar_clip";
+            mouse_events: 0;
             description { state: "default" 0.0;
-               min: 0 0;
+               min: NAVIFRAME_TOOLBAR_BUTTON_BG_PADDING_INC;
                fixed: 1 0;
                align: 1.0 0.0;
-               rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
-               rel2.to: "controlbar_bg";
+               rel1 { relative: 1.0 0.0; to: "toolbar_bg"; }
+               rel2.to: "toolbar_bg";
                visible: 0;
             }
-            description { state: "visible" 0.0;
-               inherit: "default" 0.0;
-               min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
-            }
          }
          part { name: "elm.swallow.prev_btn";
             type: SWALLOW;
             scale: 1;
-            clip_to: "controlbar_clip";
+            clip_to: "toolbar_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_PREV_FUNC_BTN_SIZE_INC;
+               fixed: 1 1;
+               align: 0.5 0.5;
+               rel1.to: "prev_btn_bg";
+               rel2.to: "prev_btn_bg";
+            }
+         }
+         part { name: "toolbar_btns_area";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { relative: 1.0 0.0; to: "more_btn_bg"; }
+               rel2 { relative: 0.0 1.0; to: "prev_btn_bg"; }
+               visible: 0;
+            }
+         }
+         part { name: "toolbar_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "toolbar_bg"; }
+               rel2 { to: "toolbar_bg"; }
+            }
+         }
+         part { name: "toolbar_button1";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "toolbar_clip";
             description { state: "default" 0.0;
                fixed: 1 1;
                align: 0.5 0.5;
-               rel1.to: "elm.prev_btn_bg";
-               rel2.to: "elm.prev_btn_bg";
+               rel1.to: "toolbar_btns_area";
+               rel2.to: "toolbar_btns_area";
+            }
+            description { state: "buttons_set" 0.0;
+               inherit: "default" 0.0;
+               align: 1.0 0.5;
+               rel2 {
+                  relative: 0.0 1.0;
+                  to: "toolbar_button_padding";
+               }
+            }
+         }
+         part { name: "toolbar_button_padding";
+            type: RECT;
+            scale : 1;
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TOOLBAR_BUTTONS_PADDING_INC 0;
+               max: NAVIFRAME_TOOLBAR_BUTTONS_PADDING_INC 9999;
+               fixed : 1 0;
+               visible: 0;
+               align: 0.5 0.5;
+               rel1.to: "toolbar_clip";
+               rel2.to: "toolbar_clip";
             }
          }
-         part { name: "controlbar";
+         part { name: "toolbar_button2";
             type: SWALLOW;
             scale: 1;
-            clip_to: "controlbar_clip";
+            clip_to: "toolbar_clip";
             description { state: "default" 0.0;
-                  fixed: 1 1;
-               rel1.to: "controlbar_bg";
-               rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+               fixed: 1 1;
+               align: 0.5 0.5;
+               rel1.to: "toolbar_btns_area";
+               rel2.to: "toolbar_btns_area";
+            }
+            description { state: "buttons_set" 0.0;
+               inherit: "default" 0.0;
+               align: 0.0 0.5;
+               rel1 {
+                  relative: 1.0 0.0;
+                  to: "toolbar_button_padding";
+               }
             }
          }
       }
@@ -631,365 +576,218 @@ collections {
          program { name: "title_show";
             signal: "elm,state,title,show";
             source: "elm";
-            script {
-               set_state(PART:"indicator", "default", 0.0);
-               set_state(PART:"title_bg", "default", 0.0);
-               if (get_int(oh_show) == 1) {
-                  if (get_int(oh_close) == 1) {
-                     emit("elm,state,optionheader,instant_close", "");
-                  }else {
-                     emit("elm,state,optionheader,instant_open", "");
-                  }
-               }
-               else
-                 set_state(PART:"optionheader_bg", "default", 0.0);
-            }
+            action: STATE_SET "default" 0.0;
+            target: "title_bg";
          }
          program { name: "title_hide";
             signal: "elm,state,title,hide";
             source: "elm";
             action: STATE_SET "hide" 0.0;
             target: "title_bg";
-            target: "optionheader_bg";
-            target: "indicator";
          }
-         program { name: "prev_btn_show";
-            signal: "elm,state,prev_btn,show";
+         program { name: "subtitle_show";
+            signal: "elm,state,subtitle,show";
             source: "elm";
             script {
-               emit("elm,state,controlbar_bg,show", "elm");
-               set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+               set_state(PART:"elm.text.title", "subtitle_is_set", 0.0);
             }
          }
-         program { name: "prev_btn_hide";
-            signal: "elm,state,prev_btn,hide";
+         program { name: "subtitle_hide";
+            signal: "elm,state,subtitle,hide";
             source: "elm";
             script {
-               emit("elm,state,controlbar_bg,hide", "elm");
-               set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+               set_state(PART:"elm.text.title", "default", 0.0);
             }
          }
-         program { name: "subtitle_show";
-            signal: "elm,state,subtitle,show";
+         program { name: "prev_btn_show";
+            signal: "elm,state,prev_btn,show";
             source: "elm";
             script {
-               set_int(subtitle_visible, 1);
-               if (get_int(large_padded_center_align) == 0)
-                 set_state(PART:"elm.text.title", "subtitle_right_more_button_is_set", 0.0);
-               else
-                 set_state(PART:"elm.text.title", "subtitle_is_set", 0.0);
+               emit("elm,state,toolbar_bg,show", "elm");
             }
          }
-         program { name: "subtitle_hide";
-            signal: "elm,state,subtitle,hide";
+         program { name: "prev_btn_hide";
+            signal: "elm,state,prev_btn,hide";
             source: "elm";
             script {
-               set_int(subtitle_visible, 0);
-               if (get_int(large_padded_center_align) == 0)
-                 set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
-               else
-                 set_state(PART:"elm.text.title", "default", 0.0);
+               emit("elm,state,toolbar_bg,hide", "elm");
             }
          }
+         program { name: "icon_show";
+            signal: "elm,state,icon,show";
+            source: "elm";
+            action: STATE_SET "icon" 0.0;
+            target: "padding_center_text1";
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,icon,hide";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "padding_center_text1";
+         }
          program { name: "left_btn_show";
             signal: "elm,state,title_left_btn,show";
             source: "elm";
             script {
-               set_int(left_btn_visible, 1);
-               set_state(PART:"left_btn_separator", "visible", 0.0);
-               if (get_int(icon_visible) == 1)
-                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else
-                 set_state(PART:"padding_center_text1", "visible", 0.0);
-               if ((get_int(more_btn_visible) == 1) && (get_int(right_btn_visible) == 1)) {
-                  if (get_int(subtitle_visible) == 1)
-                    set_state(PART:"elm.text.title", "subtitle_right_more_button_is_set", 0.0);
-                  else
-                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
-                  set_state(PART:"elm.text.subtitle", "right_and_more_button", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
+               set_int(buttons_visible, get_int(buttons_visible) + 1);
+               set_state(PART:"bottom_right_padding", "visible", 0.0);
+               if (get_int(buttons_visible) >= 2)
+                 set_state(PART:"title_btns_padding", "visible", 0.0);
             }
          }
          program { name: "left_btn_hide";
             signal: "elm,state,title_left_btn,hide";
             source: "elm";
             script {
-               set_int(left_btn_visible, 0);
-               set_state(PART:"left_btn_separator", "default", 0.0);
-               if ((get_int(more_btn_visible) == 0) && (get_int(right_btn_visible) == 0)) {
-                  set_state(PART:"padding_center_text2", "default", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
-               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
-                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else if (get_int(large_padded_center_align) == 1)
-                  set_state(PART:"padding_center_text1", "visible", 0.0);
-               else if (get_int(icon_visible) == 1)
-                  set_state(PART:"padding_center_text1", "icon", 0.0);
-               else
-                  set_state(PART:"padding_center_text1", "default", 0.0);
+               set_int(buttons_visible, get_int(buttons_visible) - 1);
+               set_state(PART:"title_btns_padding", "default", 0.0);
+               if (get_int(buttons_visible) == 0)
+                 set_state(PART:"bottom_right_padding", "default", 0.0);
             }
          }
          program { name: "right_btn_show";
             signal: "elm,state,title_right_btn,show";
             source: "elm";
+            action: STATE_SET "visible" 0.0;
             script {
-               set_int(right_btn_visible, 1);
-               set_state(PART:"right_btn_separator", "visible", 0.0);
-               if (get_int(more_btn_visible) == 1) {
-                  if (get_int(subtitle_visible) == 1)
-                    set_state(PART:"elm.text.title", "subtitle_right_more_button_is_set", 0.0);
-                  else
-                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
-                  set_state(PART:"elm.text.subtitle", "right_and_more_button", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
-               if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
-                                                    (get_int(large_padded_center_align) == 1)))
-                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
-                 set_state(PART:"padding_center_text1", "visible", 0.0);
-               else if (get_int(icon_visible) == 1)
-                 set_state(PART:"padding_center_text1", "icon", 0.0);
-               else
-                 set_state(PART:"padding_center_text1", "default", 0.0);
+               set_int(buttons_visible, get_int(buttons_visible) + 1);
+               set_state(PART:"bottom_right_padding", "visible", 0.0);
+               if (get_int(buttons_visible) >= 2)
+                 set_state(PART:"title_btns_padding", "visible", 0.0);
             }
          }
          program { name: "right_btn_hide";
             signal: "elm,state,title_right_btn,hide";
             source: "elm";
+            action: STATE_SET "default" 0.0;
             script {
-               set_int(right_btn_visible, 0);
-               set_state(PART:"right_btn_separator", "default", 0.0);
-               if ((get_int(more_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
-                  set_state(PART:"padding_center_text2", "default", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
-               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
-                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else if (get_int(large_padded_center_align) == 1)
-                  set_state(PART:"padding_center_text1", "visible", 0.0);
-               else if (get_int(icon_visible) == 1)
-                  set_state(PART:"padding_center_text1", "icon", 0.0);
-               else
-                  set_state(PART:"padding_center_text1", "default", 0.0);
+               set_int(buttons_visible, get_int(buttons_visible) - 1);
+               set_state(PART:"title_btns_padding", "default", 0.0);
+               if (get_int(buttons_visible) == 0)
+                 set_state(PART:"bottom_right_padding", "default", 0.0);
             }
          }
          program { name: "more_btn_show";
-            signal: "elm,state,title_more_btn,show";
+            signal: "elm,state,toolbar_more_btn,show";
             source: "elm";
             script {
-               set_int(more_btn_visible, 1);
-               if (get_int(right_btn_visible) == 1) {
-                  if (get_int(subtitle_visible) == 1)
-                    set_state(PART:"elm.text.title", "subtitle_right_more_button_is_set", 0.0);
-                  else
-                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
-                  set_state(PART:"elm.text.subtitle", "right_and_more_button", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
-               if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
-                                                    (get_int(large_padded_center_align) == 1)))
-                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
-                 set_state(PART:"padding_center_text1", "visible", 0.0);
-               else if (get_int(icon_visible) == 1)
-                 set_state(PART:"padding_center_text1", "icon", 0.0);
-               else
-                 set_state(PART:"padding_center_text1", "default", 0.0);
+               emit("elm,state,toolbar_bg,show", "elm");
             }
          }
          program { name: "more_btn_hide";
-            signal: "elm,state,title_more_btn,hide";
+            signal: "elm,state,toolbar_more_btn,hide";
             source: "elm";
             script {
-               set_int(more_btn_visible, 0);
-               if ((get_int(right_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
-                  set_state(PART:"padding_center_text2", "default", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
-               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
-                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else if (get_int(large_padded_center_align) == 1)
-                  set_state(PART:"padding_center_text1", "visible", 0.0);
-               else if (get_int(icon_visible) == 1)
-                  set_state(PART:"padding_center_text1", "icon", 0.0);
-               else
-                  set_state(PART:"padding_center_text1", "default", 0.0);
+               emit("elm,state,toolbar_bg,hide", "elm");
             }
          }
-         program { name: "icon_show";
-            signal: "elm,state,icon,show";
+         program { name: "toolbar_button1_show";
+            signal: "elm,state,toolbar_button1,show";
             source: "elm";
             script {
-               set_int(icon_visible, 1);
-               if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
-                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else
-                 set_state(PART:"padding_center_text1", "icon", 0.0);
+               emit("elm,state,toolbar_bg,show", "elm");
+               set_int(toolbar_buttons_visible, get_int(toolbar_buttons_visible) + 1);
+               if (get_int(toolbar_buttons_visible) >= 2)
+                 {
+                    set_state(PART:"toolbar_button1", "buttons_set", 0.0);
+                    set_state(PART:"toolbar_button2", "buttons_set", 0.0);
+                 }
             }
          }
-         program { name: "icon_hide";
-            signal: "elm,state,icon,hide";
+         program { name: "toolbar_button1_hide";
+            signal: "elm,state,toolbar_button1,hide";
             source: "elm";
             script {
-               set_int(icon_visible, 0);
-               if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
-                 set_state(PART:"padding_center_text1", "visible", 0.0);
-               else
-                 set_state(PART:"padding_center_text1", "default", 0.0);
+               emit("elm,state,toolbar_bg,hide", "elm");
+               set_int(toolbar_buttons_visible, get_int(toolbar_buttons_visible) - 1);
+               set_state(PART:"toolbar_button1", "default", 0.0);
+               set_state(PART:"toolbar_button2", "default", 0.0);
             }
          }
-         program { name: "controlbar_show";
-            signal: "elm,state,controlbar,show";
+         program { name: "toolbar_button2_show";
+            signal: "elm,state,toolbar_button2,show";
             source: "elm";
             script {
-               emit("elm,state,controlbar_bg,show", "elm");
+               emit("elm,state,toolbar_bg,show", "elm");
+               set_int(toolbar_buttons_visible, get_int(toolbar_buttons_visible) + 1);
+               if (get_int(toolbar_buttons_visible) >= 2)
+                 {
+                    set_state(PART:"toolbar_button1", "buttons_set", 0.0);
+                    set_state(PART:"toolbar_button2", "buttons_set", 0.0);
+                 }
             }
          }
-         program { name: "controlbar_hide";
-            signal: "elm,state,controlbar,hide";
+         program { name: "toolbar_button2_hide";
+            signal: "elm,state,toolbar_button2,hide";
             source: "elm";
             script {
-               emit("elm,state,controlbar_bg,hide", "elm");
+               emit("elm,state,toolbar_bg,hide", "elm");
+               set_int(toolbar_buttons_visible, get_int(toolbar_buttons_visible) - 1);
+               set_state(PART:"toolbar_button1", "default", 0.0);
+               set_state(PART:"toolbar_button2", "default", 0.0);
             }
          }
-         program { name: "controlbar_bg_show";
-            signal: "elm,state,controlbar_bg,show";
+         program { name: "toolbar_bg_show";
+            signal: "elm,state,toolbar_bg,show";
             source: "elm";
             script {
-               set_state(PART:"controlbar_bg", "show", 0.0);
-               set_int(cbar_bg, get_int(cbar_bg) + 1);
+               set_state(PART:"toolbar_bg", "visible", 0.0);
+               set_int(tbar_bg, get_int(tbar_bg) + 1);
             }
          }
-         program { name: "controlbar_bg_hide";
-            signal: "elm,state,controlbar_bg,hide";
+         program { name: "toolbar_bg_hide";
+            signal: "elm,state,toolbar_bg,hide";
             source: "elm";
             script {
-               set_int(cbar_bg, get_int(cbar_bg) - 1);
-               if (get_int(cbar_bg) <= 0)
-                 set_state(PART:"controlbar_bg", "default", 0.0);
+               set_int(tbar_bg, get_int(tbar_bg) - 1);
+               if (get_int(tbar_bg) <= 0)
+                 set_state(PART:"toolbar_bg", "default", 0.0);
             }
          }
-         program { name: "optionheader_show";
-            signal: "elm,state,optionheader,show";
+         program { name: "toolbar_open_internal";
+            signal: "elm,state,toolbar,open,internal";
             source: "elm";
             script {
-               set_state(PART:"optionheader_bg", "show", 0.0);
-               set_state(PART:"optionheader_arrow", "show", 0.0);
-               set_int(oh_show, 1);
+               set_int(tbar_close, 0);
+               set_state(PART:"toolbar_bg", "visible", 0.0);
             }
          }
-         program { name: "optionheader_hide";
-            signal: "elm,state,optionheader,hide";
+         program { name: "toolbar_close_internal";
+            signal: "elm,state,toolbar,close,internal";
             source: "elm";
             script {
-               set_state(PART:"optionheader_bg", "default", 0.0);
-               set_state(PART:"optionheader_arrow", "default", 0.0);
-               set_int(oh_show, 0);
-            }
-         }
-         program { name: "optionheader_open";
-            signal: "elm,state,optionheader,open";
-            source: "";
-            action: STATE_SET "show" 0.0;
-            target: "optionheader_bg";
-            target: "optionheader_arrow";
-            transition: LINEAR 0.2;
-            after: "optionheader_open_set";
-         }
-         program { name: "optionheader_close";
-            signal: "elm,state,optionheader,close";
-            source: "";
-            action: STATE_SET "default" 0.0;
-            target: "optionheader_bg";
-            target: "optionheader_arrow";
-            transition: LINEAR 0.2;
-            after: "optionheader_close_set";
-         }
-         program { name: "optionheader_instant_open";
-            signal: "elm,state,optionheader,instant_open";
-            source: "";
-            action: STATE_SET "show" 0.0;
-            target: "optionheader_bg";
-            target: "optionheader_arrow";
-            after: "optionheader_open_set";
-         }
-         program { name: "optionheader_instant_close";
-            signal: "elm,state,optionheader,instant_close";
-            source: "";
-            action: STATE_SET "default" 0.0;
-            target: "optionheader_bg";
-            target: "optionheader_arrow";
-            after: "optionheader_close_set";
-         }
-         program { name: "optionheader_close_set";
-            signal: "elm,state,optionheader,close_set";
-            source: "";
-            script {
-               set_int(oh_close, 1);
-            }
-         }
-         program { name: "optionheader_open_set";
-            signal: "elm,state,optionheader,open_set";
-            source: "";
-            script {
-               set_int(oh_close, 0);
+               set_int(tbar_close, 1);
+               set_state(PART:"toolbar_bg", "default", 0.0);
             }
          }
-         program { name: "controlbar_open";
-            signal: "elm,state,controlbar,open";
+         program { name: "toolbar_open";
+            signal: "elm,state,toolbar,open";
             source: "";
-            action: STATE_SET "show" 0.0;
-            target: "controlbar_bg";
+            action: STATE_SET "visible" 0.0;
+            target: "toolbar_bg";
             transition: LINEAR 0.2;
+            after: "toolbar_open_internal";
          }
-         program { name: "controlbar_close";
-            signal: "elm,state,controlbar,close";
+         program { name: "toolbar_close";
+            signal: "elm,state,toolbar,close";
             source: "";
             action: STATE_SET "default" 0.0;
-            target: "controlbar_bg";
+            target: "toolbar_bg";
             transition: LINEAR 0.2;
+            after: "toolbar_close_internal";
          }
-         program { name: "controlbar_instant_open";
-            signal: "elm,state,controlbar,instant_open";
+         program { name: "toolbar_instant_open";
+            signal: "elm,state,toolbar,instant_open";
             source: "";
             script {
-               emit("elm,state,prev_btn,show", "elm");
-               emit("elm,state,controlbar,show", "elm");
+               emit("elm,state,toolbar,open,internal", "elm");
             }
          }
-         program { name: "controlbar_instant_close";
-            signal: "elm,state,controlbar,instant_close";
+         program { name: "toolbar_instant_close";
+            signal: "elm,state,toolbar,instant_close";
             source: "";
             script {
-               emit("elm,state,prev_btn,hide", "elm");
-               emit("elm,state,controlbar,hide", "elm");
+               emit("elm,state,toolbar,close,internal", "elm");
             }
          }
          program { name: "show_finished";
@@ -1007,37 +805,39 @@ collections {
             source: "click_event_area";
             action: SIGNAL_EMIT "elm,action,title,clicked" "";
          }
+         program {
+            name: "display_mode_compress";
+            signal: "display,mode,compress";
+            source: "";
+            script {
+               set_state(PART:"toolbar_bg", "default", 0.0);
+            }
+         }
+         program {
+            name: "display_mode_default";
+            signal: "display,mode,default";
+            source: "";
+            script {
+               if ((get_int(tbar_bg) > 0) && (get_int(tbar_close) == 0))
+                  set_state(PART:"toolbar_bg", "visible", 0.0);
+            }
+         }
       }
    }
 
    group { name:"elm/naviframe/item/basic/ivug-main/noindicator";
-      alias:"elm/naviframe/item/1line/ivug-main/noindicator";
-      images {
-          image: "00_winset_control_top_bg.png" COMP;
-          image: "00_winset_control_top_arrow.png" COMP;
-          image: "00_winset_title_line.png" COMP;
-          image: "00_winset_control_toolbar_bg.png" COMP;
-          image: "00_winset_title_bg.png" COMP;
-      }
       script {
-         public oh_show = 0;     //optionheader show/hide
-         public oh_close = 0;    //optionheader close/open
-         public cbar_bg = 0;     //Controlbar BG Show call count
-         public left_btn_visible = 0; //whether left btn is shown
-         public icon_visible = 0; //whether icon is shown
-         public right_btn_visible = 0; //whether right btn is shown
-         public more_btn_visible = 0; //whether more btn is shown
-         public large_padded_center_align = 0; //large padding based on button size for center align for 1/2 buttons.
-         public subtitle_visible = 0; //whether subtitle is shown
+         public tbar_bg = 0;     //Toolbar BG Show call count
+         public buttons_visible = 0; //when both buttons are visible
+         public toolbar_buttons_visible = 0; //when both toolbar buttons are visible
+         public tbar_close = 0; //Toolbar lastest Open/Close status
       }
       parts {
          part { name: "base";
             type: RECT;
-            mouse_events: 0;
+            mouse_events:  0;
             description { state: "default" 0.0;
                visible: 0;
-               rel1.relative: 0.0 0.0;
-               rel2.relative: 1.0 1.0;
             }
             description { state: "left" 0.0;
                inherit: "default" 0.0;
@@ -1050,8 +850,7 @@ collections {
                rel2.relative: 2.0 1.0;
             }
          }
-
-        part { name: "elm.swallow.content";
+         part { name: "elm.swallow.content";
             type: SWALLOW;
             scale: 1;
             mouse_events: 1;
@@ -1060,18 +859,11 @@ collections {
             description { state: "default" 0.0;
                align: 0.0 0.0;
                rel1.relative: 0.0 0.0;
+               rel1.to: "base";
                rel2.relative: 1.0 1.0;
-            }
-           }
-         part { name: "content_clip";
-            type: RECT;
-            mouse_events: 0;
-            description { state: "default" 0.0;
-               rel1.to: "elm.swallow.content";
-               rel2.to: "elm.swallow.content";
+               rel2.to: "base";
             }
          }
-
          part { name: "elm.swallow.detail";            // Detail view.
             type: SWALLOW;
             scale: 1;
@@ -1081,15 +873,17 @@ collections {
                align: 0.0 0.0;
                rel1.relative: 0.0 1.0;
                rel1.to_x: "base";
-               rel1.to_y: "optionheader_bg";
+               rel1.to_y: "title_bg";
+               rel1.offset: 0 -10;
                rel2.relative: 1.0 0.0;
                rel2.to_x: "base";
-               rel2.to_y: "controlbar_bg";
+               rel2.to_y: "toolbar_bg";
                visible: 1;
             }
          }
 
          part { name: "title_bg";
+            type: RECT;
             scale: 1;
             description { state: "default" 0.0;
                min: 1 NAVIFRAME_TITLE_H_INC;
@@ -1097,1090 +891,34 @@ collections {
                fixed: 0 1;
                rel1 { relative: 0.0 0.0; to: "base"; }
                rel2 { relative: 1.0 0.0; to: "base"; }
-               image.normal: "00_winset_title_bg.png";
-            }
-            description { state: "hide" 0.0;
-               inherit: "default" 0.0;
-               min: 0 0;
-               max: 0 0;
-               fixed: 1 1;
-            }
-         }
-         part { name: "title_clip";
-            type: RECT;
-            mouse_events: 0;
-            description { state: "default" 0.0;
-               rel1 { to: "title_bg"; }
-               rel2 { to: "title_bg"; }
-            }
-         }
-         part { name: "optionheader_bg";
-            type: IMAGE;
-            scale: 1;
-            description { state: "default" 0.0;
-               min: 1 0;
-               align: 0.5 0;
-               fixed: 0 1;
-               rel1.to: "title_bg";
-               rel1.relative: 0 1;
-               rel2.to: "title_bg";
-               visible: 0;
-               image { normal: "00_winset_control_top_bg.png";
-                  border: NAVIFRAME_OH_BORDER_INC;
-               }
-            }
-            description { state: "show" 0.0;
-               inherit: "default" 0.0;
-               min: 1 NAVIFRAME_OH_OPENED_H_INC;
-               visible: 1;
+               color: NAVIFRAME_TITLE_BG_COLOR_INC;
             }
             description { state: "hide" 0.0;
                inherit: "default" 0.0;
-               min: 0 0;
-               max: 0 0;
-               fixed: 1 1;
-            }
-         }
-         part { name: "optionheader_clip";
-            type: RECT;
-            mouse_events: 0;
-            description { state: "default" 0.0;
-               rel1 { to: "optionheader_bg"; }
-               rel2 { to: "optionheader_bg"; }
-            }
-         }
-         part { name: "optionheader_top_padding";
-            type: RECT;
-            scale: 1;
-            clip_to: "optionheader_clip";
-            description { state: "default" 0.0;
-               min: 0 NAVIFRAME_OH_PADDING_INC;
-               rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
-               rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
-               fixed: 0 1;
-               align: 0.0 0.0;
-               visible: 0;
-            }
-         }
-         part { name: "optionheader";
-            type: SWALLOW;
-            scale: 1;
-            clip_to: "optionheader_clip";
-            description { state: "default" 0.0;
-               min: 0 NAVIFRAME_OH_CONTENT_H_INC;
-               rel1 { relative: 0.0 1.0; to: "optionheader_top_padding"; }
-               rel2 { relative: 1.0 1.0; to: "optionheader_top_padding"; }
-               fixed: 1 1;
-               align: 0.0 0.0;
-            }
-         }
-         part { name: "optionheader_bottom_padding";
-            type: RECT;
-            scale: 1;
-            clip_to: "optionheader_clip";
-            description { state: "default" 0.0;
-               min: 0 NAVIFRAME_OH_PADDING_INC;
-               rel1 { relative: 0.0 1.0; to: "optionheader"; }
-               rel2 { relative: 1.0 1.0; to: "optionheader"; }
-               fixed: 0 1;
-               align: 0.0 0.0;
-               visible: 0;
-            }
-         }
-         part { name: "optionheader_shadow";
-            type: RECT;
-            scale: 1;
-            clip_to: "optionheader_clip";
-            description { state: "default" 0.0;
-               min: 0 NAVIFRAME_OH_SHADOW_INC;
-               rel1 { relative: 0.0 1.0; to: "optionheader_bottom_padding"; }
-               rel2 { relative: 1.0 1.0; to: "optionheader_bottom_padding"; }
-               fixed: 0 1;
-               align: 0.0 0.0;
-               visible: 0;
-            }
-         }
-         part { name: "left_btn_separator";
-            type: IMAGE;
-            scale: 1;
-            clip_to: "title_clip";
-            description { state: "default" 0.0;
-               min: 2 48;
-               max: 2 48;
-               fixed: 1 1;
-               align: 1.0 0.5;
-               rel1 { relative: 0.0 0.0; to: "title_left_btn"; }
-               rel2 { relative: 0.0 1.0; to: "title_left_btn"; }
-               image.normal: "00_winset_title_line.png";
-               visible: 0;
-            }
-            description { state: "visible" 0.0;
-               inherit: "default" 0.0;
-               visible: 1;
-            }
-         }
-         part { name: "right_btn_separator";
-            type: IMAGE;
-            scale: 1;
-            clip_to: "title_clip";
-            description { state: "default" 0.0;
-               min: 2 48;
-               max: 2 48;
-               fixed: 1 1;
-               align: 1.0 0.5;
-               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
-               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
-               image.normal: "00_winset_title_line.png";
-               visible: 0;
-            }
-            description { state: "visible" 0.0;
-               inherit: "default" 0.0;
-               visible: 1;
-            }
-         }
-         part { name: "padding_before_text";
-            type: RECT;
-            scale: 1;
-            mouse_events: 0;
-            clip_to: "title_clip";
-            description { state: "default" 0.0;
-               align: 0.0 0.0;
-               rel1 { relative: 0.0 0.0; to: "title_bg"; }
-               rel2 { relative: 0.0 1.0; to: "title_bg"; }
-               fixed: 1 0;
-               min: NAVIFRAME_ICON_PADDING_INC;
-               visible: 0;
-            }
-         }
-         part { name: "padding_center_text1";
-            type: RECT;
-            scale: 1;
-            mouse_events: 0;
-            clip_to: "title_clip";
-            description { state: "default" 0.0;
-               min: 0 0;
-               fixed: 1 0;
-               align: 0.0 0.0;
-               rel1 { relative: 1.0 0.0; to: "padding_before_text"; }
-               rel2 { relative: 1.0 1.0; to: "padding_before_text"; }
-               visible: 0;
-            }
-            description { state: "visible" 0.0;
-               inherit: "default" 0.0;
-               min: 0 0;
-            }
-            description { state: "icon" 0.0;
-               inherit: "default" 0.0;
-               min: NAVIFRAME_NO_BUTTON_ICON_PADDING_INC 0;
-            }
-            description { state: "icon_left_button" 0.0;
-               inherit: "default" 0.0;
-               min: NAVIFRAME_TEXT_PADDING_ICON_VISIBLE_INC 0;
-            }
-         }
-         part { name: "padding_center_text2";
-            type: RECT;
-            mouse_events: 0;
-            scale: 1;
-            clip_to: "title_clip";
-            description { state: "default" 0.0;
-               min: 0 0;
-               fixed: 1 0;
-               align: 1.0 0.5;
-               rel1 { relative: 1.0 0.0; to: "title_bg"; }
-               rel2 { relative: 1.0 1.0; to: "title_bg"; }
-               visible: 0;
-            }
-            description { state: "visible" 0.0;
-               inherit: "default" 0.0;
-               min: NAVIFRAME_TEXT_PADDING_INC 0;
-            }
-         }
-         part { name: "elm.text.title";
-            type: TEXT;
-            scale: 1;
-            clip_to: "title_clip";
-            description { state: "default" 0.0;
-               text { font: "SLP:style=Medium";
-                  size: NAVIFRAME_TITLE_FONT_SIZE_INC;
-                  min: 0 0;
-                  max: 1 0;
-                  align: 0.5 0.5;
-                  text_class: "slp_medium";
-               }
-               color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
-               align: 0.0 0.5;
-               fixed: 1 0;
-               rel1 { relative: 1.0 0.0; to_x: "padding_center_text1"; to_y: "title_bg"; }
-               rel2 { relative: 0.0 1.0; to_x: "padding_center_text2"; to_y: "title_bg"; }
-            }
-            description { state: "right_and_more_button" 0.0;
-               inherit: "default" 0.0;
-               rel2 { relative: 0.0 1.0; to_x: "title_more_btn"; to_y: "title_bg"; }
-            }
-            description { state: "subtitle_is_set" 0.0;
-               inherit: "default" 0.0;
-               rel2 { relative: 0.0 0.7; to_x: "padding_center_text2"; to_y: "title_bg"; }
-            }
-            description { state: "subtitle_right_more_button_is_set" 0.0;
-               inherit: "default" 0.0;
-               rel2 { relative: 0.0 0.7; to_x: "title_more_btn"; to_y: "title_bg"; }
-            }
-         }
-         part { name: "elm.text.subtitle";
-            type: TEXT;
-            scale: 1;
-            clip_to: "title_clip";
-            description { state: "default" 0.0;
-               text { font: "SLP:style=Medium";
-                  size: NAVIFRAME_SUBTITLE_FONT_SIZE_INC;
-                  min: 0 0;
-                  max: 1 0;
-                  align: 0.5 0.5;
-                  text_class: "slp_medium";
-               }
-               color: NAVIFRAME_SUBTITLE_TEXT_COLOR_INC;
-               align: 0.0 0.5;
-               fixed: 1 0;
-               rel1 {
-                  relative: 1.0 1.0;
-                  to_x: "padding_center_text1";
-                  to_y: "elm.text.title";
-               }
-               rel2 {
-                  relative: 0.0 1.0;
-                  to_x: "padding_center_text2";
-                  to_y: "elm.text.title";
-               }
-            }
-            description { state: "right_and_more_button" 0.0;
-               inherit: "default" 0.0;
-               rel2 {
-                  relative: 0.0 1.0;
-                  to_x: "title_more_btn";
-                  to_y: "elm.text.title";
-               }
-            }
-         }
-         part { name: "elm.swallow.icon";
-            type: SWALLOW;
-            scale: 1;
-            clip_to: "title_clip";
-            description { state: "default" 0.0;
-               max: NAVIFRAME_ICON_SIZE_INC;
-               fixed: 1 1;
-               rel1 { relative: 0.0 0.0; to: "padding_center_text1"; }
-               rel2 { relative: 0.0 1.0; to: "padding_center_text1"; }
-               aspect: 1.0 1.0;
-               aspect_preference: VERTICAL;
-               align: 0.0 0.5;
-            }
-         }
-         part { name: "click_event_area";
-             ignore_flags: ON_HOLD;
-             repeat_events: 1;
-             description { state: "default" 0.0;
-                rel1 { to: "title_bg"; }
-                rel2 { to: "title_bg"; }
-             }
-         }
-         part { name: "title_left_btn";
-            type: SWALLOW;
-            scale: 1;
-            clip_to: "title_clip";
-            description { state: "default" 0.0;
-               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
-               fixed: 1 1;
-               align: 1 0.5;
-               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
-               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
-            }
-         }
-         part { name: "title_right_btn";
-            type: SWALLOW;
-            scale: 1;
-            clip_to: "title_clip";
-            description { state: "default" 0.0;
-               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
-               align: 1 0.5;
-               fixed: 1 1;
-               rel1 { relative: 1.0 0.0; to: "title_bg"; }
-               rel2 { relative: 1.0 1.0; to: "title_bg"; }
-            }
-         }
-         part { name: "title_more_btn";
-            type: SWALLOW;
-            scale: 1;
-            clip_to: "title_clip";
-            description { state: "default" 0.0;
-               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
-               fixed: 1 1;
-               align: 1 0.5;
-               rel1 { relative: 0.0 0.0; to: "title_left_btn"; }
-               rel2 { relative: 0.0 1.0; to: "title_left_btn"; }
-            }
-         }
-         part { name: "optionheader_arrow";
-            type: IMAGE;
-            scale: 1;
-            description { state: "default" 0.0;
-               min: NAVIFRAME_OH_ARROW_SIZE_INC;
-               max: NAVIFRAME_OH_ARROW_SIZE_INC;
-               fixed: 1 1;
-               align: 0.5 0.0;
-               rel1 { relative: 0.0 1.1; to: "title_more_btn"; }
-               rel2 { relative: 1.0 1.2; to: "title_more_btn"; }
-               //image.normal: "00_winset_control_top_arrow.png";
-               color: 255 255 255 0;
-            }
-            description { state: "show" 0.0;
-               inherit: "default" 0.0;
-               color: 255 255 255 255;
-            }
-         }
-         part { name: "controlbar_bg";
-            scale: 1;
-            description { state: "default" 0.0;
-               min: 0 0;
-               max: 999999 0;
-               fixed: 0 1;
-               align: 0.0 1.0;
-               visible: 0;
-               rel1 { to: "base"; }
-               rel2 { to: "base"; }
-               image.normal: "00_winset_control_toolbar_bg.png";
-            }
-            description { state: "show" 0.0;
-               inherit: "default" 0.0;
-               min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
-               max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
-               visible: 1;
-            }
-         }
-         part { name: "controlbar_clip";
-            type: RECT;
-            mouse_events: 0;
-            description { state: "default" 0.0;
-               rel1.to: "controlbar_bg";
-               rel2.to: "controlbar_bg";
-            }
-         }
-         part { name: "elm.prev_btn_bg";
-            type: RECT;
-            scale: 1;
-            clip_to: "controlbar_clip";
-            description { state: "default" 0.0;
-               min: 0 0;
-               fixed: 1 0;
-               align: 1.0 0.0;
-               rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
-               rel2.to: "controlbar_bg";
-               visible: 0;
-            }
-            description { state: "visible" 0.0;
-               inherit: "default" 0.0;
-               min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
-            }
-         }
-         part { name: "elm.swallow.prev_btn";
-            type: SWALLOW;
-            scale: 1;
-            clip_to: "controlbar_clip";
-            description { state: "default" 0.0;
-               fixed: 1 1;
-               align: 0.5 0.5;
-               rel1.to: "elm.prev_btn_bg";
-               rel2.to: "elm.prev_btn_bg";
-            }
-         }
-         part { name: "controlbar";
-            type: SWALLOW;
-            scale: 1;
-            clip_to: "controlbar_clip";
-            description { state: "default" 0.0;
-                  fixed: 1 1;
-               rel1.to: "controlbar_bg";
-               rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
-            }
-         }
-      }
-      programs {
-         program { name: "content_new_pushed";
-            signal: "elm,state,new,pushed,internal";
-            source: "";
-            action: STATE_SET "default" 0.0;
-            target: "base";
-            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
-            after: "show_finished";
-         }
-         program { name: "content_cur_pushed";
-            signal: "elm,state,cur,pushed,internal";
-            source: "";
-            action: STATE_SET "left" 0.0;
-            target: "base";
-            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
-            after: "pushed_finished";
-         }
-         program { name: "content_prev_popped";
-            signal: "elm,state,prev,popped,internal";
-            source: "";
-            action: STATE_SET "default" 0.0;
-            target: "base";
-            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
-            after: "show_finished";
-         }
-         program { name: "content_cur_popped";
-            signal: "elm,state,cur,popped,internal";
-            source: "";
-            action: STATE_SET "right" 0.0;
-            target: "base";
-            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
-            after: "popped_finished";
-         }
-         program { name: "cur_pushed";
-            signal: "elm,state,cur,pushed";
-            source: "elm";
-            script {
-               set_state(PART:"base", "default", 0.0);
-               emit("elm,state,cur,pushed,internal", "");
-            }
-         }
-         program { name: "new_pushed";
-            signal: "elm,state,new,pushed";
-            source: "elm";
-            script {
-               set_state(PART:"base", "right", 0.0);
-               emit("elm,state,new,pushed,internal", "");
-            }
-         }
-         program { name: "prev_popped";
-            signal: "elm,state,prev,popped";
-            source: "elm";
-            script {
-               set_state(PART:"base", "left", 0.0);
-               emit("elm,state,prev,popped,internal", "");
-            }
-         }
-         program { name: "cur_popped";
-            signal: "elm,state,cur,popped";
-            source: "elm";
-            script {
-               set_state(PART:"base", "default", 0.0);
-               emit("elm,state,cur,popped,internal", "");
-            }
-         }
-         program { name: "visible";
-            signal: "elm,state,visible";
-            source: "elm";
-            action: STATE_SET "default" 0.0;
-            target: "base";
-         }
-         program { name: "title_show";
-            signal: "elm,state,title,show";
-            source: "elm";
-            script {
-               set_state(PART:"title_bg", "default", 0.0);
-               if (get_int(oh_show) == 1) {
-                  if (get_int(oh_close) == 1) {
-                     emit("elm,state,optionheader,instant_close", "");
-                  }else {
-                     emit("elm,state,optionheader,instant_open", "");
-                  }
-               }
-               else
-                 set_state(PART:"optionheader_bg", "default", 0.0);
-            }
-         }
-         program { name: "title_hide";
-            signal: "elm,state,title,hide";
-            source: "elm";
-            action: STATE_SET "hide" 0.0;
-            target: "title_bg";
-            target: "optionheader_bg";
-         }
-         program { name: "prev_btn_show";
-            signal: "elm,state,prev_btn,show";
-            source: "elm";
-            script {
-               emit("elm,state,controlbar_bg,show", "elm");
-               set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
-            }
-         }
-         program { name: "prev_btn_hide";
-            signal: "elm,state,prev_btn,hide";
-            source: "elm";
-            script {
-               emit("elm,state,controlbar_bg,hide", "elm");
-               set_state(PART:"elm.prev_btn_bg", "default", 0.0);
-            }
-         }
-         program { name: "subtitle_show";
-            signal: "elm,state,subtitle,show";
-            source: "elm";
-            script {
-               set_int(subtitle_visible, 1);
-               if (get_int(large_padded_center_align) == 0)
-                 set_state(PART:"elm.text.title", "subtitle_right_more_button_is_set", 0.0);
-               else
-                 set_state(PART:"elm.text.title", "subtitle_is_set", 0.0);
-            }
-         }
-         program { name: "subtitle_hide";
-            signal: "elm,state,subtitle,hide";
-            source: "elm";
-            script {
-               set_int(subtitle_visible, 0);
-               if (get_int(large_padded_center_align) == 0)
-                 set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
-               else
-                 set_state(PART:"elm.text.title", "default", 0.0);
-            }
-         }
-         program { name: "left_btn_show";
-            signal: "elm,state,title_left_btn,show";
-            source: "elm";
-            script {
-               set_int(left_btn_visible, 1);
-               set_state(PART:"left_btn_separator", "visible", 0.0);
-               if (get_int(icon_visible) == 1)
-                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else
-                 set_state(PART:"padding_center_text1", "visible", 0.0);
-               if ((get_int(more_btn_visible) == 1) && (get_int(right_btn_visible) == 1)) {
-                  if (get_int(subtitle_visible) == 1)
-                    set_state(PART:"elm.text.title", "subtitle_right_more_button_is_set", 0.0);
-                  else
-                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
-                  set_state(PART:"elm.text.subtitle", "right_and_more_button", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
-            }
-         }
-         program { name: "left_btn_hide";
-            signal: "elm,state,title_left_btn,hide";
-            source: "elm";
-            script {
-               set_int(left_btn_visible, 0);
-               set_state(PART:"left_btn_separator", "default", 0.0);
-               if ((get_int(more_btn_visible) == 0) && (get_int(right_btn_visible) == 0)) {
-                  set_state(PART:"padding_center_text2", "default", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
-               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
-                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else if (get_int(large_padded_center_align) == 1)
-                  set_state(PART:"padding_center_text1", "visible", 0.0);
-               else if (get_int(icon_visible) == 1)
-                  set_state(PART:"padding_center_text1", "icon", 0.0);
-               else
-                  set_state(PART:"padding_center_text1", "default", 0.0);
-            }
-         }
-         program { name: "right_btn_show";
-            signal: "elm,state,title_right_btn,show";
-            source: "elm";
-            script {
-               set_int(right_btn_visible, 1);
-               set_state(PART:"right_btn_separator", "visible", 0.0);
-               if (get_int(more_btn_visible) == 1) {
-                  if (get_int(subtitle_visible) == 1)
-                    set_state(PART:"elm.text.title", "subtitle_right_more_button_is_set", 0.0);
-                  else
-                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
-                  set_state(PART:"elm.text.subtitle", "right_and_more_button", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
-               if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
-                                                    (get_int(large_padded_center_align) == 1)))
-                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
-                 set_state(PART:"padding_center_text1", "visible", 0.0);
-               else if (get_int(icon_visible) == 1)
-                 set_state(PART:"padding_center_text1", "icon", 0.0);
-               else
-                 set_state(PART:"padding_center_text1", "default", 0.0);
-            }
-         }
-         program { name: "right_btn_hide";
-            signal: "elm,state,title_right_btn,hide";
-            source: "elm";
-            script {
-               set_int(right_btn_visible, 0);
-               set_state(PART:"right_btn_separator", "default", 0.0);
-               if ((get_int(more_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
-                  set_state(PART:"padding_center_text2", "default", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
-               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
-                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else if (get_int(large_padded_center_align) == 1)
-                  set_state(PART:"padding_center_text1", "visible", 0.0);
-               else if (get_int(icon_visible) == 1)
-                  set_state(PART:"padding_center_text1", "icon", 0.0);
-               else
-                  set_state(PART:"padding_center_text1", "default", 0.0);
-            }
-         }
-         program { name: "more_btn_show";
-            signal: "elm,state,title_more_btn,show";
-            source: "elm";
-            script {
-               set_int(more_btn_visible, 1);
-               if (get_int(right_btn_visible) == 1) {
-                  if (get_int(subtitle_visible) == 1)
-                    set_state(PART:"elm.text.title", "subtitle_right_more_button_is_set", 0.0);
-                  else
-                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
-                  set_state(PART:"elm.text.subtitle", "right_and_more_button", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
-               if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
-                                                    (get_int(large_padded_center_align) == 1)))
-                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
-                 set_state(PART:"padding_center_text1", "visible", 0.0);
-               else if (get_int(icon_visible) == 1)
-                 set_state(PART:"padding_center_text1", "icon", 0.0);
-               else
-                 set_state(PART:"padding_center_text1", "default", 0.0);
-            }
-         }
-         program { name: "more_btn_hide";
-            signal: "elm,state,title_more_btn,hide";
-            source: "elm";
-            script {
-               set_int(more_btn_visible, 0);
-               if ((get_int(right_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
-                  set_state(PART:"padding_center_text2", "default", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
-               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
-                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else if (get_int(large_padded_center_align) == 1)
-                  set_state(PART:"padding_center_text1", "visible", 0.0);
-               else if (get_int(icon_visible) == 1)
-                  set_state(PART:"padding_center_text1", "icon", 0.0);
-               else
-                  set_state(PART:"padding_center_text1", "default", 0.0);
-            }
-         }
-         program { name: "icon_show";
-            signal: "elm,state,icon,show";
-            source: "elm";
-            script {
-               set_int(icon_visible, 1);
-               if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
-                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else
-                 set_state(PART:"padding_center_text1", "icon", 0.0);
-            }
-         }
-         program { name: "icon_hide";
-            signal: "elm,state,icon,hide";
-            source: "elm";
-            script {
-               set_int(icon_visible, 0);
-               if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
-                 set_state(PART:"padding_center_text1", "visible", 0.0);
-               else
-                 set_state(PART:"padding_center_text1", "default", 0.0);
-            }
-         }
-         program { name: "controlbar_show";
-            signal: "elm,state,controlbar,show";
-            source: "elm";
-            script {
-               emit("elm,state,controlbar_bg,show", "elm");
-            }
-         }
-         program { name: "controlbar_hide";
-            signal: "elm,state,controlbar,hide";
-            source: "elm";
-            script {
-               emit("elm,state,controlbar_bg,hide", "elm");
-            }
-         }
-         program { name: "controlbar_bg_show";
-            signal: "elm,state,controlbar_bg,show";
-            source: "elm";
-            script {
-               set_state(PART:"controlbar_bg", "show", 0.0);
-               set_int(cbar_bg, get_int(cbar_bg) + 1);
-            }
-         }
-         program { name: "controlbar_bg_hide";
-            signal: "elm,state,controlbar_bg,hide";
-            source: "elm";
-            script {
-               set_int(cbar_bg, get_int(cbar_bg) - 1);
-               if (get_int(cbar_bg) <= 0)
-                 set_state(PART:"controlbar_bg", "default", 0.0);
-            }
-         }
-         program { name: "optionheader_show";
-            signal: "elm,state,optionheader,show";
-            source: "elm";
-            script {
-               set_state(PART:"optionheader_bg", "show", 0.0);
-               set_state(PART:"optionheader_arrow", "show", 0.0);
-               set_int(oh_show, 1);
-            }
-         }
-         program { name: "optionheader_hide";
-            signal: "elm,state,optionheader,hide";
-            source: "elm";
-            script {
-               set_state(PART:"optionheader_bg", "default", 0.0);
-               set_state(PART:"optionheader_arrow", "default", 0.0);
-               set_int(oh_show, 0);
-            }
-         }
-         program { name: "optionheader_open";
-            signal: "elm,state,optionheader,open";
-            source: "";
-            action: STATE_SET "show" 0.0;
-            target: "optionheader_bg";
-            target: "optionheader_arrow";
-            transition: LINEAR 0.2;
-            after: "optionheader_open_set";
-         }
-         program { name: "optionheader_close";
-            signal: "elm,state,optionheader,close";
-            source: "";
-            action: STATE_SET "default" 0.0;
-            target: "optionheader_bg";
-            target: "optionheader_arrow";
-            transition: LINEAR 0.2;
-            after: "optionheader_close_set";
-         }
-         program { name: "optionheader_instant_open";
-            signal: "elm,state,optionheader,instant_open";
-            source: "";
-            action: STATE_SET "show" 0.0;
-            target: "optionheader_bg";
-            target: "optionheader_arrow";
-            after: "optionheader_open_set";
-         }
-         program { name: "optionheader_instant_close";
-            signal: "elm,state,optionheader,instant_close";
-            source: "";
-            action: STATE_SET "default" 0.0;
-            target: "optionheader_bg";
-            target: "optionheader_arrow";
-            after: "optionheader_close_set";
-         }
-         program { name: "optionheader_close_set";
-            signal: "elm,state,optionheader,close_set";
-            source: "";
-            script {
-               set_int(oh_close, 1);
-            }
-         }
-         program { name: "optionheader_open_set";
-            signal: "elm,state,optionheader,open_set";
-            source: "";
-            script {
-               set_int(oh_close, 0);
-            }
-         }
-         program { name: "controlbar_open";
-            signal: "elm,state,controlbar,open";
-            source: "";
-            action: STATE_SET "show" 0.0;
-            target: "controlbar_bg";
-            transition: LINEAR 0.2;
-         }
-         program { name: "controlbar_close";
-            signal: "elm,state,controlbar,close";
-            source: "";
-            action: STATE_SET "default" 0.0;
-            target: "controlbar_bg";
-            transition: LINEAR 0.2;
-         }
-         program { name: "controlbar_instant_open";
-            signal: "elm,state,controlbar,instant_open";
-            source: "";
-            script {
-               emit("elm,state,prev_btn,show", "elm");
-               emit("elm,state,controlbar,show", "elm");
-            }
-         }
-         program { name: "controlbar_instant_close";
-            signal: "elm,state,controlbar,instant_close";
-            source: "";
-            script {
-               emit("elm,state,prev_btn,hide", "elm");
-               emit("elm,state,controlbar,hide", "elm");
-            }
-         }
-         program { name: "show_finished";
-            action: SIGNAL_EMIT "elm,action,show,finished" "";
-         }
-         program { name: "pushed_finished";
-            action: SIGNAL_EMIT "elm,action,pushed,finished" "";
-         }
-         program { name: "popped_finished";
-            action: SIGNAL_EMIT "elm,action,popped,finished" "";
-         }
-         program {
-            name: "title_clicked";
-            signal: "mouse,clicked,1";
-            source: "click_event_area";
-            action: SIGNAL_EMIT "elm,action,title,clicked" "";
-         }
-      }
-   }
-
-   group { name:"elm/naviframe/item/basic/ivug/default";
-      alias:"elm/naviframe/item/1line/ivug/default";
-      images {
-          image: "00_winset_control_top_bg.png" COMP;
-          image: "00_winset_control_top_arrow.png" COMP;
-          image: "00_winset_title_line.png" COMP;
-          image: "00_winset_control_toolbar_bg.png" COMP;
-          image: "00_winset_title_bg.png" COMP;
-      }
-      script {
-         public oh_show = 0;     //optionheader show/hide
-         public oh_close = 0;    //optionheader close/open
-         public cbar_bg = 0;     //Controlbar BG Show call count
-         public left_btn_visible = 0; //whether left btn is shown
-         public icon_visible = 0; //whether icon is shown
-         public right_btn_visible = 0; //whether right btn is shown
-         public more_btn_visible = 0; //whether more btn is shown
-         public large_padded_center_align = 0; //large padding based on button size for center align for 1/2 buttons.
-         public subtitle_visible = 0; //whether subtitle is shown
-      }
-      parts {
-         part { name: "base";
-            type: RECT;
-            mouse_events:  0;
-            description { state: "default" 0.0;
-               visible: 0;
-            }
-            description { state: "left" 0.0;
-               inherit: "default" 0.0;
-               rel1.relative: -1.0 0.0;
-               rel2.relative: 0.0 1.0;
-            }
-            description { state: "right" 0.0;
-               inherit: "default" 0.0;
-               rel1.relative: 1.0 0.0;
-               rel2.relative: 2.0 1.0;
-            }
-         }
-         part { name: "title_bg";
-            scale: 1;
-            description { state: "default" 0.0;
-               min: 1 NAVIFRAME_TITLE_H_INC;
-               align: 0.0 0.0;
-               fixed: 0 1;
-               rel1 { relative: 0.0 0.0; to: "base"; }
-               rel2 { relative: 1.0 0.0; to: "base"; }
-               image.normal: "00_winset_title_bg.png";
-            }
-            description { state: "hide" 0.0;
-               inherit: "default" 0.0;
-               min: 0 0;
-               max: 0 0;
-               fixed: 1 1;
-            }
-         }
-         part { name: "title_clip";
-            type: RECT;
-            mouse_events: 0;
-            description { state: "default" 0.0;
-               rel1 { to: "title_bg"; }
-               rel2 { to: "title_bg"; }
-            }
-         }
-         part { name: "optionheader_bg";
-            type: IMAGE;
-            scale: 1;
-            description { state: "default" 0.0;
-               min: 1 0;
-               align: 0.5 0;
-               fixed: 0 1;
-               rel1.to: "title_bg";
-               rel1.relative: 0 1;
-               rel2.to: "title_bg";
-               visible: 0;
-               image { normal: "00_winset_control_top_bg.png";
-                  border: NAVIFRAME_OH_BORDER_INC;
-               }
-            }
-            description { state: "show" 0.0;
-               inherit: "default" 0.0;
-               min: 1 NAVIFRAME_OH_OPENED_H_INC;
-               visible: 1;
-            }
-            description { state: "hide" 0.0;
-               inherit: "default" 0.0;
-               min: 0 0;
-               max: 0 0;
-               fixed: 1 1;
-            }
-         }
-         part { name: "optionheader_clip";
-            type: RECT;
-            mouse_events: 0;
-            description { state: "default" 0.0;
-               rel1 { to: "optionheader_bg"; }
-               rel2 { to: "optionheader_bg"; }
-            }
-         }
-         part { name: "optionheader_top_padding";
-            type: RECT;
-            scale: 1;
-            clip_to: "optionheader_clip";
-            description { state: "default" 0.0;
-               min: 0 NAVIFRAME_OH_PADDING_INC;
-               rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
-               rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
-               fixed: 0 1;
-               align: 0.0 0.0;
-               visible: 0;
-            }
-         }
-         part { name: "optionheader";
-            type: SWALLOW;
-            scale: 1;
-            clip_to: "optionheader_clip";
-            description { state: "default" 0.0;
-               min: 0 NAVIFRAME_OH_CONTENT_H_INC;
-               rel1 { relative: 0.0 1.0; to: "optionheader_top_padding"; }
-               rel2 { relative: 1.0 1.0; to: "optionheader_top_padding"; }
-               fixed: 1 1;
-               align: 0.0 0.0;
-            }
-         }
-         part { name: "optionheader_bottom_padding";
-            type: RECT;
-            scale: 1;
-            clip_to: "optionheader_clip";
-            description { state: "default" 0.0;
-               min: 0 NAVIFRAME_OH_PADDING_INC;
-               rel1 { relative: 0.0 1.0; to: "optionheader"; }
-               rel2 { relative: 1.0 1.0; to: "optionheader"; }
-               fixed: 0 1;
-               align: 0.0 0.0;
-               visible: 0;
-            }
-         }
-         part { name: "optionheader_shadow";
-            type: RECT;
-            scale: 1;
-            clip_to: "optionheader_clip";
-            description { state: "default" 0.0;
-               min: 0 NAVIFRAME_OH_SHADOW_INC;
-               rel1 { relative: 0.0 1.0; to: "optionheader_bottom_padding"; }
-               rel2 { relative: 1.0 1.0; to: "optionheader_bottom_padding"; }
-               fixed: 0 1;
-               align: 0.0 0.0;
-               visible: 0;
-            }
-         }
-         part { name: "elm.swallow.content";
-            type: SWALLOW;
-            scale: 1;
-            repeat_events: 0;
-            clip_to: "content_clip";
-            description { state: "default" 0.0;
-               align: 0.0 0.0;
-               rel1.relative: 0.0 1.0;
-               rel1.to_x: "base";
-               rel1.to_y: "optionheader_bg";
-               rel2.relative: 1.0 0.0;
-               rel2.to_x: "base";
-               rel2.to_y: "controlbar_bg";
-            }
-         }
-         part { name: "content_clip";
-            type: RECT;
-            mouse_events: 0;
-            description { state: "default" 0.0;
-               rel1.to: "elm.swallow.content";
-               rel2.to: "elm.swallow.content";
-            }
-         }
-
-
-
-
-
-         part { name: "left_btn_separator";
-            type: IMAGE;
-            scale: 1;
-            clip_to: "title_clip";
-            description { state: "default" 0.0;
-               min: 2 48;
-               max: 2 48;
-               fixed: 1 1;
-               align: 1.0 0.5;
-               rel1 { relative: 0.0 0.0; to: "title_left_btn"; }
-               rel2 { relative: 0.0 1.0; to: "title_left_btn"; }
-               image.normal: "00_winset_title_line.png";
-               visible: 0;
-            }
-            description { state: "visible" 0.0;
-               inherit: "default" 0.0;
-               visible: 1;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
             }
          }
-         part { name: "right_btn_separator";
-            type: IMAGE;
-            scale: 1;
-            clip_to: "title_clip";
+         part { name: "title_clip";
+            type: RECT;
+            mouse_events: 0;
             description { state: "default" 0.0;
-               min: 2 48;
-               max: 2 48;
-               fixed: 1 1;
-               align: 1.0 0.5;
-               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
-               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
-               image.normal: "00_winset_title_line.png";
-               visible: 0;
-            }
-            description { state: "visible" 0.0;
-               inherit: "default" 0.0;
-               visible: 1;
+               rel1 { to: "title_bg"; }
+               rel2 { to: "title_bg"; }
             }
          }
-         part { name: "padding_before_text";
+         part { name: "top_padding";
             type: RECT;
-            scale: 1;
             mouse_events: 0;
-            clip_to: "title_clip";
-            description { state: "default" 0.0;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               min: NAVIFRAME_TITLE_TOP_PADDING_INC;
+               fixed: 0 1;
                align: 0.0 0.0;
                rel1 { relative: 0.0 0.0; to: "title_bg"; }
-               rel2 { relative: 0.0 1.0; to: "title_bg"; }
-               fixed: 1 0;
-               min: NAVIFRAME_ICON_PADDING_INC;
+               rel2 { relative: 1.0 0.0; to: "title_bg"; }
                visible: 0;
             }
          }
@@ -2188,44 +926,51 @@ collections {
             type: RECT;
             scale: 1;
             mouse_events: 0;
-            clip_to: "title_clip";
             description { state: "default" 0.0;
-               min: 0 0;
+               min: NAVIFRAME_PADDING_INC;
                fixed: 1 0;
                align: 0.0 0.0;
-               rel1 { relative: 1.0 0.0; to: "padding_before_text"; }
-               rel2 { relative: 1.0 1.0; to: "padding_before_text"; }
+               rel1 { relative: 0.0 0.0; to: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to: "title_bg"; }
                visible: 0;
             }
-            description { state: "visible" 0.0;
-               inherit: "default" 0.0;
-               min: 0 0;
-            }
             description { state: "icon" 0.0;
                inherit: "default" 0.0;
-               min: NAVIFRAME_NO_BUTTON_ICON_PADDING_INC 0;
+               min: NAVIFRAME_ICON_PADDING_INC;
             }
-            description { state: "icon_left_button" 0.0;
-               inherit: "default" 0.0;
-               min: NAVIFRAME_TEXT_PADDING_ICON_VISIBLE_INC 0;
+         }
+         part { name: "content_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to: "elm.swallow.content";
+               rel2.to: "elm.swallow.content";
             }
          }
          part { name: "padding_center_text2";
             type: RECT;
             mouse_events: 0;
             scale: 1;
-            clip_to: "title_clip";
             description { state: "default" 0.0;
-               min: 0 0;
+               min: NAVIFRAME_PADDING2_INC;
                fixed: 1 0;
                align: 1.0 0.5;
-               rel1 { relative: 1.0 0.0; to: "title_bg"; }
-               rel2 { relative: 1.0 1.0; to: "title_bg"; }
+               rel1 { relative: 0.0 0.0; to: "title_left_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_left_btn"; }
                visible: 0;
             }
-            description { state: "visible" 0.0;
-               inherit: "default" 0.0;
-               min: NAVIFRAME_TEXT_PADDING_INC 0;
+         }
+         part { name: "padding_bottom_text";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: NAVIFRAME_BOTTOM_TEXT_PADDING_INC;
+               fixed: 0 1;
+               align: 0.0 1.0;
+               rel1 { relative: 0.0 1.0; to: "title_bg"; }
+               rel2 { relative: 1.0 1.0; to: "title_bg"; }
+               visible: 0;
             }
          }
          part { name: "elm.text.title";
@@ -2237,26 +982,26 @@ collections {
                   size: NAVIFRAME_TITLE_FONT_SIZE_INC;
                   min: 0 0;
                   max: 1 0;
-                  align: 0.5 0.5;
-                  text_class: "slp_medium";
+                  align: 0.0 0.5;
+                  text_class: "slp";
                }
                color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
                align: 0.0 0.5;
-               fixed: 1 0;
-               rel1 { relative: 1.0 0.0; to_x: "padding_center_text1"; to_y: "title_bg"; }
-               rel2 { relative: 0.0 1.0; to_x: "padding_center_text2"; to_y: "title_bg"; }
-            }
-            description { state: "right_and_more_button" 0.0;
-               inherit: "default" 0.0;
-               rel2 { relative: 0.0 1.0; to_x: "title_more_btn"; to_y: "title_bg"; }
+               fixed: 1 1;
+               rel1 { relative: 1.0 1.0; to_x: "padding_center_text1"; to_y: "top_padding"; }
+               rel2 { relative: 0.0 0.0; to_x: "padding_center_text2"; to_y: "padding_bottom_text"; }
             }
             description { state: "subtitle_is_set" 0.0;
                inherit: "default" 0.0;
-               rel2 { relative: 0.0 0.7; to_x: "padding_center_text2"; to_y: "title_bg"; }
-            }
-            description { state: "subtitle_right_more_button_is_set" 0.0;
-               inherit: "default" 0.0;
-               rel2 { relative: 0.0 0.7; to_x: "title_more_btn"; to_y: "title_bg"; }
+               text { font: "SLP:style=Medium";
+                  size: NAVIFRAME_TITLE_SMALL_FONT_SIZE_INC;
+                  min: 0 0;
+                  max: 1 0;
+                  align: 0.0 0.2;
+                  text_class: "slp";
+               }
+               align: 0.0 0.0;
+               rel1 { relative: 1.0 0.0; to_x: "padding_center_text1"; to_y: "top_padding"; }
             }
          }
          part { name: "elm.text.subtitle";
@@ -2268,11 +1013,11 @@ collections {
                   size: NAVIFRAME_SUBTITLE_FONT_SIZE_INC;
                   min: 0 0;
                   max: 1 0;
-                  align: 0.5 0.5;
-                  text_class: "slp_medium";
+                  text_class: "slp";
+                  align: 0.0 1.0;
                }
                color: NAVIFRAME_SUBTITLE_TEXT_COLOR_INC;
-               align: 0.0 0.5;
+               align: 0.0 1.0;
                fixed: 1 0;
                rel1 {
                   relative: 1.0 1.0;
@@ -2285,13 +1030,18 @@ collections {
                   to_y: "elm.text.title";
                }
             }
-            description { state: "right_and_more_button" 0.0;
-               inherit: "default" 0.0;
-               rel2 {
-                  relative: 0.0 1.0;
-                  to_x: "title_more_btn";
-                  to_y: "elm.text.title";
-               }
+         }
+         part { name: "padding_before_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "elm.text.title"; }
+               rel2 { relative: 0.0 1.0; to: "elm.text.title"; }
+               fixed: 1 0;
+               min: NAVIFRAME_PADDING_INC;
+               visible: 0;
             }
          }
          part { name: "elm.swallow.icon";
@@ -2301,11 +1051,11 @@ collections {
             description { state: "default" 0.0;
                max: NAVIFRAME_ICON_SIZE_INC;
                fixed: 1 1;
-               rel1 { relative: 0.0 0.0; to: "padding_center_text1"; }
-               rel2 { relative: 0.0 1.0; to: "padding_center_text1"; }
+               rel1 { relative: 0.0 0.0; to: "padding_before_text"; }
+               rel2 { relative: 0.0 1.0; to: "padding_before_text"; }
                aspect: 1.0 1.0;
                aspect_preference: VERTICAL;
-               align: 0.0 0.5;
+               align: 1.0 0.5;
             }
          }
          part { name: "click_event_area";
@@ -2324,53 +1074,58 @@ collections {
                max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
                fixed: 1 1;
                align: 1 0.5;
-               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
-               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+               rel1 { relative: 0.0 0.0; to: "title_btns_padding"; }
+               rel2 { relative: 0.0 1.0; to: "title_btns_padding"; }
             }
          }
-         part { name: "title_right_btn";
-            type: SWALLOW;
+         part { name: "title_btns_padding";
+            type: RECT;
             scale: 1;
-            clip_to: "title_clip";
             description { state: "default" 0.0;
-               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               min: 0 0;
+               fixed: 1 1;
                align: 1 0.5;
+               visible: 0;
+               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_PADDING2_INC;
+            }
+         }
+         part { name: "bottom_right_padding";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               min: 0 0;
                fixed: 1 1;
-               rel1 { relative: 1.0 0.0; to: "title_bg"; }
+               align: 1.0 1.0;
+               rel1 { relative: 1.0 1.0; to: "title_bg"; }
                rel2 { relative: 1.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_BOTTOM_RIGHT_PADDING_INC;
             }
          }
-         part { name: "title_more_btn";
+         part { name: "title_right_btn";
             type: SWALLOW;
             scale: 1;
             clip_to: "title_clip";
             description { state: "default" 0.0;
                max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
-               fixed: 1 1;
                align: 1 0.5;
-               rel1 { relative: 0.0 0.0; to: "title_left_btn"; }
-               rel2 { relative: 0.0 1.0; to: "title_left_btn"; }
-            }
-         }
-         part { name: "optionheader_arrow";
-            type: IMAGE;
-            scale: 1;
-            description { state: "default" 0.0;
-               min: NAVIFRAME_OH_ARROW_SIZE_INC;
-               max: NAVIFRAME_OH_ARROW_SIZE_INC;
                fixed: 1 1;
-               align: 0.5 0.0;
-               rel1 { relative: 0.0 1.1; to: "title_more_btn"; }
-               rel2 { relative: 1.0 1.2; to: "title_more_btn"; }
-               //image.normal: "00_winset_control_top_arrow.png";
-               color: 255 255 255 0;
-            }
-            description { state: "show" 0.0;
-               inherit: "default" 0.0;
-               color: 255 255 255 255;
+               rel1 { relative: 1.0 1.0; to_x: "title_bg"; to_y: "top_padding"; }
+               rel2 { relative: 0.0 0.0; to: "bottom_right_padding"; }
             }
          }
-         part { name: "controlbar_bg";
+         part { name: "toolbar_bg";
+            type: RECT;
             scale: 1;
             description { state: "default" 0.0;
                min: 0 0;
@@ -2380,59 +1135,130 @@ collections {
                visible: 0;
                rel1 { to: "base"; }
                rel2 { to: "base"; }
-               image.normal: "00_winset_control_toolbar_bg.png";
+               color: NAVIFRAME_TOOLBAR_BG_COLOR_INC;
             }
-            description { state: "show" 0.0;
+            description { state: "visible" 0.0;
                inherit: "default" 0.0;
-               min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
-               max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+               min: 0 NAVIFRAME_TOOLBAR_HEIGHT_INC;
+               max: 999999 NAVIFRAME_TOOLBAR_HEIGHT_INC;
                visible: 1;
             }
          }
-         part { name: "controlbar_clip";
+         part { name: "more_btn_bg";
             type: RECT;
+            scale: 1;
             mouse_events: 0;
             description { state: "default" 0.0;
-               rel1.to: "controlbar_bg";
-               rel2.to: "controlbar_bg";
+               min: NAVIFRAME_TOOLBAR_BUTTON_BG_PADDING_INC;
+               fixed: 1 0;
+               align: 0.0 0.0;
+               rel1 { relative: 0.0 0.0; to: "toolbar_bg"; }
+               rel2 { relative: 0.0 1.0; to: "toolbar_bg"; }
+               visible: 0;
+            }
+         }
+         part { name: "toolbar_more_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "toolbar_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_PREV_FUNC_BTN_SIZE_INC;
+               fixed: 1 1;
+               rel1.to: "more_btn_bg";
+               rel2.to: "more_btn_bg";
             }
          }
-         part { name: "elm.prev_btn_bg";
+         part { name: "prev_btn_bg";
             type: RECT;
             scale: 1;
-            clip_to: "controlbar_clip";
+            mouse_events: 0;
             description { state: "default" 0.0;
-               min: 0 0;
+               min: NAVIFRAME_TOOLBAR_BUTTON_BG_PADDING_INC;
                fixed: 1 0;
                align: 1.0 0.0;
-               rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
-               rel2.to: "controlbar_bg";
+               rel1 { relative: 1.0 0.0; to: "toolbar_bg"; }
+               rel2.to: "toolbar_bg";
                visible: 0;
             }
-            description { state: "visible" 0.0;
-               inherit: "default" 0.0;
-               min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
-            }
          }
          part { name: "elm.swallow.prev_btn";
             type: SWALLOW;
             scale: 1;
-            clip_to: "controlbar_clip";
+            clip_to: "toolbar_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_PREV_FUNC_BTN_SIZE_INC;
+               fixed: 1 1;
+               align: 0.5 0.5;
+               rel1.to: "prev_btn_bg";
+               rel2.to: "prev_btn_bg";
+            }
+         }
+         part { name: "toolbar_btns_area";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { relative: 1.0 0.0; to: "more_btn_bg"; }
+               rel2 { relative: 0.0 1.0; to: "prev_btn_bg"; }
+               visible: 0;
+            }
+         }
+         part { name: "toolbar_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "toolbar_bg"; }
+               rel2 { to: "toolbar_bg"; }
+            }
+         }
+         part { name: "toolbar_button1";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "toolbar_clip";
             description { state: "default" 0.0;
                fixed: 1 1;
                align: 0.5 0.5;
-               rel1.to: "elm.prev_btn_bg";
-               rel2.to: "elm.prev_btn_bg";
+               rel1.to: "toolbar_btns_area";
+               rel2.to: "toolbar_btns_area";
+            }
+            description { state: "buttons_set" 0.0;
+               inherit: "default" 0.0;
+               align: 1.0 0.5;
+               rel2 {
+                  relative: 0.0 1.0;
+                  to: "toolbar_button_padding";
+               }
+            }
+         }
+         part { name: "toolbar_button_padding";
+            type: RECT;
+            scale : 1;
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TOOLBAR_BUTTONS_PADDING_INC 0;
+               max: NAVIFRAME_TOOLBAR_BUTTONS_PADDING_INC 9999;
+               fixed : 1 0;
+               visible: 0;
+               align: 0.5 0.5;
+               rel1.to: "toolbar_clip";
+               rel2.to: "toolbar_clip";
             }
          }
-         part { name: "controlbar";
+         part { name: "toolbar_button2";
             type: SWALLOW;
             scale: 1;
-            clip_to: "controlbar_clip";
+            clip_to: "toolbar_clip";
             description { state: "default" 0.0;
                fixed: 1 1;
-               rel1.to: "controlbar_bg";
-               rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+               align: 0.5 0.5;
+               rel1.to: "toolbar_btns_area";
+               rel2.to: "toolbar_btns_area";
+            }
+            description { state: "buttons_set" 0.0;
+               inherit: "default" 0.0;
+               align: 0.0 0.5;
+               rel1 {
+                  relative: 1.0 0.0;
+                  to: "toolbar_button_padding";
+               }
             }
          }
       }
@@ -2510,363 +1336,218 @@ collections {
          program { name: "title_show";
             signal: "elm,state,title,show";
             source: "elm";
-            script {
-               set_state(PART:"title_bg", "default", 0.0);
-               if (get_int(oh_show) == 1) {
-                  if (get_int(oh_close) == 1) {
-                     emit("elm,state,optionheader,instant_close", "");
-                  }else {
-                     emit("elm,state,optionheader,instant_open", "");
-                  }
-               }
-               else
-                 set_state(PART:"optionheader_bg", "default", 0.0);
-            }
+            action: STATE_SET "default" 0.0;
+            target: "title_bg";
          }
          program { name: "title_hide";
             signal: "elm,state,title,hide";
             source: "elm";
             action: STATE_SET "hide" 0.0;
             target: "title_bg";
-            target: "optionheader_bg";
          }
-         program { name: "prev_btn_show";
-            signal: "elm,state,prev_btn,show";
+         program { name: "subtitle_show";
+            signal: "elm,state,subtitle,show";
             source: "elm";
             script {
-               emit("elm,state,controlbar_bg,show", "elm");
-               set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+               set_state(PART:"elm.text.title", "subtitle_is_set", 0.0);
             }
          }
-         program { name: "prev_btn_hide";
-            signal: "elm,state,prev_btn,hide";
+         program { name: "subtitle_hide";
+            signal: "elm,state,subtitle,hide";
             source: "elm";
             script {
-               emit("elm,state,controlbar_bg,hide", "elm");
-               set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+               set_state(PART:"elm.text.title", "default", 0.0);
             }
          }
-         program { name: "subtitle_show";
-            signal: "elm,state,subtitle,show";
+         program { name: "prev_btn_show";
+            signal: "elm,state,prev_btn,show";
             source: "elm";
             script {
-               set_int(subtitle_visible, 1);
-               if (get_int(large_padded_center_align) == 0)
-                 set_state(PART:"elm.text.title", "subtitle_right_more_button_is_set", 0.0);
-               else
-                 set_state(PART:"elm.text.title", "subtitle_is_set", 0.0);
+               emit("elm,state,toolbar_bg,show", "elm");
             }
          }
-         program { name: "subtitle_hide";
-            signal: "elm,state,subtitle,hide";
+         program { name: "prev_btn_hide";
+            signal: "elm,state,prev_btn,hide";
             source: "elm";
             script {
-               set_int(subtitle_visible, 0);
-               if (get_int(large_padded_center_align) == 0)
-                 set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
-               else
-                 set_state(PART:"elm.text.title", "default", 0.0);
+               emit("elm,state,toolbar_bg,hide", "elm");
             }
          }
+         program { name: "icon_show";
+            signal: "elm,state,icon,show";
+            source: "elm";
+            action: STATE_SET "icon" 0.0;
+            target: "padding_center_text1";
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,icon,hide";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "padding_center_text1";
+         }
          program { name: "left_btn_show";
             signal: "elm,state,title_left_btn,show";
             source: "elm";
             script {
-               set_int(left_btn_visible, 1);
-               set_state(PART:"left_btn_separator", "visible", 0.0);
-               if (get_int(icon_visible) == 1)
-                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else
-                 set_state(PART:"padding_center_text1", "visible", 0.0);
-               if ((get_int(more_btn_visible) == 1) && (get_int(right_btn_visible) == 1)) {
-                  if (get_int(subtitle_visible) == 1)
-                    set_state(PART:"elm.text.title", "subtitle_right_more_button_is_set", 0.0);
-                  else
-                    set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
-                  set_state(PART:"elm.text.subtitle", "right_and_more_button", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
+               set_int(buttons_visible, get_int(buttons_visible) + 1);
+               set_state(PART:"bottom_right_padding", "visible", 0.0);
+               if (get_int(buttons_visible) >= 2)
+                 set_state(PART:"title_btns_padding", "visible", 0.0);
             }
          }
          program { name: "left_btn_hide";
             signal: "elm,state,title_left_btn,hide";
             source: "elm";
             script {
-               set_int(left_btn_visible, 0);
-               set_state(PART:"left_btn_separator", "default", 0.0);
-               if ((get_int(more_btn_visible) == 0) && (get_int(right_btn_visible) == 0)) {
-                  set_state(PART:"padding_center_text2", "default", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
-               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
-                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else if (get_int(large_padded_center_align) == 1)
-                  set_state(PART:"padding_center_text1", "visible", 0.0);
-               else if (get_int(icon_visible) == 1)
-                  set_state(PART:"padding_center_text1", "icon", 0.0);
-               else
-                  set_state(PART:"padding_center_text1", "default", 0.0);
+               set_int(buttons_visible, get_int(buttons_visible) - 1);
+               set_state(PART:"title_btns_padding", "default", 0.0);
+               if (get_int(buttons_visible) == 0)
+                 set_state(PART:"bottom_right_padding", "default", 0.0);
             }
          }
          program { name: "right_btn_show";
             signal: "elm,state,title_right_btn,show";
             source: "elm";
+            action: STATE_SET "visible" 0.0;
             script {
-               set_int(right_btn_visible, 1);
-               set_state(PART:"right_btn_separator", "visible", 0.0);
-               if (get_int(more_btn_visible) == 1) {
-                  if (get_int(subtitle_visible) == 1)
-                    set_state(PART:"elm.text.title", "subtitle_right_more_button_is_set", 0.0);
-                  else
-                    set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
-                  set_state(PART:"elm.text.subtitle", "right_and_more_button", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
-               if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
-                                                    (get_int(large_padded_center_align) == 1)))
-                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
-                 set_state(PART:"padding_center_text1", "visible", 0.0);
-               else if (get_int(icon_visible) == 1)
-                 set_state(PART:"padding_center_text1", "icon", 0.0);
-               else
-                 set_state(PART:"padding_center_text1", "default", 0.0);
+               set_int(buttons_visible, get_int(buttons_visible) + 1);
+               set_state(PART:"bottom_right_padding", "visible", 0.0);
+               if (get_int(buttons_visible) >= 2)
+                 set_state(PART:"title_btns_padding", "visible", 0.0);
             }
          }
          program { name: "right_btn_hide";
             signal: "elm,state,title_right_btn,hide";
             source: "elm";
+            action: STATE_SET "default" 0.0;
             script {
-               set_int(right_btn_visible, 0);
-               set_state(PART:"right_btn_separator", "default", 0.0);
-               if ((get_int(more_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
-                  set_state(PART:"padding_center_text2", "default", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
-               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
-                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else if (get_int(large_padded_center_align) == 1)
-                  set_state(PART:"padding_center_text1", "visible", 0.0);
-               else if (get_int(icon_visible) == 1)
-                  set_state(PART:"padding_center_text1", "icon", 0.0);
-               else
-                  set_state(PART:"padding_center_text1", "default", 0.0);
+               set_int(buttons_visible, get_int(buttons_visible) - 1);
+               set_state(PART:"title_btns_padding", "default", 0.0);
+               if (get_int(buttons_visible) == 0)
+                 set_state(PART:"bottom_right_padding", "default", 0.0);
             }
          }
          program { name: "more_btn_show";
-            signal: "elm,state,title_more_btn,show";
+            signal: "elm,state,toolbar_more_btn,show";
             source: "elm";
             script {
-               set_int(more_btn_visible, 1);
-               if (get_int(right_btn_visible) == 1) {
-                  if (get_int(subtitle_visible) == 1)
-                    set_state(PART:"elm.text.title", "subtitle_right_more_button_is_set", 0.0);
-                  else
-                    set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
-                  set_state(PART:"elm.text.subtitle", "right_and_more_button", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
-               if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
-                                                    (get_int(large_padded_center_align) == 1)))
-                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
-                 set_state(PART:"padding_center_text1", "visible", 0.0);
-               else if (get_int(icon_visible) == 1)
-                 set_state(PART:"padding_center_text1", "icon", 0.0);
-               else
-                 set_state(PART:"padding_center_text1", "default", 0.0);
+               emit("elm,state,toolbar_bg,show", "elm");
             }
          }
          program { name: "more_btn_hide";
-            signal: "elm,state,title_more_btn,hide";
+            signal: "elm,state,toolbar_more_btn,hide";
             source: "elm";
             script {
-               set_int(more_btn_visible, 0);
-               if ((get_int(right_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
-                  set_state(PART:"padding_center_text2", "default", 0.0);
-                  set_int(large_padded_center_align, 0);
-               }
-               else {
-                  set_state(PART:"padding_center_text2", "visible", 0.0);
-                  set_int(large_padded_center_align, 1);
-               }
-               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
-                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else if (get_int(large_padded_center_align) == 1)
-                  set_state(PART:"padding_center_text1", "visible", 0.0);
-               else if (get_int(icon_visible) == 1)
-                  set_state(PART:"padding_center_text1", "icon", 0.0);
-               else
-                  set_state(PART:"padding_center_text1", "default", 0.0);
+               emit("elm,state,toolbar_bg,hide", "elm");
             }
          }
-         program { name: "icon_show";
-            signal: "elm,state,icon,show";
+         program { name: "toolbar_button1_show";
+            signal: "elm,state,toolbar_button1,show";
             source: "elm";
             script {
-               set_int(icon_visible, 1);
-               if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
-                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
-               else
-                 set_state(PART:"padding_center_text1", "icon", 0.0);
+               emit("elm,state,toolbar_bg,show", "elm");
+               set_int(toolbar_buttons_visible, get_int(toolbar_buttons_visible) + 1);
+               if (get_int(toolbar_buttons_visible) >= 2)
+                 {
+                    set_state(PART:"toolbar_button1", "buttons_set", 0.0);
+                    set_state(PART:"toolbar_button2", "buttons_set", 0.0);
+                 }
             }
          }
-         program { name: "icon_hide";
-            signal: "elm,state,icon,hide";
+         program { name: "toolbar_button1_hide";
+            signal: "elm,state,toolbar_button1,hide";
             source: "elm";
             script {
-               set_int(icon_visible, 0);
-               if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
-                 set_state(PART:"padding_center_text1", "visible", 0.0);
-               else
-                 set_state(PART:"padding_center_text1", "default", 0.0);
+               emit("elm,state,toolbar_bg,hide", "elm");
+               set_int(toolbar_buttons_visible, get_int(toolbar_buttons_visible) - 1);
+               set_state(PART:"toolbar_button1", "default", 0.0);
+               set_state(PART:"toolbar_button2", "default", 0.0);
             }
          }
-         program { name: "controlbar_show";
-            signal: "elm,state,controlbar,show";
+         program { name: "toolbar_button2_show";
+            signal: "elm,state,toolbar_button2,show";
             source: "elm";
             script {
-               emit("elm,state,controlbar_bg,show", "elm");
+               emit("elm,state,toolbar_bg,show", "elm");
+               set_int(toolbar_buttons_visible, get_int(toolbar_buttons_visible) + 1);
+               if (get_int(toolbar_buttons_visible) >= 2)
+                 {
+                    set_state(PART:"toolbar_button1", "buttons_set", 0.0);
+                    set_state(PART:"toolbar_button2", "buttons_set", 0.0);
+                 }
             }
          }
-         program { name: "controlbar_hide";
-            signal: "elm,state,controlbar,hide";
+         program { name: "toolbar_button2_hide";
+            signal: "elm,state,toolbar_button2,hide";
             source: "elm";
             script {
-               emit("elm,state,controlbar_bg,hide", "elm");
+               emit("elm,state,toolbar_bg,hide", "elm");
+               set_int(toolbar_buttons_visible, get_int(toolbar_buttons_visible) - 1);
+               set_state(PART:"toolbar_button1", "default", 0.0);
+               set_state(PART:"toolbar_button2", "default", 0.0);
             }
          }
-         program { name: "controlbar_bg_show";
-            signal: "elm,state,controlbar_bg,show";
+         program { name: "toolbar_bg_show";
+            signal: "elm,state,toolbar_bg,show";
             source: "elm";
             script {
-               set_state(PART:"controlbar_bg", "show", 0.0);
-               set_int(cbar_bg, get_int(cbar_bg) + 1);
+               set_state(PART:"toolbar_bg", "visible", 0.0);
+               set_int(tbar_bg, get_int(tbar_bg) + 1);
             }
          }
-         program { name: "controlbar_bg_hide";
-            signal: "elm,state,controlbar_bg,hide";
+         program { name: "toolbar_bg_hide";
+            signal: "elm,state,toolbar_bg,hide";
             source: "elm";
             script {
-               set_int(cbar_bg, get_int(cbar_bg) - 1);
-               if (get_int(cbar_bg) <= 0)
-                 set_state(PART:"controlbar_bg", "default", 0.0);
+               set_int(tbar_bg, get_int(tbar_bg) - 1);
+               if (get_int(tbar_bg) <= 0)
+                 set_state(PART:"toolbar_bg", "default", 0.0);
             }
          }
-         program { name: "optionheader_show";
-            signal: "elm,state,optionheader,show";
+         program { name: "toolbar_open_internal";
+            signal: "elm,state,toolbar,open,internal";
             source: "elm";
             script {
-               set_state(PART:"optionheader_bg", "show", 0.0);
-               set_state(PART:"optionheader_arrow", "show", 0.0);
-               set_int(oh_show, 1);
+               set_int(tbar_close, 0);
+               set_state(PART:"toolbar_bg", "visible", 0.0);
             }
          }
-         program { name: "optionheader_hide";
-            signal: "elm,state,optionheader,hide";
+         program { name: "toolbar_close_internal";
+            signal: "elm,state,toolbar,close,internal";
             source: "elm";
             script {
-               set_state(PART:"optionheader_bg", "default", 0.0);
-               set_state(PART:"optionheader_arrow", "default", 0.0);
-               set_int(oh_show, 0);
-            }
-         }
-         program { name: "optionheader_open";
-            signal: "elm,state,optionheader,open";
-            source: "";
-            action: STATE_SET "show" 0.0;
-            target: "optionheader_bg";
-            target: "optionheader_arrow";
-            transition: LINEAR 0.2;
-            after: "optionheader_open_set";
-         }
-         program { name: "optionheader_close";
-            signal: "elm,state,optionheader,close";
-            source: "";
-            action: STATE_SET "default" 0.0;
-            target: "optionheader_bg";
-            target: "optionheader_arrow";
-            transition: LINEAR 0.2;
-            after: "optionheader_close_set";
-         }
-         program { name: "optionheader_instant_open";
-            signal: "elm,state,optionheader,instant_open";
-            source: "";
-            action: STATE_SET "show" 0.0;
-            target: "optionheader_bg";
-            target: "optionheader_arrow";
-            after: "optionheader_open_set";
-         }
-         program { name: "optionheader_instant_close";
-            signal: "elm,state,optionheader,instant_close";
-            source: "";
-            action: STATE_SET "default" 0.0;
-            target: "optionheader_bg";
-            target: "optionheader_arrow";
-            after: "optionheader_close_set";
-         }
-         program { name: "optionheader_close_set";
-            signal: "elm,state,optionheader,close_set";
-            source: "";
-            script {
-               set_int(oh_close, 1);
-            }
-         }
-         program { name: "optionheader_open_set";
-            signal: "elm,state,optionheader,open_set";
-            source: "";
-            script {
-               set_int(oh_close, 0);
+               set_int(tbar_close, 1);
+               set_state(PART:"toolbar_bg", "default", 0.0);
             }
          }
-         program { name: "controlbar_open";
-            signal: "elm,state,controlbar,open";
+         program { name: "toolbar_open";
+            signal: "elm,state,toolbar,open";
             source: "";
-            action: STATE_SET "show" 0.0;
-            target: "controlbar_bg";
+            action: STATE_SET "visible" 0.0;
+            target: "toolbar_bg";
             transition: LINEAR 0.2;
+            after: "toolbar_open_internal";
          }
-         program { name: "controlbar_close";
-            signal: "elm,state,controlbar,close";
+         program { name: "toolbar_close";
+            signal: "elm,state,toolbar,close";
             source: "";
             action: STATE_SET "default" 0.0;
-            target: "controlbar_bg";
+            target: "toolbar_bg";
             transition: LINEAR 0.2;
+            after: "toolbar_close_internal";
          }
-         program { name: "controlbar_instant_open";
-            signal: "elm,state,controlbar,instant_open";
+         program { name: "toolbar_instant_open";
+            signal: "elm,state,toolbar,instant_open";
             source: "";
             script {
-               emit("elm,state,prev_btn,show", "elm");
-               emit("elm,state,controlbar,show", "elm");
+               emit("elm,state,toolbar,open,internal", "elm");
             }
          }
-         program { name: "controlbar_instant_close";
-            signal: "elm,state,controlbar,instant_close";
+         program { name: "toolbar_instant_close";
+            signal: "elm,state,toolbar,instant_close";
             source: "";
             script {
-               emit("elm,state,prev_btn,hide", "elm");
-               emit("elm,state,controlbar,hide", "elm");
+               emit("elm,state,toolbar,close,internal", "elm");
             }
          }
          program { name: "show_finished";
@@ -2884,6 +1565,23 @@ collections {
             source: "click_event_area";
             action: SIGNAL_EMIT "elm,action,title,clicked" "";
          }
+         program {
+            name: "display_mode_compress";
+            signal: "display,mode,compress";
+            source: "";
+            script {
+               set_state(PART:"toolbar_bg", "default", 0.0);
+            }
+         }
+         program {
+            name: "display_mode_default";
+            signal: "display,mode,default";
+            source: "";
+            script {
+               if ((get_int(tbar_bg) > 0) && (get_int(tbar_close) == 0))
+                  set_state(PART:"toolbar_bg", "visible", 0.0);
+            }
+         }
       }
    }
 
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index bf704fd..12d23ad
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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\selectioninfo.edc
old mode 100755 (executable)
new mode 100644 (file)
index 8646f0b..79b7b60
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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"
 
@@ -115,6 +115,38 @@ collections {
                                }
                         }
 
+                        part { name: "setasview.contents";
+                               type: SWALLOW;
+                               scale: 1;
+                               repeat_events: 0;
+                               description { state: "default" 0.0;
+                                       color: 255 0 0 100;
+                                       align: 0.0 0.0;
+                                       rel1.relative: 0.0 0.0;
+                                       rel1.to_x: "bg";
+                                       rel1.to_y: "bg";
+                                       rel1.offset: 0 -10;
+                                       rel2.relative: 1.0 0.0;
+                                       rel2.to_x: "bg";
+                                       rel2.to_y: "toolbar_bg";
+                                       visible: 1;
+                               }
+                       }
+
+                        part { name: "toolbar_bg";
+                               type: RECT;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 0 NAVIFRAME_TOOLBAR_HEIGHT_INC;
+                                       max: 999999 NAVIFRAME_TOOLBAR_HEIGHT_INC;
+                                       fixed: 0 1;
+                                       align: 0.0 1.0;
+                                       visible: 0;
+                                       rel1 { to: "bg"; }
+                                       rel2 { to: "bg"; }
+                                       color: NAVIFRAME_TOOLBAR_BG_COLOR_INC;
+                               }
+                       }
 
                }
                programs {
@@ -225,6 +257,25 @@ collections {
                       visible: 1;
                    }
                 }
+
+                part {
+                               name: "selectioninfo";
+                               type: SWALLOW;
+                               description { state: "default" 0.0;
+                                       fixed: 0 1;
+                                       align: 0.5 1.0;
+                                       rel1 {
+                                               relative: 0.0 0.0;      to:"controlbar_bg";
+                                       }
+                                       rel2 {
+                                               relative: 1.0 0.0;      to:"controlbar_bg";
+                                       }
+                               }
+                               description { state: "hide" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
                }
 
                programs {
@@ -236,6 +287,7 @@ collections {
                                action: STATE_SET "hide" 0.0;
                                target: "controlbar_clip";
                                target: "controlbar_bg";
+                               target: "selectioninfo";
                        }
 
                        program {
@@ -245,6 +297,7 @@ collections {
                                action: STATE_SET "default" 0.0;
                                target: "controlbar_clip";
                                target: "controlbar_bg";
+                               target: "selectioninfo";
                        }
                }
        }
old mode 100755 (executable)
new mode 100644 (file)
index 0e3aafa..e52a9fa
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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.
+ */
 
 // slider layout
 
@@ -34,7 +34,8 @@ group {
                        scale: 1;
                        description {
                                state: "default" 0.0;
-                               color: 0 0 0 255;
+                               //color: 0 0 0 255;
+                               color: 255 255 255 255;
                                visible: 1;
                                rel1 { relative: 0.0 0.0;}
                                rel2 { relative: 1.0 1.0;}
@@ -71,6 +72,20 @@ group {
                                visible: 1;
                        }
                    }
+#if 0
+               part { name: "clipper";
+                       type: RECT;
+                       mouse_events: 0;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               color: 128 255 255 255;
+                               visible: 1;
+                               rel1 { relative: 0.0 0.0;}
+                               rel2 { relative: 1.0 1.0;}
+                       }
+               }
+#endif
 
 #if 1
                part { name: "slider.icon";
old mode 100755 (executable)
new mode 100644 (file)
similarity index 58%
rename from main/src/control/ivug-filter.h
rename to main/layout/ivug-slideshow-view.edc
index 482740d..ee01809
@@ -1,41 +1,34 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-
-#ifndef __IVUG_FILTER_H__
-#define __IVUG_FILTER_H__
-
-#include "ivug-parameter.h"
-#include "ivug-medialist.h"
-#include <Eina.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-Filter_struct *ivug_data_filter_create(const ivug_parameter *param);
-
-Filter_struct *ivug_data_filter_copy(const Filter_struct *filter);
-
-void ivug_data_filter_delete(Filter_struct *filter);
-
-#ifdef __cplusplus
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *       http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+collections {
+       group {
+               name: "ssview";
+               parts {
+                       part { name: "background";
+                               type: RECT;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       color: 0 0 0 0;         // Invisible area
+                                       visible: 1;
+                                       rel1 { relative: 0.0 0.0;}
+                                       rel2 { relative: 1.0 1.0;}
+                               }
+                       }
+               }
+       }
 }
-#endif
-
-
-#endif // __IVUG_FILTER_H__
-
old mode 100755 (executable)
new mode 100644 (file)
index 0129d0e..5f3a14a
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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
@@ -53,7 +53,7 @@
 #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_HEIGHT_INC 60
 #define LAYOUT_INDICATOR_COLOR_INC 41 61 94 255        // Same as Naviframe
 
 #define NAVIFRAME_TEXT_PADDING_INC 144
@@ -78,6 +78,7 @@
 #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_PADDING_INC 16 0
 
 #define NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 10
 #define NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 10
@@ -90,6 +91,8 @@
 #define NAVIFRAME_PREV_BTN_W_INC 124
 #define NAVIFRAME_CONTROLBAR_PADDING_INC 5
 #define NAVIFRAME_SEGMENT_TITLE_H_INC 136
+#define NAVIFRAME_SEGMENT_TITLE_FUNC_BTN_SIZE_INC 118 62
+
 
 #define NAVIFRAME_TITLE_SEGMENT_FONT_SIZE_INC 28
 #define NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC 50
 
 #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
+// List bg color
+#define GENLIST_LIST_BG_COLOR                       248 246 239 102
+#define GENLIST_DIALOGUE_BG_COLOR                   248 246 239 255
+#define GENLIST_LIST_PRESS_COLOR                    87 135 194 255
+#define GENLIST_LIST_DIM_COLOR                      219 217 212 255
+#define GENLIST_LIST_LINE1_COLOR                    211 209 203 255
+#define GENLIST_LIST_LINE2_COLOR                    255 255 255 255
+#define GENLIST_LIST_DIVIDER1_COLOR                 185 184 178 255
+#define GENLIST_LIST_DIVIDER2_COLOR                 255 255 255 255
+#define GENLIST_LIST_CENTERLINE1_COLOR              206 205 202 255
+#define GENLIST_SELECT_ALL_BG_COLOR                 220 218 211 255
+
+// Group Index
+#define GENLIST_GROUPINDEX_LIST_SIZE                     32
+#define GENLIST_GROUPINDEX_LIST_COLOR                    59 115 182 255
+#define GENLIST_GROUPINDEX_LIST_FOCUS_COLOR              255 255 255 255
+
+#define GENLIST_GROUPINDEX_LIST_BG_COLOR                 248 246 239 255
+#define GENLIST_GROUPINDEX_LIST_PRESS_COLOR              132 162 198 255
+#define GENLIST_GROUPINDEX_LINE_COLOR                    59 115 182 255
+#define GENLIST_GROUPINDEX_LINE_FOCUS_COLOR              255 255 255 255
+
+// Genlist Text
+#define GENLIST_LIST_MAIN_TEXT_SIZE                         44
+#define GENLIST_LIST_MAIN_TEXT_UNREAD_COLOR                 0 0 0 255
+#define GENLIST_LIST_MAIN_TEXT_UNREAD_COLOR_STYLE           "#000000FF"
+#define GENLIST_LIST_MAIN_TEXT_UNREAD_DIM_COLOR             0 0 0 102
+#define GENLIST_LIST_MAIN_TEXT_UNREAD_DIM_COLOR_STYLE       "#00000066"
+#define GENLIST_LIST_MAIN_TEXT_READ_COLOR                   128 128 128 255
+#define GENLIST_LIST_MAIN_TEXT_READ_DIM_COLOR               128 128 128 204
+#define GENLIST_LIST_MAIN_TEXT_FOCUS_COLOR                  255 255 255 255
+#define GENLIST_LIST_MAIN_TEXT_FOCUS_COLOR_STYLE            "#FFFFFFFF"
+
+#define GENLIST_LIST_SUB_TEXT_SIZE                          32
+#define GENLIST_LIST_SUB_TEXT_DEFAULT_COLOR                 128 128 128 255
+#define GENLIST_LIST_SUB_TEXT_DEFAULT_COLOR_STYLE           "#808080FF"
+#define GENLIST_LIST_SUB_TEXT_DEFAULT_DIM_COLOR             128 128 128 204
+#define GENLIST_LIST_SUB_TEXT_DEFAULT_DIM_COLOR_STYLE       "#808080CC"
+#define GENLIST_LIST_SUB_TEXT_SETTINGS_COLOR                59 115 182 255
+#define GENLIST_LIST_SUB_TEXT_SETTINGS_COLOR_STYLE          "#3B73B6FF"
+#define GENLIST_LIST_SUB_TEXT_SETTINGS_DIM_COLOR            59 115 182 76
+#define GENLIST_LIST_SUB_TEXT_SETTINGS_DIM_COLOR_STYLE      "#3B73B64C"
+#define GENLIST_LIST_SUB_TEXT_FOCUS_COLOR                   255 255 255 255
+#define GENLIST_LIST_SUB_TEXT_FOCUS_COLOR_STYLE             "#FFFFFFFF"
+
+#define GENLIST_CONTENTS_TEXT_SIZE                          28
+#define GENLIST_CONTENTS_TEXT_COLOR                         128 128 128 255
+#define GENLIST_CONTENTS_TEXT_COLOR_STYLE                   "#808080FF"
+
+#define GENLIST_LIST_BUBBLE_TEXT_SIZE                       32
+#define GENLIST_LIST_BUBBLE_TEXT_COLOR                      249 249 249 255
+
+// Dialogue group
+#define GENLIST_DIALOGUE_GROUP_TITLE_SIZE           32
+#define GENLIST_DIALOGUE_GROUP_TITLE_COLOR          59 115 182 255
+
+#define GENLIST_APPS_NAME_SIZE                          30
+#define GENLIST_APPS_NAME_COLOR                         128 128 128 255
+#define GENLIST_APPS_INC_SIZE                           30
+#define GENLIST_APPS_INC_COLOR                          0 0 0 255
+#define GENLIST_APPS_RATING_SIZE                        24
+#define GENLIST_APPS_RATING_COLOR                       128 128 128 255
+#define GENLIST_APPS_PRICE_SIZE                         24
+#define GENLIST_APPS_PRICE_ORIGINAL_COLOR               59 115 182 255
+#define GENLIST_APPS_PRICE_SALE_COLOR                   229 33 52 255
+#define GENLIST_APPS_PRICE_FREE_COLOR                   59 115 182 255
+
+#define DIALOGUE_PASSWORD_TITLE_SIZE                    32
+#define DIALOGUE_PASSWORD_TITLE_COLOR                   128 128 128 255
+
+#define GENLIST_DIALOGUE_GROUP_HELP_TEXT_SIZE           32
+#define GENLIST_DIALOGUE_GROUP_HELP_TEXT_COLOR_STYLE    "#808080FF"
+#define GENLIST_PART_MATCH_TAG_COLOR                    "+ color=#3F8DAD"
+
+
+#define LAYOUT_INDICATOR_HEIGHT_INC 60
 #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_TITLE_PREV_BTN_BG_SIZE_INC 144       //temp
+
+#define NAVIFRAME_TITLE_BG_COLOR_INC 248 246 239 0     //fixed by ivug
+#define NAVIFRAME_TOOLBAR_BG_COLOR_INC 248 246 239 255
+#define NAVIFRAME_TITLE_TOP_PADDING_INC 0 32
+#define NAVIFRAME_TITLE_H_INC 111
+#define NAVIFRAME_TAB_TITLE_H_INC 165
+#define NAVIFRAME_TOOLBAR_HEIGHT_INC 98
+#define NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC 68 68
+#define NAVIFRAME_PREV_FUNC_BTN_SIZE_INC 60 60
+#define NAVIFRAME_TITLE_TAB_H_INC 68
+#define NAVIFRAME_TITLE_TAB_LARGE_H_INC 111
+#define NAVIFRAME_TITLE_TAB_FONT_SIZE_INC 44
+#define NAVIFRAME_TITLE_TAB_TEXT_H_INC 87
+#define NAVIFRAME_TITLE_FONT_SIZE_INC 56
+#define NAVIFRAME_TITLE_SMALL_FONT_SIZE_INC 44
+#define NAVIFRAME_ICON_SIZE_INC 38 38
+#define NAVIFRAME_PADDING_INC 16 0
+#define NAVIFRAME_PADDING2_INC 18 0
+#define NAVIFRAME_PADDING3_INC 8 0
+#define NAVIFRAME_BOTTOM_TEXT_PADDING_INC 0 11
+#define NAVIFRAME_BOTTOM_RIGHT_PADDING_INC 26 11
+#define NAVIFRAME_BOTTOM_PADDING_INC 0 10
+#define NAVIFRAME_TOOLBAR_BUTTON_BG_PADDING_INC 115 0
+#define NAVIFRAME_TOOLBAR_BUTTONS_PADDING_INC 15
+#define NAVIFRAME_ICON_PADDING_INC 70 0
+#define NAVIFRAME_TITLE_TEXT_COLOR_INC 59 115 182 255
+#define NAVIFRAME_SUBTITLE_TEXT_COLOR_INC 59 115 182 255
 #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
 
 #endif
 
+
+
old mode 100755 (executable)
new mode 100644 (file)
index 53dba05..1cab618
Binary files a/main/res/images/01_Control icon/01_controlbar_icon_trim.png and b/main/res/images/01_Control icon/01_controlbar_icon_trim.png differ
diff --git a/main/res/images/01_Control icon/T01_1_controlbar_icon_Rotate left.png b/main/res/images/01_Control icon/T01_1_controlbar_icon_Rotate left.png
new file mode 100644 (file)
index 0000000..91e6ec2
Binary files /dev/null and b/main/res/images/01_Control icon/T01_1_controlbar_icon_Rotate left.png differ
diff --git a/main/res/images/01_Control icon/T01_1_controlbar_icon_Rotate right.png b/main/res/images/01_Control icon/T01_1_controlbar_icon_Rotate right.png
new file mode 100644 (file)
index 0000000..a7deebf
Binary files /dev/null and b/main/res/images/01_Control icon/T01_1_controlbar_icon_Rotate right.png differ
diff --git a/main/res/images/01_Control icon/T01_1_title_icon_device.png b/main/res/images/01_Control icon/T01_1_title_icon_device.png
new file mode 100644 (file)
index 0000000..9c96403
Binary files /dev/null and b/main/res/images/01_Control icon/T01_1_title_icon_device.png differ
old mode 100755 (executable)
new mode 100644 (file)
similarity index 68%
rename from main/layout/icons/01_Header icon/01_header_icon_done.png
rename to main/res/images/01_Control icon/T01_controlbar_icon_addtag.png
index d771640..a554ce3
Binary files a/main/layout/icons/01_Header icon/01_header_icon_done.png and b/main/res/images/01_Control icon/T01_controlbar_icon_addtag.png differ
diff --git a/main/res/images/Popup_icon/T01_1_popup_icon_Crop.png b/main/res/images/Popup_icon/T01_1_popup_icon_Crop.png
deleted file mode 100755 (executable)
index 40cff3c..0000000
Binary files a/main/res/images/Popup_icon/T01_1_popup_icon_Crop.png and /dev/null 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
deleted file mode 100755 (executable)
index 14b8895..0000000
Binary files a/main/res/images/Popup_icon/T01_1_popup_icon_Paste from Clipboard.png and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/main/res/po/.pot b/main/res/po/.pot
deleted file mode 100755 (executable)
index 1f0dd57..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-# 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/update-po.sh b/main/res/po/update-po.sh
deleted file mode 100755 (executable)
index 8315090..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-
-PACKAGE=ug-image-viewer-efl
-SRCROOT=../..
-POTFILES=POTFILES.in
-
-#ALL_LINGUAS= am az be ca cs da de el en_CA en_GB es et fi fr hr hu it ja ko lv mk ml ms nb ne nl pa pl pt pt_BR ru rw sk sl sr sr@Latn sv ta tr uk vi zh_CN zh_TW
-ALL_LINGUAS="en zh_CN fr_FR  ja_JP  nl_NL  ru_RU  zh_TW de_DE  el_GR  es_ES it_IT ko_KR pt_PT tr_TR zh_HK"
-
-XGETTEXT=/usr/bin/xgettext
-MSGMERGE=/usr/bin/msgmerge
-
-echo -n "Make ${PACKAGE}.pot  "
-if [ ! -e $POTFILES ] ; then
-       echo "$POTFILES not found"
-       exit 1
-fi
-
-$XGETTEXT --default-domain=${PACKAGE} --directory=${SRCROOT} \
-               --add-comments --keyword=_ --keyword=N_ --files-from=$POTFILES \
-&& test ! -f ${PACKAGE}.po \
-       || (rm -f ${PACKAGE}.pot && mv ${PACKAGE}.po ${PACKAGE}.pot)
-
-if [ $? -ne 0 ]; then
-       echo "error"
-       exit 1
-else
-       echo "done"
-fi
-
-for LANG in $ALL_LINGUAS; do 
-       echo "$LANG : "
-
-       if [ ! -e $LANG.po ] ; then
-               sed 's/CHARSET/UTF-8/g' ${PACKAGE}.pot > ${LANG}.po
-               echo "${LANG}.po created"
-       else
-               if $MSGMERGE ${LANG}.po ${PACKAGE}.pot -o ${LANG}.new.po ; then
-                       if cmp ${LANG}.po ${LANG}.new.po > /dev/null 2>&1; then
-                               rm -f ${LANG}.new.po
-                       else
-                               if mv -f ${LANG}.new.po ${LANG}.po; then
-                                       echo "" 
-                               else
-                                       echo "msgmerge for $LANG.po failed: cannot move $LANG.new.po to $LANG.po" 1>&2
-                                       rm -f ${LANG}.new.po
-                                       exit 1
-                               fi
-                       fi
-               else
-                       echo "msgmerge for $LANG failed!"
-                       rm -f ${LANG}.new.po
-               fi
-       fi
-       echo ""
-done
-
diff --git a/main/src/control/ivug-buddy-ug.cpp b/main/src/control/ivug-buddy-ug.cpp
new file mode 100644 (file)
index 0000000..25f4121
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+ * 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-buddy-view.h"
+#include "ivug-buddy-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-BUDDY-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);
+}
+
+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));
+       if(crop_ug == NULL)
+       {
+               MSG_ERROR("crop_ug calloc error");
+               return NULL;
+       }
+
+       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");
+               free(crop_ug);
+               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);
+       evas_object_smart_callback_add(layout, "download,failed", _on_msg_load_failed, crop_ug);
+
+       crop_ug->crop_view = crop_view;
+       crop_ug->layout = layout;
+       crop_ug->parent = parent;
+       crop_ug->filepath = strdup(filepath);
+
+       crop_ug->navi_bar = elm_naviframe_add(parent);
+
+       evas_object_name_set(crop_ug->navi_bar, "Crop ug naviframe");
+
+// Layout life cycle is controlled by application explictily.
+       elm_naviframe_content_preserve_on_pop_set(crop_ug->navi_bar, EINA_TRUE);
+
+       Evas_Object *back_btn = ivug_button_add(crop_ug->navi_bar, "naviframe/end_btn/default",
+               IDS_BACK, NULL, on_crop_view_btn_back_clicked, crop_ug);
+
+       crop_ug->navi_it = elm_naviframe_item_push(crop_ug->navi_bar, IDS_LOADING, back_btn, NULL, crop_ug->layout, NULL);
+       elm_naviframe_item_title_visible_set(crop_ug->navi_it, EINA_FALSE);
+
+       ivug_crop_view_create_menu(crop_view, crop_ug->navi_bar);
+
+       return crop_ug;
+}
+
+Evas_Object * ivug_crop_ug_get_layout(IvugCropUG * crop_ug)
+{
+       IV_ASSERT(crop_ug != NULL);
+
+       return crop_ug->navi_bar;
+}
+
+bool ivug_crop_ug_destroy(IvugCropUG * crop_ug)
+{
+       IV_ASSERT(crop_ug != NULL);
+
+       if(crop_ug->filepath)
+       {
+               free(crop_ug->filepath);
+               crop_ug->filepath = 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;
+}
+
+bool ivug_crop_ug_start(IvugCropUG * crop_ug)
+{
+       MSG_HIGH("ivug_crop_ug_start");
+       IV_ASSERT(crop_ug != NULL);
+
+       ivug_crop_view_file_set(crop_ug->crop_view, crop_ug->filepath);
+
+       return true;
+}
+
old mode 100755 (executable)
new mode 100644 (file)
similarity index 56%
rename from main/src/ug-image-viewer.h
rename to main/src/control/ivug-buddy-ug.h
index 4c21b7c..122507f
@@ -1,49 +1,51 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-
-#ifndef __UG_IMAGE_VIEWER_H__
-#define __UG_IMAGE_VIEWER_H__
-
-#include <Elementary.h>
-
-#include "ivug-common.h"
-
-typedef struct ug_data {
-       Evas_Object *parent_layout;
-       Evas_Object *base;                      // UG layout
-
-// View Data;
-       Ivug_MainView *main_view;
-       Ivug_SetAsView *setas_view;
-       IvugCropUG *crop_ug;
-
-       ivug_parameter* ivug_param;
-
-       bool bUseBlackTheme;            // TODO : SetAs view from setting does not use black theme
-} _AppData;
+/*
+ * 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_BUDDY_UG_H__
+#define __IVUG_BUDDY_UG_H__
+
+#include "ivug-buddy-view.h"
+
+typedef struct {
+       Ivug_BuddyView *buddy_view;
+
+       Evas_Object *layout;
+       Evas_Object *parent;
+
+       Evas_Object *navi_bar;
+       Elm_Object_Item *navi_it;
+
+       char *filepath;
+} IvugBuddyUG;
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-/* Add functions here */
+IvugBuddyUG * ivug_buddy_ug_create(Evas_Object *parent, const char *filepath);
+
+Evas_Object * ivug_buddy_ug_get_layout(IvugBuddyUG * buddy_ug);
+
+bool ivug_buddy_ug_destroy(IvugBuddyUG * buddy_ug);
+
+bool ivug_buddy_ug_start(IvugBuddyUG * buddy_ug);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* __UG_IMAGE_VIEWER_H__ */
+#endif         // __IVUG_BUDDY_UG_H__
 
old mode 100755 (executable)
new mode 100644 (file)
index d6b8b95..81c88ca
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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"
@@ -22,6 +22,8 @@
 #include <ui-gadget-module.h>          // ug_destroy_me
 #include "ivug-context.h"
 
+#include "ivug-callback.h"
+
 #define MAX_INSTALNCE (5)
 
 typedef struct
@@ -38,6 +40,8 @@ typedef struct
 
        callback_handle_t *callback_handle;
 
+       bool bDesktopMode;
+
 } AppData;
 
 static Eina_List *ContextList = NULL;
@@ -156,6 +160,27 @@ gGetCallbackHandle(void)
        return ugContext->callback_handle;
 }
 
+bool
+gIsDesktopMode(void)
+{
+       AppData *ugContext;
+       ugContext = eina_list_data_get(ContextList);
+
+       IV_ASSERT(ugContext != NULL);
+
+       return ugContext->bDesktopMode;
+}
+
+void
+gSetDesktopMode(bool isDesktop)
+{
+       AppData *ugContext;
+       ugContext = eina_list_data_get(ContextList);
+
+       IV_ASSERT(ugContext != NULL);
+
+       ugContext->bDesktopMode = isDesktop;
+}
 
 #define IVUG_NAVIFRAME_NAME EDJ_PATH"/ivug-naviframe.edj"
 #define IVUG_TOOLBAR_NAME EDJ_PATH"/ivug-toolbar.edj"
@@ -177,7 +202,7 @@ static char *edj[] = {
 bool
 ivug_context_init(ui_gadget_h ug)
 {
-       AppData *Context = malloc(sizeof(AppData));
+       AppData *Context = (AppData *)calloc(1, sizeof(AppData));
        if(Context == NULL)
        {
                MSG_IVUG_ERROR("Cannot allock memory");
@@ -206,6 +231,9 @@ ivug_context_init(ui_gadget_h ug)
        Context->win_w = w;
        Context->win_h = h;
 
+
+       PERF_CHECK_BEGIN(LVL2, "theme add");
+
        int i = 0;
 
        Context->th = elm_theme_new();
@@ -219,12 +247,18 @@ ivug_context_init(ui_gadget_h ug)
                elm_theme_extension_add(Context->th, edj[i]);
        }
 
+       PERF_CHECK_END(LVL2, "theme add");
+
        ContextList = eina_list_prepend(ContextList, Context);
 
        MSG_IVUG_HIGH("Append to list. Context=0x%08x", Context);
 
 #ifdef USE_NEW_DB_API
+       PERF_CHECK_BEGIN(LVL2, "media svc connect");
+
        ivug_db_create();
+
+       PERF_CHECK_END(LVL2, "media svc connect");
 #endif
 
        Context->callback_handle = ivug_callback_register();
@@ -234,6 +268,13 @@ ivug_context_init(ui_gadget_h ug)
                goto ERROR;
        }
 
+       Context->bDesktopMode = false;
+       const char *profile = elm_config_profile_get();
+       if (strcmp(profile,"desktop") == 0)
+       {
+               Context->bDesktopMode = true;
+       }
+
        bindtextdomain(IVUG_TEXT_DOMAIN, IVUG_LOCALEDIR);       //bind text domain
        return TRUE;
 
@@ -245,6 +286,7 @@ ERROR:
                ivug_callback_unregister(Context->callback_handle);
        }
 
+
 #ifdef USE_NEW_DB_API
        ivug_db_destroy();
 #endif
@@ -274,7 +316,13 @@ ERROR:
 bool
 ivug_context_deinit(ui_gadget_h ug)
 {
-       AppData *Context;
+       AppData *Context = NULL;
+
+       if(ContextList == NULL)
+       {
+               MSG_IVUG_ERROR("ContextList is NULL");
+               return false;
+       }
 
        Eina_List *l = NULL;
        Eina_List *l_next = NULL;
@@ -283,19 +331,23 @@ ivug_context_deinit(ui_gadget_h ug)
        {
                if(Context == NULL)
                {
-                       MSG_SDATA_ERROR("Context is NULL");
+                       MSG_IVUG_ERROR("Context is NULL");
                        return false;
                }
                if (Context->ug == ug)
                {
                        ContextList = eina_list_remove_list(ContextList, l);
+                       MSG_IVUG_HIGH("Find ug handle(0x%08x) from ContextList.", ug);
+
                        break;
                }
        }
 
        if(Context->callback_handle)
        {
+               MSG_IVUG_HIGH("Removing Callback");
                ivug_callback_unregister(Context->callback_handle);
+               Context->callback_handle = NULL;
        }
 
 #ifdef USE_NEW_DB_API
@@ -326,37 +378,19 @@ ivug_context_deinit(ui_gadget_h ug)
 
 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) {
+       char *fname = strrchr(file, '/');
 
-               MSG_IMAGEVIEW_HIGH("Get ug handle = 0x%08x", ugContext->ug);
+       if (NULL != ugContext)
+       {
+               MSG_IMAGEVIEW_HIGH("Request to destory ug. UGhandle(0x%08x) from L(%d) %s", ugContext->ug, line, fname);
                ug_destroy_me(ugContext->ug);
-       } else {
-               MSG_IMAGEVIEW_HIGH("ugContext is NULL.");
+       }
+       else
+       {
+               MSG_IMAGEVIEW_WARN("ugContext is NULL. from L(%d) %s", line, fname);
        }
 
 }
old mode 100755 (executable)
new mode 100644 (file)
index 69e9270..b7d2839
@@ -1,25 +1,29 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+
+/*
+ * 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>
 
 /*
@@ -58,9 +62,16 @@ gGetUGHandle(void);
 Evas_Object *
 gGetCurrentWindow(void);
 
+
 callback_handle_t *
 gGetCallbackHandle(void);
 
+bool
+gIsDesktopMode(void);
+
+void
+gSetDesktopMode(bool isDesktop);
+
 int gGetScreenWidth();
 int gGetScreenHeight();
 
@@ -68,4 +79,4 @@ int gGetScreenHeight();
 }
 #endif
 
-#endif //__IVUG_CONTEXT_H__
\ No newline at end of file
+#endif //__IVUG_CONTEXT_H__
old mode 100755 (executable)
new mode 100644 (file)
index 13bcb40..7f1a7a6
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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>
@@ -79,15 +79,97 @@ static void  _ivug_crop_view_cancel_clicked_cb(void *data, Evas_Object *obj, voi
 }
 
 static void  _ivug_crop_view_destroyed_cb(void *data, Evas_Object *obj, void *event_info)
-{\r
+{
+       IvugCropUG *crop_ug = (IvugCropUG *)data;
+
+       crop_ug->crop_view = NULL;
+}
+
+static void on_crop_view_btn_back_clicked(void *data, Evas_Object *obj, void *event_info)
+{
        IvugCropUG *crop_ug = (IvugCropUG *)data;
 
+       ivug_crop_view_destroy(crop_ug->crop_view);
+
        crop_ug->crop_view = NULL;
+
+       _send_result(gGetUGHandle(), "crop_image_path", NULL, NULL, NULL);
+
+       MSG_HIGH("Start destroy ug");
+       ug_destroy_me(gGetUGHandle());
+}
+
+static void  _ivug_crop_view_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       IvugCropUG *crop_ug = (IvugCropUG *)data;
+       bool bShowMenu = (bool)event_info;
+
+       if(bShowMenu)
+       {
+               elm_object_item_signal_emit(crop_ug->navi_it, "elm,state,toolbar,open", "");
+       }
+       else
+       {
+               elm_object_item_signal_emit(crop_ug->navi_it, "elm,state,toolbar,close", "");
+       }
+}
+
+static Evas_Object*
+_show_exit_popup( Evas_Object *parent, const char *title, const char *desc, void *data)
+{
+       MSG_SETAS_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_cancel_clicked_cb, data);
+
+       evas_object_show(style1_popup);
+       evas_object_layer_set(style1_popup, EVAS_LAYER_MAX);
+
+       return style1_popup;
+}
+
+static void
+_on_msg_load_failed(void *data, Evas_Object *obj, void *event_info)
+{
+       int error = (int)event_info;
+
+       const char *szMsg = NULL;
+
+       switch(error)
+       {
+               case CROP_ERROR_TYPE_INVALID_FILE:
+                       szMsg = IDS_INVALID_IMAGE_FILE;
+                       break;
+               case CROP_ERROR_TYPE_PERMISSION_DENIED:
+                       szMsg = IDS_PERMISSION_DENIED;
+                       break;
+               case CROP_ERROR_TYPE_UNKNOWN_FORMAT:
+                       szMsg = "Unknown format";
+                       break;
+               case CROP_ERROR_TYPE_GENERAL:
+               default:
+                       szMsg = IDS_FAILED;
+                       break;
+       }
+
+       MSG_ERROR("Load failed : %s", szMsg);
+
+       _show_exit_popup(obj, IDS_ERROR, szMsg, data);
 }
 
 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));
+       if(crop_ug == NULL)
+       {
+               MSG_ERROR("crop_ug calloc error");
+               return NULL;
+       }
 
        IvugCropView *crop_view = NULL;
        Evas_Object *layout = NULL;
@@ -96,11 +178,12 @@ IvugCropUG * ivug_crop_ug_create(Evas_Object *parent, int w, int h, bool bRatioF
        if(crop_view == NULL)
        {
                MSG_ERROR("ivug_crop_view_create error");
+               free(crop_ug);
                return NULL;
        }
 
        ivug_crop_view_box_size_set(crop_view, w, h);
-       ivug_crop_view_file_set(crop_view, filepath);
+       //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);
@@ -108,10 +191,45 @@ IvugCropUG * ivug_crop_ug_create(Evas_Object *parent, int w, int h, bool bRatioF
        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);
+       evas_object_smart_callback_add(layout, "download,failed", _on_msg_load_failed, crop_ug);
+       //evas_object_smart_callback_add(layout, "clicked", _ivug_crop_view_clicked_cb, crop_ug);
 
        crop_ug->crop_view = crop_view;
        crop_ug->layout = layout;
        crop_ug->parent = parent;
+       crop_ug->filepath = strdup(filepath);
+
+       crop_ug->navi_bar = elm_naviframe_add(parent);
+
+#ifdef USE_CUSTOM_STYLE
+       elm_object_theme_set(crop_ug->navi_bar, gGetSystemTheme() );
+#endif
+       const char *profile = elm_config_profile_get();
+       if (!strcmp(profile,"mobile"))
+       {
+               elm_object_style_set(crop_ug->navi_bar, "ivug-main/default");
+       }
+       else if (!strcmp(profile,"desktop"))
+       {
+               elm_object_style_set(crop_ug->navi_bar, "ivug-main/noindicator");
+       }
+       else
+       {
+               MSG_MAIN_ERROR("Unknown profile : %s", profile);
+       }
+
+       evas_object_name_set(crop_ug->navi_bar, "Crop ug naviframe");
+
+// Layout life cycle is controlled by application explictily.
+       elm_naviframe_content_preserve_on_pop_set(crop_ug->navi_bar, EINA_TRUE);
+
+       Evas_Object *back_btn = ivug_button_add(crop_ug->navi_bar, "naviframe/end_btn/default",
+               IDS_BACK, NULL, on_crop_view_btn_back_clicked, crop_ug);
+
+       crop_ug->navi_it = elm_naviframe_item_push(crop_ug->navi_bar, IDS_LOADING, back_btn, NULL, crop_ug->layout, NULL);
+       elm_naviframe_item_title_visible_set(crop_ug->navi_it, EINA_FALSE);
+
+       ivug_crop_view_create_menu(crop_view, crop_ug->navi_bar);
 
        return crop_ug;
 }
@@ -120,13 +238,19 @@ Evas_Object * ivug_crop_ug_get_layout(IvugCropUG * crop_ug)
 {
        IV_ASSERT(crop_ug != NULL);
 
-       return crop_ug->layout;
+       return crop_ug->navi_bar;
 }
 
 bool ivug_crop_ug_destroy(IvugCropUG * crop_ug)
 {
        IV_ASSERT(crop_ug != NULL);
 
+       if(crop_ug->filepath)
+       {
+               free(crop_ug->filepath);
+               crop_ug->filepath = NULL;
+       }
+
        if(crop_ug->crop_view)
        {
                ivug_crop_view_destroy(crop_ug->crop_view);
@@ -139,4 +263,13 @@ bool ivug_crop_ug_destroy(IvugCropUG * crop_ug)
        return true;
 }
 
+bool ivug_crop_ug_start(IvugCropUG * crop_ug)
+{
+       MSG_HIGH("ivug_crop_ug_start");
+       IV_ASSERT(crop_ug != NULL);
+
+       ivug_crop_view_file_set(crop_ug->crop_view, crop_ug->filepath);
+
+       return true;
+}
 
old mode 100755 (executable)
new mode 100644 (file)
index d1921a1..15304d9
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
 
 typedef struct {
        IvugCropView *crop_view;
+
        Evas_Object *layout;
        Evas_Object *parent;
+
+       Evas_Object *navi_bar;
+       Elm_Object_Item *navi_it;
+
+       char *filepath;
 } IvugCropUG;
 
 #ifdef __cplusplus
@@ -35,6 +41,7 @@ Evas_Object * ivug_crop_ug_get_layout(IvugCropUG * crop_ug);
 
 bool ivug_crop_ug_destroy(IvugCropUG * crop_ug);
 
+bool ivug_crop_ug_start(IvugCropUG * crop_ug);
 
 #ifdef __cplusplus
 }
old mode 100755 (executable)
new mode 100644 (file)
index 927b5e9..f8a065d
@@ -1,43 +1,37 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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-drm-common.h"
+
 #include "ivug-file-info.h"
 
+#include "ivug-string.h"
+
+#include "ivug-util.h"
+
+
 #define NOMAL_BUF              128
 
 #define DETAILS_DIR_PATH_LEN_MAX       4096
@@ -51,99 +45,6 @@ enum IVUG_SIZE_TYPE
 };
 
 /*
-       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 *
@@ -190,73 +91,12 @@ _get_drm_availabile_string(drm_permission_type_e permissionType)
        }
 }
 
-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)
+_get_filesize_string(long long size)
 {
 #define FILE_SIZE_LEN_MAX                      64
 
-       MSG_DETAIL_HIGH("Entered size = %d", size);
+       MSG_DETAIL_HIGH("Entered size = %lld", size);
 
        char *tmp = (char *)calloc(1, sizeof(char)*(FILE_SIZE_LEN_MAX+1));
        if (tmp == NULL)
@@ -274,224 +114,290 @@ _get_filesize_string(size_t size)
        }
        else if(size > (1<<10)) // KB
        {
-               snprintf(tmp,FILE_SIZE_LEN_MAX,"%zu KB", size/(1<<10));
+               snprintf(tmp,FILE_SIZE_LEN_MAX,"%.0f KB", (double)size/(1<<10));
        }
        else    // Byte
        {
-               snprintf(tmp,FILE_SIZE_LEN_MAX,"%zu B", size);
+               snprintf(tmp,FILE_SIZE_LEN_MAX,"%lld 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)
+void _add_string(char **org, char *add_string)
 {
-       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 )
+       char *string = strdup(add_string);
+       if(*org == NULL)
        {
-               pFileInfo->create_date = strdup(IDS_N_A);
+               *org = string;
        }
-
-       pFileInfo->file_ext = ivug_fileinfo_get_file_extension(path);
-
-       if ( pFileInfo->file_ext == NULL )
+       else
        {
-               pFileInfo->file_ext = strdup(IDS_UNKNOWN);
+               *org = g_strconcat(*org, "/", string, NULL);
+               free(string);
        }
-
-       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)
+bool
+ivug_datail_get_exif_info(/*out*/char** name, /*out*/char **contents,
+       const char *path, Media_Type stype, exif_info_type_e type)
 {
 #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;
+       char *string = NULL;
+       int status = 0;
 
-       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);
+       double latitude = 0.0;
+       double longtitude = 0.0;
 
-       pFileInfo->resolution = (char *)malloc(sizeof(char)*NOMAL_BUF+1);
-       if(pFileInfo->resolution == NULL)
+       switch(type)
        {
-               return ;
-       }
-       memset(pFileInfo->resolution,0,(sizeof(char)* NOMAL_BUF + 1));
+               case EXIF_INFO_ORIENTATION:
+                       status = ivug_fileinfo_get_orientation(path);
+                       if(status < 0)
+                               return false;
+                       *name = strdup(IDS_ORIENTATION);
+                       switch(status)
+                       {
+                               case 1:
+                               case 2:
+                                       *contents = strdup("0");
+                                       break;
+                               case 3:
+                               case 4:
+                                       *contents = strdup("180");
+                                       break;
+                               case 5:
+                               case 8:
+                                       *contents = strdup("270");
+                                       break;
+                               case 6:
+                               case 7:
+                                       *contents = strdup("90");
+                                       break;
+                               default:
+                                       *contents = strdup(IDS_UNKNOWN);
+                                       break;
+                       }
+                       break;
+               case EXIF_INFO_LATITUDE:
+                       if(stype == SLIDE_TYPE_IMAGE)           // this will be removed!!!!
+                       {
+                               bret = ivug_fileinfo_get_image_gps_info(path, &latitude, &longtitude);
+                       }
+                       else if(stype == SLIDE_TYPE_VIDEO)
+                       {
+                               bret = ivug_fileinfo_get_video_gps_info(path, &latitude, &longtitude);
+                       }
+                       if(bret == false)
+                       {
+                               MSG_DETAIL_WARN("get latitude error");
+                               return false;
+                       }
+                       string = calloc(1, sizeof(char)*UG_EXIF_ARR_LENGTH);
+                       snprintf(string , UG_EXIF_ARR_LENGTH, "%.5f", latitude);
 
+                       *name = strdup(IDS_LATITUDE);
+                       *contents = string;
+                       break;
 
-       int width, height;
+               case EXIF_INFO_LONGITTUDE:
+                       if(stype == SLIDE_TYPE_IMAGE)           // this will be removed!!!!
+                       {
+                               bret = ivug_fileinfo_get_image_gps_info(path, &latitude, &longtitude);
+                       }
+                       else if(stype == SLIDE_TYPE_VIDEO)
+                       {
+                               bret = ivug_fileinfo_get_video_gps_info(path, &latitude, &longtitude);
+                       }
+                       if(bret == false)
+                       {
+                               MSG_DETAIL_WARN("get longtitude error");
+                               return false;
+                       }
+                       string = calloc(1, sizeof(char)*UG_EXIF_ARR_LENGTH);
+                       snprintf(string , UG_EXIF_ARR_LENGTH, "%.5f", longtitude);
 
-       switch(stype)
-       {
-               /*Image type && !drm*/
-               case SLIDE_TYPE_IMAGE:
-                       pFileInfo->file_type = IVUG_DETAIL_IMAGE_TYPE;
+                       *name = strdup(IDS_LONGITUDE);
+                       *contents = string;
+                       break;
 
-                       if ( ivug_fileinfo_get_image_resolution(path, &width, &height) == false)
+               case EXIF_INFO_MANUFACTURE:
+                       string = ivug_fileinfo_get_maker_name(path);
+                       if(string == NULL)
+                               return false;
+                       *name = strdup(IDS_MANUFACTURE);
+                       *contents = string;
+                       break;
+               case EXIF_INFO_MODEL:
+                       string = ivug_fileinfo_get_model_name(path);
+                       if(string == NULL)
+                               return false;
+                       *name = strdup(IDS_MODEL);
+                       *contents = string;
+                       break;
+               case EXIF_INFO_FLASH:
+                       status = ivug_fileinfo_get_flash_status(path);
+                       if(status < 0)
+                               return false;
+                       *name = strdup(IDS_FLASH);
+                       if(status == 1)
                        {
-                               snprintf(pFileInfo->resolution, NOMAL_BUF, "%s", IDS_N_A);
+                               *contents = strdup(IDS_FLASH);
                        }
                        else
                        {
-                               snprintf(pFileInfo->resolution, NOMAL_BUF,"%dX%d", width, height);
+                               *contents = strdup(IDS_NO_FLASH);
                        }
-
                        break;
-
-               /*      Video type */
-               case SLIDE_TYPE_VIDEO:
-                       pFileInfo->file_type = IVUG_DETAIL_VIDEO_TYPE;
-
-                       if ( ivug_fileinfo_get_video_resolution(path, &width, &height) == false)
+               case EXIF_INFO_FOCAL_LENGTH:
+                       string = ivug_fileinfo_get_focal_length(path);
+                       if(string == NULL)
+                               return false;
+                       *name = strdup(IDS_FOCAL_LENGTH);
+                       *contents = string;
+                       break;
+               case EXIF_INFO_WHITE_BALANCE:
+                       status = ivug_fileinfo_get_white_balance(path);
+                       if(status < 0)
+                               return false;
+                       *name = strdup(IDS_WHITE_BALANCE);
+                       if(status == 0)
                        {
-                               snprintf(pFileInfo->resolution, NOMAL_BUF, "%s", IDS_N_A);
+                               *contents = strdup(IDS_AUTO);
                        }
                        else
                        {
-                               snprintf(pFileInfo->resolution, NOMAL_BUF,"%dX%d", width, height);
+                               *contents = strdup(IDS_MANUAL);
                        }
-
-
                        break;
-
-               case SLIDE_TYPE_STREAMING:
-                       pFileInfo->file_type = IVUG_DETAIL_VIDEO_TYPE;
+               case EXIF_INFO_APERTURE:
+                       string = ivug_fileinfo_get_aperture(path);
+                       if(string == NULL)
+                               return false;
+                       *name = strdup(IDS_APERTURE);
+                       *contents = string;
+                       break;
+               case EXIF_INFO_EXPOSURE_TIME:
+                       string = ivug_fileinfo_get_exposure_time(path);
+                       if(string == NULL)
+                               return false;
+                       *name = strdup(IDS_EXPOSURE_TIME);
+                       *contents = string;
+                       break;
+               case EXIF_INFO_ISO:
+                       string = ivug_fileinfo_get_iso(path);
+                       if(string == NULL)
+                               return false;
+                       *name = strdup(IDS_ISO);
+                       *contents = string;
                        break;
-
                default:
                        break;
-
        }
 
+       return true;
 }
 
-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");
-\r
-       if(pFileInfo->file_location)\r
-       {\r
-               free(pFileInfo->file_location);\r
-       }\r
-       pFileInfo->file_location = strdup(path);
-}
 
-void
-ivug_details_info_set_filename(ivug_file_info_t * const pFileInfo, const char *path)
+bool
+ivug_datail_get_file_info(/*out*/char** name, /*out*/char **contents,
+       const char *path, Media_Type stype, file_info_type_e type)
 {
-       ivug_retm_if(!pFileInfo, "data is NULL");
-       ivug_retm_if(!path, "path is NULL");
-
-       /** get file name */\r
-       if(pFileInfo->filename)\r
-       {\r
-               free(pFileInfo->filename);\r
-       }\r
-       pFileInfo->filename = ecore_file_strip_ext(ecore_file_file_get(path));
-}
+       struct stat statbuf;
+       int width = 0;
+       int height = 0;
 
-void _add_string(char *org, char *add_string)
-{
-       char *string = strdup(add_string);
-       if(org == NULL)
-       {
-               org = string;
-       }
-       else
+       switch(type)
        {
-               org = g_strconcat(org, "/", string, NULL);
-               free(string);
+               case FILE_INFO_NAME:
+                       *name = strdup(IDS_NAME);
+                       *contents = ecore_file_strip_ext(ecore_file_file_get(path));
+                       break;
+               case FILE_INFO_FORMAT:
+                       *name = strdup(IDS_FORMAT);
+                       *contents = ivug_fileinfo_get_file_extension(path);
+                       if(*contents == NULL)
+                       {
+                               *contents = strdup(IDS_UNKNOWN);
+                       }
+                       break;
+               case FILE_INFO_DATE_CREATED:
+                       *name = strdup(IDS_DATE_CREATED);
+                       if(stat(path, &statbuf) == -1)
+                       {
+                               MSG_DETAIL_ERROR("Cannot get stat()");
+                               *contents = strdup(IDS_UNKNOWN);
+                               break;
+                       }
+                       *contents = ivug_get_icu_date(statbuf.st_mtime);
+                       if(*contents == NULL)
+                       {
+                               *contents = strdup(IDS_UNKNOWN);
+                       }
+                       break;
+               case FILE_INFO_SIZE:
+                       *name = strdup(IDS_SIZE);
+                       if(stat(path, &statbuf) == -1)
+                       {
+                               MSG_DETAIL_ERROR("Cannot get stat()");
+                               *contents = strdup(IDS_UNKNOWN);
+                               break;
+                       }
+                       *contents = _get_filesize_string(statbuf.st_size);
+                       if(*contents == NULL)
+                       {
+                               *contents = strdup(IDS_UNKNOWN);
+                       }
+                       break;
+               case FILE_INFO_RESOLUTION:
+                       *name = strdup(IDS_RESOLUTION);
+                       *contents = (char *)calloc(1, sizeof(char)*NOMAL_BUF+1);
+                       if(stype == SLIDE_TYPE_IMAGE || stype == SLIDE_TYPE_WEB_IMAGE || stype == SLIDE_TYPE_PTP_IMAGE)
+                       {
+                               if(ivug_fileinfo_get_image_resolution(path, &width, &height) == false)
+                               {
+                                       snprintf(*contents, NOMAL_BUF, "%s", IDS_N_A);
+                               }
+                               else
+                               {
+                                       snprintf(*contents, NOMAL_BUF,"%dX%d", width, height);
+                               }
+                       }
+                       else if(stype == SLIDE_TYPE_VIDEO)
+                       {
+                               if ( ivug_fileinfo_get_video_resolution(path, &width, &height) == false)
+                               {
+                                       snprintf(*contents, NOMAL_BUF, "%s", IDS_N_A);
+                               }
+                               else
+                               {
+                                       snprintf(*contents, NOMAL_BUF,"%dX%d", width, height);
+                               }
+                       }
+                       else
+                       {
+                               snprintf(*contents, NOMAL_BUF, "%s", IDS_N_A);
+                       }
+
+                       break;
+               case FILE_INFO_FILE_LOCATION:
+                       *name = strdup(IDS_LOCATION);
+                       *contents = strdup(path);
+                       break;
+               default:
+                       break;
        }
+
+       return true;
 }
 
-void
-ivug_details_info_set_drm_info(ivug_file_info_t * const pFileInfo, const char *path)
+
+bool
+ivug_datail_get_drm_info(/*out*/char** name, /*out*/char **contents,
+       const char *path, Media_Type stype, drm_info_type_e type)
 {
 #define VALIDITY_SIZE  80
 
@@ -500,212 +406,318 @@ ivug_details_info_set_drm_info(ivug_file_info_t * const pFileInfo, const char *p
 #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);
+       bool bret = false;
 
-       if(false == valid_ro)
+       if(ivug_drm_has_valid_ro(path) == false)
        {
                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);
+               return false;
        }
 
-// 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
-
+       char *string = NULL;
        drm_constraint_info_s constraint_info;
+       drm_file_info_s 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++)
+       switch(type)
        {
-               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;
-               }
+               case DRM_INFO_VENDOR:
+                       *name = strdup(IDS_VENDOR);
+                       *contents = ivug_drm_get_drm_vendor_info(path);
+                       if(*contents == NULL)
+                       {
+                               *contents = strdup(IDS_UNKNOWN);
+                       }
+                       break;
+               case DRM_INFO_FORWARDING:
+                       *name = strdup(IDS_FORWARDING);
+                       bret = ivug_drm_get_forwarding_info(path);
+                       if(bret == true)
+                       {
+                               *contents = strdup(IDS_POSSIBLE);
+                       }
+                       else
+                       {
+                               *contents = strdup(IDS_IMPOSSIBLE);
+                       }
+                       break;
+               case DRM_INFO_AVAILABLE_USES:
+                       {
+                               *name = strdup(IDS_AVAILABLE_USES);
+
+                               memset(&info, 0x0, sizeof(drm_file_info_s));
+                               ret = drm_get_file_info(path, &info);
+                               if(ret != DRM_RETURN_SUCCESS)
+                               {
+                                       MSG_IVUG_ERROR("drm_get_file_info Failed!!, ret=0x%x", ret);
+                                       *contents = strdup(IDS_UNKNOWN);
+                                       return true;
+                               }
+                               if (info.oma_info.method == DRM_METHOD_TYPE_FORWARD_LOCK)
+                               {
+                                       MSG_IVUG_HIGH("DRM_METHOD_TYPE_FORWARD_LOCK");
+                                       *contents = strdup(IDS_ANY);
+                                       return true;
+                               }
+
+                               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(contents, string);
+                                       free(string);
+                               }
+                               if(*contents == NULL)
+                               {
+                                       *contents = strdup(IDS_UNKNOWN);
+                               }
+                       }
+                       break;
+               case DRM_INFO_TYPE:
+                       {
+                               *name = strdup(IDS_TYPE);
+
+                               memset(&info, 0x0, sizeof(drm_file_info_s));
+                               ret = drm_get_file_info(path, &info);
+                               if(ret != DRM_RETURN_SUCCESS)
+                               {
+                                       MSG_IVUG_ERROR("drm_get_file_info Failed!!, ret=0x%x", ret);
+                                       *contents = strdup(IDS_UNKNOWN);
+                                       return true;
+                               }
+                               if (info.oma_info.method == DRM_METHOD_TYPE_FORWARD_LOCK)
+                               {
+                                       MSG_IVUG_HIGH("DRM_METHOD_TYPE_FORWARD_LOCK");
+                                       *contents = strdup(IDS_UNLIMITED);
+                                       return true;
+                               }
+
+                               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;
+                                       }
+                                       if(constraint_info.const_type.is_unlimited)
+                                               _add_string(contents, IDS_UNLIMITED);
+
+                                       if(constraint_info.const_type.is_accumulated)
+                                               _add_string(contents, IDS_ACCUMULATED_TIME);
+
+                                       if(constraint_info.const_type.is_count)
+                                               _add_string(contents, IDS_COUNT);
+
+                                       if(constraint_info.const_type.is_datetime)
+                                               _add_string(contents, IDS_TIME);
+
+                                       if(constraint_info.const_type.is_individual)
+                                               _add_string(contents, IDS_INDIVIDUAL);
+
+                                       if(constraint_info.const_type.is_interval)
+                                               _add_string(contents, IDS_INTERVAL);
+
+                                       if(constraint_info.const_type.is_system)
+                                               _add_string(contents, IDS_SYSTEM);
+
+                                       if(constraint_info.const_type.is_timedcount)
+                                               _add_string(contents, IDS_TIMED_COUNT);
+                               }
+                               if(*contents == NULL)
+                               {
+                                       *contents = strdup(IDS_UNKNOWN);
+                               }
+                       }
+                       break;
+               case DRM_INFO_VALIDITY:
+                       *name = strdup(IDS_VALIDITY);
 
-               string = _get_drm_availabile_string(i);
-               _add_string(pFileInfo->available_uses, string);
-               free(string);
+                       memset(&info, 0x0, sizeof(drm_file_info_s));
+                       ret = drm_get_file_info(path, &info);
+                       if(ret != DRM_RETURN_SUCCESS)
+                       {
+                               MSG_IVUG_ERROR("drm_get_file_info Failed!!, ret=0x%x", ret);
+                               *contents = strdup(IDS_UNKNOWN);
+                               return true;
+                       }
+                       if (info.oma_info.method == DRM_METHOD_TYPE_FORWARD_LOCK)
+                       {
+                               MSG_IVUG_HIGH("DRM_METHOD_TYPE_FORWARD_LOCK");
+                               *contents = strdup(IDS_UNLIMITED);
+                               return true;
+                       }
 
-               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)
+                       for(i=DRM_PERMISSION_TYPE_NONE; i<=DRM_PERMISSION_TYPE_EXPORT_MOVE; i++)
                        {
-                               snprintf(validity, sizeof(validity),"Total %d miniutes", constraint_info.interval_time.tm_min);
+                               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;
+                               }
+
+                               if(constraint_info.const_type.is_unlimited)
+                               {
+                                       MSG_IVUG_HIGH("Unlimited:for permission=%d", i);
+                                       _add_string(contents, 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);
+
+                                       snprintf(validity, sizeof(validity),"Total %.1f hours",
+                                               constraint_info.accumulated_remaining_seconds/SECOND_COUNT);
+                                       _add_string(contents, 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);
+
+                                       snprintf(validity, sizeof(validity),"%d left", constraint_info.remaining_count);
+                                       _add_string(contents, 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);
+
+                                       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(contents, 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(contents, 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);
+
+                                       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(contents, 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(contents, 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);
+
+                                       snprintf(validity, sizeof(validity),"%d (%d sec)",
+                                                                       constraint_info.timed_remaining_count,
+                                                                       constraint_info.timed_count_timer
+                                                       );
+                                       _add_string(contents, validity);
+                               }
                        }
-                       else
+                       if(*contents == NULL)
                        {
-                               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
-                                               );
+                               *contents = strdup(IDS_UNKNOWN);
                        }
-                       _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");
+                       break;
+               default:
+                       break;
        }
 
-       return;
+       return true;
 }
 
-
old mode 100755 (executable)
new mode 100644 (file)
index b98f14b..cbf940a
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
@@ -20,7 +20,8 @@
 #include <unicode/udat.h>
 
 #include "ivug-common.h"
-#include "ivug-drm.h"
+#include "ivug-drm-common.h"
+#include "ivug-media.h"
 
 typedef enum {
        IVUG_DETAIL_ERROR_TYPE = -1,
@@ -28,35 +29,42 @@ typedef enum {
        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;
+typedef enum
+{
+       FILE_INFO_NAME,
+       FILE_INFO_FORMAT,
+       FILE_INFO_DATE_CREATED,
+       FILE_INFO_SIZE,
+       FILE_INFO_RESOLUTION,
+       FILE_INFO_FILE_LOCATION,
+       FILE_INFO_MAX
+}file_info_type_e;
+
+typedef enum
+{
+       EXIF_INFO_ORIENTATION,
+       EXIF_INFO_LATITUDE,
+       EXIF_INFO_LONGITTUDE,
+       EXIF_INFO_MANUFACTURE,
+       EXIF_INFO_MODEL,
+       EXIF_INFO_FLASH,
+       EXIF_INFO_FOCAL_LENGTH,
+       EXIF_INFO_WHITE_BALANCE,
+       EXIF_INFO_APERTURE,
+       EXIF_INFO_EXPOSURE_TIME,
+       EXIF_INFO_ISO,
+       EXIF_INFO_MAX
+}exif_info_type_e;
+
+typedef enum
+{
+       DRM_INFO_VENDOR,
+       DRM_INFO_FORWARDING,
+       DRM_INFO_AVAILABLE_USES,
+       DRM_INFO_TYPE,
+       DRM_INFO_VALIDITY,
+       DRM_INFO_MAX
+}drm_info_type_e;
 
 #ifdef __cplusplus
 extern "C" {
@@ -64,17 +72,19 @@ extern "C" {
 
 // 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);
+bool
+ivug_datail_get_exif_info(/*out*/char** name_, /*out*/char **contents_,
+       const char *path, Media_Type stype, exif_info_type_e type);
 
-void ivug_details_info_set_resolution(ivug_file_info_t * const pFileInfo, const char *path, int stype);
+bool
+ivug_datail_get_file_info(/*out*/char** name, /*out*/char **contents,
+       const char *path, Media_Type stype, file_info_type_e type);
 
-void ivug_details_info_set_location(ivug_file_info_t * const pFileInfo, const char *path);
+bool
+ivug_datail_get_drm_info(/*out*/char** name, /*out*/char **contents,
+       const char *path, Media_Type stype, drm_info_type_e type);
 
-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
 }
old mode 100755 (executable)
new mode 100644 (file)
index 602c790..58ef551
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 <string.h>
 
@@ -22,6 +22,9 @@
 #include "ivug-file-info.h"
 
 #include "ivug-db.h"
+#include "ivug-util.h"
+
+#include "ivug-filter.h"
 
 //bundle key
 #define IVUG_BUNDLE_KEY_VIEW_MODE              "View Mode"
@@ -39,6 +42,7 @@
 #define IVUG_BUNDLE_KEY_MIN_LATITUDE   "LAT_MIN"
 
 #define IVUG_BUNDLE_KEY_SETAS_TYPE             "Setas type"
+#define IVUG_BUNDLE_KEY_TAG_NAME               "Tag name"
 
 #define IVUG_BUNDLE_KEY_RESOLUTION             "Resolution"
 #define IVUG_BUNDLE_KEY_FIXED_RATIO            "Fixed ratio"
 #define IVUG_BUNDLE_KEY_MSS_SERVER_ID  "MSS_ServerID"
 #define IVUG_BUNDLE_KEY_MSS_SORT_TYPE  "MSS_Sort_type"
 
+#define IVUG_BUNDLE_KEY_ALLSHARE_DEVICE_ID     "Device id"
+
+#define IVUG_BUNDLE_KEY_ALLSHARE_HANDLE_POINTER        "Handle pointer"
+
+#define IVUG_BUNDLE_KEY_PTP_TOTAL_COUNT                "Count"
+
 #define IVUG_BUNDLE_KEY_STANDALONE             "Standalone"
 
 #define IVUG_BUNDLE_KEY_CONTACT_ID             "Contact id"
+#define IVUG_BUNDLE_KEY_CLUSTER_ID             "Cluster id"
+#define IVUG_BUNDLE_KEY_GROUP_ID               "Group id"
+
+#define IVUG_BUNDLE_KEY_SELECTED_INDEX "Selected index"
 
 //default values
 #define IVUG_DEFAULT_MODE IVUG_MODE_SINGLE
-#define IVUG_DEFAULT_INDEX (1)                         // First item\r
-\r
-#define IVUG_FILE_PREFIX               "file://"\r
+#define IVUG_DEFAULT_INDEX (1)                         // First item
+
+#define IVUG_FILE_PREFIX               "file://"
 
 static inline
 void _ivug_free(char **val)
@@ -74,10 +88,15 @@ _get_view_mode(ivug_parameter* data, const char* val)
 #define IVUG_BUNDLE_VALUE_VIEW_MODE_NORMAL     "NORMAL"
 #define IVUG_BUNDLE_VALUE_VIEW_MODE_SINGLE     "SINGLE"
 #define IVUG_BUNDLE_VALUE_VIEW_MODE_GALLERY    "GALLERY"
+#define IVUG_BUNDLE_VALUE_VIEW_MODE_WEB                "WEB_CLUSTER"
 #define IVUG_BUNDLE_VALUE_VIEW_MODE_CAMERA     "CAMERA"
 #define IVUG_BUNDLE_VALUE_VIEW_MODE_DISPLAY    "DISPLAY"
 #define IVUG_BUNDLE_VALUE_VIEW_MODE_SETAS              "SETAS"
+#define IVUG_BUNDLE_VALUE_VIEW_MODE_ALLSHARE   "ALLSHARE"
+#define IVUG_BUNDLE_VALUE_VIEW_MODE_PTP   "PTP"
 #define IVUG_BUNDLE_VALUE_VIEW_MODE_SLIDESHOW   "SLIDESHOW"
+#define IVUG_BUNDLE_VALUE_VIEW_MODE_BESTSHOT   "BESTSHOT"
+#define IVUG_BUNDLE_VALUE_VIEW_MODE_BUDDY   "BUDDY PHOTO SHARE"
 
        int len = strlen(val);
 
@@ -101,7 +120,8 @@ _get_view_mode(ivug_parameter* data, const char* val)
        }
        else if (strncmp(val, IVUG_BUNDLE_VALUE_VIEW_MODE_SINGLE, len) == 0)
        {
-               data->view_by = IVUG_VIEW_BY_FILE;
+               if(data->view_by != IVUG_VIEW_BY_FOLDER)
+                       data->view_by = IVUG_VIEW_BY_FILE;
                return IVUG_MODE_SINGLE;
        }
        else if ( strncmp(val, IVUG_BUNDLE_VALUE_VIEW_MODE_DISPLAY, len) == 0)
@@ -116,7 +136,11 @@ _get_view_mode(ivug_parameter* data, const char* val)
        }
        else if(strncmp(val, IVUG_BUNDLE_VALUE_VIEW_MODE_SLIDESHOW, len) == 0)
        {
-               if(data->view_by != IVUG_VIEW_BY_ALL)
+               if(data->view_by != IVUG_VIEW_BY_ALL &&
+                       data->view_by != IVUG_VIEW_BY_FAVORITES &&
+                       data->view_by != IVUG_VIEW_BY_TAG &&
+                       data->view_by != IVUG_VIEW_BY_PLACES &&
+                       data->view_by != IVUG_VIEW_BY_WEBALBUM)
                {
                        data->view_by = IVUG_VIEW_BY_FOLDER;
                }
@@ -134,9 +158,12 @@ _get_view_by(const char* val)
        //bundle value
 #define IVUG_BUNDLE_VALUE_VIEW_BY_ALL                  "All"
 #define IVUG_BUNDLE_VALUE_VIEW_BY_FAVORITES            "Favorites"
+#define IVUG_BUNDLE_VALUE_VIEW_BY_TAGS                 "Tags"
 #define IVUG_BUNDLE_VALUE_VIEW_BY_FLODER               "By Folder"
 #define IVUG_BUNDLE_VALUE_VIEW_BY_PLACES               "Places"
 #define IVUG_BUNDLE_VALUE_VIEW_BY_CONTACT_ID   "Contact id"
+#define IVUG_BUNDLE_VALUE_VIEW_BY_CONTACT_GROUP        "Contact group"
+#define IVUG_BUNDLE_VALUE_VIEW_BY_WEB                  "Web"
 
        IV_ASSERT(val != NULL);
 
@@ -150,6 +177,14 @@ _get_view_by(const char* val)
        {
                return IVUG_VIEW_BY_ALL;
        }
+       else if (strncmp(val, IVUG_BUNDLE_VALUE_VIEW_BY_FAVORITES, len) == 0)
+       {
+               return IVUG_VIEW_BY_FAVORITES;
+       }
+       else if (strncmp(val, IVUG_BUNDLE_VALUE_VIEW_BY_TAGS, len) == 0)
+       {
+               return IVUG_VIEW_BY_TAG;
+       }
        else if (strncmp(val, IVUG_BUNDLE_VALUE_VIEW_BY_PLACES, len) == 0)
        {
                return IVUG_VIEW_BY_PLACES;
@@ -158,6 +193,14 @@ _get_view_by(const char* val)
        {
                return IVUG_VIEW_BY_CONTACT_ID;
        }
+       else if (strncmp(val, IVUG_BUNDLE_VALUE_VIEW_BY_CONTACT_GROUP, len) == 0)
+       {
+               return IVUG_VIEW_BY_CONTACT_GROUP;
+       }
+       else if (strncmp(val, IVUG_BUNDLE_VALUE_VIEW_BY_WEB, len) == 0)
+       {
+               return IVUG_VIEW_BY_WEBALBUM;
+       }
 
        MSG_IVUG_ERROR("Invalid view by : %s", val);
 
@@ -171,13 +214,13 @@ _get_setas_type(const char* val)
 {
        IV_ASSERT(val != NULL);
 
-#define IVUG_BUNDLE_VALUE_SETAS_UG_WALLPAPER   "Wallpaper"\r
-#define IVUG_BUNDLE_VALUE_SETAS_UG_LOCKSCREEN  "Lockscreen"\r
-#define IVUG_BUNDLE_VALUE_SETAS_UG_WALLPAPER_N_LOCKSCREEN      "Wallpaper & Lockscreen"\r
+#define IVUG_BUNDLE_VALUE_SETAS_UG_WALLPAPER   "Wallpaper"
+#define IVUG_BUNDLE_VALUE_SETAS_UG_LOCKSCREEN  "Lockscreen"
+#define IVUG_BUNDLE_VALUE_SETAS_UG_WALLPAPER_N_LOCKSCREEN      "Wallpaper & Lockscreen"
 #define IVUG_BUNDLE_VALUE_SETAS_UG_CALLERID            "CallerID"
 #define IVUG_BUNDLE_VALUE_SETAS_UG_VIDEO_CALLEID       "VideoCallID"
 #define IVUG_BUNDLE_VALUE_SETAS_UG_CROP                        "Crop"
-#define IVUG_BUNDLE_VALUE_SETAS_UG_WALLPAPER_ONLY      "Wallpaper only"
+#define IVUG_BUNDLE_VALUE_SETAS_UG_WALLPAPER_CROP      "Wallpaper Crop"
 
        int len = strlen(val);
 
@@ -185,18 +228,18 @@ _get_setas_type(const char* val)
        {
                return IVUG_SET_AS_UG_TYPE_WALLPAPER;
        }
-       else if (strncmp(val, IVUG_BUNDLE_VALUE_SETAS_UG_WALLPAPER_ONLY, len) == 0 )
-       {
-               return IVUG_SET_AS_UG_TYPE_WALLPAPER_ONLY;
-       }\r
-       else if (strncmp(val, IVUG_BUNDLE_VALUE_SETAS_UG_LOCKSCREEN, len) == 0 )\r
-       {\r
-               return IVUG_SET_AS_UG_TYPE_LOCKSCREEN;\r
-       }\r
-       else if (strncmp(val, IVUG_BUNDLE_VALUE_SETAS_UG_WALLPAPER_N_LOCKSCREEN, len) == 0 )\r
-       {\r
-               return IVUG_SET_AS_UG_TYPE_WALLPAPER_N_LOCKSCREEN;\r
-       }\r
+       else if (strncmp(val, IVUG_BUNDLE_VALUE_SETAS_UG_WALLPAPER_CROP, len) == 0 )
+       {
+               return IVUG_SET_AS_UG_TYPE_WALLPAPER_CROP;
+       }
+       else if (strncmp(val, IVUG_BUNDLE_VALUE_SETAS_UG_LOCKSCREEN, len) == 0 )
+       {
+               return IVUG_SET_AS_UG_TYPE_LOCKSCREEN;
+       }
+       else if (strncmp(val, IVUG_BUNDLE_VALUE_SETAS_UG_WALLPAPER_N_LOCKSCREEN, len) == 0 )
+       {
+               return IVUG_SET_AS_UG_TYPE_WALLPAPER_N_LOCKSCREEN;
+       }
        else if (strncmp(val, IVUG_BUNDLE_VALUE_SETAS_UG_CALLERID, len) == 0)
        {
                return IVUG_SET_AS_UG_TYPE_CALLER_ID;
@@ -245,11 +288,32 @@ static bool _data_print(service_h service, const char *key, void *user_data)
 {
        char *value;
 
-       service_get_extra_data(service, key, &value);
-
-       MSG_IVUG_HIGH("  %s : %s", key, value);
+       char **value_array;
+       int array_len = 1;
+       int i;
+       bool array = false;
 
-       free(value);
+       service_is_extra_data_array(service, key, &array);
+       if(array == false)
+       {
+               service_get_extra_data(service, key, &value);
+               MSG_IVUG_HIGH("  %s : %s", key, value);
+               free(value);
+       }
+       else
+       {
+               service_get_extra_data_array(service, key, &value_array, &array_len);
+               MSG_IVUG_HIGH("  %s :", key);
+               for(i=0; i<array_len; i++)
+               {
+                       MSG_IVUG_HIGH(" %s", value_array[i]);
+               }
+               for(i=0; i<array_len; i++)
+               {
+                       free(value_array[i]);
+               }
+               free(value_array);
+       }
 
        return true;
 }
@@ -264,6 +328,8 @@ static void _print_service_data(service_h service)
        }
 }
 
+
+
 //parsing bundle
 ivug_parameter*
 ivug_param_create_from_bundle(service_h service)
@@ -279,7 +345,7 @@ ivug_param_create_from_bundle(service_h service)
        _print_service_data(service);
        MSG_IVUG_HIGH("**********************************");
 
-       char *path = NULL;\r
+       /*char *path = NULL;
        service_get_uri(service, &path);        // app gadget
        if(path)
        {
@@ -287,7 +353,7 @@ ivug_param_create_from_bundle(service_h service)
                service_add_extra_data (service, "Path", path);
                service_add_extra_data (service, "View Mode", "SINGLE");
                _ivug_free(&path);
-       }\r
+       }*/
 
        //parsing param
        ivug_parameter* data = (ivug_parameter*)calloc(1, sizeof(ivug_parameter));
@@ -318,10 +384,42 @@ ivug_param_create_from_bundle(service_h service)
        service_get_extra_data (service, IVUG_BUNDLE_KEY_VIEW_BY, &szViewBy);
        if (szViewBy != NULL)
        {
-               MSG_IVUG_HIGH("View By = %s", szViewBy);
+               MSG_IVUG_MED("View By = %s", szViewBy);
 
                data->view_by = _get_view_by(szViewBy);
 
+               if (data->view_by == IVUG_VIEW_BY_TAG)
+               {
+                       char* szTagName = NULL;
+
+                       service_get_extra_data (service, IVUG_BUNDLE_KEY_TAG_NAME, &szTagName);
+                       if ( szTagName != NULL )
+                       {
+                               tag_handle t_handle = ivug_db_get_tag_handle(szTagName);
+                               if(t_handle == NULL)
+                               {
+                                       MSG_IVUG_FATAL("View by Tag. but tag handle is NULL" );
+                                       ivug_param_delete(data);
+                                       return NULL;
+                               }
+
+                               data->tag_id = ivug_db_get_tag_id(t_handle);
+
+                               ivug_db_destroy_tag(t_handle);
+
+                               MSG_IVUG_HIGH("Tag name=%s", szTagName);
+                               MSG_IVUG_HIGH("Tag id=%d", data->tag_id);
+                               _ivug_free(&szTagName);
+                       }
+                       else
+                       {
+                               MSG_IVUG_FATAL("View by Tag. but Tagname is NULL" );
+
+                               _ivug_free(&szViewBy);
+                               ivug_param_delete(data);
+                               return NULL;
+                       }
+               }
                _ivug_free(&szViewBy);
        }
        else
@@ -337,13 +435,13 @@ ivug_param_create_from_bundle(service_h service)
        if(val)
        {
                data->start_index = ivug_atoi(val);
-               MSG_IVUG_HIGH("Slide Index = %d", data->start_index);
+               MSG_IVUG_MED("Slide Index = %d", data->start_index);
                _ivug_free(&val);
        }
        else
        {
                data->start_index = IVUG_DEFAULT_INDEX;
-               MSG_IVUG_HIGH("Slide Index is not set. Set as default : %d", data->start_index);
+               MSG_IVUG_WARN("Slide Index is not set. Set as default : %d", data->start_index);
        }
 
 //parse mode
@@ -353,7 +451,7 @@ ivug_param_create_from_bundle(service_h service)
        if (szMode != NULL)
        {
                data->mode = _get_view_mode(data, szMode);
-               MSG_IVUG_HIGH("View mode is %s(%d)", szMode, data->mode);
+               MSG_IVUG_MED("View mode is %s(%d)", szMode, data->mode);
                _ivug_free(&szMode);
        }
        else
@@ -362,29 +460,33 @@ ivug_param_create_from_bundle(service_h service)
                MSG_IVUG_HIGH("View mode is NULL. Set Default(%d)", data->mode);
        }
 
+       //data->view_by = IVUG_VIEW_BY_ALLSHARE;        // TODO: for all share TEST
+
 //parse path
        char* szFilePath = NULL;
 
-       service_get_extra_data (service, IVUG_BUNDLE_KEY_PATH, &szFilePath);
-       if ( szFilePath != NULL )
-       {\r
-               if(strncmp(IVUG_FILE_PREFIX, szFilePath, strlen(IVUG_FILE_PREFIX)) == 0)\r
-               {\r
-                       data->filepath = strdup(szFilePath + strlen(IVUG_FILE_PREFIX));\r
-               }\r
-               else\r
-               {\r
-                       data->filepath = strdup(szFilePath);\r
-               }\r
-               MSG_IVUG_HIGH("Current File = %s", data->filepath);
-               _ivug_free(&szFilePath);
-       }
-       else
        {
-               MSG_IVUG_ERROR("File path is NULL");
+               service_get_extra_data (service, IVUG_BUNDLE_KEY_PATH, &szFilePath);
+               if ( szFilePath != NULL )
+               {
+                       if(strncmp(IVUG_FILE_PREFIX, szFilePath, strlen(IVUG_FILE_PREFIX)) == 0)
+                       {
+                               data->filepath = strdup(szFilePath + strlen(IVUG_FILE_PREFIX));
+                       }
+                       else
+                       {
+                               data->filepath = strdup(szFilePath);
+                       }
+                       MSG_IVUG_MED("Current File = %s", data->filepath);
+                       _ivug_free(&szFilePath);
+               }
+               else
+               {
+                       MSG_IVUG_ERROR("File path is NULL");
 
-               ivug_param_delete(data);
-               return NULL;
+                       ivug_param_delete(data);
+                       return NULL;
+               }
        }
 
        //parse album id -album id is cluster id of media service
@@ -392,7 +494,7 @@ ivug_param_create_from_bundle(service_h service)
        if(val && data->view_by != IVUG_VIEW_BY_ALL)
        {
                data->album_id = uuid_getuuid(val);
-               MSG_IVUG_HIGH("album_uuid is %s", uuid_getchar(data->album_id));
+               MSG_IVUG_MED("album_uuid is %s", uuid_getchar(data->album_id));
        }
        else
        {
@@ -402,20 +504,21 @@ ivug_param_create_from_bundle(service_h service)
        if(val)
                _ivug_free(&val);
 
-       if (data->mode == IVUG_MODE_CAMERA)
+       if (data->view_by == IVUG_VIEW_BY_FOLDER && data->album_id == INVALID_UUID)
        {
 /*
+               example:
                **********************************
                  Bundle Count = 2
                   View Mode:CAMERA
-                  Path:/opt/media/Camera shots/IMAGE0021.jpg
+                  Path:/opt/usr/media/Camera shots/IMAGE0021.jpg
                **********************************
 */
                // Get album id from file path.
                media_handle m_handle = ivug_db_get_folder_handle(ecore_file_dir_get(data->filepath));
                if(m_handle == NULL)
                {
-                       MSG_IVUG_FATAL("View by Folder. but media handle is NULL" );
+                       MSG_IVUG_ERROR("View by Folder. but media handle is NULL" );
                        ivug_param_delete(data);
                        return NULL;
                }
@@ -432,7 +535,7 @@ ivug_param_create_from_bundle(service_h service)
        if(val != NULL)
        {
                data->media_type = _get_media_type(val);
-               MSG_IVUG_HIGH("Media Type=%s(%d)", val, data->media_type);
+               MSG_IVUG_MED("Media Type=%s(%d)", val, data->media_type);
                _ivug_free(&val);
        }
        else
@@ -448,7 +551,7 @@ ivug_param_create_from_bundle(service_h service)
        {
                eina_convert_atod(val, strlen(val), &m, &e);
                data->max_longitude = ldexp((double)m, e);
-               MSG_IVUG_HIGH("Max Longitude =%f", data->max_longitude);
+               MSG_IVUG_MED("Max Longitude =%f", data->max_longitude);
                _ivug_free(&val);
        }
        else
@@ -461,7 +564,7 @@ ivug_param_create_from_bundle(service_h service)
        {
                eina_convert_atod(val, strlen(val), &m, &e);
                data->min_longitude = ldexp((double)m, e);
-               MSG_IVUG_HIGH("Min Longitude =%f", data->min_longitude);
+               MSG_IVUG_MED("Min Longitude =%f", data->min_longitude);
                _ivug_free(&val);
        }
        else
@@ -474,7 +577,7 @@ ivug_param_create_from_bundle(service_h service)
        {
                eina_convert_atod(val, strlen(val), &m, &e);
                data->max_latitude = ldexp((double)m, e);
-               MSG_IVUG_HIGH("Max Latitude =%f", data->max_latitude);
+               MSG_IVUG_MED("Max Latitude =%f", data->max_latitude);
                _ivug_free(&val);
        }
        else
@@ -487,7 +590,7 @@ ivug_param_create_from_bundle(service_h service)
        {
                eina_convert_atod(val, strlen(val), &m, &e);
                data->min_latitude = ldexp((double)m, e);
-               MSG_IVUG_HIGH("Min Latitude =%f", data->min_latitude);
+               MSG_IVUG_MED("Min Latitude =%f", data->min_latitude);
                _ivug_free(&val);
        }
        else
@@ -498,7 +601,7 @@ ivug_param_create_from_bundle(service_h service)
        service_get_extra_data (service, IVUG_BUNDLE_KEY_SETAS_TYPE, &val);
        if (val)
        {
-               MSG_IVUG_HIGH("SetAs UG Type=%s", val);
+               MSG_IVUG_MED("SetAs UG Type=%s", val);
                data->setas_type = _get_setas_type(val);
 
                char* resolution = NULL;
@@ -507,7 +610,7 @@ ivug_param_create_from_bundle(service_h service)
                if(resolution)
                {
                        sscanf(resolution, "%5dx%5d", &(data->width), &(data->height));
-                       MSG_IVUG_HIGH("Rectangle width = %d, height = %d", data->width, data->height);
+                       MSG_IVUG_MED("Rectangle width = %d, height = %d", data->width, data->height);
                        if(data->width == 0 || data->height == 0)
                        {
                                MSG_IVUG_ERROR("Resolution is invalid");
@@ -531,7 +634,7 @@ ivug_param_create_from_bundle(service_h service)
                service_get_extra_data (service, IVUG_BUNDLE_KEY_FIXED_RATIO, &bRatioFix);
                if(bRatioFix)
                {
-                       MSG_IVUG_HIGH("Fixed ratio=%s", bRatioFix);
+                       MSG_IVUG_MED("Fixed ratio=%s", bRatioFix);
                        if(strcmp(bRatioFix, "TRUE") == 0)
                        {
                                data->bRatioFix = true;
@@ -545,7 +648,7 @@ ivug_param_create_from_bundle(service_h service)
        service_get_extra_data (service, IVUG_BUNDLE_KEY_FOOTSTEPS, &val);
        if (val)
        {
-               MSG_IVUG_HIGH("Footsteps=%s", val);
+               MSG_IVUG_MED("Footsteps=%s", val);
                if(strcmp(val, "TRUE") == 0)
                {
                        data->footsteps = true;
@@ -553,6 +656,26 @@ ivug_param_create_from_bundle(service_h service)
                _ivug_free(&val);
        }
 
+
+
+
+       char **index_list = NULL;
+       int index_len = 0;
+       service_get_extra_data_array(service, IVUG_BUNDLE_KEY_SELECTED_INDEX, &index_list, &index_len);
+       if(index_list != NULL)
+       {
+               int i;
+               for(i=0; i<index_len; i++)
+               {
+                       data->selected_list = eina_list_append(data->selected_list, (void *)ivug_atoi(index_list[i]));
+               }
+               for(i=0; i<index_len; i++)
+               {
+                       free(index_list[i]);
+               }
+               free(index_list);
+       }
+
        return data;
 }
 
@@ -566,6 +689,7 @@ ivug_param_delete(ivug_parameter* data)
                data->filepath = NULL;
        }
 
+
        uuid_free(data->album_id);
 
        free(data);
@@ -575,3 +699,99 @@ ivug_param_delete(ivug_parameter* data)
 }
 
 
+
+
+
+Filter_struct *ivug_param_create_filter(const ivug_parameter *param)
+{
+       IV_ASSERT(param != NULL);
+
+       Filter_struct *filter_str = (Filter_struct *)calloc(1, sizeof(Filter_struct));
+       IV_ASSERT(filter_str != NULL);
+
+       media_handle handle = NULL;
+
+       if ( param->view_by == IVUG_VIEW_BY_DIRECTORY )
+       {
+               filter_str->type = FILTER_DIRECTORY;
+               filter_str->view_by = param->view_by;
+
+               Direcotry_Filter *filter = (Direcotry_Filter *)calloc(1, sizeof(Direcotry_Filter) );
+
+               IV_ASSERT(filter != NULL);
+
+               filter_str->dir_filter = filter;
+               filter_str->dir_filter->basedir = ivug_get_directory(param->filepath);
+               filter_str->dir_filter->current = strdup( param->filepath );
+
+               return filter_str;
+       }
+       else
+       {
+               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;
+       filter_str->selected_list = param->selected_list;
+
+       if(filter_str->type == FILTER_DB)
+       {
+               DB_Filter *filter = calloc(1, sizeof(DB_Filter));
+
+               IV_ASSERT(filter != NULL);
+
+               MSG_SDATA_HIGH("param->view_by is %d", param->view_by);
+               switch(filter_str->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_TAG:
+                       filter->tag_id = param->tag_id;
+                       break;
+
+               case IVUG_VIEW_BY_FAVORITES:
+                       filter->album_id = INVALID_UUID;
+                       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:
+                       if(param->album_id == NULL)
+                       {
+                               handle = ivug_db_get_folder_handle(ecore_file_dir_get(param->filepath));
+                               filter->album_id = ivug_db_get_folder_id(handle);
+                       }
+                       else
+                       {
+                               filter->album_id = uuid_assign(param->album_id);
+                       }
+                       break;
+               case IVUG_VIEW_BY_DIRECTORY:
+                       // TODO : Need more things?
+                       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;
+
+}
+
+
old mode 100755 (executable)
new mode 100644 (file)
index f357109..4becf52
@@ -1,47 +1,54 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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_PARAMETER_H__
 #define __IVUG_PARAMETER_H__
 
 #include <stdbool.h>
 #include <app.h>
+#include <Elementary.h>
+
+#include "ivug-define.h"
 #include "ivug-datatypes.h"
+#include "ivug-filter.h"
 
 typedef enum {
        IVUG_MODE_INVAILD = 0x00,
-       IVUG_MODE_NORMAL,
+       IVUG_MODE_NORMAL,                               // include web album
        IVUG_MODE_SINGLE,                               // just show one slide
        IVUG_MODE_DISPLAY,                              // from "take a photo" in messenger
        IVUG_MODE_FILE,                                 // file viewer(can flick)
        IVUG_MODE_CAMERA,                               // camera(can flick)
        IVUG_MODE_SETAS,                                // SetAs in setting menu.
+       IVUG_MODE_PTP,                                  // PTP in gallery
        IVUG_MODE_SLIDESHOW,                    // Slideshow
+       IVUG_MODE_BESTSHOT,                             // Bestshot
+       IVUG_MODE_BUDDY,                                // Buddy photo share
 } ivug_mode;
 
 //set as ug
 typedef enum {
        IVUG_SET_AS_UG_TYPE_INVALID = 0x00,
-       IVUG_SET_AS_UG_TYPE_WALLPAPER,\r
-       IVUG_SET_AS_UG_TYPE_LOCKSCREEN,\r
-       IVUG_SET_AS_UG_TYPE_WALLPAPER_N_LOCKSCREEN,\r
+       IVUG_SET_AS_UG_TYPE_WALLPAPER,
+       IVUG_SET_AS_UG_TYPE_LOCKSCREEN,
+       IVUG_SET_AS_UG_TYPE_WALLPAPER_N_LOCKSCREEN,
        IVUG_SET_AS_UG_TYPE_CALLER_ID,
        IVUG_SET_AS_UG_TYPE_VIDEO_CALL_ID,
        IVUG_SET_AS_UG_TYPE_CROP,                       // For OSP
-       IVUG_SET_AS_UG_TYPE_WALLPAPER_ONLY,
+       IVUG_SET_AS_UG_TYPE_WALLPAPER_CROP,
        IVUG_SET_AS_UG_TYPE_MAX,
 } ivug_setas_type;
 
@@ -71,8 +78,13 @@ typedef struct {
        unsigned int height;
        bool bRatioFix;
 
+       int tag_id;
+
        int start_index;
 
+
+
+       Eina_List *selected_list;
 } ivug_parameter;
 
 
@@ -80,12 +92,21 @@ typedef struct {
 extern "C" {
 #endif
 
+
 ivug_parameter*
 ivug_param_create_from_bundle(service_h service);
 
 void
 ivug_param_delete(ivug_parameter* data);
 
+
+/*
+       Covert ivug_paramter to db filter or allshare filter
+*/
+Filter_struct *
+ivug_param_create_filter(const ivug_parameter *param);
+
+
 #ifdef __cplusplus
 }
 #endif
old mode 100755 (executable)
new mode 100644 (file)
index 78c9d5e..2657bb6
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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"
@@ -33,7 +33,7 @@ typedef struct _Ivug_Popup
 
        Popup_Response response;
 
-       int haptic_handle;
+       vibration_h haptic_handle;
 
        Evas_Smart_Cb callback;
        void *data;
@@ -46,6 +46,7 @@ typedef struct
        char *name;
        Evas_Object *radio_main;
        Ivug_Popup *p_iv_popup;
+       Elm_Object_Item *item;
 } ivug_radio_popup_item;
 
 static Ivug_Popup * ivug_popup_create()
@@ -127,19 +128,13 @@ ivug_deletepopup_show(Evas_Object* parent, const char* title,
        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);
+       btn_delete = ivug_button_add(popup, "popup_button/default", IDS_DELETE, NULL, _on_popup_response, iv_popup);
        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);
+       btn_cancel = ivug_button_add(popup, "popup_button/default", IDS_CANCEL, NULL, _on_popup_response, iv_popup);
        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;
@@ -172,19 +167,13 @@ ivug_2btn_popup_show(Evas_Object* parent, const char* 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);
+       btn_yes = ivug_button_add(popup, "popup_button/default", IDS_YES, NULL, _on_popup_response, iv_popup);
        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);
+       btn_no = ivug_button_add(popup, "popup_button/default", IDS_NO, NULL, _on_popup_response, iv_popup);
        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;
@@ -194,45 +183,45 @@ ivug_2btn_popup_show(Evas_Object* parent, const char* title,
        evas_object_layer_set(popup, EVAS_LAYER_MAX);
 
        return popup;
-}\r
-\r
-Evas_Object*\r
-ivug_1btn_popup_show(Evas_Object* parent, const char* title,\r
-                                       const char* contents, Evas_Smart_Cb response, void* user_data)\r
-{\r
-       IV_ASSERT(response != NULL);\r
-\r
-       Ivug_Popup *iv_popup = ivug_popup_create();\r
-\r
-       Evas_Object *popup;\r
-       Evas_Object *btn_yes;\r
-       //create popup\r
-\r
-       popup = elm_popup_add(parent);\r
-       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
-       elm_object_text_set(popup, contents);\r
-       if(title)\r
-       {\r
-               elm_object_part_text_set(popup, "title,text", title);\r
-       }\r
-\r
-       btn_yes = elm_button_add(popup);\r
-       elm_object_style_set(btn_yes, "popup_button/default");\r
-       elm_object_text_set(btn_yes, IDS_OK);\r
-       elm_object_part_content_set(popup, "button1", btn_yes);\r
-       evas_object_data_set(btn_yes, "response", (void *)POPUP_RESPONSE_OK);\r
-       evas_object_smart_callback_add(btn_yes, "clicked", _on_popup_response, iv_popup);\r
-\r
-       iv_popup->popup = popup;\r
-       iv_popup->callback = response;\r
-       iv_popup->data = user_data;\r
-\r
-       evas_object_show(popup);\r
-       evas_object_layer_set(popup, EVAS_LAYER_MAX);\r
-\r
-       return popup;\r
-}\r
-\r
+}
+
+Evas_Object *ivug_timeout_popup_show(Evas_Object *parent,
+       Evas_Smart_Cb response, void *data, const char *sztitle, const char *content)
+
+{
+       Ivug_Popup *iv_popup = ivug_popup_create();
+
+       Evas_Object *popup;
+
+       popup = elm_popup_add(parent);
+       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+       elm_object_text_set(popup, content);
+
+       if(response)
+       {
+               iv_popup->callback = response;
+       }
+
+       if(data)
+       {
+               iv_popup->data = data;
+       }
+
+       if ( sztitle )
+               elm_object_part_text_set(popup, "title,text", sztitle);
+
+       elm_popup_timeout_set(popup, 3.0);
+       evas_object_smart_callback_add(popup, "timeout", _on_popup_response, iv_popup);
+
+       iv_popup->popup = popup;
+
+       evas_object_show(popup);
+
+       return popup;
+
+}
+
 static void _on_longpress_popup_selected(void *data, Evas_Object *obj, void *event_info)
 {
        IV_ASSERT(data != NULL);
@@ -253,6 +242,10 @@ static void _on_longpress_popup_selected(void *data, Evas_Object *obj, void *eve
        {
                response = LPPOPUP_RESPONSE_COPY;
        }
+       else if(strncmp(label, IDS_MANUALLY_DETECT, strlen(label)) == 0)
+       {
+               response = LPPOPUP_RESPONSE_MANUALLY_DETECT;
+       }
        else
        {
                MSG_MAIN_WARN("Unknown Share type : %s", label);
@@ -278,6 +271,7 @@ ivug_longpress_popup_show(Evas_Object *parent, int x, int y, Evas_Smart_Cb respo
 
        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);
@@ -291,6 +285,7 @@ ivug_longpress_popup_show(Evas_Object *parent, int x, int y, Evas_Smart_Cb respo
        return ctx_popup;
 }
 
+
 void
 _ivug_rename_enter_click_cb(void *data, Evas_Object *obj, void *event_info)
 {
@@ -377,6 +372,11 @@ Evas_Object *ivug_rename_popup_show(Evas_Object *parent, const char *filename, E
        Evas_Object *layout = NULL;
 
        Ivug_Popup *iv_popup = ivug_popup_create();
+       if(iv_popup == NULL)
+       {
+               MSG_IMAGEVIEW_ERROR("ivug_popup_create ERROR");
+               return NULL;
+       }
 
        popup = elm_popup_add(parent);
        if(!popup)
@@ -388,19 +388,12 @@ Evas_Object *ivug_rename_popup_show(Evas_Object *parent, const char *filename, E
        //elm_object_style_set(popup, "menustyle");
        elm_object_part_text_set(popup, "title,text", "Rename");
 
-       layout = elm_layout_add(popup);
+       layout = ivug_layout_add2(popup, IVUG_POPUP_EDJ_NAME, "popup_entryview");
        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);
@@ -421,19 +414,13 @@ Evas_Object *ivug_rename_popup_show(Evas_Object *parent, const char *filename, E
 
        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);
+       Evas_Object *btn_ok = ivug_button_add(popup, "popup_button/default", IDS_OK, NULL, _ivug_rename_enter_click_cb, iv_popup);
        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);
+       Evas_Object *btn_cancel = ivug_button_add(popup, "popup_button/default", IDS_CANCEL, NULL, _on_popup_response, iv_popup);
        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;
@@ -449,14 +436,7 @@ ENTRY_POPUP_FREE:
        {
                evas_object_del(popup);
        }
-       if(layout)
-       {
-               evas_object_del(layout);
-       }
-       if(entry)
-       {
-               evas_object_del(entry);
-       }
+       ivug_popup_delete(iv_popup);
        return NULL;
 }
 
@@ -578,17 +558,14 @@ Evas_Object *ivug_radio_popoup_show(Evas_Object *parent, char *title,
        Ivug_Popup *iv_popup = ivug_popup_create();
 
        popup = elm_popup_add(parent);
-       elm_object_style_set(popup, "min_menustyle");
+       elm_object_style_set(popup, "menustyle");//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);
+       btn_close = ivug_button_add(popup, "popup_button/default", IDS_CLOSE, NULL, _on_popup_response, iv_popup);
        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;
@@ -619,6 +596,8 @@ Evas_Object *ivug_radio_popoup_show(Evas_Object *parent, char *title,
 
                item = elm_genlist_item_append(genlist, &itc, (void *)popup_item, NULL,
                        ELM_GENLIST_ITEM_NONE, _gl_sel, iv_popup);
+
+               popup_item->item = item;
        }
 
        Evas_Object *box;
old mode 100755 (executable)
new mode 100644 (file)
index dd1a1ba..2537f7a
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
@@ -39,11 +39,7 @@ typedef enum _Longpress_Popup_Response
 
 #ifdef __cplusplus
 extern "C" {
-#endif\r
-\r
-Evas_Object* ivug_1btn_popup_show(Evas_Object* parent, const char* title,\r
-                                       const char* contents, Evas_Smart_Cb response, void* user_data);\r
-\r
+#endif
 
 /*
        Create & show popup with 2 button (Yes/No)
@@ -55,7 +51,9 @@ Evas_Object* ivug_2btn_popup_show(Evas_Object* parent, const char* title,
        Create & show popup with no button.
        TODO : Rename function
 */
-\r
+Evas_Object *ivug_timeout_popup_show(Evas_Object *parent,
+       Evas_Smart_Cb response, void *data, const char *sztitle, const char *content);
+
 Evas_Object*
 ivug_deletepopup_show(Evas_Object* parent, const char* title,
                                        const char* contents, Evas_Smart_Cb response, void* user_data);
@@ -66,6 +64,7 @@ ivug_deletepopup_show(Evas_Object* parent, const char* title,
 */
 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);
 
@@ -74,6 +73,8 @@ Evas_Object *ivug_rename_popup_show(Evas_Object *parent, const char *filename, E
 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
old mode 100755 (executable)
new mode 100644 (file)
index 10aa0c8..b7d5e03
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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"
 
@@ -74,7 +74,7 @@ ivug_selectioninfo_create(Evas_Object* parent, const char* text)
 
        notify = elm_notify_add(parent);
        ivug_retv_if(notify == NULL, NULL);
-       elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM);
+       elm_notify_align_set(notify, ELM_NOTIFY_ALIGN_FILL, 1.0);
        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);
@@ -112,40 +112,85 @@ ivug_selectioninfo_create(Evas_Object* parent, const char* text)
 Evas_Object*
 ivug_notify_create(Evas_Object* parent, const char* text)
 {
-       Evas_Object *notify;
+       Evas_Object *selection_info;
 
-       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);
+       selection_info = elm_layout_add(parent);
+       ivug_retv_if(selection_info == NULL, NULL);
+       evas_object_size_hint_weight_set(selection_info, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(selection_info, EVAS_HINT_FILL, EVAS_HINT_FILL);
 
-       int rot_angle = gGetRotationDegree();
+#ifdef USE_CUSTOM_STYLE
+       //elm_object_theme_set(selection_info, gGetSystemTheme());
+#endif
+       elm_layout_theme_set(selection_info, "standard", "selectioninfo", "default");
 
-       Evas_Object* layout = elm_layout_add(parent);
+       elm_object_part_text_set(selection_info, "elm.text", text);
+
+       evas_object_show(selection_info);
+
+       return selection_info;
+}
+
+static void _on_timeout(void *data, Evas_Object *obj, void *event_info)
+{
+       evas_object_del(obj);   // remove notify
+}
+
+void
+ivug_notify_timeout_create(Evas_Object* parent, const char* text, double align,
+       Evas_Smart_Cb timeout_cb, void *data)
+{
+       Evas_Object *notify = elm_notify_add(parent);
+       ivug_ret_if(notify == NULL);
+       elm_notify_align_set(notify, ELM_NOTIFY_ALIGN_FILL, align);
+       elm_notify_timeout_set(notify, 2.0);
+
+       Evas_Object *selection_info = elm_layout_add(notify);
+       ivug_ret_if(selection_info == NULL);
+       evas_object_size_hint_weight_set(selection_info, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(selection_info, EVAS_HINT_FILL, EVAS_HINT_FILL);
 
 #ifdef USE_CUSTOM_STYLE
-       elm_object_theme_set(layout, gGetSystemTheme());
+       //elm_object_theme_set(selection_info, gGetSystemTheme());
+#endif
+       elm_layout_theme_set(selection_info, "standard", "selectioninfo", "default");
 
-       if ( (rot_angle == 0) || (rot_angle == 180) )
-       {
-               elm_layout_theme_set(layout, "standard", "selectioninfo", "vertical/bottom_86");
-       }
+       elm_object_part_text_set(selection_info, "elm.text", text);
+
+       elm_object_content_set(notify, selection_info);
+
+       if(timeout_cb)
+               evas_object_smart_callback_add(notify, "timeout", timeout_cb, data);
        else
-       {
-               elm_layout_theme_set(layout, "standard", "selectioninfo", "horizontal/bottom_64");
-       }
+               evas_object_smart_callback_add(notify, "timeout", _on_timeout, NULL);
+
+       evas_object_show(notify);
+}
+
+Evas_Object*
+ivug_notify_static_create(Evas_Object* parent, const char* text, double align)
+{
+       Evas_Object *notify = elm_notify_add(parent);
+       ivug_retv_if(notify == NULL, NULL);
+       elm_notify_align_set(notify, ELM_NOTIFY_ALIGN_FILL, align);
+
+       Evas_Object *selection_info = elm_layout_add(notify);
+       ivug_retv_if(selection_info == NULL, NULL);
+       evas_object_size_hint_weight_set(selection_info, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(selection_info, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+#ifdef USE_CUSTOM_STYLE
+       //elm_object_theme_set(selection_info, gGetSystemTheme());
 #endif
+       elm_layout_theme_set(selection_info, "standard", "selectioninfo", "default");
 
-       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);
+       elm_object_part_text_set(selection_info, "elm.text", text);
 
-       evas_object_event_callback_add(notify, EVAS_CALLBACK_RESIZE, _on_resize, NULL);
+       elm_object_content_set(notify, selection_info);
 
        evas_object_show(notify);
 
        return notify;
 }
 
+
old mode 100755 (executable)
new mode 100644 (file)
index ceb01a4..8ae8d98
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
 extern "C" {
 #endif
 
+#define NOTIFY_ALIGN_TOP (0.04)        // efl bug? not 0.0
+#define NOTIFY_ALIGN_BOTTOM (1.0)
+
 /* 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);
 
+Evas_Object * ivug_notify_static_create(Evas_Object* parent, const char* text, double align);
+
+void ivug_notify_timeout_create(Evas_Object* parent, const char* text, double align,
+       Evas_Smart_Cb timeout_cb, void *data);
+
+
 #ifdef __cplusplus
 }
 #endif
old mode 100755 (executable)
new mode 100644 (file)
index 18db6fe..f87b5e5
@@ -111,10 +111,12 @@ static Eina_Bool _photocam_image_save(Evas_Object *photocam, Evas_Coord_Rectangl
 
        return EINA_TRUE;
 error:
-
-       if(ivug_remove_file(tmp_file) == false)
+       if ( tmp_file != NULL )
        {
-               MSG_SETAS_ERROR( "Delete file %s failed", tmp_file);
+               if(ivug_remove_file(tmp_file) == false)
+               {
+                       MSG_SETAS_ERROR( "Delete file %s failed", tmp_file);
+               }
        }
 
        return EINA_FALSE;
@@ -290,7 +292,7 @@ _ivug_setas_save_callerimage(Evas_Object *photocam, Evas_Coord_Rectangle *rect,
                MSG_SETAS_ERROR( "Crop lcd image failed!");
        }
 
-       if(pSetAsView->mode == IVUG_SETAS_UG || pSetAsView->mode == IVUG_SETAS_APPSVC)
+       if(pSetAsView->Mode != IVUG_SETAS_NORMAL)
        {
                if ( crop_lcd_ret == EINA_TRUE && crop_sel_ret == EINA_TRUE )
                {
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 502a13c..c132d4b
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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"
@@ -26,11 +26,24 @@ static void _on_obj_deleted(void * data, Evas * e, Evas_Object * obj, void * eve
        char *szMsg = (char *)data;
        IV_ASSERT(szMsg != NULL);
 
-       MSG_MAIN_HIGH("On Object deleted. %s", szMsg);
+       MSG_IVUG_HIGH("On Object deleted. %s", szMsg);
 
        free(szMsg);
 }
 
+void ivug_layout_attach_to_window(Evas_Object *parent, Evas_Object* layout)
+{
+#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
+}
+
 void ivug_on_obj_deleted(Evas_Object* obj, const char *msg, const char *func, int line)
 {
        static char buf[1024];
@@ -68,29 +81,30 @@ ivug_layout_add(Evas_Object *parent, const char *edj, const char *group)
 
        if ( layout == NULL )
        {
-               MSG_SETAS_ERROR("Cannot create layout");
+               MSG_IVUG_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);
+               MSG_IVUG_ERROR("edj loading fail, filepath=%s Group=%s", edj, group);
                evas_object_del(layout);
                return NULL;
        }
 
+/*
+       winÀÇ child¿¡ ´ëÇØ expand_set(EXPAND,EXPAND) ¸¦ ÇØÁÖÁö ¾ÊÀ¸¸é..
+
+       elm_win_resize_object_add() ³»ºÎ¿¡¼­, winÀÇ minWH, maxWH¸¦ ´Ù½Ã ±¸ÇÏ°Ô µÇ´Âµ¥,
+
+       À̺κп¡¼­ max°ªÀ» minÀ¸·Î ÇÒ´ç Çعö¸®±â ¶§¹®¿¡ winÀÇ Å©±â°¡ minWHÀÇ Å©±â·Î °íÁ¤ µÇ¾î ¹ö¸°´Ù.
+
+       ¹«Á¶°Ç EXPANDÇØÁÖ¾î¶ó.. elm_win°ú ¿¬°üÀÌ ÀÖ´Ù¸é ..
+*/
        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
+       ivug_layout_attach_to_window(parent, layout);
 
        return layout;
 }
@@ -115,17 +129,17 @@ ivug_default_layout_add( Evas_Object *win)
        if (!strcmp(profile,"mobile"))
        {
                ret = elm_layout_theme_set(layout, "layout", "application", "default");
-               MSG_SETAS_HIGH("layout/application/default");
+               MSG_IVUG_HIGH("layout/application/default");
        }
        else if (!strcmp(profile,"desktop"))
        {
                ret = elm_layout_theme_set(layout, "layout", "application", "noindicator");
-               MSG_SETAS_HIGH("layout/application/noindicator");
+               MSG_IVUG_HIGH("layout/application/noindicator");
        }
 
        if (ret == EINA_FALSE)
        {
-               MSG_SETAS_ERROR("theme set fail");
+               MSG_IVUG_ERROR("theme set fail");
                evas_object_del(layout);
                return NULL;
        }
@@ -133,21 +147,39 @@ ivug_default_layout_add( Evas_Object *win)
        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_show(layout);
+       return layout;
+}
 
-       evas_object_move(layout, x, y);
-       evas_object_resize(layout, w, h);
-#endif
+Evas_Object *
+ivug_layout_add2(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_IVUG_ERROR("Cannot create layout");
+               return NULL;
+       }
+
+       if (elm_layout_file_set(layout, edj, group) == EINA_FALSE)
+       {
+               MSG_IVUG_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);
 
        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);
@@ -183,7 +215,7 @@ Evas_Object *ivug_icon_add(Evas_Object *parent, const char *edjname, const char
 
        icon = elm_icon_add(parent);
 
-       if ( elm_icon_file_set(icon, edjname, groupname) == EINA_FALSE)
+       if ( elm_image_file_set(icon, edjname, groupname) == EINA_FALSE)
        {
                MSG_IVUG_ERROR("Cannot file set. EDJ=%s Group=%s", edjname, groupname);
                evas_object_del(icon);
@@ -191,7 +223,7 @@ Evas_Object *ivug_icon_add(Evas_Object *parent, const char *edjname, const char
        }
 
        evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
-       elm_icon_resizable_set(icon, 1, 1);
+       elm_image_resizable_set(icon, 1, 1);
        evas_object_size_hint_expand_set(icon, 1, 1);
 
        return icon;
@@ -202,7 +234,7 @@ 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");
+               MSG_IVUG_ERROR("tool bar failed");
                return NULL;
        }
        elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_EXPAND);
@@ -213,3 +245,32 @@ Evas_Object *ivug_controlbar_add(Evas_Object *parent, const char *style)
        return toolbar;
 }
 
+Evas_Object *ivug_naviframe_add(Evas_Object *parent, const char *style)
+{
+       Evas_Object *navi_bar = elm_naviframe_add(parent);
+       if ( navi_bar == NULL)
+       {
+               MSG_IVUG_ERROR("elm_naviframe_add failed");
+               return NULL;
+       }
+
+       if(style)
+       {
+               elm_object_style_set(navi_bar, style);
+       }
+       else
+       {
+#ifdef USE_CUSTOM_STYLE
+               elm_object_theme_set(navi_bar, gGetSystemTheme());
+               elm_object_style_set(navi_bar, "ivug-main/default");
+#else
+               elm_object_style_set(navi_bar, "default");
+#endif
+       }
+
+       evas_object_show(navi_bar);
+
+       return navi_bar;
+}
+
+
old mode 100755 (executable)
new mode 100644 (file)
index 9433e46..5327a42
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
@@ -39,6 +39,9 @@ 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_layout_add2(Evas_Object *parent, const char *edj, const char *group);
+
 Evas_Object*
 ivug_default_layout_add( Evas_Object *win);
 
@@ -51,6 +54,9 @@ ivug_icon_add(Evas_Object *parent, const char *edjname, const char *groupname);
 Evas_Object *
 ivug_controlbar_add(Evas_Object *parent, const char *style);
 
+Evas_Object *
+ivug_naviframe_add(Evas_Object *parent, const char *style);
+
 
 #ifdef __cplusplus
 }
old mode 100755 (executable)
new mode 100644 (file)
index 6ebc0e2..2fa8865
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
 
 /*
 Definition "PREFIX" is declared in CMakelist.txt
-       PREFIX is "/opt/ug"
+       PREFIX is "/usr/ug"
        PACKAGE is "ug-image-viewer-efl"
 
        Path name does not include trailing /.
 
-       DATA_PATH is /opt/ug/data
+       DATA_PATH is /opt/usr/ug/data
 */
 
 #define LOCALE_PATH                                    PREFIX"/res/locale"
@@ -68,12 +68,15 @@ Definition "PREFIX" is declared in CMakelist.txt
 #define USE_DEFAULT_DOWNLOADS_FOLDER
 
 #ifdef USE_DEFAULT_DOWNLOADS_FOLDER
-#define DEFAULT_DOWNLOADS_FOLDER "/opt/media/Downloads"
+#define DEFAULT_DOWNLOADS_FOLDER "/opt/usr/media/Downloads"
 #endif
 
+#define PATH_SDCARD            "/opt/storage/sdcard/"
 
 #define _EDJ(o)                        elm_layout_edje_get(o)
 
+#define IVUG_WEB_DOWNLOAD_TEMP_DIR DATA_PATH
+
 #define MENUBAR_TIMEOUT_SEC (5.0f)     // 5sec
 
 #endif /* __IVUG_COMMON_H__ */
old mode 100755 (executable)
new mode 100644 (file)
index 3e11f87..83a58f0
@@ -1,22 +1,33 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
 
+#include "ivug-define.h"
+
+
+typedef enum {
+       CROP_ERROR_TYPE_NONE,
+       CROP_ERROR_TYPE_UNKNOWN_FORMAT,
+       CROP_ERROR_TYPE_PERMISSION_DENIED,
+       CROP_ERROR_TYPE_INVALID_FILE,
+       CROP_ERROR_TYPE_GENERAL,
+} Crop_Error;
+
 typedef struct {
        Evas_Object *layout;
        Evas_Object *notify;
@@ -26,17 +37,23 @@ typedef struct {
 
        Evas_Object *gesture;
 
+       Evas_Object *btn_back;
+
+       Evas_Object *contents_area;
+       Evas_Object *btn_ok;
+
        bool bShowMenu;
        char *file_path;
-       char *result_path;\r
-\r
-       Ecore_Timer *timer;\r
-\r
-       Evas_Object *btn_layout;\r
-       Elm_Object_Item *btn_ok;\r
+       char *result_path;
 
        int w;
        int h;
+
+       int prev_x;
+       int prev_y;
+       int prev_w;
+       int prev_h;
+
 } IvugCropView;
 
 /*
@@ -63,6 +80,8 @@ void ivug_crop_view_destroy(IvugCropView *pCropView);
 
 Evas_Object *ivug_crop_view_get_object(IvugCropView *pCropView);
 
+void ivug_crop_view_create_menu(IvugCropView *pCropView, Evas_Object *navi_bar);
+
 #ifdef __cplusplus
 }
 #endif
old mode 100755 (executable)
new mode 100644 (file)
index 46db4fa..b07ceed
@@ -1,26 +1,26 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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"\r
-#include "ivug-medialist.h"\r
+#include "ivug-media.h"
+#include "ivug-medialist.h"
 #include "ivug-name-view.h"
 
 #include "ivug-detail-info.h"
@@ -53,22 +53,25 @@ typedef struct {
        Elm_Genlist_Item_Class multiline_icon_itc;
        Elm_Genlist_Item_Class multiline_itc;
 
-       ivug_file_info_t        file_Info;
+       char **filename;        //for rename
+       char **path;    //for rename
 
-       Ivug_NameView *pAddTagView;
-       Media_Item *mitem;\r
+       Ivug_NameView *pNameView;
+       Media_Item *mitem;
 } Ivug_DetailsView;
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-Ivug_DetailsView *ivug_details_view_screen_create(Evas_Object *parent, Media_Item *mitem, ivug_view_by view_by);\r
+Ivug_DetailsView *ivug_details_view_screen_create(Evas_Object *parent, Media_Item *mitem, ivug_view_by view_by);
 
 void ivug_details_view_destroy(Ivug_DetailsView *pDetailsView);
 
 Evas_Object *ivug_details_view_object_get(Ivug_DetailsView *pDetailsView);
 
+void ivug_details_view_update(Ivug_DetailsView *pDetailsView, const char *new_path);
+
 #ifdef __cplusplus
 }
 #endif
old mode 100755 (executable)
new mode 100644 (file)
index c41a70b..f817f8e
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
@@ -24,6 +24,8 @@
 #include "ivug-name-view.h"
 #include "ivug-details-view.h"
 #include "ivug-setas-view.h"
+#include "ivug-crop-view.h"
+
 
 #define MAX_CTRL_ITEM_CNT 5
 #define MAX_NAVI_ITEM_CNT 3
 typedef enum {
        NAVI_BAR_TYPE_NONE = 0x00,
        NAVI_BAR_TYPE_EMPTY,                    // no control bar
-       NAVI_BAR_TYPE_IMAGE,                    // [Set, Info] default
+       NAVI_BAR_TYPE_IMAGE,                    // [Edit, Set, Info] default
        NAVI_BAR_TYPE_FILE,                             // [Set, Info] default
-       NAVI_BAR_TYPE_VIDEO,                    // [Set, Info] default
+       NAVI_BAR_TYPE_VIDEO,                    // [Trim, Set, Info] default
+       NAVI_BAR_TYPE_WEB_IMAGAE,                               // [Set] default
        NAVI_BAR_TYPE_SELECT,                   // [Ok, Cancel] from take photo
 } ivug_toolbar;
 
@@ -43,19 +46,26 @@ 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
+       CTRL_BAR_TYPE_READ_ONLY,                        // [Share, Set, Save, Info]   web image
+       CTRL_BAR_TYPE_IMAGE,                            // [Delete,Share, Add tag, Slide show, Editor] from gallery
+       CTRL_BAR_TYPE_VIDEO,                            // [Delete,Share, Add tag, Slide show, Trim] from gallery
 } ivug_ctrlbar;
 
 typedef enum {
 // only shows in ctrlbar
        TOOLBUTTON_DELETE,
        TOOLBUTTON_SHARE,
+       TOOLBUTTON_ADDTAG,
        TOOLBUTTON_SLIDESHOW,
+       TOOLBUTTON_SAVE,
 
 // shows in either toolbar or ctrlbar
+       TOOLBUTTON_EDIT,
        TOOLBUTTON_SETAS,
        TOOLBUTTON_DETAILS,
+       TOOLBUTTON_TRIM,
+
+       TOOLBUTTON_ALLSHARE,
 
 // only shows in toolbar
        TOOLBUTTON_OK,
@@ -85,19 +95,18 @@ typedef struct _SlideShow SlideShow;
 
 typedef struct {
        Evas_Object *parent;
-       Evas_Object *layout     ;               /*Layout widget based on EDJ*/
+       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 *back_btn;
+
        Evas_Object *area_obj;          //lcd area except indicator
 
-       Evas_Object* selectioninfo;\r
-\r
-       Evas_Object *zoom_slider;\r
-       int zoom_level;\r
+       Evas_Object* selectioninfo;
 
 /*
    |------------------|
@@ -122,26 +131,35 @@ typedef struct {
        Evas_Object *ctrl_bar;
        ivug_ctrlbar ctrl_bar_type;
 
-       ControlBar_Item items[TOOLBUTTON_MAX];
+       Evas_Object *btn_share;
+       Evas_Object *btn_download;
+
 
        bool bSetThmByUser;
 
        Evas_Object* popup;                     //popup
+       Evas_Object* ctx_popup;                 //context popup 1depth
+       Evas_Object* ctx_popup2;                //context popup 2depth
 
        Evas_Object* longpress_popup;           //long press popup
        bool bLongpressEnd;
 
+       Evas_Object *best_icon;
+
 // child view.
+       Ivug_NameView *pNameView;
        Ivug_SetAsView *pSetAsView;
 
        Ivug_DetailsView *pDetailsView;
+       IvugCropView *pCropView;
+
 
 // List
        Media_List *mList;
 
 //flag
        bool bShowMenu;
-       bool bFootSteps;
+       bool bUseNFC;
 
        ivug_mode mode;
        ivug_view_by view_by;
@@ -160,7 +178,12 @@ typedef struct {
 
 // Slide show;
        SlideShow *ssHandle;
-} Ivug_MainView;\r
+       char *ss_music_name;
+       bool bClickPrevent;
+
+} Ivug_MainView;
+
+#undef FIX_LAST_BLINK
 
 #ifdef __cplusplus
 extern "C" {
@@ -180,7 +203,7 @@ 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);
+bool ivug_main_view_set_list(Ivug_MainView *pMainView, ivug_parameter *ivug_param);
 
 /*
        Start slide show.
@@ -203,6 +226,8 @@ 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);
 
+void _ivug_main_on_mmc_state_changed(keynode_t* node, void *data);
+
 #ifdef __cplusplus
 }
 #endif
old mode 100755 (executable)
new mode 100644 (file)
index 4e76df7..6ccce88
@@ -1,24 +1,25 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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"
+#include "ivug-vibration.h"
 
 typedef enum {
        NAME_VIEW_RESPONSE_OK,
@@ -39,7 +40,7 @@ typedef struct _Ivug_NameView
        Evas_Object *entry;
        Evas_Object *btn_done;
 
-       int haptic_handle;              // Negative if invalid
+       vibration_h haptic_handle;              // Null if invalid
 
        FNResponse fnresponse;
        void *clientdata;
@@ -68,6 +69,8 @@ ivug_name_view_destroy(Ivug_NameView *pNameView);
 Evas_Object *
 ivug_name_view_object_get(Ivug_NameView *pNameView);
 
+void
+ivug_name_view_set_focus(Ivug_NameView *pNameView);
 
 #ifdef __cplusplus
 }
old mode 100755 (executable)
new mode 100644 (file)
index 5b7cce6..d320386
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
@@ -37,7 +37,8 @@ typedef enum {
 typedef enum {
        IVUG_SETAS_NORMAL,      // launched from mainview
        IVUG_SETAS_UG,          // ug mode
-       IVUG_SETAS_APPSVC       // appsvc mode
+       IVUG_SETAS_APPSVC,      // appsvc mode
+       IVUG_SETAS_CROP         // crop mode
 } ivug_setas_mode;
 
 typedef enum {
@@ -58,6 +59,8 @@ typedef struct {
 
        ivug_setas_mode Mode;
        ivug_set_screen_type Type;
+
+       bool bInitFace;
 } Ivug_SetAsView;
 
 #ifdef __cplusplus
@@ -65,16 +68,13 @@ 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);
+ivug_setas_view_destroy(Ivug_SetAsView *pSetAsView);
 
 Evas_Object *
 ivug_setas_view_object_get(Ivug_SetAsView *pSetAsView);
@@ -83,6 +83,7 @@ ivug_setas_view_object_get(Ivug_SetAsView *pSetAsView);
 Ivug_SetAsView *
 ivug_setas_view_screen_create(Evas_Object *parent, const char* filepath, ivug_setas_mode mode, ivug_set_screen_type screen_type);
 
+void ivug_setas_view_create_menu(Ivug_SetAsView *pSetAsView, Evas_Object *navi_bar, ivug_set_screen_type type);
 
 #if 0
 Ivug_SetAsView *
old mode 100755 (executable)
new mode 100644 (file)
index d1b9dca..f18fc66
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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
 
@@ -20,6 +20,7 @@
 #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);
@@ -49,14 +50,18 @@ struct _Slide_Item {
        Evas_Object* vIcon;             //video play icon
 
        Evas_Object* photocam;  // photocam
+       Evas_Object* videocam;  // videocam
+       bool bUseInPlay;
 
-       Evas_Object* progress;  //progress bar
+       Evas_Object* progress;  //progress bar for web download.
 
 // Callback
        bool bMenuVisible;
        OnSliderStateChanged cb;
        void *client_data;
-};\r
+
+       drm_handle_t drm_handle;
+};
 
 #ifdef __cplusplus
 extern "C" {
@@ -150,6 +155,7 @@ ivug_slider_item_zoom_set(Slide_Item *si, double zoom, int center_x, int center_
 double
 ivug_slider_item_zoom_get(Slide_Item* si);
 
+
 bool
 ivug_slider_item_image_rotate_set(Slide_Item *si, int angle);
 
@@ -170,8 +176,6 @@ 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
 }
old mode 100755 (executable)
new mode 100644 (file)
index 47fc058..1787eb2
 #ifndef __IVUG_SLIDER_H__
 #define __IVUG_SLIDER_H__
 
+#include "ivug-define.h"
+
 #include <Elementary.h>
 #include "ivug-medialist.h"
-#include "ivug-drm.h"
+#include "ivug-drm-common.h"
 
 typedef enum {
        SLIDE_STATE_NONE = 0x00,
        SLIDE_STATE_SET,        // Thumbnail is displayed.
 
+       SLIDE_STATE_DOWNLOADING,                        // Web downloading.
        SLIDE_STATE_DRM_CHECKING,                       // wait for drm popup
 
        SLIDE_STATE_READY,              // Got original media
@@ -33,13 +36,9 @@ typedef enum {
        SLIDE_STATE_LOADED,                             // Image is shown
 
 // Error state
+       SLIDE_STATE_DOWNLOAD_FAILED,    // web download failed
        SLIDE_STATE_NO_RIGHT,
        SLIDE_STATE_ERROR,
-/*
-       CAUTION.
-
-       If you change enumeration, plz modify function - const char *_GetStateString(slide_state_t state), too.
-*/
 } slide_state_t;
 
 
@@ -59,14 +58,23 @@ typedef enum {
        Slider signal list.
 
        "slider,clicked" : when click once
-       "slider,longpressed" : when long pressed on slider
+       "slider,longpress,start" : when long press start on slider
+       "slider,longpress,end" : when long press end on slider
        "slider,clicked,icon" : video icon clicked.
        "slider,item,changed" :
 
        "slider,item,state,changed"
        "slider,item,deleted"
+
+       Object Configuration
+
+       "conf-use-inline" : 1 for enable inline-play otherwise disabled
+
+
 */
 
+typedef struct _Slide_Item Slide_Item;
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -89,6 +97,9 @@ ivug_slider_set_item(Evas_Object* obj, Media_Item *item, slide_dir_t dir);
 void
 ivug_slider_delete_item(Evas_Object* obj);
 
+Slide_Item *
+ivug_slider_get_sitem(Evas_Object* obj);
+
 Media_Item *
 ivug_slider_get_item(Evas_Object* obj);
 
@@ -116,20 +127,11 @@ 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);
+bool
+ivug_slider_image_rotate(Evas_Object* obj, int angle);
 
 void
-ivug_slider_update(Evas_Object *obj, Media_Item *newItem);
+ivug_slider_set_menu_visibility(Evas_Object* obj, Eina_Bool bVisible);
 
 #ifdef __cplusplus
 }
diff --git a/main/src/include/ivug-slideshow-view.h b/main/src/include/ivug-slideshow-view.h
new file mode 100644 (file)
index 0000000..8f98dd6
--- /dev/null
@@ -0,0 +1,83 @@
+
+
+/*
+ * 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_SLIDESHOW_VIEWER_H__
+#define __IVUG_SLIDESHOW_VIEWER_H__
+
+#include "ivug-parameter.h"
+#include "ivug-medialist.h"
+
+#include "ivug-slideshow.h"
+
+typedef struct {
+       Evas_Object *parent;
+
+       Evas_Object *layout;            // Not visibile layout.
+
+       ivug_view_by view_by;
+
+// List
+       Media_List *mList;
+
+       Ecore_Event_Handler *keydown_handler;
+
+// Slide show;
+       Media_Item *ss_curItem;
+       SlideShow *ssHandle;
+
+       char *album_name;
+} Ivug_SlideShowView;
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+Ivug_SlideShowView *
+ivug_slideshow_view_create(Evas_Object* parent, ivug_mode mode, ivug_view_by view_by);
+
+Evas_Object *
+ivug_slideshow_view_object_get(Ivug_SlideShowView *pSSView);
+
+bool
+ivug_slideshow_view_set_list(Ivug_SlideShowView *pSSView, ivug_parameter *ivug_param);
+
+void
+ivug_slideshow_view_start(Ivug_SlideShowView *pSSView);
+
+void
+ivug_slideshow_view_resume(Ivug_SlideShowView *pSSView);
+
+void
+ivug_slideshow_view_pause(Ivug_SlideShowView *pSSView);
+
+void
+ivug_slideshow_view_destroy(Ivug_SlideShowView *pSSView);
+
+void
+_ivug_slideshow_view_on_mmc_state_changed(keynode_t* node, void *data);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif //__IVUG_SLIDESHOW_VIEWER_H__
+
old mode 100755 (executable)
new mode 100644 (file)
index 1d9b9e4..d3c161f
 
 #include "ivug-common.h"
 
+#include "EFLUtil.h"
+
 #include "ivug-slider-item.h"
 
 #include "ivug-image.h"
-#include "ivug-drm.h"
 
-#include "ivug-config.h"
+#include "ivug-drm-common.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_IMAGE_THUMBNAIL
 #define USE_VIDEO_THUMBNAIL
 
+
 /*
-       Use elm_icon istead of elm_image. elm_icon preserve image ratio. and seems more faster.
+       Determine whether LIL(Large image layer) loads or not.
+
+       if define this feature, slider does not try to load image. only thumbnail is shown.
 */
+#undef DISABLE_LIL_LOADING
 
-// Forward declaration
+/*
+       Use elm_icon istead of elm_image. elm_icon preserve image ratio. and seems more faster.
+*/
 
 static bool
 _show_thumbnail( Slide_Item* si, const char *filepath)
@@ -52,8 +60,8 @@ _show_thumbnail( Slide_Item* si, const char *filepath)
 
        if ( filepath == NULL )
        {
-               // Set default filepath.
-               filepath = DEFAULT_THUMBNAIL_PATH;
+               MSG_SITEM_ERROR("thumbnail path is not exist");
+               return false;
        }
 
        MSG_SITEM_MED("Set thumbnail : %s",  ivug_get_filename(filepath));
@@ -64,14 +72,27 @@ _show_thumbnail( Slide_Item* si, const char *filepath)
                filepath = DEFAULT_THUMBNAIL_PATH;
        }
 
-       if (elm_icon_file_set(si->thumbnail, filepath, NULL) == EINA_FALSE)
+       if (elm_image_file_set(si->thumbnail, filepath, NULL) == EINA_FALSE)
        {
                MSG_SITEM_ERROR("Cannot load thumbnail : %s", filepath);
                return false;
        }
 
+       int iw, ih;
+
+       elm_image_object_size_get(si->thumbnail , &iw, &ih);
+
        evas_object_repeat_events_set(si->thumbnail, EINA_FALSE);
-       edje_object_signal_emit((si->layout), "elm,state,show_thumbnail", "slider");
+       edje_object_signal_emit(_EDJ(si->layout), "elm,state,show_thumbnail", "slider");
+
+       MSG_SITEM_HIGH("Set thumbnail(%dx%d). %s", iw, ih, ivug_get_filename(filepath));
+
+#ifdef _DEBUG
+       int bx, by, bw, bh;
+       evas_object_geometry_get(si->layout, &bx, &by, &bw, &bh);
+
+       MSG_SITEM_MED("EDJE Geomtetry(%d,%d,%d,%d)", bx, by, bw, bh);
+#endif
 
        return true;
 }
@@ -83,7 +104,7 @@ _hide_thumbnail(Slide_Item* si)
 
        evas_object_repeat_events_set(si->thumbnail, EINA_TRUE);
 
-       edje_object_signal_emit((si->layout), "elm,state,hide_thumbnail", "slider");
+       edje_object_signal_emit(_EDJ(si->layout), "elm,state,hide_thumbnail", "slider");
 
        return true;
 }
@@ -92,11 +113,35 @@ static void _show_progressbar(Slide_Item *si)
 {
        IV_ASSERT(si != NULL);
 
-       if ( si->progress )
+       if ( si->progress == NULL )
        {
-               elm_progressbar_pulse(si->progress, EINA_TRUE); //start pulse.
+               //set progress
+               PERF_CHECK_BEGIN(LVL6, "set progress");
+
+               PERF_CHECK_BEGIN(LVL7, "elm_progressbar_add");
+               si->progress = elm_progressbar_add(si->layout);
+               PERF_CHECK_END(LVL7, "elm_progressbar_add");
+
+               IV_ASSERT(si->progress != NULL);
+
+               PERF_CHECK_BEGIN(LVL7, "set style");
+               elm_object_style_set(si->progress, "list_process");
+               PERF_CHECK_END(LVL7, "set style");
+
+               PERF_CHECK_BEGIN(LVL7, "set pulse");
+               elm_progressbar_pulse(si->progress, EINA_FALSE);
+               PERF_CHECK_END(LVL7, "set pulse");
+
+               PERF_CHECK_BEGIN(LVL7, "swallow progress");
+               elm_object_part_content_set(si->layout, "slider.progress", si->progress);
+               PERF_CHECK_END(LVL7, "swallow progress");
+
+               PERF_CHECK_END(LVL6, "set progress");
        }
-       edje_object_signal_emit((si->layout), "elm,state,show,progress", "slider");
+
+       elm_progressbar_pulse(si->progress, EINA_TRUE); //start pulse.
+
+       edje_object_signal_emit(_EDJ(si->layout), "elm,state,show,progress", "slider");
 }
 
 static void _hide_progressbar(Slide_Item *si)
@@ -107,7 +152,7 @@ static void _hide_progressbar(Slide_Item *si)
        {
                elm_progressbar_pulse(si->progress, EINA_FALSE); //stop pulse.
        }
-       edje_object_signal_emit((si->layout), "elm,state,hide,progress", "slider");
+       edje_object_signal_emit(_EDJ(si->layout), "elm,state,hide,progress", "slider");
 }
 
 
@@ -115,44 +160,24 @@ 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
+       edje_object_signal_emit(_EDJ(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(_EDJ(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:
+       case SLIDE_TYPE_WEB_IMAGE:
                return SITEM_TYPE_IMAGE;
 
        case SLIDE_TYPE_VIDEO:
@@ -168,6 +193,123 @@ static sitem_type_t _get_sitem_type(Media_Type mtype)
        return SITEM_TYPE_UNKNOWN;
 }
 
+static char *_get_file_name(Slide_Item* si)
+{
+       Media_Data *mdata = ivug_medialist_get_data(si->mitem);
+
+       if ( mdata == NULL )
+       {
+               return NULL;
+       }
+
+       return ivug_get_filename(mdata->filepath);
+}
+
+
+static bool _set_mitem(Slide_Item* si, Media_Item *item)
+{
+       bool ret = false;
+
+       Media_Data *mdata = ivug_medialist_get_data(item);
+       IV_ASSERT(mdata != NULL);
+
+       si->mitem = item;
+
+#ifdef USE_IMAGE_THUMBNAIL
+// Set thumbnail
+       _show_thumbnail(si, mdata->thumbnail_path);
+#endif
+
+       si->type = _get_sitem_type(mdata->slide_type);
+
+       if ( si->type == SITEM_TYPE_IMAGE )
+       {
+               _hide_videoicon(si);
+               elm_object_part_content_set(si->layout, "slider.contents", si->photocam);
+       }
+       else if ( si->type == SITEM_TYPE_VIDEO )
+       {
+               elm_image_file_set(si->vIcon, EDJ_PATH"/ivug-icons.edj", "btn.video.play");
+               _show_videoicon(si);
+       }
+       else
+       {
+               MSG_SITEM_WARN("Unknown type : %s", ivug_get_filename(mdata->filepath));
+               _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)
+{
+// Unswallow photocam/videocam
+       elm_object_part_content_unset(si->layout, "slider.contents");
+
+       switch(si->type)
+       {
+       case SITEM_TYPE_IMAGE:
+               evas_object_hide(si->photocam);
+               ivug_image_unset(si->photocam); //init photocam.
+               break;
+       case SITEM_TYPE_VIDEO:
+               break;
+       default:
+               break;
+       }
+
+       si->state = SLIDE_STATE_NONE;
+
+// 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;
+}
 
 
 
@@ -185,9 +327,9 @@ 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);
 
-       MSG_SITEM_HIGH("_photocam_loaded_cb");
 //hide progress.
        _hide_progressbar(si);
 
@@ -207,8 +349,9 @@ _photocam_loaded_cb(void *data, Evas_Object *obj, void *event_info)
 
        if ( si->state != SLIDE_STATE_LOADING )
        {
+               // can be STATE_ERROR, STATE_NO_RIGHT
                MSG_SITEM_ERROR("Invalid slide state. %s", ivug_get_filename(mdata->filepath));
-               MSG_SITEM_FATAL("state=%d %s (%d,%d,%d,%d)", si->state, mdata->filepath, si->x, si->y, si->w, si->h);
+               MSG_SITEM_ERROR("state=%d %s (%d,%d,%d,%d)", si->state, mdata->filepath, si->x, si->y, si->w, si->h);
        }
 
 #if 0
@@ -224,8 +367,8 @@ _photocam_loaded_cb(void *data, Evas_Object *obj, void *event_info)
        } 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));
+       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 )
        {
@@ -263,9 +406,6 @@ _photocam_loaded_cb(void *data, Evas_Object *obj, void *event_info)
 
        evas_object_show(obj);  //photocam show.
 
-//hide thumbnail.
-       MSG_SITEM_HIGH("Thumbnail Hide");
-
 #ifdef USE_IMAGE_THUMBNAIL
        _hide_thumbnail(si);
 #endif
@@ -275,123 +415,69 @@ _photocam_loaded_cb(void *data, Evas_Object *obj, void *event_info)
        MSG_SITEM_HIGH("Photocam Pre-loaded. File=%s", ivug_get_filename(mdata->filepath));
 }
 
-
-static bool _set_mitem(Slide_Item* si, Media_Item *item)
+static void
+_videocam_loaded_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       Media_Data *mdata = ivug_medialist_get_data(item);
-       IV_ASSERT(mdata != NULL);
+       IV_ASSERT(data != NULL);
 
-       si->mitem = item;
+       Slide_Item* si = static_cast<Slide_Item*>(data);
 
-       si->type = _get_sitem_type(mdata->slide_type);
+       si->state = SLIDE_STATE_LOADED;
 
-       if ( si->type == SITEM_TYPE_IMAGE )
-       {
-               evas_object_smart_callback_add(si->photocam, "loaded", _photocam_loaded_cb, si);
+       MSG_SITEM_HIGH("Playing video is started");
 
-               _hide_videoicon(si);
+       evas_object_show(obj);  //show videocam
 
-#ifdef USE_IMAGE_THUMBNAIL
-// Set thumbnail
-               _show_thumbnail(si, mdata->thumbnail_path);
+#ifdef USE_VIDEO_THUMBNAIL
+       MSG_SITEM_HIGH("Thumbnail Hide");
+       _hide_thumbnail(si);
 #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 )
+       if ( si->bMenuVisible == false )
        {
-               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:
-                       if(mdata->bIsDRMContent == false)
-                       {
-                               MSG_SITEM_HIGH("Set image. %s", ivug_get_filename(mdata->filepath));
-                               si->state = SLIDE_STATE_READY;
-                       }
-                       else
-                       {
-                               MSG_SITEM_HIGH("Set DRM image. %s", ivug_get_filename(mdata->filepath));
-                               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));
+       _call_user_callback(si);
+}
 
-                       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;
+static void
+_videocam_ready_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
 
-               default:
-                       MSG_SITEM_ERROR("slide type invaild. Type=%d", mdata->slide_type);
-                       si->state = SLIDE_STATE_ERROR;
-                       return true;
-                       break;
+//     Slide_Item* si = static_cast<Slide_Item*>(data);
 
-       }
+       MSG_SITEM_HIGH("Video is ready");
 
-       return true;
 }
 
 
-static bool _unset_mitem(Slide_Item* si)
-{
-       si->state = SLIDE_STATE_NONE;
 
-// Unswallow photocam/videocam
-       edje_object_part_unswallow(si->layout, edje_object_part_swallow_get(si->layout, "slider.contents"));
+static void
+_videocam_eos_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
 
-       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;
-       }
+       Slide_Item* si = static_cast<Slide_Item*>(data);
 
-// Resetting GUI
-       _hide_progressbar(si);
-       _hide_thumbnail(si);
-       _hide_videoicon(si);
+       MSG_SITEM_HIGH("Video cam End of Stream");
 
-       si->type = SITEM_TYPE_UNKNOWN;
-       si->mitem = NULL;
+#ifdef USE_VIDEO_THUMBNAIL
+       edje_object_signal_emit(_EDJ(si->layout), "elm,state,show_thumbnail", "slider");
+#endif
 
-       MSG_SITEM_HIGH("Slider Item is cleared.");
+       elm_image_file_set(si->vIcon, EDJ_PATH"/ivug-icons.edj", "btn.video.play");
+       _show_videoicon(si);
 
-       return true;
+       evas_object_hide(si->videocam);
 }
 
-
 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));
+       MSG_SITEM_HIGH("Event layer clicked : %s Layer=%d", evas_object_name_get(obj), evas_object_layer_get(obj));
 }
 
 
@@ -419,12 +505,11 @@ ivug_slider_item_add(Evas_Object *slider)
 //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)
+       Evas_Object *layout = EFL::create_layout(slider, IVUG_SLIDER_EDJ, "slider");
+       if(layout == NULL)
        {
                MSG_SITEM_ERROR("Cannot load file : %s", IVUG_SLIDER_EDJ);
                free(si);
-
                return NULL;
        }
 
@@ -440,53 +525,44 @@ ivug_slider_item_add(Evas_Object *slider)
 
        si->thumbnail = elm_icon_add(slider);
        evas_object_name_set(si->thumbnail, "Thumbnail");
+       elm_image_resizable_set(si->thumbnail, EINA_TRUE, EINA_TRUE);
+       elm_image_preload_disabled_set(si->thumbnail, EINA_FALSE);
+
        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);
+       elm_object_part_content_set(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");
+       evas_object_smart_callback_add(si->photocam, "loaded", _photocam_loaded_cb, si);
 
        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");
+       elm_image_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);
+       elm_object_part_content_set(si->layout, "slider.icon", si->vIcon);
        PERF_CHECK_END(LVL6, "video icon");
 
        si->bMenuVisible = true;                // Default visibility is true
 
-       MSG_SITEM_HIGH("Creating slider item. 0x%08x.", si);
+       evas_object_smart_member_add(si->layout, slider);
+
+       int bx, by, bw, bh;
+       evas_object_geometry_get(si->layout, &bx, &by, &bw, &bh);
+
+       MSG_SITEM_HIGH("Creating sitem(0x%08x): (%d,%d,%d,%d)", si, bx, by, bw, bh);
 
        return si;
 }
@@ -499,7 +575,7 @@ ivug_slider_item_resize(Slide_Item* si, int w, int h)
 
        if ( si->w == w && si->h == h ) return;
        // TODO : Impelement
-       MSG_SITEM_HIGH("SLIDER Resize to WH(%d,%d)", w, h );
+       MSG_SITEM_HIGH("SLIDER Resize to XYWH(%d,%d,%d,%d)", si->x, si->y, w, h );
 
 // w,h is not Image's scale, but Object's scale
        si->w = w;
@@ -515,7 +591,7 @@ 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);
+       MSG_SITEM_MED("SLIDER Move to XYWH(%d,%d,%d,%d)", x, y, si->w, si->h );
 
        if ( si->x == x && si->y == y) return;
 
@@ -549,6 +625,12 @@ void ivug_slider_item_del(Slide_Item* si)
                si->photocam = NULL;
        }
 
+       if (si->videocam)
+       {
+               evas_object_del(si->videocam);
+               si->videocam = NULL;
+       }
+
        if (si->thumbnail)
        {
                evas_object_del(si->thumbnail);
@@ -608,9 +690,10 @@ ivug_slider_item_clip_set(Slide_Item* si, Evas_Object *clipper)
 
        evas_object_geometry_get(clipper, &x, &y, &w, &h);
 
-       MSG_SITEM_HIGH("Clip SET!! Geometry(%d,%d,%d,%d)", x, y, w, h);
+       MSG_SITEM_MED("SItem clip SET!! Geometry(%d,%d,%d,%d)", x, y, w, h);
 
        evas_object_clip_set(si->layout, clipper);
+//     evas_object_clip_set(si->photocam, clipper);
 }
 
 void
@@ -619,6 +702,7 @@ 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);
+//     evas_object_clip_unset(si->photocam);
 }
 
 bool
@@ -626,6 +710,8 @@ ivug_slider_item_data_set(Slide_Item* si, Media_Item *item)
 {
        IV_ASSERT(si != NULL );
 
+       MSG_SITEM_HIGH("Data set. Item(0x%08x)", item);
+
        if ( item == NULL )
        {
                if ( si->state == SLIDE_STATE_NONE )
@@ -634,14 +720,14 @@ ivug_slider_item_data_set(Slide_Item* si, Media_Item *item)
                        return true;
                }
 
-// Remove callback because when photocam_file_set(with file name=NULL) trigger "loaded" callback
+               MSG_SITEM_WARN("Set data NULL : %s", _get_file_name(si));
                _unset_mitem(si);
        }
        else
        {
                if ( si->state != SLIDE_STATE_NONE )
                {
-                       MSG_SITEM_WARN("State is not none. State=%d Unset First", si->state);
+                       MSG_SITEM_WARN("State is %d. Remove old : %s", si->state, _get_file_name(si));
                        _unset_mitem(si);
                }
 
@@ -652,6 +738,18 @@ ivug_slider_item_data_set(Slide_Item* si, Media_Item *item)
 }
 
 
+#ifdef DISABLE_LIL_LOADING
+Eina_Bool _signal_send_idler(void *data)
+{
+       Slide_Item *si = (Slide_Item *)data;
+
+       _call_user_callback(si);
+
+       return EINA_FALSE;
+}
+#endif
+
+
 // Ready to Loading
 bool
 ivug_slider_item_load(Slide_Item *si)
@@ -677,24 +775,19 @@ ivug_slider_item_load(Slide_Item *si)
 
        char path[IVUG_MAX_FILE_PATH_LEN] = {0,};
 
-       if ( mdata->bIsDRMContent == EINA_TRUE )
        {
-               _hide_progressbar(si);
+               strncpy(path, mdata->filepath, sizeof(path));
+       }
 
-               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);
+#ifdef DISABLE_LIL_LOADING
+       // For debugging
+       si->state = SLIDE_STATE_LOADED;
 
-               _call_user_callback(si);
+       ecore_idler_add(_signal_send_idler, si);
 
-               return false;
-       }
-       else
-       {
-               strncpy(path, mdata->filepath, sizeof(path));
-       }
+       return true;
+#endif
 
        switch(mdata->slide_type)
        {
@@ -716,7 +809,9 @@ ivug_slider_item_load(Slide_Item *si)
                }
                break;
        case SLIDE_TYPE_VIDEO:
-               si->state = SLIDE_STATE_LOADED;
+               {
+                       si->state = SLIDE_STATE_LOADED;
+               }
 
                break;
        case SLIDE_TYPE_STREAMING:
@@ -725,6 +820,19 @@ ivug_slider_item_load(Slide_Item *si)
 
                break;
 
+       case SLIDE_TYPE_WEB_IMAGE:
+               MSG_SITEM_HIGH("Stored Filename : %s", ivug_get_filename(mdata->filepath));
+               si->state = SLIDE_STATE_LOADING;
+
+               if (ivug_image_file_set(si->photocam, mdata->filepath, NULL) != EVAS_LOAD_ERROR_NONE)
+               {
+                       MSG_SITEM_ERROR("Failed photocam to set file file=%s", path);
+                       si->state = SLIDE_STATE_ERROR;
+                       return false;
+               }
+               break;
+
+
        default:
                MSG_SITEM_ERROR("slide type invaild. Type=%d", mdata->slide_type);
                return false;
@@ -740,18 +848,13 @@ void ivug_slider_item_play(Slide_Item* si)
 
        Media_Data *mdata = ivug_medialist_get_data(si->mitem);
 
-       MSG_SITEM_HIGH("Start sitem. %s", mdata->filepath);
+       MSG_SITEM_HIGH("Start sitem. Type(%d) State(%d) %s", si->type, si->state, 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 )
        {
@@ -772,14 +875,9 @@ void ivug_slider_item_stop(Slide_Item* si)
        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 )
        {
@@ -801,14 +899,9 @@ void ivug_slider_item_pause(Slide_Item* si)
        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
+               // Reset state.
        }
        else if ( si->type == SITEM_TYPE_IMAGE )
        {
@@ -829,15 +922,13 @@ void ivug_slider_item_resume(Slide_Item* si)
        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);
        }
+       else if (si->type == SITEM_TYPE_VIDEO)
+       {
+       }
 }
 
 bool
@@ -851,6 +942,7 @@ ivug_slider_item_set_callback(Slide_Item* si, OnSliderStateChanged cb, void *dat
        return true;
 }
 
+
 const Media_Item *
 ivug_slider_item_data_get(Slide_Item *si)
 {
@@ -889,7 +981,9 @@ ivug_slider_item_region_size_get(Slide_Item* si, int *x, int *y, int *w, int *h)
 
                case SITEM_TYPE_VIDEO:
                {
-                       return false;
+                       {
+                               return false;
+                       }
                }
                break;
 
@@ -1036,6 +1130,7 @@ ivug_slider_item_zoom_get(Slide_Item* si)
        return ret;
 }
 
+
 bool
 ivug_slider_item_icon_click_check(Slide_Item *si, int x, int y)
 {
@@ -1085,14 +1180,14 @@ drm_data_t * ivug_slider_item_check_drm_constraint(Slide_Item *si)
 
        if(mdata->bIsDRMContent == EINA_FALSE)
        {
-               MSG_SLIDER_HIGH("It is not DRM file, path = %s", mdata->filepath);
+               MSG_SITEM_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);
+               MSG_SITEM_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);
@@ -1108,6 +1203,18 @@ drm_data_t * ivug_slider_item_check_drm_constraint(Slide_Item *si)
 }
 
 
+
+bool
+ivug_slider_item_image_rotate_set(Slide_Item *si, int angle)
+{
+       IV_ASSERT(si != NULL);
+
+       ivug_image_rotate_set(si->photocam, ( (ivug_image_rotate_get(si->photocam) - angle) % 360 ));
+
+       return true;
+}
+
+
 // Video specific APIs
 
 void ivug_slider_item_video_play(Slide_Item* si)
@@ -1132,21 +1239,8 @@ void ivug_slider_item_video_pause(Slide_Item* si)
 
        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)
@@ -1157,7 +1251,12 @@ void ivug_slider_item_hide_menu(Slide_Item* si)
 
        si->bMenuVisible = false;
 
-       return ;
+// Item is video and state is playing then hide paused icon
+       if (si->type == SITEM_TYPE_VIDEO)
+       {
+               _hide_videoicon(si);
+       }
+
 }
 
 
@@ -1169,7 +1268,11 @@ void ivug_slider_item_show_menu(Slide_Item* si)
 
        si->bMenuVisible = true;
 
-       return ;
+// Item is video and state is pause then show paused icon
+       if (si->type == SITEM_TYPE_VIDEO)
+       {
+               _show_videoicon(si);
+       }
 }
 
 Evas_Object *
@@ -1197,3 +1300,4 @@ void ivug_slider_item_image_size_get(Slide_Item* si, int *w, int *h)
        }
 }
 
+
old mode 100755 (executable)
new mode 100644 (file)
index 3018523..60a0934
@@ -47,6 +47,22 @@ _ivug_slider_pass_event_to_item(struct Smart_Data *sd, Eina_Bool bPass)
        }
 }
 
+
+bool _ivug_slider_is_visible(struct Smart_Data *sd, Slide_Item* si)
+{
+       if ( si->x + si->w < 0 )
+       {
+               return false;
+       }
+
+       if ( si->x > sd->x + sd->w )
+       {
+               return false;
+       }
+
+       return true;
+}
+
 #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)
@@ -58,7 +74,7 @@ slide_edge_t __ivug_slider_edge_state_get(Slide_Item *si, const char *func, int
        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);
+               MSG_MED("[%s:%4d] Slide fit. Thumbnail only", func, line);
                result = EDGE::SLIDE_FIT;
 
                return result;
@@ -67,49 +83,48 @@ slide_edge_t __ivug_slider_edge_state_get(Slide_Item *si, const char *func, int
        {
                if ( nw <= (si->w + IMAGE_SCROLL_MARGIN) && (nh <= si->h + IMAGE_SCROLL_MARGIN))
                {
-                       MSG_HIGH("[%20s:%4d] Slide fit", func, line);
+                       MSG_MED("[%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);
+                               MSG_MED("[%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);
+                               MSG_MED("[%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
+#ifdef ENABLE_Y_SCR
                        if ( ny >= si->y )
                        {
-                               MSG_HIGH("[%20s:%4d] image edge top", func, line);
+                               MSG_MED("[%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);
+                               MSG_MED("[%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);
+               MSG_MED("[%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)
+void _put_originate(struct Smart_Data *sd, shift_direction_t dir, int momentum)
 {
        if ( dir == SLIDE_SHIFT_TO_LEFT )
        {
@@ -117,6 +132,8 @@ static void _put_originate(struct Smart_Data *sd, shift_direction_t dir, int mom
                {
                        dir = SLIDE_SHIFT_NONE;
                }
+
+               MSG_MED("Prev slide state : %d", sd->slide[NEXT_SLIDE]->state);
        }
 
        if ( dir == SLIDE_SHIFT_TO_RIGHT )
@@ -125,6 +142,8 @@ static void _put_originate(struct Smart_Data *sd, shift_direction_t dir, int mom
                {
                        dir = SLIDE_SHIFT_NONE;
                }
+
+               MSG_MED("Next slide state : %d", sd->slide[NEXT_SLIDE]->state);
        }
 
        int src_x, dst_x;
@@ -157,7 +176,7 @@ static void _put_originate(struct Smart_Data *sd, shift_direction_t dir, int mom
 
                if (src_x == dst_x )
                {
-                       MSG_SLIDER_WARN("No need to animation");
+                       MSG_WARN("No need to animation");
                        return ;
                }
                // Defaut velocity
@@ -204,9 +223,11 @@ Evas_Event_Flags _zoom_start(void *data, void *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);
+       MSG_ASSERT(sd != NULL);
+
        Slide_Item* si = sd->slide[CENTER_SLIDE];
 
-       MSG_HIGH("%s MoveX=%d", __func__, si->x);
+       MSG_MED("%s MoveX=%d", __func__, si->x);
 
        sd->bZooming = false;
 
@@ -226,6 +247,8 @@ Evas_Event_Flags _zoom_move(void *data, void *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);
+       MSG_ASSERT(sd != NULL);
+
        Slide_Item* si = sd->slide[CENTER_SLIDE];
 
        if ( sd->bZooming == false ) return EVAS_EVENT_FLAG_NONE;
@@ -241,6 +264,8 @@ Evas_Event_Flags _zoom_end(void *data, void *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);
+       MSG_ASSERT(sd != NULL);
+
        Slide_Item* si = sd->slide[CENTER_SLIDE];
 
        if ( sd->bZooming == false )
@@ -252,7 +277,7 @@ Evas_Event_Flags _zoom_end(void *data, void *event_info)
                return EVAS_EVENT_FLAG_NONE;
        }
 
-       MSG_HIGH("%s. CenteSize WH(%d,%d)", __func__, si->w, si->h);    // Si->w,h didnot change. after zoom
+       MSG_MED("%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
 
@@ -265,6 +290,8 @@ Evas_Event_Flags _zoom_abort(void *data, void *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);
+       MSG_ASSERT(sd != NULL);
+
        Slide_Item* si = sd->slide[CENTER_SLIDE];
 
        if ( sd->bZooming == false )
@@ -276,7 +303,7 @@ Evas_Event_Flags _zoom_abort(void *data, void *event_info)
                return EVAS_EVENT_FLAG_NONE;
        }
 
-       MSG_HIGH("%s. CenteSize WH(%d,%d)", __func__, si->w, si->h);    // Si->w,h didnot change. after zoom
+       MSG_MED("%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
 
@@ -286,18 +313,20 @@ Evas_Event_Flags _zoom_abort(void *data, void *event_info)
 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);
+       MSG_MED("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);
+       MSG_ASSERT(sd != NULL);
+
        Slide_Item* si = sd->slide[CENTER_SLIDE];
 
 //save down position.
        sd->prev_x = p->x2;
        sd->prev_y = p->y2;
 
-// End animation
+// End animation. TODO : Preserve monentum
        sd->anim->Stop();
 
 // Update Center!.
@@ -318,6 +347,8 @@ Evas_Event_Flags _momentum_move(void *data, void *event_info)
        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);
+       MSG_ASSERT(sd != NULL);
+
        Slide_Item* si = sd->slide[CENTER_SLIDE];
 
        int dist_down_x = p->x2 - p->x1;
@@ -341,7 +372,7 @@ Evas_Event_Flags _momentum_move(void *data, void *event_info)
                }
        }
 
-//     MSG_HIGH("%s. XY(%d,%d)", __func__, cur->x, cur->y);
+//     MSG_MED("%s. XY(%d,%d)", __func__, cur->x, cur->y);
        if ( sd->edge == EDGE::SLIDE_NO_EDGE )
        {
                MSG_HIGH("Photocam handle this event");
@@ -365,13 +396,15 @@ Evas_Event_Flags _momentum_move(void *data, void *event_info)
 
        if ( sd->edge == EDGE::SLIDE_FIT)
        {
-               MSG_HIGH("Case 1. edge=%d, X=%d dx=%d si->x=%d state=%d", sd->edge, dst_x, dx, si->x, sd->slide[PREV_SLIDE]->state);
+               MSG_MED("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;
+
+                       // Update left shadow.
                }
 
                if ( dst_x < 0 && sd->slide[NEXT_SLIDE]->state == SLIDE_STATE_NONE)
@@ -387,7 +420,7 @@ Evas_Event_Flags _momentum_move(void *data, void *event_info)
 
        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);
+               MSG_MED("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);
@@ -398,7 +431,7 @@ Evas_Event_Flags _momentum_move(void *data, void *event_info)
 
        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);
+               MSG_MED("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);
 
@@ -423,7 +456,7 @@ Evas_Event_Flags _momentum_move(void *data, void *event_info)
        {
                if ( dx > 0 ) // Mouse -->
                {
-                       MSG_HIGH("Case 3. edge=%d, X=%d dx=%d si->x=%d", sd->edge, dst_x, dx, si->x);
+                       MSG_MED("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);
 
@@ -439,7 +472,7 @@ Evas_Event_Flags _momentum_move(void *data, void *event_info)
                }
                else
                {
-                       MSG_HIGH("Case 4. edge=%d, X=%d dx=%d si->x=%d", sd->edge, dst_x, dx, si->x);
+                       MSG_MED("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);
                }
@@ -449,7 +482,7 @@ Evas_Event_Flags _momentum_move(void *data, void *event_info)
        {
                if ( dx < 0 ) // Mouse <--
                {
-                       MSG_HIGH("Case 5. edge=%d, X=%d dx=%d si->x=%d", sd->edge, dst_x, dx, si->x);
+                       MSG_MED("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);
 
@@ -466,13 +499,56 @@ Evas_Event_Flags _momentum_move(void *data, void *event_info)
                else
                {
 
-                       MSG_HIGH("Case 6. edge=%d, X=%d dx=%d si->x=%d", sd->edge, dst_x, dx, si->x);
+                       MSG_MED("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);
 
                }
        }
 
+#ifdef ENABLE_Y_SCR
+
+       if ( sd->edge & EDGE::SLIDE_TOP_EDGE)
+       {
+               if ( dy > 0 ) // Mouse downward
+               {
+                       MSG_MED("Case 7. edge=%d, Y=%d dy=%d si->y=%d", sd->edge, dst_y, dy, si->y);
+
+                       _ivug_slider_pass_event_to_item(sd, EINA_FALSE);
+
+                       return EVAS_EVENT_FLAG_NONE;
+               }
+               else
+               {
+
+                       MSG_MED("Case 8. edge=%d, Y=%d dy=%d si->y=%d", sd->edge, dst_y, dy, si->y);
+
+                       _ivug_slider_pass_event_to_item(sd, EINA_TRUE);
+
+               }
+       }
+
+       if ( sd->edge & EDGE::SLIDE_BOTTOM_EDGE)
+       {
+               if ( dy < 0 ) // Mouse downward. ^
+               {
+                       MSG_MED("Case 9. edge=%d, Y=%d dy=%d si->y=%d", sd->edge, dst_y, dy, si->y);
+
+                       _ivug_slider_pass_event_to_item(sd, EINA_FALSE);
+
+                       return EVAS_EVENT_FLAG_NONE;
+               }
+               else
+               {
+
+                       MSG_MED("Case 10. edge=%d, Y=%d dy=%d si->y=%d", sd->edge, dst_y, dy, si->y);
+
+                       _ivug_slider_pass_event_to_item(sd, EINA_TRUE);
+
+               }
+       }
+#endif
+
        sd->edge = _ivug_slider_edge_state_get(si);
        return EVAS_EVENT_FLAG_NONE;
 
@@ -483,13 +559,14 @@ 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);
+       MSG_MED("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);
+       MSG_ASSERT(sd != NULL);
 
        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);
+       MSG_MED("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);
@@ -501,7 +578,7 @@ Evas_Event_Flags _momentum_end(void *data, void *event_info)
        if ( isFlick == true )
        {
 // momentumÀÌ 0ÀÌ ¾Æ´Ñ °æ¿ì(flick animation Áß°£¿¡ ´Ù½Ã click½Ã) center¸¦ ¾÷µ¥ÀÌÆ® Çؾߵdzª? ±×·¸°Ô Çϸ頺ε巯¿ö Áúµí.. Çѵ¥.. ÀÏ´Ü pass
-               MSG_UTIL_HIGH("Velocity = %d Momentum=%d", sd->momentum, p->mx);
+               MSG_HIGH("Velocity = %d Momentum=%d", sd->momentum, p->mx);
 
                sd->momentum += p->mx;
 
@@ -511,8 +588,17 @@ Evas_Event_Flags _momentum_end(void *data, void *event_info)
                        if (  p->mx + (si->x - sd->x) > sd->w )
                        {
                                // Flick right
-                               MSG_HIGH("Flick Right ----------->");
                                dir = SLIDE_SHIFT_TO_LEFT;
+
+                               MSG_HIGH("Flick Right ----------->");
+
+                               if ( sd->slide[PREV_SLIDE]->state == SLIDE_STATE_NONE )
+                               {
+                                       dir = SLIDE_SHIFT_NONE;
+                                       sd->momentum = 0;
+                               }
+
+                               MSG_MED("Prev slide state : %d", sd->slide[NEXT_SLIDE]->state);
                        }
                }
 
@@ -522,18 +608,26 @@ Evas_Event_Flags _momentum_end(void *data, void *event_info)
                        if (  p->mx + ((si->x - sd->x) + si->w ) < 0 )
                        {
                                // Flick left
-                               MSG_HIGH("Flick Left <-----------");
                                dir = SLIDE_SHIFT_TO_RIGHT;
+                               MSG_HIGH("Flick Left <-----------");
+
+                               if ( sd->slide[NEXT_SLIDE]->state == SLIDE_STATE_NONE )
+                               {
+                                       dir = SLIDE_SHIFT_NONE;
+                                       sd->momentum = 0;
+                               }
+
+                               MSG_MED("Next slide state : %d", sd->slide[NEXT_SLIDE]->state);
                        }
                }
 
-               MSG_UTIL_HIGH("Velocity2 = %d", sd->momentum);
+               MSG_MED("Velocity2 = %d", sd->momentum);
                _put_originate(sd, dir, sd->momentum);
 
        }
        else
        {
-               MSG_HIGH("Si->x=%d", si->x);
+               MSG_MED("Si->x=%d", si->x);
 
                dir = _get_shift_direction(sd);
                _put_originate(sd, dir, ANIN_VELOCITY);
@@ -551,15 +645,16 @@ 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);
+       MSG_MED("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);
+       MSG_ASSERT(sd != NULL);
 
        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);
+       MSG_MED("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);
@@ -576,7 +671,7 @@ Evas_Event_Flags _momentum_abort(void *data, void *event_info)
                        if (  p->mx + ((si->x - sd->x) ) > sd->w )
                        {
                                // Flick right
-                               MSG_HIGH("Flick Right");
+                               MSG_MED("Flick Right");
                                dir = SLIDE_SHIFT_TO_LEFT;
                        }
                }
@@ -587,14 +682,14 @@ Evas_Event_Flags _momentum_abort(void *data, void *event_info)
                        if (  p->mx + ((si->x - sd->x) + si->w ) < 0 )
                        {
                                // Flick left
-                               MSG_HIGH("Flick Left");
+                               MSG_MED("Flick Left");
                                dir = SLIDE_SHIFT_TO_RIGHT;
                        }
                }
        }
        else
        {
-               MSG_HIGH("Si->x=%d", si->x);
+               MSG_MED("Si->x=%d", si->x);
                dir = _get_shift_direction(sd);
        }
 
@@ -661,7 +756,7 @@ 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");
+       MSG_MED("Double click start");
 
        if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
 
@@ -672,7 +767,7 @@ 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");
+   MSG_MED("Double click end");
 
    if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
 
@@ -683,7 +778,7 @@ 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");
+   MSG_MED("Double click abort");
 
    if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
 
@@ -694,7 +789,7 @@ 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);
+       MSG_MED("Finger tab start. Time=%d", p->timestamp);
 
        if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
 
@@ -706,17 +801,39 @@ 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);
+       MSG_MED("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);
+       MSG_ASSERT(sd != NULL);
 
        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
+               bool bUseInline = false;
+
+               if ( ivug_config_get_use_inlineplay(&bUseInline) == false )
+               {
+                       bUseInline = false;
+               }
+
+               if ( bUseInline == true )
+               {
+                       if ( ivug_slider_item_video_is_playing(si) == EINA_TRUE )
+                       {
+                               ivug_slider_item_video_pause(si);
+                       }
+                       else
+                       {
+                               ivug_slider_item_video_play(si);
+                       }
+               }
+               else
+               {
+                       evas_object_smart_callback_call(sd->obj, "slider,clicked,icon", si);    // Clicked video icon
+               }
        }
        else
        {
@@ -730,7 +847,7 @@ 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);
+       MSG_MED("Finger tab aborted. Time=%d", p->timestamp);
 
        if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
 
@@ -742,11 +859,35 @@ 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);
+       MSG_MED("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);
+       MSG_ASSERT(sd != NULL);
+
+       sd->longtap_count = 0;
+
+       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_MED("Long tab move");
 
        if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
 
        struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get((Evas_Object *)data);
+       MSG_ASSERT(sd != NULL);
+
+       if(sd->longtap_count != 0)
+       {
+               return EVAS_EVENT_FLAG_NONE;
+       }
+       sd->longtap_count = 1;
 
        if(sd->bLongtapEnable == false)
        {
@@ -756,32 +897,20 @@ Evas_Event_Flags n_long_tap_start(void *data , void *event_info)
 
        if(sd->bMomentumStarted == true) // compare down and longpressed position
        {
-       sd->longtap_prev_x = p->x;
-       sd->longtap_prev_y = p->y;
+               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;
+               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;
-       }
+               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;
+       evas_object_smart_callback_call(sd->obj, "slider,longpress,start", p);
 
        return EVAS_EVENT_FLAG_NONE;
 }
@@ -790,13 +919,14 @@ 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");
+       MSG_MED("Long tab end");
 
        if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
 
-       MSG_HIGH("Long press end");
+       MSG_MED("Long press end");
 
        struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get((Evas_Object *)data);
+       MSG_ASSERT(sd != NULL);
 
        evas_object_smart_callback_call(sd->obj, "slider,longpress,end", (void*)LONGTAP_ENDED);
 
@@ -808,7 +938,7 @@ 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");
+       MSG_MED("Long tab abort");
 
        if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
 
old mode 100755 (executable)
new mode 100644 (file)
index 6c81284..df3ced4
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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__
@@ -34,6 +34,7 @@
 
 #define ANIN_VELOCITY (5000)
 
+#undef ENABLE_Y_SCR
 
 typedef int slide_edge_t;
 
@@ -43,7 +44,16 @@ namespace EDGE {
        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;
+#ifdef ENABLE_Y_SCR
+       const int SLIDE_TOP_EDGE = (1<<3);              // 8
+       const int SLIDE_BOTTOM_EDGE = (1<<4);   // 16
+#endif
+
+       const int SLIDE_FIT = SLIDE_LEFT_EDGE | SLIDE_RIGHT_EDGE
+#ifdef ENABLE_Y_SCR
+               | SLIDE_TOP_EDGE | SLIDE_BOTTOM_EDGE
+#endif
+       ;
 };
 
 typedef enum {
@@ -64,7 +74,7 @@ typedef enum {
 class ECoreAnimator;
 class CAnimator;
 
-#define USE_CALC_JOB
+#undef USE_CALC_JOB
 
 // slider
 typedef struct Smart_Data
@@ -101,6 +111,8 @@ typedef struct Smart_Data
 
        bool bLongtapEnable;
        bool bMomentumStarted;
+
+       int longtap_count;
        int longtap_prev_x;
        int longtap_prev_y;
 
@@ -109,12 +121,11 @@ typedef struct Smart_Data
        Ecore_Idler *load_idler;
        Ecore_Idler *item_load_idler;
 
-       unsigned int zoom_level;
-
 #ifdef USE_CALC_JOB
        Ecore_Job *calc_job;
 #endif
 
+
 } _Smart_Data;
 
 
@@ -123,6 +134,7 @@ 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);
@@ -177,6 +189,8 @@ Evas_Event_Flags n_long_tap_end(void *data , void *event_info);
 
 Evas_Event_Flags n_long_tap_abort(void *data , void *event_info);
 
+void _put_originate(struct Smart_Data *sd, shift_direction_t dir, int momentum);
+
 
 #ifdef __cplusplus
 }
old mode 100755 (executable)
new mode 100644 (file)
index 894e28d..38dc662
 #include "ivug-medialist.h"
 #include "ivug-media.h"
 
-#include "ivug-drm.h"
+#include "ivug-drm-common.h"
 #include "ivug-mouse-event.h"
 #include "ivug-slider-item.h"
 
 #include "ivug-slider-priv.h"
 
+
 #include "ivug-image.h"
 
 #include "Animation.h"
@@ -57,10 +58,12 @@ const char *_GetStateString(slide_state_t state)
        {
                "None",
                "Set",
+               "Downloading",
                "DRM Checking",
                "Ready",
                "Loading",
                "Loaded",
+               "Download Failed",
                "No Right",
                "Error",
        };
@@ -73,11 +76,12 @@ 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");
+       MSG_SLIDER_MED("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.
        {
+               MSG_SLIDER_MED("Idler. Load center item");
                ivug_slider_item_load(sd->slide[CENTER_SLIDE]);
                goto end;
        }
@@ -92,28 +96,33 @@ static Eina_Bool _idler_loading_func(void* data)
 
        if ( sd->slide[NEXT_SLIDE]->state == SLIDE_STATE_READY )
        {
+               MSG_SLIDER_MED("Idler. Load next item");
                ivug_slider_item_load(sd->slide[NEXT_SLIDE]);
                goto end;
        }
 
        if ( sd->slide[PREV_SLIDE]->state == SLIDE_STATE_READY )
        {
+               MSG_SLIDER_MED("Idler. Load prev item");
                ivug_slider_item_load(sd->slide[PREV_SLIDE]);
                goto end;
        }
 
-       MSG_SLIDER_WARN("Set Data loading State=%s,%s,%s",
+       MSG_SLIDER_WARN("Idler. Nothing to do.");
+end:
+       MSG_SLIDER_HIGH("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)
+#define _do_load(sd) _do_load_dbg(sd, __func__, __LINE__)
+
+static void _do_load_dbg(struct Smart_Data *sd, const char *file, int line)
 {
        if ( sd->load_idler )
        {
@@ -121,10 +130,27 @@ static void _do_load(struct Smart_Data *sd)
                sd->load_idler = NULL;
        }
 
-       MSG_SLIDER_HIGH("Add idler for loading.");
+       MSG_SLIDER_HIGH("Add idler for loading. from %s(%d)", file, line);
        sd->load_idler = ecore_idler_add(_idler_loading_func, sd);
 }
 
+static bool _ivug_slider_image_rotate_reset(Slide_Item *si)
+{
+       IV_ASSERT(si != NULL);
+
+       if(si->state != SLIDE_STATE_LOADED)
+       {
+               return false;
+       }
+
+       if ( si->type == SITEM_TYPE_IMAGE )
+       {
+               ivug_image_rotate_set(si->photocam, 0);
+       }
+
+       return true;
+}
+
 static void _ivug_slider_on_center_changed(Evas_Object *obj, Slide_Item *old, Slide_Item *cur)
 {
        IV_ASSERT(old != cur );
@@ -133,9 +159,9 @@ static void _ivug_slider_on_center_changed(Evas_Object *obj, Slide_Item *old, Sl
 
        if ( old != NULL )
        {
-               ivug_slider_item_zoom_reset(old, EINA_TRUE, 0, 0);
-
-               ivug_slider_item_pause(old);            // Pause DRM consume/Animation
+               ivug_slider_item_zoom_reset(old, EINA_FALSE, 0, 0);
+//             _ivug_slider_image_rotate_reset(old);
+               ivug_slider_item_stop(old);             // Stop DRM consume/Animation
        }
 
        if(cur->state == SLIDE_STATE_LOADED)
@@ -144,16 +170,23 @@ static void _ivug_slider_on_center_changed(Evas_Object *obj, Slide_Item *old, Sl
        }
        else
        {
-               MSG_SLIDER_ERROR("Invalid state : %s", _GetStateString(cur->state));
+               MSG_SLIDER_ERROR("Center changed. but Invalid state : %s", _GetStateString(cur->state));
        }
 
        Media_Item *mitem = NULL;
 
        mitem = cur->mitem;
 
-       Media_Data *pData = ivug_medialist_get_data(mitem);
+       if ( mitem != NULL )
+       {
+               Media_Data *pData = ivug_medialist_get_data(mitem);
 
-       MSG_SLIDER_HIGH("Center item changed. %s State=%s", ivug_get_filename(pData->filepath), _GetStateString(cur->state));
+               MSG_SLIDER_HIGH("Center item changed. %s State=%s", ivug_get_filename(pData->filepath), _GetStateString(cur->state));
+       }
+       else
+       {
+               MSG_SLIDER_WARN("Center item changed. but Center item is NULL.");
+       }
 
        evas_object_smart_callback_call(sd->obj, "slider,item,changed", cur);
 }
@@ -172,6 +205,10 @@ void _ivug_slider_item_state_changed(slide_state_t state, Slide_Item *si, void *
                        ivug_slider_item_play(si);
                        evas_object_smart_callback_call(sd->obj, "slider,item,state,changed", si);
                }
+               else if (state == SLIDE_STATE_DOWNLOAD_FAILED)
+               {
+                       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);
@@ -187,7 +224,51 @@ static void _on_event_mouse_down(void *data, Evas *evas, Evas_Object *obj, void
        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)
+
+static void _on_event_mouse_wheel(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+       Evas_Event_Mouse_Wheel *Info = (Evas_Event_Mouse_Wheel *)event_info;
+
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get((Evas_Object *)data);
+
+#if 0
+struct _Evas_Event_Mouse_Wheel /** Wheel event */
+{
+   int              direction; /* 0 = default up/down wheel FIXME: more wheel types */
+   int              z; /* ...,-2,-1 = down, 1,2,... = up */
+
+   Evas_Point        output; /**< The X/Y location of the cursor */
+   Evas_Coord_Point  canvas; /**< The X/Y location of the cursor */
+
+   void            *data;
+   Evas_Modifier    *modifiers; /**< modifier keys pressed during the event */
+   Evas_Lock       *locks;
+   unsigned int     timestamp;
+   Evas_Event_Flags event_flags;
+   Evas_Device     *dev;
+};
+#endif
+/*
+W/IV-SLIDER( 2557): 0:00:18.005[F:ivug-slider.cpp  L:  322][HIGH] Mouse Wheel. Dir=0 Z=1 Event=0  --> Wheel downward  --> View Next
+W/IV-SLIDER( 2557): 0:00:18.292[F:ivug-slider.cpp  L:  322][HIGH] Mouse Wheel. Dir=0 Z=-1 Event=0  --> Wheel upward --> View Prev
+*/
+
+       if ( Info->z == 1 )
+       {
+               _put_originate(sd, SLIDE_SHIFT_TO_RIGHT, ANIN_VELOCITY);
+       }
+       else if ( Info->z == -1)
+       {
+               _put_originate(sd, SLIDE_SHIFT_TO_LEFT, ANIN_VELOCITY);
+       }
+
+
+       MSG_SLIDER_MED("Mouse Wheel. Dir=%d Z=%d Event=%d", Info->direction, Info->z, Info->event_flags);
+}
+
+
+
+static Eina_Bool _item_loader_idler(void* data)
 {
        IV_ASSERT(data != NULL);
        struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get((Evas_Object *)data);
@@ -196,6 +277,7 @@ static Eina_Bool _item_loader(void* data)
 
        Slide_Item *si = sd->slide[CENTER_SLIDE];
 
+       MSG_SLIDER_MED("Center Image load again");
        si->state = SLIDE_STATE_READY;
 
        ivug_slider_item_load(si);
@@ -207,9 +289,11 @@ static void _sizing_eval(void *data)
 {
        struct Smart_Data *sd = (struct Smart_Data *)data;
 
+#ifdef USE_CALC_JOB
        sd->calc_job = NULL;
+#endif
 
-       MSG_SLIDER_HIGH("Object geometry resized. (%d,%d,%d,%d)", sd->x, sd->y , sd->w , sd->h);
+       MSG_SLIDER_MED("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);
@@ -225,12 +309,15 @@ static void _sizing_eval(void *data)
 static void
 _ivug_slider_smart_add(Evas_Object *obj)
 {
-       MSG_SLIDER_HIGH("Slider Add : 0x%08x", obj);
+       MSG_SLIDER_MED("Slider Add : 0x%08x", obj);
 
        PERF_CHECK_BEGIN(LVL4, "slider smart add");
 
+       PERF_CHECK_BEGIN(LVL5, "initialize memory");
+
        struct Smart_Data *sd = (struct Smart_Data *)calloc(1, sizeof(struct Smart_Data));
-       ivug_ret_if(!sd);
+       IV_ASSERT(sd != NULL);
+
        evas_object_smart_data_set(obj, sd);
 
        sd->obj = obj;
@@ -241,17 +328,36 @@ _ivug_slider_smart_add(Evas_Object *obj)
        sd->edge = EDGE::SLIDE_FIT;
        sd->last_dir = SLIDE_SHIFT_TO_RIGHT;    /* default for first loading*/
        sd->bPassEvent = false;
+       sd->bLongtapEnable = true;
+
+
+       bool bUseInline = false;
+
+       if ( ivug_config_get_use_inlineplay(&bUseInline) == true )
+       {
+               evas_object_data_set(obj, "conf-use-inline", (void *)bUseInline);
+       }
+       else
+       {
+               evas_object_data_set(obj, "conf-use-inline", (void *)0);
+       }
+
+       PERF_CHECK_END(LVL5, "initialize memory");
+
 
        //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);
+
+               PERF_CHECK_END(LVL5, "add slider item");
        }
 
+       PERF_CHECK_BEGIN(LVL5, "create child objects");
+
        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.
@@ -301,6 +407,8 @@ _ivug_slider_smart_add(Evas_Object *obj)
        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);
 
+       evas_object_event_callback_add(sd->event_obj, EVAS_CALLBACK_MOUSE_WHEEL, _on_event_mouse_wheel, obj);
+
        sd->bLongtapEnable = true;
 
 #if 0
@@ -318,11 +426,13 @@ _ivug_slider_smart_add(Evas_Object *obj)
        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);
+       MSG_SLIDER_MED("Create clipper(0x%08x)", sd->clipper);
 
        evas_object_show(sd->clipper);
 #endif
 
+       PERF_CHECK_END(LVL5, "create child objects");
+
        PERF_CHECK_END(LVL4, "slider smart add");
 
        return;
@@ -332,7 +442,7 @@ _ivug_slider_smart_add(Evas_Object *obj)
 static void
 _ivug_slider_smart_del(Evas_Object *obj)
 {
-       MSG_SLIDER_HIGH("Slider delete. obj=0x%08x", obj);
+       MSG_SLIDER_MED("Slider delete. obj=0x%08x", obj);
 
        struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
        ivug_ret_if(!sd);
@@ -355,17 +465,28 @@ _ivug_slider_smart_del(Evas_Object *obj)
                sd->load_idler = NULL;
        }
 
+#ifdef USE_CALC_JOB
        if ( sd->calc_job ) ecore_job_del(sd->calc_job);
        sd->calc_job = NULL;
+#endif
 
        if ( sd->event_obj )
        {
+               evas_object_event_callback_del_full(sd->event_obj, EVAS_CALLBACK_MOUSE_WHEEL, _on_event_mouse_wheel, obj);
+
                evas_object_del(sd->event_obj);
                sd->event_obj = NULL;
        }
 
        if ( sd->gesture )
        {
+               elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_ABORT, NULL, NULL);
+               elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_ABORT, NULL, NULL);
+               elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_FLICKS, ELM_GESTURE_STATE_ABORT, NULL, NULL);
+               elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_STATE_ABORT, NULL, NULL);
+               elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_TAPS, ELM_GESTURE_STATE_ABORT, NULL, NULL);
+               elm_gesture_layer_cb_set(sd->gesture, ELM_GESTURE_N_LONG_TAPS, ELM_GESTURE_STATE_ABORT, NULL, NULL);
+
                evas_object_del(sd->gesture);
                sd->gesture = NULL;
        }
@@ -376,6 +497,7 @@ _ivug_slider_smart_del(Evas_Object *obj)
                sd->slide[i] = NULL;
        }
 
+
 #ifdef USE_CLIPPER
        if ( sd->clipper )
        {
@@ -384,6 +506,7 @@ _ivug_slider_smart_del(Evas_Object *obj)
        }
 #endif
 
+
        free(sd);
 
 }
@@ -397,7 +520,7 @@ _ivug_slider_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
 
        if ((sd->x == x) && (sd->y == y)) return;
 
-       MSG_SLIDER_MED("Slider Move : XY(%d,%d)", x, y);
+       MSG_SLIDER_MED("Slider Move : XY(%d,%d,%d,%d)", x, y, sd->w, sd->h);
 
        sd->x = x;
        sd->y = y;
@@ -408,7 +531,7 @@ _ivug_slider_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
 
        sd->calc_job = ecore_job_add(_sizing_eval, sd);
 #else
-       evas_object_smart_changed(obj);
+       _sizing_eval(sd);
 #endif
 
 }
@@ -421,7 +544,8 @@ _ivug_slider_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
 
        if ((sd->w == w) && (sd->h == h)) return;
 
-       MSG_SLIDER_MED("Slider Resize : WH(%d,%d)", w,h);
+       MSG_SLIDER_MED("Slider Resize : XY(%d,%d,%d,%d)", sd->x, sd->y , w, h);
+
 
        sd->w = w;
        sd->h = h;
@@ -432,7 +556,7 @@ _ivug_slider_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
 
        sd->calc_job = ecore_job_add(_sizing_eval, sd);
 #else
-       evas_object_smart_changed(obj);
+       _sizing_eval(sd);
 #endif
 
 }
@@ -447,14 +571,14 @@ _ivug_slider_smart_show(Evas_Object *obj)
 
        sd->bShow = EINA_TRUE;
 
-       MSG_SLIDER_HIGH("Slider Show");
+       MSG_SLIDER_MED("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
@@ -467,14 +591,13 @@ _ivug_slider_smart_hide(Evas_Object *obj)
 
        sd->bShow = EINA_FALSE;
 
-       MSG_SLIDER_HIGH("Slider Hide");
+       MSG_SLIDER_MED("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
@@ -482,7 +605,7 @@ _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);
+       MSG_SLIDER_MED("Slider Clip set : Clipper=0x%08x (%d,%d,%d,%d)", clip, x, y, w, h);
 
 #ifdef USE_CLIPPER
        struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
@@ -500,7 +623,7 @@ _ivug_slider_smart_clip_set(Evas_Object *obj, Evas_Object * clip)
 static void
 _ivug_slider_smart_clip_unset(Evas_Object *obj)
 {
-       MSG_SLIDER_HIGH("Slider Clip unset");
+       MSG_SLIDER_MED("Slider Clip unset");
 
 #ifdef USE_CLIPPER
        struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
@@ -525,6 +648,9 @@ _ivug_slider_smart_calculate(Evas_Object *obj)
 
        sd->anim->Stop();
 
+       if ( sd->tween ) delete sd->tween;
+       sd->tween = NULL;
+
        _ivug_slider_slide_resize(sd, sd->w, sd->h);
        _ivug_slider_slide_move(sd, sd->x, sd->y);
 }
@@ -534,7 +660,10 @@ static void
 _ivug_slider_smart_init(void)
 {
        if (_smart_) return;
+
        {
+               PERF_CHECK_BEGIN(LVL3, "ivug_slider_smart_init");
+
                const char* name = eina_stringshare_add("ivug-slider");
                MSG_SLIDER_MED("name=%s", name);
                static Evas_Smart_Class sc =
@@ -560,6 +689,8 @@ _ivug_slider_smart_init(void)
                };      //Evas_smart_Class
                sc.name = name;
                _smart_ = evas_smart_class_new(&sc);
+
+               PERF_CHECK_END(LVL3, "ivug_slider_smart_init");
        }
 }
 
@@ -648,6 +779,13 @@ _ivug_slider_start_slide(struct Smart_Data *sd, int src_x, int dst_x, int moment
  // Slider Move animation.
        IV_ASSERT(sd != NULL);
 
+       if ( sd->anim == NULL )
+       {
+               // When destroying gesture, abort message is comming. EFL behavior may be changed.
+               MSG_SLIDER_WARN("Slider is destroying...");
+               return;
+       }
+
 // TODO : If transition is preceeding, change slide item,
        sd->anim->Stop();
 
@@ -668,8 +806,8 @@ _ivug_slider_start_slide(struct Smart_Data *sd, int src_x, int dst_x, int moment
 
        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->tween->AddAnimator(new CSingleAnimator(src_x, dst_x, duration, CTranstionFunc::EaseInoutTransit, _ivug_slider_on_tween, sd));
+       sd->tween->AddAnimator(new CSingleAnimator(sd->momentum, 0, duration, CTranstionFunc::EaseInoutTransit, _ivug_slider_on_moment, sd));
 
        sd->anim->Start(_ivug_slider_on_ecore_animator, (void *)sd);
 
@@ -688,8 +826,6 @@ _ivug_slider_slide_shift(struct Smart_Data *sd, shift_direction_t direction)
                return;
        }
 
-       sd->zoom_level = 0;     //reset zoom level
-
        Media_Item *item = NULL;
        Slide_Item *NewItem = NULL;
 
@@ -720,9 +856,7 @@ _ivug_slider_slide_shift(struct Smart_Data *sd, shift_direction_t direction)
 
        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);
+       MSG_SLIDER_MED("Center slide. XY(%d,%d)", sd->slide[CENTER_SLIDE]->x , sd->slide[CENTER_SLIDE]->y);
 
        sd->last_dir = direction;
 
@@ -735,6 +869,8 @@ _ivug_slider_slide_shift(struct Smart_Data *sd, shift_direction_t direction)
                _ivug_slider_on_center_changed(sd->obj, sd->slide[NEXT_SLIDE], sd->slide[CENTER_SLIDE]);
        }
 
+       _do_load(sd);
+
 }
 
 
@@ -742,6 +878,7 @@ 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");
@@ -766,8 +903,19 @@ ivug_slider_start(Evas_Object *obj)
 
        MSG_SLIDER_HIGH("Slider start");
 
+
+       ivug_slider_load(obj);
+
 }
 
+Slide_Item *
+ivug_slider_get_sitem(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];
+}
 
 Media_Item *
 ivug_slider_get_item(Evas_Object* obj)
@@ -801,18 +949,16 @@ ivug_slider_delete_item(Evas_Object* obj)
 
        if (sd->slide[NEXT_SLIDE]->state != SLIDE_STATE_NONE)
        {
-               MSG_SLIDER_HIGH("right slide state : %s", _GetStateString(sd->slide[NEXT_SLIDE]->state));
+               MSG_SLIDER_MED("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));
+               MSG_SLIDER_MED("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_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;
@@ -861,12 +1007,10 @@ ivug_slider_delete_item(Evas_Object* obj)
                MSG_SLIDER_WARN("Direction is NONE");
        }
 
-       _ivug_slider_slide_move(sd, 0 , 0);     //draw item
+       _ivug_slider_slide_move(sd, 0 , sd->slide[CENTER_SLIDE]->y);    //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
@@ -882,7 +1026,6 @@ ivug_slider_set_medialist(Evas_Object* obj, Media_List *mList, Media_Item *curre
        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");
 
@@ -908,6 +1051,9 @@ ivug_slider_set_medialist(Evas_Object* obj, Media_List *mList, Media_Item *curre
 
        PERF_CHECK_END(LVL4, "_ivug_slider_on_center_changed");
 
+// Is it needed???????.. Slide item load is called from slider_start!.
+//     _do_load(sd);
+
        return EINA_TRUE;
 }//ivug slider set list
 
@@ -923,12 +1069,6 @@ ivug_slider_set_item(Evas_Object* obj, Media_Item *newItem, slide_dir_t 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
@@ -957,7 +1097,7 @@ ivug_slider_set_item(Evas_Object* obj, Media_Item *newItem, slide_dir_t dir)
                        sd->slide[CENTER_SLIDE] = sd->slide[NEXT_SLIDE];
                        sd->slide[NEXT_SLIDE] = sitem;
 
-                       _ivug_slider_slide_move(sd, 0, 0);
+                       _ivug_slider_slide_move(sd, 0, sd->slide[CENTER_SLIDE]->y);
 
                        mitem = ivug_medialist_get_next(sd->media_list, newItem);
                        ivug_slider_item_data_set(sd->slide[NEXT_SLIDE], mitem);
@@ -965,7 +1105,9 @@ ivug_slider_set_item(Evas_Object* obj, Media_Item *newItem, slide_dir_t dir)
                        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]);
+                       _do_load(sd);
+
+                       _ivug_slider_on_center_changed(sd->obj, sd->slide[NEXT_SLIDE] , sd->slide[CENTER_SLIDE]);
                        break;
        }
 
@@ -976,7 +1118,10 @@ ivug_slider_set_item(Evas_Object* obj, Media_Item *newItem, slide_dir_t dir)
 void
 ivug_slider_pause(Evas_Object *obj)
 {
-       IV_ASSERT(obj != NULL);
+       if (obj == NULL) {
+               MSG_SLIDER_WARN("Slider is NULL");
+               return;
+       }
        struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
 
        MSG_SLIDER_HIGH("Slider pause");
@@ -988,7 +1133,11 @@ ivug_slider_pause(Evas_Object *obj)
 void
 ivug_slider_resume(Evas_Object *obj)
 {
-       IV_ASSERT(obj != NULL);
+       if (obj == NULL) {
+               MSG_SLIDER_WARN("Slider is NULL");
+               return;
+       }
+
        struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
 
        MSG_SLIDER_HIGH("Slider resume");
@@ -1027,7 +1176,7 @@ ivug_slider_skip(Evas_Object* obj)
                        MSG_SLIDER_HIGH("prev is NULL");
                        if(sd->slide[NEXT_SLIDE]->mitem == NULL)
                        {
-                               MSG_SLIDER_HIGH("mext is NULL too, exit Image viewer");
+                               MSG_SLIDER_HIGH("next is NULL too, exit Image viewer");
                                ug_destroy_me(gGetUGHandle());
                                return;
                        }
@@ -1047,23 +1196,40 @@ bool ivug_slider_load(Evas_Object* obj)
 
        ivug_retv_if(!sd, EINA_FALSE);  //check smart data.
 
+       MSG_SLIDER_HIGH("Slider Load. 0x%08x", obj);
+
        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);
+       sd->item_load_idler = ecore_idler_add(_item_loader_idler, (void *)obj);
 
        return true;
 }
 
+
+bool ivug_slider_image_rotate(Evas_Object* obj, int angle)
+{
+       IV_ASSERT(obj != NULL);
+       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
+
+       ivug_retv_if(!sd, FALSE);       //check smart data.
+
+       Slide_Item *si = sd->slide[CENTER_SLIDE];
+
+       return ivug_slider_item_image_rotate_set(si, angle);
+}
+
 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);
 
+       MSG_SLIDER_HIGH("Slider(0x%08x) Set menu visibility=%d.", obj, bVisible);
+
        Slide_Item *si = sd->slide[CENTER_SLIDE];
 
        if ( bVisible == EINA_TRUE )
@@ -1132,96 +1298,3 @@ void ivug_slider_dump_photocam(Evas_Object* obj)
 
 }
 
-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--;
-}
-
-void
-ivug_slider_update(Evas_Object *obj, Media_Item *newItem)
-{
-       if (obj == NULL) {
-               MSG_SLIDER_HIGH("Slider is NULL");
-               return;
-       }
-       struct Smart_Data *sd = (struct Smart_Data *) evas_object_smart_data_get(obj);
-
-       MSG_SLIDER_HIGH("Slider update");
-
-       Slide_Item *si = sd->slide[CENTER_SLIDE];
-
-       ivug_slider_item_zoom_reset(si, EINA_FALSE, 0, 0);
-
-       ivug_slider_item_stop(si);
-
-       ivug_slider_item_data_set(si, newItem);
-
-       _do_load(sd);
-}
-
diff --git a/main/src/ug-image-viewer.c b/main/src/ug-image-viewer.c
deleted file mode 100755 (executable)
index 0477b6f..0000000
+++ /dev/null
@@ -1,646 +0,0 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-
-#include <Elementary.h>
-#include <ui-gadget-module.h>
-#include <app.h>
-
-#include <Ecore_X.h>           /*EFL*/
-
-#include "ivug-common.h"       //common
-#include "ivug-util.h"
-#include "ivug-main-view.h"
-#include "ivug-setas-view.h"
-#include "ivug-crop-ug.h"
-#include "ivug-details-view.h"
-
-#include "ivug-callback.h"
-#include "ivug-context.h"
-
-#include "ug-image-viewer.h"
-
-#include "ivug-parameter.h"
-
-static void _on_base_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("Base layout resized geomtery XYWH(%d,%d,%d,%d) angle=%d", x, y, w, h, elm_win_rotation_get(ug_get_window()));
-}
-
-static void _on_base_move(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("Base layout moved geomtery XYWH(%d,%d,%d,%d) angle=%d", x, y, w, h, elm_win_rotation_get(ug_get_window()));
-}
-
-static void _on_receive_mouse_down (void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
-       MSG_MAIN_HIGH("Base layout clicked : %s Layer=%d",evas_object_name_get(obj), evas_object_layer_get(obj));
-}
-
-static void _print_render_method(Evas *e)
-{
-       IV_ASSERT(e != NULL );
-
-       Eina_List *engines, *l;
-       int cur_id;
-       int id;
-       char *name;
-
-       engines = evas_render_method_list ();
-       if (!engines) {
-               MSG_IMAGEVIEW_ERROR("No engine is specified");
-               return;
-       }
-
-       cur_id = evas_output_method_get (e);
-
-       EINA_LIST_FOREACH (engines, l, name) {
-               id = evas_render_method_lookup (name);
-               if (name && id == cur_id)
-               {
-                       MSG_IMAGEVIEW_HIGH("Render method is %s", name);
-                       break;
-               }
-       }
-
-}
-
-static void _on_render_post(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
-       MSG_IMAGEVIEW_HIGH("***************render_post***************");
-}
-
-static void _on_render_pre(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
-       MSG_IMAGEVIEW_HIGH("***************render_pre***************");
-}
-
-static Evas_Object *create_fullview(Evas_Object *win, struct ug_data *ugd)
-{
-       Evas_Object *base;
-
-       /* Create Full view */
-       base = elm_layout_add(win);
-
-       Eina_Bool ret;
-
-       ret = elm_layout_file_set(base , EDJ_PATH"/ivug-base.edj", "ivug_base" );
-       evas_object_name_set(base, "Base layout");
-       if ( ret == EINA_FALSE)
-       {
-               MSG_IMAGEVIEW_HIGH("Cannot set layout. EDJ=%s Group=%s", EDJ_PATH"/ivug-base.edj", "ivug_base");
-               evas_object_del(base);
-
-               return NULL;
-       }
-
-       evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       evas_object_size_hint_align_set(base, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
-       elm_win_resize_object_add(win, base);
-
-       return base;
-}
-
-static Evas_Object *create_frameview(Evas_Object *parent, struct ug_data *ugd)
-{
-       Evas_Object *base;
-
-       /* Create Frame view */
-       base = elm_layout_add(parent);
-       evas_object_name_set(base, "Base layout frame");
-       elm_layout_theme_set(base, "layout", "application", "default");
-
-       return base;
-}
-
-
-static void *on_create(ui_gadget_h ug, enum ug_mode mode, service_h service, void *priv)
-{
-       struct ug_data *ugd;
-
-       PERF_CHECK_END(LVL0, "UG_MODULE_INIT -> On Create");
-
-       PERF_CHECK_BEGIN(LVL0, "On Create");
-
-       MSG_IMAGEVIEW_HIGH("Image Viewer : %s ug=0x%08x", __func__, ug);
-
-       if (!ug || !priv)
-       {
-               MSG_IMAGEVIEW_ERROR("Error. ug=0x%08x priv=0x%08x", ug, priv);
-               return NULL;
-       }
-
-       ugd = priv;
-/*
-       If application call this US, ug_get_parent_layout() returns window ID not layout.
-       Probably, UG bugs.
-*/
-       ugd->parent_layout = ug_get_parent_layout(ug);  //parent's layout
-       if (!ugd->parent_layout)
-       {
-               MSG_IMAGEVIEW_ERROR("Cannot get parent's layout. parent=0x%08x", ugd->parent_layout);
-               return NULL;
-       }
-
-       PERF_CHECK_BEGIN(LVL1, "init context");
-       //init
-       if (!ivug_context_init(ug))
-       {
-               MSG_IMAGEVIEW_ERROR("ivug_main_init error");
-               return NULL;
-       }
-       PERF_CHECK_END(LVL1, "init context");
-
-       PERF_CHECK_BEGIN(LVL1, "parse bundle");
-
-       ugd->ivug_param = ivug_param_create_from_bundle(service);
-       if (  ugd->ivug_param == NULL )
-       {
-               MSG_IMAGEVIEW_ERROR("Cannot parse parameter");
-               ivug_context_deinit(ug);
-               return NULL;
-       }
-       PERF_CHECK_END(LVL1, "parse bundle");
-
-       PERF_CHECK_BEGIN(LVL1, "creating base");
-
-       //create base
-       if (mode == UG_MODE_FULLVIEW)
-       {
-               MSG_IMAGEVIEW_MED("create base layout for FullView");
-               ugd->base = create_fullview(ug_get_window(), ugd);
-       }
-       else
-       {
-               MSG_IMAGEVIEW_MED("create base layout for FrameView");
-               ugd->base = create_frameview(ug_get_window(), ugd);
-       }
-       PERF_CHECK_END(LVL1, "creating base");
-
-       if ( ugd->base == NULL )
-       {
-               MSG_IMAGEVIEW_ERROR("Cannot create base view");
-               return NULL;
-       }
-
-       MSG_IMAGEVIEW_HIGH("UG base created : 0x%08x", ugd->base);
-       evas_object_event_callback_add(ugd->base, EVAS_CALLBACK_MOUSE_DOWN, _on_receive_mouse_down, NULL);
-
-       evas_object_event_callback_add(ugd->base, EVAS_CALLBACK_RESIZE, _on_base_resize, NULL);
-       evas_object_event_callback_add(ugd->base, EVAS_CALLBACK_MOVE, _on_base_move, NULL);
-
-       evas_object_event_callback_add(ugd->base, EVAS_CALLBACK_RENDER_PRE, _on_render_pre, NULL);
-       evas_object_event_callback_add(ugd->base, EVAS_CALLBACK_RENDER_POST, _on_render_post, NULL);
-
-       if(ugd->ivug_param->mode == IVUG_MODE_SETAS)
-       {
-               MSG_IMAGEVIEW_HIGH("UG types=%d", ugd->ivug_param->setas_type);
-
-               ivug_setas_mode setas_mode = IVUG_SETAS_UG;
-               if(ugd->ivug_param->bStandalone == true)
-               {
-                       setas_mode = IVUG_SETAS_APPSVC;
-               }
-
-               if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_CALLER_ID)
-               {
-                       ugd->setas_view = ivug_setas_view_callerid_ug_create(ugd->base, ugd->ivug_param->filepath,
-                               setas_mode, ugd->ivug_param->width, ugd->ivug_param->height);
-               }
-               else if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_VIDEO_CALL_ID)
-               {
-                       ugd->setas_view = ivug_setas_view_video_call_id_ug_create(ugd->base, ugd->ivug_param->filepath,
-                               setas_mode, ugd->ivug_param->width, ugd->ivug_param->height);
-               }
-               else if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_WALLPAPER)\r
-               {\r
-                       ugd->setas_view = ivug_setas_view_screen_ug_create(ugd->base, ugd->ivug_param->filepath,\r
-                               setas_mode, IVUG_CTRLBAR_SET_SCREEN_HOME);\r
-               }\r
-               else if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_LOCKSCREEN)\r
-               {\r
-                       ugd->setas_view = ivug_setas_view_screen_ug_create(ugd->base, ugd->ivug_param->filepath,\r
-                               setas_mode, IVUG_CTRLBAR_SET_SCREEN_LOCK);\r
-               }\r
-               else if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_WALLPAPER_N_LOCKSCREEN)\r
-               {\r
-                       ugd->setas_view = ivug_setas_view_screen_ug_create(ugd->base, ugd->ivug_param->filepath,\r
-                               setas_mode, IVUG_CTRLBAR_SET_SCREEN_BOTH);\r
-               }\r
-               else if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_CROP)
-               {
-                       // Crop UG
-                       ugd->crop_ug = ivug_crop_ug_create(ugd->base,
-                               ugd->ivug_param->width, ugd->ivug_param->height,
-                               ugd->ivug_param->bRatioFix, ugd->ivug_param->filepath);
-               }
-               else if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_WALLPAPER_ONLY)
-               {
-                       ugd->setas_view = ivug_setas_view_screen_ug_create(ugd->base, ugd->ivug_param->filepath,
-                                       setas_mode, IVUG_CTRLBAR_SET_SCREEN_HOME);
-               }
-               else
-               {
-                       MSG_IMAGEVIEW_ERROR("Invalid SetAS UG Type:%d", ugd->ivug_param->setas_type);
-                       return NULL;
-               }
-
-               if(ugd->setas_view == NULL && ugd->crop_ug == NULL)
-               {
-                       MSG_IMAGEVIEW_ERROR("SetAS UG creation failed Type:%d", ugd->ivug_param->setas_type);
-                       goto ON_CREATE_ERROR;
-               }
-
-               Evas_Object *layout = NULL;
-
-               if(ugd->setas_view)
-               {
-                       layout = ivug_setas_view_object_get(ugd->setas_view);
-               }
-               else if(ugd->crop_ug)
-               {
-                       layout = ivug_crop_ug_get_layout(ugd->crop_ug);
-               }
-
-               elm_object_part_content_set(ugd->base, "elm.swallow.content", layout);  //swallow
-               evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
-               evas_object_show(layout);
-       }
-       else
-       {
-               PERF_CHECK_BEGIN(LVL1, "main_view_create");
-
-               ugd->main_view = ivug_main_view_create(ugd->base, ugd->ivug_param->mode, ugd->ivug_param->view_by);
-
-               PERF_CHECK_END(LVL1, "main_view_create");
-
-               if (ugd->main_view == NULL)     //set main view.
-               {
-                       MSG_IMAGEVIEW_ERROR("Main View Layout Lading Fail");
-                       goto ON_CREATE_ERROR;
-               }
-
-// Load list.
-               PERF_CHECK_BEGIN(LVL1, "main_view_load_list");
-
-               if ( ivug_main_view_load_list(ugd->main_view, ugd->ivug_param) == false)
-               {
-                       MSG_IMAGEVIEW_ERROR("Cannot load media list.");
-                       // Need popup?
-                       goto ON_CREATE_ERROR;
-               }
-
-               Evas_Object *layout = ivug_main_view_object_get(ugd->main_view);
-
-               elm_object_part_content_set(ugd->base, "elm.swallow.content", layout);  //swallow
-
-               evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
-               evas_object_show(layout);
-               PERF_CHECK_END(LVL1, "main_view_load_list");
-       }
-
-
-       PERF_CHECK_BEGIN(LVL1, "Force render");
-
-       evas_render(evas_object_evas_get(ugd->base));
-
-       PERF_CHECK_END(LVL1, "Force render");
-
-       PERF_CHECK_END(LVL0, "On Create");
-
-       PERF_CHECK_BEGIN(LVL0, "On Create -> On Start");
-
-       return ugd->base;
-
-ON_CREATE_ERROR:
-       if(ugd->main_view)
-       {
-               ivug_main_view_destroy(ugd->main_view);
-       }
-       ivug_context_deinit(ug);
-       if (ugd->base)
-       {
-               evas_object_del(ugd->base);
-               ugd->base = NULL;
-       }
-       return NULL;
-}
-
-static void on_start(ui_gadget_h ug, service_h service, void *priv)
-{
-       PERF_CHECK_END(LVL0, "On Create -> On Start");
-
-       PERF_CHECK_BEGIN(LVL0, "On Start");
-
-       MSG_IMAGEVIEW_HIGH("Image Viewer : %s", __func__);
-
-       if (!ug || !priv)
-       {
-               MSG_IMAGEVIEW_ERROR("Invalid UG. UG=0x%08x Priv=0x%08x", ug, priv);
-               return ;
-       }
-
-       struct ug_data *ugd = (struct ug_data *)priv;
-
-       if ( ugd->main_view )
-       {
-               PERF_CHECK_BEGIN(LVL1, "main_view_start");
-               ivug_main_view_start(ugd->main_view);
-               PERF_CHECK_END(LVL1, "main_view_start");
-       }
-
-       PERF_CHECK_END(LVL0, "On Start");
-}
-
-static void on_pause(ui_gadget_h ug, service_h service, void *priv)
-{
-       MSG_IMAGEVIEW_HIGH("Image Viewer : %s", __func__);
-
-       if (!ug || !priv)
-       {
-               MSG_IMAGEVIEW_ERROR("Invalid UG. UG=0x%08x Priv=0x%08x", ug, priv);
-               return ;
-       }
-
-       struct ug_data *ugd = (struct ug_data *)priv;
-
-       if ( ugd->main_view )
-       {
-               ivug_main_view_pause(ugd->main_view);
-       }
-
-}
-
-static void on_resume(ui_gadget_h ug, service_h service, void *priv)
-{
-       MSG_IMAGEVIEW_HIGH("Image Viewer : %s", __func__);
-
-       if (!ug || !priv)
-       {
-               IVUG_DEBUG_MSG("Invalid UG. UG=0x%08x Priv=0x%08x", ug, priv);
-               return ;
-       }
-
-       struct ug_data *ugd = (struct ug_data *)priv;
-
-       if ( ugd->main_view )
-       {
-               ivug_main_view_resume(ugd->main_view);
-       }
-
-}
-
-static void on_destroy(ui_gadget_h ug, service_h service, void *priv)
-{
-       MSG_IMAGEVIEW_HIGH("Image Viewer : %s UG=0x%08x", __func__, ug);
-
-       PERF_CHECK_BEGIN(LVL0, "On Destroy");
-
-       if (!ug || !priv)
-       {
-               MSG_IMAGEVIEW_ERROR("Invalid UG. UG=0x%08x Priv=0x%08x", ug, priv);
-               return ;
-       }
-
-       struct ug_data *ugd = (struct ug_data *)priv;
-
-       MSG_IMAGEVIEW_HIGH("On Destroy : ug=0x%08x", ug);
-
-       if(ugd->setas_view)
-       {
-               PERF_CHECK_BEGIN(LVL1, "SetAsView");
-               ivug_setas_view_destroy(ugd->setas_view);
-               ugd->setas_view = NULL;
-               PERF_CHECK_END(LVL1, "SetAsView");
-       }
-
-       if(ugd->crop_ug)
-       {
-               ivug_crop_ug_destroy(ugd->crop_ug);
-               ugd->crop_ug = NULL;
-       }
-
-       //destroy main view.
-       if ( ugd->main_view )
-       {
-               PERF_CHECK_BEGIN(LVL1, "MainView");
-               ivug_main_view_destroy(ugd->main_view);
-               ugd->main_view = NULL;
-               PERF_CHECK_END(LVL1, "MainView");
-       }
-
-       //delete param.
-       if(ugd->ivug_param)
-       {
-               ivug_param_delete(ugd->ivug_param);
-               ugd->ivug_param = NULL;
-       }
-
-       //finalize data
-       PERF_CHECK_BEGIN(LVL1, "Context");
-       if ( !ivug_context_deinit(ug))
-       {
-               MSG_IMAGEVIEW_ERROR("ivug_main_deinit failed");
-       }
-       PERF_CHECK_END(LVL1, "Context");
-
-       if (ugd->base)
-       {
-               PERF_CHECK_BEGIN(LVL1, "Base layout");
-               evas_object_del(ugd->base);
-               ugd->base = NULL;
-               PERF_CHECK_END(LVL1, "Base layout");
-       }
-
-       MSG_IMAGEVIEW_HIGH("Destroyed all ug");
-
-       PERF_CHECK_END(LVL0, "On Destroy");
-}
-
-static bool _data_print(service_h service, const char *key, void *user_data)
-{
-       MSG_IVUG_HIGH("  %s", key);
-
-       return true;
-}
-
-static void on_message(ui_gadget_h ug, service_h msg, service_h service, void *priv)
-{
-       MSG_IMAGEVIEW_HIGH("Image Viewer : %s UG=0x%08x", __func__, ug);        //on message
-
-       if (!ug || !priv)
-       {
-               MSG_IMAGEVIEW_ERROR("Invalid UG. UG=0x%08x Priv=0x%08x", ug, priv);
-               return;
-       }
-
-       int ret = service_foreach_extra_data(service, _data_print, NULL);
-
-       if(SERVICE_ERROR_NONE != ret)
-       {
-               MSG_IVUG_ERROR("service_foreach_extra_data ERROR");
-       }
-
-       struct ug_data *ugd = (struct ug_data *)priv;
-
-       //ivug_msg_type msg_type = IVUG_MSG_NONE;
-
-       if(ugd->main_view == NULL)
-       {
-               MSG_IMAGEVIEW_ERROR("main view is NULL");
-               return;
-       }
-
-       ivug_callback_call(gGetCallbackHandle(), service, NULL, NULL);
-
-       return;
-}
-
-static void on_event(ui_gadget_h ug, enum ug_event event, service_h service, void *priv)
-{
-       if (!ug || !priv)
-       {
-               MSG_IMAGEVIEW_ERROR("Invalid UG. UG=0x%08x Priv=0x%08x", ug, priv);
-               return;
-       }
-       MSG_IMAGEVIEW_HIGH("Image Viewer : %s UG=0x%08x", __func__, ug);        //on message
-
-       switch (event) {
-       case UG_EVENT_LOW_MEMORY:
-               MSG_IMAGEVIEW_HIGH("Get Event : Low Memory");
-               break;
-       case UG_EVENT_LOW_BATTERY:
-               MSG_IMAGEVIEW_HIGH("Get Event : Low battery");
-               break;
-       case UG_EVENT_LANG_CHANGE:
-               MSG_IMAGEVIEW_HIGH("Get Event : Language changed");
-               break;
-
-       case UG_EVENT_ROTATE_PORTRAIT:
-       case UG_EVENT_ROTATE_LANDSCAPE:
-       case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN:
-       case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN:
-               // Rotate event is not used now.. plz, use only resized callback.
-               break;
-
-       default:
-               MSG_IMAGEVIEW_ERROR("Unknown event type : %d", event);
-               break;
-       }
-}
-
-UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops)
-{
-       struct ug_data *ugd;
-
-       MSG_IMAGEVIEW_HIGH("UG_MODULE_INIT. Ver=12.0");
-
-       if (!ops)
-       {
-               MSG_IMAGEVIEW_ERROR("OPS Pointer is NULL");
-               return -1;
-       }
-
-       ugd = calloc(1, sizeof(struct ug_data));        //alloc ug_data memory
-       if (!ugd)
-       {
-               MSG_IMAGEVIEW_ERROR("Cannot allocate memory.");
-               return -1;
-       }
-
-       IV_PERF_INIT();
-
-       ops->create = on_create;
-       ops->start = on_start;
-       ops->pause = on_pause;
-       ops->resume = on_resume;
-       ops->destroy = on_destroy;
-       ops->message = on_message;
-       ops->event = on_event;
-       ops->priv = ugd;
-       ops->opt = UG_OPT_INDICATOR_ENABLE;
-
-       PERF_CHECK_BEGIN(LVL0, "UG_MODULE_INIT -> On Create");
-
-       return 0;
-}
-
-UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops)
-{
-       struct ug_data *ugd;
-       if (!ops)
-       {
-               MSG_IMAGEVIEW_ERROR("OPS Pointer is NULL");
-               return;
-       }
-
-       ugd = ops->priv;
-
-       if (ugd)
-       {
-               free(ugd);
-       }
-
-       MSG_IMAGEVIEW_HIGH("UG_MODULE_EXIT");
-
-#ifdef TA_SAVETO_FILE
-       FILE *fp = NULL;
-
-       fp = fopen(DATADIR"/"PACKAGE"/TimeAnal", "a");
-
-       IV_ASSERT(fp != NULL);
-
-       PERF_SHOW_RESULT(fp);
-
-       fclose(fp);
-#else
-       PERF_SHOW_RESULT(stderr);
-#endif
-
-       IV_PERF_DEINIT();
-
-}
-
-
-#define _CONSTRUCTOR __attribute__ ((constructor))
-#define _DESTRUCTOR __attribute__ ((destructor))
-
-void _CONSTRUCTOR _DLLInit(void)
-{
-       printf("Image Viewer - Called constructor\n");
-}
-
-void _DESTRUCTOR _DLLExit(void)
-{
-       printf("Image Viewer - Called destructor\n");
-
-}
-
-
-int main()
-{
-/*     For detecting undefined symbol */
-       return -1;
-}
-
diff --git a/main/src/ug-image-viewer.cpp b/main/src/ug-image-viewer.cpp
new file mode 100644 (file)
index 0000000..5e813ec
--- /dev/null
@@ -0,0 +1,1065 @@
+/*
+ * 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-module.h>
+#include <app.h>
+
+#include <Ecore_X.h>           /*EFL*/
+
+#include "ivug-common.h"       //common
+#include "ivug-util.h"
+#include "ivug-main-view.h"
+#include "ivug-setas-view.h"
+#include "ivug-crop-ug.h"
+#include "ivug-details-view.h"
+#include "ivug-popup.h"
+#include "ivug-slideshow-view.h"
+
+
+#include "EFLUtil.h"
+
+
+#include "ivug-callback.h"
+#include "ivug-context.h"
+
+#include "ivug-parameter.h"
+
+#define SHORTCUT_ICON_PATH     "/usr/share/icons/default/small/com.samsung.image-viewer.png"
+
+typedef struct ug_data {
+       Evas_Object *base;                      // UG layout
+
+// View Data;
+       Ivug_MainView *main_view;
+       Ivug_SetAsView *setas_view;
+       IvugCropUG *crop_ug;
+
+       Ivug_SlideShowView *ss_view;
+
+       ivug_parameter* ivug_param;
+
+       bool bError;
+       char *bErrMsg;
+
+       Evas_Object *icon;
+       Ecore_Timer *exit_timer;
+
+       Evas_Object *navi_bar;
+       Elm_Object_Item *navi_it;
+} _AppData;
+
+
+#undef TRACE_RENDER
+
+static void _on_parent_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("Parent win(0x%08x) resized geomtery XYWH(%d,%d,%d,%d) angle=%d", obj, x, y, w, h, elm_win_rotation_get((Evas_Object *)ug_get_window()));
+}
+
+static void _on_parent_move(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("Parent win(0x%08x) moved geomtery XYWH(%d,%d,%d,%d) angle=%d", obj, x, y, w, h, elm_win_rotation_get((Evas_Object *)ug_get_window()));
+}
+
+
+static void _on_base_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("Base layout resized geomtery XYWH(%d,%d,%d,%d) angle=%d", x, y, w, h, elm_win_rotation_get((Evas_Object *)ug_get_window()));
+}
+
+static void _on_base_move(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("Base layout moved geomtery XYWH(%d,%d,%d,%d) angle=%d", x, y, w, h, elm_win_rotation_get((Evas_Object *)ug_get_window()));
+}
+
+
+static void _on_base_show(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       MSG_IMAGEVIEW_HIGH("Base layout show");
+}
+
+static void _on_base_hide(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       MSG_IMAGEVIEW_HIGH("Base layout hide");
+}
+
+static void _on_receive_mouse_down (void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       MSG_MAIN_HIGH("Base layout clicked : %s Layer=%d",evas_object_name_get(obj), evas_object_layer_get(obj));
+}
+
+static void _print_render_method(Evas *e)
+{
+       IV_ASSERT(e != NULL );
+
+       Eina_List *engines, *l;
+       int cur_id;
+       int id;
+
+       engines = evas_render_method_list ();
+       if (!engines) {
+               MSG_IMAGEVIEW_ERROR("No engine is specified");
+               return;
+       }
+
+       cur_id = evas_output_method_get (e);
+
+       char *name;
+       void *data;
+       EINA_LIST_FOREACH (engines, l, data) {
+               name = (char *)data;
+               id = evas_render_method_lookup (name);
+               if (name && id == cur_id)
+               {
+                       MSG_IMAGEVIEW_HIGH("Render method is %s", name);
+                       break;
+               }
+       }
+
+}
+
+
+#ifdef TRACE_RENDER
+static void _on_render_post(void *data, Evas *e, void *event_info)
+{
+       MSG_IMAGEVIEW_HIGH("***************render_post***************");
+
+#if 0
+       struct ug_data *ugd = (struct ug_data *)data;
+
+       if ( ugd->main_view && ugd->base )
+       {
+               EFL::dump_obj(ugd->base,0);
+       }
+#endif
+
+}
+
+static void _on_render_pre(void *data, Evas *e,  void *event_info)
+{
+       MSG_IMAGEVIEW_HIGH("***************render_pre ***************");
+
+#if 0
+       struct ug_data *ugd = (struct ug_data *)data;
+
+       if ( ugd->main_view && ugd->base )
+       {
+               EFL::dump_obj(ugd->base,0);
+       }
+#endif
+}
+#endif
+
+
+
+static void _on_setas_view_destroyed(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+       struct ug_data *ugd = (struct ug_data *)data;
+
+       if(ugd->setas_view)
+       {
+               ivug_setas_view_destroy(ugd->setas_view);
+               ugd->setas_view = NULL;
+       }
+
+       ug_destroy_me(gGetUGHandle());
+}
+
+
+static void
+_on_timeout_response(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+
+       ui_gadget_h ug = (ui_gadget_h)data;
+
+       MSG_IMAGEVIEW_ERROR("ERROR EXIT");
+
+       ug_destroy_me(ug);
+}
+
+static Evas_Object* _set_win_icon(void)
+{
+// set window icon
+       Evas_Object *o = evas_object_image_add(evas_object_evas_get((Evas_Object *)ug_get_window()));
+       evas_object_image_file_set(o, SHORTCUT_ICON_PATH, NULL);
+       elm_win_icon_object_set((Evas_Object *)ug_get_window(), o);
+
+       return o;
+}
+
+static void _win_profile_changed_cb(void *data, Evas_Object * obj, void *event_info)
+{
+       if (data == NULL) return;
+
+       struct ug_data *ugd = (struct ug_data *)data;
+
+       const char *profile = elm_config_profile_get();
+
+       if (!strcmp(profile, "desktop"))
+       {  // desktop mode
+               gSetDesktopMode(true);
+
+               // hide layout's indicator area
+               elm_win_indicator_mode_set((Evas_Object *)ug_get_window(), ELM_WIN_INDICATOR_HIDE);
+
+               // set window icon
+               if (!ugd->icon)
+               {
+                       ugd->icon = _set_win_icon();
+               }
+       }
+       else
+       {   // mobile
+               gSetDesktopMode(false);
+
+               // show layout's indicator area
+               elm_win_indicator_mode_set((Evas_Object *)ug_get_window(), ELM_WIN_INDICATOR_SHOW);
+       }
+}
+
+static Eina_Bool _on_exit_timer_expired(void *data)
+{
+       ivug_retv_if(!data, ECORE_CALLBACK_CANCEL);
+
+       struct ug_data *ugd = (struct ug_data *)data;
+
+       ugd->exit_timer = NULL;
+
+       DESTROY_ME();
+
+       return ECORE_CALLBACK_CANCEL;
+}
+
+static bool _is_mmc_inserted(void)
+{
+       int noti_message;
+       int ret = -1;
+
+       ret = vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &noti_message);
+
+       if ( ret != 0 ) // falied
+       {
+               MSG_NOTI_ERROR("Get %s is failed", VCONFKEY_SYSMAN_MMC_STATUS);
+               return false;
+       }
+
+       if(noti_message == VCONFKEY_SYSMAN_MMC_MOUNTED)
+       {
+               return true;
+       }
+
+       return false;
+
+}
+
+static void _on_mmc_state_changed(keynode_t* node, void *data)
+{
+       struct ug_data *ugd = (struct ug_data *)data;
+       if (NULL == ugd) {
+               return;
+       }
+
+       if(_is_mmc_inserted() == false)
+       {
+               MSG_IMAGEVIEW_WARN("MMC Removed!");
+               if(strncmp(ugd->ivug_param->filepath, PATH_SDCARD, strlen(PATH_SDCARD)) != 0
+                       && ugd->ivug_param->view_by != IVUG_VIEW_BY_ALL)
+               {
+                       return;
+               }
+
+               MSG_IMAGEVIEW_WARN("Request destroy UG=0x%08x", gGetUGHandle());
+
+               if(ugd->main_view)
+               {
+                       _ivug_main_on_mmc_state_changed(node, ugd->main_view);
+               }
+               else if(ugd->ss_view)
+               {
+                       _ivug_slideshow_view_on_mmc_state_changed(node, ugd->ss_view);
+               }
+               else
+               {
+                       //ivug_timeout_popup_show(ugd->base, _on_timeout_response, gGetUGHandle(), IDS_ERROR, IDS_SD_CARD_REMOVED);
+                       if(ugd->exit_timer == NULL)
+                       {
+                               ugd->exit_timer = ecore_timer_add(0.2, _on_exit_timer_expired, ugd);
+                       }
+               }
+       }
+}
+
+static Evas_Object *create_fullview(Evas_Object *win, struct ug_data *ugd)
+{
+       Evas_Object *base;
+
+       /* Create Full view */
+       base = EFL::create_layout(win, EDJ_PATH"/ivug-base.edj", "ivug_base");
+       if (base == NULL)
+       {
+               MSG_IMAGEVIEW_HIGH("Cannot set layout. EDJ=%s Group=%s", EDJ_PATH"/ivug-base.edj", "ivug_base");
+               return NULL;
+       }
+
+       evas_object_name_set(base, "Base layout");
+
+       evas_object_size_hint_expand_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+       return base;
+}
+
+static Evas_Object *create_frameview(Evas_Object *parent, struct ug_data *ugd)
+{
+       Evas_Object *base;
+
+       /* Create Frame view */
+       base = elm_layout_add(parent);
+       evas_object_name_set(base, "Base layout frame");
+       elm_layout_theme_set(base, "layout", "application", "default");
+
+       return base;
+}
+
+
+static void *on_create(ui_gadget_h ug, enum ug_mode mode, service_h service, void *priv)
+{
+       struct ug_data *ugd;
+
+       PERF_CHECK_END(LVL0, "UG_MODULE_INIT -> On Create");
+
+       PERF_CHECK_BEGIN(LVL0, "On Create");
+
+       MSG_IMAGEVIEW_HIGH("Image Viewer : %s ug=0x%08x", __func__, ug);
+
+       if (!ug || !priv)
+       {
+               MSG_IMAGEVIEW_ERROR("Error. ug=0x%08x priv=0x%08x", ug, priv);
+               return NULL;
+       }
+
+       ugd = (struct ug_data *)priv;
+
+       Evas_Object *win = (Evas_Object *)ug_get_window();
+
+       int wx, wy, ww, wh;
+       int ret = -1;
+
+       evas_object_geometry_get(win, &wx, &wy, &ww, &wh);
+
+       MSG_IMAGEVIEW_HIGH("Parent Info. Layout(0x%08x) Win(0x%08x) Size(%d,%d,%d,%d)",
+                       ug_get_parent_layout(ug), win, wx, wy, ww, wh);
+
+       PERF_CHECK_BEGIN(LVL1, "init context");
+       //init
+       if (!ivug_context_init(ug))
+       {
+               MSG_IMAGEVIEW_ERROR("ivug_main_init error");
+               return NULL;
+       }
+       PERF_CHECK_END(LVL1, "init context");
+
+       PERF_CHECK_BEGIN(LVL1, "parse bundle");
+
+       ugd->ivug_param = ivug_param_create_from_bundle(service);
+       if (  ugd->ivug_param == NULL )
+       {
+               MSG_IMAGEVIEW_ERROR("Cannot parse parameter");
+               ugd->bError = true;
+               ugd->bErrMsg = strdup(IDS_UNABLE_TO_OPEN_FILE);
+               goto ON_CREATE_ERROR;
+       }
+       PERF_CHECK_END(LVL1, "parse bundle");
+
+       PERF_CHECK_BEGIN(LVL1, "creating base");
+
+       //create base
+       if (mode == UG_MODE_FULLVIEW)
+       {
+               MSG_IMAGEVIEW_HIGH("create base layout for FullView");
+               ugd->base = create_fullview(win, ugd);
+       } else {
+               MSG_IMAGEVIEW_HIGH("create base layout for FrameView");
+               ugd->base = create_frameview(win, ugd);
+       }
+
+       PERF_CHECK_END(LVL1, "creating base");
+
+       if ( ugd->base == NULL )
+       {
+               MSG_IMAGEVIEW_ERROR("Cannot create base view");
+               ugd->bError = true;
+               ugd->bErrMsg = strdup(IDS_UNABLE_TO_OPEN_FILE);
+               goto ON_CREATE_ERROR;
+       }
+
+#ifdef TRACE_RENDER
+       evas_event_callback_add(evas_object_evas_get(ugd->base), EVAS_CALLBACK_RENDER_PRE, _on_render_pre, ugd);
+       evas_event_callback_add(evas_object_evas_get(ugd->base), EVAS_CALLBACK_RENDER_POST, _on_render_post, ugd);
+#endif
+
+       int ux1, uy1, uw1, uh1;
+
+       evas_object_geometry_get(ugd->base, &ux1, &uy1, &uw1, &uh1);
+
+       MSG_IMAGEVIEW_HIGH("UG base created : 0x%08x (%d,%d,%d,%d)", ugd->base, ux1, uy1, uw1, uh1);
+
+       evas_object_event_callback_add(ugd->base, EVAS_CALLBACK_MOUSE_DOWN, _on_receive_mouse_down, NULL);
+
+       evas_object_event_callback_add(ugd->base, EVAS_CALLBACK_RESIZE, _on_base_resize, ugd);
+       evas_object_event_callback_add(ugd->base, EVAS_CALLBACK_MOVE, _on_base_move, NULL);
+
+       evas_object_event_callback_add(ugd->base, EVAS_CALLBACK_SHOW, _on_base_show, NULL);
+       evas_object_event_callback_add(ugd->base, EVAS_CALLBACK_HIDE, _on_base_hide, NULL);
+
+//     evas_object_event_callback_add(win, EVAS_CALLBACK_RESIZE, _on_parent_resize, NULL);
+//     evas_object_event_callback_add(win, EVAS_CALLBACK_MOVE, _on_parent_move, NULL);
+
+       evas_object_smart_callback_add(win, "profile,changed", _win_profile_changed_cb, ugd);
+
+       ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, _on_mmc_state_changed, ugd);
+       if ( ret == -1 )
+       {
+               MSG_IMAGEVIEW_ERROR("Register %s is failed", VCONFKEY_SYSMAN_MMC_STATUS);
+       }
+
+       if(ugd->ivug_param->mode == IVUG_MODE_SETAS)
+       {
+               MSG_IMAGEVIEW_HIGH("UG types=%d", ugd->ivug_param->setas_type);
+
+               ivug_set_screen_type type = IVUG_CTRLBAR_SET_SCREEN_MAX;
+
+               ivug_setas_mode setas_mode = IVUG_SETAS_UG;
+               if(ugd->ivug_param->bStandalone == true)
+               {
+                       setas_mode = IVUG_SETAS_APPSVC;
+               }
+
+               if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_CALLER_ID)
+               {
+                       type = IVUG_CTRLBAR_SET_SCREEN_CALLERID;
+                       ugd->setas_view = ivug_setas_view_callerid_ug_create(ugd->base, ugd->ivug_param->filepath,
+                               setas_mode, ugd->ivug_param->width, ugd->ivug_param->height);
+               }
+               else if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_VIDEO_CALL_ID)
+               {
+                       type = IVUG_CTRLBAR_SET_SCREEN_VIDEO_CALL_ID;
+                       ugd->setas_view = ivug_setas_view_video_call_id_ug_create(ugd->base, ugd->ivug_param->filepath,
+                               setas_mode, ugd->ivug_param->width, ugd->ivug_param->height);
+               }
+               else if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_WALLPAPER)
+               {
+                       type = IVUG_CTRLBAR_SET_SCREEN_HOME;
+                       ugd->setas_view = ivug_setas_view_screen_create(ugd->base, ugd->ivug_param->filepath,
+                               setas_mode, type);
+               }
+               else if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_LOCKSCREEN)
+               {
+                       type = IVUG_CTRLBAR_SET_SCREEN_LOCK;
+                       ugd->setas_view = ivug_setas_view_screen_create(ugd->base, ugd->ivug_param->filepath,
+                               setas_mode, type);
+               }
+               else if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_WALLPAPER_N_LOCKSCREEN)
+               {
+                       type = IVUG_CTRLBAR_SET_SCREEN_BOTH;
+                       ugd->setas_view = ivug_setas_view_screen_create(ugd->base, ugd->ivug_param->filepath,
+                               setas_mode, type);
+               }
+               else if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_WALLPAPER_CROP)
+               {
+                       type = IVUG_CTRLBAR_SET_SCREEN_HOME;
+                       setas_mode = IVUG_SETAS_CROP;
+                       ugd->setas_view = ivug_setas_view_screen_create(ugd->base, ugd->ivug_param->filepath,
+                               setas_mode, type);
+               }
+               else if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_CROP)
+               {
+                       // Crop UG
+                       ugd->crop_ug = ivug_crop_ug_create(ugd->base,
+                               ugd->ivug_param->width, ugd->ivug_param->height,
+                               ugd->ivug_param->bRatioFix, ugd->ivug_param->filepath);
+               }
+               else
+               {
+                       MSG_IMAGEVIEW_ERROR("Invalid SetAS UG Type:%d", ugd->ivug_param->setas_type);
+                       return NULL;
+               }
+
+               if(ugd->setas_view == NULL && ugd->crop_ug == NULL)
+               {
+                       MSG_IMAGEVIEW_ERROR("SetAS UG creation failed Type:%d", ugd->ivug_param->setas_type);
+                       ugd->bError = true;
+                       ugd->bErrMsg = strdup("Layout Loading Fail");
+                       goto ON_CREATE_ERROR;
+               }
+
+               Evas_Object *layout = NULL;
+
+               if(ugd->setas_view)
+               {
+                       Evas_Object *setasOjbect = ivug_setas_view_object_get(ugd->setas_view);
+                       evas_object_smart_callback_add(setasOjbect, "destroy", _on_setas_view_destroyed, ugd);
+
+                       ugd->navi_bar = ivug_naviframe_add(ugd->base, NULL);
+
+                       evas_object_name_set(ugd->navi_bar, "UG naviframe");
+                       // Layout life cycle is controlled by application explictily.
+                       elm_naviframe_content_preserve_on_pop_set(ugd->navi_bar, EINA_TRUE);
+
+                       Evas_Object *back_btn = ivug_button_add(ugd->navi_bar, "naviframe/end_btn/default",
+                                               IDS_BACK, NULL, _on_setas_view_destroyed, ugd);
+
+                       ugd->navi_it = elm_naviframe_item_push(ugd->navi_bar,
+                                                                       NULL, back_btn, NULL, setasOjbect, NULL);
+
+                       ivug_setas_view_create_menu(ugd->setas_view, ugd->navi_bar, type);
+
+                       //layout = ivug_setas_view_object_get(ugd->setas_view);
+                       layout = ugd->navi_bar;
+               }
+               else if(ugd->crop_ug)
+               {
+                       layout = ivug_crop_ug_get_layout(ugd->crop_ug);
+               }
+
+               elm_object_part_content_set(ugd->base, "elm.swallow.content", layout);  //swallow
+       }
+       else if (ugd->ivug_param->mode == IVUG_MODE_SLIDESHOW || ugd->ivug_param->footsteps)
+       {
+               PERF_CHECK_BEGIN(LVL1, "slideshow_view_create");
+
+               ugd->ss_view = ivug_slideshow_view_create(ugd->base, ugd->ivug_param->mode, ugd->ivug_param->view_by);
+
+               PERF_CHECK_END(LVL1, "slideshow_view_create");
+
+               if (ugd->ss_view == NULL) //set main view.
+               {
+                       MSG_IMAGEVIEW_ERROR("Best View Layout Lading Fail");
+                       ugd->bError = true;
+                       ugd->bErrMsg = strdup("Layout Loading Fail");
+                       goto ON_CREATE_ERROR;
+               }
+
+// Load list.
+               PERF_CHECK_BEGIN(LVL1, "slideshow_view_load_list");
+
+               if ( ivug_slideshow_view_set_list(ugd->ss_view, ugd->ivug_param) == false)
+               {
+                       MSG_IMAGEVIEW_ERROR("Cannot load media list for bestview.");
+                       ugd->bError = true;
+                       ugd->bErrMsg = strdup(IDS_UNABLE_TO_OPEN_FILE);
+                       goto ON_CREATE_ERROR;
+               }
+
+               Evas_Object *layout = ivug_slideshow_view_object_get(ugd->ss_view);
+
+               elm_object_part_content_set(ugd->base, "elm.swallow.content", layout);  //swallow
+
+               PERF_CHECK_END(LVL1, "slideshow_view_load_list");
+
+       }
+       else
+       {
+               PERF_CHECK_BEGIN(LVL1, "main_view_create");
+
+               ugd->main_view = ivug_main_view_create(ugd->base, ugd->ivug_param->mode, ugd->ivug_param->view_by);
+
+               PERF_CHECK_END(LVL1, "main_view_create");
+
+               if (ugd->main_view == NULL)     //set main view.
+               {
+                       MSG_IMAGEVIEW_ERROR("Main View Layout Loading Fail");
+                       ugd->bError = true;
+                       ugd->bErrMsg = strdup("Layout Loading Fail");
+                       goto ON_CREATE_ERROR;
+               }
+
+// Load list.
+               PERF_CHECK_BEGIN(LVL1, "main_view_set_list");
+
+               if ( ivug_main_view_set_list(ugd->main_view, ugd->ivug_param) == false)
+               {
+                       MSG_IMAGEVIEW_ERROR("Cannot load media list.");
+                       // Need popup?
+                       ugd->bError = true;
+                       ugd->bErrMsg = strdup(IDS_UNABLE_TO_OPEN_FILE);
+                       goto ON_CREATE_ERROR;
+               }
+
+               Evas_Object *layout = ivug_main_view_object_get(ugd->main_view);
+               elm_object_part_content_set(ugd->base, "elm.swallow.content", layout);  //swallow
+
+               PERF_CHECK_END(LVL1, "main_view_set_list");
+       }
+
+       PERF_CHECK_END(LVL0, "On Create");
+
+       PERF_CHECK_BEGIN(LVL0, "On Create -> On Start");
+
+//     evas_object_size_hint_weight_set(ugd->base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       int ux, uy, uw, uh;
+
+       evas_object_geometry_get(ugd->base, &ux, &uy, &uw, &uh);
+
+       MSG_IMAGEVIEW_HIGH("Image Viewer : %s Base(0x%08x) Geometry(%d,%d,%d,%d)", __func__, ugd->base, ux, uy, uw, uh);
+
+       return ugd->base;
+
+ON_CREATE_ERROR:
+       if(ugd->main_view)
+       {
+               ivug_main_view_destroy(ugd->main_view);
+               ugd->main_view = NULL;
+       }
+
+       if (ugd->base == NULL)
+       {
+               ugd->base = elm_layout_add((Evas_Object *)ug_get_window());
+               elm_layout_theme_set(ugd->base, "layout", "application", "default");
+       }
+
+       return ugd->base;
+}
+
+static void on_start(ui_gadget_h ug, service_h service, void *priv)
+{
+       PERF_CHECK_END(LVL0, "On Create -> On Start");
+
+       PERF_CHECK_BEGIN(LVL0, "On Start");
+
+       if (!ug || !priv)
+       {
+               MSG_IMAGEVIEW_ERROR("Invalid UG. UG=0x%08x Priv=0x%08x", ug, priv);
+               return ;
+       }
+
+       struct ug_data *ugd = (struct ug_data *)priv;
+
+       int ux, uy, uw, uh;
+
+       evas_object_geometry_get(ugd->base, &ux, &uy, &uw, &uh);
+
+       MSG_IMAGEVIEW_HIGH("Image Viewer : %s BaseGeometry(%d,%d,%d,%d)", __func__, ux, uy, uw, uh);
+
+       if(ugd->bError == true)
+       {
+               PERF_CHECK_END(LVL0, "On Start");
+               MSG_IMAGEVIEW_ERROR("UG create has ERROR");
+               ivug_timeout_popup_show(ugd->base, _on_timeout_response, ug, IDS_ERROR, ugd->bErrMsg);
+               return;
+       }
+       if ( ugd->ivug_param->mode == IVUG_MODE_SLIDESHOW || ugd->ivug_param->footsteps)
+       {
+               PERF_CHECK_BEGIN(LVL1, "slideshow_view_start");
+               ivug_slideshow_view_start(ugd->ss_view);
+               PERF_CHECK_END(LVL1, "slideshow_view_start");
+       }
+       else if ( ugd->main_view )
+       {
+               PERF_CHECK_BEGIN(LVL1, "main_view_start");
+               ivug_main_view_start(ugd->main_view);
+               PERF_CHECK_END(LVL1, "main_view_start");
+       }
+       else if ( ugd->crop_ug )
+       {
+               ivug_crop_ug_start(ugd->crop_ug);
+       }
+
+
+       PERF_CHECK_END(LVL0, "On Start");
+}
+
+static void on_pause(ui_gadget_h ug, service_h service, void *priv)
+{
+       MSG_IMAGEVIEW_HIGH("Image Viewer : %s", __func__);
+
+       if (!ug || !priv)
+       {
+               MSG_IMAGEVIEW_ERROR("Invalid UG. UG=0x%08x Priv=0x%08x", ug, priv);
+               return ;
+       }
+
+       struct ug_data *ugd = (struct ug_data *)priv;
+
+       if(ugd->ivug_param == NULL)
+       {
+               MSG_IMAGEVIEW_ERROR("UG is destroying");
+               return;
+       }
+
+       if ( ugd->ivug_param->mode == IVUG_MODE_SLIDESHOW || ugd->ivug_param->footsteps)
+       {
+               ivug_slideshow_view_pause(ugd->ss_view);
+       }
+       else if ( ugd->main_view )
+       {
+               ivug_main_view_pause(ugd->main_view);
+       }
+
+}
+
+static void on_resume(ui_gadget_h ug, service_h service, void *priv)
+{
+       MSG_IMAGEVIEW_HIGH("Image Viewer : %s", __func__);
+
+       if (!ug || !priv)
+       {
+               IVUG_DEBUG_MSG("Invalid UG. UG=0x%08x Priv=0x%08x", ug, priv);
+               return ;
+       }
+
+       struct ug_data *ugd = (struct ug_data *)priv;
+
+       if ( ugd->ivug_param->mode == IVUG_MODE_SLIDESHOW || ugd->ivug_param->footsteps)
+       {
+               ivug_slideshow_view_resume(ugd->ss_view);
+       }
+       else if ( ugd->main_view )
+       {
+               ivug_main_view_resume(ugd->main_view);
+       }
+
+}
+
+static void on_destroy(ui_gadget_h ug, service_h service, void *priv)
+{
+       MSG_IMAGEVIEW_HIGH("Image Viewer : %s(0x%08x) UG=0x%08x", __func__, on_destroy, ug);
+
+       PERF_CHECK_BEGIN(LVL0, "On Destroy");
+
+       if (!ug || !priv)
+       {
+               MSG_IMAGEVIEW_ERROR("Invalid UG. UG=0x%08x Priv=0x%08x", ug, priv);
+               return ;
+       }
+
+       struct ug_data *ugd = (struct ug_data *)priv;
+
+#ifdef TRACE_RENDER
+       evas_event_callback_del_full(evas_object_evas_get(ugd->base), EVAS_CALLBACK_RENDER_PRE, _on_render_pre, ugd);
+       evas_event_callback_del_full(evas_object_evas_get(ugd->base), EVAS_CALLBACK_RENDER_POST, _on_render_post, ugd);
+#endif
+
+       MSG_IMAGEVIEW_HIGH("On Destroy : ug=0x%08x", ug);
+
+       int ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, _on_mmc_state_changed);
+       if ( ret == -1 )
+       {
+               MSG_MAIN_ERROR("Unegister %s is failed", VCONFKEY_SYSMAN_MMC_STATUS);
+       }
+
+       if(ugd->bErrMsg)
+       {
+               free(ugd->bErrMsg);
+               ugd->bErrMsg = NULL;
+       }
+
+       if(ugd->setas_view)
+       {
+               PERF_CHECK_BEGIN(LVL1, "SetAsView");
+               ivug_setas_view_destroy(ugd->setas_view);
+               ugd->setas_view = NULL;
+               PERF_CHECK_END(LVL1, "SetAsView");
+       }
+
+       if(ugd->crop_ug)
+       {
+               ivug_crop_ug_destroy(ugd->crop_ug);
+               ugd->crop_ug = NULL;
+       }
+       //destroy main view.
+       if ( ugd->main_view )
+       {
+               PERF_CHECK_BEGIN(LVL1, "MainView");
+               ivug_main_view_destroy(ugd->main_view);
+               ugd->main_view = NULL;
+               PERF_CHECK_END(LVL1, "MainView");
+       }
+
+       if ( ugd->ss_view )
+       {
+               PERF_CHECK_BEGIN(LVL1, "SlideShowView");
+               ivug_slideshow_view_destroy(ugd->ss_view);
+               ugd->ss_view = NULL;
+               PERF_CHECK_END(LVL1, "SlideShowView");
+       }
+       //delete param.
+       if(ugd->ivug_param)
+       {
+               ivug_param_delete(ugd->ivug_param);
+               ugd->ivug_param = NULL;
+       }
+
+       //finalize data
+       PERF_CHECK_BEGIN(LVL1, "Context");
+       if ( !ivug_context_deinit(ug))
+       {
+               MSG_IMAGEVIEW_ERROR("ivug_main_deinit failed");
+       }
+       PERF_CHECK_END(LVL1, "Context");
+
+       if (ugd->base)
+       {
+               PERF_CHECK_BEGIN(LVL1, "Base layout");
+               evas_object_del(ugd->base);
+               ugd->base = NULL;
+               PERF_CHECK_END(LVL1, "Base layout");
+       }
+
+       MSG_IMAGEVIEW_HIGH("Destroyed ug");
+
+       PERF_CHECK_END(LVL0, "On Destroy");
+}
+
+static bool _data_print(service_h service, const char *key, void *user_data)
+{
+       char *value;
+
+       service_get_extra_data(service, key, &value);
+
+       MSG_IVUG_HIGH("  %s : %s", key, value);
+
+       free(value);
+
+       return true;
+}
+
+static void on_message(ui_gadget_h ug, service_h msg, service_h service, void *priv)
+{
+       MSG_IMAGEVIEW_HIGH("Image Viewer : %s UG=0x%08x", __func__, ug);        //on message
+
+       if (!ug || !priv)
+       {
+               MSG_IMAGEVIEW_ERROR("Invalid UG. UG=0x%08x Priv=0x%08x", ug, priv);
+               return;
+       }
+
+       int ret = service_foreach_extra_data(msg, _data_print, NULL);
+
+       if(SERVICE_ERROR_NONE != ret)
+       {
+               MSG_IVUG_ERROR("service_foreach_extra_data ERROR");
+       }
+
+       struct ug_data *ugd = (struct ug_data *)priv;
+
+       //ivug_msg_type msg_type = IVUG_MSG_NONE;
+
+       if(ugd->main_view == NULL)
+       {
+               MSG_IMAGEVIEW_ERROR("main view is NULL");
+               return;
+       }
+
+       ivug_callback_call(gGetCallbackHandle(), msg, NULL, NULL);
+
+       return;
+}
+
+static void on_event(ui_gadget_h ug, enum ug_event event, service_h service, void *priv)
+{
+       if (!ug || !priv)
+       {
+               MSG_IMAGEVIEW_ERROR("Invalid UG. UG=0x%08x Priv=0x%08x", ug, priv);
+               return;
+       }
+       MSG_IMAGEVIEW_HIGH("Image Viewer : %s UG=0x%08x", __func__, ug);        //on message
+
+       switch (event) {
+       case UG_EVENT_LOW_MEMORY:
+               MSG_IMAGEVIEW_HIGH("Get Event : Low Memory");
+               break;
+       case UG_EVENT_LOW_BATTERY:
+               MSG_IMAGEVIEW_HIGH("Get Event : Low battery");
+               break;
+       case UG_EVENT_LANG_CHANGE:
+               MSG_IMAGEVIEW_HIGH("Get Event : Language changed");
+               break;
+
+       case UG_EVENT_ROTATE_PORTRAIT:
+       case UG_EVENT_ROTATE_LANDSCAPE:
+       case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN:
+       case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN:
+               // Rotate event is not used now.. plz, use only resized callback.
+               break;
+
+       default:
+               MSG_IMAGEVIEW_ERROR("Unknown event type : %d", event);
+               break;
+       }
+}
+
+#if 0
+#include <dlfcn.h>
+#include <stdio.h>
+
+#include <sys/time.h>
+
+static int __load(int argc, char **argv)
+{
+
+       void *handle = NULL;
+
+       struct timeval start_point, end_point;
+
+       double operating_time;
+
+       gettimeofday(&start_point, NULL);
+
+       handle = dlopen(argv[1], RTLD_LAZY );
+
+       gettimeofday(&end_point, NULL);
+
+       operating_time = (double)(end_point.tv_sec)+(double)(end_point.tv_usec)/1000000.0-(double)(start_point.tv_sec)-(double)(start_point.tv_usec)/1000000.0;
+
+       printf("Dlopen(%s) %f usec\n",argv[1], operating_time);
+
+       if (handle == NULL)
+       {
+               printf("Cannot open : %s", argv[1]);
+               return -1;
+       }
+
+//     dlclose(handle);
+
+       return 0;
+}
+#endif
+
+extern "C" UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops)
+{
+       struct ug_data *ugd;
+
+       MSG_IMAGEVIEW_HIGH("UG_MODULE_INIT. Ver=12.0");
+
+       if (!ops)
+       {
+               MSG_IMAGEVIEW_ERROR("OPS Pointer is NULL");
+               return -1;
+       }
+
+       ugd = (struct ug_data *)calloc(1, sizeof(struct ug_data));      //alloc ug_data memory
+       if (!ugd)
+       {
+               MSG_IMAGEVIEW_ERROR("Cannot allocate memory.");
+               return -1;
+       }
+
+       IV_PERF_INIT();
+
+       ops->create = on_create;
+       ops->start = on_start;
+       ops->pause = on_pause;
+       ops->resume = on_resume;
+       ops->destroy = on_destroy;
+       ops->message = on_message;
+       ops->event = on_event;
+       ops->priv = ugd;
+       ops->opt = UG_OPT_INDICATOR_ENABLE;
+
+       PERF_CHECK_BEGIN(LVL0, "UG_MODULE_INIT -> On Create");
+
+#if 0
+       char *name[] = {
+               "abc1",
+               "/usr/ug/lib/libug-image-viewer-efl.so",
+       };
+
+       __load(2, name);
+
+#endif
+
+       return 0;
+}
+
+extern "C" UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops)
+{
+       struct ug_data *ugd;
+       if (!ops)
+       {
+               MSG_IMAGEVIEW_ERROR("OPS Pointer is NULL");
+               return;
+       }
+
+       ugd = (struct ug_data *)ops->priv;
+
+       if (ugd)
+       {
+               free(ugd);
+       }
+
+       MSG_IMAGEVIEW_HIGH("UG_MODULE_EXIT");
+
+#ifdef TA_SAVETO_FILE
+       FILE *fp = NULL;
+
+       fp = fopen(DATADIR"/"PACKAGE"/TimeAnal", "a");
+
+       if ( fp != NULL )
+       {
+               PERF_SHOW_RESULT(fp);
+
+               fclose(fp);
+       }
+       else
+       {
+               MSG_IMAGEVIEW_HIGH("Cannot open file : %s", DATADIR"/"PACKAGE"/TimeAnal");
+       }
+#else
+       PERF_SHOW_RESULT(stderr);
+#endif
+
+       IV_PERF_DEINIT();
+
+}
+
+
+#define _CONSTRUCTOR __attribute__ ((constructor))
+#define _DESTRUCTOR __attribute__ ((destructor))
+
+_CONSTRUCTOR void _DLLInit(void)
+{
+       printf("Image Viewer - Called constructor\n");
+       MSG_IMAGEVIEW_HIGH("Image Viewer - Called constructor");
+}
+
+_DESTRUCTOR void _DLLExit(void)
+{
+       printf("Image Viewer - Called destructor\n");
+       MSG_IMAGEVIEW_HIGH("Image Viewer - Called destructor");
+}
+
+
+int main()
+{
+/*     For detecting undefined symbol */
+       return -1;
+}
+
old mode 100755 (executable)
new mode 100644 (file)
index 7a20369..dfa76e1
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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>
@@ -25,6 +25,7 @@
 #include "ivug-context.h"
 #include "ivug-util.h"
 #include "ivug-selectioninfo.h"
+#include "ivug-db.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\r
-\r
-#define CROP_EDJ_FILE EDJ_PATH"/ivug-crop-view.edj"\r
-\r
-#define CONTROL_ICON_DIRECTORY_PATH IMAGE_PATH"/01_Control icon"\r
-#define ICON_PATH_SAVE                         CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_save.png"\r
-#define ICON_PATH_PREV                         CONTROL_ICON_DIRECTORY_PATH"/00_winset_btn_prev.png"\r
+#define EDJ_PATH PREFIX"/res/edje/"PACKAGE
+
+#define CROP_EDJ_FILE EDJ_PATH"/ivug-crop-view.edj"
+
+#define CONTROL_ICON_DIRECTORY_PATH IMAGE_PATH"/01_Control icon"
+#define ICON_PATH_SAVE                         CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_save.png"
+#define ICON_PATH_PREV                         CONTROL_ICON_DIRECTORY_PATH"/00_winset_btn_prev.png"
 
 static void _on_layout_resized(void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
@@ -46,13 +47,16 @@ static void _on_layout_resized(void *data, Evas *e, Evas_Object *obj, void *even
        ///////////////////////////////////////////////////////////////////
        int org_x, org_y, org_w, org_h;
 
-       ivug_image_region_get(pCropView->photocam, &org_x, &org_y, &org_w, &org_h);
+       MSG_MED("prev_x=%d, prev_y=%d, prev_w=%d, prev_h=%d", pCropView->prev_x, pCropView->prev_y, pCropView->prev_w, pCropView->prev_h);
+
+       org_x = pCropView->prev_x;
+       org_y = pCropView->prev_y;
+       org_w = pCropView->prev_w;
+       org_h = pCropView->prev_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);
 
@@ -116,26 +120,38 @@ static void _on_layout_resized(void *data, Evas *e, Evas_Object *obj, void *even
        MSG_MED("sx=%d, sy=%d, sw=%d, sh=%d", sx, sy, sw, sh);
 
        ivug_scissorbox_region_set(pCropView->cropbox, sx, sy, sw, sh);
+
+       ivug_image_region_get(pCropView->photocam, &org_x, &org_y, &org_w, &org_h);
+
+       MSG_MED("org_x=%d, org_y=%d, org_w=%d, org_h=%d", org_x, org_y, org_w, org_h);
+
+       pCropView->prev_x = org_x;
+       pCropView->prev_y = org_y;
+       pCropView->prev_w = org_w;
+       pCropView->prev_h = org_h;
 }
 
 void  _on_test(void *data, Evas_Object *obj, void *event_info)
 {
        MSG_HIGH("Test signal received");
 }
-\r
-static Eina_Bool _on_crop_timer_expired(void *data)\r
-{\r
-       IvugCropView *pCropView = static_cast<IvugCropView *>(data);\r
-\r
-       pCropView->timer = NULL;\r
-\r
-       elm_object_item_disabled_set(pCropView->btn_ok, EINA_FALSE);\r
-
-       MSG_HIGH("Image preloaded");\r
-\r
+
+void  _on_preloaded(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+
+       IvugCropView *pCropView = static_cast<IvugCropView *>(data);
+
+       MSG_HIGH("Image preloaded");
+
        int x, y, w, h;
        ivug_image_region_get(pCropView->photocam,  &x, &y, &w, &h);
 
+       pCropView->prev_x = x;
+       pCropView->prev_y = y;
+       pCropView->prev_w = w;
+       pCropView->prev_h = h;
+
        // Check error!.
 
        MSG_HIGH("Photcam image Geometry : %d,%d,%d,%d", x, y, w, h);
@@ -162,26 +178,17 @@ static Eina_Bool _on_crop_timer_expired(void *data)
 
        ivug_scissorbox_region_set(pCropView->cropbox, x + (w - nW) / 2, y + (h - nH) / 2, nW, nH);
 
-       pCropView->notify = ivug_notify_create(pCropView->layout, IDS_CROP_NOTIFY);\r
-\r
-       return ECORE_CALLBACK_CANCEL;\r
-}\r
-\r
-void  _on_preloaded(void *data, Evas_Object *obj, void *event_info)
-{
-       IV_ASSERT(data != NULL);
+       Evas_Object *object = elm_object_part_content_unset(pCropView->layout, "thumbnail");
+       if(object != NULL)
+       {
+               evas_object_del(object);
+       }
 
-       IvugCropView *pCropView = static_cast<IvugCropView *>(data);
+       pCropView->notify = ivug_notify_static_create(pCropView->contents_area, IDS_CROP_NOTIFY, NOTIFY_ALIGN_BOTTOM);
+
+       elm_object_disabled_set(pCropView->btn_ok, EINA_FALSE);
 
-       MSG_HIGH("Image preloaded");\r
-\r
-       double zoom = ivug_image_zoom_get(pCropView->photocam);\r
-\r
-       MSG_HIGH("zoom = %g", zoom);\r
-\r
-       pCropView->timer = ecore_timer_add(0.5, _on_crop_timer_expired, data);\r
-\r
-       return;\r
+       evas_object_show(pCropView->photocam);
 }
 
 static void
@@ -201,7 +208,7 @@ _ivug_crop_view_response_cb( void *data, Evas_Object *obj, void *event_info )
 
        evas_object_smart_callback_call(pCropView->layout, "ok,clicked", pCropView->result_path);
 
-       ivug_crop_view_destroy(pCropView);
+       //ivug_crop_view_destroy(pCropView);
 }
 
 
@@ -224,27 +231,29 @@ _show_exit_popup( Evas_Object *parent, const char *title, const char *desc, void
        return style1_popup;
 }
 
-static void  _on_btn_save(void *data, Evas_Object *obj, void *event_info)
+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, "jpg");\r
+       media_handle m_handle = NULL;
+
+       char* save_file = ivug_generate_file_name(pCropView->file_path, "jpg"); //evas encoder support jpg, png only
+
        if(save_file == NULL)
        {
-               MSG_SETAS_ERROR("Cannot generate file name");
+               MSG_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
+       ivug_scissorbox_region_get(pCropView->cropbox, &rx, &ry, &rw, &rh);             // Get LCD
        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);
@@ -277,9 +286,20 @@ static void  _on_btn_save(void *data, Evas_Object *obj, void *event_info)
                }
        }
 
+       m_handle = ivug_db_insert_file_to_DB(save_file);
+       if(m_handle == NULL)
+       {
+               MSG_ERROR("ivug_db_insert_file_to_DB failed %s", save_file);
+               goto SAVE_FAILED;
+       }
+       else
+       {
+               ivug_db_destroy_file_handle(m_handle);
+       }
+
        pCropView->result_path = strdup(save_file);
 
-       _show_exit_popup(pCropView->layout, IDS_CROP, IDS_SUCCESS, data);
+       _show_exit_popup(pCropView->layout, IDS_CROP, IDS_SUCCESS, (void *)pCropView);
 
        evas_object_del(ret_image);
        free(save_file);
@@ -287,7 +307,7 @@ static void  _on_btn_save(void *data, Evas_Object *obj, void *event_info)
        return;
 
 SAVE_FAILED:
-       _show_exit_popup(pCropView->layout, IDS_CROP, IDS_FAILED, data);
+       _show_exit_popup(pCropView->layout, IDS_CROP, IDS_FAILED, (void *)pCropView);
 
        if(ret_image)
                evas_object_del(ret_image);
@@ -297,7 +317,7 @@ SAVE_FAILED:
        return;
 }
 
-static void  _on_btn_cancel(void *data, Evas_Object *obj, void *event_info)
+static void _on_btn_cancel(void *data, Evas_Object *obj, void *event_info)
 {
        IV_ASSERT(data != NULL);
 
@@ -328,18 +348,21 @@ static Evas_Event_Flags _finger_tap_end(void *data , void *event_info)
                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->btn_layout), "elm,state,hide", "event");\r
        }
        else
        {
                MSG_HIGH("Show");
-               elm_win_indicator_mode_set((Evas_Object*)ug_get_window(), ELM_WIN_INDICATOR_SHOW);
+               if(gIsDesktopMode() == false)
+               {
+                       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->btn_layout), "elm,state,show", "event");\r
        }
 
        pCropView->bShowMenu = !pCropView->bShowMenu;
 
+       evas_object_smart_callback_call(pCropView->layout, "clicked", (void *)pCropView->bShowMenu);
+
        return EVAS_EVENT_FLAG_NONE;
 }
 
@@ -350,7 +373,7 @@ void _add_gesture_layer(Evas_Object *parent, IvugCropView *pCropView)
        Evas_Object *gesture = pCropView->gesture;
 
        gesture = elm_gesture_layer_add(parent);
-       elm_gesture_layer_hold_events_set(gesture, EINA_TRUE);
+       elm_gesture_layer_hold_events_set(gesture, EINA_FALSE);
 
        elm_gesture_layer_cb_set(gesture, ELM_GESTURE_N_TAPS, ELM_GESTURE_STATE_END, _finger_tap_end, (void *)pCropView);
 
@@ -362,23 +385,23 @@ void _add_gesture_layer(Evas_Object *parent, IvugCropView *pCropView)
        evas_object_name_set(gesture, "Crop:Getsture");
 }
 
+
 IvugCropView *ivug_crop_view_create(Evas_Object *parent)
 {
        IvugCropView *pCropView = (IvugCropView *)calloc(1, sizeof(IvugCropView));
 
        Evas_Object *layout;
 
-       layout = EFL::create_layout(parent, CROP_EDJ_FILE, "crop_view");\r
+       layout = EFL::create_layout(parent, CROP_EDJ_FILE, "crop_view");
 
        if ( layout == NULL )
        {
                MSG_ERROR("Cannot create crop view");
-               free(pCropView);\r
+               free(pCropView);
                return NULL;
        }
 
        pCropView->layout = layout;
-       evas_object_event_callback_add(layout,  EVAS_CALLBACK_RESIZE, _on_layout_resized, pCropView );
        evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND );
 
        pCropView->photocam  = ivug_image_create(layout);
@@ -389,52 +412,35 @@ IvugCropView *ivug_crop_view_create(Evas_Object *parent)
        elm_object_part_content_set(layout, "photocam", pCropView->photocam );
 
        pCropView->bShowMenu = true;
-       _add_gesture_layer(layout, pCropView);
+       //_add_gesture_layer(layout, pCropView);
 
        pCropView->cropbox = ivug_scissorbox_add(layout);
        ivug_scissorbox_type_set(pCropView->cropbox, SCISSOR_BOX_TYPE_2);
 
        elm_object_part_content_set(layout, "scissorbox", pCropView->cropbox);
 
-       Evas_Object *controlbar = ivug_controlbar_add(pCropView->layout, "default");\r
-       Elm_Object_Item *item[4];\r
-\r
-       item[0] = elm_toolbar_item_append(controlbar, ICON_PATH_SAVE, NULL, _on_btn_save, (void *)pCropView);\r
-       item[1] = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL);\r
-       item[2] = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL);\r
-       item[3] = elm_toolbar_item_append(controlbar, ICON_PATH_PREV, NULL, _on_btn_cancel, (void *)pCropView);\r
-\r
-       pCropView->btn_layout = ivug_layout_add(pCropView->layout , CROP_EDJ_FILE, "crop_view_btn");\r
-       if ( pCropView->btn_layout == NULL )\r
-       {\r
-               MSG_SETAS_ERROR("Cannot create btn_layout.");\r
-               evas_object_del(pCropView->layout);\r
-               free(pCropView);\r
-               return NULL;\r
-       }\r
-\r
-       pCropView->btn_ok = item[0];\r
-       elm_object_item_disabled_set(pCropView->btn_ok, EINA_TRUE);\r
-\r
-       elm_object_part_content_set(pCropView->btn_layout, "controlbar", controlbar);\r
-\r
-       evas_object_smart_member_add(pCropView->btn_layout, pCropView->layout);\r
-\r
-       evas_object_show(pCropView->btn_layout);\r
+       evas_object_event_callback_add(layout,  EVAS_CALLBACK_RESIZE, _on_layout_resized, pCropView );
 
        MSG_HIGH("Create CropView");
 
-       evas_object_smart_callback_add(layout, "test", _on_test, NULL);\r
-
-       elm_win_resize_object_add(gGetCurrentWindow(), layout);
+       evas_object_smart_callback_add(layout, "test", _on_test, NULL);
 
        evas_object_show(layout);
 
        pCropView->w = 0;
        pCropView->h = 0;
 
-       return pCropView;
 
+       pCropView->contents_area = ivug_default_layout_add(parent);
+       evas_object_name_set(pCropView->contents_area, "contets_area");
+       if ( pCropView->contents_area == NULL )
+       {
+               MSG_SETAS_ERROR("Cannot create contets_area.");
+       }
+
+       elm_object_part_content_set(pCropView->layout, "crop.contents", pCropView->contents_area);
+
+       return pCropView;
 }
 
 bool ivug_crop_view_box_size_set(IvugCropView *pCropView, int w, int h)
@@ -462,6 +468,8 @@ bool ivug_crop_view_file_set(IvugCropView *pCropView, const char *file)
 
        Evas_Load_Error err;
 
+       Evas_Object *thumbnail = NULL;
+
        if ( pCropView->file_path )
        {
                free(pCropView->file_path);
@@ -469,7 +477,7 @@ bool ivug_crop_view_file_set(IvugCropView *pCropView, const char *file)
 
        pCropView->file_path = strdup(file);
 
-       err = ivug_image_file_set(pCropView->photocam, file, NULL);
+       err = ivug_image_file_set(pCropView->photocam, file, "noanim");
        evas_object_smart_callback_call(pCropView->layout, "test", NULL);
 
        return true;
@@ -479,27 +487,66 @@ void ivug_crop_view_destroy(IvugCropView *pCropView)
 {
        IV_ASSERT(pCropView != NULL);
 
-       MSG_HIGH("Destroy CropView");\r
-\r
-       if(pCropView->timer)\r
-       {\r
-               ecore_timer_del(pCropView->timer);\r
-               pCropView->timer = NULL;\r
-       }\r
+       MSG_HIGH("Destroy CropView");
+
 
        if ( pCropView->file_path )
+       {
                free(pCropView->file_path);
+               pCropView->file_path = NULL;
+       }
 
        if ( pCropView->result_path)
-               free(pCropView->result_path);\r
-\r
-       if ( pCropView->btn_layout )\r
-               evas_object_del(pCropView->btn_layout);\r
+       {
+               free(pCropView->result_path);
+               pCropView->result_path = NULL;
+       }
+
+       if ( pCropView->cropbox)
+       {
+               evas_object_del(pCropView->cropbox);
+               pCropView->cropbox = NULL;
+       }
+
+       if ( pCropView->gesture)
+       {
+               evas_object_del(pCropView->gesture);
+               pCropView->gesture = NULL;
+       }
+
+       if ( pCropView->photocam )
+       {
+               evas_object_del(pCropView->photocam);
+               pCropView->photocam = NULL;
+       }
+
+       if ( pCropView->contents_area)
+       {
+               evas_object_del(pCropView->contents_area);
+               pCropView->contents_area = NULL;
+       }
+
+       if(pCropView->btn_back)
+       {
+               evas_object_del(pCropView->btn_back);
+               pCropView->btn_back = NULL;
+       }
+
+       if ( pCropView->notify)
+       {
+               evas_object_del(pCropView->notify);
+               pCropView->notify = NULL;
+       }
 
        if ( pCropView->layout )
+       {
                evas_object_del(pCropView->layout);
+               pCropView->layout = NULL;
+       }
 
-       delete pCropView;
+       free(pCropView);
+
+       pCropView = NULL;
 }
 
 Evas_Object *ivug_crop_view_get_object(IvugCropView *pCropView)
@@ -509,5 +556,15 @@ Evas_Object *ivug_crop_view_get_object(IvugCropView *pCropView)
        return pCropView->layout;
 }
 
+void ivug_crop_view_create_menu(IvugCropView *pCropView, Evas_Object *navi_bar)
+{
+       pCropView->btn_ok = ivug_button_add(navi_bar, "naviframe/toolbar/default",
+                                                               IDS_SAVE, NULL, _on_btn_save, (void *)pCropView);
+
+       Elm_Object_Item *navi_it = elm_naviframe_top_item_get(navi_bar);
+       elm_object_item_part_content_set(navi_it, "toolbar_button1", pCropView->btn_ok);
+
+       elm_object_disabled_set(pCropView->btn_ok, EINA_TRUE);
+}
 
 
old mode 100755 (executable)
new mode 100644 (file)
index dc2c704..223067f
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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>
 
 #include "ivug-details-view.h"
 #include "ivug-detail-info.h"
 
-#include "ivug-drm.h"
+#include "ivug-drm-common.h"
 
 #define DETAILS_EDJ_FILE EDJ_PATH"/ivug-details.edj"
 
-#define FILE_DETILES_NUM                               6
-#define FILE_EXIF_INFO_NUM                             2
-
-
 /*
        this structure represent one item in genlist.
 */
 typedef struct
 {
        char *m_ItemName;
+       char *m_ItemContents;
+       exif_info_type_e type;
        Ivug_DetailsView *pDetailsView;
 } ivug_file_list_item;
 
 
-static void _ivug_details_free_file_info(ivug_file_info_t * const pFileInfo)
-{
-       if(pFileInfo->filename)
-       {
-               free(pFileInfo->filename);
-               pFileInfo->filename = NULL;
-       }
-
-       if(pFileInfo->filepath)
-       {
-               free(pFileInfo->filepath);
-               pFileInfo->filepath = NULL;
-       }
-
-       if(pFileInfo->filesize)
-       {
-               free(pFileInfo->filesize);
-               pFileInfo->filesize = NULL;
-       }
-
-       if(pFileInfo->file_ext)
-       {
-               free(pFileInfo->file_ext);
-               pFileInfo->file_ext = NULL;
-       }
-
-       if(pFileInfo->file_location)
-       {
-               free(pFileInfo->file_location);
-               pFileInfo->file_location = NULL;
-       }
-
-       if(pFileInfo->create_date)
-       {
-               free(pFileInfo->create_date);
-               pFileInfo->create_date = NULL;
-       }
-
-       if(pFileInfo->resolution)
-       {
-               free(pFileInfo->resolution);
-               pFileInfo->resolution = NULL;
-       }
-
-       if(pFileInfo->latitude)
-       {
-               free(pFileInfo->latitude);
-               pFileInfo->latitude = NULL;
-       }
-
-       if(pFileInfo->longitude)
-       {
-               free(pFileInfo->longitude);
-               pFileInfo->longitude = NULL;
-       }
-
-       if(pFileInfo->vendor)
-       {
-               free(pFileInfo->vendor);
-               pFileInfo->vendor = NULL;
-       }
-
-       if(pFileInfo->forwarding)
-       {
-               free(pFileInfo->forwarding);
-               pFileInfo->forwarding = NULL;
-       }
-
-       if(pFileInfo->type)
-       {
-               free(pFileInfo->type);
-               pFileInfo->type = NULL;
-
-       }
-
-}
-
 static char *
 _ivug_details_gl_label_get(void *data, Evas_Object *obj, const char *part )
 {
@@ -129,7 +50,7 @@ _ivug_details_gl_label_get(void *data, Evas_Object *obj, const char *part )
        Ivug_DetailsView *pDetailsView = (Ivug_DetailsView *)params->pDetailsView;
        ivug_retvm_if(pDetailsView == NULL, NULL, "pDetailsView is NULL");
 
-       //MSG_DETAIL_HIGH("m_ItemName is %s", params->m_ItemName);
+       //MSG_DETAIL_WARN("m_ItemName is %s", params->m_ItemName);
 
        if(strcmp(part, "elm.text.1") == 0)
        {
@@ -145,62 +66,8 @@ _ivug_details_gl_label_get(void *data, Evas_Object *obj, const char *part )
        }
        else if(strcmp(part, "elm.text.2")==0)
        {
-               char *text2 = NULL;
-               if(strncmp(IDS_NAME, params->m_ItemName, strlen(IDS_NAME)) == 0)
-               {
-                       text2 = pDetailsView->file_Info.filename;
-               }
-               else if(strncmp(IDS_SIZE, params->m_ItemName, strlen(IDS_SIZE)) == 0)
-               {
-                       text2 = pDetailsView->file_Info.filesize;
-               }
-               else if(strncmp(IDS_FORMAT, params->m_ItemName, strlen(IDS_FORMAT)) == 0)
-               {
-                       text2 = pDetailsView->file_Info.file_ext;
-               }
-               else if(strncmp(IDS_RESOLUTION, params->m_ItemName, strlen(IDS_RESOLUTION)) == 0)
-               {
-                       text2 = pDetailsView->file_Info.resolution;
-               }
-               else if(strncmp(IDS_DATE_CREATED, params->m_ItemName, strlen(IDS_DATE_CREATED)) == 0)
-               {
-                       text2 = pDetailsView->file_Info.create_date;
-               }
-               else if(strncmp(IDS_FILE_LOCATION, params->m_ItemName, strlen(IDS_FILE_LOCATION)) == 0)
-               {
-                       text2 = pDetailsView->file_Info.file_location;
-               }
-               else if(strncmp(IDS_LATITUDE, params->m_ItemName, strlen(IDS_LATITUDE)) == 0)
-               {
-                       text2 = pDetailsView->file_Info.latitude;
-               }
-               else if(strncmp(IDS_LONGITUDE, params->m_ItemName, strlen(IDS_LONGITUDE)) == 0)
-               {
-                       text2 = pDetailsView->file_Info.longitude;
-               }
-               else if(strncmp(IDS_VENDOR, params->m_ItemName, strlen(IDS_VENDOR)) == 0)
-               {
-                       text2 = pDetailsView->file_Info.vendor;
-               }
-               else if(strncmp(IDS_FORWARDING, params->m_ItemName, strlen(IDS_FORWARDING)) == 0)
-               {
-                       text2 = pDetailsView->file_Info.forwarding;
-               }
-               else if(strncmp(IDS_AVAILABLE_USES, params->m_ItemName, strlen(IDS_AVAILABLE_USES)) == 0)
-               {
-                       text2 = pDetailsView->file_Info.available_uses;
-               }
-               else if(strncmp(IDS_TYPE, params->m_ItemName, strlen(IDS_TYPE)) == 0)
-               {
-                       text2 = pDetailsView->file_Info.type;
-               }
-               else if(strncmp(IDS_VALIDITY, params->m_ItemName, strlen(IDS_VALIDITY)) == 0)
-               {
-                       text2 = pDetailsView->file_Info.validity;
-               }
-
-               if (text2) {
-                       return elm_entry_utf8_to_markup(text2);
+               if (params->m_ItemContents) {
+                       return elm_entry_utf8_to_markup(params->m_ItemContents);
                } else {
                        return elm_entry_utf8_to_markup(IDS_UNKNOWN);
                }
@@ -223,6 +90,16 @@ _ivug_details_gl_del(void *data, Evas_Object *obj )
        ivug_retm_if(params == NULL, "params is NULL");
        if(params)
        {
+               if(params->m_ItemName)
+               {
+                       free(params->m_ItemName);
+                       params->m_ItemName = NULL;
+               }
+               if(params->m_ItemContents)
+               {
+                       free(params->m_ItemContents);
+                       params->m_ItemContents = NULL;
+               }
                free(params);
                params = NULL;
        }
@@ -243,74 +120,15 @@ _ivug_details_gl_label_get_title(void *data, Evas_Object *obj,const char *part )
        return NULL;
 }
 
-static void _on_rename_view_response(ivug_name_response resp, const char *str, void *pClientData)\r
-{\r
-       Ivug_DetailsView *pDetailsView = (Ivug_DetailsView *)pClientData;\r
-\r
-       pDetailsView->pAddTagView = NULL;       // Will removed in add tag view.\r
-\r
-       if(resp != NAME_VIEW_RESPONSE_OK)\r
-       {\r
-               MSG_DETAIL_HIGH("rename is canceled");\r
-               return;\r
-       }\r
-\r
-       Media_Data *mdata = ivug_medialist_get_data(pDetailsView->mitem);\r
-       const char *old_fullpath = mdata->filepath;\r
-       char *old_dir = ecore_file_dir_get(old_fullpath);\r
-       char *ext = ivug_fileinfo_get_file_extension(old_fullpath);\r
-\r
-       char new_fullpath[IVUG_MAX_FILE_PATH_LEN] = {0,};\r
-       snprintf(new_fullpath, sizeof(new_fullpath),"%s/%s.%s", old_dir, str, ext);\r
-\r
-       if(ivug_db_rename(mdata->m_handle, new_fullpath) == false)\r
-       {\r
-               MSG_DETAIL_ERROR("ivug_rename_file failed");\r
-       }\r
-       else\r
-       {\r
-               if(mdata->filepath == NULL\r
-                       || mdata->thumbnail_path == NULL)\r
-               {\r
-                       MSG_DETAIL_ERROR("Data is NULL");\r
-                       return;\r
-               }\r
-\r
-               ivug_rename_file(old_fullpath, new_fullpath);\r
-\r
-               ivug_db_destroy_file_handle(mdata->m_handle);\r
-               mdata->m_handle = ivug_db_get_file_handle_from_media_id(mdata->mediaID);\r
-\r
-               MSG_DETAIL_HIGH("Rename %s -> %s", old_fullpath, new_fullpath);\r
-               free(mdata->filepath);\r
-               mdata->filepath = strdup(new_fullpath);\r
-\r
-               free(mdata->thumbnail_path);\r
-               mdata->thumbnail_path = ivug_db_get_thumbnail_path(mdata->m_handle);\r
-\r
-               ivug_details_info_set_filename(&pDetailsView->file_Info, new_fullpath);\r
-               ivug_details_info_set_location(&pDetailsView->file_Info, new_fullpath);\r
-\r
-               elm_genlist_realized_items_update(pDetailsView->genlist);\r
-\r
-               evas_object_smart_callback_call(pDetailsView->layout, "renamed", (void *)pDetailsView->mitem);\r
-       }\r
-}\r
-
 static void _rename_button_clicked_cb(void *data, Evas_Object * obj, void *event_info)
 {
        Ivug_DetailsView *pDetailsView = (Ivug_DetailsView *)data;
-       Media_Data *mdata = ivug_medialist_get_data(pDetailsView->mitem);\r
 
        MSG_DETAIL_HIGH("clicked event on Button");
 
-       pDetailsView->pAddTagView = ivug_name_view_create(pDetailsView->layout, IDS_CHANGE_NAME);
-
-       const char *name = ecore_file_strip_ext(ecore_file_file_get(mdata->filepath));
+       evas_object_smart_callback_call(pDetailsView->layout, "rename,clicked", (void *)pDetailsView);
 
-       ivug_name_view_set_entry(pDetailsView->pAddTagView, name);
-
-       ivug_name_view_set_response_callback(pDetailsView->pAddTagView, _on_rename_view_response, (void*)pDetailsView);
+       return;
 }
 
 static Evas_Object *_ivug_details_gl_icon_get_title(void *data, Evas_Object *obj, const char *part)
@@ -322,7 +140,7 @@ static Evas_Object *_ivug_details_gl_icon_get_title(void *data, Evas_Object *obj
        Ivug_DetailsView *pDetailsView = (Ivug_DetailsView *)params->pDetailsView;
        ivug_retvm_if(pDetailsView == NULL, NULL, "pDetailsView is NULL");
 
-       Evas_Object *btn;
+       Evas_Object *btn = NULL;
 
        if (!strcmp(part, "elm.icon") || !strcmp(part, "elm.icon.1")) {
                btn = elm_button_add(pDetailsView->layout);
@@ -366,7 +184,7 @@ _ivug_details_view_genlist_create(Ivug_DetailsView *pDetailsView, Evas_Object *p
 
        // Set item class for dialogue group title
        pDetailsView->title_itc.version = ELM_GENLIST_ITEM_CLASS_VERSION;
-       pDetailsView->title_itc.item_style = "ivug/grouptitle";
+       pDetailsView->title_itc.item_style = "grouptitle";
        pDetailsView->title_itc.func.text_get = _ivug_details_gl_label_get_title;
        pDetailsView->title_itc.func.content_get = NULL;
        pDetailsView->title_itc.func.state_get = NULL;
@@ -376,7 +194,7 @@ _ivug_details_view_genlist_create(Ivug_DetailsView *pDetailsView, Evas_Object *p
 
        // Set item class for dialogue group title with icon
        pDetailsView->multiline_icon_itc.version = ELM_GENLIST_ITEM_CLASS_VERSION;
-       pDetailsView->multiline_icon_itc.item_style = "ivug/multiline/2text.1icon";
+       pDetailsView->multiline_icon_itc.item_style = "ivug/multiline/2text.5icon";
        pDetailsView->multiline_icon_itc.func.text_get = _ivug_details_gl_label_get;
        pDetailsView->multiline_icon_itc.func.content_get = _ivug_details_gl_icon_get_title;
        pDetailsView->multiline_icon_itc.func.state_get = NULL;
@@ -395,31 +213,38 @@ _ivug_details_view_genlist_create(Ivug_DetailsView *pDetailsView, Evas_Object *p
 }
 
 static void
-_ivug_detail_genlist_view_gps_create(Ivug_DetailsView *pDetailsView )
+_ivug_detail_genlist_view_exif_info_create(Ivug_DetailsView *pDetailsView, const char *path, Media_Type stype)
 {
        IV_ASSERT(pDetailsView != NULL);
 
        Evas_Object *genlist = NULL;
        int index = 0;
+       bool ret = false;
 
        Elm_Object_Item *it = NULL;
 
        ivug_file_list_item *m_TempItem = NULL;
 
-       char *m_ItemName[FILE_EXIF_INFO_NUM] = {0,};
-
        genlist = pDetailsView->genlist;
 
-       m_ItemName[0] = IDS_LATITUDE;
-       m_ItemName[1] = IDS_LONGITUDE;
+       char *name = NULL;
+       char *contents = NULL;
 
-       for (index = 0; index < FILE_EXIF_INFO_NUM; index++)
+       for (index = 0; index < EXIF_INFO_MAX; index++)
        {
-               m_TempItem = (ivug_file_list_item *)malloc(sizeof(ivug_file_list_item));
+               ret = ivug_datail_get_exif_info(&name, &contents, path, stype, index);
+               if(ret == false)
+               {
+                       continue;
+               }
+
+               m_TempItem = (ivug_file_list_item *)calloc(1, sizeof(ivug_file_list_item));
                ivug_retm_if(NULL == m_TempItem, "m_TempItem calloc failed");
 
-               m_TempItem->m_ItemName = strdup(m_ItemName[index]);
+               m_TempItem->m_ItemName = name;
+               m_TempItem->m_ItemContents = contents;
                m_TempItem->pDetailsView = pDetailsView;
+
                it = elm_genlist_item_append(genlist, &pDetailsView->multiline_itc, m_TempItem, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
                elm_genlist_item_select_mode_set(it, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
        }
@@ -427,7 +252,7 @@ _ivug_detail_genlist_view_gps_create(Ivug_DetailsView *pDetailsView )
 }
 
 static void
-_ivug_detail_genlist_view_file_view_create(Ivug_DetailsView *pDetailsView)
+_ivug_detail_genlist_view_file_view_create(Ivug_DetailsView *pDetailsView, const char *path, Media_Type stype)
 {
        IV_ASSERT(pDetailsView != NULL);
 
@@ -441,33 +266,37 @@ _ivug_detail_genlist_view_file_view_create(Ivug_DetailsView *pDetailsView)
 
        genlist = pDetailsView->genlist;
 
-       char *m_ItemName[FILE_DETILES_NUM] = {0,};
-
-       m_ItemName[0] = IDS_NAME;
-       m_ItemName[1] = IDS_FORMAT;
-       m_ItemName[2] = IDS_DATE_CREATED;
-       m_ItemName[3] = IDS_SIZE;
-       m_ItemName[4] = IDS_RESOLUTION;
-       m_ItemName[5] = IDS_FILE_LOCATION;
+       char *name = NULL;
+       char *contents = NULL;
+       bool ret = false;
 
        git = elm_genlist_item_append(genlist, &pDetailsView->title_itc, strdup(IDS_DETAILS), NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
        elm_genlist_item_select_mode_set(git, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
-       for (index = 0; index < FILE_DETILES_NUM; index++)
+       for (index = 0; index < FILE_INFO_MAX; index++)
        {
-               if(m_ItemName[index] == NULL)
+               ret = ivug_datail_get_file_info(&name, &contents, path, stype, index);
+               if(ret == false)
                {
                        continue;
                }
 
-               m_TempItem = (ivug_file_list_item *)malloc(sizeof(ivug_file_list_item));
+               m_TempItem = (ivug_file_list_item *)calloc(1, sizeof(ivug_file_list_item));
                if(m_TempItem == NULL)
                {
                        continue;
                }
-               memset(m_TempItem, 0, sizeof(ivug_file_list_item));
 
-               m_TempItem->m_ItemName = strdup(m_ItemName[index]);
+               m_TempItem->m_ItemName = name;
+               if(index == FILE_INFO_NAME)
+               {
+                       pDetailsView->filename = &(m_TempItem->m_ItemContents); // for rename
+               }
+               else if(index == FILE_INFO_FILE_LOCATION)
+               {
+                       pDetailsView->path = &(m_TempItem->m_ItemContents);     // for rename
+               }
+               m_TempItem->m_ItemContents = contents;
                m_TempItem->pDetailsView = pDetailsView;
 
                if(index == 0)  // for rename icon
@@ -483,7 +312,7 @@ _ivug_detail_genlist_view_file_view_create(Ivug_DetailsView *pDetailsView)
 }
 
 static void
-_ivug_detail_genlist_view_drm_create(Ivug_DetailsView *pDetailsView)
+_ivug_detail_genlist_view_drm_create(Ivug_DetailsView *pDetailsView, const char *path, Media_Type stype)
 {
        IV_ASSERT(pDetailsView != NULL);
 
@@ -493,31 +322,31 @@ _ivug_detail_genlist_view_drm_create(Ivug_DetailsView *pDetailsView)
        Elm_Object_Item *it = NULL;
 
        ivug_file_list_item *m_TempItem = NULL;
-       char *m_ItemName[FILE_DETILES_NUM] = {0,};
 
        genlist = pDetailsView->genlist;
 
-       m_ItemName[0] = IDS_VENDOR;
-       m_ItemName[1] = IDS_FORWARDING;
-       m_ItemName[2] = IDS_AVAILABLE_USES;
-       m_ItemName[3] = IDS_TYPE;
-       m_ItemName[4] = IDS_VALIDITY;
+       char *name = NULL;
+       char *contents = NULL;
+       bool ret = false;
 
-       for (index = 0; index < FILE_DETILES_NUM; index++)
+       for (index = 0; index < DRM_INFO_MAX; index++)
        {
-               if(m_ItemName[index] == NULL)
+               name = NULL;
+               contents = NULL;
+               ret = ivug_datail_get_drm_info(&name, &contents, path, stype, index);
+               if(ret == false)
                {
                        continue;
                }
 
-               m_TempItem = (ivug_file_list_item *)malloc(sizeof(ivug_file_list_item));
+               m_TempItem = (ivug_file_list_item *)calloc(1, sizeof(ivug_file_list_item));
                if(m_TempItem == NULL)
                {
                        continue;
                }
-               memset(m_TempItem, 0, sizeof(ivug_file_list_item));
 
-               m_TempItem->m_ItemName = strdup(m_ItemName[index]);
+               m_TempItem->m_ItemName = name;
+               m_TempItem->m_ItemContents = contents;
                m_TempItem->pDetailsView = pDetailsView;
 
                it = elm_genlist_item_append(genlist, &pDetailsView->multiline_itc, m_TempItem, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
@@ -526,58 +355,39 @@ _ivug_detail_genlist_view_drm_create(Ivug_DetailsView *pDetailsView)
 
 }
 
-
 Ivug_DetailsView *
-ivug_details_view_screen_create(Evas_Object *parent, Media_Item *mitem, ivug_view_by view_by)\r
+ivug_details_view_screen_create(Evas_Object *parent, Media_Item *mitem, ivug_view_by view_by)
 {
        ivug_retv_if(!parent, NULL);
-       ivug_retv_if(!mitem, NULL);\r
-\r
-       Media_Data *mdata = ivug_medialist_get_data(mitem);\r
+       ivug_retv_if(!mitem, NULL);
+
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+       ivug_retv_if(!mdata, NULL);
+       ivug_retv_if(!mdata->filepath, NULL);
 
        char *filepath = mdata->filepath;
        Media_Type stype = mdata->slide_type;
 
        Ivug_DetailsView *pDetailsView = (Ivug_DetailsView *)calloc(1, sizeof(Ivug_DetailsView));
-
        if ( pDetailsView == NULL )
        {
                MSG_DETAIL_FATAL("Cannot allocate memory");
                return NULL;
-       }\r
-\r
-       pDetailsView->mitem = mitem;\r
-
-       ivug_details_info_set_file_information(&pDetailsView->file_Info, filepath);
+       }
 
-       ivug_details_info_set_resolution(&pDetailsView->file_Info, filepath, stype);
-       ivug_details_info_set_gps_info(&pDetailsView->file_Info, filepath);
+       pDetailsView->mitem = mitem;
 
-       if(stype == SLIDE_TYPE_STREAMING )              // If remote file
-       {
-               /* Location: show url */
-               ivug_details_info_set_filename(&pDetailsView->file_Info, mdata->fileurl);               // TODO : Check this. how to extract filename from URL????
-               ivug_details_info_set_location(&pDetailsView->file_Info, mdata->fileurl);
-       }
-       else
+       if(view_by == IVUG_VIEW_BY_ALLSHARE)
        {
-               ivug_details_info_set_filename(&pDetailsView->file_Info, filepath);
-               ivug_details_info_set_location(&pDetailsView->file_Info, filepath);
-       }
 
-       if(mdata->bIsDRMContent)
-       {
-               ivug_details_info_set_drm_info(&pDetailsView->file_Info, filepath);
        }
 
-
 // Creating GUI
        pDetailsView->evas = evas_object_evas_get(parent);
 
 //layout
-       pDetailsView->layout = elm_layout_add(parent);
-       elm_layout_file_set(pDetailsView->layout, DETAILS_EDJ_FILE, "details_view");
 
+       pDetailsView->layout = ivug_layout_add2(parent, DETAILS_EDJ_FILE, "details_view");
        if(pDetailsView->layout == NULL)
        {
                free(pDetailsView);
@@ -603,16 +413,23 @@ ivug_details_view_screen_create(Evas_Object *parent, Media_Item *mitem, ivug_vie
        genlist = _ivug_details_view_genlist_create(pDetailsView, pDetailsView->layout);
        pDetailsView->genlist = genlist;
 
-       _ivug_detail_genlist_view_file_view_create(pDetailsView);
+       if(stype == SLIDE_TYPE_WEB_IMAGE || stype == SLIDE_TYPE_STREAMING )
+       {
+               _ivug_detail_genlist_view_file_view_create(pDetailsView, mdata->fileurl, stype);
+       }
+       else
+       {
+               _ivug_detail_genlist_view_file_view_create(pDetailsView, filepath, stype);
+       }
 
 // TODO : Should check below routine. why DRM has no GPS info???
        if(mdata->bIsDRMContent == EINA_TRUE)
        {
-               _ivug_detail_genlist_view_drm_create(pDetailsView);
+               _ivug_detail_genlist_view_drm_create(pDetailsView, filepath, stype);
        }
        else
        {
-               _ivug_detail_genlist_view_gps_create(pDetailsView);
+               _ivug_detail_genlist_view_exif_info_create(pDetailsView, filepath, stype);
        }
 
        elm_object_part_content_set(pDetailsView->layout, "details_view.genlist" , pDetailsView->genlist );
@@ -644,13 +461,19 @@ ivug_details_view_destroy(Ivug_DetailsView *pDetailsView)
                pDetailsView->layout = NULL;
        }
 
-       _ivug_details_free_file_info(&pDetailsView->file_Info);
-
-       if(pDetailsView)
-       {
-               free(pDetailsView);
-       }
+       free(pDetailsView);
 
        pDetailsView = NULL;
 }
 
+void ivug_details_view_update(Ivug_DetailsView *pDetailsView, const char *new_path)
+{
+       free(*(pDetailsView->filename));
+       *(pDetailsView->filename) = ecore_file_strip_ext(ecore_file_file_get(new_path));
+
+       free(*(pDetailsView->path));
+       *(pDetailsView->path) = strdup(new_path);
+
+       elm_genlist_realized_items_update(pDetailsView->genlist);
+}
+
old mode 100755 (executable)
new mode 100644 (file)
index 1d6dd16..a8810f8
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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-main-view.h"
@@ -20,6 +20,8 @@
 #include "ivug-main-view-menu.h"
 
 #include "ivug-slider.h"
+#include "ivug-slider-item.h"
+
 #include "ivug-listpopup.h"
 #include "ivug-ext-ug.h"
 #include "ivug-popup.h"
 #include "ivug-slideshow.h"
 
 #include "ivug-file-info.h"
-
 #include "ivug-exif.h"
 
-#include <Ecore_File.h>
 #include <ui-gadget-module.h>          // ug_destroy_me, ug_send_result
-#include <app_manager.h>               //app_manager_get_app_name\r
-
-#include "ivug-crop-view.h"\r
-\r
-enum {
-       IVUG_SHARE_TYPE_MESSAGE = 0x00,
-       IVUG_SHARE_TYPE_EMAIL,
-       IVUG_SHARE_TYPE_BLUETOOTH,
-       IVUG_SHARE_TYPE_PRINT_VIA_BLUETOOTH,
-       IVUG_SHARE_TYPE_SNS,
-       IVUG_SHARE_TYPE_WIFI,
-       IVUG_SHARE_TYPE_PRINT,
-};
-
-//set as
-enum {
-       IVUG_SET_AS_TYPE_HOME = 0x00,
-       IVUG_SET_AS_TYPE_LOCK,
-       IVUG_SET_AS_TYPE_BOTH,
-       IVUG_SET_AS_TYPE_CALLER_ID,
-};
-
-#undef IVUG_DEFINE_EXIF_ROTATE
-
-#define POPUP_ICON_DIRECTORY_PATH      IMAGE_PATH"/Popup_icon"
-
-#define ICON_PATH_CROP                                         POPUP_ICON_DIRECTORY_PATH"/T01_1_popup_icon_Crop.png"
-#define ICON_PATH_PASTE_FROM_CLIPBOARD         POPUP_ICON_DIRECTORY_PATH"/T01_1_popup_icon_Paste from Clipboard.png"
-
-static void\r
+#include <shortcut.h>
+#include <media-thumbnail.h>
+#include <app_manager.h>               //app_manager_get_app_name
+
+#include "ivug-crop-view.h"
+
+
+
+#include <media-util-register.h>       // media_file_register
+
+#define IVUG_DEFINE_EXIF_ROTATE
+
+#define GALLERY_PKG_NAME       "com.samsung.gallery"
+#define SHORTCUT_PREFIX                "gallery:imageviewer:"
+#define SHORTCUT_PREFIX_LEN    strlen(SHORTCUT_PREFIX)
+#define SHORTCUT_ICON_PATH     "/usr/share/icons/default/small/com.samsung.image-viewer.png"
+
+static void
 _on_ext_ug_destroy_cb(ui_gadget_h ug, void *priv)
 {
        if (!ug ) return;
@@ -77,6 +65,31 @@ _on_ext_ug_destroy_cb(ui_gadget_h ug, void *priv)
        ivug_main_view_set_hide_timer(pMainView);
 }
 
+static void
+_on_ext_music_ug_result_cb(ui_gadget_h ug, service_h service, void *priv)
+{
+       if (!ug ) return;
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)priv;
+       IV_ASSERT(pMainView != NULL);
+
+       MSG_IMAGEVIEW_HIGH("UG result sended");
+
+       char *path = NULL;
+
+       service_get_extra_data(service, "result", &path);
+
+       MSG_IMAGEVIEW_HIGH("selected path = %s", path);
+
+       if(pMainView->ss_music_name != NULL)
+       {
+               free(pMainView->ss_music_name);
+       }
+       pMainView->ss_music_name = strdup(path);
+
+       free(path);
+}
+
 static void _on_selectioninfo_deleted(void * data, Evas * e, Evas_Object * obj, void * event_info)
 {
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
@@ -115,6 +128,70 @@ void _delete_details_view(Ivug_MainView *pMainView )
 
 }
 
+
+static void _on_add_tag_view_destroy(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_MAIN_HIGH("transition finished");
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       ivug_name_view_destroy(pMainView->pNameView);
+       pMainView->pNameView = NULL;    // Will removed in add tag view.
+
+       evas_object_smart_callback_del(pMainView->navi_bar, "transition,finished",
+                               _on_add_tag_view_destroy);
+}
+
+static void _on_add_tag_view_response(ivug_name_response resp, const char *str, void *pClientData)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)pClientData;
+       bool ret = false;
+       Media_Item *mitem = NULL;
+       Media_Data *mdata = NULL;
+
+       switch(resp)
+       {
+       case NAME_VIEW_RESPONSE_OK:
+               mitem = ivug_slider_get_item(pMainView->slider);
+               mdata = ivug_medialist_get_data(mitem);
+
+               ret = ivug_mediadata_set_tag(mdata, str);
+               if(ret == false)
+               {
+                       MSG_MAIN_ERROR("ivug_mediadata_set_tag failed: ret = %d", ret);
+                       _ivug_selectioninfo_create(pMainView, IDS_FAILED);
+               }
+               else
+               {
+                       MSG_MAIN_HIGH("New tags is added");
+                       _ivug_selectioninfo_create(pMainView, IDS_ADDED);
+               }
+               evas_object_smart_callback_add(pMainView->navi_bar, "transition,finished",
+                               _on_add_tag_view_destroy, pMainView);
+
+               elm_naviframe_item_pop(pMainView->navi_bar);
+
+               pMainView->navi_it = elm_naviframe_top_item_get(pMainView->navi_bar);
+               break;
+       case NAME_VIEW_RESPONSE_CANCEL:
+               MSG_MAIN_HIGH("Add tag is canceled");
+               evas_object_smart_callback_add(pMainView->navi_bar, "transition,finished",
+                               _on_add_tag_view_destroy, pMainView);
+
+               elm_naviframe_item_pop(pMainView->navi_bar);
+
+               pMainView->navi_it = elm_naviframe_top_item_get(pMainView->navi_bar);
+               break;
+       default:
+               MSG_MAIN_ERROR("Unhandled mode : %d", resp);
+               break;
+       }
+
+       elm_naviframe_item_title_visible_set(pMainView->navi_it, EINA_TRUE);
+       elm_object_item_signal_emit(pMainView->navi_it, "elm,state,toolbar,open", "");
+
+       ivug_main_view_set_hide_timer(pMainView);
+}
+
 static void
 _on_setasview_deleted(void *data, Evas *e , Evas_Object *obj , void *event_info )
 {
@@ -127,14 +204,33 @@ _on_setasview_deleted(void *data, Evas *e , Evas_Object *obj , void *event_info
        ivug_main_view_set_hide_timer(pMainView);
 }
 
+static void _on_setas_view_destroyed(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       elm_naviframe_item_pop(pMainView->navi_bar);
+
+       pMainView->navi_it = elm_naviframe_top_item_get(pMainView->navi_bar);
+
+       if(pMainView->pSetAsView)
+       {
+               ivug_setas_view_destroy(pMainView->pSetAsView);
+               pMainView->pSetAsView = NULL;
+       }
+}
+
 static void
-_on_popup_response(void *data, Evas_Object *obj, void *event_info)\r
+_on_timeout_response(void *data, Evas_Object *obj, void *event_info)
 {
        IV_ASSERT(data != NULL);
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
        ivug_main_view_set_hide_timer(pMainView);
 }
 
+
+
+#ifdef USE_DEFAULT_APP_SERVICE
 void _on_share_selected(void *data, Evas_Object *obj, void *event_info)
 {
        IV_ASSERT(data != NULL);
@@ -166,7 +262,14 @@ void _on_share_selected(void *data, Evas_Object *obj, void *event_info)
        }
 
        char *path = NULL;
-       path = mdata->filepath;
+       if(mdata->slide_type == SLIDE_TYPE_WEB_IMAGE)
+       {
+               path = mdata->fileurl;
+       }
+       else
+       {
+               path = mdata->filepath;
+       }
 
        bool ret = false;
 
@@ -175,18 +278,18 @@ void _on_share_selected(void *data, Evas_Object *obj, void *event_info)
        /* appsvc failed or ug_create failed */
        if(ret == false)
        {
-               ivug_1btn_popup_show(pMainView->layout, NULL, IDS_APPLICATION_NOT_INSTALLED, _on_popup_response, pMainView);\r
+               ivug_timeout_popup_show(pMainView->layout, _on_timeout_response, pMainView, NULL, IDS_APPLICATION_NOT_INSTALLED);
        }
 
        evas_object_del(obj);
 }
-
-void _on_setas_selected(void *data, Evas_Object *obj, void *event_info)
+#else
+void _on_share_selected(void *data, Evas_Object *obj, void *event_info)
 {
        IV_ASSERT(data != NULL);
 
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
-
+       IV_ASSERT(pMainView->ext_ug == NULL);
 
        Ivug_ListPopup_Item *item = (Ivug_ListPopup_Item *)event_info;
 
@@ -203,10 +306,128 @@ void _on_setas_selected(void *data, Evas_Object *obj, void *event_info)
 
        Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
        Media_Data *mdata = ivug_medialist_get_data(mitem);
+
        if(mdata == NULL)
        {
                MSG_MAIN_ERROR("sd is NULL");
                evas_object_del(obj);
+               return;
+       }
+
+       char *path = NULL;
+       if(mdata->slide_type == SLIDE_TYPE_WEB_IMAGE)
+       {
+               path = mdata->fileurl;
+       }
+       else
+       {
+               path = mdata->filepath;
+       }
+
+       bool ret = false;
+
+       if(strncmp(label, IDS_MESSAGE, strlen(label)) == 0)
+       {
+               pMainView->ext_ug = ivug_ext_launch_message(path, _on_ext_ug_destroy_cb, data);
+       }
+       else if(strncmp(label, IDS_EMAIL, strlen(label)) == 0)
+       {
+               ret = ivug_ext_launch_email(path);
+       }
+       else if(strncmp(label, IDS_BLUETOOTH, strlen(label)) == 0)
+       {
+               pMainView->ext_ug = ivug_ext_launch_bluetooth_send(path, _on_ext_ug_destroy_cb, data);
+       }
+       else if(strncmp(label, IDS_PRINT_VIA_BLUETOOH, strlen(IDS_PRINT_VIA_BLUETOOH)) == 0)    // for distinguish print
+       {
+               pMainView->ext_ug = ivug_ext_launch_bluetooth_print(path, _on_ext_ug_destroy_cb, data);
+       }
+       else if(strncmp(label, IDS_FACEBOOK, strlen(label)) == 0)
+       {
+               ret = ivug_ext_launch_sns("com.samsung.facebook", path);
+       }
+       else if(strncmp(label, IDS_PICASA, strlen(label)) == 0)
+       {
+               ret = ivug_ext_launch_sns("com.samsung.picasa", path);
+       }
+       else if(strncmp(label, IDS_TWITTER, strlen(label)) == 0)
+       {
+               ret = ivug_ext_launch_sns("com.samsung.twitter", path);
+       }
+       else if(strncmp(label, IDS_YOUTUBE, strlen(label)) == 0)
+       {
+               ret = ivug_ext_launch_sns("com.samsung.youtube", path);
+       }
+       else if(strncmp(label, IDS_WIFI_DIRECT, strlen(label)) == 0)
+       {
+               pMainView->ext_ug = ivug_ext_launch_wifi_file_transfer(path, _on_ext_ug_destroy_cb, data);
+       }
+       else
+       {
+               MSG_MAIN_WARN("Unknown Share type : %s", label);
+       }
+
+       /* appsvc failed or ug_create failed */
+       if(ret == false && pMainView->ext_ug == NULL)
+       {
+               ivug_timeout_popup_show(pMainView->layout, _on_timeout_response, pMainView, NULL, IDS_APPLICATION_NOT_INSTALLED);
+       }
+
+       evas_object_del(obj);
+}
+#endif
+
+static int
+_on_addhome_result_cb(int ret, int pid, void *data)
+{
+       MSG_MAIN_HIGH("Client pid: %d, Return: %d", pid, ret);
+       return 0;
+}
+
+static void _create_setas_view(Ivug_MainView *pMainView, const char *filepath, ivug_set_screen_type type)
+{
+       pMainView->pSetAsView = ivug_setas_view_screen_create(pMainView->layout, filepath,
+                               IVUG_SETAS_NORMAL, type);
+       Evas_Object *setasOjbect = ivug_setas_view_object_get(pMainView->pSetAsView);
+       //evas_object_event_callback_add(setasOjbect, EVAS_CALLBACK_DEL, _on_setasview_deleted, pMainView);
+       evas_object_smart_callback_add(setasOjbect, "destroy", _on_setas_view_destroyed, pMainView);
+
+       Evas_Object *back_btn = ivug_button_add(pMainView->navi_bar, "naviframe/end_btn/default",
+                               IDS_BACK, NULL, _on_setas_view_destroyed, pMainView);
+
+       pMainView->navi_it = elm_naviframe_item_push(pMainView->navi_bar,
+                                                       NULL, back_btn, NULL, setasOjbect, NULL);
+
+       ivug_setas_view_create_menu(pMainView->pSetAsView, pMainView->navi_bar, type);
+}
+
+void _on_setas_selected(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       Ivug_ListPopup_Item *item = (Ivug_ListPopup_Item *)event_info;
+
+       const char *label = (const char *)ivug_listpopup_item_get_data(item);
+
+       if(label == NULL)
+       {
+               MSG_MAIN_ERROR("label is NULL");
+               evas_object_del(pMainView->ctx_popup2);
+               pMainView->ctx_popup2 = NULL;
+               ivug_main_view_set_hide_timer(pMainView);
+               return;
+       }
+       MSG_MAIN_HIGH("text(%s) is clicked", label);
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+       if(mdata == NULL)
+       {
+               MSG_MAIN_ERROR("sd is NULL");
+               evas_object_del(pMainView->ctx_popup2);
+               pMainView->ctx_popup2 = NULL;
                ivug_main_view_set_hide_timer(pMainView);
                return;
        }
@@ -215,33 +436,216 @@ void _on_setas_selected(void *data, Evas_Object *obj, void *event_info)
 
        if(strncmp(label, IDS_HOME_SCREEN, strlen(label)) == 0)
        {
-               pMainView->pSetAsView = ivug_setas_view_screen_create(pMainView->layout, mdata->filepath,
-                               IVUG_SETAS_NORMAL, IVUG_CTRLBAR_SET_SCREEN_HOME);
-               setasOjbect = ivug_setas_view_object_get(pMainView->pSetAsView);
-               evas_object_event_callback_add(setasOjbect, EVAS_CALLBACK_DEL, _on_setasview_deleted, pMainView);
+               _create_setas_view(pMainView, mdata->filepath, IVUG_CTRLBAR_SET_SCREEN_HOME);
        }
        else if(strncmp(label, IDS_LOCK_SCREEN, strlen(label)) == 0)
        {
-               pMainView->pSetAsView = ivug_setas_view_screen_create(pMainView->layout, mdata->filepath,
-                               IVUG_SETAS_NORMAL, IVUG_CTRLBAR_SET_SCREEN_LOCK);
-               setasOjbect = ivug_setas_view_object_get(pMainView->pSetAsView);
-               evas_object_event_callback_add(setasOjbect, EVAS_CALLBACK_DEL, _on_setasview_deleted, pMainView);
+               _create_setas_view(pMainView, mdata->filepath, IVUG_CTRLBAR_SET_SCREEN_LOCK);
        }
        else if(strncmp(label, IDS_HOME_AND_LOCK_SCREENS, strlen(label)) == 0)
        {
-               pMainView->pSetAsView = ivug_setas_view_screen_create(pMainView->layout, mdata->filepath,
-                               IVUG_SETAS_NORMAL, IVUG_CTRLBAR_SET_SCREEN_BOTH);
-               setasOjbect = ivug_setas_view_object_get(pMainView->pSetAsView);
-               evas_object_event_callback_add(setasOjbect, EVAS_CALLBACK_DEL, _on_setasview_deleted, pMainView);
+               _create_setas_view(pMainView, mdata->filepath, IVUG_CTRLBAR_SET_SCREEN_BOTH);
        }
        else if(strncmp(label, IDS_CALLER_IMAGE, strlen(label)) == 0)
        {
                pMainView->ext_ug = ivug_ext_launch_contact(mdata->filepath, _on_ext_ug_destroy_cb, data);
        }
+       else if(strncmp(label, IDS_ADD_TO_HOME, strlen(label)) == 0)
+       {
+               char str[IVUG_MAX_FILE_PATH_LEN+SHORTCUT_PREFIX_LEN] = {0,};
+               snprintf(str, IVUG_MAX_FILE_PATH_LEN+SHORTCUT_PREFIX_LEN,
+                       SHORTCUT_PREFIX"%s", mdata->fileurl);
+
+               int ret = add_to_home_shortcut(GALLERY_PKG_NAME, mdata->fileurl,
+                                          SHORTCUT_PACKAGE,
+                                          str,
+                                           mdata->thumbnail_path,
+                                          _on_addhome_result_cb, NULL);
+
+               if (ret < 0) {
+                       MSG_MAIN_ERROR("Add to home failed, error: %d", ret);
+                       ivug_selectioninfo_create(pMainView->layout, IDS_FAILED);
+               }
+               else
+               {
+                       ivug_selectioninfo_create(pMainView->layout, IDS_ADDED);
+               }
+       }
 
-       evas_object_del(obj);
+       evas_object_del(pMainView->ctx_popup2);
+       pMainView->ctx_popup2 = NULL;
+}
+
+
+void _on_addtag_selected(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       Ivug_ListPopup_Item *item = (Ivug_ListPopup_Item *)event_info;
+
+       const char *label = (const char *)ivug_listpopup_item_get_data(item);
+
+       if(label == NULL)
+       {
+               MSG_MAIN_ERROR("label is NULL");
+               evas_object_del(pMainView->ctx_popup2);
+               pMainView->ctx_popup2 = NULL;
+               ivug_main_view_set_hide_timer(pMainView);
+               return;
+       }
+
+       MSG_MAIN_HIGH("text(%s) is clicked", label);
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+       if(mdata == NULL)
+       {
+               MSG_MAIN_ERROR("sd is NULL");
+               evas_object_del(pMainView->ctx_popup2);
+               pMainView->ctx_popup2 = NULL;
+               ivug_main_view_set_hide_timer(pMainView);
+               return;
+       }
+
+       if(strncmp(label, IDS_CREATE_TAG, strlen(label)) == 0)
+       {
+               pMainView->pNameView = ivug_name_view_create(pMainView->layout, IDS_CREATE_TAG);
+
+               ivug_name_view_set_response_callback(pMainView->pNameView, _on_add_tag_view_response, (void*)pMainView);
+
+               Evas_Object *layout = ivug_name_view_object_get(pMainView->pNameView);
+
+               pMainView->navi_it = elm_naviframe_item_push(pMainView->navi_bar, NULL, NULL, NULL, layout, NULL);
+
+               elm_naviframe_item_title_visible_set(pMainView->navi_it, EINA_FALSE);
+               elm_object_item_signal_emit(pMainView->navi_it, "elm,state,toolbar,close", "");
+
+               ivug_name_view_set_focus(pMainView->pNameView);
+       }
+       else if(strncmp(label, IDS_FAVOURITES, strlen(label)) == 0)
+       {
+               if ( ivug_mediadata_set_favorite(mdata, true) == false )
+               {
+                       MSG_MAIN_ERROR("Error!. Set favorite for ID=%s", uuid_getchar(mdata->mediaID));
+                       goto ADD_FAIL;
+               }
+
+               _ivug_selectioninfo_create(pMainView, IDS_ADDED);
+               ivug_main_view_set_hide_timer(pMainView);
+       }
+       else
+       {
+               bool ret = ivug_mediadata_set_tag(mdata, (char *)label);
+               if(ret == true)
+               {
+                       _ivug_selectioninfo_create(pMainView, IDS_ADDED);
+               }
+               else
+               {
+                       goto ADD_FAIL;
+               }
+               ivug_main_view_set_hide_timer(pMainView);
+       }
+
+       evas_object_del(pMainView->ctx_popup2);
+       pMainView->ctx_popup2 = NULL;
+
+       return;
+ADD_FAIL:
+       _ivug_selectioninfo_create(pMainView, IDS_FAILED);
+       evas_object_del(pMainView->ctx_popup2);
+       pMainView->ctx_popup2 = NULL;
+
+       ivug_main_view_set_hide_timer(pMainView);
+
+       return;
+
+}
+
+
+#ifndef USE_DEFAULT_DOWNLOADS_FOLDER
+
+void _on_save_selected(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       ivug_listpopup_item *item = (ivug_listpopup_item *)event_info;
+
+       if ( item == NULL )     // No item is selected
+       {
+               evas_object_del(pMainView->popup);
+               pMainView->popup = NULL;
+               ivug_main_view_set_hide_timer(pMainView);
+               return;
+       }
+       MSG_MAIN_HIGH("Selected folder name = %s", item->caption);
+
+       char *dir_path = (char *)item->data;            // Should be freed
+       char dst_file[IVUG_MAX_FILE_PATH_LEN + 1] = {0,};
+       const char *filename = NULL;
+       int ret = -1;
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+       if ( mdata == NULL )
+       {
+               MSG_MAIN_ERROR("Cannot get slide data.");
+               goto SAVE_FAIL;
+       }
+
+       filename = ecore_file_file_get(mdata->filepath);
+       if (filename == NULL)
+       {
+               MSG_MAIN_ERROR("File does not existfilepath=%s", mdata->filepath);
+               goto SAVE_FAIL;
+       }
+
+       snprintf(dst_file, IVUG_MAX_FILE_PATH_LEN, "%s/%s", dir_path, filename);
+
+       if(!ecore_file_cp(mdata->filepath, dst_file))
+       {
+               MSG_MAIN_ERROR("ecore_file_cp failed. From %s To %s", mdata->filepath, dst_file);
+               goto SAVE_FAIL;
+       }
+
+       free(dir_path);
+
+       ret = media_file_register(dst_file);
+       if(ret < 0)
+       {
+               MSG_MAIN_ERROR("Cannot add to album file %s. ret=%d", dst_file, ret);
+               _ivug_selectioninfo_create(pMainView, IDS_FAILED);
+       }
+       else
+       {
+               _ivug_selectioninfo_create(pMainView, IDS_SAVED);
+       }
+
+       evas_object_del(pMainView->popup);
+       pMainView->popup = NULL;
+
+       ivug_main_view_set_hide_timer(pMainView);
+
+       return;
+
+SAVE_FAIL:
+       if(dir_path)
+               free(dir_path);
+
+       _ivug_selectioninfo_create(pMainView, IDS_FAILED);
+
+       evas_object_del(pMainView->popup);
+       pMainView->popup = NULL;
+
+       ivug_main_view_set_hide_timer(pMainView);
+
+       return;
 }
 
+#endif
+
 static void
 _on_delete_selected(void *data, Evas_Object *obj, void *event_info)
 {
@@ -259,12 +663,14 @@ _on_delete_selected(void *data, Evas_Object *obj, void *event_info)
        if(pMainView->pDetailsView)
        {
                MSG_MAIN_HIGH("Delete details view.");
-               _change_close_to_details(pMainView);
+               //_change_close_to_details(pMainView);
                _delete_details_view(pMainView);
        }
 
        MSG_MAIN_HIGH("Removing current slide.");
 
+// First, remove thumbnail and delete item
+
        ivug_main_view_set_hide_timer(pMainView);
 
        _ivug_selectioninfo_create(pMainView, IDS_DELETED);
@@ -322,6 +728,8 @@ _on_rename_selected(void *data, Evas_Object *obj, void *event_info)
 }
 
 
+
+
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 //
 // Button handlers
@@ -333,7 +741,7 @@ static void _dismissed_cb(void *data, Evas_Object *obj, void *event_info)
        //evas_object_del(obj);
        ivug_main_view_set_hide_timer(pMainView);
 
-       if(pMainView->popup)
+       if(pMainView->popup)    //for tag popup
        {
                MSG_MAIN_HIGH("Removing popup 1");
                evas_object_del(pMainView->popup);
@@ -345,6 +753,7 @@ static void _dismissed_cb(void *data, Evas_Object *obj, void *event_info)
                evas_object_del(obj);
        }
 
+
        MSG_MAIN_HIGH("Popup dismissed");
 }
 
@@ -375,6 +784,29 @@ _iter_album_list(media_handle media, void *user_data)
 }
 #endif
 
+
+static bool
+_iter_tag_list(media_handle media, void *user_data)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)user_data;
+
+       char *name = ivug_db_get_tag_name((tag_handle)media);
+
+       if(pMainView->ctx_popup2)
+       {
+               ivug_listpopup_item_append(pMainView->ctx_popup2, NULL, name, name);
+       }
+       else if(pMainView->popup)
+       {
+               ivug_listpopup_item_append(pMainView->popup, NULL, name, name);
+       }
+
+       MSG_IVUG_HIGH("tag name =%s", name);
+
+       return 0;
+}
+
+
 void on_btn_back_clicked(void *data, Evas_Object *obj, void *event_info)
 {
 // Back from main view
@@ -383,11 +815,21 @@ void on_btn_back_clicked(void *data, Evas_Object *obj, void *event_info)
 
        MSG_MAIN_WARN("Back key from main view pressed");
 
-       ivug_main_view_del_hide_timer(pMainView);
+       if ( pMainView->pDetailsView )
+       {
+               MSG_MAIN_HIGH("Details View Destroy");
+
+               ivug_details_view_destroy(pMainView->pDetailsView);
+               pMainView->pDetailsView = NULL;
+               return;
+       }
 
 // otherwise, from gallery, ug will be terminated
        evas_object_smart_callback_del(obj, "clicked", on_btn_back_clicked);
 
+#ifndef FIX_LAST_BLINK
+       ivug_main_view_del_hide_timer(pMainView);
+
 // Slider should be removed before mList is freed.
        if ( pMainView->slider )
        {
@@ -395,6 +837,13 @@ void on_btn_back_clicked(void *data, Evas_Object *obj, void *event_info)
                pMainView->slider = NULL;
        }
 
+       if ( pMainView->pNameView )
+       {
+               MSG_MAIN_HIGH("Name View Destroy");
+               ivug_name_view_destroy(pMainView->pNameView);
+               pMainView->pNameView = NULL;
+       }
+
        if ( pMainView->pSetAsView )
        {
                MSG_MAIN_HIGH("SetAS View Destroy");
@@ -410,6 +859,7 @@ void on_btn_back_clicked(void *data, Evas_Object *obj, void *event_info)
                pMainView->pDetailsView = NULL;
        }
 
+
 #if 1
        if(pMainView->layout)           // Remove topmost parent in main view.
        {
@@ -424,10 +874,6 @@ void on_btn_back_clicked(void *data, Evas_Object *obj, void *event_info)
        }
 #else
 
-       evas_object_hide(pMainView->parent);
-
-       evas_render(evas_object_evas_get(pMainView->parent));
-
 #endif
 
        if ( pMainView->mList )
@@ -437,6 +883,8 @@ void on_btn_back_clicked(void *data, Evas_Object *obj, void *event_info)
                pMainView->mList = NULL;
        }
 
+#endif
+
 #if 0
        /* comment below, because t show main view and this back btn,
           *firstly slide show view is mouse up, then ivug_ss_delete() will be invoked in taht mouse up cb
@@ -455,12 +903,6 @@ void on_btn_setas_clicked(void *data, Evas_Object *obj, void *event_info)
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
        IV_ASSERT(pMainView != NULL);
 
-       if(pMainView->popup)
-       {
-               MSG_MAIN_ERROR("popup already exist");
-               return;
-       }
-
        Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
        Media_Data *mdata = ivug_medialist_get_data(mitem);
 
@@ -472,10 +914,12 @@ void on_btn_setas_clicked(void *data, Evas_Object *obj, void *event_info)
                return;
        }
 
-       ivug_main_view_del_hide_timer(pMainView);
+       //ivug_main_view_del_hide_timer(pMainView);
 
        Evas_Object* popup = NULL;
-       popup = ivug_listpopup_add(pMainView->layout);
+       popup = ivug_listpopup_add(pMainView->area_obj);
+
+       pMainView->ctx_popup2 = popup;
 
        evas_object_smart_callback_add(popup, "popup,dismissed", _dismissed_cb, pMainView);
        evas_object_smart_callback_add(popup, "popup,selected", _on_setas_selected, pMainView);
@@ -512,6 +956,12 @@ void on_btn_setas_clicked(void *data, Evas_Object *obj, void *event_info)
                {
                        ivug_listpopup_item_disabled_set(it);
                }
+
+               it = ivug_listpopup_item_append(popup, NULL, IDS_ADD_TO_HOME, IDS_ADD_TO_HOME);
+               if(bDisableWallpaper == true)
+               {
+                       ivug_listpopup_item_disabled_set(it);
+               }
        }
        else
        {
@@ -519,40 +969,170 @@ void on_btn_setas_clicked(void *data, Evas_Object *obj, void *event_info)
                ivug_listpopup_item_append(popup, NULL, IDS_LOCK_SCREEN, IDS_LOCK_SCREEN);
                ivug_listpopup_item_append(popup, NULL, IDS_HOME_AND_LOCK_SCREENS, IDS_HOME_AND_LOCK_SCREENS);
                ivug_listpopup_item_append(popup, NULL, IDS_CALLER_IMAGE, IDS_CALLER_IMAGE);
+               ivug_listpopup_item_append(popup, NULL, IDS_ADD_TO_HOME, IDS_ADD_TO_HOME);
 
        }
 
-       const Elm_Object_Item *item = pMainView->items[TOOLBUTTON_SETAS].item;
-       Evas_Object *button = elm_toolbar_item_object_get(item);
-
        Evas_Coord x, y;
        Evas_Coord w, h;
+
+       Ivug_ListPopup_Item *item = (Ivug_ListPopup_Item *)event_info;
+       Elm_Object_Item *eoi = ivug_listpopup_item_get_item(item);
+       Evas_Object *button = elm_object_item_widget_get(eoi);
        evas_object_geometry_get(button, &x, &y, &w, &h);
+
        MSG_MAIN_MED("x = %d, y = %d, w = %d, h = %d", x, y, w, h);
 
 
-       ivug_listpopup_context_show(popup, pMainView->area_obj, x+w/2, y+h);
+       ivug_listpopup_context_show(popup, pMainView->area_obj, x+w/2, y+h/2);
        IVUG_FUNC_LEAVE();
        return;
 }
 
+static void _on_name_view_destroy(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_MAIN_HIGH("transition finished");
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       ivug_name_view_destroy(pMainView->pNameView);
+       pMainView->pNameView = NULL;    // Will removed in add tag view.
+
+       evas_object_smart_callback_del(pMainView->navi_bar, "transition,finished",
+                               _on_name_view_destroy);
+}
+
+static bool _rename(Media_Data *mdata, const char *str)
+{
+       IV_ASSERT(mdata!=NULL);
+
+       if(mdata->filepath == NULL || mdata->thumbnail_path == NULL)
+       {
+               MSG_MAIN_ERROR("filepath is NULL");
+               return false;
+       }
+
+       const char *old_fullpath = mdata->filepath;
+       char *old_dir = ecore_file_dir_get(old_fullpath);
+       char *ext = ivug_fileinfo_get_file_extension(old_fullpath);
+
+       char new_fullpath[IVUG_MAX_FILE_PATH_LEN] = {0,};
+       if(ext)
+       {
+               snprintf(new_fullpath, sizeof(new_fullpath),"%s/%s.%s", old_dir, str, ext);
+       }
+       else
+       {
+               snprintf(new_fullpath, sizeof(new_fullpath),"%s/%s", old_dir, str);
+       }
+
+       if(ivug_db_rename(mdata->m_handle, new_fullpath) == false)
+       {
+               MSG_MAIN_ERROR("ivug_db_rename to %s failed", new_fullpath);
+               return false;
+       }
+
+       ivug_rename_file(old_fullpath, new_fullpath);
+
+       ivug_db_destroy_file_handle(mdata->m_handle);
+       mdata->m_handle = ivug_db_get_file_handle_from_media_id(mdata->mediaID);
+
+       MSG_DETAIL_HIGH("Rename %s -> %s", old_fullpath, new_fullpath);
+       free(mdata->filepath);
+       mdata->filepath = strdup(new_fullpath);
+
+       free(mdata->thumbnail_path);
+       mdata->thumbnail_path = ivug_db_get_thumbnail_path(mdata->m_handle);
+
+       return true;
+}
+
+static void _on_rename_view_response(ivug_name_response resp, const char *str, void *pClientData)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)pClientData;
+
+       if(resp != NAME_VIEW_RESPONSE_OK)
+       {
+               MSG_MAIN_ERROR("rename is canceled");
+
+               evas_object_smart_callback_add(pMainView->navi_bar, "transition,finished",
+                               _on_name_view_destroy, pMainView);
+
+               elm_naviframe_item_pop(pMainView->navi_bar);
+
+               pMainView->navi_it = elm_naviframe_top_item_get(pMainView->navi_bar);
+               return;
+       }
+
+       Ivug_DetailsView *pDetailsView = pMainView->pDetailsView;
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mData = ivug_medialist_get_data(mitem);
+
+       if(_rename(mData, str) == false)
+       {
+               MSG_MAIN_ERROR("_rename to %s failed", str);
+       }
+       else
+       {
+               if(*(pDetailsView->filename) == NULL
+                       || *(pDetailsView->path) == NULL)
+               {
+                       MSG_MAIN_ERROR("Detail view data is NULL");
+                       return;
+               }
+
+               ivug_details_view_update(pDetailsView, mData->filepath);
+
+               //update main view
+               if(pMainView->view_by == IVUG_VIEW_BY_FILE)
+               {
+                       const char *title = ecore_file_file_get(mData->filepath);
+                       elm_object_item_part_text_set(pMainView->navi_it, "elm.text.title", title);
+               }
+
+               ivug_slider_set_item(pMainView->slider, mitem, SLIDE_INSTANTLY);
+       }
+
+       evas_object_smart_callback_add(pMainView->navi_bar, "transition,finished",
+                       _on_name_view_destroy, pMainView);
+
+       elm_naviframe_item_pop(pMainView->navi_bar);
+
+       pMainView->navi_it = elm_naviframe_top_item_get(pMainView->navi_bar);
+}
+
+
+static void
+_ivug_detail_view_rename_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_MAIN_HIGH("ENTER : Btn rename clicked. obj=0x%08x data=0x%08x", obj, data);
+       ivug_ret_if(!obj||!data);
+
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+
+       pMainView->pNameView = ivug_name_view_create(pMainView->layout, IDS_CHANGE_NAME);
+
+       char *name = ecore_file_strip_ext(ecore_file_file_get(mdata->filepath));
+
+       ivug_name_view_set_entry(pMainView->pNameView, name);
+
+       ivug_name_view_set_response_callback(pMainView->pNameView, _on_rename_view_response, (void*)pMainView);
+
+       free(name);
+
+       Evas_Object *layout = ivug_name_view_object_get(pMainView->pNameView);
+
+       pMainView->navi_it = elm_naviframe_item_push(pMainView->navi_bar, NULL, NULL, NULL, layout, NULL);
+
+       elm_naviframe_item_title_visible_set(pMainView->navi_it, EINA_FALSE);
+       elm_object_item_signal_emit(pMainView->navi_it, "elm,state,toolbar,close", "");
+
+       ivug_name_view_set_focus(pMainView->pNameView);
+}
 
-static void\r
-_ivug_detail_view_renamed_cb(void *data, Evas_Object *obj, void *event_info)\r
-{\r
-       Ivug_MainView *pMainView = (Ivug_MainView *)data;\r
-\r
-       Media_Item *mitem = (Media_Item *)event_info;\r
-       Media_Data *mdata = ivug_medialist_get_data(mitem);\r
-\r
-       if(pMainView->view_by == IVUG_VIEW_BY_FILE)\r
-       {\r
-               const char *title = ecore_file_file_get(mdata->filepath);\r
-               elm_object_item_part_text_set(pMainView->navi_it, "elm.text.title", title);\r
-       }\r
-\r
-       ivug_slider_update(pMainView->slider, mitem);\r
-}\r
 
 void on_btn_details_clicked(void *data, Evas_Object *obj, void *event_info)
 {
@@ -574,9 +1154,11 @@ void on_btn_details_clicked(void *data, Evas_Object *obj, void *event_info)
 
        ivug_main_view_del_hide_timer(pMainView);
 
-       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);\r
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+       IV_ASSERT(mdata != NULL);
 
-       pMainView->pDetailsView = ivug_details_view_screen_create(pMainView->navi_bar, mitem, pMainView->view_by);\r
+       pMainView->pDetailsView = ivug_details_view_screen_create(pMainView->navi_bar, mitem, pMainView->view_by);
 
        if(!pMainView->pDetailsView)
        {
@@ -589,9 +1171,9 @@ void on_btn_details_clicked(void *data, Evas_Object *obj, void *event_info)
 
        elm_object_item_part_content_set(pMainView->navi_it, "elm.swallow.detail", detail_layout);
 
-       evas_object_smart_callback_add(detail_layout, "renamed", _ivug_detail_view_renamed_cb, pMainView);
+       evas_object_smart_callback_add(detail_layout, "rename,clicked", _ivug_detail_view_rename_clicked_cb, pMainView);
 
-       _change_details_to_close(pMainView);
+       //_change_details_to_close(pMainView);
 
        MSG_MAIN_HIGH("LEAVE : Btn detail view clicked. obj=0x%08x data=0x%08x", obj, data);
 }
@@ -620,12 +1202,129 @@ bool _share_pkg_cb(service_h service, const char *package, void *user_data)
 
        ivug_listpopup_item_append(popup, NULL, name, (void *)strdup(package));
 
-       free(name);
+       free(name);
+
+       return true;
+}
+
+#ifdef USE_DEFAULT_APP_SERVICE
+void on_btn_share_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+       IV_ASSERT(mdata != NULL);
+
+       if ( mdata->filepath == NULL)
+       {
+               MSG_MAIN_ERROR("File path is NULL");
+               return;
+       }
+
+       ivug_main_view_del_hide_timer(pMainView);
+
+       Evas_Object* popup = NULL;
+       popup = ivug_listpopup_add(pMainView->area_obj);
+
+       pMainView->ctx_popup = popup;
+
+       evas_object_smart_callback_add(popup, "popup,dismissed", _dismissed_cb, pMainView);
+       evas_object_smart_callback_add(popup, "popup,selected", _on_share_selected, pMainView);
+
+       service_h service;
+       service_create(&service);
+       service_set_operation(service, SERVICE_OPERATION_SEND);
+       service_set_uri(service, mdata->filepath);
+       service_foreach_app_matched(service, _share_pkg_cb, (void *)popup);
+
+       Evas_Coord x, y;
+       Evas_Coord w, h;
+       evas_object_geometry_get(obj, &x, &y, &w, &h);
+       MSG_MAIN_MED("x = %d, y = %d, w = %d, h = %d", x, y, w, h);
+
+       ivug_listpopup_context_show(popup, pMainView->area_obj, x+w/2, y+h/2);
+}
+#else
+void on_btn_share_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+       IV_ASSERT(mdata != NULL);
+
+       if ( mdata->filepath == NULL)
+       {
+               MSG_MAIN_ERROR("File path is NULL");
+               return;
+       }
+
+       ivug_main_view_del_hide_timer(pMainView);
+
+       Evas_Object* popup = NULL;
+       popup = ivug_listpopup_add(pMainView->area_obj);
+
+       pMainView->ctx_popup = popup;
+
+       evas_object_smart_callback_add(popup, "popup,dismissed", _dismissed_cb, pMainView);
+       evas_object_smart_callback_add(popup, "popup,selected", _on_share_selected, pMainView);
+
+       ivug_listpopup_item_append(popup, NULL, IDS_MESSAGE, IDS_MESSAGE);
+       ivug_listpopup_item_append(popup, NULL, IDS_EMAIL, IDS_EMAIL);
+
+       switch(mdata->slide_type)
+       {
+               case SLIDE_TYPE_IMAGE:
+                       ivug_listpopup_item_append(popup, NULL, IDS_WIFI_DIRECT, IDS_WIFI_DIRECT);
+                       ivug_listpopup_item_append(popup, NULL, IDS_BLUETOOTH, IDS_BLUETOOTH);
+
+                       if(mdata->bIsDRMContent == EINA_TRUE)
+                       {
+                               break;
+                       }
+
+                       ivug_listpopup_item_append(popup, NULL, IDS_FACEBOOK, IDS_FACEBOOK);
+                       ivug_listpopup_item_append(popup, NULL, IDS_PICASA, IDS_PICASA);
+
+                       break;
+               case SLIDE_TYPE_VIDEO:
+                       ivug_listpopup_item_append(popup, NULL, IDS_WIFI_DIRECT, IDS_WIFI_DIRECT);
+                       ivug_listpopup_item_append(popup, NULL, IDS_BLUETOOTH, IDS_BLUETOOTH);
+
+                       if(mdata->bIsDRMContent == EINA_TRUE)
+                       {
+                               break;
+                       }
+                       ivug_listpopup_item_append(popup, NULL, IDS_FACEBOOK, IDS_FACEBOOK);
+                       ivug_listpopup_item_append(popup, NULL, IDS_YOUTUBE, IDS_YOUTUBE);
+
+                       break;
+               case SLIDE_TYPE_STREAMING:
+                       // do not share about streaming
+                       break;
+               case SLIDE_TYPE_UNKNOWN:
+                       ivug_listpopup_item_append(popup, NULL, IDS_BLUETOOTH, IDS_BLUETOOTH);
+                       break;
+               case SLIDE_TYPE_NONE:
+               default:
+                       MSG_MAIN_WARN("Unknown slide type=%d", mdata->slide_type);
+                       // Go through
+       }
+
+       Evas_Coord x, y;
+       Evas_Coord w, h;
+
+       evas_object_geometry_get(obj, &x, &y, &w, &h);
+       MSG_MAIN_MED("x = %d, y = %d, w = %d, h = %d", x, y, w, h);
 
-       return true;
+       ivug_listpopup_context_show(popup, pMainView->area_obj, x+w/2, y+h/2);
 }
+#endif
 
-void on_btn_share_clicked(void *data, Evas_Object *obj, void *event_info)
+void on_btn_save_clicked(void *data, Evas_Object *obj, void *event_info)
 {
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
        IV_ASSERT(pMainView != NULL);
@@ -648,38 +1347,114 @@ void on_btn_share_clicked(void *data, Evas_Object *obj, void *event_info)
 
        ivug_main_view_del_hide_timer(pMainView);
 
+       MSG_MAIN_HIGH("Web image filepath %s, fileurl %s", mdata->filepath, mdata->fileurl);
+
+#ifdef USE_DEFAULT_DOWNLOADS_FOLDER
+       char dest_file[IVUG_MAX_FILE_PATH_LEN + 1] = {0,};
+       const char *new_filename = ecore_file_file_get(mdata->filepath);
+       char *temp_filename = NULL;
+
+       if (new_filename == NULL)
+       {
+               MSG_MAIN_ERROR("File does not exist filepath=%s", mdata->filepath);
+               ivug_main_view_set_hide_timer(pMainView);
+               return;
+       }
+
+       if (ecore_file_dir_is_empty(DEFAULT_DOWNLOADS_FOLDER) == -1)
+       {
+               MSG_MAIN_WARN("Destination path doesn't exist. %s", DEFAULT_DOWNLOADS_FOLDER);
+               mkdir(DEFAULT_DOWNLOADS_FOLDER, DIR_MASK_DEFAULT);
+       }
+
+       snprintf(dest_file, IVUG_MAX_FILE_PATH_LEN, "%s/%s", DEFAULT_DOWNLOADS_FOLDER, new_filename);
+       if(ecore_file_exists(dest_file))
+       {
+               MSG_MAIN_WARN("file already exist");
+               temp_filename = ivug_generate_file_name(dest_file, NULL);
+               snprintf(dest_file, IVUG_MAX_FILE_PATH_LEN, "%s/%s", DEFAULT_DOWNLOADS_FOLDER, ecore_file_file_get(temp_filename));
+               free(temp_filename);
+       }
+
+       if(ivug_copy_file(mdata->filepath, dest_file) == false)
+       {
+               _ivug_selectioninfo_create(pMainView, IDS_FAILED);
+               ivug_main_view_set_hide_timer(pMainView);
+               return;
+       }
+       // Add to album
+       /*int ret = media_file_register(dest_file);
+       if(ret < 0)
+       {
+               MSG_MAIN_ERROR("Cannot add to album file %s. ret=%d", dest_file, ret);
+               _ivug_selectioninfo_create(pMainView, IDS_FAILED);
+       }
+       else
+       {
+               _ivug_selectioninfo_create(pMainView, IDS_SAVED);
+       }*/
+       _ivug_selectioninfo_create(pMainView, IDS_SAVED);
+#else
+       ivug_listpopup_itemlist items = ivug_listpopup_itemlist_new();
+
+// Get local album name.
+
+       bool ret = ivug_db_get_all_folder_list(_iter_album_list, items);
+       if( ret == false )
+       {
+               MSG_SDATA_ERROR( "ivug_db_get_all_folder_list failed: %d", ret);
+               return;
+       }
+
+       pMainView->popup = ivug_listpopup_show(pMainView->layout, IDS_SAVE, items, _on_save_selected, pMainView);
+
+       ivug_listpopup_itemlist_free(items);
+#endif
+
+       return;
+}
+
+
+void on_btn_tag_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+       ivug_ret_if(!mdata);
+
+       //ivug_main_view_del_hide_timer(pMainView);
+
        Evas_Object* popup = NULL;
-       popup = ivug_listpopup_add(pMainView->layout);
+       popup = ivug_listpopup_add(pMainView->area_obj);
+
+       pMainView->ctx_popup2 = popup;
 
        evas_object_smart_callback_add(popup, "popup,dismissed", _dismissed_cb, pMainView);
-       evas_object_smart_callback_add(popup, "popup,selected", _on_share_selected, pMainView);\r
-\r
-       char path[IVUG_MAX_FILE_PATH_LEN] = {0,};\r
-       snprintf(path, IVUG_MAX_FILE_PATH_LEN, "file://%s", mdata->filepath);\r
+       evas_object_smart_callback_add(popup, "popup,selected", _on_addtag_selected, pMainView);
 
-       service_h service;
-       service_create(&service);
-       service_set_operation(service, SERVICE_OPERATION_SEND);
-       service_set_uri(service, path);\r
-       service_foreach_app_matched(service, _share_pkg_cb, (void *)popup);\r
-\r
-       Eina_List *list = ivug_listpopup_items_get(popup);\r
-       if(eina_list_count(list) == 0)\r
-       {\r
-               MSG_MAIN_WARN("Matched app is nothing!");\r
-               evas_object_del(popup);\r
-               return;\r
-       }\r
-
-       const Elm_Object_Item *item = pMainView->items[TOOLBUTTON_SHARE].item;
-       Evas_Object *button = elm_toolbar_item_object_get(item);
+       ivug_listpopup_item_append(popup, NULL, IDS_CREATE_TAG, IDS_CREATE_TAG);
+       ivug_listpopup_item_append(popup, NULL, IDS_FAVOURITES, IDS_FAVOURITES);
+
+       bool ret = ivug_db_get_all_tag_list(_iter_tag_list, pMainView);
+       if( ret == false )
+       {
+               MSG_SDATA_ERROR( "ivug_db_get_all_folder_list failed: %d", ret);
+               return;
+       }
 
        Evas_Coord x, y;
        Evas_Coord w, h;
+
+       Ivug_ListPopup_Item *item = (Ivug_ListPopup_Item *)event_info;
+       Elm_Object_Item *eoi = ivug_listpopup_item_get_item(item);
+       Evas_Object *button = elm_object_item_widget_get(eoi);
        evas_object_geometry_get(button, &x, &y, &w, &h);
-       MSG_MAIN_MED("x = %d, y = %d, w = %d, h = %d", x, y, w, h);
+       MSG_MAIN_HIGH("x = %d, y = %d, w = %d, h = %d", x, y, w, h);
 
-       ivug_listpopup_context_show(popup, pMainView->area_obj, x+w/2, y+h);
+       ivug_listpopup_context_show(popup, pMainView->area_obj, x+w/2, y+h/2);
+       return;
 }
 
 void on_btn_slideshow_clicked(void *data, Evas_Object *obj, void *event_info)
@@ -697,26 +1472,11 @@ void on_btn_slideshow_clicked(void *data, Evas_Object *obj, void *event_info)
        return;
 
 #endif
-       if ( strcmp (elm_object_widget_type_get(obj), "toolbar") != 0 )
-       {
-               MSG_MAIN_FATAL("Not toolbar");
-               return;
-       }
-
-       Elm_Object_Item *ctrl_bar_item = (Elm_Object_Item *)event_info;
-
-       if(elm_object_item_disabled_get(ctrl_bar_item) == EINA_TRUE)
-       {
-               MSG_MAIN_WARN("Slide show already started");
-               return;
-       }
-
-       elm_object_item_disabled_set(ctrl_bar_item, EINA_TRUE);
 
        if(pMainView->pDetailsView)
        {
                MSG_MAIN_HIGH("Exit details view");
-               _change_close_to_details(pMainView);
+               //_change_close_to_details(pMainView);
                _delete_details_view(pMainView);
                ivug_main_view_set_hide_timer(pMainView);       // for hide_count
        }
@@ -725,6 +1485,27 @@ void on_btn_slideshow_clicked(void *data, Evas_Object *obj, void *event_info)
 
 }
 
+
+void on_btn_edit_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+       IV_ASSERT(mdata != NULL);
+
+       if(mdata->slide_type == SLIDE_TYPE_IMAGE)
+       {
+               ivug_ext_launch_default(mdata->filepath, SERVICE_OPERATION_EDIT, NULL, NULL);
+       }
+       else if(mdata->slide_type == SLIDE_TYPE_VIDEO)
+       {
+               ivug_ext_launch_videoeditor(mdata->filepath);
+       }
+
+}
+
 void on_btn_details_close_clicked(void *data, Evas_Object *obj, void *event_info)
 {
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
@@ -732,7 +1513,7 @@ void on_btn_details_close_clicked(void *data, Evas_Object *obj, void *event_info
 
        MSG_MAIN_HIGH("ENTER : Btn detail close clicked. obj=0x%08x data=0x%08x", obj, data);
 
-       _change_close_to_details(pMainView);
+       //_change_close_to_details(pMainView);
        _delete_details_view(pMainView);
 
        ivug_main_view_set_hide_timer(pMainView);
@@ -740,6 +1521,8 @@ void on_btn_details_close_clicked(void *data, Evas_Object *obj, void *event_info
        MSG_MAIN_HIGH("LEAVE : Btn detail close clicked. obj=0x%08x data=0x%08x", obj, data);
 }
 
+
+
 /*
        Used for only view type is select
 */
@@ -797,10 +1580,11 @@ void on_btn_rename_clicked(void *data, Evas_Object *obj, void *event_info)
        ivug_main_view_del_hide_timer(pMainView);
 
        char *old_fullpath = mdata->filepath;
-       const char *old_name = ecore_file_file_get(old_fullpath);
+       char *old_name = ecore_file_strip_ext(ecore_file_file_get(old_fullpath));
 
-       ivug_rename_popup_show(pMainView->layout, ecore_file_strip_ext(old_name), _on_rename_selected, pMainView);
+       ivug_rename_popup_show(pMainView->layout, old_name, _on_rename_selected, pMainView);
 
+       free(old_name);
 }
 
 static void
@@ -821,7 +1605,18 @@ _on_copy_selected(void *data, Evas_Object *obj)
        char *path = NULL;
        int len = 0;
 
-       if(mdata->slide_type == SLIDE_TYPE_VIDEO)
+       if(mdata->slide_type == SLIDE_TYPE_WEB_IMAGE)
+       {
+               if(mdata->filepath)
+               {
+                       path = mdata->filepath;
+               }
+               else
+               {
+                       path = mdata->thumbnail_path;
+               }
+       }
+       else if(mdata->slide_type == SLIDE_TYPE_VIDEO)
        {
                path = mdata->thumbnail_path;
        }
@@ -842,7 +1637,20 @@ _on_copy_selected(void *data, Evas_Object *obj)
                MSG_MAIN_ERROR("slider file path is too long");
                _ivug_selectioninfo_create(pMainView, IDS_FAILED);
        }
-       evas_object_del(obj);
+}
+
+static void  _ivug_crop_view_destroyed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+       ivug_main_view_set_hide_timer(pMainView);
+
+       elm_naviframe_item_pop(pMainView->navi_bar);
+       pMainView->navi_it = elm_naviframe_top_item_get(pMainView->navi_bar);
+
+       ivug_crop_view_destroy(pMainView->pCropView);
+
+       pMainView->pCropView = NULL;
 }
 
 static void
@@ -862,15 +1670,173 @@ _on_crop_selected(void *data, Evas_Object *obj)
        }
 
        MSG_MAIN_HIGH("Create Crop view");
-
        IvugCropView *pCropView = ivug_crop_view_create(pMainView->layout);
 
+       Evas_Object *layout = ivug_crop_view_get_object(pCropView);
+
+       evas_object_smart_callback_add(layout, "destroyed", _ivug_crop_view_destroyed_cb, pMainView);
+
+       Evas_Object *btn_back = ivug_button_add(layout, "naviframe/end_btn/default",
+               IDS_BACK, NULL, _ivug_crop_view_destroyed_cb, pMainView);
+
+       pMainView->navi_it = elm_naviframe_item_push(pMainView->navi_bar, NULL, btn_back, NULL, pCropView->layout, NULL);
+
+       ivug_crop_view_create_menu(pCropView, pMainView->navi_bar);
+
        ivug_crop_view_file_set(pCropView, mdata->filepath);
 
-       evas_object_del(obj);           // Remove ctx popup
+       pMainView->pCropView = pCropView;
+}
+
+#include <Ecore_File.h>
+
+static void
+_on_rotate_left_selected(void *data, Evas_Object *obj)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       MSG_MAIN_HIGH("Rotate l button clicked");
+
+
+#ifdef IVUG_DEFINE_EXIF_ROTATE
+       Media_Item *mitem = NULL;
+       Media_Data *mData = NULL;
+
+       mitem = ivug_slider_get_item(pMainView->slider);
+       mData = ivug_medialist_get_data(mitem);
+
+       int degree = 0;
+
+       if ( ivug_exif_get_rotate(mData->filepath, &degree) < 0 )
+       {
+               MSG_MAIN_ERROR("Cannot get degree : %s", mData->filepath);
+               return;
+       }
+
+
+       degree = degree - 90 ;
+
+       if ( ivug_exif_set_rotate(mData->filepath, degree) < 0 )
+       {
+               MSG_MAIN_ERROR("Cannot set degree : %s", mData->filepath);
+               return;
+       }
+
+       ivug_slider_load(pMainView->slider);            // Refresh image
+
+
+// Remove old thumbnail. not working
+//     ecore_file_remove(mData->thumbnail_path);
+
+// Get thumbnail.
+       char new_path[IVUG_MAX_FILE_PATH_LEN];
+
+       int ret = -1;
+       ret = thumbnail_request_from_db(mData->filepath, new_path, IVUG_MAX_FILE_PATH_LEN);
+       if (ret < 0)
+       {
+               MSG_MAIN_ERROR("thumbnail_request_from_db failed! %s", mData->filepath);
+               return;
+       }
+
+#if 0
+       char dest[1024];
+
+       snprintf(dest, sizeof(dest) - 1, "/opt/media/thm_l_%d.jpg", degree);
+
+       ecore_file_cp(new_path, dest);
+#endif
+
+       if ( mData->thumbnail_path != NULL )
+       {
+               free(mData->thumbnail_path);
+       }
+
+       mData->thumbnail_path = strdup(new_path);
+
+
+#else
+       ivug_slider_image_rotate(pMainView->slider, -90);
+#endif
+
+}
+
+static void
+_on_rotate_right_selected(void *data, Evas_Object *obj)
+{
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
+
+       MSG_MAIN_HIGH("Rotate r button clicked");
+
+
+#ifdef IVUG_DEFINE_EXIF_ROTATE
+       Media_Item *mitem = NULL;
+       Media_Data *mData = NULL;
+
+       mitem = ivug_slider_get_item(pMainView->slider);
+       mData = ivug_medialist_get_data(mitem);
+
+       int degree = 0;
+
+       if ( ivug_exif_get_rotate(mData->filepath, &degree) < 0 )
+       {
+               MSG_MAIN_ERROR("Cannot get degree : %s", mData->filepath);
+               return;
+       }
+
+
+       degree = degree + 90 ;
+
+       if ( ivug_exif_set_rotate(mData->filepath, degree) < 0 )
+       {
+               MSG_MAIN_ERROR("Cannot set degree : %s", mData->filepath);
+               return;
+       }
+
+       ivug_slider_load(pMainView->slider);            // Refresh image
+
+
+// Remove old thumbnail. not working
+//     ecore_file_remove(mData->thumbnail_path);
+
+// Get thumbnail.
+       char new_path[IVUG_MAX_FILE_PATH_LEN];
+
+       int ret = -1;
+       ret = thumbnail_request_from_db(mData->filepath, new_path,
+                                       IVUG_MAX_FILE_PATH_LEN);
+       if (ret < 0)
+       {
+               MSG_MAIN_ERROR("thumbnail_request_from_db failed! %s", mData->filepath);
+               return;
+       }
+
+#if 0
+       char dest[1024];
+
+       snprintf(dest, sizeof(dest) - 1, "/opt/media/thm_r_%d.jpg", degree);
+
+       ecore_file_cp(new_path, dest);
+#endif
+
+       if ( mData->thumbnail_path != NULL )
+       {
+               free(mData->thumbnail_path);
+       }
+
+       mData->thumbnail_path = strdup(new_path);
+
+
+#else
+       ivug_slider_image_rotate(pMainView->slider, +90);
+#endif
+
 }
 
-static void _on_tool_selected(void *data, Evas_Object *obj, void *event_info)
+
+static void _on_more_selected(void *data, Evas_Object *obj, void *event_info)
 {
 // obj is ctxpopup!.
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
@@ -895,40 +1861,154 @@ static void _on_tool_selected(void *data, Evas_Object *obj, void *event_info)
        {
                _on_crop_selected(data, obj);
        }
+       else if(strncmp(label, IDS_ROTATE_LEFT, strlen(label)) == 0)
+       {
+               _on_rotate_left_selected(data, obj);
+               ivug_main_view_set_hide_timer(pMainView);
+       }
+       else if(strncmp(label, IDS_ROTATE_RIGHT, strlen(label)) == 0)
+       {
+               _on_rotate_right_selected(data, obj);
+               ivug_main_view_set_hide_timer(pMainView);
+       }
+       else if(strncmp(label, "Select Music", strlen(label)) == 0)
+       {
+               pMainView->ext_ug = ivug_ext_launch_select_music(_on_ext_music_ug_result_cb, _on_ext_ug_destroy_cb, data);
+       }
+       else if(strncmp(label, IDS_EDIT, strlen(label)) == 0)
+       {
+               on_btn_edit_clicked(data, obj, event_info);
+       }
+       else if(strncmp(label, IDS_TRIM, strlen(label)) == 0)
+       {
+               on_btn_edit_clicked(data, obj, event_info);
+       }
+       else if(strncmp(label, IDS_SET_AS, strlen(label)) == 0)
+       {
+               on_btn_setas_clicked(data, obj, event_info);
+       }
+       else if(strncmp(label, IDS_SLIDE_SHOW, strlen(label)) == 0)
+       {
+               on_btn_slideshow_clicked(data, obj, event_info);
+       }
+       else if(strncmp(label, IDS_DETAILS, strlen(label)) == 0)
+       {
+               on_btn_details_clicked(data, obj, event_info);
+       }
+       else if(strncmp(label, IDS_ADD_TAG, strlen(label)) == 0)
+       {
+               on_btn_tag_clicked(data, obj, event_info);
+       }
+       else if(strncmp(label, IDS_PRINT, strlen(label)) == 0)
+       {
+               Media_Item *WMitem = ivug_slider_get_item(pMainView->slider);
+               Media_Data *mdata = ivug_medialist_get_data(WMitem);
+
+               if (mdata == NULL)
+               {
+                       MSG_MAIN_ERROR("slider data is NULL");
+                       evas_object_del(pMainView->ctx_popup);
+                       pMainView->ctx_popup = NULL;
+                       ivug_main_view_set_hide_timer(pMainView);
+                       return;
+               }
+               bool ret = ivug_ext_launch_print(mdata->filepath);
+       }
+
+       evas_object_del(pMainView->ctx_popup);
+       pMainView->ctx_popup = NULL;
 }
 
-void on_btn_tool_clicked(void *data, Evas_Object *obj, void *event_info)
+void on_btn_more_clicked(void *data, Evas_Object *obj, void *event_info)
 {
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
        IV_ASSERT(pMainView != NULL);
 
+       slide_state_t state = ivug_slider_get_state(pMainView->slider);
+
        Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
        Media_Data *mdata = ivug_medialist_get_data(mitem);
 
        IV_ASSERT(mdata != NULL);
 
+       if (state == SLIDE_STATE_ERROR || state == SLIDE_STATE_DOWNLOAD_FAILED)
+       {
+               MSG_MAIN_HIGH("slide state is invalid %d", state);
+               return;
+       }
+
        ivug_main_view_del_hide_timer(pMainView);
 
        Evas_Object* popup = NULL;
        popup = ivug_listpopup_add(pMainView->area_obj);
 
+       pMainView->ctx_popup = popup;
+
        evas_object_smart_callback_add(popup, "popup,dismissed", _dismissed_cb, pMainView);
-       evas_object_smart_callback_add(popup, "popup,selected", _on_tool_selected, pMainView);
+       evas_object_smart_callback_add(popup, "popup,selected", _on_more_selected, pMainView);
 
        if(mdata->slide_type == SLIDE_TYPE_IMAGE)
        {
-               ivug_listpopup_item_append(popup, ICON_PATH_CROP, IDS_CROP, IDS_CROP);
-       }
+               if(mdata->bIsDRMContent == EINA_FALSE)
+               {
+                       ivug_listpopup_item_append(popup, NULL, IDS_EDIT, IDS_EDIT);
+               }
+               ivug_listpopup_item_append(popup, NULL, IDS_SET_AS, IDS_SET_AS);
+               ivug_listpopup_item_append(popup, NULL, IDS_SLIDE_SHOW, IDS_SLIDE_SHOW);
+               ivug_listpopup_item_append(popup, NULL, IDS_DETAILS, IDS_DETAILS);
+               ivug_listpopup_item_append(popup, NULL, IDS_ADD_TAG, IDS_ADD_TAG);
+               ivug_listpopup_item_append(popup, NULL, IDS_PRINT, IDS_PRINT);
+
 
-       const Elm_Object_Item *item = pMainView->items[TOOLBUTTON_TOOL].item;
-       Evas_Object *button = elm_toolbar_item_object_get(item);
+               if(mdata->bIsDRMContent == EINA_FALSE)
+               {
+                       ivug_listpopup_item_append(popup, NULL, IDS_CROP, IDS_CROP);
+
+                       char *ext = NULL;
+                       ext = ivug_fileinfo_get_file_extension(mdata->filepath);
+                       if(ext)
+                       {
+                               if(strncmp(ext, "jpg", strlen("jpg")) == 0 || strncmp(ext, "JPG", strlen("JPG")) == 0)
+                               {
+                                       ivug_listpopup_item_append(popup, NULL, IDS_ROTATE_LEFT, IDS_ROTATE_LEFT);
+                                       ivug_listpopup_item_append(popup, NULL, IDS_ROTATE_RIGHT, IDS_ROTATE_RIGHT);
+                               }
+                               free(ext);
+                       }
+               }
+       }
+       else if(mdata->slide_type == SLIDE_TYPE_WEB_IMAGE)
+       {
+               ivug_listpopup_item_append(popup, NULL, IDS_SLIDE_SHOW, IDS_SLIDE_SHOW);
+               slide_state_t state = ivug_slider_get_state(pMainView->slider);
+               if(state == SLIDE_STATE_LOADED)
+               {
+                       ivug_listpopup_item_append(popup, NULL, IDS_SET_AS, IDS_SET_AS);
+                       ivug_listpopup_item_append(popup, NULL, IDS_DETAILS, IDS_DETAILS);
+               }
+       }
+       else if(mdata->slide_type == SLIDE_TYPE_VIDEO)
+       {
+               if(ivug_is_editable_video_file(mdata->filepath) == true)
+               {
+                       ivug_listpopup_item_append(popup, NULL, IDS_TRIM, IDS_TRIM);
+               }
+               ivug_listpopup_item_append(popup, NULL, IDS_SLIDE_SHOW, IDS_SLIDE_SHOW);
+               ivug_listpopup_item_append(popup, NULL, IDS_DETAILS, IDS_DETAILS);
+               ivug_listpopup_item_append(popup, NULL, IDS_ADD_TAG, IDS_ADD_TAG);
+               //ivug_listpopup_item_append(popup, NULL, IDS_CROP, IDS_CROP);
+       }
+       else if(mdata->slide_type == SLIDE_TYPE_STREAMING)
+       {
+               ivug_listpopup_item_append(popup, NULL, IDS_DETAILS, IDS_DETAILS);
+       }
 
        Evas_Coord x, y;
        Evas_Coord w, h;
-       evas_object_geometry_get(button, &x, &y, &w, &h);
-       MSG_MAIN_MED("x = %d, y = %d, w = %d, h = %d", x, y, w, h);
 
-       ivug_listpopup_context_show(popup, pMainView->area_obj, x+w/2, y+h);
+       evas_object_geometry_get(obj, &x, &y, &w, &h);
+       MSG_MAIN_MED("x = %d, y = %d, w = %d, h = %d", x, y, w, h);
 
+       ivug_listpopup_context_show(popup, pMainView->area_obj, x+w/2, y+h/2);
 }
 
old mode 100755 (executable)
new mode 100644 (file)
index 2842481..9dcbcd0
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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_MAINVIEW_MENU_H__
 #define __IVUG_MAINVIEW_MENU_H__
@@ -28,7 +28,10 @@ extern "C" {
 
 void on_btn_selectcancel_clicked(void *data, Evas_Object *obj, void *event_info);
 void on_btn_selectok_clicked(void *data, Evas_Object *obj, void *event_info);
+void on_btn_edit_clicked(void *data, Evas_Object *obj, void *event_info);
 void on_btn_slideshow_clicked(void *data, Evas_Object *obj, void *event_info);
+void on_btn_tag_clicked(void *data, Evas_Object *obj, void *event_info);
+void on_btn_save_clicked(void *data, Evas_Object *obj, void *event_info);
 void on_btn_share_clicked(void *data, Evas_Object *obj, void *event_info);
 void on_btn_delete_clicked(void *data, Evas_Object *obj, void *event_info);
 void on_btn_details_clicked(void *data, Evas_Object *obj, void *event_info);
@@ -37,7 +40,7 @@ void on_btn_back_clicked(void *data, Evas_Object *obj, void *event_info);
 void on_btn_details_close_clicked(void *data, Evas_Object *obj, void *event_info);
 
 void on_btn_rename_clicked(void *data, Evas_Object *obj, void *event_info);
-void on_btn_tool_clicked(void *data, Evas_Object *obj, void *event_info);
+void on_btn_more_clicked(void *data, Evas_Object *obj, void *event_info);
 
 void _ivug_selectioninfo_create(Ivug_MainView *pMainView, const char *string);
 
old mode 100755 (executable)
new mode 100644 (file)
index 0cdaaa8..42374bf
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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-main-view.h"
 #define ICON_PATH_DELETE               CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_delete.png"
 #define ICON_PATH_SHARE                CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_share.png"
 #define ICON_PATH_SETAS                CONTROL_ICON_DIRECTORY_PATH"/T01_1_title_icon_set_as.png"
+#define ICON_PATH_ADDTAG               CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_addtag.png"
 #define ICON_PATH_SLIDESHOW    CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_slideshow.png"
+#define ICON_PATH_EDITOR               CONTROL_ICON_DIRECTORY_PATH"/T01_Option tray_Edit.png"
+#define ICON_PATH_TRIM                         CONTROL_ICON_DIRECTORY_PATH"/01_controlbar_icon_trim.png"
 #define ICON_PATH_INFO                 CONTROL_ICON_DIRECTORY_PATH"/T01_1_controlbar_icon_detail.png"
 #define ICON_PATH_SAVE                 CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_save.png"
 #define ICON_PATH_CLOSE                        CONTROL_ICON_DIRECTORY_PATH"/01_controllbar_icon_close.png"
+#define ICON_PATH_ALLSHARE             CONTROL_ICON_DIRECTORY_PATH"/T01_1_title_icon_device.png"
 #define ICON_PATH_MORE                 CONTROL_ICON_DIRECTORY_PATH"/T01_Title_icon_more.png"
 
-static void _toolbar_item_append(ControlBar_Item * /*INOUT*/item, Evas_Object *parent, const char *iconpath, const char *caption, Evas_Smart_Cb fnClick, void *data)
-{
-       item->item = elm_toolbar_item_append(parent, iconpath, NULL, fnClick, data);
 
-       item->pos = TOOLBUTTON_IN_TOOLBAR;
-}
+#define MIME_TYPE_LEN                  (255)
+#define MIME_TYPE_3GPP                 "video/3gpp"
+#define PATH_CAMERA_LOCAL              "/opt/usr/media/Camera"
+#define PATH_CAMERA_SDCARD             "/opt/storage/sdcard/Camera"
 
-static void _ctrlbar_item_append(ControlBar_Item * /*INOUT*/item, Evas_Object *parent, const char *iconpath, const char *caption, Evas_Smart_Cb fnClick, void *data)
-{
-       item->item = elm_toolbar_item_append(parent, iconpath, NULL, fnClick, data);
+/* Video editor can start when video exist in camera folder and 3gp file format */
 
-       item->pos = TOOLBUTTON_IN_CTRLBAR;
-}
-
-static void _toolbutton_set_disabled(ControlBar_Item * /*INOUT*/item)
+bool ivug_is_editable_video_file(char *filepath)
 {
-       if ( item->item == NULL )
-               return;
-
-       /*if(item->pos == TOOLBUTTON_IN_TOOLBAR)
-       {
-               Evas_Object *button = elm_object_item_part_content_get(item->item, "object");
-               elm_object_disabled_set(button, EINA_TRUE);
-       }
-       else*/
+       MSG_UTIL_MED("path = %s", filepath);
+       if(strncmp(filepath, PATH_CAMERA_LOCAL, strlen(PATH_CAMERA_LOCAL)) == 0
+               || strncmp(filepath, PATH_CAMERA_SDCARD, strlen(PATH_CAMERA_SDCARD)) == 0)
        {
-               elm_object_item_disabled_set(item->item, EINA_TRUE);
-       }
-}
+               efreet_mime_init();
+               const char *type = NULL;
+               type = efreet_mime_type_get(ivug_get_filename(filepath));
+               efreet_mime_shutdown();
 
-static void _toolbutton_set_enabled(ControlBar_Item * /*INOUT*/item)
-{
-       if ( item->item == NULL )
-               return;
-
-       /*if(item->pos == TOOLBUTTON_IN_TOOLBAR)
-       {
-               Evas_Object *button = elm_object_item_part_content_get(item->item, "object");
-               elm_object_disabled_set(button, EINA_FALSE);
-       }
-       else*/
-       {
-               elm_object_item_disabled_set(item->item, EINA_FALSE);
+               MSG_UTIL_MED("mime type = %s", type);
+               if(strcmp(type, MIME_TYPE_3GPP) == 0)
+               {
+                       return true;
+               }
        }
+       return false;
 }
 
-
 ivug_toolbar
 _get_tool_bar_type(ivug_mode mode, Media_Type slide_type )
 {
@@ -96,7 +81,6 @@ _get_tool_bar_type(ivug_mode mode, Media_Type slide_type )
        {
                case IVUG_MODE_NORMAL:
                case IVUG_MODE_CAMERA:
-               case IVUG_MODE_SLIDESHOW:
                        tool_bar_type = NAVI_BAR_TYPE_EMPTY;
                        if (slide_type == SLIDE_TYPE_IMAGE)
                        {
@@ -106,6 +90,10 @@ _get_tool_bar_type(ivug_mode mode, Media_Type slide_type )
                        {
                                tool_bar_type = NAVI_BAR_TYPE_VIDEO;
                        }
+                       else if (slide_type == SLIDE_TYPE_WEB_IMAGE)
+                       {
+                               tool_bar_type = NAVI_BAR_TYPE_WEB_IMAGAE;
+                       }
                        else if (slide_type == SLIDE_TYPE_STREAMING)
                        {
                                tool_bar_type = NAVI_BAR_TYPE_EMPTY;
@@ -117,7 +105,14 @@ _get_tool_bar_type(ivug_mode mode, Media_Type slide_type )
                break;
                case IVUG_MODE_SINGLE:
                case IVUG_MODE_FILE:
-                       tool_bar_type = NAVI_BAR_TYPE_FILE;
+                       if(slide_type == SLIDE_TYPE_WEB_IMAGE)
+                       {
+                               tool_bar_type = NAVI_BAR_TYPE_WEB_IMAGAE;
+                       }
+                       else
+                       {
+                               tool_bar_type = NAVI_BAR_TYPE_FILE;
+                       }
 
                break;
                case IVUG_MODE_DISPLAY:
@@ -147,19 +142,25 @@ _get_ctrl_bar_type(ivug_mode mode, Media_Type slide_type)
                "[ Invalid ]",
                "[ None ]",
                "[Delete,Share,Set,Info]",
+               "[Delete,Share,Set,Info, Editor]",
+               "[Delete,Share,Set,Info, Trim]",
                "[Share, Set, Save, Info]",
-               "[Delete,Share, Slide show]",
+               "[Delete,Share, Add tag, Slide show, Editor]",
+               "[Delete,Share, Add tag, Slide show, Trim]",
        };
 
        switch (mode)
        {
                case IVUG_MODE_NORMAL:
                case IVUG_MODE_CAMERA:
-               case IVUG_MODE_SLIDESHOW:
                        if (slide_type == SLIDE_TYPE_IMAGE)
                        {
                                type = CTRL_BAR_TYPE_IMAGE;
                        }
+                       else if (slide_type == SLIDE_TYPE_WEB_IMAGE || slide_type == SLIDE_TYPE_STREAMING)
+                       {
+                               type = CTRL_BAR_TYPE_READ_ONLY;
+                       }
                        else if (slide_type == SLIDE_TYPE_VIDEO)
                        {
                                type = CTRL_BAR_TYPE_VIDEO;
@@ -176,7 +177,14 @@ _get_ctrl_bar_type(ivug_mode mode, Media_Type slide_type)
                break;
                case IVUG_MODE_SINGLE:
                case IVUG_MODE_FILE:
-                       type = CTRL_BAR_TYPE_FILE;
+                       if(slide_type == SLIDE_TYPE_WEB_IMAGE)
+                       {
+                               type = CTRL_BAR_TYPE_READ_ONLY;
+                       }
+                       else
+                       {
+                               type = CTRL_BAR_TYPE_FILE;
+                       }
                break;
                case IVUG_MODE_DISPLAY:
                        type = CTRL_BAR_TYPE_EMPTY;
@@ -192,287 +200,85 @@ _get_ctrl_bar_type(ivug_mode mode, Media_Type slide_type)
        MSG_MAIN_MED("Mode=%d Slide=%d CtrlBar=%s", mode, slide_type, szType[type]);
 
        return type;
-
-}
-
-
-
-
-Evas_Object *_create_ctrl_bar(Evas_Object *parent)
-{
-       Evas_Object *toolbar = elm_toolbar_add(parent);
-
-//create control bar
-       if (toolbar == NULL)
-       {
-               MSG_MAIN_ERROR("controlbar create failed");
-               return NULL;
-       }
-
-       elm_object_style_set(toolbar, "default");
-       elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_EXPAND);
-
-       //elm_toolbar_homogeneous_set(toolbar, EINA_FALSE);
-
-       MSG_MAIN_HIGH("Create ctrl_bar. Obj=0x%08x", toolbar);
-
-       return toolbar;
-
 }
 
-Evas_Object *_create_tool_bar(Evas_Object *parent)
-{
-       Evas_Object *toolbar;
-
-       toolbar = ivug_controlbar_add(parent, "naviframe");
-
-       MSG_MAIN_HIGH("Create tool_bar. Obj=0x%08x", toolbar);
-
-       return toolbar;
-}
-
-
-
-void _update_tool_bar(Ivug_MainView *pMainView, ivug_toolbar barType)
+void _update_toolbuttons(Ivug_MainView *pMainView)
 {
 
 /*
    |------------------|
    |elm_navigation_bar|
    |------------------|
-   |  tool_bar           |
-   |------------------|
    |                             |
    |                             |
    |                             |
    |                             |
    |------------------|
-   |   ctrl_bar          |
+   |   tool_bar          |
    |------------------|
 */
-       Evas_Object *tool_bar = pMainView->tool_bar;
 
-       MSG_MAIN_HIGH("Update tool_bar. Type=%d", barType);
-
-//remove old control bar item.
-       int i = 0;
+       slide_state_t state = ivug_slider_get_state(pMainView->slider);
 
-       for ( i = 0; i< TOOLBUTTON_MAX ; i++)
+       if(pMainView->view_by == IVUG_VIEW_BY_WEB || pMainView->view_by == IVUG_VIEW_BY_WEBALBUM)
        {
-               if ( pMainView->items[i].pos == TOOLBUTTON_IN_TOOLBAR )
+               if(state == SLIDE_STATE_LOADED)
                {
-                       elm_object_item_del(pMainView->items[i].item);
-                       pMainView->items[i].item = NULL;
-                       pMainView->items[i].pos = TOOLBUTTON_IN_NONE;
+                       elm_object_disabled_set(pMainView->btn_share, EINA_FALSE);
+                       elm_object_disabled_set(pMainView->btn_download, EINA_FALSE);
                }
        }
-
-       switch(barType)
+       else if(pMainView->view_by == IVUG_VIEW_BY_PTP)
        {
-       case NAVI_BAR_TYPE_IMAGE:
-               _toolbar_item_append(&pMainView->items[TOOLBUTTON_SHARE], tool_bar, ICON_PATH_SHARE, NULL, on_btn_share_clicked, pMainView);
-               _toolbar_item_append(&pMainView->items[TOOLBUTTON_SETAS], tool_bar, ICON_PATH_SETAS, NULL, on_btn_setas_clicked, pMainView);
-               _toolbar_item_append(&pMainView->items[TOOLBUTTON_TOOL], tool_bar, ICON_PATH_MORE, NULL, on_btn_tool_clicked, pMainView);
-
-               break;
-       case NAVI_BAR_TYPE_VIDEO:
-               _toolbar_item_append(&pMainView->items[TOOLBUTTON_SHARE], tool_bar, ICON_PATH_SHARE, NULL, on_btn_share_clicked, pMainView);
-               _toolbar_item_append(&pMainView->items[TOOLBUTTON_TOOL], tool_bar, ICON_PATH_MORE, NULL, on_btn_tool_clicked, pMainView);
-
-               break;
-       case NAVI_BAR_TYPE_FILE:
-               _toolbar_item_append(&pMainView->items[TOOLBUTTON_SHARE], tool_bar, ICON_PATH_SHARE, NULL, on_btn_share_clicked, pMainView);
-               _toolbar_item_append(&pMainView->items[TOOLBUTTON_SETAS], tool_bar, ICON_PATH_SETAS, NULL, on_btn_setas_clicked, pMainView);
-               _toolbar_item_append(&pMainView->items[TOOLBUTTON_TOOL], tool_bar, ICON_PATH_MORE, NULL, on_btn_tool_clicked, pMainView);
-
-               break;
-       case NAVI_BAR_TYPE_SELECT:
-               _toolbar_item_append(&pMainView->items[TOOLBUTTON_OK], tool_bar, ICON_PATH_SAVE, NULL, on_btn_selectok_clicked, pMainView);
-               _toolbar_item_append(&pMainView->items[TOOLBUTTON_CANCEL], tool_bar, ICON_PATH_CLOSE, NULL, on_btn_selectcancel_clicked, pMainView);
-
-               break;
-       default:
-               MSG_MAIN_ERROR("Unhandled... %d", barType);
-               break;
-
-       }
-
-}
-
-
-void _update_ctrl_bar(Ivug_MainView *pMainView, ivug_ctrlbar barType)
-{
-       Evas_Object *ctrl_bar = pMainView->ctrl_bar;
-
-       MSG_MAIN_HIGH("Update ctrl_bar. barType=%d", barType);
-
-//remove old control bar item.
-       int i = 0;
-
-       for ( i = 0; i< TOOLBUTTON_MAX ; i++)
-       {
-               if ( pMainView->items[i].pos == TOOLBUTTON_IN_CTRLBAR )
+               if(state == SLIDE_STATE_LOADED)
                {
-                       elm_object_item_del(pMainView->items[i].item);
-                       pMainView->items[i].item = NULL;
-                       pMainView->items[i].pos = TOOLBUTTON_IN_NONE;
+                       elm_object_disabled_set(pMainView->btn_share, EINA_FALSE);
                }
        }
-
-/*
-       IVUG_MODE_NORMAL =>
-               Depends on content
-                       Image [Delete,Share, Slide show]  -> CTRL_BAR_TYPE_IMAGE
-                       Video [Delete,Share, Slide show]  -> CTRL_BAR_TYPE_VIDEO
-
-       IVUG_MODE_SINGLE, IVUG_MODE_FILE,  => CTRL_BAR_TYPE_FILE [Delete,Share,Set,Info]
-       IVUG_MODE_DISPLAY => CTRL_BAR_TYPE_EMPTY
-
-       if ((mode == IVUG_MODE_FILE) || (mode == IVUG_MODE_SINGLE))
-               barType == CTRL_BAR_TYPE_FILE
-
-*/
-       switch(barType)
-       {
-       case CTRL_BAR_TYPE_FILE:
-               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_DELETE], ctrl_bar, ICON_PATH_DELETE, NULL, on_btn_delete_clicked, pMainView);
-               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_DETAILS], ctrl_bar, ICON_PATH_INFO, NULL, on_btn_details_clicked, pMainView);
-               break;
-
-       case CTRL_BAR_TYPE_IMAGE:
-               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_DELETE], ctrl_bar, ICON_PATH_DELETE, NULL, on_btn_delete_clicked, pMainView);
-               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_SLIDESHOW], ctrl_bar, ICON_PATH_SLIDESHOW, NULL, on_btn_slideshow_clicked, pMainView);
-               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_DETAILS], ctrl_bar, ICON_PATH_INFO, NULL, on_btn_details_clicked, pMainView);
-               break;
-
-       case CTRL_BAR_TYPE_VIDEO:
-               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_DELETE], ctrl_bar, ICON_PATH_DELETE, NULL, on_btn_delete_clicked, pMainView);
-               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_SLIDESHOW], ctrl_bar, ICON_PATH_SLIDESHOW, NULL, on_btn_slideshow_clicked, pMainView);
-               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_DETAILS], ctrl_bar, ICON_PATH_INFO, NULL, on_btn_details_clicked, pMainView);
-               break;
-
-       default:
-               MSG_MAIN_ERROR("Unhandled ctrl bar type=%d", barType);
-               break;
-       }
-
-//     ivug_main_view_on_rotate( pMainView, gGetRotationDegree());     // TODO
 }
 
-
-void _update_toolbuttons(Ivug_MainView *pMainView)
+void _create_main_menu(Ivug_MainView *pMainView)
 {
-// If Inavalid image, disable all buttons.
-       slide_state_t state = ivug_slider_get_state(pMainView->slider);
-
-       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
-       Media_Data *mdata = ivug_medialist_get_data(mitem);
-
-       _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_NULL]);
-
-       if ( state == SLIDE_STATE_ERROR)
+       if(pMainView->view_by == IVUG_VIEW_BY_WEB || pMainView->view_by == IVUG_VIEW_BY_WEBALBUM)
        {
-               _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_SETAS]);
-               _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_TOOL]);
+               Evas_Object *btn_more = ivug_button_add(pMainView->navi_bar, "naviframe/more/default",
+                                                                       NULL, NULL, on_btn_more_clicked, pMainView);
+               elm_object_item_part_content_set(pMainView->navi_it, "toolbar_more_btn", btn_more);
 
-               return ;
-       }
-
-// Enable all button
-       int i = 0;
-       for ( i = 0; i< TOOLBUTTON_MAX ; i++)
-       {
-               _toolbutton_set_enabled(&pMainView->items[i]);
-       }
-
-// If Video, DRM, disable SetAs button
-// If Video when CTRL_BAR_TYPE_FILE, disable Set
-
-       if (mdata->slide_type == SLIDE_TYPE_STREAMING)
-       {
-               _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_SHARE]);
-               _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_SETAS]);
-       }
-       // If uneditable video, disable Editor
-       else if (mdata->slide_type == SLIDE_TYPE_VIDEO)
-       {
-               _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_TOOL]);
-       }
-
-       if(mdata->bIsDRMContent == EINA_TRUE)
-       {
-               _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_TOOL]);
-               if(ivug_drm_is_possible_to_setas(mdata->filepath, IVUG_DRM_SETAS_WALLPAPER) == false &&
-                          ivug_drm_is_possible_to_setas(mdata->filepath, IVUG_DRM_SETAS_CALLERID) == false)
-               {
-                       _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_SETAS]);
-               }
-               if(ivug_drm_get_forwarding_info(mdata->filepath) == false)
-               {
-                       _toolbutton_set_disabled(&pMainView->items[TOOLBUTTON_SHARE]);
-               }
-       }
-}
-
-void _change_details_to_close(Ivug_MainView *pMainView)
-{
-       IV_ASSERT(pMainView != NULL);
+               pMainView->btn_share = ivug_button_add(pMainView->navi_bar, "naviframe/toolbar/default",
+                                                                       IDS_SHARE, NULL, on_btn_share_clicked, pMainView);
+               elm_object_item_part_content_set(pMainView->navi_it, "toolbar_button1", pMainView->btn_share);
 
-       Evas_Object *btn;
-
-// Change "details" to "close"
-       if ( pMainView->items[TOOLBUTTON_DETAILS].pos == TOOLBUTTON_IN_CTRLBAR )        // If detail button is in ctrl_bar
-       {
-               // Remove details item & Add close item
-               btn = elm_object_item_part_content_unset(pMainView->items[TOOLBUTTON_DETAILS].item, "object");
-               evas_object_del(btn);
+               pMainView->btn_download = ivug_button_add(pMainView->navi_bar, "naviframe/toolbar/default",
+                                                                       IDS_DOWNLOAD, NULL, on_btn_save_clicked, pMainView);
+               elm_object_item_part_content_set(pMainView->navi_it, "toolbar_button2", pMainView->btn_download);
 
-               elm_object_item_del(pMainView->items[TOOLBUTTON_DETAILS].item);
-               pMainView->items[TOOLBUTTON_DETAILS].item = NULL;
-
-               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_DETAILS], pMainView->ctrl_bar, ICON_PATH_CLOSE, NULL, on_btn_details_close_clicked, pMainView);
+               elm_object_disabled_set(pMainView->btn_share, EINA_TRUE);
+               elm_object_disabled_set(pMainView->btn_download, EINA_TRUE);
        }
-       else
+       else if(pMainView->view_by == IVUG_VIEW_BY_ALLSHARE)
        {
-               // Remove details item & Add close item
-               btn = elm_object_item_part_content_unset(pMainView->items[TOOLBUTTON_DETAILS].item, "object");
-               evas_object_del(btn);
-
-               elm_object_item_del(pMainView->items[TOOLBUTTON_DETAILS].item);
-               pMainView->items[TOOLBUTTON_DETAILS].item = NULL;
-
-               _toolbar_item_append(&pMainView->items[TOOLBUTTON_DETAILS], pMainView->tool_bar, ICON_PATH_CLOSE, NULL, on_btn_details_close_clicked, pMainView);
+               //TODO: add more, connection info, download btn
        }
-
-}
-
-void _change_close_to_details(Ivug_MainView *pMainView)
-{
-       IV_ASSERT(pMainView != NULL);
-
-       Evas_Object *btn;
-
-       if ( pMainView->items[TOOLBUTTON_DETAILS].pos == TOOLBUTTON_IN_CTRLBAR )        // If detail button is in ctrl_bar
+       else if(pMainView->mode == IVUG_MODE_DISPLAY)
        {
-               // Remove details item & Add close item
-               btn = elm_object_item_part_content_unset(pMainView->items[TOOLBUTTON_DETAILS].item, "object");
-               evas_object_del(btn);
-
-               elm_object_item_del(pMainView->items[TOOLBUTTON_DETAILS].item);
-               pMainView->items[TOOLBUTTON_DETAILS].item = NULL;
-
-               _ctrlbar_item_append(&pMainView->items[TOOLBUTTON_DETAILS], pMainView->ctrl_bar, ICON_PATH_INFO, NULL, on_btn_details_clicked, pMainView);
+               Evas_Object *btn_save = ivug_button_add(pMainView->navi_bar, "naviframe/toolbar/default",
+                                                                       IDS_SAVE, NULL, on_btn_selectok_clicked, pMainView);
+               elm_object_item_part_content_set(pMainView->navi_it, "toolbar_button1", btn_save);
        }
        else
        {
-               // Remove details item & Add close item
-               btn = elm_object_item_part_content_unset(pMainView->items[TOOLBUTTON_DETAILS].item, "object");
-               evas_object_del(btn);
+               Evas_Object *btn_more = ivug_button_add(pMainView->navi_bar, "naviframe/more/default",
+                                                                       NULL, NULL, on_btn_more_clicked, pMainView);
+               elm_object_item_part_content_set(pMainView->navi_it, "toolbar_more_btn", btn_more);
 
-               elm_object_item_del(pMainView->items[TOOLBUTTON_DETAILS].item);
-               pMainView->items[TOOLBUTTON_DETAILS].item = NULL;
+               pMainView->btn_share = ivug_button_add(pMainView->navi_bar, "naviframe/toolbar/default",
+                                                                       IDS_SHARE, NULL, on_btn_share_clicked, pMainView);
+               elm_object_item_part_content_set(pMainView->navi_it, "toolbar_button1", pMainView->btn_share);
 
-               _toolbar_item_append(&pMainView->items[TOOLBUTTON_DETAILS], pMainView->tool_bar, ICON_PATH_INFO, NULL, on_btn_details_clicked, pMainView);
+               Evas_Object *btn_del = ivug_button_add(pMainView->navi_bar, "naviframe/toolbar/default",
+                                                                       IDS_DELETE, NULL, on_btn_delete_clicked, pMainView);
+               elm_object_item_part_content_set(pMainView->navi_it, "toolbar_button2", btn_del);
        }
 }
 
old mode 100755 (executable)
new mode 100644 (file)
index 080a5e0..bb714e8
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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_VIEW_TOOLBAR_H__
 #define __IVUG_MAIN_VIEW_TOOLBAR_H__
@@ -27,17 +27,15 @@ ivug_toolbar _get_tool_bar_type(ivug_mode mode, Media_Type slide_type );
 Evas_Object *_create_ctrl_bar(Evas_Object *parent);
 Evas_Object *_create_tool_bar(Evas_Object *parent);
 
-
-void _update_ctrl_bar(Ivug_MainView *pMainView, ivug_ctrlbar barType);
-void _update_tool_bar(Ivug_MainView *pMainView, ivug_toolbar barType);
-
 /*
        Enable / Disable buttons on tool bar
 */
 void _update_toolbuttons(Ivug_MainView *pMainView);
 
-
 void _change_close_to_details(Ivug_MainView *pMainView);
 void _change_details_to_close(Ivug_MainView *pMainView);
 
+void _create_main_menu(Ivug_MainView *pMainView);
+
 #endif // __IVUG_MAIN_VIEW_TOOLBAR_H__
+
old mode 100755 (executable)
new mode 100644 (file)
index 6a4b543..cec5301
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 <vconf.h>
 #include "ivug-listpopup.h"
 #include "ivug-slideshow.h"
 
+
 #include "ivug-ext-ug.h"
 
-#include "ivug-drm.h"
+#include "ivug-drm-common.h"
 #include "EFLUtil.h"
 
+
 #include "ivug-image.h"
 
+
+
 #undef HIDE_INDICATOR          // For testing.
 #define TEST_MOUSE_EVENT
 
 static bool _destory_slideshow_and_ug(Ivug_MainView *pMainView, int state, bool bMmc_out);
 static void _on_slideshow_finished(void *data, Evas_Object *obj, void *event_info);
 
-
-static void
-_send_result_footsteps(ui_gadget_h ug)
-{
-//result bundle key
-#define IVUG_RESULT_BUNDLE_KEY_EXIT "EXIT"
-
-//result bundle value
-#define IVUG_RESULT_BUNDLE_VALUE_NORMAL                        "NORMAL"
-
-       ivug_ret_if(!ug);
-
-       service_h service;
-       service_create(&service);
-
-       service_add_extra_data(service, IVUG_RESULT_BUNDLE_KEY_EXIT, IVUG_RESULT_BUNDLE_VALUE_NORMAL);
-       ug_send_result(gGetUGHandle(), service);
-
-       service_destroy(service);
-}
-
 static void _update_title(Ivug_MainView *pMainView)
 {
 #define MAX_TITLE_LEN  256
@@ -100,30 +83,34 @@ static void _update_title(Ivug_MainView *pMainView)
        Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
        Media_Data *mdata = ivug_medialist_get_data(mitem);
 
-
        if (mdata == NULL)
        {
                MSG_MAIN_ERROR("slider data is NULL");
                return;
        }
 
-       if (pMainView->view_by == IVUG_VIEW_BY_FOLDER || pMainView->view_by == IVUG_VIEW_BY_ALL)
+       if (pMainView->view_by == IVUG_VIEW_BY_FOLDER
+               || pMainView->view_by == IVUG_VIEW_BY_ALL
+               || pMainView->view_by == IVUG_VIEW_BY_ALLSHARE
+               || pMainView->view_by == IVUG_VIEW_BY_PLACES
+               || pMainView->view_by == IVUG_VIEW_BY_WEBALBUM)
        {
-               snprintf(title, sizeof(title), "%s", pMainView->album_name);
-               snprintf(subtitle, sizeof(subtitle), "%d/%d",
+               snprintf(title, sizeof(title), "%d/%d",
                        mdata->index + 1,
                        ivug_medialist_get_count(pMainView->mList));    //get title.
-
-               elm_object_item_part_text_set(pMainView->navi_it, "subtitle", subtitle);
        }
-       else if(mdata->filepath != NULL)
+       else if(mdata->fileurl != NULL)
        {
-               const char* filename = ivug_get_filename(mdata->filepath);
+               const char* filename = ivug_get_filename(mdata->fileurl);
                if(filename)
                {
                        snprintf(title, sizeof(title), "%s", filename);
                }
        }
+       else
+       {
+               MSG_MAIN_ERROR("set Title error");
+       }
 
        IV_ASSERT(pMainView->navi_bar != NULL);
 
@@ -133,28 +120,6 @@ static void _update_title(Ivug_MainView *pMainView)
 
 }
 
-static bool _is_mmc_inserted(void)
-{
-       int noti_message;
-       int ret = -1;
-
-       ret = vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &noti_message);
-
-       if ( ret != 0 ) // falied
-       {
-               MSG_NOTI_ERROR("Get %s is failed", VCONFKEY_SYSMAN_MMC_STATUS);
-               return false;
-       }
-
-       if(noti_message==VCONFKEY_SYSMAN_MMC_MOUNTED)
-       {
-               return true;
-       }
-
-       return false;
-
-}
-
 
 static void
 _on_longpress_popup_selected(void *data, Evas_Object *obj, void *event_info)
@@ -184,7 +149,7 @@ _on_longpress_popup_selected(void *data, Evas_Object *obj, void *event_info)
                // This Will add to the article
                char buf[IVUG_MAX_FILE_PATH_LEN] = {0,};
 
-               if(mdata->slide_type == SLIDE_TYPE_STREAMING)
+               if(mdata->slide_type == SLIDE_TYPE_WEB_IMAGE || mdata->slide_type == SLIDE_TYPE_STREAMING)
                {
                        path = mdata->fileurl;
                        len = strlen(mdata->fileurl)+1;
@@ -210,6 +175,7 @@ _on_longpress_popup_selected(void *data, Evas_Object *obj, void *event_info)
        }
 }
 
+
 static Eina_Bool _on_key_down(void *user_data, int type, void *event)
 {
        if (!user_data) {
@@ -270,10 +236,16 @@ static void _on_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
        if(pMainView->ssHandle)
                ivug_ss_resize(pMainView->ssHandle);
        MSG_MAIN_HIGH("MainView resized geomtery XYWH(%d,%d,%d,%d) Rotate=%d", x, y, w, h, gGetRotationDegree());
+
+       if(pMainView->ctx_popup)        // when rotated context popup will disapper at EFL
+       {
+               evas_object_del(pMainView->ctx_popup);
+               pMainView->ctx_popup = NULL;
+       }
 }
 
 static void
-_on_popup_response(void *data, Evas_Object *obj, void *event_info)\r
+_on_timeout_response(void *data, Evas_Object *obj, void *event_info)
 {
        IV_ASSERT(data != NULL);
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
@@ -291,87 +263,54 @@ static bool _destory_slideshow_and_ug(Ivug_MainView *pMainView,
 
        ivug_allow_lcd_off();
        /*from gallery ablum*/
-       if(pMainView->mode == IVUG_MODE_SLIDESHOW || bMmc_out)
-       {
-               MSG_MAIN_HIGH("image viewer end cause slide show ended");
-               DESTROY_ME();
-               return true;
-       }
-       if(state == SLIDE_SHOW_STOPPED)
+       if(bMmc_out)
        {
-               if(pMainView->bFootSteps == true)       // does not exit when View By is by Place
+               if (pMainView->ssHandle)
                {
-                       MSG_MAIN_HIGH("image viewer end cause footsteps slide show ended");
-                       _send_result_footsteps(gGetUGHandle());
-                       DESTROY_ME();
-                       return true;
+                       MSG_MAIN_HIGH("image viewer end cause slide show ended");
+                       ivug_ss_delete(pMainView->ssHandle);
+                       pMainView->ssHandle = NULL;
                }
+
+               DESTROY_ME();
+               return true;
        }
+
        return false;
 }
 
 
-static void _on_mmc_state_changed(keynode_t* node, void *data)
+void _ivug_main_on_mmc_state_changed(keynode_t* node, void *data)
 {
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
        if (NULL == pMainView) {
                return;
        }
 
-       if(_is_mmc_inserted() == false  )
+       if ( pMainView->ext_ug )
        {
-               MSG_IMAGEVIEW_WARN("MMC Removed!. Request destroy UG=0x%08x", gGetUGHandle());
-
-               if ( pMainView->ext_ug )
-               {
-                       MSG_IMAGEVIEW_HIGH("Extern UG is running");
-               }
+               MSG_IMAGEVIEW_HIGH("Extern UG is running");
+       }
 
-               if(pMainView->ssHandle)
+       if(pMainView->ssHandle)
+       {
+               //ivug_timeout_popup_show(ivug_ss_object_get(pMainView->ssHandle), _on_timeout_response, pMainView, IDS_ERROR, IDS_SD_CARD_REMOVED);
+               ivug_ss_set_stop(pMainView->ssHandle);
+               _destory_slideshow_and_ug(pMainView, SLIDE_SHOW_STOPPED, true);
+       } else {
+               //ivug_timeout_popup_show(pMainView->layout, _on_timeout_response, pMainView, IDS_ERROR, IDS_SD_CARD_REMOVED);
+               if(pMainView->exit_timer == NULL)
                {
-                       ivug_1btn_popup_show(ivug_ss_object_get(pMainView->ssHandle), IDS_ERROR, IDS_SD_CARD_REMOVED, _on_popup_response, pMainView);\r
-                       pMainView->ssHandle->state = SLIDE_SHOW_STOPPED;
-                       _destory_slideshow_and_ug(pMainView, pMainView->ssHandle->state, true);
-               } else {
-                       ivug_1btn_popup_show(pMainView->layout, IDS_ERROR, IDS_SD_CARD_REMOVED, _on_popup_response, pMainView);\r
                        pMainView->exit_timer = ecore_timer_add(0.2, _on_exit_timer_expired, data);
                }
        }
 }
 
-static void _show_zoom_icon(void *data)
-{
-       ivug_ret_if(!data);
-
-       MSG_MAIN_ERROR("_show_zoom_icon");
 
-       Ivug_MainView *pMainView = (Ivug_MainView *)data;
-
-       /*unsigned int zoom_level = ivug_slider_zoom_level_get(pMainView->slider);\r
-       if(zoom_level == 0)
-       {
-               edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,btn_zoom_out,disable","elm");
-               edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,btn_zoom_in,enable","elm");
-       }
-       else if(zoom_level == ZOOM_LEVEL_MAX)
-       {
-               edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,btn_zoom_in,disable","elm");
-               edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,btn_zoom_out,enable","elm");
-       }
-       else*/\r
-       {
-               edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,btn_zoom_out,enable","elm");
-               edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,btn_zoom_in,enable","elm");
-       }\r
-\r
-       edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,zoom_slider,show","elm");\r
-}
 
 static void _update_main_view(Ivug_MainView *pMainView)
 {
-       if (NULL == pMainView) {
-               return;
-       }
+       IV_ASSERT(pMainView != NULL);
 
        Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
        Media_Data *mdata = ivug_medialist_get_data(mitem);
@@ -388,51 +327,10 @@ static void _update_main_view(Ivug_MainView *pMainView)
 
        PERF_CHECK_END(LVL6, "Set menu title");
 
-       ivug_ctrlbar ctrlBarType;
-       ivug_toolbar toolBarType;
-
-       ctrlBarType = _get_ctrl_bar_type(pMainView->mode, mdata->slide_type);
-       toolBarType = _get_tool_bar_type(pMainView->mode, mdata->slide_type);
-
-       if ( toolBarType != pMainView->tool_bar_type )          // when change toolbar Type
-       {
-               PERF_CHECK_BEGIN(LVL6, "add toolbar item");
-
-               MSG_MAIN_HIGH("ToolBar update. Old=%d Cur=%d", toolBarType , pMainView->tool_bar_type);
-
-               if ( toolBarType == NAVI_BAR_TYPE_EMPTY )
-               {
-                       elm_object_item_part_content_unset(pMainView->navi_it, "optionheader");         // Unset toolbar
-               }
-               else
-               {
-                       elm_object_item_part_content_set(pMainView->navi_it, "optionheader", pMainView->tool_bar);
-
-                       _update_tool_bar(pMainView, toolBarType);
-               }
-
-               pMainView->tool_bar_type = toolBarType;
-
-               PERF_CHECK_END(LVL6, "add toolbar item");
-       }
-
-       if ( ctrlBarType != pMainView->ctrl_bar_type )  // when change ctrlbar Type
-       {
-               PERF_CHECK_BEGIN(LVL6, "add contolbar item");
-
-               MSG_MAIN_HIGH("CtrlBar update. Old=%d Cur=%d", ctrlBarType , pMainView->ctrl_bar_type);
-               _update_ctrl_bar(pMainView, ctrlBarType);
-               pMainView->ctrl_bar_type = ctrlBarType;
-
-               PERF_CHECK_END(LVL6, "add contolbar item");
-       }
-
-// Enable or Disable toolbar buttons.
-       _update_toolbuttons(pMainView);
-
-       _show_zoom_icon(pMainView);
+       return;
 }
 
+
 static void
 _ivug_main_drm_popup_purchase_cb(void *data, Evas_Object *obj, void *event_info)
 {
@@ -573,7 +471,10 @@ void _ivug_main_view_drm_process(drm_constraints result, int info, void *data)
                case IVUG_DRM_RESULT_DATETIME:
                case IVUG_DRM_RESULT_TIMED_COUNT:
                case IVUG_DRM_RESULT_SYSTEM:
+                       ivug_slider_load(pMainView->slider);
+                       break;
                default :
+                       MSG_MAIN_WARN("Unknown resule : %d", result);
                        ivug_slider_load(pMainView->slider);
                        break;
        }
@@ -588,6 +489,12 @@ _on_slider_clicked(void *data, Evas_Object *obj, void *event_info)
 
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
 
+       if(pMainView->bClickPrevent == true)
+       {
+               pMainView->bClickPrevent = false;
+               return;
+       }
+
 // TODO : Bug. menu bar is blinking when stopping slide show.
        if (pMainView->bShowMenu)
        {
@@ -616,7 +523,11 @@ _on_slider_icon_clicked(void *data, Evas_Object *obj, void *event_info)
                return;
        }
 
-       if (pMainView->mode == IVUG_MODE_FILE || pMainView->mode == IVUG_MODE_DISPLAY || pMainView->mode == IVUG_MODE_SINGLE )
+// "Add tag" in video player shows only when launching from gallery.
+       if (pMainView->view_by == IVUG_VIEW_BY_ALLSHARE)
+       {
+       }
+       else if (pMainView->mode == IVUG_MODE_FILE || pMainView->mode == IVUG_MODE_DISPLAY || pMainView->mode == IVUG_MODE_SINGLE )
        {       // TODO : Need description
                MSG_MAIN_HIGH("Launching simple video player. Mode=%d", pMainView->mode);
                ivug_ext_launch_videoplayer_simple(mdata->filepath);
@@ -654,7 +565,7 @@ static Eina_Bool _ivug_long_press_timer_expired(void *data)
 }
 
 static void
-_on_slider_long_pressed(void *data, Evas_Object *obj, void *event_info)
+_on_slider_long_press_start(void *data, Evas_Object *obj, void *event_info)
 {
        Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
        ivug_ret_if(!data||!p);
@@ -672,6 +583,20 @@ _on_slider_long_pressed(void *data, Evas_Object *obj, void *event_info)
                return;
        }
 
+       Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+       if(mdata == NULL)
+       {
+               MSG_MAIN_ERROR("mdata is NULL");
+               return;
+       }
+
+       if(mdata->slide_type != SLIDE_TYPE_IMAGE)
+       {
+               MSG_MAIN_ERROR("Long pressed. but it is not image");
+               return;
+       }
+
        pMainView->longpress_popup = ivug_longpress_popup_show(pMainView->slider, x, y, _on_longpress_popup_selected, pMainView);
        if (pMainView->longpress_popup == NULL)
        {
@@ -680,6 +605,11 @@ _on_slider_long_pressed(void *data, Evas_Object *obj, void *event_info)
        }
 
        pMainView->bLongpressEnd = false;
+
+       if(pMainView->popup_timer)
+       {
+               ecore_timer_del(pMainView->popup_timer);
+       }
        pMainView->popup_timer = ecore_timer_add(LONGTAP_TIMEOUT, _ivug_long_press_timer_expired, pMainView);
 }
 
@@ -724,6 +654,20 @@ static void _on_remove_main_view_ui(Ivug_MainView *pMainView)
                pMainView->slider = NULL;
        }
 
+       if ( pMainView->pCropView )
+       {
+               MSG_MAIN_HIGH("Crop View Destroy");
+               ivug_crop_view_destroy(pMainView->pCropView);
+               pMainView->pCropView = NULL;
+       }
+
+       if ( pMainView->pNameView )
+       {
+               MSG_MAIN_HIGH("Name View Destroy");
+               ivug_name_view_destroy(pMainView->pNameView);
+               pMainView->pNameView = NULL;
+       }
+
        if ( pMainView->pSetAsView )
        {
                MSG_MAIN_HIGH("SetAS View Destroy");
@@ -739,6 +683,7 @@ static void _on_remove_main_view_ui(Ivug_MainView *pMainView)
                pMainView->pDetailsView = NULL;
        }
 
+
        if(pMainView->layout)           // Remove topmost parent in main view.
        {
                evas_object_del(pMainView->layout);
@@ -757,8 +702,6 @@ static void _on_remove_main_view_ui(Ivug_MainView *pMainView)
                ivug_medialist_del(pMainView->mList);           // ivug_medialist_del() is not working on destroy cb.
                pMainView->mList = NULL;
        }
-
-       //DESTROY_ME();\r
 }
 
 
@@ -777,8 +720,7 @@ _on_slider_item_changed(void *data, Evas_Object *obj, void *event_info)
                // There is no item existed. terminate UG
                MSG_MAIN_ERROR("No item is remained. exit UG. Sitem=0x%08x", sitem);
                _on_remove_main_view_ui(pMainView);
-               DESTROY_ME();\r
-
+               DESTROY_ME();
                return;
        }
 
@@ -810,16 +752,29 @@ _on_slider_item_changed(void *data, Evas_Object *obj, void *event_info)
                PERF_CHECK_BEGIN(LVL5, "Update main view");
                _update_main_view(pMainView);
                PERF_CHECK_END(LVL5, "Update main view");
-       }\r
-\r
-       pMainView->zoom_level = 1;\r
-       elm_slider_value_set(pMainView->zoom_slider, 1.0);\r
+       }
+
+       Media_Data *mdata = ivug_medialist_get_data(ivug_slider_item_data_get(sitem));
+
+       if(pMainView->best_icon)
+       {
+               evas_object_del(pMainView->best_icon);
+               pMainView->best_icon = NULL;
+       }
+
+
+       if(mdata->bIsDRMContent == true && ivug_drm_get_forwarding_info(mdata->filepath) == false)
+       {
+               elm_object_disabled_set(pMainView->btn_share, EINA_TRUE);
+       }
+
 }
 
 
 static void
 _on_slider_item_state_changed(void *data, Evas_Object *obj, void *event_info)
 {
+// Only called center item state is changed/
        MSG_MAIN_HIGH("Image slider item state changed callback. ");
        ivug_ret_if(!data);
 
@@ -835,6 +790,12 @@ _on_slider_item_state_changed(void *data, Evas_Object *obj, void *event_info)
                return;
        }
 
+       if(sitem->state == SLIDE_STATE_DOWNLOAD_FAILED)
+       {
+               MSG_MAIN_ERROR("Download failed");
+               _ivug_selectioninfo_create(pMainView, IDS_DOWNLOAD_FAILED);
+       }
+
 // TODO : DRM consumption
 
 // Update Main View.
@@ -842,9 +803,14 @@ _on_slider_item_state_changed(void *data, Evas_Object *obj, void *event_info)
        {
                _update_toolbuttons(pMainView);
        }
+
+       Media_Data *mdata = ivug_medialist_get_data(ivug_slider_item_data_get(sitem));
+
 }
 
-void _on_receive_mouse_down (void *data, Evas *e, Evas_Object *obj, void *event_info)
+
+
+static void _on_receive_mouse_down (void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
        if (NULL == pMainView) {
@@ -857,16 +823,24 @@ void _on_receive_mouse_down (void *data, Evas *e, Evas_Object *obj, void *event_
 }
 
 #ifdef TEST_MOUSE_EVENT
-void _on_receive_mouse_down1 (void *data, Evas *e, Evas_Object *obj, void *event_info)
+static void _on_receive_mouse_down1 (void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       char *name = (char *)data;
+
+       MSG_MAIN_HIGH("Event layer mouse down : %s %s Layer=%d",evas_object_name_get(obj), name, evas_object_layer_get(obj));
+}
+
+static void _on_receive_mouse_up1 (void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
        char *name = (char *)data;
 
-       MSG_MAIN_HIGH("Event layer clicked : %s %s Layer=%d",evas_object_name_get(obj), name, evas_object_layer_get(obj));
+       MSG_MAIN_HIGH("Event layer mouse up : %s %s Layer=%d",evas_object_name_get(obj), name, evas_object_layer_get(obj));
 }
+
 #endif
 
 
-void _on_receive_mouse_up (void *data, Evas *e, Evas_Object *obj, void *event_info)
+static void _on_receive_mouse_up (void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
        if (NULL == pMainView) {
@@ -898,82 +872,26 @@ _on_menu_state_changed(void *data, Evas_Object *obj, const char *emission, const
 }
 
 
-#if 0
-static void
-_need_prev(void *data, Evas_Object *obj, void *event_info)
+static void _win_profile_changed_cb(void *data, Evas_Object * obj, void *event_info)
 {
-       Ivug_MainView *pMainView = static_cast<Ivug_MainView *>(data);
-       if (NULL == pMainView) {
-               return;
-       }
-
-       Thumblist_Block_Index *block = (Thumblist_Block_Index *)event_info;
-
-       Media_Item *iter = (Media_Item *)block->item_data;
-       Media_Data *pData;
-       int i = 0;
-
-       PERF_CHECK_BEGIN("Load thumb list");
-
-       for ( i = 0 ; i < block->count; i++)
-       {
-               iter = ivug_medialist_get_prev(pMainView->mList, iter);
-
-               if ( iter == NULL ) break;
-
-               pData = ivug_medialist_get_data(iter);
-
-               PERF_CHECK_BEGIN("  Prepend Item");
-               if ( pData->thumbnail_path == NULL )
-                       ivug_thumblist_prepend_item(pMainView->thumbs, DEFAULT_THUMBNAIL_PATH, iter);
-               else
-                       ivug_thumblist_prepend_item(pMainView->thumbs, pData->thumbnail_path, iter);
+       Ivug_MainView *pMainView = (Ivug_MainView *)data;
+       IV_ASSERT(pMainView != NULL);
 
-               PERF_CHECK_END("  Prepend Item");
-       }
+       const char *profile = elm_config_profile_get();
 
-       PERF_CHECK_END("Load thumb list");
-}
+       if (!strcmp(profile, "desktop"))
+       {  // desktop mode
 
-static void
-_need_next(void *data, Evas_Object *obj, void *event_info)
-{
-       Ivug_MainView *pMainView = static_cast<Ivug_MainView *>(data);
-       if (NULL == pMainView) {
-               return;
+               // hide naviframe's back key
+               elm_object_item_part_content_set(pMainView->navi_it, "prev_btn", NULL);
        }
+       else
+       {   // mobile
 
-       Thumblist_Block_Index *block = (Thumblist_Block_Index *)event_info;
-
-       Media_Item *iter = (Media_Item *)block->item_data;
-       Media_Data *pData;
-       int i = 0;
-
-       PERF_CHECK_BEGIN("Load thumb list");
-
-       for ( i = 0 ; i < block->count; i++)
-       {
-               iter = ivug_medialist_get_next(pMainView->mList, iter);
-
-               if ( iter == NULL ) break;
-
-               pData = ivug_medialist_get_data(iter);
-
-               PERF_CHECK_BEGIN("  Append Item");
-
-               if ( pData->thumbnail_path == NULL )
-                       ivug_thumblist_append_item(pMainView->thumbs, DEFAULT_THUMBNAIL_PATH, iter);
-               else
-                       ivug_thumblist_append_item(pMainView->thumbs, pData->thumbnail_path, iter);
-
-               PERF_CHECK_END("  Append Item");
+               // show naviframe's back key
+               elm_object_item_part_content_set(pMainView->navi_it, "prev_btn", pMainView->back_btn);
        }
-
-       PERF_CHECK_END("Load thumb list");
-
 }
-#endif
-
 
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -998,7 +916,7 @@ static char * _ivug_get_folder_name(char *filepath)
 
 
 bool
-ivug_main_view_load_list(Ivug_MainView *pMainView, ivug_parameter *ivug_param)
+ivug_main_view_set_list(Ivug_MainView *pMainView, ivug_parameter *ivug_param)
 {
        MSG_MAIN_HIGH("Load media list.");
 
@@ -1017,19 +935,22 @@ ivug_main_view_load_list(Ivug_MainView *pMainView, ivug_parameter *ivug_param)
 
        PERF_CHECK_BEGIN(LVL2, "create filter");
 
-       Filter_struct *filter = ivug_data_filter_create(ivug_param);
+       Filter_struct *filter = ivug_param_create_filter(ivug_param);
        if (filter == NULL)
        {
                MSG_MAIN_ERROR("Creating filter failed");
-               free(mlist);
+               ivug_medialist_del(mlist);
                return false;
        }
 
+       //do not use ivug_param->view_by after here
+
        PERF_CHECK_END(LVL2, "create filter");
 
        Media_Item *current = NULL;
        Media_Data *pData = NULL;
 
+
        {
                PERF_CHECK_BEGIN(LVL2, "media list load");
                current = ivug_medialist_load(mlist, filter);
@@ -1054,24 +975,26 @@ ivug_main_view_load_list(Ivug_MainView *pMainView, ivug_parameter *ivug_param)
                goto LOAD_LIST_FAILED;
        }
 
-
 #ifdef USE_RESCAN_FILE_PATH_AT_LIST
-       if(strncmp(pData->fileurl, ivug_param->filepath, strlen(pData->fileurl)) != 0)
+       if(filter->view_by != IVUG_VIEW_BY_ALLSHARE)    // TODO: for allshare TEST
        {
-               current = ivug_medialist_find_item_by_filename(mlist, ivug_param->filepath);
-               if(current == NULL)
+               if(strncmp(pData->fileurl, ivug_param->filepath, strlen(pData->fileurl)) != 0)
                {
-                       MSG_MAIN_ERROR("Media list load failed, %s is not exist at list", ivug_param->filepath);
-                       goto LOAD_LIST_FAILED;
+                       current = ivug_medialist_find_item_by_filename(mlist, ivug_param->filepath);
+                       if(current == NULL)
+                       {
+                               MSG_MAIN_ERROR("Media list load failed, %s is not exist at list", ivug_param->filepath);
+                               goto LOAD_LIST_FAILED;
+                       }
                }
        }
 #endif
 
-       if(ivug_param->view_by == IVUG_VIEW_BY_ALL)
+       if(filter->view_by == IVUG_VIEW_BY_ALL)
        {
                pMainView->album_name = strdup(IDS_ALL_ALBUMS);
        }
-       else if(ivug_param->view_by == IVUG_VIEW_BY_FOLDER)
+       else if(filter->view_by == IVUG_VIEW_BY_FOLDER)
        {
                // TODO : it is not run!! DB problem!!!
                /*
@@ -1091,21 +1014,18 @@ ivug_main_view_load_list(Ivug_MainView *pMainView, ivug_parameter *ivug_param)
                }
        }
 
-       if(ivug_param->footsteps == true)
-       {
-               pMainView->bFootSteps = true;
-       }
-
        pMainView->mList = mlist;
-
        PERF_CHECK_BEGIN(LVL2, "media list set");
-       if(ivug_slider_set_medialist(pMainView->slider, mlist, current) == EINA_FALSE)
-       {
-               MSG_MAIN_ERROR("ivug_slider_set_medialist error");
-               goto LOAD_LIST_FAILED;
+
+       if(!ivug_slider_set_medialist(pMainView->slider, mlist, current)) {
+                       MSG_MAIN_ERROR("ivug_slider_set_medialist error");
+                       goto LOAD_LIST_FAILED;
        }
+
        PERF_CHECK_END(LVL2, "media list set");
 
+       ivug_data_filter_delete(filter);
+
        return true;
 
 LOAD_LIST_FAILED:
@@ -1124,7 +1044,6 @@ _on_slideshow_finished(void *data, Evas_Object *obj, void *event_info)
        IV_ASSERT(data != NULL);
 
        Ivug_MainView *pMainView = (Ivug_MainView *)data;
-
        int ss_state = (int)event_info;
        bool bDestoryed = false;
        bDestoryed = _destory_slideshow_and_ug(pMainView, ss_state, false);
@@ -1133,110 +1052,41 @@ _on_slideshow_finished(void *data, Evas_Object *obj, void *event_info)
        }
 
        Media_Item * item = NULL;
-       item = ivug_ss_item_get(pMainView->ssHandle);
-       ivug_ss_delete(pMainView->ssHandle);
-       if(item) {
-               ivug_slider_set_item(pMainView->slider, item, SLIDE_INSTANTLY);
-       }
-       pMainView->ssHandle = NULL;
-
-//     ivug_slider_load(pMainView->slider);
-
-       ivug_slider_load(pMainView->slider);
-
-       ivug_main_view_show_menu_bar(pMainView);
-}
-
-static void
-_ivug_main_view_zoom_out_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
-{
-       ivug_ret_if(!obj);
-       ivug_ret_if(!data);
+       bool bDali_slideshow = false;
 
-       MSG_MAIN_ERROR("_ivug_main_view_zoom_out_cb");
-
-       Ivug_MainView *pMainView = (Ivug_MainView *)data;\r
-\r
-       int value = (int)elm_slider_value_get(pMainView->zoom_slider);\r
-\r
-       if(value > 1)\r
-       {\r
-               ivug_main_view_del_hide_timer(pMainView);\r
-\r
-               ivug_slider_zoom_out(pMainView->slider);\r
-               pMainView->zoom_level--;\r
-               elm_slider_value_set(pMainView->zoom_slider, value-1.0);\r
-\r
-               ivug_main_view_set_hide_timer(pMainView);\r
-       }\r
-
-       _show_zoom_icon(data);
-}
+       if(pMainView->ssHandle)
+       {
+               bDali_slideshow = ivug_ss_is_dali(pMainView->ssHandle);
 
-static void
-_ivug_main_view_zoom_in_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
-{
-       ivug_ret_if(!obj);
-       ivug_ret_if(!data);
+               item = ivug_ss_item_get(pMainView->ssHandle);
+               ivug_ss_delete(pMainView->ssHandle);
+               pMainView->ssHandle = NULL;
 
-       MSG_MAIN_ERROR("_ivug_main_view_zoom_in_cb");
+               if(item)
+                       ivug_slider_set_item(pMainView->slider, item, SLIDE_INSTANTLY);
+       }
 
-       Ivug_MainView *pMainView = (Ivug_MainView *)data;\r
-\r
-       int value = (int)elm_slider_value_get(pMainView->zoom_slider);\r
 
-       if(value <= ZOOM_LEVEL_MAX)\r
-       {\r
-               ivug_main_view_del_hide_timer(pMainView);\r
-\r
-               ivug_slider_zoom_in(pMainView->slider);\r
-               pMainView->zoom_level++;\r
-               elm_slider_value_set(pMainView->zoom_slider, value+1.0);\r
-\r
-               ivug_main_view_set_hide_timer(pMainView);\r
-       }\r
+       ivug_slider_load(pMainView->slider);
 
-       _show_zoom_icon(data);
+       if (bDali_slideshow)            // Why??
+       {
+#ifdef HIDE_INDICATOR
+               elm_win_indicator_mode_set(ug_get_window(), ELM_WIN_INDICATOR_HIDE);
+#else
+               if(gIsDesktopMode() == false)
+               {
+                       elm_win_indicator_mode_set((Evas_Object *)ug_get_window(), ELM_WIN_INDICATOR_SHOW);
+               }
+#endif
+               ivug_main_view_set_hide_timer(pMainView);
+               _update_main_view(pMainView);
+       }
+       else
+       {
+               ivug_main_view_show_menu_bar(pMainView);
+       }
 }
-\r
-static void _zoom_slider_change_cb(void *data, Evas_Object *obj, void *event_info)\r
-{\r
-       Ivug_MainView *pMainView = (Ivug_MainView *)data;\r
-\r
-       int value = (int)elm_slider_value_get(pMainView->zoom_slider);\r
-\r
-       MSG_MAIN_HIGH("value = %d", value);\r
-\r
-       while(pMainView->zoom_level > 0\r
-               && pMainView->zoom_level <= ZOOM_LEVEL_MAX+1\r
-               && value != pMainView->zoom_level)\r
-       {\r
-               if(value > pMainView->zoom_level)\r
-               {\r
-                       ivug_slider_zoom_in(pMainView->slider);\r
-                       pMainView->zoom_level++;\r
-               }\r
-               else if(value < pMainView->zoom_level)\r
-               {\r
-                       ivug_slider_zoom_out(pMainView->slider);\r
-                       pMainView->zoom_level--;\r
-               }\r
-       }\r
-}\r
-\r
-static void _zoom_slider_start_cb(void *data, Evas_Object *obj, void *event_info)\r
-{\r
-       Ivug_MainView *pMainView = (Ivug_MainView *)data;\r
-\r
-       ivug_main_view_del_hide_timer(pMainView);\r
-}\r
-\r
-static void _zoom_slider_end_cb(void *data, Evas_Object *obj, void *event_info)\r
-{\r
-       Ivug_MainView *pMainView = (Ivug_MainView *)data;\r
-\r
-       ivug_main_view_set_hide_timer(pMainView);\r
-}\r
 
 Ivug_MainView *
 ivug_main_view_create(Evas_Object* parent, ivug_mode mode, ivug_view_by view_by)
@@ -1255,19 +1105,12 @@ ivug_main_view_create(Evas_Object* parent, ivug_mode mode, ivug_view_by view_by)
        pMainView->parent = parent;
        pMainView->mode = mode;
        pMainView->view_by = view_by;
-       if(mode != IVUG_MODE_SLIDESHOW)
-       {
-               pMainView->bShowMenu = true;
-       }
-       else
-       {
-               pMainView->bShowMenu = false;
-       }
+
+       pMainView->bShowMenu = true;
 
        pMainView->hide_count = -1;
 
-       Evas_Object *layout;
-       layout = elm_layout_add(parent);
+       Evas_Object *layout = EFL::create_layout(parent, IVUG_MAIN_EDJ, "mainview");
        if ( layout == NULL)    //if failed
        {
                MSG_MAIN_ERROR("main layout create failed");
@@ -1280,15 +1123,6 @@ ivug_main_view_create(Evas_Object* parent, ivug_mode mode, ivug_view_by view_by)
 
        PERF_CHECK_END(LVL2, "Create layout");
 
-       PERF_CHECK_BEGIN(LVL2, "elm_layout_file_set");
-       if (elm_layout_file_set(layout, IVUG_MAIN_EDJ, "mainview") == EINA_FALSE)
-       {
-               MSG_MAIN_ERROR("edj loading fail, file=%s group=%s", IVUG_MAIN_EDJ, IVUG_MAIN_EDJ);
-               evas_object_del(layout);
-               free(pMainView);
-               return NULL;
-       }
-
        edje_object_signal_callback_add(_EDJ(pMainView->layout),
                                "menu,hide,finished",
                                "edc",
@@ -1301,10 +1135,6 @@ ivug_main_view_create(Evas_Object* parent, ivug_mode mode, ivug_view_by view_by)
                                _on_menu_state_changed,
                                (void *)pMainView);
 
-       evas_object_show(layout);
-
-       PERF_CHECK_END(LVL2, "elm_layout_file_set");
-
 // Navigation bar
        PERF_CHECK_BEGIN(LVL2, "elm_naviframe_add");
 
@@ -1332,6 +1162,10 @@ ivug_main_view_create(Evas_Object* parent, ivug_mode mode, ivug_view_by view_by)
        {
                elm_object_style_set(pMainView->navi_bar, "ivug-main/noindicator");
        }
+       else
+       {
+               MSG_MAIN_ERROR("Unknown profile : %s", profile);
+       }
 
        elm_object_part_content_set(layout, "mainview.navibar", pMainView->navi_bar);   //swallow
 
@@ -1339,10 +1173,10 @@ ivug_main_view_create(Evas_Object* parent, ivug_mode mode, ivug_view_by view_by)
 
        PERF_CHECK_BEGIN(LVL2, "elm_layout_add");
 
-       pMainView->empty_layout = elm_layout_add(layout);       //create centents layout.
-       if (elm_layout_file_set(pMainView->empty_layout, IVUG_MAIN_EDJ, "navi_content") == EINA_FALSE)
+       pMainView->empty_layout = EFL::create_layout(layout, IVUG_MAIN_EDJ, "navi_content");
+       if (pMainView->empty_layout == NULL)
        {
-               IVUG_DEBUG_WARNING("layout sawllow failed");
+               IVUG_DEBUG_WARNING("layout create failed");
                ivug_main_view_destroy(pMainView);
                return NULL;
        }
@@ -1350,6 +1184,14 @@ ivug_main_view_create(Evas_Object* parent, ivug_mode mode, ivug_view_by view_by)
        evas_object_name_set(pMainView->empty_layout, "Empty layout");
        PERF_CHECK_END(LVL2,"elm_layout_add");
 
+       if(pMainView->view_by != IVUG_VIEW_BY_FILE && pMainView->view_by != IVUG_VIEW_BY_INVAILD)
+       {
+               PERF_CHECK_BEGIN(LVL2, "Create thumblist");
+
+
+               PERF_CHECK_END(LVL2, "Create thumblist");
+       }
+
 //create slider
        PERF_CHECK_BEGIN(LVL2, "ivug_slider_add");
 
@@ -1363,49 +1205,28 @@ ivug_main_view_create(Evas_Object* parent, ivug_mode mode, ivug_view_by view_by)
 
        elm_object_part_content_set(pMainView->empty_layout, "mainview.slider", pMainView->slider);     //swallow
 
-       PERF_CHECK_END(LVL2, "ivug_slider_add");\r
-\r
-       Evas_Object *slider = elm_slider_add(pMainView->empty_layout);\r
-       //elm_slider_indicator_show_set(slider, EINA_TRUE);\r
-       //evas_object_size_hint_weight_set(slider, EVAS_HINT_EXPAND, 0.0);\r
-       //evas_object_size_hint_align_set(slider, EVAS_HINT_FILL, 0.5);\r
-       elm_slider_indicator_format_set(slider, "%1.0f");\r
-       elm_slider_min_max_set(slider, 1, 5);\r
-       elm_slider_value_set(slider, 1);\r
-\r
-       //evas_object_smart_callback_add(slider, "slider,drag,start", _slider_ebook_drag_start_cb, slider);\r
-       //evas_object_smart_callback_add(slider, "slider,drag,stop", _slider_ebook_drag_stop_cb, slider);\r
-       evas_object_smart_callback_add(slider, "changed", _zoom_slider_change_cb, pMainView);\r
-       evas_object_smart_callback_add(slider, "slider,drag,start", _zoom_slider_start_cb, pMainView);\r
-       evas_object_smart_callback_add(slider, "slider,drag,stop", _zoom_slider_end_cb, pMainView);\r
-\r
-       elm_object_part_content_set(pMainView->empty_layout, "zoom_slider_area", slider);       //swallow\r
-\r
-       pMainView->zoom_slider = slider;\r
-       pMainView->zoom_level = 1;\r
-
-       PERF_CHECK_BEGIN(LVL2, "ivug_button_add");
-       Evas_Object *back_btn = ivug_button_add(pMainView->navi_bar, "naviframe/end_btn/default", IDS_BACK, NULL, on_btn_back_clicked, pMainView);
-       PERF_CHECK_END(LVL2, "ivug_button_add");
+       PERF_CHECK_END(LVL2, "ivug_slider_add");
+
+       if (pMainView->mode != IVUG_MODE_DISPLAY)
+       {
+               PERF_CHECK_BEGIN(LVL2, "ivug_button_add");
+               pMainView->back_btn = ivug_button_add(pMainView->navi_bar, "naviframe/end_btn/default", IDS_BACK, NULL, on_btn_back_clicked, pMainView);
+               PERF_CHECK_END(LVL2, "ivug_button_add");
+       }
+       else
+       {
+               PERF_CHECK_BEGIN(LVL2, "ivug_button_add");
+               pMainView->back_btn = ivug_button_add(pMainView->navi_bar, "naviframe/end_btn/default", IDS_BACK, NULL, on_btn_selectcancel_clicked, pMainView);
+               PERF_CHECK_END(LVL2, "ivug_button_add");
+       }
 
        PERF_CHECK_BEGIN(LVL2, "elm_naviframe_item_push");
-       pMainView->navi_it = elm_naviframe_item_push(pMainView->navi_bar, IDS_LOADING , back_btn, NULL, pMainView->empty_layout, NULL);
+       pMainView->navi_it = elm_naviframe_item_push(pMainView->navi_bar, NULL, pMainView->back_btn, NULL, pMainView->empty_layout, NULL);
        PERF_CHECK_END(LVL2, "elm_naviframe_item_push");
 
-       //if (pMainView->mode != IVUG_MODE_DISPLAY && pMainView->mode != IVUG_MODE_SLIDESHOW)           // Display mode has no control bar in bottom.
-       if (pMainView->mode != IVUG_MODE_DISPLAY)               // Display mode has no control bar in bottom.
-       {
-               PERF_CHECK_BEGIN(LVL2, "create ctrl bar");
-               pMainView->ctrl_bar = _create_ctrl_bar(pMainView->navi_bar);
-               evas_object_name_set(pMainView->ctrl_bar, "Main Controlbar");
-               elm_object_item_part_content_set(pMainView->navi_it, "controlbar", pMainView->ctrl_bar);
-               PERF_CHECK_END(LVL2, "create ctrl bar");
-       }
+       evas_object_smart_callback_add((Evas_Object *)ug_get_window(), "profile,changed", _win_profile_changed_cb, pMainView);
 
-       PERF_CHECK_BEGIN(LVL2, "create tool bar");
-       pMainView->tool_bar = _create_tool_bar(pMainView->navi_bar);
-       evas_object_name_set(pMainView->tool_bar, "Main Toolbar");
-       PERF_CHECK_END(LVL2, "create tool bar");
+       _create_main_menu(pMainView);
 
        PERF_CHECK_BEGIN(LVL2, "add event handler");
 
@@ -1413,22 +1234,20 @@ ivug_main_view_create(Evas_Object* parent, ivug_mode mode, ivug_view_by view_by)
 
 //register mouse call back.
        evas_object_smart_callback_add(pMainView->slider, "slider,clicked", _on_slider_clicked, pMainView);
-       evas_object_smart_callback_add(pMainView->slider, "slider,longpressed", _on_slider_long_pressed, pMainView);
+       evas_object_smart_callback_add(pMainView->slider, "slider,longpress,start", _on_slider_long_press_start, pMainView);
        evas_object_smart_callback_add(pMainView->slider, "slider,longpress,end", _on_slider_long_press_end, pMainView);
        evas_object_smart_callback_add(pMainView->slider, "slider,clicked,icon", _on_slider_icon_clicked, pMainView);
 
        evas_object_smart_callback_add(pMainView->slider, "slider,item,changed", _on_slider_item_changed, pMainView);
        evas_object_smart_callback_add(pMainView->slider, "slider,item,state,changed", _on_slider_item_state_changed, pMainView);
 
-       evas_object_event_callback_add(pMainView->slider, EVAS_CALLBACK_MOUSE_DOWN, _on_receive_mouse_down, pMainView);
-       evas_object_event_callback_add(pMainView->slider, EVAS_CALLBACK_MOUSE_UP, _on_receive_mouse_up, pMainView);
-
        //MSG_MAIN_HIGH("binded main win address is %p\n", main_win);
 
 #ifdef TEST_MOUSE_EVENT
        evas_object_event_callback_add(pMainView->navi_bar, EVAS_CALLBACK_MOUSE_DOWN, _on_receive_mouse_down1, (void *)"navigarion");
        evas_object_event_callback_add(pMainView->layout, EVAS_CALLBACK_MOUSE_DOWN, _on_receive_mouse_down1, (void *)"layout");
        evas_object_event_callback_add(pMainView->slider, EVAS_CALLBACK_MOUSE_DOWN, _on_receive_mouse_down1, (void *)"slider");
+       evas_object_event_callback_add(pMainView->slider, EVAS_CALLBACK_MOUSE_UP, _on_receive_mouse_up1, (void *)"slider");
        evas_object_event_callback_add(const_cast<Evas_Object *>(edje_object_part_object_get(_EDJ(pMainView->layout) , "clip")), EVAS_CALLBACK_MOUSE_DOWN, _on_receive_mouse_down1, (void *)"clip");
        evas_object_event_callback_add(const_cast<Evas_Object *>(edje_object_part_object_get(_EDJ(pMainView->layout) , "mainview.navibar")), EVAS_CALLBACK_MOUSE_DOWN, _on_receive_mouse_down1, (void *)"navi swallow");
        evas_object_event_callback_add(pMainView->ctrl_bar, EVAS_CALLBACK_MOUSE_DOWN, _on_receive_mouse_down1, (void *)"controlbar");
@@ -1436,31 +1255,33 @@ ivug_main_view_create(Evas_Object* parent, ivug_mode mode, ivug_view_by view_by)
 
        evas_object_event_callback_add(pMainView->layout, EVAS_CALLBACK_RESIZE, _on_resize, pMainView);
 
-       // zoom icon
-       edje_object_signal_callback_add(_EDJ(pMainView->empty_layout),
-                                       "mainview,zoom_out,clicked",
-                                       "",
-                                       _ivug_main_view_zoom_out_cb,
-                                       (void *)pMainView);
-       edje_object_signal_callback_add(_EDJ(pMainView->empty_layout),
-                                       "mainview,zoom_in,clicked",
-                                       "",
-                                       _ivug_main_view_zoom_in_cb,
-                                       (void *)pMainView);
+       pMainView->keydown_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _on_key_down, (void *)pMainView);
+
+       {
+               int bx, by, bw, bh;
+               evas_object_geometry_get(pMainView->navi_bar, &bx, &by, &bw, &bh);
+
+               MSG_MAIN_HIGH("Navibar Created. (%d,%d,%d,%d)", bx, by, bw, bh);
+       }
 
-       _show_zoom_icon(pMainView);
+       {
+               int bx, by, bw, bh;
+               evas_object_geometry_get(pMainView->slider, &bx, &by, &bw, &bh);
+
+               MSG_MAIN_HIGH("Slider Created. (%d,%d,%d,%d)", bx, by, bw, bh);
+       }
 
-       int ret = -1;
-       MSG_IMAGEVIEW_HIGH("Register System notifications");
-       ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, _on_mmc_state_changed, pMainView);
-       if ( ret == -1 )
        {
-               MSG_IMAGEVIEW_ERROR("Register %s is failed", VCONFKEY_SYSMAN_MMC_STATUS);
+               int bx, by, bw, bh;
+               evas_object_geometry_get(pMainView->empty_layout, &bx, &by, &bw, &bh);
+
+               MSG_MAIN_HIGH("Empty Created. (%d,%d,%d,%d)", bx, by, bw, bh);
        }
 
-       pMainView->keydown_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _on_key_down, (void *)pMainView);
+       int bx, by, bw, bh;
+       evas_object_geometry_get(pMainView->layout, &bx, &by, &bw, &bh);
 
-       MSG_MAIN_HIGH("Main View Created");
+       MSG_MAIN_HIGH("Main View Created. (%d,%d,%d,%d)", bx, by, bw, bh);
 
 // For debugging.
        DELETE_NOTIFY(pMainView->layout);
@@ -1475,22 +1296,32 @@ void ivug_main_view_start_slideshow(Ivug_MainView *pMainView, Eina_Bool bSlideFi
 {
        IV_ASSERT(pMainView != NULL);
 
+       Media_Item *current = NULL;
+
        // Stop animation & movie play before slideshow is started.
        ivug_slider_pause(pMainView->slider);
+       current = ivug_slider_get_item(pMainView->slider);
 
        // TODO : After slideshow is finished, how can I resume???
 
        ivug_prohibit_lcd_off();
-       ivug_main_view_hide_menu_bar(pMainView);
-
-       Media_Item *current = ivug_slider_get_item(pMainView->slider);
+       //ivug_main_view_hide_menu_bar(pMainView);
 
        pMainView->ssHandle = ivug_ss_create(pMainView->layout);
 
 // Register callback
        evas_object_smart_callback_add(ivug_ss_object_get(pMainView->ssHandle),  "slideshow,finished", _on_slideshow_finished, pMainView);
 
-       ivug_ss_start(pMainView->ssHandle, current, pMainView->mList, bSlideFirst);\r
+       if (ivug_ss_is_dali(pMainView->ssHandle) == true )
+       {
+               ivug_main_view_del_hide_timer(pMainView);
+               elm_win_indicator_mode_set((Evas_Object *)ug_get_window(), ELM_WIN_INDICATOR_HIDE);
+       }
+       else
+       {
+               ivug_main_view_hide_menu_bar(pMainView);
+       }
+       ivug_ss_start(pMainView->ssHandle, current, pMainView->mList, bSlideFirst);
 }
 
 
@@ -1507,26 +1338,24 @@ ivug_main_view_start(Ivug_MainView *pMainView)
 {
        IV_ASSERT(pMainView != NULL);
 
-       if(pMainView->mode == IVUG_MODE_SLIDESHOW || pMainView->bFootSteps == true)
+
        {
-               MSG_MAIN_HIGH("Slide show running");
-               ivug_main_view_start_slideshow(pMainView, EINA_FALSE);
-               return;
+               ivug_main_view_set_hide_timer(pMainView);
        }
 
-       ivug_main_view_set_hide_timer(pMainView);
 
        PERF_CHECK_BEGIN(LVL2, "slider start");
        ivug_slider_start(pMainView->slider);
        PERF_CHECK_END(LVL2, "slider start");
 
+
        pMainView->area_obj = evas_object_rectangle_add(evas_object_evas_get(pMainView->layout));
        evas_object_size_hint_expand_set(pMainView->area_obj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_size_hint_fill_set(pMainView->area_obj, EVAS_HINT_FILL, EVAS_HINT_FILL);
        evas_object_color_set(pMainView->area_obj, 0,0,0,0);
        elm_object_part_content_set(pMainView->layout, "mainview.area", pMainView->area_obj);
 
-       evas_object_show(pMainView->area_obj);
+//     evas_object_show(pMainView->area_obj);
 }
 
 
@@ -1534,7 +1363,10 @@ void
 ivug_main_view_resume(Ivug_MainView *pMainView)
 {
        IV_ASSERT(pMainView != NULL);
-
+       if (pMainView->slider == NULL) {
+               MSG_MAIN_HIGH("slider is NULL");
+               return;
+       }
        MSG_MAIN_HIGH("Main View Update");
 
        Media_Item *mitem = ivug_slider_get_item(pMainView->slider);
@@ -1579,8 +1411,9 @@ ivug_main_view_pause(Ivug_MainView *pMainView)
        {
                ivug_ss_stop(pMainView->ssHandle);
        }
-
-       ivug_slider_pause(pMainView->slider);
+       if (pMainView->slider) {
+               ivug_slider_pause(pMainView->slider);
+       }
 
        if(pMainView->bShowMenu == true)
        {
@@ -1597,14 +1430,26 @@ ivug_main_view_destroy(Ivug_MainView *pMainView)
 
        MSG_MAIN_HIGH("ENTER : Main View Destroy. pMainView=0x%08x", pMainView);
 
-       ivug_main_view_del_hide_timer(pMainView);\r
+       ivug_main_view_del_hide_timer(pMainView);
 
        if (pMainView->popup_timer)
        {
                ecore_timer_del(pMainView->popup_timer);
                pMainView->popup_timer = NULL;
        }
-\r
+
+       if (pMainView->popup)
+       {
+               evas_object_del(pMainView->popup);
+               pMainView->popup = NULL;
+       }
+
+       if (pMainView->ss_music_name)
+       {
+               free(pMainView->ss_music_name);
+               pMainView->ss_music_name = NULL;
+       }
+
        if (pMainView->ext_ug)
        {
                MSG_MAIN_HIGH("External UG Destroy");
@@ -1616,21 +1461,8 @@ ivug_main_view_destroy(Ivug_MainView *pMainView)
        {
                ecore_timer_del(pMainView->exit_timer);
                pMainView->exit_timer = NULL;
-       }\r
-\r
-       if ( pMainView->zoom_slider )\r
-       {
-               evas_object_del(pMainView->zoom_slider);\r
-               pMainView->zoom_slider = NULL;\r
-       }\r
-
-       if ( pMainView->slider )
-       {
-               evas_object_del(pMainView->slider);
-               pMainView->slider = NULL;
        }
 
-       int ret = -1;
 
        MSG_MAIN_HIGH("Unregister system notifications");
 
@@ -1640,12 +1472,6 @@ ivug_main_view_destroy(Ivug_MainView *pMainView)
                pMainView->keydown_handler = NULL;
        }
 
-       ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, _on_mmc_state_changed);
-       if ( ret == -1 )
-       {
-               MSG_MAIN_ERROR("Unegister %s is failed", VCONFKEY_SYSMAN_MMC_STATUS);
-       }
-
        if(pMainView->album_name)
        {
                free(pMainView->album_name);
@@ -1686,6 +1512,7 @@ void ivug_main_view_set_hide_timer(Ivug_MainView *pMainView)
        IV_ASSERT(pMainView != NULL);
 
        pMainView->hide_count++;
+       MSG_MAIN_HIGH("hide_count = %d", pMainView->hide_count);
        if(pMainView->hide_count < 0)
        {
                return ;
@@ -1736,14 +1563,17 @@ ivug_main_view_show_menu_bar(Ivug_MainView *pMainView)
 #ifdef HIDE_INDICATOR
        elm_win_indicator_mode_set(ug_get_window(), ELM_WIN_INDICATOR_HIDE);
 #else
-       elm_win_indicator_mode_set((Evas_Object *)ug_get_window(), ELM_WIN_INDICATOR_SHOW);
+       if(gIsDesktopMode() == false)
+       {
+               elm_win_indicator_mode_set((Evas_Object *)ug_get_window(), ELM_WIN_INDICATOR_SHOW);
+       }
 #endif
 //     edje_object_signal_emit(_EDJ(pMainView->layout), "mainview,show,menu", "elm");
 
        edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,show", "user");
 
        elm_naviframe_item_title_visible_set(pMainView->navi_it, EINA_TRUE);
-       elm_object_item_signal_emit(pMainView->navi_it, "elm,state,controlbar,open", "");
+       elm_object_item_signal_emit(pMainView->navi_it, "elm,state,toolbar,open", "");
 
        ivug_slider_set_menu_visibility(pMainView->slider, EINA_TRUE);
 
@@ -1800,12 +1630,7 @@ ivug_main_view_hide_menu_bar(Ivug_MainView *pMainView)
 
 //     edje_object_signal_emit(_EDJ(pMainView->layout), "mainview,hide,menu","elm");
        elm_naviframe_item_title_visible_set(pMainView->navi_it, EINA_FALSE);
-       elm_object_item_signal_emit(pMainView->navi_it, "elm,state,controlbar,close", "");
-
-       // zoom icon
-       edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,btn_zoom_out,hide","elm");
-       edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,btn_zoom_in,hide","elm");\r
-       edje_object_signal_emit(_EDJ(pMainView->empty_layout), "elm,state,zoom_slider,hide","elm");\r
+       elm_object_item_signal_emit(pMainView->navi_it, "elm,state,toolbar,close", "");
 
        ivug_slider_set_menu_visibility(pMainView->slider, EINA_FALSE);
 
old mode 100755 (executable)
new mode 100644 (file)
index e032e61..5833843
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 <Ecore_X.h>
 #include "ivug-common.h"
 #include "ivug-media.h"
 #include "ivug-vibration.h"
 
+#define MAX_BYTE_LEN 256-1
+
+#define CONTROL_ICON_DIRECTORY_PATH    IMAGE_PATH"/01_Control icon"
+
+#define ICON_PATH_SAVE                 CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_save.png"
+#define ICON_PATH_CLOSE                        CONTROL_ICON_DIRECTORY_PATH"/01_controllbar_icon_close.png"
+
+static void
+_on_timeout_response(void *data, Evas_Object *obj, void *event_info)
+{
+       IV_ASSERT(data != NULL);
+
+       Ivug_NameView *pNameView = (Ivug_NameView *)data;
+
+       if ( pNameView->fnresponse )
+       {
+               (pNameView->fnresponse)(NAME_VIEW_RESPONSE_CANCEL, NULL, pNameView->clientdata);
+       }
+
+       //destroy after pop and transit ended
+       //ivug_name_view_destroy(pNameView);
+}
+
 static void
 _ivug_rename_view_enter_click_cb(void *data, Evas_Object *obj, void *event_info)
 {
@@ -42,9 +65,10 @@ _ivug_rename_view_enter_click_cb(void *data, Evas_Object *obj, void *event_info)
                new_name = ivug_strip_string(name);
                if(new_name == NULL)
                {
-                       MSG_IMAGEVIEW_ERROR("ivug_strip_string failed");
-                       free (name);
+                       MSG_IMAGEVIEW_ERROR( "ivug_strip_string failed");
                        ecore_imf_context_input_panel_hide(elm_entry_imf_context_get(entry));
+                       ivug_timeout_popup_show(pNameView->layout, _on_timeout_response, pNameView, IDS_ERROR, IDS_ENTRY_IS_EMPTY);
+                       free (name);
                        return;
                }
 
@@ -55,7 +79,8 @@ _ivug_rename_view_enter_click_cb(void *data, Evas_Object *obj, void *event_info)
 
                free(name);
 
-               ivug_name_view_destroy(pNameView);
+               //destroy after pop and transit ended
+               //ivug_name_view_destroy(pNameView);
        }
        else
        {
@@ -80,17 +105,7 @@ _ivug_name_view_maxlength_reached(void *data, Evas_Object *obj, void *event_info
 
        ivug_vibration_play(pNameView->haptic_handle ,VIBRATION_DURATION);
 
-}\r
-\r
-static void\r
-_on_popup_response(void *data, Evas_Object *obj, void *event_info)\r
-{\r
-       IV_ASSERT(data != NULL);\r
-       Ivug_NameView *pNameView = (Ivug_NameView *)data;\r
-\r
-       ivug_name_view_destroy(pNameView);\r
-}\r
-\r
+}
 
 static void
 _ivug_name_view_done_cb(void *data, Evas_Object* obj, void* event_info )
@@ -112,8 +127,9 @@ _ivug_name_view_done_cb(void *data, Evas_Object* obj, void* event_info )
                if(new_name == NULL)
                {
                        MSG_IMAGEVIEW_ERROR( "ivug_strip_string failed");
-                       ivug_1btn_popup_show(pNameView->layout, IDS_ERROR, IDS_ENTRY_IS_EMPTY, _on_popup_response, pNameView);\r
-                       free (name);\r
+                       ecore_imf_context_input_panel_hide(elm_entry_imf_context_get(entry));
+                       ivug_timeout_popup_show(pNameView->layout, _on_timeout_response, pNameView, IDS_ERROR, IDS_ENTRY_IS_EMPTY);
+                       free (name);
                        return;
                }
 
@@ -125,7 +141,8 @@ _ivug_name_view_done_cb(void *data, Evas_Object* obj, void* event_info )
                free(name);
        }
 
-       ivug_name_view_destroy(pNameView);
+       //destroy after pop and transit ended
+       //ivug_name_view_destroy(pNameView);
 }
 
 static void
@@ -140,7 +157,8 @@ _ivug_name_view_cancel_cb(void *data, Evas_Object *obj, void *event_info)
                (pNameView->fnresponse)(NAME_VIEW_RESPONSE_CANCEL, NULL, pNameView->clientdata);
        }
 
-       ivug_name_view_destroy(pNameView);
+       //destroy after pop and transit ended
+       //ivug_name_view_destroy(pNameView);
 }
 
 static void _ivug_name_view_on_entry_changed(void *data, Evas_Object *obj, void *event_info)
@@ -228,8 +246,8 @@ static Evas_Object *_ivug_name_view_editfield_create(void *data, Evas_Object *ob
        elm_object_signal_callback_add(editfield, "elm,eraser,clicked", "elm", _ivug_name_view_eraser_clicked_cb, entry);
 
        static Elm_Entry_Filter_Limit_Size limit_filter_data;
-       limit_filter_data.max_char_count = 64;
-       limit_filter_data.max_byte_count = 0;
+       limit_filter_data.max_char_count = 0;
+       limit_filter_data.max_byte_count = MAX_BYTE_LEN;
        elm_entry_markup_filter_append(entry, elm_entry_filter_limit_size, &limit_filter_data);
 
        evas_object_smart_callback_add(entry, "maxlength,reached", _ivug_name_view_maxlength_reached, (void *) pNameView);
@@ -316,10 +334,8 @@ ivug_name_view_create(Evas_Object *parent, const char *title)
                free(pNameView);
                return NULL;
        }
-#ifdef USE_CUSTOM_STYLE
-       elm_object_theme_set(navi_bar, gGetSystemTheme());
-#endif
-       elm_object_style_set(navi_bar, "ivug/default");
+
+       //using default naviframe
 
        elm_object_part_content_set(pNameView->layout, "elm.swallow.content", navi_bar );
        evas_object_show(navi_bar);
@@ -336,9 +352,9 @@ ivug_name_view_create(Evas_Object *parent, const char *title)
 
        Evas_Object *cancel_button, *done_button;
 
-       cancel_button = ivug_button_add(navi_bar, NAVI_OPTION_BTN_STYLE, IDS_CANCEL, NULL, _ivug_name_view_cancel_cb, pNameView );
+       cancel_button = ivug_button_add(navi_bar, "naviframe/title/icon/previous", NULL, NULL, _ivug_name_view_cancel_cb, pNameView );
 
-       done_button = ivug_button_add(navi_bar, NAVI_OPTION_BTN_STYLE, IDS_DONE, NULL, _ivug_name_view_done_cb, pNameView );
+       done_button = ivug_button_add(navi_bar, "naviframe/title/icon/plus", NULL, NULL, _ivug_name_view_done_cb, pNameView );
 
        pNameView->btn_done = done_button;
 
@@ -347,9 +363,7 @@ ivug_name_view_create(Evas_Object *parent, const char *title)
        Elm_Object_Item *navi_it = NULL;
        navi_it = elm_naviframe_item_push(pNameView->navibar, title, NULL, NULL, pNameView->content, NULL);
 
-       elm_entry_cursor_end_set(pNameView->entry);
-       evas_object_show(pNameView->entry);
-       elm_object_focus_set(pNameView->entry, EINA_TRUE);      // show keypad
+       //ivug_name_view_set_focus(pNameView);
 
        elm_object_item_part_content_set(navi_it, "title_left_btn", done_button);
        elm_object_item_part_content_set(navi_it, "title_right_btn", cancel_button);
@@ -433,4 +447,12 @@ ivug_name_view_set_entry(Ivug_NameView *pNameView, const char *str)
        elm_entry_cursor_end_set(pNameView->entry);
 }
 
+void
+ivug_name_view_set_focus(Ivug_NameView *pNameView)
+{
+       elm_entry_cursor_end_set(pNameView->entry);
+       evas_object_show(pNameView->entry);
+       elm_object_focus_set(pNameView->entry, EINA_TRUE);      // show keypad
+}
+
 
old mode 100755 (executable)
new mode 100644 (file)
index 211bc4b..4fb6683
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 #include <Elementary.h>
 
+#include "ivug-define.h"
+
 #include "ivug-setas-view-callerid.h"
 #include "ivug-setas-view.h"
 
 #include "ivug-selectioninfo.h"
 
 #include "ivug-image.h"
-#include "ivug-drm.h"
+#include "ivug-drm-common.h"
 #include "EFLUtil.h"
 #include "ivug-scissorbox.h"
 
+#include "ivug-db.h"
+
 #define EDJ_PATH PREFIX"/res/edje/"PACKAGE
 
 #define SETAS_EDJ_FILE EDJ_PATH"/ivug-setas.edj"
@@ -40,6 +43,8 @@
 #define SETAS_INTERVAL_TIME_FIRST_LOAD 0.3
 
 #define POPUP_ICON_DIRECTORY_PATH      IMAGE_PATH"/Popup_icon"
+#define ICON_PATH_ROTATE_LEFT          POPUP_ICON_DIRECTORY_PATH"/T01_1_popup_icon_Rotate left.png"
+#define ICON_PATH_ROTATE_RIGHT         POPUP_ICON_DIRECTORY_PATH"/T01_1_popup_icon_Rotate right.png"
 
 #define CONTROL_ICON_DIRECTORY_PATH IMAGE_PATH"/01_Control icon"
 #define ICON_PATH_SAVE                         CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_save.png"
 
 typedef struct {
        Evas_Object *layout;
-       Evas_Object *btn_layout;                // ????
        Evas_Object *notify;
        Evas_Object *photocam;
 
+       Evas_Object *contents_area;
+
        Evas_Object *gesture;
 
-       Elm_Object_Item *btn_ok;
-       Elm_Object_Item *btn_cancel;
+       Evas_Object *btn_ok;
 
        bool bShowMenu;         // Current state for button's visibility
 
+       char *filepath;
        char *drm_filepath;
 
-       Ecore_Timer *timer;
+       Evas_Coord_Rectangle rect;
+
+       int prev_x;
+       int prev_y;
+       int prev_w;
+       int prev_h;
 
        struct {
                Evas_Object *box;
@@ -75,7 +86,8 @@ typedef struct {
 #define SETAS_DATA(obj) \
                (TSetAsData *)evas_object_data_get((Evas_Object *)(obj), "pSetAsData")
 
-
+static void _on_moved(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void _on_resized(void *data, Evas *e, Evas_Object *obj, void *event_info);
 
 static void
 _ConvertARGB888toY(unsigned char* pBuf, unsigned char* pGrayBuf, int width, int height)
@@ -100,72 +112,81 @@ _ConvertARGB888toY(unsigned char* pBuf, unsigned char* pGrayBuf, int width, int
        }
 }
 
-static void _put_scissorbox(Evas_Object *obj)
+static void _put_scissorbox_default(TSetAsData *pSetAsData)
 {
-       TSetAsData *pSetAsData = SETAS_DATA(obj);
-
        Evas_Object *image = ivug_image_internal_image_get(pSetAsData->photocam);
 
-       Evas_Coord_Rectangle rect;
+       int image_w = 0;
+       int image_h = 0;
+       double ratio = pSetAsData->crop.ratio;
+       Evas_Coord_Rectangle rect = {0,};
 
-       {
-               int image_w = 0;
-               int image_h = 0;
-               double ratio = pSetAsData->crop.ratio;
-
-               ivug_image_image_size_get(pSetAsData->photocam, &image_w, &image_h);    // Get original image size.
+       ivug_image_image_size_get(pSetAsData->photocam, &image_w, &image_h);    // Get original image size.
 
-               int px, py, pw, ph;
-               ivug_image_region_get(pSetAsData->photocam,  &px, &py, &pw, &ph);
+       int px, py, pw, ph;
+       ivug_image_region_get(pSetAsData->photocam, &px, &py, &pw, &ph);
 
-               int ix, iy, iw, ih;
+       int ix, iy, iw, ih;
 
-               if ( image_w > image_h )        // Landscape image
+       if ( image_w > image_h )        // Landscape image
+       {
+               if(ratio > 1.0) // height is larger
                {
-                       if(ratio > 1.0) // height is larger
-                       {
-                               iw = image_h / (2 * ratio);
-                               ih = image_h / 2;
-                       }
-                       else
-                       {
-                               iw = image_h / 2;
-                               ih = (image_h * ratio) / 2;
-                       }
+                       iw = image_h / (2 * ratio);
+                       ih = image_h / 2;
                }
                else
                {
-                       if(ratio > 1.0) // height is larger
-                       {
-                               iw = image_w / (2 * ratio);
-                               ih = image_w / 2;
-                       }
-                       else
-                       {
-                               iw = image_w / 2;
-                               ih = (image_w * ratio) / 2;
-                       }
+                       iw = image_h / 2;
+                       ih = (image_h * ratio) / 2;
                }
+       }
+       else
+       {
+               if(ratio > 1.0) // height is larger
+               {
+                       iw = image_w / (2 * ratio);
+                       ih = image_w / 2;
+               }
+               else
+               {
+                       iw = image_w / 2;
+                       ih = (image_w * ratio) / 2;
+               }
+       }
 
-               ix = (image_w - iw)/2;
-               iy = (image_h - ih)/2;
-
+       ix = (image_w - iw)/2;
+       iy = (image_h - ih)/2;
 
-               rect.x = (double)ix * pw / image_w + px;
-               rect.y = (double)iy * ph / image_h + py;
 
-               rect.w = (double)iw * pw / image_w;
-               rect.h = (double)ih * ph / image_h;
+       rect.x = (double)ix * pw / image_w + px;
+       rect.y = (double)iy * ph / image_h + py;
 
-               MSG_SETAS_WARN("Zoom Put Box in LCD XYWH(%d,%d,%d,%d)",
-                       rect.x, rect.y, rect.w, rect.h);
+       rect.w = (double)iw * pw / image_w;
+       rect.h = (double)ih * ph / image_h;
 
-               ivug_scissorbox_region_set(pSetAsData->crop.box, rect.x, rect.y, rect.w, rect.h);
+       MSG_SETAS_WARN("Face is not detected. Zoom Put Box in LCD XYWH(%d,%d,%d,%d)",
+               rect.x, rect.y, rect.w, rect.h);
 
-       }
+       ivug_scissorbox_region_set(pSetAsData->crop.box, rect.x, rect.y, rect.w, rect.h);
 
        ivug_scissorbox_attach(pSetAsData->crop.box, image);            // Attach to photocam
+}
 
+static void _put_scissorbox(Evas_Object *obj)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(obj);
+
+       media_handle db_handle = ivug_db_get_file_handle(pSetAsData->filepath);
+       if(db_handle == NULL)
+       {
+               MSG_SETAS_ERROR("Cannot get db handle %s", pSetAsData->filepath);
+               _put_scissorbox_default(pSetAsData);
+               elm_object_disabled_set(pSetAsData->btn_ok, EINA_FALSE);
+               return;
+       }
+
+       _put_scissorbox_default(pSetAsData);
 }
 
 static void
@@ -175,15 +196,11 @@ _on_btn_ok_clicked(void *data, Evas_Object *obj, void *event_info)
        IV_ASSERT(pSetAsData != NULL);
 
        MSG_SETAS_HIGH("OK button clicked");
-#if 0
-
-       edje_object_signal_callback_del(_EDJ(pSetAsData->btn_layout),
-                                       "setasview,set,clicked",
-                                       "",
-                                       _on_btn_ok_clicked);
-#endif
        evas_object_smart_callback_call(pSetAsData->layout, "ok,clicked", NULL);
 
+       evas_object_event_callback_del_full(pSetAsData->layout, EVAS_CALLBACK_MOVE, _on_moved, pSetAsData->layout);
+       evas_object_event_callback_del_full(pSetAsData->layout, EVAS_CALLBACK_RESIZE, _on_resized, pSetAsData->layout);
+
        if ( pSetAsData->crop.box )
        {
                evas_object_del(pSetAsData->crop.box);
@@ -200,13 +217,9 @@ _on_btn_cancel_clicked(void *data, Evas_Object *obj, void *event_info)
        IV_ASSERT(pSetAsData != NULL);
 
        MSG_SETAS_HIGH("Cancel button clicked");
-       evas_object_smart_callback_call(pSetAsData->layout, "cancel,clicked", NULL);
 
-       if(pSetAsData->timer)
-       {
-               ecore_timer_del(pSetAsData->timer);
-               pSetAsData->timer = NULL;
-       }
+       evas_object_event_callback_del_full(pSetAsData->layout, EVAS_CALLBACK_MOVE, _on_moved, pSetAsData->layout);
+       evas_object_event_callback_del_full(pSetAsData->layout, EVAS_CALLBACK_RESIZE, _on_resized, pSetAsData->layout);
 
        if ( pSetAsData->crop.box )
        {
@@ -214,26 +227,118 @@ _on_btn_cancel_clicked(void *data, Evas_Object *obj, void *event_info)
                pSetAsData->crop.box = NULL;
        }
 
+       evas_object_smart_callback_call(pSetAsData->layout, "cancel,clicked", NULL);
+
 //     _ivug_setas_view_remove(pSetAsData);
 }
 
-static Eina_Bool _on_detect_expired(void *data)
+
+static void
+_on_btn_rotate_r_clicked(void *data, Evas_Object *obj, void *event_info)
 {
-       ivug_retv_if(!data, ECORE_CALLBACK_CANCEL);
+       TSetAsData *pSetAsData = SETAS_DATA(data);
+       IV_ASSERT(pSetAsData != NULL);
+
+       MSG_SETAS_HIGH("Rotate r button clicked");
+
+       int degree = (ivug_image_rotate_get(pSetAsData->photocam) - 90) % 360;
+
+       ///////////////////////////////////////////////////////////////////
+       int org_x, org_y, org_w, org_h;
+
+       ivug_image_region_get(pSetAsData->photocam, &org_x, &org_y, &org_w, &org_h);
+       MSG_SETAS_MED("org_x=%d, org_y=%d, org_w=%d, org_h=%d", org_x, org_y, org_w, org_h);
+
+       int org_sx, org_sy, org_sw, org_sh;
+       ivug_scissorbox_region_get(pSetAsData->crop.box, &org_sx, &org_sy, &org_sw, &org_sh);
+
+       int dx = org_sx-org_x;
+       int dy = org_sy-org_y;
+
+       ivug_image_rotate_set(pSetAsData->photocam, degree);
+
+       int x, y, w, h;
+
+       ivug_image_region_get(pSetAsData->photocam, &x, &y, &w, &h);
+       MSG_SETAS_MED("x=%d, y=%d, w=%d, h=%d", x, y, w, h);
+
+       int sx, sy, sw, sh;
+
+       double ratio = (double)h/org_w; // h is rotated w
 
+       sw = org_sw*ratio;
+       sh = org_sh*ratio;
+       dx *= ratio;
+       dy *= ratio;
+
+       ivug_scissorbox_boundary_set(pSetAsData->crop.box, x, y, w, h);
+
+       ///////////////////////////////////////////////////////////////////
+
+       int base_x = x+w;
+       int base_y = y;
+
+       sx = base_x-dy-sh;
+       sy = base_y+dx;
+
+       MSG_SETAS_MED("sx=%d, sy=%d, sw=%d, sh=%d", sx, sy, sw, sh);
+
+       ivug_scissorbox_region_set(pSetAsData->crop.box, sx, sy, sh, sw);
+
+}
+
+
+static void
+_on_btn_rotate_l_clicked(void *data, Evas_Object *obj, void *event_info)
+{
        TSetAsData *pSetAsData = SETAS_DATA(data);
+       IV_ASSERT(pSetAsData != NULL);
 
-       pSetAsData->timer = NULL;
+       MSG_SETAS_HIGH("Rotate l button clicked");
 
-       _put_scissorbox(pSetAsData->layout);
+       int degree = (ivug_image_rotate_get(pSetAsData->photocam) + 90) % 360;
 
-       elm_object_item_disabled_set(pSetAsData->btn_ok, EINA_FALSE);
+       ///////////////////////////////////////////////////////////////////
+       int org_x, org_y, org_w, org_h;
 
-       evas_object_smart_callback_call(pSetAsData->layout, "loaded", NULL);
+       ivug_image_region_get(pSetAsData->photocam, &org_x, &org_y, &org_w, &org_h);
+       MSG_SETAS_MED("org_x=%d, org_y=%d, org_w=%d, org_h=%d", org_x, org_y, org_w, org_h);
+
+       int org_sx, org_sy, org_sw, org_sh;
+       ivug_scissorbox_region_get(pSetAsData->crop.box, &org_sx, &org_sy, &org_sw, &org_sh);
+
+       int dx = org_sx-org_x;
+       int dy = org_sy-org_y;
+
+       ivug_image_rotate_set(pSetAsData->photocam, degree);
+
+       int x, y, w, h;
+
+       ivug_image_region_get(pSetAsData->photocam, &x, &y, &w, &h);
+       MSG_SETAS_MED("x=%d, y=%d, w=%d, h=%d", x, y, w, h);
+
+       int sx, sy, sw, sh;
+
+       double ratio = (double)h/org_w; // h is rotated w
 
-       pSetAsData->notify = ivug_notify_create(pSetAsData->layout, IDS_CALLER_ID_NOTIFY);
+       sw = org_sw*ratio;
+       sh = org_sh*ratio;
+       dx *= ratio;
+       dy *= ratio;
 
-       return ECORE_CALLBACK_CANCEL;
+       ivug_scissorbox_boundary_set(pSetAsData->crop.box, x, y, w, h);
+
+       ///////////////////////////////////////////////////////////////////
+
+       int base_x = x;
+       int base_y = y+h;
+
+       sx = base_x+dy;
+       sy = base_y-dx-sw;
+
+       MSG_SETAS_MED("sx=%d, sy=%d, sw=%d, sh=%d", sx, sy, sw, sh);
+
+       ivug_scissorbox_region_set(pSetAsData->crop.box, sx, sy, sh, sw);
 }
 
 
@@ -242,6 +347,7 @@ _on_photocam_loaded(void *data, Evas_Object *obj, void *event_info)
 {
        TSetAsData *pSetAsData = SETAS_DATA(data);
        MSG_SETAS_HIGH("Photocam preloaded");
+
 #if 0
        typedef enum _Evas_Load_Error
        {
@@ -255,8 +361,7 @@ _on_photocam_loaded(void *data, Evas_Object *obj, void *event_info)
        } Evas_Load_Error; /**< Load error you can get from loading of files - see evas_load_error_str() too */
 #endif
 
-//     Evas_Load_Error error = static_cast<Evas_Load_Error>((int)event_info);
-       Evas_Load_Error error = evas_object_image_load_error_get(ivug_image_internal_image_get(obj));
+       Evas_Load_Error error = static_cast<Evas_Load_Error>((int)event_info);
 
        if ( error != EVAS_LOAD_ERROR_NONE )
        {
@@ -287,7 +392,19 @@ _on_photocam_loaded(void *data, Evas_Object *obj, void *event_info)
 
        MSG_SETAS_HIGH("Photocam loaded.");
 
-       pSetAsData->timer = ecore_timer_add(0.5, _on_detect_expired, data);
+       _put_scissorbox(pSetAsData->layout);
+
+       evas_object_smart_callback_call(pSetAsData->layout, "loaded", NULL);
+
+       pSetAsData->notify = ivug_notify_static_create(pSetAsData->contents_area, IDS_CALLER_ID_NOTIFY, NOTIFY_ALIGN_BOTTOM);
+
+       int x, y, w, h;
+       ivug_image_region_get(pSetAsData->photocam,  &x, &y, &w, &h);
+
+       pSetAsData->prev_x = x;
+       pSetAsData->prev_y = y;
+       pSetAsData->prev_w = w;
+       pSetAsData->prev_h = h;
 }
 
 
@@ -303,13 +420,16 @@ static void _on_resized(void *data, Evas *e, Evas_Object *obj, void *event_info)
        ///////////////////////////////////////////////////////////////////
        int org_x, org_y, org_w, org_h;
 
-       ivug_image_region_get(pSetAsData->photocam, &org_x, &org_y, &org_w, &org_h);
+       MSG_SETAS_MED("prev_x=%d, prev_y=%d, prev_w=%d, prev_h=%d", pSetAsData->prev_x, pSetAsData->prev_y, pSetAsData->prev_w, pSetAsData->prev_h);
+
+       org_x = pSetAsData->prev_x;
+       org_y = pSetAsData->prev_y;
+       org_w = pSetAsData->prev_w;
+       org_h = pSetAsData->prev_h;
 
        if(org_w == 0 || org_h == 0)
                return;
 
-       MSG_SETAS_MED("org_x=%d, org_y=%d, org_w=%d, org_h=%d", org_x, org_y, org_w, org_h);
-
        int org_sx, org_sy, org_sw, org_sh;
        ivug_scissorbox_region_get(pSetAsData->crop.box, &org_sx, &org_sy, &org_sw, &org_sh);
 
@@ -373,20 +493,23 @@ static void _on_resized(void *data, Evas *e, Evas_Object *obj, void *event_info)
        MSG_SETAS_MED("sx=%d, sy=%d, sw=%d, sh=%d", sx, sy, sw, sh);
 
        ivug_scissorbox_region_set(pSetAsData->crop.box, sx, sy, sw, sh);
+
+       ivug_image_region_get(pSetAsData->photocam, &org_x, &org_y, &org_w, &org_h);
+
+       MSG_SETAS_MED("org_x=%d, org_y=%d, org_w=%d, org_h=%d", org_x, org_y, org_w, org_h);
+
+       pSetAsData->prev_x = org_x;
+       pSetAsData->prev_y = org_y;
+       pSetAsData->prev_w = org_w;
+       pSetAsData->prev_h = org_h;
 }
 
 static void _on_removed(void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
-       TSetAsData *pSetAsData = SETAS_DATA(data);
+       TSetAsData *pSetAsData = (TSetAsData *)data;
 
        MSG_SETAS_HIGH("Remoing SetAsData");
 
-       if(pSetAsData->timer)
-       {
-               ecore_timer_del(pSetAsData->timer);
-               pSetAsData->timer = NULL;
-       }
-
        if(pSetAsData->notify)
        {
                evas_object_del(pSetAsData->notify);
@@ -398,11 +521,10 @@ static void _on_removed(void *data, Evas *e, Evas_Object *obj, void *event_info)
                evas_object_del(pSetAsData->crop.box);
                pSetAsData->crop.box = NULL;
        }
-
-       if(pSetAsData->photocam)
+       if(pSetAsData->filepath)
        {
-               evas_object_del(pSetAsData->photocam);
-               pSetAsData->photocam = NULL;
+               free(pSetAsData->filepath);
+               pSetAsData->filepath = NULL;
        }
 
        if(pSetAsData->drm_filepath)
@@ -432,14 +554,15 @@ static Evas_Event_Flags _finger_tap_end(void *data , void *event_info)
                MSG_SETAS_HIGH("Hide");
                elm_win_indicator_mode_set((Evas_Object*)ug_get_window(), ELM_WIN_INDICATOR_HIDE);
                evas_object_hide(pSetAsData->notify);
-               edje_object_signal_emit(_EDJ(pSetAsData->btn_layout), "elm,state,hide", "event");
        }
        else
        {
                MSG_SETAS_HIGH("Show");
-               elm_win_indicator_mode_set((Evas_Object*)ug_get_window(), ELM_WIN_INDICATOR_SHOW);
+               if(gIsDesktopMode() == false)
+               {
+                       elm_win_indicator_mode_set((Evas_Object *)ug_get_window(), ELM_WIN_INDICATOR_SHOW);
+               }
                evas_object_show(pSetAsData->notify);
-               edje_object_signal_emit(_EDJ(pSetAsData->btn_layout), "elm,state,show", "event");
        }
 
        pSetAsData->bShowMenu = !pSetAsData->bShowMenu;
@@ -454,7 +577,7 @@ void _add_gesture_layer(Evas_Object *parent, TSetAsData *pSetAsData)
        Evas_Object *gesture = pSetAsData->gesture;
 
        gesture = elm_gesture_layer_add(parent);
-       elm_gesture_layer_hold_events_set(gesture, EINA_TRUE);
+       elm_gesture_layer_hold_events_set(gesture, EINA_FALSE);
 
        elm_gesture_layer_cb_set(gesture, ELM_GESTURE_N_TAPS, ELM_GESTURE_STATE_END, _finger_tap_end, (void *)pSetAsData);
 
@@ -479,14 +602,14 @@ Evas_Object *_ivug_setas_callerid_create_layout(Evas_Object *parent)
        Elm_Object_Item *item[4];
        Evas_Object *controlbar = NULL;
 
-       pSetAsData->layout = ivug_layout_add(parent , SETAS_EDJ_FILE, "setas_view");
+       Evas_Object *photocam = NULL;
+
+       pSetAsData->layout = ivug_layout_add2(parent, SETAS_EDJ_FILE, "setas_view");
        if ( pSetAsData->layout == NULL )
        {
                MSG_SETAS_ERROR("Cannot create layout.");
                goto error;
        }
-       evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_MOVE, _on_moved, pSetAsData->layout);
-       evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_RESIZE, _on_resized, pSetAsData->layout);
 
        pSetAsData->crop.box = ivug_scissorbox_add(pSetAsData->layout);
 
@@ -497,58 +620,36 @@ Evas_Object *_ivug_setas_callerid_create_layout(Evas_Object *parent)
        }
 
        evas_object_smart_member_add(pSetAsData->crop.box, pSetAsData->layout);
-// Create child
-       pSetAsData->btn_layout = ivug_layout_add(pSetAsData->layout , SETAS_EDJ_FILE, "setas_view_btn");
-       if ( pSetAsData->btn_layout == NULL )
-       {
-               MSG_SETAS_ERROR("Cannot create btn_layout.");
-               goto error;
-       }
-       evas_object_smart_member_add(pSetAsData->btn_layout, pSetAsData->layout);
 
-
-       Evas_Object *photocam;
        photocam = ivug_image_create(pSetAsData->layout);
        ivug_image_animated_set(photocam, EINA_FALSE);  // Show first frame only when AGIF
        ivug_image_hold_set(photocam , EINA_TRUE);                      // Disable mouse events
 
        evas_object_name_set(photocam, "setas_photocam");
 
+       pSetAsData->photocam = photocam;
+
        evas_object_smart_callback_add(photocam, "loaded", _on_photocam_loaded, (void *)pSetAsData->layout);
        elm_object_part_content_set(pSetAsData->layout, "setasview.photocam", photocam);
        evas_object_show(photocam);
 
-       pSetAsData->photocam = photocam;
-
        pSetAsData->bShowMenu = true;
        _add_gesture_layer(pSetAsData->layout, pSetAsData);
 
-       controlbar = ivug_controlbar_add(pSetAsData->layout, "default");
-
-       item[0] = elm_toolbar_item_append(controlbar, ICON_PATH_SAVE, NULL, _on_btn_ok_clicked, (void *)pSetAsData->layout);
-       item[1] = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL);
-       item[2] = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL);
-       item[3] = elm_toolbar_item_append(controlbar, ICON_PATH_PREV, NULL, _on_btn_cancel_clicked, (void *)pSetAsData->layout);
-
-       elm_object_item_disabled_set(item[1], EINA_TRUE);
-       elm_object_item_disabled_set(item[2], EINA_TRUE);
-
-       elm_object_part_content_set(pSetAsData->btn_layout, "controlbar", controlbar);
-
-       //Evas_Object *back_btn = ivug_button_add(controlbar, "naviframe/end_btn/default", IDS_BACK, NULL, _on_btn_cancel_clicked, pSetAsData->layout);
-
-       //elm_object_part_content_set(pSetAsData->btn_layout, "elm.swallow.prev_btn", back_btn);
-
-       evas_object_smart_member_add(pSetAsData->btn_layout, pSetAsData->layout);
-
-       pSetAsData->btn_ok = item[0];
-       pSetAsData->btn_cancel = item[3];
-       elm_object_item_disabled_set(pSetAsData->btn_ok, EINA_TRUE);
-
        MSG_SETAS_HIGH("Create setas layout");
+       pSetAsData->contents_area = ivug_default_layout_add(parent);
+       evas_object_name_set(pSetAsData->contents_area, "contets_area");
+       if ( pSetAsData->contents_area == NULL )
+       {
+               MSG_SETAS_ERROR("Cannot create contets_area.");
+       }
 
-       evas_object_data_set( pSetAsData->layout, "pSetAsData", pSetAsData);
-       evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_DEL, _on_removed, pSetAsData->layout);
+       elm_object_part_content_set(pSetAsData->layout, "setasview.contents", pSetAsData->contents_area);
+
+       evas_object_data_set(pSetAsData->layout, "pSetAsData", pSetAsData);
+       //evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_DEL, _on_removed, pSetAsData);
+       evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_MOVE, _on_moved, pSetAsData->layout);
+       evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_RESIZE, _on_resized, pSetAsData->layout);
 
        return pSetAsData->layout;
 
@@ -556,9 +657,6 @@ error:
        if ( pSetAsData->crop.box )
                evas_object_del(pSetAsData->crop.box);
 
-       if ( pSetAsData->btn_layout )
-               evas_object_del(pSetAsData->btn_layout);
-
        if ( pSetAsData->layout )
                evas_object_del(pSetAsData->layout);
 
@@ -568,6 +666,60 @@ error:
        return NULL;
 }
 
+Evas_Object *_ivug_setas_callerid_delete_layout(Evas_Object *obj)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(obj);
+       IV_ASSERT(pSetAsData != NULL);
+
+       if(pSetAsData->photocam)
+       {
+               MSG_SETAS_HIGH("Removing photocam");
+               evas_object_del(pSetAsData->photocam);
+               pSetAsData->photocam = NULL;
+       }
+
+       if(pSetAsData->notify)
+       {
+               evas_object_del(pSetAsData->notify);
+               pSetAsData->notify = NULL;
+       }
+
+       if(pSetAsData->contents_area)
+       {
+               evas_object_del(pSetAsData->contents_area);
+               pSetAsData->contents_area = NULL;
+       }
+
+       if(pSetAsData->layout)
+       {
+               evas_object_event_callback_del_full(pSetAsData->layout, EVAS_CALLBACK_MOVE, _on_moved, pSetAsData->layout);
+               evas_object_event_callback_del_full(pSetAsData->layout, EVAS_CALLBACK_RESIZE, _on_resized, pSetAsData->layout);
+               evas_object_del(pSetAsData->layout);
+               pSetAsData->layout = NULL;
+       }
+
+       if(pSetAsData->crop.box)
+       {
+               evas_object_del(pSetAsData->crop.box);
+               pSetAsData->crop.box = NULL;
+       }
+       if(pSetAsData->filepath)
+       {
+               free(pSetAsData->filepath);
+               pSetAsData->filepath = NULL;
+       }
+
+       if(pSetAsData->drm_filepath)
+       {
+               ivug_remove_file(pSetAsData->drm_filepath);
+               free(pSetAsData->drm_filepath);
+               pSetAsData->drm_filepath = NULL;
+       }
+
+       free(pSetAsData);
+
+       return NULL;
+}
 
 bool _ivug_setas_callerid_load_file(Evas_Object *obj, const char *filepath)
 {
@@ -575,14 +727,12 @@ bool _ivug_setas_callerid_load_file(Evas_Object *obj, const char *filepath)
 
        MSG_SETAS_HIGH("Load image file : %s", filepath);
 
+       pSetAsData->filepath = strdup(filepath);
+
+// Set thumnail first
+       Evas_Object *thumbnail = NULL;
        Evas_Load_Error error = EVAS_LOAD_ERROR_NONE;
 
-       if(ivug_drm_is_drm_file(filepath))
-       {
-               MSG_SETAS_HIGH("DRM File : %s", filepath);
-               error = EVAS_LOAD_ERROR_PERMISSION_DENIED;
-       }
-       else
        {
                error = ivug_image_file_set(pSetAsData->photocam, filepath, "noAnim");
        }
@@ -648,5 +798,16 @@ void _ivug_setas_callerid_aspect_ratio_set(Evas_Object *obj, double ratio)
        ivug_scissorbox_ratio_fix( pSetAsData->crop.box, EINA_TRUE);
 }
 
+void _ivug_setas_callerid_create_menu(Evas_Object *obj, Evas_Object *navi_bar)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(obj);
+
+       pSetAsData->btn_ok = ivug_button_add(navi_bar, "naviframe/toolbar/default",
+                                                               IDS_SAVE, NULL, _on_btn_ok_clicked, (void *)pSetAsData->layout);
+
+       Elm_Object_Item *navi_it = elm_naviframe_top_item_get(navi_bar);
+       elm_object_item_part_content_set(navi_it, "toolbar_button1", pSetAsData->btn_ok);
 
+       elm_object_disabled_set(pSetAsData->btn_ok, EINA_TRUE);
+}
 
old mode 100755 (executable)
new mode 100644 (file)
index fcdb17c..2591307
@@ -1,18 +1,19 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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_CALLERID_H__
 #define __IVUG_SETAS_CALLERID_H__
@@ -27,12 +28,15 @@ extern "C" {
 
 
 /*
+       "download,failed"               - Web downloading error
        "load,failed"                   - Image decoding error
        "ok,clicked"                    - Button "OK" clicked
        "cancel,clicked"                - Button "Cancel" clicked
 */
 Evas_Object *_ivug_setas_callerid_create_layout(Evas_Object *parent);
 
+Evas_Object *_ivug_setas_callerid_delete_layout(Evas_Object *obj);
+
 bool _ivug_setas_callerid_load_file(Evas_Object *obj, const char *filepath);
 
 Evas_Object *_ivug_setas_callerid_internal_image_get(Evas_Object *obj);
@@ -41,9 +45,11 @@ bool _ivug_setas_callerid_select_region_get(Evas_Object *obj, int *x, int *y, in
 
 void _ivug_setas_callerid_aspect_ratio_set(Evas_Object *obj, double ratio);
 
+void _ivug_setas_callerid_create_menu(Evas_Object *obj, Evas_Object *navi_bar);
+
 #ifdef __cplusplus
 }
 #endif
 
 
-#endif //__IVUG_SETAS_CALLERID_H__
\ No newline at end of file
+#endif //__IVUG_SETAS_CALLERID_H__
old mode 100755 (executable)
new mode 100644 (file)
index 0360f13..6f7e110
 
 #include <Elementary.h>
 
+#include "ivug-define.h"
+
 #include "ivug-setas-view-wallpaper.h"
 #include "ivug-setas-view.h"
 
+#include "ivug-file-info.h"
 #include "ivug-image.h"
-#include "ivug-drm.h"
+#include "ivug-drm-common.h"
 #include "EFLUtil.h"
+#include "ivug-selectioninfo.h"
 
 #define EDJ_PATH PREFIX"/res/edje/"PACKAGE
 
 #define SETAS_INTERVAL_TIME 0.1
 #define SETAS_INTERVAL_TIME_FIRST_LOAD 0.3
 
-#define POPUP_ICON_DIRECTORY_PATH      IMAGE_PATH"/Popup_icon"
-
 #define CONTROL_ICON_DIRECTORY_PATH IMAGE_PATH"/01_Control icon"
+#define ICON_PATH_ROTATE_LEFT          CONTROL_ICON_DIRECTORY_PATH"/T01_1_controlbar_icon_Rotate left.png"
+#define ICON_PATH_ROTATE_RIGHT         CONTROL_ICON_DIRECTORY_PATH"/T01_1_controlbar_icon_Rotate right.png"
 #define ICON_PATH_SAVE                         CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_save.png"
 #define ICON_PATH_PREV                         CONTROL_ICON_DIRECTORY_PATH"/00_winset_btn_prev.png"
 
 typedef struct {
        Evas_Object *layout;
-       Evas_Object *btn_layout;                // ????
        Evas_Object *photocam;
+       Evas_Object *notify;
+
+       Evas_Object *contents_area;
 
        Evas_Object *btn_ok;
-       Evas_Object *btn_cancel;
 
        bool bShowMenu;         // Current state for button's visibility
-
        char *drm_filepath;
 } TSetAsData;
 
 #define SETAS_DATA(obj) \
                (TSetAsData *)evas_object_data_get((Evas_Object *)(obj), "pSetAsData")
 
-
 static void
-_show_menu(Evas_Object *layout)
+_on_btn_ok_clicked(void *data, Evas_Object *obj, void *event_info)
 {
-       IV_ASSERT(layout != NULL);
+       TSetAsData *pSetAsData = SETAS_DATA(data);
+       IV_ASSERT(pSetAsData != NULL);
 
+       MSG_SETAS_HIGH("OK button clicked");
 
+       evas_object_smart_callback_call(pSetAsData->layout, "ok,clicked", NULL);
 }
 
+
 static void
-_hide_menu(Evas_Object *layout)
+_on_btn_cancel_clicked(void *data, Evas_Object *obj, void *event_info)
 {
-       IV_ASSERT(layout != NULL);
+       TSetAsData *pSetAsData = SETAS_DATA(data);
+       IV_ASSERT(pSetAsData != NULL);
+
+       MSG_SETAS_HIGH("Cancel button clicked");
+       evas_object_smart_callback_call(pSetAsData->layout, "cancel,clicked", NULL);
 
+//     _ivug_setas_view_remove(pSetAsData);
 }
 
 
 static void
-_on_btn_ok_clicked(void *data, Evas_Object *obj, void *event_info)
+_on_btn_rotate_r_clicked(void *data, Evas_Object *obj, void *event_info)
 {
        TSetAsData *pSetAsData = SETAS_DATA(data);
        IV_ASSERT(pSetAsData != NULL);
 
-       MSG_SETAS_HIGH("OK button clicked");
-#if 0
-
-       edje_object_signal_callback_del(_EDJ(pSetAsData->btn_layout),
-                                       "setasview,set,clicked",
-                                       "",
-                                       _on_btn_ok_clicked);
-#endif
+       MSG_SETAS_HIGH("Rotate r button clicked");
 
-       evas_object_smart_callback_call(pSetAsData->layout, "ok,clicked", NULL);
+       ivug_image_rotate_set( pSetAsData->photocam, ( (ivug_image_rotate_get(pSetAsData->photocam) - 90) % 360 ));
 }
 
 
 static void
-_on_btn_cancel_clicked(void *data, Evas_Object *obj, void *event_info)
+_on_btn_rotate_l_clicked(void *data, Evas_Object *obj, void *event_info)
 {
        TSetAsData *pSetAsData = SETAS_DATA(data);
        IV_ASSERT(pSetAsData != NULL);
 
-       MSG_SETAS_HIGH("Cancel button clicked");
-       evas_object_smart_callback_call(pSetAsData->layout, "cancel,clicked", NULL);
+       MSG_SETAS_HIGH("Rotate l button clicked");
 
-//     _ivug_setas_view_remove(pSetAsData);
+       ivug_image_rotate_set( pSetAsData->photocam, ( (ivug_image_rotate_get(pSetAsData->photocam) + 90) % 360 ));
 }
 
+
 static void
 _on_photocam_loaded(void *data, Evas_Object *obj, void *event_info)
 {
@@ -154,12 +159,10 @@ _on_photocam_loaded(void *data, Evas_Object *obj, void *event_info)
        }
 
        MSG_SETAS_HIGH("Photocam loaded.");
-       elm_object_disabled_set(pSetAsData->btn_ok, EINA_FALSE);
 
+       elm_object_disabled_set(pSetAsData->btn_ok, EINA_FALSE);
 
        evas_object_smart_callback_call(pSetAsData->layout, "loaded", NULL);
-
-
 }
 
 
@@ -177,16 +180,9 @@ static void _on_resized(void *data, Evas *e, Evas_Object *obj, void *event_info)
 
 static void _on_removed(void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
-       TSetAsData *pSetAsData = SETAS_DATA(data);
+       TSetAsData *pSetAsData = (TSetAsData *)data;
 
        MSG_SETAS_HIGH("Remoing SetAsData");
-
-       if(pSetAsData->photocam)
-       {
-               evas_object_del(pSetAsData->photocam);
-               pSetAsData->photocam = NULL;
-       }
-
        if(pSetAsData->drm_filepath)
        {
                ivug_remove_file(pSetAsData->drm_filepath);
@@ -210,12 +206,12 @@ _on_bg_clicked(void *data, Evas_Object* obj, const char *emission, const char *s
        if(pSetAsData->bShowMenu == true)
        {
                pSetAsData->bShowMenu = false;
-               _hide_menu(pSetAsData->btn_layout);
+               //TODO: hide menu
        }
        else
        {
                pSetAsData->bShowMenu = true;
-               _show_menu(pSetAsData->btn_layout);
+               //TODO: show menu
        }
 }
 
@@ -229,7 +225,8 @@ Evas_Object *_ivug_setas_create_layout(Evas_Object *parent)
                return NULL;
        }
 
-       pSetAsData->layout = ivug_layout_add(parent , SETAS_EDJ_FILE, "setas_view");
+       pSetAsData->layout = ivug_layout_add2(parent , SETAS_EDJ_FILE, "setas_view");
+       evas_object_name_set(pSetAsData->layout, "setas_layout");
        if ( pSetAsData->layout == NULL )
        {
                MSG_SETAS_ERROR("Cannot create layout.");
@@ -248,50 +245,78 @@ Evas_Object *_ivug_setas_create_layout(Evas_Object *parent)
        elm_object_part_content_set(pSetAsData->layout, "setasview.photocam", photocam);
        evas_object_show(photocam);
 
+       evas_object_smart_member_add(photocam, pSetAsData->layout);
+
        pSetAsData->photocam = photocam;
 
-       Evas_Object *controlbar = ivug_controlbar_add(pSetAsData->layout, "default");
-       Elm_Object_Item *item[4];
+       edje_object_signal_callback_add(_EDJ(pSetAsData->layout),
+                               "setasview,bg,clicked", "edc",
+                               _on_bg_clicked,
+                               (void *)pSetAsData->layout);
 
-       item[0] = elm_toolbar_item_append(controlbar, ICON_PATH_SAVE, NULL, _on_btn_ok_clicked, (void *)pSetAsData->layout);
-       item[1] = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL);
-       item[2] = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL);
-       item[3] = elm_toolbar_item_append(controlbar, ICON_PATH_PREV, NULL, _on_btn_cancel_clicked, (void *)pSetAsData->layout);
+       pSetAsData->bShowMenu = true;
 
-       elm_object_item_disabled_set(item[1], EINA_TRUE);
-       elm_object_item_disabled_set(item[2], EINA_TRUE);
+       MSG_SETAS_HIGH("Create setas layout");
+       evas_object_data_set(pSetAsData->layout, "pSetAsData", pSetAsData);
+       //evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_DEL, _on_removed, pSetAsData);
 
-       pSetAsData->btn_layout = ivug_layout_add(pSetAsData->layout , SETAS_EDJ_FILE, "setas_view_btn");
-       if ( pSetAsData->btn_layout == NULL )
+       pSetAsData->contents_area = ivug_default_layout_add(parent);
+       evas_object_name_set(pSetAsData->contents_area, "contets_area");
+       if ( pSetAsData->contents_area == NULL )
        {
-               MSG_SETAS_ERROR("Cannot create btn_layout.");
-               evas_object_del(pSetAsData->layout);
-               free(pSetAsData);
-               return NULL;
+               MSG_SETAS_ERROR("Cannot create contets_area.");
        }
 
-       elm_object_part_content_set(pSetAsData->btn_layout, "controlbar", controlbar);
+       elm_object_part_content_set(pSetAsData->layout, "setasview.contents", pSetAsData->contents_area);
 
-       //Evas_Object *back_btn = ivug_button_add(controlbar, "naviframe/end_btn/default", IDS_BACK, NULL, _on_btn_cancel_clicked, pSetAsData->layout);
+       pSetAsData->notify = ivug_notify_static_create(pSetAsData->contents_area, IDS_WALLPAPER_NOTIFY, NOTIFY_ALIGN_BOTTOM);
 
-       //elm_object_part_content_set(pSetAsData->btn_layout, "elm.swallow.prev_btn", back_btn);
+       evas_object_show(pSetAsData->layout);
+       return pSetAsData->layout;
+}
 
-       evas_object_smart_member_add(pSetAsData->btn_layout, pSetAsData->layout);
+Evas_Object *_ivug_setas_delete_layout(Evas_Object *obj)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(obj);
+       IV_ASSERT(pSetAsData != NULL);
 
-       edje_object_signal_callback_add(_EDJ(pSetAsData->layout),
-                               "setasview,bg,clicked", "edc",
-                               _on_bg_clicked,
-                               (void *)pSetAsData->layout);
+       if(pSetAsData->photocam)
+       {
+               MSG_SETAS_HIGH("Removing photocam");
+               evas_object_del(pSetAsData->photocam);
+               pSetAsData->photocam = NULL;
+       }
 
-       pSetAsData->bShowMenu = true;
-       elm_object_disabled_set(pSetAsData->btn_ok, EINA_TRUE);
+       if(pSetAsData->notify)
+       {
+               evas_object_del(pSetAsData->notify);
+               pSetAsData->notify = NULL;
+       }
 
-       MSG_SETAS_HIGH("Create setas layout");
+       if(pSetAsData->contents_area)
+       {
+               evas_object_del(pSetAsData->contents_area);
+               pSetAsData->contents_area = NULL;
+       }
 
-       evas_object_data_set(pSetAsData->layout, "pSetAsData", pSetAsData);
-       evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_DEL, _on_removed, pSetAsData->layout);
+       if(pSetAsData->layout)
+       {
+               evas_object_event_callback_del_full(pSetAsData->layout, EVAS_CALLBACK_MOVE, _on_moved, pSetAsData->layout);
+               evas_object_event_callback_del_full(pSetAsData->layout, EVAS_CALLBACK_RESIZE, _on_resized, pSetAsData->layout);
+               evas_object_del(pSetAsData->layout);
+               pSetAsData->layout = NULL;
+       }
 
-       return pSetAsData->layout;
+       if(pSetAsData->drm_filepath)
+       {
+               ivug_remove_file(pSetAsData->drm_filepath);
+               free(pSetAsData->drm_filepath);
+               pSetAsData->drm_filepath = NULL;
+       }
+
+       free(pSetAsData);
+
+       return NULL;
 }
 
 bool _ivug_setas_load_file(Evas_Object *obj, const char *filepath)
@@ -299,15 +324,12 @@ bool _ivug_setas_load_file(Evas_Object *obj, const char *filepath)
        TSetAsData *pSetAsData = SETAS_DATA(obj);
 
        MSG_SETAS_HIGH("Load image file : %s", filepath);
+// Set thumnail first
+       Evas_Object *thumbnail = NULL;
+
 
        Evas_Load_Error error = EVAS_LOAD_ERROR_NONE;
 
-       if(ivug_drm_is_drm_file(filepath))
-       {
-               MSG_SETAS_HIGH("DRM File : %s", filepath);
-               error = EVAS_LOAD_ERROR_PERMISSION_DENIED;
-       }
-       else
        {
                error = ivug_image_file_set(pSetAsData->photocam, filepath, "noAnim");
        }
@@ -346,4 +368,16 @@ Evas_Object *_ivug_setas_internal_image_get(Evas_Object *obj)
        return pSetAsData->photocam;
 }
 
+void _ivug_setas_view_create_menu(Evas_Object *obj, Evas_Object *navi_bar)
+{
+       TSetAsData *pSetAsData = SETAS_DATA(obj);
+
+       pSetAsData->btn_ok = ivug_button_add(navi_bar, "naviframe/toolbar/default",
+                                                               IDS_SAVE, NULL, _on_btn_ok_clicked, (void *)pSetAsData->layout);
+
+       Elm_Object_Item *navi_it = elm_naviframe_top_item_get(navi_bar);
+       elm_object_item_part_content_set(navi_it, "toolbar_button1", pSetAsData->btn_ok);
+
+       elm_object_disabled_set(pSetAsData->btn_ok, EINA_TRUE);
+}
 
old mode 100755 (executable)
new mode 100644 (file)
index 090a7fa..1052524
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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_WALLPAPER_H__
 #define __IVUG_SETAS_WALLPAPER_H__
@@ -25,19 +25,23 @@ extern "C" {
 
 
 /*
+       "download,failed"               - Web downloading error
        "load,failed"                   - Image decoding error
        "ok,clicked"                    - Button "OK" clicked
        "cancel,clicked"                - Button "Cancel" clicked
 */
 Evas_Object *_ivug_setas_create_layout(Evas_Object *parent);
+Evas_Object *_ivug_setas_delete_layout(Evas_Object *obj);
 
 bool _ivug_setas_load_file(Evas_Object *obj, const char *filepath);
 
 Evas_Object *_ivug_setas_internal_image_get(Evas_Object *obj);
 
+void _ivug_setas_view_create_menu(Evas_Object *obj, Evas_Object *navi_bar);
+
 #ifdef __cplusplus
 }
 #endif
 
 
-#endif //__IVUG_SETAS_WALLPAPER_H__
\ No newline at end of file
+#endif //__IVUG_SETAS_WALLPAPER_H__
old mode 100755 (executable)
new mode 100644 (file)
index 9690e1a..381c74a
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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>
 #include <Evas.h>
@@ -30,7 +30,6 @@
 #include "ivug-setas-view-callerid.h"
 #include "ivug-setas.h"
 
-
 #include "ivug-listpopup.h"
 
 
@@ -112,7 +111,7 @@ _on_msg_load_failed(void *data, Evas_Object *obj, void *event_info)
 
        _show_exit_popup(obj, IDS_ERROR, szMsg, (void *)pSetAsView );
 
-       if ( pSetAsView->Mode == IVUG_SETAS_UG )
+       if ( pSetAsView->Mode != IVUG_SETAS_NORMAL )
        {
                MSG_SETAS_ERROR("Send error message to ug caller app");
                _send_result(gGetUGHandle(), IVUG_RESULT_BUNDLE_KEY_ERROR, IVUG_RESULT_BUNDLE_VALUE_NOT_SUPPORTED, NULL, NULL);
@@ -155,21 +154,29 @@ _ivug_setas_view_remove(Ivug_SetAsView *pSetAsView)
        }
 #endif
 
-       if(pSetAsView->Mode == IVUG_SETAS_UG || pSetAsView->Mode == IVUG_SETAS_APPSVC)
+       if(pSetAsView->Mode != IVUG_SETAS_NORMAL)
        {
                MSG_SETAS_HIGH("Start destroy ug");
+               if ( pSetAsView->content)
+               {
+                       if(pSetAsView->Type == IVUG_CTRLBAR_SET_SCREEN_CALLERID
+                               || pSetAsView->Type == IVUG_CTRLBAR_SET_SCREEN_VIDEO_CALL_ID)
+                       {
+                               _ivug_setas_callerid_delete_layout(pSetAsView->content);
+                       }
+                       else
+                       {
+                               _ivug_setas_delete_layout(pSetAsView->content);
+                       }
+                       pSetAsView->content = NULL;
+               }
                ug_destroy_me(gGetUGHandle());
                return;
        }
 
-
        MSG_SETAS_HIGH( "destroy data");
 
-#ifdef TRANSITION_EFFECT
-       edje_object_signal_emit(_EDJ(pSetAsView->ly_effect), "elm,state,hide", "app");
-#else
-       ivug_setas_view_destroy(pSetAsView);
-#endif
+       evas_object_smart_callback_call(pSetAsView->content, "destroy", pSetAsView);
 }
 
 
@@ -234,7 +241,7 @@ static void _on_setas_homescreen(Ivug_SetAsView *pSetAsView)
 {
        const char *homescreen_path = NULL;
 
-       if(pSetAsView->Mode != IVUG_SETAS_APPSVC)
+       if(pSetAsView->Mode == IVUG_SETAS_NORMAL || pSetAsView->Mode == IVUG_SETAS_UG)
        {
                homescreen_path = IVUG_HOME_SCREEN_PATH;
        }
@@ -245,36 +252,43 @@ static void _on_setas_homescreen(Ivug_SetAsView *pSetAsView)
 
 // Save to Image
        Evas_Coord_Rectangle box_rect;
-       evas_object_geometry_get(pSetAsView->content, &(box_rect.x), &(box_rect.y), &(box_rect.w), &(box_rect.h) );
+       evas_object_geometry_get(pSetAsView->content, &(box_rect.x), &(box_rect.y), &(box_rect.w), &(box_rect.h));
 
        MSG_SETAS_HIGH("Rect XYWH(%d,%d,%d,%d)", box_rect.x, box_rect.y, box_rect.w , box_rect.h);
 
        Eina_Bool ret = EINA_FALSE;
 
-       ret = _ivug_setas_save_home_screen(_ivug_setas_internal_image_get( pSetAsView->content) ,&box_rect,homescreen_path);
+       ret = _ivug_setas_save_home_screen(_ivug_setas_internal_image_get( pSetAsView->content) ,&box_rect, homescreen_path);
 
        if ( ret == false )
        {
                MSG_SETAS_ERROR("Error occured. when setAS. %s", homescreen_path);
+               _show_exit_popup(pSetAsView->content, IDS_HOME_SCREEN_WALLPAPER, IDS_FAILED, (void *)pSetAsView);
+               return;
        }
 
-       if(pSetAsView->Mode != IVUG_SETAS_APPSVC)
+       if(pSetAsView->Mode != IVUG_SETAS_CROP)
        {
                ret = ivug_config_set_homescreen_image(homescreen_path);
-       }
+               if(ret == true)
+               {
+                       _show_exit_popup(pSetAsView->content, IDS_HOME_SCREEN_WALLPAPER, IDS_SUCCESS, (void *)pSetAsView);
+                       _send_result(gGetUGHandle(), "homescreen_path", homescreen_path, NULL, NULL);
 
-       if(ret == true)
+                       MSG_SETAS_HIGH("Set Home screen: %s", homescreen_path);
+               }
+               else
+               {
+                       _show_exit_popup(pSetAsView->content, IDS_HOME_SCREEN_WALLPAPER, IDS_FAILED, (void *)pSetAsView);
+               }
+       }
+       else    // IVUG_SETAS_CROP
        {
-               _show_exit_popup(pSetAsView->content, IDS_HOME_SCREEN_WALLPAPER, IDS_SUCCESS, (void *)pSetAsView );
-               _send_result(gGetUGHandle(), "homescreen_path", homescreen_path, NULL, NULL);
+               _show_exit_popup(pSetAsView->content, IDS_HOME_SCREEN_WALLPAPER, IDS_SUCCESS, (void *)pSetAsView);
+               _send_result(gGetUGHandle(), "crop_image_path", homescreen_path, NULL, NULL);
 
                MSG_SETAS_HIGH("Set Home screen: %s", homescreen_path);
        }
-       else
-       {
-               _show_exit_popup(pSetAsView->content, IDS_HOME_SCREEN_WALLPAPER, IDS_FAILED, (void *)pSetAsView );
-       }
-
 }
 
 
@@ -300,7 +314,7 @@ static void _on_setas_lockscreen(Ivug_SetAsView *pSetAsView)
        }
 
        //Set the lock screen
-       if(pSetAsView->Mode != IVUG_SETAS_APPSVC)
+       if(pSetAsView->Mode != IVUG_SETAS_CROP)
        {
                ret = ivug_config_set_lockscreen_image(lockscreen_path);
        }
@@ -363,7 +377,7 @@ static void _on_setas_bothscreen(Ivug_SetAsView *pSetAsView)
        MSG_SETAS_HIGH("Set Home&Lock screen: %s %s", homescreen_path, lockscreen_path);
        free(title);
 
-       if(pSetAsView->Mode == IVUG_SETAS_UG || pSetAsView->Mode == IVUG_SETAS_APPSVC)
+       if(pSetAsView->Mode != IVUG_SETAS_NORMAL)
        {
                if(ret == EINA_TRUE)
                {
@@ -415,13 +429,14 @@ static void _on_setas_callerid(Ivug_SetAsView *pSetAsView)
                return;
        }
 
-       free(title);
-
-       if(pSetAsView->Mode == IVUG_SETAS_UG || pSetAsView->Mode == IVUG_SETAS_APPSVC)
+       if(pSetAsView->Mode != IVUG_SETAS_NORMAL)
        {
                _send_result(gGetUGHandle(), "crop_image_path", SET_AS_CALL_ID_PATH, "image_path", SET_AS_CALL_ID_LCD_PATH);
+               _show_exit_popup(pSetAsView->content, title, IDS_SUCCESS, pSetAsView);
        }
 
+       free(title);
+
 }
 
 static void _on_setas_video_call_id(Ivug_SetAsView *pSetAsView)
@@ -454,7 +469,7 @@ static void _on_setas_video_call_id(Ivug_SetAsView *pSetAsView)
                return;
        }
 
-       if(pSetAsView->Mode == IVUG_SETAS_UG || pSetAsView->Mode == IVUG_SETAS_APPSVC)
+       if(pSetAsView->Mode != IVUG_SETAS_NORMAL)
        {
                _send_result(gGetUGHandle(), "crop_image_path", SET_AS_VIDEO_CALL_ID_PATH, NULL, NULL);
        }
@@ -510,17 +525,17 @@ _on_type_popup_selected(void *data, Evas_Object *obj, void *event_info)
 
 static void _dismissed_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       IV_ASSERT(data != NULL);\r
-\r
-       MSG_SETAS_HIGH("Popup dissmissed");\r
-\r
-       Ivug_SetAsView *pSetAsView = (Ivug_SetAsView *) data;\r
-\r
-       if(pSetAsView->genlist_popup)\r
-       {\r
-               evas_object_del(pSetAsView->genlist_popup);\r
-               pSetAsView->genlist_popup = NULL;\r
-       }\r
+       IV_ASSERT(data != NULL);
+
+       MSG_SETAS_HIGH("Popup dissmissed");
+
+       Ivug_SetAsView *pSetAsView = (Ivug_SetAsView *) data;
+
+       if(pSetAsView->genlist_popup)
+       {
+               evas_object_del(pSetAsView->genlist_popup);
+               pSetAsView->genlist_popup = NULL;
+       }
 }
 
 
@@ -609,7 +624,15 @@ static void _signal_show_finished(void *data, Evas_Object *obj, const char *emis
 
 #endif         // UG_TRANSITION_EFFECT
 
+static void _on_setas_show(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       MSG_SETAS_HIGH("SetAs show");
+}
 
+static void _on_setas_hide(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       MSG_SETAS_HIGH("SetAs hide");
+}
 
 Ivug_SetAsView *
 ivug_setas_view_screen_create(Evas_Object *parent, const char* filepath, ivug_setas_mode mode, ivug_set_screen_type screen_type)
@@ -630,51 +653,14 @@ ivug_setas_view_screen_create(Evas_Object *parent, const char* filepath, ivug_se
        evas_object_smart_callback_add(pSetAsView->content, "ok,clicked", _on_msg_ok_clicked, pSetAsView);
        evas_object_smart_callback_add(pSetAsView->content, "cancel,clicked", _on_msg_cancel_clicked, pSetAsView);
 
-       _ivug_setas_load_file(pSetAsView->content , filepath);
-
-// Transition layout
-#ifdef TRANSITION_EFFECT
-       pSetAsView->ly_effect = ivug_layout_add(parent , EDJ_PATH"/ivug-effect.edj", "ivug_effect");
-
-       elm_object_part_content_set(pSetAsView->ly_effect, "elm.swallow.content", pSetAsView->content);
-
-       edje_object_signal_callback_add(_EDJ(pSetAsView->ly_effect), "elm,action,hide,finished", "elm", _signal_hide_finished, (void *)pSetAsView);
-       edje_object_signal_callback_add(_EDJ(pSetAsView->ly_effect), "elm,action,show,finished", "elm", _signal_show_finished, (void *)pSetAsView);
-
-       evas_object_show(pSetAsView->ly_effect);
-
-       edje_object_signal_emit(_EDJ(pSetAsView->ly_effect), "elm,state,show", "app");          // Start Effect
-#endif
-
-       return pSetAsView;
-}
-
-
-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 *pSetAsView = NULL;
-
-       MSG_SETAS_HIGH("Wallpaper UG creates");
-
-       pSetAsView = (Ivug_SetAsView *)calloc(1, sizeof(Ivug_SetAsView));
-
-       pSetAsView->Mode = mode;
-       pSetAsView->Type = type;
-
-       pSetAsView->content = _ivug_setas_create_layout(parent);
-
-       evas_object_smart_callback_add(pSetAsView->content, "load,failed", _on_msg_load_failed, pSetAsView);
-       evas_object_smart_callback_add(pSetAsView->content, "download,failed", _on_msg_load_failed, pSetAsView);
-       evas_object_smart_callback_add(pSetAsView->content, "ok,clicked", _on_msg_ok_clicked, pSetAsView);
-       evas_object_smart_callback_add(pSetAsView->content, "cancel,clicked", _on_msg_cancel_clicked, pSetAsView);
+       evas_object_event_callback_add(pSetAsView->content, EVAS_CALLBACK_SHOW, _on_setas_show, pSetAsView);
+       evas_object_event_callback_add(pSetAsView->content, EVAS_CALLBACK_HIDE, _on_setas_hide, pSetAsView);
 
        _ivug_setas_load_file(pSetAsView->content , filepath);
 
        return pSetAsView;
 }
 
-
 Ivug_SetAsView *
 ivug_setas_view_callerid_ug_create(Evas_Object *parent, const char* filepath, ivug_setas_mode mode, int output_width, int output_height)
 {
@@ -694,8 +680,11 @@ ivug_setas_view_callerid_ug_create(Evas_Object *parent, const char* filepath, iv
        evas_object_smart_callback_add(pSetAsView->content, "ok,clicked", _on_msg_ok_clicked, pSetAsView);
        evas_object_smart_callback_add(pSetAsView->content, "cancel,clicked", _on_msg_cancel_clicked, pSetAsView);
 
-       _ivug_setas_callerid_load_file(pSetAsView->content , filepath);
-       _ivug_setas_callerid_aspect_ratio_set(pSetAsView->content , (double)output_height/output_width);
+       evas_object_event_callback_add(pSetAsView->content, EVAS_CALLBACK_SHOW, _on_setas_show, pSetAsView);
+       evas_object_event_callback_add(pSetAsView->content, EVAS_CALLBACK_HIDE, _on_setas_hide, pSetAsView);
+
+       _ivug_setas_callerid_load_file(pSetAsView->content, filepath);
+       _ivug_setas_callerid_aspect_ratio_set(pSetAsView->content, (double)output_height/output_width);
 
        return pSetAsView;
 }
@@ -719,9 +708,14 @@ ivug_setas_view_video_call_id_ug_create(Evas_Object *parent, const char* filepat
        evas_object_smart_callback_add(pSetAsView->content, "ok,clicked", _on_msg_ok_clicked, pSetAsView);
        evas_object_smart_callback_add(pSetAsView->content, "cancel,clicked", _on_msg_cancel_clicked, pSetAsView);
 
+       evas_object_event_callback_add(pSetAsView->content, EVAS_CALLBACK_SHOW, _on_setas_show, pSetAsView);
+       evas_object_event_callback_add(pSetAsView->content, EVAS_CALLBACK_HIDE, _on_setas_hide, pSetAsView);
+
        _ivug_setas_callerid_load_file(pSetAsView->content , filepath);
        _ivug_setas_callerid_aspect_ratio_set(pSetAsView->content , (double)output_height/output_width);
 
+
+
        return pSetAsView;
 }
 
@@ -738,27 +732,49 @@ void
 ivug_setas_view_destroy(Ivug_SetAsView *pSetAsView)
 {
        MSG_SETAS_HIGH("Removing SetAs VIew");
+       IV_ASSERT(pSetAsView != NULL);
 
-       if ( pSetAsView->ly_effect)
+       if ( pSetAsView->content)
        {
-               evas_object_del(pSetAsView->ly_effect);
-               pSetAsView->ly_effect = NULL;
+               if(pSetAsView->Type == IVUG_CTRLBAR_SET_SCREEN_CALLERID
+                       || pSetAsView->Type == IVUG_CTRLBAR_SET_SCREEN_VIDEO_CALL_ID)
+               {
+                       _ivug_setas_callerid_delete_layout(pSetAsView->content);
+               }
+               else
+               {
+                       _ivug_setas_delete_layout(pSetAsView->content);
+               }
+               //evas_object_del(pSetAsView->content);
+               pSetAsView->content = NULL;
        }
 
-       if ( pSetAsView->content)
+       if ( pSetAsView->ly_effect)
        {
-               evas_object_del(pSetAsView->content);
-               pSetAsView->content = NULL;
+               evas_object_del(pSetAsView->ly_effect);
+               pSetAsView->ly_effect = NULL;
        }
 
        if ( pSetAsView->filename )
        {
                free(pSetAsView->filename);
+               pSetAsView->filename = NULL;
        }
 
-       if(pSetAsView)
+       free(pSetAsView);
+       pSetAsView = NULL;
+}
+
+void ivug_setas_view_create_menu(Ivug_SetAsView *pSetAsView, Evas_Object *navi_bar, ivug_set_screen_type type)
+{
+       if(type == IVUG_CTRLBAR_SET_SCREEN_CALLERID
+               || type == IVUG_CTRLBAR_SET_SCREEN_VIDEO_CALL_ID)
+       {
+               _ivug_setas_callerid_create_menu(pSetAsView->content, navi_bar);
+       }
+       else
        {
-               free(pSetAsView);
+               _ivug_setas_view_create_menu(pSetAsView->content, navi_bar);
        }
 }
 
diff --git a/main/src/view/ivug-slideshow-view.cpp b/main/src/view/ivug-slideshow-view.cpp
new file mode 100644 (file)
index 0000000..e09b9c3
--- /dev/null
@@ -0,0 +1,468 @@
+/*
+ * 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-parameter.h"
+
+#include "ivug-slideshow-view.h"
+
+#include <vconf.h>
+#include <vconf-keys.h>
+#include <utilX.h>                     // Key event
+#include <ui-gadget-module.h>  // ug_send_result
+
+#include "ivug-filter.h"
+
+#include "ivug-popup.h"
+
+#include "EFLUtil.h"
+#undef LOG_LVL
+#define LOG_LVL DBG_MSG_LVL_MED
+
+#undef LOG_CAT
+#define LOG_CAT "IV-SLIDESHOW"
+
+
+#define IVUG_SS_EDJ    EDJ_PATH"/ivug-slideshow-view.edj"
+
+
+static void
+_on_slideshow_finished(void *data, Evas_Object *obj, void *event_info);
+
+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 bool _destory_slideshow_and_ug(Ivug_SlideShowView *pSSView,
+       int state,
+       bool bMmc_out)
+{
+       IV_ASSERT(pSSView != NULL);
+       evas_object_smart_callback_del_full(ivug_ss_object_get(pSSView->ssHandle),
+               "slideshow,finished", _on_slideshow_finished, pSSView);
+
+       ivug_allow_lcd_off();
+       /* send msg to caller */
+       if(state == SLIDE_SHOW_STOPPED)
+       {
+               _send_result(gGetUGHandle(), "EXIT", "NORMAL", NULL, NULL);
+       }
+       /*from gallery ablum*/
+
+       if (pSSView->ssHandle )
+       {
+               MSG_HIGH("image viewer end cause slide show ended");
+               ivug_ss_delete(pSSView->ssHandle);
+       }
+       pSSView->ssHandle = NULL;
+
+       DESTROY_ME();
+       return true;
+}
+
+static Eina_Bool _on_key_down(void *user_data, int type, void *event)
+{
+       if (!user_data) {
+               MSG_IMAGEVIEW_ERROR("user data is NULL");
+               return ECORE_CALLBACK_PASS_ON;
+       }
+
+       Ivug_SlideShowView *pSSView = static_cast<Ivug_SlideShowView *>(user_data);
+
+       Ecore_Event_Key *key_event = (Ecore_Event_Key *) event;
+
+       if (!strcmp(key_event->keyname, KEY_END))
+       {
+               MSG_IMAGEVIEW_HIGH("Bakc(End) key");
+       }
+       else if (!strcmp(key_event->keyname, KEY_SELECT))
+       {
+               MSG_IMAGEVIEW_HIGH("Home key");
+       }
+       else if (!strcmp(key_event->keyname, KEY_POWER))
+       {
+               MSG_IMAGEVIEW_HIGH("Power key");
+               if ( pSSView->ssHandle )
+               {
+                       ivug_ss_stop(pSSView->ssHandle);
+               }
+       }
+
+       MSG_IMAGEVIEW_LOW("Key down : %s", key_event->keyname);
+
+       return ECORE_CALLBACK_PASS_ON;
+}
+
+static void
+_on_slideshow_finished(void *data, Evas_Object *obj, void *event_info)
+{
+       MSG_HIGH("_on_slideshow_finished");
+       IV_ASSERT(data != NULL);
+
+       Ivug_SlideShowView *pSSView = static_cast<Ivug_SlideShowView *>(data);
+
+       int ss_state = (int)event_info;
+       bool bDestoryed = false;
+       bDestoryed = _destory_slideshow_and_ug(pSSView, ss_state, false);
+}
+
+static void _on_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       Ivug_SlideShowView *pSSView = static_cast<Ivug_SlideShowView *>(data);
+       IV_ASSERT(pSSView != NULL);
+
+       Evas_Coord x,y,w,h;
+       evas_object_geometry_get(obj, &x, &y, &w, &h);
+
+/**
+*  during slideshow, after rotation, resize cb of slideshow obj cannot be invoked,
+    so invoke it manually
+*/
+       if(pSSView->ssHandle)
+               ivug_ss_resize(pSSView->ssHandle);
+
+       MSG_HIGH("SlideshowView resized geomtery XYWH(%d,%d,%d,%d) Rotate=%d", x, y, w, h, gGetRotationDegree());
+}
+
+void _ivug_slideshow_view_on_mmc_state_changed(keynode_t* node, void *data)
+{
+       Ivug_SlideShowView *pSSView = static_cast<Ivug_SlideShowView *>(data);
+       IV_ASSERT(pSSView != NULL);
+
+       //ivug_timeout_popup_show(ivug_ss_object_get(pSSView->ssHandle), NULL, NULL, IDS_ERROR, IDS_SD_CARD_REMOVED);
+       ivug_ss_set_stop(pSSView->ssHandle);
+       _destory_slideshow_and_ug(pSSView, SLIDE_SHOW_STOPPED, true);
+}
+
+static char * _ivug_get_folder_name(char *filepath)
+{
+       char *folder = ecore_file_dir_get(filepath);
+
+       char *name = NULL;
+
+       name = strrchr(folder, '/');
+       if ( (name != NULL) && ((name+1) != NULL) )
+       {
+               return strdup(name + 1);
+       }
+
+       return NULL;
+}
+
+
+bool
+ivug_slideshow_view_set_list(Ivug_SlideShowView *pSSView, ivug_parameter *ivug_param)
+{
+       MSG_HIGH("Load media list.");
+
+       IV_ASSERT(pSSView != NULL);
+
+       PERF_CHECK_BEGIN(LVL2, "create media list");
+
+       Media_List *mlist = ivug_medialist_create();
+       if (mlist == NULL)
+       {
+               MSG_ERROR("Creating media list failed");
+               return false;
+       }
+       PERF_CHECK_END(LVL2, "create media list");
+
+       PERF_CHECK_BEGIN(LVL2, "create filter");
+
+       Filter_struct *filter = ivug_param_create_filter(ivug_param);
+       if (filter == NULL)
+       {
+               MSG_ERROR("Creating filter failed");
+               ivug_medialist_del(mlist);
+               return false;
+       }
+
+       PERF_CHECK_END(LVL2, "create filter");
+
+       Media_Item *current = NULL;
+       Media_Data *pData = NULL;
+
+       {
+               PERF_CHECK_BEGIN(LVL2, "media list load");
+               current = ivug_medialist_load(mlist, filter);
+               PERF_CHECK_END(LVL2, "media list load");
+       }
+
+       if(current == NULL)
+       {
+               MSG_ERROR("Media list load failed");
+               goto LOAD_LIST_FAILED;
+       }
+
+       pData = ivug_medialist_get_data(current);
+       if(pData == NULL)
+       {
+               MSG_ERROR("current data is NULL");
+               goto LOAD_LIST_FAILED;
+       }
+
+       if(pData->fileurl == NULL)
+       {
+               MSG_ERROR("current fileurl is NULL");
+               goto LOAD_LIST_FAILED;
+       }
+
+#ifdef USE_RESCAN_FILE_PATH_AT_LIST
+       if(strncmp(pData->fileurl, ivug_param->filepath, strlen(pData->fileurl)) != 0)
+       {
+               current = ivug_medialist_find_item_by_filename(mlist, ivug_param->filepath);
+               if(current == NULL)
+               {
+                       MSG_ERROR("Media list load failed, %s is not exist at list", ivug_param->filepath);
+                       goto LOAD_LIST_FAILED;
+               }
+       }
+#endif
+
+       if(ivug_param->view_by == IVUG_VIEW_BY_ALL)
+       {
+               pSSView->album_name = strdup(IDS_ALL_ALBUMS);
+       }
+       else if(ivug_param->view_by == IVUG_VIEW_BY_FOLDER)
+       {
+               // TODO : it is not run!! DB problem!!!
+               /*
+               media_handle m_handle = ivug_db_get_folder_handle(ecore_file_dir_get(ivug_param->filepath));
+               if(m_handle == NULL)
+               {
+                       MSG_IVUG_FATAL("View by Folder. but media handle is NULL" );
+                       return NULL;
+               }
+
+               pMainView->album_name = ivug_db_get_folder_name(m_handle);
+               */
+               pSSView->album_name = _ivug_get_folder_name(ivug_param->filepath);
+               if(pSSView->album_name == NULL)
+               {
+                       pSSView->album_name = strdup(IDS_NO_NAME);
+               }
+       }
+
+       pSSView->mList = mlist;
+       PERF_CHECK_BEGIN(LVL2, "media list set");
+
+       pSSView->ss_curItem = current;
+
+       PERF_CHECK_END(LVL2, "media list set");
+
+       ivug_data_filter_delete(filter);
+
+       return true;
+
+LOAD_LIST_FAILED:
+
+       if(filter)
+               ivug_data_filter_delete(filter);
+
+       if(mlist)
+               ivug_medialist_del(mlist);
+
+       pSSView->mList = NULL;
+       return false;
+}
+
+Ivug_SlideShowView *
+ivug_slideshow_view_create(Evas_Object* parent, ivug_mode mode, ivug_view_by view_by)
+{
+       IV_ASSERT(parent != NULL);
+
+       MSG_HIGH("Creating slideshow view. Parent=0x%08x Mode=%d ViewBy=%d", parent, mode, view_by);
+
+       PERF_CHECK_BEGIN(LVL2, "Create layout");
+
+//create main view layout
+       Ivug_SlideShowView *pSSView = (Ivug_SlideShowView *)calloc(1, sizeof(Ivug_SlideShowView) );
+       IV_ASSERT(pSSView != NULL);
+
+// Set default value
+       pSSView->parent = parent;
+       pSSView->view_by = view_by;
+
+       Evas_Object *layout;
+       layout = elm_layout_add(parent);
+       if ( layout == NULL)    //if failed
+       {
+               MSG_ERROR("main layout create failed");
+               free(pSSView);
+               return NULL;
+       }
+
+       pSSView->layout = layout;
+       evas_object_name_set(pSSView->layout, "SlideShow Layout");
+
+#if 0
+       if (elm_layout_file_set(layout, IVUG_SS_EDJ, "ssview") == EINA_FALSE)
+       {
+               MSG_MAIN_ERROR("edj loading fail, file=%s group=%s", IVUG_SS_EDJ, IVUG_SS_EDJ);
+               evas_object_del(layout);
+               free(pSSView);
+               return NULL;
+       }
+#endif
+       evas_object_event_callback_add(pSSView->layout, EVAS_CALLBACK_RESIZE, _on_resize, pSSView);
+
+       pSSView->keydown_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _on_key_down, (void *)pSSView);
+
+       MSG_HIGH("Main View Created");
+
+       return pSSView;
+}
+
+
+Evas_Object *
+ivug_slideshow_view_object_get(Ivug_SlideShowView *pSSView)
+{
+       IV_ASSERT(pSSView != NULL);
+
+       return pSSView->layout;
+}
+
+
+void
+ivug_slideshow_view_start(Ivug_SlideShowView *pSSView)
+{
+       IV_ASSERT(pSSView != NULL);
+
+       MSG_HIGH("Slide show running");
+
+       Media_Item *current = pSSView->ss_curItem;
+
+       ivug_prohibit_lcd_off();
+       //ivug_main_view_hide_menu_bar(pMainView);
+
+       pSSView->ssHandle = ivug_ss_create(pSSView->layout);
+
+// Register callback
+       evas_object_smart_callback_add(ivug_ss_object_get(pSSView->ssHandle),  "slideshow,finished", _on_slideshow_finished, pSSView);
+
+       elm_win_indicator_mode_set((Evas_Object *)ug_get_window(), ELM_WIN_INDICATOR_HIDE);
+
+       ivug_ss_start(pSSView->ssHandle, current, pSSView->mList, EINA_FALSE);
+
+}
+
+
+
+void
+ivug_slideshow_view_resume(Ivug_SlideShowView *pSSView)
+{
+       IV_ASSERT(pSSView != NULL);
+
+       MSG_HIGH("Slideshow View Resumed");
+
+       Media_Item *mitem = pSSView->ss_curItem;                // TODO: Check this!!!!
+       Media_Data *mdata = ivug_medialist_get_data(mitem);
+
+       IV_ASSERT(mdata != NULL);
+
+       if (mdata->slide_type == SLIDE_TYPE_IMAGE || mdata->slide_type == SLIDE_TYPE_VIDEO )
+       {
+               if(mdata->filepath && ecore_file_exists(mdata->filepath)) // Current file is not deleted
+               {
+                       MSG_HIGH("Current filepath : %s", mdata->filepath);
+               }
+               else
+               {
+                       /*if file is not exist ug terminated temporally */
+                       MSG_ERROR("Center file is not exist. stype=%d name=%s", mdata->slide_type, mdata->filepath);
+                       DESTROY_ME();
+                       return ;
+               }
+       }
+       else
+       {
+               MSG_ERROR("Unhandled slide type : %d", mdata->slide_type);
+       }
+}
+
+
+void
+ivug_slideshow_view_pause(Ivug_SlideShowView *pSSView)
+{
+       IV_ASSERT(pSSView != NULL);
+
+       if ( pSSView->ssHandle )
+       {
+               ivug_ss_stop(pSSView->ssHandle);
+       }
+
+       // Stop photocam If AGIF
+}
+
+
+void
+ivug_slideshow_view_destroy(Ivug_SlideShowView *pSSView)
+{
+       IV_ASSERT(pSSView != NULL);
+
+       MSG_HIGH("ENTER : SlideShow View Destroy. pMainView=0x%08x", pSSView);
+
+       MSG_HIGH("Unregister system notifications");
+       if (pSSView->layout) {
+               evas_object_del(pSSView->layout);
+               pSSView->layout = NULL;
+       }
+       if(pSSView->keydown_handler)
+       {
+               ecore_event_handler_del(pSSView->keydown_handler);
+               pSSView->keydown_handler = NULL;
+       }
+
+       if ( pSSView->mList )
+       {
+               MSG_MAIN_HIGH("Remove media list");
+               ivug_medialist_del(pSSView->mList);             // ivug_medialist_del() is not working on destroy cb.
+               pSSView->mList = NULL;
+       }
+       if(pSSView->album_name)
+       {
+               free(pSSView->album_name);
+               pSSView->album_name = NULL;
+       }
+       EFL::dump_obj(pSSView->parent, 0);
+       free(pSSView);
+       pSSView = NULL;
+       MSG_HIGH("LEAVE : SlideShow View Destroy.");
+
+       return ;
+}
+
+
old mode 100755 (executable)
new mode 100644 (file)
index 810ad7d..fc0d9b2
@@ -16,32 +16,32 @@ SET(SRCS
        src/ivug-medialist.c
        src/ivug-mediadata.c
        src/ivug-data-list.c
+       src/ivug-filter.c
 )
 
-MESSAGE("Checking " ${PROJECT_NAME}\r)
-
 INCLUDE(FindPkgConfig)
 pkg_check_modules(${PROJECT_NAME}_pkgs REQUIRED
        elementary
        dlog
        ui-gadget-1
+       liballshare
+       liballshare-core
+       libweb-media
        eina
        ecore
        capi-content-media-content
 )
 
 FOREACH(flag ${${PROJECT_NAME}_pkgs_CFLAGS})
-       SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
+       SET(EXTRA_FLAGS "${EXTRA_FLAGS} ${flag}")
 ENDFOREACH(flag)
 
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -Wall")
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS}")
-
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 
-ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+ADD_LIBRARY(${PROJECT_NAME} STATIC ${SRCS})
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION} )
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS ${EXTRA_FLAGS})
 
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${${PROJECT_NAME}_pkgs_LDFLAGS}
 ivug_common ivug_feature)
diff --git a/medialist/include/ivug-filter.h b/medialist/include/ivug-filter.h
new file mode 100644 (file)
index 0000000..9110e2e
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * 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 <Eina.h>
+
+#include "ivug-define.h"
+
+
+typedef enum {
+       FILTER_DB,
+       FILTER_DIRECTORY,
+}filter_type_e;
+
+typedef struct _DB_Filter{
+
+       union {         /*      CAUTION : Union type. check view_by variable before free()*/
+               char *file_path;
+               struct {
+                       double max_longitude;
+                       double min_longitude;
+                       double max_latitude;
+                       double min_latitude;
+               } place;
+
+               int tag_id;
+
+               UUID album_id;          // Cluster id
+       };
+
+} DB_Filter;
+
+
+
+typedef struct _Directory_Filter {
+       const char *basedir;
+       const char *current;            // Center Item.
+} Direcotry_Filter;
+
+typedef struct _Filter_struct{
+       filter_type_e type;
+       ivug_view_by view_by;
+       ivug_media_type media_type;
+       ivug_sort_type sort_type;
+       int index;
+
+       Eina_List *selected_list;
+
+
+       //union{
+       DB_Filter *db_filter;
+
+       Direcotry_Filter *dir_filter;
+       //}
+}Filter_struct;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+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__
+
old mode 100755 (executable)
new mode 100644 (file)
index d11da71..4439214
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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_MEDIA_H__
 #define __IVUG_MEDIA_H__
@@ -28,12 +28,16 @@ typedef enum {
        SLIDE_TYPE_NONE = 0x00,
        SLIDE_TYPE_IMAGE,
        SLIDE_TYPE_VIDEO,
+       SLIDE_TYPE_WEB_IMAGE,           // Web album or All share Image
        SLIDE_TYPE_STREAMING,
+       SLIDE_TYPE_PTP_IMAGE,
        SLIDE_TYPE_UNKNOWN,             // File is exists but it's type is unknown.
 } Media_Type;
 
 // Meida_Data can be one in File, DB, PTP, DLNA
 
+typedef void * allshare_item;
+
 /*
        This struct represents data for slide.
        thumbnail_path is slide's thumbnail image path.
@@ -41,17 +45,21 @@ typedef enum {
        filepath is local file path. if fileurl is http://.../test.jpg, filepath is NULL, when complete download filepath change to saved local file path.
 */
 typedef struct {
-       media_handle m_handle;\r
+       media_handle m_handle;
 
        int index;
 
 //Data
-       Media_Type slide_type;                  //image, video
+       Media_Type slide_type;                  //image, video, web image.
        bool bIsDRMContent;
 
        UUID mediaID;                                   // Unique Media ID
 
+       allshare_item asf_item;                 // Allshare item
+       char *serverID;                                 // Allshare server ID
+
        char* thumbnail_path;                   // thumbnail image file path.
+
        char* fileurl;                                  // file url.
        char* filepath;                                 // file path in local file system.
        char* drm_filepath;
@@ -62,6 +70,9 @@ typedef struct {
 extern "C" {
 #endif
 
+bool ivug_mediadata_set_tag(Media_Data *data, const char *newtag);
+bool ivug_mediadata_set_favorite(Media_Data *data, bool bFavorite);
+
 bool ivug_mediadata_delete(Media_Data * mdata);
 
 bool ivug_mediadata_free(Media_Data * mdata);
old mode 100755 (executable)
new mode 100644 (file)
index aa89b11..4d9792f
@@ -1,62 +1,33 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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_MEDIALIST_H__
 #define __IVUG_MEDIALIST_H__
 
+#include "ivug-define.h"
 #include "ivug-datatypes.h"
 #include "ivug-media.h"
 
-#include "ivug-define.h"
-
-typedef void *Media_Item;
-
-typedef enum {
-       FILTER_DB,
-}filter_type_e;
+#include "ivug-filter.h"
 
-typedef struct _DB_Filter{
-
-       union {         /*      CAUTION : Union type. check view_by variable before free()*/
-               char *file_path;
-               struct {
-                       double max_longitude;
-                       double min_longitude;
-                       double max_latitude;
-                       double min_latitude;
-               } place;
-
-               UUID album_id;          // Cluster id
-       };
-
-} DB_Filter;
-
-typedef struct _Filter_struct{
-       filter_type_e type;
-       ivug_view_by view_by;
-       ivug_media_type media_type;
-       ivug_sort_type sort_type;
-       int index;
-
-       DB_Filter *db_filter;
-}Filter_struct;
 
+typedef void *Media_Item;
 
 /* Opaque pointer for media list. */
-typedef void *Media_List;
+typedef void Media_List;
 
 #ifdef __cplusplus
 extern "C" {
@@ -64,10 +35,9 @@ extern "C" {
 
 Media_List * ivug_medialist_create();
 
-Media_Item * ivug_medialist_find_item_by_filename(Media_List *mList, const char* filepath);
-
 Media_Item *ivug_medialist_load(Media_List *mList, const Filter_struct *filter);
 
+
 void ivug_medialist_del(Media_List *mList);
 
 /*
@@ -75,6 +45,10 @@ void ivug_medialist_del(Media_List *mList);
 */
 int ivug_medialist_get_count(Media_List *mList);
 
+
+/*
+       Needed for displaying title. ex) Index/Total Count
+*/
 int ivug_medialist_get_index(Media_List *mList, Media_Item *item);
 
 
@@ -86,12 +60,17 @@ Media_Item *ivug_medialist_get_prev(Media_List *mList, Media_Item *item);
 
 void ivug_medialist_delete_item(Media_List *mList, Media_Item *item);
 
-Media_Data *ivug_medialist_get_data(Media_Item *item);
+Media_Data *ivug_medialist_get_data(const Media_Item *item);
 
 Media_Item *ivug_medialist_get_random_item(Media_List *mList);
 Media_Item *ivug_medialist_get_shuffle_item(Media_List *mList, Media_Item *item);
 
+
 Media_Item *ivug_medialist_find_item_by_index(Media_List *mList, int index);
+Media_Item * ivug_medialist_find_item_by_filename(Media_List *mList, const char* filepath);
+
+
+
 
 #ifdef __cplusplus
 }
old mode 100755 (executable)
new mode 100644 (file)
index 71fface..61471f6
@@ -1,18 +1,20 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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-data-list.h"
 #include "ivug-uuid.h"
 
 #include "ivug-db.h"
 
+#include "ivug-dir.h"
+#include "ivug-util.h"
+
+#include "ivug-filter.h"
+
 #include <Eina.h>
 
 #include <media_content.h>
@@ -48,7 +55,6 @@ static char *_strerror_db(int error)
        }
 }
 
-//Eina List Function.
 
 static bool
 _ivug_list_media_item_cb(media_info_h item, void *user_data)
@@ -65,6 +71,7 @@ _ivug_list_media_item_cb(media_info_h item, void *user_data)
 }
 
 
+
 Eina_List *
 ivug_list_load_DB_items(const Filter_struct *filter, int stp, int endp)
 {
@@ -72,6 +79,7 @@ ivug_list_load_DB_items(const Filter_struct *filter, int stp, int endp)
 
        DB_Filter *db_filter = filter->db_filter;
        char *string = NULL;
+       int ret = MEDIA_CONTENT_ERROR_NONE;
 
        if (filter->view_by == IVUG_VIEW_BY_FILE)
        {
@@ -97,8 +105,6 @@ ivug_list_load_DB_items(const Filter_struct *filter, int stp, int endp)
 
        ivug_db_set_filter_offset(media_filter, stp, endp);
 
-       int ret = MEDIA_CONTENT_ERROR_NONE;
-
        Eina_List *item_list = NULL;
 
        switch(filter->view_by)
@@ -116,6 +122,9 @@ ivug_list_load_DB_items(const Filter_struct *filter, int stp, int endp)
                        ret = media_info_foreach_media_from_db(media_filter, _ivug_list_media_item_cb, &item_list);
                        break;
 
+               case IVUG_VIEW_BY_TAG:
+                       ret = media_tag_foreach_media_from_db(db_filter->tag_id, media_filter, _ivug_list_media_item_cb, &item_list);
+                       break;
                case IVUG_VIEW_BY_PLACES:
                        ret = media_info_foreach_media_from_db(media_filter, _ivug_list_media_item_cb, &item_list);
                        break;
@@ -166,6 +175,109 @@ ivug_list_load_DB_items(const Filter_struct *filter, int stp, int endp)
        return slide_list;
 }
 
+Eina_List *
+ivug_list_load_DB_items_list(const Filter_struct *filter, Eina_List *list)
+{
+       IV_ASSERT(filter != NULL);
+
+       DB_Filter *db_filter = filter->db_filter;
+       char *string = NULL;
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       filter_handle media_filter = NULL;
+       ivug_db_create_filter(&media_filter);
+
+       if(filter->view_by == IVUG_VIEW_BY_PLACES)
+       {
+               string = calloc(1, sizeof(char)*IVUG_MAX_CONDITION_LEN);
+               snprintf(string, IVUG_MAX_CONDITION_LEN,
+                       "(MEDIA_LONGITUDE >= %f AND MEDIA_LONGITUDE <= %f AND MEDIA_LATITUDE >= %f AND MEDIA_LATITUDE <= %f)",
+                       db_filter->place.min_longitude, db_filter->place.max_longitude,
+                       db_filter->place.min_latitude, db_filter->place.max_latitude);
+       }
+       ivug_db_set_filter(media_filter, filter->view_by, filter->media_type, string);
+
+       Eina_List *l = NULL;
+       void *data = NULL;
+       int index = -1;
+       Eina_List *item_list = NULL;
+
+       EINA_LIST_FOREACH(list, l, data)
+       {
+               index = (int)data;
+               ivug_db_set_filter_offset(media_filter, index, index);
+
+               switch(filter->view_by)
+               {
+                       case IVUG_VIEW_BY_FOLDER:
+                               ret = media_folder_foreach_media_from_db(db_filter->album_id,
+                                                       media_filter, _ivug_list_media_item_cb, &item_list);
+                               break;
+
+                       case IVUG_VIEW_BY_ALL:
+                               ret = media_info_foreach_media_from_db(media_filter, _ivug_list_media_item_cb, &item_list);
+                               break;
+
+                       case IVUG_VIEW_BY_FAVORITES:
+                               ret = media_info_foreach_media_from_db(media_filter, _ivug_list_media_item_cb, &item_list);
+                               break;
+
+                       case IVUG_VIEW_BY_TAG:
+                               ret = media_tag_foreach_media_from_db(db_filter->tag_id, media_filter, _ivug_list_media_item_cb, &item_list);
+                               break;
+                       case IVUG_VIEW_BY_PLACES:
+                               ret = media_info_foreach_media_from_db(media_filter, _ivug_list_media_item_cb, &item_list);
+                               break;
+
+                       default:
+                               MSG_SDATA_FATAL("Invalid View By=%d", filter->view_by);
+                               return NULL;
+               }
+       }
+
+       ivug_db_destroy_filter(media_filter);
+
+       if ( ret != MEDIA_CONTENT_ERROR_NONE )
+       {
+               MSG_SDATA_ERROR("[%s] Error=%d VieBy=%d", __func__, ret, filter->view_by);
+               return NULL;
+       }
+
+// Creating media_list.
+       Eina_List *slide_list = NULL;
+
+       Eina_List *item;
+       media_info_h mitem = NULL;
+
+       Media_Data *mdata = NULL;
+
+       int i = 0;
+
+       EINA_LIST_FOREACH(item_list, item, mitem)
+       {
+               mdata = ivug_alloc_mediadata_from_media_handle(mitem);
+               mdata->index = i;
+
+               i++;
+
+               IV_ASSERT(mdata != NULL);
+
+               MSG_SDATA_LOW("Add Mdata. Mdata=0x%08x %s", mdata, mdata->filepath);
+               slide_list = eina_list_append(slide_list, mdata);
+       }
+
+       EINA_LIST_FREE(item_list, mitem)
+       {
+               media_info_destroy(mitem);
+       }
+
+       MSG_SDATA_HIGH("Item header=0x%08x Item loaded %d items", slide_list, eina_list_count(item_list));
+
+       return slide_list;
+}
+
+
+
 int ivug_list_get_item_cnt(const Filter_struct *filter)
 {
        filter_h media_filter = NULL;
@@ -176,6 +288,12 @@ int ivug_list_get_item_cnt(const Filter_struct *filter)
 
        char *string = NULL;
 
+
+       if(filter->selected_list)
+       {
+               return eina_list_count(filter->selected_list);
+       }
+
        DB_Filter *db_filter = filter->db_filter;
 
        ivug_db_create_filter((filter_handle*)&media_filter);
@@ -200,6 +318,20 @@ int ivug_list_get_item_cnt(const Filter_struct *filter)
                        }
                        MSG_SDATA_HIGH("IVUG_VIEW_BY_ALL. MediaType=%d Count=%d", filter->media_type, count);
                        break;
+               case IVUG_VIEW_BY_TAG:
+                       if(db_filter->tag_id <= 0 )
+                       {
+                               MSG_SDATA_ERROR("tag id is invalid");
+                               goto GET_COUNT_ERROR;
+                       }
+                       ret = media_tag_get_media_count_from_db(db_filter->tag_id, media_filter, &count);
+                       if(ret != MEDIA_CONTENT_ERROR_NONE)
+                       {
+                               MSG_SDATA_ERROR("media_tag_get_tag_count_from_db is failed, err = %s", _strerror_db(ret));
+                               goto GET_COUNT_ERROR;
+                       }
+                       MSG_SDATA_HIGH("IVUG_VIEW_BY_TAG. Count=%d", count);
+                       break;
                case IVUG_VIEW_BY_PLACES:
                        ret = media_info_get_media_count_from_db(media_filter, &count);
                        if(ret != MEDIA_CONTENT_ERROR_NONE)
@@ -235,6 +367,10 @@ int ivug_list_get_item_cnt(const Filter_struct *filter)
                case IVUG_VIEW_BY_FILE:
                        count = 1;      // item count is always 1 when by file
                        break;
+               case IVUG_VIEW_BY_ALLSHARE:
+                       MSG_SDATA_FATAL("All share cannot support get count");
+                       goto GET_COUNT_ERROR;
+                       break;
                default:
                        MSG_SDATA_ERROR("Unhandled view_by : %d", filter->view_by);
                        goto GET_COUNT_ERROR;
@@ -271,3 +407,77 @@ void ivug_list_delete_items(Eina_List *items)
        }
 }
 
+
+
+
+static void enum_dir(const char *fname, void *user_data)
+{
+       IV_ASSERT(user_data != NULL);
+
+       Eina_List **list = (Eina_List **)user_data;
+
+// Alloc new mdata
+       Media_Data *mdata = NULL;
+
+       mdata = (Media_Data *)calloc(1, sizeof(Media_Data));
+
+// Thumbnail path format.. ".thumbs/xxxx_thm.ext"
+// File path format.. "xxxx_bestpic.ext"
+
+       mdata->fileurl = strdup(fname);
+       mdata->filepath = strdup(fname);                                // file path in local file system.
+       mdata->slide_type = SLIDE_TYPE_IMAGE;           // Currently, Best pic is only for image
+
+// Get thumblist.
+       char *dir = ivug_get_directory(fname);  // User free return value.
+       char *file = ivug_get_filename(fname); // User should not free return value.
+
+       char *thumbpath = (char *)malloc(strlen(dir) + strlen(file) + strlen("/.thumbs/")+ 1);
+
+       sprintf(thumbpath, "%s/.thumbs/%s", dir, file);
+
+       mdata->thumbnail_path = thumbpath; // thumbnail image file path.
+
+       free(dir);
+       *list = eina_list_append(*list, (void *)mdata);
+
+}
+
+int ivug_list_get_dir_cnt(const char *basedir)
+{
+       int count = 0;
+
+       count = GetFilesCountInDir(basedir);
+
+       if ( count < 0 )
+       {
+               MSG_SDATA_ERROR("Cannot get item count in dir : %s", basedir);
+               return 0;
+       }
+
+       MSG_SDATA_HIGH("IVUG_VIEW_BY_DIRECTORY. Count=%d", count);
+
+       return count;
+}
+
+
+Eina_List *
+ivug_list_load_dir_items(const char *basedir)
+{
+       Eina_List *list = NULL;
+
+       bool result = false;
+
+       result = EnumFilesInDir(basedir, enum_dir, &list);
+
+       if ( result == false)
+       {
+               MSG_SDATA_ERROR("Cannit get file list in %s", basedir);
+               return NULL;
+       }
+
+       return list;
+}
+
+
+
old mode 100755 (executable)
new mode 100644 (file)
index 94fd945..05e93bb
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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_DATA_LIST_H__
 #define __IVUG_DATA_LIST_H__
@@ -26,12 +26,21 @@ extern "C" {
 /*
        stp/endp is botn -1 when want to retrieve all items.
 */
+
 Eina_List *ivug_list_load_DB_items(const Filter_struct *filter, int stp, int endp);
 
+Eina_List *ivug_list_load_DB_items_list(const Filter_struct *filter, Eina_List *list);
+
 int ivug_list_get_item_cnt(const Filter_struct *filter);
 
 void ivug_list_delete_items(Eina_List *items);
 
+
+int ivug_list_get_dir_cnt(const char *basedir);
+
+Eina_List *ivug_list_load_dir_items(const char *basedir);
+
+
 #ifdef __cplusplus
 }
 #endif
old mode 100755 (executable)
new mode 100644 (file)
similarity index 63%
rename from main/src/control/ivug-filter.c
rename to medialist/src/ivug-filter.c
index 56e08f7..b374cf3
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 "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)
+void ivug_data_filter_delete(Filter_struct *filter_str)
 {
-       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("Removing filter struct. Type=%d", filter_str->type);
 
-       MSG_SDATA_HIGH("param->view_by is %d", param->view_by);
-       switch(param->view_by)
+       if(filter_str->selected_list)
        {
-       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;
-
+               eina_list_free(filter_str->selected_list);
+               filter_str->selected_list = NULL;
        }
 
-       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;
@@ -87,6 +42,11 @@ void ivug_data_filter_delete(Filter_struct *filter_str)
                {
                case IVUG_VIEW_BY_PLACES:
                        break;
+               case IVUG_VIEW_BY_TAG:
+                       break;
+               case IVUG_VIEW_BY_FAVORITES:
+                       break;
+
                case IVUG_VIEW_BY_FILE:
                        if ( filter->file_path )
                        {
@@ -101,6 +61,17 @@ void ivug_data_filter_delete(Filter_struct *filter_str)
                        uuid_free(filter->album_id);
                        break;
 
+               case IVUG_VIEW_BY_WEB:
+                       if ( filter->file_path )
+                       {
+                               free(filter->file_path);
+                       }
+                       break;
+
+               case IVUG_VIEW_BY_WEBALBUM:
+                       uuid_free(filter->album_id);
+                       break;
+
                case IVUG_VIEW_BY_INVAILD:
                default:
                        MSG_SDATA_WARN("Invalid ViewBy : %d", filter_str->view_by);
@@ -115,7 +86,7 @@ void ivug_data_filter_delete(Filter_struct *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));
+       Filter_struct *cFilter_str = calloc(1, sizeof(Filter_struct));
        IV_ASSERT(cFilter_str != NULL);
 
        memcpy(cFilter_str, filter_str, sizeof(Filter_struct));
@@ -123,13 +94,18 @@ Filter_struct *ivug_data_filter_copy(const Filter_struct *filter_str)
        if(filter_str->type == FILTER_DB)
        {
                DB_Filter *filter = filter_str->db_filter;
-               DB_Filter *cFilter = malloc(sizeof(DB_Filter));
+               DB_Filter *cFilter = calloc(1, sizeof(DB_Filter));
                memcpy(cFilter, filter, sizeof(DB_Filter));
 
                switch(filter_str->view_by)
                {
                case IVUG_VIEW_BY_PLACES:
                        break;
+               case IVUG_VIEW_BY_TAG:
+                       cFilter->tag_id = filter->tag_id;
+                       break;
+               case IVUG_VIEW_BY_FAVORITES:
+                       break;
 
                case IVUG_VIEW_BY_FILE:
                        cFilter->file_path = strdup( filter->file_path );
@@ -148,6 +124,19 @@ Filter_struct *ivug_data_filter_copy(const Filter_struct *filter_str)
                        cFilter->album_id = uuid_assign( filter->album_id );
                        break;
 
+               case IVUG_VIEW_BY_WEB:
+                       cFilter->file_path = strdup( filter->file_path );
+
+                       if ( filter->file_path )
+                       {
+                               free(filter->file_path);
+                       }
+                       break;
+
+               case IVUG_VIEW_BY_WEBALBUM:
+                       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);
@@ -159,3 +148,4 @@ Filter_struct *ivug_data_filter_copy(const Filter_struct *filter_str)
        return cFilter_str;
 }
 
+
old mode 100755 (executable)
new mode 100644 (file)
index bc97761..dbc76f4
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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-datatypes.h"
@@ -20,7 +20,7 @@
 #include "ivug-debug.h"
 #include "ivug-mediadata.h"
 #include "ivug-util.h"
-#include "ivug-drm.h"
+#include "ivug-drm-common.h"
 #include "ivug-file-info.h"
 
 #include "ivug-db.h"
@@ -64,7 +64,7 @@ Media_Data *ivug_alloc_mediadata_from_media_handle(media_handle media)
 
        media_info_h item = (media_info_h)media;
 
-       int ret = media_info_clone((media_info_h*)&(mdata->m_handle), item);\r
+       int ret = media_info_clone((media_info_h*)&(mdata->m_handle), item);
        if(ret != MEDIA_CONTENT_ERROR_NONE)
        {
                MSG_SDATA_ERROR("media_info_foreach_media_from_db is failed, err = %s", _strerror_db(ret));
@@ -100,10 +100,15 @@ Media_Data *ivug_alloc_mediadata_from_media_handle(media_handle media)
                MSG_SDATA_ERROR("media_info_foreach_media_from_db is failed, err = %s", _strerror_db(ret));
                goto ALLOC_MHANDLE_ERROR;
        }
+
+#if 0
+       // Useless codes because media_info_get_thumbnail_path() never failed.
        if(mdata->thumbnail_path == NULL)
        {
+               MSG_SDATA_ERROR("Thumbnail path is NULL");
                mdata->thumbnail_path = strdup(DEFAULT_THUMBNAIL_PATH);
        }
+#endif
 
        ret = media_info_is_drm(item, &(mdata->bIsDRMContent));
        if(ret != MEDIA_CONTENT_ERROR_NONE)
@@ -122,16 +127,18 @@ Media_Data *ivug_alloc_mediadata_from_media_handle(media_handle media)
 
        if(media_type == MEDIA_CONTENT_TYPE_IMAGE)
        {
-               MSG_SDATA_MED("Local image : %s. %s", uuid_getchar( mdata->mediaID ), mdata->fileurl);
-
-               mdata->slide_type = SLIDE_TYPE_IMAGE;
-               mdata->filepath = strdup(mdata->fileurl);
-
-               if (ivug_drm_is_drm_file(mdata->filepath) == EINA_TRUE)
+               if (ivug_is_web_uri(mdata->fileurl) == true)
                {
-                       mdata->bIsDRMContent = EINA_TRUE;
+                       MSG_SDATA_MED("Remote image : %s. %s", uuid_getchar(mdata->mediaID), mdata->fileurl);
+                       mdata->slide_type = SLIDE_TYPE_WEB_IMAGE;
                }
+               else
+               {
+                       MSG_SDATA_MED("Local image : %s. %s", uuid_getchar( mdata->mediaID ), mdata->fileurl);
 
+                       mdata->slide_type = SLIDE_TYPE_IMAGE;
+                       mdata->filepath = strdup(mdata->fileurl);
+               }
        }
        else if(media_type == MEDIA_CONTENT_TYPE_VIDEO)
        {
@@ -139,12 +146,6 @@ Media_Data *ivug_alloc_mediadata_from_media_handle(media_handle media)
 
                mdata->slide_type = SLIDE_TYPE_VIDEO;
                mdata->filepath = strdup(mdata->fileurl);
-
-               if (ivug_drm_is_drm_file(mdata->filepath) == EINA_TRUE)
-               {
-                       mdata->bIsDRMContent = EINA_TRUE;
-               }
-
        }
 
        return mdata;
@@ -172,6 +173,7 @@ Media_Data *ivug_alloc_mediadata_from_filepath(const char *filepath)
                        MSG_SDATA_HIGH("File path founded in DB.");
                        return mdata;
                }
+               media_info_destroy(m_handle);
        }
        // Some file does not have media handle ex) USB host, Not inserted in DB yet
 
@@ -218,36 +220,64 @@ Media_Data *ivug_alloc_mediadata_from_filepath(const char *filepath)
        free(mime_type);                //free strdup
        if (slide_type == SLIDE_TYPE_IMAGE)
        {
-               mdata->slide_type = SLIDE_TYPE_IMAGE;
-               mdata->fileurl = strdup(filepath);
-               if (mdata->fileurl == NULL)
+               if (ivug_is_web_uri(filepath) == true)
                {
-                       MSG_SDATA_ERROR("strdup return NULL");
-                       goto ERROR;
+                       mdata->slide_type = SLIDE_TYPE_WEB_IMAGE;
+                       mdata->fileurl = strdup(filepath);
+                       if (mdata->fileurl == NULL)
+                       {
+                               MSG_SDATA_ERROR("strdup return NULL");
+                               goto ERROR;
+                       }
+                       mdata->filepath = NULL;
                }
-               mdata->filepath = strdup(filepath);
-               if (mdata->filepath == NULL)
+               else
                {
-                       MSG_SDATA_ERROR("strdup return NULL");
-                       free(mdata->fileurl);
-                       goto ERROR;
+                       mdata->slide_type = SLIDE_TYPE_IMAGE;
+                       mdata->fileurl = strdup(filepath);
+                       if (mdata->fileurl == NULL)
+                       {
+                               MSG_SDATA_ERROR("strdup return NULL");
+                               goto ERROR;
+                       }
+                       mdata->filepath = strdup(filepath);
+                       if (mdata->filepath == NULL)
+                       {
+                               MSG_SDATA_ERROR("strdup return NULL");
+                               free(mdata->fileurl);
+                               goto ERROR;
+                       }
                }
        }
        else if (slide_type == SLIDE_TYPE_VIDEO)
        {
-               mdata->slide_type = SLIDE_TYPE_VIDEO;
-               mdata->fileurl = strdup(filepath);
-               if (mdata->fileurl == NULL)
+               if (ivug_is_web_uri(filepath) == true)
                {
-                       MSG_SDATA_ERROR("strdup return NULL");
-                       goto ERROR;
+                       mdata->slide_type = SLIDE_TYPE_STREAMING;
+                       mdata->fileurl = strdup(filepath);
+                       if (mdata->fileurl == NULL)
+                       {
+                               MSG_SDATA_ERROR("strdup return NULL");
+                               goto ERROR;
+                       }
+                       mdata->filepath = NULL;
                }
-               mdata->filepath = strdup(filepath);
-               if (mdata->filepath == NULL)
+               else
                {
-                       MSG_SDATA_ERROR("strdup return NULL");
-                       free(mdata->fileurl);
-                       goto ERROR;
+                       mdata->slide_type = SLIDE_TYPE_VIDEO;
+                       mdata->fileurl = strdup(filepath);
+                       if (mdata->fileurl == NULL)
+                       {
+                               MSG_SDATA_ERROR("strdup return NULL");
+                               goto ERROR;
+                       }
+                       mdata->filepath = strdup(filepath);
+                       if (mdata->filepath == NULL)
+                       {
+                               MSG_SDATA_ERROR("strdup return NULL");
+                               free(mdata->fileurl);
+                               goto ERROR;
+                       }
                }
        }
        else
@@ -266,20 +296,47 @@ ERROR:
        return NULL;
 }
 
+
+
+Media_Data *ivug_alloc_mediadata_from_url(const char *url)
+{
+       IV_ASSERT(url != NULL);
+
+       Media_Data * mdata = NULL;
+       mdata = (Media_Data *) calloc(1, sizeof(Media_Data));
+       if (mdata == NULL)
+       {
+               MSG_SDATA_ERROR("Cannot allocate memory");
+               return NULL;
+       }
+
+       //file url
+       mdata->fileurl = strdup(url);
+       if (mdata->fileurl == NULL)
+       {
+               MSG_SDATA_ERROR("strdup return NULL");
+               free(mdata);
+               return NULL;
+       }
+
+       return mdata;
+}
+
 void ivug_free_mediadata(Media_Data * mdata)
 {
        IV_ASSERT(mdata != NULL);
 
 #ifdef USE_NEW_DB_API
-       if(mdata->m_handle)\r
+       if(mdata->m_handle)
        {
-               media_info_destroy(mdata->m_handle);\r
-               mdata->m_handle = NULL;\r
+               media_info_destroy(mdata->m_handle);
+               mdata->m_handle = NULL;
        }
 #endif
 
        uuid_free(mdata->mediaID);
 
+
        //file path
        if (mdata->filepath)
        {
@@ -317,6 +374,45 @@ void ivug_free_mediadata(Media_Data * mdata)
        free(mdata);
 }
 
+bool ivug_mediadata_set_tag(Media_Data *data, const char *newtag)
+{
+       ivug_retv_if(!newtag, false);
+
+       MSG_UTIL_HIGH("Add Tag : uuid(%s), tag_name=%s", uuid_getchar(data->mediaID), newtag);
+
+       tag_handle tag;
+       bool ret = ivug_db_create_tag(&tag, newtag);
+       if(ret == false)
+       {
+               MSG_SDATA_WARN("tag already created");
+               tag = ivug_db_get_tag_handle(newtag);
+               if(tag == NULL)
+               {
+                       MSG_SDATA_ERROR("ivug_db_get_tag_handle ERROR");
+                       return false;
+               }
+       }
+
+       ret = ivug_db_set_tag(data->m_handle, tag);
+       if(ret == false)
+       {
+               MSG_SDATA_ERROR("ivug_db_set_tag ERROR");
+       }
+
+       ivug_db_destroy_tag(tag);
+
+       return ret;
+}
+
+bool ivug_mediadata_set_favorite(Media_Data *data, bool bFavorite)
+{
+       MSG_UTIL_HIGH("Add Favorite : uuid(%s), bFavorite=%d", uuid_getchar(data->mediaID), bFavorite);
+
+       return ivug_db_set_favorite(data->m_handle, bFavorite);
+}
+
+
+
 bool ivug_mediadata_delete(Media_Data * mdata)
 {
        IV_ASSERT(mdata != NULL);
old mode 100755 (executable)
new mode 100644 (file)
index f1f7b61..ea18121
@@ -1,24 +1,26 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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_MEDIADATA_H__
 #define __IVUG_MEDIADATA_H__
 
+
 #include "ivug-media.h"
 
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -30,6 +32,7 @@ extern "C" {
 **/
 Media_Data *ivug_alloc_mediadata_from_filepath(const char* filepath);
 
+
 /**
   * Converting WMitem to Media_Data
   * @param item[in]
@@ -38,6 +41,9 @@ Media_Data *ivug_alloc_mediadata_from_filepath(const char* filepath);
 
 Media_Data *ivug_alloc_mediadata_from_media_handle(media_handle media);
 
+Media_Data *ivug_alloc_mediadata_from_url(const char *url);
+
+
 /**
   * Free memory used by Media_Data
   * @param mdata[in]
old mode 100755 (executable)
new mode 100644 (file)
index 39ff16f..22ce4b8
@@ -23,6 +23,7 @@
 
 #include "ivug-data-list.h"
 
+
 #include "ivug-db.h"
 
 #include <Ecore.h>
@@ -43,11 +44,11 @@ typedef struct {
        Ecore_Thread *thread;   // Loading thread
        Eina_Lock mutex;
        Eina_Condition condition;
-       Eina_Lock end_mutex;
 
        Eina_Bool bTerminate;   //
 
        bool bLoading;                  // Is thread loading on progress?
+       bool bStarted;                  // Is thread started?
        Filter_struct *filter_str;
 
        Eina_List *shufflelist; // Shuffle liste
@@ -57,7 +58,7 @@ typedef struct {
 
 typedef struct {
        _Media_List *_mList;
-       const Filter_struct *filter_str;
+       Filter_struct *filter_str;
 
        int center_block;
        int max_block;
@@ -88,7 +89,17 @@ static Eina_List *_load_block(const Filter_struct *filter, int block_num)
        Eina_List *header = NULL;
 
 #ifdef UT_USE_DB
-       header = ivug_list_load_DB_items(filter, stp, endp);
+       {
+               if(filter->selected_list)
+               {
+                       header = ivug_list_load_DB_items_list(filter, filter->selected_list);
+               }
+               else
+               {
+                       header = ivug_list_load_DB_items(filter, stp, endp);
+               }
+       }
+
 #else
        Eina_List *header = NULL;
 
@@ -205,8 +216,23 @@ static void loader_heavy(void *data, Ecore_Thread *thread)
        }
 #endif
 
-       eina_lock_new(&pParam->_mList->mutex);
-       eina_condition_new(&pParam->_mList->condition, &pParam->_mList->mutex);
+       Eina_Bool ret = EINA_FALSE;
+
+       ret = eina_lock_new(&pParam->_mList->mutex);
+       if(ret == EINA_FALSE)
+       {
+               MSG_SDATA_FATAL("eina_lock_new failed");
+       }
+       else
+       {
+               ret = eina_condition_new(&pParam->_mList->condition, &pParam->_mList->mutex);
+               if(ret == EINA_FALSE)
+               {
+                       MSG_SDATA_FATAL("eina_condition_new failed");
+               }
+       }
+
+       pParam->_mList->bStarted = true;
 
        MSG_SDATA_HIGH("Load : Begin");
 
@@ -219,25 +245,30 @@ static void loader_heavy(void *data, Ecore_Thread *thread)
        eina_lock_take(&pParam->_mList->mutex);
        eina_condition_signal(&pParam->_mList->condition);
        eina_lock_release(&pParam->_mList->mutex);
-
 }
 
 
 static void loader_end(void *data, Ecore_Thread *thread)
 {
-//     ThreadParam *pParam = data;
+       ThreadParam *pParam = data;
 
        //  MSG_SDATA_HIGH("Thread Ended. EinaCount=%d Count=%d", eina_list_count(pParam->_mList), pParam->_mList->count);
        MSG_SDATA_HIGH("Thread Ended. tID=0x%08x", thread);
 
        PERF_CHECK_END(LVL3, "Deffered loading");
+
+       ivug_data_filter_delete(pParam->filter_str);
 }
 
 static void loader_cancel(void *data, Ecore_Thread *thread)
 {
+       ThreadParam *pParam = data;
+
        MSG_SDATA_HIGH("Thread canceled. tID=0x%08x", thread);
 
        PERF_CHECK_END(LVL3, "Deffered loading");
+
+       ivug_data_filter_delete(pParam->filter_str);
 }
 
 static int _sort_cb(const void *d1, const void *d2)
@@ -317,6 +348,7 @@ Media_Item * ivug_medialist_find_item_by_filename(Media_List *mList, const char*
        return NULL;
 }
 
+
 Media_Item *ivug_medialist_load(Media_List *mList, const Filter_struct *filter)
 {
        IV_ASSERT(mList != NULL);
@@ -339,8 +371,39 @@ Media_Item *ivug_medialist_load(Media_List *mList, const Filter_struct *filter)
 
 #else
        PERF_CHECK_BEGIN(LVL3, "MediaList - Get list count");
+        if(filter->view_by == IVUG_VIEW_BY_DIRECTORY)
+       {
+               _mList->count = ivug_list_get_dir_cnt(filter->dir_filter->basedir);
 
-       _mList->count = ivug_list_get_item_cnt(filter);
+               if ( _mList->count == 0 )
+               {
+                       MSG_SDATA_FATAL("No file founded");
+                       return NULL;
+               }
+
+               _mList->header = ivug_list_load_dir_items(filter->dir_filter->basedir);
+
+// Find Current.
+               Eina_List *l = NULL;
+               void *data;
+
+               EINA_LIST_FOREACH(_mList->header, l, data)
+               {
+                       Media_Data *pData = data;
+
+                       if (strcmp(pData->fileurl, filter->dir_filter->current) == 0)
+                       {
+                               return (Media_Item *)l;
+                       }
+               }
+
+               MSG_SDATA_ERROR("Not found current");
+               return NULL;
+       }
+       else
+       {
+               _mList->count = ivug_list_get_item_cnt(filter);
+       }
 
        PERF_CHECK_END(LVL3, "MediaList - Get list count");
 
@@ -368,7 +431,8 @@ Media_Item *ivug_medialist_load(Media_List *mList, const Filter_struct *filter)
 
        if(_mList->header == NULL)
        {
-               MSG_SDATA_FATAL("MediaList is NULL");
+               //MSG_SDATA_FATAL("MediaList is NULL");
+               MSG_SDATA_ERROR("MediaList is NULL");
                return NULL;
        }
 
@@ -387,7 +451,6 @@ Media_Item *ivug_medialist_load(Media_List *mList, const Filter_struct *filter)
                return NULL;
        }
 
-
        PERF_CHECK_BEGIN(LVL3, "MediaList - shuffle");
 
        int i;
@@ -414,15 +477,13 @@ Media_Item *ivug_medialist_load(Media_List *mList, const Filter_struct *filter)
 
        pParam = malloc(sizeof(ThreadParam));
 
-       pParam->filter_str = filter;
+       pParam->filter_str = ivug_data_filter_copy(filter);
        pParam->_mList = _mList;
        pParam->center_block = block_num;
        pParam->max_block = block_max;
 
        _mList->bLoading = true;
 
-       eina_lock_new(&_mList->end_mutex);
-
        MSG_SDATA_HIGH("Starting thread");
 
        PERF_CHECK_BEGIN(LVL3, "Deffered loading");
@@ -434,11 +495,13 @@ Media_Item *ivug_medialist_load(Media_List *mList, const Filter_struct *filter)
        return (Media_Item *)current;
 }
 
+
 void
 ivug_medialist_del(Media_List *mList)
 {
        IV_ASSERT(mList != NULL);
        _Media_List *_mList = (_Media_List *)mList;
+       Eina_Bool ret = EINA_FALSE;
 
        MSG_SDATA_HIGH("Removing all media data");
 
@@ -451,10 +514,23 @@ ivug_medialist_del(Media_List *mList)
                        MSG_SDATA_HIGH("Thread canceled");
                }
 #endif
-          _mList->bTerminate = EINA_TRUE;
+               _mList->bTerminate = EINA_TRUE;
 
-       eina_condition_wait(&_mList->condition);
-       eina_lock_release(&_mList->mutex);
+               if(_mList->bStarted)
+               {
+                       ret = eina_condition_wait(&_mList->condition);
+                       if(ret == EINA_FALSE)
+                       {
+                               MSG_SDATA_ERROR("eina_condition_wait error");
+                       }
+                       ret = eina_lock_release(&_mList->mutex);
+                       if(ret == EINA_FALSE)
+                       {
+                               MSG_SDATA_ERROR("eina_lock_release error");
+                       }
+                       eina_condition_free(&_mList->condition);
+                       eina_lock_free(&_mList->mutex);
+               }
 
                _mList->thread = NULL;
                MSG_SDATA_HIGH("2. Thread cancel");
@@ -465,6 +541,9 @@ ivug_medialist_del(Media_List *mList)
 
        eina_list_free(_mList->shufflelist);
        _mList->shufflelist = NULL;
+
+       _mList->bStarted = false;
+
        free(_mList);
 
 }
@@ -549,7 +628,7 @@ Media_Item *ivug_medialist_get_prev(Media_List *mList, Media_Item *item)
 
 }
 
-Media_Data *ivug_medialist_get_data(Media_Item *item)
+Media_Data *ivug_medialist_get_data(const Media_Item *item)
 {
        IV_ASSERT(item != NULL);
 
diff --git a/packaging/changelog b/packaging/changelog
new file mode 100644 (file)
index 0000000..511b1f8
--- /dev/null
@@ -0,0 +1,3437 @@
+ug-image-viewer-efl (1.6.81)
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.81
+
+ug-image-viewer-efl (1.6.80)
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.80
+
+ug-image-viewer-efl (1.6.79)
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.79
+
+ug-image-viewer-efl (1.6.78)
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.78
+
+ug-image-viewer-efl (1.6.77)
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.77
+
+ug-image-viewer-efl (1.6.75)
+
+  * modify water ripple
+  * Tag: ug-image-viewer-efl_1.6.75
+
+ug-image-viewer-efl (1.6.74)
+
+  * fix build error
+  * Tag: ug-image-viewer-efl_1.6.74
+
+ug-image-viewer-efl (1.6.73)
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.73
+
+ug-image-viewer-efl (1.6.72)
+
+  * fix PLM issue
+  * Tag: ug-image-viewer-efl_1.6.72
+
+ug-image-viewer-efl (1.6.71)
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.71
+
+ug-image-viewer-efl (1.6.70)
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.70
+
+ug-image-viewer-efl (1.6.69)
+
+  * show popup when invalid path
+  * Tag: ug-image-viewer-efl_1.6.69
+
+ug-image-viewer-efl (1.6.68)
+
+  * fix buddy photo share bug
+  * Tag: ug-image-viewer-efl_1.6.68
+
+ug-image-viewer-efl (1.6.67)
+
+  * fix slide show
+  * Tag: ug-image-viewer-efl_1.6.67
+
+ug-image-viewer-efl (1.6.65)
+
+  * fix bs at crop, buddy photo share
+  * Tag: ug-image-viewer-efl_1.6.65
+
+ug-image-viewer-efl (1.6.62)
+
+  * update
+  * Tag: ug-image-viewer-efl_1.6.62
+
+ug-image-viewer-efl (1.6.60)
+
+  * fix image remain problem
+  * Tag: ug-image-viewer-efl_1.6.60
+
+ug-image-viewer-efl (1.6.59) unstable; urgency=low
+
+  * fix bs at async face api
+  * Tag: ug-image-viewer-efl_1.6.59
+
+ug-image-viewer-efl (1.6.58) unstable; urgency=low
+
+  * fix bs at async face api
+  * Tag: ug-image-viewer-efl_1.6.58
+
+ug-image-viewer-efl (1.6.57) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.57
+
+ug-image-viewer-efl (1.6.56) unstable; urgency=low
+
+  * fix slideshow effect
+  * Tag: ug-image-viewer-efl_1.6.56
+
+ug-image-viewer-efl (1.6.55) unstable; urgency=low
+
+  * fix bug, crop view
+  * Tag: ug-image-viewer-efl_1.6.55
+
+ug-image-viewer-efl (1.6.54) unstable; urgency=low
+
+  * fix bs
+  * Tag: ug-image-viewer-efl_1.6.54
+
+ug-image-viewer-efl (1.6.53) unstable; urgency=low
+
+  * appsvc -> appcontrol
+  * Tag: ug-image-viewer-efl_1.6.53
+
+ug-image-viewer-efl (1.6.52) unstable; urgency=low
+
+  * fix face svc api
+  * Tag: ug-image-viewer-efl_1.6.52
+
+ug-image-viewer-efl (1.6.51) unstable; urgency=low
+
+  * fix webalbum bs at crop view
+  * Tag: ug-image-viewer-efl_1.6.51
+
+ug-image-viewer-efl (1.6.49) unstable; urgency=low
+
+  * fix bs at crop view
+  * Tag: ug-image-viewer-efl_1.6.49
+
+ug-image-viewer-efl (1.6.48) unstable; urgency=low
+
+  * fix bs at crop view
+  * Tag: ug-image-viewer-efl_1.6.48
+
+ug-image-viewer-efl (1.6.47) unstable; urgency=low
+
+  * fix dali build break
+  * Tag: ug-image-viewer-efl_1.6.47
+
+ug-image-viewer-efl (1.6.46) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.46
+
+ug-image-viewer-efl (1.6.45) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.45
+
+ug-image-viewer-efl (1.6.44) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.44
+
+ug-image-viewer-efl (1.6.43) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.43
+
+ug-image-viewer-efl (1.6.42) unstable; urgency=low
+
+  * apply bestphoto, view by folder
+  * Tag: ug-image-viewer-efl_1.6.42
+
+ug-image-viewer-efl (1.6.41) unstable; urgency=low
+
+  * update changelog
+  * Tag: ug-image-viewer-efl_1.6.41
+
+ug-image-viewer-efl (1.6.40) unstable; urgency=low
+
+  * delay resize callback
+  * Tag: ug-image-viewer-efl_1.6.40
+
+ug-image-viewer-efl (1.6.39) unstable; urgency=low
+
+  * change vibrate api
+  * Tag: ug-image-viewer-efl_1.6.39
+
+ug-image-viewer-efl (1.6.38) unstable; urgency=low
+
+  * change web api parameter
+  * Tag: ug-image-viewer-efl_1.6.38
+
+ug-image-viewer-efl (1.6.37) unstable; urgency=low
+
+  * fix build option
+  * Tag: ug-image-viewer-efl_1.6.37
+
+ug-image-viewer-efl (1.6.36) unstable; urgency=low
+
+  * add rename icon to list
+  * Tag: ug-image-viewer-efl_1.6.36
+
+ug-image-viewer-efl (1.6.35) unstable; urgency=low
+
+  * fix double tap, longpress bug
+  * Tag: ug-image-viewer-efl_1.6.35
+
+ug-image-viewer-efl (1.6.34) unstable; urgency=low
+
+  * fix desktop mode GUI
+  * Tag: ug-image-viewer-efl_1.6.34
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 06 Aug 2012 16:44:48 +0900
+
+ug-image-viewer-efl (1.6.33) unstable; urgency=low
+
+  * fix build error
+  * Tag: ug-image-viewer-efl_1.6.33
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 06 Aug 2012 11:55:17 +0900
+
+ug-image-viewer-efl (1.6.32) unstable; urgency=low
+
+  * fix web downloader api
+  * Tag: ug-image-viewer-efl_1.6.32
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 06 Aug 2012 10:55:28 +0900
+
+ug-image-viewer-efl (1.6.31) unstable; urgency=low
+
+  * fix cropbox bound bug
+  * Tag: ug-image-viewer-efl_1.6.31
+
+ -- root <jcastle.ahn@samsung.com>  Sat, 04 Aug 2012 11:39:00 +0900
+
+ug-image-viewer-efl (1.6.30) unstable; urgency=low
+
+  * fix setas control bar
+  * Tag: ug-image-viewer-efl_1.6.30
+
+ -- root <jcastle.ahn@samsung.com>  Fri, 03 Aug 2012 10:40:17 +0900
+
+ug-image-viewer-efl (1.6.29) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.29
+
+ -- root <jcastle.ahn@samsung.com>  Wed, 01 Aug 2012 20:06:32 +0900
+
+ug-image-viewer-efl (1.6.28) unstable; urgency=low
+
+  * change face dependency
+  * Tag: ug-image-viewer-efl_1.6.28
+
+ -- root <jcastle.ahn@samsung.com>  Wed, 01 Aug 2012 14:36:29 +0900
+
+ug-image-viewer-efl (1.6.27) unstable; urgency=low
+
+  * apply manifest
+  * Tag: ug-image-viewer-efl_1.6.27
+
+ -- root <jcastle.ahn@samsung.com>  Tue, 31 Jul 2012 19:23:26 +0900
+
+ug-image-viewer-efl (1.6.26) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.26
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 30 Jul 2012 09:43:41 +0900
+
+ug-image-viewer-efl (1.6.25) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.25
+
+ -- root <jcastle.ahn@samsung.com>  Sat, 28 Jul 2012 16:39:40 +0900
+
+ug-image-viewer-efl (1.6.24) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.24
+
+ -- root <jcastle.ahn@samsung.com>  Sat, 28 Jul 2012 13:32:23 +0900
+
+ug-image-viewer-efl (1.6.23) unstable; urgency=low
+
+  * fix crop BS
+  * Tag: ug-image-viewer-efl_1.6.23
+
+ -- root <jcastle.ahn@samsung.com>  Fri, 27 Jul 2012 17:17:46 +0900
+
+ug-image-viewer-efl (1.6.22) unstable; urgency=low
+
+  * rename player handle
+  * Tag: ug-image-viewer-efl_1.6.22
+
+ -- root <jcastle.ahn@samsung.com>  Fri, 27 Jul 2012 15:49:06 +0900
+
+ug-image-viewer-efl (1.6.21) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.21
+
+ -- root <jcastle.ahn@samsung.com>  Fri, 27 Jul 2012 14:21:01 +0900
+
+ug-image-viewer-efl (1.6.20) unstable; urgency=low
+
+  * fix emulater BS
+  * Tag: ug-image-viewer-efl_1.6.20
+
+ -- root <jcastle.ahn@samsung.com>  Fri, 27 Jul 2012 14:05:31 +0900
+
+ug-image-viewer-efl (1.6.19) unstable; urgency=low
+
+  * fix camera folder path, motion popup text color
+  * Tag: ug-image-viewer-efl_1.6.19
+
+ -- root <jcastle.ahn@samsung.com>  Thu, 26 Jul 2012 19:59:08 +0900
+
+ug-image-viewer-efl (1.6.18) unstable; urgency=low
+
+  * fix BS when crop failed
+  * Tag: ug-image-viewer-efl_1.6.18
+
+ -- root <jcastle.ahn@samsung.com>  Thu, 26 Jul 2012 11:22:14 +0900
+
+ug-image-viewer-efl (1.6.17) unstable; urgency=low
+
+  * apply white theme
+  * Tag: ug-image-viewer-efl_1.6.17
+
+ -- root <jcastle.ahn@samsung.com>  Thu, 26 Jul 2012 09:26:53 +0900
+
+ug-image-viewer-efl (1.6.16) unstable; urgency=low
+
+  * change api
+  * Tag: ug-image-viewer-efl_1.6.16
+
+ -- root <jcastle.ahn@samsung.com>  Wed, 25 Jul 2012 13:26:03 +0900
+
+ug-image-viewer-efl (1.6.15) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.15
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 23 Jul 2012 21:24:32 +0900
+
+ug-image-viewer-efl (1.6.14) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.14
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 23 Jul 2012 17:03:57 +0900
+
+ug-image-viewer-efl (1.6.13) unstable; urgency=low
+
+  * fix BS
+  * Tag: ug-image-viewer-efl_1.6.13
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 23 Jul 2012 14:57:46 +0900
+
+ug-image-viewer-efl (1.6.12) unstable; urgency=low
+
+  * update version
+  * Tag: ug-image-viewer-efl_1.6.12
+
+ -- root <jcastle.ahn@samsung.com>  Fri, 20 Jul 2012 15:51:05 +0900
+
+ug-image-viewer-efl (1.6.11) unstable; urgency=low
+
+  * apply motion zoom
+  * Tag: ug-image-viewer-efl_1.6.11
+
+ -- root <jcastle.ahn@samsung.com>  Fri, 20 Jul 2012 15:16:09 +0900
+
+ug-image-viewer-efl (1.6.10) unstable; urgency=low
+
+  * apply managed UG api.
+  * Tag: ug-image-viewer-efl_1.6.10
+
+ -- root <jcastle.ahn@samsung.com>  Wed, 18 Jul 2012 19:29:52 +0900
+
+ug-image-viewer-efl (1.6.9) unstable; urgency=low
+
+  * fix build error
+  * Tag: ug-image-viewer-efl_1.6.9
+
+ -- root <jcastle.ahn@samsung.com>  Tue, 17 Jul 2012 18:34:39 +0900
+
+ug-image-viewer-efl (1.6.8) unstable; urgency=low
+
+  * fix slide show BS
+  * Tag: ug-image-viewer-efl_1.6.8
+
+ -- root <jcastle.ahn@samsung.com>  Tue, 17 Jul 2012 18:16:06 +0900
+
+ug-image-viewer-efl (1.6.7) unstable; urgency=low
+
+  * update image viewer
+  * Tag: ug-image-viewer-efl_1.6.7
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 16 Jul 2012 16:22:35 +0900
+
+ug-image-viewer-efl (1.6.6) unstable; urgency=low
+
+  * apply video call id
+  * Tag: ug-image-viewer-efl_1.6.6
+
+ -- root <jcastle.ahn@samsung.com>  Mon, 16 Jul 2012 11:57:58 +0900
+
+ug-image-viewer-efl (1.6.5) unstable; urgency=low
+
+  * fix crop box style, phone ug name
+  * Tag: ug-image-viewer-efl_1.6.5
+
+ -- root <jcastle.ahn@samsung.com>  Fri, 13 Jul 2012 14:43:26 +0900
+
+ug-image-viewer-efl (1.6.3) unstable; urgency=low
+
+  * fix bs when delete item
+  * Tag: ug-image-viewer-efl_1.6.3
+
+ -- root <jcastle.ahn@samsung.com>  Thu, 12 Jul 2012 19:20:07 +0900
+
+ug-image-viewer-efl (1.6.2) unstable; urgency=low
+
+  * fix bs
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.6.2
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 11 Jul 2012 17:10:47 +0900
+
+ug-image-viewer-efl (1.6.1) unstable; urgency=low
+
+  * fix slideshow bs, hide menu at setas
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.6.1
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 10 Jul 2012 18:42:34 +0900
+
+ug-image-viewer-efl (1.6.0) unstable; urgency=low
+
+  * apply new DB api
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.6.0
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 05 Jul 2012 10:33:11 +0900
+
+ug-image-viewer-efl (1.5.19) unstable; urgency=low
+
+  * fix bug, launch speed
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.19
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 06 Jul 2012 17:39:24 +0900
+
+ug-image-viewer-efl (1.5.18) unstable; urgency=low
+
+  * fix bundle bug
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.18
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 04 Jul 2012 15:39:55 +0900
+
+ug-image-viewer-efl (1.5.17) unstable; urgency=low
+
+  * show popup at save fail
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.17
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 03 Jul 2012 21:23:44 +0900
+
+ug-image-viewer-efl (1.5.16) unstable; urgency=low
+
+  * fix bug, fix GUI
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.16
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 02 Jul 2012 20:29:25 +0900
+
+ug-image-viewer-efl (1.5.15) unstable; urgency=low
+
+  * enable face method, apply blue theme
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.15
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 29 Jun 2012 20:28:10 +0900
+
+ug-image-viewer-efl (1.5.14) unstable; urgency=low
+
+  * enable allshare
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.14
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 27 Jun 2012 19:30:33 +0900
+
+ug-image-viewer-efl (1.5.13) unstable; urgency=low
+
+  * apply face tag
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.13
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 25 Jun 2012 21:10:37 +0900
+
+ug-image-viewer-efl (1.5.12) unstable; urgency=low
+
+  * fix set as GUI
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.12
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 18 Jun 2012 10:35:45 +0900
+
+ug-image-viewer-efl (1.5.11) unstable; urgency=low
+
+  * Fix B/S when set wallpaper
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.11
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 13 Jun 2012 13:27:27 +0900
+
+ug-image-viewer-efl (1.5.10) unstable; urgency=low
+
+  * remove mss
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.10
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 11 Jun 2012 17:52:04 +0900
+
+ug-image-viewer-efl (1.5.9) unstable; urgency=low
+
+  * check drm at file set
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.9
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 07 Jun 2012 19:11:45 +0900
+
+ug-image-viewer-efl (1.5.8) unstable; urgency=low
+
+  * fix error, apply asf(disabled)
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.8
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 07 Jun 2012 10:05:15 +0900
+
+ug-image-viewer-efl (1.5.7) unstable; urgency=low
+
+  * fix ux feedback
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.7
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 04 Jun 2012 17:36:31 +0900
+
+ug-image-viewer-efl (1.5.6) unstable; urgency=low
+
+  * update slideshow
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.6
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 04 Jun 2012 11:04:51 +0900
+
+ug-image-viewer-efl (1.5.5) unstable; urgency=low
+
+  * fix rotate reset bs at invalid file
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.5
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 29 May 2012 10:41:25 +0900
+
+ug-image-viewer-efl (1.5.4) unstable; urgency=low
+
+  * apply rotate function
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.4
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 25 May 2012 19:30:31 +0900
+
+ug-image-viewer-efl (1.5.3) unstable; urgency=low
+
+  * update drm, fix bug
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.3
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 25 May 2012 10:28:04 +0900
+
+ug-image-viewer-efl (1.5.2) unstable; urgency=low
+
+  * update slide show effect
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.2
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 23 May 2012 15:22:11 +0900
+
+ug-image-viewer-efl (1.5.1) unstable; urgency=low
+
+  * apply copy popup
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.1
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 21 May 2012 10:32:32 +0900
+
+ug-image-viewer-efl (1.5.0) unstable; urgency=low
+
+  * Add thumblist. Implement scroller.
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.5.0
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 16 May 2012 10:50:02 +0900
+
+ug-image-viewer-efl (1.4.47) unstable; urgency=low
+
+  * enable done btn
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.47
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 15 May 2012 17:17:55 +0900
+
+ug-image-viewer-efl (1.4.46) unstable; urgency=low
+
+  * fix slide show bug
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.46
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 14 May 2012 16:31:10 +0900
+
+ug-image-viewer-efl (1.4.45) unstable; urgency=low
+
+  * fix bug
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.45
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 14 May 2012 11:41:37 +0900
+
+ug-image-viewer-efl (1.4.44) unstable; urgency=low
+
+  * update version
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.44
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 08 May 2012 14:35:32 +0900
+
+ug-image-viewer-efl (1.4.43) unstable; urgency=low
+
+  * apply motion panning, tool button
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.43
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 07 May 2012 10:59:40 +0900
+
+ug-image-viewer-efl (1.4.42) unstable; urgency=low
+
+  * fix string
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.42
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 03 May 2012 12:06:51 +0900
+
+ug-image-viewer-efl (1.4.41) unstable; urgency=low
+
+  * remove useless code
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.41
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 13 Apr 2012 11:35:33 +0900
+
+ug-image-viewer-efl (1.4.40) unstable; urgency=low
+
+  * fix BS at abnomal exit case
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.40
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 12 Apr 2012 13:54:12 +0900
+
+ug-image-viewer-efl (1.4.39) unstable; urgency=low
+
+  * fix BS
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.39
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 10 Apr 2012 18:03:27 +0900
+
+ug-image-viewer-efl (1.4.38) unstable; urgency=low
+
+  * apply url-downloader
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.38
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 06 Apr 2012 13:59:07 +0900
+
+ug-image-viewer-efl (1.4.37) unstable; urgency=low
+
+  * capi-uix-face API is changed
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.37
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 29 Mar 2012 20:05:16 +0900
+
+ug-image-viewer-efl (1.4.36) unstable; urgency=low
+
+  * fix detail bug, red box bug, allshare icon
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.36
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 29 Mar 2012 17:02:47 +0900
+
+ug-image-viewer-efl (1.4.35) unstable; urgency=low
+
+  * fix jira issue(motion popup), disable toolbar button
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.35
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 27 Mar 2012 13:48:58 +0900
+
+ug-image-viewer-efl (1.4.34) unstable; urgency=low
+
+  * apply capi at setas
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.34
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 26 Mar 2012 13:47:07 +0900
+
+ug-image-viewer-efl (1.4.33) unstable; urgency=low
+
+  * fix add tag view
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.33
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 23 Mar 2012 10:48:47 +0900
+
+ug-image-viewer-efl (1.4.32) unstable; urgency=low
+
+  * add timeout callback
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.32
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 22 Mar 2012 09:41:07 +0900
+
+ug-image-viewer-efl (1.4.31) unstable; urgency=low
+
+  * fix BS
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4.31
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 20 Mar 2012 10:37:46 +0900
+
+ug-image-viewer-efl (1.4-30) unstable; urgency=low
+
+  * update naviframe, genlist
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-30
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 15 Mar 2012 21:22:49 +0900
+
+ug-image-viewer-efl (1.4-29) unstable; urgency=low
+
+  * fix bug
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-29
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 14 Mar 2012 18:54:39 +0900
+
+ug-image-viewer-efl (1.4-28) unstable; urgency=low
+
+  * update EFL 1.0
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-28
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 13 Mar 2012 20:58:59 +0900
+
+ug-image-viewer-efl (1.4-27) unstable; urgency=low
+
+  * change to CAPI, remove editfield api
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-27
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 28 Feb 2012 17:43:07 +0900
+
+ug-image-viewer-efl (1.4-26) unstable; urgency=low
+
+  * Can set resolution at set as view
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-26
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 23 Feb 2012 19:22:46 +0900
+
+ug-image-viewer-efl (1.4-25) unstable; urgency=low
+
+  * update changelog
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-25
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 23 Feb 2012 17:41:57 +0900
+
+ug-image-viewer-efl (1.4-24) unstable; urgency=low
+
+  * fix bug
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-24
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 20 Feb 2012 20:26:27 +0900
+
+ug-image-viewer-efl (1.4-23) unstable; urgency=low
+
+  * update efl api
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-23
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 15 Feb 2012 20:40:50 +0900
+
+ug-image-viewer-efl (1.4-22) unstable; urgency=low
+
+  * fix bugs
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-22
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 08 Feb 2012 11:26:49 +0900
+
+ug-image-viewer-efl (1.4-21) unstable; urgency=low
+
+  * add slider_pause, slider_resume
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-21
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 03 Feb 2012 14:31:47 +0900
+
+ug-image-viewer-efl (1.4-20) unstable; urgency=low
+
+  * fix bug
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-20
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 02 Feb 2012 19:08:14 +0900
+
+ug-image-viewer-efl (1.4-19) unstable; urgency=low
+
+  * enable setas button
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-19
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 01 Feb 2012 14:39:00 +0900
+
+ug-image-viewer-efl (1.4-18) unstable; urgency=low
+
+  * upload for minfo
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-18
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 31 Jan 2012 17:07:10 +0900
+
+ug-image-viewer-efl (1.4-17) unstable; urgency=low
+
+  * implement media list
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-17
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 27 Jan 2012 17:50:50 +0900
+
+ug-image-viewer-efl (1.4-16) unstable; urgency=low
+
+  * change face detect api
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-16
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 26 Jan 2012 19:48:19 +0900
+
+ug-image-viewer-efl (1.4-15) unstable; urgency=low
+
+  * change idler to job
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-15
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 25 Jan 2012 16:02:23 +0900
+
+ug-image-viewer-efl (1.4-14) unstable; urgency=low
+
+  * fix crash for setas view
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-14
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 20 Jan 2012 14:57:32 +0900
+
+ug-image-viewer-efl (1.4-13) unstable; urgency=low
+
+  * change share option
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-13
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 19 Jan 2012 19:25:03 +0900
+
+ug-image-viewer-efl (1.4-12) unstable; urgency=low
+
+  * media svc api change
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-12
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 18 Jan 2012 16:52:36 +0900
+
+ug-image-viewer-efl (1.4-11) unstable; urgency=low
+
+  * remove editfield edc
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-11
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 17 Jan 2012 17:31:54 +0900
+
+ug-image-viewer-efl (1.4-10) unstable; urgency=low
+
+  * update naviframe, entry edc
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-10
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 17 Jan 2012 15:32:50 +0900
+
+ug-image-viewer-efl (1.4-9) unstable; urgency=low
+
+  * update changelog
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-9
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 16 Jan 2012 13:57:32 +0900
+
+ug-image-viewer-efl (1.4-8) unstable; urgency=low
+
+  * code refine
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-8
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 06 Jan 2012 10:52:07 +0900
+
+ug-image-viewer-efl (1.4-7) unstable; urgency=low
+
+  * apply string
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-7
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 26 Dec 2011 15:48:47 +0900
+
+ug-image-viewer-efl (1.4-6) unstable; urgency=low
+
+  * Update Changelog
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-6
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 22 Dec 2011 10:16:04 +0900
+
+ug-image-viewer-efl (1.4-5) unstable; urgency=low
+
+  * Update changelog
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-5
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 20 Dec 2011 10:08:15 +0800
+
+ug-image-viewer-efl (1.4-4) unstable; urgency=low
+
+  * Update changelog
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-4
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 19 Dec 2011 16:45:24 +0800
+
+ug-image-viewer-efl (1.4-3) unstable; urgency=low
+
+  * update changelog
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-3
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 19 Dec 2011 13:52:58 +0900
+
+ug-image-viewer-efl (1.4-2) unstable; urgency=low
+
+  * enable facebook appsvc
+  * Git: slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-2
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 14 Dec 2011 15:09:23 +0900
+
+ug-image-viewer-efl (1.4-1) unstable; urgency=low
+
+  * version up
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-1
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 13 Dec 2011 12:35:01 +0900
+
+ug-image-viewer-efl (1.4-0) unstable; urgency=low
+
+  * upload refactoring
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.4-0
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 09 Dec 2011 17:17:46 +0900
+
+ug-image-viewer-efl (1.3-77) unstable; urgency=low
+
+  * prepare code open
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-77
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 07 Dec 2011 10:48:42 +0900
+
+ug-image-viewer-efl (1.3-76) unstable; urgency=low
+
+  * fix CQ H0100137612(BS at wma file)
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-76
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 28 Nov 2011 17:10:49 +0900
+
+ug-image-viewer-efl (1.3-75) unstable; urgency=low
+
+  * close detail view at web album
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-75
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 24 Nov 2011 20:52:51 +0900
+
+ug-image-viewer-efl (1.3-74) unstable; urgency=low
+
+  * version for upload
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-74
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 24 Nov 2011 19:48:40 +0900
+
+ug-image-viewer-efl (1.3-73) unstable; urgency=low
+
+  * update changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-73
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 23 Nov 2011 13:11:47 +0900
+
+ug-image-viewer-efl (1.3-72) unstable; urgency=low
+
+  * Details view is popped from naviframe when destroy.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-72
+
+ -- root <hw4444.kim@samsung.com>  Tue, 22 Nov 2011 20:17:20 +0900
+
+ug-image-viewer-efl (1.3-71) unstable; urgency=low
+
+  * delete event blocker, destroy detail view
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-71
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 16 Nov 2011 20:05:37 +0900
+
+ug-image-viewer-efl (1.3-70) unstable; urgency=low
+
+  * fix Lockup issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-70
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 15 Nov 2011 18:53:40 +0900
+
+ug-image-viewer-efl (1.3-69) unstable; urgency=low
+
+  * fix GUI
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-69
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 14 Nov 2011 21:27:06 +0900
+
+ug-image-viewer-efl (1.3-68) unstable; urgency=low
+
+  * fix popup width, change back key concept
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-68
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 10 Nov 2011 17:02:20 +0900
+
+ug-image-viewer-efl (1.3-67) unstable; urgency=low
+
+  * fix prevet, set as bug, log, mss, photocam
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-67
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 09 Nov 2011 15:32:32 +0900
+
+ug-image-viewer-efl (1.3-66) unstable; urgency=low
+
+  * fix places view BS, Modify all share icon position Response popup immediately.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-66
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 03 Nov 2011 17:39:14 +0900
+
+ug-image-viewer-efl (1.3-65) unstable; urgency=low
+
+  * change editfield focus method
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-65
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 02 Nov 2011 16:17:04 +0900
+
+ug-image-viewer-efl (1.3-64) unstable; urgency=low
+
+  * apply minfo api change
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-64
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 02 Nov 2011 16:13:55 +0900
+
+ug-image-viewer-efl (1.3-63) unstable; urgency=low
+
+  * fix detail view effect, add scroll bar
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-63
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 31 Oct 2011 20:58:30 +0900
+
+ug-image-viewer-efl (1.3-62) unstable; urgency=low
+
+  * fix share popup at web album, fix click event duration
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-62
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 31 Oct 2011 18:03:57 +0900
+
+ug-image-viewer-efl (1.3-61) unstable; urgency=low
+
+  * change appsvc to ug, fix web download, fix add tag view max length effect
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-61
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 27 Oct 2011 15:38:52 +0900
+
+ug-image-viewer-efl (1.3-60) unstable; urgency=low
+
+  * Fix details issue launch from myfile and adjust details view layout
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-60
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 26 Oct 2011 13:02:01 +0900
+
+ug-image-viewer-efl (1.3-59) unstable; urgency=low
+
+  * fix BS while destroying, fix bundle value at allshare video
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-59
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 25 Oct 2011 16:53:42 +0900
+
+ug-image-viewer-efl (1.3-58) unstable; urgency=low
+
+  * get application list from appsvc at share
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-58
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 24 Oct 2011 14:34:34 +0900
+
+ug-image-viewer-efl (1.3-57) unstable; urgency=low
+
+  * Fix scissorbox issue & implement new details view
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-57
+
+ -- Li Suxia <suxia.li@samsung.com>  Sat, 22 Oct 2011 10:37:43 +0800
+
+ug-image-viewer-efl (1.3-56) unstable; urgency=low
+
+  * send result to caller when file type not supported
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-56
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 19 Oct 2011 17:51:23 +0900
+
+ug-image-viewer-efl (1.3-55) unstable; urgency=low
+
+  * fix UI bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-55
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 18 Oct 2011 13:48:30 +0900
+
+ug-image-viewer-efl (1.3-54) unstable; urgency=low
+
+  * update scissor box when rotated, update set as view
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-54
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 13 Oct 2011 20:31:20 +0900
+
+ug-image-viewer-efl (1.3-53) unstable; urgency=low
+
+  * add trim menu at video file
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-53
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 12 Oct 2011 21:10:51 +0900
+
+ug-image-viewer-efl (1.3-52) unstable; urgency=low
+
+  * slide show end when flicked
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-52
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 11 Oct 2011 22:48:19 +0900
+
+ug-image-viewer-efl (1.3-51) unstable; urgency=low
+
+  * fix CQ and bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-51
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 11 Oct 2011 21:17:37 +0900
+
+ug-image-viewer-efl (1.3-50) unstable; urgency=low
+
+  * fix UI
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-50
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 11 Oct 2011 12:59:59 +0900
+
+ug-image-viewer-efl (1.3-49) unstable; urgency=low
+
+  * apply HD GUI, navi frame
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-49
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 10 Oct 2011 20:11:32 +0900
+
+ug-image-viewer-efl (1.3-48) unstable; urgency=low
+
+  * apply app service twitter, picasa
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-48
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 06 Oct 2011 19:42:59 +0900
+
+ug-image-viewer-efl (1.3-47) unstable; urgency=low
+
+  * change save view to save popup
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-47
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 06 Oct 2011 13:39:58 +0900
+
+ug-image-viewer-efl (1.3-46) unstable; urgency=low
+
+  * fix Details view bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-46
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 05 Oct 2011 19:33:59 +0900
+
+ug-image-viewer-efl (1.3-45) unstable; urgency=low
+
+  * apply scale decoding and footstep, update slide show, fix bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-45
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 04 Oct 2011 20:14:35 +0900
+
+ug-image-viewer-efl (1.3-44) unstable; urgency=low
+
+  * apply allshare
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-44
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 30 Sep 2011 14:59:37 +0900
+
+ug-image-viewer-efl (1.3-43) unstable; urgency=low
+
+  * enable dissolve effect, footsteps, enter key
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-43
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 29 Sep 2011 14:17:09 +0900
+
+ug-image-viewer-efl (1.3-42) unstable; urgency=low
+
+  * code clean, change set as view GUI
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-42
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 22 Sep 2011 17:32:51 +0900
+
+ug-image-viewer-efl (1.3-41) unstable; urgency=low
+
+  * Fix minor GUI bugs.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-41
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Mon, 19 Sep 2011 19:32:15 +0900
+
+ug-image-viewer-efl (1.3-40) unstable; urgency=low
+
+  * enable motion, prevent mouse event when destroy, enable scroll margin
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-40
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Sat, 17 Sep 2011 15:18:06 +0900
+
+ug-image-viewer-efl (1.3-39) unstable; urgency=low
+
+  * Disable any events just before terminate ug.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-39
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Fri, 16 Sep 2011 22:35:07 +0900
+
+ug-image-viewer-efl (1.3-38) unstable; urgency=low
+
+  * Remove copy popup when flicking.
+  * Apply new GUI guide
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-38
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Fri, 16 Sep 2011 18:23:03 +0900
+
+ug-image-viewer-efl (1.3-37) unstable; urgency=low
+
+  * Upload for verification
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-37
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 15 Sep 2011 19:51:59 +0900
+
+ug-image-viewer-efl (1.3-36) unstable; urgency=low
+
+  * Fix issue thoat file_unset is not called sometimes
+  * Popup shows longer when setting wallpaper
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-36
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 14 Sep 2011 12:44:12 +0900
+
+ug-image-viewer-efl (1.3-35) unstable; urgency=low
+
+  * fix minor BUG
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-35
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 09 Sep 2011 20:46:13 +0900
+
+ug-image-viewer-efl (1.3-34) unstable; urgency=low
+
+  * modify zoom, UI, set as exif
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-34
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 09 Sep 2011 14:55:33 +0900
+
+ug-image-viewer-efl (1.3-33) unstable; urgency=low
+
+  * Implement tap zoom
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-33
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 08 Sep 2011 16:44:19 +0900
+
+ug-image-viewer-efl (1.3-32) unstable; urgency=low
+
+  * include image-vewer-ext-engine only armel build
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-32
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 07 Sep 2011 20:58:41 +0900
+
+ug-image-viewer-efl (1.3-31) unstable; urgency=low
+
+  * add dependency image-viewer-ext-engine
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-31
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 07 Sep 2011 19:45:13 +0900
+
+ug-image-viewer-efl (1.3-30) unstable; urgency=low
+
+  * disable allshare
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-30
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 02 Sep 2011 15:06:18 +0900
+
+ug-image-viewer-efl (1.3-29) unstable; urgency=low
+
+  * update changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-29
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 31 Aug 2011 20:06:40 +0900
+
+ug-image-viewer-efl (1.3-28) unstable; urgency=low
+
+  * avoid appsvc bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-28
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 31 Aug 2011 14:58:02 +0900
+
+ug-image-viewer-efl (1.3-27) unstable; urgency=low
+
+  * prepare source open
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-27
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 30 Aug 2011 15:01:55 +0900
+
+ug-image-viewer-efl (1.3-26) unstable; urgency=low
+
+  * apply DRM image operation
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-26
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 17 Aug 2011 20:14:44 +0900
+
+ug-image-viewer-efl (1.3-25) unstable; urgency=low
+
+  * apply agif, remove widget type, add margin,, apply pm api
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-25
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 16 Aug 2011 20:08:24 +0900
+
+ug-image-viewer-efl (1.3-24) unstable; urgency=low
+
+  * fix BS when copy popup at web image
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-24
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 05 Aug 2011 11:27:33 +0900
+
+ug-image-viewer-efl (1.3-23) unstable; urgency=low
+
+  * Fix B/S when delete item in 2 items
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-23
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 04 Aug 2011 21:04:55 +0900
+
+ug-image-viewer-efl (1.3-22) unstable; urgency=low
+
+  * Fix B/S when delete item in myfile
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-22
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Thu, 04 Aug 2011 17:52:27 +0900
+
+ug-image-viewer-efl (1.3-21) unstable; urgency=low
+
+  * Ctrl bar is disabled during downloading.
+  * Change internal slider APIs
+  * Bug fixed that cannot get next item when flick continously.
+  * Implement details view
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl.git
+  * Tag: ug-image-viewer-efl_1.3-21
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Tue, 02 Aug 2011 20:27:02 +0900
+
+ug-image-viewer-efl (1.3-20) unstable; urgency=low
+
+  * fix save view bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-20
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 28 Jul 2011 20:08:08 +0900
+
+ug-image-viewer-efl (1.3-19) unstable; urgency=low
+
+  * code refactoring
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-19
+
+ -- Jisugn Ahn <jcastle.ahn@samsung.com>  Tue, 26 Jul 2011 20:23:05 +0900
+
+ug-image-viewer-efl (1.3-18) unstable; urgency=low
+
+  * fix control bar, button style, shuffle, Eina_Bool
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-18
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 22 Jul 2011 18:05:16 +0900
+
+ug-image-viewer-efl (1.3-17) unstable; urgency=low
+
+  * fix emulator BS
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-17
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 21 Jul 2011 21:54:32 +0900
+
+ug-image-viewer-efl (1.3-16) unstable; urgency=low
+
+  * apply new slide show
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-16
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 21 Jul 2011 19:50:17 +0900
+
+ug-image-viewer-efl (1.3-15) unstable; urgency=low
+
+  * apply transition effect
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-15
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 20 Jul 2011 17:54:45 +0900
+
+ug-image-viewer-efl (1.3-14) unstable; urgency=low
+
+  * fix build error, rotate error
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-14
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 11 Jul 2011 22:07:52 +0900
+
+ug-image-viewer-efl (1.3-13) unstable; urgency=low
+
+  * ImageViewer is terminated when MMC is removed.
+  * Add tag view is refined
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-13
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Thu, 07 Jul 2011 19:43:59 +0900
+
+ug-image-viewer-efl (1.3-12) unstable; urgency=low
+
+  * fix cq, scissor box, svace
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-12
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Mon, 04 Jul 2011 20:14:32 +0900
+
+ug-image-viewer-efl (1.3-11) unstable; urgency=low
+
+  * apply all share, fix delete BS
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-11
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 01 Jul 2011 19:17:02 +0900
+
+ug-image-viewer-efl (1.3-10) unstable; urgency=low
+
+  * apply window loading
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-10
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 29 Jun 2011 20:16:35 +0900
+
+ug-image-viewer-efl (1.3-09) unstable; urgency=low
+
+  * Fixed CQ
+  * Implement mouse event handler.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-09
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Tue, 28 Jun 2011 10:47:43 +0900
+
+ug-image-viewer-efl (1.3-08) unstable; urgency=low
+
+  * Remove dependancy between ugd and other view.
+  * Fix prevents bug
+  * Support for multi instance
+  * Refactoring SetAs View
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-08
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Fri, 24 Jun 2011 19:37:35 +0900
+
+ug-image-viewer-efl (1.3-07) unstable; urgency=low
+
+  * Upload for CQ defects fix, reupload
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-07
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 22 Jun 2011 16:22:26 +0800
+
+ug-image-viewer-efl (1.3-06) lucid; urgency=low
+
+  * Upload for CQ defects fix
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-06
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 22 Jun 2011 14:56:26 +0800
+
+ug-image-viewer-efl (1.3-05) unstable; urgency=low
+
+  * Improvement pinch zoom algorithm.
+  * Decrease animation time from 500ms to 200ms
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-05
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Tue, 14 Jun 2011 15:50:33 +0900
+
+ug-image-viewer-efl (1.3-04) unstable; urgency=low
+
+  * apply sns finalize
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-04
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 08 Jun 2011 15:34:25 +0900
+
+ug-image-viewer-efl (1.3-03) unstable; urgency=low
+
+  * update changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-03
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 08 Jun 2011 14:18:52 +0900
+
+ug-image-viewer-efl (1.3-02) unstable; urgency=low
+
+  * update changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-02
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Fri, 03 Jun 2011 19:00:26 +0900
+
+ug-image-viewer-efl (1.3-01) unstable; urgency=low
+
+  * Fix bug that video file does not flicked.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-01
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Thu, 02 Jun 2011 09:51:42 +0900
+
+ug-image-viewer-efl (1.3-00) unstable; urgency=low
+
+  * Refactoring slide item
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.3-00
+
+ -- Jisung ahn <jcastle.ahn@samsung.com>  Thu, 02 Jun 2011 09:51:42 +0900
+
+ug-image-viewer-efl (1.2-12) unstable; urgency=low
+
+  * fix control bar, block sns finalize, add test program, fix crop bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-12
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 01 Jun 2011 21:29:06 +0900
+
+ug-image-viewer-efl (1.2-11) unstable; urgency=low
+
+  * code clean, fix bs, rotate bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-11
+
+ -- Jisung ahn <jcastle.ahn@samsung.com>  Mon, 30 May 2011 20:48:29 +0900
+
+ug-image-viewer-efl (1.2-10) unstable; urgency=low
+
+  * fix bug, apply setas view click event
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-10
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Thu, 26 May 2011 20:56:01 +0900
+
+ug-image-viewer-efl (1.2-9) unstable; urgency=low
+
+  * mouse event change ecore to evas, popup style change
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-9
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Wed, 25 May 2011 19:34:02 +0900
+
+ug-image-viewer-efl (1.2-8) unstable; urgency=low
+
+  * fix icon, drm problem, warning, etc...
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-8
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 24 May 2011 16:27:54 +0900
+
+ug-image-viewer-efl (1.2-7) unstable; urgency=low
+
+  * Block exif
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-7
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com>  Tue, 24 May 2011 11:44:09 +0900
+
+ug-image-viewer-efl (1.2-6) unstable; urgency=low
+
+  * Fix string issue, and update list issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-6
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 24 May 2011 10:35:04 +0800
+
+ug-image-viewer-efl (1.2-5) unstable; urgency=low
+
+  * fixed black screen when web image resume
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-5
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 19 May 2011 17:50:32 +0900
+
+ug-image-viewer-efl (1.2-4) unstable; urgency=low
+
+  * updated changelog. fix installation error
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-4
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 19 May 2011 12:43:10 +0900
+
+ug-image-viewer-efl (1.2-3) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-3
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 19 May 2011 12:15:30 +0900
+
+ug-image-viewer-efl (1.2-2) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-2
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 19 May 2011 11:50:30 +0900
+
+ug-image-viewer-efl (1.2-1) unstable; urgency=low
+
+  * changed media-svc to libmedia-info
+  * removed elm_priv.h
+  * inserted bundle key for video player
+  * modified myphotocam mouse event
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-1
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Wed, 18 May 2011 16:51:19 +0900
+
+ug-image-viewer-efl (1.2-00) unstable; urgency=low
+
+  * Change directory structures
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.2-00
+
+ -- Hyunwoo Kim <hw4444.kim@samsung.com>  Wed, 18 May 2011 11:03:04 +0900
+
+ug-image-viewer-efl (1.1-38) unstable; urgency=low
+
+  * fixed black screen error, improvement image viewer loading time, fixed
+    some bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-38
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 18 May 2011 10:52:02 +0900
+
+ug-image-viewer-efl (1.1-37) unstable; urgency=low
+
+  * Fix delete & tag message
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-37
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 12 May 2011 21:44:41 +0800
+
+ug-image-viewer-efl (1.1-36) unstable; urgency=low
+
+  * fixed BS
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-36
+
+ -- DongJin Choi <milkelf.choi@samsung.com> Thu, 12 May 2011 21:11:10 +0900
+
+ug-image-viewer-efl (1.1-35) unstable; urgency=low
+
+  * Upload again
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-35
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 11 May 2011 14:14:11 +0800
+
+ug-image-viewer-efl (1.1-34) unstable; urgency=low
+
+  * Fix DRM issue & implement pause/resume
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-34
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 11 May 2011 11:24:11 +0800
+
+ug-image-viewer-efl (1.1-33) unstable; urgency=low
+
+  * changed sns-framework pkg name to social-service
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-33
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 02 May 2011 20:06:10 +0900
+
+ug-image-viewer-efl (1.1-32) unstable; urgency=low
+
+  * Replace setas genlist with default
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-32
+
+ -- LiSuxia <suxia.li@samsung.com>  Tue, 03 May 2011 20:25:10 +0800
+
+ug-image-viewer-efl (1.1-31) unstable; urgency=low
+
+  * disable animation GIF
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-31
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 02 May 2011 20:06:10 +0900
+
+ug-image-viewer-efl (1.1-30) unstable; urgency=low
+
+  * inserted evas_norender function at exit image viewer UG
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-30
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 02 May 2011 19:06:10 +0900
+
+ug-image-viewer-efl (1.1-29) unstable; urgency=low
+
+  * exit elm_photocam_file_set function when Animation gif loading error
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-29
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 28 Apr 2011 20:21:11 +0900
+
+ug-image-viewer-efl (1.1-28) unstable; urgency=low
+
+  * changed macro name & updated calc_job function
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-28
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 28 Apr 2011 16:28:10 +0900
+
+ug-image-viewer-efl (1.1-27) unstable; urgency=low
+
+  * fixed bulid break.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-27
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 28 Apr 2011 10:41:10 +0900
+
+ug-image-viewer-efl (1.1-26) unstable; urgency=low
+
+  * changed BT launch method & fixed some bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-26
+
+ -- DongJin Choi <milkelf.choi@samsung.com> Wed, 27 Apr 2011 21:07:30 +0900
+
+ug-image-viewer-efl (1.1-25) unstable; urgency=low
+
+  * Fix full build break
+
+ -- Mike McCormack <mj.mccormack@samsung.com>  Wed, 27 Apr 2011 19:19:17 +0900
+
+ug-image-viewer-efl (1.1-24) unstable; urgency=low
+
+  * Add media-type support & fix issues: title, face detect
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-24
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 26 Apr 2011 17:14:31 +0800
+
+ug-image-viewer-efl (1.1-23) unstable; urgency=low
+
+  * fixed sizing error & fixed some bug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-23
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 25 Apr 2011 11:59:30 +0900
+
+ug-image-viewer-efl (1.1-22) unstable; urgency=low
+
+  * Fix issues on crop image
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-22
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 21 Apr 2011 19:14:33 +0800
+
+ug-image-viewer-efl (1.1-21) unstable; urgency=low
+
+  * fixed some error, changed snsfw name, inserted web album view function
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-21
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Wed, 20 Apr 2011 21:01:30 +0800
+
+ug-image-viewer-efl (1.1-20) unstable; urgency=low
+
+  * Fix issue on destroy & modify controlbar option for video
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-20
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 20 Apr 2011 17:01:30 +0800
+
+ug-image-viewer-efl (1.1-19) unstable; urgency=low
+
+  * fixed error in caller id mode
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-19
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 19 Apr 2011 23:57:39 +0900
+
+ug-image-viewer-efl (1.1-18) unstable; urgency=low
+
+  * Fix issue on destroy slider
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-18
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 19 Apr 2011 12:56:37 +0800
+
+ug-image-viewer-efl (1.1-17) unstable; urgency=low
+
+  * Dim option for video & DRM file
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-17
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 18 Apr 2011 17:11:14 +0800
+
+ug-image-viewer-efl (1.1-16) unstable; urgency=low
+
+  * re-upload
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-16
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Fri, 15 Apr 2011 16:15:39 +0900
+
+ug-image-viewer-efl (1.1-15) unstable; urgency=low
+
+  * inserted tag option
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-15
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Fri, 15 Apr 2011 14:22:39 +0900
+
+ug-image-viewer-efl (1.1-14) unstable; urgency=low
+
+  * fixed delete slide error
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-14
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Fri, 15 Apr 2011 10:22:39 +0900
+
+ug-image-viewer-efl (1.1-13) unstable; urgency=low
+
+  * Reupload
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-13
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 14 Apr 2011 17:06:33 +0800
+
+ug-image-viewer-efl (1.1-12) unstable; urgency=low
+
+  * Fix popup bs & implement view by favourite
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-12
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 14 Apr 2011 18:58:33 +0800
+
+ug-image-viewer-efl (1.1-11) lucid; urgency=low
+
+  * Fix popup bs & implement view by favourite
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-11
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 14 Apr 2011 18:45:26 +0800
+
+ug-image-viewer-efl (1.1-10) unstable; urgency=low
+
+  * fixed display mode error
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-10
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 14 Apr 2011 17:59:39 +0900
+
+ug-image-viewer-efl (1.1-9) unstable; urgency=low
+
+  * reupload image ug, because snsfw, updated changed log
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-9
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 12 Apr 2011 16:12:39 +0900
+
+ug-image-viewer-efl (1.1-8) unstable; urgency=low
+
+  * fixed build break
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-8
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 12 Apr 2011 16:12:39 +0900
+
+ug-image-viewer-efl (1.1-7) unstable; urgency=low
+
+  * fixed build break , wink, face detection engine
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-6
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 12 Apr 2011 10:04:39 +0900
+
+ug-image-viewer-efl (1.1-6) unstable; urgency=low
+
+  * fixed build break in i386
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-6
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 12 Apr 2011 09:44:19 +0900
+
+ug-image-viewer-efl (1.1-5) unstable; urgency=low
+
+  * fixed build break i386
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-5
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 12 Apr 2011 08:41:26 +0900
+
+ug-image-viewer-efl (1.1-4) unstable; urgency=low
+
+  * fixed build break i386
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-4
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 12 Apr 2011 07:50:28 +0900
+
+ug-image-viewer-efl (1.1-3) unstable; urgency=low
+
+  * fixed build break
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-3
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 12 Apr 2011 07:33:26 +0900
+
+ug-image-viewer-efl (1.1-2) unstable; urgency=low
+
+  * fixed build break
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-2
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 11 Apr 2011 22:04:17 +0900
+
+ug-image-viewer-efl (1.1-1) unstable; urgency=low
+
+  * enable new image viewer
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.1-1
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 11 Apr 2011 20:44:49 +0900
+
+ug-image-viewer-efl (1.0-182) unstable; urgency=low
+
+  * remove deprecated api of ctxpopup
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-182
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 07 Apr 2011 21:00:26 +0900
+
+ug-image-viewer-efl (1.0-181) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-181
+
+ -- Li Suxia <suxia.li@samsung.com>  Sat, 02 Apr 2011 10:22:15 +0900
+
+ug-image-viewer-efl (1.0-180) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-180
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 24 Mar 2011 14:15:06 +0900
+
+ug-image-viewer-efl (1.0-179) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-179
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 22 Mar 2011 13:54:33 +0900
+
+ug-image-viewer-efl (1.0-178) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-178
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 21 Mar 2011 21:39:52 +0900
+
+ug-image-viewer-efl (1.0-176) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-176
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Fri, 18 Mar 2011 11:28:22 +0900
+
+ug-image-viewer-efl (1.0-175) unstable; urgency=low
+
+  * fixed BS
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-175
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Fri, 18 Mar 2011 11:05:58 +0900
+
+ug-image-viewer-efl (1.0-174) unstable; urgency=low
+
+  * inserted image-viewer base photocam
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-174
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 15 Mar 2011 09:46:46 +0900
+
+ug-image-viewer-efl (1.0-173) unstable; urgency=low
+
+  * modify snsfw api return value.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-173
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 14 Mar 2011 15:55:13 +0900
+
+ug-image-viewer-efl (1.0-172) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-172
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 10 Mar 2011 19:59:20 +0900
+
+ug-image-viewer-efl (1.0-171) unstable; urgency=low
+
+  * remove sns framework wrong used code.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-171
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 10 Mar 2011 18:58:32 +0900
+
+ug-image-viewer-efl (1.0-170) unstable; urgency=low
+
+  * Upload again.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-170
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 10 Mar 2011 09:23:50 +0900
+
+ug-image-viewer-efl (1.0-169) unstable; urgency=low
+
+  * Update git info.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-169
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 09 Mar 2011 19:57:27 +0900
+
+ug-image-viewer-efl (1.0-168) unstable; urgency=low
+
+  * Update changelog again
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-168
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 09 Mar 2011 19:01:06 +0900
+
+ug-image-viewer-efl (1.0-167) unstable; urgency=low
+
+  * update changelog & add stat.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-167
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 09 Mar 2011 14:46:18 +0900
+
+ug-image-viewer-efl (1.0-166) unstable; urgency=low
+
+  * change sns launch method aul -> ug.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-166
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 08 Mar 2011 10:43:07 +0900
+
+ug-image-viewer-efl (1.0-165) unstable; urgency=low
+
+  * Update changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-165
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 04 Mar 2011 15:41:03 +0900
+
+ug-image-viewer-efl (1.0-164) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-164
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 28 Feb 2011 21:05:38 +0900
+
+ug-image-viewer-efl (1.0-163) unstable; urgency=low
+
+  * updated changelog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-163
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 28 Feb 2011 21:03:30 +0900
+
+ug-image-viewer-efl (1.0-162) unstable; urgency=low
+
+  * fixed web download image problem.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-162
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 28 Feb 2011 20:25:45 +0900
+
+ug-image-viewer-efl (1.0-161) unstable; urgency=low
+
+  * Apply new UI for setas wallpaper
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-161
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 25 Feb 2011 16:36:41 +0800
+
+ug-image-viewer-efl (1.0-160) unstable; urgency=low
+
+  * Fix pause/resume issue for win rotate
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-160
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 23 Feb 2011 17:55:26 +0800
+
+ug-image-viewer-efl (1.0-159) unstable; urgency=low
+
+  * fixed some CQ, crash log
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-159
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 22 Feb 2011 20:12:27 +0900
+
+ug-image-viewer-efl (1.0-158) unstable; urgency=low
+
+  * Enable control bar for single mode & return result for SETAS
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-158
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 22 Feb 2011 17:55:16 +0800
+
+ug-image-viewer-efl (1.0-157) unstable; urgency=low
+
+  * Fix pause/resume issue related with win rotate
+  * Fix set home & lock screen related issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-157
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 21 Feb 2011 17:56:34 +0800
+
+ug-image-viewer-efl (1.0-155) unstable; urgency=low
+
+  * Fix rectangle select issue & zoom rate issue & create lcd size image.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-155
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 18 Feb 2011 17:28:29 +0800
+
+ug-image-viewer-efl (1.0-154) unstable; urgency=low
+
+  * fixed black screen problem when multi down , serveral times.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-154
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 17 Feb 2011 14:03:36 +0900
+
+ug-image-viewer-efl (1.0-153) unstable; urgency=low
+
+  * Revise navibar & control bar for camera UG
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-153
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 17 Feb 2011 09:19:25 +0800
+
+ug-image-viewer-efl (1.0-152) unstable; urgency=low
+
+  * Support selector for callerID ug, fix sort by issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-152
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 16 Feb 2011 08:35:18 +0800
+
+ug-image-viewer-efl (1.0-151) unstable; urgency=low
+
+  * Implement callerID & wallpaper ug, refine single ug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-151
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 14 Feb 2011 08:43:20 +0800
+
+ug-image-viewer-efl (1.0-150) unstable; urgency=low
+
+  * sensor framework disable when image viewer go to background
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-150
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 10 Feb 2011 14:36:02 +0900
+
+ug-image-viewer-efl (1.0-149) unstable; urgency=low
+
+  * inserted pmapi package
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-149
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 08 Feb 2011 18:06:24 +0900
+
+ug-image-viewer-efl (1.0-148) unstable; urgency=low
+
+  * rollback End key policy
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-148
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 07 Feb 2011 14:14:31 +0900
+
+ug-image-viewer-efl (1.0-147) unstable; urgency=low
+
+  * fixed Gallery BS problem ( remove undefined symbol mb_app_common_set_property)
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-147
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Sat, 05 Feb 2011 09:25:23 +0900
+
+ug-image-viewer-efl (1.0-146) unstable; urgency=low
+
+  * fixed some bug.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-146
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 01 Feb 2011 21:55:05 +0900
+
+ug-image-viewer-efl (1.0-145) unstable; urgency=low
+
+  * inserted gethering sns service list code.
+  * removed undefined function. ( mb_app_common_set_category )
+  * image-viewer destory, when ums connected.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-145
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 01 Feb 2011 21:07:01 +0900
+
+ug-image-viewer-efl (1.0-144) unstable; urgency=low
+
+  * Fixed web image issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-144
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 31 Jan 2011 09:16:39 +0800
+
+ug-image-viewer-efl (1.0-143) unstable; urgency=low
+
+  * Fixed black screen issue for web image & popup issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-143
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 26 Jan 2011 17:37:11 +0800
+
+ug-image-viewer-efl (1.0-142) unstable; urgency=low
+
+  * Fixed BS related END KEY
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-142
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 25 Jan 2011 14:58:34 +0900
+
+ug-image-viewer-efl (1.0-141) unstable; urgency=low
+
+  * remove unused code in image_resize & image blend function & modify code related NFC
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-141
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Mon, 24 Jan 2011 14:17:27 +0900
+
+ug-image-viewer-efl (1.0-139) unstable; urgency=low
+
+  * Fix update slideshow issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-139
+
+ -- Li Suxia <suxia.li@samsung.com>  Sat, 22 Jan 2011 11:02:07 +0800
+
+ug-image-viewer-efl (1.0-138) unstable; urgency=low
+
+  * Fix buidl break
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-138
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 19 Jan 2011 20:06:11 +0800
+
+ug-image-viewer-efl (1.0-137) unstable; urgency=low
+
+  * Apply new dir policy & fix ug close cb issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-137
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 19 Jan 2011 17:58:32 +0800
+
+ug-image-viewer-efl (1.0-136) unstable; urgency=low
+
+  * Fixed BS at the Web Image Down Load
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-136
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 18 Jan 2011 18:40:41 +0900
+
+ug-image-viewer-efl (1.0-135) unstable; urgency=low
+
+  * Fix H0100118455: previous change error
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-135
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 17 Jan 2011 11:50:31 +0800
+
+ug-image-viewer-efl (1.0-134) unstable; urgency=low
+
+  * Fix H0100118455
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-134
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 17 Jan 2011 10:54:17 +0800
+
+ug-image-viewer-efl (1.0-133) unstable; urgency=low
+
+  * Upload to fix H0100112470
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-133
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 13 Jan 2011 16:04:33 +0800
+
+ug-image-viewer-efl (1.0-132) unstable; urgency=low
+
+  * enable UG BACK KEY
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-132
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 13 Jan 2011 11:48:01 +0900
+
+ug-image-viewer-efl (1.0-131) unstable; urgency=low
+
+  * Remove heynoti depends
+  * Fix H0100116919 again: previous change merge conflict
+  * changed eml_popup_timeout_set parameter type
+  * Add support for view by tag
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-131
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Wed, 12 Jan 2011 15:20:27 +0900
+
+ug-image-viewer-efl (1.0-130) unstable; urgency=low
+
+  * Update geo list by media-svc change
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-130
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 05 Jan 2011 17:16:27 +0800
+
+ug-image-viewer-efl (1.0-129) unstable; urgency=low
+
+  * Fix set issue: button not work & exit after done
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-129
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 05 Jan 2011 14:20:03 +0800
+
+ug-image-viewer-efl (1.0-128) unstable; urgency=low
+
+  * Fix buildbreak on Elm_softkey related
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-128
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 04 Jan 2011 13:59:53 +0800
+
+ug-image-viewer-efl (1.0-127) unstable; urgency=low
+
+  * fixed long press error
+  * Update footstep by gallery request
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-127
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Tue, 04 Jan 2011 12:09:35 +0900
+
+ug-image-viewer-efl (1.0-126) unstable; urgency=low
+
+  * Exit imageviewer once slideshow is finished from footst..
+  * fixed long press action. CQ H0100114062
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-126
+
+ -- DongJin Choi <milkelf.choi@samsung.com>  Thu, 30 Dec 2010 17:47:28 +0900
+
+ug-image-viewer-efl (1.0-125) unstable; urgency=low
+
+  * Fix delete issue & bs on launch myfile detail ug
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-125
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 28 Dec 2010 08:33:51 +0800
+
+ug-image-viewer-efl (1.0-124) unstable; urgency=low
+
+  * fixed tag name
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-124
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 27 Dec 2010 11:10:11 +0900
+
+ug-image-viewer-efl (1.0-123) unstable; urgency=low
+
+  * Regarding Text display error
+  * Comment out appcore api in video.
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-123
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 27 Dec 2010 11:04:13 +0900
+
+ug-image-viewer-efl (1.0-122) unstable; urgency=low
+
+  * Remove depends on appcore
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-122
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 24 Dec 2010 15:05:57 +0800
+
+ug-image-viewer-efl (1.0-121) unstable; urgency=low
+
+  * Remove appcore_set_i18n
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-121
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 22 Dec 2010 10:49:02 +0800
+
+ug-image-viewer-efl (1.0-120) unstable; urgency=low
+
+  * Fix web image download cancel BS
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-120
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 21 Dec 2010 15:07:54 +0800
+
+ug-image-viewer-efl (1.0-119) unstable; urgency=low
+
+  * Remove bluetooth-app in makefile
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-119
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 20 Dec 2010 13:21:18 +0800
+
+ug-image-viewer-efl (1.0-118) unstable; urgency=low
+
+  * Remove video depends & applog
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-118
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 20 Dec 2010 11:32:43 +0800
+
+ug-image-viewer-efl (1.0-117) unstable; urgency=low
+
+  * Fix exit issue for video change
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-117
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 17 Dec 2010 17:38:13 +0800
+
+ug-image-viewer-efl (1.0-116) unstable; urgency=low
+
+  * Upload again for web issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-116
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 16 Dec 2010 10:27:46 +0800
+
+ug-image-viewer-efl (1.0-115) unstable; urgency=low
+
+  * Comment out object del for BS
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-115
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 15 Dec 2010 18:24:19 +0800
+
+ug-image-viewer-efl (1.0-114) unstable; urgency=low
+
+  * Fix pkg install issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-114
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 15 Dec 2010 09:41:45 +0800
+
+ug-image-viewer-efl (1.0-113) unstable; urgency=low
+
+  * Fix view by places issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-113
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 14 Dec 2010 19:25:04 +0800
+
+ug-image-viewer-efl (1.0-112) unstable; urgency=low
+
+  * Add view by place & fix i18n issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-112
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 14 Dec 2010 18:54:34 +0800
+
+ug-image-viewer-efl (1.0-111) unstable; urgency=low
+
+  * Add share by twitter, print via bluetooth, update web image download
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-111
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 14 Dec 2010 10:31:57 +0800
+
+ug-image-viewer-efl (1.0-110) unstable; urgency=low
+
+  * Update Po to fix multi-language issue
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-110
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 10 Dec 2010 16:53:48 +0800
+
+ug-image-viewer-efl (1.0-109) unstable; urgency=low
+
+  * Fix break for sns
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-109
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 10 Dec 2010 08:44:05 +0800
+
+ug-image-viewer-efl (1.0-108) unstable; urgency=low
+
+  * Fix break for Edje_Edit.h
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-108
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 08 Dec 2010 17:31:20 +0800
+
+ug-image-viewer-efl (1.0-107) unstable; urgency=low
+
+  * add proction code to video
+  * Git: slp-source.sec.samsung.net:slp/pkgs/u/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-107
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 08 Dec 2010 17:16:56 +0800
+
+ug-image-viewer-efl (1.0-106) unstable; urgency=low
+
+  * add proction code to video
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-106
+
+ -- Li Wen <wen2.li@samsung.com>  Fri, 03 Dec 2010 18:34:08 +0800
+
+ug-image-viewer-efl (1.0-105) unstable; urgency=low
+
+  * Fix BS on object del
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-105
+
+ -- Li Wen <wen2.li@samsung.com>  Fri, 03 Dec 2010 17:34:08 +0800
+
+ug-image-viewer-efl (1.0-104) unstable; urgency=low
+
+  * Change video capture code
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-104
+
+ -- Li Wen <wen2.li@samsung.com>  Wed, 01 Dec 2010 17:28:20 +0800
+
+ug-image-viewer-efl (1.0-103) unstable; urgency=low
+
+  * Revise multi-language support
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-103
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 01 Dec 2010 16:58:20 +0800
+
+ug-image-viewer-efl (1.0-102) unstable; urgency=low
+
+  * Revert GUI change & fix delete controlbar BS
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-102
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 30 Nov 2010 17:05:16 +0800
+
+ug-image-viewer-efl (1.0-101) unstable; urgency=low
+
+  * Change bluetooth launch
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-101
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 29 Nov 2010 18:28:32 +0800
+
+ug-image-viewer-efl (1.0-100) unstable; urgency=low
+
+  * Support Korea language & enable web image download
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-100
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 29 Nov 2010 18:17:17 +0800
+
+ug-image-viewer-efl (1.0-99) unstable; urgency=low
+
+  * Fix issue: unable to launch image-editor
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-99
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 29 Nov 2010 09:01:09 +0800
+
+ug-image-viewer-efl (1.0-98) unstable; urgency=low
+
+  * Support open file not in default dir
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-98
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 26 Nov 2010 16:36:42 +0800
+
+ug-image-viewer-efl (1.0-97) unstable; urgency=low
+
+  * Upload for view by all
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-97
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 26 Nov 2010 13:27:57 +0800
+
+ug-image-viewer-efl (1.0-96) unstable; urgency=low
+
+  * Enable web image download
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-96
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 23 Nov 2010 17:03:06 +0800
+
+ug-image-viewer-efl (1.0-95) unstable; urgency=low
+
+  * fix adding bookmark BS issue.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-95
+
+ -- Li Wen <wen2.li@samsung.com>  Mon, 22 Nov 2010 21:08:46 +0800
+
+ug-image-viewer-efl (1.0-94) unstable; urgency=low
+
+  * change to Syspopup_launch(volume, NULL)
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-94
+
+ -- Li Wen <wen2.li@samsung.com>  Mon, 22 Nov 2010 14:08:46 +0800
+
+ug-image-viewer-efl (1.0-93) unstable; urgency=low
+
+  * Upload for SINGLE mode issue fix
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-93
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 19 Nov 2010 13:08:46 +0800
+
+ug-image-viewer-efl (1.0-92) unstable; urgency=low
+
+  * Reupload for build error
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-92
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 18 Nov 2010 16:12:13 +0800
+
+ug-image-viewer-efl (1.0-91) unstable; urgency=low
+
+  * Fix editor issue and photocam issue.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-91
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 18 Nov 2010 15:02:57 +0800
+
+ug-image-viewer-efl (1.0-90) unstable; urgency=low
+
+  * Remove UI window & add dbg package
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-90
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 18 Nov 2010 09:52:37 +0800
+
+ug-image-viewer-efl (1.0-89) unstable; urgency=low
+
+  * Fix web download & copy & ctxpopup position issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-89
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 16 Nov 2010 16:33:24 +0800
+
+ug-image-viewer-efl (1.0-88) unstable; urgency=low
+
+  * Remove mm_session & enable web image download
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-88
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 15 Nov 2010 17:51:21 +0800
+
+ug-image-viewer-efl (1.0-87) unstable; urgency=low
+
+  * enabel ug-imageviewer's own wrapper
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-87
+
+ -- Gao Wei <wi.gao@samsung.com>  Mon, 15 Nov 2010 14:49:49 +0800
+
+ug-image-viewer-efl (1.0-86) unstable; urgency=low
+
+  * Fix slideshow & play lock up issue & refine copy
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-86
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 12 Nov 2010 14:49:49 +0800
+
+ug-image-viewer-efl (1.0-85) unstable; urgency=low
+
+  * enabling ug's own mb-svc-wrapper
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-85
+
+ -- Gao Wei <wi.gao@samsung.com>  Fri, 12 Nov 2010 10:47:19 +0800
+
+ug-image-viewer-efl (1.0-84) unstable; urgency=low
+
+  * Enable video-player for camera
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-84
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 11 Nov 2010 16:55:57 +0800
+
+ug-image-viewer-efl (1.0-83) unstable; urgency=low
+
+  * Fix set as issue: only close button show
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-83
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 10 Nov 2010 15:04:47 +0800
+
+ug-image-viewer-efl (1.0-82) unstable; urgency=low
+
+  * re-packaging
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-82
+
+ -- Gao Wei <wi.gao@samsung.com>  Mon, 08 Nov 2010 10:47:19 +0800
+
+ug-image-viewer-efl (1.0-81) unstable; urgency=low
+
+  * Enable EXIF & Change phtocao bounce by EFL
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-81
+
+ -- Li Suxia <suxia.li@samsung.com>  Sat, 06 Nov 2010 14:47:19 +0800
+
+ug-image-viewer-efl (1.0-80) unstable; urgency=low
+
+  * Reupload by media-svc
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-80
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 05 Nov 2010 13:38:48 +0800
+
+ug-image-viewer-efl (1.0-79) unstable; urgency=low
+
+  * Seperate image-viewer from ug & remove apputil dependency
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-79
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 05 Nov 2010 08:42:51 +0800
+
+ug-image-viewer-efl (1.0-78) unstable; urgency=low
+
+  * Comment out EXIF
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-78
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 04 Nov 2010 17:09:18 +0800
+
+ug-image-viewer-efl (1.0-77) unstable; urgency=low
+
+  * Fix email issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-77
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 04 Nov 2010 17:01:56 +0800
+
+ug-image-viewer-efl (1.0-76) unstable; urgency=low
+
+  * Reupload for media-svc change and fix drag issue on video
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-76
+
+ -- Hyunjun Ko <zzoon.ko@samsung.com>  Wed, 03 Oct 2010 19:40:12 +0800
+
+ug-image-viewer-efl (1.0-75) unstable; urgency=low
+
+  * Reupload for media-svc change
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-75
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 03 Nov 2010 15:43:41 +0800
+
+ug-image-viewer-efl (1.0-74) unstable; urgency=low
+
+  * Fix pinch zoom issue: disable bounce animator
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-74
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 03 Nov 2010 11:24:49 +0800
+
+ug-image-viewer-efl (1.0-73) unstable; urgency=low
+
+  * Fix Set as issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-73
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 01 Nov 2010 17:30:21 +0800
+
+ug-image-viewer-efl (1.0-72) unstable; urgency=low
+
+  * Fix delete issue on receive event after destroy
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-72
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 29 Oct 2010 18:04:13 +0800
+
+ug-image-viewer-efl (1.0-71) unstable; urgency=low
+
+  * Fix delete issue on continuous click
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-71
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 29 Oct 2010 10:58:21 +0800
+
+ug-image-viewer-efl (1.0-70) unstable; urgency=low
+
+  * Reupload because of mistake
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-70
+
+ -- Hyunjun Ko <zzoon.ko@samsung.com>  Wed, 27 Oct 2010 16:40:12 +0800
+
+ug-image-viewer-efl (1.0-69) unstable; urgency=low
+
+  * Reupload with media svc change.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-69
+
+ -- Hyunjun Ko <zzoon.ko@samsung.com>  Wed, 27 Oct 2010 16:25:12 +0800
+
+ug-image-viewer-efl (1.0-68) unstable; urgency=low
+
+  * Disable log info for demo
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-68
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 27 Oct 2010 14:05:34 +0800
+
+ug-image-viewer-efl (1.0-67) unstable; urgency=low
+
+  * Fix delete issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-67
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 27 Oct 2010 11:50:56 +0800
+
+ug-image-viewer-efl (1.0-66) unstable; urgency=low
+
+  * Fix album delete error
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-66
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 27 Oct 2010 09:08:12 +0800
+
+ug-image-viewer-efl (1.0-65) unstable; urgency=low
+
+  * Add test code
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-65
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 26 Oct 2010 17:53:01 +0800
+
+ug-image-viewer-efl (1.0-63) unstable; urgency=low
+
+  * Fix exit issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-63
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 26 Oct 2010 14:46:53 +0800
+
+ug-image-viewer-efl (1.0-62) unstable; urgency=low
+
+  * Add error handler
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-62
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 25 Oct 2010 18:06:55 +0800
+
+ug-image-viewer-efl (1.0-61) unstable; urgency=low
+
+  * Reupload with media svc change.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-61
+
+ -- Hyunjun Ko <zzoon.ko@samsung.com>  Sat, 23 Oct 2010 14:00:12 +0800
+
+ug-image-viewer-efl (1.0-60) unstable; urgency=low
+
+  * Upload with media svc change.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-60
+
+ -- Tang Feng <feng.tang@samsung.com>  Sat, 23 Oct 2010 12:45:36 +0800
+
+ug-image-viewer-efl (1.0-59) unstable; urgency=low
+
+  * Fix BS temp on free folder list.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-59
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 22 Oct 2010 17:42:36 +0800
+
+ug-image-viewer-efl (1.0-58) unstable; urgency=low
+
+  * Support add to home in videoplayer
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-58
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 22 Oct 2010 16:39:25 +0800
+
+ug-image-viewer-efl (1.0-57) unstable; urgency=low
+
+  * Add pre/next function for video
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-57
+
+ -- Li Wen <wen2.li@samsung.com>  Wed, 21 Oct 2010 17:15:22 +0800
+
+ug-image-viewer-efl (1.0-56) unstable; urgency=low
+
+  * Add support for git&wbmp
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-56
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 20 Oct 2010 17:45:22 +0800
+
+ug-image-viewer-efl (1.0-55) unstable; urgency=low
+
+  * Add sort type support & aul launch not mime-based
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-55
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 20 Oct 2010 10:47:31 +0800
+
+ug-image-viewer-efl (1.0-54) unstable; urgency=low
+
+  * Remove media-browser-svc completely
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-54
+
+ -- Li Wen <wen2.li@samsung.com>  Tue, 20 Oct 2010 09:56:02 +0800
+
+ug-image-viewer-efl (1.0-53) unstable; urgency=low
+
+  * Fix slideshow timer BS and indicator issue & build break
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-53
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 19 Oct 2010 15:56:02 +0800
+
+ug-image-viewer-efl (1.0-52) unstable; urgency=low
+
+  * Modified to use new api in media-svc
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-52
+
+ -- Hyunjun Ko <zzoon.ko@samsung.com>  Mon, 18 Oct 2010 22:40:12 +0800
+
+ug-image-viewer-efl (1.0-51) unstable; urgency=low
+
+  * Fix album edit bug
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-51
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 18 Oct 2010 16:31:13 +0800
+
+ug-image-viewer-efl (1.0-50) unstable; urgency=low
+
+  * Fix thumbpath for video file
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-49
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 15 Oct 2010 16:44:42 +0800
+
+ug-image-viewer-efl (1.0-49) unstable; urgency=low
+
+  * Add places view.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-49
+
+ -- Sangjin Han <sjhan.han@samsung.com>  Thu, 14 Oct 2010 15:39:00 +0900
+
+ug-image-viewer-efl (1.0-48) unstable; urgency=low
+
+  * Remove FM-SVC dependency
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-48
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 13 Oct 2010 18:22:51 +0800
+
+ug-image-viewer-efl (1.0-47) unstable; urgency=low
+
+  * Enable to use new media-svc
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-47
+
+ -- Hyunjun Ko <zzoon.ko@samsung.com>  Tue, 12 Oct 2010 20:33:12 +0800
+
+ug-image-viewer-efl (1.0-46) unstable; urgency=low
+
+  * Fix drm path issue & support landscape for videoplayer
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-46
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 11 Oct 2010 18:17:12 +0800
+
+ug-image-viewer-efl (1.0-45) unstable; urgency=low
+
+  * Fix flicking issue during zoom & merge video-player
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-45
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 11 Oct 2010 10:12:14 +0800
+
+ug-image-viewer-efl (1.0-44) unstable; urgency=low
+  * Adjust Copy feature & Fix grab key issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-44
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 08 Oct 2010 16:43:48 +0800
+
+ug-image-viewer-efl (1.0-43) unstable; urgency=low
+
+  * Fix some CMakeLists.txt for the new build system.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-43
+
+ -- Sangjin Han <sjhan.han@samsung.com>  Wed, 06 Oct 2010 18:09:00 +0900
+
+ug-image-viewer-efl (1.0-42) unstable; urgency=low
+
+  * Add USE_MEDIA_SVC define
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-42
+
+ -- Sangjin Han <sjhan.han@samsung.com>  Fri, 01 Oct 2010 16:55:20 +0900
+
+ug-image-viewer-efl (1.0-41) unstable; urgency=low
+
+  * Change sound header file & remove libcommunities dependency
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-41
+
+ -- Byungwook Jang <bw.jang@samsung.com>  Thu, 30 Sep 2010 14:52:44 +0900
+
+ug-image-viewer-efl (1.0-40) unstable; urgency=low
+
+  * Implement aul & Fix favor icon issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-40
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 29 Sep 2010 15:53:04 +0800
+
+ug-image-viewer-efl (1.0-39) unstable; urgency=low
+
+  * Replace navigation bar by navi-ext for 3 buttons
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-39
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 28 Sep 2010 17:47:40 +0800
+
+ug-image-viewer-efl (1.0-38) unstable; urgency=low
+
+  * Fix BS for Home&End key
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-38
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 27 Sep 2010 18:27:42 +0800
+
+ug-image-viewer-efl (1.0-37) unstable; urgency=low
+
+  * Adjust set as process & video-player for scalable UI
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-37
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 27 Sep 2010 17:26:16 +0800
+
+ug-image-viewer-efl (1.0-36) unstable; urgency=low
+
+  * Fix indicator issue(hide video indicator)
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-36
+
+ -- Li Wen <wen2.li@samsung.com>  Sun, 26 Sep 2010 19:40:18 +0800
+
+ug-image-viewer-efl (1.0-35) unstable; urgency=low
+
+  * Fix indicator issue(hide video indicator)
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-35
+
+ -- Li Suxia <suxia.li@samsung.com>  Sun, 26 Sep 2010 18:40:18 +0800
+
+ug-image-viewer-efl (1.0-34) unstable; urgency=low
+
+  * Fix slide show for video-image
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-34
+
+ -- Li Suxia <suxia.li@samsung.com>  Sun, 26 Sep 2010 17:43:44 +0800
+
+ug-image-viewer-efl (1.0-33) unstable; urgency=low
+
+  * Fix flick not smooth issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-33
+
+ -- Li Suxia <suxia.li@samsung.com>  Sat, 25 Sep 2010 19:58:22 +0800
+
+ug-image-viewer-efl (1.0-32) unstable; urgency=low
+
+  * Fix video-image slideshow
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-32
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 21 Sep 2010 18:13:48 +0800
+
+ug-image-viewer-efl (1.0-31) unstable; urgency=low
+
+  * Fix slideshow for video-image
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-31
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 20 Sep 2010 17:39:13 +0800
+
+ug-image-viewer-efl (1.0-30) unstable; urgency=low
+
+  * Enable navibar cb in video-player & for upload
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-30
+
+ -- Li Suxia <suxia.li@samsung.com>  Mon, 20 Sep 2010 13:08:59 +0800
+
+ug-image-viewer-efl (1.0-29) unstable; urgency=low
+
+  * Fix pinch zoom flick issue.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-29
+
+ -- Li Suxia <suxia.li@samsung.com>  Fri, 17 Sep 2010 17:28:36 +0800
+
+ug-image-viewer-efl (1.0-28) unstable; urgency=low
+
+  * Fix pinch zoom flick issue.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-28
+
+ -- Li Suxia <suxia.li@samsung.com>  Thu, 16 Sep 2010 17:37:33 +0800
+
+ug-image-viewer-efl (1.0-27) unstable; urgency=low
+
+  * Fix repeat-event issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-27
+
+ -- Li Suxia <suxia.li@samsung.com>  Wed, 15 Sep 2010 11:33:23 +0800
+
+ug-image-viewer-efl (1.0-26) unstable; urgency=low
+
+  * Fix rotate issue
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-26
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 14 Sep 2010 17:32:51 +0800
+
+ug-image-viewer-efl (1.0-25) unstable; urgency=low
+
+  * Enable Set_as feature
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-25
+
+ -- Li Suxia <suxia.li@samsung.com>  Tue, 14 Sep 2010 09:46:24 +0800
+
+ug-image-viewer-efl (1.0-24) unstable; urgency=low
+
+  * Reupload for EFL upgrade
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-24
+
+ -- Li Suxia <suxia.li@samsung.com>  Sat, 11 Sep 2010 16:37:21 +0800
+
+ug-image-viewer-efl (1.0-23) unstable; urgency=low
+
+  * Upload for EFL upgrade
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-23
+
+ -- Li Suxia  <suxia.li@samsung.com>  Sat, 10 Sep 2010 16:31:55 +0800
+
+ug-image-viewer-efl (1.0-22) unstable; urgency=low
+
+  * Enable pinch zoom & adjust video slide.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-22
+
+ -- Li Suxia  <suxia.li@samsung.com>  Thu, 09 Sep 2010 20:15:55 +0800
+
+ug-image-viewer-efl (1.0-21) unstable; urgency=low
+
+  * fix the bug of favorites
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-21
+
+ -- Gao Wei  <wi.gao@samsung.com>  Tue, 08 Sep 2010 08:15:18 +0800
+
+ug-image-viewer-efl (1.0-19) unstable; urgency=low
+
+  *Fix language issue for myfile
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-19
+
+ -- Li Suxia  <suxia.li@samsung.com>  Tue, 07 Sep 2010 13:15:18 +0800
+
+ug-image-viewer-efl (1.0-18) unstable; urgency=low
+
+  * Fix issue related with camera.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-18
+
+ -- Li Suxia  <suxia.li@samsung.com>  Mon, 06 Sep 2010 15:30:17 +0800
+
+ug-image-viewer-efl (1.0-17) unstable; urgency=low
+
+  * Fix indicator & disable pinch zoom.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-17
+
+ -- Li Suxia  <suxia.li@samsung.com>  Sat, 04 Sep 2010 17:32:32 +0800
+
+ug-image-viewer-efl (1.0-16) unstable; urgency=low
+
+  * Fix context popup issue, enable image-editor & set as wallpaper.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-16
+
+ -- Li Suxia  <suxia.li@samsung.com>  Fri, 03 Sep 2010 08:35:01 +0800
+
+ug-image-viewer-efl (1.0-15) unstable; urgency=low
+
+  * Fix issue related with image-editor launch.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-15
+
+ -- Li Suxia  <suxia.li@samsung.com>  Wed, 01 Sep 2010 17:44:31 +0800
+
+ug-image-viewer-efl (1.0-14) unstable; urgency=low
+
+  * Fix rotate issue.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-14
+
+ -- Li Suxia  <suxia.li@samsung.com>  Wed, 01 Sep 2010 08:13:29 +0800
+
+ug-image-viewer-efl (1.0-13) unstable; urgency=low
+
+  * Fix landscape issue for quick view.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-13
+
+ -- Li Suxia  <suxia.li@samsung.com>  Mon, 30 Aug 2010 17:48:42 +0800
+
+ug-image-viewer-efl (1.0-12) unstable; urgency=low
+
+  * fix build error in i686
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-12
+
+ -- Gao Wei  <wi.gao@samsung.com>  Fri, 27 Aug 2010 16:15:25 +0800
+
+ug-image-viewer-efl (1.0-10) unstable; urgency=low
+
+  * change mouse policy for UG_IVa
+  * remove common.h from db_handler.h
+  * Fix landscape bug.
+  * merge video codes into image viewera
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-10
+
+ -- Gao Wei  <wi.gao@samsung.com>  Fri, 27 Aug 2010 09:15:25 +0800
+
+ug-image-viewer-efl (1.0-8) unstable; urgency=low
+
+  * enable gallery to use IV_UG
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-8
+
+ -- Gao Wei  <wi.gao@samsung.com>  Wed, 25 Aug 2010 09:15:25 +0800
+
+ug-image-viewer-efl (1.0-7) unstable; urgency=low
+
+  * Update param parse and integrat videoplayer ug
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-7
+
+ -- Li Suxia  <suxia.li@samsung.com>  Tue, 24 Aug 2010 17:03:49 +0800
+
+ug-image-viewer-efl (1.0-6) unstable; urgency=low
+
+  * ug will not cluster gallery's db
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-6
+
+ -- Gao Wei  <wi.gao@samsung.com>  Thu, 23 Aug 2010 14:15:25 +0800
+
+ug-image-viewer-efl (1.0-5) unstable; urgency=low
+
+  * lay the evas_object_image under ly_standard
+  * Update parse param.
+  * Fix context popup position.
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-5
+
+ -- Gao Wei  <wi.gao@samsung.com>  Thu, 21 Aug 2010 11:15:25 +0800
+
+ug-image-viewer-efl (1.0-4) unstable; urgency=low
+
+  * Upload initial version: image view, slide show
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-4
+
+ -- Li Suxia  <suxia.li@samsung.com>  Thu, 19 Aug 2010 11:15:25 +0800
+
+ug-image-viewer-efl (1.0-1) unstable; urgency=low
+
+  * Upload initial version: image view, slide show
+  * Git: 165.213.180.234:/git/slp/pkgs/ug-image-viewer-efl
+  * Tag: ug-image-viewer-efl_1.0-1
+
+ -- Li Suxia  <suxia.li@samsung.com>  Thu, 19 Aug 2010 10:09:25 +0800
+
+ug-image-viewer-efl (1.0-0) unstable; urgency=low
+
+   * Initial version
+
+ -- Li Suxia  <suxia.li@samsung.com>  Mon, 16 Aug 2010 14:00:29 +0900
old mode 100755 (executable)
new mode 100644 (file)
index d9b21a6..ba6e34a
@@ -1,13 +1,15 @@
-%define optflags -Wall -Wextra -g -fpie -fPIC -O0 -Wno-unused-parameter -Wno-missing-field-initializers -finstrument-functions
+%define cflags " -Wall -Wextra -g -fpie -fPIC -O3 -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -finstrument-functions -pie -Wl,--as-needed -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
+%define cxxflags       " -Wall -Wextra -g -fpie -fPIC -O3 -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -finstrument-functions -pie -Wl,--as-needed -fvisibility-inlines-hidden -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
 
-%define _optdir        /opt
-%define _ugdir %{_optdir}/ug
+%define _usrdir        /usr
+%define _ugdir %{_usrdir}/ug
+%define _datadir /opt%{_ugdir}/data
 
-Name:       ug-image-viewer-efl
+Name:          ug-image-viewer-efl
 Summary:    Image Viewer UI Gadget v1.0
-Version:    1.6.36
+Version:    1.7.2
 Release:    0
-Group:      TO_BE/FILLED_IN
+Group:      misc
 License:    Flora Software License
 Source0:    %{name}-%{version}.tar.gz
 
@@ -22,24 +24,44 @@ BuildRequires: pkgconfig(edje)
 BuildRequires: pkgconfig(evas)
 BuildRequires: pkgconfig(ecore)
 BuildRequires: pkgconfig(utilX)
+BuildRequires: pkgconfig(libmedia-utils)
+BuildRequires: pkgconfig(libweb-media)
 BuildRequires: pkgconfig(ui-gadget-1)
 BuildRequires: pkgconfig(drm-client)
+BuildRequires: pkgconfig(drm-trusted)
 BuildRequires: pkgconfig(vconf)
 BuildRequires: pkgconfig(libexif)
 BuildRequires: pkgconfig(efreet)
+BuildRequires: pkgconfig(mm-fileinfo)
 BuildRequires: pkgconfig(dlog)
 BuildRequires: pkgconfig(glib-2.0)
 BuildRequires: pkgconfig(xext)
 BuildRequires: pkgconfig(xcomposite)
+BuildRequires: pkgconfig(dali)
+BuildRequires: pkgconfig(dali-core)
+BuildRequires: pkgconfig(dali-toolkit)
+BuildRequires: pkgconfig(liballshare)
+BuildRequires: pkgconfig(liballshare-core)
+BuildRequires: pkgconfig(shortcut)
+BuildRequires: pkgconfig(media-thumbnail)
+BuildRequires: pkgconfig(libface-svc)
+BuildRequires: pkgconfig(contacts-service2)
 BuildRequires: pkgconfig(capi-system-power)
 BuildRequires: pkgconfig(capi-appfw-application)
 BuildRequires: pkgconfig(capi-appfw-app-manager)
 BuildRequires: pkgconfig(capi-system-runtime-info)
 BuildRequires: pkgconfig(capi-system-sensor)
-BuildRequires: pkgconfig(capi-system-haptic)
+BuildRequires: pkgconfig(haptic)
 BuildRequires: pkgconfig(capi-media-metadata-extractor)
+BuildRequires: pkgconfig(capi-web-url-download)
 BuildRequires: pkgconfig(capi-content-mime-type)
+BuildRequires: pkgconfig(capi-media-player)
 BuildRequires: pkgconfig(capi-content-media-content)
+BuildRequires: pkgconfig(capi-network-nfc)
+BuildRequires: pkgconfig(capi-messaging-email)
+BuildRequires: pkgconfig(capi-messaging-messages)
+BuildRequires: pkgconfig(capi-media-sound-manager)
+BuildRequires: pkgconfig(capi-system-system-settings)
 
 %description
 Description: Image Viewer UI Gadget v1.0
@@ -49,16 +71,21 @@ Description: Image Viewer UI Gadget v1.0
 
 %build
 
+CFLAGS+=%cflags
+CXXFLAGS+=%cxxflags
+
 %ifarch %{arm}
 %define ARCH arm
-CXXFLAGS+=" -D_ARCH_ARM_ -mfpu=neon -mfloat-abi=softfp"
-export CXXFLAGS
+CXXFLAGS+=" -D_ARCH_ARM_ -mfpu=neon -mfloat-abi=softfp "
+CFLAGS+=" -D_ARCH_ARM_ -mfpu=neon -mfloat-abi=softfp "
 %else
 %define ARCH i586
 %endif
 
-CFLAGS+="%optflags" CXXFLAGS+="%{optflags}" \
-       cmake . -DCMAKE_INSTALL_PREFIX=%{_ugdir}/ -DCMAKE_DATA_DIR=%{_ugdir}/data -DARCH=%{ARCH}
+export CXXFLAGS
+export CFLAGS
+
+cmake . -DCMAKE_INSTALL_PREFIX=%{_ugdir}/ -DCMAKE_DATA_DIR=%{_datadir} -DARCH=%{ARCH}
 
 make %{?jobs:-j%jobs}
 
@@ -66,38 +93,25 @@ make %{?jobs:-j%jobs}
 %install
 rm -rf %{buildroot}
 %make_install
+mkdir -p %{buildroot}/usr/share/license
 
 execstack -c %{buildroot}%{_ugdir}/lib/libug-image-viewer-efl.so.0.1.0
 
 %post
-chown -R 5000:5000 %{_ugdir}/data/ug-image-viewer-efl
-mkdir -p /opt/ug/bin/
-ln -sf /usr/bin/ug-client /opt/ug/bin/image-viewer-efl
+chown -R 5000:5000 %{_datadir}/ug-image-viewer-efl
+/usr/bin/vconftool set -t bool file/private/ug-image-viewer-efl/motion_popup 0 -g 5000
+/usr/bin/vconftool set -t bool file/private/ug-image-viewer-efl/face_tag 0 -g 5000
+mkdir -p /usr/ug/bin/
+ln -sf /usr/bin/ug-client /usr/ug/bin/image-viewer-efl
 
 %files
 %manifest ug-image-viewer-efl.manifest
 %defattr(-,root,root,-)
-%dir %{_ugdir}/data/ug-image-viewer-efl
+%dir %{_datadir}/ug-image-viewer-efl
 
 %defattr(-,root,root,-)
 %{_ugdir}/*
-#/opt/share/applications/*.desktop
-/opt/share/packages/*.xml
-
-# %{_ugdir}/lib/libivug_common.so
-# %{_ugdir}/lib/libivug_common.so.0.1.0
-# %{_ugdir}/lib/libivug_widget.so
-# %{_ugdir}/lib/libivug_widget.so.0.1.0
-# %{_ugdir}/lib/libug-image-viewer-efl.so
-# %{_ugdir}/lib/libug-image-viewer-efl.so.0
-# %{_ugdir}/lib/libug-image-viewer-efl.so.0.1.0
-# %{_ugdir}/lib/libivug_medialist.so
-# %{_ugdir}/lib/libivug_medialist.so.0.1.0
-# %{_ugdir}/lib/libivug_slideshow.so
-# %{_ugdir}/lib/libivug_slideshow.so.0.1.0
-# %{_ugdir}/res/edje/ug-image-viewer-efl/*.edj
-# %{_ugdir}/res/images/ug-image-viewer-efl/*.png
-# %{_ugdir}/res/images/ug-image-viewer-efl/*.jpg
-# %{_ugdir}/res/images/ug-image-viewer-efl/*/*.png
-# %{_ugdir}/res/locale/*/LC_MESSAGES/ug-image-viewer-efl.mo
+
+/usr/share/license/%{name}
+/usr/share/packages/*.xml
 
diff --git a/res/CMakeLists.txt b/res/CMakeLists.txt
new file mode 100644 (file)
index 0000000..8525d2a
--- /dev/null
@@ -0,0 +1,5 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+INSTALL(DIRECTORY images/ DESTINATION ${CMAKE_INSTALL_PREFIX}/res/images/${IVUG_PACKAGE_NAME})
+
+ADD_SUBDIRECTORY(po)
diff --git a/res/appicon/ug-image-viewer-efl.png b/res/appicon/ug-image-viewer-efl.png
new file mode 100644 (file)
index 0000000..33d37ff
Binary files /dev/null and b/res/appicon/ug-image-viewer-efl.png differ
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
similarity index 73%
rename from main/src/include/ivug-string.h
rename to res/include/ivug-string.h
index 8d8e811..8bf7727
@@ -1,24 +1,25 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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>
+#include "ivug-define.h"
 
 /* Original code is in appcore-common.h */
 #define gettext_noop(str) (str) /**< keyword for xgettext  to extract translatable strings */
@@ -45,6 +46,7 @@
 
 // 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_UNLOCK _("%s is currently locked. Do you want to unlock it now?")
 
 #define IDS_COLLABORATIVE_PLAY _("Collaborative play")
-\r
-#define IDS_NULL                               _("")\r
-\r
-#define IDS_CROP_NOTIFY                        (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_SELECT_AN_AREA_TO_CROP_THE_PICTURE"))\r
-#define IDS_CALLER_ID_NOTIFY   (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_SELECTED_AREA_WILL_BE_APPLIED_TO_THE_CONTACT_PICTURE"))\r
-\r
+
+
+#define IDS_ADD_NAME                   _("Add name")
+#define IDS_SET_AS_CALLER_ID   _("Set as caller ID")
+#define IDS_LIVE_BOX                   _("Live Box")
+#define IDS_MMS                                        _("MMS")
+#define IDS_NO_FACE_DETECTED   _("No face detected")
+
+#define IDS_ORIENTATION                _("Orientation")
+#define IDS_MANUFACTURE                _("Manufacture")
+#define IDS_MODEL                              _("Model")
+#define IDS_FLASH                              _("Flash")
+#define IDS_NO_FLASH                   _("No flash")
+#define IDS_FOCAL_LENGTH               _("Focal length")
+#define IDS_WHITE_BALANCE              _("White balance")
+#define IDS_AUTO                               _("Auto")
+#define IDS_MANUAL                             _("Manual")
+#define IDS_APERTURE                   _("Aperture")
+#define IDS_EXPOSURE_TIME              _("Exposure time")
+#define IDS_ISO                                _("ISO")
+
+#define IDS_UNABLE_TO_OPEN_FILE        _("Unable to open file")
+
+#define IDS_NULL                               _("")
+
+#define IDS_WIFI_DIRECT                        _("Wi-Fi Direct")
+
+#define IDS_ADD_TO_HOME                        (dgettext(IVUG_TEXT_DOMAIN, "IDS_MEDIABR_SK2_ADD_TO_HOME"))
+#define IDS_CREATE_TAG                 (dgettext(IVUG_TEXT_DOMAIN, "IDS_MEDIABR_OPT_CREATE_TAG"))
+
+#define IDS_FACE_TAG                   (dgettext(IVUG_TEXT_DOMAIN, "IDS_PBR_OPT_FACE_TAGGING"))
+
+#define IDS_WALLPAPER_NOTIFY   (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_SELECTED_AREA_WILL_BE_APPLIED_TO_THE_WALLPAPER"))
+#define IDS_CROP_NOTIFY                        (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_SELECT_AN_AREA_TO_CROP_THE_PICTURE"))
+#define IDS_CALLER_ID_NOTIFY   (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_SELECTED_AREA_WILL_BE_APPLIED_TO_THE_CONTACT_PICTURE"))
+#define IDS_PRINT_NOTIFY               (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_SELECTED_AREA_WILL_BE_PRINTED"))
+
+#define IDS_ALLSHARE_NOTIFY            (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_YOU_CAN_SHARE_YOUR_MEDIA_WITH_OTHER_DEVICES_USING_NEARBY_DEVICES"))
+
 /* Registered string in STMS IV */
 #define IDS_ACCUMULATED_TIME   (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_ACCUMULATED_TIME"))
+#define IDS_ADD_TAG                            (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_HEADER_ADD_TAG"))
 #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_BUDDY_PHOTO_SHARE  (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_BUDDY_PHOTO_SHARE"))
 #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_DO_NOT_SEND                        (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_DO_NOT_SEND"))
+#define IDS_EDIT_TAG                   (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_EDIT_TAG"))
+#define IDS_ENTER_TAG_NAME     (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_ENTER_TAG_NAME"))
 #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_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_MANUALLY_DETECT            (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_MANUALLY_DETECT"))
 #define IDS_MAX_CHAR_LENGTH_REACHED (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"))
+#define IDS_ME                                 (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_ME"))
 #define IDS_N_A                                (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_N_A"))
+#define IDS_NEAR_DEVICES               (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_NEARBY_DEVICES_T_ALLSHARE"))
+#define IDS_NEW_TAG                            (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_NEW_TAG"))
 #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_REMOVE_TAG                 (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_REMOVE_TAG"))
 #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_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_SHARE_VIA                  (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_SHARE_VIA"))
 #define IDS_SLIDE_SHOW                 (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_SLIDE_SHOW"))
+#define IDS_TAG                                        (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_TAG"))
 #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_USE_MOTION                         (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_USE_MOTION"))
 #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_BLUETOOTH          (dgettext("sys_string", "IDS_COM_BODY_BLUETOOTH"))
+#define IDS_EMAIL                      (dgettext("sys_string", "IDS_COM_BODY_EMAIL"))
+#define IDS_MESSAGE            (dgettext("sys_string", "IDS_COM_BODY_MESSAGE"))
+#define IDS_WI_FI                      (dgettext("sys_string", "IDS_COM_BODY_WI_FI"))
+#define IDS_NFC                                (dgettext("sys_string", "IDS_COM_BODY_NFC"))
+
+#define IDS_FACEBOOK           (dgettext("sys_string", "IDS_COM_BODY_FACEBOOK"))
+#define IDS_PICASA             (dgettext("sys_string", "IDS_COM_BODY_PICASA"))
+#define IDS_TWITTER            (dgettext("sys_string", "IDS_COM_BODY_TWITTER"))
+#define IDS_YOUTUBE            (dgettext("sys_string", "IDS_COM_BODY_YOU_TUBE"))
+
+#define IDS_ALLSHARE           (dgettext("sys_string", "IDS_COM_BODY_ALLSHARE"))
 #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"))\r
-#define IDS_CHANGE_NAME                (dgettext("sys_string", "IDS_COM_BODY_CHANGE_NAME"))\r
+#define IDS_CANCEL                     (dgettext("sys_string", "IDS_COM_SK_CANCEL"))
 #define IDS_CLOSE                      (dgettext("sys_string", "IDS_COM_BODY_CLOSE"))
+#define IDS_CHANGE_NAME                (dgettext("sys_string", "IDS_COM_BODY_CHANGE_NAME"))
 #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_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"))\r
-#define IDS_ENTER_NAME         (dgettext("sys_string", "IDS_COM_BODY_ENTER_NAME"))\r
+#define IDS_EDIT                       (dgettext("sys_string", "IDS_COM_BODY_EDIT"))
+#define IDS_ENTER_NAME         (dgettext("sys_string", "IDS_COM_BODY_ENTER_NAME"))
 #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_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_OFF                        (dgettext("sys_string", "IDS_COM_BODY_OFF"))
 #define IDS_OK                                 (dgettext("sys_string", "IDS_COM_SK_OK"))
+#define IDS_ON                                 (dgettext("sys_string", "IDS_COM_BODY_ON"))
 #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_SEND                       (dgettext("sys_string", "IDS_COM_BODY_SEND"))
 #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"))
diff --git a/res/manifest/ug-image-viewer-efl.png b/res/manifest/ug-image-viewer-efl.png
deleted file mode 100755 (executable)
index 7f58c2d..0000000
Binary files a/res/manifest/ug-image-viewer-efl.png and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
similarity index 93%
rename from main/res/po/CMakeLists.txt
rename to res/po/CMakeLists.txt
index 6171681..2b8b7d1
@@ -19,7 +19,7 @@ FOREACH(pofile ${POFILES})
                        DEPENDS ${absPofile}
        )
        INSTALL(FILES ${moFile}
-                       DESTINATION /opt/ug/res/locale/${lang}/LC_MESSAGES RENAME ${IVUG_PACKAGE_NAME}.mo)
+                       DESTINATION /usr/ug/res/locale/${lang}/LC_MESSAGES RENAME ${IVUG_PACKAGE_NAME}.mo)
        SET(moFiles ${moFiles} ${moFile})
 ENDFOREACH(pofile)
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/ar.po
rename to res/po/ar.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/az.po
rename to res/po/az.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/bg.po
rename to res/po/bg.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/ca.po
rename to res/po/ca.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/cs.po
rename to res/po/cs.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/csv2po_v2
rename to res/po/csv2po_v2
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/da.po
rename to res/po/da.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/de_DE.po
rename to res/po/de_DE.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/el_GR.po
rename to res/po/el_GR.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/en.po
rename to res/po/en.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/en_PH.po
rename to res/po/en_PH.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/en_US.po
rename to res/po/en_US.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/es_ES.po
rename to res/po/es_ES.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/es_MX.po
rename to res/po/es_MX.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/et.po
rename to res/po/et.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/eu.po
rename to res/po/eu.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/fi.po
rename to res/po/fi.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/fr_CA.po
rename to res/po/fr_CA.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/fr_FR.po
rename to res/po/fr_FR.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/ga.po
rename to res/po/ga.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/gl.po
rename to res/po/gl.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/hi.po
rename to res/po/hi.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/hr.po
rename to res/po/hr.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/hu.po
rename to res/po/hu.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/hy.po
rename to res/po/hy.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/is.po
rename to res/po/is.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/it_IT.po
rename to res/po/it_IT.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/ja_JP.po
rename to res/po/ja_JP.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/ka.po
rename to res/po/ka.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/kk.po
rename to res/po/kk.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/ko_KR.po
rename to res/po/ko_KR.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/lt.po
rename to res/po/lt.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/lv.po
rename to res/po/lv.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/mk.po
rename to res/po/mk.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/nb.po
rename to res/po/nb.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/nl_NL.po
rename to res/po/nl_NL.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/pl.po
rename to res/po/pl.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/pt_BR.po
rename to res/po/pt_BR.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/pt_PT.po
rename to res/po/pt_PT.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/ro.po
rename to res/po/ro.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/ru_RU.po
rename to res/po/ru_RU.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/sk.po
rename to res/po/sk.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/sl.po
rename to res/po/sl.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/sr.po
rename to res/po/sr.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/sv.po
rename to res/po/sv.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/tr_TR.po
rename to res/po/tr_TR.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/uk.po
rename to res/po/uk.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/uz.po
rename to res/po/uz.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/zh_CN.po
rename to res/po/zh_CN.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/zh_HK.po
rename to res/po/zh_HK.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/zh_SG.po
rename to res/po/zh_SG.po
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from main/res/po/zh_TW.po
rename to res/po/zh_TW.po
old mode 100755 (executable)
new mode 100644 (file)
index a6bfa40..e98bae4
@@ -6,7 +6,9 @@ SET(VERSION 0.1.0)
 
 SET(SRCS
 # Effect files
-       src/ivug-slideshow.cpp
+       src/control/ivug-slideshow.cpp
+       src/control/ivug-dali-util.cpp
+
        src/effect/ivug-xcapture.c
        src/effect/ivug-blind.c
        src/effect/ivug-iris.c
@@ -15,6 +17,18 @@ SET(SRCS
        src/effect/ivug-effect.c
        src/effect/ivug-slide.c
        src/effect/ivug-anim.c
+
+       src/dali_effect/src/ivug-includes.cpp
+       src/dali_effect/src/ivug-app-navigation.cpp
+       src/dali_effect/src/ivug-dali-imageview.cpp
+       src/dali_effect/src/ivug-image-view.cpp
+       src/dali_effect/src/ivug-dali.cpp
+       src/dali_effect/src/ivug-slideshow-control.cpp
+       src/dali_effect/src/ivug-slideshow-effect.cpp
+       src/dali_effect/src/ivug-dali-slideshow-view.cpp
+       src/dali_effect/src/ivug-view-stack-info.cpp
+       src/dali_effect/src/ivug-slideshow-face.cpp
+       src/dali_effect/src/ivug-water-ripple-effect.cpp
 )
 
 
@@ -25,11 +39,12 @@ INCLUDE_DIRECTORIES(
        ${IVUG_SOURCE_MEDIA_DIR}/include
        ${IVUG_SOURCE_FEATURE_DIR}/include
        include
+       src/include
+       src/control
        src/effect/include
+       src/dali_effect/include
 )
 
-MESSAGE("Checking " ${PROJECT_NAME}\r)
-
 INCLUDE(FindPkgConfig)
 pkg_check_modules(${PROJECT_NAME}_pkgs REQUIRED
        elementary
@@ -42,28 +57,35 @@ pkg_check_modules(${PROJECT_NAME}_pkgs REQUIRED
        ecore-x
        xext
        xcomposite
+       libweb-media
        vconf
        ui-gadget-1
-       glib-2.0
+       dali
+       dali-core
+       dali-toolkit
+       liballshare
+       liballshare-core
+       libface-svc
        capi-system-power
        capi-appfw-application
+       capi-media-player
+       capi-media-sound-manager
 )
 
 FOREACH(flag ${${PROJECT_NAME}_pkgs_CFLAGS})
-       SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
+       SET(EXTRA_FLAGS "${EXTRA_FLAGS} ${flag}")
 ENDFOREACH(flag)
 
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -Wall")
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS}")
-
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 ADD_DEFINITIONS("-DLOG_LVL=DBG_MSG_LVL_HIGH")
 ADD_DEFINITIONS("-DLOG_CAT=\"IV-WIDGET\"")
 
-ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+#ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+ADD_LIBRARY(${PROJECT_NAME} STATIC ${SRCS})
 
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION} )
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS ${EXTRA_FLAGS})
 
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${${PROJECT_NAME}_pkgs_LDFLAGS}
        ivug_common ivug_medialist ivug_widget ivug_feature
old mode 100755 (executable)
new mode 100644 (file)
index 1c90f5f..aba6b81
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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
 
        if bSlideFirst == EINA_FALSE, wait interval time and then slide
 */
 #include <Elementary.h>
-#include <Ecore_X.h>
-#include <glib.h>
-
 #include "ivug-medialist.h"
 #include "ivug-config.h"
-#include "ivug-effect.h"
-
-#define DATA_PATH                                              DATADIR"/"PACKAGE
 
-typedef void (*ivug_slideshow_finish_cb)(Media_Data *cur_sd, void* user_data);
 
 typedef enum {
        SLIDE_SHOW_STOPPED = 0x00,
@@ -43,57 +36,12 @@ typedef enum {
        SLIDE_SHOW_PAUSE,
 } slideshow_state_t;
 
-typedef struct
-{
-       void *pSlideshow; //SlideShow *
-       Evas_Object *layout;
-       Evas_Object *photocam;
-       Evas_Object *thumbnail;
-
-       Media_Item *mitem;
-
-       int x;  // Need??
-       int y;
-
-} Slide_Layout;
-
-typedef struct _SlideShow
-{
-       Evas_Object *obj;               // Slide show view.
-       Evas_Object *event;             // Mouse event
-
-/* slide show setting */
-       double ss_interval_time;
-       slide_show_mode ss_mode;
-
-/* slide show effect*/
-       Effect_Type effect_type;
-       Effect_Engine* effect_engine;
-
-//slider show.
-       slideshow_state_t state;
-
-       Ecore_Timer *ss_timer;  //slide show timer
-       Ecore_Timer *click_timer;
-       ivug_slideshow_finish_cb ss_func;               // Callback for slide show finished
-       void* ss_user_data;
-       Eina_Bool bSS_StopFlag; /* request slide show stop flag */
 
-// Data
-       Media_List *media_list;
-       Media_Item *ss_Header;          // Start point
+typedef struct _SlideShow SlideShow;
 
-// Layout.
-       int sCurrent;           // 0 or 1
-       Slide_Layout sLayout[2];
-
-// State variables.
-       int screen_w;
-       int screen_h;
-
-
-       Ecore_Idler *load_idler;
-}SlideShow;
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 SlideShow *
 ivug_ss_create(Evas_Object *parent);
@@ -125,9 +73,6 @@ ivug_ss_object_get(SlideShow *pSlideShow);
 bool
 ivug_ss_set_music(SlideShow *pSlideShow, const char *path);
 
-void
-ivug_ss_get_screen_size(int *width, int *height);
-
 Media_Item *
 ivug_ss_get_next_item(Media_List *mList,
                        Media_Item *header,
@@ -135,3 +80,13 @@ ivug_ss_get_next_item(Media_List *mList,
                        slide_show_mode mode);
 
 
+bool ivug_ss_is_dali(SlideShow *pSlideShow);
+
+void
+ivug_ss_set_stop(SlideShow *pSlideShow);               // Remove this!!!
+
+
+#ifdef __cplusplus
+}
+#endif
+
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/slideshow/src/control/ivug-dali-util.cpp b/slideshow/src/control/ivug-dali-util.cpp
new file mode 100644 (file)
index 0000000..e8d3bfb
--- /dev/null
@@ -0,0 +1,490 @@
+/*
+ *  com.samsung.gallery
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <face-svc.h>
+#include <face-svc-types.h>
+#include "ivug-dali.h"
+#include "ivug-dali-util.h"
+#include "ivug-debug.h"
+#include "ivug-file-info.h"
+#include "ivug-slideshow-control.h"
+#include "ivug-slideshow-priv.h"
+
+using namespace Imageview3D;
+
+typedef struct
+{
+       int face_rect_x;
+       int face_rect_y;
+       int face_rect_w;
+       int face_rect_h;
+       char *media_id;
+} face_data_s;
+#if 0
+static void resume_view_transition_Timer(SlideShow *ss_handle)
+{
+       IVUG_FUNC_ENTER();
+       if (NULL == ss_handle) {
+               return;
+       }
+       if(ss_handle->dali_viewer_handle) {
+               Imageviewer *iv_handle = (Imageviewer *)ss_handle->dali_viewer_handle;
+               iv_handle->ResumeViewAndTransitionTimer();
+       }
+       IVUG_FUNC_LEAVE();
+}
+#endif
+static void _ivug_free_face_records_list(GList *pFaceList)
+{
+       int i = 0;
+       ivug_ret_if(NULL == pFaceList);
+       int length = g_list_length(pFaceList);
+       for (i = 0; i < length; i++) {
+               face_data_s *item = (face_data_s *)g_list_nth_data(pFaceList, i);
+               if (item && item->media_id) {
+                               free(item->media_id);
+                               item->media_id = NULL;
+               }
+               if (item) {
+                       free(item);
+                       item = NULL;
+               }
+       }
+       if (pFaceList) {
+               g_list_free(pFaceList);
+               pFaceList = NULL;
+       }
+}
+
+void ivug_dali_destroy_dali_data(SlideShow *ss_handle)
+{
+       ivug_ret_if(NULL == ss_handle);
+       SlideShow *slide_show = ss_handle;
+
+       MSG_IVUG_HIGH("start");
+
+       if (ss_handle->adaptor) {
+               if (ss_handle->xwin) {
+                       ecore_x_window_lower(ss_handle->xwin);
+                       ecore_x_window_free(ss_handle->xwin);
+               }
+               ss_handle->adaptor->Stop();
+       }
+
+       //elm_win_indicator_mode_set((Evas_Object *)ug_get_window(), ELM_WIN_INDICATOR_SHOW);
+
+       if(slide_show->dali_viewer_handle) {
+               Imageviewer *iv_handle = (Imageviewer *)ss_handle->dali_viewer_handle;
+               //slide show don't remove again,stage auto remove it.
+               //iv_handle->RemoveFromLayerMain();
+               //viewerHandle->GetAppNavigation().NavigateBack();
+               if (iv_handle) {
+                       delete iv_handle;
+                       iv_handle = NULL;
+               }
+               slide_show->dali_viewer_handle = NULL;
+       }
+       if (slide_show->face_record_list) {
+               _ivug_free_face_records_list(slide_show->face_record_list);
+               slide_show->face_record_list = NULL;
+       }
+       if (slide_show->adaptor) {
+               delete slide_show->adaptor;
+               slide_show->adaptor = NULL;
+               MSG_IVUG_HIGH("adaptor  have been release!");
+       }
+       slide_show->cur_item = NULL;
+       MSG_IVUG_HIGH("end");
+}
+
+static bool _ivug_append_face_records(face_svc_h handle, void *user_data)
+{
+       char *media_id = NULL;
+       int field_val = -1;
+
+       ivug_retv_if(NULL == user_data, false);
+       SlideShow* ss_handle = (SlideShow*)user_data;
+
+       //GList *face_record_glist = *((GList **)(user_data));
+       face_data_s *face_data = (face_data_s *)calloc(1, sizeof(face_data_s));
+
+       face_svc_get_media_id(handle, &media_id);
+       //MSG_NOTI_HIGH("[media_id : %s]\n", media_id);
+       face_data->media_id = g_strdup(media_id);
+       face_svc_get_face_rect_x(handle, &field_val);
+       //MSG_NOTI_HIGH("[rect_x : %d]\n", field_val);
+       face_data->face_rect_x = field_val;
+       face_svc_get_face_rect_y(handle, &field_val);
+       //MSG_NOTI_HIGH("[rect_y : %d]\n", field_val);
+       face_data->face_rect_y = field_val;
+       face_svc_get_face_rect_w(handle, &field_val);
+       //MSG_NOTI_HIGH("[rect_w : %d]\n", field_val);
+       face_data->face_rect_w = field_val;
+       face_svc_get_face_rect_h(handle, &field_val);
+       //MSG_NOTI_HIGH("[rect_h : %d]\n", field_val);
+       face_data->face_rect_h = field_val;
+
+       /* append to list */
+       ss_handle->face_record_list = g_list_append(ss_handle->face_record_list, face_data);
+       int face_cnt = g_list_length(ss_handle->face_record_list);
+       MSG_IVUG_HIGH("face_cnt is %d\n", face_cnt);
+       return true;
+}
+
+int ivug_get_face_cnt(const char *media_id, SlideShow* ss_handle)
+{
+       IVUG_FUNC_ENTER();
+
+       if (NULL == ss_handle) {
+               return 0;
+       }
+       if (NULL != ss_handle->face_record_list) {
+               _ivug_free_face_records_list(ss_handle->face_record_list);
+               ss_handle->face_record_list = NULL;
+       }
+       face_svc_foreach_face_list_by_media_id(_ivug_append_face_records, media_id,
+               (void *)ss_handle);
+       int face_cnt = g_list_length(ss_handle->face_record_list);
+       if(face_cnt <= 0) {
+               face_cnt = 0;
+       }
+       MSG_IVUG_HIGH("ivug_get_face_cnt is %d\n", face_cnt);
+       IVUG_FUNC_LEAVE();
+       return face_cnt;
+}
+
+bool ivug_get_nth_face_data(SlideShow* ss_handle,
+                       int record_index,
+                       int *rect_pos_x,
+                       int *rect_pos_y,
+                       int *rect_w,
+                       int *rect_h)
+{
+       ivug_retv_if(NULL == ss_handle, false);
+       ivug_retv_if(NULL == ss_handle->face_record_list, false);
+       face_data_s *record = (face_data_s *)g_list_nth_data(ss_handle->face_record_list,
+               record_index);
+       if(record) {
+               *rect_pos_x = record->face_rect_x;
+               //MSG_NOTI_HIGH("[rect_x : %d]\n", *rect_pos_x);
+               *rect_pos_y = record->face_rect_y;
+               //MSG_NOTI_HIGH("[rect_y : %d]\n", *rect_pos_y);
+               *rect_w = record->face_rect_w;
+               //MSG_NOTI_HIGH("[rect_y : %d]\n", *rect_pos_y);
+               *rect_h = record->face_rect_h;
+               //MSG_NOTI_HIGH("[rect_y : %d]\n", *rect_pos_y);
+               return true;
+       } else {
+               return false;
+       }
+}
+
+void ivug_get_image_resolution(const char *file_path,
+       int *pwidth,
+       int *pheight)
+{
+       int width = 0;
+       int height = 0;
+       if (NULL != file_path) {
+               ivug_fileinfo_get_image_resolution(file_path, &width, &height);
+       }
+       *pwidth =  width;
+       *pheight = height;
+}
+
+void ivug_get_screen_size(int *width, int *height)
+{
+       int rotation = elm_win_rotation_get((Evas_Object *)ug_get_window());
+
+       int screen_w = 0;
+       int screen_h = 0;
+       ecore_x_window_size_get(ecore_x_window_root_first_get(), &screen_w, &screen_h);
+       if(rotation == 0 || rotation == 180)
+       {
+               *width = screen_w;
+               *height = screen_h;
+       }
+       else if(rotation == 90 || rotation == 270)
+       {
+               *width = screen_h;
+               *height = screen_w;
+       }
+
+}
+
+int ivug_get_win_rotation()
+{
+       int rotation = elm_win_rotation_get((Evas_Object *)ug_get_window());
+       return rotation;
+}
+
+void ivug_ss_set_mouse_tag(bool tag, SlideShow* ss_handle)
+{
+       if (NULL != ss_handle){
+               ss_handle->bMouse_event = tag;
+       }
+}
+
+bool ivug_ss_get_mouse_tag(SlideShow* ss_handle)
+{
+       bool tag = false;
+       if (NULL != ss_handle){
+               tag = ss_handle->bMouse_event;
+       }
+       return tag;
+}
+
+Media_Item *ivug_ss_dali_get_next_item(Media_Item *current,
+       SlideShow *ss_handle)
+{
+       if ((!ss_handle) || (!ss_handle->media_list)){
+               return NULL;
+       }
+       Media_Item *next = NULL;
+       if (NULL == current) {
+               next = ss_handle->ss_Header;
+
+       } else {
+               next = ivug_ss_get_next_item(ss_handle->media_list,
+                               ss_handle->ss_Header,
+                               current,
+                               ss_handle->ss_mode);
+       }
+       return next;
+}
+
+void ivug_ss_dali_set_current_item(Media_Item *current,
+       SlideShow *ss_handle)
+{
+       if (!ss_handle){
+               return;
+       }
+       ss_handle->cur_item = current;
+}
+
+Media_Item *ivug_ss_dali_get_current_item(SlideShow *ss_handle)
+{
+       if (!ss_handle){
+               return NULL;
+       }
+       return ss_handle->cur_item;
+}
+
+bool ivug_ss_create_player_handle(SlideShow *ss_handle)
+{
+       MSG_IVUG_HIGH("");
+       if (!ss_handle) {
+               return false;
+       }
+       if (ss_handle->vmpHandle) {
+               return true;
+       }
+
+       sound_manager_set_session_type(SOUND_SESSION_TYPE_EXCLUSIVE);
+
+       int nErr = PLAYER_ERROR_NONE;
+       if (!ss_handle->vmpHandle) {
+               nErr = player_create(&ss_handle->vmpHandle);
+       }
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               MSG_IVUG_HIGH("Fail to create player handle. Error code : %x", nErr);
+               return false;
+       }
+       if (ss_handle->vmpHandle) {
+               nErr = player_set_sound_type(ss_handle->vmpHandle, SOUND_TYPE_MEDIA);
+       }
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               MSG_IVUG_HIGH("Fail to set attribute (%x)", nErr);
+               return false;
+       }
+       return true;
+}
+
+bool ivug_ss_destory_player_handle(SlideShow *ss_handle)
+{
+       MSG_IVUG_HIGH("");
+       bool bSucess = true;
+       if (ss_handle && ss_handle->vmpHandle) {
+               ivug_ss_stop_player(ss_handle);
+               MSG_IVUG_HIGH ("destory video");
+               if (player_destroy(ss_handle->vmpHandle) != PLAYER_ERROR_NONE) {
+                       MSG_IVUG_HIGH ("player_destroy failed");
+                       bSucess = false;
+               }
+               ss_handle->vmpHandle = NULL;
+       }
+
+       sound_manager_set_session_type(SOUND_SESSION_TYPE_SHARE);
+
+       return bSucess;
+}
+
+bool ivug_ss_init_player(const char *path, SlideShow *ss_handle, bool bVideo)
+{
+       if (path == NULL || !ss_handle) {
+               return false;
+       }
+       if (!ss_handle->vmpHandle) {
+               return false;
+       }
+       int result = PLAYER_ERROR_NONE;
+       result = player_set_uri(ss_handle->vmpHandle, path);
+       if (result != PLAYER_ERROR_NONE) {
+               MSG_IVUG_HIGH ("player_set_uri error");
+       }
+       if (bVideo) {
+               result = player_set_looping(ss_handle->vmpHandle, false);
+               if (result != PLAYER_ERROR_NONE) {
+                       MSG_IVUG_HIGH ("player_set_looping error");
+               }
+       } else {
+               result = player_set_looping(ss_handle->vmpHandle, true);
+               if (result != PLAYER_ERROR_NONE) {
+                       MSG_IVUG_HIGH ("player_set_looping error");
+               }
+       }
+       if (bVideo) {
+               player_display_mode_e mode = PLAYER_DISPLAY_MODE_FULL_SCREEN;
+               result = player_set_display_mode(ss_handle->vmpHandle, mode);
+               if (result != PLAYER_ERROR_NONE) {
+                       MSG_IVUG_HIGH ("player_set_display_mode error");
+               }
+               result = player_set_display(ss_handle->vmpHandle, PLAYER_DISPLAY_TYPE_X11,
+                       (void*)ss_handle->xPixmapId);
+               if(result != PLAYER_ERROR_NONE)
+               {
+                       MSG_IVUG_HIGH("player_set_display error");
+                       return false;
+               }
+               result = player_enable_evas_display_scaling(ss_handle->vmpHandle, true);
+               if (result != PLAYER_ERROR_NONE) {
+                       MSG_IVUG_HIGH ("player_enable_evas_display_scaling error");
+               }
+               result = player_set_x11_display_visible(ss_handle->vmpHandle, true);
+               if (result != PLAYER_ERROR_NONE) {
+                       MSG_IVUG_HIGH ("player_set_x11_display_visible error");
+               }
+       }
+       if (player_prepare(ss_handle->vmpHandle) != PLAYER_ERROR_NONE) {
+               MSG_IVUG_HIGH ("realize is failed");
+               return false;
+       }
+       return true;
+}
+
+bool ivug_ss_play_player(SlideShow *ss_handle)
+{
+       if (!ss_handle) {
+               return false;
+       }
+       if (ss_handle->vmpHandle){
+               if (player_start(ss_handle->vmpHandle) != PLAYER_ERROR_NONE) {
+                       MSG_IVUG_HIGH ("mm_player_start failed");
+                       return false;
+               } else {
+                       return true;
+               }
+       }
+       return false;
+}
+
+bool ivug_ss_stop_player(SlideShow* ss_handle)
+{
+       bool bSucess = true;
+       if (!ss_handle || !ss_handle->vmpHandle) {
+               bSucess = true;
+       }
+       if (ss_handle->vmpHandle) {
+               player_unset_completed_cb(ss_handle->vmpHandle);
+               MSG_IVUG_HIGH ("stop video");
+               if (player_stop(ss_handle->vmpHandle) != PLAYER_ERROR_NONE) {
+                       MSG_IVUG_HIGH ("mm_player_stop failed");
+                       bSucess = false;
+               }
+               if (player_unprepare(ss_handle->vmpHandle) != PLAYER_ERROR_NONE) {
+                       MSG_IVUG_HIGH ("mm_player_unrealize failed");
+                       bSucess = false;
+               }
+       }
+       return bSucess;
+}
+
+bool ivug_ss_pause_player(SlideShow* ss_handle)
+{
+       bool bSucess = true;
+       if (!ss_handle || !ss_handle->vmpHandle) {
+               bSucess = true;
+       }
+       if (ss_handle->vmpHandle) {
+               MSG_IVUG_HIGH ("stop video");
+               if (player_pause(ss_handle->vmpHandle) != PLAYER_ERROR_NONE) {
+                       MSG_IVUG_HIGH ("mm_player_pause failed");
+                       bSucess = false;
+               }
+       }
+       return bSucess;
+}
+
+bool ivug_ss_get_player_attribute(SlideShow *ss_handle,
+       int *width, int *height)
+{
+       int result = PLAYER_ERROR_NONE;
+       if (!ss_handle->vmpHandle) {
+               return false;
+       }
+       result = player_get_video_size(ss_handle->vmpHandle, width, height);
+       if (result != PLAYER_ERROR_NONE) {
+               MSG_IVUG_HIGH ("ivug_ss_get_video_attribute_capi failed");
+               return false;
+       }
+       return true;
+}
+
+static void _video_msg_callback(void *pUserData)
+{
+       if(pUserData)
+       {
+               SlideshowControl* ssc = (SlideshowControl *)pUserData;
+               ssc->EndVideoPlay();
+               MSG_IVUG_HIGH ("********end video stream*******");
+
+       }
+}
+
+bool ivug_ss_player_message_callback(SlideShow *ss_handle,
+       void *data)
+{
+       bool bSucess = true;
+       int result = PLAYER_ERROR_NONE;
+       MSG_IVUG_HIGH ("******ivug_ss_player_message_callback******");
+       if (ss_handle && ss_handle->vmpHandle) {
+               result = player_set_completed_cb(
+                       ss_handle->vmpHandle, _video_msg_callback, (void*)data);
+               if (result != PLAYER_ERROR_NONE) {
+                       bSucess = false;
+               }
+       } else {
+               bSucess = false;
+       }
+       return bSucess;
+}
+
+
diff --git a/slideshow/src/control/ivug-dali-util.h b/slideshow/src/control/ivug-dali-util.h
new file mode 100644 (file)
index 0000000..6c8ec87
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ *  com.samsung.gallery
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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_DALI_UTIL_H_
+#define _IVUG_DALI_UTIL_H_
+
+#include <Elementary.h>
+#include <app.h>
+#include "ivug-config.h"
+#include "ivug-medialist.h"
+#include "ivug-slideshow.h"
+
+/* Defined in header image-view.h */
+typedef enum _ivug_dali_changeview_id {
+       GL_DALI_CHANGE_SLIDE = 0,
+       GL_DALI_CHANGE_SLIDE_TO_SLIDESHOW,
+       GL_DALI_CHANGE_SLIDESHOW,
+       GL_DALI_CHANGE_SLIDESHOW_TO_SLIDE,
+} ivug_dali_changeview_id;
+
+int ivug_get_face_cnt(const char *media_id, SlideShow *ss_handle);
+/* get pos and size of nth face rect from GList */
+bool ivug_get_nth_face_data(SlideShow *ss_handle,
+                       int record_index,
+                       int *rect_pos_x,
+                       int *rect_pos_y,
+                       int *rect_w,
+                       int *rect_h);
+void ivug_get_image_resolution(const char *file_path,
+       int *pwidth,
+       int *pheight);
+void ivug_dali_destroy_dali_data(SlideShow *ss_handle);
+
+void ivug_get_screen_size(int *screen_w, int *screen_h);
+/* get windown rotation degree */
+int ivug_get_win_rotation();
+void ivug_ss_set_mouse_tag(bool tag, SlideShow *ss_handle);
+bool ivug_ss_get_mouse_tag(SlideShow *ss_handle);
+Media_Item *ivug_ss_dali_get_next_item(Media_Item *current,
+               SlideShow *ss_handle);
+void ivug_ss_dali_set_current_item(Media_Item *current, SlideShow *ss_handle);
+
+bool ivug_ss_create_player_handle(SlideShow *ss_handle);
+bool ivug_ss_destory_player_handle(SlideShow *ss_handle);
+bool ivug_ss_init_player(const char *path, SlideShow *ss_handle, bool bVideo);
+bool ivug_ss_play_player(SlideShow *ss_handle);
+bool ivug_ss_stop_player(SlideShow *ss_handle);
+bool ivug_ss_pause_player(SlideShow* ss_handle);
+bool ivug_ss_get_player_attribute(SlideShow *ss_handle,
+       int *width, int *height);
+bool ivug_ss_player_message_callback(SlideShow *ss_handle,
+       void *data);
+
+#endif
+
old mode 100755 (executable)
new mode 100644 (file)
similarity index 86%
rename from slideshow/src/ivug-slideshow.cpp
rename to slideshow/src/control/ivug-slideshow.cpp
index 2b14f35..279cdd8
@@ -1,23 +1,28 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 <stdlib.h>
 #include <ui-gadget-module.h>
 #include "ivug-anim.h"
 #include "ivug-slideshow.h"
+#include "ivug-dali.h"
+#include "ivug-slideshow-priv.h"
+
+#include "ivug-dali-util.h"
+
 #include "ivug-debug.h"
 
 #include "ivug-config.h"
@@ -28,6 +33,7 @@
 
 #include "ivug-image.h"
 
+
 #include <Elementary.h>
 #include <assert.h>
 
@@ -190,6 +196,7 @@ _hidden1(void *data, Evas *evas, Evas_Object *obj, void *event_info)
        MSG_HIGH("%s is Hidden", evas_object_name_get(obj));
 }
 
+
 static bool _ivug_ss_set_content(Slide_Layout *pSlide, Media_Item *item)
 {
        Media_Data *mdata;
@@ -242,7 +249,7 @@ static bool _ivug_ss_set_content(Slide_Layout *pSlide, Media_Item *item)
                        return false;
                }
 
-               if (elm_icon_file_set(pSlide->thumbnail, mdata->thumbnail_path, NULL) == EINA_FALSE)
+               if (elm_image_file_set(pSlide->thumbnail, mdata->thumbnail_path, NULL) == EINA_FALSE)
                {
                        MSG_ERROR("Cannot load thumbnail : %s", mdata->thumbnail_path);
                }
@@ -453,10 +460,22 @@ static Effect_Type _ivug_ss_get_trans_effect(ivug_effect_type type)
                        return EFFECT_IRIS;
                case IVUG_EFFECT_TYPE_DISSOLVE:
                        return EFFECT_DISSOLVE;
+               case IVUG_EFFECT_TYPE_RIPPLE_FADE:
+                       return EFFECT_RIPPLE_FADE;
                case IVUG_EFFECT_TYPE_DISSOLVE_FADE:
                        return EFFECT_DISSOLVE_FADE;
+               case IVUG_EFFECT_TYPE_SWIRL:
+                       return EFFECT_SWIRL;
+               case IVUG_EFFECT_TYPE_WATER_RIPPLE:
+                       return EFFECT_WATER_RIPPLE;
+               case IVUG_EFFECT_TYPE_ZOOM:
+                       return EFFECT_ZOOM;
                case IVUG_EFFECT_TYPE_SPLIT:
                        return EFFECT_SPLIT;
+               case IVUG_EFFECT_TYPE_3D_RAND:
+                       return EFFECT_3D_RAND;
+               case IVUG_EFFECT_TYPE_FACE:
+                       return EFFECT_FACE;
                default:
                        break;
        }
@@ -498,11 +517,7 @@ static Eina_Bool _ivug_ss_clicked_timer_cb(void *data)
                return ECORE_CALLBACK_CANCEL;
        }
 
-       if(pSlideShow->click_timer)
-       {
-               ecore_timer_del(pSlideShow->click_timer);
-               pSlideShow->click_timer = NULL;
-       }
+       pSlideShow->click_timer = NULL;
 
        if(pSlideShow->state == SLIDE_SHOW_RUNNING) {
                ivug_ss_stop(pSlideShow);
@@ -526,13 +541,13 @@ void _ivug_ss_on_mouse_up(void *data, Evas *e,
        }
        MSG_HIGH("_ivug_ss_on_mouse_up, pSlideShow->v is %d", pSlideShow->state);
 
-       if(pSlideShow->click_timer)
-       {
-               ecore_timer_del(pSlideShow->click_timer);
-               pSlideShow->click_timer = NULL;
+       if (pSlideShow->bMouse_event) {
+               if(pSlideShow->click_timer)
+               {
+                       ecore_timer_del(pSlideShow->click_timer);
+               }
+               pSlideShow->click_timer = ecore_timer_add(0.3f, _ivug_ss_clicked_timer_cb, data);
        }
-       pSlideShow->click_timer = ecore_timer_add(0.3f, _ivug_ss_clicked_timer_cb, data);
-
 }
 
 static Eina_Bool
@@ -623,6 +638,7 @@ static bool _ivug_ss_create_image_layout(Evas_Object *parent, Slide_Layout *sLay
        evas_object_name_set(sLayout->thumbnail, "Thumbnail");
        elm_object_part_content_set(sLayout->layout, "thumbnail", sLayout->thumbnail);
 
+
 #ifdef USE_IVUG_IMAGE
 #else
        elm_photocam_zoom_mode_set(sLayout->photocam, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
@@ -651,17 +667,38 @@ SlideShow *ivug_ss_create(Evas_Object *parent)
        if (pSlideShow == NULL) {
                return NULL;
        }
+
        pSlideShow->state = SLIDE_SHOW_STOPPED;
+       pSlideShow->bMouse_event = false;
+       ivug_effect_type ivug_effect = IVUG_EFFECT_TYPE_SLIDE;
+       ivug_config_get_slideshow_setting(&(pSlideShow->ss_mode),
+                       &(pSlideShow->ss_interval_time), &ivug_effect);
+       if(ivug_effect == IVUG_EFFECT_TYPE_UNKNOWN) {
+               free(pSlideShow);               // TODO Memory leak.
+               pSlideShow = NULL;
+               return NULL;
+       }
+       pSlideShow->bMusicState = ivug_config_get_slideshow_music_state();
+       if (pSlideShow->bMusicState) {
+               pSlideShow->music_path = ivug_config_get_slideshow_music_path();
+       }
+
+       pSlideShow->effect_type = _ivug_ss_get_trans_effect(ivug_effect);
+
+#ifdef TARGET
+       pSlideShow->bDali_slideshow = true;
+#else
+       pSlideShow->bDali_slideshow = false;
+#endif
+       if(pSlideShow->bDali_slideshow) {
+               //ivug_ss_create_player_handle(pSlideShow);
+               return pSlideShow;
+       }
 
        pSlideShow->obj = _ivug_ss_create_layout(parent, IVUG_SS_LY_EDJ_PATH, "view.slideshow");
        MSG_ASSERT(pSlideShow->obj != NULL);
-
-       evas_object_name_set(pSlideShow->obj, "slideshow");
-       pSlideShow->obj = _ivug_ss_create_layout(parent, IVUG_SS_LY_EDJ_PATH,
-                       "view.slideshow");
        evas_object_name_set(pSlideShow->obj, "slideshow");
 
-
        /* Create Layout for the current item */
        if ( _ivug_ss_create_image_layout(pSlideShow->obj, &pSlideShow->sLayout[0]) == false)
        {
@@ -719,19 +756,8 @@ bool ivug_ss_start(SlideShow *pSlideShow , Media_Item *current, Media_List *list
 {
        MSG_ASSERT(pSlideShow != NULL);
 
-       ivug_effect_type ivug_effect = IVUG_EFFECT_TYPE_SLIDE;
-
-       ivug_config_get_slideshow_setting(&(pSlideShow->ss_mode), &(pSlideShow->ss_interval_time), &ivug_effect);
-
-       ivug_config_get_slideshow_setting(&(pSlideShow->ss_mode),
-                       &(pSlideShow->ss_interval_time), &ivug_effect);
-       MSG_HIGH("Start slide show. Interval=%f Effect=%d ",
-                       pSlideShow->ss_interval_time, ivug_effect);
-
        ivug_ss_get_screen_size(&pSlideShow->screen_w, &pSlideShow->screen_h);
 
-       MSG_HIGH("Start slide show. Interval=%f Effect=%d Screen(%d,%d)", pSlideShow->ss_interval_time, ivug_effect, pSlideShow->screen_w, pSlideShow->screen_h);
-
        if(pSlideShow->ss_interval_time < 0)
        {
                MSG_ERROR("slide show interval time is invalid !!!");
@@ -750,13 +776,33 @@ bool ivug_ss_start(SlideShow *pSlideShow , Media_Item *current, Media_List *list
                return false;
        }
 
+
+       if(pSlideShow->bMusicState)
+       {
+               MSG_HIGH("music:%s", pSlideShow->music_path);
+                if (pSlideShow->music_path) {
+                        ivug_ss_set_music(pSlideShow, pSlideShow->music_path);
+                }
+       }
+
        pSlideShow->sCurrent = 0;
        pSlideShow->bSS_StopFlag = EINA_FALSE;
        pSlideShow->ss_Header = current;
-       pSlideShow->effect_type = _ivug_ss_get_trans_effect(ivug_effect);
        pSlideShow->media_list = list;
+       pSlideShow->cur_item = current;
 
+       if(pSlideShow->bDali_slideshow) {
+               pSlideShow->state = SLIDE_SHOW_RUNNING;
+               pSlideShow->evas_plugin_state = EVASPLUGIN_RESUMED;
+               if (pSlideShow->vmpHandle)
+               {
+                       ivug_ss_play_player(pSlideShow);
+               }
+               ivug_dali_create_xWin(pSlideShow);
+               return true;
+       }
        MSG_ASSERT(pSlideShow->obj != NULL);
+       pSlideShow->bMouse_event = true;
        evas_object_move(pSlideShow->obj, 0,0);
        evas_object_resize(pSlideShow->obj, pSlideShow->screen_w, pSlideShow->screen_h);
 
@@ -802,8 +848,17 @@ bool ivug_ss_start(SlideShow *pSlideShow , Media_Item *current, Media_List *list
 #endif
 //     EFL::dump_obj(pSlideShow->obj, 0);
 
+       if(pSlideShow->ss_timer)
+       {
+               ecore_timer_del(pSlideShow->ss_timer);
+       }
        pSlideShow->ss_timer = ecore_timer_add(pSlideShow->ss_interval_time, _ivug_ss_on_slide_interval, pSlideShow);
 
+       if(pSlideShow->vmpHandle)
+       {
+               ivug_ss_play_player(pSlideShow);
+       }
+
        MSG_HIGH("Slide show started!");
 
        return true;
@@ -838,6 +893,9 @@ bool ivug_ss_stop(SlideShow *pSlideShow)
                evas_object_del(pSlideShow->event);
                pSlideShow->event = NULL;
        }
+       if(pSlideShow->vmpHandle) {
+               ivug_ss_stop_player(pSlideShow);
+       }
        if(pSlideShow->effect_engine == NULL)
        {
                MSG_HIGH("Slide effect_engine = NULL");
@@ -862,6 +920,11 @@ bool ivug_ss_resume(SlideShow *pSlideShow)
                ecore_timer_thaw(pSlideShow->ss_timer);
        }
 
+       if(pSlideShow->vmpHandle)
+       {
+               ivug_ss_play_player(pSlideShow);
+       }
+
        pSlideShow->state = SLIDE_SHOW_RUNNING;
        //MSG_HIGH("ivug_resume_slideshow");
 
@@ -879,6 +942,11 @@ bool ivug_ss_pause(SlideShow *pSlideShow)
                ecore_timer_freeze(pSlideShow->ss_timer);
        }
 
+       if(pSlideShow->vmpHandle)
+       {
+               ivug_ss_pause_player(pSlideShow);
+       }
+
        pSlideShow->state = SLIDE_SHOW_PAUSE;
 
        return true;
@@ -888,6 +956,11 @@ Media_Item * ivug_ss_item_get(SlideShow *pSlideShow)
 {
        MSG_ASSERT(pSlideShow != NULL);
 
+       if ( pSlideShow->bDali_slideshow == true)
+       {
+               return pSlideShow->cur_item;;
+       }
+
        return pSlideShow->sLayout[(pSlideShow->sCurrent) % 2].mitem;
 }
 
@@ -900,10 +973,26 @@ void ivug_ss_delete(SlideShow *pSlideShow)
                MSG_ERROR("Already deleted!!");
                return;
        }
+       if (!pSlideShow->bDali_slideshow) {
+               evas_object_event_callback_del(pSlideShow->event, EVAS_CALLBACK_MOUSE_DOWN, _ivug_ss_on_mouse_down);
+               evas_object_event_callback_del(pSlideShow->event, EVAS_CALLBACK_MOUSE_MOVE, _ivug_ss_on_mouse_move);
+               evas_object_event_callback_del(pSlideShow->event, EVAS_CALLBACK_MOUSE_UP, _ivug_ss_on_mouse_up);
+       }
+       else
+       {
+               ivug_dali_destroy_dali_data(pSlideShow);
+       }
 
-       evas_object_event_callback_del(pSlideShow->event, EVAS_CALLBACK_MOUSE_DOWN, _ivug_ss_on_mouse_down);
-       evas_object_event_callback_del(pSlideShow->event, EVAS_CALLBACK_MOUSE_MOVE, _ivug_ss_on_mouse_move);
-       evas_object_event_callback_del(pSlideShow->event, EVAS_CALLBACK_MOUSE_UP, _ivug_ss_on_mouse_up);
+       if (pSlideShow->vmpHandle) {
+               ivug_ss_destory_player_handle(pSlideShow);
+               pSlideShow->vmpHandle = NULL;
+       }
+
+       if(pSlideShow->music_path)
+       {
+               free(pSlideShow->music_path);
+               pSlideShow->music_path = NULL;
+       }
 
        if(pSlideShow->effect_engine)
                ivug_effect_finalize(pSlideShow->effect_engine);
@@ -917,7 +1006,6 @@ void ivug_ss_delete(SlideShow *pSlideShow)
                pSlideShow->click_timer = NULL;
        }
 
-
        for ( int i = 0 ; i < 2; i++)
        {
                if(pSlideShow->sLayout[i].photocam) {
@@ -942,7 +1030,6 @@ void ivug_ss_delete(SlideShow *pSlideShow)
                        evas_object_del(pSlideShow->sLayout[i].layout);
                        pSlideShow->sLayout[i].layout = NULL;
                }
-
        }
 
        if ( pSlideShow->event )
@@ -967,8 +1054,17 @@ void ivug_ss_delete(SlideShow *pSlideShow)
 
 void ivug_ss_resize(SlideShow *pSlideShow)
 {
-       /* resize slide show layout and move them to right pos after rotation */
-       if(pSlideShow && pSlideShow->obj && pSlideShow->event) {
+       IVUG_FUNC_ENTER();
+       /*This interface only used for 2d slideshow,
+         *So disable it when current is dali-slideshow.
+         *resize slide show layout and move them to right pos after rotation
+         */
+       if (!pSlideShow) {
+               return;
+       }
+       if (pSlideShow->bDali_slideshow) {
+               ivug_imageviewer_init_xWin(pSlideShow, EVASPLUGIN_RESIZED);
+       } else if((pSlideShow->obj) && (pSlideShow->event)) {
                ivug_ss_get_screen_size(&pSlideShow->screen_w, &pSlideShow->screen_h);
                evas_object_resize(pSlideShow->obj, pSlideShow->screen_w, pSlideShow->screen_h);
                Evas_Coord ox, oy, ow, oh;
@@ -990,6 +1086,7 @@ void ivug_ss_resize(SlideShow *pSlideShow)
                }
                //MSG_HIGH("_ivug_ss_resize_obj, Moved (%d,%d,%d,%d)", ox, oy, ow, oh);
        }
+       IVUG_FUNC_LEAVE();
 }
 
 
@@ -997,6 +1094,47 @@ void ivug_ss_resize(SlideShow *pSlideShow)
 Evas_Object *ivug_ss_object_get(SlideShow *pSlideShow)
 {
        MSG_ASSERT(pSlideShow != NULL);
-       return pSlideShow->obj;
+
+       if(pSlideShow->bDali_slideshow) {
+               Evas_Object * main_win = (Evas_Object *)ug_get_window();
+               return main_win;
+       } else {
+               return pSlideShow->obj;
+       }
+}
+
+bool ivug_ss_set_music(SlideShow *pSlideShow, const char *path)
+{
+       MSG_ASSERT(pSlideShow != NULL);
+       MSG_ASSERT(path != NULL);
+       bool result = true;
+       if (!pSlideShow->vmpHandle) {
+               result = ivug_ss_create_player_handle(pSlideShow);
+               if (!result) {
+                       return false;
+               }
+       }
+       result = ivug_ss_init_player(path, pSlideShow, false);
+       if (!result) {
+               return false;
+       }
+       return true;
+}
+
+bool ivug_ss_is_dali(SlideShow *pSlideShow)
+{
+       MSG_ASSERT(pSlideShow != NULL);
+
+       return pSlideShow->bDali_slideshow;
+
 }
 
+void
+ivug_ss_set_stop(SlideShow *pSlideShow)
+{
+       MSG_ASSERT(pSlideShow != NULL);
+
+       pSlideShow->state = SLIDE_SHOW_STOPPED;
+}
+
+
diff --git a/slideshow/src/dali_effect/include/ivug-app-navigation.h b/slideshow/src/dali_effect/include/ivug-app-navigation.h
new file mode 100644 (file)
index 0000000..fe47bbe
--- /dev/null
@@ -0,0 +1,103 @@
+#ifndef __IVUG_APPNAVIGATION_H__
+#define __IVUG_APPNAVIGATION_H__
+
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+// EXTERNAL INCLUDES
+#include <boost/shared_ptr.hpp>
+#include <map>
+#include <stack>
+#include <dali/dali.h>
+
+// INTERNAL INCLUDES
+#include "ivug-includes.h"
+//#include "toolbar-3d.h"
+#include "ivug-view-stack-info.h"
+#include "ivug-medialist.h"
+#include "ivug-slideshow.h"
+
+using namespace Dali;
+
+namespace Imageview3D
+{
+class ImageView;
+
+/**
+* Views
+*/
+enum ViewId
+{
+       VIEW_INVALID = -1,
+       SLIDESHOW_VIEW
+};
+
+class AppNavigation
+{
+public:
+       typedef boost::shared_ptr<ImageView> ViewPtr;
+       typedef std::map<int, ViewPtr> ViewContainer;
+       typedef ViewContainer::iterator ViewIter;
+       typedef ViewContainer::const_iterator ConstViewIter;
+       typedef boost::shared_ptr<ViewStackInfo> ViewStackInfoPtr;
+       typedef std::vector<ViewStackInfoPtr>   ViewStacks;
+
+       static const unsigned int NAVIGATION_TIME_MS;
+       static const float NAVIGATION_TIME_S;
+
+       AppNavigation( Adaptor &application );
+       virtual ~AppNavigation();
+
+       void CreateViews(SlideShow *ss_handle);
+       void Rotate(Imageview3D::Orientation orientation);
+
+       /// Called directly by views with an ID of where they should go to
+       void NavigateForward(Imageview3D::ViewId);
+
+       /// this method is imageview called by a back button
+       void NavigateBack();
+
+       void ShowStack(size_t stackIdx);
+       void HideStack(size_t stackIdx);
+       ImageView *GetViewById(int viewId);
+       void StartImageView(ImageView* view);
+       void InitializeViews(SlideShow *ss_handle);
+
+private:
+
+       // Called whenever a new view has got focus.
+       void OnFocusView(ImageView *activeView);
+       bool OnNavigateForwardEnd();
+       bool OnNavigateBackwardEnd();
+       ViewStackInfo& GetCurrentViewStackInfo() { return *mViewStacks[static_cast<size_t>(mCurrentStackId)]; }
+       ViewStackInfo& GetViewStackInfoByIndex(size_t stackIdx) { return *mViewStacks[static_cast<size_t>(stackIdx)]; }
+
+       void StackPush(size_t i, ViewId viewId);
+       //void CheckForExitButton();
+
+private:
+
+       Adaptor& mApplication;
+       ViewContainer mViews;       // owned views
+
+       bool mClearNavigationHistory;
+
+       ViewStacks mViewStacks;     // stacks of unowned views. Vector is indexed by mCurrentViewId
+       size_t mCurrentStackId;     // Current stack
+       size_t mPreviousStackId;    // Previous stack
+       Dali::Animation mTabAnimation;
+
+       Dali::Timer mNavigationEndTimer;
+       Dali::Connection mNavigationEndConnection;
+};
+
+} // namespace
+
+#endif // __GALLERY_APPNAVIGATION_H__
diff --git a/slideshow/src/dali_effect/include/ivug-constraints.h b/slideshow/src/dali_effect/include/ivug-constraints.h
new file mode 100644 (file)
index 0000000..12bfe27
--- /dev/null
@@ -0,0 +1,442 @@
+#ifndef __DALI_IVUG_CONSTRAINTS_H__
+#define __DALI_IVUG_CONSTRAINTS_H__
+
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+/**
+ * Constraint that sets the child width and depth to be same as parents
+ * and constraints the height to be constant
+ */
+struct ParentWidthConstantHeight
+{
+       /**
+       * @param height for the child
+       */
+       ParentWidthConstantHeight( float height )
+       : mHeight( height )
+       {
+       }
+
+       /**
+       * function operator to apply the constant height
+       */
+       Dali::Vector3 operator()(const Dali::Vector3&    current,
+                          const Dali::PropertyInput&    parentSize)
+       {
+               //return Dali::Vector3( parentSize.GetFloat().width, mHeight, parentSize.GetFloat().depth );
+               return Dali::Vector3( parentSize.GetVector3().width, mHeight, parentSize.GetVector3().depth );
+       }
+
+       float mHeight;
+};
+
+/**
+ * Constraint that sets the child position relative to parents size
+ */
+struct PercentageOfParentWidth
+{
+       PercentageOfParentWidth(float percentage)
+       : mScaleFactor( percentage )
+       {
+       }
+
+       Dali::Vector3 operator()(const Dali::Vector3&    current,
+                          const Dali::PropertyInput&    parentSize)
+       {
+               return Dali::Vector3( parentSize.GetVector3().width * mScaleFactor, current.y, current.z );
+       }
+
+       float mScaleFactor;
+};
+
+struct ParentSizeEightyPercentSquare
+{
+       ParentSizeEightyPercentSquare()
+       {
+       }
+
+       /**
+       * function operator to apply the parent size
+       */
+       Dali::Vector3 operator()(const Dali::Vector3&    current,
+                          const Dali::Vector3&    parentOrigin,
+                          const Dali::Vector3&    anchorPoint,
+                          const Dali::Vector3&    parentSize,
+                          const Dali::Vector3&    parentPosition,
+                          const Dali::Quaternion& parentRotation,
+                          const Dali::Vector3&    parentScale)
+       {
+               float minSize = std::min(parentSize.width, parentSize.height) * 0.8f;
+               return Dali::Vector3(minSize, minSize, parentSize.depth );
+       }
+};
+
+
+/**
+ * Constraint that removes horizontal/vertical/depth margins from parent size.
+ */
+struct ParentSizeWithFixedMargin
+{
+       ParentSizeWithFixedMargin(Dali::Vector3 margin)
+       {
+               mMargin = margin*2;
+       }
+       Dali::Vector3 operator()(const Dali::Vector3&    current,
+                          const Dali::Vector3&    parentOrigin,
+                          const Dali::Vector3&    anchorPoint,
+                          const Dali::Vector3&    parentSize,
+                          const Dali::Vector3&    parentPosition,
+                          const Dali::Quaternion& parentRotation,
+                          const Dali::Vector3&    parentScale)
+       {
+               return parentSize - mMargin;
+       }
+       Dali::Vector3 mMargin;
+};
+
+/**
+ * Constraint that fills to parent width, keeping own height
+ */
+struct ParentWidthChildHeight
+{
+       ParentWidthChildHeight()
+       {
+       }
+
+       Dali::Vector3 operator()(const Dali::Vector3&    current,
+                          const Dali::Vector3&    parentOrigin,
+                          const Dali::Vector3&    anchorPoint,
+                          const Dali::Vector3&    parentSize,
+                          const Dali::Vector3&    parentPosition,
+                          const Dali::Quaternion& parentRotation,
+                          const Dali::Vector3&    parentScale)
+       {
+               return Dali::Vector3(parentSize.width, current.height, parentSize.depth);
+       }
+};
+
+/**
+ * Constraint that sets the child position relative to parents height
+ */
+struct RelativeToHeight
+{
+       /**
+       * Constraint that is relative (%) to parent height
+       * @param heightFactor between 0 and 1
+       */
+       RelativeToHeight( float heightFactor ) : mHeightFactor(heightFactor)
+       {
+       }
+
+       Dali::Vector3 operator()(const Dali::Vector3&    current,
+                          const Dali::Vector3&    parentOrigin,
+                          const Dali::Vector3&    anchorPoint,
+                          const Dali::Vector3&    parentSize,
+                          const Dali::Vector3&    parentPosition,
+                          const Dali::Quaternion& parentRotation,
+                          const Dali::Vector3&    parentScale)
+       {
+               return Dali::Vector3( 0.0f, parentSize.height * mHeightFactor, 0.0f);
+       }
+       float mHeightFactor;
+};
+
+struct RelativeToHeightFixedZ
+{
+       /**
+       * Constraint that is relative (%) to parent height
+       * @param heightFactor between 0 and 1
+       * @param z the Z value
+       */
+       RelativeToHeightFixedZ( float heightFactor, float z ) : mHeightFactor(heightFactor), mZ(z)
+       {
+       }
+
+       Dali::Vector3 operator()(const Dali::Vector3&    current,
+                          const Dali::Vector3&    parentOrigin,
+                          const Dali::Vector3&    anchorPoint,
+                          const Dali::Vector3&    parentSize,
+                          const Dali::Vector3&    parentPosition,
+                          const Dali::Quaternion& parentRotation,
+                          const Dali::Vector3&    parentScale)
+       {
+               return Dali::Vector3( 0.0f, parentSize.height * mHeightFactor, mZ);
+       }
+       float mHeightFactor;
+       float mZ;
+};
+
+/**
+ * Constraint that sets the child position relative to parents height
+ */
+struct ParentWidthFixedHeight
+{
+       /**
+       * Constraint that is relative (%) to parent height
+       * @param heightFactor between 0 and 1
+       */
+       ParentWidthFixedHeight( float height ) : mHeight(height)
+       {
+       }
+
+       Dali::Vector3 operator()(const Dali::Vector3&    current,
+                          const Dali::Vector3&    parentOrigin,
+                          const Dali::Vector3&    anchorPoint,
+                          const Dali::Vector3&    parentSize,
+                          const Dali::Vector3&    parentPosition,
+                          const Dali::Quaternion& parentRotation,
+                          const Dali::Vector3&    parentScale)
+       {
+               return Dali::Vector3( parentSize.width, mHeight, parentSize.depth);
+       }
+       float mHeight;
+};
+
+
+/**
+ * Constraint that sets the model actor positions appropriately for their index vs current index
+ */
+struct ParentPositionOutsideOffsetY
+{
+       /**
+       * Constraint that is relative (%) to parent height
+       * @param heightFactor between 0 and 1
+       */
+       ParentPositionOutsideOffsetY(size_t idx, size_t curIdx, float z, bool offsetY)
+       : mIdx(idx), mCurIdx(curIdx), mZ(z), mOffsetY(offsetY)
+       {
+       }
+
+       Dali::Vector3 operator()(const Dali::Vector3&    current,
+                          const Dali::Vector3&    parentOrigin,
+                          const Dali::Vector3&    anchorPoint,
+                          const Dali::Vector3&    parentSize,
+                          const Dali::Vector3&    parentPosition,
+                          const Dali::Quaternion& parentRotation,
+                          const Dali::Vector3&    parentScale)
+       {
+               Dali::Vector3 position(0.0f, 0.0f, mZ);
+
+               if(mIdx < mCurIdx)
+                       position.x = -3*parentSize.width/4;
+               else if(mCurIdx < mIdx)
+                       position.x =  3*parentSize.width/4;
+
+               if(mOffsetY)
+                       position.y = parentSize.height; // Note that parent is the popup background, not the full screen dark background
+
+               return position;
+       }
+       size_t mIdx;
+       size_t mCurIdx;
+       float  mZ;
+       bool   mOffsetY;
+};
+
+
+struct ParentPositionFakeOrigin
+{
+       /**
+       * Constraint that takes an origin, and constrains to that
+       * @param heightFactor between 0 and 1
+       */
+       ParentPositionFakeOrigin(Dali::Vector3 origin)
+       : mOrigin (origin)
+       {
+       }
+
+       Dali::Vector3 operator()(const Dali::Vector3&    current,
+                          const Dali::Vector3&    parentOrigin,
+                          const Dali::Vector3&    anchorPoint,
+                          const Dali::Vector3&    parentSize,
+                          const Dali::Vector3&    parentPosition,
+                          const Dali::Quaternion& parentRotation,
+                          const Dali::Vector3&    parentScale)
+       {
+               return Dali::Vector3((mOrigin.x - parentOrigin.x) * parentSize.width,
+                                (mOrigin.y - parentOrigin.y) * parentSize.height,
+                                (mOrigin.z - parentOrigin.z) * parentSize.depth);
+
+       }
+       Dali::Vector3 mOrigin;
+};
+
+
+struct ParentSizeRelativeXY
+{
+       /**
+       * @param scale vector for width, height and depth
+       */
+       ParentSizeRelativeXY( float xScale, float yScale, float zPosition )
+       : mXScale( xScale ), mYScale( yScale ),  mZPosition(zPosition)
+       {
+       }
+
+       /**
+       * function operator to apply the scaled parent size
+       */
+       Dali::Vector3 operator()(const Dali::Vector3&    current,
+                          const Dali::Vector3&    parentOrigin,
+                          const Dali::Vector3&    anchorPoint,
+                          const Dali::Vector3&    parentSize,
+                          const Dali::Vector3&    parentPosition,
+                          const Dali::Quaternion& parentRotation,
+                          const Dali::Vector3&    parentScale)
+       {
+               return Dali::Vector3(parentSize.x * mXScale, parentSize.y * mYScale, mZPosition);
+       }
+
+       float mXScale;
+       float mYScale;
+       float mZPosition;
+};
+
+
+struct ParentSizeRotatedRelative
+{
+       /**
+       * @param scale vector for width, height and depth
+       */
+       ParentSizeRotatedRelative( Dali::Vector3 scales)
+       : mScales(scales)
+       {
+       }
+
+       /**
+       * function operator to apply the scaled parent size
+       */
+       Dali::Vector3 operator()(const Dali::Vector3&    current,
+                          const Dali::Vector3&    parentOrigin,
+                          const Dali::Vector3&    anchorPoint,
+                          const Dali::Vector3&    parentSize,
+                          const Dali::Vector3&    parentPosition,
+                          const Dali::Quaternion& parentRotation,
+                          const Dali::Vector3&    parentScale)
+       {
+               return Dali::Vector3(parentSize.height * mScales.y, parentSize.width * mScales.x, parentSize.z * mScales.z);
+       }
+
+       Dali::Vector3 mScales;
+};
+
+
+
+
+struct LocalPositionOffsets
+{
+       LocalPositionOffsets(Dali::Vector3 offsets) : mOffsets(offsets)
+       {
+       }
+
+       Dali::Vector3 operator()(const Dali::Vector3&    size,
+                          const Dali::Vector3&    position,
+                          const Dali::Quaternion& rotation,
+                          const Dali::Vector3&    scaled,
+                          const Dali::Vector4&    color)
+       {
+               return mOffsets;
+       }
+       Dali::Vector3 mOffsets;
+};
+
+/**
+ * Constraint that sets the local orientation
+ */
+struct LocalOrientation
+{
+       LocalOrientation(const Dali::Quaternion& rotateTo) : mRotateTo(rotateTo)
+       {
+       }
+       Dali::Quaternion  operator()(const Dali::Vector3&    size,
+                              const Dali::Vector3&    position,
+                              const Dali::Quaternion& rotation,
+                              const Dali::Vector3&    scale,
+                              const Dali::Vector4&    color)
+       {
+               return mRotateTo;
+       }
+       Dali::Quaternion mRotateTo;
+};
+
+/**
+ * Constraint that sets the local visibility
+ * (Doesn't seem to work as expected with SetApplyTime)
+ */
+struct LocalVisibility
+{
+       LocalVisibility(bool visible) : mVisible(visible)
+       {
+       }
+       bool operator()(const Dali::Vector3&    size,
+                 const Dali::Vector3&    position,
+                 const Dali::Quaternion& rotation,
+                 const Dali::Vector3&    scale,
+                 const Dali::Vector4&    color)
+       {
+               return mVisible;
+       }
+       bool mVisible;
+};
+
+
+/**
+ * Constraint to change just the opacity of the actor's color
+ */
+struct LocalOpacity
+{
+       LocalOpacity(float opacity) : mOpacity(opacity)
+       {
+       }
+
+       Dali::Vector4 operator()(const Dali::Vector3&    size,
+                          const Dali::Vector3&    position,
+                          const Dali::Quaternion& rotation,
+                          const Dali::Vector3&    scale,
+                          const Dali::Vector4&    color)
+       {
+               Dali::Vector4 newColor(color);
+               newColor.a = mOpacity;
+               return newColor;
+       }
+       float mOpacity;
+};
+
+
+struct TumbleFunc
+{
+       static TumbleFunc GetRandom()
+       {
+               return TumbleFunc(Dali::Random::Range(0.5f, 1.0f), Dali::Random::Range(0.0f, 0.5f), Dali::Random::Range(0.0f, 0.6f));
+       }
+
+       TumbleFunc(float x, float y, float z)
+       : tumbleAxis(Dali::Vector3(x,y,z))
+       {
+               tumbleAxis.Normalize();
+       }
+
+       Dali::Quaternion operator()(const Dali::Quaternion& current, const Dali::Quaternion& target, float progress)
+       {
+               if (progress>0.001f && progress<1.0f)
+               {
+                       Dali::Quaternion tumbleRotation(Dali::Quaternion(progress * Dali::Math::PI * 2.0f, tumbleAxis));
+
+                       return tumbleRotation * current;
+               }
+
+               return current;
+       }
+
+       Dali::Vector3 tumbleAxis;
+};
+
+
+#endif //__DALI_GALLERY_CONSTRAINTS_H__
diff --git a/slideshow/src/dali_effect/include/ivug-dali-imageview.h b/slideshow/src/dali_effect/include/ivug-dali-imageview.h
new file mode 100644 (file)
index 0000000..2709161
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+#ifndef __IVUG_DALI_IMAGEVIEWER_H__
+#define __IVUG_DALI_IMAGEVIEWER_H__
+
+/* EXTERNAL INCLUDES */
+#include <dali/dali.h>
+
+/* INTERNAL INCLUDES */
+#include "ivug-app-navigation.h"
+#include "ivug-includes.h"
+#include "ivug-effect.h"
+
+using namespace Dali;
+using namespace Imageview3D;
+using namespace std;
+
+
+namespace Imageview3D
+{
+/* Available layers*/
+enum
+{
+       BACKGROUND_LAYER,
+       MAIN_VIEW_LAYER,
+       NAVIGATION_BAR_LAYER,
+       LAYER_COUNT
+};
+
+//class ImageView;
+
+/**
+ *
+ */
+class Imageviewer
+{
+public:
+
+       /**
+       * Constructor
+       * @param application reference
+       */
+       Imageviewer(Adaptor& application, SlideShow *ss_handle);
+
+       /**
+       * Destructor
+       */
+       virtual ~Imageviewer();
+
+       /**
+       * Adds an actor to the Stage then a particular layer.
+       * Allows toolbars to be put in a layer above the main layer.
+       * @pre CreateLayers has been called so layers exist.
+       * @param layer, enum related to the layer actor needs to be added to
+       * @param actor, the actor to be added to the given layer.
+       */
+       void AddToLayer(int layer, Dali::Actor actor);
+
+       /**
+       * Remove the actor from the layer
+       * @param layer, enum related to the layer
+       * @param actor to be removed from the given layer.
+       */
+       void RemoveFromLayer(int layer, Dali::Actor actor);
+       void  RemoveFromLayerMain();
+
+       AppNavigation& GetAppNavigation ();
+       Dali::Layer GetLayer(int layer);
+       /**
+       *Can't be used now.
+       * Sets the visibility of screen furniture (title, toolbar, background)
+       * @param enable the screen furniture
+       */
+       void SetScreenFurnitureVisibility(bool enable);
+
+       float GetNaviBarHeight();
+
+       void SetTitleBarText(std::string);
+
+       void SetSize(float width, float height);
+       void SetPosition(float x, float y);
+       void ResumeViewAndTransitionTimer();
+       void OrientationChanged(const int orientation);
+       void SignalResizeSend(void);
+
+private: // Implementation
+
+       void CreateViews();
+       void Resize(Adaptor& app);
+       void CreateLayers();
+       void CreateBackground();
+       void CreateNavigationBar();
+
+private:
+
+       AppNavigation           mAppNavigation;
+       Adaptor&                mApplication;
+       int                             mOrientation;
+       Imageview3D::Orientation        mCurOrientation;
+       Dali::ImageActor                mBackground;  /* This might be a 3D model one day! */
+
+       Dali::Actor                     mNavigationBar;  /* Contains a background with 2 buttons. */
+       Dali::ImageActor                mNavigationBarBg;
+       Dali::TextActor               mTitleText;
+
+       float                   mNavigationBarHeight;
+
+       /* static layers can be added to by view classes */
+       Dali::Layer             mBackgroundLayer;
+       Dali::Layer             mNavigationBarLayer;
+       Dali::Layer             mMainLayer;
+
+       /* Used to show/hide furniture */
+       Dali::Animation mFadeAnimation;
+
+       /* Size, Position */
+       float mX;
+       float mY;
+       float mWidth;
+       float mHeight;
+       SlideShow *mSSHandle;
+};
+
+
+} /* namespace */
+
+#endif /* __GL_DALI_GALLERY_H__ */
+
+
diff --git a/slideshow/src/dali_effect/include/ivug-dali-slideshow-view.h b/slideshow/src/dali_effect/include/ivug-dali-slideshow-view.h
new file mode 100644 (file)
index 0000000..271a5fd
--- /dev/null
@@ -0,0 +1,134 @@
+#ifndef __DALI_IVUG_SLIDESHOW_VIEW_H__
+#define __DALI_IVUG_SLIDESHOW_VIEW_H__
+
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+// EXTERNAL INCLUDES
+#include <list>
+#include <dali/dali.h>
+#include <boost/shared_ptr.hpp>
+
+// INTERNAL INCLUDES
+#include "ivug-image-view.h"
+
+namespace Imageview3D
+{
+
+// FORWARD DECLARES
+class SlideshowControl;
+class SlideshowEffect;
+
+/**
+ * View to show slide show
+ */
+class SlideshowView : public ImageView
+{
+public:
+       typedef boost::shared_ptr<SlideshowEffect> EffectPtr;
+       /**
+       * Static constructor
+       * @return the new instance of the Slideshow View
+       */
+       static ImageView* New();
+
+       /**
+               * Destructor
+       */
+       ~SlideshowView();
+
+public: // from ImageView
+       /**
+       * @copydoc ImageView::DoActivationBegin
+       */
+       virtual void DoActivationBegin(Dali::Animation slideAnimation);
+       /**
+       * @copydoc ImageView::DoActivationEnd
+       */
+       virtual void DoActivationEnd();
+       /**
+       * @copydoc ImageView::DoDeactivationBegin
+       */
+       virtual void DoDeactivationBegin(Dali::Animation slideAnimation);
+       /**
+       * @copydoc ImageView::DoDeactivationEnd
+       */
+       virtual void DoDeactivationEnd();
+
+       /**
+       * @copydoc ImageView::DoEnterForwardBegin
+       */
+       virtual void DoEnterForwardBegin( float navigationDuration );
+
+       /**
+       * @copydoc ImageView::DoEnterForwardEnd
+       */
+       virtual void DoEnterForwardEnd();
+
+       /**
+       * @copydoc ImageView::DoEnterBackwardBegin
+       */
+       virtual void DoEnterBackwardBegin( float navigationDuration );
+
+       /**
+       * @copydoc ImageView::DoEnterBackwardEnd
+       */
+       virtual void DoEnterBackwardEnd();
+
+       /**
+       * @copydoc ImageView::DoLeaveForwardBegin
+       */
+       virtual void DoLeaveForwardBegin( float navigationDuration );
+
+       /**
+       * @copydoc ImageView::DoLeaveForwardEnd
+       */
+       virtual void DoLeaveForwardEnd();
+
+       /**
+       * @copydoc ImageView::DoLeaveBackwardBegin
+       */
+       virtual void DoLeaveBackwardBegin( float navigationDuration );
+
+       /**
+       * @copydoc ImageView::DoLeaveBackwardEnd
+       */
+       virtual void DoLeaveBackwardEnd();
+
+       /**
+       * @copydoc ImageView::DoSetOrientation
+       */
+       virtual void DoSetOrientation();
+
+       /**
+       * @copydoc ImageView::DoFocusView
+       */
+       virtual void DoFocusView();
+
+       void SlideShowResume(void);
+
+       void DoInitialize(void);
+
+private:
+
+       SlideshowView();
+       void SetSlideshowSize();
+       bool OnClick( Dali::Actor actor, const Dali::TouchEvent& event );
+
+       boost::shared_ptr< SlideshowControl > mSlideshowControl;
+       std::vector<EffectPtr> mEffects;
+       //std::map<int, EffectPtr> mEffects;
+       //typedef EffectContainer::iterator ViewIter;
+};
+
+} // namespace Imageview3D
+
+
+#endif // __DALI_DEMO_SLIDESHOW_VIEW_H__
diff --git a/slideshow/src/dali_effect/include/ivug-dali.h b/slideshow/src/dali_effect/include/ivug-dali.h
new file mode 100644 (file)
index 0000000..bcb0a9b
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+#ifndef __IVUG_DALI_H__
+#define __IVUG_DALI_H__
+
+#include <Elementary.h>
+#include "ivug-dali-imageview.h"
+#include "ivug-slideshow.h"
+
+using namespace Imageview3D;
+typedef enum {
+       EVASPLUGIN_INITED = 0x00,
+       EVASPLUGIN_RESIZED,
+}evasplugin_state_e;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void ivug_dali_pause(SlideShow *ss_handle);
+
+void ivug_dali_resume(SlideShow *ss_handle);
+
+void ivug_return_main_view(SlideShow *ss_handle);
+
+void ivug_dali_create_xWin(SlideShow *data);
+
+void ivug_imageviewer_init_xWin(SlideShow *data, int state);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  /* __GL_DALI_H__ */
+
diff --git a/slideshow/src/dali_effect/include/ivug-image-view.h b/slideshow/src/dali_effect/include/ivug-image-view.h
new file mode 100644 (file)
index 0000000..5999106
--- /dev/null
@@ -0,0 +1,362 @@
+#ifndef __IVUG_IMAGE_VIEW_H__
+#define __IVUG_INAGE_VIEW_H__
+
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/dali.h>
+
+// INTERNAL INCLUDES
+#include "ivug-app-navigation.h"
+#include "ivug-includes.h"
+//#include "toolbar-3d.h"
+//#include "lighting.h"
+
+namespace Imageview3D
+{
+
+/**
+ * Base class for all gallery views
+ */
+class ImageView
+{
+public:
+       static const float ROTATION_ANIMATION_DURATION;
+
+       /**
+       * Virtual destructor as this is a base class
+       */
+       virtual ~ImageView();
+
+       /**
+       * Initialize the view.
+       * @param appNavigation to navigate between views
+       */
+       void Initialize( AppNavigation* appNavigation, SlideShow *ss_handle);
+
+       /**
+       * Set the orientation of the view.
+       * Rotates the root actor to match the orientation.
+       * @param orientation Imageview3D::Orientation of the view: PORTRAIT, LANDSCAPE, PORTRAIT_INVERSE or LANDSCAPE_INVERSE
+       */
+       void SetOrientation( Imageview3D::Orientation orientation );
+
+       /**
+       * Retrieve the current orientation
+       * @return Imageview3D::Orientation, either PORTRAIT, LANDSCAPE, PORTRAIT_INVERSE or LANDSCAPE_INVERSE
+       */
+       Orientation GetOrientation() const
+       {
+               return mOrientation;
+       }
+
+       /**
+       * Query whether the view is the active view.
+       * @return True if the view is active.
+       */
+       bool IsActive()
+       {
+               return mActive;
+       }
+
+       // Lighting GetLighting()
+       //{
+       //   return mLighting;
+       // }
+
+       /**
+       * Called by the AppNavigation class when this view is becoming active by tab selection.
+       * @param[in] slideAnimation - the animation used to perform the slide transition
+       */
+       void ActivationBegin(Dali::Animation slideAnimation);
+
+       /**
+       * Called by the AppNavigation class when this view has become active by tab selection.
+       */
+       void ActivationEnd();
+
+       /**
+       * Called by the AppNavigation class when this view is becoming inactive by tab selection.
+       * @param[in] slideAnimation - the animation used to perform the slide transition
+       */
+       void DeactivationBegin(Dali::Animation slideAnimation);
+
+       /**
+       * Called by the AppNavigation class when this view has become inactive by tab selection.
+       */
+       void DeactivationEnd();
+
+
+
+       /**
+       * Called by the navigation class when this view is becoming active by moving forward to it
+       * in the navigation chain.
+       * @param navigationDuration for the view entry in seconds
+       */
+       void EnterForwardBegin( float navigationDuration );
+
+       /**
+       * Called by the navigation class when this view has become active by moving forward to it
+       * in the navigation chain.
+       */
+       void EnterForwardEnd();
+
+       /**
+       * Called by the navigation class when this view is becoming active in a backwards navigation
+       * direction. i.e. the 'back' button pressed.
+       * @param navigationDuration for the view entry in seconds
+       */
+       void EnterBackwardBegin( float navigationDuration );
+
+       /**
+       * Called by the navigation class when this view has become active in a backwards navigation
+       * direction. i.e. the 'back' button pressed.
+       */
+       void EnterBackwardEnd();
+
+       /**
+       * Called by the navigation class when this view is being deactivated by going forwards in the
+       * navigation chain.
+       * @param navigationDuration for the view exit in seconds
+       */
+       void LeaveForwardBegin( float navigationDuration );
+
+       /**
+       * Called by the navigation class when this view has been deactivated by going forwards in the
+       * navigation chain.
+       */
+       void LeaveForwardEnd();
+
+       /**
+       * Called by the navigation class when this view is being deactivated by going backwards in the
+       * navigation chain.
+       * @param navigationDuration for the view exit in seconds
+       */
+       void LeaveBackwardBegin( float navigationDuration );
+
+       /**
+       * Called by the navigation class when this view has been deactivated by going backwards in the
+       * navigation chain.
+       */
+       void LeaveBackwardEnd();
+
+       std::string GetTitleText()
+       {
+               return mTitleBarText;
+       }
+
+       /**
+       * Called by the navigation class when this view has come into focus (regardless of whether by
+       * Entering/Leaving, or shuffling across tools (stacks))
+       */
+       void FocusView();
+
+       /**
+       * Retrieve the root actor of the view.
+       * All view-specific actors should be added to a root actor, not directly on stage.
+       * See also GetRotatingActor().
+       */
+       Dali::Actor GetRootActor() const { return mRootActor; }
+
+       /**
+       * Retrieve the rotating root actor of the view.
+       * This is a direct child of mRootActor, which auto rotates when the orientation changes.
+       * See also GetRootActor().
+       */
+       Dali::Actor GetRotatingRootActor() const { return mRotatingRootActor; }
+
+       /**
+       * Convenience function to set the contents of a view to be visible/invisible
+       * @param [in] True if the view contents should be visible
+       */
+       void SetVisible(bool visible)
+       {
+               mRootActor.SetVisible(visible);
+       }
+
+       /**
+       * Sets the ViewStackInfo instance that this view uses, such that it can
+       * store stack (tool) specific state information e.g. Currently selected item.
+       *
+       * @param viewStackInfo that this view uses.
+       */
+       void SetViewStackInfo(ViewStackInfo *viewStackInfo) { mViewStackInfo = viewStackInfo; }
+
+       /**
+       * Returns the current view stack Info
+       *
+       * @return currentViewStackInfo (if exists)
+       */
+       ViewStackInfo *GetViewStackInfo(void)
+       {
+               DALI_ASSERT_ALWAYS( mViewStackInfo );
+               return mViewStackInfo;
+       }
+
+protected: // API for deriving classes
+
+       /**
+       * Navigates to the given view.
+       * This is only allowed if this view is the current view,
+       * if not this is a no-op.
+       * @param view to navigate to
+       */
+       void NavigateTo( ViewId view );
+
+       /**
+       * Navigates back to previous view
+       */
+       void NavigateBack();
+
+private:  // API for deriving classes
+
+       /**
+       * Customizable part of orientation change
+       * Deriving views can override this to do custom layout for specific orientation
+       */
+       virtual void DoSetOrientation() {};
+
+       /**
+       * Customizable part of initialization
+       * Deriving views can override this to do custom initialization
+       */
+       virtual void DoInitialize() {};
+
+       /**
+       * Called by the base class when this view is becoming active when the user presses a tab
+       * button, and this view slides on. The slide animation is passed in so that other
+       * animations can be synchronised with it.
+       * @param[in] slideAnimation - the animation used to perform the slide transition
+       */
+       virtual void DoActivationBegin(Dali::Animation slideAnimation) = 0;
+
+       /**
+       * Called by the base class when this view has become active after the user presses a tab
+       * button, and this view has finished sliding on.
+       */
+       virtual void DoActivationEnd() = 0;
+
+       /**
+       * Called by the base class when this view is becoming inactive when the user presses a tab
+       * button, and this view slides off. The slide animation is passed in so that other
+       * animations can be synchronised with it.
+       * @param[in] slideAnimation - the animation used to perform the slide transition
+       */
+       virtual void DoDeactivationBegin(Dali::Animation slideAnimation) = 0;
+
+       /**
+       * Called by the base class when this view has become inactive after the user presses a tab
+       * button, and this view has finished sliding off.
+       */
+       virtual void DoDeactivationEnd() = 0;
+
+       /**
+       * Called by the base class when this view is becoming active by moving forward to it
+       * in the navigation chain.  In this case the view may be expected to perform some sort of
+       * animation as it becomes the active view.  Shared actors etc. should not be used until
+       * DoEnterForwardEnd() has been called, since they may be animated by the leaving view.
+       * @param navigationDuration for the view entry in seconds
+       */
+       virtual void DoEnterForwardBegin( float navigationDuration ) = 0;
+
+       /**
+       * Called by the base class when this view has become active by moving forward to it
+       * in the navigation chain.  Animations may now be applied to shared actors.
+       */
+       virtual void DoEnterForwardEnd() = 0;
+
+       /**
+       * Called by the base class when this view is becoming active in a backwards navigation
+       * direction. i.e. the 'back' button pressed.  In this case the view may be expected to perform
+       * some sort of animation as it becomes the active view.  Shared actors etc. should not be used
+       * until DoEnterBackwardEnd() has been called, since they may be animated by the leaving view.
+       * @param navigationDuration for the view entry in seconds
+       */
+       virtual void DoEnterBackwardBegin( float navigationDuration ) = 0;
+
+       /**
+       * Called by the base class when this view has become active by moving backward to it
+       * in the navigation chain.  Animations may now be applied to shared actors.
+       */
+       virtual void DoEnterBackwardEnd() = 0;
+
+       /**
+       * Called by the base class when this view is being deactivated by going forwards in the
+       * navigation chain. The view may be expected to perform leave animations, and may do so
+       * using shared actors.
+       * @param navigationDuration for the view exit in seconds
+       */
+       virtual void DoLeaveForwardBegin( float navigationDuration ) = 0;
+
+       /**
+       * Called by the base class when this view has been deactivated by going forwards in the
+       * navigation chain. The view may be expected to free resources while inactive.
+       */
+       virtual void DoLeaveForwardEnd() = 0;
+
+       /**
+       * Called by the base class when this view is being deactivated by going backwards in the
+       * navigation chain. The view may be expected to perform leave animations, and may do so
+       * using shared actors.
+       * @param navigationDuration for the view exit in seconds
+       */
+       virtual void DoLeaveBackwardBegin( float navigationDuration ) = 0;
+
+       /**
+       * Called by the base class when this view has been deactivated by going backwards in the
+       * navigation chain. The view may be expected to free resources while inactive.
+       */
+       virtual void DoLeaveBackwardEnd() = 0;
+
+       /**
+       * Called by the base class when this view has just been activated (regardless of whether by
+       * Entering/Leaving, or shuffling across stacks)
+       */
+       virtual void DoFocusView() = 0;
+
+protected:
+       /**
+       * Constructor
+       */
+       ImageView();
+
+       void CreateModel();
+       void CreateAlbumModel();
+
+       void CreateNewAlbumView();
+
+       Dali::Actor mRootActor;         ///< root actor for the view, auto added to stage
+       Dali::Actor mRotatingRootActor; ///< direct child of root, auto rotates when orientation changes
+       SlideShow *mSSHandle;
+
+       Imageview3D::Orientation mOrientation;
+
+       bool mActive;                   ///< True when the view has been entered i.e. after EnterForwardEnd() or EnterBackwardEnd() have been called.
+                                 ///< Only active views are allowed to initiate navigation to other views.
+
+       std::string       mTitleBarText;
+       //Lighting          mLighting;
+
+       AppNavigation* mAppNavigation;  ///< Pointer to the AppNavigation class that this ImageView is controlled by.
+       ViewStackInfo* mViewStackInfo;  ///< Pointer to the ViewStackInfo class that this ImageView resides in.
+
+private:
+
+       // not implemented
+       ImageView( const ImageView& );
+       ImageView& operator=( const ImageView& );
+
+       Dali::Animation mRotateAnimation;
+};
+
+} // namespace
+
+#endif // __DALI_GALLERY_VIEW_H__
diff --git a/slideshow/src/dali_effect/include/ivug-includes.h b/slideshow/src/dali_effect/include/ivug-includes.h
new file mode 100644 (file)
index 0000000..39212bc
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+#ifndef __IVUG_INCLUDES_H__
+#define __IVUG_INCLUDES_H__
+
+// EXTERNAL INCLUDES
+#include <dali/dali.h>
+#include <dali-toolkit/dali-toolkit.h>
+
+#define DALI_IMAGE_DIR "/usr/apps/com.samsung.ug-image-viewer-efl/res/images/"
+
+namespace Imageview3D
+{
+       /**
+       * Enumeration for view orientation
+       */
+       enum Orientation{
+               PORTRAIT,         ///< hw buttons on the bottom
+               LANDSCAPE,        ///< hw buttons on the left
+               PORTRAIT_INVERSE, ///< hw buttons on the top
+               LANDSCAPE_INVERSE ///< hw buttons on the right
+       };
+
+       /**
+               * Helper to convert between view & control orientations.
+               * @param[in] The view orientation.
+               * @return The control orientation.
+       */
+       Dali::Toolkit::ControlOrientation::Type GetControlOrientation(Orientation orientation);
+       void PrintCurrentTime();
+       // Nav bar constants
+       const float MARGIN_X = 0.0; /*margin from left and right of stage*/
+       const float MARGIN_Y = 0.0;  /*margin from top of stage*/
+       const float NAVIGATION_BAR_TO_SCREEN_HEIGHT_RATIO = 15.8; /*Used to work out height of Navi bar when resoultion changes*/
+       const float NAVIGATION_BUTTONS_TO_SCREEN_HEIGHT_RATIO = 15.8; /*As above but for buttons*/
+       const float NAVIGATION_BUTTONS_TO_SCREEN_WIDTH_RATIO = 5.77; /*As above but for buttons*/
+       const int       TRANSITIONTIME = 1200; //more than 1 second --effect show time (milliseconds)
+       const float SECONDTIME = 1000.0f;       // 1second
+       const float RIPPLEAMPLITUDE = 20.0f;            //used for ripple
+       // Detail view film-strip
+       const float FILMSTRIP_HEIGHT_TO_SCREEN_HEIGHT_RATIO = 8;
+       /* Scale animation duration for face effect */
+       const int FACE_SCALE_DURATION = 600;
+       const int FACE_DEFAULT_GAP_TIME = 200;
+       const float FACE_DEFAULT_SCALE = 2.0;
+       const int SECOND_MS = 1000;
+       const int SMALL_TRANSITIONTIME = 600;
+}
+
+#endif /* __INCLUDES_H__ */
diff --git a/slideshow/src/dali_effect/include/ivug-slideshow-control.h b/slideshow/src/dali_effect/include/ivug-slideshow-control.h
new file mode 100644 (file)
index 0000000..ab83de4
--- /dev/null
@@ -0,0 +1,181 @@
+#ifndef __DALI_IVUG_SLIDESHOW_CONTROL_H__
+#define __DALI_IVUG_SLIDESHOW_CONTROL_H__
+
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+// EXTERNAL INCLUDES
+#include <list>
+#include <string>
+#include <dali/dali.h>
+#include "ivug-includes.h"
+#include "ivug-dali-util.h"
+#include "ivug-slideshow-priv.h"
+// INTERNAL INCLUDES
+#include "ivug-medialist.h"
+//suport video playback
+#include <dali/public-api/adaptor-framework/pixmap-image.h>
+
+
+namespace Imageview3D
+{
+
+// FORWARD DECLARES
+class SlideshowEffect;
+
+/**
+ * Slide show control logic
+ */
+class SlideshowControl
+{
+public: // API
+
+       /**
+       * Constructor
+       * @param parent actor
+       * @param images to display
+       * @param effects to use
+       */
+       SlideshowControl( Dali::Actor parent,
+                   SlideShow *ss_handle,
+                   const std::vector< boost::shared_ptr< SlideshowEffect > >& effects );
+
+       /**
+       * Destructor
+       */
+       ~SlideshowControl();
+
+       /**
+       * Play the slide show
+       */
+       void Play();
+
+       /**
+       * Sets the starting image index
+       */
+       void SetStartIndex( unsigned int startIndex );
+
+       /**
+       * Gets the current image index
+       */
+       unsigned int GetCurrentIndex() const;
+
+       /**
+       * Pause the slide show. Current transition will still finish before control is paused.
+       */
+       void Pause();
+
+       /**
+       * @return true if slideshow is paused
+       */
+       bool IsPaused();
+
+       /**
+       * Resume the slide show. Slide show resumes from transition to next image.
+       */
+       void Resume();
+
+       /**
+       * Stop the slide show
+       */
+       void Stop();
+
+       /**
+       * Sets the playing area size for slideshow
+       * @param size new size for the slideshow
+       */
+       void SetSize( Dali::Size size, int Orientation);
+       void CreatePixmapImage();
+       void DestroyXPixmap();
+       void EndVideoPlay();
+
+public: // Signal handlers
+
+       bool OnClick( Dali::Actor actor, const Dali::TouchEvent& event );
+       void NewViewAndTransitionTimer(void);
+       void StopViewAndTransitionTimer(void);
+       void SetViewAndTransitionTime(int time);
+
+private: // Implementation
+
+       void LoadNextImage();
+       void ImageLoaded();
+       bool TimerTick();
+       void StartTransition();
+       bool TransitionCompleted();
+       void FitViewActorAndBorders();
+       bool FirstFaceCompleted();
+       void StartVideoPlay(const char *path);
+       void CreateXHPixmap();
+
+       // Not implemented, copy constructor and assignment operator
+       SlideshowControl( const SlideshowControl& copy );
+       SlideshowControl& operator=( const SlideshowControl& copy );
+
+private: // Data
+
+       Dali::Actor mParent;
+       SlideShow *mSSHandle;
+       const std::vector< boost::shared_ptr< SlideshowEffect > >& mEffects;
+
+       Dali::Actor mSlideshowRoot;
+       Dali::Layer mLayers[ 2 ];
+       unsigned int mCurrentLayer;
+       Dali::ImageActor mInView;
+       Dali::ImageActor mFadingIn;
+       Dali::ImageActor mBorder1;  //Top border in the PORTRAIT orientation. Left border in LANDSCAPE orientation.
+       Dali::ImageActor mBorder2;  //Bottom border in the PORTRAIT orientation. Right border in LANDSCAPE orientation.
+       Dali::Image mNextImage;
+       Dali::Connection mConnection;
+       Dali::BitmapImage mSolid;
+
+       Dali::Size mSlideshowSize;
+       int mCurrentIndex;
+       int mCurrentEffect;
+
+       bool mPlaying;
+       bool mImageReady;
+       bool mTimerReady;
+       bool mPaused;
+       bool mFirstImage;
+
+       Dali::Timer mViewTimer;
+       Dali::Timer mTransitionTimer;
+       Dali::Timer mFirstFaceTimer;
+
+       Dali::Animation mFadeAnimation;
+       Imageview3D::Orientation mOrientation;
+       int mViewTime;
+       int mTransitionTime;
+       int mVideoTime;
+       bool mShowRepeat;
+       bool mbFinishPlay;
+       int mFaceCount;
+       int mCurrentFace;
+       bool mbFaceEffect;
+       Media_Item *mCurItem;
+       bool mCurIsVideo;
+       bool mPreIsVideo;
+
+       //for video play
+       Dali::ImageActor mImageActor;
+       Dali::Image mVideoImage;
+       Dali::Animation mAnimVideo;
+       Ecore_X_Pixmap mXPixmap;
+       Ecore_Event_Handler *mEventHandler;
+       Ecore_X_Damage  mDamage;
+       Dali::Layer mVideoLayer;
+       float mVideoWidth;
+       float mVideoHeight;
+};
+
+} // namespace Imageview3D
+
+#endif // __DALI_DEMO_SLIDESHOW_CONTROL_H__
diff --git a/slideshow/src/dali_effect/include/ivug-slideshow-effect.h b/slideshow/src/dali_effect/include/ivug-slideshow-effect.h
new file mode 100644 (file)
index 0000000..e968480
--- /dev/null
@@ -0,0 +1,157 @@
+#ifndef __DALI_IVUG_SLIDESHOW_EFFECT_H__
+#define __DALI_IVUG_SLIDESHOW_EFFECT_H__
+
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/dali.h>
+#include "ivug-slideshow.h"
+
+// INTERNAL INCLUDES
+#define        RIPPLE_FADE_EFFECT_NAME                 "ripple-fade"
+#define DISSOLVE_EFFECT_NAME                   "dissolve"
+#define        ZOOM_EFFECT_NAME                                "zoom"
+#define FACE_EFFECT_NAME                               "face-slide-show"
+#define        SPLIT_EFFECT_NAME                               "split"
+#define SWIRL_EFFECT_NAME                              "swirl"
+#define        WATER_RIPPLE_EFFECT_NAME                "water-ripple"
+#define SLIDE_EFFECT_NAME                              "slide"
+#define        IRIS_EFFECT_NAME                                "iris"
+#define SQUARE_DISSOLVE_EFFECT_NAME            "square-dissolve"
+
+namespace Imageview3D
+{
+
+/**
+* Slide show effect interface
+*/
+class SlideshowEffect
+{
+public: // API
+
+       /**
+       * Virtual destructor as this is a base
+       * Derived classes can be deleted using this interface
+       */
+       virtual ~SlideshowEffect() {}
+
+       /**
+       * Gets the name of the effect
+       * @return name of the effect
+       */
+       virtual std::string Name() = 0;
+
+       /**
+       * Initializes the effect
+       * @param size of the slideshow area
+       */
+       virtual void Initialize( Dali::Vector3 size ) = 0;
+
+       /**
+       * Start the viewing of the image
+       * @param imageactor that is in view
+       * @param duration of the viewing in milliseconds
+       */
+       virtual void StartView( Dali::ImageActor imageactor, unsigned int duration ) = 0;
+
+       /**
+       * Start the transitioning from oldImage to newImage
+       * @param oldActor that has been viewed. Note! this may also be NULL if its the first transition
+       * @param newActor that should be revealed
+       * @param duration of the transition in milliseconds
+       * @return true if crossfade should be done on actors
+       */
+       virtual bool StartTransition( Dali::ImageActor oldActor,
+                       Dali::ImageActor newActor,
+                       unsigned int duration,
+                       int face_count) = 0;
+
+       /**
+       * Transitioning from oldImage to newImage has completed
+       * @param oldActor that has been viewed. Note! this may also be NULL if its the first transition
+       * @param newActor that should now be visible
+       */
+       virtual void TransitionCompleted( Dali::ImageActor oldActor, Dali::ImageActor newActor ) = 0;
+
+       virtual void Stop( void ) = 0;
+
+       virtual void SetImageSize(const char *path) = 0;
+
+protected:
+
+       // constructor for derived classes, dont allow stack allocation
+       SlideshowEffect() {}
+
+private: // Not implemented
+       SlideshowEffect( const SlideshowEffect& );
+       SlideshowEffect& operator=( const SlideshowEffect& );
+
+};
+
+namespace EffectFactory
+{
+/**
+ * Creates a new RippleFade effect
+ * @param amplitude of the wave
+*/
+SlideshowEffect* NewRippleFadeEffect( float amplitude = 4.0f );
+
+/**
+ * Creates a new Dissolve effect
+ * @param randomize the dissolve
+*/
+SlideshowEffect* NewDissolveFadeEffect( bool randomize = false );
+
+/**
+ * Creates a new Zoom effect
+*/
+SlideshowEffect* NewZoomEffect();
+
+/**
+ * Creates a new Face effect
+*/
+SlideshowEffect* NewFaceEffect(SlideShow *ss_handle);
+
+/**
+ * Creates a new Split effect
+*/
+SlideshowEffect* NewSplitEffect();
+
+/**
+ * Creates a new swirl effect
+*/
+SlideshowEffect* NewSwirlEffect( bool warp = false );
+
+/**
+ * Creates a new 2D ripple effect
+*/
+SlideshowEffect* NewWaterRippleEffect();
+
+/**
+ * Creates a new Slide effect
+*/
+SlideshowEffect* NewSlideEffect();
+
+/**
+ * Creates a newIris effect
+*/
+SlideshowEffect* NewIrisEffect();
+
+/**
+ * Creates a newSquare effect
+*/
+SlideshowEffect* NewSquareEffect();
+
+}
+
+} // namespace Imageview3D
+
+#endif // __DALI_DEMO_SLIDESHOW_EFFECT_H__
diff --git a/slideshow/src/dali_effect/include/ivug-slideshow-face.h b/slideshow/src/dali_effect/include/ivug-slideshow-face.h
new file mode 100644 (file)
index 0000000..fdcd334
--- /dev/null
@@ -0,0 +1,109 @@
+#ifndef __DALI_IVUG_SLIDESHOW_FACE_EFFECT_H__\r
+#define __DALI_IVUG_SLIDESHOW_FACE_EFFECT_H__\r
+\r
+/*\r
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.\r
+ * All rights reserved.\r
+ *\r
+ * This software is a confidential and proprietary information of Samsung\r
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such\r
+ * Confidential Information and shall use it only in accordance with the terms\r
+ * of the license agreement you entered into with Samsung Electronics.\r
+ */\r
+\r
+// EXTERNAL INCLUDES\r
+#include <dali/dali.h>\r
+\r
+// INTERNAL INCLUDES\r
+using namespace Dali;\r
+using namespace Dali::Toolkit;\r
+using namespace std;\r
+\r
+namespace Imageview3D\r
+{\r
+\r
+/**\r
+* Slide show effect interface\r
+*/\r
+class SlideshowFaceEffect : public SlideshowEffect\r
+{\r
+public: // API\r
+\r
+       /**\r
+       * Virtual destructor as this is a base\r
+       * Derived classes can be deleted using this interface\r
+       */\r
+       virtual ~SlideshowFaceEffect() {}\r
+       // constructor for derived classes, dont allow stack allocation\r
+       SlideshowFaceEffect(SlideShow *ss_handle);\r
+\r
+       /**\r
+       * Gets the name of the effect\r
+       * @return name of the effect\r
+       */\r
+       virtual std::string Name();\r
+\r
+       /**\r
+       * Initializes the effect\r
+       * @param size of the slideshow area\r
+       */\r
+       void Initialize(Dali::Vector3 size);\r
+\r
+       /**\r
+       * Start the viewing of the image\r
+       * @param imageactor that is in view\r
+       * @param duration of the viewing in milliseconds\r
+       */\r
+       void StartView(Dali::ImageActor imageactor, unsigned int duration);\r
+\r
+       /**\r
+       * Start the transitioning from oldImage to newImage\r
+       * @param oldActor that has been viewed. Note! this may also be NULL if its the first transition\r
+       * @param newActor that should be revealed\r
+       * @param duration of the transition in milliseconds\r
+       * @return true if crossfade should be done on actors\r
+       */\r
+       bool StartTransition( Dali::ImageActor oldActor,\r
+                                               Dali::ImageActor newActor,\r
+                                               unsigned int duration,\r
+                                               int face_count);\r
+\r
+       /**\r
+       * Transitioning from oldImage to newImage has completed\r
+       * @param oldActor that has been viewed. Note! this may also be NULL if its the first transition\r
+       * @param newActor that should now be visible\r
+       */\r
+       void TransitionCompleted( Dali::ImageActor oldActor,\r
+                                               Dali::ImageActor newActor);\r
+\r
+       void Stop( void );\r
+       void TransitionNextFace();\r
+       void SetFaceScale(float value);\r
+       void SetGapTime(int value);\r
+       void SetImageSize(const char *path);\r
+\r
+private: // Not implemented\r
+       SlideshowFaceEffect(const SlideshowEffect&);\r
+       bool GetScaleAttribute(double divi_h, double divi_w);\r
+       void MoveFaceToCenter(void);\r
+\r
+private: // Data\r
+\r
+       Animation mAnimation;\r
+       Dali::ImageActor mCurrentActor;\r
+       int mFaceRecordIndex;\r
+       int mFaceRectX;\r
+       int mFaceRectY;\r
+       int mFaceRectW;\r
+       int mFaceRectH;\r
+       SlideShow *mSSHandle;\r
+       float mFaceScale;\r
+       int mGapTime;\r
+       int mImgWith;\r
+       int mImgHeight;\r
+};\r
+\r
+} // namespace Imageview3D\r
+\r
+#endif // __DALI_DEMO_SLIDESHOW_EFFECT_H__\r
+\r
diff --git a/slideshow/src/dali_effect/include/ivug-view-stack-info.h b/slideshow/src/dali_effect/include/ivug-view-stack-info.h
new file mode 100644 (file)
index 0000000..370d312
--- /dev/null
@@ -0,0 +1,119 @@
+#ifndef __IVUG_VIEWSTACKINFO_H__
+#define __IVUG_VIEWSTACKINFO_H__
+
+/*
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/dali.h>
+
+// INTERNAL INCLUDES
+#include "ivug-medialist.h"
+#include "ivug-effect.h"
+
+namespace Imageview3D
+{
+
+class ImageView;
+
+typedef std::vector<ImageView*> ViewStack;
+
+/**
+ * ViewStackInfo manages a stack of views and accompanying
+ * stack (tool)-specific state information.
+ */
+class ViewStackInfo
+{
+// Constructor/Destructor
+public:
+       /**
+       * Creates a View stack, with a unique name and access to a set of images.
+       * @param[in] name The name of this view stack for identification purposes.
+       * @param[in] images Pointer to the image database to be used within this stack.
+       */
+       ViewStackInfo(const std::string name, const Media_List* images);
+
+       /**
+       * Copy constructor
+       * @param[in] viewStackInfo A reference to the object to copy.
+       */
+       ViewStackInfo(const ViewStackInfo& viewStackInfo);
+
+       /**
+       * Copy Assignment operator
+       */
+       ViewStackInfo& operator=(const ViewStackInfo& rhs);
+
+       /**
+       * Destructor
+       */
+       ~ViewStackInfo();
+       // Methods
+public:
+
+       /**
+       * Gets the top-most view on the stack
+       *
+       * @return Top-most view on stack
+       */
+       ImageView *GetTopView() const;
+
+       /**
+       * Gets the previous (second from top) view on the stack
+       *
+       * @return Previous view on stack
+       */
+       ImageView *GetPreviousView() const;
+
+       /**
+       * Pushes a view onto the stack.
+       *
+       * @param[in] view View to push onto stack.
+       */
+       void PushView(ImageView *view);
+
+       /**
+       * Pops a view from the stack.
+       *
+       * @return The popped view is returned
+       */
+       ImageView *PopView();
+
+       /**
+       * Gets the number of views on the stack.
+       *
+       * @return The size of the stack
+       */
+       size_t GetSize() const { return mViewStack.size(); }
+
+       /**
+       * Sets visibility of stack (all the views within the stack
+       * have their visibility altered)
+       * @param[in] visible Whether to show (true) or hide (false)
+       */
+       void SetVisible(bool visible);
+
+       /**
+       * Get the name of this stack.
+       * @return the name of this stack.
+       */
+       std::string GetName() const { return mName; }
+
+private:
+
+       ViewStack                           mViewStack;       ///< History of views this stack has visited.
+       std::string                         mName;            ///< Name of stack for identification/debugging purposes.
+       const Media_List*  mAllImagesList;   ///< The image list that this stack is referring to.
+
+};
+
+} // namespace Imageview3D
+
+#endif // __GALLERY_VIEWSTACKINFO_H__
diff --git a/slideshow/src/dali_effect/include/ivug-water-ripple-effect.h b/slideshow/src/dali_effect/include/ivug-water-ripple-effect.h
new file mode 100644 (file)
index 0000000..26fcbdb
--- /dev/null
@@ -0,0 +1,107 @@
+#ifndef __IVUG_WATER_EFFECT_RIPPLE2D_H__\r
+#define __IVUG_WATER_EFFECT_RIPPLE2D_H__\r
+\r
+/*\r
+Copyright (c) 2000-2012 Samsung Electronics Co., Ltd All Rights Reserved\r
+\r
+This file is part of Dali Toolkit\r
+\r
+PROPRIETARY/CONFIDENTIAL\r
+\r
+This software is the confidential and proprietary information of\r
+SAMSUNG ELECTRONICS ("Confidential Information"). You shall not\r
+disclose such Confidential Information and shall use it only in\r
+accordance with the terms of the license agreement you entered\r
+into with SAMSUNG ELECTRONICS.\r
+\r
+SAMSUNG make no representations or warranties about the suitability\r
+of the software, either express or implied, including but not limited\r
+to the implied warranties of merchantability, fitness for a particular\r
+purpose, or non-infringement. SAMSUNG shall not be liable for any\r
+damages suffered by licensee as a result of using, modifying or\r
+distributing this software or its derivatives.\r
+*/\r
+\r
+// EXTERNAL INCLUDES\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/dali.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace Toolkit\r
+{\r
+\r
+/**\r
+ * ShaderEffectRipple2D is a custom shader effect to achieve 2d ripple effects on Image actors\r
+ */\r
+class WaterEffectRipple2D : public ShaderEffect\r
+{\r
+public:\r
+\r
+       /**\r
+       * Create an uninitialized ShaderEffectRipple2D; this can be initialized with ShaderEffectRipple2D::New()\r
+       * Calling member functions with an uninitialized Dali::Object is not allowed.\r
+       */\r
+       WaterEffectRipple2D();\r
+\r
+       /**\r
+       * Virtual destructor.\r
+       */\r
+       virtual ~WaterEffectRipple2D();\r
+\r
+       /**\r
+       * Create an initialized ShaderEffectRipple2D.\r
+       * @return A handle to a newly allocated Dali resource.\r
+       */\r
+       static WaterEffectRipple2D New();\r
+\r
+       /**\r
+       * Set the amplitude of the 2d ripple.\r
+       * @param[in] amplitude The amplitude in float.\r
+       */\r
+       void SetAmplitude(float amplitude);\r
+\r
+       /**\r
+       * Set the time duration for the 2d ripple.\r
+       * @param[in] time The time duration in float.\r
+       */\r
+       void SetTime(float time);\r
+\r
+       /**\r
+       * Get the name for the amplitude property\r
+       * @return A std::string containing the property name\r
+       */\r
+       const std::string& GetAmplitudePropertyName() const;\r
+\r
+       /**\r
+       * Get the name for the time property\r
+       * which can be used in Animation API's\r
+       * @return A std::string containing the property name\r
+       */\r
+       const std::string& GetTimePropertyName() const;\r
+       /**\r
+        * Set the texture size of the 2d ripple.\r
+        * @param[in] textureSize The texture size in Vector2.\r
+        */\r
+       void SetTextureSize(const Vector2& textureSize);\r
+\r
+       /**\r
+        * Get the name for the texture size property\r
+        * @return A std::string containing the property name\r
+        */\r
+       const std::string& GetTextureSizePropertyName() const;\r
+\r
+\r
+private:\r
+       WaterEffectRipple2D(ShaderEffect handle);\r
+\r
+};\r
+\r
+} // namespace Toolkit\r
+\r
+} // namespace Dali\r
+\r
+#endif // __DALI_TOOLKIT_SHADER_EFFECT_RIPPLE2D_H__\r
+\r
diff --git a/slideshow/src/dali_effect/src/ivug-app-navigation.cpp b/slideshow/src/dali_effect/src/ivug-app-navigation.cpp
new file mode 100644 (file)
index 0000000..26a7d4c
--- /dev/null
@@ -0,0 +1,318 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+#include <cstdlib>
+#include "ivug-app-navigation.h"
+#include "ivug-dali-slideshow-view.h"
+#include "ivug-debug.h"
+#include "ivug-slideshow-priv.h"
+
+//#include "zoomable-gallery-view/zoomable-gallery-view.h"
+
+using namespace Dali;
+using namespace Imageview3D;
+
+namespace // unnamed namespace begin
+{
+
+typedef ImageView* (*ViewFunc)();
+
+/* ShowViewInfo (IMAGE_VIEWS) Table
+ *
+ * contains list of view ids and their associated class instances.
+ */
+
+struct ShowViewInfo
+{
+       unsigned int mId;         // view id
+       ViewFunc     mFunc;       // pointer to static New method
+};
+
+const ShowViewInfo SHOW_VIEWS[] =
+{
+       { SLIDESHOW_VIEW,      SlideshowView::New }, // '>' SlideShow (Images fade/swirl effect)
+};
+
+const size_t NUMBER_OF_VIEWS = sizeof SHOW_VIEWS / sizeof SHOW_VIEWS[0];
+
+}
+const unsigned int AppNavigation::NAVIGATION_TIME_MS = 500;
+const float AppNavigation::NAVIGATION_TIME_S = ((float)NAVIGATION_TIME_MS)/1e3;
+
+AppNavigation::AppNavigation( Dali::Adaptor& application )
+: mApplication( application ),
+  mClearNavigationHistory (false),
+  mCurrentStackId(0)
+{
+       IVUG_FUNC_ENTER();
+       mNavigationEndTimer = Timer::New( NAVIGATION_TIME_MS );
+       IVUG_FUNC_LEAVE();
+       // check that there is a tool info entry for every tool
+       //DALI_ASSERT( NUMBER_OF_TOOLS == TOOL_INFO_SIZE );
+}
+
+AppNavigation::~AppNavigation()
+{
+       // Views have to be deleted before the application quits
+       // and core is deleted (otherwise it seg faults).
+       IVUG_FUNC_ENTER();
+       mViews.clear();
+       IVUG_FUNC_LEAVE();
+}
+
+void AppNavigation::CreateViews(SlideShow *ss_handle)
+{
+       IVUG_FUNC_ENTER();
+       if(!ss_handle || (!ss_handle->media_list)){
+               return;
+       }
+       int image_count = ivug_medialist_get_count(ss_handle->media_list);
+       MSG_IVUG_HIGH("images count = %d", image_count);
+       // Setup map from view id to view
+       for (unsigned i = 0; i < NUMBER_OF_VIEWS; ++i) {
+               ViewPtr view = ViewPtr(SHOW_VIEWS[i].mFunc());
+               if (view){
+                       mViews[SHOW_VIEWS[i].mId] = view;
+               }
+       }
+       /* create ViewStackInfo */
+       mViewStacks.push_back(ViewStackInfoPtr(new ViewStackInfo("Pictures", ss_handle->media_list)));
+       /* Set up first view in each stack */
+       StackPush(0, SLIDESHOW_VIEW);
+
+       IVUG_FUNC_LEAVE();
+}
+
+void AppNavigation::InitializeViews(SlideShow *ss_handle)
+{
+       IVUG_FUNC_ENTER();
+       if(NULL == ss_handle){
+               return;
+       }
+       // Setup map from view id to view
+       for (unsigned i = 0; i < NUMBER_OF_VIEWS; ++i) {
+               ViewPtr view = mViews[SHOW_VIEWS[i].mId];
+               if (view){
+                       view->Initialize(this, ss_handle);
+               }
+       }
+       IVUG_FUNC_LEAVE();
+}
+
+
+// Pushes the view on to the correct navigation stack. Also creates a navigation stack
+// if one doesn't exist at the last location
+void AppNavigation::StackPush(size_t stackIndex, ViewId viewId)
+{
+        DALI_ASSERT_ALWAYS(stackIndex < mViewStacks.size());
+
+       ViewIter iter = mViews.find(viewId);
+       if(iter != mViews.end()) {
+               ImageView* view = iter->second.get();
+                DALI_ASSERT_ALWAYS(view != NULL);
+
+               ViewStackInfo& viewStackInfo = GetViewStackInfoByIndex(stackIndex);
+
+               viewStackInfo.PushView(view);
+               view->SetViewStackInfo(&viewStackInfo);
+               /* only display views in the current stack */
+               if(stackIndex != mCurrentStackId) {
+                       view->SetVisible(false);
+               }
+       }
+}
+
+void AppNavigation::StartImageView(ImageView* view)
+{
+       if(!view) {
+               return;
+       }
+       // start up view.
+       view->EnterForwardBegin( AppNavigation::NAVIGATION_TIME_S );
+       view->EnterForwardEnd();
+}
+
+
+void AppNavigation::Rotate(Imageview3D::Orientation orientation)
+{
+  ViewIter it = mViews.begin();
+
+       while (it != mViews.end() ) {
+               it->second->SetOrientation(orientation);
+               ++it;
+       }
+}
+
+void AppNavigation::NavigateForward(Imageview3D::ViewId nextViewID)
+{
+       // Short-circuit if we're already navigating
+       if (mNavigationEndConnection.connected()) {
+               return;
+       }
+
+       ImageView* nextView = NULL;
+
+       ViewIter iter = mViews.find(nextViewID);
+       ViewStackInfo& viewStackInfo = GetCurrentViewStackInfo();
+
+       if (iter != mViews.end()) {
+               nextView = iter->second.get();
+       }
+
+       if (nextView) {
+               nextView->SetViewStackInfo(&viewStackInfo);
+               OnFocusView(nextView);
+
+               // and the current one that's it's just been deactivated by the new one
+               // going forward
+               viewStackInfo.GetTopView()->LeaveForwardBegin( AppNavigation::NAVIGATION_TIME_S );
+
+               // tell the next view that it's just been activated, and going forward
+               nextView->EnterForwardBegin( AppNavigation::NAVIGATION_TIME_S );
+
+               // save the new view
+               viewStackInfo.PushView(nextView);
+
+               //CheckForExitButton();
+
+               // Allow some time for enter/leave animations
+               mNavigationEndConnection.disconnect();
+               mNavigationEndConnection = mNavigationEndTimer.SignalTick().Connect( this, &AppNavigation::OnNavigateForwardEnd );
+               mNavigationEndTimer.Start();
+
+               //Imageviewer::RigNewLighting(nextView->GetLighting(), NAVIGATION_TIME_MS);
+       }
+}
+
+void AppNavigation::NavigateBack()
+{
+       // Short-circuit if we're already navigating
+       if (mNavigationEndConnection.connected()) {
+               return;
+       }
+       MSG_IVUG_HIGH("NavigateBack");
+
+       ViewStackInfo& viewStack = GetCurrentViewStackInfo();
+
+       // if there is only one view on the stack, we are back at the start
+       if (viewStack.GetSize() <= 1) {
+               // last back means exit the application
+               //mApplication.Stop();
+               return;
+       }
+
+       // Tell the current view that it has just been deactivated by going backwards.
+       ImageView* currentView = viewStack.GetTopView();
+       currentView->LeaveBackwardBegin( AppNavigation::NAVIGATION_TIME_S );
+
+       // Tell the previous view that it has been made active, but by going backwards.
+       ImageView* newView = viewStack.GetPreviousView();
+       OnFocusView(newView);
+
+       // Take off the top view, and push back on again, this is done as
+       // CheckForExitButton updates based on current stack size.
+       ImageView *oldView = viewStack.PopView();
+       //CheckForExitButton();
+       viewStack.PushView(oldView);
+
+       newView->EnterBackwardBegin( AppNavigation::NAVIGATION_TIME_S );
+
+       // Allow some time for enter/leave animations
+       mNavigationEndConnection.disconnect();
+       mNavigationEndConnection = mNavigationEndTimer.SignalTick().Connect( this, &AppNavigation::OnNavigateBackwardEnd );
+       mNavigationEndTimer.Start();
+
+       //Imageviewer::RigNewLighting(newView->GetLighting(), NAVIGATION_TIME_MS);
+}
+
+void AppNavigation::OnFocusView(ImageView *activeView)
+{
+       // set the title
+       //std::string text = activeView->GetTitleText();
+       //Imageviewer::SetTitleBarText(text);
+       activeView->SetVisible(true);
+       activeView->FocusView();
+}
+
+bool AppNavigation::OnNavigateForwardEnd()
+{
+       ViewStackInfo& viewStack = GetCurrentViewStackInfo();
+
+       // Tell the newly deactivated view it's finished animating (previous view)
+       if(viewStack.GetSize() > 1) {
+               ImageView* oldView = viewStack.GetPreviousView();
+
+               oldView->LeaveForwardEnd();
+               oldView->SetVisible(false);
+       }
+
+       // Tell the newly active view it's finished animating (current view)
+       ImageView* newView = viewStack.GetTopView();
+
+       newView->EnterForwardEnd();
+       mNavigationEndConnection.disconnect();
+       return false;
+}
+
+bool AppNavigation::OnNavigateBackwardEnd()
+{
+       ViewStackInfo& viewStack = GetCurrentViewStackInfo();
+       ImageView* oldView = viewStack.GetTopView();
+
+       // Tell the newly deactivated view
+       oldView->LeaveBackwardEnd();
+       // Set view's stack info to NULL, to avoid potentially undefined behaviour.
+       oldView->SetViewStackInfo(NULL);
+       viewStack.PopView();
+
+       if(viewStack.GetSize() > 0) {
+               // Tell the newly active view
+               ImageView* newView = viewStack.GetTopView();
+               newView->EnterBackwardEnd();
+       }
+
+       mNavigationEndConnection.disconnect();
+       return false;
+}
+
+/*void AppNavigation::CheckForExitButton()
+{
+       ViewStackInfo& viewStack = GetCurrentViewStackInfo();
+
+       if( 1 == viewStack.GetSize() ) {
+               Gallery::SetBackButtonStyle( BACK_BUTTON_STYLE_EXIT_APPLICATION );
+       } else {
+               Gallery::SetBackButtonStyle( BACK_BUTTON_STYLE_PREVIOUS_VIEW );
+       }
+}*/
+
+void AppNavigation::HideStack(size_t stackIdx)
+{
+       ViewStackInfo& viewStack = GetViewStackInfoByIndex(stackIdx);
+       viewStack.SetVisible(false);
+}
+
+void AppNavigation::ShowStack(size_t stackIdx)
+{
+       ViewStackInfo& viewStack = GetViewStackInfoByIndex(stackIdx);
+       viewStack.SetVisible(true);
+}
+
+ImageView *AppNavigation::GetViewById(int viewId)
+{
+       ViewIter iter = mViews.find(viewId);
+       if (iter != mViews.end()) {
+               ImageView* view = iter->second.get();
+               return view;
+       }
+       return NULL;
+}
+
+
diff --git a/slideshow/src/dali_effect/src/ivug-dali-imageview.cpp b/slideshow/src/dali_effect/src/ivug-dali-imageview.cpp
new file mode 100644 (file)
index 0000000..c4d589d
--- /dev/null
@@ -0,0 +1,324 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+#include "ivug-dali-imageview.h"
+#include "ivug-constraints.h"
+#include "ivug-debug.h"
+#include "ivug-dali-slideshow-view.h"
+
+namespace
+{
+       const float BACKGROUND_DEPTH_MODIFIER(200);
+}
+
+Imageviewer::Imageviewer(Adaptor& application, SlideShow *ss_handle)
+       : mAppNavigation(application),
+         mApplication(application),
+         mSSHandle(ss_handle)
+{
+       IVUG_FUNC_ENTER();
+       //application.SignalResize().Connect(this, &Imageviewer::Resize);
+
+       IVUG_FUNC_LEAVE();
+}
+
+void Imageviewer::SignalResizeSend(void)
+{
+       IVUG_FUNC_ENTER();
+       //mApplication.SignalResize().Connect(this, &Imageviewer::Resize);
+       Resize(mApplication);
+}
+
+void Imageviewer::SetSize(float width, float height)
+{
+       IVUG_FUNC_ENTER();
+       MSG_IVUG_HIGH("width=%f, height=%f", width, height);
+
+       mWidth = width;
+       mHeight = height;
+
+       IVUG_FUNC_LEAVE();
+}
+
+void Imageviewer::SetPosition(float x, float y)
+{
+       IVUG_FUNC_ENTER();
+
+       mX = x;
+       mY = y;
+       mNavigationBarHeight = y;
+
+       IVUG_FUNC_LEAVE();
+}
+
+
+Imageviewer::~Imageviewer()
+{
+       IVUG_FUNC_ENTER();
+
+       mBackgroundLayer = NULL;
+       mMainLayer = NULL;
+       mNavigationBarLayer = NULL;
+       IVUG_FUNC_LEAVE();
+}
+
+
+void Imageviewer::Resize(Adaptor& app)
+{
+       IVUG_FUNC_ENTER();
+
+       if(!mBackgroundLayer) {
+               /* Create layer */
+               CreateLayers();
+               /* Create background */
+               CreateBackground();
+               /* Create Navigation before Views as buttons required */
+               CreateNavigationBar();
+               if(mSSHandle) {
+                       //create view
+                       mAppNavigation.CreateViews(mSSHandle);
+                       //init view
+                       ImageView *view = mAppNavigation.GetViewById(SLIDESHOW_VIEW);
+                       mAppNavigation.InitializeViews(mSSHandle);
+                       //start view
+                       if(view) {
+                               mAppNavigation.StartImageView(view);
+                       }
+               }
+       }
+
+       IVUG_FUNC_LEAVE();
+}
+
+void Imageviewer::CreateLayers()
+{
+       IVUG_FUNC_ENTER();
+
+       /* the parent of the layers is the root, which is the size of the stage */
+       MSG_IVUG_HIGH("mWidth=%f, mHeight=%f", mWidth, mHeight);
+       mBackgroundLayer = Layer::New();
+       mBackgroundLayer.SetSize(mWidth, mHeight);
+       mBackgroundLayer.SetPosition(mX, mY);
+       mBackgroundLayer.SetAnchorPoint(AnchorPoint::CENTER);
+       mBackgroundLayer.SetParentOrigin(ParentOrigin::CENTER);
+       mBackgroundLayer.SetName("background");
+
+       mMainLayer = Layer::New();
+       mMainLayer.SetSize(mWidth, mHeight);
+       mMainLayer.SetPosition(mX, mY);
+       mMainLayer.SetAnchorPoint(AnchorPoint::CENTER);
+       mMainLayer.SetParentOrigin(ParentOrigin::CENTER);
+       mMainLayer.SetName("main");
+
+       mNavigationBarLayer = Layer::New();
+       mNavigationBarLayer.SetAnchorPoint(AnchorPoint::CENTER);
+       mNavigationBarLayer.SetParentOrigin(ParentOrigin::CENTER);
+       mNavigationBarLayer.SetSize(mWidth, mHeight);
+       mNavigationBarLayer.SetPosition(mX, mY);
+       mNavigationBarLayer.SetName("navigation");
+
+       //Dali::Stage::GetCurrent().Add(mBackgroundLayer);
+       Dali::Stage::GetCurrent().Add(mMainLayer);
+       //Dali::Stage::GetCurrent().Add(mNavigationBarLayer);
+       IVUG_FUNC_LEAVE();
+}
+
+void Imageviewer::AddToLayer(int layer, Dali::Actor actor)
+{
+       IVUG_FUNC_ENTER();
+       /* todo replace switch with an index to an array of layers */
+       switch (layer) {
+               case BACKGROUND_LAYER:
+                       mBackgroundLayer.Add(actor);
+                       break;
+               case MAIN_VIEW_LAYER:
+                       mMainLayer.Add(actor);
+                       break;
+               case NAVIGATION_BAR_LAYER:
+                       mNavigationBarLayer.Add(actor);
+                       break;
+               default:
+                       MSG_SLIDER_WARN ("Gallery::AddToLayer LAYER NOT FOUND");
+       }
+       IVUG_FUNC_LEAVE();
+}
+
+void Imageviewer::RemoveFromLayer( int layer, Dali::Actor actor )
+{
+       IVUG_FUNC_ENTER();
+       /* todo replace switch with an index to an array of layers */
+       switch (layer) {
+               case BACKGROUND_LAYER:
+                       mBackgroundLayer.Remove(actor);
+                       break;
+               case MAIN_VIEW_LAYER:
+                       mMainLayer.Remove(actor);
+                       break;
+               case NAVIGATION_BAR_LAYER:
+                       mNavigationBarLayer.Remove(actor);
+                       break;
+               default:
+                       MSG_SLIDER_WARN ("Imageviewer::RemoveFromLayer LAYER NOT FOUND");
+       }
+
+       if (actor.GetParent()) {
+               Dali::Stage::GetCurrent().Remove(actor);
+       }
+       IVUG_FUNC_LEAVE();
+}
+
+void Imageviewer::RemoveFromLayerMain(void)
+{
+       IVUG_FUNC_ENTER();
+       /* todo replace switch with an index to an array of layers */
+
+       Dali::Stage::GetCurrent().Remove(mMainLayer);
+       Dali::Stage::GetCurrent().Remove(mBackgroundLayer);
+       Dali::Stage::GetCurrent().Remove(mNavigationBarLayer);
+
+       IVUG_FUNC_LEAVE();
+}
+
+
+Layer Imageviewer::GetLayer(int id)
+{
+       IVUG_FUNC_ENTER();
+
+       Layer layer;
+       switch (id) {
+               case BACKGROUND_LAYER:
+                       layer = mBackgroundLayer;
+                       break;
+               case MAIN_VIEW_LAYER:
+                       layer = mMainLayer;
+                       break;
+               case NAVIGATION_BAR_LAYER:
+                       layer = mNavigationBarLayer;
+                       break;
+               default:
+                       MSG_SLIDER_WARN ("Imageviewer::GetLayer LAYER NOT FOUND");
+       }
+
+       IVUG_FUNC_LEAVE();
+       return layer;
+}
+
+void Imageviewer::SetScreenFurnitureVisibility(bool enable)
+{
+       IVUG_FUNC_ENTER();
+
+       Animation& animation = mFadeAnimation;
+       animation = Animation::New(0.5f);
+       /* leave opacity to target once animation is done */
+       animation.SetEndAction(Animation::Bake);
+       /* linear fade in/out */
+       float targetAlpha = enable ? 1.0f : 0.0f;
+       if (mNavigationBar)
+               animation.OpacityTo(mNavigationBar, targetAlpha);
+
+       if (mNavigationBarBg)
+               animation.OpacityTo(mNavigationBarBg, targetAlpha);
+
+       if (mBackground)
+               animation.OpacityTo(mBackground, targetAlpha);
+       animation.Play();
+
+       IVUG_FUNC_LEAVE();
+}
+
+float Imageviewer::GetNaviBarHeight()
+{
+       IVUG_FUNC_ENTER();
+#if 0
+       Vector3 stageSize = Stage::GetCurrent().GetSize();
+
+       mNavigationBarHeight = stageSize.y / NAVIGATION_BAR_TO_SCREEN_HEIGHT_RATIO;
+#endif
+       /* Use Naviframe height got from Gallery App */
+       IVUG_FUNC_LEAVE();
+       return mNavigationBarHeight;
+}
+
+void Imageviewer::SetTitleBarText(std::string newText)
+{
+       IVUG_FUNC_ENTER();
+       //ivInstance->mTitleText.SetText(newText);
+       /* TODO: this updates the text sizes */
+       IVUG_FUNC_LEAVE();
+}
+
+void Imageviewer::CreateBackground()
+{
+       IVUG_FUNC_ENTER();
+
+       Image image = Image::New(DALI_IMAGE_DIR "T01_3d_view_bg.png");
+       mBackground = ImageActor::New(image);
+
+       Vector2 stageSize = Stage::GetCurrent().GetSize();
+       mBackground.SetSize(stageSize.width, stageSize.height);
+       /* background in the middle */
+       mBackground.SetAnchorPoint(AnchorPoint::CENTER);
+       mBackground.SetParentOrigin(ParentOrigin::CENTER);
+
+       /* add to layer and stage */
+       AddToLayer(BACKGROUND_LAYER, mBackground);
+
+       IVUG_FUNC_LEAVE();
+}
+
+void Imageviewer::CreateNavigationBar()
+{
+       IVUG_FUNC_ENTER();
+       mNavigationBar = Actor::New();
+       /* constrain the navi bar to be the width of its parent and constant height */
+       //Constraint constraint = ParentConstraint::Size::New(ParentWidthConstantHeight(GetNaviBarHeight()));
+       Constraint constraint = Constraint::New<Vector3>( Actor::SIZE,ParentSource( Actor::SIZE ),ParentWidthConstantHeight(GetNaviBarHeight()));
+       mNavigationBar.ApplyConstraint(constraint );
+       mNavigationBar.SetParentOrigin(ParentOrigin::TOP_CENTER);
+       mNavigationBar.SetAnchorPoint(AnchorPoint::TOP_CENTER);
+       /* add to layer and stage */
+       AddToLayer(NAVIGATION_BAR_LAYER, mNavigationBar);
+       IVUG_FUNC_LEAVE();
+}
+
+AppNavigation& Imageviewer::GetAppNavigation()
+{
+       IVUG_FUNC_ENTER();
+
+       return mAppNavigation;
+}
+
+void Imageviewer::ResumeViewAndTransitionTimer()
+{
+       IVUG_FUNC_ENTER();
+       ImageView *view_item = mAppNavigation.GetViewById(SLIDESHOW_VIEW);
+       SlideshowView *view= dynamic_cast<SlideshowView *>(view_item);
+       if(view) {
+               view->SlideShowResume();
+       }
+       IVUG_FUNC_LEAVE();
+}
+
+void Imageviewer::OrientationChanged(const int orientation)
+{
+       // work out the new orientation
+       IVUG_FUNC_ENTER();
+       Orientation newOrientation = PORTRAIT;
+       int angle = orientation;
+       if( 90 == angle ) {
+               newOrientation = LANDSCAPE;
+       } else if( 180 == angle ) {
+               newOrientation = PORTRAIT_INVERSE;
+       } else if( 270 == angle ) {
+               newOrientation = LANDSCAPE_INVERSE;
+       }
+
+       mAppNavigation.Rotate( newOrientation );
+       IVUG_FUNC_LEAVE();
+}
diff --git a/slideshow/src/dali_effect/src/ivug-dali-slideshow-view.cpp b/slideshow/src/dali_effect/src/ivug-dali-slideshow-view.cpp
new file mode 100644 (file)
index 0000000..3f928a0
--- /dev/null
@@ -0,0 +1,315 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+// CLASS HEADER
+#include "ivug-dali-slideshow-view.h"
+
+// EXTERNAL INCLUDES
+#include <string.h>
+#include <dali/dali.h>
+
+// INTERNAL INCLUDES
+#include "ivug-dali-imageview.h"
+#include "ivug-slideshow-control.h"
+#include "ivug-slideshow-effect.h"
+#include "ivug-debug.h"
+#include "ivug-includes.h"
+#include "ivug-effect.h"
+#include "ivug-dali.h"
+#include "ivug-dali-util.h"
+
+// LOCAL STUFF
+namespace
+{
+} // end LOCAL STUFF
+
+//using namespace Dali;
+using namespace std;
+
+namespace Imageview3D
+{
+
+ImageView* SlideshowView::New()
+{
+       IVUG_FUNC_ENTER();
+       SlideshowView* self = new SlideshowView;
+       IVUG_FUNC_LEAVE();
+
+       return self;
+}
+
+SlideshowView::~SlideshowView()
+{
+       IVUG_FUNC_ENTER();
+       mSlideshowControl.reset();
+       IVUG_FUNC_LEAVE();
+}
+
+void SlideshowView::DoActivationBegin(Dali::Animation slideAnimation)
+{
+}
+
+void SlideshowView::DoActivationEnd()
+{
+}
+
+void SlideshowView::DoDeactivationBegin(Dali::Animation slideAnimation)
+{
+}
+
+void SlideshowView::DoDeactivationEnd()
+{
+}
+
+
+void SlideshowView::DoEnterForwardBegin( float /*navigationDuration*/ )
+{
+       IVUG_FUNC_ENTER();
+
+        DALI_ASSERT_ALWAYS(mSSHandle);
+       // create a list of images
+       // create new slideshow control
+       int iTime = floor(mSSHandle->ss_interval_time);
+       MSG_IVUG_HIGH("ivug_dali_view_time_set=%d", iTime);
+       mSlideshowControl.reset( new SlideshowControl( mRotatingRootActor, mSSHandle, mEffects ));
+       mSlideshowControl->SetViewAndTransitionTime(iTime*SECOND_MS);
+       // set initial size
+       SetSlideshowSize();
+       // hide screen furniture
+       //Imageviewer *iv = (Imageviewer *)mSSHandle->dali_viewer_handle;
+       //if (iv) {
+       //      iv->SetScreenFurnitureVisibility( false );
+       //}
+
+       IVUG_FUNC_LEAVE();
+}
+
+void SlideshowView::DoEnterForwardEnd()
+{
+       // start the slideshow
+       IVUG_FUNC_ENTER();
+       mSlideshowControl->Play();
+
+       mRootActor.SignalTouched().Connect( this, &SlideshowView::OnClick );
+       IVUG_FUNC_LEAVE();
+       // no toolbar in slideshow
+       //Imageviewer::GetToolBar()->GetActor().SetVisible(false);
+
+       // We do not want the slideshow button in slideshow either
+       //Gallery::GetSlideshowButton().SetVisible(false);
+}
+
+void SlideshowView::DoEnterBackwardBegin( float navigationDuration )
+{
+       EnterForwardBegin( navigationDuration );
+}
+
+void SlideshowView::DoEnterBackwardEnd()
+{
+       // no toolbar in slideshow
+       //Gallery::GetToolBar()->GetActor().SetVisible(false);
+
+       // We do not want the slideshow button in slideshow either
+       //Gallery::GetSlideshowButton().SetVisible(false);
+}
+
+void SlideshowView::DoLeaveForwardBegin( float navigationDuration )
+{
+       LeaveBackwardBegin( navigationDuration );
+}
+
+void SlideshowView::DoLeaveForwardEnd()
+{
+}
+
+void SlideshowView::DoLeaveBackwardBegin( float /*navigationDuration*/ )
+{
+       // stop slideshow
+       IVUG_FUNC_ENTER();
+       if( mSlideshowControl ) {
+               mSlideshowControl->Stop();
+       }
+       mRootActor.SignalTouched().Disconnect( this, &SlideshowView::OnClick );
+
+       int image_count = ivug_medialist_get_count(mSSHandle->media_list);
+       MSG_IVUG_HIGH("images count = %d", image_count);
+
+       // show screen furniture
+       //Imageviewer *iv = (Imageviewer *)mSSHandle->dali_viewer_handle;
+       //if (iv) {
+       //      iv->SetScreenFurnitureVisibility( true );
+       //}
+}
+
+void SlideshowView:: DoLeaveBackwardEnd()
+{
+       // if slideshow is there, delete it
+       if( mSlideshowControl ) {
+               mSlideshowControl.reset();
+       }
+}
+
+void SlideshowView::DoFocusView()
+{
+}
+
+void SlideshowView::DoSetOrientation()
+{
+       // set slideshow control in correct size
+       if( mSlideshowControl ) {
+               // get stage size for image loading
+               SetSlideshowSize();
+       }
+}
+
+SlideshowView::SlideshowView()
+{
+       ImageView::mTitleBarText = std::string("");
+}
+
+void SlideshowView::SetSlideshowSize()
+{
+       // get stage size for image loading
+       IVUG_FUNC_ENTER();
+       Stage stage = Dali::Stage::GetCurrent();
+       Vector2 stageSize = stage.GetSize();
+       if( mOrientation == LANDSCAPE || mOrientation == LANDSCAPE_INVERSE ) {
+               stageSize = Vector2( stageSize.height, stageSize.width);
+       }
+       // set size based on orientation
+       MSG_IVUG_HIGH("stageSize.x = %f, stageSize.y = %f, mOrientation=%d", stageSize.x, stageSize.y, mOrientation);
+       if( mSlideshowControl ) {
+               if( PORTRAIT == mOrientation || PORTRAIT_INVERSE == mOrientation ) {
+                       // portrait
+                       mSlideshowControl->SetSize( Dali::Size( stageSize.x, stageSize.y ), mOrientation);
+               } else {
+                       // landscape
+                       mSlideshowControl->SetSize( Dali::Size( stageSize.x, stageSize.y ), mOrientation);
+               }
+       }
+       IVUG_FUNC_LEAVE();
+}
+
+bool SlideshowView::OnClick( Dali::Actor actor, const Dali::TouchEvent& event )
+{
+       IVUG_FUNC_ENTER();
+
+       Dali::TouchPoint point = event.GetPoint( 0 );
+       if( point.state == Dali::TouchPoint::Up ) {
+               // if slideshow is running, and its paused
+               if( mSlideshowControl ) {
+                       ivug_ss_set_mouse_tag(true, mSSHandle);
+                       //mRootActor.SignalTouch().Disconnect( this, &SlideshowView::OnClick );
+                       mSlideshowControl->StopViewAndTransitionTimer();
+                       mSlideshowControl->Pause();
+                       ivug_return_main_view(mSSHandle);
+               }
+       }
+       // consume all clicks
+       return true;
+}
+
+void SlideshowView::SlideShowResume(void)
+{
+       if( mSlideshowControl ){
+               if(mSlideshowControl->IsPaused()) {
+                       mSlideshowControl->NewViewAndTransitionTimer();
+                       mSlideshowControl->Resume();
+                       //Imageviewer *iv = (Imageviewer *)mSSHandle->dali_viewer_handle;
+                       //if (iv) {
+                       //      iv ->SetScreenFurnitureVisibility( true );
+                       //}
+
+               }
+       }
+}
+
+void SlideshowView::DoInitialize(void)
+{
+       IVUG_FUNC_ENTER();
+       Effect_Type StyleEffect = EFFECT_3D_RAND;
+       EffectPtr effect;
+       if(mSSHandle) {
+               StyleEffect = mSSHandle->effect_type;
+       }
+       MSG_IVUG_HIGH("StyleEffect = %d", StyleEffect);
+
+       if (EFFECT_DISSOLVE == StyleEffect || (EFFECT_3D_RAND == StyleEffect)) {
+               effect = EffectPtr(EffectFactory::NewSquareEffect());
+               if(effect) {
+                       mEffects.push_back(effect);
+               }
+       }
+
+       if(EFFECT_SLIDE == StyleEffect ||(EFFECT_3D_RAND == StyleEffect)) {
+               effect = EffectPtr(EffectFactory::NewSlideEffect());
+               if(effect) {
+                       mEffects.push_back(effect);
+               }
+       }
+       if(EFFECT_IRIS == StyleEffect ||(EFFECT_3D_RAND == StyleEffect)) {
+               effect = EffectPtr(EffectFactory::NewIrisEffect());
+               if(effect) {
+                       mEffects.push_back(effect);
+               }
+       }
+       if (EFFECT_RIPPLE_FADE == StyleEffect || (EFFECT_3D_RAND == StyleEffect)) {
+               effect = EffectPtr(EffectFactory::NewRippleFadeEffect(RIPPLEAMPLITUDE));
+               if (effect) {
+                       mEffects.push_back(effect);
+               }
+       }
+       if(EFFECT_DISSOLVE_FADE == StyleEffect||(EFFECT_3D_RAND == StyleEffect)){
+               effect = EffectPtr(EffectFactory::NewDissolveFadeEffect());
+               if(effect) {
+                       mEffects.push_back(effect);
+               }
+       }
+       if(EFFECT_SWIRL == StyleEffect ||(EFFECT_3D_RAND == StyleEffect)){
+               effect = EffectPtr(EffectFactory::NewSwirlEffect());
+               if(effect) {
+                       mEffects.push_back(effect);
+               }
+       }
+       if(EFFECT_WATER_RIPPLE == StyleEffect ||(EFFECT_3D_RAND == StyleEffect)){
+               effect = EffectPtr(EffectFactory::NewWaterRippleEffect());
+               if(effect) {
+                       mEffects.push_back(effect);
+               }
+       }
+       if(EFFECT_ZOOM == StyleEffect ||(EFFECT_3D_RAND == StyleEffect)){
+               effect = EffectPtr(EffectFactory::NewZoomEffect());
+               if(effect) {
+                       mEffects.push_back(effect);
+               }
+       }
+       if(EFFECT_SPLIT == StyleEffect ||(EFFECT_3D_RAND == StyleEffect)){
+               effect = EffectPtr(EffectFactory::NewSplitEffect());
+               if(effect) {
+                       mEffects.push_back(effect);
+               }
+       }
+       if(EFFECT_FACE == StyleEffect){
+               /**
+               *  when enable face effect, images without face display slide effect
+               ** images with face display face effect
+               */
+
+               effect = EffectPtr(EffectFactory::NewFaceEffect(mSSHandle));
+               if(effect) {
+                       mEffects.push_back(effect);
+               }
+       }
+       IVUG_FUNC_LEAVE();
+}
+
+
+} // namespace Imageview3D
+
diff --git a/slideshow/src/dali_effect/src/ivug-dali.cpp b/slideshow/src/dali_effect/src/ivug-dali.cpp
new file mode 100644 (file)
index 0000000..db78cf8
--- /dev/null
@@ -0,0 +1,230 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+#include <iostream>
+#include <Evas.h>
+#include <ui-gadget-module.h>
+#include <Ecore_X.h>           /*EFL*/
+
+//#include "gl-ui-util.h"
+#include "ivug-dali.h"
+#include "ivug-debug.h"
+#include "ivug-dali-util.h"
+#include "ivug-includes.h"
+#include "ivug-slideshow-priv.h"
+
+using namespace std;
+//using namespace Dali;
+using namespace Imageview3D;
+
+static void _ivug_dali_resize_image_view(Evas_Object *obj, Imageviewer* iv)
+{
+       IVUG_FUNC_ENTER();
+
+       if (NULL == obj) {
+               MSG_SLIDER_HIGH ("obj is null");
+               return;
+       }
+       ivug_ret_if(NULL == iv);
+       int x, y, w, h;
+       evas_object_geometry_get(obj, &x, &y, &w, &h);
+       MSG_IVUG_HIGH ("x=%d,y=%d,w=%d,h=%d", x, y, w, h);
+
+       float fx =0.0;
+       float fy = 0.0;
+       float fw = 0.0;
+       float fh = 0.0;
+       fx = (float)x;
+       fy = (float)y;
+       fw = (float)w;
+       fh = (float)h;
+       iv->SetSize(fw,fh);
+       iv->SetPosition(fx,fy);
+
+       IVUG_FUNC_LEAVE();
+}
+
+#if 0
+static void _ivug_dali_adaptor_image_resized_xWin(Adaptor &adp)
+{
+       IVUG_FUNC_ENTER();
+       Evas_Object * main_win = (Evas_Object *)ug_get_window();
+       evas_object_smart_callback_call(main_win, "evasplugin,create", (void *)EVASPLUGIN_RESIZED);
+
+       IVUG_FUNC_LEAVE();
+}
+#endif
+
+void ivug_imageviewer_init_xWin(SlideShow *ss_handle, int state)
+{
+       IVUG_FUNC_ENTER();
+       IV_ASSERT(ss_handle != NULL);
+
+       int ep_state = state;
+       if (NULL == ss_handle->adaptor) {
+               return;
+       }
+       Evas_Object *main_lay = (Evas_Object *)ug_get_window();
+       if (ep_state == EVASPLUGIN_INITED) {
+               Adaptor *adaptor = ss_handle->adaptor;
+               if (!ss_handle->dali_viewer_handle) {
+                       Imageviewer* iv = new Imageviewer(*adaptor, ss_handle);
+                       ss_handle->dali_viewer_handle = (void *)iv;
+               }
+               if(ss_handle->dali_viewer_handle) {
+                       MSG_IVUG_HIGH("create image viewer");
+                       Imageviewer *iv_handle = (Imageviewer *)ss_handle->dali_viewer_handle;
+                       _ivug_dali_resize_image_view(main_lay, iv_handle);
+                       iv_handle->SignalResizeSend();
+               }
+
+       } else if (ep_state == EVASPLUGIN_RESIZED) {
+               int range = elm_win_rotation_get(main_lay);
+               ecore_x_window_prop_property_set(ss_handle->xwin,
+                                                               ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
+                                                               ECORE_X_ATOM_CARDINAL, 32, &range, 1);
+               if(ss_handle->dali_viewer_handle) {
+                       Imageviewer *iv_handle = (Imageviewer *)ss_handle->dali_viewer_handle;
+                       _ivug_dali_resize_image_view(main_lay, iv_handle);
+                       iv_handle->OrientationChanged((const int)range);
+               }
+       }
+       IVUG_FUNC_LEAVE();
+
+}
+
+void ivug_dali_create_xWin(SlideShow *data)
+{
+       IVUG_FUNC_ENTER();
+
+       if (NULL == data) {
+               MSG_IVUG_HIGH("box or object is NULL");
+               return;
+       }
+       SlideShow* ss_handle = (SlideShow*)data;
+
+       // create window surface
+       Dali::PositionSize windowPosition(0, 0, 0, 0); // this will use full screen
+
+       ss_handle->winHandle= Dali::Window::New(windowPosition, "slider Show");
+       ss_handle->adaptor = &Dali::Adaptor::New(ss_handle->winHandle);
+       if (!ss_handle->adaptor) {
+               return;
+       }
+       ss_handle->winHandle.SetClass("Slide Show", "SLIDE_SHOW");
+       ss_handle->winHandle.ShowIndicator(false);
+
+       //get window
+       Adaptor *adaptor = ss_handle->adaptor;
+       Dali::RenderSurface& surface = adaptor->GetSurface();
+       //Get the X-Renderable for which the pixmap is created on
+       boost::any renderableSurface =  surface.GetSurface(Dali::RenderSurface::ECORE_X11);
+       // if Dali is using a Pixmap or Window to render to it doesn't matter because they have the same
+       // underlying type of unsigned long
+       Ecore_X_Window daliWindow = boost::any_cast< Ecore_X_Window >(renderableSurface);
+       ss_handle->xwin = daliWindow;
+
+       ss_handle->adaptor->Start();
+       //resize xWin
+       ivug_imageviewer_init_xWin(ss_handle, EVASPLUGIN_INITED);
+       ivug_imageviewer_init_xWin(ss_handle, EVASPLUGIN_RESIZED);
+
+       IVUG_FUNC_LEAVE();
+}
+
+/* Call this one whenever Dali is hidden */
+void ivug_dali_pause(SlideShow *ss_handle)
+{
+       IVUG_FUNC_ENTER();
+       if (NULL == ss_handle) {
+               return;
+       }
+       if(ss_handle->adaptor!= NULL) {
+               if (ss_handle->evas_plugin_state == EVASPLUGIN_PAUSED) {
+                       MSG_IVUG_HIGH("Dali is paused.");
+                       return;
+               }
+               MSG_IVUG_HIGH("Pause Dali.");
+               ss_handle->evas_plugin_state = EVASPLUGIN_PAUSED;
+               ss_handle->adaptor->Pause();
+       }
+       IVUG_FUNC_LEAVE();
+}
+
+void ivug_dali_resume(SlideShow *ss_handle)
+{
+       IVUG_FUNC_ENTER();
+       if (NULL == ss_handle) {
+               return;
+       }
+       if(ss_handle->adaptor != NULL) {
+               if (ss_handle->evas_plugin_state == EVASPLUGIN_RESUMED) {
+                       MSG_IVUG_HIGH("Dali is resumed.");
+                       return;
+               }
+               MSG_IVUG_HIGH("Resume Dali.");
+               ss_handle->evas_plugin_state = EVASPLUGIN_RESUMED;
+               ss_handle->adaptor->Resume();
+       }
+       IVUG_FUNC_LEAVE();
+}
+
+static Eina_Bool _ivug_ss_return_timer_cb(void *data)
+{
+       IVUG_FUNC_ENTER();
+
+       SlideShow *pSlideShow = (SlideShow *)data;
+       if (NULL == pSlideShow) {
+               return ECORE_CALLBACK_CANCEL;
+       }
+       if(pSlideShow->click_timer)
+       {
+               ecore_timer_del(pSlideShow->click_timer);
+               pSlideShow->click_timer = NULL;
+       }
+
+       if(pSlideShow->state == SLIDE_SHOW_RUNNING) {
+               ivug_ss_stop(pSlideShow);
+               //EFL::dump_obj(pSlideShow->obj, 0);
+               return ECORE_CALLBACK_CANCEL;
+       }
+
+       MSG_HIGH("-------------_ivug_ss_clicked_timer_cb--------------");
+
+       pSlideShow->state = SLIDE_SHOW_INTERRUPTED;
+       evas_object_smart_callback_call(ivug_ss_object_get(pSlideShow), "slideshow,finished", (void *)SLIDE_SHOW_STOPPED);
+
+       return ECORE_CALLBACK_CANCEL;
+}
+
+
+void ivug_return_main_view(SlideShow *ss_handle)
+{
+       IVUG_FUNC_ENTER();
+       if(NULL == ss_handle) {
+               return;
+       }
+       Media_List *list = (Media_List*)ss_handle->media_list;
+       int image_count = ivug_medialist_get_count(list);
+       MSG_IVUG_HIGH("images count = %d", image_count);
+       //ivug_dali_pause(ss_handle);
+       const char *profile = elm_config_profile_get();
+       if (!strcmp(profile,"mobile"))
+       {
+               elm_win_indicator_mode_set((Evas_Object *)ug_get_window(), ELM_WIN_INDICATOR_SHOW);
+       }
+       if(ss_handle->click_timer)
+       {
+               ecore_timer_del(ss_handle->click_timer);
+       }
+       ss_handle->click_timer = ecore_timer_add(0.3f, _ivug_ss_return_timer_cb, ss_handle);
+}
+
+
diff --git a/slideshow/src/dali_effect/src/ivug-image-view.cpp b/slideshow/src/dali_effect/src/ivug-image-view.cpp
new file mode 100644 (file)
index 0000000..9f5a460
--- /dev/null
@@ -0,0 +1,282 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+// CLASS HEADER
+#include "ivug-image-view.h"
+
+// INTERNAL INCLUDES
+#include "ivug-dali-imageview.h"
+#include "ivug-debug.h"
+#include "ivug-slideshow-priv.h"
+
+//#include "gallery.h"
+
+using namespace Dali;
+using namespace Imageview3D;
+
+// LOCAL STUFF
+namespace
+{
+}
+
+const float ImageView::ROTATION_ANIMATION_DURATION = 0.5f;
+
+ImageView::~ImageView()
+{
+       //mRotateAnimation.Stop();
+}
+
+void ImageView::Initialize( AppNavigation* appNavigation, SlideShow *ss_handle)
+{
+       mAppNavigation = appNavigation;
+
+       mSSHandle= ss_handle;
+       //mLighting.keyLightActive = false;
+
+       // call deriving class
+       DoInitialize();
+}
+
+void ImageView::SetOrientation( Imageview3D::Orientation orientation )
+{
+       // Resize the root actor
+       Vector2 stageSize = Stage::GetCurrent().GetSize();
+       MSG_IVUG_HIGH("stageSize.x = %f, stageSize.y = %f", stageSize.x, stageSize.y);
+       Vector3 targetSize = Dali::Vector3( stageSize );
+       if( orientation == LANDSCAPE || orientation == LANDSCAPE_INVERSE ) {
+               //targetSize = Vector3( stageSize.height, stageSize.width, stageSize.depth );
+               targetSize = Vector3( stageSize.height, stageSize.width, std::max(stageSize.height, stageSize.width) );
+       }
+       MSG_IVUG_HIGH("targetSize.x = %f, targetSize.y = %f", targetSize.x, targetSize.y);
+
+       // set layout orientation
+       unsigned int orientationAngle = ( orientation == PORTRAIT ? 0 :
+               ( orientation == LANDSCAPE ? 270 :
+               ( orientation == PORTRAIT_INVERSE ? 180 :
+               ( orientation == LANDSCAPE_INVERSE ? 90 : 0 ) ) ) );
+       //main window layout rotate when change screen. so we needn't retate.
+       //orientationAngle = 0;
+
+       // only do something if the orientation changes
+       if (mOrientation != orientation) {
+               mOrientation = orientation;
+
+               // check if actor is on stage
+               if( mRotatingRootActor.OnStage() ) {
+                       mRotatingRootActor.SetRotation( Degree( orientationAngle ), Vector3::ZAXIS );
+                       Vector3 currentSize( mRotatingRootActor.GetCurrentSize() );
+                       MSG_IVUG_HIGH("orientationAngle = %d", orientationAngle);
+                       mRotateAnimation = Animation::New( ROTATION_ANIMATION_DURATION );
+                       mRotateAnimation.RotateTo(mRotatingRootActor, Degree(orientationAngle), Vector3::ZAXIS, AlphaFunctions::EaseOut);
+                       MSG_IVUG_HIGH("currentSize.x = %f, currentSize.y = %f", currentSize.x, currentSize.y);
+
+                       // if we linearly resize from portrait to landscape halfway through the animation
+                       // we get size which is square between the both. This would cause a square image to grow
+                       // if it is fitted to be 100% of root size. Therefore we do a nonlinear size animation
+                       // where we shrink faster
+                       // which one grows
+                       if( targetSize.width > currentSize.width) {
+                               // width grows, shrink height faster
+                               Vector3 shrink( currentSize );
+                               shrink.height = targetSize.height;
+                               mRotateAnimation.Resize( mRotatingRootActor, shrink, AlphaFunctions::EaseOut, 0.0f, ROTATION_ANIMATION_DURATION * 0.5f );
+                               mRotateAnimation.Resize( mRotatingRootActor, targetSize, AlphaFunctions::EaseIn, 0.0f, ROTATION_ANIMATION_DURATION );
+                       } else {
+                               // height grows, shrink width faster
+                               Vector3 shrink( currentSize );
+                               shrink.width = targetSize.width;
+                               mRotateAnimation.Resize( mRotatingRootActor, shrink, AlphaFunctions::EaseOut, 0.0f, ROTATION_ANIMATION_DURATION * 0.5f );
+                               mRotateAnimation.Resize( mRotatingRootActor, targetSize, AlphaFunctions::EaseIn, 0.0f, ROTATION_ANIMATION_DURATION );
+                       }
+                       mRotateAnimation.SetDestroyAction( Animation::Bake );
+                       mRotateAnimation.Play();
+               }
+               else
+               {
+                       // set the rotation to match the orientation
+                       mRotatingRootActor.SetRotation( Degree( orientationAngle ), Vector3::ZAXIS );
+                       mRotatingRootActor.SetSize( targetSize );
+               }
+
+               // call subclass
+               DoSetOrientation();
+       }
+       else
+       {
+               // for first time just set size
+               mRotatingRootActor.SetSize( targetSize );
+       }
+}
+
+void ImageView::NavigateTo( ViewId view )
+{
+       // Only an active view may initiate navigation
+       if (mActive) {
+               mAppNavigation->NavigateForward( view );
+       }
+}
+
+void ImageView::NavigateBack()
+{
+       // Only an active view may initiate navigation
+       if (mActive) {
+               mAppNavigation->NavigateBack();
+       }
+}
+
+void ImageView::ActivationBegin(Animation slideAnimation)
+{
+       mActive = true;
+       DoActivationBegin(slideAnimation);
+}
+
+void ImageView::ActivationEnd()
+{
+       DoActivationEnd();
+}
+
+void ImageView::DeactivationBegin(Animation slideAnimation)
+{
+       DoDeactivationBegin(slideAnimation);
+}
+
+void ImageView::DeactivationEnd()
+{
+       mActive = false;
+       DoDeactivationEnd();
+}
+
+void ImageView::EnterForwardBegin( float navigationDuration )
+{
+       // add root actor to stage
+       if(!mRootActor.GetParent()) {
+               Imageviewer *iv = (Imageviewer *)mSSHandle->dali_viewer_handle;
+               if (iv) {
+                       iv->AddToLayer(MAIN_VIEW_LAYER, mRootActor);
+               }
+       }
+       // reset rotating-root actor, this is needed because we might navigated away from
+       // view whilst it was doing portrait & landscape rotation
+       unsigned int orientationAngle = ( mOrientation == PORTRAIT ? 0 :
+               ( mOrientation == LANDSCAPE ? 270 :
+               ( mOrientation == PORTRAIT_INVERSE ? 180 :
+               ( mOrientation == LANDSCAPE_INVERSE ? 90 : 0 ) ) ) );
+       //orientationAngle = 0;
+       mRotatingRootActor.SetRotation( Degree( orientationAngle ), Vector3::ZAXIS );
+
+       // deriving class is called last
+       DoEnterForwardBegin(navigationDuration);
+}
+
+void ImageView::EnterForwardEnd()
+{
+       mActive = true;
+
+       // deriving class is called last
+       DoEnterForwardEnd();
+}
+
+void ImageView::EnterBackwardBegin( float navigationDuration )
+{
+       // add root actor to stage
+       if (!mRootActor.GetParent()) {
+               Imageviewer *iv = (Imageviewer *)mSSHandle->dali_viewer_handle;
+               if (iv) {
+                       iv->AddToLayer(MAIN_VIEW_LAYER, mRootActor);
+               }
+       }
+
+       // reset rotating-root actor, this is needed because we might navigated away from
+       // view whilst it was doing portrait & landscape rotation
+       unsigned int orientationAngle = ( mOrientation == PORTRAIT ? 0 :
+               ( mOrientation == LANDSCAPE ? 270 :
+               ( mOrientation == PORTRAIT_INVERSE ? 180 :
+               ( mOrientation == LANDSCAPE_INVERSE ? 90 : 0 ) ) ) );
+       //if (0 != orientationAngle) {
+       //      orientationAngle = 0;
+       //}
+       mRotatingRootActor.SetRotation( Degree(orientationAngle), Vector3::ZAXIS );
+
+       // deriving class is called last
+       DoEnterBackwardBegin(navigationDuration);
+}
+
+void ImageView::EnterBackwardEnd()
+{
+       mActive = true;
+
+       // deriving class is called last
+       DoEnterBackwardEnd();
+}
+
+void ImageView::LeaveForwardBegin(float navigationDuration)
+{
+       mActive = false;
+
+       // deriving class is called last
+       DoLeaveForwardBegin(navigationDuration);
+}
+
+void ImageView::LeaveForwardEnd()
+{
+       // remove root actor from stage
+       if(mRootActor.GetParent()) {
+               Dali::Stage::GetCurrent().Remove(mRootActor);
+       }
+
+       // deriving class is called last
+       DoLeaveForwardEnd();
+}
+
+void ImageView::LeaveBackwardBegin(float navigationDuration)
+{
+       mActive = false;
+
+       // deriving class is called last
+       DoLeaveBackwardBegin(navigationDuration);
+}
+
+void ImageView::LeaveBackwardEnd()
+{
+       // remove root actor from stage
+       if(mRootActor.GetParent()) {
+               Dali::Stage::GetCurrent().Remove(mRootActor);
+       }
+
+       // deriving class is called last
+       DoLeaveBackwardEnd();
+}
+
+void ImageView::FocusView()
+{
+       DoFocusView();
+}
+
+ImageView::ImageView()
+: mOrientation( PORTRAIT ), // default orientation upright
+  mActive(false),
+  mAppNavigation( NULL ),
+  mViewStackInfo( NULL )
+{
+       // create root actor in the middle of the stage with the size of the stage
+       mRootActor = Actor::New();
+       mRootActor.SetAnchorPoint(AnchorPoint::CENTER);
+       mRootActor.SetParentOrigin(ParentOrigin::CENTER );
+       Vector2 stageSize = Dali::Stage::GetCurrent().GetSize();
+       mRootActor.SetSize(Dali::Vector3( stageSize ));
+
+       // create a rotating actor, to use as a root for actors which rotate with the device orientation
+       mRotatingRootActor = Actor::New();
+       mRotatingRootActor.SetAnchorPoint(AnchorPoint::CENTER);
+       mRotatingRootActor.SetParentOrigin(ParentOrigin::CENTER);
+       mRotatingRootActor.SetSize(Dali::Vector3(stageSize));
+       mRootActor.Add(mRotatingRootActor);
+}
+
diff --git a/slideshow/src/dali_effect/src/ivug-includes.cpp b/slideshow/src/dali_effect/src/ivug-includes.cpp
new file mode 100644 (file)
index 0000000..6e866d6
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+#include "ivug-includes.h"
+#include "ivug-debug.h"
+
+using namespace Dali::Toolkit;
+
+namespace Imageview3D
+{
+
+ControlOrientation::Type GetControlOrientation(Orientation orientation)
+{
+       ControlOrientation::Type result(ControlOrientation::Up);
+
+       switch (orientation) {
+               case PORTRAIT:
+                       result = ControlOrientation::Up;
+                       break;
+
+               case LANDSCAPE:
+                       result = ControlOrientation::Left;
+                       break;
+
+               case PORTRAIT_INVERSE:
+                       result = ControlOrientation::Down;
+                       break;
+
+               case LANDSCAPE_INVERSE:
+                       result = ControlOrientation::Right;
+                       break;
+
+               default:
+                       break;
+       }
+
+       return result;
+}
+
+void PrintCurrentTime()
+{
+       time_t tt;
+       struct tm *t = NULL;
+       time(&tt);
+       t = localtime(&tt);
+       char currentTime[100] = { '0', };
+       if(t) {
+               snprintf(currentTime, sizeof(currentTime), "current time:%d%d%d",
+                       t->tm_hour, t->tm_min, t->tm_sec);
+       }
+       MSG_EFFECT_HIGH(currentTime);
+}
+
+
+}
+
diff --git a/slideshow/src/dali_effect/src/ivug-slideshow-control.cpp b/slideshow/src/dali_effect/src/ivug-slideshow-control.cpp
new file mode 100644 (file)
index 0000000..0768b7e
--- /dev/null
@@ -0,0 +1,984 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+// CLASS HEADER
+#include "ivug-slideshow-control.h"
+
+// EXTERNAL INCLUDES
+#include <power.h>
+
+// INTERNAL INCLUDES
+#include "ivug-slideshow-effect.h"
+#include "ivug-debug.h"
+#include "ivug-includes.h"
+#include "ivug-dali.h"
+#include "ivug-slideshow-face.h"
+
+// LOCAL STUFF
+namespace
+{
+const int VIEWINGTIME = 2000; // 2 second (milliseconds)
+const int TRANSITIONTIME = 3000; // 3 seconds (milliseconds)
+const int EIGHTY_MILLISECOND = 80; // 80milliseconds
+
+const float DefaultVideoWidth  = 720.0f;
+const float DefaultVideoHeight = 396.0f;
+
+} // end unnamed namespace
+
+using namespace Dali;
+using namespace std;
+
+namespace Imageview3D
+{
+static Eina_Bool pixmap_update (void *data, int type, void *event);
+
+SlideshowControl::SlideshowControl( Dali::Actor parent,
+                  SlideShow *ss_handle,
+                  const std::vector< boost::shared_ptr< SlideshowEffect > >& effects)
+: mParent(parent),
+  mSSHandle(ss_handle),
+  mEffects(effects),
+  mCurrentLayer(0),
+  mSlideshowSize(parent.GetCurrentSize().width, parent.GetCurrentSize().height),
+  mCurrentIndex(0),
+  mCurrentEffect(0),
+  mPlaying(false),
+  mImageReady(false),
+  mTimerReady(false),
+  mPaused(false),
+  mFirstImage(true),
+  mViewTime(VIEWINGTIME),
+  mTransitionTime(TRANSITIONTIME),
+  mVideoTime(TRANSITIONTIME + VIEWINGTIME),
+  mbFinishPlay(false),
+  mFaceCount(0),
+  mCurrentFace(0),
+  mbFaceEffect(false),
+  mCurItem(NULL),
+  mCurIsVideo(false),
+  mPreIsVideo(false),
+  mXPixmap(0),
+  mEventHandler(NULL),
+  mDamage(0),
+  mVideoWidth(DefaultVideoWidth),
+  mVideoHeight(DefaultVideoHeight)
+{
+       IVUG_FUNC_ENTER();
+       // slideshow root
+       mSlideshowRoot = Actor::New();
+       mSlideshowRoot.SetColor(Color::WHITE);
+       // root anchor in the middle
+       mSlideshowRoot.SetAnchorPoint(AnchorPoint::CENTER);
+       mSlideshowRoot.SetParentOrigin(ParentOrigin::CENTER);
+       // constrain to same size as parent actor
+       //mSlideshowRoot.ApplyConstraint(ParentConstraint::Size::New(Dali::ParentSize()));
+       mSlideshowRoot.ApplyConstraint(Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ));
+       // dont multiply parents color
+       mSlideshowRoot.SetColorMode( Dali::USE_OWN_COLOR );
+
+       // layers, create back first as last layer is on top
+       mLayers[ 0 ] = Layer::New();
+       mLayers[ 0 ].SetAnchorPoint( AnchorPoint::CENTER );
+       mLayers[ 0 ].SetParentOrigin( ParentOrigin::CENTER );
+       // constrain to same size as parent actor
+       //mLayers[ 0 ].ApplyConstraint(ParentConstraint::Size::New(Dali::ParentSize()));
+        mLayers[ 0 ].ApplyConstraint(Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ));
+       mSlideshowRoot.Add( mLayers[ 0 ] );
+
+       mLayers[ 1 ] = Layer::New();
+       mLayers[ 1 ].SetAnchorPoint(AnchorPoint::CENTER);
+       mLayers[ 1 ].SetParentOrigin(ParentOrigin::CENTER);
+       // constrain to same size as parent actor
+       //mLayers[ 1 ].ApplyConstraint(ParentConstraint::Size::New(Dali::ParentSize()));
+        mLayers[ 1 ].ApplyConstraint(Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ));
+       mSlideshowRoot.Add(mLayers[ 1 ]);
+
+       mVideoLayer = Layer::New();
+       mVideoLayer.SetAnchorPoint(AnchorPoint::CENTER);
+       mVideoLayer.SetParentOrigin(ParentOrigin::CENTER);
+       // constrain to same size as parent actor
+       //mVideoLayer.ApplyConstraint(ParentConstraint::Size::New(Dali::ParentSize()));
+        mVideoLayer.ApplyConstraint(Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ));
+       mSlideshowRoot.Add(mVideoLayer);
+
+       // two actors to cover the area of screen that the image in view does not cover
+       mSolid = BitmapImage::WHITE();
+       // create borders to cover the rest of the screen
+       mBorder1 = ImageActor::New(mSolid);
+       mBorder2 = ImageActor::New(mSolid);
+       // border1 anchors to top left
+       mBorder1.SetParentOrigin(ParentOrigin::TOP_LEFT);
+       mBorder1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+       // border2 anchors to bottom right
+       mBorder2.SetParentOrigin(ParentOrigin::BOTTOM_RIGHT);
+       mBorder2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT);
+
+       // we dont add root to parent until slideshow starts
+       // as that would make actors visible too soon
+
+       // initialize effects
+       for_each( effects.begin(),
+               effects.end(),
+               boost::bind(&SlideshowEffect::Initialize, _1, parent.GetCurrentPosition()));
+       IVUG_FUNC_LEAVE();
+}
+
+SlideshowControl::~SlideshowControl()
+{
+       IVUG_FUNC_ENTER();
+       Stop();
+       // release remaining actors
+       mBorder1 = NULL;
+       mBorder2 = NULL;
+       mLayers[ 0 ] = NULL;
+       mLayers[ 1 ] = NULL;
+       mVideoLayer = NULL;
+       mSlideshowRoot = NULL;
+       if (mDamage) {
+               ecore_x_damage_free(mDamage);
+       }
+       if (mEventHandler) {
+               ecore_event_handler_del(mEventHandler);
+               mEventHandler = NULL;
+       }
+       if (mXPixmap){
+               ecore_x_pixmap_free(mXPixmap);
+       }
+       IVUG_FUNC_LEAVE();
+}
+
+void SlideshowControl::Play()
+{
+       if (NULL == mSSHandle || (NULL == mSSHandle->media_list)) {
+               return;
+       }
+       int image_count = ivug_medialist_get_count(mSSHandle->media_list);
+       MSG_IVUG_HIGH("images count = %d", image_count);
+       if ( !mPlaying && image_count > 0) {
+               //Disable screen lock during slideshow using power manager
+               power_lock_state(POWER_STATE_NORMAL, 0);
+
+               // add root to stage
+               mParent.Add( mSlideshowRoot );
+
+               // move layers below parent layer to make sure we dont draw over screen furniture
+               mLayers[ 0 ].MoveBelow( mParent.GetLayer());
+               mLayers[ 1 ].MoveBelow(mParent.GetLayer());
+               mVideoLayer.MoveBelow(mParent.GetLayer());
+               // create the timers
+               NewViewAndTransitionTimer();
+
+               // first time we run immediately to fade the image in
+               mTimerReady = true;
+               mFirstImage = true;
+               // start loading first image
+               if (mEffects.size() > 0) {
+                       boost::shared_ptr<SlideshowEffect> effect = mEffects[mCurrentEffect];
+                       if (0 == strcmp(effect->Name().c_str(), FACE_EFFECT_NAME)) {
+                               mbFaceEffect = true;
+                       } else {
+                               mbFaceEffect = false;
+                       }
+               }
+               LoadNextImage();
+               // set flag
+               mPlaying = true;
+       }
+}
+
+void SlideshowControl::SetStartIndex(unsigned int startIndex)
+{
+       // set the start index
+       if (NULL == mSSHandle || (NULL == mSSHandle->media_list)) {
+               return;
+       }
+
+       int image_count = ivug_medialist_get_count(mSSHandle->media_list);
+       MSG_IVUG_HIGH("images count = %d", image_count);
+       mCurrentIndex = startIndex;
+       // wrap around in case too big index given
+       if(image_count > 0)
+               mCurrentIndex %= image_count;
+}
+
+unsigned int SlideshowControl::GetCurrentIndex() const
+{
+       return mCurrentIndex;
+}
+
+void SlideshowControl::Pause()
+{
+       // only pause if playing
+       if( mPlaying ) {
+               mPaused = true;
+       }
+}
+
+bool SlideshowControl::IsPaused()
+{
+       return mPaused;
+}
+
+void SlideshowControl::Resume()
+{
+       if( mPlaying ) {
+               mPaused = false;
+               if( mTimerReady && mImageReady ) {
+                       StartTransition();
+               } else {
+                       // start viewing timer
+                       mTimerReady = false;
+                       mViewTimer.Start();
+               }
+       }
+}
+
+void SlideshowControl::Stop()
+{
+       IVUG_FUNC_ENTER();
+       //reset screen lock state
+       power_unlock_state(POWER_STATE_NORMAL);
+
+       // disconnect from the image loading signal
+       mConnection.disconnect();
+       ImageActor emptyInstance;
+       // remove actors from the stage
+       if( mParent ) {
+               if( mSlideshowRoot ) {
+                       // remove it, don't delete in stop
+                       if( mSlideshowRoot.GetParent() ) {
+                               mSlideshowRoot.GetParent().Remove( mSlideshowRoot );
+                       }
+
+                       // remove layers, don't delete in stop
+                       if ( mLayers[ 0 ] && mLayers[ 0 ].GetParent()) {
+                               mLayers[ 0 ].GetParent().Remove(mLayers[ 0 ]);
+                       }
+                       if (mLayers[ 1 ] && mLayers[ 1 ].GetParent()) {
+                               mLayers[ 1 ].GetParent().Remove(mLayers[ 1 ]);
+                       }
+                       if (mVideoLayer && mVideoLayer.GetParent()) {
+                               mVideoLayer.GetParent().Remove(mVideoLayer);
+                       }
+                       // remove borders, don't delete in stop
+                       if ( mBorder1 && mBorder1.GetParent() ) {
+                               mBorder1.GetParent().Remove( mBorder1 );
+                       }
+                       if ( mBorder2 && mBorder2.GetParent() ) {
+                               mBorder2.GetParent().Remove( mBorder2 );
+                       }
+
+                       // release the actors after borders
+                       if ( mInView && mInView.GetParent() ) {
+                               mInView.GetParent().Remove( mInView );
+                               mInView = emptyInstance;
+                       }
+                       if ( mFadingIn && mFadingIn.GetParent()) {
+                               mFadingIn.GetParent().Remove( mFadingIn );
+                               mFadingIn = emptyInstance;
+                       }
+                       if (mImageActor) {
+                               if (mImageActor.GetParent()) {
+                                       mImageActor.GetParent().Remove(mImageActor);
+                                       mImageActor = emptyInstance;
+                               }
+
+                       }
+               }
+       }
+
+       // delete timers
+       mViewTimer.Reset();
+       mTransitionTimer.Reset();
+       mFirstFaceTimer.Reset();
+       // no more playing
+       mPlaying = false;
+       IVUG_FUNC_LEAVE();
+}
+
+void SlideshowControl::SetSize( Dali::Size size, int Orientation)
+{
+       // if size changed
+       if( size != mSlideshowSize ) {
+               mSlideshowSize = size;
+               mSlideshowRoot.SetSize( mSlideshowSize );
+               // refit the actor and borders
+               FitViewActorAndBorders();
+       }
+       int video_width = 0;
+       int video_height = 0;
+       float scale = 0.55;
+       bool ret = ivug_ss_get_player_attribute(mSSHandle, &video_width, &video_height);
+       MSG_IVUG_HIGH("*******************=%d:%d",video_width,video_height);
+       if ((0 != video_height) && ret ) {
+               scale = (float)video_height/video_width;
+       }
+
+       if ((Orientation == PORTRAIT) || (Orientation == PORTRAIT_INVERSE)) {
+               mVideoWidth = mSlideshowSize.width;
+               mVideoHeight = mVideoWidth*scale;
+       } else {
+               mVideoWidth = mSlideshowSize.width;
+               mVideoHeight = mVideoWidth*scale;
+       }
+       if (mImageActor && mCurIsVideo) {
+               mImageActor.SetSize(mVideoWidth, mVideoHeight);
+       }
+       MSG_IVUG_HIGH("mVideoWidth:mVideoHeight=%f:%f:%f",mVideoWidth,mVideoHeight,scale);
+}
+
+void SlideshowControl::LoadNextImage()
+{
+       IVUG_FUNC_ENTER();
+       ImageAttributes attr;
+       attr.SetSize( mSlideshowSize.width, mSlideshowSize.height );
+       attr.SetScalingMode(ImageAttributes::ShrinkToFit);
+       // get the item
+       //Media_Item* item = ivug_medialist_find_item_by_index((Media_List *)mImages, mCurrentIndex);
+
+       /*mPreItem is NULL, will get the first item*/
+       mPreIsVideo = mCurIsVideo;
+       mCurIsVideo = false;
+       if (NULL == mSSHandle) {
+               return;
+       }
+       mCurrentFace = 0;
+       boost::shared_ptr< SlideshowEffect > effect = mEffects[mCurrentEffect];
+       mCurItem = ivug_ss_dali_get_next_item(mCurItem, mSSHandle);
+       if(mCurItem) {
+               Media_Data *data= ivug_medialist_get_data(mCurItem);
+               if(NULL == data) {
+                       return;
+               }
+               if(data->slide_type == SLIDE_TYPE_VIDEO
+                  || data->slide_type == SLIDE_TYPE_STREAMING) {
+                  if(data->thumbnail_path || data->filepath) {
+                               if (data->thumbnail_path) {
+                                       if (mbFaceEffect) {
+                                               if(effect) {
+                                                       effect->SetImageSize((const char*)data->thumbnail_path);
+                                               }
+                                               mFaceCount = ivug_get_face_cnt(data->mediaID, mSSHandle);
+                                       }
+                                       mNextImage = Image::New( data->thumbnail_path, attr );
+                               }
+
+                               if (data->filepath) {
+                                       mCurIsVideo = true;
+                                       /*only be created once*/
+                                       if (!mImageActor) {
+                                               ivug_ss_create_player_handle(mSSHandle);
+                                               CreateXHPixmap();
+                                       }
+                                       StartVideoPlay(data->filepath);
+                               }
+                  }else {
+                          LoadNextImage();
+                  }
+               } else {
+                       if (data->filepath) {
+                               if (mbFaceEffect) {
+                                       if(effect) {
+                                               effect->SetImageSize((const char*)data->filepath);
+                                       }
+                                       mFaceCount = ivug_get_face_cnt(data->mediaID, mSSHandle);
+                               }
+                               mNextImage = Image::New( data->filepath, attr );
+                       } else {
+                               LoadNextImage();
+                       }
+               }
+               mImageReady = false;
+               // observe image loaded
+               if (!mCurIsVideo) {
+                       MSG_IVUG_HIGH("mCurIsVideo = %d",mCurIsVideo);
+                       if(Dali::ResourceLoading == mNextImage.GetLoadingState()) {
+                               mConnection = mNextImage.SignalLoadingFinished().Connect( this,
+                                       &SlideshowControl::ImageLoaded );
+                       } else if(Dali::ResourceLoadingFailed == mNextImage.GetLoadingState()) {
+                               LoadNextImage();
+                       } else {
+                               // image already loaded
+                               ImageLoaded();
+                       }
+               }
+       } else {
+               mbFinishPlay = true;
+               TimerTick();
+       }
+       IVUG_FUNC_LEAVE();
+}
+
+void SlideshowControl::ImageLoaded()
+{
+       IVUG_FUNC_ENTER();
+       if(Dali::ResourceLoadingFailed == mNextImage.GetLoadingState()) {
+               MSG_IVUG_HIGH("GetLoadingState = %d", mNextImage.GetLoadingState());
+               LoadNextImage();
+
+               return;
+       }
+       // ready to start transition
+       mImageReady = true;
+       /* direct to start transition if pre item is video*/
+       if (mPreIsVideo) {
+               if(mbFinishPlay) {
+                       mTimerReady = false;
+                       StopViewAndTransitionTimer();
+                       ivug_return_main_view(mSSHandle);
+                       mbFinishPlay = false;
+               } else {
+                       StartTransition();
+               }
+       } else {
+               // check if timer is ready
+               if( mTimerReady && mFirstImage) {
+                       StartTransition();
+               }
+       }
+       IVUG_FUNC_LEAVE();
+}
+
+bool SlideshowControl::TimerTick()
+{
+       IVUG_FUNC_ENTER();
+       mTimerReady = true;
+       // check if image is ready
+       // judge for repeat
+       if(mbFinishPlay) {
+               mTimerReady = false;
+               StopViewAndTransitionTimer();
+               ivug_return_main_view(mSSHandle);
+               mbFinishPlay = false;
+               return false;
+       }
+       if (mCurIsVideo) {
+               //mTransitionTimer.Start();
+               return false;
+       } else if (mImageReady) {
+               StartTransition();
+               // tell timer not to call us again
+               return false;
+       }
+       IVUG_FUNC_LEAVE();
+       // else, tick again as image loading seems to take some time
+       return true;
+}
+
+void SlideshowControl::StartTransition()
+{
+       IVUG_FUNC_ENTER();
+       bool bShowPlayIcon = false;
+       // if we're paused or if the slideshow timer is already running, just skip
+       if (mPaused || mTransitionTimer.IsRunning()) {
+               return;
+       }
+       ivug_ss_dali_set_current_item(mCurItem, mSSHandle);
+       if (mCurItem) {
+               Media_Data *data= ivug_medialist_get_data(mCurItem);
+               if(NULL != data) {
+                       if(data->slide_type == SLIDE_TYPE_VIDEO
+                               || data->slide_type == SLIDE_TYPE_STREAMING) {
+                               bShowPlayIcon = true;
+                       }
+               }
+       }
+
+       // actor in view is opaque, fading in is transparent
+       // move front to back, back is now opaque since animation completed
+
+       mInView = mFadingIn;
+       // make a new actor for image that is going to be displayed
+       mFadingIn = ImageActor::New( mNextImage );
+       // position actor in the middle of root
+       mFadingIn.SetAnchorPoint( AnchorPoint::CENTER );
+       mFadingIn.SetParentOrigin( ParentOrigin::CENTER );
+
+       // add new actor to front layer
+       mLayers[ mCurrentLayer ].Add( mFadingIn );
+       mLayers[ mCurrentLayer ].Raise();
+       // parent borders to top layer
+       mLayers[ mCurrentLayer ].Add( mBorder1 );
+       mLayers[ mCurrentLayer ].Add( mBorder2 );
+       // old actor is in back layer
+       ++mCurrentLayer;
+       mCurrentLayer %= 2;
+       mLayers[ mCurrentLayer ].Lower();
+       if (mPreIsVideo) {
+               mVideoLayer.LowerToBottom();
+       }
+       if (mImageActor) {
+               mImageActor.SetVisible(false);
+       }
+
+       // fit new and old actor inside preserving aspect ratio
+       FitViewActorAndBorders();
+       bool fadein = true;
+       // start transition effect
+       boost::shared_ptr< SlideshowEffect > effect;
+       if (mEffects.size() > 0) {
+               effect = mEffects[ mCurrentEffect ];
+               if ( effect ) {
+                       if (mbFaceEffect) {
+                               if (mFaceCount > 0) {
+                                       mCurrentFace = 1;
+                               }
+                       }
+               }
+       }
+
+       if (mFirstImage) {
+               ;
+       } else {
+               //EIGHTY_MILLISECOND used to avoid flashing
+               if (effect.get()) {
+                       if (mbFaceEffect) {
+                               int face_time = mTransitionTime + FACE_SCALE_DURATION
+                                       + EIGHTY_MILLISECOND;
+                               fadein = effect->StartTransition( mInView, mFadingIn,
+                                       face_time, mFaceCount);
+                       } else {
+                               /*fix the blink  EIGHTY_MILLISECOND*/
+                               fadein = effect->StartTransition( mInView, mFadingIn,
+                                       mTransitionTime + EIGHTY_MILLISECOND, mFaceCount);
+                       }
+               }
+       }
+
+       /* first image we don't fade in*/
+       if( fadein && !mFirstImage) {
+               // make fading in invisible (zero alpha)
+               Vector4 color;
+               color = Vector4( Color::WHITE );
+               color.a = 0;
+               mFadingIn.SetColor( color );
+               // borders black with zero alpha
+               color = Vector4( Color::BLACK );
+               color.a = 0;
+               mBorder1.SetColor( color );
+               mBorder2.SetColor( color );
+               // front actor fade in animation
+               // linear fade in, dali::animation takes seconds thus the divide
+               mFadeAnimation = Animation::New(float( mTransitionTime ) / SECONDTIME);
+               mFadeAnimation.OpacityTo( mBorder1,  1.0 );
+               mFadeAnimation.OpacityTo( mBorder2,  1.0 );
+               mFadeAnimation.OpacityTo( mFadingIn, 1.0 );
+               // leave opacity to 1 once animation is done
+               mFadeAnimation.SetEndAction( Animation::Bake );
+               mFadeAnimation.Play();
+       } else {
+       // borders solid black
+               mBorder1.SetColor( Color::BLACK );
+               mBorder2.SetColor( Color::BLACK );
+       }
+       // start timer to call transition completed
+       if (mbFaceEffect && mFaceCount > 0) {
+               mFirstFaceTimer.Start();
+       } else {
+               mTransitionTimer.Start();
+       }
+       IVUG_FUNC_LEAVE();
+}
+
+bool SlideshowControl::TransitionCompleted()
+{
+       IVUG_FUNC_ENTER();
+       MSG_IVUG_HIGH("mCurrentEffect:%d, size:%d",mCurrentEffect, mEffects.size());
+       if(mEffects.size() < 1) {
+               return false;
+       }
+       boost::shared_ptr< SlideshowEffect > effect = mEffects[mCurrentEffect];
+       if (mbFaceEffect && (!mFirstImage)) {
+               MSG_IVUG_HIGH("cu face:%d,sum face:%d", mCurrentFace, mFaceCount);
+               mCurrentFace++;
+               SlideshowEffect *pare_effect = effect.get();
+               if (pare_effect && mCurrentFace <= mFaceCount) {
+                       SlideshowFaceEffect *face_effect =
+                               dynamic_cast<SlideshowFaceEffect *>(pare_effect);
+                       if (face_effect) {
+                               face_effect->TransitionNextFace();
+                               mTransitionTimer.Start();
+                       }
+               }
+       }
+       // complete transition effect
+       if (!mbFaceEffect || mFirstImage
+                       || (mbFaceEffect && (mCurrentFace > mFaceCount))) {
+               if (effect) {
+                       effect->TransitionCompleted( mInView, mFadingIn );
+               }
+
+               // unparent borders
+               if (mBorder1.GetParent()) {
+                       mBorder1.GetParent().Remove( mBorder1 );
+               }
+               if (mBorder2.GetParent()) {
+                       mBorder2.GetParent().Remove( mBorder2 );
+               }
+
+               // fading in is now fully visible so inview can be removed
+               if (mInView) {
+                       if (mInView.GetParent()) {
+                               mInView.GetParent().Remove(mInView);
+                       }
+               }
+               if (mFirstImage) {
+                       mFirstImage = false;
+               }
+               // start loading next image
+               LoadNextImage();
+               // move to next effect
+               ++mCurrentEffect;
+               mCurrentEffect %= mEffects.size();
+               effect = mEffects[ mCurrentEffect ];
+               if( effect ) {
+                       // start viewing mode for the actor with next effect
+                       effect->StartView( mFadingIn, mViewTime );
+               }
+               // start viewing timer
+               mTimerReady = false;
+               mViewTimer.Start();
+               // tell timer not to call us again
+               return false;
+       }
+
+       IVUG_FUNC_LEAVE();
+       // tell timer call us again
+       return true;
+}
+
+bool SlideshowControl::FirstFaceCompleted()
+{
+       IVUG_FUNC_ENTER();
+       MSG_IVUG_HIGH("mCurrentEffect:%d, size:%d",mCurrentEffect, mEffects.size());
+       if(mEffects.size() < 1) {
+               return false;
+       }
+       boost::shared_ptr< SlideshowEffect > effect = mEffects[mCurrentEffect];
+       // complete transition effect
+       if(mFaceCount <=1 || mFirstImage) {
+               if( effect ) {
+                       effect->TransitionCompleted( mInView, mFadingIn );
+               }
+
+               // unparent borders
+               if( mBorder1.GetParent() ) {
+                       mBorder1.GetParent().Remove( mBorder1 );
+               }
+               if( mBorder2.GetParent() ) {
+                       mBorder2.GetParent().Remove( mBorder2 );
+               }
+
+               // fading in is now fully visible so inview can be removed
+               if( mInView ) {
+                       if( mInView.GetParent() ) {
+                               mInView.GetParent().Remove( mInView );
+                       }
+               }
+               if (mFirstImage) {
+                       mFirstImage = false;
+               }
+               // start loading next image
+               LoadNextImage();
+               // move to next effect
+               ++mCurrentEffect;
+               mCurrentEffect %= mEffects.size();
+               effect = mEffects[ mCurrentEffect ];
+               if( effect ) {
+                       // start viewing mode for the actor with next effect
+                       effect->StartView( mFadingIn, mViewTime );
+               }
+               // start viewing timer
+               mTimerReady = false;
+               mViewTimer.Start();
+
+       } else {
+               if (mbFaceEffect) {
+               MSG_IVUG_HIGH("cu face:%d,sum face:%d", mCurrentFace, mFaceCount);
+               mCurrentFace++;
+               SlideshowEffect *pare_effect = effect.get();
+               if (pare_effect && mCurrentFace <= mFaceCount) {
+                       SlideshowFaceEffect *face_effect =
+                               dynamic_cast<SlideshowFaceEffect *>(pare_effect);
+                       if (face_effect) {
+                               face_effect->TransitionNextFace();
+                               mTransitionTimer.Start();
+                       }
+               }
+       }
+       }
+
+       IVUG_FUNC_LEAVE();
+       // tell timer not to call us again
+       return false;
+}
+
+void SlideshowControl::FitViewActorAndBorders()
+{
+       // if actor has been created resize and position it. Its possible
+       // that actor has not yet been created but we switch orientation
+       if( mFadingIn ) {
+               // get image size from the actors image
+               const ImageAttributes imageAttributes = mFadingIn.GetImage().GetAttributes();
+               const Size imageSize( imageAttributes.GetSize() );
+               // fit it inside preserving aspect ratio
+               Size targetSize = Dali::FitInside( mSlideshowSize, imageSize );
+               // check whether to fit width or height
+               float widthScale = mSlideshowSize.width / imageSize.width;
+               float heightScale = mSlideshowSize.height / imageSize.height;
+               if( widthScale < heightScale ) {
+                       // fitting width = 1.0f, constrain height
+                       //mFadingIn.ApplyConstraint( ParentConstraint::Size::New(
+                       //Dali::ParentSizeRelative( Vector3( 1.0f, targetSize.height / mSlideshowSize.height, 1.0f ) ) ) );
+                       mFadingIn.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint(  Vector3( 1.0f, targetSize.height / mSlideshowSize.height, 1.0f ) ) ) );
+
+                       // borders top and bottom
+                       // borders are full width and half the full height minus images size
+                       Size bordersize( mSlideshowSize.width, ( mSlideshowSize.height - targetSize.height ) * 0.5f );
+                       mBorder1.SetSize( bordersize.width, bordersize.height );
+                       mBorder2.SetSize( bordersize.width, bordersize.height );
+               } else {
+                       // fitting height = 1.0f, constrain height
+                       //mFadingIn.ApplyConstraint( ParentConstraint::Size::New(
+                       //Dali::ParentSizeRelative( Vector3( targetSize.width / mSlideshowSize.width, 1.0f, 1.0f ) ) ) );
+                       mFadingIn.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint(  Vector3( targetSize.width / mSlideshowSize.width, 1.0f, 1.0f ) ) ) );
+                       // fitting height so Borders left and right, resize the borders
+                       // borders are full height and half the full width minus images size
+                       Size bordersize( ( mSlideshowSize.width - targetSize.width ) * 0.5, mSlideshowSize.height );
+                       mBorder1.SetSize( bordersize.width, bordersize.height );
+                       mBorder2.SetSize( bordersize.width, bordersize.height );
+               }
+       }
+       // if we got old actor, position it to new center and resize
+       // (this is needed for orientation change case)
+       if( mInView ) {
+               // get image size
+               const ImageAttributes imageAttributes = mInView.GetImage().GetAttributes();
+               const Size imageSize( imageAttributes.GetSize() );
+               // fit it inside preserving aspect ratio
+               Size targetSize = Dali::FitInside( mSlideshowSize, imageSize );
+               // check whether to fit width or height
+               float widthScale = mSlideshowSize.width / imageSize.width;
+               float heightScale = mSlideshowSize.height / imageSize.height;
+               if( widthScale < heightScale ) {
+               // fitting width = 1.0f, constrain height
+               //mInView.ApplyConstraint( ParentConstraint::Size::New(
+               //ParentSizeRelative( Vector3( 1.0f, targetSize.height / mSlideshowSize.height, 1.0f ) ) ) );
+               mInView.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint(  Vector3( 1.0f, targetSize.height / mSlideshowSize.height, 1.0f )  ) ) );
+               } else {
+                       // fitting height = 1.0f, constrain height
+                       //mInView.ApplyConstraint( ParentConstraint::Size::New(
+                       //ParentSizeRelative( Vector3( targetSize.width / mSlideshowSize.width, 1.0f, 1.0f ) ) ) );
+                       mInView.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint(   Vector3( targetSize.width / mSlideshowSize.width, 1.0f, 1.0f )  ) ) );
+               }
+       }
+}
+
+void SlideshowControl::SetViewAndTransitionTime(int time)
+{
+       if (time > TRANSITIONTIME) {
+               mViewTime = time - TRANSITIONTIME;
+               mTransitionTime = TRANSITIONTIME;
+       } else if (time > SMALL_TRANSITIONTIME){
+               mViewTime = time  - SMALL_TRANSITIONTIME;
+               mTransitionTime = SMALL_TRANSITIONTIME;
+       } else {
+               mViewTime = time;
+               mTransitionTime = TRANSITIONTIME;
+       }
+       /* mVideoTime = 2*mViewTime + mTransitionTime */
+       mVideoTime = time + mViewTime;
+}
+
+void SlideshowControl::NewViewAndTransitionTimer(void)
+{
+       // create the timers
+       mViewTimer = Timer::New( mViewTime );
+       mViewTimer.SignalTick().Connect( this, &SlideshowControl::TimerTick );
+       mTransitionTimer = Timer::New( mTransitionTime );
+       mTransitionTimer.SignalTick().Connect(this, &SlideshowControl::TransitionCompleted);
+       mFirstFaceTimer = Timer::New(mTransitionTime + FACE_SCALE_DURATION);
+       mFirstFaceTimer.SignalTick().Connect(this, &SlideshowControl::FirstFaceCompleted);
+}
+
+void SlideshowControl::StopViewAndTransitionTimer(void)
+{
+       mViewTimer.Stop();
+       mTransitionTimer.Stop();
+       mFirstFaceTimer.Stop();
+}
+
+void SlideshowControl::CreatePixmapImage()
+{
+       //IVUG_FUNC_ENTER();
+       if(!mImageActor) {
+               MSG_IVUG_HIGH("***************_mImageActor = NULL");
+               boost::any anyPix = mXPixmap;
+               // create the PixmapImage object
+               Adaptor *adaptor = mSSHandle->adaptor;
+               if (!adaptor) {
+                       return;
+               }
+               PixmapImagePtr PixmapImage = PixmapImage::New(anyPix, *adaptor);
+               if (PixmapImage) {
+                       mVideoImage = Image::New(*PixmapImage);
+                       mImageActor = ImageActor::New(mVideoImage);
+               }
+               if (mImageActor) {
+                       mImageActor.SetSize(mVideoWidth, mVideoHeight);
+
+                       // Center the image
+                       mImageActor.SetAnchorPoint(AnchorPoint::CENTER);
+                       mImageActor.SetParentOrigin(ParentOrigin::CENTER);
+                       mImageActor.SetPosition(0.0f, 0.0f);
+                       Vector4 color;
+                       color = Vector4(Color::TRANSPARENT);
+                       mBorder2.SetColor(color);
+                       // Display the actor on the stage
+                       mVideoLayer.Add(mImageActor);
+                       mAnimVideo = Animation::New((float)mVideoTime/(SECONDTIME*2.0));
+                       mAnimVideo.SetLooping(true);
+                       //mAnimVideo.RotateTo(mImageActor,  Degree(0), Vector3(0.0f, 0.0f, 0.0f), AlphaFunctions::Bounce);
+                       //mAnimVideo.MoveTo(mImageActor, Vector3(20, 20, 200), AlphaFunctions::Bounce);
+                       mAnimVideo.Play();
+               }
+       }
+       //IVUG_FUNC_LEAVE();
+}
+
+
+static Eina_Bool
+pixmap_update (void *data, int type, void *event)
+{
+       /**
+       * This function means video steam was updated.
+       * We can do something to let dali know the updating.
+       */
+       SlideshowControl* ssc = (SlideshowControl*)data;
+       if (ssc) {
+               ssc->CreatePixmapImage();
+       }
+       return ECORE_CALLBACK_PASS_ON;
+}
+
+void SlideshowControl::CreateXHPixmap()
+{
+       IVUG_FUNC_ENTER();
+
+       // create the PixmapImage object
+       if(NULL == mSSHandle) {
+               return;
+       }
+
+       if(!mXPixmap)
+       {
+               mXPixmap = ecore_x_pixmap_new(mSSHandle->xwin, mVideoWidth, mVideoHeight,
+                       ecore_x_default_depth_get(ecore_x_display_get(), ecore_x_default_screen_get()));
+       }
+       // Default the foreground is black is the same with the background color.
+       unsigned int foreground;
+       Ecore_X_GC gc;
+       foreground = 0x000000;
+       gc = ecore_x_gc_new(mXPixmap,
+               ECORE_X_GC_VALUE_MASK_FOREGROUND,
+               &foreground);
+       ecore_x_drawable_rectangle_fill((Ecore_X_Drawable)mXPixmap, gc, 0, 0, mVideoWidth, mVideoHeight);
+       ecore_x_gc_free(gc);
+       ecore_x_sync();
+
+       //reset
+       if (mEventHandler) {
+               ecore_event_handler_del(mEventHandler);
+       }
+       if (mDamage){
+               ecore_x_damage_free(mDamage);
+       }
+
+       //new
+       mDamage = ecore_x_damage_new (mXPixmap, ECORE_X_DAMAGE_REPORT_RAW_RECTANGLES);
+       mEventHandler = ecore_event_handler_add (ECORE_X_EVENT_DAMAGE_NOTIFY, pixmap_update, this);
+       mSSHandle->xPixmapId = mXPixmap;
+
+       MSG_IVUG_HIGH("**********mSSHandle->xPixmapId = %d", mSSHandle->xPixmapId);
+
+       IVUG_FUNC_LEAVE();
+
+}
+
+void SlideshowControl::StartVideoPlay(const char *path)
+{
+       IVUG_FUNC_ENTER();
+
+       if (path == NULL) return;
+       if (mImageActor && !mPreIsVideo) {
+               mImageActor.SetVisible(true);
+       }
+
+       if (mInView) {
+               if (mInView.GetParent()) {
+                       mInView.GetParent().Remove(mInView);
+               }
+       }
+       if ( mFadingIn) {
+               if(mFadingIn.GetParent()) {
+                       mFadingIn.GetParent().Remove(mFadingIn);
+               }
+       }
+       mVideoLayer.RaiseToTop();
+       int width = (int)mVideoWidth;
+       int height = (int)mVideoHeight;
+       if (mSSHandle->bMusicState) {
+               ivug_ss_stop_player(mSSHandle);
+       }
+       ivug_ss_init_player(path, mSSHandle, true);
+       MSG_IVUG_HIGH("***************width:height=%d:%d",width,height);
+       ivug_ss_play_player(mSSHandle);
+       bool bsucess = true;
+       bsucess = ivug_ss_player_message_callback(mSSHandle, this);
+       if (mAnimVideo) {
+               mAnimVideo.Play();
+       }
+       ivug_ss_dali_set_current_item(mCurItem, mSSHandle);
+       if (!bsucess) {
+               mTransitionTimer.Start();
+       }
+
+       IVUG_FUNC_LEAVE();
+}
+
+void SlideshowControl::EndVideoPlay()
+{
+       IVUG_FUNC_ENTER();
+       if (mCurIsVideo) {
+               ivug_ss_stop_player(mSSHandle);
+               if (mAnimVideo) {
+                       mAnimVideo.Stop();
+               }
+       }
+       if (mSSHandle->bMusicState) {
+               ivug_ss_init_player(mSSHandle->music_path, mSSHandle, false);
+               ivug_ss_play_player(mSSHandle);
+       }
+       if (mCurIsVideo) {
+               if (mFirstImage) {
+                       mFirstImage = false;
+               }
+               LoadNextImage();
+               mTimerReady = false;
+               //mViewTimer.Start();
+               MSG_IVUG_HIGH("stop video");
+       }
+       //TransitionCompleted();
+
+       IVUG_FUNC_LEAVE();
+}
+
+} // namespace Imageview3D
diff --git a/slideshow/src/dali_effect/src/ivug-slideshow-effect.cpp b/slideshow/src/dali_effect/src/ivug-slideshow-effect.cpp
new file mode 100644 (file)
index 0000000..7fbea06
--- /dev/null
@@ -0,0 +1,1358 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+// CLASS HEADER
+#include "ivug-slideshow-effect.h"
+#include <dali-toolkit/dali-toolkit.h>
+
+// EXTERNAL INCLUDES
+
+// INTERNAL INCLUDES
+#include "ivug-includes.h"
+#include "ivug-constraints.h"
+#include "ivug-debug.h"
+#include "ivug-dali-util.h"
+#include "ivug-slideshow-face.h"
+#include "ivug-water-ripple-effect.h"
+
+#define IMAGE_PATH                                             PREFIX"/res/images/"PACKAGE
+#define DEFAULT_NOISE_PATH                     IMAGE_PATH"/T01_Noise.png"
+
+// LOCAL STUFF
+namespace
+{
+
+       static float ReverseEaseIn(float progress)
+       {
+               return 1.0f - (progress * progress * progress);
+       }
+
+       static void AnimateTo( Dali::Animation & dali_animation,ShaderEffect& shaderEffect, const std::string& name, Property::Value propertyValue/*float value*/){
+
+               Property::Index index = shaderEffect.GetPropertyIndex( name );
+               if ( Property::INVALID_INDEX == index ){
+                       index = shaderEffect.RegisterProperty( name, propertyValue );
+                       }
+               Property target = Property(shaderEffect,index);
+               dali_animation.AnimateTo(target, propertyValue);
+     }
+
+} // end LOCAL STUFF
+
+using namespace Dali;
+using namespace Dali::Toolkit;
+using namespace std;
+
+namespace Imageview3D
+{
+
+/**
+ * Ripple Slideshow effect
+ */
+class RippleFadeEffect : public SlideshowEffect
+{
+public: // API
+
+       /**
+       * Constructor
+       */
+       RippleFadeEffect( float amplitude )
+       {
+               mEffect = Dali::Toolkit::RippleEffect::New();
+               mAmplitude = amplitude;
+       }
+
+       /**
+       * Destructor
+       */
+       virtual ~RippleFadeEffect()
+       {
+               IVUG_FUNC_ENTER();
+               //mActorAnimation.Pause();
+               IVUG_FUNC_LEAVE();
+       }
+
+       virtual void Stop()
+       {
+               mActorAnimation.Stop();
+       }
+
+       virtual void SetImageSize(const char *path)
+       {
+       }
+
+private: // From SlideshowEffect
+
+       virtual std::string Name()
+       {
+               return RIPPLE_FADE_EFFECT_NAME;
+       }
+
+       /**
+       * @copydoc SlideshowEffect::Initialize
+       */
+       virtual void Initialize( Dali::Vector3 center )
+       {
+               mCenter = Vector2(center.x, center.y);
+       }
+
+       /**
+       * @copydoc SlideshowEffect::StartView
+       */
+       virtual void StartView( Dali::ImageActor /*newActor*/, unsigned int /*duration*/ )
+       { }
+
+       /**
+       * @copydoc SlideshowEffect::StartTransition
+       */
+       virtual bool StartTransition( Dali::ImageActor oldActor,
+                                       Dali::ImageActor newActor,
+                                       unsigned int duration,
+                                       int face_count)
+       {
+               mActorAnimation = Animation::New( duration / SECONDTIME ); // to seconds
+               mActorAnimation.SetEndAction(Animation::Discard);
+               mEffect.SetAmplitude( mAmplitude );
+               mEffect.SetCenter( mCenter );
+               float uTime = 2.0f * Math::PI * ((float)duration) / 1024.0f;
+               mEffect.SetTime( uTime );
+               if ( oldActor ) {
+                       oldActor.SetShaderEffect( mEffect );
+               }
+        Property::Value propertyValue(0.0f);
+        AnimateTo(mActorAnimation,mEffect, mEffect.GetTimePropertyName(),propertyValue);
+        //mActorAnimation.AnimateProperty(mEffect, mEffect.GetTimePropertyName(), 0.0f);
+               mActorAnimation.Play();
+               return true; // x-fade
+       }
+
+       /**
+       * @copydoc SlideshowEffect::TransitionCompleted
+       */
+       virtual void TransitionCompleted( Dali::ImageActor oldActor, Dali::ImageActor newActor )
+       {
+               if( oldActor )
+               {
+                       oldActor.RemoveShaderEffect();
+               }
+               newActor.RemoveShaderEffect();
+       }
+
+private: // Data
+
+       Dali::Toolkit::RippleEffect mEffect;
+       Dali::Vector2 mCenter;
+       float mAmplitude;
+       Dali::Animation mActorAnimation;
+
+};
+
+/**
+ * Dissolve slideshow effect
+ */
+class DissolveEffect : public SlideshowEffect
+{
+public: // API
+
+       /**
+       * Constructor
+       * @param randomize the pixel dissolve
+       */
+       DissolveEffect( bool randomize )
+       : mRandomize( randomize )
+       {
+               mEffect = Dali::Toolkit::DissolveEffect::New();
+       }
+
+       /**
+       * Destructor
+       */
+       virtual ~DissolveEffect()
+       {
+               IVUG_FUNC_ENTER();
+               //mAnimation.Pause();
+               IVUG_FUNC_LEAVE();
+       }
+       virtual void Stop()
+       {
+               mAnimation.Stop();
+       }
+
+       virtual void SetImageSize(const char *path)
+       {
+       }
+
+private: // From SlideshowEffect
+
+       virtual std::string Name()
+       {
+               return DISSOLVE_EFFECT_NAME;
+       }
+
+       /**
+       * @copydoc SlideshowEffect::Initialize
+       */
+       virtual void Initialize( Dali::Vector3 size )
+       {
+               if( mRandomize )
+               {
+                       // on C110 only power of two bitmap updates are supported
+                       int width = Dali::NextPowerOfTwo( size.width * 0.5f );
+                       int height = Dali::NextPowerOfTwo( size.height * 0.5f );
+                       mImage = BitmapImage::New( width, height );
+                       PixelBuffer* ptr = mImage.GetBuffer();
+                       for( unsigned int i = 0; i < mImage.GetBufferSize(); ++i  )
+                       {
+                       *ptr++ = rand();
+                       }
+                       // update the buffer
+                       mImage.BufferUpdated();
+                       mEffect.SetEffectImage( mImage );
+               }
+       }
+
+       /**
+       * @copydoc SlideshowEffect::StartView
+       */
+       virtual void StartView( Dali::ImageActor /*newActor*/, unsigned int /*duration*/ )
+       { }
+
+/**
+* @copydoc SlideshowEffect::StartTransition
+*/
+       virtual bool StartTransition( Dali::ImageActor oldActor,
+                               Dali::ImageActor newActor,
+                               unsigned int duration,
+                               int face_count)
+       {
+               mEffect.SetDistortion(0.0f);
+
+               if( oldActor )
+               {
+                       oldActor.SetShaderEffect( mEffect );
+               }
+
+               mAnimation = Animation::New(duration / SECONDTIME); // to seconds
+        Property::Value propertyValue(1.0f);
+        AnimateTo(mAnimation,mEffect, mEffect.GetDistortionPropertyName(),propertyValue);
+        //mAnimation.AnimateProperty(mEffect, mEffect.GetDistortionPropertyName(), 1.0f);
+               mAnimation.Play();
+
+               return true; // x-fade
+       }
+
+       /**
+       * @copydoc SlideshowEffect::TransitionCompleted
+       */
+       virtual void TransitionCompleted( Dali::ImageActor oldActor, Dali::ImageActor /*newActor*/ )
+       {
+               if( oldActor )
+               {
+                       // no recurse
+                       oldActor.RemoveShaderEffect();
+               }
+       }
+
+private: // Data
+
+       bool mRandomize;
+       Dali::Toolkit::DissolveEffect mEffect;
+       Dali::BitmapImage mImage;
+       Dali::Animation mAnimation;
+};
+
+/**
+ * Image Zoom slide show effect
+ */
+class ZoomEffect : public SlideshowEffect
+{
+public: // API
+
+       /**
+       * Constructor
+       */
+       ZoomEffect()
+       { }
+
+       /**
+       * Destructor
+       */
+       virtual ~ZoomEffect()
+       {
+               IVUG_FUNC_ENTER();
+               //mAnimation.Pause();
+               IVUG_FUNC_LEAVE();
+       }
+
+       virtual void Stop()
+       {
+               mAnimation.Stop();
+       }
+
+       virtual void SetImageSize(const char *path)
+       {
+       }
+
+private: // From SlideshowEffect
+
+       virtual std::string Name()
+       {
+               return ZOOM_EFFECT_NAME;
+       }
+
+       /**
+       * @copydoc SlideshowEffect::Initialize
+       */
+       virtual void Initialize( Dali::Vector3 /*size*/ )
+       { }
+
+       /**
+       * @copydoc SlideshowEffect::StartView
+       */
+       virtual void StartView( Dali::ImageActor /*newActor*/, unsigned int /*duration*/ )
+       { }
+
+       /**
+       * @copydoc SlideshowEffect::StartTransition
+       */
+
+       virtual bool StartTransition( Dali::ImageActor oldActor,
+                                       Dali::ImageActor newActor,
+                                       unsigned int duration,
+                                       int face_count)
+       {
+               mAnimation = Animation::New(duration/(2*SECONDTIME)); // change to seconds and half the transition
+               if( oldActor )
+               {
+                       // old actor zooms and rotates away
+                       mAnimation.MoveBy( oldActor, 0.0f, 0.0f, 500.0f );
+                       mAnimation.OpacityTo( oldActor, 0.0f );
+                       mAnimation.RotateBy( oldActor, Radian(Math::PI*0.5), Vector3::ZAXIS);
+                       mAnimation.SetEndAction( Animation::Bake );
+               }
+               if( newActor )
+               {
+                       // new actor zooms in and rotates
+                       mAnimation.MoveBy( newActor, Vector3(0.0f, 0.0f, -500), ReverseEaseIn );
+                       mAnimation.OpacityTo( newActor, 0.0f, ReverseEaseIn );
+                       mAnimation.RotateBy( newActor, Radian(-Math::PI*0.5), Vector3::ZAXIS, ReverseEaseIn );
+                       mAnimation.SetEndAction( Animation::Bake );
+               }
+               mAnimation.Play();
+
+               return false; // with x fade
+       }
+
+       /**
+       * @copydoc SlideshowEffect::TransitionCompleted
+       */
+       virtual void TransitionCompleted( Dali::ImageActor oldActor, Dali::ImageActor newActor )
+       {
+       }
+
+private: // Data
+
+       Animation mAnimation;
+};
+
+/**
+ * Image Split slide show effect
+ */
+class SplitEffect : public SlideshowEffect
+{
+public: // API
+
+       /**
+       * Constructor
+       */
+       SplitEffect()
+       {
+               mPlaceholder = BitmapImage::WHITE();
+       }
+
+       /**
+       * Destructor
+       */
+       virtual ~SplitEffect()
+       {
+               //mAnimation.Pause();
+       }
+
+
+       virtual void Stop()
+       {
+               mAnimation.Stop();
+       }
+
+       virtual void SetImageSize(const char *path)
+       {
+       }
+
+private: // From SlideshowEffect
+
+       virtual std::string Name()
+       {
+               return SPLIT_EFFECT_NAME;
+       }
+
+       /**
+       * @copydoc SlideshowEffect::Initialize
+       */
+       virtual void Initialize( Dali::Vector3 /*size*/ )
+       {
+               mLayer = Layer::New();
+               mLayer.SetParentOrigin( ParentOrigin::CENTER );
+               mLayer.SetAnchorPoint( AnchorPoint::CENTER );
+               mOldActorSlices[ 0 ] = ImageActor::New(mPlaceholder);
+               mOldActorSlices[ 1 ] = ImageActor::New(mPlaceholder);
+               mOldActorSlices[ 2 ] = ImageActor::New(mPlaceholder);
+               mOldActorSlices[ 3 ] = ImageActor::New(mPlaceholder);
+               mOldActorSlices[ 4 ] = ImageActor::New(mPlaceholder);
+               mOldActorSlices[ 0 ].SetParentOrigin( ParentOrigin::CENTER );
+               mOldActorSlices[ 0 ].SetAnchorPoint( AnchorPoint::CENTER );
+               mOldActorSlices[ 1 ].SetParentOrigin( ParentOrigin::CENTER );
+               mOldActorSlices[ 1 ].SetAnchorPoint( AnchorPoint::CENTER );
+               mOldActorSlices[ 2 ].SetParentOrigin( ParentOrigin::CENTER );
+               mOldActorSlices[ 2 ].SetAnchorPoint( AnchorPoint::CENTER );
+               mOldActorSlices[ 3 ].SetParentOrigin( ParentOrigin::CENTER );
+               mOldActorSlices[ 3 ].SetAnchorPoint( AnchorPoint::CENTER );
+               mOldActorSlices[ 4 ].SetParentOrigin( ParentOrigin::CENTER );
+               mOldActorSlices[ 4 ].SetAnchorPoint( AnchorPoint::CENTER );
+               mOldActorSlices[ 0 ].SetColorMode( Dali::USE_OWN_COLOR );
+               mOldActorSlices[ 1 ].SetColorMode( Dali::USE_OWN_COLOR );
+               mOldActorSlices[ 2 ].SetColorMode( Dali::USE_OWN_COLOR );
+               mOldActorSlices[ 3 ].SetColorMode( Dali::USE_OWN_COLOR );
+               mOldActorSlices[ 4 ].SetColorMode( Dali::USE_OWN_COLOR );
+               mLayer.Add( mOldActorSlices[ 0 ] );
+               mLayer.Add( mOldActorSlices[ 1 ] );
+               mLayer.Add( mOldActorSlices[ 2 ] );
+               mLayer.Add( mOldActorSlices[ 3 ] );
+               mLayer.Add( mOldActorSlices[ 4 ] );
+       }
+
+       /**
+       * @copydoc SlideshowEffect::StartView
+       */
+       virtual void StartView( Dali::ImageActor /*newActor*/, unsigned int /*duration*/ )
+       { }
+
+       /**
+       * @copydoc SlideshowEffect::StartTransition
+       */
+       virtual bool StartTransition( Dali::ImageActor oldActor,
+                               Dali::ImageActor newActor,
+                               unsigned int duration,
+                               int face_count)
+       {
+       if( oldActor )
+       {
+               // get the image of the old actor
+               Image oldImage = oldActor.GetImage();
+               ImageAttributes attr = oldImage.GetAttributes();
+               // image is loaded at this point
+               float sliceWidth = float( attr.GetSize().width ) * 0.2f;
+
+               Rect<int> pixels1( sliceWidth * 0.0f, 0, sliceWidth, attr.GetSize().height );
+               Rect<int> pixels2( sliceWidth * 1.0f, 0, sliceWidth, attr.GetSize().height );
+               Rect<int> pixels3( sliceWidth * 2.0f, 0, sliceWidth, attr.GetSize().height );
+               Rect<int> pixels4( sliceWidth * 3.0f, 0, sliceWidth, attr.GetSize().height );
+               Rect<int> pixels5( sliceWidth * 4.0f, 0, sliceWidth, attr.GetSize().height );
+
+               mOldActorSlices[ 0 ].SetImage( oldImage );
+               mOldActorSlices[ 1 ].SetImage( oldImage );
+               mOldActorSlices[ 2 ].SetImage( oldImage );
+               mOldActorSlices[ 3 ].SetImage( oldImage );
+               mOldActorSlices[ 4 ].SetImage( oldImage );
+
+               mOldActorSlices[ 0 ].SetPixelArea( pixels1 );
+               mOldActorSlices[ 1 ].SetPixelArea( pixels2 );
+               mOldActorSlices[ 2 ].SetPixelArea( pixels3 );
+               mOldActorSlices[ 3 ].SetPixelArea( pixels4 );
+               mOldActorSlices[ 4 ].SetPixelArea( pixels5 );
+
+               // hide old full screen picture
+               oldActor.SetImage( mPlaceholder );
+               oldActor.SetColor( Vector4( 0, 0, 0, 0 ) );
+
+               oldActor.Add( mLayer );
+               mLayer.MoveAbove( newActor.GetLayer() );
+               // constrain to same size as parent actor
+               mLayer.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
+
+
+               mOldActorSlices[ 0 ].RemoveConstraints();
+               mOldActorSlices[ 1 ].RemoveConstraints();
+               mOldActorSlices[ 2 ].RemoveConstraints();
+               mOldActorSlices[ 3 ].RemoveConstraints();
+               mOldActorSlices[ 4 ].RemoveConstraints();
+
+               mOldActorSlices[ 0 ].ApplyConstraint( Constraint::New<Vector3>( Actor::POSITION,ParentSource( Actor::SIZE ),PercentageOfParentWidth( -2 * 0.2f )));
+               mOldActorSlices[ 1 ].ApplyConstraint( Constraint::New<Vector3>( Actor::POSITION,ParentSource( Actor::SIZE ),PercentageOfParentWidth( -1 * 0.2f )));
+               mOldActorSlices[ 2 ].ApplyConstraint( Constraint::New<Vector3>( Actor::POSITION,ParentSource( Actor::SIZE ),PercentageOfParentWidth(  0 * 0.2f )));
+               mOldActorSlices[ 3 ].ApplyConstraint( Constraint::New<Vector3>( Actor::POSITION,ParentSource( Actor::SIZE ),PercentageOfParentWidth(  1 * 0.2f )));
+               mOldActorSlices[ 4 ].ApplyConstraint( Constraint::New<Vector3>( Actor::POSITION,ParentSource( Actor::SIZE ),PercentageOfParentWidth(  2 * 0.2f )));
+
+               mOldActorSlices[ 0 ].ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint(  Vector3( 0.2f, 1.0f, 1.0f ) ) ) );
+               mOldActorSlices[ 1 ].ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint(  Vector3( 0.2f, 1.0f, 1.0f ) ) ) );
+               mOldActorSlices[ 2 ].ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint(  Vector3( 0.2f, 1.0f, 1.0f ) ) ) );
+               mOldActorSlices[ 3 ].ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint(  Vector3( 0.2f, 1.0f, 1.0f ) ) ) );
+               mOldActorSlices[ 4 ].ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint(  Vector3( 0.2f, 1.0f, 1.0f ) ) ) );
+
+               mOldActorSlices[ 0 ].SetColor( Vector4( 1, 1, 1, 1 ) );
+               mOldActorSlices[ 1 ].SetColor( Vector4( 1, 1, 1, 1 ) );
+               mOldActorSlices[ 2 ].SetColor( Vector4( 1, 1, 1, 1 ) );
+               mOldActorSlices[ 3 ].SetColor( Vector4( 1, 1, 1, 1 ) );
+               mOldActorSlices[ 4 ].SetColor( Vector4( 1, 1, 1, 1 ) );
+
+               mOldActorSlices[ 0 ].SetRotation( Degree(0.0f), Vector3::YAXIS );
+               mOldActorSlices[ 1 ].SetRotation( Degree(0.0f), Vector3::YAXIS );
+               mOldActorSlices[ 2 ].SetRotation( Degree(0.0f), Vector3::YAXIS );
+               mOldActorSlices[ 3 ].SetRotation( Degree(0.0f), Vector3::YAXIS );
+               mOldActorSlices[ 4 ].SetRotation( Degree(0.0f), Vector3::YAXIS );
+
+               newActor.SetColor( Vector4( 1, 1, 1, 0 ) );
+
+               mAnimation = Animation::New(duration / 1000.0f); // milliseconds => seconds
+
+               mAnimation.OpacityTo( mOldActorSlices[ 0 ], 0.5f, AlphaFunctions::Linear );
+               mAnimation.OpacityTo( mOldActorSlices[ 1 ], 0.5f, AlphaFunctions::Linear );
+               mAnimation.OpacityTo( mOldActorSlices[ 2 ], 0.5f, AlphaFunctions::Linear );
+               mAnimation.OpacityTo( mOldActorSlices[ 3 ], 0.5f, AlphaFunctions::Linear );
+               mAnimation.OpacityTo( mOldActorSlices[ 4 ], 0.5f, AlphaFunctions::Linear );
+
+               mAnimation.RotateBy( mOldActorSlices[ 0 ], Degree(-90.0f), Vector3::YAXIS, AlphaFunctions::EaseIn );
+               mAnimation.RotateBy( mOldActorSlices[ 1 ], Degree(-90.0f), Vector3::YAXIS, AlphaFunctions::EaseIn );
+               mAnimation.RotateBy( mOldActorSlices[ 2 ], Degree(-90.0f), Vector3::YAXIS, AlphaFunctions::EaseIn );
+               mAnimation.RotateBy( mOldActorSlices[ 3 ], Degree(-90.0f), Vector3::YAXIS, AlphaFunctions::EaseIn );
+               mAnimation.RotateBy( mOldActorSlices[ 4 ], Degree(-90.0f), Vector3::YAXIS, AlphaFunctions::EaseIn );
+
+               mAnimation.OpacityTo( newActor, 1.0f, AlphaFunctions::EaseIn );
+               mAnimation.MoveBy( newActor, Vector3(0.0f, 0.0f, -100), ReverseEaseIn );
+
+               mAnimation.Play();
+       }
+
+       return false; // no x fade
+       }
+
+       /**
+       * @copydoc SlideshowEffect::TransitionCompleted
+       */
+       virtual void TransitionCompleted( Dali::ImageActor oldActor, Dali::ImageActor newActor )
+       {
+       if( oldActor )
+       {
+               oldActor.Remove( mLayer );
+       }
+       }
+
+       private: // Data
+
+               Dali::Layer mLayer;
+               Dali::Image mPlaceholder;
+               Dali::ImageActor mOldActorSlices[ 5 ];
+
+               Dali::Animation mAnimation;
+
+};
+
+/**
+* Swirl effect for slideshow
+*/
+class SwirlEffect : public SlideshowEffect
+{
+public: // API
+
+       /**
+       * Constructor
+       * @param warp a bit more
+       */
+       SwirlEffect( bool warp )
+       {
+
+               mShaderEffect = Dali::Toolkit::SwirlEffect::New(warp);
+               mShaderEffectNew = Dali::Toolkit::SwirlEffect::New(warp);
+
+               // set uniforms
+               mShaderEffect.SetAngle(0.0f);
+               mShaderEffectNew.SetAngle(2.0f);
+       }
+
+       /**
+       * Destructor
+       */
+       virtual ~SwirlEffect()
+       {
+               IVUG_FUNC_ENTER();
+               //mAnimation.Pause();
+       }
+
+       virtual void Stop()
+       {
+               mAnimation.Stop();
+       }
+
+       virtual void SetImageSize(const char *path)
+       {
+       }
+
+private: // From SlideshowEffect
+
+       virtual std::string Name()
+       {
+               return SWIRL_EFFECT_NAME;
+       }
+
+       /**
+       * @copydoc SlideshowEffect::Initialize
+       */
+       virtual void Initialize( Dali::Vector3 size )
+       {
+       }
+
+       /**
+       * @copydoc SlideshowEffect::StartView
+       */
+       virtual void StartView( Dali::ImageActor /*newActor*/, unsigned int /*duration*/ )
+       { }
+
+       /**
+       * @copydoc SlideshowEffect::StartTransition
+       */
+       virtual bool StartTransition( Dali::ImageActor oldActor,
+                                       Dali::ImageActor newActor,
+                                       unsigned int duration,
+                                       int face_count)
+       {
+               IVUG_FUNC_ENTER();
+               mAnimation = Animation::New( duration / SECONDTIME ); // to seconds
+               mAnimation.SetEndAction(Animation::Discard);
+               if( oldActor ) {
+                       // get the image of the old actor
+                       Image oldImage = oldActor.GetImage();
+                       ImageAttributes attr = oldImage.GetAttributes();
+                       // set uniforms, need power of two of the texture for size, center in middle of image
+                       Vector2 imageSize( attr.GetSize() );
+                       Vector2 imageSizePow2( Dali::NextPowerOfTwo( attr.GetSize().width ), Dali::NextPowerOfTwo( attr.GetSize().height ) );
+                       Vector2 adjusted( imageSize.x / imageSizePow2.x, imageSize.y / imageSizePow2.y );
+                       Vector2 center( adjusted.width * 0.5f, adjusted.height * 0.5f );
+
+                       mShaderEffect.SetRadius( std::max( adjusted.width, adjusted.height ) );
+                       mShaderEffect.SetCenter( center );
+
+                       // apply shader effect
+                       oldActor.SetShaderEffect(mShaderEffect);
+                       // animate swirl
+                       Property::Value propertyValue(2.0f);
+                       AnimateTo(mAnimation,mShaderEffect, mShaderEffect.GetAnglePropertyName(),propertyValue);
+                       //mAnimation.AnimateProperty(mShaderEffect, mShaderEffect.GetAnglePropertyName(), 2.0f);
+               }
+               if( newActor ) {
+                       // get the image of the old actor
+                       Image newImage = newActor.GetImage();
+                       ImageAttributes attr = newImage.GetAttributes();
+                       // set uniforms, need power of two of the texture for size, center in middle of image
+                       Vector2 imageSize( attr.GetSize() );
+                       Vector2 imageSizePow2( Dali::NextPowerOfTwo( attr.GetSize().width ), Dali::NextPowerOfTwo( attr.GetSize().height ) );
+                       Vector2 adjusted( imageSize.x / imageSizePow2.x, imageSize.y / imageSizePow2.y );
+                       Vector2 center( adjusted.width * 0.5f, adjusted.height * 0.5f );
+
+                       mShaderEffectNew.SetRadius( std::max( adjusted.width, adjusted.height ) );
+                       mShaderEffectNew.SetCenter( center );
+
+                       // apply shader effect
+                       newActor.SetShaderEffect(mShaderEffectNew);
+                       // animate swirl
+                       Property::Value propertyValue(0.0f);
+                       AnimateTo(mAnimation,mShaderEffectNew, mShaderEffectNew.GetAnglePropertyName(),propertyValue);
+                       //mAnimation.AnimateProperty(mShaderEffectNew, mShaderEffectNew.GetAnglePropertyName(), 0.0f);
+               }
+               mAnimation.Play();
+               IVUG_FUNC_LEAVE();
+
+               return true; // with x fade
+       }
+
+       /**
+       * @copydoc SlideshowEffect::TransitionCompleted
+       */
+       virtual void TransitionCompleted( Dali::ImageActor oldActor, Dali::ImageActor newActor )
+       {
+               if( oldActor )
+               {
+                       // remove shader
+                       oldActor.RemoveShaderEffect();
+                       // reset angle
+                       mShaderEffect.SetAngle( 0.0f );
+               }
+               if( newActor )
+               {
+                       // remove shader
+                       newActor.RemoveShaderEffect();
+                       // reset angle
+                       mShaderEffectNew.SetAngle( 2.0f );
+               }
+       }
+
+private: // Data
+
+       Animation mAnimation;
+       Dali::Toolkit::SwirlEffect mShaderEffect;
+       Dali::Toolkit::SwirlEffect mShaderEffectNew;
+
+};
+
+#if 0
+/*if need this effect,please open it*/
+/**
+* WaterRippleEffectExtension for slideshow
+* this is a new effect.
+*/
+class WaterRippleEffectExtension: public SlideshowEffect
+{
+public: // API
+
+       /**
+       * Constructor
+       */
+       WaterRippleEffectExtension()
+       {
+               mShaderEffect = WaterEffect::New(1);
+       }
+
+       /**
+       * Destructor
+       */
+       virtual ~WaterRippleEffectExtension()
+       {
+               //mActorAnimation.Pause();
+       }
+
+       virtual void Stop()
+       {
+               mActorAnimation.Stop();
+       }
+
+       virtual void SetImageSize(const char *path)
+       {
+       }
+
+
+private: // From SlideshowEffect
+
+       virtual std::string Name()
+       {
+               return WATER_RIPPLE_EFFECT_NAME;
+       }
+
+       /**
+       * @copydoc SlideshowEffect::Initialize
+       */
+       virtual void Initialize( Dali::Vector3 /*size*/ )
+       { }
+
+       /**
+       * @copydoc SlideshowEffect::StartView
+       */
+       virtual void StartView( Dali::ImageActor /*newActor*/, unsigned int /*duration*/ )
+       { }
+
+       /**
+       * @copydoc SlideshowEffect::StartTransition
+       */
+       virtual bool StartTransition( Dali::ImageActor oldActor,
+                                               Dali::ImageActor newActor,
+                                               unsigned int duration,
+                                               int face_count)
+       {
+       mActorAnimation = Animation::New( duration / SECONDTIME ); // to seconds
+       mActorAnimation.SetEndAction(Animation::Discard);
+       if (oldActor) {
+               // get the image of the old actor
+               Dali::Vector3 size_new = oldActor.GetCurrentSize();
+               //mShaderEffect.SetTextureSize(imageSize);
+               Dali::Vector3 position_new = oldActor.GetCurrentPosition();
+               oldActor.SetShaderEffect(mShaderEffect);
+               Dali::Vector2 center_new(position_new.x, position_new.y);
+               mShaderEffect.SetCenter(0, center_new);
+               mShaderEffect.SetPropagation(0, 2.0f);
+               mShaderEffect.SetAmplitude(0, 3.0f);
+
+               // animate ripple
+               mActorAnimation.AnimateProperty(mShaderEffect, mShaderEffect.GetPropagationPropertyName(0),
+                       std::max(size_new.width, size_new.height),Dali::AlphaFunctions::Linear);
+               mActorAnimation.AnimateProperty(mShaderEffect, mShaderEffect.GetAmplitudePropertyName(0),
+                       0.0f, Dali::AlphaFunctions::EaseOut);
+       }
+       mActorAnimation.Play();
+
+       return true; // with x fade
+       }
+
+       /**
+       * @copydoc SlideshowEffect::TransitionCompleted
+       */
+       virtual void TransitionCompleted( Dali::ImageActor oldActor, Dali::ImageActor newActor )
+       {
+               if( oldActor )
+               {
+                       // remove shader
+                       oldActor.RemoveShaderEffect();
+               }
+       }
+
+private: // Data
+
+       Dali::Animation mActorAnimation;
+
+       Dali::Toolkit::WaterEffect mShaderEffect;
+
+};
+#endif
+
+/**
+* 2D ripple effect for slideshow
+*/
+class WaterRippleEffect : public SlideshowEffect
+{
+public: // API
+
+       /**
+       * Constructor
+       */
+       WaterRippleEffect()
+       {
+               mShaderEffect = WaterEffectRipple2D::New();
+               mShaderEffect.SetTime( 0.0f );
+               mShaderEffect.SetAmplitude( 0.0f );
+
+               mShaderEffectNew = WaterEffectRipple2D::New();
+               // reset time and amplitude
+               mShaderEffectNew.SetTime( 5.0f );
+               mShaderEffectNew.SetAmplitude( 0.10f );
+       }
+
+       /**
+       * Destructor
+       */
+       virtual ~WaterRippleEffect()
+       {
+               //mActorAnimation.Pause();
+       }
+
+       virtual void Stop()
+       {
+               mActorAnimation.Stop();
+       }
+
+       virtual void SetImageSize(const char *path)
+       {
+       }
+
+
+private: // From SlideshowEffect
+
+       virtual std::string Name()
+       {
+               return WATER_RIPPLE_EFFECT_NAME;
+       }
+
+       /**
+       * @copydoc SlideshowEffect::Initialize
+       */
+       virtual void Initialize( Dali::Vector3 /*size*/ )
+       { }
+
+       /**
+       * @copydoc SlideshowEffect::StartView
+       */
+       virtual void StartView( Dali::ImageActor /*newActor*/, unsigned int /*duration*/ )
+       { }
+
+       /**
+       * @copydoc SlideshowEffect::StartTransition
+       */
+       virtual bool StartTransition( Dali::ImageActor oldActor,
+                                               Dali::ImageActor newActor,
+                                               unsigned int duration,
+                                               int face_count)
+       {
+       mActorAnimation = Animation::New( duration / SECONDTIME ); // to seconds
+       mActorAnimation.SetEndAction(Animation::Discard);
+       if( oldActor )
+       {
+               // get the image of the old actor
+               Image oldImage = oldActor.GetImage();
+               ImageAttributes attr = oldImage.GetAttributes();
+               // apply shader effect
+               oldActor.SetShaderEffect(mShaderEffect);
+               Vector2 imageSize(attr.GetSize());
+               Vector2 imageSizePow2(Dali::NextPowerOfTwo( attr.GetSize().width ), Dali::NextPowerOfTwo( attr.GetSize().height ));
+               mShaderEffect.SetTextureSize(Vector2( imageSize.x / imageSizePow2.x, imageSize.y / imageSizePow2.y ));
+               // set uniforms
+               //mShaderEffect.SetTextureScale(0.2);
+               // animate ripple
+               Property::Value propertyValue(5.0f);
+        AnimateTo(mActorAnimation,mShaderEffect, mShaderEffect.GetTimePropertyName(),propertyValue);
+        //mActorAnimation.AnimateProperty(mShaderEffect, mShaderEffect.GetTimePropertyName(), 5.0f);
+        Property::Value propertyValue1(0.10f);
+        AnimateTo(mActorAnimation,mShaderEffect, mShaderEffect.GetAmplitudePropertyName(),propertyValue1);
+        //mActorAnimation.AnimateProperty(mShaderEffect, mShaderEffect.GetAmplitudePropertyName(), 0.10f);
+
+       }
+       if( newActor )
+       {
+               // apply shader effect
+               Image newImage = newActor.GetImage();
+               ImageAttributes attr = newImage.GetAttributes();
+               newActor.SetShaderEffect(mShaderEffectNew);
+               // set uniforms
+               Vector2 imageSize(attr.GetSize());
+               Vector2 imageSizePow2( Dali::NextPowerOfTwo(attr.GetSize().width), Dali::NextPowerOfTwo(attr.GetSize().height));
+               mShaderEffectNew.SetTextureSize( Vector2( imageSize.x / imageSizePow2.x, imageSize.y / imageSizePow2.y ) );
+
+               //mShaderEffectNew.SetTextureScale(0.2);
+               // animate ripple, reverse from old images
+                Property::Value propertyValue(0.0f);
+        AnimateTo(mActorAnimation,mShaderEffectNew, mShaderEffectNew.GetTimePropertyName(),propertyValue);
+        //mActorAnimation.AnimateProperty(mShaderEffectNew, mShaderEffectNew.GetTimePropertyName(), 0.0f);
+        Property::Value propertyValue1(0.0f);
+        AnimateTo(mActorAnimation,mShaderEffectNew, mShaderEffectNew.GetAmplitudePropertyName(),propertyValue1);
+         //mActorAnimation.AnimateProperty(mShaderEffectNew, mShaderEffectNew.GetAmplitudePropertyName(), 0.0f);
+       }
+       mActorAnimation.Play();
+
+       return true; // with x fade
+       }
+
+       /**
+       * @copydoc SlideshowEffect::TransitionCompleted
+       */
+       virtual void TransitionCompleted( Dali::ImageActor oldActor, Dali::ImageActor newActor )
+       {
+               if( oldActor )
+               {
+                       // remove shader
+                       oldActor.RemoveShaderEffect();
+                       // reset time and amplitude
+                       mShaderEffect.SetTime( 0.0f );
+                       mShaderEffect.SetAmplitude( 0.0f );
+               }
+               if( newActor )
+               {
+                       // remove shader
+                       newActor.RemoveShaderEffect();
+                       // reset time and amplitude
+                       mShaderEffectNew.SetTime( 5.0f );
+                       mShaderEffectNew.SetAmplitude( 0.10f );
+               }
+       }
+
+private: // Data
+
+       Dali::Animation mActorAnimation;
+
+       Dali::Toolkit::WaterEffectRipple2D mShaderEffect;
+       Dali::Toolkit::WaterEffectRipple2D mShaderEffectNew;
+
+};
+
+/**
+ * Image Slide slide show effect
+ */
+class SlideEffect : public SlideshowEffect
+{
+public: // API
+       /**
+       * Constructor
+       */
+       SlideEffect()
+       {
+       }
+       /**
+       * Destructor
+       */
+       virtual ~SlideEffect()
+       {
+               //mAnimation.Pause();
+       }
+
+       virtual void Stop()
+       {
+               mAnimation.Stop();
+       }
+
+       virtual void SetImageSize(const char *path)
+       {
+       }
+
+private: // From SlideshowEffect
+
+       virtual std::string Name()
+       {
+               return SLIDE_EFFECT_NAME;
+       }
+       /**
+       * @copydoc SlideshowEffect::Initialize
+       */
+       virtual void Initialize( Dali::Vector3 /*size*/ )
+       {
+       }
+
+       /**
+       * @copydoc SlideshowEffect::StartView
+       */
+       virtual void StartView( Dali::ImageActor /*newActor*/, unsigned int /*duration*/ )
+       { }
+       /**
+       * @copydoc SlideshowEffect::StartTransition
+       */
+       virtual bool StartTransition( Dali::ImageActor oldActor,
+                                       Dali::ImageActor newActor,
+                                       unsigned int duration,
+                                       int face_count)
+       {
+               mAnimation = Animation::New(duration /(2*SECONDTIME)); // change to seconds and half the transition
+               if(oldActor)
+               {
+                       // old actor slides and rotates away
+                       mAnimation.MoveBy( oldActor, -500.0f, 0.0f, 0.0f );
+                       mAnimation.OpacityTo( oldActor, 0.0f );
+                       mAnimation.SetEndAction( Animation::Bake );
+               }
+               if(newActor)
+               {
+                       // new actor zooms in and rotates
+                       mAnimation.MoveBy( newActor, Vector3(500.0f, 0.0f, 0.0f), ReverseEaseIn );
+                       mAnimation.OpacityTo( newActor, 0.0f, ReverseEaseIn );
+                       mAnimation.SetEndAction( Animation::Bake );
+               }
+               mAnimation.Play();
+               return false; // no x fade
+
+       }
+       /**
+       * @copydoc SlideshowEffect::TransitionCompleted
+       */
+       virtual void TransitionCompleted( Dali::ImageActor oldActor, Dali::ImageActor newActor )
+       {
+               if( oldActor )
+               {
+               }
+       }
+
+private: // Data
+       Dali::Animation mAnimation;
+};
+
+/**
+* Iris effect for slideshow
+*/
+
+class IrisShowEffect : public SlideshowEffect
+{
+public: // API
+
+       /**
+       * Constructor
+       * @param warp a bit more
+       */
+       IrisShowEffect()
+       {
+               IVUG_FUNC_ENTER();
+
+               mShaderEffect = IrisEffect::New();
+               mShaderEffectNew = IrisEffect::New();
+               IVUG_FUNC_LEAVE();
+       }
+
+       /**
+       * Destructor
+       */
+       virtual ~IrisShowEffect()
+       {
+               IVUG_FUNC_ENTER();
+               //mAnimation.Pause();
+       }
+
+       virtual void Stop()
+       {
+               mAnimation.Stop();
+       }
+
+       virtual void SetImageSize(const char *path)
+       {
+       }
+
+private: // From SlideshowEffect
+
+       virtual std::string Name()
+       {
+               return IRIS_EFFECT_NAME;
+       }
+
+       /**
+       * @copydoc SlideshowEffect::Initialize
+       */
+       virtual void Initialize( Dali::Vector3 size )
+       {
+       }
+
+       /**
+       * @copydoc SlideshowEffect::StartView
+       */
+       virtual void StartView( Dali::ImageActor /*newActor*/, unsigned int /*duration*/ )
+       { }
+
+       /**
+       * @copydoc SlideshowEffect::StartTransition
+       */
+       virtual bool StartTransition( Dali::ImageActor oldActor,
+                       Dali::ImageActor newActor,
+                       unsigned int duration,
+                       int face_count)
+       {
+               IVUG_FUNC_ENTER();
+               mAnimation = Animation::New( duration / SECONDTIME ); // to seconds
+               mAnimation.SetEndAction(Animation::Discard);
+               if( oldActor ) {
+                       // get the image of the old actor
+                       Image oldImage = oldActor.GetImage();
+                       ImageAttributes attr = oldImage.GetAttributes();
+                       // set uniforms, need power of two of the texture for size
+                       Vector2 imageSize( attr.GetSize() );
+                       Vector2 imageSizePow2( Dali::NextPowerOfTwo( attr.GetSize().width ),
+                               Dali::NextPowerOfTwo( attr.GetSize().height ) );
+                       Vector2 adjusted( imageSize.x / imageSizePow2.x,
+                                               imageSize.y / imageSizePow2.y );
+                       mShaderEffect.SetRadius( std::max(adjusted.width, adjusted.height));
+
+                       // apply shader effect
+                       oldActor.SetShaderEffect(mShaderEffect);
+                       // animate swirl
+            Property::Value propertyValue(0.0f);
+            AnimateTo(mAnimation,mShaderEffect, mShaderEffect.GetRadiusPropertyName(),propertyValue);
+               }
+               if( newActor ) {
+
+                       mShaderEffectNew.SetRadius(0.0f);
+                       // apply shader effect
+                       newActor.SetShaderEffect(mShaderEffectNew);
+                       // animate swirl
+            Property::Value propertyValue(1.0f);
+            AnimateTo(mAnimation,mShaderEffectNew,mShaderEffectNew.GetRadiusPropertyName(),propertyValue);
+            //mAnimation.AnimateProperty(mShaderEffectNew,
+            //mShaderEffectNew.GetRadiusPropertyName(), 1.0f);
+               }
+               mAnimation.Play();
+               IVUG_FUNC_LEAVE();
+
+               return true; // with x fade
+       }
+
+       /**
+       * @copydoc SlideshowEffect::TransitionCompleted
+       */
+       virtual void TransitionCompleted( Dali::ImageActor oldActor,
+                       Dali::ImageActor newActor )
+       {
+               if( oldActor )
+               {
+                       // remove shader
+                       oldActor.RemoveShaderEffect();
+               }
+               if( newActor )
+               {
+                       // remove shader
+                       newActor.RemoveShaderEffect();
+               }
+       }
+
+private: // Data
+
+       Dali::Animation mAnimation;
+       Dali::Toolkit::IrisEffect mShaderEffect;
+       Dali::Toolkit::IrisEffect mShaderEffectNew;
+
+};
+
+/**
+* Square effect for slideshow
+*/
+class SquareEffect : public SlideshowEffect
+{
+public: // API
+
+       /**
+       * Constructor
+       */
+       SquareEffect()
+       {
+               IVUG_FUNC_ENTER();
+               mShaderEffectNew = SquareDissolveEffect::New();
+               //mShaderEffectOld = SquareDissolveEffect::New();
+               IVUG_FUNC_LEAVE();
+       }
+
+       /**
+       * Destructor
+       */
+       virtual ~SquareEffect()
+       {
+               IVUG_FUNC_ENTER();
+               //mAnimation.Pause();
+       }
+
+       virtual void Stop()
+       {
+               mAnimation.Stop();
+       }
+
+       virtual void SetImageSize(const char *path)
+       {
+       }
+
+private: // From SlideshowEffect
+
+       virtual std::string Name()
+       {
+               return SQUARE_DISSOLVE_EFFECT_NAME;
+       }
+
+       /**
+       * @copydoc SlideshowEffect::Initialize
+       */
+       virtual void Initialize( Dali::Vector3 size )
+       {
+               mImgNoise = Image::New(DEFAULT_NOISE_PATH);
+       }
+
+       /**
+       * @copydoc SlideshowEffect::StartView
+       */
+       virtual void StartView( Dali::ImageActor  newActor, unsigned int duration)
+       { }
+
+       /**
+       * @copydoc SlideshowEffect::StartTransition
+       */
+       virtual bool StartTransition( Dali::ImageActor oldActor,
+               Dali::ImageActor newActor,
+               unsigned int duration,
+               int face_count)
+       {
+               IVUG_FUNC_ENTER();
+               mAnimation = Animation::New( duration / SECONDTIME); // to seconds
+               //mAnimation.SetEndAction(Animation::Discard);
+               if ( newActor ) {
+                       mShaderEffectNew.SetTextureSize(Vector2(1.0f, 1.0f));
+                       mShaderEffectNew.SetStep(0.8);
+                       mShaderEffectNew.SetColumns(10.0);
+                       mShaderEffectNew.SetRows(10.0);
+                       /*if (oldActor) {
+                               //mShaderEffectNew.SetEffectImage(mImgNoise);
+                               //oldActor.GetImage()
+                       }*/
+                       if (mImgNoise) {
+                               mShaderEffectNew.SetEffectImage(mImgNoise);
+                       }
+                       // apply shader effect
+                       newActor.SetShaderEffect(mShaderEffectNew);
+                       // animate swirl
+                       //mAnimation.AnimateProperty(mShaderEffectNew,
+                       //      mShaderEffectNew.GetStepPropertyName(), 0.5f);
+
+            Property::Value propertyValue(0.5f);
+            AnimateTo(mAnimation,mShaderEffectNew, mShaderEffectNew.GetStepPropertyName(),propertyValue);
+            //mActorAnimation.AnimateProperty(mEffect, mEffect.GetTimePropertyName(), 0.0f);
+
+               }
+               mAnimation.Play();
+               IVUG_FUNC_LEAVE();
+
+               return true; // with x fade
+       }
+
+       /**
+       * @copydoc SlideshowEffect::TransitionCompleted
+       */
+       virtual void TransitionCompleted( Dali::ImageActor oldActor, Dali::ImageActor newActor )
+       {
+               if( newActor )
+               {
+                       // remove shader
+                       newActor.RemoveShaderEffect();
+               }
+       }
+
+private: // Data
+
+       Dali::Animation mAnimation;
+       Image mImgNoise;
+       Dali::Toolkit::SquareDissolveEffect mShaderEffectNew;
+       //Dali::Toolkit::SquareDissolveEffect mShaderEffectOld;
+};
+
+
+namespace EffectFactory
+{
+
+       SlideshowEffect* NewRippleFadeEffect( float amplitude )
+       {
+               return new RippleFadeEffect( amplitude );
+       }
+
+       SlideshowEffect* NewDissolveFadeEffect( bool randomize )
+       {
+               return new DissolveEffect( randomize );
+       }
+
+       SlideshowEffect* NewZoomEffect()
+       {
+               return new ZoomEffect;
+       }
+
+       SlideshowEffect* NewFaceEffect(SlideShow *ss_handle)
+       {
+               return new SlideshowFaceEffect(ss_handle);
+       }
+       SlideshowEffect* NewSplitEffect()
+       {
+               return new SplitEffect;
+       }
+
+       SlideshowEffect* NewSwirlEffect( bool warp )
+       {
+               return new SwirlEffect( warp );
+       }
+
+       SlideshowEffect* NewWaterRippleEffect()
+       {
+               return new WaterRippleEffect();
+       }
+
+       SlideshowEffect* NewSlideEffect()
+       {
+               return new SlideEffect;
+       }
+
+       SlideshowEffect* NewIrisEffect()
+       {
+               return new IrisShowEffect();
+       }
+
+       SlideshowEffect* NewSquareEffect()
+       {
+               return new SquareEffect();
+       }
+
+} // namespace EffectFactory
+
+} // namespace Imageview3D
diff --git a/slideshow/src/dali_effect/src/ivug-slideshow-face.cpp b/slideshow/src/dali_effect/src/ivug-slideshow-face.cpp
new file mode 100644 (file)
index 0000000..75526a4
--- /dev/null
@@ -0,0 +1,276 @@
+/*\r
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.\r
+ * All rights reserved.\r
+ *\r
+ * This software is a confidential and proprietary information of Samsung\r
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such\r
+ * Confidential Information and shall use it only in accordance with the terms\r
+ * of the license agreement you entered into with Samsung Electronics.\r
+ */\r
+\r
+// CLASS HEADER\r
+#include "ivug-slideshow-effect.h"\r
+#include <dali-toolkit/dali-toolkit.h>\r
+\r
+// EXTERNAL INCLUDES\r
+\r
+// INTERNAL INCLUDES\r
+#include "ivug-includes.h"\r
+#include "ivug-constraints.h"\r
+#include "ivug-debug.h"\r
+#include "ivug-dali-util.h"\r
+#include "ivug-slideshow-face.h"\r
+\r
+//using namespace Dali;\r
+//using namespace Dali::Toolkit;\r
+//using namespace std;\r
+\r
+// LOCAL STUFF\r
+namespace\r
+{\r
+\r
+       static float ReverseEaseIn(float progress)\r
+       {\r
+               return 1.0f - (progress * progress * progress);\r
+       }\r
+\r
+} // end LOCAL STUFF\r
+\r
+/**\r
+ * Image Face slide show effect\r
+\r
+ */\r
+namespace Imageview3D\r
+{\r
+\r
+SlideshowFaceEffect::SlideshowFaceEffect(SlideShow *ss_handle)\r
+: mFaceRecordIndex(0),\r
+  mFaceRectX(0),\r
+  mFaceRectY(0),\r
+  mFaceRectW(0),\r
+  mFaceRectH(0),\r
+  mSSHandle(ss_handle),\r
+  mFaceScale(FACE_DEFAULT_SCALE),\r
+  mGapTime(FACE_DEFAULT_GAP_TIME),\r
+  mImgWith(0),\r
+  mImgHeight(0)\r
+{\r
+\r
+}\r
+\r
+bool SlideshowFaceEffect::GetScaleAttribute(double divi_h, double divi_w)\r
+{\r
+       bool bScale_h = true;\r
+       if (divi_h <= 1.0 && divi_w >= 1.0) {\r
+               bScale_h = true;\r
+       } else if (divi_h >= 1.0 && divi_w >= 1.0) {\r
+               if (divi_h > divi_w) {\r
+                       bScale_h = true;\r
+               } else {\r
+                       bScale_h = false;\r
+               }\r
+       } else if (divi_h <= 1.0 && divi_w <= 1.0) {\r
+               if (divi_h <= divi_w) {\r
+                       bScale_h = true;\r
+               } else {\r
+                       bScale_h = false;\r
+               }\r
+       } else {\r
+               bScale_h = false;\r
+       }\r
+       return bScale_h;\r
+}\r
+\r
+void SlideshowFaceEffect::MoveFaceToCenter()\r
+{\r
+       MSG_IVUG_HIGH("MoveFaceToCenter");\r
+\r
+       if (mCurrentActor) {\r
+               mAnimation = Animation::New(\r
+                       (float)(TRANSITIONTIME - mGapTime) / SECONDTIME);\r
+               int screen_w = 0;\r
+               int screen_h = 0;\r
+               Vector3 Position = mCurrentActor.GetCurrentPosition();\r
+               MSG_EFFECT_HIGH("after zoom, pos of image is %f, %f, %f\n",\r
+                       Position.x, Position.y, Position.z);\r
+\r
+               //MSG_IVUG_HIGH("image resolution is %d,%d\n", image_w, image_h);\r
+               ivug_get_screen_size(&screen_w, &screen_h);\r
+               //MSG_IVUG_HIGH("screen size: %d,%d\n", screen_w, screen_h);\r
+               int rotation = ivug_get_win_rotation();\r
+               //MSG_IVUG_HIGH("rotation is %d\n", rotation);\r
+               double delta_x = 0.0;\r
+               double delta_y = 0.0;\r
+               double scale_w = 0.0;\r
+               double scale_h = 0.0;\r
+               double divi_h = 0.0;\r
+               double divi_w = 0.0;\r
+               bool bScaleH = true;\r
+               if (rotation == 0 || rotation == 180) {\r
+                       if (mImgHeight <= mImgWith) {\r
+                               divi_w = (double)screen_w / ((double)mImgWith);\r
+                               divi_h = divi_w;\r
+                       } else {\r
+                               divi_h = (double)screen_h / ((double)mImgHeight);\r
+                               divi_w = (double)screen_w / ((double)mImgWith);\r
+                               bScaleH = GetScaleAttribute(divi_h, divi_w);\r
+                               if(bScaleH) {\r
+                                       divi_w = divi_h;\r
+                               } else {\r
+                                       divi_h = divi_w;\r
+                               }\r
+                       }\r
+               } else {\r
+                       if (mImgHeight >= mImgWith) {\r
+                               divi_h = (double)screen_h / ((double)mImgHeight);\r
+                               divi_w = divi_h;\r
+                       } else {\r
+                               divi_h = (double)screen_h / ((double)mImgHeight);\r
+                               divi_w = (double)screen_w / ((double)mImgWith);\r
+                               bScaleH = GetScaleAttribute(divi_h, divi_w);\r
+                               if(bScaleH) {\r
+                                       divi_w = divi_h;\r
+                               } else {\r
+                                       divi_h = divi_w;\r
+                               }\r
+                       }\r
+               }\r
+               scale_w = divi_w;\r
+               scale_h = divi_h;\r
+\r
+               delta_x = ((double)mImgWith * mFaceScale / 2.0 - ((double)mFaceRectX +\r
+                               (double)mFaceRectW/2.0)*mFaceScale) * scale_w;\r
+               delta_y = ((double)mImgHeight * mFaceScale / 2.0 - ((double)mFaceRectY +\r
+                               (double)mFaceRectH/2.0)*mFaceScale) * scale_h;\r
+\r
+               MSG_EFFECT_HIGH("delta_x is %f, delta_y is %f\n", delta_x, delta_y);\r
+\r
+               Vector3 targetPos(delta_x, delta_y, 0.0f);\r
+               Dali::Layer layer = mCurrentActor.GetLayer();\r
+\r
+               layer.SetAnchorPoint(AnchorPoint::CENTER);\r
+               layer.SetParentOrigin(ParentOrigin::CENTER);\r
+\r
+               mAnimation.MoveTo(mCurrentActor, targetPos, AlphaFunctions::Linear);\r
+               mAnimation.Play();\r
+       }\r
+       MSG_IVUG_HIGH("MoveFaceToCenter leave");\r
+\r
+}\r
+\r
+/**\r
+* @copydoc SlideshowEffect::TransitionNextFace\r
+*/\r
+void SlideshowFaceEffect::TransitionNextFace()\r
+{\r
+       if (NULL != mSSHandle) {\r
+               bool ret = ivug_get_nth_face_data(mSSHandle, mFaceRecordIndex, &mFaceRectX,\r
+                               &mFaceRectY, &mFaceRectW, &mFaceRectH);\r
+       if(ret) {\r
+                       /**\r
+                       *  if there is other face in this image, then go on show face effect to move\r
+                       *  other face to center of screen\r
+                       */\r
+                       MoveFaceToCenter();\r
+       }\r
+       ++ mFaceRecordIndex;\r
+       }\r
+}\r
+\r
+void SlideshowFaceEffect::SetFaceScale(float value)\r
+{\r
+       if (value > 0.0) {\r
+               mFaceScale = value;\r
+       } else {\r
+               mFaceScale = FACE_DEFAULT_SCALE;\r
+       }\r
+}\r
+\r
+void SlideshowFaceEffect::SetGapTime(int value)\r
+{\r
+       if ((value >= 0) && (value < TRANSITIONTIME)) {\r
+               mGapTime = value;\r
+       } else {\r
+               mGapTime = FACE_DEFAULT_GAP_TIME;\r
+       }\r
+}\r
+\r
+void SlideshowFaceEffect::SetImageSize(const char *path)\r
+{\r
+       if (path) {\r
+               ivug_get_image_resolution(path, &mImgWith, &mImgHeight);\r
+       }\r
+}\r
+\r
+std::string SlideshowFaceEffect::Name()\r
+{\r
+       return FACE_EFFECT_NAME;\r
+}\r
+\r
+void SlideshowFaceEffect::Initialize( Dali::Vector3 /*size*/ )\r
+{\r
+}\r
+\r
+/**\r
+* @copydoc SlideshowEffect::StartView\r
+*/\r
+void SlideshowFaceEffect::StartView( Dali::ImageActor newActor,\r
+                       unsigned int duration )\r
+{\r
+}\r
+\r
+/**\r
+* @copydoc SlideshowEffect::StartTransition\r
+*/\r
+bool SlideshowFaceEffect::StartTransition( Dali::ImageActor oldActor,\r
+                       Dali::ImageActor newActor,\r
+                       unsigned int duration,\r
+                       int face_count)\r
+{\r
+       MSG_IVUG_HIGH("face effect, StartTransition, b_with_face is %d\n", face_count);\r
+       if (face_count > 0) {\r
+               mAnimation = Animation::New((float)FACE_SCALE_DURATION/SECONDTIME);\r
+       } else {\r
+               mAnimation = Animation::New((float)TRANSITIONTIME/SECONDTIME);\r
+       }\r
+       mCurrentActor = newActor;\r
+\r
+       if( oldActor )\r
+       {\r
+               mAnimation.MoveBy( oldActor, -500.0f, 0.0f, 0.0f );\r
+               mAnimation.OpacityTo( oldActor, 0.0f );\r
+               mAnimation.SetEndAction( Animation::Bake );\r
+       }\r
+\r
+       if( newActor && face_count > 0)\r
+       {\r
+               mFaceRecordIndex = 0;\r
+               mAnimation.ScaleTo( newActor, mFaceScale, mFaceScale, 0.0f);\r
+               mAnimation.SignalFinished().Connect( this, &SlideshowFaceEffect::TransitionNextFace);\r
+       } else if(newActor) {\r
+               /* without face, then display slide effect */\r
+               mAnimation.MoveBy( newActor, Vector3(500.0f, 0.0f, 0.0f), ReverseEaseIn );\r
+               mAnimation.OpacityTo( newActor, 0.0f, ReverseEaseIn );\r
+               mAnimation.SetEndAction( Animation::Bake );\r
+       }\r
+       mAnimation.Play();\r
+\r
+       return false;\r
+\r
+}\r
+\r
+void SlideshowFaceEffect::Stop()\r
+{\r
+       mAnimation.Stop();\r
+}\r
+\r
+/**\r
+* @copydoc SlideshowEffect::TransitionCompleted\r
+*/\r
+void SlideshowFaceEffect::TransitionCompleted( Dali::ImageActor oldActor, Dali::ImageActor newActor )\r
+{\r
+\r
+}\r
+\r
+}\r
+\r
diff --git a/slideshow/src/dali_effect/src/ivug-view-stack-info.cpp b/slideshow/src/dali_effect/src/ivug-view-stack-info.cpp
new file mode 100644 (file)
index 0000000..d1128a3
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information of Samsung
+ * Electronics, Inc. ("Confidential Information").  You shall not disclose such
+ * Confidential Information and shall use it only in accordance with the terms
+ * of the license agreement you entered into with Samsung Electronics.
+ */
+
+// CLASS HEADER
+#include "ivug-view-stack-info.h"
+#include "ivug-image-view.h"
+
+using namespace Dali;
+using namespace Imageview3D;
+
+ViewStackInfo::ViewStackInfo(const std::string name, const Media_List* images)
+: mName(name),
+  mAllImagesList(images)
+{
+
+}
+
+ViewStackInfo::ViewStackInfo(const ViewStackInfo& viewStackInfo)
+{
+       mViewStack = viewStackInfo.mViewStack;
+       mName = viewStackInfo.mName;
+       mAllImagesList = viewStackInfo.mAllImagesList;
+}
+
+ViewStackInfo& ViewStackInfo::operator=(const ViewStackInfo& rhs)
+{
+       mViewStack = rhs.mViewStack;
+       mName = rhs.mName;
+       mAllImagesList = rhs.mAllImagesList;
+       return *this;
+}
+
+ViewStackInfo::~ViewStackInfo()
+{
+
+}
+
+ImageView *ViewStackInfo::GetTopView() const
+{
+        DALI_ASSERT_ALWAYS(mViewStack.size() > 0);
+
+       return mViewStack.back();
+}
+
+ImageView *ViewStackInfo::GetPreviousView() const
+{
+        DALI_ASSERT_ALWAYS(mViewStack.size() > 1);
+
+       return mViewStack[ mViewStack.size() - 2 ];
+}
+
+void ViewStackInfo::PushView(ImageView *view)
+{
+        DALI_ASSERT_ALWAYS(view)
+       mViewStack.push_back(view);
+}
+
+ImageView *ViewStackInfo::PopView()
+{
+       ImageView *top = mViewStack.back();
+       mViewStack.pop_back();
+       return top;
+}
+
+void ViewStackInfo::SetVisible(bool visible)
+{
+       for(ViewStack::iterator iter = mViewStack.begin(); iter != mViewStack.end(); ++iter) {
+               ImageView* view = (*iter);
+               view->SetVisible(visible);
+       }
+}
+
diff --git a/slideshow/src/dali_effect/src/ivug-water-ripple-effect.cpp b/slideshow/src/dali_effect/src/ivug-water-ripple-effect.cpp
new file mode 100644 (file)
index 0000000..d67501a
--- /dev/null
@@ -0,0 +1,149 @@
+/*\r
+Copyright (c) 2000-2012 Samsung Electronics Co., Ltd All Rights Reserved\r
+\r
+This file is part of Dali Toolkit\r
+\r
+PROPRIETARY/CONFIDENTIAL\r
+\r
+This software is the confidential and proprietary information of\r
+SAMSUNG ELECTRONICS ("Confidential Information"). You shall not\r
+disclose such Confidential Information and shall use it only in\r
+accordance with the terms of the license agreement you entered\r
+into with SAMSUNG ELECTRONICS.\r
+\r
+SAMSUNG make no representations or warranties about the suitability\r
+of the software, either express or implied, including but not limited\r
+to the implied warranties of merchantability, fitness for a particular\r
+purpose, or non-infringement. SAMSUNG shall not be liable for any\r
+damages suffered by licensee as a result of using, modifying or\r
+distributing this software or its derivatives.\r
+*/\r
+\r
+#include "ivug-water-ripple-effect.h"\r
+\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace Toolkit\r
+{\r
+\r
+namespace\r
+{\r
+\r
+const std::string IVUG_TEXTURE_SIZE__NAME( "uTextureSize" );\r
+const std::string IVUG_AMPLITUDE_NAME( "uAmplitude" );\r
+const std::string IVUG_TIME_PROPERTY_NAME( "uTime" );\r
+\r
+} // namespace\r
+\r
+WaterEffectRipple2D::WaterEffectRipple2D()\r
+{\r
+}\r
+\r
+//Call the Parent copy constructor to add reference to the implementation for this object\r
+WaterEffectRipple2D::WaterEffectRipple2D(ShaderEffect handle)\r
+:ShaderEffect(handle)\r
+{\r
+}\r
+\r
+WaterEffectRipple2D::~WaterEffectRipple2D()\r
+{\r
+}\r
+\r
+WaterEffectRipple2D WaterEffectRipple2D::New()\r
+{\r
+/*This is the different effects,If needed,Please open it*/\r
+#if 0\r
+       std::string fragmentShader(\r
+         "uniform float uAmplitude;\n"\r
+         "uniform float uTime;\n"\r
+         "void main()\n"\r
+         "{\n"\r
+         "  float textureSize = distance(sTextureRect.xy, sTextureRect.zw);\n"\r
+         "  vec2 textureCenter = (sTextureRect.xy + sTextureRect.wz) * 0.5;\n"\r
+         "  vec2 pos = (vTexCoord.st-textureCenter) / textureSize;\n"\r
+         "  float len = length(pos) + 0.1;\n"\r
+         "  vec2 texCoord = vTexCoord.st + (pos/len) * sin( len * 12.0 - uTime * 4.0 ) * uAmplitude;\n"\r
+         "  gl_FragColor = texture2D(sTexture, texCoord) * uColor;\n"\r
+         "}" );\r
+       std::string fragmentShader(\r
+         "uniform vec2 uTextureSize;\n"\r
+         "uniform float uAmplitude;\n"\r
+         "uniform float uTime;\n"\r
+         "void main()\n"\r
+         "{\n"\r
+         "  vec2 pos = -1.0 + 2.0 * vTexCoord.st / uTextureSize;\n"\r
+         "  float len = length(pos);\n"\r
+         "  vec2 texCoord = vTexCoord.st + (pos/len) * sin( len * 12.0 - uTime * 4.0 ) * uAmplitude;\n"\r
+         "  gl_FragColor = texture2D(sTexture, texCoord) * uColor;\n"\r
+         "}" );\r
+#endif\r
+       std::string fragmentShader(\r
+         "uniform vec2 uTextureSize;\n"\r
+         "uniform float uAmplitude;\n"\r
+         "uniform float uTime;\n"\r
+         "void main()\n"\r
+         "{\n"\r
+         "  vec2 textureCenter = (sTextureRect.xy + sTextureRect.wz) * 0.5;\n"\r
+         "  vec2 pos = (vTexCoord.st-textureCenter) / uTextureSize;\n"\r
+         "  float len = length(pos) + 0.05;\n"\r
+         "  vec2 texCoord = vTexCoord.st + (pos/len) * sin( len * 12.0 - uTime * 4.0 ) * uAmplitude;\n"\r
+         "  gl_FragColor = texture2D(sTexture, texCoord) * uColor;\n"\r
+         "}" );\r
+\r
+\r
+       /*Create the implementation, temporarily owned on stack*/\r
+       Dali::ShaderEffect shaderEffect =  Dali::ShaderEffect::New(\r
+         "",\r
+         fragmentShader,\r
+         Dali::GeometryType( GEOMETRY_TYPE_IMAGE ),\r
+         ShaderEffect::GeometryHints( ShaderEffect::HINT_BLENDING | ShaderEffect::HINT_GRID ));\r
+\r
+       /* Pass ownership to WaterEffectRipple2D through overloaded constructor, So that it now has access to the\r
+        Dali::ShaderEffect implementation */\r
+       Dali::Toolkit::WaterEffectRipple2D handle( shaderEffect );\r
+\r
+       handle.SetUniform( IVUG_TEXTURE_SIZE__NAME, Vector2(0.0f, 0.0f) );\r
+       handle.SetUniform( IVUG_AMPLITUDE_NAME, 0.0f );\r
+       handle.SetUniform( IVUG_TIME_PROPERTY_NAME, 0.0f );\r
+\r
+       return handle;\r
+\r
+}\r
+\r
+void WaterEffectRipple2D::SetAmplitude(float amplitude)\r
+{\r
+       SetUniform( IVUG_AMPLITUDE_NAME, amplitude );\r
+}\r
+\r
+void WaterEffectRipple2D::SetTime(float time)\r
+{\r
+       SetUniform( IVUG_TIME_PROPERTY_NAME, time );\r
+}\r
+\r
+const std::string& WaterEffectRipple2D::GetAmplitudePropertyName() const\r
+{\r
+       return IVUG_AMPLITUDE_NAME;\r
+}\r
+\r
+const std::string& WaterEffectRipple2D::GetTimePropertyName() const\r
+{\r
+       return IVUG_TIME_PROPERTY_NAME;\r
+}\r
+\r
+void WaterEffectRipple2D::SetTextureSize(const Vector2& textureSize)\r
+{\r
+       SetUniform( IVUG_TEXTURE_SIZE__NAME, textureSize );\r
+}\r
+\r
+const std::string& WaterEffectRipple2D::GetTextureSizePropertyName() const\r
+{\r
+       return IVUG_TEXTURE_SIZE__NAME;\r
+}\r
+\r
+\r
+} // namespace Toolkit\r
+\r
+} // namespace Dali\r
+\r
old mode 100755 (executable)
new mode 100644 (file)
index 1735e4e..9b43509
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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_ANIM_H__
 #define __IVUG_ANIM_H__
old mode 100755 (executable)
new mode 100644 (file)
index 80e604f..ad47de8
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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_EFFECT_H__
 #define __IVUG_EFFECT_H__
@@ -61,8 +61,14 @@ typedef enum _Effect_Type {
        EFFECT_IRIS,
        EFFECT_DISSOLVE,
        EFFECT_SLIDE,
+       EFFECT_RIPPLE_FADE,
        EFFECT_DISSOLVE_FADE,
+       EFFECT_SWIRL,
+       EFFECT_WATER_RIPPLE,
+       EFFECT_ZOOM,
        EFFECT_SPLIT,
+       EFFECT_3D_RAND,
+       EFFECT_FACE,
        EFFECT_MAX
 } Effect_Type;
 
old mode 100755 (executable)
new mode 100644 (file)
index 5c46a87..bdb6903
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 <stddef.h>            /* for NULL */
old mode 100755 (executable)
new mode 100644 (file)
index 6d4b533..64aacf3
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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-xcapture.h"
old mode 100755 (executable)
new mode 100644 (file)
index 37f5e57..ed94768
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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"
old mode 100755 (executable)
new mode 100644 (file)
index 4ac07b3..13735a8
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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-effect.h"
@@ -218,8 +218,7 @@ Effect_Engine *ivug_effect_add(Effect_Type type)
 
        default:
                MSG_EFFECT_ERROR("Unknown effect type=%d", type);
-               /*Default effect, keeping with gallery setting*/
-               eng = ivug_slide_add();
+               return NULL;
                break;
        }
 
old mode 100755 (executable)
new mode 100644 (file)
index 725dbf5..2c6cc70
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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-effect.h"
old mode 100755 (executable)
new mode 100644 (file)
index 904305e..79fdfda
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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-effect.h"
@@ -42,8 +42,15 @@ static Effect_Data __ivug_iris_init(Evas_Object *src, Evas_Object *dst)
        ivug_retvm_if(eng_data == NULL, NULL, "calloc return NULL");
 
        eng_data->evas = evas_object_evas_get(src);
-       ivug_retvm_if(eng_data->evas == NULL, NULL, "Get evas is NULL");
-
+       //ivug_retvm_if(eng_data->evas == NULL, NULL, "Get evas is NULL");
+       if (eng_data->evas == NULL) {
+               MSG_IVUG_HIGH("evas is null");
+               if (eng_data) {
+                       free(eng_data);
+                       eng_data = NULL;
+               }
+               return NULL;
+       }
        eng_data->src = src;
        eng_data->dst = dst;
 
old mode 100755 (executable)
new mode 100644 (file)
index d7958f8..97733a9
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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-effect.h"
old mode 100755 (executable)
new mode 100644 (file)
index 9de815d..84c5735
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 <Ecore_X.h>
old mode 100755 (executable)
new mode 100644 (file)
index 30a3bc9..7008d76
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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_XCAPTURE_H__
 #define __IVUG_XCAPTURE_H__
old mode 100755 (executable)
new mode 100644 (file)
index 656d041..6f6fdfa
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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-effect.h"
diff --git a/slideshow/src/include/ivug-slideshow-priv.h b/slideshow/src/include/ivug-slideshow-priv.h
new file mode 100644 (file)
index 0000000..bfd5fca
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * 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
+
+// Slide Show
+
+/*
+       Start slide show.
+
+       if bSlideFirst == EINA_TRUE, slide and then wait interval time
+       if bSlideFirst == EINA_FALSE, wait interval time and then slide
+*/
+#include <Elementary.h>
+#include <Ecore_X.h>
+#include <player.h>
+#include <glib.h>
+
+#include "ivug-define.h"
+#include "ivug-medialist.h"
+#include "ivug-config.h"
+#include "ivug-effect.h"
+#include "ivug-includes.h"
+
+
+using namespace Imageview3D;
+using namespace std;
+
+#define DATA_PATH                                              DATADIR"/"PACKAGE
+
+typedef struct
+{
+       void *pSlideshow; //SlideShow *
+       Evas_Object *layout;
+       Evas_Object *photocam;
+       Evas_Object *thumbnail;
+
+       Media_Item *mitem;
+
+       int x;  // Need??
+       int y;
+} Slide_Layout;
+
+typedef enum{
+       EVASPLUGIN_RESUMED = 0x00,
+       EVASPLUGIN_PAUSED,
+} EvasPluginState_t;
+
+
+typedef struct _SlideShow
+{
+       Evas_Object *obj;               // Slide show view.
+       Evas_Object *event;             // Mouse event
+
+       /* slide show setting */
+       char *music_path;
+       double ss_interval_time;
+       Effect_Engine* effect_engine;
+
+       Ecore_Timer *ss_timer;  //slide show timer
+       Ecore_Timer *click_timer;
+       void* ss_user_data;
+
+       Media_List *media_list;
+       Media_Item *ss_Header;          // Start point
+
+       int sCurrent;           // 0 or 1
+       int screen_w;
+       int screen_h;
+
+       Ecore_Idler *load_idler;
+       Ecore_X_Window xwin;
+       Dali::Window   winHandle;  /* Handle to window */
+       Dali::Adaptor* adaptor; /* DaliAdaptor */
+       //RenderSurface* renderSurface; /* RenderSurface */
+       Media_Item *cur_item;
+       GList *face_record_list;
+       void *dali_viewer_handle;       /*3D slidehshow image view handle*/
+       int xPixmapId;
+       player_h vmpHandle;                     /*Used for video and music*/
+
+       Slide_Layout sLayout[2];
+       slide_show_mode ss_mode;
+       /* slide show effect*/
+       Effect_Type effect_type;
+       EvasPluginState_t evas_plugin_state;
+       slideshow_state_t state;
+       Eina_Bool bSS_StopFlag; /* request slide show stop flag */
+       bool bMouse_event;
+       bool bDali_slideshow;
+       bool bMusicState;
+}SlideShow;
+
old mode 100755 (executable)
new mode 100644 (file)
index c894a84..3eb4608
@@ -3,8 +3,8 @@
                <domain name="ug-image-viewer-efl" policy="shared"/>
        </define>
        <assign>
-           <filesystem path="/opt/ug/data/ug-image-viewer-efl" label="ug-image-viewer-efl" type="transmutable"/>
-           <filesystem path="/opt/ug/data/ug-image-viewer-efl/*" label="ug-image-viewer-efl"/>
+           <filesystem path="/opt/usr/ug/data/ug-image-viewer-efl" label="ug-image-viewer-efl" type="transmutable"/>
+           <filesystem path="/opt/usr/ug/data/ug-image-viewer-efl/*" label="ug-image-viewer-efl"/>
        </assign>
        <request>
                <domain name="_"/>
old mode 100755 (executable)
new mode 100644 (file)
similarity index 90%
rename from res/manifest/ug-image-viewer-efl.xml
rename to ug-image-viewer-efl.xml
index 0b8cf38..c2df9cd
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="image-viewer-efl" version="0.3.0-1" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="image-viewer-efl" version="1.6.88" install-location="internal-only">
        <label>image-viewer-efl</label>
        <author email="jcastle.ahn@samsung.com" href="www.samsung.com">Jisung Ahn</author>
        <author email="hw4444.kim@samsung.com" href="www.samsung.com">Hyunwoo Kim</author>
        <description>Image viewer Application</description>
-       <ui-application appid="image-viewer-efl" exec="/opt/ug/bin/image-viewer-efl" nodisplay="true" multiple="true" type="capp" taskmanage="false">
+       <ui-application appid="image-viewer-efl" exec="/usr/ug/bin/image-viewer-efl" nodisplay="true" multiple="true" type="capp" taskmanage="false">
                <icon>ug-image-viewer-efl.png</icon>
                <label>Image viewer</label>
                <label xml:lang="en-us">Image viewer</label>
index 556afa4..d83eaba 100755 (executable)
@@ -6,32 +6,41 @@ SET(VERSION 0.1.0)
 
 SET(SRCS
 # Helper files
-       src/common/Scroller.cpp
        src/common/Primitives.cpp
        src/util/EFLUtil.cpp
        src/util/ivug-listpopup.c
 
 #Image
-       src/image/ivug-image-photocam.cpp
+       src/image/ivug-image.cpp
+
+#Video
+
+# Face rect
+
+# Thumb list
 
 # ScissorBox
        src/scissorbox/ScissorBox.cpp
        src/scissorbox/ivug-scissorbox.cpp
+
+# Face tag
+
+# Face detail
+
+# Best Pic
 )
 
 INCLUDE_DIRECTORIES(
+       ${CMAKE_SOURCE_DIR}/include
        ${IVUG_SOURCE_COMMON_DIR}/include
        ${IVUG_SOURCE_FEATURE_DIR}/include
        include
        src/common
        src/animation
        src/image
-       src/thumblist
        src/scissorbox
 )
 
-MESSAGE("Checking " ${PROJECT_NAME}\r)
-
 INCLUDE(FindPkgConfig)
 pkg_check_modules(${PROJECT_NAME}_pkgs REQUIRED
        elementary
@@ -44,20 +53,20 @@ pkg_check_modules(${PROJECT_NAME}_pkgs REQUIRED
 )
 
 FOREACH(flag ${${PROJECT_NAME}_pkgs_CFLAGS})
-       SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
+       SET(EXTRA_FLAGS "${EXTRA_FLAGS} ${flag}")
 ENDFOREACH(flag)
 
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -Wall")
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS}")
-
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-ADD_DEFINITIONS("-DLOG_LVL=DBG_MSG_LVL_HIGH")
+ADD_DEFINITIONS("-DLOG_LVL=DBG_MSG_LVL_WARN")
 ADD_DEFINITIONS("-DLOG_CAT=\"IV-WIDGET\"")
 
-ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+message("WIDGET FLAGS=" ${CMAKE_CXX_FLAGS})
+
+ADD_LIBRARY(${PROJECT_NAME} STATIC ${SRCS})
 
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION} )
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS ${EXTRA_FLAGS})
 
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${${PROJECT_NAME}_pkgs_LDFLAGS}
        ivug_common ivug_feature
old mode 100755 (executable)
new mode 100644 (file)
index 7730935..6cbfefa
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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
 
old mode 100755 (executable)
new mode 100644 (file)
index 74bed7b..08f0e42
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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
 
old mode 100755 (executable)
new mode 100644 (file)
index f170842..9d0c83c
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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
 
@@ -33,8 +33,12 @@ namespace EFL {
 
        Evas_Object *create_icon(Evas_Object *parent, const char *edjname, const char *groupname);
 
+       void dump_win(Evas_Object *obj);
+
        void dump_obj(Evas_Object *obj, int lvl = 0);
+       void dump_widget(Evas_Object *obj, int lvl);
 
+       void dump_clipper(Evas_Object *clipper);
        // Returned value Should be freed after using
        char * current_render_method(Evas *e);
 
old mode 100755 (executable)
new mode 100644 (file)
index 4fd5fc4..92e9c57
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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
 
@@ -79,6 +79,7 @@ private:
        static void _del(Evas_Object * obj)
        {
                CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+               IV_ASSERT(thiz != NULL);
 
                thiz->remove();
        };
@@ -86,48 +87,64 @@ private:
        static void _move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
        {
                CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+               IV_ASSERT(thiz != NULL);
+
                thiz->move(x, y);
        };
 
        static void _resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
        {
                CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+               IV_ASSERT(thiz != NULL);
+
                thiz->resize(w, h);
        };
 
        static void _show(Evas_Object *obj)
        {
                CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+               IV_ASSERT(thiz != NULL);
+
                thiz->show();
        };
 
        static void _hide(Evas_Object *obj)
        {
                CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+               IV_ASSERT(thiz != NULL);
+
                thiz->hide();
        };
 
        static void _calculate(Evas_Object *obj)
        {
                CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+               IV_ASSERT(thiz != NULL);
+
                thiz->draw();
        };
 
        static void _color_set(Evas_Object *obj, int r, int g, int b, int a)
        {
                CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+               IV_ASSERT(thiz != NULL);
+
                thiz->color_set(r,g,b,a);
        };
 
        static void _clip_set(Evas_Object *obj, Evas_Object * clip)
        {
                CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+               IV_ASSERT(thiz != NULL);
+
                thiz->clip_set(clip);
        };
 
        static void _clip_unset(Evas_Object *obj)
        {
                CEvasSmartObject *thiz = static_cast<CEvasSmartObject *>(evas_object_smart_data_get(obj));
+               IV_ASSERT(thiz != NULL);
+
                thiz->clip_unset();
        };
 
old mode 100755 (executable)
new mode 100644 (file)
index 6e324da..d19fd56
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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
 
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 300815c..d460f7f
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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
 
@@ -53,6 +53,10 @@ public:
                return CSize(w + rhs.Width(), h + rhs.Height());
        }
 
+       const CSize operator -(const CSize &rhs) const {
+               return CSize(w - rhs.Width(), h - rhs.Height());
+       }
+
        int Width() const { return w;};
        int Height() const { return h;};
 
diff --git a/widget/include/ScrollerClient.h b/widget/include/ScrollerClient.h
deleted file mode 100755 (executable)
index e033f1c..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-
-#pragma once
-
-#include <Elementary.h>
-#include "Object.h"
-
-#include "Scroller.h"
-
-#undef DISABLE_ORIGIN
-
-class CScrollerClient : public CObject {
-       friend class CScroller;
-public:
-       CScrollerClient(Evas_Object *parent) : m_zoom(0.0f), m_size(0,0), m_update(0), m_origin(0,0), m_scroller(NULL) {
-               CreateObject(parent);
-       };
-
-       virtual ~CScrollerClient(){
-               MSG_HIGH("CScrollerClient destructor");
-       };
-
-public:
-       const CRect GetClientRect() const {
-               // Returns window rect(LCD coordinate)
-               return CRect(topleft, m_extent);
-       };
-
-       virtual void Move(int x, int y) { topleft.MoveTo(x,y);  };
-       virtual void MoveBy(int dx, int dy) { topleft.MoveBy(dx,dy); };
-
-       virtual void PanX(int x) { topleft.X(x);        };
-       virtual void PanY(int y) { topleft.Y(y);        };
-
-       virtual void Draw() { MSG_HIGH("Scroller client Draw"); };
-
-       virtual void BeginUpdate() {
-               m_update++;
-
-               MSG_HIGH("Begin update. Count=%d", m_update);
-       };
-       virtual void EndUpdate() {
-               m_update--;
-
-               MSG_HIGH("End update. Count=%d", m_update);
-       };
-
-#ifndef DISABLE_ORIGIN
-       virtual void SetOrigin(int x, int y) {
-               MSG_LOW("Set Origin (%d,%d)", x, y);
-               m_origin = CPoint(x,y);
-       };
-
-       const CPoint \r&GetOrigin() const {
-               return m_origin;
-       };
-
-#endif
-       // Scroller client original size
-       virtual void SetSize(const CSize &size) {
-               MSG_HIGH("CScrollerClient SetSize(%d,%d)", size.Width(), size.Height());
-
-               m_size = size;
-       };
-       virtual const CSize &GetClientSize() const { return m_size; };
-       virtual double Zoom() const { return m_zoom; };
-       virtual void Zoom(double zoom) {
-               m_zoom = zoom;
-
-               m_extent = m_size * m_zoom;
-
-               MSG_LOW("Set Zoom=%f", m_zoom);
-       };
-
-       void Changed() {
-               m_scroller->OnChanged(this);
-       };
-
-private:
-       void SetScroller(CScroller *scroller) {
-               m_scroller = scroller;
-       };
-
-       void UnSetScroller() {
-               m_scroller = NULL;
-       };
-
-// Need OnResized??
-protected:
-       double m_zoom;
-
-       CPoint topleft;
-       CSize  m_size;                  // original size
-
-       int m_update;
-
-private:
-
-#ifndef DISABLE_ORIGIN
-       CPoint m_origin;
-#endif
-       CSize  m_extent;                // display size
-
-       CScroller *m_scroller;
-
-};
-
-
old mode 100755 (executable)
new mode 100644 (file)
index d0ef0eb..f7d4988
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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
 
@@ -64,7 +64,19 @@ public:
        static double EaseInoutTransit(double t) {
                double ts = t * t;
                double tc = ts * t;
-               return (-2 * tc + 3 * ts);
+               return (6 * tc * ts -15 * ts * ts  + 10 * tc);
+       }
+
+       static double EaseoutQuinticTransit(double t) {
+               double ts = t * t;
+               double tc = ts * t;
+               return (tc * ts  - 5 * ts * ts + 10 * tc - 10 * ts + 5 * t);
+       }
+
+       static double EaseoutCubicTransit(double t) {
+               double ts = t * t;
+               double tc = ts * t;
+               return (tc + -3*ts + 3*t);
        }
 
 };
old mode 100755 (executable)
new mode 100644 (file)
index bd0aba4..7b18a69
@@ -1,24 +1,26 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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_IMAGE_H__
 #define __IVUG_IMAGE_H__
 
 #include <Evas.h>
 
+#include "ivug-define.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -43,6 +45,7 @@ ivug_image_unset(Evas_Object *obj);
 /*
        Configuration
 */
+
 void
 ivug_image_hold_set(const Evas_Object *obj, Eina_Bool hold);   // If set HOLD, all events including mouse is ignored.
 
@@ -98,7 +101,7 @@ ivug_image_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h);
        x,y,w,h is LCD corrdinate
 */
 Evas_Object *
-ivug_image_region_image_get(Evas_Object *obj, int x, int y, int w, int h );
+ivug_image_region_image_get(Evas_Object *obj, int x, int y, int w, int h);
 
 
 /*
old mode 100755 (executable)
new mode 100644 (file)
index 8147603..394dbbe
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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_LISTPOPUP_H__
 #define __IVUG_LISTPOPUP_H__
@@ -53,7 +53,7 @@ void *ivug_listpopup_item_get_data(Ivug_ListPopup_Item *item);
 void ivug_listpopup_item_disabled_set(Ivug_ListPopup_Item *item);
 void ivug_listpopup_item_enabled_set(Ivug_ListPopup_Item *item);
 const char *ivug_listpopup_item_get_text(Ivug_ListPopup_Item *item);
-
+Elm_Object_Item *ivug_listpopup_item_get_item(Ivug_ListPopup_Item *item);
 
 /*
        Show Time!
old mode 100755 (executable)
new mode 100644 (file)
index ba06621..53db75c
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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_SCISSORBOX_H__
 #define __IVUG_SCISSORBOX_H__
old mode 100755 (executable)
new mode 100644 (file)
index 52c7886..4928985
Binary files a/widget/res/images/crop/T06_selection.png and b/widget/res/images/crop/T06_selection.png differ
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/widget/res/images/scissorbox/T01_btn_optiontray.png b/widget/res/images/scissorbox/T01_btn_optiontray.png
deleted file mode 100755 (executable)
index acaf908..0000000
Binary files a/widget/res/images/scissorbox/T01_btn_optiontray.png and /dev/null differ
diff --git a/widget/res/images/scroller/transparent_bg.png b/widget/res/images/scroller/transparent_bg.png
new file mode 100644 (file)
index 0000000..7f2c600
Binary files /dev/null and b/widget/res/images/scroller/transparent_bg.png differ
old mode 100755 (executable)
new mode 100644 (file)
index 935f10b..bd8427f
  * limitations under the License.
  */
 
+#define DECO_WIDTH (10)
+
+#define VISIBILITY 1
+
+#undef EDJE_DEBUG
+
 collections {
        group {
                name: "scroller";
 
+               script {
+                       public gValue;                  // Glow value
+/*
+               This makes edje crash...
+                       const Message_ID {
+                               glow = 0,
+                               show,
+                               hide,
+                       };
+*/
+                       public message(Msg_Type:type, id, ...) {
+                               if( (type==MSG_INT_SET) && (id==0) )            // Glow
+                               {
+                                       new alpha;
+
+                                       alpha = getarg(2);
+
+                                       gValue = alpha;
+
+                                       glow(alpha);
+                               }
+                               else if( (type==MSG_STRING_INT) && (id==0) )            // Glow Part
+                               {
+                                       new alpha;
+                                       new  partname[31];
+
+                                       snprintf(partname, 31, "%s",getarg(2));
+
+#ifdef EDJE_DEBUG
+                                       set_text(PART:"dbg", partname);
+#endif
+                                       glow_part(partname, alpha);
+
+
+                               }
+                               else if( (type==MSG_STRING) && (id==1) )                // MSG Show
+                               {
+                                       new  partname[31];
+
+                                       snprintf(partname, 31, "%s",getarg(2));
+                                       set_state(get_part_id(partname), "default", 0.0);
+                               }
+                               else if( (type==MSG_STRING) && (id==2) )                // MSG Hide
+                               {
+                                       new  partname[31];
+
+                                       snprintf(partname, 31, "%s",getarg(2));
+
+                                       // set_text(PART:"dbg", partname);
+
+                                       set_state(get_part_id(partname), "hide", 0.0);
+
+                               }
+                       }
+
+                       public glow_part(partname[], value) {
+                               new part_id;
+
+                               part_id = get_part_id(partname);
+
+                               custom_state(part_id, "default", 0.0);
+                               set_state_val(part_id, STATE_COLOR, 255, 255, 255, value);
+                               set_state(part_id, "custom", 0.0);
+                       }
+
+                       public glow(value) {
+                               glow_part("clip_t", value);
+                               glow_part("clip_b", value);
+                               glow_part("clip_l", value);
+                               glow_part("clip_r", value);
+                       }
+
+                       public unglow(value) {
+                               glow_part("clip_t", value);
+                               glow_part("clip_b", value);
+                               glow_part("clip_l", value);
+                               glow_part("clip_r", value);
+                       }
+               }
+
                parts {
                        part {
                                name: "elm.rect.bg";
@@ -33,8 +119,206 @@ collections {
                                }
                        }
 
+#ifdef EDJE_DEBUG
+       part {
+            name: "dbg";
+            type: TEXT;
+            description {
+               min: 50 50;
+               state: "default" 0.0;
+               color: 0 0 255 255; /* blue */
+               rel1.relative: 0.0 0.0;
+               rel2.relative: 1.0 1.0;
+               align: 0.2 0.5;
+               visible: 0;
+               text {
+                  font: "arial";
+                  size: 22;
+                  min: 1 1;
+               }
+            }
+         }
+#endif
+
+                       part {
+                               name: "glow_t";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               clip_to: "clip_t";
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       rel1.to: "clip_t";
+                                       rel2.to: "clip_t";
+                                       color: 255 0 0 255;
+                               }
+                       }
+
+                       part {
+                               name: "glow_b";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               clip_to: "clip_b";
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       rel1.to: "clip_b";
+                                       rel2.to: "clip_b";
+                                       color: 255 0 0 255;
+                               }
+                       }
+
+
+                       part {
+                               name: "glow_l";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               clip_to: "clip_l";
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       rel1.to: "clip_l";
+                                       rel2.to: "clip_l";
+                                       color: 255 0 0 255;
+                               }
+                       }
+
+                       part {
+                               name: "glow_r";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               clip_to: "clip_r";
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       rel1.to: "clip_r";
+                                       rel2.to: "clip_r";
+                                       color: 255 0 0 255;
+                               }
+                       }
+
+                       part {
+                               name: "clip_t";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       rel1 { relative: 0.0 0.0; }
+                                       rel2 { relative: 1.0 0.0; }
+                                       align: 0.5 0.0;
+                                       min: 0 DECO_WIDTH;
+                                       color: 255 255 255 0;
+                               }
+                               description {
+                                       state: "hide" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 255 255 255 0;
+                               }
+                       }
+
+                       part {
+                               name: "clip_b";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               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 DECO_WIDTH;
+                                       color: 255 255 255 0;
+                               }
+                               description {
+                                       state: "hide" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 255 255 255 0;
+                               }
+                       }
+
+
+                       part {
+                               name: "clip_l";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       rel1 { relative: 0.0 1.0; to_y: "clip_t"; }
+                                       rel2 { relative: 0.0 0.0; to_y: "clip_b";}
+                                       align: 0.0 0.5;
+                                       min: DECO_WIDTH 0;
+                                       color: 255 255 255 0;
+                               }
+                               description {
+                                       state: "hide" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 255 255 255 0;
+                               }
+                       }
+
+                       part {
+                               name: "clip_r";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       rel1 { relative: 1.0 1.0; to_y: "clip_t"; }
+                                       rel2 { relative: 1.0 0.0; to_y: "clip_b";}
+                                       align: 1.0 0.5;
+                                       min: DECO_WIDTH 0;
+                                       color: 255 255 255 0;
+                               }
+
+                               description {
+                                       state: "hide" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 255 255 255 0;
+                               }
+
+                       }
                }               // End of parts
+
+               programs {
+                       program { name: "show";
+                               signal: "glow.show";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "clip_t";
+                               target: "clip_b";
+                               target: "clip_l";
+                               target: "clip_r";
+                       }
+                       program { name: "hide";
+                               signal: "glow.hide";
+                               source: "elm";
+                               action: STATE_SET "hide" 0.0;
+                               target: "clip_t";
+                               target: "clip_b";
+                               target: "clip_l";
+                               target: "clip_r";
+                       }
+               }
+
        }
 }
 
+/*
+       Operation
+
+       glow.[r/l/b/t].[show/hide]  : Visibility
+       glow.[r/l/b/t].[glow]  : Glow Effect. with value(0~255)
+
+
+*/
 
old mode 100755 (executable)
new mode 100644 (file)
index fce37a6..c0284ae
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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
 
old mode 100755 (executable)
new mode 100644 (file)
index cfe3b5f..f44124f
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 "Primitives.h"
 #include <algorithm>
diff --git a/widget/src/common/Scroller.cpp b/widget/src/common/Scroller.cpp
deleted file mode 100755 (executable)
index 01d8100..0000000
+++ /dev/null
@@ -1,1386 +0,0 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-
-#include "Scroller.h"
-
-#include "ivug-debug.h"
-#include <algorithm>
-
-#include "EFLUtil.h"
-#include "Animation.h"
-#include "ECoreAnimator.h"
-#include "ScrollerClient.h"
-
-#define EDJ_PATH PREFIX"/res/edje/"PACKAGE
-
-#undef LOG_LVL
-#define LOG_LVL DBG_MSG_LVL_HIGH
-
-#undef LOG_CAT
-#define LOG_CAT "IV-SCROLLER"
-
-#define ENABLE_CLIPPER
-
-// 100 pixel ´ç 100 ms °É¸®µµ·Ï ¿òÁ÷ÀδÙ.
-#define MIN_ZOOM_RATIO (0.85f)
-
-#define SCR_VELOCITY(dist, v) ((((dist) > 0 ? (dist) : -(dist)) *0.1f) / 100)
-
-CScroller::CScroller(const char *name) : CObject(), m_clipper(NULL), m_gesture(NULL), m_event(NULL), m_client(NULL), m_nFinger(0), m_ani(NULL), m_freeze(false), m_resized(false), m_calcjob(NULL)
-{
-       MSG_HIGH("Scroller added : %s", name);
-
-       m_name = name;
-       m_ani_zoom = new ECoreAnimator();
-};
-
-CScroller::~CScroller()
-{
-       MSG_HIGH("Scroller removed");
-       delete m_ani_zoom;
-       m_ani_zoom= NULL;
-
-       if ( m_calcjob )
-       {
-               ecore_job_del(m_calcjob);
-               m_calcjob = NULL;
-       }
-
-       UnsetClient();
-
-       if ( m_obj )            // Scroller itself is removed!
-       {
-               evas_object_del(m_obj);
-       }
-       m_obj = NULL;
-
-
-};
-
-Evas_Event_Flags CScroller::_zoom_start(void *data, void *event_info)
-{
-       Elm_Gesture_Zoom_Info *p = (Elm_Gesture_Zoom_Info *) event_info;
-       MSG_LOW("zoom start <%d,%d> <%f>", p->x, p->y, p->zoom);
-
-       CScroller *thiz = static_cast<CScroller *>(data);
-
-       thiz->zoom_start(CPoint(p->x, p->y), p->zoom);
-
-       return EVAS_EVENT_FLAG_NONE;
-}
-
-Evas_Event_Flags CScroller::_zoom_move(void *data, void *event_info)
-{
-       Elm_Gesture_Zoom_Info *p = (Elm_Gesture_Zoom_Info *) event_info;
-       MSG_LOW("zoom move <%d,%d> <%f>", p->x, p->y, p->zoom);
-
-       CScroller *thiz = static_cast<CScroller *>(data);
-
-       thiz->zoom_move(CPoint(p->x, p->y), p->zoom);
-
-       return EVAS_EVENT_FLAG_NONE;
-}
-
-Evas_Event_Flags CScroller::_zoom_end(void *data, void *event_info)
-{
-       Elm_Gesture_Zoom_Info *p = (Elm_Gesture_Zoom_Info *) event_info;
-       MSG_LOW("zoom end <%d,%d> <%f>", p->x, p->y, p->zoom);
-
-       CScroller *thiz = static_cast<CScroller *>(data);
-
-       thiz->zoom_end(CPoint(p->x, p->y), p->zoom);
-
-       return EVAS_EVENT_FLAG_NONE;
-}
-
-Evas_Event_Flags CScroller::_zoom_abort(void *data, void *event_info)
-{
-       Elm_Gesture_Zoom_Info *p = (Elm_Gesture_Zoom_Info *) event_info;
-       MSG_LOW("zoom abort <%d,%d> <%f>", p->x, p->y, p->zoom);
-
-       CScroller *thiz = static_cast<CScroller *>(data);
-
-       thiz->zoom_abort(CPoint(p->x, p->y), p->zoom);
-
-       return EVAS_EVENT_FLAG_NONE;
-}
-
-Evas_Event_Flags CScroller::_momentum_start(void *data, void *event_info)
-{
-       Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) event_info;
-       MSG_LOW("momentum_start <%d,%d>", p->x2, p->y2);
-
-       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
-
-       CScroller *thiz = static_cast<CScroller *>(data);
-
-       thiz->momentum_start(CPoint(p->x1, p->y1), CPoint(p->x2, p->y2), CSize(p->mx, p->my) );
-
-       return EVAS_EVENT_FLAG_NONE;
-}
-
-Evas_Event_Flags CScroller::_momentum_move(void *data, void *event_info)
-{
-       Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) event_info;
-       MSG_LOW("momentum move <%d,%d>", p->x2, p->y2);
-
-       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
-
-       CScroller *thiz = static_cast<CScroller *>(data);
-
-       thiz->momentum_move(CPoint(p->x1, p->y1), CPoint(p->x2, p->y2), CSize(p->mx, p->my) );
-
-       return EVAS_EVENT_FLAG_NONE;
-}
-
-Evas_Event_Flags CScroller::_momentum_end(void *data, void *event_info)
-{
-       Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) event_info;
-       MSG_LOW("momentum end <%d,%d> <%d,%d>", p->x2, p->y2, p->mx, p->my);
-
-       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
-
-       CScroller *thiz = static_cast<CScroller *>(data);
-
-       thiz->momentum_end(CPoint(p->x1, p->y1), CPoint(p->x2, p->y2), CSize(p->mx, p->my) );
-
-       return EVAS_EVENT_FLAG_NONE;
-}
-
-Evas_Event_Flags CScroller::_momentum_abort(void *data, void *event_info)
-{
-       Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) event_info;
-       MSG_LOW("momentum abort <%d,%d> <%d,%d>", p->x2, p->y2, p->mx, p->my);
-
-       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
-
-       CScroller *thiz = static_cast<CScroller *>(data);
-
-       thiz->momentum_abort(CPoint(p->x1, p->y1), CPoint(p->x2, p->y2), CSize(p->mx, p->my) );
-
-       return EVAS_EVENT_FLAG_NONE;
-}
-
-Evas_Event_Flags CScroller::_dbl_click_start(void *data , void *event_info)
-{
-       Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
-
-       MSG_HIGH("Double click start");
-
-       if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
-
-       return EVAS_EVENT_FLAG_ON_HOLD;
-}
-
-Evas_Event_Flags CScroller::_dbl_click_end(void *data , void *event_info)
-{
-   Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
-
-   MSG_HIGH("Double click end");
-
-   if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
-
-   CScroller *thiz = static_cast<CScroller *>(data);
-
-   thiz->double_click(CPoint(p->x, p->y));
-
-   return EVAS_EVENT_FLAG_ON_HOLD;
-}
-
-Evas_Event_Flags CScroller::_dbl_click_abort(void *data , void *event_info)
-{
-   Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
-
-   MSG_HIGH("Double click abort");
-
-   if ( p->n != 1 ) return EVAS_EVENT_FLAG_NONE;
-
-   return EVAS_EVENT_FLAG_ON_HOLD;
-}
-
-bool CScroller::SetClient(CScrollerClient *client)
-{
-       MSG_HIGH("[%s] Set client.", m_name.c_str());
-
-       if ( client == m_client ) return true;
-
-       if ( m_client != NULL )
-       {
-               // Removing old client first.
-               UnsetClient();
-       }
-
-       m_client = client;
-
-       m_client->SetScroller(this);
-
-       evas_object_smart_member_add(m_client->GetObject(), GetObject());
-       evas_object_stack_below(m_client->GetObject(), m_event);
-
-#ifdef ENABLE_CLIPPER
-       evas_object_clip_set(m_client->GetObject(), m_clipper);
-       evas_object_show(m_clipper);
-#endif
-
-       evas_object_pass_events_set(m_event, EINA_FALSE);
-       evas_object_pass_events_set(m_client->GetObject(), EINA_FALSE);
-
-       CSize img = m_client->GetClientSize();
-
-       if ( img.Width() == 0 || img.Height() == 0 )
-       {
-               MSG_WARN("Not ready to dump client");
-               return true;
-       }
-
-       m_zoom_autofit = GetAutoFitZoom();
-       m_rect_autofit = GetAutoFitGeometry();
-
-       MSG_HIGH("[%s] Set client. AutoFitZoom(%f) Rect(%d,%d,%d,%d)", m_name.c_str(), m_zoom_autofit, m_rect_autofit.Left(), m_rect_autofit.Top(), m_rect_autofit.Width(), m_rect_autofit.Height());
-
-       DoAutoFit();
-
-       return true;
-};
-
-bool CScroller::UnsetClient()
-{
-       if ( m_client == NULL ) return true;
-
-       MSG_HIGH("[%s] Unset client.", m_name.c_str());
-
-       evas_object_pass_events_set(m_event, EINA_TRUE);
-
-#ifdef ENABLE_CLIPPER
-       evas_object_clip_unset(m_client->GetObject());
-       evas_object_hide(m_clipper);
-#endif
-
-       evas_object_smart_member_del(m_client->GetObject());
-
-       m_client->UnSetScroller();
-       m_client = NULL;
-
-       return true;
-};
-
-void CScroller::OnChanged(CScrollerClient *client)
-{
-       MSG_HIGH("[%s] Client changed!", m_name.c_str());
-
-       m_zoom_autofit = GetAutoFitZoom();
-       m_rect_autofit = GetAutoFitGeometry();
-
-       DoAutoFit();
-}
-
-void CScroller::DisableEvent() {
-       MSG_LOW("Disable events");
-
-       m_freeze = true;
-
-//             evas_object_freeze_events_set(m_event, EINA_TRUE);
-//     elm_object_disabled_set(m_gesture, EINA_TRUE);
-};
-
-void CScroller::EnableEvent() {
-       MSG_LOW("Enable events");
-
-//     elm_object_disabled_set(m_gesture, EINA_FALSE);
-//             evas_object_freeze_events_set(m_event, EINA_FALSE);
-
-       m_freeze = false;
-
-};
-
-
-/* (lcd size * BASE_OF_BIG_SIZE_IMAGE) define big size image */
-#define BASE_OF_BIG_SIZE_IMAGE (5)
-
-/* d_size_percent is for bouncing size rate */
-/* return base_size(width or height)/limit_size */
-static double _calc_limit_zoom(int org_w, int org_h,
-                               int img_w, int img_h, int lcd_w, int lcd_h)
-{
-
-       int img_base = 0;
-       int lcd_base = 0;
-       int org_base = 0;
-       int limit = 0;
-
-       MSG_LOW("org w, h = %d, %d, img w, h = %d, %d, lcd w, h = %d, %d",
-                       org_w, org_h, img_w, img_h, lcd_w, lcd_h);
-
-       double lcd_ratio = (double)lcd_h/lcd_w;
-       double org_ratio = (double)org_h/org_w;
-
-       if ( org_ratio > lcd_ratio )
-       {
-               img_base = img_h;
-               lcd_base = lcd_h;
-               org_base = org_h;
-       }
-       else
-       {
-               img_base = img_w;
-               lcd_base = lcd_w;
-               org_base = org_w;
-       }
-
-#if 0
-       /* img region is smaller than lcd region for min zoom */
-       if (img_base < lcd_base)
-       {
-               return (double)(img_base/lcd_base);
-       }
-#else
-       /* (img region*(1-d_size_rate)) is smaller than lcd region for min zoom */
-       if (img_base*(1.2) < lcd_base)
-       {
-               return (double)(img_base*(1.2)/lcd_base);
-       }
-       else
-       {
-               /* (img region*(1+d_size_rate)) for max zoom bouncing */
-               img_base *= (0.8);
-       }
-#endif
-
-       if(lcd_base*BASE_OF_BIG_SIZE_IMAGE < org_base)  /* original img size is larger than (lcd size*3) */
-       {
-               limit = org_base;       /* 1:1 */
-       }
-       else if(lcd_base < org_base)    /* original img size is larger than lcd size */
-       {
-               limit = MAX(org_base*(BASE_OF_BIG_SIZE_IMAGE-1), lcd_base*BASE_OF_BIG_SIZE_IMAGE);
-       }
-       else    /* original img size is smaller than lcd size */
-       {
-               limit = lcd_base*BASE_OF_BIG_SIZE_IMAGE;
-       }
-       if(img_base > limit)
-       {
-               return (double)img_base/limit;
-       }
-       return 1.0;
-}
-
-void CScroller::Zoom(const CPoint &center, double zoom)
-{
-       CPoint topleft;
-       CPoint newCenter;
-
-       topleft = m_client->GetClientRect().TopLeft();
-       newCenter = center - topleft;           // Get Image local coordinate center.
-
-       {
-               CSize zoomed = m_client->GetClientSize();
-               CRect rect = m_client->GetClientRect();
-//             ScreenToClient(rect);
-
-               zoomed = zoomed * zoom;
-
-               MSG_LOW("Current Geo XYWH(%d,%d,%d,%d)", rect.Left(), rect.Top(), rect.Width(), rect.Height());
-               MSG_LOW("Origianl size WH(%d,%d)", m_extent.Width(), m_extent.Height());
-               MSG_LOW("Zoomed size WH(%d,%d) Zoom=%f", zoomed.Width() , zoomed.Height(), zoom);
-
-               MSG_LOW("Zoom %f %f", m_extent.Width() * zoom, m_extent.Height() * zoom);
-               CPoint moved;
-
-               moved.X(newCenter.X() * zoomed.Width() / (double)rect.Width());
-               moved.Y(newCenter.Y() * zoomed.Height() / (double)rect.Height());
-
-               MSG_LOW("Center XY(%d,%d)", center.X() , center.Y());
-               MSG_LOW("Moved XY(%d,%d)", moved.X() , moved.Y());
-
-               CPoint dMove = moved - newCenter;
-
-               MSG_LOW("New Moved XY(%d,%d)", dMove.X() , dMove.Y());
-
-               MSG_LOW("New Geo XYWH(%d,%d,%d,%d)", rect.Left() - dMove.X(), rect.Top() - dMove.Y(), zoomed.Width(), zoomed.Height());
-
-               m_client->Move(rect.Left() - dMove.X(), rect.Top() - dMove.Y());
-               m_client->Zoom(zoom);
-       }
-
-       UpdateClient();
-}
-
-
-static void _on_event_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_info)
-{
-       MSG_HIGH("Event layer clicked : %s Layer=%d", evas_object_name_get(obj), evas_object_layer_get(obj));
-}
-
-void CScroller::move(int x, int y)
-{
-       MSG_MED("[%s] Move Scroller to XY(%d,%d)", m_name.c_str(), x, y);
-
-       m_origin.MoveTo(x,y);           // Origin
-
-       if ( m_calcjob )
-       {
-               ecore_job_del(m_calcjob);
-               m_calcjob = NULL;
-       }
-
-       m_calcjob = ecore_job_add(_CalcJob, this);
-}
-
-void CScroller::resize(int w, int h)
-{
-       if ( m_extent.Width() == w && m_extent.Height() == h) return;
-
-       MSG_HIGH("[%s] Resize Scroller to WH(%d,%d)", m_name.c_str(), w, h);
-
-       m_extent.SetSize(w,h);
-       m_resized = true;
-
-       if ( m_calcjob )
-       {
-               ecore_job_del(m_calcjob);
-               m_calcjob = NULL;
-       }
-
-       m_calcjob = ecore_job_add(_CalcJob, this);
-
-
-}
-
-void CScroller::show()
-{
-       MSG_HIGH("[%s] Scroller show", m_name.c_str());
-
-       evas_object_show(m_edje);
-       evas_object_show(m_event);
-
-       if ( m_client )
-               evas_object_show(m_client->GetObject());
-
-}
-
-void CScroller::hide()
-{
-       MSG_HIGH("[%s] Scroller hide", m_name.c_str());
-
-       if ( m_client )
-               evas_object_hide(m_client->GetObject());
-
-       evas_object_hide(m_edje);
-       evas_object_hide(m_event);
-}
-
-void CScroller::draw()
-{
-       if ( m_client == NULL )
-       {
-               MSG_HIGH("[%s] Client NULL", m_name.c_str());
-               return;
-       }
-
-       if ( m_extent.Width() == 0 || m_extent.Height() == 0)
-       {
-               MSG_HIGH("Extent is abnormal");
-               return;
-       }
-
-       UpdateClient();
-
-//     EFL::dump_obj(GetObject(), 0);
-}
-
-void CScroller::UpdateClient()
-{
-       const CRect &sRect = m_client->GetClientRect();
-//     ScreenToClient(sRect);
-       MSG_MED("[%s] Draw. Origin(%d,%d) XYWH(%d,%d,%d,%d)", m_name.c_str(), m_origin.X(), m_origin.Y(), sRect.Left(), sRect.Top(), sRect.Width(), sRect.Height() );
-
-       m_client->SetOrigin(m_origin.X(), m_origin.Y());
-       m_client->Draw();
-
-}
-
-
-CRect CScroller::GetAutoFitGeometry()
-{
-       CSize img = m_client->GetClientSize();
-
-       MSG_LOW("Client size : WH(%d,%d", m_extent.Width(), m_extent.Height());
-       MSG_LOW("Image size : WH(%d,%d)", img.Width(), img.Height());
-
-       int ph, pw;
-
-       ph = (img.Height() * m_extent.Width()) / img.Width();
-
-       if (ph > m_extent.Height())
-       {
-               pw = (img.Width() * m_extent.Height()) / img.Height();
-               ph = m_extent.Height();
-       }
-       else
-       {
-               pw = m_extent.Width();
-       }
-
-// Calculate XY
-       int px, py;
-
-       px = (m_extent.Width() - pw ) / 2;
-       py = (m_extent.Height() - ph ) / 2;
-
-       CRect rect(px, py, pw, ph);
-
-       return rect;
-}
-
-double CScroller::GetAutoFitZoom()
-{
-       double zoom;
-
-       CSize img = m_client->GetClientSize();
-
-       MSG_LOW("Client size : WH(%d,%d)", m_extent.Width(), m_extent.Height());
-       MSG_LOW("Image size : WH(%d,%d)", img.Width(), img.Height());
-
-       if ( img.Width() == 0 || img.Height() == 0 )
-       {
-               MSG_ERROR("Invalid img. ImgWH(%d,%d)", img.Width(), img.Height());
-               return 0.0f;
-       }
-
-       int ph, pw;
-
-       ph = (img.Height() * m_extent.Width()) / img.Width();
-
-       if (ph > m_extent.Height())
-       {
-               pw = (img.Width() * m_extent.Height()) / img.Height();
-               ph = m_extent.Height();
-       }
-       else
-       {
-               pw = m_extent.Width();
-       }
-
-       if ( img.Width() > img.Height())
-       {
-               zoom = (double)pw / img.Width();
-       }
-       else
-       {
-               zoom = (double)ph / img.Height();
-       }
-
-       return zoom;
-}
-
-void CScroller::DoAutoFit()
-{
-       if ( m_client == NULL )
-       {
-               MSG_LOW("Client is NULL. DoAutoFit()");
-               return;
-       }
-
-       if ( m_extent.Width() <= 1 ||  m_extent.Height() <= 1 )         // Damm EFL!!! object resized to (1,115) first and then enlarge up to screen size.
-       {
-               MSG_ERROR("Rect is not configured (%d,%d)", m_extent.Width(), m_extent.Height());
-               return ;
-       }
-
-       if ( m_rect_autofit.Width() == 0 ||  m_rect_autofit.Height() == 0 )
-       {
-               MSG_ERROR("Rect is not configured");
-               return ;
-       }
-
-// Stop animation
-       m_ani_zoom->Stop();
-       if ( m_ani ) delete m_ani;
-       m_ani = NULL;
-
-       m_client->Move(m_rect_autofit.Left(), m_rect_autofit.Top());
-       m_client->Zoom(m_zoom_autofit);
-
-       MSG_HIGH("[%s] DoAutofit : XY(%d,%d,%d,%d) Zoom=%f", m_name.c_str(), m_rect_autofit.Left(), m_rect_autofit.Top(), m_rect_autofit.Width(), m_rect_autofit.Height(), m_zoom_autofit);
-       MSG_LOW("[%s] Origin XY(%d,%d)", m_name.c_str(), m_origin.X(), m_origin.Y());
-
-       UpdateClient();
-
-       m_client->EndUpdate();
-}
-
-Evas_Object *CScroller::CreateObject(Evas_Object *parent)
-{
-       CObject::CreateObject(parent);
-       evas_object_name_set(GetObject(), "Scroller");
-
-       m_edje = edje_object_add(evas_object_evas_get(GetObject()));
-       if (!m_edje)
-       {
-               MSG_ERROR("could not create edje object!");
-               return false;
-       }
-
-       if (!edje_object_file_set(m_edje, EDJ_PATH"/ivug-scroller.edj", "scroller"))
-       {
-               Edje_Load_Error err = edje_object_load_error_get(m_edje);
-               const char *errmsg = edje_load_error_str(err);
-               MSG_ERROR("could not load 'ivug-scroller' from %s: %s",EDJ_PATH"ivug-scroller.edj", errmsg);
-
-               evas_object_del(m_edje);
-               return false;
-       }
-
-       evas_object_name_set(m_edje, "Scroller:Edje");
-       evas_object_event_callback_add( m_edje, EVAS_CALLBACK_MOUSE_DOWN, _on_event_mouse_down, NULL);
-
-       evas_object_smart_member_add(m_edje, GetObject());
-
-// Get Event rect
-       m_event = EFL::create_rect(m_edje);
-       evas_object_name_set(m_event, "Scroller:Event");
-
-       evas_object_pass_events_set(m_event, EINA_TRUE);
-
-       if ( m_event == NULL )
-       {
-               MSG_ERROR("Cannot found event rect");
-               evas_object_del(m_edje);
-               return false;
-       }
-       evas_object_event_callback_add(m_event, EVAS_CALLBACK_MOUSE_DOWN, _on_event_mouse_down, NULL);
-
-       evas_object_smart_member_add(m_event, GetObject());
-
-       m_gesture = EFL::create_gesture(m_event);
-       elm_gesture_layer_hold_events_set(m_gesture, EINA_TRUE);
-
-       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_START, _zoom_start, this);
-       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_MOVE, _zoom_move, this);
-       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_END, _zoom_end, this);
-       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_ABORT, _zoom_abort, this);
-       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_START, _momentum_start, this);
-       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_MOVE, _momentum_move, this);
-       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_END, _momentum_end, this);
-       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_MOMENTUM, ELM_GESTURE_STATE_ABORT, _momentum_abort, this);
-
-       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_STATE_START, _dbl_click_start, this);
-       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_STATE_END, _dbl_click_end, this);
-       elm_gesture_layer_cb_set(m_gesture, ELM_GESTURE_N_DOUBLE_TAPS, ELM_GESTURE_STATE_ABORT, _dbl_click_abort, this);
-
-       if ( elm_gesture_layer_attach(m_gesture, m_event) == EINA_FALSE)
-       {
-               MSG_ERROR("Cannot attach event rect");
-               evas_object_del(m_edje);
-               return false;
-       }
-
-       evas_object_name_set(m_gesture, "Scroller:Getsture");
-
-       evas_object_event_callback_add( m_gesture, EVAS_CALLBACK_MOUSE_DOWN, _on_event_mouse_down, NULL);
-
-// Do not add m_gesture as smart member. this makes event broken!.
-//     evas_object_smart_member_add(m_gesture, GetObject());
-#ifdef ENABLE_CLIPPER
-       m_clipper = EFL::create_clipper(m_edje);
-       evas_object_name_set(m_clipper, "Scroller:Clipper");
-       evas_object_event_callback_add( m_clipper, EVAS_CALLBACK_MOUSE_DOWN, _on_event_mouse_down, NULL);
-
-       evas_object_smart_member_add(m_clipper, GetObject());
-#endif
-
-       evas_object_repeat_events_set(GetObject(), EINA_FALSE);
-
-       MSG_HIGH("Scroller is created.");
-
-       return GetObject();
-}
-
-void CScroller::CalcJob()
-{
-       MSG_MED("[%s] Draw job!!! (%d,%d,%d,%d)", m_name.c_str(), m_origin.X(), m_origin.Y(), m_extent.Width(), m_extent.Height());
-
-       m_calcjob = NULL;
-
-       evas_object_move(m_edje, m_origin.X(), m_origin.Y());
-       evas_object_move(m_event, m_origin.X(), m_origin.Y());
-
-#ifdef ENABLE_CLIPPER
-       evas_object_move(m_clipper, m_origin.X(), m_origin.Y());
-#endif
-
-       if ( m_client)
-       {
-               m_client->SetOrigin(m_origin.X(), m_origin.Y());
-       }
-
-       evas_object_resize(m_edje, m_extent.Width(), m_extent.Height());
-       evas_object_resize(m_event, m_extent.Width(), m_extent.Height());
-
-#ifdef ENABLE_CLIPPER
-       evas_object_resize(m_clipper, m_extent.Width(), m_extent.Height());
-#endif
-
-       if ( m_resized == true && m_client )
-       {
-               m_zoom_autofit = GetAutoFitZoom();
-               m_rect_autofit = GetAutoFitGeometry();
-
-               DoAutoFit();
-
-               m_resized = false;
-       }
-
-       evas_object_smart_changed(GetObject());
-
-}
-
-void CScroller::del()
-{
-       if ( m_edje )
-       {
-               evas_object_del(m_edje);
-       }
-       m_edje = NULL;
-
-       if ( m_event )
-       {
-               evas_object_del(m_event);
-       }
-       m_event = NULL;
-
-       if ( m_gesture )
-       {
-               evas_object_del(m_gesture);
-       }
-       m_gesture = NULL;
-
-#ifdef ENABLE_CLIPPER
-       if ( m_clipper )
-       {
-               evas_object_del(m_clipper);
-       }
-       m_clipper = NULL;
-#endif
-
-
-}
-
-void CScroller::DoAnim()
-{
-       // Get current rect;
-       CRect sRect = m_client->GetClientRect();
-       ScreenToClient(sRect);
-
-       const CSize &img = m_client->GetClientSize();
-
-       int ph, pw;
-
-       ph = (img.Height() * m_extent.Width()) / img.Width();
-
-       if (ph > m_extent.Height())
-       {
-               pw = (img.Width() * m_extent.Height()) / img.Height();
-               ph = m_extent.Height();
-       }
-       else
-       {
-               pw = m_extent.Width();
-       }
-
-       CRect dRect = sRect;            // Destination rect in local coord
-
-       double zoom = m_client->Zoom();
-
-       if ( img.Width() > img.Height())
-       {
-               if ( sRect.Width() < pw )
-               {
-                       MSG_HIGH("Need resize W");
-                       zoom = (double)pw / img.Width();
-                       dRect.Width(pw);
-                       dRect.Height(ph);
-               }
-       }
-       else
-       {
-               if ( sRect.Height() < ph )
-               {
-                       MSG_HIGH("Need resize H");
-                       zoom = (double)ph / img.Height();
-                       dRect.Width(pw);
-                       dRect.Height(ph);
-               }
-       }
-
-// Go Center
-       if ( dRect.Width() < m_extent.Width() )
-       {
-               // Center align
-               dRect.Left( (m_extent.Width() - dRect.Width()) / 2);
-
-               MSG_HIGH("H align %d, %d", dRect.Width(), m_extent.Width());
-       }
-       else
-       {
-               if ( dRect.Right() < m_extent.Width() ) // If reach to edge
-               {
-                       dRect.Right(m_extent.Width());
-               }
-
-               if ( dRect.Left() > 0 ) // If reach to edge
-               {
-                       dRect.Left(0);
-               }
-       }
-
-       if ( dRect.Height() < m_extent.Height() )
-       {
-               dRect.Top( (m_extent.Height() - dRect.Height()) / 2);
-
-               MSG_HIGH("V align %d, %d", dRect.Height(), m_extent.Height());
-       }
-       else
-       {
-               if ( dRect.Bottom() < m_extent.Height() )
-               {
-                       dRect.Bottom(m_extent.Height());
-               }
-
-               if ( dRect.Top() > 0 )          // If reach edge
-               {
-                       dRect.Top(0);
-               }
-       }
-
-       m_ani_zoom->Stop();
-       m_client->EndUpdate();
-
-       if ( m_ani ) delete m_ani;
-       m_ani = new CGroupAnimator();
-
-       if ( zoom != m_client->Zoom() )         // smaller than screen
-       {
-               m_ani->AddAnimator(new CSingleAnimator(m_client->Zoom(), zoom, 0.3f, CTranstionFunc::LinearTransit, CScroller::_on_ani_zoom, this));
-       }
-
-       double t1 = 0.3f;
-
-       if ( sRect.Left() !=  dRect.Left() )
-       {
-               m_ani->AddAnimator(new CSingleAnimator(sRect.Left(), dRect.Left(), t1 , CTranstionFunc::LinearTransit, CScroller::_on_ani_panX, this));
-       }
-
-       double t2 = 0.3f;
-
-       if ( dRect.Top() != sRect.Top() )
-       {
-               m_ani->AddAnimator(new CSingleAnimator(sRect.Top(),  dRect.Top() , t2, CTranstionFunc::LinearTransit, CScroller::_on_ani_panY, this));
-       }
-
-       m_client->BeginUpdate();
-       m_ani_zoom->Start(CScroller::_on_anim, (void *)this);
-
-       MSG_HIGH("Momentum end Animation started. Ani1=(%d~%d,%f) Ani2=(%d~%d,%f)", sRect.Left(), dRect.Left(), t1, sRect.Top(), dRect.Top(), t2);
-
-
-
-}
-
-
-bool CScroller::OnAnimation(double delta) {
-       if ( m_ani->IsFinished() )
-       {
-               MSG_HIGH("animation ended");
-               m_client->EndUpdate();
-               m_freeze = false;
-
-               evas_object_smart_callback_call(GetObject(), "scroll,animate,end", NULL);
-               return false;
-       }
-
-       MSG_LOW("On Animaion. %f ", delta);
-
-       m_ani->Update(delta);
-
-       UpdateClient();
-
-       evas_object_smart_callback_call(GetObject(), "scroll,animate", NULL);
-
-       return true;
-}
-
-bool CScroller::OnAnimationZoom(double value) {
-       MSG_LOW("OnAnimationZoom. %f", value);
-
-       m_client->Zoom(value);
-
-       return true;
-}
-
-bool CScroller::OnAnimationPanX(double value) {
-       MSG_LOW("OnAnimationPanX. %f", value);
-
-       m_client->PanX(value);
-
-       return true;
-}
-
-bool CScroller::OnAnimationPanY(double value) {
-       MSG_LOW("OnAnimationPanY. %f", value);
-
-       m_client->PanY(value);
-
-       return true;
-}
-
-void CScroller::zoom_start(const CPoint &center, double zoom)
-{
-       m_nFinger = 2;
-
-       MSG_HIGH("Zoom started. Current=%f Finger=%d", m_client->Zoom(), m_nFinger);
-       m_prev = center;
-
-       m_zoom = m_client->Zoom();
-       m_prevzoom = zoom;
-}
-
-void CScroller::zoom_move(const CPoint &center, double zoom)
-{
-       if ( m_freeze == true) {
-               MSG_LOW("MFreeze is true");
-               return;
-       }
-
-       CPoint dmove = center - m_prev;
-
-       MSG_MED("Zoom move center(%d,%d) zoom=%f Move(%d,%d)", center, zoom, dmove.X(), dmove.Y());
-
-       m_client->MoveBy(dmove.X(), dmove.Y());
-       m_prev = center;
-       m_prevzoom = zoom;
-
-       double fzoom = m_zoom * zoom;
-
-       CSize zoomed = m_client->GetClientSize();
-       CRect rect = m_client->GetClientRect();
-
-       MSG_MED("1. Rect (%d,%d,%d,%d)", rect.Left(), rect.Right(), rect.Width(), rect.Height() );
-
-       double limit_zoom = _calc_limit_zoom(zoomed.Width(), zoomed.Height(),
-                               rect.Width(), rect.Height(), m_extent.Width(), m_extent.Height());
-
-       if(limit_zoom != 1.0)   // Zoom level is allowed.
-       {
-               if(limit_zoom < 1.0) /* ZOOM_MIN_LIMITED */
-               {
-                       MSG_MED("ZOOM_MIN_LIMITED");
-                       if(m_prevfzoom > fzoom)
-                       {
-                               UpdateClient();
-                               return;
-                       }
-               }
-               else /* ZOOM_MAX_LIMITED */
-               {
-                       MSG_MED("ZOOM_MAX_LIMITED");
-                       if(m_prevfzoom < fzoom)
-                       {
-                               UpdateClient();
-                               return;
-                       }
-               }
-       }
-
-       Zoom(center, fzoom);
-
-       m_prevfzoom = fzoom;
-}
-
-void CScroller::zoom_end(const CPoint &center, double zoom)
-{
-       m_nFinger = 0;
-
-       MSG_HIGH("Zoom ended %d", m_nFinger);
-
-       if ( m_freeze == true) return;
-
-       m_zoom = 0.0f;
-
-       DoAnim();
-       m_freeze = true;
-
-       MSG_HIGH("Zoom ended. Animation started.");
-}
-
-void CScroller::zoom_abort(const CPoint &center, double zoom)
-{
-       m_nFinger = 0;
-
-       MSG_HIGH("Zoom aborted %d", m_nFinger);
-
-       if ( m_freeze == true) return;
-
-       m_zoom = 0.0f;
-
-       DoAnim();
-       m_freeze = true;
-
-       MSG_HIGH("Zoom ended. Animation started.");
-
-}
-
-
-void CScroller::momentum_start(const CPoint &from, const CPoint &to, const CSize &momentum)
-{
-       m_nFinger = 1;
-
-       MSG_MED("MStart : From XY(%d,%d) To XY(%d,%d) %d", from.X(), from.Y(), to.X(), to.Y(), m_nFinger);
-
-       m_prev = from;
-
-       if ( m_freeze == true) return;
-
-       if ( m_client->Zoom() >= m_zoom_autofit)        // If zoom anim is progressing
-       {
-               m_ani_zoom->Stop();
-               m_client->EndUpdate();
-
-               if ( m_ani ) delete m_ani;
-               m_ani = NULL;
-       }
-}
-
-void CScroller::momentum_move(const CPoint &from, const CPoint &to, const CSize &momentum)
-{
-       if ( m_freeze == true) return;
-
-       CPoint dmove = to - m_prev;
-
-       MSG_MED("MMove : From XY(%d,%d) To XY(%d,%d). DMove(%d,%d)", from.X(), from.Y(), to.X(), to.Y(), dmove.X(), dmove.Y());
-
-// Able to scroll?
-       CRect sRect = m_client->GetClientRect();
-       ScreenToClient(sRect);
-
-       if ( dmove.X() )
-       {
-               if ( sRect.Width() <= m_extent.Width() )
-               {
-                       MSG_MED("Case 0 SRect(%d) MSize(%d)", sRect.Width() , m_extent.Width() );
-                       dmove.X(0);
-               }
-               else
-               {
-                       if ( dmove.X() < 0 && sRect.Right() + dmove.X() <= m_extent.Width() )  // Mouse <-----
-                       {
-                               MSG_MED("Case1. dmove.X()=%d Right=%d", dmove.X(), sRect.Right());
-                               dmove.X(m_extent.Width() - sRect.Right());
-                       }
-                       else if ( dmove.X() > 0 && sRect.Left() + dmove.X() >= 0 )
-                       {
-                               MSG_MED("Case2. dmove.X()=%d Left=%d MSizeLeft=%d", dmove.X(), sRect.Left(), 0);
-                               dmove.X(0 - sRect.Left());
-                       }
-               }
-       }
-
-       if ( dmove.Y() )
-       {
-               if ( sRect.Height() <= m_extent.Height() )
-               {
-                       MSG_MED("Case 3 SRect(%d) MSize(%d)", sRect.Height() , m_extent.Height() );
-                       dmove.Y(0);
-               }
-               else
-               {
-                       if ( dmove.Y() < 0 && sRect.Bottom() + dmove.Y() <= m_extent.Height() )
-                       {
-                               MSG_MED("Case4. dmove.X()=%d Right=%d", dmove.Y(), sRect.Bottom());
-                               dmove.Y(m_extent.Height() - sRect.Bottom());
-                       }
-                       else if ( dmove.Y() > 0 && sRect.Top() + dmove.Y() >= 0 )
-                       {
-                               MSG_MED("Case5. dmove.X()=%d Left=%d MSizeLeft=%d", dmove.X(), sRect.Top(), 0);
-                               dmove.Y(0 - sRect.Top());
-                       }
-               }
-       }
-
-       m_client->MoveBy(dmove.X(), dmove.Y());
-
-       UpdateClient();
-
-       m_prev = to;
-}
-
-void CScroller::momentum_end(const CPoint &from, const CPoint &to, const CSize &momentum)
-{
-       m_nFinger = 0;
-
-       MSG_HIGH("MEnd : From XY(%d,%d) To XY(%d,%d) Momentum=(%d,%d) %d", from.X(), from.Y(), to.X(), to.Y(), momentum.Width(), momentum.Height(), m_nFinger);
-
-       if ( m_freeze == true) return;
-
-       CSize nor_momentum = momentum;
-
-       CRect sRect = m_client->GetClientRect();
-       ScreenToClient(sRect);
-
-       CRect dRect = sRect;
-
-       MSG_HIGH("MoveTo %d,%d,%d,%d", dRect.Left(), dRect.Top(), dRect.Right(), dRect.Bottom());
-
-       double zoom = m_zoom_autofit;
-
-       if ( zoom > m_client->Zoom() )
-       {
-               DoAnim();
-
-               MSG_HIGH("Momentum end. Zoom Anim. %f->%f", m_client->Zoom(), zoom );
-               return ;
-       }
-
-       if ( dRect.Width() > m_extent.Width() )
-       {
-               dRect.Left(sRect.Left() + nor_momentum.Width() );
-               if ( nor_momentum.Width() < 0 )   // Finger <<------
-               {
-                       if ( dRect.Right() < m_extent.Width() ) // If reach to edge
-                       {
-                               dRect.Right(m_extent.Width());
-                               MSG_LOW("Case 1a %d,%d dstX(%d)", dRect.Right() , m_extent.Width(), dRect.Left());
-                       }
-                       else
-                       {
-                               MSG_LOW("Case 2a %d dstX(%d)", dRect.Right() , m_extent.Width(), dRect.Left());
-                       }
-               }
-               else if ( nor_momentum.Width() > 0 ) // Finger ----->>>
-               {
-                       if ( dRect.Left() > 0 ) // If reach to edge
-                       {
-                               dRect.Left(0);
-                               MSG_LOW("Case 3a %d,%d dstX(%d)", dRect.Left() , 0, dRect.Left());
-                       }
-                       else
-                       {
-                               MSG_LOW("Case 4a %d dstX(%d)", dRect.Left() , 0, dRect.Left());
-                       }
-               }
-       }
-       else
-       {
-               dRect.Left( (m_extent.Width() - dRect.Width()) / 2);
-       }
-
-       MSG_HIGH("X Anim from %d to %d", sRect.Left(), dRect.Left());
-
-       if ( dRect.Height() > m_extent.Height() )
-       {
-               dRect.Top(sRect.Top() + nor_momentum.Height() );
-               if ( nor_momentum.Height() < 0 )   // finger ^
-               {
-                       if ( dRect.Bottom() < m_extent.Height() )       // If reach to edge
-                       {
-                               dRect.Bottom( m_extent.Height());
-                               MSG_LOW("Case 1b %d,%d dstX(%d)", dRect.Bottom() ,  m_extent.Height(), sRect.Top());
-                       }
-                       else
-                       {
-                               MSG_LOW("Case 2b %d dstX(%d) %d", dRect.Bottom() ,  m_extent.Height(), sRect.Top());
-                       }
-
-               }
-               else if ( nor_momentum.Height() > 0 )  // Finger goes downward
-               {
-                       if ( dRect.Top() > 0 )          // If reach edge
-                       {
-                               dRect.Top(0);
-                               MSG_LOW("Case 3b %d,%d dstX(%d)", dRect.Top() , 0, sRect.Top());
-                       }
-                       else
-                       {
-                               MSG_LOW("Case 4d %d dstX(%d) %d", dRect.Top() , 0, sRect.Top());
-                       }
-               }
-       }
-       else
-       {
-               // Center align
-               dRect.Top((m_extent.Height() - dRect.Height()) / 2);
-       }
-
-       MSG_HIGH("Y Anim from %d to %d", sRect.Top(), dRect.Top());
-
-       m_ani_zoom->Stop();
-       m_client->EndUpdate();
-
-       if ( m_ani ) delete m_ani;
-       m_ani = new CGroupAnimator();
-
-       double t1 = (dRect.Left() - sRect.Left()) / (double)momentum.Width();
-
-       if ( sRect.Left() !=  dRect.Left() )
-       {
-               m_ani->AddAnimator(new CSingleAnimator(sRect.Left(), dRect.Left(), t1 , CTranstionFunc::LinearTransit, CScroller::_on_ani_panX, this));
-       }
-
-       double t2 = (dRect.Top() - sRect.Top()) / (double)momentum.Height();
-
-       if ( dRect.Top() != sRect.Top() )
-       {
-               m_ani->AddAnimator(new CSingleAnimator(sRect.Top(),  dRect.Top() , t2, CTranstionFunc::LinearTransit, CScroller::_on_ani_panY, this));
-       }
-
-       m_client->BeginUpdate();
-       m_ani_zoom->Start(CScroller::_on_anim, (void *)this);
-
-       MSG_HIGH("Momentum end Animation started. Ani1=(%d~%d,%f) Ani2=(%d~%d,%f)", sRect.Left(), dRect.Left(), t1, sRect.Top(), dRect.Top(), t2);
-       MSG_HIGH("Momentum WH(%d,%d)", momentum.Width(), momentum.Height());
-}
-
-
-void CScroller::momentum_abort(const CPoint &from, const CPoint &to, const CSize &momentum)
-{
-       m_nFinger = 0;
-
-       MSG_HIGH("momentum Aborted %d", m_nFinger);
-}
-
-void CScroller::double_click(const CPoint &center)
-{
-       m_ani_zoom->Stop();
-       m_client->EndUpdate();
-
-       double src = m_client->Zoom();
-       double dst;
-
-       CRect sRect = m_client->GetClientRect();
-       ScreenToClient(sRect);
-
-       CRect dRect;
-
-       if ( m_extent.Width() < sRect.Width())
-       {
-               // To autofit
-               dst = m_zoom_autofit;
-               dRect = m_rect_autofit;
-               MSG_HIGH("AAAAAAA %d, %d", m_extent.Width(), sRect.Width());
-       }
-       else
-       {
-               dst = m_client->Zoom() * 4.0f;
-
-               {
-                       CPoint topleft;
-                       CPoint newCenter;
-
-                       topleft = m_client->GetClientRect().TopLeft();
-                       newCenter = center - topleft;           // Get Image local coordinate center.
-
-                       CSize zoomed = m_client->GetClientSize();
-                       CRect rect = m_client->GetClientRect();
-                       ScreenToClient(rect);
-
-                       zoomed = zoomed * dst;
-
-                       MSG_LOW("Current Geo XYWH(%d,%d,%d,%d)", rect.Left(), rect.Top(), rect.Width(), rect.Height());
-                       MSG_LOW("Origianl size WH(%d,%d)", m_extent.Width(), m_extent.Height());
-                       MSG_LOW("Zoomed size WH(%d,%d) Zoom=%f", zoomed.Width() , zoomed.Height(), dst);
-
-                       MSG_LOW("%f %f", m_extent.Width() * dst, m_extent.Height() * dst);
-                       CPoint moved;
-
-                       moved.X(newCenter.X() * zoomed.Width() / (double)rect.Width());
-                       moved.Y(newCenter.Y() * zoomed.Height() / (double)rect.Height());
-
-                       MSG_LOW("Center XY(%d,%d)", center.X() , center.Y());
-                       MSG_LOW("Moved XY(%d,%d)", moved.X() , moved.Y());
-
-                       CPoint dMove = moved - newCenter;
-
-                       MSG_LOW("New Moved XY(%d,%d)", dMove.X() , dMove.Y());
-
-                       MSG_LOW("New Geo XYWH(%d,%d,%d,%d)", rect.Left() - dMove.X(), rect.Top() - dMove.Y(), zoomed.Width(), zoomed.Height());
-
-                       dRect.MoveBy(-dMove.X(), -dMove.Y());
-                       dRect.Width(zoomed.Width());
-                       dRect.Height(zoomed.Height());
-               }
-
-               MSG_LOW("DRect(%d,%d,%d,%d) ViewPort(%d,%d)", dRect.Left(), dRect.Top(), dRect.Width(), dRect.Height(), m_extent.Width(), m_extent.Height());
-
-               if ( dRect.Width() < m_extent.Width() )
-               {
-                       // Center align
-                       dRect.Left( (m_extent.Width() - dRect.Width()) / 2);
-
-                       MSG_HIGH("H align %d, %d", dRect.Width(), m_extent.Width());
-               }
-               else
-               {
-                       if ( dRect.Right() < m_extent.Width() ) // If reach to edge
-                       {
-                               dRect.Right(m_extent.Width());
-                       }
-
-                       if ( dRect.Left() > 0 ) // If reach to edge
-                       {
-                               dRect.Left(0);
-                       }
-               }
-
-               if ( dRect.Height() < m_extent.Height() )
-               {
-                       dRect.Top( (m_extent.Height() - dRect.Height()) / 2);
-
-                       MSG_HIGH("V align %d, %d", dRect.Height(), m_extent.Height());
-               }
-               else
-               {
-                       if ( dRect.Bottom() < m_extent.Height() )
-                       {
-                               dRect.Bottom(m_extent.Height());
-                       }
-
-                       if ( dRect.Top() > 0 )          // If reach edge
-                       {
-                               dRect.Top(0);
-                       }
-               }
-
-               m_freeze = false;
-       }
-
-       if ( m_ani ) delete m_ani;
-       m_ani = new CGroupAnimator();
-
-       double duration = abs(sRect.Width() - dRect.Width()) / 10000.0f;
-
-       m_ani->AddAnimator(new CSingleAnimator(src, dst, duration, CTranstionFunc::LinearTransit, CScroller::_on_ani_zoom, this));
-       m_ani->AddAnimator(new CSingleAnimator(sRect.Left() , dRect.Left(), duration, CTranstionFunc::LinearTransit, CScroller::_on_ani_panX, this));
-       m_ani->AddAnimator(new CSingleAnimator(sRect.Top() , dRect.Top(), duration, CTranstionFunc::LinearTransit, CScroller::_on_ani_panY, this));
-
-       m_client->BeginUpdate();
-       m_ani_zoom->Start(CScroller::_on_anim, (void *)this);
-
-       MSG_HIGH("Double click animation started. Ani1=(%d~%d,%f) Ani2=(%d~%d,%f) Ani3(%f~%f,%f))", sRect.Left(), dRect.Left(), duration, sRect.Top(), dRect.Top(), duration, src, dst, duration);
-
-};
-
-
diff --git a/widget/src/common/Scroller.h b/widget/src/common/Scroller.h
deleted file mode 100755 (executable)
index 99f35b2..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-
-#pragma once
-
-#include <Elementary.h>
-
-#include "ivug-debug.h"
-
-#include "Primitives.h"
-#include "Object.h"
-
-#include <string>
-
-using namespace std;
-
-class ECoreAnimator;
-class CAnimator;
-class CScrollerClient;
-
-class CScroller : public CObject {
-
-       static void _CalcJob(void *data) {
-               CScroller *thiz = static_cast<CScroller *>(data);
-
-               thiz->CalcJob();
-
-       };
-public:
-
-// Public APIs
-
-       CScroller(const char *name);
-       ~CScroller();
-
-       Evas_Object *CreateObject(Evas_Object *parent);
-
-       bool SetClient(CScrollerClient *client);
-
-       bool UnsetClient();
-
-       void Zoom(const CPoint &center, double zoom);
-
-       void DisableEvent();
-
-       void EnableEvent();
-
-       void Draw() {
-               MSG_HIGH("Scroller draw");
-       };
-
-       void ScreenToClient(CRect &rect) {
-               rect.MoveBy(-m_origin.X(), -m_origin.Y());
-       };
-
-       void OnChanged(CScrollerClient *client);
-
-private:
-       static Evas_Event_Flags _momentum_end(void *data, void *event_info);
-       static Evas_Event_Flags _momentum_move(void *data, void *event_info);
-       static Evas_Event_Flags _momentum_start(void *data, void *event_info);
-       static Evas_Event_Flags _momentum_abort(void *data, void *event_info);
-
-       static Evas_Event_Flags _zoom_end(void *data, void *event_info);
-       static Evas_Event_Flags _zoom_move(void *data, void *event_info);
-       static Evas_Event_Flags _zoom_start(void *data, void *event_info);
-       static Evas_Event_Flags _zoom_abort(void *data, void *event_info);
-
-       static Evas_Event_Flags _dbl_click_start(void *data , void *event_info);
-       static Evas_Event_Flags _dbl_click_end(void *data , void *event_info);
-       static Evas_Event_Flags _dbl_click_abort(void *data , void *event_info);
-
-       static bool _on_anim(double value, void *pData) {
-               CScroller *thiz = static_cast<CScroller *>(pData);
-
-               return thiz->OnAnimation(value);
-       };
-
-       static void _on_ani_zoom(double value, void *pData) {
-               CScroller *thiz = static_cast<CScroller *>(pData);
-
-               thiz->OnAnimationZoom(value);
-       };
-
-       static void _on_ani_panX(double value, void *pData) {
-               CScroller *thiz = static_cast<CScroller *>(pData);
-
-               thiz->OnAnimationPanX(value);
-       };
-
-
-       static void _on_ani_panY(double value, void *pData) {
-               CScroller *thiz = static_cast<CScroller *>(pData);
-
-               thiz->OnAnimationPanY(value);
-       };
-
-       void CalcJob();
-
-       bool OnAnimationZoom(double value);
-       bool OnAnimationPanX(double value);
-       bool OnAnimationPanY(double value);
-
-       bool OnAnimation(double value);
-
-       void move(int x, int y);
-       void resize(int w, int h);
-       void show();
-       void hide();
-       void draw();
-       void del();
-
-       CRect GetAutoFitGeometry();
-       double GetAutoFitZoom();
-
-// Mouse events
-       void zoom_start(const CPoint &center, double zoom);
-       void zoom_move(const CPoint &center, double zoom);
-       void zoom_end(const CPoint &center, double zoom);
-       void zoom_abort(const CPoint &center, double zoom);
-
-       void momentum_start(const CPoint &from, const CPoint &to, const CSize &momentum);
-       void momentum_move(const CPoint &from, const CPoint &to, const CSize &momentum);
-       void momentum_end(const CPoint &from, const CPoint &to, const CSize &momentum);
-       void momentum_abort(const CPoint &from, const CPoint &to, const CSize &momentum);
-
-       void double_click(const CPoint &center);
-
-       bool NeedResize();
-
-       void UpdateClient();
-
-public:
-       void DoAutoFit();
-       void DoAnim();
-
-       void Test1() {
-               Zoom(CPoint(360,540), 3.6f);
-       };
-
-
-private:
-       Evas_Object *m_edje;
-
-       Evas_Object *m_clipper;
-
-       Evas_Object *m_gesture;         // Gesture detect
-       Evas_Object *m_event;
-
-// Client related
-       CScrollerClient *m_client;
-       string m_name;
-
-private:
-       CPoint  m_origin;               // LCD coordinate.
-       CSize   m_extent;
-
-private:       // Mouse related
-       double m_zoom;
-       CPoint m_prev;  // Previous point for mouse move
-       double m_prevzoom;
-       int m_nFinger;  // Count of touched finger;
-       double m_prevfzoom;
-
-// Animation class
-private:
-       CAnimator *m_ani;
-
-       ECoreAnimator *m_ani_zoom;
-       ECoreAnimator *m_ani_accel;
-
-private:
-       double m_zoom_autofit;
-       CRect m_rect_autofit;
-
-// Status
-private:
-       bool m_freeze;
-       bool m_resized;
-
-       Ecore_Job *m_calcjob;
-
-};
-
old mode 100755 (executable)
new mode 100644 (file)
similarity index 64%
rename from widget/src/image/ivug-image-photocam.cpp
rename to widget/src/image/ivug-image.cpp
index f2331c0..b4c7c1f
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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"
+
+#ifdef USE_SCROLLER
 
 #include "ivug-image.h"
 #include "Scroller.h"
 #include "errno.h"
 
 #include "debug.h"
-\r
-\r
-static Evas_Object *_crop_image(const char *file, int /* image coord */crop_x, int crop_y, int crop_w, int crop_h, int final_w, int final_h)\r
-{\r
-// TODO : Should implement no-region image cropping (bmp or gif )\r
-       MSG_HIGH("Crop image XYWH(%d,%d,%d,%d) Dimension(%d,%d)", crop_x, crop_y, crop_w, crop_h, final_w, final_h);\r
-\r
-// 1. Load source image into buffer canvas.\r
-       Ecore_Evas *m_ee;\r
-       m_ee = ecore_evas_buffer_new(final_w, final_h);\r
-       MSG_ASSERT(m_ee != NULL);\r
-\r
-       Evas *evas = ecore_evas_get(m_ee);\r
-\r
-       Evas_Object *img;\r
-\r
-       img = evas_object_image_filled_add(evas);\r
-\r
-       evas_object_image_file_set(img, file, NULL);\r
-\r
-       Evas_Load_Error err = evas_object_image_load_error_get(img);\r
-       if (err != EVAS_LOAD_ERROR_NONE)\r
-       {\r
-               MSG_ERROR("could not load image '%s'. error string is \"%s\"", file, evas_load_error_str(err));\r
-               return NULL;\r
-       }\r
-\r
-       Eina_Bool bRegion = evas_object_image_region_support_get(img);\r
-\r
-       evas_object_image_file_set(img, NULL, NULL);\r
-\r
-       if ( bRegion == EINA_TRUE)\r
-       {\r
-               MSG_HIGH("Region supported");\r
-               evas_object_image_load_orientation_set(img, EINA_TRUE);\r
-               evas_object_image_load_region_set(img, crop_x, crop_y, crop_w, crop_h);\r
-\r
-               evas_object_image_file_set(img, file, NULL);\r
-\r
-               Evas_Load_Error err = evas_object_image_load_error_get(img);\r
-               if (err != EVAS_LOAD_ERROR_NONE)\r
-               {\r
-                       MSG_ERROR("could not load image '%s'. error string is \"%s\"", file, evas_load_error_str(err));\r
-                       return NULL;\r
-               }\r
-       }\r
-       else\r
-       {\r
-               MSG_HIGH("Region not supported.");\r
-\r
-// Load full image\r
-               Evas_Object *src;\r
-\r
-               src = evas_object_image_add(evas);\r
-\r
-               evas_object_image_file_set(src, file, NULL);\r
-\r
-               Evas_Load_Error err = evas_object_image_load_error_get(src);\r
-               if (err != EVAS_LOAD_ERROR_NONE)\r
-               {\r
-                       MSG_ERROR("could not load image '%s'. error string is \"%s\"", file, evas_load_error_str(err));\r
-                       return NULL;\r
-               }\r
-\r
-               int w,h;\r
-               evas_object_image_size_get(src, &w, &h);\r
-\r
-               MSG_HIGH("Image WH(%d,%d)", w, h);\r
-\r
-// Setup cropped buffer\r
-               evas_object_image_size_set(img, crop_w, crop_h);\r
-               evas_object_image_fill_set(img, 0, 0, crop_w, crop_h);\r
-\r
-// Copy image from src to img.\r
-               int *Src = (int *)evas_object_image_data_get(src, EINA_FALSE);          // ImgBuffer's size is same as original image\r
-               MSG_ASSERT(Src != NULL);\r
-\r
-               int *Dest = (int *)evas_object_image_data_get(img, EINA_TRUE);\r
-               MSG_ASSERT(Dest != NULL);\r
-\r
-               int *Tmp = Dest;\r
-\r
-               int ImgW = w;\r
-               int *pRow = Src + (crop_y * ImgW /* stride */ + crop_x) ;               // Src begin buffer\r
-\r
-               int nRow = crop_h;\r
-               int nCol = crop_w;\r
-\r
-               MSG_HIGH("Crop(%d,%d,%d,%d) Stride=%d nRow=%d nCol=%d", crop_x, crop_y, crop_w, crop_h, ImgW, nRow, nCol);\r
-\r
-               while(nRow--)\r
-               {\r
-                       while(nCol--)\r
-                       {\r
-                               // ELM_MSG_HIGH("nRow=%d, nCol=%d, Src=0x%08x Dst=0x%08x", nRow, nCol,  pRow , Dest);\r
-                               *Tmp++ = *pRow++;\r
-                       }\r
-\r
-                       nCol = crop_w;\r
-                       pRow = pRow + (ImgW - crop_w /* stride */ );\r
-               }\r
-               evas_object_image_data_set(src, (void *)Src);   // Unref\r
-               evas_object_del(src);\r
-\r
-               evas_object_image_data_set(img, (void *)Dest);\r
-       }\r
-\r
-       int cw, ch;\r
-\r
-       cw = crop_w;\r
-       ch = crop_h;\r
-\r
-       int ph, pw;\r
-       int px, py;\r
-\r
-// Auto fit. why???????. Used when set wallpaper(image size is smaller than LCD)\r
-       ph = (ch * final_w) / cw;\r
-\r
-       if (ph > final_h)\r
-       {\r
-               pw = (cw * final_h) / ch;\r
-               ph = final_h;\r
-       }\r
-       else\r
-       {\r
-               pw = final_w;\r
-       }\r
-\r
-// Calculate XY\r
-       px = (final_w - pw ) / 2;\r
-       py = (final_h - ph ) / 2;\r
-\r
-       MSG_HIGH("CenterPut XYWH(%d,%d,%d,%d) in Buf(%d,%d)", px, py, pw, ph, final_w, final_h);\r
-\r
-       evas_object_move(img, px, py);\r
-       evas_object_resize(img, pw, ph); // set object size which you want to scale\r
-\r
-       evas_object_show(img);\r
-\r
-//     evas_object_image_save(img, "/opt/ug/data/ug-image-viewer-efl/tt.jpg", NULL, NULL);\r
-\r
-//  Copy Buffer canvas data to image object in current evas\r
-       const void *data = ecore_evas_buffer_pixels_get(m_ee);\r
-       MSG_ASSERT(data != NULL);\r
-\r
-       Evas_Object *result;\r
-       result = evas_object_image_filled_add(evas);\r
-\r
-       evas_object_image_size_set(result, final_w, final_h);\r
-       evas_object_image_data_set(result, const_cast<void *>(data));\r
-       evas_object_image_data_update_add(result, 0, 0, final_w, final_h);\r
-\r
-       MSG_HIGH("Cropped image is created. obj=0x%08x", result);\r
-       return result;\r
-};\r
-\r
-\r
-\r
+
+#include "Image.h"
+#include "Photocam.h"
+
+
+#define PHOTO_CLASS(obj) \
+       static_cast<CPhotocam *>(evas_object_data_get((obj), "CPhotocam"))
+
+// APIs
+IVAPI Evas_Object *ivug_image_create(Evas_Object *parent)
+{
+       CPhotocam *photo = new CPhotocam;
+
+       Evas_Object *obj = photo->CreateObject(parent);
+       MSG_ASSERT(obj != NULL);
+
+       evas_object_data_set(obj, "CPhotocam", photo);
+
+       MSG_HIGH("Create photocam object. class=0x%08x obj=0x%08x", photo, obj);
+       return obj;
+}
+
+IVAPI Evas_Load_Error ivug_image_file_set(Evas_Object *obj, const char *file, const char *key)
+{
+       CPhotocam *photo = PHOTO_CLASS(obj);
+       MSG_ASSERT(photo != NULL);
+
+#if 0
+       unsigned char *buf;
+
+       FILE *fp = NULL;
+
+       fp = fopen(file, "rb");
+
+       if ( fp == NULL )
+       {
+               MSG_ERROR("Cannot find %s", file);
+               return EVAS_LOAD_ERROR_GENERIC;
+       }
+
+       fseek(fp,0L, SEEK_END);
+
+       long size = ftell(fp);
+
+       buf = (unsigned char *)malloc(size);
+
+       int readcnt;
+
+       fseek(fp,0L, SEEK_SET);
+
+       readcnt = fread(buf, 1, size, fp);
+
+       MSG_HIGH("Load file : %s", file);
+
+       Evas_Load_Error err = EVAS_LOAD_ERROR_NONE;
+       err = photo->SetMem(buf, readcnt, NULL);
+#else
+       Evas_Load_Error err = EVAS_LOAD_ERROR_NONE;
+
+       err = photo->SetFile(file, key);
+
+#endif
+
+       return err;
+}
+
+IVAPI Evas_Load_Error ivug_image_mem_set(Evas_Object *obj, const unsigned char *buffer, unsigned int size, const char *key)
+{
+       CPhotocam *photo = PHOTO_CLASS(obj);
+       MSG_ASSERT(photo != NULL);
+
+       MSG_HIGH("Load buffer : 0x%08x(%d)", buffer, size);
+
+// Performance problem is here.
+       Evas_Load_Error err = EVAS_LOAD_ERROR_NONE;
+
+       err = photo->SetMem(buffer, size, key);
+
+       return err;
+}
+
+
+IVAPI Evas_Load_Error ivug_image_unset(Evas_Object *obj)
+{
+       CPhotocam *photo = PHOTO_CLASS(obj);
+       MSG_ASSERT(photo != NULL);
+
+       photo->UnSet();
+
+       return EVAS_LOAD_ERROR_NONE;
+
+}
+
+IVAPI void ivug_image_zoom_set(Evas_Object *obj, double zoom, Evas_Point *pCenter)
+{
+       CPhotocam *photo = PHOTO_CLASS(obj);
+       MSG_ASSERT(photo != NULL);
+
+       photo->SetZoomLevel(CPoint(pCenter->x, pCenter->y), zoom);
+}
+
+IVAPI double ivug_image_zoom_get(const Evas_Object *obj)
+{
+       CPhotocam *photo = PHOTO_CLASS(obj);
+       MSG_ASSERT(photo != NULL);
+
+       return photo->GetZoomLevel();
+}
+
+IVAPI void ivug_image_image_size_get(const Evas_Object *obj, int *w, int *h)
+{
+       CPhotocam *photo = PHOTO_CLASS(obj);
+       MSG_ASSERT(photo != NULL);
+
+       const CSize &size = photo->GetImageSize();
+
+       if(w) *w = size.Width();
+       if(h) *h = size.Height();
+}
+
+IVAPI void ivug_image_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h)
+{
+       CPhotocam *photo = PHOTO_CLASS(obj);
+       MSG_ASSERT(photo != NULL);
+
+       const CRect &rect = photo->GetDisplayGeometry();
+
+       if(x) *x = rect.Left();
+       if(y) *y = rect.Top();
+       if(w) *w = rect.Width();
+       if(h) *h = rect.Height();
+
+       MSG_HIGH("Region size XYWH(%d,%d,%d,%d)", rect.Left(), rect.Top(), rect.Width(), rect.Height() );
+}
+
+IVAPI void ivug_image_decoded_size_get(const Evas_Object *obj, int *w, int *h)
+{
+       CPhotocam *photo = PHOTO_CLASS(obj);
+       MSG_ASSERT(photo != NULL);
+
+       const CSize &size = photo->GetDecodedSize();
+
+       if(w) *w = size.Width();
+       if(h) *h = size.Height();
+
+};
+
+
+IVAPI unsigned char *ivug_image_decoded_buffer_get(const Evas_Object *obj)
+{
+       CPhotocam *photo = PHOTO_CLASS(obj);
+       MSG_ASSERT(photo != NULL);
+
+       return photo->GetBuffer();
+
+}
+
+IVAPI void ivug_image_hold_set(const Evas_Object *obj, Eina_Bool hold)
+{
+       CPhotocam *photo = PHOTO_CLASS(obj);
+       MSG_ASSERT(photo != NULL);
+
+       if ( hold == EINA_TRUE)
+       {
+               photo->DisableEvent();
+       }
+       else
+       {
+               photo->EnableEvent();
+       }
+
+}
+
+IVAPI void ivug_image_zoom_reset(Evas_Object *obj, Evas_Point *pCenter)
+{
+       CPhotocam *photo = PHOTO_CLASS(obj);
+       MSG_ASSERT(photo != NULL);
+
+       photo->DoAutoFit();
+
+}
+
+IVAPI void ivug_image_animated_set(const Evas_Object *obj, Eina_Bool bAnimation)
+{
+       CPhotocam *photo = PHOTO_CLASS(obj);
+       MSG_ASSERT(photo != NULL);
+
+       if ( bAnimation )
+       {
+               photo->Play();
+       }
+       else
+       {
+               photo->Stop();
+       }
+
+}
+
+IVAPI Evas_Object *ivug_image_region_image_get(Evas_Object *obj, int x, int y, int w, int h )
+{
+       CPhotocam *photo = PHOTO_CLASS(obj);
+       MSG_ASSERT(photo != NULL);
+
+       return photo->GetCroppedImage(x,y,w,h);
+}
+
+
+IVAPI void ivug_image_rotate_set(Evas_Object *obj, int degree)
+{
+       CPhotocam *photo = PHOTO_CLASS(obj);
+       MSG_ASSERT(photo != NULL);
+
+       return photo->SetRotate(degree);
+}
+
+IVAPI int ivug_image_rotate_get(Evas_Object *obj)
+{
+       CPhotocam *photo = PHOTO_CLASS(obj);
+       MSG_ASSERT(photo != NULL);
+
+       return photo->GetRotate();
+}
+
+
+IVAPI Evas_Object *
+ivug_image_internal_image_get(Evas_Object *obj)
+{
+       CPhotocam *photo = PHOTO_CLASS(obj);
+       MSG_ASSERT(photo != NULL);
+
+       return photo->GetImageObject();
+
+}
+
+
+IVAPI void ivug_image_coordinate_lcd_to_image(Evas_Object *photocam, int lcd_x, int lcd_y, int *img_x, int *img_y)
+{
+       MSG_ASSERT(photocam != NULL);
+
+       int image_w, image_h;
+
+       ivug_image_image_size_get(photocam, &image_w, &image_h);        // Get original image size.
+
+       MSG_UTIL_HIGH("size w=%d, h=%d", image_w, image_h);
+
+       ivug_ret_if(image_w <= 0 || image_h <= 0);
+
+       int gx, gy, gw, gh;
+
+       ivug_image_region_get(photocam,  &gx, &gy, &gw, &gh);
+
+       MSG_UTIL_HIGH("region x=%d, y=%d, w=%d, h=%d", gx, gy, gw, gh);
+
+       int image_x, image_y;
+
+       image_x = lcd_x - gx;
+       image_y = lcd_y - gy;
+
+       image_x = image_x*image_w/gw;
+       image_y = image_y*image_h/gh;
+
+       MSG_UTIL_HIGH("changed x=%d, y=%d", image_x, image_y);
+
+       *img_x = image_x;
+       *img_y = image_y;
+}
+
+IVAPI void ivug_image_coordinate_image_to_lcd(Evas_Object *photocam, int img_x, int img_y, int *lcd_x, int *lcd_y)
+{
+       MSG_ASSERT(photocam != NULL);
+
+       int image_w, image_h;
+
+       ivug_ret_if(photocam == NULL);
+
+       ivug_image_image_size_get(photocam, &image_w, &image_h);        // Get original image size.
+
+       MSG_UTIL_HIGH("size w=%d, h=%d", image_w, image_h);
+
+       ivug_ret_if(image_w <= 0 || image_h <= 0);
+
+       int gx, gy, gw, gh;
+
+       ivug_image_region_get(photocam,  &gx, &gy, &gw, &gh);
+
+       MSG_UTIL_HIGH("region x=%d, y=%d, w=%d, h=%d", gx, gy, gw, gh);
+
+       int scr_x, scr_y;
+
+       scr_x = img_x*gw/image_w;
+       scr_y = img_y*gh/image_h;
+
+       scr_x = scr_x+gx;
+       scr_y = scr_y+gy;
+
+       MSG_UTIL_HIGH("changed x=%d, y=%d", scr_x, scr_y);
+
+       *lcd_x = scr_x;
+       *lcd_y = scr_y;
+}
+
+#else
+
+#include <Elementary.h>
+#include <Ecore_Evas.h>
+
+#include "ivug-debug.h"
+#include "ivug-image.h"
+#include "errno.h"
+
+#include "debug.h"
+
+
+static Evas_Object *_crop_image(const char *file, int /* image coord */crop_x, int crop_y, int crop_w, int crop_h, int final_w, int final_h)
+{
+// TODO : Should implement no-region image cropping (bmp or gif )
+       MSG_HIGH("Crop image XYWH(%d,%d,%d,%d) Dimension(%d,%d)", crop_x, crop_y, crop_w, crop_h, final_w, final_h);
+
+// 1. Load source image into buffer canvas.
+       Ecore_Evas *m_ee;
+       m_ee = ecore_evas_buffer_new(final_w, final_h);
+       MSG_ASSERT(m_ee != NULL);
+
+       Evas *evas = ecore_evas_get(m_ee);
+
+       Evas_Object *img;
+
+       img = evas_object_image_filled_add(evas);
+
+       evas_object_image_file_set(img, file, NULL);
+
+       Evas_Load_Error err = evas_object_image_load_error_get(img);
+       if (err != EVAS_LOAD_ERROR_NONE)
+       {
+               MSG_ERROR("could not load image '%s'. error string is \"%s\"", file, evas_load_error_str(err));
+               return NULL;
+       }
+
+       Eina_Bool bRegion = evas_object_image_region_support_get(img);
+
+       evas_object_image_file_set(img, NULL, NULL);
+
+       if ( bRegion == EINA_TRUE)
+       {
+               MSG_HIGH("Region supported");
+               evas_object_image_load_orientation_set(img, EINA_TRUE);
+               evas_object_image_load_region_set(img, crop_x, crop_y, crop_w, crop_h);
+
+               evas_object_image_file_set(img, file, NULL);
+
+               Evas_Load_Error err = evas_object_image_load_error_get(img);
+               if (err != EVAS_LOAD_ERROR_NONE)
+               {
+                       MSG_ERROR("could not load image '%s'. error string is \"%s\"", file, evas_load_error_str(err));
+                       return NULL;
+               }
+       }
+       else
+       {
+               MSG_HIGH("Region not supported.");
+
+// Load full image
+               Evas_Object *src;
+
+               src = evas_object_image_add(evas);
+
+               evas_object_image_file_set(src, file, NULL);
+
+               Evas_Load_Error err = evas_object_image_load_error_get(src);
+               if (err != EVAS_LOAD_ERROR_NONE)
+               {
+                       MSG_ERROR("could not load image '%s'. error string is \"%s\"", file, evas_load_error_str(err));
+                       return NULL;
+               }
+
+               int w,h;
+               evas_object_image_size_get(src, &w, &h);
+
+               MSG_HIGH("Image WH(%d,%d)", w, h);
+
+// Setup cropped buffer
+               evas_object_image_size_set(img, crop_w, crop_h);
+               evas_object_image_fill_set(img, 0, 0, crop_w, crop_h);
+
+// Copy image from src to img.
+               int *Src = (int *)evas_object_image_data_get(src, EINA_FALSE);          // ImgBuffer's size is same as original image
+               MSG_ASSERT(Src != NULL);
+
+               int *Dest = (int *)evas_object_image_data_get(img, EINA_TRUE);
+               MSG_ASSERT(Dest != NULL);
+
+               int *Tmp = Dest;
+
+               int ImgW = w;
+               int *pRow = Src + (crop_y * ImgW /* stride */ + crop_x) ;               // Src begin buffer
+
+               int nRow = crop_h;
+               int nCol = crop_w;
+
+               MSG_HIGH("Crop(%d,%d,%d,%d) Stride=%d nRow=%d nCol=%d", crop_x, crop_y, crop_w, crop_h, ImgW, nRow, nCol);
+
+               while(nRow--)
+               {
+                       while(nCol--)
+                       {
+                               // ELM_MSG_HIGH("nRow=%d, nCol=%d, Src=0x%08x Dst=0x%08x", nRow, nCol,  pRow , Dest);
+                               *Tmp++ = *pRow++;
+                       }
+
+                       nCol = crop_w;
+                       pRow = pRow + (ImgW - crop_w /* stride */ );
+               }
+               evas_object_image_data_set(src, (void *)Src);   // Unref
+               evas_object_del(src);
+
+               evas_object_image_data_set(img, (void *)Dest);
+       }
+
+       int cw, ch;
+
+       cw = crop_w;
+       ch = crop_h;
+
+       int ph, pw;
+       int px, py;
+
+// Auto fit. why???????. Used when set wallpaper(image size is smaller than LCD)
+       ph = (ch * final_w) / cw;
+
+       if (ph > final_h)
+       {
+               pw = (cw * final_h) / ch;
+               ph = final_h;
+       }
+       else
+       {
+               pw = final_w;
+       }
+
+// Calculate XY
+       px = (final_w - pw ) / 2;
+       py = (final_h - ph ) / 2;
+
+       MSG_HIGH("CenterPut XYWH(%d,%d,%d,%d) in Buf(%d,%d)", px, py, pw, ph, final_w, final_h);
+
+       evas_object_move(img, px, py);
+       evas_object_resize(img, pw, ph); // set object size which you want to scale
+
+       evas_object_show(img);
+
+//     evas_object_image_save(img, "/opt/ug/data/ug-image-viewer-efl/tt.jpg", NULL, NULL);
+
+//  Copy Buffer canvas data to image object in current evas
+       const void *data = ecore_evas_buffer_pixels_get(m_ee);
+       MSG_ASSERT(data != NULL);
+
+       Evas_Object *result;
+       result = evas_object_image_filled_add(evas);
+
+       evas_object_image_size_set(result, final_w, final_h);
+       evas_object_image_data_set(result, const_cast<void *>(data));
+       evas_object_image_data_update_add(result, 0, 0, final_w, final_h);
+
+       MSG_HIGH("Cropped image is created. obj=0x%08x", result);
+       return result;
+};
+
+
+
 // APIs
 EAPI Evas_Object *ivug_image_create(Evas_Object *parent)
 {
@@ -323,74 +638,74 @@ EAPI void ivug_image_zoom_reset(Evas_Object *obj, Evas_Point *pCenter)
 
 }
 
-EAPI Evas_Object *ivug_image_region_image_get(Evas_Object *obj, int /* LCD coord */ x, int y, int w, int h )\r
-{
-       MSG_HIGH("Region (%d,%d,%d,%d)", x, y, w, h);\r
-\r
-       Evas_Object *image;\r
-\r
-       image = elm_photocam_internal_image_get(obj);\r
-\r
-       int ix, iy, iw, ih;\r
-\r
-       evas_object_geometry_get(image, &ix, &iy, &iw, &ih);\r
-\r
-       MSG_HIGH("Image geometry get : (%d,%d,%d,%d)", ix, iy, iw, ih);\r
-\r
-       int ow, oh;\r
-       evas_object_image_size_get(image, &ow, &oh);\r
-\r
-       ow = ow * evas_object_image_load_scale_down_get(image);\r
-       oh = oh * evas_object_image_load_scale_down_get(image);\r
-\r
-       MSG_HIGH("Original image size(%d,%d)", ow, oh);\r
-\r
-       int cx, cy, cw, ch;\r
-\r
-// Get intersect rect between xywh and ixywh\r
-       cx = ix;\r
-       if ( x > ix ) cx = x;\r
-\r
-       cy = iy;\r
-       if ( y > iy ) cy = y;\r
-\r
-       cw = w;\r
-       if ( x + w > ix + iw ) cw = iw;\r
-\r
-       ch = h;\r
-       if ( y + h > iy + ih ) ch = ih;\r
-\r
-       MSG_HIGH("Cropped XWYH(%d,%d,%d,%d)", cx, cy, cw, ch);\r
-\r
-// Get rect on image.\r
-       int gx, gy, gw, gh;\r
-\r
-       gx = ( cx - ix ) * (double)ow/iw;;\r
-       gy = ( cy - iy ) * (double)ow/iw;\r
-\r
-       gw = cw * (double)ow/iw;\r
-       gh = ch * (double)oh/ih;\r
-\r
-       MSG_HIGH("On image rect : (%d,%d,%d,%d) Scale=%d", gx, gy, gw, gh, evas_object_image_load_scale_down_get(image));\r
-\r
-       const char *file = NULL;\r
-       const char *key = NULL;\r
-\r
-       evas_object_image_file_get(image, &file, &key);\r
-\r
-       if ( file == NULL )\r
-       {\r
-               MSG_ERROR("File is not loaded");\r
-               return NULL;\r
-       }\r
-\r
-       MSG_HIGH("File = %s %s", file, key );\r
-\r
-       MSG_HIGH("Image size get : (%d,%d)", ow, oh);\r
-\r
-       Evas_Object *result = _crop_image(file, gx, gy, gw, gh, w, h);\r
-\r
-       return result;\r
+EAPI Evas_Object *ivug_image_region_image_get(Evas_Object *obj, int /* LCD coord */ x, int y, int w, int h )
+{
+       MSG_HIGH("Region (%d,%d,%d,%d)", x, y, w, h);
+
+       Evas_Object *image;
+
+       image = elm_photocam_internal_image_get(obj);
+
+       int ix, iy, iw, ih;
+
+       evas_object_geometry_get(image, &ix, &iy, &iw, &ih);
+
+       MSG_HIGH("Image geometry get : (%d,%d,%d,%d)", ix, iy, iw, ih);
+
+       int ow, oh;
+       evas_object_image_size_get(image, &ow, &oh);
+
+       ow = ow * evas_object_image_load_scale_down_get(image);
+       oh = oh * evas_object_image_load_scale_down_get(image);
+
+       MSG_HIGH("Original image size(%d,%d)", ow, oh);
+
+       int cx, cy, cw, ch;
+
+// Get intersect rect between xywh and ixywh
+       cx = ix;
+       if ( x > ix ) cx = x;
+
+       cy = iy;
+       if ( y > iy ) cy = y;
+
+       cw = w;
+       if ( x + w > ix + iw ) cw = iw;
+
+       ch = h;
+       if ( y + h > iy + ih ) ch = ih;
+
+       MSG_HIGH("Cropped XWYH(%d,%d,%d,%d)", cx, cy, cw, ch);
+
+// Get rect on image.
+       int gx, gy, gw, gh;
+
+       gx = ( cx - ix ) * (double)ow/iw;;
+       gy = ( cy - iy ) * (double)ow/iw;
+
+       gw = cw * (double)ow/iw;
+       gh = ch * (double)oh/ih;
+
+       MSG_HIGH("On image rect : (%d,%d,%d,%d) Scale=%d", gx, gy, gw, gh, evas_object_image_load_scale_down_get(image));
+
+       const char *file = NULL;
+       const char *key = NULL;
+
+       evas_object_image_file_get(image, &file, &key);
+
+       if ( file == NULL )
+       {
+               MSG_ERROR("File is not loaded");
+               return NULL;
+       }
+
+       MSG_HIGH("File = %s %s", file, key );
+
+       MSG_HIGH("Image size get : (%d,%d)", ow, oh);
+
+       Evas_Object *result = _crop_image(file, gx, gy, gw, gh, w, h);
+
+       return result;
 }
 
 
@@ -485,3 +800,5 @@ EAPI void ivug_image_coordinate_image_to_lcd(Evas_Object *photocam, int img_x, i
 }
 
 
+#endif
+
old mode 100755 (executable)
new mode 100644 (file)
index 745b3e4..47571df
@@ -123,7 +123,7 @@ protected:
 };
 
 
-class CBox : public CSelectBox {
+class CBox : public CSelectBox {       //caller id
 public:
        const int SHADOW_DEPTH;
        const int EVENT_GRIP_SIZE;
@@ -401,7 +401,7 @@ private:
                const int min_size = EVENT_GRIP_SIZE;
                CRect rect = m_rect;
 
-               int X,Y,W,H;
+               int X = 0,Y = 0,W = 0,H = 0;
 
                double ratio = GetRatio();
 
@@ -737,7 +737,7 @@ private:
 
 #define CROP_ROTATE_PATH IMAGE_PATH"/crop/T06_selection_Rotate.png"
 
-class CBox1 : public CSelectBox {
+class CBox1 : public CSelectBox {      // crop box
 public:
        const int EVENT_GRIP_SIZE;
        const CSize POT_SIZE;
@@ -1008,7 +1008,7 @@ private:
                const int min_size = EVENT_GRIP_SIZE;
                CRect rect = m_rect;
 
-               int X,Y,W,H;
+               int X = 0,Y = 0,W = 0,H = 0;
 
                double ratio = GetRatio();
 
@@ -1155,7 +1155,7 @@ private:
                        MSG_ERROR("could not load image '%s'. %s",  CROP_SELECT_PATH, evas_load_error_str(err));
                }
 
-               evas_object_image_border_set(select_rect, 19, 18, 18, 18);
+               evas_object_image_border_set(select_rect, 6, 6, 6, 6);
                evas_object_show(select_rect);
 
                const char *szPot[] = {
@@ -1256,10 +1256,10 @@ public:
 
                MSG_HIGH("Rect. %d,%d,%d,%d", m_rect.Left(), m_rect.Top(), m_rect.Width(), m_rect.Height());
 
-               const int margin_l = -10;
+               const int margin_l = -1;
                const int margin_r = -1;
                const int margin_t = -1;
-               const int margin_b = -9;
+               const int margin_b = -1;
 
                int mx, my, mw, mh;
 
old mode 100755 (executable)
new mode 100644 (file)
index 08b3c9e..0bcc19d
@@ -111,7 +111,7 @@ private:
 
        CRect tRect;            // Target rectangle
 
-       Evas_Object *m_parent;  // parent_layout
+       Evas_Object *m_parent;  // parent layout
 };
 
 
old mode 100755 (executable)
new mode 100644 (file)
index 1091ab7..a5acc90
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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>
 
@@ -25,7 +25,7 @@
        static_cast<CScissorBox *>(evas_object_data_get((obj), "CScissorBox"))
 
 
-EAPI Evas_Object *ivug_scissorbox_add(Evas_Object *parent)
+IVAPI Evas_Object *ivug_scissorbox_add(Evas_Object *parent)
 {
        CScissorBox *scissorbox = new CScissorBox;
 
@@ -38,10 +38,10 @@ EAPI Evas_Object *ivug_scissorbox_add(Evas_Object *parent)
        return obj;
 }
 
-EAPI void ivug_scissorbox_type_set(Evas_Object *obj, eScissorBoxType type)
+IVAPI void ivug_scissorbox_type_set(Evas_Object *obj, eScissorBoxType type)
 {
-       CScissorBox *scissorbox = SCISSORBOX_CLASS(obj);
        MSG_ASSERT(obj != NULL);
+       CScissorBox *scissorbox = SCISSORBOX_CLASS(obj);
 
        if ( type == SCISSOR_BOX_TYPE_1 )
        {
@@ -54,7 +54,7 @@ EAPI void ivug_scissorbox_type_set(Evas_Object *obj, eScissorBoxType type)
 
 }
 
-EAPI void ivug_scissorbox_attach(Evas_Object *obj, Evas_Object *pObj)
+IVAPI void ivug_scissorbox_attach(Evas_Object *obj, Evas_Object *pObj)
 {
        CScissorBox *scissorbox = SCISSORBOX_CLASS(obj);
        MSG_ASSERT(pObj != NULL);
@@ -62,8 +62,9 @@ EAPI void ivug_scissorbox_attach(Evas_Object *obj, Evas_Object *pObj)
        scissorbox->Attach(pObj);
 }
 
-EAPI void ivug_scissorbox_region_get(Evas_Object *obj, int *x, int *y, int *w, int *h)
+IVAPI void ivug_scissorbox_region_get(Evas_Object *obj, int *x, int *y, int *w, int *h)
 {
+       MSG_ASSERT(obj != NULL);
        CScissorBox *scissorbox = SCISSORBOX_CLASS(obj);
 
        const CRect &region = scissorbox->GetRegion();
@@ -75,23 +76,26 @@ EAPI void ivug_scissorbox_region_get(Evas_Object *obj, int *x, int *y, int *w, i
 
 }
 
-EAPI void ivug_scissorbox_region_set(Evas_Object *obj, int x, int y, int w, int h)
+IVAPI void ivug_scissorbox_region_set(Evas_Object *obj, int x, int y, int w, int h)
 {
+       MSG_ASSERT(obj != NULL);
        CScissorBox *scissorbox = SCISSORBOX_CLASS(obj);
 
        scissorbox->SetRegion(x,y,w,h);
 }
 
-EAPI void ivug_scissorbox_boundary_set(Evas_Object *obj, int x, int y, int w, int h)
+IVAPI void ivug_scissorbox_boundary_set(Evas_Object *obj, int x, int y, int w, int h)
 {
+       MSG_ASSERT(obj != NULL);
        CScissorBox *scissorbox = SCISSORBOX_CLASS(obj);
 
        scissorbox->SetBound(x,y,w,h);
 }
 
 
-EAPI void ivug_scissorbox_ratio_fix(Evas_Object *obj, Eina_Bool bFix)
+IVAPI void ivug_scissorbox_ratio_fix(Evas_Object *obj, Eina_Bool bFix)
 {
+       MSG_ASSERT(obj != NULL);
        CScissorBox *scissorbox = SCISSORBOX_CLASS(obj);
 
        if ( bFix == EINA_TRUE )
@@ -105,8 +109,9 @@ EAPI void ivug_scissorbox_ratio_fix(Evas_Object *obj, Eina_Bool bFix)
 
 }
 
-EAPI void ivug_scissorbox_set_opaque(Evas_Object *obj, Eina_Bool bOpaque)
+IVAPI void ivug_scissorbox_set_opaque(Evas_Object *obj, Eina_Bool bOpaque)
 {
+       MSG_ASSERT(obj != NULL);
        CScissorBox *scissorbox = SCISSORBOX_CLASS(obj);
 
        if ( bOpaque == EINA_TRUE )
old mode 100755 (executable)
new mode 100644 (file)
index 68b9272..785942f
@@ -1,20 +1,21 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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 <Ecore.h>
+
 #include "EFLUtil.h"
 #include "ivug-debug.h"
 
 
 namespace EFL {
 
+extern "C" const char *
+elm_widget_type_get(const Evas_Object *obj);
+
+
+extern void *
+elm_widget_data_get(const Evas_Object *obj);
+
+
 void get_evas_geometry(Evas_Object *obj, const char *prefix)
 {
        int x, y, w, h;
@@ -108,9 +117,9 @@ Evas_Object *create_button(Evas_Object *parent, const char *style, const char *i
        {
                Evas_Object *ic = NULL;
                ic = elm_icon_add(btn);
-               elm_icon_file_set(ic, icon, NULL);
+               elm_image_file_set(ic, icon, NULL);
                evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
-               elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
+               elm_image_resizable_set(ic, EINA_TRUE, EINA_TRUE);
                elm_object_part_content_set(btn, "icon", ic);
        }
 
@@ -129,7 +138,7 @@ Evas_Object *create_icon(Evas_Object *parent, const char *edjname, const char *g
 
        icon = elm_icon_add(parent);
 
-       if ( elm_icon_file_set(icon, edjname, groupname) == EINA_FALSE)
+       if ( elm_image_file_set(icon, edjname, groupname) == EINA_FALSE)
        {
                MSG_IVUG_ERROR("Cannot file set. EDJ=%s Group=%s", edjname, groupname);
                evas_object_del(icon);
@@ -137,12 +146,54 @@ Evas_Object *create_icon(Evas_Object *parent, const char *edjname, const char *g
        }
 
        evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
-       elm_icon_resizable_set(icon, 1, 1);
+       elm_image_resizable_set(icon, 1, 1);
        evas_object_size_hint_expand_set(icon, 1, 1);
 
        return icon;
 }
 
+
+void dump_win(Evas_Object *obj)
+{
+       void *pData = elm_widget_data_get(obj);
+
+       Eina_List *subobjs = (Eina_List *)( pData + (4 * 6 ));
+
+       {
+               int x, y, w, h;
+
+               evas_object_geometry_get(obj, &x, &y, &w, &h);
+               Eina_Bool repeat = evas_object_repeat_events_get(obj);
+               Eina_Bool pass = evas_object_pass_events_get(obj);
+               Eina_Bool visible = evas_object_visible_get(obj);
+               Eina_Bool propagate = evas_object_propagate_events_get(obj);
+
+               MSG_HIGH("Win=%s(%s,0x%08x) %s(%d,%d,%d,%d) P%d|R%d|V%d|E%d", evas_object_name_get(obj), elm_widget_type_get(obj), obj, evas_object_type_get(obj), x, y, w, h, pass, repeat, visible, propagate);
+
+       }
+
+       const Eina_List *l;
+       const Evas_Object *child;
+
+       void *MyData = NULL;
+
+       EINA_LIST_FOREACH(subobjs, l, MyData)
+       {
+               child = (const Evas_Object *)MyData;
+
+               int x, y, w, h;
+
+               evas_object_geometry_get(child, &x, &y, &w, &h);
+               Eina_Bool repeat = evas_object_repeat_events_get(child);
+               Eina_Bool pass = evas_object_pass_events_get(child);
+               Eina_Bool visible = evas_object_visible_get(child);
+               Eina_Bool propagate = evas_object_propagate_events_get(child);
+
+               MSG_HIGH("   Obj=%s(%s,0x%08x) %s(%d,%d,%d,%d) P%d|R%d|V%d|E%d", evas_object_name_get(child), elm_widget_type_get(child), child, evas_object_type_get(child), x, y, w, h, pass, repeat, visible, propagate);
+       }
+
+}
+
 void dump_obj(Evas_Object *obj, int lvl)
 {
        Eina_List *list = evas_object_smart_members_get(obj);
@@ -199,6 +250,104 @@ void dump_obj(Evas_Object *obj, int lvl)
        }
 }
 
+
+
+ void dump_widget(Evas_Object *obj, int lvl)
+ {
+        Eina_List *list = evas_object_smart_members_get(obj);
+
+        if ( lvl == 0 )
+        {
+                int x, y, w, h;
+
+                evas_object_geometry_get(obj, &x, &y, &w, &h);
+                Eina_Bool repeat = evas_object_repeat_events_get(obj);
+                Eina_Bool pass = evas_object_pass_events_get(obj);
+                Eina_Bool visible = evas_object_visible_get(obj);
+                Eina_Bool propagate = evas_object_propagate_events_get(obj);
+
+                MSG_HIGH("Obj=%s(%s,0x%08x) (%d,%d,%d,%d) P%d|R%d|V%d|E%d", evas_object_name_get(obj), elm_widget_type_get(obj), obj, x, y, w, h, pass, repeat, visible, propagate);
+                lvl++;
+        }
+
+        Evas_Object *data;
+        Eina_List *l;
+
+        for (l = list, data = (Evas_Object *)eina_list_data_get(l); l; l = eina_list_next(l), data = (Evas_Object *)eina_list_data_get(l))
+        {
+                int x, y, w, h;
+
+                evas_object_geometry_get(data, &x, &y, &w, &h);
+                Eina_Bool repeat = evas_object_repeat_events_get(data);
+                Eina_Bool pass = evas_object_pass_events_get(data);
+                Eina_Bool visible = evas_object_visible_get(data);
+                Eina_Bool propagate = evas_object_propagate_events_get(data);
+
+               if ( elm_widget_type_get(data) != NULL || evas_object_name_get(data) != NULL )
+               {
+                        if ( lvl == 0 )
+                        {
+                                MSG_HIGH("Obj=%s(%s,0x%08x) (%d,%d,%d,%d) P%d|R%d|V%d|E%d", evas_object_name_get(data), elm_widget_type_get(data), data,  x, y, w, h, pass, repeat, visible, propagate);
+                        }
+                        else
+                        {
+                                char *space = new char[lvl*2+1];
+
+                                for ( int i = 0; i < lvl*2; i++)
+                                {
+                                        space[i] = ' ';
+                                }
+
+                                space[lvl*2] = '\0';
+
+                                MSG_HIGH("%sObj=%s(%s,0x%08x) (%d,%d,%d,%d) P%d|R%d|V%d|E%d", space, evas_object_name_get(data), elm_widget_type_get(data), data, x, y, w, h, pass, repeat, visible, propagate);
+
+                                delete[] space;
+                        }
+               }
+
+                dump_widget(data, lvl+1);
+
+        }
+ }
+
+
+ void dump_clipper(Evas_Object *clipper)
+ {
+
+       const Eina_List *clippees;
+       const Eina_List *l;
+
+       Evas_Object *data;
+
+       data = clipper;
+       int x, y, w, h;
+
+       evas_object_geometry_get(data, &x, &y, &w, &h);
+       Eina_Bool repeat = evas_object_repeat_events_get(data);
+       Eina_Bool pass = evas_object_pass_events_get(data);
+       Eina_Bool visible = evas_object_visible_get(data);
+       Eina_Bool propagate = evas_object_propagate_events_get(data);
+
+       MSG_HIGH("Clipper Obj=%s(%s,0x%08x) (%d,%d,%d,%d) P%d|R%d|V%d|E%d", evas_object_name_get(data), evas_object_type_get(data), data,  x, y, w, h, pass, repeat, visible, propagate);
+
+       clippees = evas_object_clipees_get(clipper);
+       void *tmp;
+       EINA_LIST_FOREACH(clippees, l, tmp)
+       {
+               data = (Evas_Object *)tmp;
+               int x, y, w, h;
+
+               evas_object_geometry_get(data, &x, &y, &w, &h);
+               Eina_Bool repeat = evas_object_repeat_events_get(data);
+               Eina_Bool pass = evas_object_pass_events_get(data);
+               Eina_Bool visible = evas_object_visible_get(data);
+               Eina_Bool propagate = evas_object_propagate_events_get(data);
+
+               MSG_HIGH("      Obj=%s(%s,0x%08x) (%d,%d,%d,%d) P%d|R%d|V%d|E%d", evas_object_name_get(data), evas_object_type_get(data), data,  x, y, w, h, pass, repeat, visible, propagate);
+       }
+ }
+
 char * current_render_method(Evas *e)
 {
        char *szRet = NULL;
old mode 100755 (executable)
new mode 100644 (file)
index 6fbdc98..0a6586c
@@ -1,18 +1,18 @@
-/*\r
- * Copyright 2012  Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *       http://www.tizenopensource.org/license\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
+/*
+ * 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"
 
@@ -242,7 +242,7 @@ Ivug_ListPopup_Item *ivug_listpopup_item_prepend(Evas_Object *obj, const char *i
 {
        ListPopup *pListPopup = IV_LISTPOPUP(obj);
 
-       ListPopupItem *item = malloc(sizeof(ListPopupItem));
+       ListPopupItem *item = (ListPopupItem *)calloc(1, sizeof(ListPopupItem));
 
        item->obj = obj;
        item->iconpath = eina_stringshare_add(item->iconpath);
@@ -295,6 +295,12 @@ const char *ivug_listpopup_item_get_text(Ivug_ListPopup_Item *item)
        return item_->caption;
 }
 
+Elm_Object_Item *ivug_listpopup_item_get_item(Ivug_ListPopup_Item *item)
+{
+       ListPopupItem *item_ = (Ivug_ListPopup_Item *)item;
+
+       return item_->item;
+}
 
 void ivug_listpopup_title_set(Evas_Object *obj, const char* title)
 {
@@ -436,9 +442,9 @@ bool ivug_listpopup_context_show(Evas_Object *obj, Evas_Object *hover, int x, in
        elm_ctxpopup_hover_parent_set(ctxpopup, hover);
 
        elm_ctxpopup_direction_priority_set(ctxpopup, ELM_CTXPOPUP_DIRECTION_DOWN,
+                                                                                               ELM_CTXPOPUP_DIRECTION_UP,
                                                                                                ELM_CTXPOPUP_DIRECTION_RIGHT,
-                                                                                               ELM_CTXPOPUP_DIRECTION_LEFT,
-                                                                                               ELM_CTXPOPUP_DIRECTION_UP);
+                                                                                               ELM_CTXPOPUP_DIRECTION_LEFT);
 
 
        ListPopupItem *pItem = NULL;
@@ -454,7 +460,7 @@ bool ivug_listpopup_context_show(Evas_Object *obj, Evas_Object *hover, int x, in
                if ( pItem->iconpath )
                {
                        icon = elm_icon_add(ctxpopup);
-                       elm_icon_file_set(icon, pItem->iconpath, NULL);
+                       elm_image_file_set(icon, pItem->iconpath, NULL);
                }
                else
                {