summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Kibum <kb0929.kim@samsung.com>2012-06-08 05:54:16 (GMT)
committerKim Kibum <kb0929.kim@samsung.com>2012-06-08 05:54:16 (GMT)
commit8b42d4bb33943903b7160bb963bf7e7c6824e9ef (patch)
tree021a596daee9f7e379b8914aad343a2342528e47
parent7164c202e81bc53033dce636367d92b93265b915 (diff)
downloadug-image-viewer-efl-8b42d4bb33943903b7160bb963bf7e7c6824e9ef.zip
ug-image-viewer-efl-8b42d4bb33943903b7160bb963bf7e7c6824e9ef.tar.gz
ug-image-viewer-efl-8b42d4bb33943903b7160bb963bf7e7c6824e9ef.tar.bz2
apply FSL(Flora Software License)
-rwxr-xr-xCMakeLists.txt10
-rwxr-xr-xLICENSE75
-rw-r--r--NOTICE0
-rwxr-xr-xcommon/CMakeLists.txt40
-rwxr-xr-xcommon/NOTICE1
-rwxr-xr-xcommon/include/debug.h240
-rwxr-xr-xcommon/include/ivug-debug.h251
-rwxr-xr-xcommon/include/ivug-mouse-event.h48
-rwxr-xr-xcommon/include/statistics.h71
-rwxr-xr-xcommon/src/debug.c399
-rwxr-xr-xcommon/src/ivug-mouse-event.c376
-rwxr-xr-xcommon/src/statistics.c442
-rwxr-xr-xdebian/changelog8
-rwxr-xr-xdebian/compat1
-rwxr-xr-xdebian/control42
-rwxr-xr-xdebian/libug-image-viewer-efl.install.in3
-rwxr-xr-xdebian/libug-image-viewer-efl.postinst8
-rwxr-xr-xdebian/rules132
-rwxr-xr-xmain/CMakeLists.txt182
-rwxr-xr-xmain/NOTICE1
-rwxr-xr-xmain/layout/genlist/genlist_group_index.edc116
-rwxr-xr-xmain/layout/genlist/genlist_macro.edc847
-rwxr-xr-xmain/layout/genlist/genlist_size.edc136
-rwxr-xr-xmain/layout/genlist/genlist_styles.edc262
-rwxr-xr-xmain/layout/genlist/genlist_textblock_styles.edc111
-rwxr-xr-xmain/layout/genlist/ivug-genlist.edc42
-rwxr-xr-xmain/layout/icons/01_Header icon/01_header_icon_add.pngbin0 -> 2999 bytes
-rwxr-xr-xmain/layout/icons/01_Header icon/01_header_icon_cancel.pngbin0 -> 2980 bytes
-rwxr-xr-xmain/layout/icons/01_Header icon/01_header_icon_done.pngbin0 -> 3007 bytes
-rwxr-xr-xmain/layout/icons/01_Header icon/01_header_icon_edit.pngbin0 -> 3049 bytes
-rwxr-xr-xmain/layout/icons/01_Header icon/01_header_icon_others.pngbin0 -> 2934 bytes
-rwxr-xr-xmain/layout/icons/T01_btn_play.pngbin0 -> 6920 bytes
-rwxr-xr-xmain/layout/images/00_zoom_in.pngbin0 -> 4520 bytes
-rwxr-xr-xmain/layout/images/00_zoom_in_press.pngbin0 -> 4930 bytes
-rwxr-xr-xmain/layout/images/00_zoom_out.pngbin0 -> 4183 bytes
-rwxr-xr-xmain/layout/images/00_zoom_out_press.pngbin0 -> 4750 bytes
-rwxr-xr-xmain/layout/images/T01_btn_cancel.pngbin0 -> 4800 bytes
-rwxr-xr-xmain/layout/images/T01_btn_cancel_press.pngbin0 -> 4898 bytes
-rwxr-xr-xmain/layout/images/T01_btn_ok.pngbin0 -> 5070 bytes
-rwxr-xr-xmain/layout/images/T01_btn_ok_dim.pngbin0 -> 4515 bytes
-rwxr-xr-xmain/layout/images/T01_btn_ok_press.pngbin0 -> 5156 bytes
-rwxr-xr-xmain/layout/images/T01_btn_thumbnail_play.pngbin0 -> 6552 bytes
-rwxr-xr-xmain/layout/images/gray-theme/00_winset_btn_prev.pngbin0 -> 3258 bytes
-rwxr-xr-xmain/layout/images/gray-theme/I01_control_top_bg.pngbin0 -> 2814 bytes
-rwxr-xr-xmain/layout/images/gray-theme/T01_Option_header_bt.pngbin0 -> 3064 bytes
-rwxr-xr-xmain/layout/images/gray-theme/T01_Option_header_bt_dim.pngbin0 -> 24351 bytes
-rwxr-xr-xmain/layout/images/gray-theme/T01_Option_header_bt_press.pngbin0 -> 2996 bytes
-rwxr-xr-xmain/layout/images/gray-theme/T01_btn_prev.pngbin0 -> 3228 bytes
-rwxr-xr-xmain/layout/images/gray-theme/T01_control_top_arrow.pngbin0 -> 3055 bytes
-rwxr-xr-xmain/layout/images/gray-theme/T01_control_top_bg.pngbin0 -> 2812 bytes
-rwxr-xr-xmain/layout/images/gray-theme/T01_title_btn.pngbin0 -> 3129 bytes
-rwxr-xr-xmain/layout/images/gray-theme/T01_title_btn_press.pngbin0 -> 3126 bytes
-rwxr-xr-xmain/layout/images/gray-theme/T01_toolbar_bg.pngbin0 -> 2797 bytes
-rwxr-xr-xmain/layout/images/gray-theme/T01_toolbar_press.pngbin0 -> 2877 bytes
-rwxr-xr-xmain/layout/images/gray-theme/magnifier.pngbin0 -> 5126 bytes
-rwxr-xr-xmain/layout/images/gray-theme/magnifier_line.pngbin0 -> 4153 bytes
-rwxr-xr-xmain/layout/images/gray-theme/magnifier_noarrow.pngbin0 -> 9467 bytes
-rwxr-xr-xmain/layout/images/gray-theme/magnifier_noarrow_line.pngbin0 -> 9530 bytes
-rwxr-xr-xmain/layout/images/gray-theme/reader_handler_down.pngbin0 -> 6139 bytes
-rwxr-xr-xmain/layout/images/gray-theme/reader_handler_up.pngbin0 -> 3454 bytes
-rwxr-xr-xmain/layout/images/gray-theme/reader_longtap_blue.pngbin0 -> 2802 bytes
-rwxr-xr-xmain/layout/ivug-base.edc61
-rwxr-xr-xmain/layout/ivug-button.edc1332
-rwxr-xr-xmain/layout/ivug-details.edc71
-rwxr-xr-xmain/layout/ivug-effect.edc145
-rwxr-xr-xmain/layout/ivug-icons.edc60
-rwxr-xr-xmain/layout/ivug-main.edc461
-rwxr-xr-xmain/layout/ivug-naviframe.edc996
-rwxr-xr-xmain/layout/ivug-selectioninfo.edc371
-rwxr-xr-xmain/layout/ivug-setas.edc278
-rwxr-xr-xmain/layout/ivug-slider.edc180
-rwxr-xr-xmain/layout/ivug-toolbar.edc886
-rwxr-xr-xmain/res/images/01_Control icon/T01_controlbar_icon_delete.pngbin0 -> 3095 bytes
-rwxr-xr-xmain/res/images/01_Control icon/T01_controlbar_icon_info.pngbin0 -> 3273 bytes
-rwxr-xr-xmain/res/images/01_Control icon/T01_controlbar_icon_slideshow.pngbin0 -> 3183 bytes
-rwxr-xr-xmain/res/images/T01_Nocontents_broken.pngbin0 -> 4880 bytes
-rwxr-xr-xmain/res/images/image_drm_no_rights.jpgbin0 -> 9588 bytes
-rwxr-xr-xmain/res/po/CMakeLists.txt25
-rwxr-xr-xmain/res/po/POTFILES.in1
-rwxr-xr-xmain/res/po/de_DE.po159
-rwxr-xr-xmain/res/po/el_GR.po159
-rwxr-xr-xmain/res/po/en.po159
-rwxr-xr-xmain/res/po/es_ES.po159
-rwxr-xr-xmain/res/po/fr_FR.po159
-rwxr-xr-xmain/res/po/it_IT.po159
-rwxr-xr-xmain/res/po/ja_JP.po159
-rwxr-xr-xmain/res/po/ko_KR.po159
-rwxr-xr-xmain/res/po/nl_NL.po159
-rwxr-xr-xmain/res/po/pt_PT.po159
-rwxr-xr-xmain/res/po/ru_RU.po159
-rwxr-xr-xmain/res/po/tr_TR.po159
-rwxr-xr-xmain/res/po/update-po.sh57
-rwxr-xr-xmain/res/po/zh_CN.po159
-rwxr-xr-xmain/res/po/zh_HK.po159
-rwxr-xr-xmain/res/po/zh_TW.po159
-rwxr-xr-xmain/src/common/ivug-common.h42
-rwxr-xr-xmain/src/common/ivug-config.c200
-rwxr-xr-xmain/src/common/ivug-config.h50
-rwxr-xr-xmain/src/common/ivug-datatypes.h32
-rwxr-xr-xmain/src/common/ivug-define.h60
-rwxr-xr-xmain/src/common/ivug-string.h112
-rwxr-xr-xmain/src/control/ivug-ext-ug.c75
-rwxr-xr-xmain/src/control/ivug-ext-ug.h34
-rwxr-xr-xmain/src/control/ivug-main.c258
-rwxr-xr-xmain/src/control/ivug-main.h44
-rwxr-xr-xmain/src/control/ivug-parameter.c397
-rwxr-xr-xmain/src/control/ivug-parameter.h104
-rwxr-xr-xmain/src/control/ivug-uuid.c94
-rwxr-xr-xmain/src/control/ivug-uuid.h52
-rwxr-xr-xmain/src/data/ivug-data-filter.c101
-rwxr-xr-xmain/src/data/ivug-data-filter.h56
-rwxr-xr-xmain/src/data/ivug-data-list.c282
-rwxr-xr-xmain/src/data/ivug-data-list.h40
-rwxr-xr-xmain/src/data/ivug-data-priv.h61
-rwxr-xr-xmain/src/data/ivug-data-shuffle.c238
-rwxr-xr-xmain/src/data/ivug-data-shuffle.h54
-rwxr-xr-xmain/src/data/ivug-data.c683
-rwxr-xr-xmain/src/data/ivug-data.h85
-rwxr-xr-xmain/src/data/ivug-mediadata.c301
-rwxr-xr-xmain/src/data/ivug-mediadata.h87
-rwxr-xr-xmain/src/effect/include/ivug-anim.h56
-rwxr-xr-xmain/src/effect/include/ivug-effect.h90
-rwxr-xr-xmain/src/effect/ivug-anim.c178
-rwxr-xr-xmain/src/effect/ivug-effect.c201
-rwxr-xr-xmain/src/effect/ivug-slide.c107
-rwxr-xr-xmain/src/effect/template.c83
-rwxr-xr-xmain/src/ug-image-viewer.c430
-rwxr-xr-xmain/src/ug-image-viewer.h50
-rwxr-xr-xmain/src/util/ivug-file-info.c403
-rwxr-xr-xmain/src/util/ivug-file-info.h57
-rwxr-xr-xmain/src/util/ivug-listpopup.c274
-rwxr-xr-xmain/src/util/ivug-listpopup.h81
-rwxr-xr-xmain/src/util/ivug-util.c286
-rwxr-xr-xmain/src/util/ivug-util.h78
-rwxr-xr-xmain/src/util/ivug-widget.c209
-rwxr-xr-xmain/src/util/ivug-widget.h68
-rwxr-xr-xmain/src/view/ivug-detail-info.c437
-rwxr-xr-xmain/src/view/ivug-detail-info.h80
-rwxr-xr-xmain/src/view/ivug-details-view.c437
-rwxr-xr-xmain/src/view/ivug-details-view.h64
-rwxr-xr-xmain/src/view/ivug-main-view.c1837
-rwxr-xr-xmain/src/view/ivug-main-view.h133
-rwxr-xr-xmain/src/view/ivug-popup.c262
-rwxr-xr-xmain/src/view/ivug-popup.h60
-rwxr-xr-xmain/src/view/ivug-setas-view.c895
-rwxr-xr-xmain/src/view/ivug-setas-view.h97
-rwxr-xr-xmain/src/view/ivug-slider-item.c703
-rwxr-xr-xmain/src/view/ivug-slider-item.h137
-rwxr-xr-xmain/src/view/ivug-slider-mouse.c439
-rwxr-xr-xmain/src/view/ivug-slider-priv.h164
-rwxr-xr-xmain/src/view/ivug-slider-slideshow.c334
-rwxr-xr-xmain/src/view/ivug-slider.c1245
-rwxr-xr-xmain/src/view/ivug-slider.h95
-rwxr-xr-xpackaging/ug-image-viewer-efl.spec75
154 files changed, 24840 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100755
index 0000000..8a20194
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,10 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+SET(CMAKE_SOURCE_COMMON_DIR "${CMAKE_SOURCE_DIR}/common")
+SET(CMAKE_SOURCE_WIDGET_DIR "${CMAKE_SOURCE_DIR}/widget")
+SET(CMAKE_SOURCE_MAIN_DIR "${CMAKE_SOURCE_DIR}/main")
+
+ADD_SUBDIRECTORY(common)
+ADD_SUBDIRECTORY(main)
+
+
diff --git a/LICENSE b/LICENSE
new file mode 100755
index 0000000..7ccb5b5
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,75 @@
+Flora License
+
+Version 1.0, May, 2012
+
+http://www.tizenopensource.org/license
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+"Tizen Certified Platform" shall mean a software platform that complies with the standards set forth in the Compatibility Definition Document and passes the Compatibility Test Suite as defined from time to time by the Tizen Technical Steering Group and certified by the Tizen Association or its designated agent.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work solely as incorporated into a Tizen Certified Platform, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work solely as incorporated into a Tizen Certified Platform to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof pursuant to the copyright license above, in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+ 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+ 2. You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+ 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+ 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Flora License to your work
+
+To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/NOTICE
diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt
new file mode 100755
index 0000000..fca8475
--- /dev/null
+++ b/common/CMakeLists.txt
@@ -0,0 +1,40 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(ivug_common C CXX)
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(VERSION 0.1.0)
+
+SET(SRCS
+ src/ivug-mouse-event.c
+ src/debug.c
+ src/statistics.c
+)
+
+INCLUDE_DIRECTORIES(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(commonpkgs REQUIRED
+ elementary
+ evas
+ ui-gadget
+ dlog
+)
+
+FOREACH(flag ${commonpkgs_CFLAGS})
+ SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -Wall")
+SET(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS})
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION} )
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${commonpkgs_LDFLAGS} -lm )
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib)
+
diff --git a/common/NOTICE b/common/NOTICE
new file mode 100755
index 0000000..ded3804
--- /dev/null
+++ b/common/NOTICE
@@ -0,0 +1 @@
+Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. \ No newline at end of file
diff --git a/common/include/debug.h b/common/include/debug.h
new file mode 100755
index 0000000..4f6bf64
--- /dev/null
+++ b/common/include/debug.h
@@ -0,0 +1,240 @@
+/*
+ * 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__
+
+#include <assert.h>
+
+
+/*
+ Category :
+ FATAL
+ ERROR
+ WARN
+ HIGH
+ MED
+ LOW
+ DEBUG
+*/
+
+
+enum
+{
+ DBG_MSG_LOW = 0,
+ DBG_MSG_MED = 1,
+ DBG_MSG_HIGH = 2,
+
+ DBG_MSG_WARN = 3,
+ DBG_MSG_ERROR = 4,
+ DBG_MSG_FATAL = 5,
+
+ DBG_MSG_CUST5 = 6,
+ DBG_MSG_CUST6 = 7,
+ DBG_MSG_CUST7 = 8,
+ DBG_MSG_CUST8 = 9,
+ DBG_MSG_CUST9 = 10,
+ DBG_MSG_CUST10 = 11,
+ DBG_MSG_CUST11 = 12,
+ DBG_MSG_CUST12 = 13,
+ DBG_MSG_CUST13 = 14,
+};
+
+
+// level
+enum
+{
+ DBG_MSG_BIT_LOW = (1<<DBG_MSG_LOW),
+ DBG_MSG_BIT_MED = (1<<DBG_MSG_MED),
+ DBG_MSG_BIT_HIGH = (1<<DBG_MSG_HIGH),
+ DBG_MSG_BIT_WARN = (1<<DBG_MSG_WARN),
+ DBG_MSG_BIT_ERROR = (1<<DBG_MSG_ERROR),
+ DBG_MSG_BIT_FATAL = (1<<DBG_MSG_FATAL),
+
+ DBG_MSG_BIT_CUST5 = (1<<DBG_MSG_CUST5),
+ DBG_MSG_BIT_CUST6 = (1<<DBG_MSG_CUST6),
+ DBG_MSG_BIT_CUST7 = (1<<DBG_MSG_CUST7),
+ DBG_MSG_BIT_CUST8 = (1<<DBG_MSG_CUST8),
+ DBG_MSG_BIT_CUST9 = (1<<DBG_MSG_CUST9),
+ DBG_MSG_BIT_CUST10 = (1<<DBG_MSG_CUST10),
+ DBG_MSG_BIT_CUST11 = (1<<DBG_MSG_CUST11),
+ DBG_MSG_BIT_CUST12 = (1<<DBG_MSG_CUST12),
+ DBG_MSG_BIT_CUST13 = (1<<DBG_MSG_CUST13),
+};
+
+#define DBG_MSG_LVL_DEBUG (DBG_MSG_BIT_CUST13)
+
+#define DBG_MSG_LVL_ALL (DBG_MSG_LVL_LOW)
+
+#define DBG_MSG_LVL_FATAL (DBG_MSG_BIT_FATAL)
+#define DBG_MSG_LVL_ERROR (DBG_MSG_LVL_FATAL | DBG_MSG_BIT_ERROR)
+#define DBG_MSG_LVL_WARN (DBG_MSG_LVL_ERROR | DBG_MSG_BIT_WARN)
+#define DBG_MSG_LVL_HIGH (DBG_MSG_LVL_WARN | DBG_MSG_BIT_HIGH)
+#define DBG_MSG_LVL_MED (DBG_MSG_LVL_HIGH | DBG_MSG_BIT_MED)
+#define DBG_MSG_LVL_LOW (DBG_MSG_LVL_MED | DBG_MSG_BIT_LOW)
+#define DBG_MSG_LVL_NONE (0)
+
+
+// Get time of day
+#include <sys/time.h>
+#include <unistd.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Time analyzer
+#define DEFINE_PERFORM_TIME(aa) long aa = 0; struct timeval tv
+
+#define BEGIN_PERFORM_TIME(aa) \
+ { \
+ gettimeofday(&tv, NULL); \
+ aa = tv.tv_sec * 1000 + tv.tv_usec / 1000; \
+ } while(0)
+
+#define END_PERFORM_TIME(aa) \
+ { \
+ gettimeofday(&tv, NULL); \
+ aa = ( tv.tv_sec * 1000 + tv.tv_usec / 1000 ) - aa; \
+ } while(0)
+
+// TODO : Need align(1)
+typedef struct {
+ const char *fname;
+ int nline;
+ const char *szcategory;
+ int msg_level;
+ const char *szlevel;
+ unsigned long time;
+} debug_msg_type;
+
+void _custom_debug_msg(debug_msg_type *debug_msg, const char *msg, ...);
+
+/* coverity[+kill] */
+#define __MSG_FATAL(level, szCat, ...) \
+ do { \
+ if ((level) & DBG_MSG_BIT_FATAL) \
+ { \
+ static debug_msg_type msg______unique______name___ = { \
+ __FILE__, \
+ __LINE__, \
+ szCat, \
+ DBG_MSG_FATAL, \
+ "FATAL", \
+ }; \
+ _custom_debug_msg(&msg______unique______name___, ##__VA_ARGS__); \
+ } \
+ } while(0)
+
+#define __MSG_ERROR(level, szCat, ...) \
+ do { \
+ if ((level) & DBG_MSG_BIT_ERROR) \
+ { \
+ static debug_msg_type msg______unique______name___ = { \
+ __FILE__, \
+ __LINE__, \
+ szCat, \
+ DBG_MSG_ERROR, \
+ "ERROR", \
+ }; \
+ _custom_debug_msg(&msg______unique______name___, ##__VA_ARGS__); \
+ } \
+ } while(0)
+
+
+#define __MSG_WARN(level, szCat, ...) \
+ do { \
+ if ((level) & DBG_MSG_BIT_WARN) \
+ { \
+ static debug_msg_type msg______unique______name___ = { \
+ __FILE__, \
+ __LINE__, \
+ szCat, \
+ DBG_MSG_WARN, \
+ "WARN", \
+ }; \
+ _custom_debug_msg(&msg______unique______name___, ##__VA_ARGS__); \
+ } \
+ } while(0)
+
+#define __MSG_HIGH(level, szCat, ...) \
+ do { \
+ if ((level) & DBG_MSG_BIT_HIGH) \
+ { \
+ static debug_msg_type msg______unique______name___ = { \
+ __FILE__, \
+ __LINE__, \
+ szCat, \
+ DBG_MSG_HIGH, \
+ "HIGH", \
+ }; \
+ _custom_debug_msg(&msg______unique______name___, ##__VA_ARGS__); \
+ } \
+ } while(0)
+
+#define __MSG_MED(level, szCat, ...) \
+ do { \
+ if ((level) & DBG_MSG_BIT_MED) \
+ { \
+ static debug_msg_type msg______unique______name___ = { \
+ __FILE__, \
+ __LINE__, \
+ szCat, \
+ DBG_MSG_MED, \
+ "MED", \
+ }; \
+ _custom_debug_msg(&msg______unique______name___, ##__VA_ARGS__); \
+ } \
+ } while(0)
+
+
+#define __MSG_LOW(level, szCat, ...) \
+ do { \
+ if ((level) & DBG_MSG_BIT_LOW) \
+ { \
+ static debug_msg_type msg______unique______name___ = { \
+ __FILE__, \
+ __LINE__, \
+ szCat, \
+ DBG_MSG_LOW, \
+ "LOW", \
+ }; \
+ _custom_debug_msg(&msg______unique______name___, ##__VA_ARGS__); \
+ } \
+ } while(0)
+
+
+#define ASSERT(level, szCat, expr) \
+ do { \
+ if( !(expr) ) \
+ { \
+ __MSG_FATAL(level, szCat, "[%s] ASSERT : " #expr , __func__ ); \
+ } \
+ } while(0)
+
+#define NEVER_GET_HERE(level, szCat) \
+ do { \
+ __MSG_FATAL(level, szCat, "NeverGetHere : %s(%d)", __func__, __LINE__); \
+ } while(0)
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __ELM_MYPHOTOCAM_DEBUG_H__
+
diff --git a/common/include/ivug-debug.h b/common/include/ivug-debug.h
new file mode 100755
index 0000000..fae7537
--- /dev/null
+++ b/common/include/ivug-debug.h
@@ -0,0 +1,251 @@
+/*
+ * 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_
+
+#include <dlog.h>
+
+#define IVUG_LOG_OUTPUT_DLOG
+
+enum {
+ IVUG_MSG_COLOR_DEFAULT = 0,
+ IVUG_MSG_COLOR_BLACK = 30,
+ IVUG_MSG_COLOR_RED = 31,
+ IVUG_MSG_COLOR_GREEN = 32,
+ IVUG_MSG_COLOR_YELLOW = 33,
+ IVUG_MSG_COLOR_BLUE = 34,
+ IVUG_MSG_COLOR_MAGENTA = 35,
+ IVUG_MSG_COLOR_CYAN = 36,
+ IVUG_MSG_COLOR_WHITE = 37,
+};
+
+#ifdef IVUG_LOG_OUTPUT_DLOG
+
+#undef LOG_TAG
+#define LOG_TAG "IV-COMMON"
+
+#define IVUG_DEBUG_MSG(fmt, arg...) LOGD("[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define IVUG_DEBUG_WARNING(fmt, arg...) LOGW("[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define IVUG_DEBUG_ERROR(fmt, arg...) LOGE("[%s : %05d]" fmt "\n", __func__, __LINE__ , ##arg)
+#define IVUG_DEBUG_CRITICAL(fmt, arg...) LOGE("[%s : %05d]" fmt "\n", __func__, __LINE__ , ##arg)
+
+#else //USE_DLOG
+#define IVUG_DEBUG_MSG(fmt, arg...) fprintf(stdout, "[D: %s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define IVUG_DEBUG_WARNING(fmt, arg...) fprintf(stdout, "[W: %s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
+#define IVUG_DEBUG_ERROR(fmt, arg...) fprintf(stdout, "[E: %s : %05d]" fmt "\n", __func__, __LINE__ , ##arg)
+#define IVUG_DEBUG_CRITICAL(fmt, arg...) fprintf(stdout, "[E: %s : %05d]" fmt "\n", __func__, __LINE__ , ##arg)
+#define IVUG_DEBUG_PRINT(fmt,arg...) fprintf(stdout, "[%s : %05d] >>> leave \n", __func__, __LINE__ , ##arg)
+
+#endif //IVUG_LOG_OUTPUT_DLOG
+
+/*
+ How to add new Category..
+
+ TODO:
+*/
+
+#define MSG_MOUSE_SZCAT "IV-MOUSE"
+#define LVL_MOUSE DBG_MSG_LVL_HIGH
+
+#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__)
+#define MSG_MOUSE_WARN(...) __MSG_WARN(LVL_MOUSE, MSG_MOUSE_SZCAT, ##__VA_ARGS__)
+#define MSG_MOUSE_HIGH(...) __MSG_HIGH(LVL_MOUSE, MSG_MOUSE_SZCAT, ##__VA_ARGS__)
+#define MSG_MOUSE_MED(...) __MSG_MED(LVL_MOUSE, MSG_MOUSE_SZCAT, ##__VA_ARGS__)
+#define MSG_MOUSE_LOW(...) __MSG_LOW(LVL_MOUSE, MSG_MOUSE_SZCAT, ##__VA_ARGS__)
+
+
+#define SLIDER_ITEM_SZ "IV-SITEM"
+#define LVL_SLIDER_ITEM DBG_MSG_LVL_HIGH
+
+
+#define MSG_SITEM_FATAL(...) __MSG_FATAL(LVL_SLIDER_ITEM, SLIDER_ITEM_SZ, ##__VA_ARGS__)
+#define MSG_SITEM_ERROR(...) __MSG_ERROR(LVL_SLIDER_ITEM, SLIDER_ITEM_SZ, ##__VA_ARGS__)
+#define MSG_SITEM_WARN(...) __MSG_WARN(LVL_SLIDER_ITEM, SLIDER_ITEM_SZ, ##__VA_ARGS__)
+#define MSG_SITEM_HIGH(...) __MSG_HIGH(LVL_SLIDER_ITEM, SLIDER_ITEM_SZ, ##__VA_ARGS__)
+#define MSG_SITEM_MED(...) __MSG_MED(LVL_SLIDER_ITEM, SLIDER_ITEM_SZ, ##__VA_ARGS__)
+#define MSG_SITEM_LOW(...) __MSG_LOW(LVL_SLIDER_ITEM, SLIDER_ITEM_SZ, ##__VA_ARGS__)
+
+
+#define SLIDER_SZ "IV-SLIDER"
+#define LVL_SLIDER DBG_MSG_LVL_HIGH
+
+#define MSG_SLIDER_FATAL(...) __MSG_FATAL(LVL_SLIDER, SLIDER_SZ, ##__VA_ARGS__)
+#define MSG_SLIDER_ERROR(...) __MSG_ERROR(LVL_SLIDER, SLIDER_SZ, ##__VA_ARGS__)
+#define MSG_SLIDER_WARN(...) __MSG_WARN(LVL_SLIDER, SLIDER_SZ, ##__VA_ARGS__)
+#define MSG_SLIDER_HIGH(...) __MSG_HIGH(LVL_SLIDER, SLIDER_SZ, ##__VA_ARGS__)
+#define MSG_SLIDER_MED(...) __MSG_MED(LVL_SLIDER, SLIDER_SZ, ##__VA_ARGS__)
+#define MSG_SLIDER_LOW(...) __MSG_LOW(LVL_SLIDER, SLIDER_SZ, ##__VA_ARGS__)
+
+#define SETAS_SZ "IV-SETAS"
+#define LVL_SETAS DBG_MSG_LVL_HIGH
+
+#define MSG_SETAS_FATAL(...) __MSG_FATAL(LVL_SETAS, SETAS_SZ, ##__VA_ARGS__)
+#define MSG_SETAS_ERROR(...) __MSG_ERROR(LVL_SETAS, SETAS_SZ, ##__VA_ARGS__)
+#define MSG_SETAS_WARN(...) __MSG_WARN(LVL_SETAS, SETAS_SZ, ##__VA_ARGS__)
+#define MSG_SETAS_HIGH(...) __MSG_HIGH(LVL_SETAS, SETAS_SZ, ##__VA_ARGS__)
+#define MSG_SETAS_MED(...) __MSG_MED(LVL_SETAS, SETAS_SZ, ##__VA_ARGS__)
+#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 MSG_DETAIL_FATAL(...) __MSG_FATAL(LVL_DETAIL, DETAIL_SZ, ##__VA_ARGS__)
+#define MSG_DETAIL_ERROR(...) __MSG_ERROR(LVL_DETAIL, DETAIL_SZ, ##__VA_ARGS__)
+#define MSG_DETAIL_WARN(...) __MSG_WARN(LVL_DETAIL, DETAIL_SZ, ##__VA_ARGS__)
+#define MSG_DETAIL_HIGH(...) __MSG_HIGH(LVL_DETAIL, DETAIL_SZ, ##__VA_ARGS__)
+#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 SDATA_SZ "IV-SDATA"
+#define LVL_SDATA DBG_MSG_LVL_HIGH
+
+#define MSG_SDATA_FATAL(...) __MSG_FATAL(LVL_SDATA, SDATA_SZ, ##__VA_ARGS__)
+#define MSG_SDATA_ERROR(...) __MSG_ERROR(LVL_SDATA, SDATA_SZ, ##__VA_ARGS__)
+#define MSG_SDATA_WARN(...) __MSG_WARN(LVL_SDATA, SDATA_SZ, ##__VA_ARGS__)
+#define MSG_SDATA_HIGH(...) __MSG_HIGH(LVL_SDATA, SDATA_SZ, ##__VA_ARGS__)
+#define MSG_SDATA_MED(...) __MSG_MED(LVL_SDATA, SDATA_SZ, ##__VA_ARGS__)
+#define MSG_SDATA_LOW(...) __MSG_LOW(LVL_SDATA, SDATA_SZ, ##__VA_ARGS__)
+
+
+#define IVCOMMON_SZ "IV-COMMON"
+#define LVL_IVCOMMON DBG_MSG_LVL_HIGH
+
+#define MSG_IMAGEVIEW_FATAL(...) __MSG_FATAL(LVL_IVCOMMON, IVCOMMON_SZ, ##__VA_ARGS__)
+#define MSG_IMAGEVIEW_ERROR(...) __MSG_ERROR(LVL_IVCOMMON, IVCOMMON_SZ, ##__VA_ARGS__)
+#define MSG_IMAGEVIEW_WARN(...) __MSG_WARN(LVL_IVCOMMON, IVCOMMON_SZ, ##__VA_ARGS__)
+#define MSG_IMAGEVIEW_HIGH(...) __MSG_HIGH(LVL_IVCOMMON, IVCOMMON_SZ, ##__VA_ARGS__)
+#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 MAINVIEW_SZ "IV-MAIN"
+#define LVL_MAINVIEW DBG_MSG_LVL_HIGH
+
+#define MSG_MAIN_FATAL(...) __MSG_FATAL(LVL_MAINVIEW, MAINVIEW_SZ, ##__VA_ARGS__)
+#define MSG_MAIN_ERROR(...) __MSG_ERROR(LVL_MAINVIEW, MAINVIEW_SZ, ##__VA_ARGS__)
+#define MSG_MAIN_WARN(...) __MSG_WARN(LVL_MAINVIEW, MAINVIEW_SZ, ##__VA_ARGS__)
+#define MSG_MAIN_HIGH(...) __MSG_HIGH(LVL_MAINVIEW, MAINVIEW_SZ, ##__VA_ARGS__)
+#define MSG_MAIN_MED(...) __MSG_MED(LVL_MAINVIEW, MAINVIEW_SZ, ##__VA_ARGS__)
+#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 MSG_UTIL_FATAL(...) __MSG_FATAL(LVL_UTIL, UTIL_SZ, ##__VA_ARGS__)
+#define MSG_UTIL_ERROR(...) __MSG_ERROR(LVL_UTIL, UTIL_SZ, ##__VA_ARGS__)
+#define MSG_UTIL_WARN(...) __MSG_WARN(LVL_UTIL, UTIL_SZ, ##__VA_ARGS__)
+#define MSG_UTIL_HIGH(...) __MSG_HIGH(LVL_UTIL, UTIL_SZ, ##__VA_ARGS__)
+#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 MSG_NOTI_FATAL(...) __MSG_FATAL(LVL_NOTI, NOTI_SZ, ##__VA_ARGS__)
+#define MSG_NOTI_ERROR(...) __MSG_ERROR(LVL_NOTI, NOTI_SZ, ##__VA_ARGS__)
+#define MSG_NOTI_WARN(...) __MSG_WARN(LVL_NOTI, NOTI_SZ, ##__VA_ARGS__)
+#define MSG_NOTI_HIGH(...) __MSG_HIGH(LVL_NOTI, NOTI_SZ, ##__VA_ARGS__)
+#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 MSG_EFFECT_FATAL(...) __MSG_FATAL(LVL_EFFECT, EFFECT_SZ, ##__VA_ARGS__)
+#define MSG_EFFECT_ERROR(...) __MSG_ERROR(LVL_EFFECT, EFFECT_SZ, ##__VA_ARGS__)
+#define MSG_EFFECT_WARN(...) __MSG_WARN(LVL_EFFECT, EFFECT_SZ, ##__VA_ARGS__)
+#define MSG_EFFECT_HIGH(...) __MSG_HIGH(LVL_EFFECT, EFFECT_SZ, ##__VA_ARGS__)
+#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 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__)
+#define MSG_SLIST_WARN(...) __MSG_WARN(LVL_SLIST_ITEM, SLIST_ITEM_SZ, ##__VA_ARGS__)
+#define MSG_SLIST_HIGH(...) __MSG_HIGH(LVL_SLIST_ITEM, SLIST_ITEM_SZ, ##__VA_ARGS__)
+#define MSG_SLIST_MED(...) __MSG_MED(LVL_SLIST_ITEM, SLIST_ITEM_SZ, ##__VA_ARGS__)
+#define MSG_SLIST_LOW(...) __MSG_LOW(LVL_SLIST_ITEM, SLIST_ITEM_SZ, ##__VA_ARGS__)
+
+
+#define IV_ASSERT(expr) ASSERT(DBG_MSG_LVL_ALL, "IV-COMMON", expr)
+
+
+#define IVUG_FUNC_ENTER() MSG_IVUG_HIGH("ENTER %s(L%d)", __func__, __LINE__)
+#define IVUG_FUNC_LEAVE() MSG_IVUG_HIGH("LEAVE %s(L%d)", __func__, __LINE__)
+
+//expr check statements
+#define ivug_ret_if(expr) \
+ do { \
+ if(expr) { \
+ MSG_IMAGEVIEW_WARN("[%s] Return", #expr );\
+ return; \
+ } \
+ } while (0)
+
+#define ivug_retv_if(expr, val) \
+ do { \
+ if(expr) { \
+ MSG_IMAGEVIEW_WARN("[%s] Return value %d", #expr, val );\
+ return (val); \
+ } \
+ } while (0)
+
+#define ivug_retm_if(expr, fmt, args...) \
+ do { \
+ if(expr) { \
+ MSG_IMAGEVIEW_WARN("[%s] Return, message "fmt, #expr, ##args );\
+ return; \
+ } \
+ } while (0)
+
+#define ivug_retvm_if(expr, val, fmt, args...) \
+ do { \
+ if(expr) { \
+ MSG_IMAGEVIEW_WARN("[%s] Return value, message "fmt, #expr, ##args );\
+ return (val); \
+ } \
+ } while (0)
+
+
+#include "debug.h"
+
+
+#endif //_IVUG_DEBUG_H_
diff --git a/common/include/ivug-mouse-event.h b/common/include/ivug-mouse-event.h
new file mode 100755
index 0000000..40ecc5a
--- /dev/null
+++ b/common/include/ivug-mouse-event.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#pragma once
+
+typedef struct {
+ int x, y;
+
+ unsigned int timestamp;
+
+ int button_flags;
+
+ int event_flags;
+ int device;
+} MouseEvent;
+
+
+// TODO : Review below APIs
+typedef struct {
+ void (*onMouseDown)(Evas_Object *obj, MouseEvent *down, void *data);
+ void (*onMouseDlbClick)(Evas_Object *obj, MouseEvent *click, void *data);
+ void (*onMouseUp)(Evas_Object *obj, MouseEvent *up, void *data);
+ void (*onMouseMove)(Evas_Object *obj, MouseEvent *prev, MouseEvent *cur, void *data);
+
+} mouse_callback_t;
+
+typedef void *Ivug_Event_Handle;
+
+Ivug_Event_Handle
+ivug_mouse_event_add(Evas_Object *obj, mouse_callback_t *pCallback, void *client_data, const char *alias /* for debugging*/);
+
+void ivug_mouse_event_del(Ivug_Event_Handle handle);
+
+
diff --git a/common/include/statistics.h b/common/include/statistics.h
new file mode 100755
index 0000000..3ef8df9
--- /dev/null
+++ b/common/include/statistics.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __ELM_MYPHOTOCAM_STATISTICS_H__
+#define __ELM_MYPHOTOCAM_STATISTICS_H__
+
+#include <stdbool.h>
+#include <stdio.h>
+
+#define PERF_TIME
+
+#define LVL1 " "
+#define LVL2 " "
+#define LVL3 " "
+#define LVL4 " "
+#define LVL5 " "
+#define LVL6 " "
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int mm_ta_accum_item_begin(const char* name, bool show, const char* filename, int line);
+int mm_ta_accum_item_end(const char* name, bool show, const char* filename, int line);
+void mm_ta_accum_show_result_fp(FILE *fp);
+
+int PERF_INIT();
+int PERF_DEINIT();
+
+#ifdef PERF_TIME
+
+// accum item handling
+#define PERF_CHECK_BEGIN(name) mm_ta_accum_item_begin(name,false,__FILE__,__LINE__)
+#define PERF_CHECK_END(name) mm_ta_accum_item_end(name,false,__FILE__,__LINE__)
+
+// Print out
+#define PERF_SHOW_RESULT(fp) mm_ta_accum_show_result_fp(fp)
+
+#else
+
+#define PERF_CHECK_BEGIN(name)
+#define PERF_CHECK_END(name)
+
+// Print out
+#define PERF_SHOW_RESULT(fp)
+
+
+#endif // PERF_TIME
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ELM_MYPHOTOCAM_STATISTICS_H__ */
+
diff --git a/common/src/debug.c b/common/src/debug.c
new file mode 100755
index 0000000..800d69a
--- /dev/null
+++ b/common/src/debug.c
@@ -0,0 +1,399 @@
+/*
+ * 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 <stdbool.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <time.h> // localtime_r
+#include <sys/time.h> // gettimeofday
+#include <unistd.h>
+#include <string.h> // strrchr
+
+#ifndef __G_LIB_H__
+ #define G_UNLIKELY(x) x
+#endif
+
+
+#include "debug.h"
+
+enum {
+ _DEBUG_OUTPUT_DIRECTION_CONSOLE = (1 << 0),
+ _DEBUG_OUTPUT_DIRECTION_SYSLOG = (1 << 1),
+ _DEBUG_OUTPUT_DIRECTION_FILE = (1 << 2),
+ _DEBUG_OUTPUT_DIRECTION_DLOG = (1 << 3),
+};
+
+// Configuration for output
+// console message slower than dlog about 30~40 ms
+#define _DEBUG_OUTPUT_DIRECTION (_DEBUG_OUTPUT_DIRECTION_DLOG)
+
+#include <dlog.h>
+
+#ifndef INI_PATH
+#define INI_PATH "/var/log"
+#endif
+
+#ifndef _DEBUG_MODULE
+#define _DEBUG_MODULE "IVUG"
+#endif
+
+#define _DEBUG_ERR_TRACE_FILE_NAME INI_PATH"/"_DEBUG_MODULE"_FATAL.txt"
+#define _DEBUG_PREFIX "["_DEBUG_MODULE"]"
+
+static bool bInit = false;
+
+static char *get_time_string(unsigned long dwmSec)
+{
+ static char buffer[30];
+
+ unsigned long msec=0;
+ unsigned long sec=0;
+ unsigned long min=0;
+ unsigned long hour=0;
+
+// Don't forget turn on compiler optimization options.
+ sec = ( dwmSec / 1000 );
+ msec = ( dwmSec % 1000 );
+
+ min = (sec / 60 );
+ sec = (sec % 60 );
+
+ hour = (min / 60 );
+ min = (min % 60 );
+
+ snprintf(buffer, (size_t)sizeof(buffer), "%1d:%02d:%02d.%03d", (int)hour,(int)min,(int)sec,(int)msec);
+
+ return buffer;
+}
+
+
+/*Retrieves the number of milliseconds that have elapsed since the system was started*/
+static unsigned long get_sys_elapsed_time(void)
+{
+ static struct timeval init_time = { 0 , 0 };
+ static bool bFirst = false;
+ struct timeval current_time;
+
+ if ( bFirst == false )
+ {
+ bFirst = true;
+ gettimeofday(&init_time, NULL);
+ }
+
+ gettimeofday(&current_time, NULL);
+
+ // return (current_time.tv_sec - init_time.tv_sec) * 1000UL + (UINT32)((current_time.tv_usec - init_time.tv_usec) / 1000.0) ;
+ return ((current_time.tv_sec * 1E3 + current_time.tv_usec / 1E3) - (init_time.tv_sec * 1E3 + init_time.tv_usec / 1E3));
+}
+
+char *get_fmt_string__inline (const char *msg, va_list va)
+{
+#define MAX_CHAR_PER_LINE ( 1024 )
+
+ static char szPrint[MAX_CHAR_PER_LINE];
+
+ vsnprintf(szPrint, 1024, msg, va);
+
+ return szPrint;
+}
+
+
+void _custom_debug_init()
+{
+ get_sys_elapsed_time();
+}
+
+
+void _custom_debug_deinit()
+{
+
+}
+
+
+void
+_custom_err_trace_write( const char *func_name, int line_num, const char *fmt, ... )
+{
+ FILE *f = NULL;
+ va_list ap = {0};
+ char buf[128];
+
+ time_t current_time;
+ struct tm new_time;
+
+ current_time = time( NULL );
+ localtime_r( &current_time, &new_time );
+
+ f = fopen( _DEBUG_ERR_TRACE_FILE_NAME, "a" );
+ if( f == NULL )
+ {
+ printf( "Failed to open file.[%s]\n", _DEBUG_ERR_TRACE_FILE_NAME );
+ return;
+ }
+
+ fprintf( f, "[%.19s][%05d][%s]", asctime_r( &new_time, buf ), line_num, func_name );
+
+ va_start( ap, fmt );
+ vfprintf( f, fmt, ap );
+ va_end( ap );
+
+ fprintf( f, "\n" );
+
+ fclose( f );
+}
+
+void
+_custom_err_trace_fvprintf( const char *func_name, int line_num, const char *fmt, va_list ap )
+{
+ FILE *f = NULL;
+
+ time_t current_time;
+ struct tm new_time;
+ char buf[128];
+
+ current_time = time( NULL );
+ localtime_r( &current_time, &new_time );
+
+ f = fopen( _DEBUG_ERR_TRACE_FILE_NAME, "a" );
+ if( f == NULL )
+ {
+ printf( "Failed to open file.[%s]\n", _DEBUG_ERR_TRACE_FILE_NAME );
+ return;
+ }
+
+ fprintf( f, "[%.19s][[F:%-16.16s L:%5d] ", asctime_r( &new_time, buf ), func_name, line_num );
+ vfprintf( f, fmt, ap );
+ fprintf( f, "\n" );
+
+ fclose( f );
+}
+
+/*
+typedef enum log_priority {
+ DLOG_UNKNOWN = 0,
+ DLOG_DEFAULT,
+ DLOG_VERBOSE,
+ DLOG_DEBUG,
+ DLOG_INFO,
+ DLOG_WARN,
+ DLOG_ERROR,
+ DLOG_FATAL,
+ DLOG_SILENT,
+} log_priority;
+
+#define LOG(priority, tag, ...) \
+#define LOG_VA(priority, tag, fmt, args) \
+*/
+
+inline log_priority convert_to_dlog_priority(int msg_level)
+{
+/*
+DBG_MSG_LOW = 0,
+DBG_MSG_MED = 1,
+DBG_MSG_HIGH = 2,
+
+DBG_MSG_WARN = 3,
+DBG_MSG_ERROR = 4,
+DBG_MSG_FATAL = 5,
+
+DBG_MSG_CUST5 = 6,
+DBG_MSG_CUST6 = 7,
+DBG_MSG_CUST7 = 8,
+DBG_MSG_CUST8 = 9,
+DBG_MSG_CUST9 = 10,
+DBG_MSG_CUST10 = 11,
+DBG_MSG_CUST11 = 12,
+DBG_MSG_CUST12 = 13,
+DBG_MSG_CUST13 = 14,
+*/
+
+ static log_priority priority[] = {
+ DLOG_VERBOSE,
+ DLOG_VERBOSE,
+ DLOG_WARN, // MSG HIGH
+ DLOG_WARN,
+ DLOG_ERROR,
+ DLOG_FATAL, // 5
+ };
+
+ if ( msg_level <= DBG_MSG_FATAL)
+ return priority[msg_level];
+
+ return DLOG_DEBUG;
+
+}
+
+
+
+void _custom_debug_msg(debug_msg_type *debug_msg, const char *msg, ...)
+{
+ va_list va;
+
+ static const char *level ;
+
+ if ( G_UNLIKELY(bInit == false) )
+ {
+ _custom_debug_init();
+ bInit = true;
+ }
+
+#define DIRECORY_SPLITTER '/'
+ const char*pFileName = NULL;
+
+ debug_msg->time = get_sys_elapsed_time();
+
+ pFileName = strrchr(debug_msg->fname, DIRECORY_SPLITTER);
+ pFileName = (NULL == pFileName)?debug_msg->fname:(pFileName+1);
+
+ level = debug_msg->szlevel;
+
+ // File
+ char *time_string = get_time_string(debug_msg->time);
+
+ va_start(va, msg);
+
+ if ( _DEBUG_OUTPUT_DIRECTION & _DEBUG_OUTPUT_DIRECTION_CONSOLE )
+ {
+
+ printf(_DEBUG_PREFIX"%s[F:%-16.16s L:%5d][%s:%s] ",time_string , pFileName, debug_msg->nline , debug_msg->szcategory, level );
+ vprintf(msg, va);
+ printf("\n");
+ }
+
+ if ( _DEBUG_OUTPUT_DIRECTION & _DEBUG_OUTPUT_DIRECTION_DLOG )
+ {
+ static char buf[2048];
+
+ int i ;
+
+ i = snprintf(buf, 2048, "%s[F:%-16.16s L:%5d][%s] ",time_string , pFileName, debug_msg->nline , level);
+
+ vsnprintf( buf + i, 2048 - i, msg, va);
+
+// Prevent Format string attack
+ print_log(convert_to_dlog_priority(debug_msg->msg_level), debug_msg->szcategory, "%s", buf);
+// print_log(prio, _DEBUG_MODULE, "%s[F:%-16.16s L:%5d][%s:%s] ",time_string , pFileName, debug_msg->nline , szCategory[debug_msg->category], level );
+// vprint_log(prio,_DEBUG_MODULE, msg, va);
+ }
+
+ va_end(va);
+
+ if ( G_UNLIKELY(debug_msg->msg_level == DBG_MSG_FATAL) )
+ {
+ fflush (stdout);
+ va_start(va, msg);
+ _custom_err_trace_fvprintf(pFileName, debug_msg->nline, msg, va); // Save to file.
+ va_end(va);
+ assert(0);
+ }
+
+}
+
+
+#ifdef FMRADIO_FEATURE_ENABLE_GSTREAMER_LOGGING
+
+enum {
+ DEBUG_COLOR_DEFAULT = 0,
+ DEBUG_COLOR_BLACK = 30,
+ DEBUG_COLOR_RED = 31,
+ DEBUG_COLOR_GREEN = 32,
+ DEBUG_COLOR_YELLOW = 33,
+ DEBUG_COLOR_BLUE = 34,
+ DEBUG_COLOR_MAGENTA = 35,
+ DEBUG_COLOR_CYAN = 36,
+ DEBUG_COLOR_WHITE = 37,
+};
+
+static gchar *custom_print_object(GObject *object)
+{
+ if (object == NULL)
+ {
+ return g_strdup("Unknown");
+ }
+/*
+ if (*(GType *) ptr == GST_TYPE_CAPS)
+ {
+ return gst_caps_to_string((GstCaps *) ptr);
+ }
+
+ if (*(GType *) ptr == GST_TYPE_STRUCTURE)
+ {
+ return gst_structure_to_string((GstStructure *) ptr);
+ }
+*/
+ if (GST_IS_PAD(object))
+ {
+ return g_strdup_printf("%s:%s", GST_STR_NULL( GST_OBJECT_NAME( GST_PAD_PARENT(object))) , GST_STR_NULL( GST_PAD_NAME(object) ));
+ }
+
+ if (GST_IS_ELEMENT(object))
+ {
+ return g_strdup_printf("%s", GST_STR_NULL(GST_ELEMENT_NAME(object)));
+ }
+
+ if (G_IS_OBJECT(object))
+ {
+ return g_strdup_printf("%s(0x%0x)", G_OBJECT_TYPE_NAME(object), object);
+ }
+
+ return g_strdup_printf("0x%08x", object);
+}
+
+void custom_log_func(GstDebugCategory *category, GstDebugLevel level,
+ const gchar *file, const gchar *function, gint line,
+ GObject *object, GstDebugMessage *message, gpointer unused)
+{
+ static const char *szLevel[] = {"LOW", "MED", "HIGH", "WARN", "ERROR", "FATAL"};
+
+ static const gint levelcolor[] = {
+ DEBUG_COLOR_DEFAULT, /* GST_LEVEL_NONE */
+ DEBUG_COLOR_RED, /* GST_LEVEL_ERROR */
+ DEBUG_COLOR_YELLOW, /* GST_LEVEL_WARNING */
+ DEBUG_COLOR_GREEN, /* GST_LEVEL_INFO */
+ DEBUG_COLOR_CYAN, /* GST_LEVEL_DEBUG */
+ DEBUG_COLOR_WHITE, /* GST_LEVEL_LOG */
+ };
+
+ if (level > gst_debug_category_get_threshold(category))
+ return;
+
+ gchar *obj = custom_print_object(object);
+
+#define DIRECORY_SPLITTER '/'
+
+ const char*pFileName = NULL;
+
+ pFileName = strrchr(file, DIRECORY_SPLITTER);
+ pFileName = (NULL == pFileName) ? file:(pFileName+1);
+
+// File
+ char *time_string = get_time_string(get_sys_elapsed_time());
+
+ log_print_rel(LOG_CAMCORDER,LOG_CLASS_ERR,
+ _DEBUG_PREFIX "%s[F:%-16.16s L:%5d][%s][%s][%s] %s\n", time_string, pFileName, line,
+ gst_debug_category_get_name(category), gst_debug_level_get_name(level),obj,
+ gst_debug_message_get(message));
+
+ g_free(obj);
+}
+
+
+#endif // FMRADIO_FEATURE_ENABLE_GSTREAMER_LOGGING
+
+
+
diff --git a/common/src/ivug-mouse-event.c b/common/src/ivug-mouse-event.c
new file mode 100755
index 0000000..db3e52c
--- /dev/null
+++ b/common/src/ivug-mouse-event.c
@@ -0,0 +1,376 @@
+/*
+ * 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>
+#include "ivug-debug.h"
+#include "ivug-mouse-event.h"
+
+
+// Click condition.
+// Down Up duration under 300ms & Down pos, Up pos under 3 pixel
+
+
+// Long pressed condition
+// Down Up duration upper 1s & Down pos, Up pos under 5 pixel
+
+typedef enum {
+ MOUSE_DOWN_UNKNWON,
+ MOUSE_DOWN_NONE,
+ MOUSE_DOWN_1,
+ MOUSE_DOWN_ERROR, // Error
+} MouseState;
+
+
+#define INVALID_DEVICE_ID (-1)
+#define NUM_MAX_BUTTON (1)
+
+typedef struct _mouse_data_t{
+ void *pClientData;
+ Evas_Object *obj;
+
+ mouse_callback_t cb;
+
+ MouseState m_state;
+
+ bool bDown[NUM_MAX_BUTTON]; // For Mose down check before mouse move
+ bool bHold[NUM_MAX_BUTTON];
+
+ MouseEvent event[NUM_MAX_BUTTON];
+ MouseEvent down[NUM_MAX_BUTTON];
+ MouseEvent prve_up[NUM_MAX_BUTTON];
+
+ unsigned int prev_dist;
+
+ MouseEvent center;
+
+// For debugging purpose, later will be removed.
+ char alias[100]; //
+} mouse_data_t;
+
+
+#ifndef __UNUSED__
+#define __UNUSED__ __attribute__((unused))
+#endif
+
+static void _on_mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_info)
+{
+ if ( data == NULL )
+ {
+ MSG_MOUSE_ERROR("Debug me!!!!");
+ return;
+ }
+
+ mouse_data_t *pData = (mouse_data_t *)data;
+ MouseEvent *ev = event_info;
+
+ if ( ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
+ {
+ MSG_MOUSE_HIGH("[%s] %s On Hold. Dev=%d", pData->alias, __func__, ev->device);
+ }
+
+ int pressed = ev->device;
+
+ if(pressed >= NUM_MAX_BUTTON)
+ {
+ MSG_MOUSE_FATAL("Invalid Pressed(%d)", pressed);
+ return;
+ }
+
+ if ( pData->m_state == MOUSE_DOWN_UNKNWON )
+ {
+ MSG_MOUSE_ERROR("[%s] Something wrong", pData->alias);
+ }
+
+ if ( pData->bDown[pressed] == true )
+ {
+ MSG_MOUSE_WARN("Mouse down is detected. but already pressed button. ignore");
+ return;
+ }
+
+ pData->m_state++;
+ pData->bDown[pressed] = true; // TODO : probably, can make memory overwritten issues.
+
+ if ( pData->m_state == MOUSE_DOWN_1 )
+ {
+ MSG_MOUSE_HIGH("[%s] Callback Mouse Down : Dev=%d (%d,%d)", pData->alias, ev->device, ev->x, ev->y);
+
+ if ( pData->cb.onMouseDown )
+ {
+ (pData->cb.onMouseDown)(pData->obj, ev, pData->pClientData);
+ }
+
+ MSG_MOUSE_MED("Func:%s Device=%d XY(%d,%d)", "_on_mouse_down", pressed, ev->x , ev->y );
+ }
+ else
+ {
+ MSG_MOUSE_WARN("[%s] Ignore third finger! State=%d Dev=%d bPressed(%d,%d,%d)", pData->alias, pData->m_state, ev->device,
+ pData->bDown[0],
+ pData->bDown[1],
+ pData->bDown[2]);
+
+ return ;
+ }
+
+ pData->event[pressed] = *ev;
+ pData->down[pressed] = *ev;
+
+ return ;
+}
+
+
+static void _on_mouse_up(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_info)
+{
+
+ if ( data == NULL )
+ {
+ MSG_MOUSE_ERROR("Debug me!!!!");
+ return;
+ }
+
+ mouse_data_t *pData = (mouse_data_t *)data;
+ MouseEvent *ev = event_info;
+
+ int pressed = ev->device;
+
+ if(pressed >= NUM_MAX_BUTTON)
+ {
+ MSG_MOUSE_FATAL("Invalid Pressed(%d)", pressed);
+ return;
+ }
+
+ if ( pData->m_state == MOUSE_DOWN_UNKNWON )
+ {
+ MSG_MOUSE_ERROR("[%s] Something wrong. Dev=%d", pData->alias, ev->device);
+ MSG_MOUSE_ERROR("[%s] Error! State=%d Dev=%d bPressed(%d,%d,%d)", pData->alias, pData->m_state, ev->device,
+ pData->bDown[0],
+ pData->bDown[1],
+ pData->bDown[2]);
+
+ }
+
+ if ( pData->m_state == MOUSE_DOWN_NONE )
+ {
+ MSG_MOUSE_WARN("[%s] Mouse up is detected. but state is NONE.", pData->alias);
+ pData->bDown[0] = pData->bDown[1] = pData->bDown[2] = 0;
+ return;
+ }
+
+ pData->m_state--;
+
+ if ( pData->bDown[pressed] == false )
+ {
+ MSG_MOUSE_ERROR("[%s] Something wrong", pData->alias);
+ MSG_MOUSE_ERROR("[%s] Error! State=%d Dev=%d bPressed(%d,%d,%d)", pData->alias, pData->m_state, ev->device,
+ pData->bDown[0],
+ pData->bDown[1],
+ pData->bDown[2]);
+ }
+
+ if ( ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
+ {
+ MSG_MOUSE_HIGH("[%s] %s On Hold. Dev=%d", pData->alias, __func__, ev->device);
+ pData->bHold[pressed] = true;
+ }
+
+ pData->bDown[pressed] = false;
+
+ if ( pData->m_state == MOUSE_DOWN_NONE )
+ {
+ MSG_MOUSE_HIGH("[%s] Callback Mouse Up : Dev=%d (%d,%d)", pData->alias, ev->device, ev->x, ev->y);
+
+ if ( ev->button_flags & EVAS_BUTTON_DOUBLE_CLICK)
+ {
+ if ( pData->cb.onMouseDlbClick )
+ {
+ (pData->cb.onMouseDlbClick)(pData->obj, ev, pData->pClientData);
+ }
+ MSG_MOUSE_HIGH("[%s] %s Double click detected. Dev=%d (%d,%d)", pData->alias, __func__, ev->device, ev->x, ev->y);
+ }
+ if ( pData->cb.onMouseUp )
+ {
+ (pData->cb.onMouseUp)(pData->obj, ev, pData->pClientData);
+ }
+
+ pData->prve_up[pressed] = *ev;
+
+ MSG_MOUSE_MED("Func:%s State=%d Device=%d XY(%d,%d)", "_on_mouse_up", pData->m_state, pressed, ev->x , ev->y);
+ }
+
+ return ;
+
+}
+
+static void _on_mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_info)
+{
+ if ( data == NULL )
+ {
+ MSG_MOUSE_ERROR("Debug me!!!!");
+ return;
+ }
+
+ mouse_data_t *pData = (mouse_data_t *)data;
+ MouseEvent *ev = event_info;
+
+ int pressed = ev->device;
+
+ if ( ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
+ {
+ MSG_MOUSE_HIGH("[%s] %s On Hold. Dev=%d", pData->alias, __func__, ev->device);
+ }
+
+ if(pressed >= NUM_MAX_BUTTON)
+ {
+ MSG_MOUSE_FATAL("Invalid Pressed(%d)", pressed);
+ return;
+ }
+
+ if ( pData->bDown[pressed] == false)
+ {
+ // Move event prior down should be ignored
+ MSG_MOUSE_MED("Ignore move event before click");
+ return ;
+ }
+
+ switch ( pData->m_state )
+ {
+ case MOUSE_DOWN_1:
+ {
+ MSG_MOUSE_MED("Func:%s. Device=%d Old(%d,%d) Cur(%d,%d)", __FUNCTION__, pressed,
+ pData->event[pressed].x, pData->event[pressed].y,
+ ev->x , ev->y);
+
+ if ( pData->cb.onMouseMove )
+ {
+ MSG_MOUSE_MED("[%s] Callback Mouse Move : (%d,%d)", pData->alias, ev->x, ev->y);
+ (pData->cb.onMouseMove)(pData->obj, &pData->event[pressed], ev, pData->pClientData);
+ }
+
+ pData->event[pressed] = *ev;
+
+ break;
+ }
+ default:
+ MSG_MOUSE_ERROR("[%s] Something wrong. state=%d", pData->alias, pData->m_state);
+ break;
+
+ }
+
+ return ;
+}
+
+
+
+static void _proxy_on_mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_info)
+{
+ Evas_Event_Mouse_Down *ev = event_info;
+
+ MouseEvent event;
+
+ event.device = 0;
+ event.timestamp = ev->timestamp;
+ event.x = ev->canvas.x;
+ event.y = ev->canvas.y;
+ event.button_flags = ev->flags;
+ event.event_flags = ev->event_flags;
+
+ MSG_MOUSE_MED("%s Dev=%d Button=%d Flags=%d Event=%d", __func__, (int)ev->dev, ev->button, ev->flags, ev->event_flags);
+
+ _on_mouse_down(data, NULL, obj, (void *)&event);
+}
+
+static void _proxy_on_mouse_up(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_info)
+{
+ Evas_Event_Mouse_Up *ev = event_info;
+
+ MouseEvent event;
+
+ event.device = 0;
+ event.timestamp = ev->timestamp;
+ event.x = ev->canvas.x;
+ event.y = ev->canvas.y;
+ event.button_flags = ev->flags;
+ event.event_flags = ev->event_flags;
+
+
+ MSG_MOUSE_MED("%s Dev=%d Button=%d Flags=%d Event=%d", __func__, (int)ev->dev, ev->button, ev->flags, ev->event_flags);
+
+
+ _on_mouse_up(data, NULL, obj, (void *)&event);
+}
+
+static void _proxy_on_mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_info)
+{
+ Evas_Event_Mouse_Move *ev = event_info;
+
+ MouseEvent event;
+
+ event.device = 0;
+ event.timestamp = ev->timestamp;
+ event.x = ev->cur.canvas.x;
+ event.y = ev->cur.canvas.y;
+ event.button_flags = 0;
+ event.event_flags = ev->event_flags;
+
+ MSG_MOUSE_MED("%s Dev=%d Button=%d Event=%d Prev(%d,%d) Cur(%d,%d)", __func__, (int)ev->dev, ev->buttons, ev->event_flags,
+ ev->prev.canvas.x, ev->prev.canvas.y, ev->cur.canvas.x, ev->cur.canvas.y);
+
+ _on_mouse_move(data, NULL, obj, (void *)&event);
+
+}
+
+
+Ivug_Event_Handle
+ivug_mouse_event_add(Evas_Object *obj, mouse_callback_t *pCallback, void *client_data, const char *alias)
+{
+ mouse_data_t *pData = NULL;
+//TODO : Should check parameters
+
+ pData = calloc(1, sizeof(mouse_data_t));
+
+ pData->obj = obj;
+ pData->pClientData = client_data;
+ pData->m_state = MOUSE_DOWN_NONE;
+ strncpy(pData->alias, alias, sizeof(pData->alias));
+
+ memcpy(&pData->cb, pCallback, sizeof(mouse_callback_t));
+
+ evas_object_event_callback_add(pData->obj, EVAS_CALLBACK_MOUSE_DOWN, _proxy_on_mouse_down, pData);
+ evas_object_event_callback_add(pData->obj, EVAS_CALLBACK_MOUSE_UP, _proxy_on_mouse_up, pData);
+ evas_object_event_callback_add(pData->obj, EVAS_CALLBACK_MOUSE_MOVE, _proxy_on_mouse_move, pData);
+
+ MSG_MOUSE_HIGH("Mouse Event Handler Add : Alias(%s) 0x%08x for Object(0x%08x)", alias, pData, obj);
+
+ return (Ivug_Event_Handle *)pData;
+}
+
+
+void ivug_mouse_event_del(Ivug_Event_Handle handle)
+{
+ mouse_data_t *pData = handle;
+
+ evas_object_event_callback_del(pData->obj, EVAS_CALLBACK_MOUSE_DOWN, _proxy_on_mouse_down);
+ evas_object_event_callback_del(pData->obj, EVAS_CALLBACK_MOUSE_UP, _proxy_on_mouse_up);
+ evas_object_event_callback_del(pData->obj, EVAS_CALLBACK_MOUSE_MOVE, _proxy_on_mouse_move);
+
+ MSG_MOUSE_HIGH("Mouse Event Handler Remove : 0x%08x", pData);
+
+ free(handle);
+}
+
+
+
diff --git a/common/src/statistics.c b/common/src/statistics.c
new file mode 100755
index 0000000..5eaa56e
--- /dev/null
+++ b/common/src/statistics.c
@@ -0,0 +1,442 @@
+/*
+ * 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
+
+#include <stdio.h>
+#include <malloc.h>
+#include <string.h>
+#include <assert.h>
+#include <time.h>
+
+#include "statistics.h"
+#include "debug.h"
+
+
+#ifdef STANDALONE
+#define EXPORT_API
+#endif
+
+#include <sys/time.h>
+#include <sys/utsname.h>
+#include <sys/resource.h>
+#include <unistd.h>
+
+#include <stdarg.h>
+#include "statistics.h"
+
+#define MAX_UINT32 (0xFFFFFFFFL)
+#define MAX_UINT64 (0xFFFFFFFFFFFFFFFFLL)
+
+// defs.
+#define MM_TA_MAX_ACCUM 100
+
+
+typedef struct _mm_ta_accum_item
+{
+ unsigned long long elapsed_accum;
+ unsigned long num_calls;
+ unsigned long long elapsed_min;
+ unsigned long long elapsed_max;
+ unsigned long long first_start;
+ unsigned long long last_end;
+
+ char* name;
+
+ unsigned long long timestamp;
+ int on_estimate;
+ int num_unpair;
+} mm_ta_accum_item;
+
+
+static void PrintLog(const char *file, int line, const char *msg, ...)
+{
+ va_list va;
+
+ va_start(va, msg);
+ fprintf(stderr ,"[STAT] %s:%d:",file, line);
+ vfprintf(stderr ,msg, va);
+ fprintf(stderr, "\n");
+ va_end(va);
+}
+
+#define MyPrintf(...) PrintLog(__FILE__, __LINE__, ##__VA_ARGS__ )
+
+
+// internal func.
+static void __free_accums(void);
+static int __get_accum_index(const char* name);
+
+
+// global var.
+static mm_ta_accum_item ** g_accums = NULL;
+static int g_accum_index = 0;
+static int g_accum_longest_name = 0;
+static unsigned long long g_accum_first_time = MAX_UINT64; // jmlee
+
+
+int PERF_INIT(void)
+{
+ if (g_accums)
+ {
+ return 0;
+ }
+
+ g_accums = (mm_ta_accum_item **) malloc ( MM_TA_MAX_ACCUM * sizeof(mm_ta_accum_item *) );
+ if(!g_accums)
+ {
+ assert(0);
+ return -1;
+ }
+
+ g_accum_first_time = MAX_UINT64;
+
+ return 0;
+}
+
+int PERF_DEINIT(void)
+{
+ if ( ! g_accums )
+ {
+ return 0;
+ }
+
+ __free_accums();
+
+ g_accum_first_time = MAX_UINT64;
+
+ return 0;
+}
+
+
+static int __get_accum_index(const char* name)
+{
+ int i;
+
+ assert(name);
+
+ // find index
+ for ( i = 0; i < g_accum_index; i++ )
+ {
+ if ( strcmp( name, g_accums[i]->name ) == 0 )
+ return i;
+ }
+
+ return -1;
+}
+
+static void __free_accums(void)
+{
+ int i = 0;
+
+ if ( ! g_accums )
+ return;
+
+ for ( i = 0; i < g_accum_index; i++ )
+ {
+ if ( g_accums[i] )
+ {
+ if ( g_accums[i]->name )
+ free ( g_accums[i]->name );
+
+ free ( g_accums[i] );
+
+ g_accums[i] = NULL;
+ }
+ }
+
+ g_accum_index = 0;
+ g_accum_longest_name = 0;
+
+ free ( g_accums );
+ g_accums = NULL;
+}
+
+
+
+int mm_ta_accum_item_begin(const char* name, bool show, const char* filename, int line)
+{
+ mm_ta_accum_item * accum = NULL;
+ int index = 0;
+ int name_len = 0;
+ struct timeval t;
+
+ if (!g_accums)
+ return 0;
+
+ if ( g_accum_index == MM_TA_MAX_ACCUM )
+ return -1;
+
+ if ( !name )
+ return -1;
+
+ name_len = strlen(name);
+ if( name_len == 0 )
+ return -1;
+
+ // if 'name' is new one. create new item.
+ if ( (index = __get_accum_index(name)) == -1 )
+ {
+ accum = ( mm_ta_accum_item * ) malloc( sizeof( mm_ta_accum_item ) );
+ if ( !accum )
+ {
+ assert(0);
+ return -1;
+ }
+
+ // clear first.
+ memset( accum, 0, sizeof (mm_ta_accum_item) );
+ accum->elapsed_min = MAX_UINT64;
+
+ accum->name = strdup(name);
+ // add it to list.
+ g_accums[g_accum_index] = accum;
+ g_accum_index++;
+
+ if ( g_accum_longest_name < name_len )
+ g_accum_longest_name = name_len;
+
+ }
+ else
+ {
+ accum = g_accums[index];
+ }
+
+ // verify pairs of begin, end.
+ if (accum->on_estimate)
+ {
+ MyPrintf("[%s] is not 'end'ed!\n", accum->name);
+ accum->num_unpair ++;
+ return -1;
+ }
+
+ accum->on_estimate = 1;
+
+ // get timestamp
+ gettimeofday( &t, NULL );
+ accum->timestamp = t.tv_sec * 1000000UL + t.tv_usec;
+
+ if ( accum->first_start == 0 )
+ { // assum that timestamp never could be zero.
+ accum->first_start = accum->timestamp;
+
+ if ( g_accum_first_time > accum->first_start )
+ {
+ g_accum_first_time = accum->first_start ;
+ }
+ }
+
+ if ( show )
+ MyPrintf("[ACCUM BEGIN] %s : %ld ---(%s:%d)\n", name, accum->timestamp, filename, line );
+
+ accum->num_calls++;
+
+ return 0;
+}
+
+int mm_ta_accum_item_end(const char* name, bool show, const char* filename, int line)
+{
+ mm_ta_accum_item * accum = NULL;
+ unsigned long long tval = 0LL;
+ int index = 0;
+ struct timeval t;
+
+ if (!g_accums)
+ return 0;
+
+ if ( g_accum_index == MM_TA_MAX_ACCUM )
+ return -1;
+
+ if ( !name )
+ return -1;
+
+ if( strlen ( name ) == 0 )
+ return -1;
+
+ // varify the 'name' is already exist.
+ if ( (index = __get_accum_index(name)) == -1 )
+ {
+ MyPrintf("[%s] is not added before!\n", name);
+ return -1;
+ }
+
+ accum = g_accums[index];
+
+ // verify pairs of begin, end.
+ if (!accum->on_estimate)
+ {
+ MyPrintf("[%s] is not 'begin' yet!\n", accum->name);
+ accum->num_unpair ++;
+ return -1;
+ }
+
+ // get time first for more accuracy.
+ gettimeofday( &t, NULL );
+ tval = t.tv_sec*1000000UL + t.tv_usec;
+
+ // update last_end
+ accum->last_end = tval;
+
+ // make get elapsed time.
+ tval = tval - accum->timestamp;
+
+ // update min/max
+ accum->elapsed_max = tval > accum->elapsed_max ? tval : accum->elapsed_max;
+ accum->elapsed_min = tval < accum->elapsed_min ? tval : accum->elapsed_min;
+
+ if ( show )
+ MyPrintf("[ACCUM END] %s : %llu + %llu ---(%s:%d)\n", name, accum->elapsed_accum, tval, filename, line );
+
+ // add elapsed time
+ accum->elapsed_accum = accum->elapsed_accum + tval;
+ accum->on_estimate = 0;
+
+ return 0;
+}
+
+void __print_some_info(FILE* fp)
+{
+ if (!fp)
+ return;
+
+ // General infomation
+ {
+ time_t t_val;
+ char hostname[256] = {'\0',};
+#ifdef LINUX
+ struct utsname uts;
+ struct rusage r_usage;
+#endif
+ fprintf(fp, "\n[[ General info ]]\n");
+
+ // time and date
+ time(&t_val);
+ fprintf(fp, "Date : %s", ctime(&t_val) );
+
+ // system
+ if ( gethostname(hostname, 255) == 0 )
+ {
+ fprintf(fp, "Hostname : %s\n", hostname);
+ }
+#ifdef LINUX
+ if ( uname(&uts) >= 0 )
+ {
+ fprintf(fp, "System : %s\n", uts.sysname);
+ fprintf(fp, "Machine : %s\n", uts.machine);
+ fprintf(fp, "Nodename : %s\n", uts.nodename);
+ fprintf(fp, "Release : %s \n", uts.release);
+ fprintf(fp, "Version : %s \n", uts.version);
+ }
+
+ // process info.
+ fprintf(fp, "Process priority : %d\n", getpriority(PRIO_PROCESS, getpid()) );
+
+ getrusage(RUSAGE_SELF, &r_usage);
+ fprintf(fp, "CPU usage : User = %ld.%06ld, System = %ld.%06ld\n",
+ r_usage.ru_utime.tv_sec, r_usage.ru_utime.tv_usec,
+ r_usage.ru_stime.tv_sec, r_usage.ru_stime.tv_usec );
+#endif
+
+ }
+
+ // host environment variables
+ {
+ extern char** environ;
+ char** env = environ;
+
+ fprintf(fp, "\n[[ Host environment variables ]]\n");
+ while(*env)
+ {
+ fprintf(fp, "%s\n", *env);
+ env++;
+ }
+ }
+
+ fprintf(fp, "g_accum_first_time = %llu\n", g_accum_first_time);
+
+ fprintf(fp, "\n\n");
+
+}
+
+
+void mm_ta_accum_show_result_fp(FILE *fp)
+{
+ int i = 0;
+ char format[256];
+
+// __print_some_info(fp);
+
+
+ fprintf(fp, "============================ BEGIN RESULT ACCUM (usec) ====================\n");
+
+ snprintf(format, (size_t)sizeof(format), "[Idx] %%-%ds %%10s %%6s %%10s %%10s %%10s %%4s \n", g_accum_longest_name);
+
+ fprintf(fp, format, "Name", "avg", "hit", "total", "min", "max", "pair");
+
+ snprintf(format, (size_t)sizeof(format), "[%%3d] %%-%ds %%10llu %%6lu %%10llu %%10llu %%10llu %%4s \n", g_accum_longest_name);
+
+ for ( i = 0; i < g_accum_index; i++ )
+ {
+ // prevent 'devide by zero' error
+ if (g_accums[i]->num_calls == 0)
+ g_accums[i]->num_calls = 1;
+
+ fprintf(fp,
+ format,
+ i,
+ g_accums[i]->name,
+ (g_accums[i]->elapsed_accum == 0)?0:(g_accums[i]->elapsed_accum / g_accums[i]->num_calls), // Fix it! : devide by zero.
+ g_accums[i]->num_calls,
+ g_accums[i]->elapsed_accum,
+ g_accums[i]->elapsed_min,
+ g_accums[i]->elapsed_max,
+ g_accums[i]->num_unpair == 1 ? "F" : "T" );
+ }
+
+ fprintf(fp, "============================ END RESULT ACCUM ============================\n");
+
+ if ( fp != stdout && fp != stderr )
+ {
+ fclose(fp);
+ }
+}
+
+
+
+#ifdef STANDALONE
+int main(int argc, char* argv[])
+{
+ int a = 0, b = 0;
+
+
+ PERF_CHECK_BEGIN("Test 1");
+
+ for ( a = 0 ; a < 10; a++)
+ {
+ printf("AAA=%d\n", a);
+ usleep(1*10E6);
+ }
+
+ PERF_CHECK_END("Test 1");
+
+ printf("Test 111\n");
+ return 0;
+}
+#endif
+
+
+
diff --git a/debian/changelog b/debian/changelog
new file mode 100755
index 0000000..eec177b
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,8 @@
+ug-image-viewer-efl (1.4-14) unstable; urgency=low
+
+ * Initial version
+ * Git: pkgs/u/ug-image-viewer-efl.git
+ * Tag: ug-image-viewer-efl_1.4.14
+
+ -- Jisung Ahn <jcastle.ahn@samsung.com> Wed, 07 Dec 2011 15:01:09 +0900
+
diff --git a/debian/compat b/debian/compat
new file mode 100755
index 0000000..7ed6ff8
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100755
index 0000000..f274e0e
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,42 @@
+Source: ug-image-viewer-efl
+Section: misc
+Priority: extra
+Maintainer: Li Suxia <suxia.li@samsung.com>, Tang Feng <feng.tang@samsung.com>, Hyunwoo Kim <hw4444.kim@samsung.com>, Jisung Ahn <jcastle.ahn@samsung.com>, Sangjin Han <sjhan.han@samsung.com>
+Uploaders: Tang Feng <feng.tang@samsung.com>, Hyunwoo Kim <hw4444.kim@samsung.com>
+Build-Depends: debhelper (>= 5),
+ libelm-dev,
+ libedje-dev,
+ libevas-dev,
+ libecore-dev,
+ libslp-utilx-dev,
+ libmedia-service-dev,
+ libui-gadget-dev,
+ libaul-1-dev,
+ libmm-utility-dev,
+ libexif-dev,
+ libefreet-dev,
+ execstack,
+ libmm-fileinfo-dev,
+ libicu-dev,
+ dlog-dev,
+ libmm-common-dev,
+ libappcore-efl-dev,
+ libslp-pm-dev,
+ libappsvc-dev,
+ libvconf-dev,
+ libvconf-keys-dev,
+Standards-Version: 0.1.0
+
+Package: libug-image-viewer-efl
+Section: misc
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Image Viewer UI Gadget v1.0
+
+Package: libug-image-viewer-efl-dbg
+Section: debug
+Architecture: any
+Depends: ${misc:Depends}, libug-image-viewer-efl (= ${Source-Version})
+Description: Image Viewer UI Gadget(unstripped)
+
+
diff --git a/debian/libug-image-viewer-efl.install.in b/debian/libug-image-viewer-efl.install.in
new file mode 100755
index 0000000..1709ce6
--- /dev/null
+++ b/debian/libug-image-viewer-efl.install.in
@@ -0,0 +1,3 @@
+@PREFIX@/lib/*
+@PREFIX@/res/*
+@DATADIR@
diff --git a/debian/libug-image-viewer-efl.postinst b/debian/libug-image-viewer-efl.postinst
new file mode 100755
index 0000000..fb2a4cf
--- /dev/null
+++ b/debian/libug-image-viewer-efl.postinst
@@ -0,0 +1,8 @@
+#!/bin/sh
+# Create a directory to store image-viewer pictures and stuffs.
+
+if [ ${USER} == "root" ]
+then
+ chown 5000:5000 /opt/data/ug-image-viewer-efl
+fi
+
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..ed0233c
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,132 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+CFLAGS += -Wall -Wextra -g -fpie -fPIC -O0 -Wno-unused-parameter -Wno-missing-field-initializers -finstrument-functions
+CXXFLAGS += -Wall -Wextra -g -fpie -fPIC -O0 -Wno-unused-parameter -Wno-missing-field-initializers -finstrument-functions
+LDFLAGS += -Wl,-zdefs
+
+PREFIX ?= /opt/ug
+DATADIR ?= /opt/data
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+ CXXFLAGS += -O0
+else
+ CFLAGS += -O2
+ CXXFLAGS += -O2
+endif
+
+LDFLAGS += -Wl,--rpath,/usr/lib -Wl,--as-needed -Wl,--hash-style=both -pie
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ # Add here commands to configure the package.
+ CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake . -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DCMAKE_DATA_DIR=$(DATADIR)
+
+ touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ # Add here commands to compile the package.
+ $(MAKE)
+ #docbook-to-man debian/wavplayer.sgml > wavplayer.1
+
+ for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+ cat $$f > $${f%.in}; \
+ sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
+ sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
+ done
+
+
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ # Add here commands to clean up after the build process.
+ -$(MAKE) clean
+ rm -rf CMakeCache.txt
+ rm -rf CMakeFiles
+ rm -rf cmake_install.cmake
+ rm -rf Makefile
+ rm -rf install_manifest.txt
+ rm -rf *.so
+ rm -rf *.desktop
+ find -name CMakeFiles | xargs rm -rf
+ find -name cmake_install.cmake | xargs rm -rf
+ find -name Makefile | xargs rm -rf
+ find -name "*.cmake" | xargs rm -rf
+ find -name "*.edj" | xargs rm -rf
+
+ for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+ rm -f $${f%.in}; \
+ done
+
+ dh_clean
+
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/wavplayer.
+ $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+
+ execstack -c $(CURDIR)/debian/tmp/opt/ug/lib/libug-image-viewer-efl.so.0.1.0
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+
+# dh_installchangelogs
+# dh_installdocs
+ dh_installexamples
+ dh_install --sourcedir=debian/tmp --list-missing
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_python
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ dh_strip --dbg-package=libug-image-viewer-efl-dbg
+ dh_compress
+ dh_fixperms
+# dh_perl
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
+
+
diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt
new file mode 100755
index 0000000..776e475
--- /dev/null
+++ b/main/CMakeLists.txt
@@ -0,0 +1,182 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+SET(VERSION_MAJOR 0)
+SET(VERSION "${VERSION_MAJOR}.1.0")
+
+PROJECT(ug-image-viewer-efl C CXX)
+
+EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_SYSTEM_VERSION)
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+
+SET(SRCS
+# Entry point
+ src/ug-image-viewer.c
+
+# Common
+ src/common/ivug-config.c
+
+# View related
+ src/view/ivug-main-view.c
+ src/view/ivug-setas-view.c
+ src/view/ivug-detail-info.c
+ src/view/ivug-details-view.c
+ src/view/ivug-popup.c
+ src/view/ivug-slider.c
+ src/view/ivug-slider-item.c
+ src/view/ivug-slider-slideshow.c
+ src/view/ivug-slider-mouse.c
+
+# Control related
+ src/control/ivug-uuid.c
+ src/control/ivug-parameter.c
+ src/control/ivug-ext-ug.c
+ src/control/ivug-main.c
+
+# Helper files
+ src/util/ivug-util.c
+ src/util/ivug-file-info.c
+ src/util/ivug-widget.c
+ src/util/ivug-listpopup.c
+
+# Data & List management
+ src/data/ivug-data.c
+ src/data/ivug-data-list.c
+ src/data/ivug-data-shuffle.c
+ src/data/ivug-mediadata.c
+ src/data/ivug-data-filter.c
+
+# Effect files
+ src/effect/ivug-effect.c
+ src/effect/ivug-slide.c
+ src/effect/ivug-anim.c
+)
+
+# message("System = ${CMAKE_SYSTEM_VERSION}")
+
+INCLUDE_DIRECTORIES(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_SOURCE_WIDGET_DIR}/include
+ ${CMAKE_SOURCE_COMMON_DIR}/include
+ src
+ src/common
+ src/view
+ src/util
+ src/control
+ src/widget
+ src/data
+ src/effect/include
+)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED
+ elementary
+ edje
+ evas
+ eina
+ dlog
+ ecore
+ ecore-file
+ ecore-imf
+ ecore-input
+ ecore-x
+ ecore-evas
+ efreet-mime
+ utilX
+ ui-gadget
+ libmedia-service
+ aul
+ libexif
+ appcore-efl
+ appcore-common
+ bundle
+ mm-fileinfo
+ icu-i18n
+ icu-io
+ icu-le
+ icu-lx
+ icu-uc
+ pmapi
+ appsvc
+ vconf
+)
+
+
+FOREACH(flag ${pkgs_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${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})
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DUG_MODULE_API=__attribute__ \(\(visibility\(\"default\"\)\)\)")
+ADD_DEFINITIONS("-DPACKAGE=\"${PROJECT_NAME}\"")
+ADD_DEFINITIONS("-DDATADIR=\"${CMAKE_DATA_DIR}\"")
+#ADD_DEFINITIONS("-D_USE_MEDIAINFO_STRINGID_")
+
+#ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
+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 INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME}
+ ${pkgs_LDFLAGS} ${armpkgs_LDFLAGS}
+ -ldl
+ ivug_common
+)
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
+
+FUNCTION (BUILD_EDJ _in _out _base _dir)
+ ADD_CUSTOM_TARGET(${_out}
+ COMMAND
+ edje_cc -id ${_base}/${_dir}
+ ${CMAKE_CURRENT_SOURCE_DIR}/${_base}/${_in}
+ ${CMAKE_CURRENT_SOURCE_DIR}/${_base}/${_out}
+ DEPENDS
+ ${CMAKE_CURRENT_SOURCE_DIR}/${_base}/${_in}
+ )
+ ADD_DEPENDENCIES(${PROJECT_NAME} ${_out})
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${_base}/${_out} DESTINATION ${CMAKE_INSTALL_PREFIX}/res/edje/${PROJECT_NAME})
+ENDFUNCTION (BUILD_EDJ)
+
+
+# Build edc files
+BUILD_EDJ(ivug-base.edc ivug-base.edj layout images)
+BUILD_EDJ(ivug-main.edc ivug-main.edj layout images)
+BUILD_EDJ(ivug-icons.edc ivug-icons.edj layout icons)
+BUILD_EDJ(ivug-setas.edc ivug-setas.edj layout images)
+BUILD_EDJ(ivug-naviframe.edc ivug-naviframe.edj layout images/gray-theme)
+BUILD_EDJ(ivug-toolbar.edc ivug-toolbar.edj layout images/gray-theme)
+BUILD_EDJ(ivug-button.edc ivug-button.edj layout images/gray-theme)
+BUILD_EDJ(ivug-effect.edc ivug-effect.edj layout images)
+BUILD_EDJ(ivug-slider.edc ivug-slider.edj layout icons)
+BUILD_EDJ(ivug-details.edc ivug-details.edj layout images)
+BUILD_EDJ(ivug-selectioninfo.edc ivug-selectioninfo.edj layout images)
+BUILD_EDJ(ivug-genlist.edc ivug-genlist.edj layout/genlist images/gray-theme)
+
+# Install image files.
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/images/ DESTINATION ${CMAKE_INSTALL_PREFIX}/res/images/${PROJECT_NAME})
+
+#
+INSTALL(DIRECTORY DESTINATION ${CMAKE_DATA_DIR}/${PROJECT_NAME})
+
+# i18n
+ADD_SUBDIRECTORY(res/po)
diff --git a/main/NOTICE b/main/NOTICE
new file mode 100755
index 0000000..ded3804
--- /dev/null
+++ b/main/NOTICE
@@ -0,0 +1 @@
+Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. \ No newline at end of file
diff --git a/main/layout/genlist/genlist_group_index.edc b/main/layout/genlist/genlist_group_index.edc
new file mode 100755
index 0000000..2891049
--- /dev/null
+++ b/main/layout/genlist/genlist_group_index.edc
@@ -0,0 +1,116 @@
+/*
+ * 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_FONT_INDEX_LIST_COLOR_INC 240 240 240 255
+#define GENLIST_DIALOGUE_GROUP_BG_COLOR_INC 15 15 15 255
+
+#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;
+ }
+ }
+ }
+ }
+ 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";
+ }
+ }
+
diff --git a/main/layout/genlist/genlist_macro.edc b/main/layout/genlist/genlist_macro.edc
new file mode 100755
index 0000000..879d0f2
--- /dev/null
+++ b/main/layout/genlist/genlist_macro.edc
@@ -0,0 +1,847 @@
+/*
+ * 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_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; \
+ } \
+ }
+
+#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; } \
+ } \
+ }
+
+#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; \
+ } \
+ }
+
+#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; \
+ } \
+ }
+
+#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; \
+ } \
+ } \
+ }
+
+/* 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_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; \
+ } \
+ }
+
+#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); \
+ }
+
+#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_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"; \
+ }
+
+#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"; \
+ }
+
+#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"; \
+ }
+
+#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"; \
+ }
+
+#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"; \
+ }
+
diff --git a/main/layout/genlist/genlist_size.edc b/main/layout/genlist/genlist_size.edc
new file mode 100755
index 0000000..73c285a
--- /dev/null
+++ b/main/layout/genlist/genlist_size.edc
@@ -0,0 +1,136 @@
+/*
+ * 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 */
+
+#define GENLIST_HEIGHT_1_INC 1
+#define GENLIST_HEIGHT_16_INC 16
+#define GENLIST_HEIGHT_33_INC 33
+#define GENLIST_HEIGHT_49_INC 49
+#define GENLIST_HEIGHT_62_INC 62
+#define GENLIST_HEIGHT_65_INC 65
+#define GENLIST_HEIGHT_72_INC 72
+#define GENLIST_HEIGHT_73_INC 73
+#define GENLIST_HEIGHT_77_INC 77
+#define GENLIST_HEIGHT_89_INC 89
+#define GENLIST_HEIGHT_93_INC 93
+#define GENLIST_HEIGHT_97_INC 97
+#define GENLIST_HEIGHT_113_INC 113
+#define GENLIST_HEIGHT_129_INC 129
+#define GENLIST_HEIGHT_177_INC 177
+#define GENLIST_HEIGHT_182_INC 182
+#define GENLIST_HEIGHT_190_INC 190
+#define GENLIST_HEIGHT_207_INC 207
+#define GENLIST_HEIGHT_260_INC 260
+#define GENLIST_HEIGHT_291_INC 291
+#define GENLIST_HEIGHT_454_INC 454
+#define GENLIST_HEIGHT_566_INC 566
+
+#define GENLIST_PADDING_4_INC 4
+#define GENLIST_PADDING_5_INC 5
+#define GENLIST_PADDING_6_INC 6
+#define GENLIST_PADDING_8_INC 8
+#define GENLIST_PADDING_10_INC 10
+#define GENLIST_PADDING_11_INC 11
+#define GENLIST_PADDING_12_INC 12
+#define GENLIST_PADDING_13_INC 13
+#define GENLIST_PADDING_14_INC 14
+#define GENLIST_PADDING_16_INC 16
+#define GENLIST_PADDING_18_INC 18
+#define GENLIST_PADDING_21_INC 21
+#define GENLIST_PADDING_22_INC 22
+#define GENLIST_PADDING_24_INC 24
+#define GENLIST_PADDING_27_INC 27
+#define GENLIST_PADDING_32_INC 32
+#define GENLIST_PADDING_34_INC 34
+#define GENLIST_PADDING_46_INC 46
+#define GENLIST_PADDING_48_INC 48
+#define GENLIST_PADDING_64_INC 64
+#define GENLIST_PADDING_74_INC 74
+#define GENLIST_PADDING_88_INC 88
+#define GENLIST_PADDING_124_INC 124
+
+#define GENLIST_FONT_20_INC 20
+#define GENLIST_FONT_27_INC 27
+#define GENLIST_FONT_28_INC 28
+#define GENLIST_FONT_30_INC 30
+#define GENLIST_FONT_32_INC 32
+#define GENLIST_FONT_STYLE_32_INC "32"
+#define GENLIST_FONT_36_INC 36
+#define GENLIST_FONT_STYLE_36_INC "36"
+#define GENLIST_FONT_40_INC 40
+#define GENLIST_FONT_STYLE_40_INC "40"
+#define GENLIST_FONT_42_INC 42
+#define GENLIST_FONT_STYLE_42_INC "42"
+#define GENLIST_FONT_44_INC 44
+#define GENLIST_FONT_STYLE_44_INC "44"
+#define GENLIST_FONT_48_INC 48
+#define GENLIST_FONT_STYLE_48_INC "48"
+
+#define GENLIST_SIZE_6_INC 6
+#define GENLIST_SIZE_8_INC 8
+#define GENLIST_SIZE_10_INC 10
+#define GENLIST_SIZE_13_INC 13
+#define GENLIST_SIZE_16_INC 16
+#define GENLIST_SIZE_18_INC 18
+#define GENLIST_SIZE_21_INC 21
+#define GENLIST_SIZE_26_INC 26
+#define GENLIST_SIZE_32_INC 32
+#define GENLIST_SIZE_35_INC 35
+#define GENLIST_SIZE_38_INC 38
+#define GENLIST_SIZE_40_INC 40
+#define GENLIST_SIZE_42_INC 42
+#define GENLIST_SIZE_45_INC 45
+#define GENLIST_SIZE_48_INC 48
+#define GENLIST_SIZE_54_INC 54
+#define GENLIST_SIZE_56_INC 56
+#define GENLIST_SIZE_57_INC 57
+#define GENLIST_SIZE_61_INC 61
+#define GENLIST_SIZE_SLIDE_60_INC 60
+#define GENLIST_SIZE_64_INC 64
+#define GENLIST_SIZE_80_INC 80
+#define GENLIST_SIZE_90_INC 90
+#define GENLIST_SIZE_96_INC 96
+#define GENLIST_SIZE_112_INC 112
+#define GENLIST_SIZE_116_INC 116
+#define GENLIST_SIZE_128_INC 128
+#define GENLIST_SIZE_133_INC 133
+#define GENLIST_SIZE_141_INC 141
+#define GENLIST_SIZE_144_INC 144
+#define GENLIST_SIZE_154_INC 154
+#define GENLIST_SIZE_160_INC 160
+#define GENLIST_SIZE_163_INC 163
+#define GENLIST_SIZE_168_INC 168
+#define GENLIST_SIZE_174_INC 174
+#define GENLIST_SIZE_SLIDE_165_INC 165
+#define GENLIST_SIZE_176_INC 176
+#define GENLIST_SIZE_177_INC 177
+#define GENLIST_SIZE_192_INC 192
+#define GENLIST_SIZE_195_INC 195
+#define GENLIST_SIZE_206_INC 206
+#define GENLIST_SIZE_234_INC 234
+#define GENLIST_SIZE_235_INC 235
+#define GENLIST_SIZE_SLIDE_220_INC 220
+#define GENLIST_SIZE_390_INC 390
+#define GENLIST_SIZE_448_INC 448
+#define GENLIST_SIZE_560_INC 560
+#define GENLIST_SIZE_576_INC 576
+#define GENLIST_SIZE_672_INC 672
+
+#define GENLIST_TREESIZE_16_INC 16
+#define GENLIST_TREESIZE_32_INC 32
+
diff --git a/main/layout/genlist/genlist_styles.edc b/main/layout/genlist/genlist_styles.edc
new file mode 100755
index 0000000..4eeeca9
--- /dev/null
+++ b/main/layout/genlist/genlist_styles.edc
@@ -0,0 +1,262 @@
+/*
+ * 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";
+ 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";
+ data.item: "texts" "elm.text.1 elm.text.2";
+ data.item: "renames" "elm.edit.rename";
+ images {
+ //image: "00_list_bar_press_1x80.png" COMP;
+ }
+ parts {
+ GENLIST_PART_BASE( GENLIST_HEIGHT_72_INC )
+ GENLIST_PART_BG_IMAGE
+ 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;
+ }
+ }
+ 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;
+ }
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ color: GENLIST_PART_TEXT_PRESS_COLOR_INC;
+ }
+ GENLIST_DESCRIPTION_FLIP_ENABLED
+ }
+ 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
+ }
+ }
+
+ group { name: "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";
+ data.item: "texts" "elm.text.1 elm.text.2";
+ 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_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;
+ }
+ }
+ 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_flexible_style";
+ min: 0 1;
+ align: 0.0 0.5;
+ }
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ text.style: "genlist_textblock_flexible_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";
+ }
+ }
+ }
+
diff --git a/main/layout/genlist/genlist_textblock_styles.edc b/main/layout/genlist/genlist_textblock_styles.edc
new file mode 100755
index 0000000..02ac574
--- /dev/null
+++ b/main/layout/genlist/genlist_textblock_styles.edc
@@ -0,0 +1,111 @@
+/*
+ * 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 */
+#define GENLIST_PART_TEXT_PRESS_STYLE_COLOR_INC "#F9F9F9FF"
+#define GENLIST_PART_MATCH_TAG_COLOR_INC "+ color=#3F8DAD"
+
+#define GENLIST_PART_FONT_LIST_MAIN_TEXT_UNREAD_STYLE_COLOR_INC "#F9F9F9FF"
+#define GENLIST_PART_FONT_LIST_SUB_TEXT_STYLE_COLOR_INC "#646464FF"
+#define GENLIST_PART_FONT_FLEXIBLE_TEXT_MAIN_STYLE_COLOR_INC "#F9F9F9FF"
+#define GENLIST_PART_FONT_FLEXIBLE_TEXT_SUB_STYLE_COLOR_INC "#959595FF"
+#define GENLIST_PART_FONT_MULTILINE_TEXT_STYLE_COLOR_INC "#959595FF"
+#define GENLIST_PART_FONT_3LINE_MAIN_TEXT_READ_STYLE_COLOR_INC "#F9F9F9FF"
+#define GENLIST_PART_FONT_3LINE_MAIN_TEXT_UNREAD_STYLE_COLOR_INC "#F9F9F9FF"
+#define GENLIST_PART_FONT_3LINE_MAIN_TEXT_FOCUS_STYLE_COLOR_INC "#F9F9F9FF"
+#define GENLIST_PART_FONT_3LINE_MAIN_TEXT_2_STYLE_COLOR_INC "#F9F9F9FF"//"#688998FF"
+#define GENLIST_PART_FONT_3LINE_MAIN_TEXT_2_FOCUS_STYLE_COLOR_INC "#F9F9F9FF"
+#define GENLIST_PART_FONT_HELP_TEXT_STYLE_COLOR_INC "#929292FF"
+
+#define 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";
+ 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=list_item 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=list_item 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=list_item 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=list_item 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=list_item";
+ 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=list_item";
+ 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=list_item";
+ 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=list_item";
+ 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=list_item";
+ 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=list_item";
+ 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=list_item";// 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=list_item";
+ 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=list_item";
+ 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=list_item";
+ 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=list_item";
+ TEXTBLOCK_TAG
+ }
+}
+
diff --git a/main/layout/genlist/ivug-genlist.edc b/main/layout/genlist/ivug-genlist.edc
new file mode 100755
index 0000000..f9d527b
--- /dev/null
+++ b/main/layout/genlist/ivug-genlist.edc
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#define GENLIST_PART_BG_COLOR_INC 0 0 0 0
+
+#define GENLIST_PART_FONT_LIST_SUB_TEXT_COLOR_INC 249 249 249 255
+#define GENLIST_PART_TEXT_PRESS_COLOR_INC 249 249 249 255
+
+#define GENLIST_PART_FONT_LIST_MAIN_TEXT_UNREAD_COLOR_INC 100 100 100 255
+
+#define GENLIST_PART_DISCLIP_COLOR_INC 255 255 255 64
+
+/* 1.0 */
+#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
+
+collections {
+
+#include "genlist_size.edc"
+#include "genlist_macro.edc"
+
+#include "genlist_textblock_styles.edc"
+#include "genlist_styles.edc"
+#include "genlist_group_index.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
new file mode 100755
index 0000000..43c4984
--- /dev/null
+++ b/main/layout/icons/01_Header icon/01_header_icon_add.png
Binary files differ
diff --git a/main/layout/icons/01_Header icon/01_header_icon_cancel.png b/main/layout/icons/01_Header icon/01_header_icon_cancel.png
new file mode 100755
index 0000000..4fb54c3
--- /dev/null
+++ b/main/layout/icons/01_Header icon/01_header_icon_cancel.png
Binary files differ
diff --git a/main/layout/icons/01_Header icon/01_header_icon_done.png b/main/layout/icons/01_Header icon/01_header_icon_done.png
new file mode 100755
index 0000000..d771640
--- /dev/null
+++ b/main/layout/icons/01_Header icon/01_header_icon_done.png
Binary files 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
new file mode 100755
index 0000000..ea2535d
--- /dev/null
+++ b/main/layout/icons/01_Header icon/01_header_icon_edit.png
Binary files 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
new file mode 100755
index 0000000..4fc9dfa
--- /dev/null
+++ b/main/layout/icons/01_Header icon/01_header_icon_others.png
Binary files differ
diff --git a/main/layout/icons/T01_btn_play.png b/main/layout/icons/T01_btn_play.png
new file mode 100755
index 0000000..a19a8e0
--- /dev/null
+++ b/main/layout/icons/T01_btn_play.png
Binary files differ
diff --git a/main/layout/images/00_zoom_in.png b/main/layout/images/00_zoom_in.png
new file mode 100755
index 0000000..3685b2c
--- /dev/null
+++ b/main/layout/images/00_zoom_in.png
Binary files differ
diff --git a/main/layout/images/00_zoom_in_press.png b/main/layout/images/00_zoom_in_press.png
new file mode 100755
index 0000000..2eb645f
--- /dev/null
+++ b/main/layout/images/00_zoom_in_press.png
Binary files differ
diff --git a/main/layout/images/00_zoom_out.png b/main/layout/images/00_zoom_out.png
new file mode 100755
index 0000000..03e0e96
--- /dev/null
+++ b/main/layout/images/00_zoom_out.png
Binary files differ
diff --git a/main/layout/images/00_zoom_out_press.png b/main/layout/images/00_zoom_out_press.png
new file mode 100755
index 0000000..7e29dc9
--- /dev/null
+++ b/main/layout/images/00_zoom_out_press.png
Binary files differ
diff --git a/main/layout/images/T01_btn_cancel.png b/main/layout/images/T01_btn_cancel.png
new file mode 100755
index 0000000..051ff04
--- /dev/null
+++ b/main/layout/images/T01_btn_cancel.png
Binary files differ
diff --git a/main/layout/images/T01_btn_cancel_press.png b/main/layout/images/T01_btn_cancel_press.png
new file mode 100755
index 0000000..32f7e76
--- /dev/null
+++ b/main/layout/images/T01_btn_cancel_press.png
Binary files differ
diff --git a/main/layout/images/T01_btn_ok.png b/main/layout/images/T01_btn_ok.png
new file mode 100755
index 0000000..adb15aa
--- /dev/null
+++ b/main/layout/images/T01_btn_ok.png
Binary files differ
diff --git a/main/layout/images/T01_btn_ok_dim.png b/main/layout/images/T01_btn_ok_dim.png
new file mode 100755
index 0000000..9cc983b
--- /dev/null
+++ b/main/layout/images/T01_btn_ok_dim.png
Binary files differ
diff --git a/main/layout/images/T01_btn_ok_press.png b/main/layout/images/T01_btn_ok_press.png
new file mode 100755
index 0000000..4a59cfd
--- /dev/null
+++ b/main/layout/images/T01_btn_ok_press.png
Binary files differ
diff --git a/main/layout/images/T01_btn_thumbnail_play.png b/main/layout/images/T01_btn_thumbnail_play.png
new file mode 100755
index 0000000..2ea3599
--- /dev/null
+++ b/main/layout/images/T01_btn_thumbnail_play.png
Binary files differ
diff --git a/main/layout/images/gray-theme/00_winset_btn_prev.png b/main/layout/images/gray-theme/00_winset_btn_prev.png
new file mode 100755
index 0000000..15b43b0
--- /dev/null
+++ b/main/layout/images/gray-theme/00_winset_btn_prev.png
Binary files differ
diff --git a/main/layout/images/gray-theme/I01_control_top_bg.png b/main/layout/images/gray-theme/I01_control_top_bg.png
new file mode 100755
index 0000000..287ef80
--- /dev/null
+++ b/main/layout/images/gray-theme/I01_control_top_bg.png
Binary files differ
diff --git a/main/layout/images/gray-theme/T01_Option_header_bt.png b/main/layout/images/gray-theme/T01_Option_header_bt.png
new file mode 100755
index 0000000..3c6987f
--- /dev/null
+++ b/main/layout/images/gray-theme/T01_Option_header_bt.png
Binary files differ
diff --git a/main/layout/images/gray-theme/T01_Option_header_bt_dim.png b/main/layout/images/gray-theme/T01_Option_header_bt_dim.png
new file mode 100755
index 0000000..501d9e8
--- /dev/null
+++ b/main/layout/images/gray-theme/T01_Option_header_bt_dim.png
Binary files differ
diff --git a/main/layout/images/gray-theme/T01_Option_header_bt_press.png b/main/layout/images/gray-theme/T01_Option_header_bt_press.png
new file mode 100755
index 0000000..978107c
--- /dev/null
+++ b/main/layout/images/gray-theme/T01_Option_header_bt_press.png
Binary files differ
diff --git a/main/layout/images/gray-theme/T01_btn_prev.png b/main/layout/images/gray-theme/T01_btn_prev.png
new file mode 100755
index 0000000..ccaf337
--- /dev/null
+++ b/main/layout/images/gray-theme/T01_btn_prev.png
Binary files differ
diff --git a/main/layout/images/gray-theme/T01_control_top_arrow.png b/main/layout/images/gray-theme/T01_control_top_arrow.png
new file mode 100755
index 0000000..3f2ee50
--- /dev/null
+++ b/main/layout/images/gray-theme/T01_control_top_arrow.png
Binary files differ
diff --git a/main/layout/images/gray-theme/T01_control_top_bg.png b/main/layout/images/gray-theme/T01_control_top_bg.png
new file mode 100755
index 0000000..e7b5045
--- /dev/null
+++ b/main/layout/images/gray-theme/T01_control_top_bg.png
Binary files differ
diff --git a/main/layout/images/gray-theme/T01_title_btn.png b/main/layout/images/gray-theme/T01_title_btn.png
new file mode 100755
index 0000000..20c31f1
--- /dev/null
+++ b/main/layout/images/gray-theme/T01_title_btn.png
Binary files differ
diff --git a/main/layout/images/gray-theme/T01_title_btn_press.png b/main/layout/images/gray-theme/T01_title_btn_press.png
new file mode 100755
index 0000000..49861ed
--- /dev/null
+++ b/main/layout/images/gray-theme/T01_title_btn_press.png
Binary files differ
diff --git a/main/layout/images/gray-theme/T01_toolbar_bg.png b/main/layout/images/gray-theme/T01_toolbar_bg.png
new file mode 100755
index 0000000..e02c6c6
--- /dev/null
+++ b/main/layout/images/gray-theme/T01_toolbar_bg.png
Binary files differ
diff --git a/main/layout/images/gray-theme/T01_toolbar_press.png b/main/layout/images/gray-theme/T01_toolbar_press.png
new file mode 100755
index 0000000..703cc05
--- /dev/null
+++ b/main/layout/images/gray-theme/T01_toolbar_press.png
Binary files differ
diff --git a/main/layout/images/gray-theme/magnifier.png b/main/layout/images/gray-theme/magnifier.png
new file mode 100755
index 0000000..4ae3188
--- /dev/null
+++ b/main/layout/images/gray-theme/magnifier.png
Binary files differ
diff --git a/main/layout/images/gray-theme/magnifier_line.png b/main/layout/images/gray-theme/magnifier_line.png
new file mode 100755
index 0000000..c4dd14c
--- /dev/null
+++ b/main/layout/images/gray-theme/magnifier_line.png
Binary files differ
diff --git a/main/layout/images/gray-theme/magnifier_noarrow.png b/main/layout/images/gray-theme/magnifier_noarrow.png
new file mode 100755
index 0000000..7cbd2a7
--- /dev/null
+++ b/main/layout/images/gray-theme/magnifier_noarrow.png
Binary files differ
diff --git a/main/layout/images/gray-theme/magnifier_noarrow_line.png b/main/layout/images/gray-theme/magnifier_noarrow_line.png
new file mode 100755
index 0000000..fcfdb10
--- /dev/null
+++ b/main/layout/images/gray-theme/magnifier_noarrow_line.png
Binary files differ
diff --git a/main/layout/images/gray-theme/reader_handler_down.png b/main/layout/images/gray-theme/reader_handler_down.png
new file mode 100755
index 0000000..8e95761
--- /dev/null
+++ b/main/layout/images/gray-theme/reader_handler_down.png
Binary files differ
diff --git a/main/layout/images/gray-theme/reader_handler_up.png b/main/layout/images/gray-theme/reader_handler_up.png
new file mode 100755
index 0000000..172e2a3
--- /dev/null
+++ b/main/layout/images/gray-theme/reader_handler_up.png
Binary files differ
diff --git a/main/layout/images/gray-theme/reader_longtap_blue.png b/main/layout/images/gray-theme/reader_longtap_blue.png
new file mode 100755
index 0000000..16df225
--- /dev/null
+++ b/main/layout/images/gray-theme/reader_longtap_blue.png
Binary files differ
diff --git a/main/layout/ivug-base.edc b/main/layout/ivug-base.edc
new file mode 100755
index 0000000..fae85c6
--- /dev/null
+++ b/main/layout/ivug-base.edc
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+collections {
+ group {
+ name: "ivug_base";
+ parts {
+ part {
+ name: "indication";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 0.0; }
+ min: 0 0;
+ fixed: 0 1;
+ align: 0.5 0.0;
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "clip";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 1.0; to_y: "indication";}
+ rel2 { relative: 1.0 1.0; }
+ }
+ }
+ part {
+ name: "elm.swallow.content";
+ type: SWALLOW;
+ mouse_events: 1;
+ repeat_events: 0;
+ scale: 1;
+ clip_to: "clip";
+ description {
+ rel1.to: "clip";
+ rel2.to: "clip";
+ }
+ }
+ }
+ }
+}
diff --git a/main/layout/ivug-button.edc b/main/layout/ivug-button.edc
new file mode 100755
index 0000000..19fb76d
--- /dev/null
+++ b/main/layout/ivug-button.edc
@@ -0,0 +1,1332 @@
+/*
+ * 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 BUTTON_STATE_ENABLED 0
+#define BUTTON_STATE_DISABLED 1
+
+#define NAVIBAR_PREV_BUTTON_LEFT_SEPARATOR_COLOR_INC 3 3 3 255
+#define NAVIBAR_PREV_BUTTON_RIGHT_SEPARATOR_COLOR_INC 52 52 52 255
+
+/* Default black themem text color
+#define BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC 78 73 69 255
+*/
+#define BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC 255 255 255 255
+#define BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC 255 255 255 255
+#define BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC 255 255 255 255
+#define BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC 185 185 185 255
+
+#define BUTTON_TEXT_STYLE1_BG_MIN_INC 100 74
+#define BUTTON_TEXT_STYLE1_VISIBLE_BG_MIN_INC 148 74
+#define BUTTON_TEXT_STYLE1_ICONONLY_BG_MIN_INC 74 74
+#define BUTTON_TEXT_STYLE1_BG_BORDER_INC 5 5 5 5
+#define BUTTON_TEXT_STYLE1_PADDING_MIN_INC 5 5
+#define BUTTON_TEXT_STYLE1_VISIBLE_ICON_RECT_MIN_MAX_INC 38 38
+#define BUTTON_TEXT_STYLE1_VISIBLE_PADDING_ICON_TEXT_MIN_INC 10 0
+#define BUTTON_TEXT_STYLE1_VISIBLE_ICON_MIN_MAX_INC 38 38
+#define BUTTON_TEXT_STYLE1_ICONONLY_ICON_MIN_MAX_INC 38 38
+#define BUTTON_TEXT_STYLE1_FONT_SIZE_INC 28
+
+#define BUTTON_NAVIBAR_FUNCTION_BUTTON_TEXT_DISABLED_COLOR_INC 160 151 145 255
+
+#define BUTTON_NAVIBAR_CENTER_BG_NORMAL_MIN_W_INC 36
+#define BUTTON_NAVIBAR_CENTER_BG_NORMAL_MIN_H_INC 74
+#define BUTTON_NAVIBAR_CENTER_BG_NORMAL_BORDER_INC 5 5 5 5
+
+#define BUTTON_NAVIBAR_CENTER_PADDING_MIN_MAX_INC 16 2
+#define BUTTON_NAVIBAR_CENTER_ICON_RECT_VISIBLE_MIN_SIZE 36 36
+#define BUTTON_NAVIBAR_CENTER_PADDING_AFTER_ICON_VISIBLE_MIN_INC 6 0
+
+#define BUTTON_NAVIBAR_CENTER_PADDING_BEFORE_TEXT_DEFAULT_MIN_INC 6 0
+
+#define BUTTON_NAVIBAR_BACK_BUTTON_BUTTON_IMAGE_MIN_INC 106 40
+#define BUTTON_NAVIBAR_BACK_BUTTON_BG_MIN_MAX_INC 36 32
+
+#define BUTTON_NAVIBAR_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC 36 36
+#define BUTTON_NAVIBAR_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC 38 38
+
+#define BUTTON_NAVIBAR_CENTER_TEXT_FONT_SIZE_INC 32
+
+#define NAVIBAR_TITLE_RIGHT_SEPARATOR_COLOR_INC 69 87 94 0
+#define NAVIBAR_TITLE_LEFT_SEPARATOR_COLOR_INC 0 15 30 0
+
+
+#define IV_EDC_IMAGE_OPTION_HEADER_BT "T01_Option_header_bt.png"
+#define IV_EDC_IMAGE_OPTION_HEADER_BT_DIM "T01_Option_header_bt_dim.png"
+#define IV_EDC_IMAGE_OPTION_HEADER_BT_PRESS "T01_Option_header_bt_press.png"
+
+#define IV_EDC_IMAGE_NAVIFRAME_MORE_BT "T01_title_btn.png"
+#define IV_EDC_IMAGE_NAVIFRAME_MORE_BT_DIM "T01_title_btn.png"
+#define IV_EDC_IMAGE_NAVIFRAME_MORE_BT_PRESS "T01_title_btn_press.png"
+
+#define IV_EDC_IMAGE_BTN_PREV "T01_btn_prev.png"
+#define IV_EDC_IMAGE_BTN_PREV_PRESS "00_winset_btn_prev.png" /* TODO: Replace with T01_XXX image */
+
+#define IV_EDC_OPTION_HEADER_BT_TEXT_COLOR_INC 255 255 255 255
+
+#define BUTTON_MULTILINE_TEXT_FONT_SIZE_INC 32 /* */
+
+collections {
+
+///////////////////////////////////////////////////////////////////////////////////////
+ group { name: "elm/button/base/style1";
+ alias: "elm/button/base/text_only/style1";
+ alias: "elm/button/base/center";
+ alias: "elm/button/base/icon_and_text/center";
+ alias: "elm/button/base/nocontents/search_button";
+ alias: "elm/button/base/naviframe/title/default";
+ images {
+ image: IV_EDC_IMAGE_NAVIFRAME_MORE_BT COMP;
+ image: IV_EDC_IMAGE_NAVIFRAME_MORE_BT_DIM COMP;
+ image: IV_EDC_IMAGE_NAVIFRAME_MORE_BT_PRESS COMP;
+ }
+ script {
+ public button_state = BUTTON_STATE_ENABLED;
+ }
+ parts {
+ part { name: "button_image";
+ scale: 1;
+ description { state: "default" 0.0;
+ image {
+ normal: IV_EDC_IMAGE_NAVIFRAME_MORE_BT;
+ border: BUTTON_TEXT_STYLE1_BG_BORDER_INC;
+ border_scale: 1;
+ }
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: IV_EDC_IMAGE_NAVIFRAME_MORE_BT_PRESS;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: IV_EDC_IMAGE_NAVIFRAME_MORE_BT_DIM;
+ }
+ }
+ description { state: "focused" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: IV_EDC_IMAGE_NAVIFRAME_MORE_BT_PRESS;
+ }
+ }
+ }
+ part { name: "padding_left_top";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel2 {
+ relative: 0.0 0.0;
+ }
+ min: BUTTON_TEXT_STYLE1_PADDING_MIN_INC;
+ fixed: 1 1;
+ visible: 0;
+ }
+ }
+ part { name: "bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ min: BUTTON_TEXT_STYLE1_BG_MIN_INC;
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: BUTTON_TEXT_STYLE1_VISIBLE_BG_MIN_INC;
+ }
+ description { state: "icononly" 0.0;
+ inherit: "default" 0.0;
+ min: BUTTON_TEXT_STYLE1_ICONONLY_BG_MIN_INC;
+ }
+ }
+ part { name: "padding_right_bottom";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 1.0 1.0;
+ rel1 {
+ relative: 1.0 1.0;
+ }
+ min: BUTTON_TEXT_STYLE1_PADDING_MIN_INC;
+ fixed: 1 1;
+ visible: 0;
+ }
+ }
+ part { name: "icon_rect";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 0;
+ min: 0 0;
+ fixed: 1 0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 1.0 0.0;
+ to_x: "padding_left_top";
+ to_y: "padding_right_bottom";
+ }
+ align: 0.0 0.5;
+ }
+ description { state: "visible" 0.0;
+ visible: 0;
+ min: BUTTON_TEXT_STYLE1_VISIBLE_ICON_RECT_MIN_MAX_INC;
+ max: BUTTON_TEXT_STYLE1_VISIBLE_ICON_RECT_MIN_MAX_INC;
+ fixed: 1 0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 1.0 0.0;
+ to_x: "padding_left_top";
+ to_y: "padding_right_bottom";
+ }
+ align: 0.0 0.5;
+ }
+ description { state: "icononly" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ part { name: "padding_after_icon";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0; //when only icon or no icon is there
+ align: 0.0 0.0;
+ rel1 {
+ relative: 1.0 0.0;
+ to: "icon_rect";
+ }
+ rel2 {
+ to: "icon_rect";
+ }
+ fixed: 1 0;
+ min: 0 0;
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ visible: 0;
+ align: 0.0 0.0;
+ rel1 {
+ relative: 1.0 0.0;
+ to: "icon_rect";
+ }
+ rel2 {
+ to: "icon_rect";
+ }
+ fixed: 1 0;
+ min: BUTTON_TEXT_STYLE1_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
+ }
+ description { state: "icononly" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ part { name: "padding_before_text";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0; //when only icon or no icon is there
+ align: 1.0 0.5;
+ rel1 {
+ relative: 0.0 1.0;
+ to_x: "elm.text";
+ to_y: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "elm.text";
+ to_y: "padding_right_bottom";
+ }
+ fixed: 1 0;
+ min: BUTTON_TEXT_STYLE1_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
+ visible: 0;
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "clipper";
+ description { state: "default" 0.0;
+ visible: 0;
+ align: 0.0 0.5;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 1.0 0.0;
+ to_x: "padding_left_top";
+ to_y: "padding_right_bottom";
+ }
+ fixed: 1 0;
+ }
+ description { state: "visible" 0.0;
+ fixed: 1 0;
+ min: BUTTON_TEXT_STYLE1_VISIBLE_ICON_MIN_MAX_INC;
+ max: BUTTON_TEXT_STYLE1_VISIBLE_ICON_MIN_MAX_INC;
+ align: 1.0 0.5;
+ rel1 {
+ relative: 0.0 1.0;
+ to_x: "padding_before_text";
+ to_y: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "padding_before_text";
+ to_y: "padding_right_bottom";
+ }
+ }
+ description { state: "icononly" 0.0;
+ min: BUTTON_TEXT_STYLE1_ICONONLY_ICON_MIN_MAX_INC;
+ max: BUTTON_TEXT_STYLE1_ICONONLY_ICON_MIN_MAX_INC;
+ align: 0.5 0.5;
+ }
+ }
+ part { name: "elm.text";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "clipper";
+ description { state: "default" 0.0;
+ visible: 0;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "padding_after_icon";
+ to_y: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "padding_right_bottom";
+ }
+ color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC;
+ text {
+ font: "HelveticaNeue:style=Medium";
+ size: BUTTON_TEXT_STYLE1_FONT_SIZE_INC;
+ min: 0 0;
+ max: 1 0;
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 128;
+ }
+ description { state: "disabled_visible" 0.0;
+ inherit: "default" 0.0;
+ color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC;
+ visible: 1;
+ }
+ description { state: "focused" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC;
+ }
+ }
+ part { name: "over2";
+ type: RECT;
+ repeat_events: 1;
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "over3";
+ type: RECT;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "clipper";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ }
+ part { name: "disabler";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ visible: 0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ }
+ programs {
+ program { name: "button_click";
+ signal: "mouse,down,1";
+ source: "over2";
+ action: SIGNAL_EMIT "elm,action,press" "";
+ after: "button_click_anim";
+ }
+ program { name: "button_click_anim";
+ action: STATE_SET "clicked" 0.0;
+ target: "button_image";
+ after: "text_clicked";
+ }
+ program { name: "text_clicked";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"elm.text", "clicked", 0.0);
+ }
+ }
+ program { name: "button_unpress";
+ action: SIGNAL_EMIT "elm,action,unpress" "";
+ }
+ program { name: "button_mouseout_clicked";
+ signal: "mouse,up,1";
+ source: "over3";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.swallow.content", st, 30, vl);
+ if (strcmp(st, "icononly"))
+ {
+ emit("elm,action,default,text,set", "");
+ set_state(PART:"elm.text", "visible", 0.0);
+ }
+ if (get_int(button_state) != BUTTON_STATE_DISABLED)
+ set_state(PART:"button_image", "default", 0.0);
+ }
+ after: button_unpress;
+ }
+ program { name: "button_unclick3";
+ signal: "mouse,clicked,1";
+ source: "over2";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ program { name: "text_show";
+ signal: "elm,state,text,visible";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.swallow.content", st, 30, vl);
+ if (!strcmp(st, "icononly"))
+ {
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ set_state(PART:"icon_rect", "visible", 0.0);
+ set_state(PART:"padding_after_icon", "visible", 0.0);
+ set_state(PART:"bg", "visible", 0.0);
+ }
+ if (get_int(button_state) != BUTTON_STATE_DISABLED)
+ set_state(PART:"elm.text", "visible", 0.0);
+ else
+ set_state(PART:"elm.text", "disabled_visible", 0.0);
+ }
+ }
+ program { name: "text_hide";
+ signal: "elm,state,text,hidden";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.swallow.content", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ {
+ set_state(PART:"elm.swallow.content", "icononly", 0.0);
+ set_state(PART:"icon_rect", "icononly", 0.0);
+ set_state(PART:"padding_after_icon", "icononly", 0.0);
+ set_state(PART:"bg", "icononly", 0.0);
+ }
+ set_state(PART:"elm.text", "default", 0.0);
+ }
+ }
+ program { name: "icon_show";
+ signal: "elm,state,icon,visible";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ {
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ set_state(PART:"icon_rect", "visible", 0.0);
+ set_state(PART:"padding_after_icon", "visible", 0.0);
+ set_state(PART:"bg", "visible", 0.0);
+ }
+ else
+ {
+ set_state(PART:"elm.swallow.content", "icononly", 0.0);
+ set_state(PART:"icon_rect", "icononly", 0.0);
+ set_state(PART:"padding_after_icon", "icononly", 0.0);
+ set_state(PART:"bg", "icononly", 0.0);
+ }
+ }
+ }
+ program { name: "icon_hide";
+ signal: "elm,state,icon,hidden";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.content";
+ target: "padding_after_icon";
+ target: "icon_rect";
+ target: "bg";
+ }
+ program { name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "button_image";
+ target: "disabler";
+ after: "disable_text";
+ }
+ program { name: "disable_text";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"elm.text", "disabled_visible", 0.0);
+ else
+ set_state(PART:"elm.text", "disabled", 0.0);
+ set_int(button_state, BUTTON_STATE_DISABLED);
+ }
+ }
+ program { name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "button_image";
+ target: "disabler";
+ after: "enable_text";
+ }
+ program { name: "enable_text";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "disabled_visible"))
+ set_state(PART:"elm.text", "visible", 0.0);
+ else
+ set_state(PART:"elm.text", "default", 0.0);
+ set_int(button_state, BUTTON_STATE_ENABLED);
+ }
+ }
+ program { name: "focused";
+ //signal: "elm,action,focus";
+ //source: "elm";
+ action: STATE_SET "focused" 0.0;
+ target: "button_image";
+ target: "elm.text";
+ }
+ program { name: "unfocused";
+ //signal: "elm,action,unfocus";
+ //source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "button_image";
+ after: "unfocus_text";
+ }
+ program { name: "unfocus_text";
+ action: STATE_SET "visible" 0.0;
+ target: "elm.text";
+ }
+ }
+ }
+
+///////////////////////////////////////////////////////////////////////////////////////
+ group { name: "elm/button/base/naviframe_control/default";
+ alias: "elm/button/base/naviframe_control/center";
+ /* TODO: Remove this alias later */
+ alias: "elm/button/base/navigationbar_control/center";
+ script {
+ public button_state = BUTTON_STATE_ENABLED;
+ }
+ images.image: IV_EDC_IMAGE_OPTION_HEADER_BT COMP;
+ images.image: IV_EDC_IMAGE_OPTION_HEADER_BT_DIM COMP;
+ images.image: IV_EDC_IMAGE_OPTION_HEADER_BT_PRESS COMP;
+ parts {
+ part { name: "button_image";
+ type: IMAGE;
+ mouse_events: 1;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: BUTTON_NAVIBAR_CENTER_BG_NORMAL_MIN_W_INC BUTTON_NAVIBAR_CENTER_BG_NORMAL_MIN_H_INC;
+ rel1.offset: 0 0;
+ rel2.offset: -1 -1;
+ image.normal: IV_EDC_IMAGE_OPTION_HEADER_BT;
+ image.border: BUTTON_NAVIBAR_CENTER_BG_NORMAL_BORDER_INC;
+ color: IV_EDC_OPTION_HEADER_BT_TEXT_COLOR_INC;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ image.normal: IV_EDC_IMAGE_OPTION_HEADER_BT; /*FIXME*/
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ image.normal: IV_EDC_IMAGE_OPTION_HEADER_BT_PRESS;
+ }
+ }
+ part {
+ name: "padding_left_top";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 0.0 0.0;
+ min: BUTTON_NAVIBAR_CENTER_PADDING_MIN_MAX_INC;
+ fixed: 1 1;
+ visible: 0;
+ }
+ }
+ part {
+ name: "padding_right_bottom";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 1.0 1.0;
+ rel1.relative: 1.0 1.0;
+ rel2.relative: 1.0 1.0;
+ min: BUTTON_NAVIBAR_CENTER_PADDING_MIN_MAX_INC;
+ fixed: 1 1;
+ visible: 0;
+ }
+ }
+ part {
+ name: "icon_rect";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 1;
+ min: 0 0;
+ fixed: 1 0;
+ rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+ rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+ align: 0.0 0.5;
+ color: 0 0 0 0;
+ }
+ description { state: "visible" 0.0;
+ visible: 1;
+ min: BUTTON_NAVIBAR_CENTER_ICON_RECT_VISIBLE_MIN_SIZE;
+ fixed: 1 0;
+ rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+ rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+ align: 0.0 0.5;
+ color: 0 0 0 0;
+ }
+ description { state: "icononly" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ part {
+ name: "padding_after_icon";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0; //when only icon or no icon is there
+ align: 0.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+ rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+ fixed: 1 0;
+ min: 0 0;
+ color: 0 0 0 0;
+ }
+ description { state: "visible" 0.0;
+ visible: 1;
+ align: 0.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+ rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+ fixed: 1 0;
+ min: BUTTON_NAVIBAR_CENTER_PADDING_AFTER_ICON_VISIBLE_MIN_INC;
+ color: 0 0 0 0;
+ }
+ description { state: "icononly" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ part {
+ name: "padding_before_text";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0; //when only icon or no icon is there
+ align: 1.0 0.5;
+ rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; }
+ rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
+ fixed: 1 0;
+ min: BUTTON_NAVIBAR_CENTER_PADDING_BEFORE_TEXT_DEFAULT_MIN_INC;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "clipper";
+ description { state: "default" 0.0;
+ visible: 0;
+ align: 0.0 0.5;
+ rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+ rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+ fixed: 1 0;
+ }
+ description { state: "visible" 0.0;
+ fixed: 1 0;
+ visible: 1;
+ min: BUTTON_NAVIBAR_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
+ max: BUTTON_NAVIBAR_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
+ align: 1.0 0.5;
+ rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; }
+ rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; }
+ aspect: 1.0 1.0;
+ aspect_preference: VERTICAL;
+ }
+ description { state: "icononly" 0.0;
+ visible: 1;
+ min: BUTTON_NAVIBAR_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
+ max: BUTTON_NAVIBAR_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
+ rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+ rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
+ align: 0.5 0.5;
+ aspect: 1.0 1.0;
+ aspect_preference: VERTICAL;
+ }
+ }
+ part { name: "elm.text";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "clipper";
+ description { state: "default" 0.0;
+ visible: 0;
+ rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; }
+ rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
+ align: 0.5 0.5;
+ color: 255 255 255 255;
+ text {
+ font: "HelveticaNeue:style=Medium";
+ size: BUTTON_NAVIBAR_CENTER_TEXT_FONT_SIZE_INC;
+ min: 0 0;
+ max: 1 0;
+ align: 0.5 0.5;
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ min: 0 0;
+ }
+ description { state: "focused" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ min: 0 0;
+ color: 255 255 255 255;
+ }
+ }
+ part { name: "over2";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 1;
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "over3";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "clipper";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ description { state: "disabled" 0.0;
+ color: 255 255 255 127;
+ }
+ }
+ part { name: "disabler";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ visible: 0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ }
+ programs {
+ program { name: "button_click";
+ signal: "mouse,down,1";
+ source: "over2";
+ action: SIGNAL_EMIT "elm,action,press" "";
+ after: "button_click_anim";
+ }
+ program { name: "button_click_anim";
+ action: STATE_SET "clicked" 0.0;
+ target: "button_image";
+ after: "text_clicked";
+ }
+ program { name: "text_clicked";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"elm.text", "clicked", 0.0);
+ }
+ }
+ program { name: "button_unpress";
+ action: SIGNAL_EMIT "elm,action,unpress" "";
+ }
+ program { name: "button_mouseout_clicked";
+ signal: "mouse,up,1";
+ source: "over3";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.swallow.content", st, 30, vl);
+ if (strcmp(st, "icononly"))
+ {
+ emit("elm,action,default,text,set", "");
+ set_state(PART:"elm.text", "visible", 0.0);
+ }
+ if(get_int(button_state) != BUTTON_STATE_DISABLED)
+ set_state(PART:"button_image", "default", 0.0);
+ }
+ after: button_unpress;
+ }
+ program { name: "button_unclick3";
+ signal: "mouse,clicked,1";
+ source: "over2";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ program { name: "text_show";
+ signal: "elm,state,text,visible";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.swallow.content", st, 30, vl);
+ if (!strcmp(st, "icononly"))
+ {
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ set_state(PART:"icon_rect", "visible", 0.0);
+ set_state(PART:"padding_after_icon", "visible", 0.0);
+ }
+ set_state(PART:"elm.text", "visible", 0.0);
+ }
+ }
+ program { name: "text_hide";
+ signal: "elm,state,text,hidden";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.swallow.content", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ {
+ set_state(PART:"elm.swallow.content", "icononly", 0.0);
+ set_state(PART:"icon_rect", "icononly", 0.0);
+ set_state(PART:"padding_after_icon", "icononly", 0.0);
+ }
+ set_state(PART:"elm.text", "default", 0.0);
+ }
+ }
+ program { name: "icon_show";
+ signal: "elm,state,icon,visible";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ {
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ set_state(PART:"icon_rect", "visible", 0.0);
+ set_state(PART:"padding_after_icon", "visible", 0.0);
+ }
+ else
+ {
+ set_state(PART:"elm.swallow.content", "icononly", 0.0);
+ set_state(PART:"icon_rect", "icononly", 0.0);
+ set_state(PART:"padding_after_icon", "icononly", 0.0);
+ }
+ }
+ }
+ program { name: "icon_hide";
+ signal: "elm,state,icon,hidden";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.content";
+ target: "icon_rect";
+ target: "padding_after_icon";
+ }
+ program { name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "button_image";
+ target: "clipper";
+ target: "disabler";
+ after: "disable_text";
+ }
+ program { name: "disable_text";
+ script {
+ set_int(button_state, BUTTON_STATE_DISABLED);
+ set_state(PART:"elm.text", "visible", 0.0);
+ }
+ }
+ program { name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "button_image";
+ target: "clipper";
+ target: "disabler";
+ after: "enable_text";
+ }
+ program { name: "enable_text";
+ script {
+ set_int(button_state, BUTTON_STATE_ENABLED);
+ set_state(PART:"elm.text", "visible", 0.0);
+ }
+ }
+ program { name: "focused";
+ action: STATE_SET "focused" 0.0;
+ target: "button_image";
+ target: "elm.text";
+ }
+ program { name: "unfocused";
+ action: STATE_SET "default" 0.0;
+ target: "button_image";
+ after: "unfocus_text";
+ }
+ program { name: "unfocus_text";
+ action: STATE_SET "visible" 0.0;
+ target: "elm.text";
+ }
+ }
+ }
+
+///////////////////////////////////////////////////////////////////////////////////////
+ group { name: "elm/button/base/multiline";
+ alias: "elm/button/base/text_only/multiline";
+ images {
+ image: IV_EDC_IMAGE_OPTION_HEADER_BT COMP;
+ image: IV_EDC_IMAGE_OPTION_HEADER_BT_PRESS COMP;
+ image: IV_EDC_IMAGE_OPTION_HEADER_BT_DIM COMP;
+ }
+ script {
+ public button_state = BUTTON_STATE_ENABLED;
+ }
+ styles{
+ style { name: "btn_multiline_style";
+ base: "font=HelveticaNeue:style=Medium font_size="BUTTON_MULTILINE_TEXT_FONT_SIZE_INC" align=center color=#ffffff wrap=mixed";
+ tag: "br" "\n";
+ tag: "ps" "ps";
+ tag: "tab" "\t";
+ }
+ }
+ parts {
+ part { name: "button_image";
+ mouse_events: 1;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 10 46;
+ image {
+ normal: IV_EDC_IMAGE_OPTION_HEADER_BT;
+ border: 4 4 3 3;
+ border_scale: 1;
+ }
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ image.normal: IV_EDC_IMAGE_OPTION_HEADER_BT_PRESS;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ image.normal: IV_EDC_IMAGE_OPTION_HEADER_BT_DIM;
+ }
+ description { state: "focused" 0.0;
+ inherit: "default" 0.0;
+ image.normal: IV_EDC_IMAGE_OPTION_HEADER_BT_PRESS;
+ }
+ }
+ part {
+ name: "padding_left_top";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 0.0 0.0;
+ min: 2 2;
+ fixed: 1 1;
+ visible: 0;
+ }
+ }
+ part {
+ name: "padding_right_bottom";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 1.0 1.0;
+ rel1.relative: 1.0 1.0;
+ rel2.relative: 1.0 1.0;
+ min: 2 2;
+ fixed: 1 1;
+ visible: 0;
+ }
+ }
+ part {
+ name: "icon_rect";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 1;
+ min: 0 40;
+ fixed: 1 0;
+ rel1 { relative: 0.0 1.0; to_x: "elm.swallow.content"; to_y: "padding_left_top"; }
+ rel2 { relative: 1.0 0.0; to_x: "elm.swallow.content"; to_y: "padding_right_bottom"; }
+ align: 0.0 0.5;
+ color: 0 0 0 0;
+ }
+ }
+ part {
+ name: "padding_icon_text";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0; //when only icon or no icon is there
+ align: 0.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+ rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+ fixed: 1 0;
+ min: 0 0;
+ color: 0 0 0 0;
+ }
+ description { state: "icononly" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "visible" 0.0; //when icon is visible
+ align: 0.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+ rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+ fixed: 1 0;
+ min: 5 0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ align: 0.0 0.5;
+ rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+ rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+ fixed: 1 0;
+ }
+ description { state: "visible" 0.0;
+ fixed: 1 0;
+ visible: 1;
+ align: 0.0 0.5;
+ rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+ rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+ aspect: 1.0 1.0;
+ aspect_preference: VERTICAL;
+ }
+ description { state: "icononly" 0.0;
+ visible: 1;
+ min: 40 40;
+ rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+ rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
+ align: 0.5 0.5;
+ aspect: 1.0 1.0;
+ aspect_preference: VERTICAL;
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ rel1 { relative: 1.0 1.0; to_x: "padding_icon_text"; to_y: "padding_left_top"; }
+ rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
+ align: 0.5 0.5;
+ color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC;
+ text {
+ style: "btn_multiline_style";
+ min: 0 0;
+ max: 0 1;
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ min: 80 0;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ min: 0 0;
+ color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 128;
+ }
+ description { state: "disabled_visible" 0.0;
+ inherit: "default" 0.0;
+ color: BUTTON_NAVIBAR_FUNCTION_BUTTON_TEXT_DISABLED_COLOR_INC;
+ visible: 1;
+ min: 80 0;
+ }
+ description { state: "focused" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ min: 0 0;
+ color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC;
+ }
+ }
+ part { name: "over2";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 1;
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "over3";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "disabler";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ visible: 0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ }
+ programs {
+ program { name: "button_click";
+ signal: "mouse,down,1";
+ source: "over2";
+ action: SIGNAL_EMIT "elm,action,press" "";
+ after: "button_click_anim";
+ }
+ program { name: "button_click_anim";
+ action: STATE_SET "clicked" 0.0;
+ target: "button_image";
+ after: "text_clicked";
+ }
+ program { name: "text_clicked";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"elm.text", "clicked", 0.0);
+ }
+ }
+ program { name: "button_unpress";
+ action: SIGNAL_EMIT "elm,action,unpress" "";
+ }
+ program { name: "button_mouseout_clicked";
+ signal: "mouse,up,1";
+ source: "over3";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.swallow.content", st, 30, vl);
+ if (strcmp(st, "icononly"))
+ {
+ emit("elm,action,default,text,set", "");
+ set_state(PART:"elm.text", "visible", 0.0);
+ }
+ if(get_int(button_state) != BUTTON_STATE_DISABLED)
+ set_state(PART:"button_image", "default", 0.0);
+ }
+ after: button_unpress;
+ }
+ program { name: "button_unclick3";
+ signal: "mouse,clicked,1";
+ source: "over2";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ program { name: "text_show";
+ signal: "elm,state,text,visible";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.swallow.content", st, 30, vl);
+ if (!strcmp(st, "icononly"))
+ {
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ set_state(PART:"padding_icon_text", "visible", 0.0);
+ }
+ if(get_int(button_state) != BUTTON_STATE_DISABLED)
+ set_state(PART:"elm.text", "visible", 0.0);
+ else
+ set_state(PART:"elm.text", "disabled_visible", 0.0);
+ }
+ }
+ program { name: "text_hide";
+ signal: "elm,state,text,hidden";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.swallow.content", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ {
+ set_state(PART:"elm.swallow.content", "icononly", 0.0);
+ set_state(PART:"padding_icon_text", "icononly", 0.0);
+ }
+ set_state(PART:"elm.text", "default", 0.0);
+ }
+ }
+ program { name: "icon_show";
+ signal: "elm,state,icon,visible";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ {
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ set_state(PART:"padding_icon_text", "visible", 0.0);
+ }
+ else
+ {
+ set_state(PART:"elm.swallow.content", "icononly", 0.0);
+ set_state(PART:"padding_icon_text", "icononly", 0.0);
+ }
+ }
+ }
+ program { name: "icon_hide";
+ signal: "elm,state,icon,hidden";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.content";
+ target: "padding_icon_text";
+ }
+ program { name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "button_image";
+ target: "disabler";
+ after: "disable_text";
+ }
+ program { name: "disable_text";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"elm.text", "disabled_visible", 0.0);
+ else
+ set_state(PART:"elm.text", "disabled", 0.0);
+ set_int(button_state, BUTTON_STATE_DISABLED);
+ }
+ }
+ program { name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "button_image";
+ target: "disabler";
+ after: "enable_text";
+ }
+ program { name: "enable_text";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "disabled_visible"))
+ set_state(PART:"elm.text", "visible", 0.0);
+ else
+ set_state(PART:"elm.text", "default", 0.0);
+ set_int(button_state, BUTTON_STATE_ENABLED);
+ }
+ }
+ program { name: "focused";
+ //signal: "elm,action,focus";
+ //source: "elm";
+ action: STATE_SET "focused" 0.0;
+ target: "button_image";
+ target: "elm.text";
+ }
+ program { name: "unfocused";
+ //signal: "elm,action,unfocus";
+ //source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "button_image";
+ after: "unfocus_text";
+ }
+ program { name: "unfocus_text";
+ action: STATE_SET "visible" 0.0;
+ target: "elm.text";
+ }
+ }
+ }
+
+}
diff --git a/main/layout/ivug-details.edc b/main/layout/ivug-details.edc
new file mode 100755
index 0000000..4c38245
--- /dev/null
+++ b/main/layout/ivug-details.edc
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+/*
+ 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 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";
+ type: SWALLOW;
+ repeat_events: 0;
+ scale:1;
+
+ description {
+ state: "default" 0.0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 1.0;
+ }
+ }
+
+ part {
+ name: "detailsview.genlist";
+ type: SWALLOW;
+ repeat_events : 0;
+ mouse_events : 1;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+// rel2 { relative: 1.0 0.0; to_y: "detailsview.ctrlbar";}
+// rel2 { relative: 0.0 0.0; to_x: "detailsview.thumb"; to_y: "detailsview.ctrlbar";}
+ }
+ }
+
+ }
+ } // end of group
+} // end of collections
+
diff --git a/main/layout/ivug-effect.edc b/main/layout/ivug-effect.edc
new file mode 100755
index 0000000..519f1da
--- /dev/null
+++ b/main/layout/ivug-effect.edc
@@ -0,0 +1,145 @@
+/*
+ * 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_effect";
+ parts {
+ part {
+ name: "indication";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 0.0; }
+ min: 0 0;
+ fixed: 0 1;
+ align: 0.5 0.0;
+ visible: 0;
+ }
+
+ description {
+ state: "show" 0.0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 0.0; }
+ min: 0 50;
+ fixed: 0 1;
+ align: 0.5 0.0;
+ visible: 0;
+ }
+
+ }
+
+ part {
+ name: "clip";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 1 1; to_y: "indication";}
+ rel2 { relative: 2 1; }
+ color: 255 255 255 0;
+ }
+ description {
+ state: "show" 0.0;
+ rel1 { relative: 0 1; to_y: "indication";}
+ rel2 { relative: 1 1; }
+ color: 255 255 255 255;
+ }
+ }
+ part {
+ name: "elm.swallow.content";
+ type: SWALLOW;
+ clip_to: "clip";
+ scale: 1;
+ description {
+ rel1.to: "clip";
+ rel2.to: "clip";
+ }
+ }
+ part {
+ name: "event_blocker";
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ }
+ programs {
+ program {
+ name: "show.indicator";
+ source: "app";
+ signal: "elm,show,indicator";
+ action: STATE_SET "show" 0.0;
+ target: "indication";
+ }
+
+ program {
+ name: "show";
+ signal: "elm,state,show";
+ source: "app";
+ action: STATE_SET "show" 0.0;
+ target: "clip";
+ target: "event_blocker";
+ transition: "DECELERATE" 0.3;
+ after: "show_end";
+ }
+ program {
+ name: "hide";
+ signal: "elm,state,hide";
+ source: "app";
+ action: STATE_SET "default" 0.0;
+ target: "clip";
+ target: "event_blocker";
+ transition: "ACCELERATE" 0.3;
+ after: "hide_end";
+ }
+ program {
+ name: "disable_event_blocker";
+ signal: "elm,state,blocker,disabled";
+ action: STATE_SET "disabled" 0.0;
+ target: "event_blocker";
+ }
+ program {
+ name: "disable_blocker";
+ action: SIGNAL_EMIT "elm,state,blocker,disabled" "";
+ }
+ program {
+ name: "show_end";
+ action: SIGNAL_EMIT "elm,action,show,finished" "elm";
+ after: "disable_blocker";
+ }
+ program {
+ name: "hide_end";
+ action: SIGNAL_EMIT "elm,action,hide,finished" "elm";
+ after: "disable_blocker";
+ }
+ }
+ }
+}
+
+
diff --git a/main/layout/ivug-icons.edc b/main/layout/ivug-icons.edc
new file mode 100755
index 0000000..95fff2d
--- /dev/null
+++ b/main/layout/ivug-icons.edc
@@ -0,0 +1,60 @@
+/*
+ * 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; } \
+collections { group { name: _name; \
+ parts { part { name: "icon"; \
+ type: IMAGE; mouse_events: 1; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ align: 0.5 0.5; \
+ fixed: 1 1; \
+ aspect: 1.0 1.0; \
+ aspect_preference: VERTICAL; \
+ image.normal: _fname; \
+}}}}}
+
+#define DEFINE_ICON_SIZE(_name, _fname, w, h) \
+images { image: _fname COMP; } \
+collections { group { name: _name; \
+ parts { part { name: "icon"; \
+ type: IMAGE; mouse_events: 1; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ align: 0.5 0.5; \
+ min: (w) (h); \
+ max: (w) (h); \
+ fixed: 1 1; \
+ aspect: 1.0 1.0; \
+ image.normal: _fname; \
+}}}}}
+
+
+#define BTN_PLAY_VIDEO "T01_btn_play.png"
+
+DEFINE_ICON("btn.video.play", BTN_PLAY_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_OTHERS "01_header_icon_others.png"
+
+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.others", HEADER_ICON_PATH"/"HEADER_ICON_OTHERS)
diff --git a/main/layout/ivug-main.edc b/main/layout/ivug-main.edc
new file mode 100755
index 0000000..1b8e803
--- /dev/null
+++ b/main/layout/ivug-main.edc
@@ -0,0 +1,461 @@
+/*
+ * 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
+
+#define LAYOUT_INDICATOR_HEIGHT_INC 50
+#define LAYOUT_INDICATOR_COLOR 92 92 92 255 // Same as Naviframe
+
+#define NAVI_VIEW_HEIGHT 120
+#define CTRL_VIEW_HEIGHT 95
+
+collections {
+group {
+ name: "mainview";
+
+ parts {
+
+ part { name: "background";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 255;
+ //color: 255 255 255 255;
+ visible: 1;
+ rel1 { relative: 0.0 0.0;}
+ rel2 { relative: 1.0 1.0;}
+ }
+ }
+
+ part {
+ name: "clip";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ visible: 1;
+ color: 255 255 255 255;
+ }
+ description {
+ state: "hide" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 0;
+ visible: 0;
+ }
+ }
+
+ part { name: "mainview.navibar";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ repeat_events : 0;
+ clip_to: "clip";
+ description {
+ state: "default" 0.0;
+ align: 0.5 0.0;
+ visible: 1;
+ rel1 { relative: 0.0 0.0;}
+ rel2 { relative: 1.0 1.0;}
+ }
+
+ description {
+ state: "hide" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+
+ }
+
+ programs {
+ program {
+ name: "main_view_click";
+ signal: "mouse,down,1";
+ source: "mainview";
+ action: SIGNAL_EMIT "elm,action,press" "";
+ }
+ program {
+ name: "hide_menu";
+ signal: "mainview,hide,menu";
+ source: "elm";
+ action: STATE_SET "hide" 0.0;
+ transition: LINEAR 0.1;
+ target: "clip";
+ after: "hide_end";
+ }
+ program {
+ name: "show_menu";
+ signal: "mainview,show,menu";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ transition: LINEAR 0.1;
+ target: "clip";
+ after: "show_end";
+ }
+ program {
+ name: "show_end";
+ action: SIGNAL_EMIT "menu,show,finished" "edc";
+ }
+ program {
+ name: "hide_end";
+ action: SIGNAL_EMIT "menu,hide,finished" "edc";
+ }
+
+ }
+
+}
+
+#define EMPTY_VIEW_HEIGHT (720-LAYOUT_INDICATOR_HEIGHT_INC-NAVI_VIEW_HEIGHT-CTRL_VIEW_HEIGHT)
+//#define EMPTY_VIEW_HEIGHT 1000
+
+group {
+ name: "navi_content";
+ parts {
+ part {
+ name: "base";
+ type: RECT;
+ scale: 1;
+ repeat_events: 1;
+ description {
+ state: "default" 0.0;
+
+ rel1 { relative: 0 0; }
+ rel2 { relative: 1 1; }
+ color: 0 0 0 0;
+ }
+ }
+
+ part { name: "mainview.slider";
+ type: SWALLOW;
+ mouse_events: 1;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ }
+ }
+
+#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;
+ description {
+ visible: 1;
+ fixed: 1 1;
+ min: 56 56;
+ state: "default" 0.0;
+ align: 0.5 0.0;
+ /*rel1 { relative: (238/720) ((EMPTY_VIEW_HEIGHT-50-56)/EMPTY_VIEW_HEIGHT);}
+ rel2 { relative: (238/720) ((EMPTY_VIEW_HEIGHT-50-56)/EMPTY_VIEW_HEIGHT);}*/
+ rel1 { relative: ((238+28)/720) 1.0;
+ offset: 0.0 -56-CTRL_VIEW_HEIGHT;}
+ rel2 { relative: ((238+28)/720) 1.0;
+ offset: 0.0 -56-CTRL_VIEW_HEIGHT;}
+ 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;
+ description {
+ visible: 1;
+ fixed: 1 1;
+ min: 56 56;
+ state: "default" 0.0;
+ align: 0.5 0.0;
+ /*rel1 { relative: ((238+56+132)/720) ((EMPTY_VIEW_HEIGHT-50-56)/EMPTY_VIEW_HEIGHT);}
+ rel2 { relative: ((238+56+132)/720) ((EMPTY_VIEW_HEIGHT-50-56)/EMPTY_VIEW_HEIGHT);}*/
+ rel1 { relative: ((720-238-28)/720) 1.0;
+ offset: 0.0 -56-CTRL_VIEW_HEIGHT;}
+ rel2 { relative: ((720-238-28)/720) 1.0;
+ offset: 0.0 -56-CTRL_VIEW_HEIGHT;}
+ 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;
+ }
+ }
+
+ part {
+ name: "zoom_out_blocker";
+ type: RECT;
+ scale: 1;
+ 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;
+ visible: 1;
+ }
+ description {
+ state: "hide" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "zoom_in_blocker";
+ type: RECT;
+ scale: 1;
+ repeat_events: 0;
+ mouse_events: 1;
+ 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";}
+ 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;
+ visible: 1;
+ }
+ description {
+ state: "hide" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+
+ }
+
+ programs {
+ 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";
+ 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";
+ }
+ 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";
+ 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";
+ }
+ }
+
+ }
+}
+
diff --git a/main/layout/ivug-naviframe.edc b/main/layout/ivug-naviframe.edc
new file mode 100755
index 0000000..d2d0368
--- /dev/null
+++ b/main/layout/ivug-naviframe.edc
@@ -0,0 +1,996 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+/*
+* Refer to themes/groups/naviframe.edc
+*/
+
+#define NAVIFRAME_VIEW_TRANS_TIME 0.3
+#define NAVIFRAME_TEXT_PADDING_INC 144
+#define NAVIFRAME_TEXT_PADDING_MORE_BUTTON_INC 278
+#define NAVIFRAME_TEXT_PADDING_ICON_VISIBLE_INC 186
+
+#define NAVIFRAME_TITLE_H_INC 100
+#define NAVIFRAME_OH_CLOSED_H_INC 8
+#define NAVIFRAME_OH_OPENED_H_INC 106
+#define NAVIFRAME_OH_CONTENT_H_INC 74
+#define NAVIFRAME_OH_PADDING_INC 16
+#define NAVIFRAME_OH_OPENED_DOUBLE_H_INC 196
+#define NAVIFRAME_OH_SHADOW_H_INC 0
+#define NAVIFRAME_INDICATOR_W_INC 128
+#define NAVIFRAME_PADDING_EXPANDED_INC 141
+#define NAVIFRAME_TITLE_FONT_SIZE_INC 36
+#define NAVIFRAME_ICON_SIZE_INC 32 32
+#define NAVIFRAME_ICON_PADDING_INC 16 0
+#define NAVIFRAME_OH_ARROW_SIZE_INC 19 12
+#define NAVIFRAME_TITLE_TEXT_COLOR_INC 235 236 237 255
+#define NAVIFRAME_TITLE_BG_COLOR_INC 92 92 92 255
+#define NAVIFRAME_TITLE_LEFT_SEPARATOR_COLOR_INC 3 3 3 255
+#define NAVIFRAME_TITLE_RIGHT_SEPARATOR_COLOR_INC 52 52 52 255
+#define NAVIFRAME_OH_BORDER_INC 0 0 4 0
+
+#define NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 10
+#define NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 10
+#define NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC 124 80
+#define NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 144
+#define NAVIFRAME_NO_BUTTON_ICON_PADDING_INC 52
+#define NAVIFRAME_CONTROLBAR_BG_COLOR_INC 0 0 0 255
+#define CONTROLBAR_LARGE_HEIGHT_INC 95//122
+#define CONTROLBAR_SMALL_HEIGHT_INC CONTROLBAR_LARGE_HEIGHT_INC//102
+#define NAVIFRAME_PREV_BTN_W_INC 124
+#define NAVIFRAME_CONTROLBAR_PADDING_INC 5
+#define NAVIFRAME_SEGMENT_TITLE_H_INC 136
+
+#define NAVIFRAME_TITLE_SEGMENT_FONT_SIZE_INC 28
+#define NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC 50
+#define NAVIFRAME_TITLE_SEGMENT_H_INC 74
+
+#define LAYOUT_INDICATOR_HEIGHT_INC 50
+#define LAYOUT_INDICATOR_COLOR 0 0 0 0 //92 92 92 255 // Same as Naviframe
+
+///////////////////////////////////////////////////////////////////////////
+// Naviframe
+///////////////////////////////////////////////////////////////////////////
+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/default";
+ alias:"elm/naviframe/item/1line/ivug/default";
+ images {
+ image: "T01_control_top_bg.png" COMP;
+ image: "T01_control_top_arrow.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.
+ }
+ parts {
+ part {
+ name: "indicator";
+ type: RECT;
+ scale: 1;
+ repeat_events : 0;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 0.0; }
+ min: 0 LAYOUT_INDICATOR_HEIGHT_INC;
+ fixed: 0 1;
+ align: 0.5 0.0;
+ color: LAYOUT_INDICATOR_COLOR;
+ visible: 1;
+ }
+
+ description {
+ state: "hide" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+
+ part { name: "base";
+ type: RECT;
+ 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";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ repeat_events: 0;
+ clip_to: "content_clip";
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel1.relative: 0.0 0.0;
+ 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";
+ }
+ }
+
+ part { name: "elm.swallow.detail";
+ 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 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";
+ visible: 1;
+ }
+ }
+
+ 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"; }
+ 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: "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: "T01_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: 0 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: "padding_before_left_btn";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+ fixed: 1 0;
+ align: 0.0 0.5;
+ rel1 { relative: 0.0 0.0; to: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to: "title_bg"; }
+ visible: 0;
+ }
+ }
+ part { name: "padding_after_left_btn";
+ type: RECT;
+ scale: 1;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+ fixed: 1 0;
+ align: 0 0.5;
+ rel1 { relative: 1.0 0.0; to: "title_left_btn"; }
+ rel2 { relative: 1.0 1.0; to: "title_left_btn"; }
+ visible: 0;
+ }
+ }
+ part { name: "padding_before_more_btn";
+ type: RECT;
+ scale: 1;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+ fixed: 1 0;
+ align: 1.0 0.5;
+ rel1 { relative: 0.0 0.0; to: "title_more_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_more_btn"; }
+ visible: 0;
+ }
+ }
+ part { name: "padding_after_right_btn";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 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;
+ }
+ }
+ part { name: "padding_before_right_btn";
+ 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: 0.0 0.0; to: "title_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+ visible: 0;
+ }
+ description { state: "right_and_more_button" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+ }
+ }
+ part { name: "padding_before_text";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ align: 1.0 0.5;
+ rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "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: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+ 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;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TEXT_PADDING_INC 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: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 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: "HelveticaNeue:style=Medium";
+ size: NAVIFRAME_TITLE_FONT_SIZE_INC;
+ min: 0 0;
+ max: 1 0;
+ align: 0.5 0.5;
+ }
+ color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
+ align: 0.5 0.5;
+ fixed: 1 0;
+ rel1 { relative: 1.0 0.0; to: "padding_center_text1"; }
+ rel2 { relative: 0.0 1.0; to: "padding_center_text2"; }
+ }
+ description { state: "right_and_more_button" 0.0;
+ inherit: "default" 0.0;
+ rel1 { relative: 1.0 0.0; to: "padding_after_left_btn"; }
+ rel2 { relative: 0.0 1.0; to: "padding_before_more_btn"; }
+ }
+ }
+ 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_before_text"; }
+ rel2 { relative: 0.0 1.0; to: "padding_before_text"; }
+ aspect: 1.0 1.0;
+ aspect_preference: VERTICAL;
+ align: 1.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: 0 0.5;
+ rel1 { relative: 1.0 0.0; to: "padding_before_left_btn"; }
+ rel2 { relative: 1.0 1.0; to: "padding_before_left_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: 0.0 0.0; to: "padding_after_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "padding_after_right_btn"; }
+ }
+ }
+ 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: "padding_before_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "padding_before_right_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.025; to: "title_more_btn"; }
+ rel2 { relative: 1.0 1.025; to: "title_more_btn"; }
+ image.normal: "T01_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";
+ type: RECT;
+ 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"; }
+ color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
+ }
+ 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:"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);
+ }
+ }
+ 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";
+ 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: "left_btn_show";
+ signal: "elm,state,title_left_btn,show";
+ source: "elm";
+ script {
+ set_int(left_btn_visible, 1);
+ 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)) {
+ set_state(PART:"elm.text.title", "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);
+ 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);
+ if (get_int(more_btn_visible) == 1) {
+ set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+ set_state(PART:"padding_before_right_btn", "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:"padding_before_right_btn", "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) {
+ set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+ set_state(PART:"padding_before_right_btn", "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);
+ set_state(PART:"padding_before_right_btn", "default", 0.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,elm.swallow.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,elm.swallow.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" "";
+ }
+ }
+ }
+
+}
+
diff --git a/main/layout/ivug-selectioninfo.edc b/main/layout/ivug-selectioninfo.edc
new file mode 100755
index 0000000..00a1340
--- /dev/null
+++ b/main/layout/ivug-selectioninfo.edc
@@ -0,0 +1,371 @@
+/*
+ * 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
+*/
+
+#define SELECTION_INFO_BACKGROUND_COLOR_INC 91 91 91 255
+#define SELECTION_INFO_TEXT_COLOR_INC 255 255 255 255
+
+#define SELECTION_INFO_MIN_VER_W_INC 720
+#define SELECTION_INFO_MIN_HORZ_W_INC 1280
+#define SELECTION_INFO_VER_PADDING_INC 48
+#define SELECTION_INFO_LEFT_PADDING_INC 16
+#define SELECTION_INFO_TEXT_FONT_SIZE_INC 32
+#define SELECTION_INFO_MIN_VER_BOTTOM_64_H_INC 143//=95+48 150
+#define SELECTION_INFO_MIN_VER_BOTTOM_86_H_INC 143//=95+48 186
+
+collections {
+
+ group { name: "elm/standard/selectioninfo/vertical/bottom_12";
+ parts {
+ part { name: "bg";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 1;
+ scale : 1;
+ description {
+ state: "default" 0.0;
+ min: SELECTION_INFO_MIN_VER_W_INC SELECTION_INFO_VER_PADDING_INC;
+ fixed: 1 1;
+ align: 0.5 1.0;
+ rel1.relative: 0.5 1.0;
+ rel2.relative: 0.5 1.0;
+ color: SELECTION_INFO_BACKGROUND_COLOR_INC;
+ }
+ }
+ part {
+ name: "elm.text";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 0.0;
+ rel1 { to: "bg"; }
+ rel2 { to: "bg"; }
+ color: SELECTION_INFO_TEXT_COLOR_INC;
+ text {
+ font: "HelveticaNeue";
+ size: SELECTION_INFO_TEXT_FONT_SIZE_INC;
+ text: "";
+ }
+ }
+ }
+ }
+ programs {
+ program { name: "clicked";
+ signal: "mouse,clicked,1";
+ source: "base";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ }
+ }
+
+ group { name: "elm/standard/selectioninfo/vertical/bottom_64";
+ parts {
+ part {
+ name: "bg";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 1;
+ scale : 1;
+ description {
+ state: "default" 0.0;
+ min: SELECTION_INFO_MIN_VER_W_INC SELECTION_INFO_MIN_VER_BOTTOM_64_H_INC;
+ fixed: 1 1;
+ align: 0.5 1.0;
+ rel1.relative: 0.5 1.0;
+ rel2.relative: 0.5 1.0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "base";
+ type: RECT;
+ mouse_events: 1;
+ scale : 1;
+ description {
+ state: "default" 0.0;
+ min: 0 SELECTION_INFO_VER_PADDING_INC;
+ fixed: 0 1;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 0.0; to: "bg"; }
+ rel2 { relative: 1.0 0.32; to: "bg"; }
+ color: SELECTION_INFO_BACKGROUND_COLOR_INC;
+ }
+ }
+ part {
+ name: "elm.text";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 0.0;
+ rel1 { to: "base"; }
+ rel2 { to: "base"; }
+ color: SELECTION_INFO_TEXT_COLOR_INC;
+ text {
+ font: "HelveticaNeue";
+ size: SELECTION_INFO_TEXT_FONT_SIZE_INC;
+ text: "";
+ }
+ }
+ }
+ }
+ programs {
+ program {
+ name: "clicked";
+ signal: "mouse,clicked,1";
+ source: "base";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ }
+ }
+
+ group { name: "elm/standard/selectioninfo/vertical/bottom_86";
+ parts {
+ part {
+ name: "bg";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 1;
+ scale : 1;
+ description {
+ state: "default" 0.0;
+ min: SELECTION_INFO_MIN_VER_W_INC SELECTION_INFO_MIN_VER_BOTTOM_86_H_INC;
+ fixed: 1 1;
+ align: 0.5 1.0;
+ rel1.relative: 0.5 1.0;
+ rel2.relative: 0.5 1.0;
+ color: 0 0 0 0;
+ }
+ }
+ part {
+ name: "base";
+ type: RECT;
+ mouse_events: 1;
+ scale : 1;
+ description {
+ state: "default" 0.0;
+ min: 0 SELECTION_INFO_VER_PADDING_INC;
+ fixed: 0 1;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 0.0; to: "bg"; }
+ rel2 { relative: 1.0 0.258; to: "bg"; }
+ color: SELECTION_INFO_BACKGROUND_COLOR_INC;
+ }
+ }
+ part {
+ name: "elm.text";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 0.0;
+ rel1 { to: "base"; }
+ rel2 { to: "base"; }
+ color: SELECTION_INFO_TEXT_COLOR_INC;
+ text {
+ font: "HelveticaNeue";
+ size: SELECTION_INFO_TEXT_FONT_SIZE_INC;
+ text: "";
+ }
+ }
+ }
+ }
+ programs {
+ program {
+ name: "clicked";
+ signal: "mouse,clicked,1";
+ source: "base";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ }
+ }
+
+ group { name: "elm/standard/selectioninfo/horizontal/bottom_12";
+ parts {
+ part { name: "bg";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 1;
+ scale : 1;
+ description {
+ state: "default" 0.0;
+ min: SELECTION_INFO_MIN_HORZ_W_INC SELECTION_INFO_VER_PADDING_INC;
+ fixed: 1 1;
+ align: 0.5 1.0;
+ rel1.relative: 0.5 1.0;
+ rel2.relative: 0.5 1.0;
+ color: SELECTION_INFO_BACKGROUND_COLOR_INC;
+ }
+ }
+ part {
+ name: "elm.text";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 0.0;
+ rel1 { to: "bg"; }
+ rel2 { to: "bg"; }
+ color: SELECTION_INFO_TEXT_COLOR_INC;
+ text {
+ font: "HelveticaNeue";
+ size: SELECTION_INFO_TEXT_FONT_SIZE_INC;
+ text: "";
+ }
+ }
+ }
+ }
+ programs {
+ program { name: "clicked";
+ signal: "mouse,clicked,1";
+ source: "base";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ }
+ }
+
+ group { name: "elm/standard/selectioninfo/horizontal/bottom_64";
+ parts {
+ part {
+ name: "bg";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 1;
+ scale : 1;
+ description {
+ state: "default" 0.0;
+ min: SELECTION_INFO_MIN_HORZ_W_INC SELECTION_INFO_MIN_VER_BOTTOM_64_H_INC;
+ fixed: 1 1;
+ align: 0.5 1.0;
+ rel1.relative: 0.5 1.0;
+ rel2.relative: 0.5 1.0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "base";
+ type: RECT;
+ mouse_events: 1;
+ scale : 1;
+ description {
+ state: "default" 0.0;
+ min: 0 SELECTION_INFO_VER_PADDING_INC;
+ fixed: 0 1;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 0.0; to: "bg"; }
+ rel2 { relative: 1.0 0.32; to: "bg"; }
+ color: SELECTION_INFO_BACKGROUND_COLOR_INC;
+ }
+ }
+ part {
+ name: "elm.text";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 0.0;
+ rel1 { to: "base"; }
+ rel2 { to: "base"; }
+ color: SELECTION_INFO_TEXT_COLOR_INC;
+ text {
+ font: "HelveticaNeue";
+ size: SELECTION_INFO_TEXT_FONT_SIZE_INC;
+ text: "";
+ }
+ }
+ }
+ }
+ programs {
+ program {
+ name: "clicked";
+ signal: "mouse,clicked,1";
+ source: "base";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ }
+ }
+
+ group { name: "elm/standard/selectioninfo/horizontal/bottom_86";
+ parts {
+ part {
+ name: "bg";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 1;
+ scale : 1;
+ description {
+ state: "default" 0.0;
+ min: SELECTION_INFO_MIN_HORZ_W_INC SELECTION_INFO_MIN_VER_BOTTOM_86_H_INC;
+ fixed: 1 1;
+ align: 0.5 1.0;
+ rel1.relative: 0.5 1.0;
+ rel2.relative: 0.5 1.0;
+ color: 0 0 0 0;
+ }
+ }
+ part {
+ name: "base";
+ type: RECT;
+ mouse_events: 1;
+ scale : 1;
+ description {
+ state: "default" 0.0;
+ min: 0 SELECTION_INFO_VER_PADDING_INC;
+ fixed: 0 1;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 0.0; to: "bg"; }
+ rel2 { relative: 1.0 0.258; to: "bg"; }
+ color: SELECTION_INFO_BACKGROUND_COLOR_INC;
+ }
+ }
+ part {
+ name: "elm.text";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 0.0;
+ rel1 { to: "base"; }
+ rel2 { to: "base"; }
+ color: SELECTION_INFO_TEXT_COLOR_INC;
+ text {
+ font: "HelveticaNeue";
+ size: SELECTION_INFO_TEXT_FONT_SIZE_INC;
+ text: "";
+ }
+ }
+ }
+ }
+ programs {
+ program {
+ name: "clicked";
+ signal: "mouse,clicked,1";
+ source: "base";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ }
+ }
+
+}
diff --git a/main/layout/ivug-setas.edc b/main/layout/ivug-setas.edc
new file mode 100755
index 0000000..7ec8ab1
--- /dev/null
+++ b/main/layout/ivug-setas.edc
@@ -0,0 +1,278 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#define BTN_CANCEL_WIDTH 86
+#define BTN_CANCEL_HEIGHT 86
+
+#define BTN_OK_WIDTH 86
+#define BTN_OK_HEIGHT 86
+
+#define BTN_CANCEL "T01_btn_cancel.png"
+#define BTN_CANCEL_PRESS "T01_btn_cancel_press.png"
+
+#define BTN_OK "T01_btn_ok.png"
+#define BTN_OK_PRESS "T01_btn_ok_press.png"
+#define BTN_OK_DIM "T01_btn_ok_dim.png"
+
+#define _STATE_ENABLED 1
+#define _STATE_DISABLED 0
+
+collections {
+ group {
+ name: "setas_view";
+
+ images {
+ image: BTN_CANCEL COMP;
+ image: BTN_CANCEL_PRESS COMP;
+
+ image: BTN_OK COMP;
+ image: BTN_OK_PRESS COMP;
+ image: BTN_OK_DIM COMP;
+ }
+ script {
+ public ok_state = _STATE_ENABLED;
+ }
+ parts{
+ part {
+ name: "bg";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 0;
+ 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: "setasview.photocam";
+ type: SWALLOW;
+ mouse_events: 1;
+ repeat_events: 0;
+ scale: 1; //allow scaling
+
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0 0; to:bg; }
+ rel2 { relative: 1 1; to:bg; }
+ }
+ }
+
+ 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: "setasview.btn_cancel";
+ type: IMAGE;
+ scale: 1;
+ mouse_events: 1;
+ description {
+ visible: 0;
+ min: BTN_CANCEL_WIDTH BTN_CANCEL_HEIGHT;
+ max: BTN_CANCEL_WIDTH BTN_CANCEL_HEIGHT;
+ fixed: 1 1;
+ state: "default" 0.0;
+ align: 1.0 1.0;
+ rel1 { relative: 0.0 0.0;}
+ rel2 { relative: 0.944 0.975;}
+ }
+
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image.normal: BTN_CANCEL;
+ }
+
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image.normal: BTN_CANCEL_PRESS;
+ }
+
+ description {
+ state: "hide" 0.0;
+ visible: 0;
+ }
+ }
+
+ part { name: "setasview.btn_ok";
+ type: IMAGE;
+ scale: 1;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ min: BTN_OK_WIDTH BTN_OK_HEIGHT;
+ max: BTN_OK_WIDTH BTN_OK_HEIGHT;
+ fixed: 1 1;
+ align: 0.0 1.0;
+ image.normal: BTN_OK;
+ rel1 { relative: 0.056 0.0;}
+ rel2 { relative: 1.0 0.975;}
+ }
+
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ image.normal: BTN_OK_PRESS;
+ }
+
+ description {
+ state: "dim" 0.0;
+ inherit: "default" 0.0;
+ image.normal: BTN_OK_DIM;
+ }
+
+ description {
+ state: "hide" 0.0;
+ visible: 0;
+ }
+ }
+ }
+
+ programs {
+
+/* For button cancel */
+ program {
+ name: "hide_btn_cancel";
+ signal: "setasview,hide,btn_cancel";
+ source: "elm";
+ action: STATE_SET "hide" 0.0;
+ target: "setasview.btn_cancel";
+ }
+
+ program {
+ name: "show_btn_cancel";
+ signal: "setasview,show,btn_cancel";
+ source: "elm";
+ action: STATE_SET "show" 0.0;
+ target: "setasview.btn_cancel";
+ }
+
+ program {
+ name: "btn_cancel_mouse_down";
+ signal: "mouse,down,1";
+ source: "setasview.btn_cancel";
+ action: STATE_SET "pressed" 0.0;
+ target: "setasview.btn_cancel";
+ }
+
+ program {
+ name: "btn_cancel_mouse_up";
+ signal: "mouse,up,1";
+ source: "setasview.btn_cancel";
+ after: "show_btn_cancel";
+ }
+
+ program {
+ name: "btn_cancel_clicked";
+ signal: "mouse,clicked,1";
+ source: "setasview.btn_cancel";
+ action: SIGNAL_EMIT "setasview,cancel,clicked" "";
+ }
+
+/* For button ok */
+ program {
+ name: "hide_btn_set";
+ signal: "setasview,hide,btn_ok";
+ source: "elm";
+ action: STATE_SET "hide" 0.0;
+ target: "setasview.btn_ok";
+ }
+
+ program {
+ name: "show_btn_set";
+ signal: "setasview,show,btn_ok";
+ source: "elm";
+ script {
+ if ( get_int(ok_state) == _STATE_DISABLED )
+ set_state(PART:"setasview.btn_ok", "dim", 0.0);
+ else
+ set_state(PART:"setasview.btn_ok", "default", 0.0);
+ }
+ }
+ program {
+ name: "dim_btn_set";
+ signal: "setasview,disable,btn_ok";
+ source: "elm";
+
+ script {
+ set_int(ok_state, _STATE_DISABLED);
+ set_state(PART:"setasview.btn_ok", "dim", 0.0);
+ }
+ }
+
+ program {
+ name: "enable_btn_set";
+ signal: "setasview,enable,btn_ok";
+ source: "elm";
+ script {
+ set_int(ok_state, _STATE_ENABLED);
+ set_state(PART:"setasview.btn_ok", "default", 0.0);
+ }
+ }
+
+ program {
+ name: "btn_set_mouse_down";
+ signal: "mouse,down,1";
+ source: "setasview.btn_ok";
+
+ script {
+ if ( get_int(ok_state) == _STATE_ENABLED )
+ set_state(PART:"setasview.btn_ok", "pressed", 0.0);
+ }
+ }
+
+ program {
+ name: "btn_set_mouse_up";
+ signal: "mouse,up,1";
+ source: "setasview.btn_ok";
+ after: "show_btn_set";
+ }
+
+ program {
+ name: "btn_set_clicked";
+ signal: "mouse,clicked,1";
+ source: "setasview.btn_ok";
+ script {
+ if ( get_int(ok_state) == _STATE_ENABLED )
+ {
+ emit("setasview,set,clicked", "");
+ }
+ }
+ }
+
+ }
+ }
+}
diff --git a/main/layout/ivug-slider.edc b/main/layout/ivug-slider.edc
new file mode 100755
index 0000000..ea0c0b7
--- /dev/null
+++ b/main/layout/ivug-slider.edc
@@ -0,0 +1,180 @@
+/*
+ * 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
+
+collections {
+group {
+
+ name: "slider";
+
+ images {
+ image: "T01_btn_play.png" COMP;
+ }
+
+ parts {
+
+ part { name: "background";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 255;
+ visible: 1;
+ rel1 { relative: 0.0 0.0;}
+ rel2 { relative: 1.0 1.0;}
+ }
+ }
+
+ part { name: "slider.photocam";
+ type: SWALLOW;
+ mouse_events: 1;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ }
+ }
+
+ part { name: "slider.thumbnail";
+ type: SWALLOW;
+ mouse_events: 1;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 0.5;
+ visible: 0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ }
+
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+
+
+ part { name: "slider.icon";
+ type: IMAGE;
+ mouse_events: 1;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 0.5;
+ visible: 0;
+ fixed: 1 1;
+ max: 72 72;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ image.normal: "T01_btn_play.png";
+ }
+
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+
+ part { name: "slider.progress";
+ type: SWALLOW;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 0.5;
+ visible: 0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ }
+
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+
+ } //parts
+
+ programs {
+
+ program {
+ name: "show_thumbnail";
+ signal: "elm,state,show_thumbnail";
+ source: "slider";
+ action: STATE_SET "show" 0.0;
+ target: "slider.thumbnail";
+ }
+
+ program {
+ name: "hide_thumbnail";
+ signal: "elm,state,hide_thumbnail";
+ source: "slider";
+ action: STATE_SET "default" 0.0;
+ target: "slider.thumbnail";
+ }
+
+ program {
+ name: "show_icon";
+ signal: "elm,state,show_icon";
+ source: "slider";
+ action: STATE_SET "show" 0.0;
+ target: "slider.icon";
+ }
+
+ program {
+ name: "hide_icon";
+ signal: "elm,state,hide_icon";
+ source: "slider";
+ action: STATE_SET "default" 0.0;
+ target: "slider.icon";
+ }
+
+ program {
+ name: "show_progress";
+ signal: "elm,state,show,progress";
+ source: "slider";
+ action: STATE_SET "show" 0.0;
+ target: "slider.progress";
+ }
+
+ program {
+ name: "hide_progress";
+ signal: "elm,state,hide,progress";
+ source: "slider";
+ action: STATE_SET "default" 0.0;
+ target: "slider.progress";
+ }
+
+ program {
+ name: "icon_click";
+ signal: "mouse,clicked,1";
+ source: "slider.icon";
+ action: SIGNAL_EMIT "slider,icon,click" "";
+ }
+
+ }//programs
+
+ } //group
+
+}
diff --git a/main/layout/ivug-toolbar.edc b/main/layout/ivug-toolbar.edc
new file mode 100755
index 0000000..c65ea20
--- /dev/null
+++ b/main/layout/ivug-toolbar.edc
@@ -0,0 +1,886 @@
+/*
+ * 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\widgets\toolbar.edc
+*/
+
+#define ITEM_STATE_ENABLED 0
+#define ITEM_STATE_DISABLED 1
+
+/* 1.0 */
+#define BUTTON_CONTROLBAR_ITEM_BUTTON_TEXT_SIZE_INC 28
+#define BUTTON_CONTROLBAR_ITEM_BUTTON_TEXTBLOCK_COLOR_INC "#f9f9f9"
+#define BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC 56 56
+
+#define BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC 249 249 249 255
+#define BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC 249 249 249 255
+
+collections {
+
+ group { name: "elm/toolbar/base/ivug-toolbar/default";
+ images {
+ image: "T01_toolbar_bg.png" COMP;
+ }
+ parts {
+ part { name: "base";
+ mouse_events: 1;
+ description { state: "default" 0.0;
+ image.normal: "T01_toolbar_bg.png";
+ }
+ }
+ part { name: "clipper";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ rel1 {
+ to: "base";
+ offset: 2 2;
+ }
+ rel2 {
+ to: "base";
+ offset: -3 -3;
+ }
+ }
+ }
+ part { name: "elm.swallow.content";
+ clip_to: "clipper";
+ type: SWALLOW;
+ description {
+ state: "default" 0.0;
+ rel1.to: "clipper";
+ rel2.to: "clipper";
+ }
+ }
+ part { name: "event";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ }
+ }
+
+ group { name: "elm/toolbar/item/ivug-toolbar/default";
+ images {
+ image: "T01_toolbar_press.png" COMP;
+ }
+ styles{
+ style { name: "toolbar_style";
+ base: "font=SLP:style=Medium font_size="BUTTON_CONTROLBAR_ITEM_BUTTON_TEXT_SIZE_INC" align=center color="BUTTON_CONTROLBAR_ITEM_BUTTON_TEXTBLOCK_COLOR_INC" wrap=mixed ellipsis=1";
+ tag: "br" "\n";
+ tag: "ps" "ps";
+ tag: "hilight" "+ font=SLP:style=Bold";
+ tag: "b" "+ font=SLP:style=Bold";
+ tag: "tab" "\t";
+ }
+ }
+
+ data.item: "transition_animation_on" "1";
+ script {
+ public item_state = ITEM_STATE_ENABLED;
+ }
+ parts {
+ part { name: "bg";
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 0;
+ color: 255 255 255 0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "padding_right_bottom";
+ }
+ image {
+ normal: "T01_toolbar_press.png";
+ border: 3 3 3 3;
+ }
+ image.middle: SOLID;
+ fill.smooth: 0;
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: 255 255 255 255;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ color: 255 255 255 0;
+ }
+ }
+ part { name: "padding_left_top";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel2.relative: 0.0 0.0;
+ min: 10 8;
+ fixed: 1 1;
+ visible: 1;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "padding_right_bottom";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 1.0 1.0;
+ rel1.relative: 1.0 1.0;
+ min: 10 5;
+ fixed: 1 1;
+ visible: 1;
+ color: 0 0 0 0;
+ }
+ }
+ part {
+ name: "icon_rect";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ min: 0 0;
+ fixed: 0 1;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_left_top";
+ }
+ align: 0.5 0.0;
+ color: 0 0 0 0;
+ }
+ description { state: "visible" 0.0;
+ min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ fixed: 0 1;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_left_top";
+ }
+ align: 0.5 0.0;
+ color: 0 0 0 0;
+ }
+ description { state: "icononly" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ part { name: "padding_after_icon";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0; //when only icon or no icon is there
+ align: 0.0 0.0;
+ rel1 {
+ relative: 0.0 1.0;
+ to: "icon_rect";
+ }
+ rel2.to: "icon_rect";
+ fixed: 0 1;
+ min: 0 0;
+ color: 0 0 0 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "icononly" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ part { name: "padding_before_text";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0; //when only icon or no icon is there
+ align: 0.5 1.0;
+ rel1 {
+ relative: 1.0 0.0;
+ to_x: "padding_left_top";
+ to_y: "elm.text";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "padding_right_bottom";
+ to_y: "elm.text";
+ }
+ fixed: 0 1;
+ min: 0 0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "elm.swallow.icon";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "elm.icon.clipper";
+ description { state: "default" 0.0;
+ visible: 0;
+ align: 0.5 0.0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_left_top";
+ }
+ fixed: 0 1;
+ }
+ description { state: "visible" 0.0;
+ fixed: 0 1;
+ min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_before_text";
+ }
+ aspect: 1.0 1.0;
+ aspect_preference: HORIZONTAL;
+ }
+ description { state: "icononly" 0.0;
+ min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "padding_right_bottom";
+ }
+ aspect: 1.0 1.0;
+ aspect_preference: HORIZONTAL;
+ }
+ }
+ part { name: "elm.swallow.icon_new";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "elm.icon_new.clipper";
+ description { state: "default" 0.0;
+ visible: 0;
+ align: 0.5 0.0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_left_top";
+ }
+ fixed: 0 1;
+ }
+ description { state: "visible" 0.0;
+ fixed: 0 1;
+ min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_before_text";
+ }
+ aspect: 1.0 1.0;
+ aspect_preference: HORIZONTAL;
+ }
+ description { state: "icononly" 0.0;
+ min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "padding_right_bottom";
+ }
+ aspect: 1.0 1.0;
+ aspect_preference: HORIZONTAL;
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "elm.text.clipper";
+ description { state: "default" 0.0;
+ visible: 1;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "padding_left_top";
+ to_y: "padding_after_icon";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "padding_right_bottom";
+ }
+ color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
+ fixed: 1 1;
+ text {
+ style: "toolbar_style";
+ min: 0 1;
+ max: 0 1;
+ }
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ description { state: "focused" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ }
+ part { name: "elm.text_new";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "elm.text_new.clipper";
+ description { state: "default" 0.0;
+ visible: 1;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "padding_left_top";
+ to_y: "padding_after_icon";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "padding_right_bottom";
+ }
+ color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
+ fixed: 1 1;
+ text {
+ style: "toolbar_style";
+ min: 0 1;
+ max: 0 1;
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ description { state: "focused" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ }
+ part { name: "elm.text.clipper";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ description { state: "animation" 0.0;
+ color: 255 255 255 0;
+ }
+ description { state: "disabled" 0.0;
+ color: 255 255 255 153;
+ }
+ }
+ part { name: "elm.text_new.clipper";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 0;
+ }
+ description { state: "animation" 0.0;
+ color: 255 255 255 255;
+ }
+ }
+ part { name: "elm.icon.clipper";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ description { state: "animation" 0.0;
+ color: 255 255 255 0;
+ }
+ description { state: "disabled" 0.0;
+ color: 255 255 255 153;
+ }
+ }
+ part { name: "elm.icon_new.clipper";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 0;
+ }
+ description { state: "animation" 0.0;
+ color: 255 255 255 255;
+ }
+ }
+ part { name: "event";
+ type: RECT;
+ mouse_events: 1;
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "event2";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ }
+ programs {
+ program { name: "pressed";
+ signal: "mouse,down,1";
+ source: "event";
+ script {
+ if (get_int(item_state) != ITEM_STATE_DISABLED)
+ set_state(PART:"bg", "selected", 0.0);
+ }
+ transition: LINEAR 0.2;
+ }
+ program { name: "unpressed";
+ signal: "mouse,up,1";
+ source: "event2";
+ action: STATE_SET "default" 0.0;
+ target: "bg";
+ transition: LINEAR 0.1;
+ }
+ program { name: "go";
+ signal: "mouse,up,1";
+ source: "event";
+ action: SIGNAL_EMIT "elm,action,click" "elm";
+ }
+ program { name: "mouse,in";
+ signal: "mouse,in";
+ source: "event";
+ action: SIGNAL_EMIT "elm,mouse,in" "elm";
+ }
+ program { name: "mouse,out";
+ signal: "mouse,out";
+ source: "event";
+ action: SIGNAL_EMIT "elm,mouse,out" "elm";
+ }
+ program { name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "bg";
+ after: "disable_text";
+ }
+ program { name: "disable_text";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ {
+ set_state(PART:"elm.text", "disabled_visible", 0.0);
+ set_state(PART:"elm.text_new", "disabled_visible", 0.0);
+ }
+ else
+ {
+ set_state(PART:"elm.text", "disabled", 0.0);
+ set_state(PART:"elm.text_new", "disabled", 0.0);
+ }
+ set_state(PART:"elm.text.clipper", "disabled", 0.0);
+ set_state(PART:"elm.icon.clipper", "disabled", 0.0);
+ set_int(item_state, ITEM_STATE_DISABLED);
+ }
+ }
+ program { name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "bg";
+ after: "enable_text";
+ }
+ program { name: "enable_text";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "disabled_visible"))
+ {
+ set_state(PART:"elm.text", "visible", 0.0);
+ set_state(PART:"elm.text_new", "visible", 0.0);
+ }
+ else
+ {
+ set_state(PART:"elm.text", "default", 0.0);
+ set_state(PART:"elm.text_new", "default", 0.0);
+ }
+ set_state(PART:"elm.text.clipper", "default", 0.0);
+ set_state(PART:"elm.icon.clipper", "default", 0.0);
+ set_int(item_state, ITEM_STATE_ENABLED);
+ }
+ }
+ program { name: "label_set,animation,forward";
+ signal: "elm,state,label_set,forward";
+ source: "elm";
+ after: "label_set,animation";
+ }
+ program { name: "label_set,animation,backward";
+ signal: "elm,state,label_set,backward";
+ source: "elm";
+ after: "label_set,animation";
+ }
+ program { name: "label_set,animation";
+ signal: "elm,state,label_set";
+ source: "elm";
+ action: STATE_SET "animation" 0.0;
+ target: "elm.text.clipper";
+ target: "elm.text_new.clipper";
+ transition: LINEAR 0.2;
+ after: "label_set,animation,done";
+ }
+ program { name: "label_set,animation,done";
+ action: SIGNAL_EMIT "elm,state,label_set,done" "elm";
+ }
+ program { name: "label,reset";
+ signal: "elm,state,label,reset";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.text.clipper";
+ target: "elm.text_new.clipper";
+ }
+ program { name: "icon_set,animation,forward";
+ signal: "elm,state,icon_set,forward";
+ source: "elm";
+ after: "icon_set,animation";
+ }
+ program { name: "icon_set,animation,backward";
+ signal: "elm,state,icon_set,backward";
+ source: "elm";
+ after: "icon_set,animation";
+ }
+ program { name: "icon_set,animation";
+ signal: "elm,state,icon_set";
+ source: "elm";
+ action: STATE_SET "animation" 0.0;
+ target: "elm.icon.clipper";
+ target: "elm.icon_new.clipper";
+ transition: LINEAR 0.2;
+ after: "icon_set,animation,done";
+ }
+ program { name: "icon_set,animation,done";
+ action: SIGNAL_EMIT "elm,state,icon_set,done" "elm";
+ }
+ program { name: "icon,reset";
+ signal: "elm,state,icon,reset";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.icon.clipper";
+ target: "elm.icon_new.clipper";
+ }
+ program { name: "text_show";
+ signal: "elm,state,text,visible";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.swallow.icon", st, 30, vl);
+ if (!strcmp(st, "icononly"))
+ {
+ set_state(PART:"elm.swallow.icon", "visible", 0.0);
+ set_state(PART:"icon_rect", "visible", 0.0);
+ set_state(PART:"padding_after_icon", "visible", 0.0);
+ }
+ set_state(PART:"elm.text", "visible", 0.0);
+ }
+ }
+ program { name: "text_hide";
+ signal: "elm,state,text,hidden";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.swallow.icon", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ {
+ set_state(PART:"elm.swallow.icon", "icononly", 0.0);
+ set_state(PART:"icon_rect", "icononly", 0.0);
+ set_state(PART:"padding_after_icon", "icononly", 0.0);
+ }
+ set_state(PART:"elm.text", "default", 0.0);
+ }
+ }
+ program { name: "icon_show";
+ signal: "elm,state,icon,visible";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ {
+ set_state(PART:"elm.swallow.icon", "visible", 0.0);
+ set_state(PART:"icon_rect", "visible", 0.0);
+ set_state(PART:"padding_after_icon", "visible", 0.0);
+ }
+ else
+ {
+ set_state(PART:"elm.swallow.icon", "icononly", 0.0);
+ set_state(PART:"icon_rect", "icononly", 0.0);
+ set_state(PART:"padding_after_icon", "icononly", 0.0);
+ }
+ }
+ }
+ }
+ }
+
+ group { name: "elm/toolbar/item/ivug-toolbar/item_horizontal";
+ inherit: "elm/toolbar/item/ivug-toolbar/default";
+ script {
+ public item_state = ITEM_STATE_ENABLED;
+ }
+ parts {
+ part { name: "icon_rect";
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ align: 0.0 0.5;
+ }
+ description { state: "visible" 0.0;
+ fixed: 1 0;
+ rel2 {
+ relative: 1.0 0.0;
+ to_x: "padding_left_top";
+ to_y: "padding_right_bottom";
+ }
+ align: 0.0 0.5;
+ }
+ }
+ part { name: "padding_after_icon";
+ description { state: "default" 0.0; //when only icon or no icon is there
+ rel1.relative: 1.0 0.0;
+ fixed: 1 1;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: 6 0;
+ }
+ }
+ part { name: "padding_before_text";
+ description { state: "default" 0.0; //when only icon or no icon is there
+ align: 1.0 0.5;
+ rel1 {
+ relative: 0.0 1.0;
+ to_x: "elm.text";
+ to_y: "padding_left_top";
+ }
+ rel2 {
+ to_x: "elm.text";
+ to_y: "padding_right_bottom";
+ }
+ fixed: 1 0;
+ min: 6 0;
+ }
+ }
+ part { name: "elm.swallow.icon";
+ description { state: "default" 0.0;
+ align: 0.0 0.5;
+ rel2 {
+ relative: 1.0 0.0;
+ to_x: "padding_left_top";
+ to_y: "padding_right_bottom";
+ }
+ fixed: 1 0;
+ }
+ description { state: "visible" 0.0;
+ fixed: 1 0;
+ align: 1.0 0.5;
+ rel1 {
+ relative: 0.0 1.0;
+ to_x: "padding_before_text";
+ to_y: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "padding_before_text";
+ to_y: "padding_right_bottom";
+ }
+ aspect_preference: VERTICAL;
+ }
+ description { state: "icononly" 0.0;
+ aspect_preference: VERTICAL;
+ }
+ }
+ part { name: "elm.swallow.icon_new";
+ description { state: "default" 0.0;
+ align: 0.0 0.5;
+ rel2 {
+ relative: 1.0 0.0;
+ to_x: "padding_left_top";
+ to_y: "padding_right_bottom";
+ }
+ fixed: 1 0;
+ }
+ description { state: "visible" 0.0;
+ fixed: 1 0;
+ align: 1.0 0.5;
+ rel1 {
+ relative: 0.0 1.0;
+ to_x: "padding_before_text";
+ to_y: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "padding_before_text";
+ to_y: "padding_right_bottom";
+ }
+ aspect_preference: VERTICAL;
+ }
+ description { state: "icononly" 0.0;
+ aspect_preference: VERTICAL;
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ description { state: "default" 0.0;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "padding_after_icon";
+ to_y: "padding_left_top";
+ }
+ text {
+ style: "toolbar_style";
+ min: 1 0;
+ max: 1 0;
+ }
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ description { state: "focused" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ }
+ part { name: "elm.text_new";
+ type: TEXTBLOCK;
+ description { state: "default" 0.0;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "padding_after_icon";
+ to_y: "padding_left_top";
+ }
+ text {
+ style: "toolbar_style";
+ min: 1 0;
+ max: 1 0;
+ }
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ description { state: "focused" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ }
+ }
+ }
+
+ /*group { name: "elm/toolbar/separator/ivug-toolbar/default";
+ images {
+ image: "separator_v.png" COMP;
+ }
+ parts {
+ part { name: "separator"; // separator group
+ description { state: "default" 0.0;
+ min: 2 2;
+ max: 2 9999;
+ rel1.offset: 4 4;
+ rel2.offset: -5 -5;
+ image {
+ normal: "separator_v.png";
+ }
+ fill {
+ smooth: 0;
+ }
+ }
+ }
+ }
+ }*/
+
+ group { name: "elm/toolbar/object/ivug-toolbar/default";
+ parts {
+ part { name: "elm.swallow.object"; // object group
+ type: SWALLOW;
+ description {
+ state: "default" 0.0;
+ }
+ }
+ }
+ }
+}
+
diff --git a/main/res/images/01_Control icon/T01_controlbar_icon_delete.png b/main/res/images/01_Control icon/T01_controlbar_icon_delete.png
new file mode 100755
index 0000000..c13897d
--- /dev/null
+++ b/main/res/images/01_Control icon/T01_controlbar_icon_delete.png
Binary files differ
diff --git a/main/res/images/01_Control icon/T01_controlbar_icon_info.png b/main/res/images/01_Control icon/T01_controlbar_icon_info.png
new file mode 100755
index 0000000..9e746c8
--- /dev/null
+++ b/main/res/images/01_Control icon/T01_controlbar_icon_info.png
Binary files differ
diff --git a/main/res/images/01_Control icon/T01_controlbar_icon_slideshow.png b/main/res/images/01_Control icon/T01_controlbar_icon_slideshow.png
new file mode 100755
index 0000000..79c2ebd
--- /dev/null
+++ b/main/res/images/01_Control icon/T01_controlbar_icon_slideshow.png
Binary files differ
diff --git a/main/res/images/T01_Nocontents_broken.png b/main/res/images/T01_Nocontents_broken.png
new file mode 100755
index 0000000..9326d0a
--- /dev/null
+++ b/main/res/images/T01_Nocontents_broken.png
Binary files differ
diff --git a/main/res/images/image_drm_no_rights.jpg b/main/res/images/image_drm_no_rights.jpg
new file mode 100755
index 0000000..453af00
--- /dev/null
+++ b/main/res/images/image_drm_no_rights.jpg
Binary files differ
diff --git a/main/res/po/CMakeLists.txt b/main/res/po/CMakeLists.txt
new file mode 100755
index 0000000..1bead45
--- /dev/null
+++ b/main/res/po/CMakeLists.txt
@@ -0,0 +1,25 @@
+# for i18n
+
+SET(POFILES de_DE.po el_GR.po en.po es_ES.po fr_FR.po it_IT.po ja_JP.po ko_KR.po
+nl_NL.po pt_PT.po ru_RU.po tr_TR.po zh_CN.po zh_HK.po zh_TW.po)
+
+SET(MSGFMT "/usr/bin/msgfmt")
+
+FOREACH(pofile ${POFILES})
+ SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+ MESSAGE("PO: ${pofile}")
+ GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+ GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+ SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${moFile}
+ COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+ DEPENDS ${absPofile}
+ )
+ INSTALL(FILES ${moFile}
+ DESTINATION /opt/ug/res/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+ SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
diff --git a/main/res/po/POTFILES.in b/main/res/po/POTFILES.in
new file mode 100755
index 0000000..c6b625a
--- /dev/null
+++ b/main/res/po/POTFILES.in
@@ -0,0 +1 @@
+# List of source files containing translatable strings.
diff --git a/main/res/po/de_DE.po b/main/res/po/de_DE.po
new file mode 100755
index 0000000..9c924e7
--- /dev/null
+++ b/main/res/po/de_DE.po
@@ -0,0 +1,159 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Gesamtzeit"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Tag hzfg."
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Hinzugefügt"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Jede"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Verfügbare Nutzungen"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Einfach"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Anruferbild"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Anzahl"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Erstellt am"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Anzeige"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Tag-Namen eingeben"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Eintrag ist leer"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Ausführen"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Dateiformat"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Dateispeicherort"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Weiterleitung"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Home-Hintergrund"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Nicht möglich"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Individuell"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Intervall"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Ungültige Bilddatei"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Breite"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Standorte"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Sperre-Hintergrund"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Länge"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Maximale Anzahl an Zeichen (%d) erreicht."
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "Entfällt"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Neues Tag"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Berechtigung abgelehnt"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Möglich"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Drucken"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Über Bluetooth drucken"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Auflösung"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Copyright-Status"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD-Karte entfernt"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Gerät auswählen"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Servername"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Einstellen als"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Hintergrund für Home-Bildschirm festlegen und Bildschirm sperren"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Senden via"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Diashow"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Zeitzählung"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Zuschneiden"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Unbegrenzt"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Gültigkeit"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Anbieter"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Dateiübertragung"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Nicht mehr anzeigen"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Tippen und halten Sie zwei Punkte fest. Kippen Sie dann das Gerät hin und her, um den Bildschirm zu verkleinern oder zu vergrößern."
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Kipp-Funktion"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Alle Alben"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Tag-Info"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Hintergrund für gesperrten und Home-Bildschirm"
+
diff --git a/main/res/po/el_GR.po b/main/res/po/el_GR.po
new file mode 100755
index 0000000..865fd29
--- /dev/null
+++ b/main/res/po/el_GR.po
@@ -0,0 +1,159 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Συνολικός χρόνος"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Πρ. ετικ."
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Προστέθηκε"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Οποιοδήποτε"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Διαθέσιμες χρήσεις"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Βασικός"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Εικόνα καλούντος"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Πλήθος αρχείων"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Ημερομηνία δημιουργίας"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Οθόνη"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Καταχώριση ονόματος ετικέτας"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Κενή καταχώρηση"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Εκτέλεση"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Μορφή αρχείου"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Θέση αρχείου"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Προώθηση"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Φόντο αρχικής οθόνης"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Αδύνατο"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Μεμονωμένο"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Διάστημα"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Μη έγκυρο αρχείο εικόνας"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Γεωγραφικό πλάτος"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Θέσεις"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Φόντο οθόνης κλειδώμ."
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Γεωγραφικό μήκος"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Συμπληρώθηκε ο μέγιστος αριθμός χαρακτήρων (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "Μη διαθέσιμο"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Νέα ετικέτα"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Δεν έχετε δικαίωμα πρόσβασης"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Δυνατό"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Εκτύπωση"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Εκτύπωση μέσω Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Ανάλυση"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Κατάσταση δικαιώματος"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "Αφαιρέθηκε η κάρτα SD"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Επιλογή συσκευής"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Όνομα διακομιστή"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Ορισμός ως"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Ορισμός φόντου για την αρχική οθόνη και την οθόνη κλειδώματος"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Κοινόχρηστο"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Παρουσίαση"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Χρονομετρημένη μέτρηση"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Ξάκρισμα"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Απεριόριστες"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Ισχύς"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Προμηθευτής"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Μεταφορά αρχείου"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Να μην εμφανιστεί ξανά"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Πατήστε παρατεταμένα δύο σημεία και περιστρέψτε τη συσκευή προς τα εμπρός ή προς τα πίσω για μεγέθυνση ή σμίκρυνση της οθόνης"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Πληροφορίες για τη λειτουργία κλίσης"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Όλα τα άλμπουμ"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Ετικέτα"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Ταπετσαρία αρχικής οθόνης και οθόνης κλειδώματος"
+
diff --git a/main/res/po/en.po b/main/res/po/en.po
new file mode 100755
index 0000000..265973d
--- /dev/null
+++ b/main/res/po/en.po
@@ -0,0 +1,159 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Accumulated time"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Add tag"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Added"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Any"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Available uses"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Basic"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Caller image"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Count"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Date created"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Display"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Enter tag name"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Entry is empty"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Execute"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "File format"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "File location"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Forwarding"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Home screen wallpaper"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Impossible"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Individual"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Interval"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Invalid image file"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Latitude"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Locations"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Lock screen wallpaper"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Longitude"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Maximum number of characters (%d) reached"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "N/A"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "New tag"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Permission denied"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Possible"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Print"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Print via Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Resolution"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Right status"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD card removed"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Select device"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Server name"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Set as"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Set wallpaper for home screen and lock screen"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Share"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Slide show"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Timed count"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Trim"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Unlimited"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Validity"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Vendor"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "File transfer"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Do not show again"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Tap and hold at two points then tilt device back and forth to reduce or enlarge screen"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Learn about tilt"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "All albums"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Tag"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Home and lock screen wallpaper"
+
diff --git a/main/res/po/es_ES.po b/main/res/po/es_ES.po
new file mode 100755
index 0000000..ee6d2a8
--- /dev/null
+++ b/main/res/po/es_ES.po
@@ -0,0 +1,159 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Tiempo acumulado"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Añad etiq"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Añadido"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Cualquiera"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Usos disponibles"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Básico"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Imagen de llamante"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Contar"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Fecha de creación"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Pantalla"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Introduzca el nombre de la etiqueta"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Entrada vacía"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Ejecutar"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Formato de archivo"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Ubicación de archivo"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Reenviando"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Fondo de pantalla de inicio"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Imposible"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Individual"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Intervalo"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Archivo de imagen no válido"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Latitud"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Ubicaciones"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Fondo de pantalla de bloqueo"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Longitud"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Número máximo de caracteres (%d) alcanzado"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "N/A"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Nueva etiqueta"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Permiso denegado"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Posible"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Imprimir"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Imprimir por Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Resolución"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Estado correcto"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "Se ha extraído la tarjeta SD"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Seleccione dispositivo"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Nombre de servidor"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Definir como"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Definir fondo de pantalla para la pantalla de inicio y de bloqueo"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Compartir"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Presentación de diapositivas"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Recuento de tiempo"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Recortar"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Ilimitado"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Validez"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Proveedor"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Transferencia de archivo"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "No mostrar de nuevo"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Mantenga pulsado en dos puntos e incline el dispositivo hacia atrás y hacia adelante para reducir o ampliar la pantalla"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Más información sobre la inclinación"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Todos los álbumes"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Etiqueta"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Fondo de pantalla de pantalla de inicio y bloqueo"
+
diff --git a/main/res/po/fr_FR.po b/main/res/po/fr_FR.po
new file mode 100755
index 0000000..137e9f3
--- /dev/null
+++ b/main/res/po/fr_FR.po
@@ -0,0 +1,159 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Temps accumulé"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Libellé"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Ajouté"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "N'importe"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Utilisations disponibles"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Basique"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Image d'appelant"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Compte"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Date créée"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Affichage"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Entrer un libellé"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Entrée vide"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Exécuter"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Format de fichier"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Emplacement du fichier"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Transfert"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Fond d'écran d'accueil"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Impossible"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Individuel"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Intervalle"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Format de fichier image non valide"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Latitude"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Emplacements"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Fond d'écran de verrouillage"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Longitude"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Nombre maximum de caractères (%d) atteint"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "N/A"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Nouveau libellé"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Autorisation refusée"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Possible"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Imprimer"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Imprimer via Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Résolution"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Information sur les droits"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "Carte SD retirée"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Sélectionnez le périphérique"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Nom du serveur"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Définir comme"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Définir un fond d'écran pour les écrans d'accueil et de verrouillage"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Partager"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Diaporama"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Temps restant"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Rogner"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Illimité"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Validité"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Fournisseur"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Transfert de fichiers"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Ne plus afficher"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Appuyez de façon prolongée sur deux points, puis inclinez l'appareil d'avant en arrière pour réduire ou agrandir l'écran"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Présentation de la fonction zoom"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Tous les albums"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Etiqueter"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Fonds d'écran de verrouillage et d'accueil"
+
diff --git a/main/res/po/it_IT.po b/main/res/po/it_IT.po
new file mode 100755
index 0000000..e54168a
--- /dev/null
+++ b/main/res/po/it_IT.po
@@ -0,0 +1,159 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Tempo accumulato"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Aggiungi tag"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Aggiunto"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Qualsiasi"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Usi disponibili"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Di base"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Immagine chiamante"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Conteggio"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Data creazione"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Display"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Inserire nome tag"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Voce vuota"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Esegui"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Formato file"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Posizione file"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Inoltro"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Sfondo schermata Home"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Impossibile"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Individuale"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Intervallo"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "File immagine non valido"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Latitudine"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Posizioni"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Blocca sfondo schermo"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Longitudine"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Raggiunto numero massimo di caratteri (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "N/D"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Nuovo tag"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Permesso negato"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Possibile"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Stampa"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Stampa con Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Risoluzione"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Stato diritti"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "Scheda SD rimossa"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Seleziona dispositivo"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Nome server"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Imposta come"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Imposta sfondo per schermata iniziale e schermo bloccato"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Condividi"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Presentazione"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "A termine"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Ritaglia"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Senza limitazioni"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Validità"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Fornitore"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Trasferimento file"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Non mostrare più"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Tocca e tieni premuto lo schermo in due punti quindi inclina il dispositivo avanti o indietro per aumentare o diminuire lo zoom"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Guida inclinazione"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Tutti gli album"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Tag"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Sfondo schermata iniziale e blocco"
+
diff --git a/main/res/po/ja_JP.po b/main/res/po/ja_JP.po
new file mode 100755
index 0000000..cffcb88
--- /dev/null
+++ b/main/res/po/ja_JP.po
@@ -0,0 +1,159 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "累積​時間"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "タグ​を​追加​"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "追加しました。"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "どれか"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "使用​可能"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "標準"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "発信者​画像"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "カウント"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "作成日付"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "画面"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "タグ​名​を​入力​"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "未入力​です"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "実行"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "ファイル​形式"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "ファイルの場所"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "転送"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "ホーム​画面​の​壁紙"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "不可"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "個人"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "間隔"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "画像​ファイル​が​無効​です"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "緯度"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "場所"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "画面ロック時の壁紙"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "経度"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "最大文字数(%d)に達しました。"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "なし"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "新しい​タグ"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "承認が​拒否されました。"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "可能"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "印刷"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Bluetoothで印刷"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "撮影サイズ"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "権限の状態"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "外部SDカードが​取り外されました。"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "デバイス​​選択​"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "サーバー名です"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "登録"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "ホーム​画面​やロック画面の壁紙を設定"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "共有"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "スライドショー"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "時間​カウント"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "トリミング"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "無制限"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "有効性"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "提供元順"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "ファイル​転送"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "今後​表示​しない"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "画面表示を縮小/拡大するには、画面の2箇所を長押しし、端末を前後に傾けます。"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "チルト操作について"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "全アルバム"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "タグ"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "ホーム画面/ロック画面用壁紙"
+
diff --git a/main/res/po/ko_KR.po b/main/res/po/ko_KR.po
new file mode 100755
index 0000000..deb9ac6
--- /dev/null
+++ b/main/res/po/ko_KR.po
@@ -0,0 +1,159 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "사용 시간"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "태그 추가"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "추가되었습니다"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "모든 종류"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "사용 가능"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "기본"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "발신자 이미지"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "횟수"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "생성 날짜"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "화면"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "태그 이름을 입력하세요"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "입력된 내용이 없습니다"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "실행"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "파일 형식"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "파일 위치"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "전송"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "홈 화면 배경화면"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "불가능"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "개인"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "간격"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "이미지 파일이 바르지 않습니다"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "위도"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "위치"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "잠금화면"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "경도"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "최대 글자 수(%d개)를 초과하였습니다"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "N/A"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "태그 추가"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "허가가 거부되었습니다"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "가능"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "인쇄"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "블루투스로 인쇄"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "해상도"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "권한 유효 상태"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD 카드가 제거되었습니다"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "기기 선택"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "서버 이름"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "설정"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "홈 화면 및 잠금화면의 배경화면 설정"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "공유"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "슬라이드쇼"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "시간 경과 후 횟수 계산"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "잘라내기"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "제한 없음"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "유효 횟수"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "판매자"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "파일 전송"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "다시 표시 안 함"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "두 지점을 길게 누른 후 디바이스를 앞뒤로 기울여 화면을 축소하거나 확대하세요"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "기울이기에 대해 알아보기"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "모든 앨범"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "태그"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "홈 및 잠금화면 배경"
+
diff --git a/main/res/po/nl_NL.po b/main/res/po/nl_NL.po
new file mode 100755
index 0000000..5e786da
--- /dev/null
+++ b/main/res/po/nl_NL.po
@@ -0,0 +1,159 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Totale tijd"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Tag toev."
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Toegevoegd"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Alle"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Aantal keer dat het gebruikt mag worden"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Basis"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Afbeelding beller"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Aantal"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Datum gemaakt"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Display"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Tagnaam ingeven"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Geen gegevens"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Uitvoeren"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Bestandsindeling"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Bestandslocatie"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Doorsturen"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Achtergrond startscherm"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Niet mogelijk"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Individueel"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Interval"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Ongeldig afbeeldingsbestand"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Breedtegraad"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Locaties"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Achtergrond vergrendelscherm"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Lengtegraad"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Maximumaantal tekens (%d) bereikt"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "N.v.t."
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Nieuwe tag"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Toestemming geweigerd"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Mogelijk"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Afdrukken"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Afdrukken via Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Resolutie"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Status rechten"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD-kaart verwijderd"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Apparaat selecteren"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Servernaam"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Instellen als"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Achtergrond instellen voor startscherm en vergrendelscherm"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Delen"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Diapresentatie"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Speelduur"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Bijsnijden"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Onbeperkt"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Geldigheid"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Leverancier"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Bestandsoverdracht"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Niet meer tonen"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Tik en houd vast op twee punten en kantel het apparaat heen en terug om het scherm te verkleinen/vergroten"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Informatie over draaibeweging"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Alle albums"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Tag"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Achtergrond voor start- en vergrendelscherm"
+
diff --git a/main/res/po/pt_PT.po b/main/res/po/pt_PT.po
new file mode 100755
index 0000000..ac6f45d
--- /dev/null
+++ b/main/res/po/pt_PT.po
@@ -0,0 +1,159 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Tempo acumulado"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Ad. etiq."
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Adicionado"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Qualquer"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Utilizações disponíveis"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Básico"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Imagem do chamador"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Contagem"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Data criada"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Visor"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Introduzir nome da etiqueta"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Entrada vazia"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Executar"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Formato de ficheiro"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Localização de ficheiro"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Reencaminhar"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Fundo do ecrã princ."
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Impossível"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Individual"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Intervalo"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Ficheiro de imagem inválido"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Latitude"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Localizações"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Fundo ecrã bloqueio"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Longitude"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Número máximo de caracteres (%d) atingido"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "N/A"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Etiqueta nova"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Permissão negada"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Possível"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Imprimir"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Imprimir via Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Resolução"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Estado dos direitos"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "Cartão SD removido"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Seleccionar dispositivo"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Nome do servidor"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Definir como"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Definir fundo do ecrã principal e bloqueio do ecrã"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Partilhar"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Apresentação de slides"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Contagem temporizada"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Recortar"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Ilimitado"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Validade"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Representante"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Transferência de ficheiros"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Não mostrar novamente"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Toque sem soltar em dois pontos e, em seguida, incline o dispositivo para trás e para a frente para reduzir ou aumentar o ecrã"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Aprender a utilizar inclinações"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Todos os álbuns"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Etiqueta"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Fundo do ecrã principal e ecrã bloqueado"
+
diff --git a/main/res/po/ru_RU.po b/main/res/po/ru_RU.po
new file mode 100755
index 0000000..4983089
--- /dev/null
+++ b/main/res/po/ru_RU.po
@@ -0,0 +1,159 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Суммарное время"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "Добавить метку"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Добавлено"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Любой"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Доступно"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Основной"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Фотоопределитель"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "Количество"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Дата создания"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Дисплей"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "Введите название тега"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Пустая запись"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Запуск"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Формат файла"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Расположение файла"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "Пересылка"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Обои главного экрана"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "Невозможно"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Индивидуальный"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Интервал"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Недопустимый файл изображения"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Широта"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Расположения"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Экран блокировки"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Долгота"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Достигнуто максимальное число символов (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "Н/Д"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Новый тег"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "Разрешение не получено"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Возможно"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Печать"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Печать через Bluetooth"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Разрешение"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Состояние прав"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "Карта памяти SD извлечена"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Выберите устройство"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Имя сервера"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Установить как"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Задайте обои для главного экрана и экрана блокировки"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Отправить"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Слайд-шоу"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Счетчик"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Настроить"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Не ограничено"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Период действия"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Поставщик"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Передача файлов"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Не показывать снова"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Чтобы уменьшить или увеличить экран, нажмите и удерживайте две точки, а затем наклоните устройство назад и вперед"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Наклон"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Все альбомы"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "Метка"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Обои для главного экрана и экрана блокировки"
+
diff --git a/main/res/po/tr_TR.po b/main/res/po/tr_TR.po
new file mode 100755
index 0000000..aabaeee
--- /dev/null
+++ b/main/res/po/tr_TR.po
@@ -0,0 +1,159 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "Toplu süre"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "İm ekle"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "Eklendi"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "Herhangi"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "Mevcut kullanımlar"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "Temel"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "Arayanın resmi"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "sayım"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "Oluşturma tarihi"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "Ekran"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "İm adı girin"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "Girdi yok"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "Uygulama"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "Dosya biçimi"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "Dosya konumu"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "İletme"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "Ana ekran duvr kağıdı"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "İmkansız"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "Kişisel"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "Aralık"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "Geçersiz resim dosyası"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "Enlem"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "Yerler"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "Kltli ekran dvrkağıdı"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "Boylam"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "Maksimum karakter sayısına (%d) ulaşıldı"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "Geçerli değil"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "Yeni im"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "İzin reddedildi"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "Mümkün"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "Yazdır"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "Bluetooth ile yazdır"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "Çözünürlük"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "Hak durumu"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD kart çıkartıldı"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "Cihaz seçin"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "Sunucu adı"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "Yap"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "Ana ekran için duvar kağıdı ayarla ve ekranı kilitle"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "Paylaşıma aç"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "Slayt gösterisi"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "Zamanlı sayım"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "Kırp"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "Sınırsız"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "Geçerlilik"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "Sağlayıcı"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "Dosya transferi"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "Bir daha gösterme"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "Ekranı küçültmek veya büyütmek için iki noktaya dokunun ve basılı tutun ardından cihazı geri ve ileri doğru eğin"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "Eğim hakkında bilgi"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "Tüm albümler"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "İm"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "Ana ekran ve kilit ekranı duvar kağıdı"
+
diff --git a/main/res/po/update-po.sh b/main/res/po/update-po.sh
new file mode 100755
index 0000000..8315090
--- /dev/null
+++ b/main/res/po/update-po.sh
@@ -0,0 +1,57 @@
+#!/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/res/po/zh_CN.po b/main/res/po/zh_CN.po
new file mode 100755
index 0000000..5094669
--- /dev/null
+++ b/main/res/po/zh_CN.po
@@ -0,0 +1,159 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "累计时间"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "添加标签"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "已添加"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "任何"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "可用于"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "基本"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "来电图片"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "计数"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "创建日期"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "显示"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "输入标签名称"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "空记录"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "执行"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "文件格式"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "路径"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "转发"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "主屏幕墙纸"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "不可以"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "个人"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "间隔"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "图像文件无效"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "纬度"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "位置"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "锁定屏幕墙纸"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "经度"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "已达到最大字符数(%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "N/A"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "新标签"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "许可被拒绝"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "可以"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "打印"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "通过蓝牙打印"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "分辨率"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "授权状态"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD卡已移除"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "选择设备"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "服务器名称"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "设定为"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "为主屏幕和锁定屏幕设置墙纸"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "共享"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "幻灯片"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "计时"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "修剪"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "无限"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "有效"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "提供者"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "文件传输"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "不要再显示"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "手指按住两点,然后前后倾斜手机以缩小或放大屏幕"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "了解倾斜"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "所有相册"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "标签"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "主屏和锁屏壁纸"
+
diff --git a/main/res/po/zh_HK.po b/main/res/po/zh_HK.po
new file mode 100755
index 0000000..f8fcc7e
--- /dev/null
+++ b/main/res/po/zh_HK.po
@@ -0,0 +1,159 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "累積時間"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "加入標籤"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "已加入"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "任何"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "可供使用"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "灰底"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "來電者圖像"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "計數"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "建立日期"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "顯示"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "輸入標籤名稱"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "空白記錄"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "執行"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "檔案格式"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "檔案位置"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "轉寄中"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "主螢幕牆紙"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "不可以"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "個人"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "間隔"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "圖像檔案無效"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "緯度"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "位置"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "鎖定螢幕牆紙"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "經度"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "已達字元數目上限 (%d)"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "不適用"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "新標籤"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "權限被拒絕"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "可以"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "列印"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "透過藍牙列印"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "解像度"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "版權狀態"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD 卡已移除"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "選擇裝置"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "伺服器名稱"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "設定為"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "為主螢幕和鎖定螢幕設定螢幕牆紙"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "分享"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "投影片播放"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "計時"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "修剪"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "無限制"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "有效期"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "供應商"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "檔案傳輸"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "不要再顯示"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "輕觸並按住兩點,然後來回傾斜手機以縮小或放大螢幕"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "瞭解關於傾斜"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "全部專輯"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "標籤"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "主螢幕與鎖定螢幕牆紙"
+
diff --git a/main/res/po/zh_TW.po b/main/res/po/zh_TW.po
new file mode 100755
index 0000000..495ed00
--- /dev/null
+++ b/main/res/po/zh_TW.po
@@ -0,0 +1,159 @@
+msgid "IDS_IV_BODY_ACCUMULATED_TIME"
+msgstr "累計時間"
+
+msgid "IDS_IV_HEADER_ADD_TAG"
+msgstr "加入標籤"
+
+msgid "IDS_IV_POP_ADDED"
+msgstr "已新增"
+
+msgid "IDS_IV_BODY_ANY"
+msgstr "任何"
+
+msgid "IDS_IV_BODY_AVAILABLE_USES"
+msgstr "可供使用"
+
+msgid "IDS_IV_BODY_BASIC"
+msgstr "基本"
+
+msgid "IDS_IV_BODY_CALLER_IMAGE"
+msgstr "來電者圖像"
+
+msgid "IDS_IV_BODY_COUNT"
+msgstr "計數"
+
+msgid "IDS_IV_BODY_DATE_CREATED"
+msgstr "建立日期"
+
+msgid "IDS_IV_BODY_DISPLAY"
+msgstr "顯示"
+
+msgid "IDS_IV_POP_ENTER_TAG_NAME"
+msgstr "輸入標籤名稱"
+
+msgid "IDS_IV_POP_ENTRY_IS_EMPTY"
+msgstr "項目為空"
+
+msgid "IDS_IV_BODY_EXECUTE"
+msgstr "執行"
+
+msgid "IDS_IV_BODY_FILE_FORMAT"
+msgstr "檔案格式"
+
+msgid "IDS_IV_BODY_FILE_LOCATION"
+msgstr "檔案位置"
+
+msgid "IDS_IV_BODY_FORWARDING"
+msgstr "正在轉寄"
+
+msgid "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"
+msgstr "主螢幕桌布"
+
+msgid "IDS_IV_BODY_IMPOSSIBLE"
+msgstr "不可能"
+
+msgid "IDS_IV_BODY_INDIVIDUAL"
+msgstr "個別"
+
+msgid "IDS_IV_BODY_INTERVAL"
+msgstr "間隔"
+
+msgid "IDS_IV_POP_INVALID_IMAGE_FILE"
+msgstr "影像檔案無效"
+
+msgid "IDS_IV_BODY_LATITUDE"
+msgstr "緯度"
+
+msgid "IDS_IV_BODY_LOCATIONS"
+msgstr "位置"
+
+msgid "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"
+msgstr "鎖定螢幕桌布"
+
+msgid "IDS_IV_BODY_LONGITUDE"
+msgstr "經度"
+
+msgid "IDS_IV_POP_MAXIMUM_NUMBER_OF_CHARACTERS_HPD_REACHED"
+msgstr "達到%個最大字元"
+
+msgid "IDS_IV_BODY_N_A"
+msgstr "不適用"
+
+msgid "IDS_IV_BODY_NEW_TAG"
+msgstr "新標籤"
+
+msgid "IDS_IV_POP_PERMISSION_DENIED"
+msgstr "權限被拒絕"
+
+msgid "IDS_IV_BODY_POSSIBLE"
+msgstr "可能"
+
+msgid "IDS_IV_BODY_PRINT"
+msgstr "列印"
+
+msgid "IDS_IV_OPT_PRINT_VIA_BLUETOOTH"
+msgstr "透過藍牙列印"
+
+msgid "IDS_IV_BODY_RESOLUTION"
+msgstr "解析度"
+
+msgid "IDS_IV_BODY_RIGHT_STATUS"
+msgstr "版權狀態"
+
+msgid "IDS_IV_POP_SD_CARD_REMOVED"
+msgstr "SD卡已移除"
+
+msgid "IDS_IV_POP_SELECT_DEVICE"
+msgstr "選擇裝置"
+
+msgid "IDS_IV_BODY_SERVER_NAME"
+msgstr "伺服器名稱"
+
+msgid "IDS_IV_OPT_SET_AS"
+msgstr "設定為"
+
+msgid "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"
+msgstr "設定主螢幕與鎖定螢幕"
+
+msgid "IDS_IV_OPT_SHARE"
+msgstr "分享"
+
+msgid "IDS_IV_OPT_SLIDE_SHOW"
+msgstr "投影片放映"
+
+msgid "IDS_IV_BODY_TIMED_COUNT"
+msgstr "計時數"
+
+msgid "IDS_IV_OPT_TRIM"
+msgstr "修剪"
+
+msgid "IDS_IV_BODY_UNLIMITED"
+msgstr "無限制"
+
+msgid "IDS_IV_BODY_VALIDITY"
+msgstr "有效期"
+
+msgid "IDS_IV_BODY_VENDOR"
+msgstr "供應商"
+
+msgid "IDS_IV_OPT_FILE_TRANSFER"
+msgstr "檔案傳輸"
+
+msgid "IDS_IV_BODY_DO_NOT_SHOW_AGAIN"
+msgstr "不再顯示"
+
+msgid "IDS_IV_BODY_TAP_AND_HOLD_AT_TWO_POINTS_THEN_TILT_DEVICE_BACK_AND_FORTH_TO_REDUCE_OR_ENLARGE_SCREEN"
+msgstr "輕觸並按住兩點,然後來回傾斜裝置以縮小或放大螢幕"
+
+msgid "IDS_IV_HEADER_LEARN_ABOUT_TILT"
+msgstr "瞭解關於傾斜"
+
+msgid "IDS_IV_HEADER_ALL_ALBUMS"
+msgstr "所有專輯"
+
+msgid "IDS_IV_OPT_TAG"
+msgstr "標籤"
+
+msgid "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"
+msgstr "主螢幕與鎖定畫面桌布"
+
diff --git a/main/src/common/ivug-common.h b/main/src/common/ivug-common.h
new file mode 100755
index 0000000..ba817eb
--- /dev/null
+++ b/main/src/common/ivug-common.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __IVUG_COMMON_H__
+#define __IVUG_COMMON_H__
+
+#include "ivug-define.h"
+#include "ivug-datatypes.h"
+#include "ivug-uuid.h"
+
+#include <Elementary.h>
+#include <assert.h>
+
+#include "statistics.h"
+#include "ivug-debug.h"
+#include "ivug-string.h"
+#include "ivug-util.h"
+#include "ivug-define.h"
+#include "ivug-config.h"
+#include "ivug-widget.h"
+
+
+#define _EDJ(o) elm_layout_edje_get(o)
+
+#define IMAGE_BETWEEN_MARGIN (30) // The value is width between photocam(unit is pixel).
+
+#endif /* __IVUG_COMMON_H__ */
+
diff --git a/main/src/common/ivug-config.c b/main/src/common/ivug-config.c
new file mode 100755
index 0000000..06efce5
--- /dev/null
+++ b/main/src/common/ivug-config.c
@@ -0,0 +1,200 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "ivug-common.h"
+#include "ivug-define.h"
+#include "ivug-effect.h"
+#include "ivug-config.h"
+
+#include <vconf.h>
+#include <vconf-keys.h>
+
+// TODO: Request vconf key to setting part, Slide show setting vconf key
+#define VCONFKEY_GALLERY_INTERVAL_TIME "db/setting/gallery/interval_time" //double
+#define VCONFKEY_GALLERY_REPEAT_STATE "db/setting/gallery/repeat_state" //boolean
+#define VCONFKEY_GALLERY_SHUFFLE_STATE "db/setting/gallery/shuffle_state" //boolean
+#define VCONFKEY_GALLERY_TRANSITION_EFFECT "db/setting/gallery/ss_effect" //char
+
+enum { STATE_FALSE = 0, STATE_TRUE = 1, };
+
+/*
+ Set lock screen with given image.
+
+ CAUTION : does not check filepath integrity
+*/
+bool ivug_config_set_lockscreen_image(const char* filepath)
+{
+ if(filepath == NULL)
+ {
+ MSG_IMAGEVIEW_ERROR("Lock screen path is NULL");
+ return FALSE;
+ }
+
+ if(vconf_set_str( VCONFKEY_IDLE_LOCK_BGSET, filepath ) < 0)
+ {
+ MSG_IMAGEVIEW_ERROR("Lockscreen set Error : %s", filepath);
+ return FALSE;
+ }
+
+ MSG_IMAGEVIEW_HIGH("Set Lockscreen filepath = %s", filepath);
+
+ return TRUE;
+}
+
+/*
+ Set home screen with given image
+
+ CAUTION : does not check filepath integrity
+*/
+bool ivug_config_set_homescreen_image( const char* filepath )
+{
+ if(filepath == NULL)
+ {
+ MSG_IMAGEVIEW_ERROR("Home screen path is NULL");
+ return FALSE;
+ }
+// TODO : Need to check file existence?????
+ if(vconf_set_str(VCONFKEY_BGSET, filepath) < 0)
+ {
+ MSG_IMAGEVIEW_ERROR("Homescreen set Error");
+ return FALSE;
+ }
+
+ MSG_IMAGEVIEW_HIGH("Set Homescreen filepath = %s", filepath);
+ return TRUE;
+}
+
+
+static bool
+_ivug_config_get_slideshow_repeat_state(void)
+{
+ int repeat_state = STATE_FALSE;
+
+ if(vconf_get_bool(VCONFKEY_GALLERY_REPEAT_STATE, &repeat_state) < 0)
+ {
+ MSG_IMAGEVIEW_ERROR("vconf_get_bool failed, set as repeat state as default: false");
+ return false;
+ }
+
+ MSG_IMAGEVIEW_HIGH("repeat state is: %d", repeat_state);
+
+ return (repeat_state == STATE_TRUE ? true : false);
+}
+
+static bool
+_ivug_config_get_slideshow_shuffle_state(void)
+{
+ int shuffle_state = STATE_FALSE;
+
+ if(vconf_get_bool(VCONFKEY_GALLERY_SHUFFLE_STATE, &shuffle_state) < 0)
+ {
+ MSG_IMAGEVIEW_ERROR("vconf_get_bool failed, set as shuffle state as default: false");
+ return false;
+ }
+
+ MSG_IMAGEVIEW_HIGH("shuffle state is: %d", shuffle_state);
+
+ return (shuffle_state == STATE_TRUE ? true : false);
+}
+
+static double
+_ivug_config_get_slideshow_interval_time(void)
+{
+ double interval_time = 0.0;
+
+ if(vconf_get_dbl(VCONFKEY_GALLERY_INTERVAL_TIME, &interval_time) < 0)
+ {
+ MSG_IMAGEVIEW_ERROR("vconf_get_dbl failed, set as interval time as -1");
+
+ interval_time = -1.0;
+ }
+
+ MSG_IMAGEVIEW_HIGH("interval time is: %f", interval_time);
+ return interval_time;
+}
+
+static char *
+_ivug_config_get_slideshow_effect_type(void)
+{
+// TODO : Free returned string??
+ char *effect_str = NULL;
+ effect_str = vconf_get_str(VCONFKEY_GALLERY_TRANSITION_EFFECT);
+
+ if(!effect_str)
+ {
+ MSG_IMAGEVIEW_ERROR("vconf_get_str failed, set as effect type as default");
+
+ effect_str = NULL;
+ }
+
+ MSG_IMAGEVIEW_HIGH("effect is: %s", effect_str);
+
+ return effect_str;
+}
+
+static ivug_effect_type
+_ivug_config_get_effect_type_by_string(char *effect_str)
+{
+ ivug_retv_if(!effect_str, EFFECT_NONE);
+
+ ivug_effect_type type = IVUG_EFFECT_TYPE_SLIDE;
+
+ if(!strncmp(effect_str, "Slide", strlen(effect_str)))
+ {
+ type = IVUG_EFFECT_TYPE_SLIDE;
+ }
+ else //Set all other cases as default NONE
+ {
+ MSG_SLIDER_WARN("Invalid type : %s", effect_str);
+ type = EFFECT_NONE;
+ }
+
+ MSG_IMAGEVIEW_HIGH("effect_str = %s, type = %d", effect_str, type);
+
+ return type;
+}
+
+void
+ivug_config_get_slideshow_setting(slide_show_mode *mode,
+ double *interval_time,
+ ivug_effect_type *effect_type)
+{
+ *mode = SLIDE_SHOW_MODE_NORMAL;
+
+ bool state;
+
+ state = _ivug_config_get_slideshow_repeat_state();
+ if(state == true)
+ {
+ *mode |= SLIDE_SHOW_MODE_REPEAT;
+ }
+
+ state = _ivug_config_get_slideshow_shuffle_state();
+ if(state == true)
+ {
+ *mode |= SLIDE_SHOW_MODE_SHUFFLE;
+ }
+
+ *interval_time = _ivug_config_get_slideshow_interval_time();
+
+ /* EFFECT_NONE, EFFECT_FADE, EFFECT_BLIND, EFFECT_IRIS */
+ char *effect = _ivug_config_get_slideshow_effect_type();
+
+ *effect_type = _ivug_config_get_effect_type_by_string(effect);
+}
+
+
diff --git a/main/src/common/ivug-config.h b/main/src/common/ivug-config.h
new file mode 100755
index 0000000..31d9533
--- /dev/null
+++ b/main/src/common/ivug-config.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __IVUG_CONFIG_H__
+#define __IVUG_CONFIG_H__
+
+typedef enum {
+ SLIDE_SHOW_MODE_NORMAL = 0x00,
+ SLIDE_SHOW_MODE_REPEAT = 0x01,
+ SLIDE_SHOW_MODE_SHUFFLE = 0x02,
+ SLIDE_SHOW_MODE_SHUFFLE_REPEAT = 0x03,
+} slide_show_mode;
+
+typedef enum {
+ IVUG_EFFECT_TYPE_SLIDE = 0x00,
+ IVUG_EFFECT_TYPE_MAX,
+} ivug_effect_type;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+bool ivug_config_set_lockscreen_image(const char* filepath);
+
+bool ivug_config_set_homescreen_image(const char* filepath);
+
+void ivug_config_get_slideshow_setting(slide_show_mode * /* OUT */ mode,
+ double * /* OUT */ interval_time,
+ ivug_effect_type * /* OUT */ effect_type);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __IVUG_CONFIG_H__
diff --git a/main/src/common/ivug-datatypes.h b/main/src/common/ivug-datatypes.h
new file mode 100755
index 0000000..dc616e3
--- /dev/null
+++ b/main/src/common/ivug-datatypes.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __IVUG_DATATYPES_H__
+#define __IVUG_DATATYPES_H__
+
+#include "ivug-define.h"
+
+typedef void *Handle;
+
+#ifdef _USE_MEDIAINFO_STRINGID_
+typedef const char *UUID;
+#else
+typedef int UUID;
+#endif
+
+#endif // __IVUG_DATATYPES_H__
+
diff --git a/main/src/common/ivug-define.h b/main/src/common/ivug-define.h
new file mode 100755
index 0000000..0cddf5b
--- /dev/null
+++ b/main/src/common/ivug-define.h
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+
+
+/*
+ system widely used definition.
+*/
+
+#pragma once
+
+#define IVUG_MAX_FILE_PATH_LEN (4096)
+
+/*
+Definition "PREFIX" is declared in CMakelist.txt
+ PREFIX is "/opt/ug"
+ PACKAGE is "ug-image-viewer-efl"
+
+ Path name does not include trailing /.
+
+ DATA_PATH is /opt/data
+*/
+#define LOCALE_PATH PREFIX"/res/locale"
+#define IMAGE_PATH PREFIX"/res/images/"PACKAGE
+#define EDJ_PATH PREFIX"/res/edje/"PACKAGE
+
+/*
+ Home screen and Lock screen image should be put in DATA_PATH.
+*/
+#define DATA_PATH DATADIR"/"PACKAGE
+
+// TODO : Add comments
+#define IV_WINDOW_SIZE (41)//41 /* it's better to be odd number */
+#define IV_WINDOW_SIZE_FOR_SLIDE_SHOW (1)
+#define IV_RELOAD_OFFSET (4)//IV_WINDOW_SIZE/10 // it's better to be larger than 2
+
+#define USE_WIN_AS_PARENT
+
+#define NAVI_OPTION_BTN_STYLE "multiline"
+
+#define IVUG_DEFAULT_BG_COLOR 48
+
+#define _USE_MEDIAINFO_STRINGID_
+
+#define FEATURE_DYNAMIC_POPUP_HEIGHT
+
+#define USE_CUSTOM_STYLE
+
diff --git a/main/src/common/ivug-string.h b/main/src/common/ivug-string.h
new file mode 100755
index 0000000..ab4458d
--- /dev/null
+++ b/main/src/common/ivug-string.h
@@ -0,0 +1,112 @@
+/*
+ * 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>
+
+/* Original code is in appcore-common.h */
+#define _(str) gettext(str) /**< gettext alias */
+#define gettext_noop(str) (str) /**< keyword for xgettext to extract translatable strings */
+#define N_(str) gettext_noop(str) /**< gettext_noop alias */
+
+
+#define LOCALE_PATH PREFIX"/res/locale" /*TODO!!!*/
+
+#ifndef PACKAGE
+#error PACKAGE is not defined
+#endif
+
+#ifndef LOCALE_PATH
+#error LOCALE_PATH is not defined
+#endif
+
+//string
+#define IVUG_TEXT_DOMAIN PACKAGE
+#define IVUG_LOCALEDIR LOCALE_PATH
+
+// Not yet translated
+#define IDS_NULL _("")
+
+#define IDS_INVALID_IMAGE_FILE (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_INVALID_IMAGE_FILE"))
+#define IDS_PERMISSION_DENIED (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_PERMISSION_DENIED"))
+#define IDS_APPLICATION_NOT_INSTALLED (dgettext("sys_string","IDS_COM_BODY_APPLICATION_NOT_INSTALLED"))
+
+/*#define Details*/
+#define IDS_FORMAT (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_FILE_FORMAT"))
+#define IDS_DATE_CREATED (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_DATE_CREATED"))
+#define IDS_LOCATION (dgettext(IVUG_TEXT_DOMAIN, "IDS_COM_BODY_LOCATION"))
+#define IDS_FILE_LOCATION (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_FILE_LOCATION"))
+#define IDS_RESOLUTION (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_RESOLUTION"))
+#define IDS_LATITUDE (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_LATITUDE"))
+#define IDS_LONGITUDE (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_LONGITUDE"))
+
+#define IDS_N_A (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_N_A"))
+#define IDS_PRINT (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_PRINT"))
+
+/* Registered string in STMS IV */
+#define IDS_ADDED (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_ADDED"))
+#define IDS_SLIDE_SHOW (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_SLIDE_SHOW"))
+
+#define IDS_SD_CARD_REMOVED (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_SD_CARD_REMOVED"))
+#define IDS_SET_AS (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_SET_AS"))
+
+#define IDS_HOME_SCREEN_WALLPAPER (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"))
+#define IDS_LOCK_SCREEN_WALLPAPER (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"))
+#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_HOME_AND_LOCK_SCREEN_WALLPAPER (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"))
+
+// System string.
+#define IDS_DELETE_MSG (dgettext("sys_string","IDS_COM_POP_DELETE_Q"))
+#define IDS_NAME (dgettext("sys_string", "IDS_COM_BODY_DETAILS_NAME"))
+#define IDS_SIZE (dgettext("sys_string", "IDS_COM_BODY_SIZE"))
+
+#define IDS_COPY (dgettext("sys_string","IDS_COM_BODY_COPY"))
+
+#define IDS_ERROR (dgettext("sys_string","IDS_COM_POP_ERROR"))
+#define IDS_UNKNOWN (dgettext("sys_string", "IDS_COM_BODY_UNKNOWN"))
+
+#define IDS_LOADING (dgettext("sys_string", "IDS_COM_BODY_LOADING"))
+
+#define IDS_BLUETOOTH (dgettext("sys_string", "IDS_COM_BODY_BLUETOOTH"))
+
+#define IDS_CANCEL (dgettext("sys_string", "IDS_COM_SK_CANCEL"))
+#define IDS_DONE (dgettext("sys_string","IDS_COM_SK_DONE"))
+
+#define IDS_SET (dgettext("sys_string","IDS_COM_SK_SET"))
+#define IDS_BACK (dgettext("sys_string","IDS_COM_BODY_BACK"))
+
+#define IDS_OK (dgettext("sys_string","IDS_COM_SK_OK"))
+#define IDS_DELETE (dgettext("sys_string","IDS_COM_BODY_DELETE"))
+#define IDS_DELETED (dgettext("sys_string","IDS_COM_POP_DELETED"))
+
+#define IDS_SAVED (dgettext("sys_string","IDS_COM_POP_SAVED"))
+#define IDS_NO (dgettext("sys_string","IDS_COM_SK_NO"))
+#define IDS_YES (dgettext("sys_string","IDS_COM_SK_YES"))
+
+#define IDS_SUCCESS (dgettext("sys_string", "IDS_COM_POP_SUCCESS"))
+#define IDS_FAILED (dgettext("sys_string", "IDS_COM_POP_FAILED"))
+
+#define IDS_DETAILS (dgettext("sys_string","IDS_COM_BODY_DETAILS"))
+
+#define IDS_CLOSE (dgettext("sys_string", "IDS_COM_BODY_CLOSE"))
+#define IDS_NO_NAME (dgettext("sys_string", "IDS_COM_BODY_NO_NAME"))
+
+#endif // __IVUG_STRING_H__
+
+
diff --git a/main/src/control/ivug-ext-ug.c b/main/src/control/ivug-ext-ug.c
new file mode 100755
index 0000000..e3c5398
--- /dev/null
+++ b/main/src/control/ivug-ext-ug.c
@@ -0,0 +1,75 @@
+/*
+ * 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-ext-ug.h"
+#include "ivug-data.h"
+#include "ivug-popup.h"
+
+#include <ui-gadget.h>
+#include <aul.h>
+#include <appsvc.h>
+#include <Ecore_X.h> // UG_INIT_EFL
+
+//define
+#define VIDEOPLAYER_PKG_NAME "org.tizen.video-player"
+#define BLUETOOTH_PKG_NAME "org.tizen.bluetooth"
+
+#define MIME_TYPE_LEN 255
+
+bool
+ivug_ext_aul_launch(Evas_Object *parent, enum IVUG_EXT_AUL_TYPE type, const char *filepath, void *data)
+{
+ if(!filepath)
+ {
+ MSG_UTIL_ERROR("file path is NULL");
+ return false;
+ }
+ MSG_IMAGEVIEW_HIGH("Creating AUL. type=%d file path =%s", type, filepath);
+
+ bundle* b = bundle_create();
+ char mime_type[MIME_TYPE_LEN] = {0,};
+ aul_get_mime_from_file(filepath, mime_type, sizeof(mime_type));
+ MSG_IMAGEVIEW_HIGH("mime type=%s", mime_type);
+
+ IV_ASSERT(b!= NULL);
+ switch( type )
+ {
+ case IVUG_EXT_AUL_VIDEOPLAYER:
+ bundle_add( b, "path", filepath);
+ bundle_add( b, "launching_application", "image_viewer");
+ aul_launch_app(VIDEOPLAYER_PKG_NAME, b);
+ break;
+
+ case IVUG_EXT_AUL_SIMPLE_VIDEOPLAYER:
+ bundle_add( b, "path", filepath);
+ bundle_add( b, "launching_application", "light_play_view");
+// Camera -> Image Viewer -> Video player, In this case, launching_application bundle's value should be "light_play_view"
+
+ aul_launch_app(VIDEOPLAYER_PKG_NAME, b);
+ break;
+
+ default:
+ bundle_free(b);
+ return false;
+ }
+
+ bundle_free(b);
+
+ return true;
+}
+
+
diff --git a/main/src/control/ivug-ext-ug.h b/main/src/control/ivug-ext-ug.h
new file mode 100755
index 0000000..dc4a924
--- /dev/null
+++ b/main/src/control/ivug-ext-ug.h
@@ -0,0 +1,34 @@
+/*
+ * 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-data.h"
+
+#ifndef __IVUG_EXT_UG_H__
+#define __IVUG_EXT_UG_H__
+
+typedef enum IVUG_EXT_AUL_TYPE{
+ IVUG_EXT_AUL_NONE = 0x00,
+ IVUG_EXT_AUL_VIDEOPLAYER,
+ IVUG_EXT_AUL_SIMPLE_VIDEOPLAYER,
+} _ivug_ext_aul_type;
+
+
+bool
+ivug_ext_aul_launch(Evas_Object *parent, enum IVUG_EXT_AUL_TYPE type, const char *filepath, void *data);
+
+#endif //__IVUG_EXT_UG_H__
diff --git a/main/src/control/ivug-main.c b/main/src/control/ivug-main.c
new file mode 100755
index 0000000..3efb9c8
--- /dev/null
+++ b/main/src/control/ivug-main.c
@@ -0,0 +1,258 @@
+/*
+ * 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.h"
+#include "ivug-data.h"
+#include "ivug-util.h"
+
+
+#include <ui-gadget-module.h> // ug_destroy_me
+#include <media-svc.h>
+
+#define MAX_INSTALNCE (5)
+
+typedef struct
+{
+ struct ui_gadget *ug; // ug handle
+
+ Evas_Object *parent_win;
+// EFL theme
+ Elm_Theme *th;
+
+// Window Geometry
+ int win_w, win_h; //size
+
+ MediaSvcHandle *media_svc_hadle;
+
+} AppData;
+
+static Eina_List *ContextList = NULL;
+
+Elm_Theme*
+gGetSystemTheme(void)
+{
+ AppData *ugContext;
+ ugContext = eina_list_data_get(ContextList);
+
+ IV_ASSERT(ugContext != NULL);
+
+ return ugContext->th;
+}
+
+void
+gGetSystemDimension(int *w, int *h)
+{
+ AppData *ugContext;
+ ugContext = eina_list_data_get(ContextList);
+
+ IV_ASSERT(ugContext != NULL);
+ IV_ASSERT(w != NULL);
+ IV_ASSERT(h != NULL);
+
+ *w = ugContext->win_w;
+ *h = ugContext->win_h;
+}
+
+int gGetScreenWidth()
+{
+ AppData *ugContext;
+ ugContext = eina_list_data_get(ContextList);
+
+ IV_ASSERT(ugContext != NULL);
+
+ return ugContext->win_w;
+
+}
+
+int gGetScreenHeight()
+{
+ AppData *ugContext;
+ ugContext = eina_list_data_get(ContextList);
+
+ IV_ASSERT(ugContext != NULL);
+
+ return ugContext->win_h;
+
+}
+
+struct ui_gadget *
+gGetUGHandle(void)
+{
+ AppData *ugContext;
+ ugContext = eina_list_data_get(ContextList);
+
+ IV_ASSERT(ugContext != NULL);
+
+ MSG_IMAGEVIEW_HIGH("Get ug handle = 0x%08x", ugContext->ug);
+
+ return ugContext->ug;
+}
+
+MediaSvcHandle *
+gGetMediaSVCHandle(void)
+{
+ AppData *ugContext;
+ ugContext = eina_list_data_get(ContextList);
+
+ IV_ASSERT(ugContext != NULL);
+
+ return ugContext->media_svc_hadle;
+}
+
+#define IVUG_NAVIFRAME_NAME EDJ_PATH"/ivug-naviframe.edj"
+#define IVUG_TOOLLBAR_NAME EDJ_PATH"/ivug-toolbar.edj"
+#define IVUG_BUTTON_NAME EDJ_PATH"/ivug-button.edj"
+#define IVUG_SELECTION_INFO_NAME EDJ_PATH"/ivug-selectioninfo.edj"
+#define IVUG_GENLIST EDJ_PATH"/ivug-genlist.edj"
+
+static char *edj[] = {
+ IVUG_NAVIFRAME_NAME,
+ IVUG_TOOLLBAR_NAME,
+ IVUG_BUTTON_NAME,
+ IVUG_SELECTION_INFO_NAME,
+ IVUG_GENLIST,
+ NULL,
+};
+
+bool
+ivug_main_init(struct ui_gadget *ug)
+{
+ AppData *Context = malloc(sizeof(AppData));
+ if(Context == NULL)
+ {
+ MSG_IVUG_ERROR("Cannot allock memory");
+ return false;
+ }
+
+ Context->ug = ug;
+ Context->parent_win = ug_get_window();
+
+//get window width, height
+ int w, h;
+
+ evas_object_geometry_get(Context->parent_win, NULL, NULL, &w, &h);
+ MSG_IMAGEVIEW_HIGH("Screen WH(%dx%d)", w, h);
+// ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
+ Context->win_w = w;
+ Context->win_h = h;
+
+
+ int i = 0;
+
+ Context->th = elm_theme_new();
+
+ IV_ASSERT(Context->th != NULL);
+
+ elm_theme_ref_set(Context->th, NULL);
+
+ for ( i = 0; edj[i] != NULL; i++)
+ {
+ elm_theme_extension_add(Context->th, edj[i]);
+ }
+
+ ContextList = eina_list_prepend(ContextList, Context);
+
+ MSG_IVUG_HIGH("Append to list. Context=0x%08x", Context);
+
+//media browser service.
+ int err = media_svc_connect(&(Context->media_svc_hadle));
+ if (err == MB_SVC_ERROR_NONE)
+ {
+ bindtextdomain(IVUG_TEXT_DOMAIN, IVUG_LOCALEDIR); //bind text domain
+ return TRUE;
+ }
+
+/**** Error routine ****/
+ MSG_SDATA_WARN("media service init error=%d", err);
+
+ Context = eina_list_data_get(ContextList);
+ ContextList = eina_list_remove_list(ContextList, ContextList);
+
+ if(Context->th)
+ {
+ int i = 0;
+ for ( i = 0; edj[i] != NULL; i++)
+ {
+ elm_theme_extension_del(Context->th, edj[i]);
+ }
+
+ elm_theme_free(Context->th);
+ }
+
+ MSG_IVUG_HIGH("Remove from list. Context=0x%08x, ug=0x%08x", Context, Context->ug);
+
+ free(Context);
+
+ return false;
+}
+
+
+bool
+ivug_main_deinit(struct ui_gadget *ug)
+{
+ AppData *Context;
+
+ Eina_List *l = NULL;
+ Eina_List *l_next = NULL;
+
+ EINA_LIST_FOREACH_SAFE(ContextList, l, l_next, Context)
+ {
+ if(Context == NULL)
+ {
+ MSG_SDATA_ERROR("Context is NULL");
+ return false;
+ }
+ if (Context->ug == ug)
+ {
+ ContextList = eina_list_remove_list(ContextList, l);
+ break;
+ }
+ }
+
+ //media browser service.
+ int err = media_svc_disconnect(Context->media_svc_hadle);
+ if (err != MB_SVC_ERROR_NONE)
+ {
+ MSG_SDATA_WARN("media service finalize error=%d", err);
+ // go through
+ }
+ else
+ {
+ MSG_SDATA_HIGH("MInfo finalized");
+ }
+
+ if(Context->th)
+ {
+ int i = 0;
+ for ( i = 0; edj[i] != NULL; i++)
+ {
+ elm_theme_extension_del(Context->th, edj[i]);
+ }
+ elm_theme_free(Context->th);
+ }
+
+ MSG_IVUG_HIGH("Remove from list. Context=0x%08x, ug=0x%08x", Context, Context->ug);
+
+ free(Context);
+
+ return true;
+}
+
+
+
+
diff --git a/main/src/control/ivug-main.h b/main/src/control/ivug-main.h
new file mode 100755
index 0000000..86d9837
--- /dev/null
+++ b/main/src/control/ivug-main.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __IVUG_MAIN_H__
+#define __IVUG_MAIN_H__
+
+#include "ivug-common.h"
+#include <ui-gadget.h>
+#include <media-svc.h>
+
+bool
+ivug_main_deinit(struct ui_gadget *ug);
+
+bool
+ivug_main_init(struct ui_gadget *ug);
+
+Elm_Theme*
+gGetSystemTheme(void);
+
+struct ui_gadget *
+gGetUGHandle(void);
+
+MediaSvcHandle *
+gGetMediaSVCHandle(void);
+
+int gGetScreenWidth();
+int gGetScreenHeight();
+
+
+#endif //__IVUG_MAIN_H__
diff --git a/main/src/control/ivug-parameter.c b/main/src/control/ivug-parameter.c
new file mode 100755
index 0000000..5717181
--- /dev/null
+++ b/main/src/control/ivug-parameter.c
@@ -0,0 +1,397 @@
+/*
+ * 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 <bundle.h>
+#include <string.h>
+
+#include "ivug-common.h"
+#include "ivug-debug.h"
+#include "ivug-parameter.h"
+
+//bundle key
+#define IVUG_BUNDLE_KEY_VIEW_MODE "View Mode"
+#define IVUG_BUNDLE_KEY_PATH "Path"
+#define IVUG_BUNDLE_KEY_THUMBNAIL_PATH "Thumb Path"
+#define IVUG_BUNDLE_KEY_ALBUM_IDX "Album index"
+#define IVUG_BUNDLE_KEY_VIEW_BY "View By"
+#define IVUG_BUNDLE_KEY_INDEX "Index"
+#define IVUG_BUNDLE_KEY_SORT_BY "Sort By"
+
+#define IVUG_BUNDLE_KEY_MAX_LONGITUDE "LON_MAX"
+#define IVUG_BUNDLE_KEY_MIN_LONGITUDE "LON_MIN"
+#define IVUG_BUNDLE_KEY_MAX_LATITUDE "LAT_MAX"
+#define IVUG_BUNDLE_KEY_MIN_LATITUDE "LAT_MIN"
+
+#define IVUG_BUNDLE_KEY_SETAS_TYPE "Setas type"
+
+#define IVUG_BUNDLE_KEY_MEDIA_TYPE "Media type"
+
+//default values
+#define IVUG_DEFAULT_MODE IVUG_MODE_SINGLE
+#define IVUG_DEFAULT_INDEX (-1)
+
+static ivug_mode
+_get_view_mode(ivug_parameter* data, const char* val)
+{
+ IV_ASSERT(val != NULL);
+
+#define IVUG_BUNDLE_VALUE_VIEW_MODE_ALBUM "ALBUM"
+#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_CAMERA "CAMERA"
+#define IVUG_BUNDLE_VALUE_VIEW_MODE_DISPLAY "DISPLAY"
+#define IVUG_BUNDLE_VALUE_VIEW_MODE_SETAS "SETAS"
+ int len = strlen(val);
+
+ if (strncmp(val, IVUG_BUNDLE_VALUE_VIEW_MODE_NORMAL, len) == 0
+ || strncmp(val, IVUG_BUNDLE_VALUE_VIEW_MODE_GALLERY, len) == 0 )
+ {
+ return IVUG_MODE_NORMAL;
+ }
+ else if (strncmp(val, IVUG_BUNDLE_VALUE_VIEW_MODE_ALBUM, len) == 0)
+ {
+ // Probably, UnUsed.
+ MSG_IVUG_ERROR("ALBUM is deprecated!!!! plz check");
+ printf("bundle key ALBUM is deprecated!!!! plz check\n");
+ return IVUG_MODE_NORMAL;
+ }
+ else if ( strncmp(val, IVUG_BUNDLE_VALUE_VIEW_MODE_CAMERA, len) == 0)
+ {
+ data->start_index = 1; //apply window loading
+ data->view_by = IVUG_VIEW_BY_FOLDER; // In camera case, All images should be shown in camera folder.
+ return IVUG_MODE_CAMERA;
+ }
+ else if (strncmp(val, IVUG_BUNDLE_VALUE_VIEW_MODE_SINGLE, len) == 0)
+ {
+ data->view_by = IVUG_VIEW_BY_FILE;
+ return IVUG_MODE_SINGLE;
+ }
+ else if ( strncmp(val, IVUG_BUNDLE_VALUE_VIEW_MODE_DISPLAY, len) == 0)
+ {
+ data->view_by = IVUG_VIEW_BY_FILE;
+ return IVUG_MODE_DISPLAY;
+ }
+ else if(strncmp(val, IVUG_BUNDLE_VALUE_VIEW_MODE_SETAS, len) == 0)
+ {
+ data->view_by = IVUG_VIEW_BY_FILE;
+ return IVUG_MODE_SETAS;
+ }
+
+ MSG_IVUG_ERROR("Invalid mode : %s", val);
+ return IVUG_MODE_INVAILD;
+}
+
+
+static ivug_view_by
+_get_view_by(const char* val)
+{
+ //bundle value
+#define IVUG_BUNDLE_VALUE_VIEW_BY_ALL "All"
+#define IVUG_BUNDLE_VALUE_VIEW_BY_FLODER "By Folder"
+#define IVUG_BUNDLE_VALUE_VIEW_BY_PLACES "Places"
+
+ IV_ASSERT(val != NULL);
+
+ int len = strlen(val);
+
+ if (strncmp(val, IVUG_BUNDLE_VALUE_VIEW_BY_FLODER, len) == 0 )
+ {
+ return IVUG_VIEW_BY_FOLDER;
+ }
+ else if (strncmp(val, IVUG_BUNDLE_VALUE_VIEW_BY_ALL, len) == 0 )
+ {
+ return IVUG_VIEW_BY_ALL;
+ }
+ else if (strncmp(val, IVUG_BUNDLE_VALUE_VIEW_BY_PLACES, len) == 0)
+ {
+ return IVUG_VIEW_BY_PLACES;
+ }
+
+ MSG_IVUG_ERROR("Invalid view by : %s", val);
+
+ return IVUG_VIEW_BY_FILE;
+
+}
+
+
+static ivug_setas_type
+_get_setas_type(const char* val)
+{
+ IV_ASSERT(val != NULL);
+
+#define IVUG_BUNDLE_VALUE_SETAS_UG_WALLPAPER "Wallpaper"
+
+ int len = strlen(val);
+
+ if (strncmp(val, IVUG_BUNDLE_VALUE_SETAS_UG_WALLPAPER, len) == 0 )
+ {
+ return IVUG_SET_AS_UG_TYPE_WALLPAPER;
+ }
+
+ MSG_IVUG_ERROR("Invalid setas ug type : %s", val);
+ return IVUG_SET_AS_UG_TYPE_INVALID;
+}
+
+static ivug_media_type
+_get_media_type(const char* val)
+{
+ IV_ASSERT(val != NULL);
+#define IVUG_BUNDLE_VALUE_MEDIA_TYPE_ALL "All"
+#define IVUG_BUNDLE_VALUE_MEDIA_TYPE_IMAGE "Image"
+#define IVUG_BUNDLE_VALUE_MEDIA_TYPE_VIDEO "Video"
+
+ int len = strlen(val);
+
+ if (strncmp(val, IVUG_BUNDLE_VALUE_MEDIA_TYPE_IMAGE, len) == 0 )
+ {
+ return IVUG_MEDIA_TYPE_IMAGE;
+ }
+ else if (strncmp(val, IVUG_BUNDLE_VALUE_MEDIA_TYPE_VIDEO, len) == 0)
+ {
+ return IVUG_MEDIA_TYPE_VIDEO;
+ }
+ else if(strncmp(val, IVUG_BUNDLE_VALUE_MEDIA_TYPE_ALL, len) == 0)
+ {
+ return IVUG_MEDIA_TYPE_ALL;
+ }
+
+ MSG_IVUG_ERROR("Invalid media type : %s", val);
+ return IVUG_MEDIA_TYPE_MAX;
+}
+
+
+
+static void
+_bundle_print(const char *key, const char *val, void *data)
+{
+ MSG_IVUG_HIGH(" %s:%s",key, val);
+}
+
+//parsing bundle
+ivug_parameter*
+ivug_param_create_from_bundle(bundle* b)
+{
+ if (b == NULL)
+ {
+ MSG_IVUG_WARN("bundle value is NULL");
+ return NULL;
+ }
+
+ int nbundle_cnt = bundle_get_count(b);
+
+ if ( nbundle_cnt == 0 )
+ {
+ MSG_IVUG_WARN("bundle count is %d", nbundle_cnt);
+ return NULL;
+ }
+
+ //print key and value.
+ MSG_IVUG_HIGH("**********************************");
+ MSG_IVUG_HIGH(" Bundle Count = %d", nbundle_cnt);
+ bundle_iterate(b, _bundle_print, NULL);
+ MSG_IVUG_HIGH("**********************************");
+
+ //parsing param
+ ivug_parameter* data = (ivug_parameter*)calloc(1, sizeof(ivug_parameter));
+
+ if (data == NULL)
+ {
+ MSG_IMAGEVIEW_FATAL("Cannot allocate memory");
+ return NULL;
+ }
+
+// View By
+ const char* szViewBy = NULL;
+
+ szViewBy = bundle_get_val(b, IVUG_BUNDLE_KEY_VIEW_BY);
+ if (szViewBy != NULL)
+ {
+ MSG_IVUG_HIGH("View By = %s", szViewBy);
+
+ data->view_by = _get_view_by(szViewBy);
+ }
+ else
+ {
+ MSG_IVUG_ERROR("View By is NULL");
+ data->view_by = IVUG_VIEW_BY_INVAILD;
+ }
+
+//parse image index at album
+ const char* val = NULL;
+
+ val = bundle_get_val(b, IVUG_BUNDLE_KEY_INDEX);
+ if(val)
+ {
+ data->start_index = atoi(val);
+ MSG_IVUG_HIGH("Slide Index = %d", data->start_index);
+ }
+ else
+ {
+ data->start_index = IVUG_DEFAULT_INDEX;
+ MSG_IVUG_HIGH("Slide Index is not set. Set as default : %d", data->start_index);
+ }
+
+//parse mode
+ const char* szMode = NULL;
+
+ szMode = bundle_get_val(b, IVUG_BUNDLE_KEY_VIEW_MODE);
+
+ if (szMode != NULL)
+ {
+ data->mode = _get_view_mode(data, szMode);
+ MSG_IVUG_HIGH("View mode is %s(%d)", szMode, data->mode);
+ }
+ else
+ {
+ data->mode = IVUG_DEFAULT_MODE;
+ MSG_IVUG_HIGH("View mode is NULL. Set Default(%d)", data->mode);
+ }
+
+//parse path
+ const char* szFilePath = NULL;
+
+ szFilePath = bundle_get_val(b, IVUG_BUNDLE_KEY_PATH);
+
+ if ( szFilePath != NULL )
+ {
+ data->filepath = strdup(szFilePath);
+ MSG_IVUG_HIGH("Current File = %s", data->filepath);
+ }
+
+ //parse album id -album id is cluster id of media service
+ val = bundle_get_val(b, IVUG_BUNDLE_KEY_ALBUM_IDX);
+
+ 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));
+ }
+ else
+ {
+ data->album_id = INVALID_UUID;
+ MSG_IVUG_WARN("Album index is NULL");
+ }
+ if (data->mode == IVUG_MODE_CAMERA)
+ {
+/*
+ **********************************
+ Bundle Count = 2
+ View Mode:CAMERA
+ Path:/opt/media/Camera shots/IMAGE0021.jpg
+ **********************************
+*/
+ // Get album id from file path.
+ UUID cluster_id = ivug_get_album_id_from_filepath(data->filepath);
+
+ data->album_id = uuid_assign(cluster_id);
+
+ MSG_IVUG_HIGH("Get Album ID(%s) from file %s", uuid_getchar(data->album_id), data->filepath);
+ }
+
+// TODO : Check parameter integrity
+ val = bundle_get_val(b, IVUG_BUNDLE_KEY_MEDIA_TYPE);
+ if(val != NULL)
+ {
+ data->media_type = _get_media_type(val);
+ MSG_IVUG_HIGH("Media Type=%s(%d)", val, data->media_type);
+ }
+ else
+ {
+ MSG_IVUG_WARN("Media type is not specified.");
+ }
+
+ long long int m = 0;
+ long int e = 0;
+
+ val = bundle_get_val(b, IVUG_BUNDLE_KEY_MAX_LONGITUDE);
+ if(val != NULL)
+ {
+ eina_convert_atod(val, strlen(val), &m, &e);
+ data->max_longitude = ldexp((double)m, e);
+ MSG_IVUG_HIGH("Max Longitude =%f", data->max_longitude);
+ }
+ else
+ {
+ MSG_IVUG_MED("Max Longitude is not specified.");
+ }
+
+ val = bundle_get_val(b, IVUG_BUNDLE_KEY_MIN_LONGITUDE);
+ if(val != NULL)
+ {
+ eina_convert_atod(val, strlen(val), &m, &e);
+ data->min_longitude = ldexp((double)m, e);
+ MSG_IVUG_HIGH("Min Longitude =%f", data->min_longitude);
+ }
+ else
+ {
+ MSG_IVUG_MED("Min Longitude is not specified.");
+ }
+
+ val = bundle_get_val(b, IVUG_BUNDLE_KEY_MAX_LATITUDE);
+ if(val != NULL)
+ {
+ eina_convert_atod(val, strlen(val), &m, &e);
+ data->max_latitude = ldexp((double)m, e);
+ MSG_IVUG_HIGH("Max Latitude =%f", data->max_latitude);
+ }
+ else
+ {
+ MSG_IVUG_MED("Max Latitude is not specified.");
+ }
+
+ val = bundle_get_val(b, IVUG_BUNDLE_KEY_MIN_LATITUDE);
+ if(val != NULL)
+ {
+ eina_convert_atod(val, strlen(val), &m, &e);
+ data->min_latitude = ldexp((double)m, e);
+ MSG_IVUG_HIGH("Min Latitude =%f", data->min_latitude);
+ }
+ else
+ {
+ MSG_IVUG_MED("Min Latitude is not specified.");
+ }
+
+ val = bundle_get_val(b, IVUG_BUNDLE_KEY_SETAS_TYPE);
+ if (val)
+ {
+ MSG_IVUG_HIGH("SetAs UG Type=%s", val);
+ data->setas_type = _get_setas_type(val);
+ }
+
+ return data;
+}
+
+void
+ivug_param_delete(ivug_parameter* data)
+{
+ IV_ASSERT(data != NULL);
+ if (data->filepath)
+ {
+ free(data->filepath);
+ data->filepath = NULL;
+ }
+
+ uuid_free(data->album_id);
+
+ free(data);
+
+ MSG_IVUG_HIGH("Parameter is freed.");
+
+}
+
+
diff --git a/main/src/control/ivug-parameter.h b/main/src/control/ivug-parameter.h
new file mode 100755
index 0000000..1de14c4
--- /dev/null
+++ b/main/src/control/ivug-parameter.h
@@ -0,0 +1,104 @@
+/*
+ * 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__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdbool.h>
+#include <bundle.h>
+
+typedef enum {
+ IVUG_MODE_INVAILD = 0x00,
+ IVUG_MODE_NORMAL, // normal
+ 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;
+
+typedef enum {
+ IVUG_VIEW_BY_INVAILD = 0x00,
+ IVUG_VIEW_BY_FILE,
+ IVUG_VIEW_BY_ALL,
+ IVUG_VIEW_BY_FOLDER,
+ IVUG_VIEW_BY_PLACES,
+} ivug_view_by;
+
+//set as ug
+typedef enum {
+ IVUG_SET_AS_UG_TYPE_INVALID = 0x00,
+ IVUG_SET_AS_UG_TYPE_WALLPAPER,
+ IVUG_SET_AS_UG_TYPE_MAX,
+} ivug_setas_type;
+
+typedef enum {
+ IVUG_MEDIA_TYPE_ALL = 0x00, //default value
+ IVUG_MEDIA_TYPE_IMAGE,
+ IVUG_MEDIA_TYPE_VIDEO,
+ IVUG_MEDIA_TYPE_MAX,
+} ivug_media_type;
+
+typedef enum {
+ IVUG_MEDIA_SORT_NONE = 0x00, /**< No sort */
+ IVUG_MEDIA_ASC_BY_NAME, /**< Ascending sort as file name */
+ IVUG_MEDIA_DESC_BY_NAME, /**< Descending sort as file name */
+ IVUG_MEDIA_ASC_BY_DATE, /**< Ascending sort as created date */
+ IVUG_MEDIA_DESC_BY_DATE, /**< Descending sort as created date */
+} ivug_sort_type;
+
+typedef struct {
+ ivug_mode mode;
+
+ char* filepath;
+ UUID album_id; //cluster id of media service
+
+ ivug_view_by view_by;
+ ivug_setas_type setas_type;
+ ivug_media_type media_type;
+ ivug_sort_type sort_type; // TODO : extract from here. sort type can be used in case of default
+
+ /* for places view */
+ double max_longitude;
+ double min_longitude;
+ double max_latitude;
+ double min_latitude;
+
+ int start_index;
+
+} ivug_parameter;
+
+
+ivug_parameter*
+ivug_param_create_from_bundle(bundle* b);
+
+void
+ivug_param_delete(ivug_parameter* data);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
+#endif // __IVUG_PARAMETER_H__
+
+
diff --git a/main/src/control/ivug-uuid.c b/main/src/control/ivug-uuid.c
new file mode 100755
index 0000000..b2c8eeb
--- /dev/null
+++ b/main/src/control/ivug-uuid.c
@@ -0,0 +1,94 @@
+/*
+ * 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"
+
+UUID uuid_assign(UUID id)
+{
+#ifdef _USE_MEDIAINFO_STRINGID_
+ if ( id == NULL )
+ return NULL;
+
+ return strdup(id);
+#else
+ return id;
+#endif
+}
+
+
+void uuid_free(UUID id)
+{
+#ifdef _USE_MEDIAINFO_STRINGID_
+ if ( id != NULL )
+ free((void *)id);
+#endif
+}
+
+
+int uuid_compare(UUID id1, UUID id2)
+{
+#ifdef _USE_MEDIAINFO_STRINGID_
+ return strcmp(id1, id2);
+#else
+ return id1 - id2;
+#endif
+}
+
+const char *uuid_getchar(UUID id)
+{
+#ifdef _USE_MEDIAINFO_STRINGID_
+ if ( id == NULL )
+ {
+ return "NULL";
+ }
+
+ return id;
+#else
+ {
+ static char buffer[255];
+
+ sprintf(buffer, "%d", id);
+
+ return buffer;
+ }
+#endif
+
+}
+
+
+UUID uuid_getuuid(const char *szID)
+{
+ if ( szID == NULL )
+ {
+ return INVALID_UUID;
+ }
+
+#ifdef _USE_MEDIAINFO_STRINGID_
+ return strdup(szID);
+#else
+ return atoi(szID);
+#endif
+
+}
+
+bool uuid_is_valid(UUID id)
+{
+ return (id != INVALID_UUID) ? true : false;
+}
+
+
+
diff --git a/main/src/control/ivug-uuid.h b/main/src/control/ivug-uuid.h
new file mode 100755
index 0000000..e90bf6b
--- /dev/null
+++ b/main/src/control/ivug-uuid.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __IVUG_UUID_H__
+#define __IVUG_UUID_H__
+
+#include "ivug-common.h"
+#include <stdbool.h>
+
+#ifdef _USE_MEDIAINFO_STRINGID_
+ #define INVALID_UUID ((UUID)NULL)
+#else
+ #define INVALID_UUID ((UUID)-1)
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+UUID uuid_assign(UUID id);
+
+void uuid_free(UUID id);
+
+int uuid_compare(UUID id1, UUID id2);
+
+const char *uuid_getchar(UUID id);
+
+UUID uuid_getuuid(const char *szID);
+
+bool uuid_is_valid(UUID id);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __IVUG_UUID_H__
+
diff --git a/main/src/data/ivug-data-filter.c b/main/src/data/ivug-data-filter.c
new file mode 100755
index 0000000..754a723
--- /dev/null
+++ b/main/src/data/ivug-data-filter.c
@@ -0,0 +1,101 @@
+/*
+ * 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-data-filter.h"
+
+List_Filter *ivug_data_filter_create(const ivug_parameter *param)
+{
+ IV_ASSERT(param != NULL);
+
+ List_Filter *filter = calloc(1, sizeof(List_Filter));
+
+ IV_ASSERT(filter != NULL);
+
+ filter->view_by = param->view_by;
+ filter->media_type = param->media_type;
+ filter->sort_type = param->sort_type;
+
+ MSG_SDATA_HIGH("param->view_by is %d", param->view_by);
+ switch(param->view_by)
+ {
+ case IVUG_VIEW_BY_PLACES:
+ filter->place.max_longitude = param->max_longitude;
+ filter->place.min_longitude = param->min_longitude;
+ filter->place.max_latitude = param->max_latitude;
+ filter->place.min_latitude = param->min_latitude;
+ break;
+ case IVUG_VIEW_BY_FILE:
+ filter->file_path = strdup(param->filepath);
+ break;
+ case IVUG_VIEW_BY_ALL:
+ filter->album_id = uuid_assign(param->album_id);
+ break;
+
+ case IVUG_VIEW_BY_FOLDER:
+ filter->album_id = uuid_assign(param->album_id);
+ break;
+
+ case IVUG_VIEW_BY_INVAILD:
+ default:
+ MSG_SDATA_WARN("Invalid ViewBy : %d", param->view_by);
+ break;
+
+ }
+
+ return filter;
+
+}
+
+void ivug_data_filter_delete(List_Filter *filter)
+{
+ IV_ASSERT(filter != NULL);
+
+ MSG_SDATA_HIGH("Removing filter. ViewBy=%d", filter->view_by);
+
+ switch(filter->view_by)
+ {
+ case IVUG_VIEW_BY_PLACES:
+ break;
+
+ case IVUG_VIEW_BY_FILE:
+ if ( filter->file_path )
+ {
+ free(filter->file_path);
+ }
+ break;
+ case IVUG_VIEW_BY_ALL:
+ uuid_free(filter->album_id);
+ break;
+
+ case IVUG_VIEW_BY_FOLDER:
+ uuid_free(filter->album_id);
+
+ break;
+
+ case IVUG_VIEW_BY_INVAILD:
+ default:
+ MSG_SDATA_WARN("Invalid ViewBy : %d", filter->view_by);
+ break;
+ }
+
+
+ free(filter);
+}
+
+
+
diff --git a/main/src/data/ivug-data-filter.h b/main/src/data/ivug-data-filter.h
new file mode 100755
index 0000000..e4969de
--- /dev/null
+++ b/main/src/data/ivug-data-filter.h
@@ -0,0 +1,56 @@
+/*
+ * 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_FILTER_H__
+#define __IVUG_DATA_FILTER_H__
+
+#include "ivug-parameter.h"
+
+typedef struct {
+ ivug_view_by view_by;
+ ivug_media_type media_type;
+ ivug_sort_type sort_type;
+
+ 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
+ };
+
+} List_Filter;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+List_Filter *ivug_data_filter_create(const ivug_parameter *param);
+void ivug_data_filter_delete(List_Filter *filter);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __IVUG_DATA_FILTER_H__
+
diff --git a/main/src/data/ivug-data-list.c b/main/src/data/ivug-data-list.c
new file mode 100755
index 0000000..697b158
--- /dev/null
+++ b/main/src/data/ivug-data-list.c
@@ -0,0 +1,282 @@
+/*
+ * 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-main.h"
+#include "ivug-common.h"
+
+#include "ivug-data-priv.h"
+
+// List
+static int
+_ivug_list_count_cb(Mitem* item, void* user_data )
+{
+ int *count = (int *)user_data;
+
+ (*count)++;
+
+ return 0;
+}
+
+//Eina List Function.
+static int
+_ivug_list_mitem_cb(Mitem* item, void* user_data )
+{
+ IV_ASSERT(user_data != NULL);
+ Eina_List **list = (Eina_List **)user_data;
+
+ *list = eina_list_prepend(*list, item);
+
+ return 0;
+}
+
+
+Eina_List *
+ivug_list_load_items(List_Filter *filter, int stp, int endp)
+{
+ IV_ASSERT(filter != NULL);
+
+ Eina_List *item_list = NULL;
+
+ if (filter->view_by == IVUG_VIEW_BY_FILE)
+ {
+ Eina_List *list = NULL;
+ Media_Data *mData = ivug_alloc_mediadata_from_filepath(filter->file_path);
+
+ list = eina_list_append(list, mData);
+ return list;
+ }
+
+// TODO : Check idx validation.
+ minfo_item_filter item_filter = {0, }; //create filter
+
+ switch(filter->media_type)
+ {
+ case IVUG_MEDIA_TYPE_IMAGE:
+ item_filter.file_type = MINFO_ITEM_IMAGE;
+ break;
+ case IVUG_MEDIA_TYPE_VIDEO:
+ item_filter.file_type = MINFO_ITEM_VIDEO;
+ break;
+ case IVUG_MEDIA_TYPE_ALL:
+ item_filter.file_type = MINFO_ITEM_IMAGE | MINFO_ITEM_VIDEO;
+ break;
+ default:
+ MSG_SITEM_FATAL("Invalid media type : %d", filter->media_type);
+ return NULL;
+ break;
+ }
+
+ item_filter.favorite = MINFO_MEDIA_FAV_ALL;
+
+ if(filter->view_by == IVUG_VIEW_BY_PLACES)
+ {
+ item_filter.sort_type = MINFO_MEDIA_SORT_BY_NAME_ASC;
+ }
+ else
+ {
+ item_filter.sort_type = MINFO_MEDIA_SORT_BY_DATE_DESC; //MINFO_MEDIA_SORT_BY_NAME_ASC; //minfo_media_sort_type
+ }
+
+ item_filter.start_pos = stp;
+ item_filter.end_pos = endp;
+ item_filter.with_meta = false;
+
+ int ret = MB_SVC_ERROR_NONE;
+
+ switch(filter->view_by)
+ {
+ case IVUG_VIEW_BY_FOLDER:
+ ret = minfo_get_item_list(gGetMediaSVCHandle(), filter->album_id, item_filter, _ivug_list_mitem_cb, &item_list);
+ break;
+
+ case IVUG_VIEW_BY_ALL:
+ ret = minfo_get_all_item_list(gGetMediaSVCHandle(), MINFO_CLUSTER_TYPE_LOCAL_ALL, item_filter, _ivug_list_mitem_cb, &item_list);
+ break;
+
+ case IVUG_VIEW_BY_PLACES:
+ ret = minfo_get_geo_item_list(gGetMediaSVCHandle(), INVALID_UUID, MINFO_CLUSTER_TYPE_LOCAL_ALL, item_filter,
+ filter->place.min_longitude, filter->place.max_longitude,
+ filter->place.min_latitude, filter->place.max_latitude,
+ _ivug_list_mitem_cb, &item_list); // NULL means query all folder
+ break;
+ default:
+ MSG_SDATA_FATAL("Invalid Mode=%d", filter->view_by);
+ return NULL;
+ }
+
+ if ( ret != MB_SVC_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;
+ Mitem* mitem;
+
+ Media_Data *mdata = NULL;
+
+ EINA_LIST_FOREACH(item_list, item, mitem)
+ {
+ mdata = ivug_alloc_mediadata_from_mitem(mitem);
+
+ IV_ASSERT(mdata != NULL);
+
+ MSG_SDATA_LOW("Add Mdata. Mdata=0x%08x %s", mdata, mdata->filepath);
+ slide_list = eina_list_prepend(slide_list, mdata);
+ }
+
+ EINA_LIST_FREE(item_list, mitem)
+ {
+ minfo_destroy_mtype_item(mitem);
+ }
+
+ eina_list_free(item_list);
+
+ MSG_SDATA_HIGH("Item loaded(%d~%d)", stp, endp);
+
+ return slide_list;
+}
+
+
+int
+ivug_list_get_item_cnt(List_Filter *filter)
+{
+ IV_ASSERT(filter != NULL);
+
+// TODO : Check idx validation.
+ minfo_item_filter item_filter = {0, }; //create filter
+
+ switch(filter->media_type)
+ {
+ case IVUG_MEDIA_TYPE_IMAGE:
+ item_filter.file_type = MINFO_ITEM_IMAGE;
+ break;
+ case IVUG_MEDIA_TYPE_VIDEO:
+ item_filter.file_type = MINFO_ITEM_VIDEO;
+ break;
+ case IVUG_MEDIA_TYPE_ALL:
+ item_filter.file_type = MINFO_ITEM_IMAGE | MINFO_ITEM_VIDEO;
+ break;
+ default:
+ MSG_SITEM_FATAL("Invalid media type : %d", filter->media_type);
+ return -1;
+ break;
+ }
+
+ item_filter.favorite = MINFO_MEDIA_FAV_ALL;
+
+ if(filter->view_by == IVUG_VIEW_BY_PLACES)
+ {
+ item_filter.sort_type = MINFO_MEDIA_SORT_BY_NAME_ASC;
+ }
+ else
+ {
+ item_filter.sort_type = MINFO_MEDIA_SORT_BY_DATE_DESC; //MINFO_MEDIA_SORT_BY_NAME_ASC; //minfo_media_sort_type
+ }
+
+ item_filter.start_pos = -1;
+ item_filter.end_pos = -1;
+ item_filter.with_meta = false;
+
+ int ret = MB_SVC_ERROR_NONE;
+
+ int count = 0;
+
+ switch(filter->view_by)
+ {
+ case IVUG_VIEW_BY_ALL :
+ ret = minfo_get_item_cnt(gGetMediaSVCHandle(), filter->album_id, item_filter, &count);
+ if(ret < 0)
+ {
+ MSG_SDATA_ERROR("Error! AlbumUUID=%s Ret=%d", uuid_getchar(filter->album_id), ret );
+ return -1;
+ }
+
+ MSG_SDATA_HIGH("IVUG_VIEW_BY_ALL. MediaType=%d Count=%d", filter->media_type, count);
+ return count;
+ break;
+
+/* minfo_get_geo_item_list doesn't provide minfo get count api */
+/* So get total count menually by list callback function */
+ case IVUG_VIEW_BY_PLACES:
+ ret = minfo_get_geo_item_list(gGetMediaSVCHandle(), INVALID_UUID, MINFO_CLUSTER_TYPE_LOCAL_ALL, item_filter,
+ filter->place.min_longitude, filter->place.max_longitude,
+ filter->place.min_latitude, filter->place.max_latitude,
+ _ivug_list_count_cb, &count); // NULL means query all folder
+
+ if (ret < 0)
+ {
+ MSG_SDATA_ERROR("minfo_get_geo_item_list ERROR");
+ return -1;
+ }
+
+ MSG_SDATA_HIGH("IVUG_VIEW_BY_PLACES. Count=%d", count);
+ return count;
+
+ break;
+ case IVUG_VIEW_BY_FOLDER:
+ ret = minfo_get_item_cnt(gGetMediaSVCHandle(), filter->album_id, item_filter, &count);
+ if(ret < 0)
+ {
+ MSG_SDATA_ERROR("Error! AlbumUUID=%s Ret=%d", uuid_getchar(filter->album_id), ret );
+ return -1;
+ }
+ MSG_SDATA_HIGH("IVUG_VIEW_BY_FOLDER. Count=%d", count);
+ return count;
+
+ break;
+
+ case IVUG_VIEW_BY_FILE:
+ return 1; // item count is always 1 when by file
+ break;
+
+ default:
+ MSG_SDATA_ERROR("Unhandled view_by : %d", filter->view_by);
+ break;
+ }
+
+ return -1;
+}
+
+
+void ivug_list_delete_items(Eina_List *items)
+{
+ Media_Data* mdata;
+
+ if ( items == NULL )
+ {
+ MSG_SDATA_HIGH("Item list is NULL.");
+ return;
+ }
+
+ MSG_SDATA_HIGH("Removing items");
+
+ EINA_LIST_FREE(items, mdata)
+ {
+ if(mdata == NULL)
+ {
+ MSG_IVUG_ERROR("media list is NULL, can not free all media list");
+ }
+ else
+ {
+ ivug_free_mediadata(mdata);
+ }
+ }
+}
diff --git a/main/src/data/ivug-data-list.h b/main/src/data/ivug-data-list.h
new file mode 100755
index 0000000..59920b7
--- /dev/null
+++ b/main/src/data/ivug-data-list.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __IVUG_DATA_LIST_H__
+#define __IVUG_DATA_LIST_H__
+
+#include "ivug-data-filter.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+Eina_List *ivug_list_load_items(List_Filter *filter, int stp, int endp);
+
+int ivug_list_get_item_cnt(List_Filter *filter);
+
+void ivug_list_delete_items(Eina_List *items);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
diff --git a/main/src/data/ivug-data-priv.h b/main/src/data/ivug-data-priv.h
new file mode 100755
index 0000000..eb10f3d
--- /dev/null
+++ b/main/src/data/ivug-data-priv.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __IVUG_DATA_PRIV_H
+#define __IVUG_DATA_PRIV_H
+
+#include "ivug-data.h"
+#include "ivug-parameter.h"
+#include "ivug-data-filter.h"
+
+typedef struct {
+ Eina_List *header;
+
+ /* window loading setting */
+ int window_size;
+ int window_reload_offset;
+ int window_count;
+
+ int left_end;
+ int right_end;
+
+/*save bundle param*/
+ List_Filter *filter;
+
+ Eina_List *ss_shuffle_header;
+ Media_Item *ss_shuffle_current;
+ Media_Item *ss_shuffle_end;
+
+} _Media_List;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+Eina_List *
+_ivug_data_create_window_size_list(Media_List *mList, int start_index, int total_count);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __IVUG_DATA_PRIV_H
+
diff --git a/main/src/data/ivug-data-shuffle.c b/main/src/data/ivug-data-shuffle.c
new file mode 100755
index 0000000..fa4d07d
--- /dev/null
+++ b/main/src/data/ivug-data-shuffle.c
@@ -0,0 +1,238 @@
+/*
+ * 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-data.h"
+#include "ivug-data-priv.h"
+#include "ivug-data-shuffle.h"
+
+static void _swap_eina_list(Eina_List* list, int i, int j)
+{
+ Eina_List *first;
+ Eina_List *second;
+ int temp;
+
+ if ( i == j ) return ;
+
+ first = eina_list_nth_list(list, i);
+ second = eina_list_nth_list(list, j);
+
+ temp = (int)(first->data);
+ first->data = second->data;
+ second->data = (void *)temp;
+}
+
+void _shuffle_eina_list(Eina_List *list, int count)
+{
+ int i;
+ int r;
+
+ IV_ASSERT(list != NULL);
+
+ srand((unsigned)time(NULL));
+
+ for(i=0; i<count; i++)
+ {
+ r = rand()%count;
+ //MSG_UTIL_HIGH("rand = %d", r);
+ _swap_eina_list(list, i, r);
+ }
+}
+
+static Eina_List *_create_eina_list(int count)
+{
+ int i;
+
+ Eina_List *list = NULL;
+
+ for(i=1; i <= count; i++) /* 1 ~ total count */
+ {
+ list = eina_list_append(list, (void *)i);
+ }
+
+ _shuffle_eina_list(list, count);
+
+ return list;
+}
+
+
+bool ivug_data_init_shuffle_slide_show(Media_List *mList, slide_show_mode ss_mode, int cur_index, int total_count)
+{
+ IV_ASSERT(mList != NULL);
+
+ Eina_List *item = NULL;
+ _Media_List *_mList = (_Media_List *)mList;
+
+ if(total_count == 1 && !(ss_mode & SLIDE_SHOW_MODE_REPEAT))
+ {
+ return false;
+ }
+
+ item = eina_list_data_find_list(_mList->ss_shuffle_header, (void * )cur_index);
+ if(item == NULL)
+ {
+ MSG_SDATA_ERROR("Can't find cur index item %d", cur_index);
+ item = _mList->ss_shuffle_header;
+ }
+ _mList->ss_shuffle_end = item;
+ _mList->ss_shuffle_current = eina_list_next(item);
+
+ if( _mList->ss_shuffle_current == NULL)
+ {
+ _mList->ss_shuffle_current = _mList->ss_shuffle_header; /* back to first */
+ }
+
+ return true;
+}
+
+void ivug_data_deinit_shuffle_slide_show(Media_List *mList, int total_count)
+{
+ IV_ASSERT(mList != NULL);
+
+ _Media_List *_mList = (_Media_List *)mList;
+
+ _mList->ss_shuffle_end = NULL;
+ _mList->ss_shuffle_current = NULL;
+
+ _shuffle_eina_list(_mList->ss_shuffle_header, total_count);
+}
+
+void ivug_data_create_shuffled_list(Media_List *mList, int total_count)
+{
+ _Media_List *_mList = (_Media_List *)mList;
+
+ _mList->ss_shuffle_header = _create_eina_list(total_count);
+ _shuffle_eina_list(_mList->ss_shuffle_header, total_count); // Shuffle
+
+}
+
+int ivug_data_get_next_slide_show_index(Media_List *mList, slide_show_mode ss_mode, int next_index, int total_count, bool increase_flag)
+{
+ IV_ASSERT(mList != NULL);
+ _Media_List *_mList = (_Media_List *)mList;
+ int index = -1;
+ Eina_List *item = NULL;
+ Eina_List *list = NULL;
+
+ if(ss_mode & SLIDE_SHOW_MODE_SHUFFLE)
+ {
+ item = _mList->ss_shuffle_current;
+
+ list = eina_list_next(item);
+ if ( list == NULL)
+ {
+ list = _mList->ss_shuffle_header; /* back to start */
+ }
+ if(list == _mList->ss_shuffle_end && !(ss_mode & SLIDE_SHOW_MODE_REPEAT))
+ {
+ if(increase_flag == true)
+ {
+ _mList->ss_shuffle_current = NULL;
+ }
+ return -1;
+ }
+ if(increase_flag == true)
+ {
+ _mList->ss_shuffle_current = list;
+ }
+ index = (int)eina_list_data_get(list);
+ }
+ else
+ {
+ index = next_index + 1;
+ if(index > total_count && (ss_mode & SLIDE_SHOW_MODE_REPEAT) )
+ {
+ index = 1; /* back to start */
+ }
+ }
+ return index;
+}
+
+Media_Item * ivug_data_get_current_slide_show_item(Media_List *mList, slide_show_mode ss_mode, int cur_index, int *next_index, int total_count)
+{
+ IV_ASSERT(mList != NULL);
+
+ Eina_List *item = NULL;
+ int index;
+ Media_Item *slide_show_item = NULL;
+ _Media_List *_mList = (_Media_List *)mList;
+
+ if(ss_mode & SLIDE_SHOW_MODE_SHUFFLE)
+ {
+ item = _mList->ss_shuffle_current;
+
+ index = (int)eina_list_data_get(item);
+ }
+ else
+ {
+ index = cur_index + 1;
+ if(index > total_count && (ss_mode & SLIDE_SHOW_MODE_REPEAT) )
+ {
+ index = 1; /* back to start */
+ }
+ }
+ MSG_SDATA_HIGH("*******current shuffle index is %d", index);
+
+ slide_show_item = _ivug_data_create_window_size_list(mList, index, total_count);
+ if(slide_show_item == NULL)
+ {
+ MSG_SDATA_HIGH("*******current shuffle item is NULL");
+ return NULL;
+ }
+ *next_index = index;
+
+ return slide_show_item;
+}
+
+Media_Item * ivug_data_set_next_slide_show_item(Media_List *mList, slide_show_mode ss_mode, int *next_index, int total_count)
+{
+ IV_ASSERT(mList != NULL);
+
+ int index;
+ Media_Item *slide_show_item = NULL;
+
+ index = ivug_data_get_next_slide_show_index(mList, ss_mode, *next_index, total_count, false);
+ if(index < 0)
+ {
+ MSG_SDATA_HIGH("*******Next slide show item is NULL");
+ return NULL;
+ }
+
+ MSG_SDATA_HIGH("*******Next slide show index is %d", index);
+
+ slide_show_item = _ivug_data_create_window_size_list(mList, index, total_count);
+ if(slide_show_item == NULL)
+ {
+ MSG_SDATA_HIGH("*******Next slide show item is NULL");
+ return NULL;
+ }
+ ivug_data_append_media_item(mList, slide_show_item);
+
+ return slide_show_item;
+}
+
+
+Media_Item *
+ivug_data_get_next_shuffle_item(Media_List *mList)
+{
+ IV_ASSERT(mList != NULL);
+
+ _Media_List *_mList = (_Media_List *)mList;
+
+ return _mList->ss_shuffle_current; // current is set at next slide
+}
+
diff --git a/main/src/data/ivug-data-shuffle.h b/main/src/data/ivug-data-shuffle.h
new file mode 100755
index 0000000..c478443
--- /dev/null
+++ b/main/src/data/ivug-data-shuffle.h
@@ -0,0 +1,54 @@
+/*
+ * 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_SHUFFLER_H__
+#define __IVUG_DATA_SHUFFLER_H__
+
+#include "ivug-config.h"
+#include "ivug-data.h"
+
+typedef struct {
+ Eina_List *ss_shuffle_header;
+ Eina_List *ss_shuffle_current;
+ Eina_List *ss_shuffle_end;
+} SlideShow_List;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+bool ivug_data_init_shuffle_slide_show(Media_List *mList, slide_show_mode ss_mode, int cur_index, int total_count);
+
+void ivug_data_deinit_shuffle_slide_show(Media_List *mList, int total_count);
+
+Media_Item * ivug_data_get_current_slide_show_item(Media_List *mList, slide_show_mode ss_mode, int cur_index, int *next_index, int total_count);
+
+Media_Item * ivug_data_set_next_slide_show_item(Media_List *mList, slide_show_mode ss_mode, int *cur_index, int total_count);
+
+Media_Item * ivug_data_get_next_shuffle_item(Media_List *mList);
+
+int ivug_data_get_next_slide_show_index(Media_List *mList, slide_show_mode ss_mode, int cur_index, int total_count, bool increase_flag);
+
+void ivug_data_create_shuffled_list(Media_List *mList, int total_count);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __IVUG_DATA_SHUFFLER_H__
+
diff --git a/main/src/data/ivug-data.c b/main/src/data/ivug-data.c
new file mode 100755
index 0000000..4e05214
--- /dev/null
+++ b/main/src/data/ivug-data.c
@@ -0,0 +1,683 @@
+/*
+ * 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-main.h"
+#include "ivug-common.h"
+
+#include "ivug-data.h"
+#include "ivug-util.h"
+#include "ivug-data-priv.h"
+#include "ivug-data-list.h"
+#include "ivug-data-filter.h"
+
+
+#include <media-svc.h>
+
+static bool
+_ivug_data_set_window_section(Media_List *mList, int start_index, int total_count, int *stp, int *endp)
+{
+ IV_ASSERT(mList != NULL);
+
+ _Media_List *_mList = (_Media_List *)mList;
+
+ //if(total_count > _mList->window_size && start_index > 0) // TODO : IV_ASSERT(start_index > 0); after fix gallery
+ if(start_index > 0 && total_count > 0 && start_index <= total_count) // TODO : IV_ASSERT(start_index > 0); after fix gallery
+ {
+ *stp = (start_index-1) - (_mList->window_size/2);
+ if(*stp < 0)
+ {
+ *stp = 0;
+ }
+ *endp = (start_index-1) + (_mList->window_size/2);
+ if(*endp > total_count-1)
+ {
+ *endp = total_count-1;
+ }
+ if(_mList->window_count > 0)
+ {
+ if(*stp < _mList->left_end) /* load left window */
+ {
+ if(*endp > _mList->left_end-1)
+ {
+ *endp = _mList->left_end -1;
+ }
+ _mList->left_end = *stp;
+ }
+ if(*endp > _mList->right_end) /* load right window */
+ {
+ if(*stp < _mList->right_end+1)
+ {
+ *stp = _mList->right_end +1;
+ }
+ _mList->right_end = *endp;
+ }
+ }
+ else // first window loding
+ {
+ MSG_SDATA_HIGH("First window loading");
+ _mList->left_end = *stp;
+ _mList->right_end = *endp;
+ _mList->window_count++;
+ }
+ MSG_SDATA_HIGH("Window loading [%d~%d]", *stp, *endp);
+
+ MSG_SDATA_HIGH("true : _mlist [%d~%d]", _mList->left_end, _mList->right_end);
+ return true;
+ }
+ else
+ {
+ if(_mList->window_count == 0)
+ {
+ MSG_SDATA_HIGH("Entire loading");
+ _mList->left_end = 0;
+ _mList->right_end = total_count-1;
+ }
+ MSG_SDATA_HIGH("false : _mlist [%d~%d]", _mList->left_end, _mList->right_end);
+ return false;
+ }
+}
+
+
+static bool
+_ivug_data_add_media_item(Eina_List **list, const char *filepath)
+{
+ IV_ASSERT(list != NULL);
+
+ int ret = 0;
+ Mitem* item = NULL;
+
+ if (ivug_is_web_uri(filepath) == false)
+ { //local file.
+ ret = minfo_get_item(gGetMediaSVCHandle(), filepath, &item); //get cluster id
+ if (ret != MB_SVC_ERROR_NONE)
+ {
+ MSG_SDATA_ERROR("Cannot find file in media db for %s", filepath);
+ }
+ }
+
+ Media_Data* mdata = NULL;
+
+ if (item != NULL)
+ {
+ mdata = ivug_alloc_mediadata_from_mitem(item);
+ minfo_destroy_mtype_item(item);
+ }
+ else
+ {
+ mdata = ivug_alloc_mediadata_from_filepath(filepath);
+ }
+
+ if ( mdata == NULL )
+ {
+ MSG_SDATA_ERROR("Cannot create slide data for %s", filepath);
+ return false;
+ }
+
+ *list = eina_list_append(*list, mdata);
+
+ return true;
+
+}
+
+Eina_List *_ivug_data_create_window_size_list(Media_List *mList, int start_index, int total_count)
+{
+ IV_ASSERT(mList != NULL);
+
+ _Media_List *_mList = (_Media_List *)mList;
+ Eina_List* slide_list = NULL;
+
+ MSG_SDATA_HIGH("start index is %d", start_index);
+
+ if(start_index < 1 || start_index > total_count)
+ {
+ MSG_SDATA_ERROR("start index is invalid %d", start_index);
+ return NULL;
+ }
+
+// Eina_List *ivug_list_load_items(List_Filter *filter, int stp, int endp);
+
+ int stp = 0, endp = 0;
+
+ _ivug_data_set_window_section(mList, start_index, total_count, &stp, &endp);
+
+ slide_list = ivug_list_load_items(_mList->filter, stp, endp);
+
+ if(slide_list == NULL)
+ {
+ MSG_SDATA_ERROR("Create list ERROR");
+ return NULL;
+ }
+
+ return slide_list;
+}
+
+static Media_Item *
+_ivug_data_create_list(Media_List *mList, Eina_List **list, const char *filepath, int *start_index, int *total_count)
+{
+ IV_ASSERT(mList != NULL);
+ IV_ASSERT(filepath != NULL);
+
+ MSG_SDATA_HIGH("Creating slide data list");
+
+ _Media_List *_mList = (_Media_List *)mList;
+ Media_Item *item = NULL;
+
+ *total_count = -1;
+
+ if(_mList->filter->view_by == IVUG_VIEW_BY_FILE)
+ {
+ if (filepath == NULL)
+ {
+ MSG_SDATA_ERROR("file path is NULL");
+ return NULL;
+ }
+
+ // No need to create list. just one file only.
+ if ( _ivug_data_add_media_item(list, filepath) == false)
+ {
+ MSG_SDATA_ERROR("Cannot add file : %s", filepath);
+ return NULL;
+ }
+ *total_count = 1;
+ item = *list;
+ return item;
+ }
+ else
+ {
+ *total_count = ivug_list_get_item_cnt(_mList->filter);
+
+ *list = _ivug_data_create_window_size_list(mList, *start_index, *total_count);
+ }
+
+ if(*list == NULL)
+ {
+ MSG_SDATA_ERROR("list is NULL");
+ return NULL;
+ }
+
+ if(*total_count == 1)
+ {
+ item = *list;
+ *start_index = 1;
+ return item;
+ }
+ else if(*start_index > 0 && *start_index <= *total_count)
+ {
+ item = eina_list_nth_list(*list, (*start_index-1)-_mList->left_end);
+ }
+
+ Media_Data *mdata = NULL;
+ bool find = false;
+ int index = 0;
+
+ if(item != NULL)
+ {
+ MSG_SDATA_HIGH("start index exist");
+ mdata = ivug_data_get_data(item);
+
+ if(mdata != NULL)
+ {
+ if ((mdata)->filepath)
+ {
+ if(strncmp(filepath, mdata->filepath, strlen(filepath)) == 0)
+ {
+ MSG_SLIDER_HIGH("Founded Filepath=%s Index=%d", ivug_get_filename(mdata->filepath), *start_index);
+ index = *start_index; // recieve from bundle
+ find = true;
+ }
+ }
+ if (find == false && mdata->fileurl)
+ {
+ if (strncmp(filepath, mdata->fileurl, strlen(filepath)) == 0) //match
+ {
+ MSG_SLIDER_HIGH("Founded Fileurl=%s Index=%d", ivug_get_filename(mdata->fileurl), *start_index);
+ index = *start_index; // recieve from bundle
+ find = true;
+ }
+ }
+ if(find == false)
+ {
+ MSG_SLIDER_WARN("param index is not match to real index");
+ }
+ }
+ }
+ //check indexed item
+ if(item == NULL || find == false) // start index is not exist || can't find filename at window list
+ {
+ item = ivug_data_find_item(*list, filepath, &index);
+
+ if (item == NULL)
+ {
+ // TODO : find file at whole file list
+ MSG_SLIDER_ERROR("Item is not found for file %s", filepath);
+ return NULL;
+ }
+ }
+ *start_index = index;
+ MSG_SDATA_HIGH("Create slide data list END");
+ return item;
+}
+
+Media_List *ivug_data_init_media_list(const ivug_parameter *param)
+{
+ _Media_List *_mList = calloc(1, sizeof(_Media_List));
+ IV_ASSERT(_mList != NULL);
+
+ _mList->window_size = IV_WINDOW_SIZE;
+ _mList->window_reload_offset = IV_RELOAD_OFFSET;
+ _mList->window_count = 0;
+ _mList->left_end = 0;
+
+ _mList->filter = ivug_data_filter_create(param);
+
+ return (Media_List *)_mList;
+}
+
+Media_Item *
+ivug_data_create_media_list_from_param
+ (Media_List *mList, Eina_List **list, const char *filepath, int *start_index, int *total_count)
+{
+ IV_ASSERT(mList != NULL);
+
+ MSG_SDATA_HIGH("Creating slide data list");
+
+ _Media_List *_mList = (_Media_List *)mList;
+
+ if(list == NULL)
+ {
+ return _ivug_data_create_list(mList, &(_mList->header), filepath, start_index, total_count);
+ }
+ else
+ {
+ return _ivug_data_create_list(mList, list, filepath, start_index, total_count);
+ }
+}
+
+bool ivug_data_set_window_size(Media_List *mList, int size)
+{
+ _Media_List *_mList = (_Media_List *)mList;
+
+ if(size < 1)
+ {
+ MSG_SDATA_ERROR("Set window size error, size = %d", size);
+ _mList->window_size = 0;
+ return false;
+ }
+
+ _mList->window_size = size;
+ return true;
+}
+
+void ivug_data_reset_window_load_count(Media_List *mList)
+{
+ _Media_List *_mList = (_Media_List *)mList;
+
+ _mList->window_count = 0;
+}
+
+void
+ivug_data_delete_media_list(Media_List *mList)
+{
+ IV_ASSERT(mList != NULL);
+ _Media_List *_mList = (_Media_List *)mList;
+
+ MSG_SDATA_HIGH("Removing all media data");
+
+ ivug_list_delete_items(_mList->header);
+
+ ivug_data_filter_delete(_mList->filter);
+
+ free(_mList);
+}
+
+
+
+#ifdef TRACE_CALLER
+Media_Data *
+dbg_ivug_data_get_data(Media_Item *media_item, const char *func, unsigned int line)
+#else
+Media_Data *
+ivug_data_get_data(Media_Item *media_item)
+#endif // TRACE_CALLER
+{
+#ifdef TRACE_CALLER
+ MSG_SDATA_HIGH("Called by %s(%d) Item=0x%08x", func, line, media_item);
+#endif
+ IV_ASSERT(media_item != NULL);
+
+ Eina_List *item = media_item;
+
+ return eina_list_data_get(item);
+
+}
+
+Media_Item *
+ivug_data_get_first(Media_List *mList)
+{
+ IV_ASSERT(mList != NULL);
+ _Media_List *_mList = (_Media_List *)mList;
+
+ return (Media_Item *)_mList->header;
+}
+
+
+Media_Item *
+ivug_data_get_next(Media_Item *media_item)
+{
+ IV_ASSERT(media_item != NULL);
+
+ Eina_List *item = media_item;
+
+ Eina_List *list;
+
+ list = eina_list_next(item);
+
+ if ( list == NULL )
+ {
+ MSG_SDATA_ERROR("Next item is NULL");
+ return NULL;
+ }
+
+ return list;
+}
+
+Media_Item *
+ivug_data_get_prev(Media_Item *media_item)
+{
+ IV_ASSERT(media_item != NULL);
+
+ Eina_List *item = media_item;
+
+ Eina_List *list;
+
+ list = eina_list_prev(item);
+
+ if ( list == NULL )
+ {
+ MSG_SDATA_ERROR("Prev item is NULL");
+ return NULL;
+ }
+
+ return list;
+}
+
+Media_Item *
+ivug_data_find_item(Eina_List *list, const char* fileuri, int /*OUT*/ *index)
+{
+ IV_ASSERT(list != NULL);
+ IV_ASSERT(fileuri != NULL);
+
+ Eina_List *item;
+ Media_Data* mdata;
+
+ unsigned int i = 1;
+
+ EINA_LIST_FOREACH(list, item, mdata)
+ {
+ if(mdata == NULL)
+ {
+ MSG_SDATA_FATAL("sdata cannot be NULL");
+ return NULL;
+ }
+
+ if (mdata->filepath)
+ {
+ if (strncmp(mdata->filepath, fileuri, strlen(mdata->filepath)) == 0) //match
+ {
+ MSG_SDATA_HIGH("Founded Filepath=%s Index=%d", ivug_get_filename(mdata->filepath), i);
+ *index = i;
+ return item;
+ }
+ }
+
+ if (mdata->fileurl)
+ {
+ if (strncmp(mdata->fileurl, fileuri, strlen(mdata->fileurl)) == 0) //match
+ {
+ MSG_SDATA_HIGH("Founded Fileuri=%s Index=%d", mdata->fileurl, i);
+ *index = i;
+ return item;
+ }
+ }
+ i++;
+ }
+
+ *index = 0;
+ return NULL;
+}
+
+
+bool
+ivug_data_delete_media_item(Media_List *mList, Media_Item *media_item)
+{
+ IV_ASSERT(mList != NULL);
+ IV_ASSERT(media_item != NULL);
+
+ _Media_List *_mList = (_Media_List *)mList;
+
+ int ret;
+
+ Media_Data* mdata;
+
+ mdata = (Media_Data*)eina_list_data_get(media_item);
+
+ IV_ASSERT(mdata != NULL);
+
+ if (uuid_is_valid(mdata->mediaID) == true)
+ {
+ ret = minfo_delete_media_id(gGetMediaSVCHandle(), mdata->mediaID);
+
+ if (ret == MB_SVC_ERROR_NONE)
+ {
+ if (mdata->filepath)
+ {
+ if(ivug_remove_file(mdata->filepath) == false)
+ {
+ MSG_SDATA_ERROR("unlink error , file path =%s", mdata->filepath);
+ }
+ }
+ }
+ else
+ {
+ MSG_SDATA_ERROR("minfo_delete_media_id faild=%d uuid=%s file=%s", ret, uuid_getchar(mdata->mediaID), mdata->filepath);
+ goto ERROR;
+ }
+
+ }
+ else
+ {
+ if (mdata->filepath)
+ {
+ if(ivug_remove_file(mdata->filepath) == false)
+ {
+ MSG_SDATA_ERROR("file remove error , file path =%s", mdata->filepath);
+ }
+ }
+ else
+ {
+ MSG_SDATA_ERROR("delete faild file path is NULL");
+ goto ERROR;
+ }
+
+ }
+
+// TODO : Handle when current is deleted
+ ivug_free_mediadata(mdata); // Free data
+
+ _mList->header = eina_list_remove_list(_mList->header, media_item);
+ _mList->right_end--;
+
+ return true;
+
+ERROR:
+ ivug_free_mediadata(mdata); // Free data
+ _mList->header = eina_list_remove_list(_mList->header, media_item);
+ _mList->right_end--;
+
+ MSG_SDATA_ERROR("ivug_data_delete_slide faild.");
+ return false;
+
+}
+
+/* it delete start ~ end item */
+/* if end is null, it delete until last */
+bool
+ivug_data_delete_window_list(Media_List *mList, Media_Item *start_item, Media_Item *end_item)
+{
+ IV_ASSERT(mList != NULL);
+ IV_ASSERT(start_item != NULL);
+
+ _Media_List *_mList = (_Media_List *)mList;
+
+ Media_Item *current = start_item;
+ Media_Item *next = NULL;
+
+ Media_Data* mdata;
+
+ do
+ {
+ MSG_SDATA_HIGH("delete window list");
+ next = eina_list_next(current);
+
+ mdata = (Media_Data*)eina_list_data_get(current);
+ ivug_free_mediadata(mdata); // Free data
+ _mList->header = eina_list_remove_list(_mList->header, current);
+ if(end_item == NULL) /* delete right window */
+ {
+ /* TODO : _mList->right_end--; */
+ }
+ else /* delete left window */
+ {
+ /* TODO : _mList->left_end++; */
+ }
+ current = next;
+ }while(current && current != end_item);
+
+ if(current) /* delete end item */
+ {
+ mdata = (Media_Data*)eina_list_data_get(current);
+ ivug_free_mediadata(mdata); // Free data
+ _mList->header = eina_list_remove_list(_mList->header, current);
+ _mList->left_end++; /* this case is delete left window */
+ }
+
+ _mList->window_count--;
+
+ return true;
+}
+
+
+void
+ivug_data_delete_all_window_list(Media_List *mList)
+{
+ _Media_List *_mList = (_Media_List *)mList;
+
+ ivug_data_delete_window_list(mList, _mList->header, NULL);
+}
+
+
+void ivug_data_append_media_item(Media_List *mList, Eina_List* list)
+{
+ IV_ASSERT(mList != NULL);
+
+ _Media_List *_mList = (_Media_List *)mList;
+
+ MSG_SDATA_HIGH("original : slide_list_count is %d", eina_list_count(_mList->header));
+ if(_mList->window_count > 3)
+ {
+ /* TODO : delete window item */
+ //ivug_data_delete_window_list(mList, _mList->header, _mList->contact_point);
+ MSG_SDATA_HIGH("after delete : slide_list_count is %d", eina_list_count(_mList->header));
+ }
+ //_mList->contact_point = eina_list_last(_mList->header);
+
+ _mList->header = eina_list_merge(_mList->header, list);
+ MSG_SDATA_HIGH("merge next : slide_list_count is %d", eina_list_count(_mList->header));
+
+ _mList->window_count++;
+}
+
+void ivug_data_prepend_media_item(Media_List *mList, Eina_List* list)
+{
+ IV_ASSERT(mList != NULL);
+
+ _Media_List *_mList = (_Media_List *)mList;
+
+ MSG_SDATA_HIGH("original : slide_list_count is %d", eina_list_count(_mList->header));
+ if(_mList->window_count > 3)
+ {
+ /* TODO : delete window item */
+ //ivug_data_delete_window_list(mList, _mList->contact_point, NULL);
+ MSG_SDATA_HIGH("after delete : slide_list_count is %d", eina_list_count(_mList->header));
+ }
+ //_mList->contact_point = _mList->header;
+
+ _mList->header = eina_list_merge(list, _mList->header);
+ MSG_SDATA_HIGH("merge prev : slide_list_count is %d", eina_list_count(_mList->header));
+
+ _mList->window_count++;
+}
+
+
+Load_State
+ivug_data_set_window_loading(Media_List *mList, int cur_index, int total_count)
+{
+ Eina_List* slide_list_prev = NULL;
+ Eina_List* slide_list_next = NULL;
+ int start = -1;
+
+ IV_ASSERT(mList != NULL);
+
+ _Media_List *_mList = (_Media_List *)mList;
+
+ /* load right widow */
+ if(_mList->right_end < total_count-1 && cur_index-1 > _mList->right_end - _mList->window_reload_offset)
+ {
+ /* start index is basis for view's index(1~total) because +1 needed */
+ start = (_mList->right_end+1) + (_mList->window_size/2+1);
+ if(start > total_count) // index is 1~total
+ {
+ start = total_count;
+ }
+ MSG_SDATA_HIGH("start = %d, _mList->right_end = %d", start, _mList->right_end);
+ slide_list_next = _ivug_data_create_window_size_list(mList, start, total_count);
+ if(slide_list_next != NULL)
+ {
+ ivug_data_append_media_item(mList, slide_list_next);
+ return IVUG_SLIDER_LOADED_RIGHT;
+ }
+ }
+ /* load left widow */
+ else if(_mList->left_end > 0 && cur_index-1 < _mList->left_end + _mList->window_reload_offset)
+ {
+ /* start index is basis for view's index(1~total) because +1 needed */
+ start = (_mList->left_end+1) - (_mList->window_size/2+1);
+ if(start < 1) // index is 1~total
+ {
+ start = 1;
+ }
+ MSG_SDATA_HIGH("start = %d, _mList->left_end = %d", start, _mList->left_end);
+ slide_list_prev = _ivug_data_create_window_size_list(mList, start, total_count);
+ if(slide_list_prev != NULL)
+ {
+ ivug_data_prepend_media_item(mList, slide_list_prev);
+ return IVUG_SLIDER_LOADED_LEFT;
+ }
+ }
+ return IVUG_SLIDER_LOADED_NONE;
+}
+
diff --git a/main/src/data/ivug-data.h b/main/src/data/ivug-data.h
new file mode 100755
index 0000000..2dd9965
--- /dev/null
+++ b/main/src/data/ivug-data.h
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __IVUG_DATA_H__
+#define __IVUG_DATA_H__
+
+#include "ivug-common.h"
+#include "ivug-parameter.h"
+#include "ivug-mediadata.h"
+
+
+typedef enum {
+ IVUG_SLIDER_LOADED_NONE = 0x00, /* default value */
+ IVUG_SLIDER_LOADED_LEFT,
+ IVUG_SLIDER_LOADED_RIGHT,
+ IVUG_SLIDER_LOADED_STATUS_MAX,
+} Load_State;
+
+
+/* Opaque pointer for media list. */
+typedef void *Media_List;
+typedef Eina_List Media_Item; // Same as Eina_List
+
+#undef TRACE_CALLER
+
+bool
+ivug_data_set_window_size(Media_List *mList, int size);
+
+Load_State
+ivug_data_set_window_loading(Media_List *mList, int cur_index, int total_count);
+
+void ivug_data_reset_window_load_count(Media_List *mList);
+
+Media_List * ivug_data_init_media_list(const ivug_parameter *param);
+
+Media_Item *
+ivug_data_create_media_list_from_param(Media_List *mList, Eina_List **list, const char *filepath, int *start_index, int *total_count);
+
+void
+ivug_data_delete_media_list(Media_List *mList);
+
+void
+ivug_data_delete_all_window_list(Media_List *mList);
+
+Media_Item *
+ivug_data_get_first(Media_List *mList);
+
+Media_Item *
+ivug_data_get_prev(Media_Item *media_item);
+
+Media_Item *
+ivug_data_get_next(Media_Item *media_item);
+
+#ifdef TRACE_CALLER
+#define ivug_data_get_data(media_item) dbg_ivug_data_get_data(media_item , __func__, __LINE__)
+
+Media_Data *
+dbg_ivug_data_get_data(Media_Item *media_item, const char *func, unsigned int line);
+#else
+Media_Data *
+ivug_data_get_data(Media_Item *media_item);
+#endif
+
+void ivug_data_append_media_item(Media_List *mList, Eina_List* list);
+
+bool ivug_data_delete_media_item(Media_List *mList, Media_Item *media_item);
+
+Media_Item * ivug_data_find_item(Eina_List *list, const char* fileuri, int /*OUT*/ *index);
+
+#endif //__IVUG_DATA_H__
+
diff --git a/main/src/data/ivug-mediadata.c b/main/src/data/ivug-mediadata.c
new file mode 100755
index 0000000..b46a5da
--- /dev/null
+++ b/main/src/data/ivug-mediadata.c
@@ -0,0 +1,301 @@
+/*
+ * 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-main.h"
+#include "ivug-common.h"
+#include <media-svc.h>
+#include "ivug-mediadata.h"
+#include "ivug-file-info.h"
+
+Media_Data *ivug_alloc_mediadata_from_mitem(Mitem * item)
+{
+ IV_ASSERT(item != NULL);
+ IV_ASSERT(item->file_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;
+ }
+
+ mdata->mediaID = uuid_assign(item->uuid);
+
+ //file url
+ mdata->fileurl = strdup(item->file_url);
+ if (mdata->fileurl == NULL)
+ {
+ MSG_SDATA_ERROR("strdup return NULL");
+ free(mdata);
+ return NULL;
+ }
+
+ if (item->type == MINFO_ITEM_IMAGE)
+ {
+ //check file path.
+ MSG_SDATA_HIGH("Local image : %s. %s", uuid_getchar( mdata->mediaID ), mdata->fileurl);
+
+ mdata->thumbnail_path = NULL;
+
+ mdata->slide_type = SLIDE_TYPE_IMAGE;
+ mdata->filepath = strdup(mdata->fileurl);
+ if (mdata->filepath == NULL)
+ {
+ free(mdata->fileurl);
+ MSG_SDATA_ERROR("strdup return NULL");
+ free(mdata);
+ return NULL;
+ }
+ }
+ else if (item->type == MINFO_ITEM_VIDEO)
+ {
+ MSG_SDATA_HIGH("Local video : %s. %s", uuid_getchar(mdata->mediaID), mdata->fileurl);
+
+ if (item->thumb_url)
+ {
+ mdata->thumbnail_path = strdup(item->thumb_url); //thumbnail address
+ if (mdata->thumbnail_path == NULL)
+ {
+ free(mdata->fileurl);
+ MSG_SDATA_ERROR("strdup return NULL");
+ free(mdata);
+ return NULL;
+ }
+ }
+
+ mdata->slide_type = SLIDE_TYPE_VIDEO;
+ mdata->filepath = strdup(mdata->fileurl);
+ if (mdata->filepath == NULL)
+ {
+ free(mdata->fileurl);
+ if (mdata->thumbnail_path)
+ {
+ free(mdata->thumbnail_path);
+ }
+ MSG_SDATA_ERROR("strdup return NULL");
+ free(mdata);
+ return NULL;
+ }
+ }
+ return mdata;
+}
+
+Media_Data *ivug_alloc_mediadata_from_filepath(const char *filepath)
+{
+ IV_ASSERT(filepath != NULL);
+
+
+ // No need to create list. just one file only.
+ Mitem * item = NULL;
+ if (ivug_is_web_uri(filepath) == false)
+ {
+
+ //local file.
+ int ret = MB_SVC_ERROR_NONE;
+ ret = minfo_get_item(gGetMediaSVCHandle(), filepath, &item); //get cluster id
+ if (ret != MB_SVC_ERROR_NONE)
+ {
+ MSG_SDATA_ERROR("Cannot find file in media db for %s",filepath);
+ // Go through
+ }
+ }
+
+ Media_Data * mdata = NULL;
+ if (item != NULL)
+ {
+ MSG_SDATA_HIGH("File path is given. but founded in DB.");
+ mdata = ivug_alloc_mediadata_from_mitem(item);
+ minfo_destroy_mtype_item(item);
+ if (mdata == NULL)
+ {
+ MSG_SDATA_ERROR("Cannot add file : %s", filepath);
+ return NULL;
+ }
+ return mdata;
+ }
+ mdata = (Media_Data *) calloc(1, sizeof(Media_Data));
+ if (mdata == NULL)
+ {
+ MSG_SDATA_ERROR("Cannot allocate memory");
+ return NULL;
+ }
+ mdata->mediaID = INVALID_UUID; //copy id mitem
+
+ char *mime_type = NULL;
+ mime_type = ivug_fileinfo_get_mime_type(filepath);
+ if (mime_type == NULL)
+ {
+ MSG_SDATA_WARN("file path is not vaild = %s", filepath);
+ mdata->slide_type = SLIDE_TYPE_UNKNOWN;
+ mdata->fileurl = NULL;
+ mdata->filepath = NULL;
+ return mdata;
+ }
+
+
+ Media_Type slide_type = SLIDE_TYPE_NONE;
+
+ //image
+ if (strncmp(mime_type, "image/", strlen("image/")) == 0)
+ {
+ slide_type = SLIDE_TYPE_IMAGE;
+ }
+ else if (strncmp(mime_type, "video/", strlen("video/")) == 0)
+ {
+ slide_type = SLIDE_TYPE_VIDEO;
+ }
+ else
+ {
+ slide_type = SLIDE_TYPE_NONE;
+ }
+ MSG_SDATA_HIGH("File=%s Mime=%s", filepath, mime_type);
+ free(mime_type); //free strdup
+
+ mdata->thumbnail_path = NULL;
+
+ if (slide_type == SLIDE_TYPE_IMAGE)
+ {
+ mdata->slide_type = SLIDE_TYPE_IMAGE;
+ mdata->fileurl = strdup(filepath);
+ if (mdata->fileurl == NULL)
+ {
+ MSG_SDATA_ERROR("strdup return NULL");
+ goto ERROR;
+ }
+ mdata->filepath = strdup(filepath);
+ if (mdata->filepath == NULL)
+ {
+ MSG_SDATA_ERROR("strdup return NULL");
+ free(mdata->fileurl);
+ goto ERROR;
+ }
+ }
+ else if (slide_type == SLIDE_TYPE_VIDEO)
+ {
+ mdata->slide_type = SLIDE_TYPE_VIDEO;
+ mdata->fileurl = strdup(filepath);
+ if (mdata->fileurl == NULL)
+ {
+ MSG_SDATA_ERROR("strdup return NULL");
+ goto ERROR;
+ }
+ mdata->filepath = strdup(filepath);
+ if (mdata->filepath == NULL)
+ {
+ MSG_SDATA_ERROR("strdup return NULL");
+ free(mdata->fileurl);
+ goto ERROR;
+ }
+ }
+ else
+ {
+ MSG_SDATA_WARN("file path is not vaild = %s", filepath);
+ mdata->slide_type = SLIDE_TYPE_UNKNOWN;
+ mdata->fileurl = NULL;
+ mdata->filepath = NULL;
+ }
+ return mdata;
+ERROR:
+
+ if (mdata)
+ {
+ free(mdata);
+ }
+ return NULL;
+}
+
+void ivug_free_mediadata(Media_Data * mdata)
+{
+ IV_ASSERT(mdata != NULL);
+
+ uuid_free(mdata->mediaID);
+
+ //file path
+ if (mdata->filepath)
+ {
+ //IVUG_DEBUG_MSG("filepath =%s", sd->filepath);
+ free(mdata->filepath);
+ mdata->filepath = NULL;
+ }
+
+ //file url
+ if (mdata->fileurl)
+ {
+ MSG_SDATA_HIGH("Remove media data. %s", mdata->fileurl);
+ free(mdata->fileurl);
+ mdata->fileurl = NULL;
+ }
+
+ if (mdata->thumbnail_path)
+ {
+ free(mdata->thumbnail_path);
+ mdata->thumbnail_path = NULL;
+ }
+
+ free(mdata);
+}
+
+bool ivug_delete_mediadata(Media_Data * mdata)
+{
+ IV_ASSERT(mdata != NULL);
+
+ if (uuid_is_valid(mdata->mediaID) == true )
+ {
+ int ret = minfo_delete_media_id(gGetMediaSVCHandle(), mdata->mediaID);
+
+ if (ret == MB_SVC_ERROR_NONE)
+ {
+ if (mdata->filepath)
+ {
+ MSG_SDATA_HIGH("File removed. %s", mdata->filepath);
+ if (ivug_remove_file(mdata->filepath) == false)
+ {
+ MSG_SDATA_ERROR("file remove error : %s", mdata->filepath);
+ }
+ }
+ else
+ {
+ MSG_SDATA_ERROR("File path is NULL", mdata->filepath);
+ }
+ }
+ else
+ {
+ MSG_SDATA_ERROR("minfo_delete_media_id faild=%d uuid=%s file=%s", ret, uuid_getchar(mdata->mediaID), mdata->filepath);
+ return false;
+ }
+ }
+ else
+ {
+ if (mdata->filepath)
+ {
+ MSG_SDATA_HIGH("File removed. %s", mdata->filepath);
+
+ if (ivug_remove_file(mdata->filepath) == false)
+ {
+ MSG_SDATA_ERROR("file remove error : %s", mdata->filepath);
+ }
+ }
+ else
+ {
+ MSG_SDATA_ERROR("File path is NULL", mdata->filepath);
+ }
+
+ }
+
+ return true;
+}
+
diff --git a/main/src/data/ivug-mediadata.h b/main/src/data/ivug-mediadata.h
new file mode 100755
index 0000000..43b5e9e
--- /dev/null
+++ b/main/src/data/ivug-mediadata.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __IVUG_MEDIADATA_H__
+#define __IVUG_MEDIADATA_H__
+
+#include <media-svc.h>
+#include <visual-svc.h> // Mitem
+
+//slide type
+typedef enum {
+ SLIDE_TYPE_NONE = 0x00,
+ SLIDE_TYPE_IMAGE,
+ SLIDE_TYPE_VIDEO,
+ SLIDE_TYPE_UNKNOWN, // File is exists but it's type is unknown.
+} Media_Type;
+
+/*
+ This struct represents data for slide.
+ thumbnail_path is slide's thumbnail image path.
+ fileurl is saved item in media service.
+ 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 {
+//Data
+ Media_Type slide_type; //image, video
+
+ UUID mediaID; // Media ID
+
+ char* thumbnail_path; // thumbnail image file path.
+ char* fileurl; // file url.
+ char* filepath; // file path in local file system.
+} Media_Data;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Converting Media_Data from filepath
+ * @param filepath[in]
+ *
+**/
+Media_Data *ivug_alloc_mediadata_from_filepath(const char* filepath);
+
+/**
+ * Converting Mitem to Media_Data
+ * @param item[in]
+ *
+**/
+Media_Data *ivug_alloc_mediadata_from_mitem(Mitem* item);
+
+
+/**
+ * Free memory used by Media_Data
+ * @param mdata[in]
+ *
+**/
+void ivug_free_mediadata(Media_Data* mdata);
+
+/**
+ *
+ * Delete file indicated by @p mdata
+ *
+**/
+bool ivug_delete_mediadata(Media_Data* mdata);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __IVUG_MEDIADATA_H__ \ No newline at end of file
diff --git a/main/src/effect/include/ivug-anim.h b/main/src/effect/include/ivug-anim.h
new file mode 100755
index 0000000..cf7ddfa
--- /dev/null
+++ b/main/src/effect/include/ivug-anim.h
@@ -0,0 +1,56 @@
+/*
+ * 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__
+
+#include <stdbool.h>
+
+typedef enum {
+ ANIM_TYPE_LINEAR,
+ ANIM_TYPE_QUARTIC_INOUT,
+ ANIM_TYPE_QUINTIC_INOUT,
+ ANIM_TYPE_SINE,
+} anim_type_t;
+
+/*
+ t: current time b: start time c: change in value d: duration
+*/
+typedef double (*anim_transit_func_t) (double t, double b, double c, double d);
+
+typedef struct {
+/* private */
+ double duration;
+ double t_start;
+ double t_varing;
+
+ anim_transit_func_t transit_func;
+
+ void *user_data;
+} anim_handle_t;
+
+anim_handle_t *create_animation();
+
+void delete_animation(anim_handle_t *anim);
+
+bool update_animation(anim_handle_t *anim, double current, int *value);
+
+bool set_animation_type(anim_handle_t *anim, anim_type_t type);
+
+bool set_animation(anim_handle_t *anim, int start, int end, double duration);
+
+#endif
diff --git a/main/src/effect/include/ivug-effect.h b/main/src/effect/include/ivug-effect.h
new file mode 100755
index 0000000..7594c54
--- /dev/null
+++ b/main/src/effect/include/ivug-effect.h
@@ -0,0 +1,90 @@
+/*
+ * 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__
+
+#include <stdbool.h>
+#include <Elementary.h>
+#include "ivug-anim.h"
+
+#define EFFECT_LBYTES_ARGB8888(w) (((w) * 4))
+#define MAX_PERCENT (100.0f)
+#define MIN_PERCENT (0.0f)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *Effect_Data ;
+
+typedef void (*FuncFinished)(void *data);
+
+typedef struct {
+ Effect_Data eng_data;
+
+ FuncFinished pFinishedCB;
+ void *ClientData;
+
+ double t_base; // start time.
+ anim_handle_t *anim;
+ Ecore_Animator *animator;
+
+ struct {
+ Effect_Data (*init) (Evas_Object *src, Evas_Object *dst, int screen_w, int screen_h, int rotation);
+ void (*animate) (Effect_Data data, double percent);
+ void (*pause) (Effect_Data data); /* Not used*/
+ void (*resume) (Effect_Data data); /* Not used*/
+ void (*finalize) (Effect_Data data);
+
+ double (*get_duration)(Effect_Data data);
+ } func;
+
+} Effect_Engine;
+
+typedef enum _Effect_Type {
+ EFFECT_NONE,
+ EFFECT_SLIDE,
+ EFFECT_MAX
+} Effect_Type;
+
+
+Effect_Engine *ivug_effect_add(Effect_Type type);
+
+bool ivug_effect_init(Effect_Engine *engine, Evas_Object *src, Evas_Object *dst, int w, int h, int rotation);
+bool ivug_effect_start(Effect_Engine *engine, FuncFinished pFunc, void *data);
+bool ivug_effect_pause(Effect_Engine *engine);
+bool ivug_effect_resume(Effect_Engine *engine);
+bool ivug_effect_finalize(Effect_Engine *engine);
+
+
+/*
+ Private function for adding effect. Do not use below functions directly..
+*/
+Effect_Engine *ivug_fade_add(void);
+Effect_Engine *ivug_iris_add(void);
+Effect_Engine *ivug_dissolve_add(void);
+Effect_Engine *ivug_blind_add(void);
+Effect_Engine *ivug_slide_add(void);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __IVUG_EFFECT_H__ */
diff --git a/main/src/effect/ivug-anim.c b/main/src/effect/ivug-anim.c
new file mode 100755
index 0000000..b12d1fb
--- /dev/null
+++ b/main/src/effect/ivug-anim.c
@@ -0,0 +1,178 @@
+/*
+ * 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 */
+#include <memory.h>
+#include <stdlib.h>
+
+#include "ivug-common.h"
+
+#include "ivug-anim.h"
+
+/*
+ t: current time b: start time c: change in value d: duration
+*/
+static double _anim_linear(double t, double b, double c, double d)
+{
+ if(d != 0.0)
+ t /= d;
+ return b + c * (t);
+}
+
+static double _anim_sine(double t, double b, double c, double d)
+{
+/* TODO : Consider below table reconstruct. need only 0.0 ~ 1.0 range*/
+ static const double const SIN_TABLE[91] = {
+ 0.0000f, 0.0174f, 0.0349f, 0.0523f, 0.0698f,
+ 0.0872f, 0.1045f, 0.1219f, 0.1392f, 0.1564f,
+ 0.1736f, 0.1908f, 0.2079f, 0.2249f, 0.2419f,
+ 0.2588f, 0.2756f, 0.2924f, 0.3090f, 0.3256f,
+ 0.3420f, 0.3584f, 0.3746f, 0.3907f, 0.4067f,
+ 0.4226f, 0.4384f, 0.4540f, 0.4695f, 0.4848f,
+ 0.5000f, 0.5150f, 0.5299f, 0.5446f, 0.5592f,
+ 0.5736f, 0.5878f, 0.6018f, 0.6157f, 0.6293f,
+ 0.6528f, 0.6561f, 0.6691f, 0.6820f, 0.6947f,
+ 0.7071f, 0.7193f, 0.7314f, 0.7431f, 0.7547f,
+ 0.7660f, 0.7772f, 0.7880f, 0.7986f, 0.8090f,
+ 0.8191f, 0.8290f, 0.8387f, 0.8480f, 0.8571f,
+ 0.8660f, 0.8746f, 0.8829f, 0.8910f, 0.8988f,
+ 0.9063f, 0.9135f, 0.9205f, 0.9272f, 0.9336f,
+ 0.9397f, 0.9455f, 0.9511f, 0.9563f, 0.9613f,
+ 0.9659f, 0.9703f, 0.9744f, 0.9781f, 0.9816f,
+ 0.9848f, 0.9877f, 0.9903f, 0.9926f, 0.9945f,
+ 0.9962f, 0.9976f, 0.9986f, 0.9994f, 0.9998f,
+ 1.0f
+ };
+
+ if(d != 0.0)
+ t /= d; /* normalize */
+
+ int idx = (int)(90.0 * t);
+
+ return b + c * (SIN_TABLE[idx]);
+
+}
+
+static double _anim_ease_inout_quartic(double t, double b,
+ double c, double d)
+{
+ if(d != 0.0)
+ t /= d;
+ double ts = t * t;
+ double tc = ts * t;
+ return b + c * (-2 * tc + 3 * ts);
+
+}
+
+static double _anim_ease_inout_quintic(double t, double b,
+ double c, double d)
+{
+ if(d != 0.0)
+ t /= d;
+ double ts = t * t;
+ double tc = ts * t;
+ return b + c * (6 * tc * ts + -15 * ts * ts + 10 * tc);
+}
+
+anim_handle_t *create_animation()
+{
+ anim_handle_t *anim;
+
+ anim = calloc(1, sizeof(anim_handle_t));
+
+ if (anim == NULL) {
+ MSG_IVUG_ERROR("Cannot allocate memory");
+ return NULL;
+ }
+
+ return anim;
+
+}
+
+void delete_animation(anim_handle_t *anim)
+{
+ IV_ASSERT(anim != NULL);
+
+ free(anim);
+
+}
+
+bool set_animation_type(anim_handle_t *anim, anim_type_t type)
+{
+ IV_ASSERT(anim != NULL);
+
+ switch (type) {
+ case ANIM_TYPE_LINEAR:
+ anim->transit_func = _anim_linear;
+ break;
+ case ANIM_TYPE_QUARTIC_INOUT:
+ anim->transit_func = _anim_ease_inout_quartic;
+ break;
+
+ case ANIM_TYPE_QUINTIC_INOUT:
+ anim->transit_func = _anim_ease_inout_quintic;
+ break;
+
+ case ANIM_TYPE_SINE:
+ anim->transit_func = _anim_sine;
+ break;
+ default:
+ MSG_IVUG_ERROR("Invalid transition type=%d", type);
+ return false;
+ break;
+ }
+
+ return true;
+}
+
+bool set_animation(anim_handle_t *anim, int start, int end, double duration)
+{
+ IV_ASSERT(anim != NULL);
+
+ MSG_IVUG_MED("Set Anim. Start=%d End=%d Dur=%f", start, end, duration);
+ anim->duration = duration;
+ anim->t_start = start;
+ anim->t_varing = end - start;
+
+ return true;
+}
+
+bool update_animation(anim_handle_t *anim, double current, int *value)
+{
+ IV_ASSERT(anim != NULL);
+ IV_ASSERT(anim->transit_func != NULL);
+
+ if (current >= anim->duration) {
+ *value = anim->t_start + anim->t_varing;
+ MSG_IVUG_MED("End Start:%f Varing:%f Duration=%f",
+ anim->t_start, anim->t_varing, anim->duration);
+
+ MSG_IVUG_MED("End Current=%f Value=%d", current, *value);
+
+ return false; /* End of animation */
+ }
+
+ MSG_IVUG_MED("Start:%f Varing:%f Duration=%f Current=%f", anim->t_start,
+ anim->t_varing, anim->duration, current);
+
+ *value = (int)anim->transit_func(current, anim->t_start, anim->t_varing,
+ anim->duration);
+
+ MSG_IVUG_MED("Value = %d", *value);
+
+ return true;
+}
diff --git a/main/src/effect/ivug-effect.c b/main/src/effect/ivug-effect.c
new file mode 100755
index 0000000..ea17ee5
--- /dev/null
+++ b/main/src/effect/ivug-effect.c
@@ -0,0 +1,201 @@
+/*
+ * 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"
+
+#define SIN_TABLE_NUM 91
+
+/* Animation acceleration table */
+static const float const EFFECT_SIN_TABLE[SIN_TABLE_NUM] = {
+ 0.0000f, 0.0174f, 0.0349f, 0.0523f, 0.0698f,
+ 0.0872f, 0.1045f, 0.1219f, 0.1392f, 0.1564f,
+ 0.1736f, 0.1908f, 0.2079f, 0.2249f, 0.2419f,
+ 0.2588f, 0.2756f, 0.2924f, 0.3090f, 0.3256f,
+ 0.3420f, 0.3584f, 0.3746f, 0.3907f, 0.4067f,
+ 0.4226f, 0.4384f, 0.4540f, 0.4695f, 0.4848f,
+ 0.5000f, 0.5150f, 0.5299f, 0.5446f, 0.5592f,
+ 0.5736f, 0.5878f, 0.6018f, 0.6157f, 0.6293f,
+ 0.6528f, 0.6561f, 0.6691f, 0.6820f, 0.6947f,
+ 0.7071f, 0.7193f, 0.7314f, 0.7431f, 0.7547f,
+ 0.7660f, 0.7772f, 0.7880f, 0.7986f, 0.8090f,
+ 0.8191f, 0.8290f, 0.8387f, 0.8480f, 0.8571f,
+ 0.8660f, 0.8746f, 0.8829f, 0.8910f, 0.8988f,
+ 0.9063f, 0.9135f, 0.9205f, 0.9272f, 0.9336f,
+ 0.9397f, 0.9455f, 0.9511f, 0.9563f, 0.9613f,
+ 0.9659f, 0.9703f, 0.9744f, 0.9781f, 0.9816f,
+ 0.9848f, 0.9877f, 0.9903f, 0.9926f, 0.9945f,
+ 0.9962f, 0.9976f, 0.9986f, 0.9994f, 0.9998f,
+ 1.0f
+};
+
+#define SLIDESHOW_ANI_TIME (1.0f)
+
+
+static Eina_Bool
+_on_effect_animator(void *data)
+{
+ IV_ASSERT( data != NULL);
+ Effect_Engine *engine = data;
+
+ int value = 0;
+
+ if ( update_animation(engine->anim, ecore_loop_time_get() - engine->t_base, &value) == false ) // If last frame
+ {
+ engine->animator = NULL;
+
+ MSG_EFFECT_HIGH("Last effect frame. value=%d", value);
+
+ engine->func.animate(engine->eng_data, value); // Draw last frame.
+ // Inform to user.
+ if ( engine->pFinishedCB )
+ {
+ engine->pFinishedCB(engine->ClientData);
+ }
+
+ return ECORE_CALLBACK_CANCEL;
+ }
+
+ engine->func.animate(engine->eng_data, value);
+
+ return ECORE_CALLBACK_RENEW;
+}
+
+
+bool ivug_effect_init(Effect_Engine *engine, Evas_Object *src, Evas_Object *dst, int w, int h, int rotation)
+{
+ IV_ASSERT(engine != NULL );
+
+ void *data = engine->func.init(src, dst, w, h, rotation);
+ if (data == NULL) {
+ MSG_EFFECT_ERROR("init returned data is NULL");
+
+ return false;
+ }
+
+ engine->eng_data = data;
+
+ engine->anim = create_animation();
+ return true;
+}
+
+bool ivug_effect_start(Effect_Engine *engine, FuncFinished pFunc, void *data)
+{
+ ivug_retvm_if(engine == NULL, false, "engine is NULL");
+
+ IV_ASSERT(engine->func.animate != NULL);
+ IV_ASSERT(engine->eng_data != NULL);
+
+// Set up slide show animator
+ engine->t_base = ecore_loop_time_get();
+
+ double duration = SLIDESHOW_ANI_TIME;
+
+ if (engine->func.get_duration )
+ {
+ duration = engine->func.get_duration(engine->eng_data);
+ }
+
+ set_animation_type(engine->anim, ANIM_TYPE_LINEAR);
+ set_animation(engine->anim, 0, 100, duration); // 0~100% during 1 seconds
+
+ engine->pFinishedCB = pFunc;
+ engine->ClientData = data;
+
+ if (engine->animator == NULL)
+ {
+ engine->animator = ecore_animator_add(_on_effect_animator, engine);
+ }
+
+ return true;
+}
+
+bool ivug_effect_pause(Effect_Engine *engine)
+{
+/* Unused. */
+ return true;
+}
+
+bool ivug_effect_resume(Effect_Engine *engine)
+{
+/* Unused. */
+ return true;
+}
+
+bool ivug_effect_finalize(Effect_Engine *engine)
+{
+ ivug_retvm_if(engine == NULL, false, "engine is NULL");
+
+ if ( engine->animator )
+ {
+ ecore_animator_del(engine->animator);
+ engine->animator = NULL;
+ }
+
+ if (engine->eng_data)
+ {
+ if (engine->func.finalize)
+ {
+ MSG_EFFECT_HIGH("finalize");
+ engine->func.finalize(engine->eng_data);
+ }
+ else
+ {
+ MSG_EFFECT_ERROR("engine->func.finalize is NULL");
+ }
+
+ engine->eng_data = NULL;
+ }
+ else
+ {
+ MSG_EFFECT_ERROR("engine->eng_data is NULL");
+ }
+
+ if ( engine->anim )
+ {
+ delete_animation(engine->anim);
+ }
+
+ free(engine);
+ engine = NULL;
+
+ return true;
+}
+
+Effect_Engine *ivug_effect_add(Effect_Type type)
+{
+ Effect_Engine *eng = NULL;
+
+ switch (type) {
+ case EFFECT_SLIDE:
+ eng = ivug_slide_add();
+ break;
+
+ default:
+ MSG_EFFECT_ERROR("Unknown effect type=%d", type);
+ return NULL;
+ break;
+ }
+
+ if (eng == NULL)
+ {
+ MSG_EFFECT_ERROR("Cannot create effect enigne. type=%d", type);
+ return NULL;
+ }
+
+ return eng;
+}
diff --git a/main/src/effect/ivug-slide.c b/main/src/effect/ivug-slide.c
new file mode 100755
index 0000000..adb38f9
--- /dev/null
+++ b/main/src/effect/ivug-slide.c
@@ -0,0 +1,107 @@
+/*
+ * 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"
+
+
+typedef struct {
+ Evas_Object *src;
+ Evas_Object *dst;
+
+ int screen_w;
+ int screen_h;
+} Priv_Data;
+
+
+static Effect_Data __ivug_slide_init(Evas_Object *src, Evas_Object *dst, int screen_w, int screen_h, int rotation)
+{
+ Priv_Data *pData = calloc(1, sizeof(Priv_Data));
+ IV_ASSERT(pData != NULL);
+
+ pData->src = src;
+ pData->dst = dst;
+
+ pData->screen_w = screen_w;
+ pData->screen_h = screen_h;
+
+ evas_object_stack_below(dst, src);
+
+ evas_object_move(pData->src, 0, 0);
+
+// ivug_slider_item_move(sd->slide[NEXT_SLIDE], x + sd->slide[CENTER_SLIDE]->w + IMAGE_BETWEEN_MARGIN , y);
+
+ return (Effect_Data)pData;
+}
+
+static void __ivug_slide_anim(Effect_Data data, double percent)
+{
+ Priv_Data *pData = (Priv_Data *)data;
+
+ int first = 0;
+ int last = -pData->screen_w -IMAGE_BETWEEN_MARGIN;
+
+ int value = (double)first * (1.0f - percent / 100.0f) + (double)last * (percent / 100.0f);
+
+ MSG_EFFECT_MED("Slide animation. Value=%d %f", value, percent);
+
+ Evas_Coord ox, oy, ow, oh;
+ evas_object_geometry_get(pData->src, &ox, &oy, &ow, &oh);
+
+ evas_object_move(pData->src, value, oy);
+ evas_object_move(pData->dst, value + ow + IMAGE_BETWEEN_MARGIN, oy);
+
+}
+
+static void __ivug_slide_pause(Effect_Data data)
+{
+
+}
+
+static void __ivug_slide_resume(Effect_Data data)
+{
+
+}
+
+static void __ivug_slide_finialize(Effect_Data data)
+{
+ Priv_Data *pData = (Priv_Data *)data;
+
+ free(pData);
+
+}
+
+static double __ivug_slide_get_duration(Effect_Data data)
+{
+ return 0.2f;
+}
+
+
+
+Effect_Engine *ivug_slide_add(void)
+{
+ Effect_Engine *eng_slide = calloc(1, sizeof(Effect_Engine));
+ ivug_retvm_if(eng_slide == NULL, NULL, "calloc failed");
+
+ eng_slide->func.init = __ivug_slide_init;
+ eng_slide->func.animate = __ivug_slide_anim;
+ eng_slide->func.pause = __ivug_slide_pause;
+ eng_slide->func.resume = __ivug_slide_resume;
+ eng_slide->func.finalize = __ivug_slide_finialize;
+ eng_slide->func.get_duration = __ivug_slide_get_duration;
+
+ return eng_slide;
+}
diff --git a/main/src/effect/template.c b/main/src/effect/template.c
new file mode 100755
index 0000000..22868eb
--- /dev/null
+++ b/main/src/effect/template.c
@@ -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.
+ */
+
+
+#include "ivug-common.h"
+#include "ivug-effect.h"
+
+
+typedef struct {
+ Evas_Object *src;
+ Evas_Object *dst;
+
+ Evas_Object *object;
+ Evas_Object *orig_cliper;
+
+ Evas_Object *cliper;
+
+ int screen_w;
+ int screen_h;
+} effect_data;
+
+
+static Effect_Data __ivug_init(Evas_Object *src, Evas_Object *dst, int screen_w, int screen_h, int rotation)
+{
+ IVUG_FUNC_ENTER();
+
+ IVUG_FUNC_LEAVE();
+}
+
+static void __ivug_anim(Effect_Data data, double percent)
+{
+/* IVUG_FUNC_ENTER(); */
+
+/* IVUG_FUNC_LEAVE(); */
+}
+
+static void __ivug_pause(Effect_Data data)
+{
+ IVUG_FUNC_ENTER();
+
+ IVUG_FUNC_LEAVE();
+}
+
+static void __ivug_resume(Effect_Data data)
+{
+ IVUG_FUNC_ENTER();
+
+ IVUG_FUNC_LEAVE();
+}
+
+static void __ivug_spin_finialize(Effect_Data data)
+{
+ IVUG_FUNC_ENTER();
+
+ IVUG_FUNC_LEAVE();
+}
+
+Effect_Engine *ivug_xxx_add(void)
+{
+ Effect_Engine *eng_spin = calloc(1, sizeof(Effect_Engine));
+ ivug_retvm_if(eng_spin == NULL, NULL, "calloc failed");
+
+ eng_spin->func.init = &__ivug_init;
+ eng_spin->func.animate = &__ivug_anim;
+ eng_spin->func.pause = &__ivug_pause;
+ eng_spin->func.resume = &__ivug_resume;
+ eng_spin->func.finalize = &__ivug_finialize;
+
+ return eng_spin;
+}
diff --git a/main/src/ug-image-viewer.c b/main/src/ug-image-viewer.c
new file mode 100755
index 0000000..44958fd
--- /dev/null
+++ b/main/src/ug-image-viewer.c
@@ -0,0 +1,430 @@
+/*
+ * 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 <Ecore_X.h> /*EFL*/
+
+#include "ivug-common.h" //common
+#include "ivug-util.h"
+#include "ivug-main.h"
+#include "ivug-main-view.h"
+#include "ivug-setas-view.h"
+#include "ivug-details-view.h"
+#include "ivug-slider.h"
+
+#include "ug-image-viewer.h"
+
+#include "ivug-data.h"
+#include "ivug-parameter.h"
+
+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" );
+
+ 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);
+ elm_layout_theme_set(base, "layout", "application", "default");
+
+ return base;
+}
+
+static void *on_create(struct ui_gadget *ug, enum ug_mode mode, bundle *data, void *priv)
+{
+ struct ug_data *ugd;
+
+ PERF_CHECK_BEGIN("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 "main_init");
+ //init
+ if (!ivug_main_init(ug))
+ {
+ MSG_IMAGEVIEW_ERROR("ivug_main_init error");
+ return NULL;
+ }
+ PERF_CHECK_END(LVL1 "main_init");
+
+ PERF_CHECK_BEGIN(LVL1 "parse bundle");
+
+ ugd->ivug_param = ivug_param_create_from_bundle(data);
+ if ( ugd->ivug_param == NULL )
+ {
+ MSG_IMAGEVIEW_ERROR("Cannot parse parameter");
+ ivug_main_deinit(ug);
+ return NULL;
+ }
+ PERF_CHECK_END(LVL1 "parse bundle");
+
+ //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);
+ }
+
+ if ( ugd->base == NULL )
+ {
+ MSG_IMAGEVIEW_ERROR("Cannot create base view");
+ return NULL;
+ }
+
+ if(ugd->ivug_param->mode == IVUG_MODE_SETAS)
+ {
+ MSG_IMAGEVIEW_HIGH("UG types=%d", ugd->ivug_param->setas_type);
+
+ if(ugd->ivug_param->setas_type == IVUG_SET_AS_UG_TYPE_WALLPAPER)
+ {
+ // From Wall paper in Setting
+ ugd->setas_view = ivug_setas_view_screen_ug_create(ugd->base, 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)
+ {
+ MSG_IMAGEVIEW_ERROR("SetAS UG creation failed Type:%d", ugd->ivug_param->setas_type);
+ ivug_main_deinit(ug);
+ if (ugd->base)
+ {
+ evas_object_del(ugd->base);
+ ugd->base = NULL;
+ }
+ return NULL;
+ }
+
+ Evas_Object *layout = ivug_setas_view_object_get(ugd->setas_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);
+ }
+ 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);
+
+ if (ugd->main_view == NULL) //set main view.
+ {
+ MSG_IMAGEVIEW_ERROR("Main View Layout Lading Fail");
+ ivug_main_deinit(ug);
+ if (ugd->base)
+ {
+ evas_object_del(ugd->base);
+ ugd->base = NULL;
+ }
+ return NULL;
+ }
+
+ PERF_CHECK_END(LVL1 "main_view_create");
+
+// Load list.
+ if ( ivug_main_view_load_list(ugd->main_view, ugd->ivug_param) == false)
+ {
+ MSG_IMAGEVIEW_ERROR("Cannot load media list.");
+ // Need popup?
+ ivug_main_deinit(ug);
+ if (ugd->base)
+ {
+ evas_object_del(ugd->base);
+ ugd->base = NULL;
+ }
+ return NULL;
+
+ }
+
+ 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("On Create");
+
+ return ugd->base;
+}
+
+static void on_start(struct ui_gadget *ug, bundle *data, void *priv)
+{
+ MSG_IMAGEVIEW_HIGH("Image Viewer : %s", __func__);
+}
+
+static void on_pause(struct ui_gadget *ug, bundle *data, 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_slider_stop_slide_show(ugd->main_view->slider);
+ }
+
+}
+
+static void on_resume(struct ui_gadget *ug, bundle *data, 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_update(ugd->main_view);
+
+// ivug_slider_resume_slide_show(ugd->main_view->slider);
+ }
+
+}
+
+static void on_destroy(struct ui_gadget *ug, bundle *data, void *priv)
+{
+ MSG_IMAGEVIEW_HIGH("Image Viewer : %s UG=0x%08x", __func__, ug);
+
+ PERF_CHECK_BEGIN("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);
+ //destroy main view.
+ if ( ugd->main_view )
+ {
+ ivug_main_view_destroy(ugd->main_view);
+ ugd->main_view = NULL;
+ }
+
+ if(ugd->setas_view)
+ {
+ ivug_setas_view_destroy(ugd->setas_view);
+ ugd->setas_view = NULL;
+ }
+
+ //delete param.
+ if(ugd->ivug_param)
+ {
+ ivug_param_delete(ugd->ivug_param);
+ ugd->ivug_param = NULL;
+ }
+
+ //finalize data
+ if ( !ivug_main_deinit(ug))
+ {
+ MSG_IMAGEVIEW_ERROR("ivug_main_deinit failed");
+ }
+
+ if (ugd->base)
+ {
+ evas_object_del(ugd->base);
+ ugd->base = NULL;
+ }
+
+ MSG_IMAGEVIEW_HIGH("Destroyed all ug");
+
+ PERF_CHECK_END("On Destroy");
+
+}
+
+
+static void on_message(struct ui_gadget *ug, bundle *msg, bundle *data, void *priv)
+{
+ MSG_IMAGEVIEW_HIGH("Image Viewer : %s UG=0x%08x", __func__, ug); //on message
+}
+
+static void on_event(struct ui_gadget *ug, enum ug_event event, bundle *data, 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
+
+ //struct ug_data *ugd = (struct ug_data *)priv;
+
+ 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;
+ 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");
+
+ 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;
+ }
+
+ 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;
+
+ 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");
+
+ PERF_SHOW_RESULT(stdout);
+
+ 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.h b/main/src/ug-image-viewer.h
new file mode 100755
index 0000000..412a53b
--- /dev/null
+++ b/main/src/ug-image-viewer.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __UG_IMAGE_VIEWER_H__
+#define __UG_IMAGE_VIEWER_H__
+
+#include <Elementary.h>
+#include <libintl.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;
+
+ ivug_parameter* ivug_param;
+
+ bool bUseBlackTheme; // TODO : SetAs view from setting does not use black theme
+
+} _AppData;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Add functions here */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __UG_IMAGE_VIEWER_H__ */
diff --git a/main/src/util/ivug-file-info.c b/main/src/util/ivug-file-info.c
new file mode 100755
index 0000000..6419761
--- /dev/null
+++ b/main/src/util/ivug-file-info.c
@@ -0,0 +1,403 @@
+/*
+ * 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 <libexif/exif-data.h> //for exif
+#include <mm_file.h>
+#include <mmf/mm.h>
+#include <mmf/mm_file.h>
+#include <aul.h>
+
+#include "ivug-file-info.h"
+
+bool _get_video_gps_info(const char *filepath, double *latitude, double *longitude)
+{
+ IV_ASSERT(filepath != NULL);
+ IV_ASSERT(latitude != NULL);
+ IV_ASSERT(longitude != NULL);
+
+ MMHandleType tag = (MMHandleType) NULL;
+ int err = -1;
+ char *err_msg = NULL;
+ double gps_value = 0.0;
+
+ *latitude = 0.0;
+ *longitude = 0.0;
+
+ err = mm_file_create_tag_attrs(&tag, filepath);
+ if (!tag)
+ {
+ MSG_UTIL_ERROR("mm_file_create_tag_attrs ERROR %s", filepath);
+ return false;
+ }
+
+ err = mm_file_get_attrs(tag, &err_msg, MM_FILE_TAG_LATIDUE, &gps_value, NULL);
+ if (err == 0)
+ {
+ MSG_UTIL_HIGH("latitude: %f", gps_value);
+ if (gps_value != 0.0)
+ {
+ *latitude = gps_value;
+ }
+ }
+ else if (err_msg)
+ {
+ MSG_UTIL_ERROR("mm_file_get_attrs fails : %s", err_msg);
+ free(err_msg);
+ err_msg = NULL;
+ mm_file_destroy_tag_attrs(tag);
+
+ return false;
+ }
+
+ err = mm_file_get_attrs(tag, &err_msg, MM_FILE_TAG_LONGITUDE, &gps_value, NULL);
+ if (err == 0)
+ {
+ MSG_UTIL_HIGH("longitude: %f", gps_value);
+ if (gps_value != 0.0)
+ {
+ *longitude = gps_value;
+ }
+ }
+ else if (err_msg)
+ {
+ MSG_UTIL_ERROR("mm_file_get_attrs fails : %s", err_msg);
+ free(err_msg);
+ err_msg = NULL;
+ mm_file_destroy_tag_attrs(tag);
+ return false;
+ }
+
+ mm_file_destroy_tag_attrs(tag);
+ return true;
+}
+
+bool _get_image_gps_info(const char* filepath, double *latitude, double *longitude)
+{
+ IV_ASSERT(filepath != NULL);
+ IV_ASSERT(latitude != NULL);
+ IV_ASSERT(longitude != NULL);
+
+#define BUF_LEN (255)
+
+ ExifData *ed = NULL;
+ ExifEntry *entry = NULL;
+ ExifIfd ifd;
+ ExifTag tag;
+ char buf[BUF_LEN+1] = {'\0',};
+
+ /** get exifdata*/
+ ed = exif_data_new_from_file(filepath);
+ if (!ed)
+ {
+ return false;
+ }
+
+ ifd = EXIF_IFD_GPS;
+ tag = EXIF_TAG_GPS_LATITUDE;
+
+ /** get exifentry*/
+ entry = exif_data_get_entry(ed, tag);
+
+ if (!entry)
+ {
+ return false;
+ }
+
+ /** get value of the entry*/
+ if(exif_entry_get_value(entry, buf, BUF_LEN) == NULL)
+ {
+ exif_data_unref(ed);
+ return false;
+ }
+
+ {
+ buf[strlen(buf)] = '\0';
+ double tmp_arr[3] = { 0.0, 0.0, 0.0 };
+ int count = 0;
+ char* p = strtok(buf, ", ");
+ /** split the buf by , */
+ while(p != NULL)
+ {
+ tmp_arr[count] = atof(p);
+ count++;
+ p=strtok(NULL, ", ");
+ }
+
+ if( count != 3 )
+ {
+ MSG_UTIL_ERROR("Cannot get latitude info : %s", p);
+ exif_data_unref(ed);
+ return false;
+ }
+ *latitude = tmp_arr[0] + tmp_arr[1]/60 + tmp_arr[2]/3600;
+ }
+
+ tag = EXIF_TAG_GPS_LONGITUDE;
+
+ entry = exif_data_get_entry(ed, tag);
+
+ /** get value of the entry*/
+ if(exif_entry_get_value(entry, buf, BUF_LEN) == NULL)
+ {
+ exif_data_unref(ed);
+ return false;
+ }
+
+ {
+ buf[strlen(buf)] = '\0';
+ double tmp_arr[3] = { 0.0, 0.0, 0.0 };
+ int count = 0;
+ char* p = strtok(buf, ", ");
+ /** split the buf by , */
+ while(p != NULL)
+ {
+ tmp_arr[count] = atof(p);
+ count++;
+ p=strtok(NULL, ", ");
+ }
+
+ if( count != 3 )
+ {
+ MSG_UTIL_ERROR("Cannot get Longitude info : %s", p);
+ exif_data_unref(ed);
+ return false;
+ }
+
+ *longitude = tmp_arr[0] + tmp_arr[1]/60 + tmp_arr[2]/3600;
+ }
+
+ exif_data_unref(ed);
+
+ return true;
+}
+
+
+
+static bool _get_image_resolution(const char *path, int * /* OUT */ pWidth, int * /* OUT */pHeight)
+{
+ IV_ASSERT(path != NULL);
+
+ int width = 0;
+ int height = 0;
+
+ Evas *canvas;
+ Ecore_Evas *ee;
+
+ ee = ecore_evas_buffer_new(1, 1);
+ if (!ee)
+ {
+ MSG_DETAIL_ERROR("Cannot get EVAS");
+ return false;
+ }
+
+ canvas = ecore_evas_get(ee);
+
+ Evas_Object *img = evas_object_image_add(canvas);
+
+ evas_object_image_file_set(img, NULL, NULL);
+ evas_object_image_load_orientation_set(img, EINA_TRUE);
+ evas_object_image_load_scale_down_set(img, 0);
+
+ evas_object_image_file_set(img, path, NULL); // TODO : Error check
+ evas_object_image_size_get(img, &width, &height);
+
+ evas_object_image_file_set(img, NULL, NULL);
+ evas_object_del(img);
+
+ ecore_evas_free(ee);
+
+ *pWidth = width;
+ *pHeight = height;
+
+ MSG_DETAIL_HIGH("widht & height is [%d, %d]", width, height);
+
+ return true;
+}
+
+
+static bool
+_get_video_resolution(const char *path, int * /* OUT */ pWidth, int * /* OUT */pHeight)
+{
+ IV_ASSERT(path != NULL);
+
+ int w = 0;
+ int h = 0;
+ int error_code = MM_ERROR_NONE;
+
+ MMHandleType content = 0;
+ char *err_attr_name = NULL;
+
+ error_code = mm_file_create_content_attrs(&content, path);
+
+ if ( error_code != MM_ERROR_NONE )
+ {
+ MSG_UTIL_ERROR("mm_file_create_content_attrs() failed : ret=0x%08x", error_code);
+ return false;
+ }
+
+ error_code = MM_ERROR_NONE;
+ error_code = mm_file_get_attrs(content, &err_attr_name,
+ MM_FILE_CONTENT_VIDEO_WIDTH, &w,
+ MM_FILE_CONTENT_VIDEO_HEIGHT, &h,
+ NULL
+ );
+
+ if (error_code != MM_ERROR_NONE)
+ {
+ MSG_DETAIL_ERROR("mm_file_get_attrs() failed : ret=0x%08x", error_code);
+ MSG_DETAIL_ERROR("Error attribute name : %s", err_attr_name);
+ free(err_attr_name);
+
+ error_code = mm_file_destroy_content_attrs(content);
+ if (error_code != 0)
+ {
+ MSG_DETAIL_ERROR("mm_file_destroy_content_attrs() failed : ret=0x%08x", error_code);
+ }
+
+ return false;
+ }
+
+ *pWidth = w;
+ *pHeight = h;
+
+ error_code = mm_file_destroy_content_attrs(content);
+ if (error_code != 0)
+ {
+ MSG_DETAIL_ERROR("mm_file_destroy_content_attrs() failed : ret=0x%08x", error_code);
+ }
+
+ return true;
+}
+
+bool ivug_fileinfo_get_image_resolution(const char *path, int * /* OUT */ pWidth, int * /* OUT */pHeight)
+{
+ if ( path == NULL )
+ {
+ MSG_UTIL_ERROR("Cannot get image resolution. path is NULL");
+ return false;
+ }
+
+ if(ivug_is_file_exist(path) == false)
+ {
+ MSG_UTIL_ERROR("%s : %s is not exist", __func__, path);
+ return false;
+ }
+
+ return _get_image_resolution(path, pWidth, pHeight);
+}
+
+
+bool ivug_fileinfo_get_video_resolution(const char *path, int * /* OUT */ pWidth, int * /* OUT */pHeight)
+{
+ if ( path == NULL )
+ {
+ MSG_UTIL_ERROR("Cannot get video resolution. path is NULL");
+ return false;
+ }
+
+ if(ivug_is_file_exist(path) == false)
+ {
+ MSG_UTIL_ERROR("%s : %s is not exist", __func__, path);
+ return false;
+ }
+
+ return _get_video_resolution(path, pWidth, pHeight);
+}
+
+bool ivug_fileinfo_get_video_gps_info(const char *path, double *latitude, double *longitude)
+{
+ if ( path == NULL )
+ {
+ MSG_UTIL_ERROR("Cannot get video gps location. path is NULL");
+ return false;
+ }
+
+ if(ivug_is_file_exist(path) == false)
+ {
+ MSG_UTIL_ERROR("%s : %s is not exist", __func__, path);
+ return false;
+ }
+
+ return _get_video_gps_info(path, latitude, longitude);
+}
+
+
+bool ivug_fileinfo_get_image_gps_info(const char* path, double *latitude, double *longitude)
+{
+ if ( path == NULL )
+ {
+ MSG_UTIL_ERROR("Cannot get image gps location. path is NULL");
+ return false;
+ }
+
+ if(ivug_is_file_exist(path) == false)
+ {
+ MSG_UTIL_ERROR("%s : %s is not exist", __func__, path);
+ return false;
+ }
+
+ return _get_image_gps_info(path, latitude, longitude);
+}
+
+
+char *ivug_fileinfo_get_file_extension(const char *path)
+{
+ if ( path == NULL )
+ {
+ MSG_UTIL_ERROR("Cannot get file extension. path is NULL");
+ return NULL;
+ }
+
+ char *ext = NULL;
+
+ ext = strrchr(path, '.');
+
+ if ( (ext != NULL) && ((ext+1) != NULL) )
+ {
+ return strdup(ext + 1);
+ }
+
+ return NULL;
+
+}
+
+char *ivug_fileinfo_get_mime_type(const char *path)
+{
+ if ( path == NULL )
+ {
+ MSG_UTIL_ERROR("Cannot get mine type. path is NULL");
+ return NULL;
+ }
+
+ //check mine type.
+ char *mime_type = NULL;
+
+ efreet_mime_init();
+ const char *type = NULL;
+ type = efreet_mime_type_get(ecore_file_file_get(path));
+ if ( type != NULL )
+ {
+ mime_type = strdup(type);
+ }
+ efreet_mime_shutdown();
+
+ return mime_type;
+}
+
+
diff --git a/main/src/util/ivug-file-info.h b/main/src/util/ivug-file-info.h
new file mode 100755
index 0000000..ac8a3fa
--- /dev/null
+++ b/main/src/util/ivug-file-info.h
@@ -0,0 +1,57 @@
+/*
+ * 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__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ ivug_fileinfo_*() returns false when error. otherwise return true and fill proper value in [out] param
+*/
+bool ivug_fileinfo_get_image_gps_info(const char* filepath, double * /* OUT */ latitude, double * /* OUT */ longitude);
+bool ivug_fileinfo_get_video_gps_info(const char *filepath, double * /* OUT */ latitude, double * /* OUT */ longitude);
+
+bool ivug_fileinfo_get_video_resolution(const char *filepath, int * /* OUT */ pWidth, int * /* OUT */pHeight);
+bool ivug_fileinfo_get_image_resolution(const char *filepath, int * /* OUT */ pWidth, int * /* OUT */pHeight);
+
+
+/*
+ return file extension string.
+
+ CAUTION : user should free returned string.
+*/
+char *ivug_fileinfo_get_file_extension(const char *filepath);
+
+
+/*
+ return mine type from file.
+
+ CAUTION : user should free returned string.
+*/
+char *ivug_fileinfo_get_mime_type(const char *path);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __IVUG_FILE_INFO_H__
+
diff --git a/main/src/util/ivug-listpopup.c b/main/src/util/ivug-listpopup.c
new file mode 100755
index 0000000..6ea395f
--- /dev/null
+++ b/main/src/util/ivug-listpopup.c
@@ -0,0 +1,274 @@
+/*
+ * 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-listpopup.h"
+
+
+#define POPUP_RESPONSE_NOT_SELECTED (-99)
+
+
+typedef struct {
+ Evas_Object *popup;
+
+ Evas_Smart_Cb response;
+ void* user_data;
+
+} Selectpopup;
+
+
+static char *
+_on_label_set(void *data, Evas_Object *obj, const char *part)
+{
+ IV_ASSERT( data != NULL);
+
+ ivug_listpopup_item *item = (ivug_listpopup_item *)data;
+
+ return strdup(item->caption); //dump
+}
+
+
+static void
+_on_genlist_selected(void *data, Evas_Object *obj, void *event_info)
+{
+ Selectpopup *pData = data;
+ Evas_Object *genlist = obj;
+ Elm_Object_Item *genitem = (Elm_Object_Item *)event_info;
+
+ IV_ASSERT( genlist != NULL);
+
+ if (genitem == NULL)
+ {
+ MSG_MAIN_ERROR("genlist item is NULL");
+ return;
+ }
+
+ ivug_listpopup_item *item = (ivug_listpopup_item *)elm_object_item_data_get(genitem);
+
+// Call response
+ pData->response(pData->user_data, pData->popup, item);
+
+}
+
+
+static ivug_listpopup_item *_dup_item(ivug_listpopup_item *item)
+{
+ ivug_listpopup_item *newitem = NULL;
+
+ newitem = calloc(1, sizeof(ivug_listpopup_item));
+
+ newitem->index = item->index;
+
+ if ( item->iconpath )
+ newitem->iconpath = strdup(item->iconpath);
+
+ if ( item->caption )
+ newitem->caption = strdup(item->caption); // Should be freed
+
+ newitem->data = item->data;
+
+ return newitem;
+}
+
+
+static void _on_genlist_item_del(void *data, Evas_Object *obj)
+{
+ IV_ASSERT( data != NULL);
+
+ ivug_listpopup_item *item = data;
+
+ MSG_IMAGEVIEW_HIGH("Remove genlist item");
+
+ if ( item->caption )
+ free(item->caption);
+
+ if ( item->iconpath )
+ free(item->iconpath);
+
+ free(item);
+}
+
+
+static void
+_on_popup_close(void *data, Evas_Object *obj, void *event_info)
+{
+ Selectpopup *pData = data;
+
+ pData->response(pData->user_data, pData->popup, NULL); // Call user callback
+}
+
+static void _on_popup_deleted(void * data, Evas * e, Evas_Object * obj, void * event_info)
+{
+ MSG_IMAGEVIEW_HIGH("Remove popup");
+
+ Selectpopup *pData = data;
+
+ free(pData);
+}
+
+
+
+typedef struct {
+ Eina_List *list;
+} _ivug_listpopup_itemlist;
+
+
+ivug_listpopup_itemlist ivug_listpopup_itemlist_new()
+{
+ _ivug_listpopup_itemlist *pList = malloc(sizeof(_ivug_listpopup_itemlist));
+ IV_ASSERT(pList != NULL);
+
+ pList->list = NULL;
+
+ return (ivug_listpopup_itemlist)pList;
+}
+
+unsigned int ivug_listpopup_itemlist_get_count(ivug_listpopup_itemlist items)
+{
+ _ivug_listpopup_itemlist *pList = items;
+ IV_ASSERT(pList != NULL);
+
+ return eina_list_count(pList->list);
+}
+
+ivug_listpopup_item *ivug_listpopup_itemlist_add(ivug_listpopup_itemlist items, int index, const char *iconpath, const char *caption, void *data, bool bDisabled)
+{
+ _ivug_listpopup_itemlist *pList = items;
+ IV_ASSERT(pList != NULL);
+
+ ivug_listpopup_item *item = NULL;
+
+ {
+ item = calloc(1, sizeof(ivug_listpopup_item));
+
+ item->index = index;
+
+ if ( iconpath )
+ item->iconpath = strdup(iconpath);
+
+ if ( caption )
+ item->caption = strdup(caption); // Should be freed
+
+ item->data = data;
+ item->bDisabled = bDisabled;
+ }
+
+ pList->list = eina_list_append(pList->list, item);
+
+ return item;
+
+
+}
+
+void ivug_listpopup_itemlist_free(ivug_listpopup_itemlist items)
+{
+ _ivug_listpopup_itemlist *pList = items;
+ IV_ASSERT(pList != NULL);
+
+ ivug_listpopup_item *item = NULL;
+
+ EINA_LIST_FREE(pList->list, item )
+ {
+ if ( item->caption )
+ free(item->caption);
+
+ if ( item->iconpath )
+ free(item->iconpath);
+
+ free(item);
+ }
+
+ free(pList);
+}
+
+
+Evas_Object *ivug_listpopup_show(Evas_Object *parent, const char* title, ivug_listpopup_itemlist items, Evas_Smart_Cb response, void* user_data)
+{
+ Evas_Object *popup;
+
+// create popup
+ popup = elm_popup_add(parent);
+ if (!popup)
+ {
+ MSG_IMAGEVIEW_ERROR("Error : popup create failed.");
+ return NULL;
+ }
+
+ elm_object_style_set(popup, "menustyle");
+ elm_object_part_text_set(popup, "title,text", title);
+
+ evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_weight_set(popup, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+ Evas_Object *btn_close = elm_button_add(popup);
+ elm_object_text_set(btn_close, IDS_CLOSE);
+ elm_object_part_content_set(popup, "button1", btn_close);
+
+// create genlist
+ Evas_Object *genlist;
+ static Elm_Genlist_Item_Class itc = {0,};
+
+ genlist = elm_genlist_add(popup);
+
+ itc.version = ELM_GENLIST_ITEM_CLASS_VERSION;
+ itc.item_style = "1text";
+ itc.func.text_get = _on_label_set;
+ itc.func.content_get = NULL;
+ itc.func.state_get = NULL;
+ itc.func.del = _on_genlist_item_del;
+
+ evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+ Selectpopup *pData = malloc(sizeof(Selectpopup));
+
+ pData->popup = popup;
+ pData->response = response;
+ pData->user_data = user_data;
+
+ _ivug_listpopup_itemlist *pList = items;
+
+ ivug_listpopup_item *pItem = NULL;
+ Eina_List *tmp;
+ Elm_Object_Item *gItem;
+
+
+ EINA_LIST_FOREACH(pList->list, tmp, pItem)
+ {
+ gItem = elm_genlist_item_append(genlist, &itc, _dup_item(pItem), NULL /* parent */, ELM_GENLIST_ITEM_NONE, _on_genlist_selected, pData);
+
+ elm_object_item_disabled_set(gItem, pItem->bDisabled);
+ }
+
+// Put together
+ Evas_Object *box;
+ box = elm_box_add(popup);
+ evas_object_show(genlist);
+ elm_box_pack_end(box, genlist);
+ elm_object_content_set(popup, box);
+
+ evas_object_smart_callback_add(btn_close, "clicked", _on_popup_close, pData);
+
+ evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, _on_popup_deleted, pData);
+
+ evas_object_show(popup);
+
+ return popup;
+
+}
+
+
diff --git a/main/src/util/ivug-listpopup.h b/main/src/util/ivug-listpopup.h
new file mode 100755
index 0000000..11715eb
--- /dev/null
+++ b/main/src/util/ivug-listpopup.h
@@ -0,0 +1,81 @@
+/*
+ * 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__
+
+typedef struct {
+ int index;
+
+ char *iconpath;
+ char *caption;
+ void *data;
+
+ bool bDisabled; // Item is disabled when true.
+} ivug_listpopup_item;
+
+typedef void *ivug_listpopup_itemlist;
+
+/*
+ Helper functions for ivug_listpopup_item
+*/
+ivug_listpopup_itemlist ivug_listpopup_itemlist_new();
+
+ivug_listpopup_item *ivug_listpopup_itemlist_add(ivug_listpopup_itemlist items, int index, const char *iconpath, const char *caption, void *data, bool bDisabled);
+
+void ivug_listpopup_itemlist_free(ivug_listpopup_itemlist items);
+
+
+
+/*
+ Create & Show popup including genlist.
+
+ example
+
+ void _on_selected(void *data, Evas_Object *obj, void *event_info)
+ {
+ Evas_Object *popup = genlist;
+ ivug_listpopup_item *item = event_info;
+ int nIndex = event_info;
+
+ if ( nIndex == 1 )
+ printf("1 is selected");
+
+ evas_object_del(popup); // Show destroy popup explicitly
+ mypopup = NULL;
+ }
+
+ ...
+ {
+ ivug_listpopup_itemlist items = ivug_listpopup_itemlist_new();
+
+ ivug_listpopup_itemlist_add(items, 0, NULL, "Select me 1", NULL, false);
+ ivug_listpopup_itemlist_add(items, 1, NULL, "Select me 1", NULL, false);
+ ivug_listpopup_itemlist_add(items, 2, "/data/myicon.png", "Select me 1", NULL, false);
+
+ mypopup = ivug_selectpopup_show(parent, "example", items, v, myData);
+
+ eina_list_free(items);
+ }
+
+
+*/
+Evas_Object *ivug_listpopup_show(Evas_Object *parent, const char* title, ivug_listpopup_itemlist items , Evas_Smart_Cb response, void* user_data);
+
+
+#endif // __IVUG_LISTPOPUP_H__
+
diff --git a/main/src/util/ivug-util.c b/main/src/util/ivug-util.c
new file mode 100755
index 0000000..496f027
--- /dev/null
+++ b/main/src/util/ivug-util.c
@@ -0,0 +1,286 @@
+/*
+ * 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 <unistd.h>
+#include <stdlib.h>
+#include <aul.h>
+
+#include <vconf.h>
+#include <vconf-keys.h>
+#include <pmapi.h>
+
+#include <media-svc.h>
+#include <visual-svc.h>
+
+/*
+ If filepath is web url, return TRUE.
+
+*/
+bool ivug_is_web_uri(const char* uri)
+{
+//check file url type. local , http, ftp.
+ IV_ASSERT(uri != NULL);
+
+ static const char* web_protocal_name[] =
+ {
+ "http://",
+ "ftp://",
+ NULL,
+ };
+
+ int i = 0;
+ while (web_protocal_name[i] != NULL)
+ {
+ if ( strlen(uri) > strlen(web_protocal_name[i]) )
+ {
+ if (strncmp(uri, web_protocal_name[i], strlen(web_protocal_name[i])) == 0)
+ {
+ return true;
+ }
+ }
+
+ i++;
+ }
+
+ MSG_UTIL_MED("Not web uri. %s", uri);
+
+ return false;
+}
+
+
+unsigned int get_distance(int prevX, int prevY, int X, int Y)
+{
+#include <math.h>
+ int dx = prevX - X;
+ int dy = prevY - Y;
+
+ return sqrt(dx*dx + dy*dy);
+}
+
+
+
+#define USE_ECORE_FILE
+
+#include <Ecore_File.h>
+
+/*
+ Remove fname file.
+ Returns true fname is not exist or removed sucessfully
+*/
+bool ivug_remove_file(const char *filepath)
+{
+ char error_msg[256];
+ if (ecore_file_exists(filepath) == EINA_FALSE)
+ {
+ MSG_UTIL_ERROR("Already removed.%s", filepath);
+ return true;
+ }
+
+#ifdef USE_ECORE_FILE
+ if ( ecore_file_unlink(filepath) == EINA_FALSE)
+ {
+ MSG_UTIL_ERROR("Cannot remove file : %s %s", filepath, strerror_r(errno, error_msg, sizeof(error_msg)) );
+ return false;
+ }
+
+ return true;
+#else
+ if ( unlink(filepath) != 0 )
+ {
+ MSG_UTIL_ERROR("Cannot remove file : %s %s", filepath, strerror_r(errno, error_msg, sizeof(error_msg)) );
+ return false;
+ }
+
+ return true;
+#endif
+}
+
+bool ivug_rename_file(const char *src, const char *dst)
+{
+ if (ecore_file_exists(src) == EINA_FALSE)
+ {
+ MSG_UTIL_ERROR("Source file is not exist : %s", src);
+ return false;
+ }
+
+ if (dst == NULL)
+ {
+ MSG_UTIL_ERROR("Destination file is NULL");
+ return false;
+ }
+
+
+ char error_msg[256];
+
+ if ( rename(src, dst) < 0)
+ {
+ MSG_UTIL_ERROR("Cannot rename from %s to %s : %s", src, dst, strerror_r(errno, error_msg, sizeof(error_msg)) );
+ return false;
+ }
+
+ return true;
+}
+
+char *
+ivug_mktemp(char* filepath, char*ext)
+{
+ ivug_retv_if(!filepath || !ext, NULL);
+
+ MSG_IVUG_HIGH("filepath %s, ext %s", filepath, ext);
+
+ char tempname[IVUG_MAX_FILE_PATH_LEN+1] = {0};
+ snprintf(tempname, sizeof(tempname), "%s_0.%s",filepath, ext);
+ int i = 1;
+
+// TODO : Will implement with another algorithm
+ while(ecore_file_exists(tempname) == EINA_TRUE )
+ {
+ snprintf(tempname, sizeof(tempname),"%s_%d.%s", filepath, i, ext);
+ i++;
+ }
+
+ MSG_IVUG_HIGH( " tempname %s, i %d", tempname, i);
+
+ return strdup(tempname);
+}
+
+
+/*
+ Check whether given filepath file exists
+
+ CAUTION : filepath cannot be NULL.
+*/
+bool ivug_is_file_exist(const char* filepath)
+{
+ IV_ASSERT(filepath != NULL);
+
+ if ( ecore_file_exists(filepath) == EINA_TRUE)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+
+/*
+ Returns start pointer of filename within filepath.
+ No memory allocated in this function. so user do not free returned pointer.
+
+ CAUTION : filepath cannot be NULL.
+*/
+const char * ivug_get_filename(const char *filepath)
+{
+ if ( filepath == NULL )
+ {
+ MSG_UTIL_WARN("File path is NULL");
+ return "NULL";
+ }
+
+#define DIRECORY_SPLITTER '/'
+ const char*pFileName = NULL;
+
+ pFileName = strrchr(filepath, DIRECORY_SPLITTER);
+ pFileName = (NULL == pFileName)? "": (pFileName+1);
+
+ return pFileName;
+}
+
+
+/*
+
+ Media service utility
+
+*/
+
+#include <media-svc.h>
+
+UUID ivug_get_album_id_from_filepath(const char *filepath)
+{
+ int ret = 0;
+ Mitem* item = NULL;
+
+ MediaSvcHandle *dbhandle = NULL;
+
+ int err = media_svc_connect(&dbhandle);
+ if (err != MB_SVC_ERROR_NONE)
+ {
+ MSG_UTIL_ERROR("DB open error. %d", err);
+ return NULL;
+ }
+
+ ret = minfo_get_item(dbhandle, filepath, &item); //get cluster id
+ if (ret != MB_SVC_ERROR_NONE)
+ {
+ MSG_UTIL_ERROR("Cannot find file in media db for %s", filepath);
+ return NULL; // Invalid id
+ }
+
+ UUID cluster_uuid = INVALID_UUID;
+
+ cluster_uuid = uuid_assign(item->cluster_uuid);
+
+ minfo_destroy_mtype_item(item);
+
+ err = media_svc_disconnect(dbhandle);
+ if (err != MB_SVC_ERROR_NONE)
+ {
+ MSG_SDATA_ERROR("media service finalize error=%d", err);
+ }
+
+ return cluster_uuid;
+
+}
+
+int ivug_prohibit_lcd_off(void)
+{
+ MSG_UTIL_MED("START : Sleep disabled");
+ return pm_lock_state(LCD_NORMAL, GOTO_STATE_NOW, 0);
+}
+
+int ivug_allow_lcd_off(void)
+{
+ MSG_UTIL_MED("END : Sleep disabled");
+ return pm_unlock_state(LCD_NORMAL, PM_KEEP_TIMER);
+}
+
+#define MIME_TYPE_LEN (255)
+#define MIME_TYPE_3GPP "video/3gpp"
+#define PATH_CAMERA_LOCAL "/opt/media/Camera shots"
+#define PATH_CAMERA_SDCARD "/opt/storage/sdcard/Camera shots/"
+
+/* Video editor can start when video exist in camera folder and 3gp file format */
+
+bool ivug_is_editable_video_file(char *filepath)
+{
+ 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)
+ {
+ char mime_type[MIME_TYPE_LEN] = {0,};
+ aul_get_mime_from_file(filepath, mime_type, sizeof(mime_type));
+ MSG_UTIL_MED("mime type = %s", mime_type);
+ if(strcmp(mime_type, MIME_TYPE_3GPP) == 0)
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
diff --git a/main/src/util/ivug-util.h b/main/src/util/ivug-util.h
new file mode 100755
index 0000000..0c07169
--- /dev/null
+++ b/main/src/util/ivug-util.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __IVUG_UTIL_H__
+#define __IVUG_UTIL_H__
+
+#include <stdbool.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+
+*/
+bool ivug_is_web_uri(const char* uri);
+
+bool ivug_remove_file(const char *filepath);
+
+bool ivug_is_file_exist(const char* filepath);
+
+bool ivug_rename_file(const char *src, const char *dst);
+
+inline const char *ivug_get_filename(const char *filepath);
+
+inline unsigned int get_distance(int prevX, int prevY, int X, int Y);
+
+/*
+ Generate temporary file name with given path and extension.
+ returned value should free() by user.
+*/
+char *ivug_mktemp(char* filepath, char*ext);
+
+
+/*
+ Media service wrapper utility
+*/
+
+UUID ivug_get_album_id_from_filepath(const char *filepath);
+
+
+/*
+ LCD sleep control.
+*/
+int ivug_prohibit_lcd_off(void);
+int ivug_allow_lcd_off(void);
+
+
+/*
+ Get mime type from file path.
+ should free returned after use.
+*/
+
+bool ivug_is_editable_video_file(char *filepath);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
+#endif //__IVUG_UTIL_H__
+
diff --git a/main/src/util/ivug-widget.c b/main/src/util/ivug-widget.c
new file mode 100755
index 0000000..fd43992
--- /dev/null
+++ b/main/src/util/ivug-widget.c
@@ -0,0 +1,209 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "ivug-common.h"
+#include "ivug-widget.h"
+#include <ui-gadget-module.h>
+
+#include <Elementary.h>
+
+static void _on_obj_deleted(void * data, Evas * e, Evas_Object * obj, void * event_info)
+{
+ char *szMsg = (char *)data;
+ IV_ASSERT(szMsg != NULL);
+
+ MSG_MAIN_HIGH("On Object deleted. %s", szMsg);
+
+ free(szMsg);
+}
+
+void ivug_on_obj_deleted(Evas_Object* obj, char *msg, const char *func, int line)
+{
+ static char buf[1024];
+
+ sprintf(buf, "%s(L%d):%s", func, line, msg);
+
+ evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _on_obj_deleted, strdup(buf));
+}
+
+Evas_Object* ivug_bg_add(Evas_Object* parent, int r, int g, int b)
+{
+ IV_ASSERT(parent != NULL);
+
+ Evas_Object *bg = elm_bg_add(parent);
+ evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(bg, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+// elm_win_resize_object_add(parent, bg);
+
+ elm_bg_color_set(bg, r, g, b);
+
+ evas_object_show(bg);
+
+ return bg;
+}
+
+Evas_Object *
+ivug_layout_add(Evas_Object *win, const char *edj, const char *group)
+{
+ IV_ASSERT(win != NULL);
+
+ Evas_Object *layout;
+
+ layout = elm_layout_add(win);
+
+ if ( layout == NULL )
+ {
+ MSG_SETAS_ERROR("Cannot create layout");
+ return NULL;
+ }
+
+ if (elm_layout_file_set(layout, edj, group) == EINA_FALSE)
+ {
+ MSG_SETAS_ERROR("edj loading fail, filepath=%s Group=%s", edj, group);
+ evas_object_del(layout);
+ return NULL;
+ }
+
+ evas_object_size_hint_expand_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_fill_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+#ifdef USE_WIN_AS_PARENT
+ elm_win_resize_object_add( ug_get_window(), layout);
+#else
+ Evas_Coord x, y, w, h;
+ evas_object_geometry_get(win, &x, &y, &w, &h);
+
+ evas_object_move(layout, x, y);
+ evas_object_resize(layout, w, h);
+#endif
+
+ evas_object_show(layout);
+ return layout;
+}
+
+Evas_Object*
+ivug_default_layout_add( Evas_Object *win)
+{
+ IV_ASSERT(win != NULL);
+
+ Evas_Object *layout;
+ layout = elm_layout_add(win);
+
+ if ( layout == NULL )
+ {
+ MSG_SETAS_ERROR("Cannot create layout");
+ return NULL;
+ }
+
+ if ( elm_layout_theme_set( layout, "layout", "application", "default") == EINA_FALSE)
+ {
+ MSG_SETAS_ERROR("theme set fail, layout/application/defaulty");
+ evas_object_del(layout);
+ return NULL;
+ }
+
+ evas_object_size_hint_expand_set( layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_fill_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL );
+
+#ifdef USE_WIN_AS_PARENT
+ elm_win_resize_object_add( ug_get_window(), layout);
+#else
+ Evas_Coord x, y, w, h;
+ evas_object_geometry_get(parent, &x, &y, &w, &h);
+
+ evas_object_move(layout, x, y);
+ evas_object_resize(layout, w, h);
+#endif
+
+ evas_object_show(layout);
+ return layout;
+}
+
+
+Evas_Object *ivug_button_add(Evas_Object *parent, char *style, char *caption, Evas_Object *icon, OnClickCB pFunc, const void * data )
+{
+ IV_ASSERT(parent != NULL);
+
+ Evas_Object *btn;
+
+ btn = elm_button_add(parent);
+ if ( btn == NULL )
+ {
+ return NULL;
+ }
+
+ if ( style )
+ elm_object_style_set(btn, style);
+
+ if ( caption )
+ elm_object_text_set(btn, caption);
+
+ if ( icon )
+ elm_object_part_content_set(btn, "icon", icon);
+
+ elm_object_focus_allow_set(btn, EINA_FALSE);
+ evas_object_propagate_events_set(btn, EINA_FALSE);
+
+ evas_object_smart_callback_add(btn, "clicked", pFunc, (void*)data);
+
+ return btn;
+}
+
+Evas_Object *ivug_icon_add(Evas_Object *parent, char *edjname, char *groupname)
+{
+ Evas_Object *icon;
+
+ icon = elm_icon_add(parent);
+
+ if ( elm_icon_file_set(icon, edjname, groupname) == EINA_FALSE)
+ {
+ MSG_IVUG_ERROR("Cannot file set. EDJ=%s Group=%s", edjname, groupname);
+ evas_object_del(icon);
+ return NULL;
+ }
+
+ evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+ elm_icon_resizable_set(icon, EINA_TRUE, EINA_TRUE);
+ evas_object_size_hint_expand_set(icon, 1, 1);
+
+ return icon;
+}
+
+Evas_Object *ivug_controlbar_add(Evas_Object *parent, const char *style)
+{
+ Evas_Object *toolbar = elm_toolbar_add(parent);
+ if (!toolbar)
+ {
+ MSG_MAIN_ERROR("create tool bar failed");
+ return NULL;
+ }
+ elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_EXPAND);
+ elm_object_style_set(toolbar, style);
+
+ return toolbar;
+}
+
+
+
+void
+ivug_object_del(Evas_Object *obj)
+{
+ evas_object_del(obj);
+}
+
+
diff --git a/main/src/util/ivug-widget.h b/main/src/util/ivug-widget.h
new file mode 100755
index 0000000..151ee1e
--- /dev/null
+++ b/main/src/util/ivug-widget.h
@@ -0,0 +1,68 @@
+/*
+ * 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__
+
+
+typedef void(*OnClickCB)(void *data, Evas_Object *obj, void *event_info);
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ Internal use only... use macro DELETE_LOG instead
+*/
+void ivug_on_obj_deleted(Evas_Object* obj, char *msg, const char *func, int line);
+
+
+#define DELETE_NOTIFY(obj) \
+ ivug_on_obj_deleted(obj, #obj, __func__, __LINE__)
+
+/*
+ Create elm_bg with color - r,g,b
+*/
+Evas_Object *
+ivug_bg_add(Evas_Object* parent, int r, int g, int b);
+
+Evas_Object *
+ivug_layout_add(Evas_Object *win, const char *edjname, const char *groupname);
+
+Evas_Object*
+ivug_default_layout_add( Evas_Object *win);
+
+Evas_Object *
+ivug_button_add(Evas_Object *parent, char *style, char *caption, Evas_Object *icon, OnClickCB pFunc, const void *data );
+
+Evas_Object *
+ivug_icon_add(Evas_Object *parent, char *edjname, char *groupname);
+
+Evas_Object *
+ivug_controlbar_add(Evas_Object *parent, const char *style);
+
+void
+ivug_object_del(Evas_Object *obj);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __IVUG_WIDGET_H__
+
diff --git a/main/src/view/ivug-detail-info.c b/main/src/view/ivug-detail-info.c
new file mode 100755
index 0000000..77061e3
--- /dev/null
+++ b/main/src/view/ivug-detail-info.c
@@ -0,0 +1,437 @@
+/*
+ * 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 <appcore-efl.h>
+#include <appcore-common.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-file-info.h"
+
+
+#define NOMAL_BUF 128
+
+#define DETAILS_DIR_PATH_LEN_MAX 4096
+
+enum IVUG_SIZE_TYPE
+{
+ SIZE_BYTE = 0,
+ SIZE_KB,
+ SIZE_MB,
+ SIZE_GB
+};
+
+/*
+ Shuld free returned value after use
+*/
+static char*
+_get_icu_time_string(const char *locale, const char *customSkeleton, const char *timezone, UDate date)
+{
+#define UG_ICU_ARR_LENGTH 256
+
+ IV_ASSERT(customSkeleton != NULL);
+ IV_ASSERT(timezone != NULL);
+
+ /*
+ Copy a byte string encoded in the default codepage to a ustring.
+ Copies at most n characters. The result will be null terminated if the length of src is less than n. Performs a host byte to UChar conversion
+ */
+ UChar ucustomSkeleton[UG_ICU_ARR_LENGTH] = {0,};
+
+ if(u_uastrncpy(ucustomSkeleton, customSkeleton, UG_ICU_ARR_LENGTH) == NULL)
+ {
+ MSG_UTIL_ERROR("u_uastrncpy() error.");
+ return NULL;
+ }
+
+ UChar utimezone[UG_ICU_ARR_LENGTH] = {0,};
+
+ if ( u_uastrncpy(utimezone, timezone, UG_ICU_ARR_LENGTH) == NULL )
+ {
+ MSG_UTIL_ERROR("u_uastrncpy() error.");
+ return NULL;
+ }
+
+ UErrorCode status = U_ZERO_ERROR;
+ UDateTimePatternGenerator *generator;
+ UDateFormat *formatter;
+
+ UChar bestPattern[UG_ICU_ARR_LENGTH] = {0,};
+ UChar formatted[UG_ICU_ARR_LENGTH] = {0,};
+ char formattedString[UG_ICU_ARR_LENGTH] = {0,};
+ int32_t bestPatternLength, formattedLength;
+
+ ucal_setDefaultTimeZone(utimezone , &status);
+
+ if (U_FAILURE(status))
+ {
+ MSG_UTIL_ERROR("ucal_setDefaultTimeZone() is failed");
+ return NULL;
+ }
+
+ uloc_setDefault(getenv("LC_TIME"), &status);
+
+ if (U_FAILURE(status))
+ {
+ MSG_UTIL_ERROR("ucal_setDefaultTimeZone() is failed");
+ return NULL;
+ }
+
+ generator = udatpg_open(locale, &status);
+ if(generator == NULL)
+ {
+ return NULL;
+ }
+
+ bestPatternLength = udatpg_getBestPattern(generator, ucustomSkeleton, u_strlen(ucustomSkeleton), bestPattern, UG_ICU_ARR_LENGTH, &status);
+ if(bestPatternLength <= 0)
+ {
+ return NULL;
+ }
+
+ formatter = udat_open(UDAT_IGNORE, UDAT_IGNORE, locale, NULL, -1, bestPattern, -1, &status);
+ if(formatter == 0)
+ {
+ return NULL;
+ }
+
+ formattedLength = udat_format(formatter, date, formatted, UG_ICU_ARR_LENGTH, NULL, &status);
+ if(formattedLength <= 0)
+ {
+ return NULL;
+ }
+
+ u_austrcpy(formattedString, formatted);
+ udatpg_close(generator);
+ udat_close(formatter);
+
+ if(strlen(formattedString) == 0)
+ {
+ return NULL;
+ }
+
+ return strdup(formattedString);
+}
+
+
+static char*
+_get_icu_date(time_t mtime)
+{
+#define UG_DATE_FORMAT_12 "yMMMdhms"
+#define UG_DATE_FORMAT_24 "yMMMdHms"
+
+ char* skeleton = NULL;
+
+ enum appcore_time_format timeformat;
+
+ int ret = appcore_get_timeformat(&timeformat);
+ if(ret == -1)
+ {
+ MSG_DETAIL_ERROR("Cannot get timeformat.");
+ timeformat = APPCORE_TIME_FORMAT_12; // Default value.
+// Go through
+ }
+
+ if(timeformat == APPCORE_TIME_FORMAT_12)
+ {
+ skeleton = UG_DATE_FORMAT_12;
+ }
+ else if(timeformat == APPCORE_TIME_FORMAT_24)
+ {
+ skeleton = UG_DATE_FORMAT_24;
+ }
+ else
+ {
+ MSG_DETAIL_ERROR("Invalid time format : %d", timeformat);
+ skeleton = UG_DATE_FORMAT_12; // Default value.
+ }
+
+ char *locale = vconf_get_str(VCONFKEY_REGIONFORMAT); /* eg. en_US.UTF-8*/
+ if(locale == NULL)
+ {
+ MSG_DETAIL_ERROR("Cannot get region format.");
+ locale = "en_US.UTF-8"; // Default value.
+ }
+
+ char *timezone = NULL;
+
+ timezone = vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_ID); // eg Asia/Seoul
+ if(timezone == NULL)
+ {
+// TODO : How to get default time zone????
+ MSG_DETAIL_ERROR("Cannot get time zone");
+ return NULL;
+ }
+
+ MSG_DETAIL_HIGH("Locale:%s TimeZone:%s TimeFormat:%s", locale, skeleton, timezone);
+
+ char* datestr = NULL;
+
+ datestr = _get_icu_time_string(locale, skeleton, timezone, (UDate)mtime * 1000);
+
+ if(datestr == NULL)
+ {
+ MSG_DETAIL_ERROR("Cannot get time string");
+ return NULL;
+ }
+
+ MSG_DETAIL_HIGH("ICU Date : %s", datestr);
+ return datestr;
+
+}
+
+
+
+
+static char *
+_get_filesize_string(size_t size)
+{
+#define FILE_SIZE_LEN_MAX 64
+#define BASIC_SIZE 1024 //used for file size check
+
+ int count = 0;
+
+ unsigned long int lsize = (unsigned long int)size;
+
+ char *tmp = (char *)calloc(1, sizeof(char)*FILE_SIZE_LEN_MAX + 1);
+ if ( tmp == NULL)
+ {
+ return NULL;
+ }
+
+ while(size >= ( BASIC_SIZE ) )
+ {
+ lsize = size;
+ size /= BASIC_SIZE;
+ count++;
+ }
+
+ float remain = ((float)lsize/BASIC_SIZE) - size;
+
+ if(count == SIZE_BYTE)
+ {
+ snprintf(tmp,FILE_SIZE_LEN_MAX,"%zu B", size);
+ }
+ else if(count == SIZE_KB)
+ {
+ snprintf(tmp,FILE_SIZE_LEN_MAX,"%zu KB", size);
+ }
+ else if(count == SIZE_MB)
+ {
+ // need another algorithm
+ snprintf(tmp,FILE_SIZE_LEN_MAX,"%.1f MB", size+remain);
+ }
+ else if(count == SIZE_GB)
+ {
+ snprintf(tmp,FILE_SIZE_LEN_MAX,"%.1f GB", size+remain);
+ }
+
+ MSG_DETAIL_HIGH("Size = %lu, OrigSize=%zu", lsize, size);
+ return tmp;
+}
+
+void
+ivug_details_info_set_file_information(ivug_file_info_t * const pFileInfo, const char *path)
+{
+ ivug_ret_if( NULL == pFileInfo );
+ ivug_ret_if( NULL == path );
+
+/*** get file path*/
+ pFileInfo->filepath = strdup(path);
+
+ struct stat statbuf;
+
+ if(stat(path,&statbuf) == -1)
+ {
+ MSG_DETAIL_ERROR("Cannot get stat()");
+ return ;
+ }
+
+ pFileInfo->size = statbuf.st_size;
+ pFileInfo->date = statbuf.st_mtime;
+
+ pFileInfo->create_date = _get_icu_date(pFileInfo->date);
+
+ if ( pFileInfo->create_date == NULL )
+ {
+ pFileInfo->create_date = strdup(IDS_N_A);
+ }
+
+ pFileInfo->file_ext = ivug_fileinfo_get_file_extension(path);
+
+ if ( pFileInfo->file_ext == NULL )
+ {
+ pFileInfo->file_ext = strdup(IDS_UNKNOWN);
+ }
+
+ pFileInfo->filesize = _get_filesize_string(pFileInfo->size);
+
+ MSG_DETAIL_HIGH("Basic Info : ext=%s size=%s", pFileInfo->file_ext, pFileInfo->filesize);
+
+ return ;
+
+}
+
+
+void
+ivug_details_info_set_gps_info(ivug_file_info_t * const pFileInfo, const char *path)
+{
+#define UG_EXIF_ARR_LENGTH 255
+
+ ivug_retm_if(!pFileInfo, "data is NULL");
+ ivug_retm_if(!path, "path is NULL");
+
+ pFileInfo->longitude = calloc(1, sizeof(char)*UG_EXIF_ARR_LENGTH);
+ if(pFileInfo->longitude == NULL)
+ {
+ return;
+ }
+
+ pFileInfo->latitude = calloc(1, sizeof(char)*UG_EXIF_ARR_LENGTH);
+ if(pFileInfo->latitude == NULL)
+ {
+ return;
+ }
+
+
+ double longtitude = 0.0;
+ double latitude = 0.0;
+
+ bool bret = false;
+
+ if(pFileInfo->file_type == IVUG_DETAIL_IMAGE_TYPE) // this will be removed!!!!
+ {
+ bret = ivug_fileinfo_get_image_gps_info(path, &latitude, &longtitude);
+ }
+ else if(pFileInfo->file_type == IVUG_DETAIL_VIDEO_TYPE)
+ {
+ bret = ivug_fileinfo_get_video_gps_info(path, &latitude, &longtitude);
+ }
+
+ if ( bret == false)
+ {
+ latitude = 0;
+ longtitude = 0;
+ }
+
+ if(latitude != 0.0)
+ {
+ snprintf(pFileInfo->latitude, UG_EXIF_ARR_LENGTH, "%.5f", latitude);
+ }
+ else
+ {
+ snprintf(pFileInfo->latitude, UG_EXIF_ARR_LENGTH, "%s", IDS_UNKNOWN);
+ }
+ if(longtitude != 0.0)
+ {
+ snprintf(pFileInfo->longitude, UG_EXIF_ARR_LENGTH, "%.5f", longtitude);
+ }
+ else
+ {
+ snprintf(pFileInfo->longitude, UG_EXIF_ARR_LENGTH, "%s", IDS_UNKNOWN);
+ }
+}
+
+void
+ivug_details_info_set_resolution(ivug_file_info_t * const pFileInfo, const char *path, int stype)
+{
+ ivug_retm_if(!pFileInfo, "data is NULL");
+ ivug_retm_if(!path, "path is NULL");
+
+ MSG_DETAIL_HIGH("slide type is %d", stype);
+
+ pFileInfo->resolution = (char *)malloc(sizeof(char)*NOMAL_BUF+1);
+ if(pFileInfo->resolution == NULL)
+ {
+ return ;
+ }
+ memset(pFileInfo->resolution,0,(sizeof(char)* NOMAL_BUF + 1));
+
+
+ int width, height;
+
+ switch(stype)
+ {
+ case SLIDE_TYPE_IMAGE:
+ pFileInfo->file_type = IVUG_DETAIL_IMAGE_TYPE;
+
+ if ( ivug_fileinfo_get_image_resolution(path, &width, &height) == false)
+ {
+ snprintf(pFileInfo->resolution, NOMAL_BUF, "%s", IDS_N_A);
+ }
+ else
+ {
+ snprintf(pFileInfo->resolution, NOMAL_BUF,"%dX%d", width, height);
+ }
+
+ break;
+
+ /* Video type */
+ case SLIDE_TYPE_VIDEO:
+ pFileInfo->file_type = IVUG_DETAIL_VIDEO_TYPE;
+
+ if ( ivug_fileinfo_get_video_resolution(path, &width, &height) == false)
+ {
+ snprintf(pFileInfo->resolution, NOMAL_BUF, "%s", IDS_N_A);
+ }
+ else
+ {
+ snprintf(pFileInfo->resolution, NOMAL_BUF,"%dX%d", width, height);
+ }
+
+ break;
+
+ default:
+ break;
+
+ }
+
+}
+
+void
+ivug_details_info_set_location(ivug_file_info_t * const pFileInfo, const char *path)
+{
+ ivug_retm_if(!pFileInfo, "data is NULL");
+ ivug_retm_if(!path, "path is NULL");
+
+ pFileInfo->file_location = strdup(path);
+}
+
+void
+ivug_details_info_set_filename(ivug_file_info_t * const pFileInfo, const char *path)
+{
+ ivug_retm_if(!pFileInfo, "data is NULL");
+ ivug_retm_if(!path, "path is NULL");
+
+ /** get file name */
+ pFileInfo->filename = ecore_file_strip_ext(ecore_file_file_get(path));
+}
+
+
diff --git a/main/src/view/ivug-detail-info.h b/main/src/view/ivug-detail-info.h
new file mode 100755
index 0000000..6b7b9cb
--- /dev/null
+++ b/main/src/view/ivug-detail-info.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __IVUG_DETAIL_COMMON_H__
+#define __IVUG_DETAIL_COMMON_H__
+
+#include <unicode/udat.h>
+
+#include "ivug-common.h"
+
+typedef enum {
+ IVUG_DETAIL_ERROR_TYPE = -1,
+ IVUG_DETAIL_IMAGE_TYPE,
+ IVUG_DETAIL_VIDEO_TYPE
+} ivug_detail_file_t;
+
+typedef struct {
+/** Common info*/
+ time_t date; // Seconds since 1970-1-1
+ size_t size;
+
+ ivug_detail_file_t file_type;
+
+ char *filesize;
+ char *filepath;
+ char *filename;
+ char *file_ext;
+ char *file_location;
+ char *contains;
+ char *create_date;
+
+
+/**resolution */
+ char *resolution;
+
+/**Gps info */
+ char *latitude;
+ char *longitude;
+
+}ivug_file_info_t;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// TODO : Remove dependacy ivug-detail-view and ivug-detail-info.
+
+void ivug_details_info_set_file_information(ivug_file_info_t * const pFileInfo, const char *path);
+
+void ivug_details_info_set_gps_info(ivug_file_info_t * const pFileInfo, const char *path);
+
+void ivug_details_info_set_resolution(ivug_file_info_t * const pFileInfo, const char *path, int stype);
+
+void ivug_details_info_set_location(ivug_file_info_t * const pFileInfo, const char *path);
+
+void ivug_details_info_set_filename(ivug_file_info_t * const pFileInfo, const char *path);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __IVUG_DETAIL_COMMON_H__
+
diff --git a/main/src/view/ivug-details-view.c b/main/src/view/ivug-details-view.c
new file mode 100755
index 0000000..e66df21
--- /dev/null
+++ b/main/src/view/ivug-details-view.c
@@ -0,0 +1,437 @@
+/*
+ * 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-common.h"
+#include "ivug-main.h"
+#include "ivug-main-view.h"
+#include "ivug-string.h"
+
+#include "ivug-details-view.h"
+#include "ivug-detail-info.h"
+
+#include "ivug-widget.h"
+
+#define DETAILS_EDJ_FILE EDJ_PATH"/ivug-details.edj"
+#define TRANSITION_EFFECT
+
+#define FILE_DETILES_NUM 6
+#define FILE_EXIF_INFO_NUM 2
+
+
+/*
+ this structure represent one item in genlist.
+*/
+typedef struct
+{
+ char *m_ItemName;
+ 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;
+ }
+}
+
+static char *
+_ivug_details_gl_label_get(void *data, Evas_Object *obj, const char *part )
+{
+ ivug_file_list_item *params = (ivug_file_list_item *)data;
+
+ ivug_retvm_if(params == NULL, NULL, "params is NULL");
+
+ 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);
+
+ if(strcmp(part, "elm.text.1") == 0)
+ {
+ if(params->m_ItemName)
+ {
+ return strdup(params->m_ItemName);
+
+ }
+ else
+ {
+ return strdup(IDS_UNKNOWN);
+ }
+ }
+ 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;
+ }
+
+ if (text2) {
+ return elm_entry_utf8_to_markup(text2);
+ } else {
+ return elm_entry_utf8_to_markup(IDS_UNKNOWN);
+ }
+ }
+
+ else
+ {
+ return NULL;
+ }
+
+}
+
+static void
+_ivug_details_gl_del(void *data, Evas_Object *obj )
+{
+ ivug_ret_if(NULL == data);
+
+ ivug_file_list_item *params = (ivug_file_list_item *)data;
+
+ ivug_retm_if(params == NULL, "params is NULL");
+ if(params)
+ {
+ free(params);
+ params = NULL;
+ }
+
+ return;
+}
+
+static char*
+_ivug_details_gl_label_get_title(void *data, Evas_Object *obj,const char *part )
+{
+ ivug_retv_if(NULL == data, NULL);
+
+ if (!strcmp(part, "elm.text"))
+ {
+ return strdup(data);
+ }
+
+ return NULL;
+}
+
+static Eina_Bool
+_ivug_details_gl_state_get(void *data, Evas_Object *obj, const char *part )
+{
+ return EINA_FALSE;
+}
+
+static Evas_Object *
+_ivug_details_view_genlist_create(Ivug_DetailsView *pDetailsView, Evas_Object *parent)
+{
+ IV_ASSERT(pDetailsView != NULL);
+
+ Evas_Object *genlist = NULL;
+ genlist = elm_genlist_add(parent);
+
+ ivug_retvm_if(NULL == genlist, NULL, "Create Details genlist failed..");
+
+ elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
+ elm_genlist_select_mode_set(genlist, ELM_OBJECT_SELECT_MODE_NONE);
+
+ elm_object_theme_set(genlist, gGetSystemTheme());
+
+ pDetailsView->file_Status.itc.item_style = "ivug/2text.2";
+ //pDetailsView->file_Status.itc.item_style = "2text.2";
+ pDetailsView->file_Status.itc.func.text_get = _ivug_details_gl_label_get;
+ pDetailsView->file_Status.itc.func.content_get = NULL;
+ pDetailsView->file_Status.itc.func.state_get = _ivug_details_gl_state_get;
+ pDetailsView->file_Status.itc.func.del = _ivug_details_gl_del;
+
+ // Set item class for dialogue group title
+ pDetailsView->file_Status.title_itc.item_style = "ivug/grouptitle";
+ //pDetailsView->file_Status.title_itc.item_style = "grouptitle";
+ pDetailsView->file_Status.title_itc.func.text_get = _ivug_details_gl_label_get_title;
+ pDetailsView->file_Status.title_itc.func.content_get = NULL;
+ pDetailsView->file_Status.title_itc.func.state_get = NULL;
+ pDetailsView->file_Status.title_itc.func.del = NULL;
+
+ pDetailsView->file_Status.multiline_itc.item_style = "ivug/multiline.2text";
+ //pDetailsView->file_Status.multiline_itc.item_style = "multiline.2text";
+ pDetailsView->file_Status.multiline_itc.func.text_get = _ivug_details_gl_label_get;
+ pDetailsView->file_Status.multiline_itc.func.content_get = NULL;
+ pDetailsView->file_Status.multiline_itc.func.state_get = NULL;
+ pDetailsView->file_Status.multiline_itc.func.del = _ivug_details_gl_del;
+
+ return genlist;
+}
+
+static void
+_ivug_detail_genlist_view_gps_create(Ivug_DetailsView *pDetailsView )
+{
+ IV_ASSERT(pDetailsView != NULL);
+
+ Evas_Object *genlist = NULL;
+ int index = 0;
+
+ 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;
+
+ for (index = 0; index < FILE_EXIF_INFO_NUM; index++)
+ {
+ m_TempItem = (ivug_file_list_item *)malloc(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->pDetailsView = pDetailsView;
+ it = elm_genlist_item_append(genlist, &pDetailsView->file_Status.multiline_itc, m_TempItem, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ elm_genlist_item_select_mode_set(it, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ }
+
+}
+
+static void
+_ivug_detail_genlist_view_file_view_create(Ivug_DetailsView *pDetailsView)
+{
+ IV_ASSERT(pDetailsView != NULL);
+
+ Evas_Object *genlist = NULL;
+ int index = 0;
+
+ Elm_Object_Item *git = NULL;
+ Elm_Object_Item *it = NULL;
+
+ ivug_file_list_item *m_TempItem = NULL;
+
+ 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;
+
+ git = elm_genlist_item_append(genlist, &pDetailsView->file_Status.title_itc, strdup(IDS_DETAILS), NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ elm_genlist_item_select_mode_set(git, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+ for (index = 0; index < FILE_DETILES_NUM; index++)
+ {
+ if(m_ItemName[index] == NULL)
+ {
+ continue;
+ }
+
+ m_TempItem = (ivug_file_list_item *)malloc(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->pDetailsView = pDetailsView;
+
+ it = elm_genlist_item_append(genlist, &pDetailsView->file_Status.multiline_itc, m_TempItem, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ elm_genlist_item_select_mode_set(it, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ }
+}
+
+Ivug_DetailsView *
+ivug_details_view_screen_create(Evas_Object *parent, Media_Data *mdata, ivug_view_by view_by)
+{
+ ivug_retv_if(!parent, NULL);
+ 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;
+ }
+
+ 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);
+
+ ivug_details_info_set_filename(&pDetailsView->file_Info, filepath);
+ ivug_details_info_set_location(&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");
+
+ if(pDetailsView->layout == NULL)
+ {
+ free(pDetailsView);
+ return NULL;
+ }
+
+#define IVUG_DETAILS_BG_ALPHA 200
+
+ pDetailsView->bg = evas_object_rectangle_add(evas_object_evas_get(pDetailsView->layout));
+ if (pDetailsView->bg)
+ {
+ evas_object_size_hint_expand_set(pDetailsView->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_fill_set(pDetailsView->bg, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_color_set(pDetailsView->bg, IVUG_DEFAULT_BG_COLOR,
+ IVUG_DEFAULT_BG_COLOR, IVUG_DEFAULT_BG_COLOR, IVUG_DETAILS_BG_ALPHA);
+ elm_object_part_content_set(pDetailsView->layout, "details_view.swallow.bg",
+ pDetailsView->bg);
+ }
+
+ //create genlist
+ Evas_Object *genlist = NULL;
+
+ genlist = _ivug_details_view_genlist_create(pDetailsView, pDetailsView->layout);
+ pDetailsView->genlist = genlist;
+
+ _ivug_detail_genlist_view_file_view_create(pDetailsView);
+
+ _ivug_detail_genlist_view_gps_create(pDetailsView);
+
+ elm_object_part_content_set( pDetailsView->layout, "detailsview.genlist" , pDetailsView->genlist );
+
+ MSG_DETAIL_HIGH("Detail view(0x%08x) created for %s", pDetailsView, filepath);
+
+ return pDetailsView;
+}
+
+
+Evas_Object *
+ivug_details_view_object_get(Ivug_DetailsView *pDetailsView)
+{
+ IV_ASSERT(pDetailsView != NULL);
+
+ return pDetailsView->layout;
+}
+
+void
+ivug_details_view_destroy(Ivug_DetailsView *pDetailsView)
+{
+ IV_ASSERT(pDetailsView != NULL);
+ MSG_DETAIL_HIGH("Removing Details VIew");
+
+// Layout removed automatically when popping from navi item.
+ if(pDetailsView->layout)
+ {
+ evas_object_del(pDetailsView->layout);
+ pDetailsView->layout = NULL;
+ }
+
+ _ivug_details_free_file_info(&pDetailsView->file_Info);
+
+ if(pDetailsView)
+ {
+ free(pDetailsView);
+ }
+
+ pDetailsView = NULL;
+}
+
diff --git a/main/src/view/ivug-details-view.h b/main/src/view/ivug-details-view.h
new file mode 100755
index 0000000..af159d5
--- /dev/null
+++ b/main/src/view/ivug-details-view.h
@@ -0,0 +1,64 @@
+/*
+ * 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-data.h"
+#include "ivug-parameter.h"
+#include "ivug-detail-info.h"
+
+
+typedef struct {
+ Elm_Genlist_Item_Class itc;
+ Elm_Genlist_Item_Class title_itc;
+ Elm_Genlist_Item_Class multiline_itc;
+} ivug_file_status_t;
+
+typedef struct {
+ Evas_Object *parent;
+ Evas_Object *bg;
+
+ Evas_Object *layout;
+ Evas *evas;
+ Evas_Object *genlist;
+
+/*
+ |---------------|
+ | naviframe |
+ |---------------|
+ | |
+ | genlist |
+ | |
+ |---------------|
+*/
+
+ ivug_file_status_t file_Status; // TODO : Will remove
+ ivug_file_info_t file_Info;
+} Ivug_DetailsView;
+
+
+Ivug_DetailsView *ivug_details_view_screen_create(Evas_Object *parent, Media_Data *mdata, ivug_view_by view_by);
+
+void ivug_details_view_destroy(Ivug_DetailsView *pDetailsView);
+
+Evas_Object *ivug_details_view_object_get(Ivug_DetailsView *pDetailsView);
+
+#endif // __DETAILS_VIEW_H__
+
+
diff --git a/main/src/view/ivug-main-view.c b/main/src/view/ivug-main-view.c
new file mode 100755
index 0000000..75af879
--- /dev/null
+++ b/main/src/view/ivug-main-view.c
@@ -0,0 +1,1837 @@
+/*
+ * 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 <media-svc.h>
+#include <vconf.h>
+#include <vconf-keys.h>
+#include <utilX.h> // Key event
+
+#include "ivug-common.h"
+#include "ivug-parameter.h"
+
+#include "ivug-main-view.h"
+#include "ivug-util.h"
+#include "ivug-data.h"
+#include "ivug-ext-ug.h"
+#include "ivug-popup.h"
+#include "ivug-slider-item.h"
+#include "ivug-slider.h"
+#include "ivug-main.h"
+
+#include "ivug-setas-view.h"
+#include "ivug-details-view.h"
+
+#include "ivug-data.h"
+
+#define ELM_INTERNAL_API_ARGESFSDFEFC
+
+#include <elm_widget.h> // elm_selection_set
+#include <appsvc.h> // app service
+
+#undef HIDE_INDICATOR // For testing.
+
+#define CONTROL_ICON_DIRECTORY_PATH IMAGE_PATH"/01_Control icon"
+
+#define ICON_PATH_DELETE CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_delete.png"
+#define ICON_PATH_SLIDESHOW CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_slideshow.png"
+#define ICON_PATH_INFO CONTROL_ICON_DIRECTORY_PATH"/T01_controlbar_icon_info.png"
+
+#define ICON_PATH_OPTIONTRAY IMAGE_PATH"/T01_btn_optiontray.png"
+
+// EDJE
+#define IVUG_MAIN_EDJ EDJ_PATH"/ivug-main.edj"
+
+#define IVUG_RESPONSE_OK (1)
+
+#undef TEST_MOUSE_EVENT
+
+void
+_ivug_main_view_show_menu_bar(Ivug_MainView *pMainView);
+
+void
+_ivug_main_view_hide_menu_bar(Ivug_MainView *pMainView);
+
+static void
+_ivug_main_view_back_cb(void *data, Evas_Object *obj, void *event_info);
+
+Evas_Object *_create_tool_bar(Evas_Object *parent);
+
+static void
+_ivug_main_view_navibar_detail_cb(void *data, Evas_Object *obj, void *event_info);
+
+static void
+_ivug_main_view_navibar_detail_close_cb(void *data, Evas_Object *obj, void *event_info);
+
+static enum CTRL_BAR_TYPE
+_get_ctrl_bar_type(ivug_mode mode, Media_Type slide_type);
+static enum NAVI_BAR_TYPE
+_get_tool_bar_type(ivug_mode mode, Media_Type slide_type );
+
+#define IVUG_MAIN_DESTROY_ME(a) _ivug_main_view_destroy_me(a, __func__, __LINE__);
+
+static void
+_ivug_main_view_destroy_me(Ivug_MainView *pMainView, const char *fname, int nLine)
+{
+ ivug_ret_if(!pMainView);
+
+ MSG_MAIN_WARN("Main view request ug_destroy_me at [%s:%d]", fname, nLine);
+
+ 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);
+
+ ug_destroy_me(pMainView->ugHandle);
+}
+
+static void
+_selection_info_deleted(void * data, Evas * e, Evas_Object * obj, void * event_info)
+{
+ ivug_retm_if(!data, "data is NULL");
+ MSG_MAIN_WARN("selection info deleted");
+ Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+ pMainView->selectioninfo = NULL;
+
+ return;
+}
+
+static inline void
+_main_view_create_selection_info(Ivug_MainView *pMainView, const char *string)
+{
+ IV_ASSERT(pMainView != NULL);
+ if(pMainView->selectioninfo)
+ {
+ evas_object_event_callback_del(pMainView->selectioninfo, EVAS_CALLBACK_DEL,
+ _selection_info_deleted);
+ evas_object_del(pMainView->selectioninfo);
+ pMainView->selectioninfo = NULL;
+ }
+ pMainView->selectioninfo = ivug_popup_selectioninfo(pMainView->layout, string);
+ ivug_retm_if(pMainView->selectioninfo == NULL, "selectioninfo is NULL");
+ evas_object_event_callback_add(pMainView->selectioninfo, EVAS_CALLBACK_DEL,
+ _selection_info_deleted, pMainView);
+}
+
+
+//copy popup
+static void
+_ivug_main_copy_popup_response_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ int response_id = (int)event_info;
+ IV_ASSERT(data != NULL);
+
+ Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+ MSG_MAIN_HIGH("Copy popup response : %d", response_id);
+
+ if (pMainView->copy_popup)
+ {
+ evas_object_del(pMainView->copy_popup);
+ pMainView->copy_popup = NULL;
+ }
+ else
+ {
+ MSG_MAIN_WARN("copy popup is NULL");
+ }
+}
+
+static void
+_ivug_main_copy_popup_selected_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ ivug_ret_if(!data);
+ Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+ //get current file path.
+ Slide_Item *sitem = ivug_slider_get_current_slide_item(pMainView->slider);
+ Media_Data *mdata = ivug_data_get_data(sitem->mitem);
+
+ if (mdata == NULL)
+ {
+ MSG_MAIN_ERROR("slider data is NULL");
+ return;
+ }
+
+ char *path = NULL;
+ int len = 0;
+ // This Will add to the article
+ char buf[IVUG_MAX_FILE_PATH_LEN] = {0,};
+
+ path = mdata->filepath;
+ len = strlen(mdata->filepath)+strlen("file://")+1;
+ snprintf(buf, IVUG_MAX_FILE_PATH_LEN, "file://%s", mdata->filepath);
+
+ if (len < IVUG_MAX_FILE_PATH_LEN)
+ {
+ MSG_MAIN_HIGH("file path = %s, file url =%s", path, buf);
+ if ( pMainView->parent)
+ {
+ elm_cnp_selection_set(pMainView->layout, ELM_SEL_TYPE_CLIPBOARD, ELM_SEL_FORMAT_IMAGE, buf, sizeof(buf));
+ }
+ }
+ else
+ {
+ MSG_MAIN_ERROR("slider file path is too long");
+ }
+
+ evas_object_del(pMainView->copy_popup);
+ pMainView->copy_popup = NULL;
+}
+
+Evas_Object*
+_ivug_main_create_copy_popup_create(Ivug_MainView *pMainView, int x, int y)
+{
+ ivug_retv_if(!pMainView, NULL);
+
+ Evas_Object* ctx_popup = NULL;
+ ctx_popup = elm_ctxpopup_add(pMainView->layout);
+ elm_ctxpopup_item_append(ctx_popup, IDS_COPY, NULL, _ivug_main_copy_popup_selected_cb, pMainView);
+ evas_object_smart_callback_add( ctx_popup, "hide", _ivug_main_copy_popup_response_cb, pMainView);
+
+ //evas_object_smart_callback_add(ctxpopup, "dismissed", _dismissed_cb, ctxpopup);
+ evas_object_move(ctx_popup, x, y);
+
+ evas_object_show(ctx_popup);
+
+ return ctx_popup;
+}
+
+static void
+_ivug_main_view_navibar_detail_close_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ IV_ASSERT(data != NULL);
+
+ MSG_MAIN_HIGH("ENTER : Btn detail close clicked. obj=0x%08x data=0x%08x", obj, data);
+
+ Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+ IV_ASSERT( pMainView->navi_bar != NULL);
+
+ evas_object_smart_callback_del(obj, "clicked", _ivug_main_view_navibar_detail_close_cb);
+
+ elm_object_item_part_content_unset(pMainView->navi_it, "elm.swallow.detail");
+
+ MSG_MAIN_HIGH("Delete detail view");
+ ivug_details_view_destroy(pMainView->pDetailsView); // Delete detail view.
+ pMainView->pDetailsView = NULL;
+
+// Enable detail view button callback
+ evas_object_smart_callback_add(pMainView->btn_detail, "clicked", _ivug_main_view_navibar_detail_cb, pMainView->btn_detail_data);
+ elm_object_disabled_set(pMainView->btn_detail, EINA_FALSE);
+
+ Evas_Object *btn_close = elm_object_item_part_content_unset(pMainView->navi_it, "title_right_btn");
+ evas_object_del(btn_close);
+
+ MSG_MAIN_HIGH("LEAVE : Btn detail close clicked. obj=0x%08x data=0x%08x", obj, data);
+}
+
+static void _update_title(Ivug_MainView *pMainView)
+{
+ static char title[256];
+
+ Slide_Item *sitem = ivug_slider_get_current_slide_item(pMainView->slider);
+ Media_Data *mdata = ivug_data_get_data(sitem->mitem);
+
+ if (mdata == NULL)
+ {
+ MSG_MAIN_ERROR("slider data is NULL");
+ return;
+ }
+
+ if ( pMainView->mode == IVUG_MODE_NORMAL)
+ {
+ snprintf(title, sizeof(title), "%d/%d",
+ ivug_slider_get_current_slide_count(pMainView->slider),
+ ivug_slider_get_total_slide_count(pMainView->slider)); //get title.
+ }
+ else if(mdata->filepath != NULL)
+ {
+ const char* filename = ivug_get_filename(mdata->filepath);
+ if(filename)
+ {
+ snprintf(title, sizeof(title), "%s", filename);
+ }
+ }
+
+ IV_ASSERT(pMainView->navi_bar != NULL);
+
+ MSG_MAIN_HIGH("Update title : %s", title);
+
+ elm_object_item_text_set(pMainView->navi_it, title);
+
+}
+
+static void
+_ivug_main_view_navibar_detail_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ MSG_MAIN_HIGH("ENTER : Btn detail view clicked. obj=0x%08x data=0x%08x", obj, data);
+ ivug_ret_if(!obj||!data);
+
+ Ivug_MainView *pMainView = (Ivug_MainView *)data;
+
+ if(pMainView->pDetailsView)
+ {
+ MSG_MAIN_ERROR("details view already created");
+ return;
+ }
+
+ pMainView->btn_detail_data = evas_object_smart_callback_del(obj, "clicked", _ivug_main_view_navibar_detail_cb);
+ pMainView->btn_detail = obj;
+
+ Slide_Item *sitem = ivug_slider_get_current_slide_item(pMainView->slider);
+ Media_Data *mdata = ivug_data_get_data(sitem->mitem);
+
+ if (mdata == NULL)
+ {
+ MSG_MAIN_ERROR("slider data is NULL");
+ return;
+ }
+
+ pMainView->pDetailsView = ivug_details_view_screen_create(pMainView->navi_bar, mdata, pMainView->view_by);
+
+ if(!pMainView->pDetailsView)
+ {
+ MSG_MAIN_ERROR("create details view failed");
+ return;
+ }
+
+ elm_object_item_part_content_set(pMainView->navi_it, "elm.swallow.detail", ivug_details_view_object_get(pMainView->pDetailsView));
+
+// Transition effect does not comming ocassionally when instant mode is used.
+// eva