Tizen 2.0 Release tizen_2.0 accepted/tizen_2.0/20130215.204601 submit/tizen_2.0/20130215.191533
authorHyungKyu Song <hk76.song@samsung.com>
Fri, 15 Feb 2013 15:01:07 +0000 (00:01 +0900)
committerHyungKyu Song <hk76.song@samsung.com>
Fri, 15 Feb 2013 15:01:07 +0000 (00:01 +0900)
154 files changed:
CMakeLists.txt [new file with mode: 0644]
LICENSE [new file with mode: 0644]
NOTICE [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/dirs [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/libug-memo-efl.install.in [new file with mode: 0755]
debian/rules [new file with mode: 0755]
edc/common.edc [new file with mode: 0644]
edc/detail.edc [new file with mode: 0644]
edc/doodle_editor.edc [new file with mode: 0644]
edc/edit_list.edc [new file with mode: 0644]
edc/edit_tool.edc [new file with mode: 0644]
edc/gl_edit_list.edc [new file with mode: 0644]
edc/selector.edc [new file with mode: 0644]
edc/text_editor.edc [new file with mode: 0644]
extend/extended-edc.h [new file with mode: 0644]
extend/extended-elm.c [new file with mode: 0644]
extend/extended-elm.h [new file with mode: 0644]
extend/gravel.h [new file with mode: 0644]
extend/supplement.c [new file with mode: 0644]
extend/supplement.h [new file with mode: 0644]
images/00_button_02_normal.png [new file with mode: 0644]
images/00_search_input_field_bg.png [new file with mode: 0644]
images/01_controlbar_icon_delete.png [new file with mode: 0644]
images/01_controlbar_icon_edit.png [new file with mode: 0644]
images/01_controlbar_icon_share.png [new file with mode: 0644]
images/01_header_icon_add.png [new file with mode: 0644]
images/01_header_icon_cancel.png [new file with mode: 0644]
images/01_header_icon_delete.png [new file with mode: 0644]
images/01_header_icon_done.png [new file with mode: 0644]
images/01_header_icon_edit.png [new file with mode: 0644]
images/01_header_icon_others.png [new file with mode: 0644]
images/01_navi_icon_add_new_drawing_memo.png [new file with mode: 0644]
images/01_navi_icon_add_new_note.png [new file with mode: 0644]
images/01_navi_icon_favorite.png [new file with mode: 0644]
images/25_button_focus.png [new file with mode: 0644]
images/25_button_normal.png [new file with mode: 0644]
images/25_memo_btn_close.png [new file with mode: 0644]
images/25_memo_btn_close_press.png [new file with mode: 0644]
images/25_memo_btn_delete.png [new file with mode: 0644]
images/25_memo_btn_delete_press.png [new file with mode: 0644]
images/25_memo_btn_send.png [new file with mode: 0644]
images/25_memo_btn_send_press.png [new file with mode: 0644]
images/25_memo_button.png [new file with mode: 0644]
images/25_memo_button_plus.png [new file with mode: 0644]
images/25_memo_button_press.png [new file with mode: 0644]
images/25_memo_favorite.png [new file with mode: 0644]
images/25_memo_favorite_dim.png [new file with mode: 0644]
images/25_memo_icon_color.png [new file with mode: 0644]
images/25_memo_icon_color_focus.png [new file with mode: 0644]
images/25_memo_icon_eraser.png [new file with mode: 0644]
images/25_memo_icon_eraser_focus.png [new file with mode: 0644]
images/25_memo_icon_font_color.png [new file with mode: 0644]
images/25_memo_icon_font_color_focus.png [new file with mode: 0644]
images/25_memo_icon_font_size.png [new file with mode: 0644]
images/25_memo_icon_font_size_focus.png [new file with mode: 0644]
images/25_memo_icon_font_type.png [new file with mode: 0644]
images/25_memo_icon_font_type_focus.png [new file with mode: 0644]
images/25_memo_icon_stroke.png [new file with mode: 0644]
images/25_memo_icon_stroke_focus.png [new file with mode: 0644]
images/25_memo_picker_panel_bar.png [new file with mode: 0644]
images/Mymagazine_memo_bg.png [new file with mode: 0644]
images/P02_icon_color.png [new file with mode: 0644]
images/P02_icon_color_focus.png [new file with mode: 0644]
images/P02_icon_eraser.png [new file with mode: 0644]
images/P02_icon_eraser_press.png [new file with mode: 0644]
images/P02_icon_font_color.png [new file with mode: 0644]
images/P02_icon_font_color_press.png [new file with mode: 0644]
images/P02_icon_font_size.png [new file with mode: 0644]
images/P02_icon_font_size_press.png [new file with mode: 0644]
images/P02_icon_font_type.png [new file with mode: 0644]
images/P02_icon_font_type_press.png [new file with mode: 0644]
images/P02_icon_stroke.png [new file with mode: 0644]
images/P02_icon_stroke_press.png [new file with mode: 0644]
include/memo-assist.h [new file with mode: 0644]
include/memo-efl.h [new file with mode: 0644]
include/memo-genlist.h [new file with mode: 0644]
include/memo_autolink.h [new file with mode: 0644]
include/memo_doodle_editor.h [new file with mode: 0644]
include/memo_string.h [new file with mode: 0644]
include/memo_text_editor.h [new file with mode: 0644]
include/memo_ug.h [new file with mode: 0644]
memo.edc [new file with mode: 0644]
packaging/ug-memo-efl.spec [new file with mode: 0644]
po/CMakeLists.txt [new file with mode: 0644]
po/POTFILES.in [new file with mode: 0755]
po/de_DE.po [new file with mode: 0644]
po/el_GR.po [new file with mode: 0644]
po/en.po [new file with mode: 0644]
po/es_ES.po [new file with mode: 0644]
po/fr_FR.po [new file with mode: 0644]
po/it_IT.po [new file with mode: 0644]
po/ja_JP.po [new file with mode: 0644]
po/ko_KR.po [new file with mode: 0644]
po/memo.pot [new file with mode: 0644]
po/nl_NL.po [new file with mode: 0644]
po/pt_PT.po [new file with mode: 0644]
po/ru_RU.po [new file with mode: 0644]
po/tr_TR.po [new file with mode: 0644]
po/update-po.sh [new file with mode: 0755]
po/zh_CN.po [new file with mode: 0644]
po/zh_HK.po [new file with mode: 0644]
po/zh_TW.po [new file with mode: 0644]
scripts/copyright [new file with mode: 0644]
scripts/str.in [new file with mode: 0644]
scripts/string.sh [new file with mode: 0755]
scripts/temp [new file with mode: 0644]
src/edit.c [new file with mode: 0644]
src/memo-assist.c [new file with mode: 0644]
src/memo-efl.c [new file with mode: 0644]
src/memo-genlist.c [new file with mode: 0644]
src/memo_autolink.c [new file with mode: 0644]
src/memo_doodle_editor.c [new file with mode: 0644]
src/memo_text_editor.c [new file with mode: 0644]
src/memo_ug.c [new file with mode: 0644]
src/ug-detail.c [new file with mode: 0644]
src/ug-select.c [new file with mode: 0644]
theme/CMakeLists.txt [new file with mode: 0644]
theme/black/images/00_picker_btn_normal.png [new file with mode: 0644]
theme/black/images/00_picker_btn_press.png [new file with mode: 0644]
theme/black/images/P02_icon_color.png [new file with mode: 0644]
theme/black/images/P02_icon_color_focus.png [new file with mode: 0644]
theme/black/images/P02_icon_eraser.png [new file with mode: 0644]
theme/black/images/P02_icon_eraser_press.png [new file with mode: 0644]
theme/black/images/P02_icon_font_color.png [new file with mode: 0644]
theme/black/images/P02_icon_font_color_press.png [new file with mode: 0644]
theme/black/images/P02_icon_font_size.png [new file with mode: 0644]
theme/black/images/P02_icon_font_size_press.png [new file with mode: 0644]
theme/black/images/P02_icon_font_type.png [new file with mode: 0644]
theme/black/images/P02_icon_font_type_press.png [new file with mode: 0644]
theme/black/images/P02_icon_stroke.png [new file with mode: 0644]
theme/black/images/P02_icon_stroke_press.png [new file with mode: 0644]
theme/black/memo.edc [new file with mode: 0644]
theme/common.edc [new file with mode: 0644]
theme/white/images/00_picker_btn_normal.png [new file with mode: 0644]
theme/white/images/00_picker_btn_press.png [new file with mode: 0644]
theme/white/images/P02_icon_color.png [new file with mode: 0644]
theme/white/images/P02_icon_color_focus.png [new file with mode: 0644]
theme/white/images/P02_icon_eraser.png [new file with mode: 0644]
theme/white/images/P02_icon_eraser_press.png [new file with mode: 0644]
theme/white/images/P02_icon_font_color.png [new file with mode: 0644]
theme/white/images/P02_icon_font_color_press.png [new file with mode: 0644]
theme/white/images/P02_icon_font_size.png [new file with mode: 0644]
theme/white/images/P02_icon_font_size_press.png [new file with mode: 0644]
theme/white/images/P02_icon_font_type.png [new file with mode: 0644]
theme/white/images/P02_icon_font_type_press.png [new file with mode: 0644]
theme/white/images/P02_icon_stroke.png [new file with mode: 0644]
theme/white/images/P02_icon_stroke_press.png [new file with mode: 0644]
theme/white/memo.edc [new file with mode: 0644]
ug-memo-efl.desktop [new file with mode: 0644]
ug-memo-efl.manifest [new file with mode: 0644]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..559f267
--- /dev/null
@@ -0,0 +1,78 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(ug-memo-efl C)
+
+#debug option
+#SET(CMAKE_BUILD_TYPE Debug)
+#ADD_DEFINITIONS("-DMEMO_DEBUG")
+
+SET(VERSION 0.1.0)
+SET(VENDOR      "tizen")
+SET(PKGPREFIX   "org.${VENDOR}")
+SET(PACKAGE     ${PROJECT_NAME})
+SET(PKGNAME     "${PKGPREFIX}.${PACKAGE}")
+SET(PREFIX      ${CMAKE_INSTALL_PREFIX})
+SET(ICONDIR     "${PREFIX}/ug/res/images/${PROJECT_NAME}")
+SET(EDJDIR      "${PREFIX}/ug/res/edje/${PROJECT_NAME}")
+SET(LOCALEDIR   "${PREFIX}/ug/res/locale")
+
+
+SET(SRCS extend/extended-elm.c
+         extend/supplement.c
+         src/memo-efl.c
+         src/memo_autolink.c
+         src/edit.c
+         src/ug-select.c
+         src/ug-detail.c
+         src/memo-genlist.c
+         src/memo-assist.c
+         src/memo_doodle_editor.c
+         src/memo_text_editor.c
+         src/memo_ug.c)
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/extend)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED appcore-efl appsvc elementary ui-gadget-1 ecore evas memo iniparser dlog bundle)
+
+FOREACH(flag ${pkgs_CFLAGS})
+       SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} -fvisibility=hidden -Wall")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS}")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS}")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DPACKAGE_PREFIX=\"${PKGPREFIX}\"")
+ADD_DEFINITIONS("-DDOODLEDIR=\"/opt/apps/org.tizen.memo/data/doodle\"")
+ADD_DEFINITIONS("-DEDJ_DIR=\"${EDJDIR}\"")
+ADD_DEFINITIONS("-DEDJ_FILE=\"${EDJDIR}/memo.edj\"")
+ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"")
+ADD_DEFINITIONS("-DMEMO_BUFFER_SIZE=256")
+ADD_DEFINITIONS("-DLOG_TAG=\"${PROJECT_NAME}\"")
+ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"")
+ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
+
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION 0.1.0)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -licui18n -licuuc -licudata)
+
+ADD_CUSTOM_TARGET(memo.edj
+               COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images
+               ${CMAKE_SOURCE_DIR}/memo.edc ${CMAKE_BINARY_DIR}/memo.edj
+               DEPENDS ${CMAKE_SOURCE_DIR}/memo.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} memo.edj)
+
+
+
+CONFIGURE_FILE(${PROJECT_NAME}.desktop ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.desktop)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${PREFIX}/ug/lib)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/memo.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/images/01_header_icon_add.png DESTINATION ${ICONDIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/images/01_header_icon_cancel.png DESTINATION ${ICONDIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/images/01_header_icon_done.png DESTINATION ${ICONDIR})
+
+ADD_SUBDIRECTORY(po)
+ADD_SUBDIRECTORY(theme)
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..89d38d6
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,76 @@
+Flora License
+
+Version 1.0, May, 2012
+
+http://floralicense.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 2012  Samsung Electronics Co., Ltd
+
+   Licensed under the Flora License, Version 1.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://floralicense.org/license/
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT 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 (file)
index 0000000..ded3804
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1 @@
+Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
\ No newline at end of file
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..bdcab8e
--- /dev/null
@@ -0,0 +1,1088 @@
+ug-memo-efl (0.1.1-37) unstable; urgency=low
+
+  * Fix Voice call launching problem
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-37
+
+ -- Goo Lee <goo81.lee@samsung.com>  Sat, 21 July 2012 18:12:30 +0800
+
+ug-memo-efl (0.1.1-36) unstable; urgency=low
+
+  * [Request]UG api migration.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-36
+
+ -- Wei Hua <wei2012.hua@samsung.com>  Sat, 14 Jul 2012 14:48:30 +0800
+
+ug-memo-efl (0.1.1-34) unstable; urgency=low
+
+  * [Request]Apply package strip
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-34
+
+ -- Goo Lee <goo81.lee@samsung.com>  Fri, 13 July 2012 19:35:30 +0800
+
+ug-memo-efl (0.1.1-33) unstable; urgency=low
+
+  * [Request]Remove discard vconf code.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-33
+
+ -- Wei Hua <wei2012.hua@samsung.com>  Fri, 8 Jun 2012 16:03:30 +0800
+
+ug-memo-efl (0.1.1-32) unstable; urgency=low
+
+  * [Request]Fix add new memo can't be added to favourites list in NFC.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-32
+
+ -- Wei Hua <wei2012.hua@samsung.com>  Wen, 23 May 2012 09:11:30 +0800
+
+ug-memo-efl (0.1.1-31) unstable; urgency=low
+
+  * [Request]Support Dynamic Font Change
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-31
+
+ -- Wei Hua <wei2012.hua@samsung.com>  Tue, 15 May 2012 14:03:30 +0800
+
+ug-memo-efl (0.1.1-30) unstable; urgency=low
+
+  * [Request]Support Dynamic Font Change
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-30
+
+ -- Wei Hua <wei2012.hua@samsung.com>  Mon, 14 May 2012 17:55:00 +0800
+
+ug-memo-efl (0.1.1-29) unstable; urgency=low
+
+  * Upload package 
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-29
+
+ -- Goo Lee <goo81.lee@samsung.com>  Wed, 9 May 2012 17:18:39 +0800
+ug-memo-efl (0.1.1-28) unstable; urgency=low
+
+  * [Request]Filtering memo list for select only text memo
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-28
+
+ -- Goo Lee <goo81.lee@samsung.com>  Wed, 9 May 2012 17:05:39 +0800
+
+ug-memo-efl (0.1.1-27) unstable; urgency=low
+
+  * [Request]PKG upload for S1-2910 and S1-2911.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-27
+
+ -- Feng Li <feng.li@samsung.com>  Thu, 3 May 2012 17:05:39 +0800
+
+ug-memo-efl (0.1.1-26) unstable; urgency=low
+
+  * [Request]Elementary v1.0 PKG upload.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-26
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 13 Mar 2012 20:34:44 +0800
+
+ug-memo-efl (0.1.1-25) unstable; urgency=low
+
+  * [Request]elm_entry_autocapitalization_set API is deprecated.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-25
+
+ -- Feng Li <feng.li@samsung.com>  Mon, 12 Mar 2012 17:15:39 +0800
+
+ug-memo-efl (0.1.1-24) unstable; urgency=low
+
+  * [Request]Changeset2 for Elm_Editfield and Elm_Searchbar widgets deprecation.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-24
+
+ -- Feng Li <feng.li@samsung.com>  Sat, 3 Mar 2012 17:15:18 +0800
+
+ug-memo-efl (0.1.1-23) unstable; urgency=low
+
+  * [Request]upload
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-23
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 03 Mar 2012 09:02:01 +0800
+
+ug-memo-efl (0.1.1-22) unstable; urgency=low
+
+  * [Request]Changeset1 for Elm_Editfield and Elm_Searchbar widgets deprecation.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-22
+
+ -- Feng Li <feng.li@samsung.com>  Fri, 2 Mar 2012 15:00:32 +0800
+
+ug-memo-efl (0.1.1-21) unstable; urgency=low
+
+  * [Request]Changeset1 for Elementary API change as EFL migration.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-21
+
+ -- Feng Li <feng.li@samsung.com>  Wed, 15 Feb 2012 18:00:47 +0800
+
+ug-memo-efl (0.1.1-20) unstable; urgency=low
+
+  * [Request]Voice call launch method changes from AUL to appsvc.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-20
+
+ -- Feng Li <feng.li@samsung.com>  Mon, 30 Jan 2012 11:07:47 +0800
+
+ug-memo-efl (0.1.1-19) unstable; urgency=low
+
+  * [Upload]Increase version.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-19
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 05 Jan 2012 11:24:47 +0800
+
+ug-memo-efl (0.1.1-18) unstable; urgency=low
+
+  * [Upload]Increase version.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-18
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 04 Jan 2012 17:03:47 +0800
+
+ug-memo-efl (0.1.1-17) unstable; urgency=low
+
+  * [Request]rename package name
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : ug-memo-efl_0.1.1-17
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 07 Dec 2011 15:00:42 +0800
+
+sg-memo-efl (0.1.1-16) unstable; urgency=low
+
+  * [CQ][H0100137846]Title of bottom button isn't in line with UI guideline.
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-16
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 03 Dec 2011 15:00:42 +0800
+
+sg-memo-efl (0.1.1-15) unstable; urgency=low
+
+  * only pure text can be pasted into entry(editfield, searchbar) with new introduced API elm_entry_cnp_mode_set
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-15
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 01 Dec 2011 17:20:35 +0800
+
+sg-memo-efl (0.1.1-14) unstable; urgency=low
+
+  * [CQ][H0100137227]use 1 pixel for bottom margin of genlist
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-14
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 23 Nov 2011 14:30:54 +0800
+
+sg-memo-efl (0.1.1-13) unstable; urgency=low
+
+  * [CQ][H0100137310]customized border color for font/stroke color selector
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-13
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 23 Nov 2011 14:08:54 +0800
+
+sg-memo-efl (0.1.1-12) unstable; urgency=low
+
+  * remove unnecessary ecore_idler, since popup and imf hide effect do not conflict anymore
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-12
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 21 Nov 2011 13:38:46 +0800
+
+sg-memo-efl (0.1.1-11) unstable; urgency=low
+
+  * [fix bug]H0100137141, use win as parent of popup to prevent mouse events received by cancel button
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-11
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 21 Nov 2011 13:20:36 +0800
+
+sg-memo-efl (0.1.1-10) unstable; urgency=low
+
+  * adjust font style of time
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-10
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 21 Nov 2011 10:27:16 +0800
+
+sg-memo-efl (0.1.1-9) unstable; urgency=low
+
+  * ug effect update
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-9
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 14 Nov 2011 17:21:31 +0800
+
+sg-memo-efl (0.1.1-8) unstable; urgency=low
+
+  * disable right button of selector with elm_controlbar_item_disabled_set
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-8
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 09 Nov 2011 11:37:01 +0800
+
+sg-memo-efl (0.1.1-7) unstable; urgency=low
+
+  * naviframe layout update
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-7
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 09 Nov 2011 11:15:24 +0800
+
+sg-memo-efl (0.1.1-6) unstable; urgency=low
+
+  * [fix bug]H0100136395, update select view when data modified by external application
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-6
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 05 Nov 2011 14:29:14 +0800
+
+sg-memo-efl (0.1.1-5) unstable; urgency=low
+
+  * copyright for edc
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-5
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 19 Oct 2011 14:56:33 +0800
+
+sg-memo-efl (0.1.1-4) unstable; urgency=low
+
+  * copyright update
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-4
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 19 Oct 2011 14:37:00 +0800
+
+sg-memo-efl (0.1.1-3) unstable; urgency=low
+
+  * variable height of genlist
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-3
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 12 Oct 2011 16:22:12 +0800
+
+sg-memo-efl (0.1.1-2) unstable; urgency=low
+
+  * sync modification from memo
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-2
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 12 Oct 2011 13:46:04 +0800
+
+sg-memo-efl (0.1.1-1) unstable; urgency=low
+
+  * upload
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-1
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 06 Oct 2011 10:48:48 +0800
+
+sg-memo-efl (0.1.1-0) unstable; urgency=low
+
+  * [detail ug]filter mouse event
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-0
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 21 Sep 2011 14:07:21 +0800
+
+sg-memo-efl (0.1.0-99) unstable; urgency=low
+
+  * unused postinst script
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-99
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 20 Sep 2011 15:22:22 +0800
+
+sg-memo-efl (0.1.0-98) unstable; urgency=low
+
+  * package size optimize
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-98
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 20 Sep 2011 09:02:33 +0800
+
+sg-memo-efl (0.1.0-97) unstable; urgency=low
+
+  * return failed if id of record is illegal
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-97
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 07 Sep 2011 09:55:00 +0800
+
+sg-memo-efl (0.1.0-96) unstable; urgency=low
+
+  * acquire user confirmation when shift between text/draw mode if record already been modified
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-96
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 03 Sep 2011 14:14:08 +0800
+
+sg-memo-efl (0.1.0-95) unstable; urgency=low
+
+  * [i18n]sync from memo
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-95
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 01 Sep 2011 10:52:39 +0800
+
+sg-memo-efl (0.1.0-94) unstable; urgency=low
+
+  * sync from memo(customized edc for each theme)
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-94
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 30 Aug 2011 09:58:55 +0800
+
+sg-memo-efl (0.1.0-93) unstable; urgency=low
+
+  * whitespace of korean character may disappear sometimes
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-93
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 27 Aug 2011 13:11:12 +0800
+
+sg-memo-efl (0.1.0-92) unstable; urgency=low
+
+  * sync modification from memo
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-92
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 22 Aug 2011 08:53:28 +0800
+
+sg-memo-efl (0.1.0-91) unstable; urgency=low
+
+  * elm_bg swallowed in elm_layout(application, default)
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-91
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 09 Aug 2011 09:30:35 +0800
+
+sg-memo-efl (0.1.0-90) unstable; urgency=low
+
+  * sync modification from memo
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-90
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Fri, 05 Aug 2011 16:33:28 +0800
+
+sg-memo-efl (0.1.0-89) unstable; urgency=low
+
+  * NBeat layout update
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-89
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 01 Aug 2011 14:57:06 +0800
+
+sg-memo-efl (0.1.0-88) unstable; urgency=low
+
+  * sync modification from memo
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-88
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 30 Jul 2011 10:32:29 +0800
+
+sg-memo-efl (0.1.0-87) unstable; urgency=low
+
+  * sync from memo
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-87
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 26 Jul 2011 14:51:35 +0800
+
+sg-memo-efl (0.1.0-86) unstable; urgency=low
+
+  * apply customize theme to genlist only
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-86
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 25 Jul 2011 10:46:40 +0800
+
+sg-memo-efl (0.1.0-85) unstable; urgency=low
+
+  * upload
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-85
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 21 Jul 2011 11:45:15 +0800
+
+sg-memo-efl (0.1.0-84) unstable; urgency=low
+
+  * efl update
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-84
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 21 Jul 2011 11:10:24 +0800
+
+sg-memo-efl (0.1.0-83) unstable; urgency=low
+
+  * upload
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-83
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 21 Jul 2011 10:47:26 +0800
+
+sg-memo-efl (0.1.0-82) unstable; urgency=low
+
+  * adjust dependency
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-82
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 20 Jul 2011 14:20:18 +0800
+
+sg-memo-efl (0.1.0-81) unstable; urgency=low
+
+  * modify copyright as lgpl
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-81
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 18 Jul 2011 09:03:05 +0800
+
+sg-memo-efl (0.1.0-80) unstable; urgency=low
+
+  * UG hide/show effect update
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-80
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 13 Jul 2011 08:53:08 +0800
+
+sg-memo-efl (0.1.0-79) unstable; urgency=low
+
+  * sync
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-79
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 28 Jun 2011 11:40:49 +0800
+
+sg-memo-efl (0.1.0-78) unstable; urgency=low
+
+  * sync
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-78
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 22 Jun 2011 14:57:33 +0800
+
+sg-memo-efl (0.1.0-77) unstable; urgency=low
+
+  * i18n, adjust time format by udatpg_getBestPattern
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-77
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 20 Jun 2011 13:11:18 +0800
+
+sg-memo-efl (0.1.0-76) unstable; urgency=low
+
+  * UG hide/show effect update
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-76
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 20 Jun 2011 09:43:59 +0800
+
+sg-memo-efl (0.1.0-75) unstable; urgency=low
+
+  * upload
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-75
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 30 May 2011 11:15:22 +0800
+
+sg-memo-efl (0.1.0-74) unstable; urgency=low
+
+  * upload
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-74
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 30 May 2011 09:36:08 +0800
+
+sg-memo-efl (0.1.0-73) unstable; urgency=low
+
+  * upload
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-73
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 19 May 2011 15:09:43 +0800
+
+sg-memo-efl (0.1.0-72) unstable; urgency=low
+
+  * Standardize parsing url and email
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-72
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 18 May 2011 10:57:59 +0800
+
+sg-memo-efl (0.1.0-71) unstable; urgency=low
+
+  * update dependency of libicu
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-71
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 16 May 2011 10:35:51 +0800
+
+sg-memo-efl (0.1.0-70) unstable; urgency=low
+
+  * upload
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-70
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 12 May 2011 08:35:48 +0800
+
+sg-memo-efl (0.1.0-69) unstable; urgency=low
+
+  * add dependency
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-69
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 04 May 2011 14:29:46 +0800
+
+sg-memo-efl (0.1.0-68) unstable; urgency=low
+
+  * edit doodle done
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-68
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 04 May 2011 14:02:52 +0800
+
+sg-memo-efl (0.1.0-67) unstable; urgency=low
+
+  * upload
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-67
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 28 Apr 2011 14:29:49 +0800
+
+sg-memo-efl (0.1.0-66) unstable; urgency=low
+
+  * upload
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-66
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 23 Apr 2011 11:22:44 +0800
+
+sg-memo-efl (0.1.0-65) unstable; urgency=low
+
+  * upload
+  * Git : git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-65
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 20 Apr 2011 08:38:36 +0800
+
+sg-memo-efl (0.1.0-64) unstable; urgency=low
+
+  * add missing edc files
+  * Git : 165.213.180.234:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-64
+
+ -- canjiang lu <canjiang.lu@samsung.com>  Tue, 19 Apr 2011 08:46:33 +0800
+
+sg-memo-efl (0.1.0-63) unstable; urgency=low
+
+  * add ug template
+  * Git : 165.213.180.234:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-63
+
+ -- canjiang lu <canjiang.lu@samsung.com>  Sat, 09 Apr 2011 16:40:10 +0800
+
+sg-memo-efl (0.1.0-62) unstable; urgency=low
+
+  * [Upload]Use correct dependence
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-62
+
+ -- Yang Qing <qing_.yang@samsung.com>  Tue, 29 Mar 2011 16:18:27 +0800
+
+sg-memo-efl (0.1.0-61) unstable; urgency=low
+
+  * [Upload]Remove contact UG dependence
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-61
+
+ -- Yang Qing <qing_.yang@samsung.com>  Mon, 28 Mar 2011 20:26:10 +0800
+
+sg-memo-efl (0.1.0-60) unstable; urgency=low
+
+  * [Upload]Increase a version
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-60
+
+ -- Yang Qing <qing_.yang@samsung.com>  Mon, 28 Mar 2011 09:48:06 +0800
+
+sg-memo-efl (0.1.0-59) unstable; urgency=low
+
+  * [Upload]Increase a version.
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-59
+
+ -- Yang Qing <qing_.yang@samsung.com>  Wed, 23 Mar 2011 15:12:35 +0800
+
+sg-memo-efl (0.1.0-58) unstable; urgency=low
+
+  * [CMakeLists]Add contacts-service in pkg_check_modules
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-58
+
+ -- Yang Qing <qing_.yang@samsung.com>  Wed, 23 Mar 2011 13:43:37 +0800
+
+sg-memo-efl (0.1.0-57) unstable; urgency=low
+
+  * [Detail]Apply autolink to show memo detail.
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-57
+
+ -- Yang Qing <qing_.yang@samsung.com>  Wed, 23 Mar 2011 13:40:28 +0800
+
+sg-memo-efl (0.1.0-56) unstable; urgency=low
+
+  * upload
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-56
+
+ -- Yang Qing <qing_.yang@samsung.com>  Thu, 17 Mar 2011 08:57:09 +0800
+
+sg-memo-efl (0.1.0-55) unstable; urgency=low
+
+  * upload
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-55
+
+ -- Yang Qing <qing_.yang@samsung.com>  Mon, 07 Mar 2011 10:40:03 +0800
+
+sg-memo-efl (0.1.0-54) unstable; urgency=low
+
+  * display no item when no record
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-54
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 07 Mar 2011 10:32:15 +0800
+
+sg-memo-efl (0.1.0-53) unstable; urgency=low
+
+  * Change ADD & QUIT button position
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-53
+
+ -- Yang Qing <qing_.yang@samsung.com>  Fri, 04 Mar 2011 10:32:15 +0800
+
+sg-memo-efl (0.1.0-52) unstable; urgency=low
+
+  * upload
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-52
+
+ -- Yang Qing <qing_.yang@samsung.com>  Fri, 25 Feb 2011 13:52:37 +0800
+
+sg-memo-efl (0.1.0-51) unstable; urgency=low
+
+  * upload
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-51
+
+ -- Yang Qing <qing_.yang@samsung.com>  Fri, 18 Feb 2011 16:22:12 +0800
+
+sg-memo-efl (0.1.0-50) unstable; urgency=low
+
+  * Remove clock ug package name in control file
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-50 
+
+ -- Junho Lee <junho4810.lee@samsung.com>  Thu, 10 Feb 2011 20:06:55 +0900
+
+sg-memo-efl (0.1.0-49) unstable; urgency=low
+
+  * Change clock ug package name in control file(temporary code).
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-49 
+
+ -- Junho Lee <junho4810.lee@samsung.com>  Thu, 10 Feb 2011 20:01:01 +0900
+
+sg-memo-efl (0.1.0-48) unstable; urgency=low
+
+  * Add UG clock dependency(temporary code).
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-48 
+
+ -- Junho Lee <junho4810.lee@samsung.com>  Wed, 09 Feb 2011 18:04:24 +0900
+
+sg-memo-efl (0.1.0-47) unstable; urgency=low
+
+  * upload
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-47
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 31 Jan 2011 10:41:55 +0800
+
+sg-memo-efl (0.1.0-46) unstable; urgency=low
+
+  * upload
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-46
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 24 Jan 2011 14:57:12 +0800
+
+sg-memo-efl (0.1.0-45) unstable; urgency=low
+
+  * upload
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-45
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 20 Jan 2011 10:05:38 +0800
+
+sg-memo-efl (0.1.0-44) unstable; urgency=low
+
+  * modify doodle path
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-44
+
+ -- Yang Qing <qing_.yang@samsung.com>  Wed, 19 Jan 2011 14:25:37 +0800
+
+sg-memo-efl (0.1.0-43) unstable; urgency=low
+
+  * fix build error
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-43
+
+ -- Yang Qing <qing_.yang@samsung.com>  Wed, 12 Jan 2011 14:44:34 +0800
+
+sg-memo-efl (0.1.0-42) unstable; urgency=low
+
+  * elm_popup_timeout_set API changed
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-42
+
+ -- Yang Qing <qing_.yang@samsung.com>  Wed, 12 Jan 2011 14:11:35 +0800
+
+sg-memo-efl (0.1.0-41) unstable; urgency=low
+
+  * upload
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-41
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Fri, 07 Jan 2011 15:28:46 +0800
+
+sg-memo-efl (0.1.0-40) unstable; urgency=low
+
+  * upload
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-40
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Fri, 07 Jan 2011 15:13:12 +0800
+
+sg-memo-efl (0.1.0-39) unstable; urgency=low
+
+  * upload
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-39
+
+ -- Yang Qing <canjiang.lu@samsung.com>  Tue, 28 Dec 2010 11:31:40 +0800
+
+sg-memo-efl (0.1.0-38) unstable; urgency=low
+
+  * upload
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-38
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Fri, 24 Dec 2010 15:02:37 +0800
+
+sg-memo-efl (0.1.0-37) unstable; urgency=low
+
+  * upload
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+ssh://canjiang.lu@gerrit_server:29421/slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-37
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Fri, 24 Dec 2010 14:57:54 +0800
+
+sg-memo-efl (0.1.0-36) unstable; urgency=low
+
+  * upload
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-36
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 04 Dec 2010 16:17:48 +0800
+
+sg-memo-efl (0.1.0-35) unstable; urgency=low
+
+  * draft version done
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-35
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 04 Dec 2010 10:53:31 +0800
+
+sg-memo-efl (0.1.0-34) unstable; urgency=low
+
+  * upload
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-34
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Fri, 03 Dec 2010 15:28:58 +0800
+
+sg-memo-efl (0.1.0-33) unstable; urgency=low
+
+  * upload
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-33
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 29 Nov 2010 13:59:53 +0800
+
+sg-memo-efl (0.1.0-32) unstable; urgency=low
+
+  * enable dbg package
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-32
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 11 Nov 2010 09:22:24 +0800
+
+sg-memo-efl (0.1.0-31) unstable; urgency=low
+
+  * upload
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-31
+
+ -- X536 Gong <x536.gong@samsung.com>  Thu, 16 Sep 2010 09:58:22 +0800
+
+sg-memo-efl (0.1.0-30) unstable; urgency=low
+
+  * upload
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-30
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 16 Sep 2010 08:37:56 +0800
+
+sg-memo-efl (0.1.0-29) unstable; urgency=low
+
+  * upload
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-29
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 16 Sep 2010 08:21:05 +0800
+
+sg-memo-efl (0.1.0-28) unstable; urgency=low
+
+  * upload
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-28
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 11 Sep 2010 10:01:25 +0800
+
+sg-memo-efl (0.1.0-27) unstable; urgency=low
+
+  * Apply new UI gadget mode
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-27 
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Tue, 10 Aug 2010 18:02:10 +0800
+
+sg-memo-efl (0.1.0-26) unstable; urgency=low
+
+  * Apply new UI gadget mode
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-26 
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Thu, 05 Aug 2010 16:43:31 +0800
+
+sg-memo-efl (0.1.0-25) unstable; urgency=low
+
+  * Remove retm_if
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-25 
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Sat, 24 Jul 2010 11:04:16 +0800
+
+sg-memo-efl (0.1.0-24) unstable; urgency=low
+
+  * Update
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-24 
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Sat, 24 Jul 2010 07:55:38 +0800
+
+sg-memo-efl (0.1.0-23) unstable; urgency=low
+
+  * Update .postinst file according to new DAC policy
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-23 
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Sat, 24 Jul 2010 07:42:46 +0800
+
+sg-memo-efl (0.1.0-22) unstable; urgency=low
+
+  * Update .postinst file according to new DAC policy
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-22
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Fri, 23 Jul 2010 23:16:50 +0800
+
+sg-memo-efl (0.1.0-21) unstable; urgency=low
+
+  * Remove libapputilinhouse
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-21
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Mon, 12 Jul 2010 13:52:10 +0800
+
+sg-memo-efl (0.1.0-20) unstable; urgency=low
+
+  * update isf
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-20
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 08 Jul 2010 15:02:59 +0800
+
+sg-memo-efl (0.1.0-19) unstable; urgency=low
+
+  * update font name
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-19
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 17 Jun 2010 03:30:26 +0800
+
+sg-memo-efl (0.1.0-18) unstable; urgency=low
+
+  * repackage for dlog update
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-18
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 16 Jun 2010 04:26:45 +0800
+
+sg-memo-efl (0.1.0-17) unstable; urgency=low
+
+  * enable return parameters
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-17
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 15 Jun 2010 10:47:54 +0800
+
+sg-memo-efl (0.1.0-16) unstable; urgency=low
+
+  * enable return parameters
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-16
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 15 Jun 2010 09:20:42 +0800
+
+sg-memo-efl (0.1.0-15) unstable; urgency=low
+
+  * update version
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-15 
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Mon, 14 Jun 2010 21:13:56 +0800
+
+sg-memo-efl (0.1.0-14) unstable; urgency=low
+
+  * Repackage 
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-14 
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Mon, 14 Jun 2010 20:51:04 +0800
+
+sg-memo-efl (0.1.0-13) unstable; urgency=low
+
+  * Remove applog.h
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-13
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Sat, 12 Jun 2010 09:46:31 +0800
+
+sg-memo-efl (0.1.0-12) unstable; urgency=low
+
+  * Remove UI prefixed api
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-12
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 10 Jun 2010 13:43:21 +0800
+
+sg-memo-efl (0.1.0-11) unstable; urgency=low
+
+  * Remove elm_add_notify
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-11   
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Wed, 09 Jun 2010 16:48:24 +0800
+
+sg-memo-efl (0.1.0-10) unstable; urgency=low
+
+  * Remove EFL dependency of input/out parameters
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-10
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 02 Jun 2010 16:06:15 +0800
+
+sg-memo-efl (0.1.0-9) unstable; urgency=low
+
+  * Clear warnings
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-9
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 02 Jun 2010 15:59:05 +0800
+
+sg-memo-efl (0.1.0-8) unstable; urgency=low
+
+  * Remove dependency with sysman
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-8
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 02 Jun 2010 09:23:25 +0800
+
+sg-memo-efl (0.1.0-7) unstable; urgency=low
+
+  * Bind text when sg is launched
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-7
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 01 Jun 2010 10:04:23 +0800
+
+sg-memo-efl (0.1.0-6) unstable; urgency=low
+
+  * Milestone of memo gadget
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-6
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Fri, 28 May 2010 15:04:22 +0800
+
+sg-memo-efl (0.1.0-5) unstable; urgency=low
+
+  * Update version
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-5
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 26 May 2010 17:07:07 +0800
+
+sg-memo-efl (0.1.0-4) unstable; urgency=low
+
+  * Modification according to sg development guide
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-0
+  * Tag: sg-memo-efl_0.1.0-4
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 26 May 2010 16:04:20 +0800
+
+sg-memo-efl (0.1.0-3) unstable; urgency=low
+
+  * Adjust package according name rules
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-0
+  * Tag: sg-memo-efl_0.1.0-3
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Fri, 19 May 2010 17:28:33 +0900
+
+sg-memo (0.1.0-2) unstable; urgency=low
+
+  * Modified EDJ path for simulator
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-0
+  * Tag: sg-memo_0.1.0-2  
+
+ -- Jae-Yong Lee <jaeyong911.lee@samsung.com>  Fri, 14 May 2010 17:28:33 +0900
+
+sg-memo (0.1.0-1) unstable; urgency=low
+
+  * Initial release. 
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-0
+  * Tag: sg-memo_0.1.0-1
+
+ -- Jae-Yong Lee <jaeyong911.lee@samsung.com>  Fri, 14 May 2010 10:40:21 +0900
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..63d9d6e
--- /dev/null
@@ -0,0 +1,18 @@
+Source: ug-memo-efl
+Section: misc
+Priority: extra
+Maintainer: Zhou Zhibin <zhibin.zhou@samsung.com>, Lu Canjiang <canjiang.lu@samsung.com>, Li Feng <feng.li@samsung.com>, Wei Hua <wei2012.hua@samsung.com>
+Build-Depends: debhelper (>= 5), libappcore-efl-dev, libelm-dev, libui-gadget-dev, libecore-dev, libevas-dev, libslp-memo-dev, libug-contacts-dev, iniparser-dev, dlog-dev, libbundle-dev, libicu-dev, libappsvc-dev
+Standards-Version: 0.1.0
+
+Package: libug-memo-efl
+Section: misc
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Memo Public Shared-Gadget (EFL)
+
+Package: libug-memo-efl-dbg
+Section: dbg
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Memo Public Shared-Gadget (EFL)
diff --git a/debian/dirs b/debian/dirs
new file mode 100644 (file)
index 0000000..ca882bb
--- /dev/null
@@ -0,0 +1,2 @@
+usr/bin
+usr/sbin
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..a0f0008
--- /dev/null
@@ -0,0 +1 @@
+CMakeLists.txt
diff --git a/debian/libug-memo-efl.install.in b/debian/libug-memo-efl.install.in
new file mode 100755 (executable)
index 0000000..e18df37
--- /dev/null
@@ -0,0 +1,2 @@
+/opt/ug/lib/*
+/opt/ug/res/*
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..aded37f
--- /dev/null
@@ -0,0 +1,137 @@
+#!/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 -g
+CXXFLAGS ?=  -Wall -g
+LDFLAGS ?= 
+PREFIX ?= /usr
+DATADIR ?= /opt
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+       CXXFLAGS += -O0
+else
+       CFLAGS += -O2
+       CXXFLAGS += -O2
+endif
+
+LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed
+
+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)
+
+       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 -fr memo-create-sg/CMakeFiles/
+       rm -rf *.so
+       rm -rf *.edj
+       rm -fr memo-create-sg/.cproject
+       rm -fr memo-create-sg/.project
+       rm -fr memo-create-sg/CMakeCache.txt
+       rm -fr memo-create-sg/Makefile
+       rm -fr memo-create-sg/cmake_install.cmake
+       rm -fr memo-create-sg/memo-create-sg.edj
+       rm -rf po/Makefile
+       rm -rf po/CMakeFiles/
+       rm -rf po/cmake_install.cmake
+       rm -rf po/*.mo
+       rm -rf theme/Makefile
+       rm -rf theme/CMakeFiles
+       rm -rf theme/cmake_install.cmake
+       rm -rf sg-memo-efl.pc
+       rm -rf libug-memo-efl.so.0.1.0
+       
+       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
+
+
+# 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
+#      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-memo-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/edc/common.edc b/edc/common.edc
new file mode 100644 (file)
index 0000000..6855804
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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_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: 169 169 169 255; \
+        rel1 { \
+            relative: 0.0 1.0; \
+            offset: 0 -1; \
+        } \
+    } \
+}
+
+styles
+{
+    style
+    {
+        name: "textblock_style_main";
+        base: "font=SLP:style=Roman text_class=slp_roman font_size=42 align=left color=#F9F9F9 wrap=char";
+    }
+}
+
+#define PART_TEXT_BLACK_LEFT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iCLass, iSize)\
+PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iClass, iSize, 0.0, 0.5, 0, 0, 0, 255)
+
+#define PART_TEXT_GRAY_RIGHT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iClass, iSize)\
+PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iClass, iSize, 1.0, 0.5, 85, 70, 58, 255)
+
+#define PART_TEXT_WHITE_LEFT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iClass, iSize)\
+PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iClass, iSize, 0.0, 0.5, 255, 255, 255, 255)
+
+#define PART_TEXT_GRAY_CENTER(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iClass, iSize)\
+PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iClass, iSize, 0.5, 0.5, 85, 70, 58, 255)
+
+#define PART_TEXT_DETAIL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iClass, iSize)\
+PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iClass, iSize, 0.0, 0.5, 0, 0, 0, 255)
+
+#define PART_TEXT_DATE(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iClass, iSize)\
+PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iClass, iSize, 0.0, 0.5, 124, 124, 124, 255)
+
+group{
+    name: "empty_layout";
+    parts{
+        PART_BG("bg")
+        PART_SWALLOW("elm.swallow.content", "bg")
+    }
+}
+
+#define IMF_HEIGHT 538
diff --git a/edc/detail.edc b/edc/detail.edc
new file mode 100644 (file)
index 0000000..ddf2cff
--- /dev/null
@@ -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://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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: "detail_frame";
+    parts{
+        PART_BG_EX("bg", 480, 0)
+        PART_EVENT_RECT("event", "bg")
+        part {
+            name: "elm.text.date";
+            type: TEXT;
+            mouse_events: 0;
+            scale: 1;
+            description {
+                state: "default" 0.0;
+                min: 0 30;
+                align: 0.5 0;
+                fixed: 1 1;
+                rel1 { relative: 0.0 0.0; to: "bg";}
+                rel2 { relative: (480-15)/480 0.0; to: "bg";}
+                color: 121 115 100 255;
+                text {
+                    text: "date";
+                    font: "SLP:style=Medium";
+                    text_class:"slp_medium";
+                    size: 16;
+                    align: 1 0.5;
+                }
+            }
+        }
+
+        part {
+            name: "elm.swallow.content";
+            type: SWALLOW;
+            mouse_events: 1;
+            scale: 1;
+            description {
+                state: "default" 0.0;
+                visible: 1;
+                rel1 { relative: 0.0 1.0; to_x: "bg"; to_y: "elm.text.date";}
+                rel2 { relative: 1.0 1.0; to: "bg"; }
+            }
+            description {
+                state: "text" 0.0;
+                inherit: "default" 0.0;
+                rel1 { relative: 15/480 1.0; to_x: "bg"; to_y: "elm.text.date";}
+                rel2 { relative: (480-15)/480 1.0; to: "bg"; }
+            }
+        }
+    }/* end parts */
+
+    programs {
+        program {
+            name: "prog_doodle_mode";
+            source: "";
+            signal: "sig_doodle_mode";
+            script {
+                set_state(PART:"elm.swallow.content", "default", 0.0);
+            }
+        }
+
+        program {
+            name: "prog_text_mode";
+            source: "";
+            signal: "sig_text_mode";
+            script {
+                set_state(PART:"elm.swallow.content", "text", 0.0);
+            }
+        }
+    }
+}/* end group */
+
+group {
+    name: "doodle_viewer";
+    parts{
+        PART_BG("bg")
+        PART_V_PIXEL_RECT("text.bg", 30, "bg", 0.0, 0.0)
+        PART_RECT("doodle.bg", 0.0, 1.0, "text.bg", 1.0, 0.0, "comment.bg")
+        PART_COLOR_RECT("doodle.bg.color", "doodle.bg", 255, 255, 255, 255)
+        PART_V_PIXEL_RECT("comment.bg", 108, "bg", 1.0, 1.0)
+        /* content */
+        PART_TEXT_GRAY_RIGHT("elm.text.date", 16/720, 0.0, "text.bg", (720-16)/720, 1.0, "text.bg", "date", "SLP:style=Medium", "slp_medium", 16)
+        PART_SWALLOW_REL("elm.swallow.doodle", 16/720, 0.0, "doodle.bg", (720-16)/720, 1.0, "doodle.bg")
+        PART_SWALLOW("elm.swallow.comment", "comment.bg")
+    }
+}
diff --git a/edc/doodle_editor.edc b/edc/doodle_editor.edc
new file mode 100644 (file)
index 0000000..0a8a754
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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: "doodle_editor";
+    parts{
+        PART_BG("bg") /* 720 * unknown */
+        PART_V_PIXEL_RECT("top_margin", 16, "bg", 0.0, 0.0)
+        PART_V_PIXEL_RECT("text.bg", 48, "top_margin", 1.0, 0.0)
+        PART_V_PIXEL_RECT("top_margin2", 10, "text.bg", 1.0, 0.0)
+        PART_RECT("_doodle.bg", 0.0, 1.0, "top_margin2", 1.0, 0.0, "bottom_margin2")
+        PART_V_PIXEL_RECT("bottom_margin2", 108, "bottom_margin", 0.0, 1.0)
+        PART_V_PIXEL_RECT("bottom_margin", 86, "bg", 1.0, 1.0)
+        PART_V_PIXEL_RECT("_bottom_margin", 108, "bg", 1.0, 1.0)
+        PART_V_PIXEL_RECT("tool.bg", IMF_HEIGHT, "bg", 1.0, 1.0)
+        /* layout */
+        PART_V_PIXEL_RECT("doodle.bg", 700, "_doodle.bg", 0.5, 0.5)
+        PART_COLOR_RECT("doodle.bg.color", "doodle.bg", 255, 255, 255, 255)
+        PART_V_PIXEL_RECT("toolbar.bg", 86, "bg", 1.0, 1.0)
+        PART_V_PIXEL_RECT("toolbar.bg.up", 86, "tool.bg", 0.0, 1.0)
+        PART_V_PIXEL_RECT("comment.bg.up", 108, "tool.bg", 0.0, 1.0)
+        PART_V_PIXEL_RECT("comment.bg", 108, "bottom_margin", 0.0, 1.0)
+        PART_V_PIXEL_RECT("comment.bg.down", 108, "bg", 1.0, 1.0)
+        /* content */
+        PART_TEXT_GRAY_RIGHT("elm.text.date", 16/720, 0.0, "text.bg", (720-16)/720, 1.0, "text.bg", "date", "SLP:style=Medium", "slp_medium", 32)
+        PART_SWALLOW_REL("elm.swallow.doodle", 16/720, 0.0, "doodle.bg", (720-16)/720, 1.0, "doodle.bg")
+        PART_SWALLOW("elm.swallow.toolbar", "toolbar.bg")
+        PART_SWALLOW("elm.swallow.tool", "tool.bg")
+        PART_SWALLOW("elm.swallow.comment", "comment.bg")
+    }/* end part */
+    programs {
+        program {
+            name: "init";
+            signal: "load";
+            source: "";
+            script {
+                SCRIPT_CUSTOM_PART("elm.swallow.toolbar");
+                SCRIPT_CUSTOM_PART("elm.swallow.comment");
+                SCRIPT_CUSTOM_PART("_doodle.bg");
+            }
+        } /* end program */
+
+        program {
+            name:   "abbrev";
+            signal: "abbrev";
+            source: "elm";
+            script {
+                 SCRIPT_SET_VISIBLE(elm.swallow.toolbar, 1)
+                 SCRIPT_SET_VISIBLE(elm.swallow.comment, 0)
+                 SCRIPT_SET_REL(elm.swallow.toolbar, 0.0, 0.0, "toolbar.bg.up", 1.0, 1.0, "toolbar.bg.up");
+                 SCRIPT_SET_REL("_doodle.bg", 0.0, 1.0, "top_margin2", 1.0, 0.0, "bottom_margin2")
+           }
+        } /* end program */
+        program {
+            name:   "expand";
+            signal: "expand";
+            source: "elm";
+            script {
+                 SCRIPT_SET_VISIBLE(elm.swallow.toolbar, 1)
+                 SCRIPT_SET_VISIBLE(elm.swallow.comment, 1)
+                 SCRIPT_SET_REL(elm.swallow.toolbar, 0.0, 0.0, "toolbar.bg", 1.0, 1.0, "toolbar.bg");
+                 SCRIPT_SET_REL(elm.swallow.comment, 0.0, 0.0, "comment.bg", 1.0, 1.0, "comment.bg");
+                 SCRIPT_SET_REL("_doodle.bg", 0.0, 1.0, "top_margin2", 1.0, 0.0, "bottom_margin2")
+           }
+        } /* end program */
+        program {
+            name:   "comment_abbrev";
+            signal: "abbrev";
+            source: "comment";
+            script {
+                 SCRIPT_SET_VISIBLE(elm.swallow.toolbar, 0)
+                 SCRIPT_SET_VISIBLE(elm.swallow.comment, 1)
+                 SCRIPT_SET_REL(elm.swallow.comment, 0.0, 0.0, "comment.bg.up", 1.0, 1.0, "comment.bg.up");
+                 SCRIPT_SET_REL("_doodle.bg", 0.0, 1.0, "top_margin2", 1.0, 0.0, "_bottom_margin")
+           }
+        } /* end program */
+        program {
+            name:   "comment_expand";
+            signal: "expand";
+            source: "comment";
+            script {
+                 SCRIPT_SET_VISIBLE(elm.swallow.toolbar, 0)
+                 SCRIPT_SET_VISIBLE(elm.swallow.comment, 1)
+                 SCRIPT_SET_REL(elm.swallow.comment, 0.0, 0.0, "comment.bg.down", 1.0, 1.0, "comment.bg.down");
+                 SCRIPT_SET_REL("_doodle.bg", 0.0, 1.0, "top_margin2", 1.0, 0.0, "_bottom_margin")
+           }
+        } /* end program */
+    }/* end programs */
+}
+
+group{
+    name: "doodle_comment";
+    images {
+        image: "00_search_input_field_bg.png" COMP;
+    }
+    parts{
+        PART_BG("bg") /* 720 * 67 */
+        PART_COLOR_RECT("bg.color", "bg", 30, 25, 22, 255)
+        PART_RECT("image.bg", 16/720, 8/67, "bg", (720-16)/720, (67-9)/67, "bg")
+        PART_BORDER_IMAGE("image", "image.bg", "00_search_input_field_bg.png", 6, 6, 7, 5)
+        PART_V_PIXEL_RECT("editfield.bg", 50, "image.bg", 0.5, 0.5)
+        PART_SWALLOW_REL("elm.swallow.editfield", 10/460, 0.0, "editfield.bg", (460-10)/460, 1.0, "editfield.bg")
+    }/* end parts */
+}/* end group */
+
diff --git a/edc/edit_list.edc b/edc/edit_list.edc
new file mode 100644 (file)
index 0000000..bde6cbd
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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: "edit_list_frame";
+    parts{
+        PART_BG("bg") /* 480 x 705 */
+        PART_SWALLOW_REL("elm.swallow.select.all", 0.0, 0.0, "bg", 1.0, 66/705, "bg")
+        PART_SWALLOW_REL("elm.swallow.content", 0.0, 66/705, "bg", 1.0, /* (706-70)/705 */ 1.0, "bg")
+        //PART_SWALLOW_REL("elm.swallow.controlbar", 0.0, (706-70)/705, "bg", 1.0, 706/705, "bg")
+    }/* end parts */
+}/* end group */
+
+group {
+    name: "edit_list_item_select_all";
+    parts {
+        /* area definition */
+        PART_BG("bg"); /* 480 x 66 */
+        PART_COLOR_RECT("bg_color", "bg", 0, 0, 0, 255);
+        PART_SWALLOW_REL("elm.swallow.check", 15/480, 8/66, "bg", 65/480, 58/66, "bg");
+        PART_TEXT_WHITE_LEFT("elm.text.select.all", 75/480, 0.0, "bg", 1.0, 1.0, "bg", "Select all", "SLP:style=Regular", "slp_regular", 25);
+        PART_EVENT_RECT("event", "bg")
+    } /* parts */
+} /* group */
diff --git a/edc/edit_tool.edc b/edc/edit_tool.edc
new file mode 100644 (file)
index 0000000..4430ece
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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: "color_selector";
+    parts{
+        PART_BG("bg")
+        PART_V_PIXEL_RECT("rect.up", 200, "bg", 0.0, 0.0)
+        PART_PIXEL_RECT("border.bg", (500+6), (160+5), 0.5, 0.5, "rect.up", 0.5, 0.5)
+        PART_PIXEL_RECT("color.bg", 500, 160, 0.5, 0.5, "rect.up", 0.5, 0.5)
+        PART_SWALLOW_REL("elm.swallow.color", 0.0, 0.0, "color.bg", 1.0, 1.0, "color.bg")
+        PART_EVENT_RECT("event", "rect.up")
+        PART_SWALLOW_REL("elm.swallow.selector", 4/480, 1.0, "rect.up", (480-4)/480, 1.0, "bg")
+    }/* end parts */
+    programs {
+        program {
+            name: "init";
+            signal: "load";
+            source: "";
+            script {
+                SCRIPT_CUSTOM_PART(bg);
+                SCRIPT_CUSTOM_PART(border.bg);
+            }
+        } /* end program */
+        program
+        {
+            name:    "black_theme";
+            signal:  "black";
+            source:  "elm";
+            script {
+                SCRIPT_SET_COLOR(bg, 0, 0, 0, 255);
+                SCRIPT_SET_COLOR(border.bg, 255, 255, 255, 255);
+            }
+        }
+        program
+        {
+            name:    "white_theme";
+            signal:  "white";
+            source:  "elm";
+            script {
+                SCRIPT_SET_COLOR(bg, 255, 255, 255, 255);
+                SCRIPT_SET_COLOR(border.bg, 0, 0, 0, 255);
+            }
+        }
+    }/* end programs */
+}/* end group */
+
+group{
+    name: "pencil_size_selector";
+    parts{
+        PART_BG("bg")
+        PART_SWALLOW("bg.color", "bg")
+        PART_RECT("rect.up", 0.0, 0.0, "bg", 1.0, 0.5, "bg")
+        PART_PIXEL_RECT("pencil.bg", 300, 0, 0.5, 0.5, "rect.up", 0.5, 0.5)
+        PART_SWALLOW("elm.swallow.pencil", "pencil.bg")
+        PART_EVENT_RECT("event", "rect.up")
+        PART_SWALLOW_REL("elm.swallow.selector", 5/480, 0.5, "bg", (480-5)/480, 1.0, "bg")
+    }/* end parts */
+}/* end group */
+
+group{
+    name: "font_size_selector";
+    parts{
+        PART_BG("bg")
+        PART_SWALLOW("bg.color", "bg")
+        PART_RECT("rect.up", 0.0, 0.0, "bg", 1.0, 0.5, "bg")
+        PART_SWALLOW("elm.swallow.label", "rect.up")
+        PART_EVENT_RECT("event", "rect.up")
+        PART_SWALLOW_REL("elm.swallow.selector", 5/480, 0.5, "bg", (480-5)/480, 1.0, "bg")
+    }/* end parts */
+}/* end group */
+
+group{
+    name: "edit_toolbar";
+    parts{
+        PART_BG("bg") /* 720 x 86 */
+        PART_COLOR_RECT("color", "bg", 204, 204, 204, 255)
+        PART_SWALLOW_REL("elm.swallow.btn1", (10)/720, 10/86, "bg", (10+74)/720, (86-10)/86, "bg")
+        PART_SWALLOW_REL("elm.swallow.btn2", (10+16+74)/720, 10/86, "bg", (10+16+74*2)/720, (86-10)/86, "bg")
+        PART_SWALLOW_REL("elm.swallow.btn3", (10+16*2+74*2)/720, 10/86, "bg", (10+16*2+74*3)/720, (86-10)/86, "bg")
+        PART_SWALLOW_REL("elm.swallow.btn4", (720-10-160)/720, 10/86, "bg", (720-10)/720, (86-10)/86, "bg")
+        PART_V_PIXEL_RECT("bottom_margin", 1, "bg", 1.0, 0.0)
+        PART_COLOR_RECT("bottom_margin_color", "bottom_margin", 204, 204, 204, 255)
+    }/* end parts */
+}/* end group */
diff --git a/edc/gl_edit_list.edc b/edc/gl_edit_list.edc
new file mode 100644 (file)
index 0000000..f213da7
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 EDIT_GL_STYLE(iStyle, iX2TextBlock) \
+group { name: "elm/genlist/item/memo/edit/"iStyle"/default"; \
+    alias: "elm/genlist/item_odd/memo/edit/"iStyle"/default"; \
+    data.item: "stacking" "above"; \
+    data.item: "selectraise" "on"; \
+    data.item: "texts" "elm.text elm.text.date"; \
+    data.item: "contents" "elm.swallow.doodle elm.swallow.check"; \
+    data.item: "treesize" "20"; \
+    parts { \
+        PART_BG("bg") \
+        PART_SWALLOW_REL("elm.swallow.check", 16/720, 16/128, "bg", (16+96)/720, (128-16)/128, "bg") \
+        part \
+        { \
+            name: "elm.text"; \
+            type: TEXTBLOCK; \
+            mouse_events: 1; \
+            scale: 1; \
+            description \
+            { \
+                state: "default" 0.0; \
+                fixed: 1 0; \
+                min: (iX2TextBlock-16-96-16) 56; \
+                max: (iX2TextBlock-16-96-16) 56; \
+                align: 0 0; \
+                rel1 { relative: (16+96+16)/720 16/128; to: "bg"; } \
+                rel2 { relative: iX2TextBlock/720 (128-16-32-8)/128; to: "bg"; } \
+                text \
+                { \
+                    style: "textblock_style_main"; \
+                    min: 1 1; \
+                } \
+            } \
+        } \
+        PART_TEXT_DATE("elm.text.date", (16+96+16)/720, (128-16-32)/128, "bg", (720-16)/720, (128-16)/128, "bg", "", "SLP:style=Medium", "slp_medium", 32) \
+        PART_SWALLOW_REL("elm.swallow.doodle", (720-16-96)/720, 16/128, "bg", (720-16)/720, (128-16)/128, "bg") \
+        GENLIST_PART_BOTTOM_LINE \
+        PART_EVENT_RECT("event", "bg") \
+    }/* end parts */ \
+    programs {\
+        program {\
+            name: "init";\
+            signal: "load";\
+            source: "";\
+            script {\
+                SCRIPT_CUSTOM_PART(bg);\
+                SCRIPT_SET_COLOR(bg, 249, 249, 249, 255);\
+            }\
+        } /* end program */\
+        program \
+        {\
+            name:    "go_active"; \
+            signal:  "elm,state,selected"; \
+            source:  "elm"; \
+            script {\
+                SCRIPT_SET_COLOR(bg, 42, 137, 194, 255);\
+            }\
+            transition: LINEAR 0.1; \
+        } \
+        program \
+        { \
+            name:    "go_passive"; \
+            signal:  "elm,state,unselected"; \
+            source:  "elm"; \
+            script {\
+                SCRIPT_SET_COLOR(bg, 249, 249, 249, 255);\
+            }\
+            transition: LINEAR 0.1; \
+        }\
+    }\
+}
+
+EDIT_GL_STYLE("list", (720-16))
+EDIT_GL_STYLE("list_draw", (720-16-96-16))
diff --git a/edc/selector.edc b/edc/selector.edc
new file mode 100644 (file)
index 0000000..4fe5393
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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: "selector_frame";
+    parts{
+    PART_BG("bg")
+    PART_V_PIXEL_RECT("top_margin_bg", 15, "bg", 0.0, 0.0)
+    PART_V_PIXEL_RECT("bottom_margin_bg", 0, "bg", 1.0, 1.0)
+    PART_RECT("_bg", 0.0, 1.0, "top_margin_bg", 1.0, 0.0, "bottom_margin_bg")
+    PART_SWALLOW_REL("elm.swallow.content", 0.0, 0.0, "_bg", 1.0, 1.0, "_bg")
+    }/* end parts */
+}/* end group */
diff --git a/edc/text_editor.edc b/edc/text_editor.edc
new file mode 100644 (file)
index 0000000..f79d584
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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: "text_editor";
+    parts{
+        PART_BG_EX("bg", 720, 0) /* 720 * unknown */
+        PART_V_PIXEL_RECT("top_margin", 16, "bg", 0.0, 0.0)
+        PART_V_PIXEL_RECT("text.bg", 48, "top_margin", 1.0, 0.0)
+        PART_V_PIXEL_RECT("top_margin2", 10, "text.bg", 1.0, 0.0)
+        PART_V_PIXEL_RECT("toolbar.bg", 86, "tool.bg", 0.0, 1.0)
+        PART_V_PIXEL_RECT("tool.bg", 0, "bg", 1.0, 1.0)
+        /* content */
+        PART_TEXT_GRAY_RIGHT("elm.text.date", 16/720, 0.0, "text.bg", (720-16)/720, 1.0, "text.bg", "date", "SLP:style=Medium", "slp_medium", 32)
+        PART_SWALLOW_REL("elm.swallow.text", 16/720, 1.0, "top_margin2", (720-16)/720, 0.0, "toolbar.bg")
+        PART_SWALLOW("elm.swallow.toolbar", "toolbar.bg")
+        PART_SWALLOW("elm.swallow.tool", "tool.bg")
+    }/* end part */
+    programs {
+        program {
+            name: "init";
+            signal: "load";
+            source: "";
+            script {
+                SCRIPT_CUSTOM_PART("tool.bg");
+                SCRIPT_CUSTOM_PART("elm.swallow.text");
+            }
+        } /* end program */
+
+        program {
+            name:   "abbrev";
+            signal: "abbrev";
+            source: "elm";
+            script {
+                 set_state_val(PART:"tool.bg", STATE_MIN, 0, IMF_HEIGHT);
+           }
+        } /* end program */
+        program {
+            name:   "expand";
+            signal: "expand";
+            source: "elm";
+            script {
+                 set_state_val(PART:"tool.bg", STATE_MIN, 0, 0);
+           }
+        } /* end program */
+    }/* end programs */
+}
diff --git a/extend/extended-edc.h b/extend/extended-edc.h
new file mode 100644 (file)
index 0000000..1dbe9d9
--- /dev/null
@@ -0,0 +1,362 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 __EXTENDED_EDC_H__
+#define __EXTENDED_EDC_H__
+
+#define PPART PART:
+#define PIMAGE IMAGE:
+
+/***********************************************************************/
+/* size difinition layer */
+#define PART_BG(iName)\
+part {\
+       name: iName;\
+       type: RECT;\
+       mouse_events: 0;\
+       scale: 1;\
+       description {\
+               state: "default" 0.0;\
+               color: 0 0 0 0;\
+       } \
+} \
+
+#define PART_BG_EX(iName, iMinx, iMiny)\
+part {\
+       name: iName;\
+       type: RECT;\
+       mouse_events: 0;\
+       scale: 1;\
+       description {\
+               state: "default" 0.0;\
+               min: iMinx iMiny;\
+               color: 0 0 0 0;\
+       } \
+} \
+
+#define PART_RECT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
+part {\
+       name: iName;\
+       type: RECT;\
+       mouse_events: 0;\
+       scale: 1;\
+       description {\
+               state: "default" 0.0;\
+               rel1 { relative: iR1x iR1y; to: iR1t; } \
+               rel2 { relative: iR2x iR2y; to: iR2t; } \
+               color: 0 0 0 0;\
+       } \
+} \
+
+#define PART_V_PIXEL_RECT(iName, size, iTo, iRy, iAy)\
+part {\
+       name: iName;\
+       type: RECT;\
+       mouse_events: 0;\
+       scale: 1;\
+       description {\
+               state: "default" 0.0;\
+               min: 0 size;\
+               align: 0.5 iAy;\
+               fixed: 0 1;\
+               rel1 { relative: 0.0 iRy; to: iTo; } \
+               rel2 { relative: 1.0 iRy; to: iTo; } \
+               color: 0 0 0 0;\
+       } \
+} \
+
+#define PART_H_PIXEL_RECT(iName, size, iTo, iRx, iAx)\
+part {\
+       name: iName;\
+       type: RECT;\
+       mouse_events: 0;\
+       scale: 1;\
+       description {\
+               state: "default" 0.0;\
+               min: size 0;\
+               align: iAx 0.5;\
+               fixed: 1 0;\
+               rel1 { relative: iRx 0.0; to: iTo; } \
+               rel2 { relative: iRx 1.0; to: iTo; } \
+               color: 0 0 0 0;\
+       } \
+} \
+
+#define PART_PIXEL_RECT(iName, iX, iY, iRx, iRy, iTo, iAx, iAy)\
+part {\
+       name: iName;\
+       type: RECT;\
+       mouse_events: 0;\
+       scale: 1;\
+       description {\
+               state: "default" 0.0;\
+               min: iX iY;\
+               align: iAx iAy;\
+               fixed: 1 1;\
+               rel1 { relative: iRx iRy; to: iTo; } \
+               rel2 { relative: iRx iRy; to: iTo; } \
+               color: 0 0 0 0;\
+       } \
+} \
+
+
+/* vertical divided rect, index range from 0~N-1
+ * iIndex must be immediate integer and expression like (1+2) is not allowed
+ */
+#define PART_V_DIVID_RECT(iName, iTo, iIndex, iN)\
+part {\
+       name: iName;\
+       type: RECT;\
+       mouse_events: 0;\
+       scale: 1;\
+       description {\
+               state: "default" 0.0;\
+               rel1 { relative: 0.0 (iIndex%iN)/iN; to: iTo; } \
+               rel2 { relative: 1.0 (iIndex%iN+1)/iN; to: iTo; } \
+               color: 0 0 0 0;\
+       } \
+} \
+
+/* horizontal divided rect, index range from 0~N-1
+ * iIndex must be immediate integer and expression like (1+2) is not allowed
+ */
+#define PART_H_DIVID_RECT(iName, iTo, iIndex, iN)\
+part {\
+       name: iName;\
+       type: RECT;\
+       mouse_events: 0;\
+       scale: 1;\
+       description {\
+               state: "default" 0.0;\
+               rel1 { relative: (iIndex%iN)/iN 0.0; to: iTo; } \
+               rel2 { relative: (iIndex%iN+1)/iN 1.0; to: iTo; } \
+               color: 0 0 0 0;\
+       } \
+} \
+
+#define PART_CLIPPER_RECT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
+part {\
+       name: iName;\
+       type: RECT;\
+       mouse_events: 0;\
+       scale: 1;\
+       description {\
+               state: "default" 0.0;\
+               rel1 { relative: iR1x iR1y; to: iR1t; } \
+               rel2 { relative: iR2x iR2y; to: iR2t; } \
+               color: 255 255 255 255;\
+       } \
+} \
+
+/***********************************************************************/
+/* mouse event filter layer */
+#define PART_EVENT_RECT(iName, iTo)\
+part {\
+       name: iName;\
+       type: RECT;\
+       mouse_events: 1;\
+       scale: 1;\
+       description {\
+               state: "default" 0.0;\
+               rel1 { relative: 0.0 0.0; to: iTo; } \
+               rel2 { relative: 1.0 1.0; to: iTo; } \
+               color: 0 0 0 0;\
+       } \
+} \
+
+/***********************************************************************/
+/* content layer */
+#define PART_COLOR_RECT(iName, iTo, iCr, iCg, iCb, iCa)\
+part {\
+       name: iName;\
+       type: RECT;\
+       mouse_events: 0;\
+       scale: 1;\
+       description {\
+               state: "default" 0.0;\
+               rel1 { relative: 0.0 0.0; to: iTo; } \
+               rel2 { relative: 1.0 1.0; to: iTo; } \
+               color: iCr iCg iCb iCa;\
+       } \
+} \
+
+#define PART_COLOR_RECT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, iCr, iCg, iCb, iCa)\
+part {\
+       name: iName;\
+       type: RECT;\
+       mouse_events: 0;\
+       scale: 1;\
+       description {\
+               state: "default" 0.0;\
+               rel1 { relative: iR1x iR1y; to: iR1t; } \
+               rel2 { relative: iR2x iR2y; to: iR2t; } \
+               color: iCr iCg iCb iCa;\
+       } \
+} \
+
+#define PART_IMAGE(iName, iTo, iImage)\
+part {\
+       name: iName;\
+       type: IMAGE;\
+       mouse_events: 0;\
+       scale: 1;\
+       description {\
+               state: "default" 0.0;\
+               rel1 { relative: 0.0 0.0; to: iTo; } \
+               rel2 { relative: 1.0 1.0; to: iTo; } \
+               image.normal : iImage;\
+       } \
+} \
+
+#define PART_IMAGE_REL(iName, iImage, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
+PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
+PART_IMAGE(iName, "_"iName, iImage)\
+
+#define PART_BORDER_IMAGE(iName, iTo, iImage, iBl, iBr, iBt, iBb)\
+part {\
+       name: iName;\
+       type: IMAGE;\
+       mouse_events: 0;\
+       scale: 1;\
+       description {\
+               state: "default" 0.0;\
+               rel1 { relative: 0.0 0.0; to: iTo; } \
+               rel2 { relative: 1.0 1.0; to: iTo; } \
+               image.normal : iImage;\
+               image.border : iBl iBr iBt iBb;\
+       } \
+} \
+
+#define PART_SWALLOW(iName, iTo)\
+part {\
+       name: iName;\
+       type: SWALLOW;\
+       mouse_events: 1;\
+       scale: 1;\
+       description {\
+               state: "default" 0.0;\
+               rel1 { relative: 0.0 0.0; to: iTo; } \
+               rel2 { relative: 1.0 1.0; to: iTo; } \
+       } \
+} \
+
+#define PART_SWALLOW_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
+PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
+PART_SWALLOW(iName, "_"iName)\
+
+#define PART_UNVISIBLE_SWALLOW(iName, iTo)\
+part {\
+       name: iName;\
+       type: SWALLOW;\
+       mouse_events: 1;\
+       scale: 1;\
+       description {\
+               state: "default" 0.0;\
+               visible: 0;\
+               rel1 { relative: 0.0 0.0; to: iTo; } \
+               rel2 { relative: 1.0 1.0; to: iTo; } \
+       } \
+} \
+
+#define PART_UNVISIBLE_SWALLOW_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
+PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
+PART_UNVISIBLE_SWALLOW(iName, "_"iName)\
+
+#define PART_CLIPPED_SWALLOW(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t,\
+               iAx, iAy, iCliper)\
+part {\
+       name: iName;\
+       type: SWALLOW;\
+       mouse_events: 0;\
+       scale: 1;\
+       clip_to: iCliper;\
+       description {\
+               state: "default" 0.0;\
+               align: iAx iAy;\
+               fixed: 1 1;\
+               rel1 { relative: iR1x iR1y; to: iR1t; } \
+               rel2 { relative: iR2x iR2y; to: iR2t; } \
+       } \
+} \
+
+#define PART_TEXT(iName, iTo, iText, iFont, iClass, iSize,\
+               iAx, iAy, iCr, iCg, iCb, iCa)\
+part {\
+       name: iName;\
+       type: TEXT;\
+       mouse_events: 0;\
+       scale: 1;\
+       description {\
+               state: "default" 0.0;\
+               rel1 { relative: 0.0 0.0; to: iTo; } \
+               rel2 { relative: 1.0 1.0; to: iTo; } \
+               color: iCr iCg iCb iCa;\
+               text {\
+                       text: iText;\
+                       font: iFont;\
+                       text_class: iClass;\
+                       size: iSize;\
+                       align: iAx iAy;\
+               } \
+       } \
+} \
+
+#define PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t,\
+               iText, iFont, iClass, iSize, iAx, iAy, iCr, iCg, iCb, iCa)\
+PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
+PART_TEXT(iName, "_"iName, iText, iFont, iClass, iSize, iAx, iAy, iCr, iCg, iCb, iCa)\
+
+/***********************************************************************/
+/* script */
+/* ugh!!!, iPart, iR1t, iR2t and iV of SCRIPT_SET_IMAGE should not be quoted with "" */
+#define SCRIPT_CUSTOM_PART(iPart)\
+custom_state(PPART#iPart, "default", 0.0);\
+set_state(PPART#iPart, "custom", 0.0)
+
+/* pay attention, rel paramater can only be float, script will not do evaluation of mathematics expression
+       eg. 10/100 is illegal, 0.1 is correct */
+#define SCRIPT_SET_REL(iPart, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
+set_state_val(PPART#iPart, STATE_REL1, iR1x, iR1y);\
+set_state_val(PPART#iPart, STATE_REL1_TO, PPART#iR1t, PPART#iR1t);\
+set_state_val(PPART#iPart, STATE_REL2, iR2x, iR2y);\
+set_state_val(PPART#iPart, STATE_REL2_TO, PPART#iR2t, PPART#iR2t)\
+
+#define SCRIPT_SET_VISIBLE(iPart, iV)\
+set_state_val(PPART#iPart, STATE_VISIBLE, iV)
+
+#define SCRIPT_SET_IMAGE(iPart, iV)\
+set_state_val(PPART#iPart, STATE_IMAGE, PIMAGE#iV)
+
+#define SCRIPT_SET_COLOR(iPart, iCr, iCg, iCb, iCa)\
+set_state_val(PPART#iPart, STATE_COLOR, iCr, iCg, iCb, iCa)
+
+
+/***********************************************************************/
+/* program */
+/* ugh!!! isignal, isource, iPart should not quoted with ""  */
+#define PROGRAM_SET_VISIBLE(isignal, isource, iPart, iV)\
+program {\
+       name: #isource#isignal;\
+       source: #isource;\
+       signal: #isignal;\
+       script {\
+               SCRIPT_SET_VISIBLE(iPart, iV);\
+       } \
+} \
+
+#endif                         /* __EXTENDED_EDC_H__ */
diff --git a/extend/extended-elm.c b/extend/extended-elm.c
new file mode 100644 (file)
index 0000000..376900c
--- /dev/null
@@ -0,0 +1,438 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 <extended-elm.h>
+
+/**
+ * elm_scroller_create
+ *
+ * @brief This function is an encapsulated vesion of elm_scroller_add
+ *
+ * @param   [in] parent The parent object
+ *
+ * @return       Return pointer to elm object (Success) or NULL (Failed)
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+Evas_Object *elm_scroller_create(Evas_Object *parent)
+{
+    Evas_Object *sc;
+    sc = elm_scroller_add(parent);
+    elm_scroller_bounce_set(sc, EINA_FALSE, EINA_TRUE);
+    elm_scroller_policy_set(sc, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
+    evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(sc, EVAS_HINT_FILL, EVAS_HINT_FILL);
+    evas_object_show(sc);
+    return sc;
+}
+
+/**
+ * elm_layout_create
+ *
+ * @brief This function is an encapsulated vesion of elm_layout_add
+ *
+ * @param   [in] parent The parent object
+ *
+ * @param   [in] file The path to file (edj) that will be used as layout
+ *
+ * @param   [in] group The group that the layout belongs in edje file
+ *
+ * @return       Return pointer to elm object (Success) or NULL (Failed)
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+Evas_Object *elm_layout_create(Evas_Object *parent, const char *file, const char *group)
+{
+    Evas_Object *ly;
+    ly = elm_layout_add(parent);
+    if (elm_layout_file_set(ly, file, group)) {
+        evas_object_size_hint_align_set(ly, EVAS_HINT_FILL, 0);
+        evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, 0);
+        evas_object_show(ly);
+    } else {
+        evas_object_del(ly);
+        ly = NULL;
+    }
+    return ly;
+}
+
+/**
+ * elm_label_create
+ *
+ * @brief This function is an encapsulated vesion of elm_label_add
+ *
+ * @param   [in] parent The parent object
+ *
+ * @param   [in] text The label will be used on the object
+ *
+ * @return       Return pointer to elm object (Success) or NULL (Failed)
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+Evas_Object *elm_label_create(Evas_Object *parent, const char *text)
+{
+    Evas_Object *label;
+    label = elm_label_add(parent);
+    elm_label_line_wrap_set(label, ELM_WRAP_CHAR);
+    elm_object_text_set(label, text);
+    evas_object_size_hint_align_set(label, EVAS_HINT_FILL, 0);
+    evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, 0);
+    evas_object_show(label);
+    return label;
+}
+
+/**
+ * elm_check_create
+ *
+ * @brief This function is an encapsulated vesion of elm_check_add
+ *
+ * @param   [in] parent The parent object
+ *
+ * @return       Return pointer to elm object (Success) or NULL (Failed)
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+Evas_Object *elm_check_create(Evas_Object *parent)
+{
+    Evas_Object *check;
+    check = elm_check_add(parent);
+    evas_object_size_hint_align_set(check, EVAS_HINT_FILL, 0);
+    evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, 0);
+    evas_object_show(check);
+    return check;
+}
+
+/**
+ * elm_button_create
+ *
+ * @brief This function is an encapsulated vesion of elm_button_add
+ *
+ * @param   [in] parent The parent object
+ *
+ * @param   [in] text The label will be used on the object
+ *
+ * @param   [in] click_cb The callback function when clicked
+ *
+ * @param   [in] data User data to be passed to the callback function
+ *
+ * @return       Return pointer to elm object (Success) or NULL (Failed)
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+Evas_Object *elm_button_create(Evas_Object *parent, const char *text, Evas_Smart_Cb click_cb,
+                   void *data)
+{
+    Evas_Object *btn;
+    btn = elm_button_add(parent);
+    elm_object_text_set(btn, text);
+    evas_object_smart_callback_add(btn, "clicked", click_cb, data);
+    evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, 0);
+    evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, 0);
+    evas_object_show(btn);
+    return btn;
+}
+
+/**
+ * elm_entry_create
+ *
+ * @brief This function is an encapsulated vesion of elm_entry_add
+ *
+ * @param   [in] parent The parent object
+ *
+ * @param   [in] text The label will be used on the object
+ *
+ * @return       Return pointer to elm object (Success) or NULL (Failed)
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+Evas_Object *elm_entry_create(Evas_Object *parent, const char *text)
+{
+    Evas_Object *entry;
+    entry = elm_entry_add(parent);
+    elm_entry_entry_set(entry, text);
+    evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, 0);
+    evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, 0);
+    elm_entry_input_panel_enabled_set(entry, EINA_FALSE);
+    elm_entry_cnp_mode_set(entry, ELM_CNP_MODE_PLAINTEXT);
+    evas_object_show(entry);
+    return entry;
+}
+
+/**
+ * elm_icon_create
+ *
+ * @brief This function is an encapsulated vesion of elm_icon_add
+ *
+ * @param   [in] parent The parent object
+ *
+ * @param   [in] file The path of icon file
+ *
+ * @return       Return pointer to elm object (Success) or NULL (Failed)
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+Evas_Object *elm_icon_create(Evas_Object *parent, const char *file)
+{
+    Evas_Object *ic;
+    ic = elm_icon_add(parent);
+    elm_icon_file_set(ic, file, NULL);
+    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+    elm_icon_resizable_set(ic, 1, 1);
+    evas_object_show(ic);
+    return ic;
+}
+
+/**
+ * elm_navigator_btn_create
+ *
+ * @brief This function is an encapsulated vesion of elm_icon_add
+ *
+ * @param   [in] parent The parent object
+ *
+ * @param   [in] text The label will be used on the object
+ *
+ * @param   [in] icon_path The icon will be displayed on the object
+ *
+ * @param   [in] style "navigationbar_control/left(center|right)"
+ *
+ * @param   [in] click_cb The callback function when clicked
+ *
+ * @param   [in] data User data to be passed to the callback function
+ *
+ * @return       Return pointer to elm object (Success) or NULL (Failed)
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+Evas_Object *elm_navigator_btn_create(Evas_Object *parent, const char *text,
+                      const char *icon_path, const char *style,
+                      Evas_Smart_Cb click_cb, void *data)
+{
+    Evas_Object *btn = NULL;
+
+    btn = elm_button_create(parent, text, click_cb, data);
+    elm_object_style_set(btn, "naviframe/title/default");
+    return btn;
+}
+
+/**
+ * elm_swallowed_scroller
+ *
+ * @brief This function is an encapsulated vesion of elm_scroller_add
+ *
+ * @param   [in] parent The parent object
+ *
+ * @param   [in] part The swallow part name in the parent layout obj
+ *
+ * @return       Return pointer to elm object (Success) or NULL (Failed)
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+Evas_Object *elm_swallowed_scroller(Evas_Object *parent, const char *part)
+{
+    Evas_Object *eo = elm_scroller_create(parent);
+    elm_object_part_content_set(parent, part, eo);
+    return eo;
+}
+
+/**
+ * elm_swallowed_layout
+ *
+ * @brief This function is an encapsulated vesion of elm_layout_add
+ *
+ * @param   [in] parent The parent object
+ *
+ * @param   [in] part The swallow part name in the parent layout obj
+ *
+ * @param   [in] file The path to file (edj) that will be used as layout
+ *
+ * @param   [in] group The group that the layout belongs in edje file
+ *
+ * @return       Return pointer to elm object (Success) or NULL (Failed)
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+Evas_Object *elm_swallowed_layout(Evas_Object *parent, const char *part, const char *file,
+                  const char *group)
+{
+    Evas_Object *eo = elm_layout_create(parent, file, group);
+    elm_object_part_content_set(parent, part, eo);
+    return eo;
+}
+
+/**
+ * elm_swallowed_button
+ *
+ * @brief This function is an encapsulated vesion of elm_button_add
+ *
+ * @param   [in] parent The parent object
+ *
+ * @param   [in] part The swallow part name in the parent layout obj
+ *
+ * @param   [in] text The label will be used on the object
+ *
+ * @param   [in] click_cb The callback function when clicked
+ *
+ * @param   [in] data User data to be passed to the callback function
+ *
+ * @return       Return pointer to elm object (Success) or NULL (Failed)
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+Evas_Object *elm_swallowed_button(Evas_Object *parent, const char *part, const char *text,
+                  Evas_Smart_Cb click_cb, void *data)
+{
+    Evas_Object *eo = elm_button_create(parent, text, click_cb, data);
+    elm_object_part_content_set(parent, part, eo);
+    return eo;
+}
+
+/**
+ * elm_swallowed_entry
+ *
+ * @brief This function is an encapsulated vesion of elm_entry_add
+ *
+ * @param   [in] parent The parent object
+ *
+ * @param   [in] part The swallow part name in the parent layout obj
+ *
+ * @param   [in] text The label will be used on the object
+ *
+ * @return       Return pointer to elm object (Success) or NULL (Failed)
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+Evas_Object *elm_swallowed_entry(Evas_Object *parent, const char *part, const char *text)
+{
+    Evas_Object *eo = elm_entry_create(parent, text);
+    elm_object_part_content_set(parent, part, eo);
+    return eo;
+}
+
+/**
+ * elm_swallowed_icon
+ *
+ * @brief This function is an encapsulated vesion of elm_icon_add
+ *
+ * @param   [in] parent The parent object
+ *
+ * @param   [in] part The swallow part name in the parent layout obj
+ *
+ * @param   [in] file The path of icon file
+ *
+ * @return       Return pointer to elm object (Success) or NULL (Failed)
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+Evas_Object *elm_swallowed_icon(Evas_Object *parent, const char *part, const char *file)
+{
+    Evas_Object *eo = elm_icon_create(parent, file);
+    elm_object_part_content_set(parent, part, eo);
+    return eo;
+}
+
+/**
+ * elm_layout_content_del
+ *
+ * @brief Destroy object from layout
+ *
+ * @param   [in] parent The parent object
+ *
+ * @param   [in] part The name of swallowed part in the parent layout obj
+ *
+ * @return       None
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+void elm_layout_content_del(Evas_Object *parent, const char *part)
+{
+    Evas_Object *eo = elm_object_part_content_unset(parent, part);
+    if (eo != NULL) {
+        evas_object_del(eo);
+    }
+}
+
diff --git a/extend/extended-elm.h b/extend/extended-elm.h
new file mode 100644 (file)
index 0000000..4e007c0
--- /dev/null
@@ -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://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 __EXTENDED_ELM_H__
+#define __EXTENDED_ELM_H__
+
+#include <Elementary.h>
+
+Evas_Object *elm_scroller_create(Evas_Object *parent);
+Evas_Object *elm_layout_create(Evas_Object *parent, const char *file, const char *group);
+Evas_Object *elm_label_create(Evas_Object *parent, const char *text);
+Evas_Object *elm_check_create(Evas_Object *parent);
+Evas_Object *elm_button_create(Evas_Object *parent, const char *text, Evas_Smart_Cb click_cb,
+                   void *data);
+Evas_Object *elm_entry_create(Evas_Object *parent, const char *text);
+Evas_Object *elm_icon_create(Evas_Object *parent, const char *file);
+Evas_Object *elm_navigator_btn_create(Evas_Object *parent, const char *text,
+                      const char *icon_path, const char *style,
+                      Evas_Smart_Cb click_cb, void *data);
+Evas_Object *elm_swallowed_scroller(Evas_Object *parent, const char *part);
+Evas_Object *elm_swallowed_layout(Evas_Object *parent, const char *part, const char *file,
+                  const char *group);
+Evas_Object *elm_swallowed_button(Evas_Object *parent, const char *part, const char *text,
+                  Evas_Smart_Cb click_cb, void *data);
+Evas_Object *elm_swallowed_entry(Evas_Object *parent, const char *part, const char *text);
+Evas_Object *elm_swallowed_icon(Evas_Object *parent, const char *part, const char *file);
+void elm_layout_content_del(Evas_Object *parent, const char *part);
+
+#endif                /* __EXTENDED_ELM_H__ */
diff --git a/extend/gravel.h b/extend/gravel.h
new file mode 100644 (file)
index 0000000..2861045
--- /dev/null
@@ -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://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 __GRAVEL_H__
+#define __GRAVEL_H__
+
+#include <dlog.h>
+
+/* use prefix 'P' means print */
+#define PTAG LOGD("[%s : %d]\n", __FILE__, __LINE__)
+#define PLOG(fmt, arg...) LOGD(" ## "fmt, ##arg)
+#define PFUNC_ENTER LOGD("ENTER : %s\n", __func__)
+#define PFUNC_LEAVE LOGD("LEAVE : %s\n", __func__)
+
+#define ARRAY_SIZE(array) \
+       ((int)(sizeof(array) / sizeof(array[0])))
+
+#define STR_EQUAL(str1, str2) \
+       (strcmp(str1, str2) == 0)
+
+#define SSTRLEN(str)\
+       (str == NULL ? 0 : strlen(str))\
+
+#define sncat(to, size, from) \
+       strncat(to, from, size-strlen(to)-1)
+
+#define sncatprintf(s, size, fmt, args...) \
+       snprintf(s+strlen(s), size-strlen(s), fmt, ##args)
+
+#define SMALLOC(Type)\
+       (Type *)calloc(1, sizeof(Type))\
+
+#define SFREE(var)\
+       if (var != NULL) {\
+               free(var);\
+               var = NULL;\
+       } \
+
+#define RETIF(condition)\
+       if (condition) return
+
+#define RETVIF(condition, val)\
+       if (condition) return val
+
+#endif                         /* __GRAVEL_H__ */
diff --git a/extend/supplement.c b/extend/supplement.c
new file mode 100644 (file)
index 0000000..f0e15e1
--- /dev/null
@@ -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://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 <dlog.h>
+#include <gravel.h>
+#include <supplement.h>
+
+static bool _service_iterate_dump_cb(service_h service, const char *key, void *user_data)
+{
+    LOGD("%s -> %s\n", key, user_data);
+    return 0;
+}
+
+void service_dump(service_h service)
+{
+    if (service != NULL) {
+        service_foreach_extra_data(service, _service_iterate_dump_cb, NULL);
+    }
+}
+
+Eina_Bool service_key_check(service_h service, const char *key, const char *val)
+{
+       char *str = NULL;
+       service_get_extra_data(service, key, &str);
+       if (str != NULL) {
+               if (strcmp(str, val) == 0) {
+                       SFREE(str);
+                       return EINA_TRUE;
+               }
+               SFREE(str);
+       }
+       return EINA_FALSE;
+}
+
+void evas_object_geometry_dump(Evas_Object *eo)
+{
+    Evas_Coord x, y, w, h;
+    evas_object_geometry_get(eo, &x, &y, &w, &h);
+    LOGD("[evas_object_geometry_dump] geometry of %x : %d %d %d %d\n", eo, x, y, w, h);
+}
+
+void evas_object_event_hit(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+    LOGD("[%s] %x : %s\n", __func__, obj, (char *)data);
+}
+
+void evas_object_smart_event_hit(void *data, Evas_Object *obj, void *event_info)
+{
+    LOGD("[%s] %x : %s\n", __func__, obj, (char *)data);
+}
+
+typedef struct __rf_data_t {
+    Evas_Smart_Cb cb;
+    void *data;
+}rf_data_t;
+
+static void _render_flush_post_cb(void *data, Evas *e, void *event_info)
+{
+    rf_data_t *rf = (rf_data_t *)data;
+    rf->cb(rf->data, NULL, NULL);
+    evas_event_callback_del(e, EVAS_CALLBACK_RENDER_FLUSH_POST, _render_flush_post_cb);
+    SFREE(rf);
+}
+
+void evas_object_render_flush_hook(Evas_Object *obj, Evas_Smart_Cb cb, void *data)
+{
+    RETIF(obj==NULL);
+    Evas *e = evas_object_evas_get(obj);
+    rf_data_t *rf = SMALLOC(rf_data_t);
+    RETIF(rf==NULL);
+    rf->cb = cb;
+    rf->data = data;
+    evas_event_callback_add(e, EVAS_CALLBACK_RENDER_FLUSH_POST, _render_flush_post_cb, rf);
+}
+
diff --git a/extend/supplement.h b/extend/supplement.h
new file mode 100644 (file)
index 0000000..0d266c8
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 __SUPPLEMENT_H__
+#define __SUPPLEMENT_H__
+
+#include <Elementary.h>
+#include <bundle.h>
+#include <ui-gadget.h>
+
+/* extended type definition */
+typedef struct ui_gadget ui_gadget_t;
+typedef struct ug_cbs ug_cbs_t;
+
+/* extended macroes */
+#define evas_object_single_event_dump(obj, event) \
+    evas_object_event_callback_add(obj, event, evas_object_event_hit, #obj"\t"#event)
+
+#define evas_object_events_dump(obj) \
+do { \
+    evas_object_single_event_dump(obj, EVAS_CALLBACK_MOVE); \
+    evas_object_single_event_dump(obj, EVAS_CALLBACK_RESIZE); \
+    evas_object_single_event_dump(obj, EVAS_CALLBACK_MOUSE_DOWN); \
+    evas_object_single_event_dump(obj, EVAS_CALLBACK_HOLD); \
+    evas_object_single_event_dump(obj, EVAS_CALLBACK_MOUSE_UP); \
+    evas_object_single_event_dump(obj, EVAS_CALLBACK_DEL); \
+    evas_object_single_event_dump(obj, EVAS_CALLBACK_FREE); \
+} while (0)
+
+/* dump specified event of smart object */
+#define evas_object_smart_event_dump(obj, event) \
+    evas_object_smart_callback_add(obj, event, evas_object_smart_event_hit, #obj "\t" event);
+
+/* extended functions */
+void service_dump(service_h service);
+Eina_Bool service_key_check(service_h service, const char *key, const char *val);
+void evas_object_geometry_dump(Evas_Object *eo);
+void evas_object_event_hit(void *data, Evas *e, Evas_Object *obj, void *event_info);
+void evas_object_smart_event_hit(void *data, Evas_Object *obj, void *event_info);
+void evas_object_render_flush_hook(Evas_Object *obj, Evas_Smart_Cb cb, void *data);
+void elm_widget_on_focus_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data);
+
+#endif                /* __SUPPLEMENT_H__ */
diff --git a/images/00_button_02_normal.png b/images/00_button_02_normal.png
new file mode 100644 (file)
index 0000000..f29c31e
Binary files /dev/null and b/images/00_button_02_normal.png differ
diff --git a/images/00_search_input_field_bg.png b/images/00_search_input_field_bg.png
new file mode 100644 (file)
index 0000000..cc89625
Binary files /dev/null and b/images/00_search_input_field_bg.png differ
diff --git a/images/01_controlbar_icon_delete.png b/images/01_controlbar_icon_delete.png
new file mode 100644 (file)
index 0000000..f02f45c
Binary files /dev/null and b/images/01_controlbar_icon_delete.png differ
diff --git a/images/01_controlbar_icon_edit.png b/images/01_controlbar_icon_edit.png
new file mode 100644 (file)
index 0000000..8a9a346
Binary files /dev/null and b/images/01_controlbar_icon_edit.png differ
diff --git a/images/01_controlbar_icon_share.png b/images/01_controlbar_icon_share.png
new file mode 100644 (file)
index 0000000..188f31a
Binary files /dev/null and b/images/01_controlbar_icon_share.png differ
diff --git a/images/01_header_icon_add.png b/images/01_header_icon_add.png
new file mode 100644 (file)
index 0000000..43c4984
Binary files /dev/null and b/images/01_header_icon_add.png differ
diff --git a/images/01_header_icon_cancel.png b/images/01_header_icon_cancel.png
new file mode 100644 (file)
index 0000000..4fb54c3
Binary files /dev/null and b/images/01_header_icon_cancel.png differ
diff --git a/images/01_header_icon_delete.png b/images/01_header_icon_delete.png
new file mode 100644 (file)
index 0000000..07e2898
Binary files /dev/null and b/images/01_header_icon_delete.png differ
diff --git a/images/01_header_icon_done.png b/images/01_header_icon_done.png
new file mode 100644 (file)
index 0000000..d771640
Binary files /dev/null and b/images/01_header_icon_done.png differ
diff --git a/images/01_header_icon_edit.png b/images/01_header_icon_edit.png
new file mode 100644 (file)
index 0000000..ea2535d
Binary files /dev/null and b/images/01_header_icon_edit.png differ
diff --git a/images/01_header_icon_others.png b/images/01_header_icon_others.png
new file mode 100644 (file)
index 0000000..4fc9dfa
Binary files /dev/null and b/images/01_header_icon_others.png differ
diff --git a/images/01_navi_icon_add_new_drawing_memo.png b/images/01_navi_icon_add_new_drawing_memo.png
new file mode 100644 (file)
index 0000000..37b62cc
Binary files /dev/null and b/images/01_navi_icon_add_new_drawing_memo.png differ
diff --git a/images/01_navi_icon_add_new_note.png b/images/01_navi_icon_add_new_note.png
new file mode 100644 (file)
index 0000000..a7772a6
Binary files /dev/null and b/images/01_navi_icon_add_new_note.png differ
diff --git a/images/01_navi_icon_favorite.png b/images/01_navi_icon_favorite.png
new file mode 100644 (file)
index 0000000..6dc9d20
Binary files /dev/null and b/images/01_navi_icon_favorite.png differ
diff --git a/images/25_button_focus.png b/images/25_button_focus.png
new file mode 100644 (file)
index 0000000..83284d1
Binary files /dev/null and b/images/25_button_focus.png differ
diff --git a/images/25_button_normal.png b/images/25_button_normal.png
new file mode 100644 (file)
index 0000000..df4433e
Binary files /dev/null and b/images/25_button_normal.png differ
diff --git a/images/25_memo_btn_close.png b/images/25_memo_btn_close.png
new file mode 100644 (file)
index 0000000..c11d1dc
Binary files /dev/null and b/images/25_memo_btn_close.png differ
diff --git a/images/25_memo_btn_close_press.png b/images/25_memo_btn_close_press.png
new file mode 100644 (file)
index 0000000..f26dbe2
Binary files /dev/null and b/images/25_memo_btn_close_press.png differ
diff --git a/images/25_memo_btn_delete.png b/images/25_memo_btn_delete.png
new file mode 100644 (file)
index 0000000..773e740
Binary files /dev/null and b/images/25_memo_btn_delete.png differ
diff --git a/images/25_memo_btn_delete_press.png b/images/25_memo_btn_delete_press.png
new file mode 100644 (file)
index 0000000..176de73
Binary files /dev/null and b/images/25_memo_btn_delete_press.png differ
diff --git a/images/25_memo_btn_send.png b/images/25_memo_btn_send.png
new file mode 100644 (file)
index 0000000..0a4c8a8
Binary files /dev/null and b/images/25_memo_btn_send.png differ
diff --git a/images/25_memo_btn_send_press.png b/images/25_memo_btn_send_press.png
new file mode 100644 (file)
index 0000000..97f37f1
Binary files /dev/null and b/images/25_memo_btn_send_press.png differ
diff --git a/images/25_memo_button.png b/images/25_memo_button.png
new file mode 100644 (file)
index 0000000..dfa8628
Binary files /dev/null and b/images/25_memo_button.png differ
diff --git a/images/25_memo_button_plus.png b/images/25_memo_button_plus.png
new file mode 100644 (file)
index 0000000..0dee486
Binary files /dev/null and b/images/25_memo_button_plus.png differ
diff --git a/images/25_memo_button_press.png b/images/25_memo_button_press.png
new file mode 100644 (file)
index 0000000..db54194
Binary files /dev/null and b/images/25_memo_button_press.png differ
diff --git a/images/25_memo_favorite.png b/images/25_memo_favorite.png
new file mode 100644 (file)
index 0000000..001b729
Binary files /dev/null and b/images/25_memo_favorite.png differ
diff --git a/images/25_memo_favorite_dim.png b/images/25_memo_favorite_dim.png
new file mode 100644 (file)
index 0000000..adbe428
Binary files /dev/null and b/images/25_memo_favorite_dim.png differ
diff --git a/images/25_memo_icon_color.png b/images/25_memo_icon_color.png
new file mode 100644 (file)
index 0000000..776ad02
Binary files /dev/null and b/images/25_memo_icon_color.png differ
diff --git a/images/25_memo_icon_color_focus.png b/images/25_memo_icon_color_focus.png
new file mode 100644 (file)
index 0000000..776ad02
Binary files /dev/null and b/images/25_memo_icon_color_focus.png differ
diff --git a/images/25_memo_icon_eraser.png b/images/25_memo_icon_eraser.png
new file mode 100644 (file)
index 0000000..fbbd824
Binary files /dev/null and b/images/25_memo_icon_eraser.png differ
diff --git a/images/25_memo_icon_eraser_focus.png b/images/25_memo_icon_eraser_focus.png
new file mode 100644 (file)
index 0000000..c7dff89
Binary files /dev/null and b/images/25_memo_icon_eraser_focus.png differ
diff --git a/images/25_memo_icon_font_color.png b/images/25_memo_icon_font_color.png
new file mode 100644 (file)
index 0000000..fdfff15
Binary files /dev/null and b/images/25_memo_icon_font_color.png differ
diff --git a/images/25_memo_icon_font_color_focus.png b/images/25_memo_icon_font_color_focus.png
new file mode 100644 (file)
index 0000000..481df21
Binary files /dev/null and b/images/25_memo_icon_font_color_focus.png differ
diff --git a/images/25_memo_icon_font_size.png b/images/25_memo_icon_font_size.png
new file mode 100644 (file)
index 0000000..e45547a
Binary files /dev/null and b/images/25_memo_icon_font_size.png differ
diff --git a/images/25_memo_icon_font_size_focus.png b/images/25_memo_icon_font_size_focus.png
new file mode 100644 (file)
index 0000000..b176fb5
Binary files /dev/null and b/images/25_memo_icon_font_size_focus.png differ
diff --git a/images/25_memo_icon_font_type.png b/images/25_memo_icon_font_type.png
new file mode 100644 (file)
index 0000000..7ee3676
Binary files /dev/null and b/images/25_memo_icon_font_type.png differ
diff --git a/images/25_memo_icon_font_type_focus.png b/images/25_memo_icon_font_type_focus.png
new file mode 100644 (file)
index 0000000..77f3ca8
Binary files /dev/null and b/images/25_memo_icon_font_type_focus.png differ
diff --git a/images/25_memo_icon_stroke.png b/images/25_memo_icon_stroke.png
new file mode 100644 (file)
index 0000000..0d6de4a
Binary files /dev/null and b/images/25_memo_icon_stroke.png differ
diff --git a/images/25_memo_icon_stroke_focus.png b/images/25_memo_icon_stroke_focus.png
new file mode 100644 (file)
index 0000000..e575dfb
Binary files /dev/null and b/images/25_memo_icon_stroke_focus.png differ
diff --git a/images/25_memo_picker_panel_bar.png b/images/25_memo_picker_panel_bar.png
new file mode 100644 (file)
index 0000000..1ba7422
Binary files /dev/null and b/images/25_memo_picker_panel_bar.png differ
diff --git a/images/Mymagazine_memo_bg.png b/images/Mymagazine_memo_bg.png
new file mode 100644 (file)
index 0000000..7a79c20
Binary files /dev/null and b/images/Mymagazine_memo_bg.png differ
diff --git a/images/P02_icon_color.png b/images/P02_icon_color.png
new file mode 100644 (file)
index 0000000..23a7fe7
Binary files /dev/null and b/images/P02_icon_color.png differ
diff --git a/images/P02_icon_color_focus.png b/images/P02_icon_color_focus.png
new file mode 100644 (file)
index 0000000..23a7fe7
Binary files /dev/null and b/images/P02_icon_color_focus.png differ
diff --git a/images/P02_icon_eraser.png b/images/P02_icon_eraser.png
new file mode 100644 (file)
index 0000000..ab26f48
Binary files /dev/null and b/images/P02_icon_eraser.png differ
diff --git a/images/P02_icon_eraser_press.png b/images/P02_icon_eraser_press.png
new file mode 100644 (file)
index 0000000..82e1ce1
Binary files /dev/null and b/images/P02_icon_eraser_press.png differ
diff --git a/images/P02_icon_font_color.png b/images/P02_icon_font_color.png
new file mode 100644 (file)
index 0000000..2e9c514
Binary files /dev/null and b/images/P02_icon_font_color.png differ
diff --git a/images/P02_icon_font_color_press.png b/images/P02_icon_font_color_press.png
new file mode 100644 (file)
index 0000000..2e75f62
Binary files /dev/null and b/images/P02_icon_font_color_press.png differ
diff --git a/images/P02_icon_font_size.png b/images/P02_icon_font_size.png
new file mode 100644 (file)
index 0000000..b397b98
Binary files /dev/null and b/images/P02_icon_font_size.png differ
diff --git a/images/P02_icon_font_size_press.png b/images/P02_icon_font_size_press.png
new file mode 100644 (file)
index 0000000..4966066
Binary files /dev/null and b/images/P02_icon_font_size_press.png differ
diff --git a/images/P02_icon_font_type.png b/images/P02_icon_font_type.png
new file mode 100644 (file)
index 0000000..10d9186
Binary files /dev/null and b/images/P02_icon_font_type.png differ
diff --git a/images/P02_icon_font_type_press.png b/images/P02_icon_font_type_press.png
new file mode 100644 (file)
index 0000000..abd2499
Binary files /dev/null and b/images/P02_icon_font_type_press.png differ
diff --git a/images/P02_icon_stroke.png b/images/P02_icon_stroke.png
new file mode 100644 (file)
index 0000000..5a317a8
Binary files /dev/null and b/images/P02_icon_stroke.png differ
diff --git a/images/P02_icon_stroke_press.png b/images/P02_icon_stroke_press.png
new file mode 100644 (file)
index 0000000..5e26ff8
Binary files /dev/null and b/images/P02_icon_stroke_press.png differ
diff --git a/include/memo-assist.h b/include/memo-assist.h
new file mode 100644 (file)
index 0000000..61c182a
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 __MEMO_ASSIST_H__
+#define __MEMO_ASSIST_H__
+
+#include <memo-db.h>
+#include <bundle.h>
+#include <memo_string.h>
+#include <ui-gadget.h>
+
+
+#define DOODLE_TITLE_PREFIX     "Draw_"
+
+#define ARGB_JOIN(a, r, g, b) \
+    (((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
+
+#define  IN_RECT_CHECK(x, y, rx, ry, rw, rh)\
+    (((unsigned)((x) - (rx)) < (rw)) && ((unsigned)((y) - (ry)) < (rh)))
+
+#define CLIP_RECT_TO_RECT(x, y, w, h, rx, ry, rw, rh)\
+{\
+    int   _t0, _t1;\
+\
+    _t0 = MAX(x, (rx));\
+    _t1 = MIN(x + w, (rx) + (rw));\
+    x = _t0;\
+    w = _t1 - _t0;\
+    _t0 = MAX(y, (ry));\
+    _t1 = MIN(y + h, (ry) + (rh));\
+    y = _t0;\
+    h = _t1 - _t0;\
+}
+
+typedef void (*Memo_Component_Callback)(void *data, const char *msg, void *event);
+
+typedef struct memo_data memo_data_t;
+typedef struct memo_data_list memo_data_list_t;
+
+typedef enum {
+    MOUSE_EVENT_INVALID = 0,
+    MOUSE_EVENT_CLICK,
+    MOUSE_EVENT_DRAG_LEFT,
+    MOUSE_EVENT_DRAG_RIGHT,
+    MOUSE_EVENT_DRAG_UP,
+    MOUSE_EVENT_DRAG_DOWN,
+} mouse_behaviour_t;
+
+#define MOUSE_POSITION_INVALID 9999
+
+char * strcasestr (const char *haystack, const char *needle);
+char * strptime (const char *s, const char *fmt, struct tm *tp);
+void icu_init();
+char *memo_get_doodle_title();
+void memo_time_format(char *buf, int len, time_t time);
+time_t memo_get_binary_release_date();
+mouse_behaviour_t mouse_event_identify(int startx, int starty, int endx, int endy);
+void evas_object_flick_callback_add(Evas_Object *obj, Evas_Smart_Cb on_flick, void *data);
+void memo_com_dummy_cb(void *data, const char *msg, void *event);
+void memo_create_yes_no_popup(Evas_Object *win, const char *msg, Evas_Smart_Cb on_yes, Evas_Smart_Cb on_no, void *data);
+void memo_tool_btn_focus_set(Evas_Object *eo, Eina_Bool status);
+void *memo_load_font_size_selector(Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data);
+void memo_del_font_size_selector(void *h_fss);
+void *memo_load_color_selector(Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data);
+void memo_del_color_selector(void *h_cs);
+void *memo_load_pencil_size_selector(Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data);
+void memo_del_pencil_size_selector(void *h_pss);
+void memo_navigator_pop(Evas_Object *navi);
+Elm_Object_Item *memo_naviframe_item_push(Evas_Object *obj, const char *title_label,
+    Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style);
+Evas_Object *memo_controlbar_add(Evas_Object *parent);
+void memo_comment_recover(Evas_Object *entry, const char *orig_utf8);
+#endif                /* __MEMO_ASSIST_H__ */
diff --git a/include/memo-efl.h b/include/memo-efl.h
new file mode 100644 (file)
index 0000000..7148e02
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 __memo_efl_H__
+#define __memo_efl_H__
+
+#include <Elementary.h>
+#include <libintl.h>
+#include <bundle.h>
+#include <ui-gadget.h>
+#include <memo-assist.h>
+#include <dlog.h>
+
+#define PKGNAME "ug-memo-efl"
+
+#define _EDJ(o)            elm_layout_edje_get(o)
+#define _(s)            dgettext(PKGNAME, s)
+#define dgettext_noop(s)    (s)
+#define N_(s)            dgettext_noop(s)
+
+#define EDJE_COLOR_CLASS_SET(name, r, g, b, a)\
+    (edje_color_class_set(name, r, g, b, a, 0, 0, 0, 0, 0, 0, 0, 0))\
+
+#define EDJE_COLOR_CLASS_GET(name, r, g, b, a)\
+    (edje_color_class_get(name, r, g, b, a, 0, 0, 0, 0, 0, 0, 0, 0))\
+
+typedef struct ug_data {
+    Evas_Object *base;
+    ui_gadget_h ug;
+    char buf[MEMO_BUFFER_SIZE]; /* for temporarily usage only */
+    void *h_ug;
+    Elm_Theme *th; /* customized theme for UG */
+}ug_data_t;
+
+Eina_Bool edit_view_pre_condition_check(service_h service);
+void *memo_load_edit_view(ug_data_t *ugd, service_h service);
+void memo_del_edit_view(void *h_ev);
+void *memo_load_select_view(ug_data_t *ugd, service_h service);
+void *memo_load_detail_view(ug_data_t *ugd, service_h service);
+
+#endif /* __memo_efl_H__ */
diff --git a/include/memo-genlist.h b/include/memo-genlist.h
new file mode 100644 (file)
index 0000000..ae62d1c
--- /dev/null
@@ -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://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 __MEMO_GENLIST_H__
+#define __MEMO_GENLIST_H__
+
+typedef struct __gl_data_t {
+    /* common */
+    int index;
+    int has_doodle;
+    time_t mod_time;
+    Evas_Smart_Cb on_select;
+    /* checkbox */
+    Eina_Bool check;
+    Evas_Smart_Cb on_change;
+    /* sweep */
+    Evas_Smart_Cb on_delete;
+    Evas_Smart_Cb on_send;
+    /* search */
+    const char *search;
+    /* user data */
+    void *user_data;
+} gl_data_t;
+
+char *memo_gl_label_get(void *data, Evas_Object *obj, const char *part);
+Evas_Object *memo_gl_icon_get(void *data, Evas_Object *obj, const char *part);
+Eina_Bool memo_gl_state_get(void *data, Evas_Object *obj, const char *part);
+void memo_gl_del(void *data, Evas_Object *obj);
+void memo_gl_itc_init(Elm_Genlist_Item_Class *itc, const char *style);
+void memo_gld_init(gl_data_t *data, memo_data_t *md, void *user_data, Evas_Smart_Cb on_select);
+gl_data_t *memo_gld_sentinel_create(void *user_data);
+
+#endif                /* __MEMO_GENLIST_H__ */
diff --git a/include/memo_autolink.h b/include/memo_autolink.h
new file mode 100644 (file)
index 0000000..385597e
--- /dev/null
@@ -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://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 __MEMO_AUTOLINK_H__
+#define __MEMO_AUTOLINK_H__
+
+enum anchor_t {
+    NOT_ANCHOR = 0,
+    ANCHOR_PHONE,
+    ANCHOR_EMAIL,
+    ANCHOR_URL,
+};
+
+struct anchor_popup_item_t {
+    char *label;
+    void (*response) (void *data, Evas_Object *obj, void *event_info);
+    const char *domain; /* for i18n */
+};
+
+typedef struct autolink_data_t {
+    Evas_Object *win_main;
+    Evas_Object *popup;
+    enum anchor_t type;
+    char *info;
+} autolink_data;
+
+GString *autolink_add_anchor(const char *content);
+void autolink_anchor_clicked_cb(void *data, Evas_Object *obj, void *event_info);
+
+#endif                /* __MEMO_AUTOLINK_H__ */
diff --git a/include/memo_doodle_editor.h b/include/memo_doodle_editor.h
new file mode 100644 (file)
index 0000000..89b48d7
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 __MEMO_DOODLE_EDITOR_H__
+#define __MEMO_DOODLE_EDITOR_H__
+
+void memo_doodle_editor_time_format_update(void *h_de);
+void memo_doodle_editor_cancel(void *h_de);
+void memo_doodle_editor_save(void *h_de);
+void *memo_load_doodle_editor(Evas_Object *win, Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data);
+void memo_destroy_doodle_editor(void *h_de);
+
+#endif /* __MEMO_DOODLE_EDITOR_H__ */
diff --git a/include/memo_string.h b/include/memo_string.h
new file mode 100644 (file)
index 0000000..be897c3
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 __MEMO_STRING_H__
+#define __MEMO_STRING_H__
+
+/* system string */
+#define MEMO_I18N_ADD                        dgettext("sys_string", "IDS_COM_SK_ADD") /* Add */
+#define MEMO_I18N_BACK                       dgettext("sys_string", "IDS_COM_BODY_BACK") /* Back */
+#define MEMO_I18N_CALENDAR                   dgettext("sys_string", "IDS_COM_BODY_CALENDAR") /* Calendar */
+#define MEMO_I18N_CANCEL                     dgettext("sys_string", "IDS_COM_POP_CANCEL") /* Cancel */
+#define MEMO_I18N_CLOSE                      dgettext("sys_string", "IDS_COM_BODY_CLOSE") /* Close */
+#define MEMO_I18N_DELETE                     dgettext("sys_string", "IDS_COM_BODY_DELETE") /* Delete */
+#define MEMO_I18N_DONE                       dgettext("sys_string", "IDS_COM_BODY_DONE") /* Done */
+#define MEMO_I18N_EDIT                       dgettext("sys_string", "IDS_COM_BODY_EDIT") /* Edit */
+#define MEMO_I18N_EMAIL                      dgettext("sys_string", "IDS_COM_BODY_EMAIL") /* Email */
+#define MEMO_I18N_MEMO                       dgettext("sys_string", "IDS_COM_BODY_MEMO") /* Memo */
+#define MEMO_I18N_MESSAGE                    dgettext("sys_string", "IDS_COM_BODY_MESSAGE") /* Message */
+#define MEMO_I18N_NEW                        dgettext("sys_string", "IDS_COM_SK_NEW") /* New */
+#define MEMO_I18N_NO                         dgettext("sys_string", "IDS_COM_SK_NO") /* No */
+#define MEMO_I18N_QUIT                       dgettext("sys_string", "IDS_COM_SK_QUIT") /* Quit */
+#define MEMO_I18N_SEARCH                     dgettext("sys_string", "IDS_COM_BODY_SEARCH") /* Search */
+#define MEMO_I18N_SELECT_ALL                 dgettext("sys_string", "IDS_COM_BODY_SELECT_ALL") /* Select all */
+#define MEMO_I18N_SEND                       dgettext("sys_string", "IDS_COM_BODY_SEND") /* Send */
+#define MEMO_I18N_SEND_MESSAGE               dgettext("sys_string", "IDS_COM_BODY_SEND_MESSAGE") /* Send message */
+#define MEMO_I18N_SET                        dgettext("sys_string", "IDS_COM_SK_SET") /* Set */
+#define MEMO_I18N_SHARE                      dgettext("sys_string", "IDS_COM_BUTTON_SHARE") /* Share */
+#define MEMO_I18N_VIDEO_CALL                 dgettext("sys_string", "IDS_COM_BODY_VIDEO_CALL") /* Video call */
+#define MEMO_I18N_VOICE_CALL                 dgettext("sys_string", "IDS_COM_BODY_VOICE_CALL") /* Voice call */
+#define MEMO_I18N_YES                        dgettext("sys_string", "IDS_COM_SK_YES") /* Yes */
+
+/* app string */
+#define MEMO_I18N_ADD_COMMENT                dgettext("memo", "IDS_MEMO_BODY_ADD_COMMENT") /* Add comment */
+#define MEMO_I18N_ADD_TO_CONTACT             dgettext("memo", "IDS_MEMO_BODY_ADD_TO_CONTACT") /* Add to contact */
+#define MEMO_I18N_DRAWING                    dgettext("memo", "IDS_MEMO_BODY_DRAWING") /* Drawing */
+#define MEMO_I18N_EDIT_NOTE                  dgettext("memo", "IDS_MEMO_BODY_EDIT_NOTE") /* Edit note */
+#define MEMO_I18N_SAVE_MEMO                  dgettext("memo", "IDS_MEMO_POP_DIALOG_SAVE_MEMO") /* Save memo? */
+#define MEMO_I18N_SELECT_MEMO                dgettext("memo", "IDS_MEMO_HEADER_SELECT_MEMO_ABB") /* Select memo */
+#define MEMO_I18N_SEND_EMAIL                 dgettext("memo", "IDS_MEMO_OPT_SEND_EMAIL") /* Send email */
+#define MEMO_I18N_TEXT                       dgettext("memo", "IDS_MEMO_BODY_TEXT") /* Text */
+#define MEMO_I18N_1_MEMO_SELECTED            dgettext("memo", "IDS_MEMO_POP_1_MEMO_SELECTED") /* 1 memo selected */
+#define MEMO_I18N_D_MEMOS_SELECTED           dgettext("memo", "IDS_MEMO_POP_PD_MEMOS_SELECTED") /* %d memos selected */
+
+/* custom string */
+#define MEMO_I18N_EDIT_COMMENT               _("Edit comment") /* Edit comment */
+#define MEMO_I18N_EDIT_DRAWING               _("Edit drawing") /* Edit drawing */
+#define MEMO_I18N_NEW_DRAWING                _("New drawing") /* New drawing */
+#define MEMO_I18N_NEW_NOTE                   _("New note") /* New note */
+#define MEMO_I18N_WELCOME_TO_TIZEN_MEMO    _("Welcome to Tizen Memo") /* Welcome to Tizen Memo */
+
+#endif                /* __MEMO_STRING_H__ */
diff --git a/include/memo_text_editor.h b/include/memo_text_editor.h
new file mode 100644 (file)
index 0000000..e1909b4
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 __MEMO_TEXT_EDITOR_H__
+#define __MEMO_TEXT_EDITOR_H__
+
+void memo_text_editor_time_format_update(void *h_de);
+void memo_text_editor_cancel(void *h_te);
+void memo_text_editor_save(void *h_te);
+void *memo_load_text_editor(Evas_Object *win, Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data);
+void memo_destroy_text_editor(void *h_te);
+
+#endif                /* __MEMO_TEXT_EDITOR_H__ */
diff --git a/include/memo_ug.h b/include/memo_ug.h
new file mode 100644 (file)
index 0000000..2ade706
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 __MEMO_SG_H__
+#define __MEMO_SG_H__
+
+#include <glib.h>
+//#include <sil.h>
+#include <bundle.h>
+#include <ui-gadget.h>
+#include <stdarg.h>
+#include <Elementary.h>
+#include <memo-assist.h>
+
+
+/* UG Name */
+#define UG_NAME_EMAIL            "email-composer-efl"
+#define UG_NAME_MESSAGE          "msg-composer-efl"
+#define UG_NAME_CONTACT_ADD      "contacts-details-efl"
+#define UG_NAME_CALENDAR         "calendar-edit-efl"
+
+/* AUL NAME */
+#define AUL_NAME_CALENDER        PACKAGE_PREFIX".efl-calendar"
+#define AUL_NAME_VIOCE_CALL      PACKAGE_PREFIX".call"
+#define AUL_NAME_VEDIO_CALL      PACKAGE_PREFIX".vtmain"
+
+/* UG Function Declaration*/
+void ug_launch_common(service_h service, char *ug_name);
+void ug_launch_common_var(char *ug_name, ...);
+
+#endif                /* __MEMO_SG_H__ */
diff --git a/memo.edc b/memo.edc
new file mode 100644 (file)
index 0000000..7f2f20e
--- /dev/null
+++ b/memo.edc
@@ -0,0 +1,30 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 <extend/extended-edc.h>
+
+collections {
+    #include <edc/common.edc>
+    #include <edc/detail.edc>
+    #include <edc/edit_list.edc>
+    #include <edc/text_editor.edc>
+    #include <edc/doodle_editor.edc>
+    #include <edc/edit_tool.edc>
+    #include <edc/gl_edit_list.edc>
+    #include <edc/selector.edc>
+}
diff --git a/packaging/ug-memo-efl.spec b/packaging/ug-memo-efl.spec
new file mode 100644 (file)
index 0000000..69f2dd8
--- /dev/null
@@ -0,0 +1,46 @@
+#sbs-git:slp/apps/u/ug-memo-efl ug-memo-efl 0.1.1 f3ff27176aa784c4e09fa856638f75d8d4dac14d
+Name:       ug-memo-efl
+Summary:    Memo Public Shared-Gadget (EFL)
+Version:    0.1.1
+Release:    40
+Group:      misc
+License:    TO_BE_FILL
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(appcore-efl)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(ecore-input)
+BuildRequires:  pkgconfig(evas)
+BuildRequires:  pkgconfig(memo)
+BuildRequires:  pkgconfig(iniparser)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(appsvc)
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(icu-i18n)
+BuildRequires:  pkgconfig(ui-gadget-1)
+BuildRequires:  libug-contacts-devel
+BuildRequires:  cmake
+BuildRequires:  gettext-tools
+BuildRequires:  edje-tools
+
+%description
+Memo Public Shared-Gadget (EFL).
+
+%prep
+%setup -q
+
+%build
+%define PREFIX    "/usr"
+cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX}
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+
+%remove_docs
+
+
+%files
+%defattr(-,root,root,-)
+/usr/ug/*
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
new file mode 100644 (file)
index 0000000..787bda4
--- /dev/null
@@ -0,0 +1,24 @@
+# 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 ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME memo.mo)
+       SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100755 (executable)
index 0000000..d5bf5d7
--- /dev/null
@@ -0,0 +1,11 @@
+# List of source files containing translatable strings.
+callback.c
+edit_memo.c
+memo.c
+memo.h
+memolist.c
+view_detail.c
+view_list.c
+sg/memo-sg.c
+sg/memolist-sg.c
+sg/viewlist-sg.c
diff --git a/po/de_DE.po b/po/de_DE.po
new file mode 100644 (file)
index 0000000..db972ae
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEMO_POP_DIALOG_SAVE_MEMO"
+msgstr "Memo speichern?"
+
+msgid "IDS_MEMO_POP_1_MEMO_SELECTED"
+msgstr "1 Memo ausgewählt."
+
+msgid "IDS_MEMO_POP_PD_MEMOS_SELECTED"
+msgstr "%d Memos ausgewählt."
+
+msgid "IDS_MEMO_OPT_SEND_EMAIL"
+msgstr "E-Mail senden"
+
+msgid "IDS_MEMO_BODY_ADD_COMMENT"
+msgstr "Kommentar hinzufügen"
+
+msgid "IDS_MEMO_BODY_ADD_TO_CONTACT"
+msgstr "Zu Kontakt hinzufügen"
+
+msgid "IDS_MEMO_BODY_DRAWING"
+msgstr "Zeichnung"
+
+msgid "IDS_MEMO_BODY_EDIT_NOTE"
+msgstr "Memo bearbeiten"
+
+msgid "IDS_MEMO_BODY_TEXT"
+msgstr "Text"
+
+msgid "IDS_MEMO_HEADER_SELECT_MEMO_ABB"
+msgstr "Memo wählen"
+
diff --git a/po/el_GR.po b/po/el_GR.po
new file mode 100644 (file)
index 0000000..64dc39c
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEMO_POP_DIALOG_SAVE_MEMO"
+msgstr "Αποθήκευση σημειώματος;"
+
+msgid "IDS_MEMO_POP_1_MEMO_SELECTED"
+msgstr "Επιλέχθηκε 1 σημείωμα"
+
+msgid "IDS_MEMO_POP_PD_MEMOS_SELECTED"
+msgstr "Επιλέχθηκαν %d σημειώματα"
+
+msgid "IDS_MEMO_OPT_SEND_EMAIL"
+msgstr "Αποστολή email"
+
+msgid "IDS_MEMO_BODY_ADD_COMMENT"
+msgstr "Προσθήκη σχολίου"
+
+msgid "IDS_MEMO_BODY_ADD_TO_CONTACT"
+msgstr "Προσθήκη σε επαφή"
+
+msgid "IDS_MEMO_BODY_DRAWING"
+msgstr "Σχέδιο"
+
+msgid "IDS_MEMO_BODY_EDIT_NOTE"
+msgstr "Επεξεργασία σημείωσης"
+
+msgid "IDS_MEMO_BODY_TEXT"
+msgstr "Κείμενο"
+
+msgid "IDS_MEMO_HEADER_SELECT_MEMO_ABB"
+msgstr "Επιλογή σημειώματος"
+
diff --git a/po/en.po b/po/en.po
new file mode 100644 (file)
index 0000000..746cac3
--- /dev/null
+++ b/po/en.po
@@ -0,0 +1,30 @@
+msgid "IDS_MEMO_POP_DIALOG_SAVE_MEMO"
+msgstr "Save memo?"
+
+msgid "IDS_MEMO_POP_1_MEMO_SELECTED"
+msgstr "1 memo selected"
+
+msgid "IDS_MEMO_POP_PD_MEMOS_SELECTED"
+msgstr "%d memos selected"
+
+msgid "IDS_MEMO_OPT_SEND_EMAIL"
+msgstr "Send email"
+
+msgid "IDS_MEMO_BODY_ADD_COMMENT"
+msgstr "Add comment"
+
+msgid "IDS_MEMO_BODY_ADD_TO_CONTACT"
+msgstr "Add to contact"
+
+msgid "IDS_MEMO_BODY_DRAWING"
+msgstr "Drawing"
+
+msgid "IDS_MEMO_BODY_EDIT_NOTE"
+msgstr "Edit note"
+
+msgid "IDS_MEMO_BODY_TEXT"
+msgstr "Text"
+
+msgid "IDS_MEMO_HEADER_SELECT_MEMO_ABB"
+msgstr "Select memo"
+
diff --git a/po/es_ES.po b/po/es_ES.po
new file mode 100644 (file)
index 0000000..7e57dd0
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEMO_POP_DIALOG_SAVE_MEMO"
+msgstr "¿Guardar nota?"
+
+msgid "IDS_MEMO_POP_1_MEMO_SELECTED"
+msgstr "1 nota seleccionada"
+
+msgid "IDS_MEMO_POP_PD_MEMOS_SELECTED"
+msgstr "%d notas seleccionadas"
+
+msgid "IDS_MEMO_OPT_SEND_EMAIL"
+msgstr "Enviar correo electrónico"
+
+msgid "IDS_MEMO_BODY_ADD_COMMENT"
+msgstr "Añadir comentario"
+
+msgid "IDS_MEMO_BODY_ADD_TO_CONTACT"
+msgstr "Añadir a contacto"
+
+msgid "IDS_MEMO_BODY_DRAWING"
+msgstr "Dibujo"
+
+msgid "IDS_MEMO_BODY_EDIT_NOTE"
+msgstr "Editar nota"
+
+msgid "IDS_MEMO_BODY_TEXT"
+msgstr "Texto"
+
+msgid "IDS_MEMO_HEADER_SELECT_MEMO_ABB"
+msgstr "Seleccionar nota"
+
diff --git a/po/fr_FR.po b/po/fr_FR.po
new file mode 100644 (file)
index 0000000..da62506
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEMO_POP_DIALOG_SAVE_MEMO"
+msgstr "Enregistrer un mémo ?"
+
+msgid "IDS_MEMO_POP_1_MEMO_SELECTED"
+msgstr "1 mémo sélectionné"
+
+msgid "IDS_MEMO_POP_PD_MEMOS_SELECTED"
+msgstr "%d mémos sélectionnés"
+
+msgid "IDS_MEMO_OPT_SEND_EMAIL"
+msgstr "Envoyer un e-mail"
+
+msgid "IDS_MEMO_BODY_ADD_COMMENT"
+msgstr "Ajouter commentaire"
+
+msgid "IDS_MEMO_BODY_ADD_TO_CONTACT"
+msgstr "Ajouter aux contacts"
+
+msgid "IDS_MEMO_BODY_DRAWING"
+msgstr "Dessin"
+
+msgid "IDS_MEMO_BODY_EDIT_NOTE"
+msgstr "Modifier note"
+
+msgid "IDS_MEMO_BODY_TEXT"
+msgstr "Texte"
+
+msgid "IDS_MEMO_HEADER_SELECT_MEMO_ABB"
+msgstr "Sélectionner mémo"
+
diff --git a/po/it_IT.po b/po/it_IT.po
new file mode 100644 (file)
index 0000000..d33f723
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEMO_POP_DIALOG_SAVE_MEMO"
+msgstr "Salvare promemoria?"
+
+msgid "IDS_MEMO_POP_1_MEMO_SELECTED"
+msgstr "1 promemoria selezionato"
+
+msgid "IDS_MEMO_POP_PD_MEMOS_SELECTED"
+msgstr "%d promemoria selezionati"
+
+msgid "IDS_MEMO_OPT_SEND_EMAIL"
+msgstr "Invia e-mail"
+
+msgid "IDS_MEMO_BODY_ADD_COMMENT"
+msgstr "Agg. commento"
+
+msgid "IDS_MEMO_BODY_ADD_TO_CONTACT"
+msgstr "Aggiungi a contatto"
+
+msgid "IDS_MEMO_BODY_DRAWING"
+msgstr "Disegno"
+
+msgid "IDS_MEMO_BODY_EDIT_NOTE"
+msgstr "Modifica nota"
+
+msgid "IDS_MEMO_BODY_TEXT"
+msgstr "Testo"
+
+msgid "IDS_MEMO_HEADER_SELECT_MEMO_ABB"
+msgstr "Seleziona promemoria"
+
diff --git a/po/ja_JP.po b/po/ja_JP.po
new file mode 100644 (file)
index 0000000..6de3e5d
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEMO_POP_DIALOG_SAVE_MEMO"
+msgstr "メモ​を​保存​しますか?"
+
+msgid "IDS_MEMO_POP_1_MEMO_SELECTED"
+msgstr "1件のメモを選択しました。"
+
+msgid "IDS_MEMO_POP_PD_MEMOS_SELECTED"
+msgstr "%d件​の​メモ​を選択しました。"
+
+msgid "IDS_MEMO_OPT_SEND_EMAIL"
+msgstr "Eメール送信"
+
+msgid "IDS_MEMO_BODY_ADD_COMMENT"
+msgstr "コメント​​追加​"
+
+msgid "IDS_MEMO_BODY_ADD_TO_CONTACT"
+msgstr "電話帳に追加"
+
+msgid "IDS_MEMO_BODY_DRAWING"
+msgstr "スケッチ"
+
+msgid "IDS_MEMO_BODY_EDIT_NOTE"
+msgstr "ノート​を​編集​します"
+
+msgid "IDS_MEMO_BODY_TEXT"
+msgstr "テキスト"
+
+msgid "IDS_MEMO_HEADER_SELECT_MEMO_ABB"
+msgstr "メモ​を​選択​して​ください"
+
diff --git a/po/ko_KR.po b/po/ko_KR.po
new file mode 100644 (file)
index 0000000..f552c3e
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEMO_POP_DIALOG_SAVE_MEMO"
+msgstr "메모를 저장할까요?"
+
+msgid "IDS_MEMO_POP_1_MEMO_SELECTED"
+msgstr "1개의 메모가 선택되었습니다"
+
+msgid "IDS_MEMO_POP_PD_MEMOS_SELECTED"
+msgstr "%d개의 메모가 선택되었습니다"
+
+msgid "IDS_MEMO_OPT_SEND_EMAIL"
+msgstr "이메일 보내기"
+
+msgid "IDS_MEMO_BODY_ADD_COMMENT"
+msgstr "댓글 달기"
+
+msgid "IDS_MEMO_BODY_ADD_TO_CONTACT"
+msgstr "연락처에 추가"
+
+msgid "IDS_MEMO_BODY_DRAWING"
+msgstr "그림"
+
+msgid "IDS_MEMO_BODY_EDIT_NOTE"
+msgstr "메모 편집"
+
+msgid "IDS_MEMO_BODY_TEXT"
+msgstr "문자"
+
+msgid "IDS_MEMO_HEADER_SELECT_MEMO_ABB"
+msgstr "메모 선택"
+
diff --git a/po/memo.pot b/po/memo.pot
new file mode 100644 (file)
index 0000000..1e5bc92
--- /dev/null
@@ -0,0 +1,222 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-02-04 16:42+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: callback.c:128
+msgid "Exit"
+msgstr ""
+
+#: callback.c:132 memo.c:511 memolist.c:255 memolist.c:264 view_list.c:210
+msgid "Create"
+msgstr ""
+
+#. elm_softkey_item_label_set(data->item_left, "Done");
+#: callback.c:136 memo.c:514 view_detail.c:554 view_list.c:214 view_list.c:451
+msgid "Delete"
+msgstr ""
+
+#: callback.c:163
+msgid "Edit"
+msgstr ""
+
+#: callback.c:168 view_detail.c:588 view_list.c:452
+msgid "Cancel"
+msgstr ""
+
+#: callback.c:179
+msgid "Done"
+msgstr ""
+
+#: callback.c:183 memo.c:512 memolist.c:256 view_list.c:211
+msgid "Maximize"
+msgstr ""
+
+#: callback.c:187 memolist.c:265
+msgid "Minimize"
+msgstr ""
+
+#. elm_softkey_item_label_set(ad->item_left, "Edit");
+#: callback.c:190 view_detail.c:587
+msgid "Save"
+msgstr ""
+
+#. show date
+#. show content
+#. show content
+#: edit_memo.c:60 memolist.c:404 view_detail.c:409 view_detail.c:1001
+msgid "Tap to create"
+msgstr ""
+
+#: edit_memo.c:135
+msgid "Saved"
+msgstr ""
+
+#: edit_memo.c:138
+msgid "Empty"
+msgstr ""
+
+#: edit_memo.c:141
+msgid "Error"
+msgstr ""
+
+#: memo.c:73 view_detail.c:443 view_list.c:124
+msgid "Memo"
+msgstr ""
+
+#. add here ...
+#: memo.c:76
+msgid "No Memo"
+msgstr ""
+
+#: memo.c:168
+msgid "FONT_NAME"
+msgstr ""
+
+#. constant string for months
+#. static const char* g_szMonth[]={"JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"};
+#: memo.h:71
+msgid "Jan."
+msgstr ""
+
+#: memo.h:71
+msgid "Feb."
+msgstr ""
+
+#: memo.h:71
+msgid "Mar."
+msgstr ""
+
+#: memo.h:71
+msgid "Apr."
+msgstr ""
+
+#: memo.h:71
+msgid "May"
+msgstr ""
+
+#: memo.h:71
+msgid "Jun."
+msgstr ""
+
+#: memo.h:72
+msgid "Jul."
+msgstr ""
+
+#: memo.h:72
+msgid "Aug."
+msgstr ""
+
+#: memo.h:72
+msgid "Sep."
+msgstr ""
+
+#: memo.h:72
+msgid "Oct."
+msgstr ""
+
+#: memo.h:72
+msgid "Nov."
+msgstr ""
+
+#: memo.h:72
+msgid "Dec."
+msgstr ""
+
+#: memo.h:74
+msgid "Sun"
+msgstr ""
+
+#: memo.h:74
+msgid "Mon"
+msgstr ""
+
+#: memo.h:74
+msgid "Tue"
+msgstr ""
+
+#: memo.h:74
+msgid "Wed"
+msgstr ""
+
+#: memo.h:74
+msgid "Thu"
+msgstr ""
+
+#: memo.h:74
+msgid "Fri"
+msgstr ""
+
+#: memo.h:74
+msgid "Sat"
+msgstr ""
+
+#. add here ...
+#. basic edit view
+#: memolist.c:37
+msgid "Select All"
+msgstr ""
+
+#: memolist.c:386 memolist.c:426 view_detail.c:400 view_detail.c:428
+#, c-format
+msgid "%s %d. %s  %d"
+msgstr ""
+
+#: view_detail.c:187 view_detail.c:591
+msgid "Send via Message"
+msgstr ""
+
+#: view_detail.c:188 view_detail.c:592
+msgid "Send via Email"
+msgstr ""
+
+#: view_detail.c:189 view_detail.c:593
+msgid "Send via Bluetooth"
+msgstr ""
+
+#: view_detail.c:190 view_detail.c:594
+msgid "Print via Bluetooth"
+msgstr ""
+
+#: view_detail.c:546 view_detail.c:762 view_list.c:90 view_list.c:165
+msgid "Yes"
+msgstr ""
+
+#: view_detail.c:555 view_detail.c:561
+msgid "OK"
+msgstr ""
+
+#: view_detail.c:560
+msgid "Unable to delete"
+msgstr ""
+
+#: view_detail.c:761 view_list.c:159
+msgid "Delete?"
+msgstr ""
+
+#: view_detail.c:762 view_list.c:104 view_list.c:171
+msgid "No"
+msgstr ""
+
+#: view_list.c:502
+#, c-format
+msgid "IDS_MEMO_POP_PD_MEMOS_DELETED"
+msgstr ""
+
+#: view_list.c:504
+#, c-format
+msgid "IDS_MEMO_POP_1_MEMO_DELETED"
+msgstr ""
diff --git a/po/nl_NL.po b/po/nl_NL.po
new file mode 100644 (file)
index 0000000..e75063e
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEMO_POP_DIALOG_SAVE_MEMO"
+msgstr "Notitie opslaan?"
+
+msgid "IDS_MEMO_POP_1_MEMO_SELECTED"
+msgstr "1 notitie geselecteerd"
+
+msgid "IDS_MEMO_POP_PD_MEMOS_SELECTED"
+msgstr "%d notities geselecteerd"
+
+msgid "IDS_MEMO_OPT_SEND_EMAIL"
+msgstr "E-mail verzenden"
+
+msgid "IDS_MEMO_BODY_ADD_COMMENT"
+msgstr "Opmerking toevoegen"
+
+msgid "IDS_MEMO_BODY_ADD_TO_CONTACT"
+msgstr "Toevoegen aan contactpersoon"
+
+msgid "IDS_MEMO_BODY_DRAWING"
+msgstr "Tekening"
+
+msgid "IDS_MEMO_BODY_EDIT_NOTE"
+msgstr "Notitie wijzigen"
+
+msgid "IDS_MEMO_BODY_TEXT"
+msgstr "Tekst"
+
+msgid "IDS_MEMO_HEADER_SELECT_MEMO_ABB"
+msgstr "Memo selecteren"
+
diff --git a/po/pt_PT.po b/po/pt_PT.po
new file mode 100644 (file)
index 0000000..87f4594
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEMO_POP_DIALOG_SAVE_MEMO"
+msgstr "Guardar memorando?"
+
+msgid "IDS_MEMO_POP_1_MEMO_SELECTED"
+msgstr "1 memorando seleccionado"
+
+msgid "IDS_MEMO_POP_PD_MEMOS_SELECTED"
+msgstr "%d memorandos seleccionados"
+
+msgid "IDS_MEMO_OPT_SEND_EMAIL"
+msgstr "Enviar e-mail"
+
+msgid "IDS_MEMO_BODY_ADD_COMMENT"
+msgstr "Adicionar comentário"
+
+msgid "IDS_MEMO_BODY_ADD_TO_CONTACT"
+msgstr "Adicionar a contacto"
+
+msgid "IDS_MEMO_BODY_DRAWING"
+msgstr "Desenho"
+
+msgid "IDS_MEMO_BODY_EDIT_NOTE"
+msgstr "Editar nota"
+
+msgid "IDS_MEMO_BODY_TEXT"
+msgstr "Texto"
+
+msgid "IDS_MEMO_HEADER_SELECT_MEMO_ABB"
+msgstr "Seleccionar memorando"
+
diff --git a/po/ru_RU.po b/po/ru_RU.po
new file mode 100644 (file)
index 0000000..d9fc642
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEMO_POP_DIALOG_SAVE_MEMO"
+msgstr "Сохранить заметку?"
+
+msgid "IDS_MEMO_POP_1_MEMO_SELECTED"
+msgstr "Выбрана 1 заметка"
+
+msgid "IDS_MEMO_POP_PD_MEMOS_SELECTED"
+msgstr "Выбрано заметок: %d"
+
+msgid "IDS_MEMO_OPT_SEND_EMAIL"
+msgstr "Отправить E-mail"
+
+msgid "IDS_MEMO_BODY_ADD_COMMENT"
+msgstr "Добавить комментарий"
+
+msgid "IDS_MEMO_BODY_ADD_TO_CONTACT"
+msgstr "Добавить к контакту"
+
+msgid "IDS_MEMO_BODY_DRAWING"
+msgstr "Рисунок"
+
+msgid "IDS_MEMO_BODY_EDIT_NOTE"
+msgstr "Текст"
+
+msgid "IDS_MEMO_BODY_TEXT"
+msgstr "Текст"
+
+msgid "IDS_MEMO_HEADER_SELECT_MEMO_ABB"
+msgstr "Выберите заметку"
+
diff --git a/po/tr_TR.po b/po/tr_TR.po
new file mode 100644 (file)
index 0000000..524fa24
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEMO_POP_DIALOG_SAVE_MEMO"
+msgstr "Not kaydet?"
+
+msgid "IDS_MEMO_POP_1_MEMO_SELECTED"
+msgstr "1 not seçildi"
+
+msgid "IDS_MEMO_POP_PD_MEMOS_SELECTED"
+msgstr "%d not seçildi"
+
+msgid "IDS_MEMO_OPT_SEND_EMAIL"
+msgstr "E-posta gönder"
+
+msgid "IDS_MEMO_BODY_ADD_COMMENT"
+msgstr "Yorum ekle"
+
+msgid "IDS_MEMO_BODY_ADD_TO_CONTACT"
+msgstr "Rehbere ekle"
+
+msgid "IDS_MEMO_BODY_DRAWING"
+msgstr "Çizim"
+
+msgid "IDS_MEMO_BODY_EDIT_NOTE"
+msgstr "Notu düzenle"
+
+msgid "IDS_MEMO_BODY_TEXT"
+msgstr "Metin"
+
+msgid "IDS_MEMO_HEADER_SELECT_MEMO_ABB"
+msgstr "Not seçin"
+
diff --git a/po/update-po.sh b/po/update-po.sh
new file mode 100755 (executable)
index 0000000..79503cb
--- /dev/null
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+PACKAGE=memo
+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_US en_GB ja ko zh_CN"
+
+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
+               cp ${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/po/zh_CN.po b/po/zh_CN.po
new file mode 100644 (file)
index 0000000..0f40769
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEMO_POP_DIALOG_SAVE_MEMO"
+msgstr "要保存备忘录吗?"
+
+msgid "IDS_MEMO_POP_1_MEMO_SELECTED"
+msgstr "已选择1个备忘录"
+
+msgid "IDS_MEMO_POP_PD_MEMOS_SELECTED"
+msgstr "已选择%d个备忘录"
+
+msgid "IDS_MEMO_OPT_SEND_EMAIL"
+msgstr "发送邮件"
+
+msgid "IDS_MEMO_BODY_ADD_COMMENT"
+msgstr "添加评论"
+
+msgid "IDS_MEMO_BODY_ADD_TO_CONTACT"
+msgstr "添加到联系人"
+
+msgid "IDS_MEMO_BODY_DRAWING"
+msgstr "画图"
+
+msgid "IDS_MEMO_BODY_EDIT_NOTE"
+msgstr "编辑注释"
+
+msgid "IDS_MEMO_BODY_TEXT"
+msgstr "文本"
+
+msgid "IDS_MEMO_HEADER_SELECT_MEMO_ABB"
+msgstr "选择备忘录"
+
diff --git a/po/zh_HK.po b/po/zh_HK.po
new file mode 100644 (file)
index 0000000..fda2632
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEMO_POP_DIALOG_SAVE_MEMO"
+msgstr "要儲存備忘錄嗎?"
+
+msgid "IDS_MEMO_POP_1_MEMO_SELECTED"
+msgstr "已選擇 1 個備忘錄"
+
+msgid "IDS_MEMO_POP_PD_MEMOS_SELECTED"
+msgstr "已選擇 %d 個備忘錄"
+
+msgid "IDS_MEMO_OPT_SEND_EMAIL"
+msgstr "發送電子郵件"
+
+msgid "IDS_MEMO_BODY_ADD_COMMENT"
+msgstr "加入評語"
+
+msgid "IDS_MEMO_BODY_ADD_TO_CONTACT"
+msgstr "加到聯絡人"
+
+msgid "IDS_MEMO_BODY_DRAWING"
+msgstr "繪製"
+
+msgid "IDS_MEMO_BODY_EDIT_NOTE"
+msgstr "編輯記事"
+
+msgid "IDS_MEMO_BODY_TEXT"
+msgstr "文字"
+
+msgid "IDS_MEMO_HEADER_SELECT_MEMO_ABB"
+msgstr "選擇備忘錄"
+
diff --git a/po/zh_TW.po b/po/zh_TW.po
new file mode 100644 (file)
index 0000000..62efda8
--- /dev/null
@@ -0,0 +1,30 @@
+msgid "IDS_MEMO_POP_DIALOG_SAVE_MEMO"
+msgstr "要儲存備忘錄嗎?"
+
+msgid "IDS_MEMO_POP_1_MEMO_SELECTED"
+msgstr "已選取 1 項備忘錄"
+
+msgid "IDS_MEMO_POP_PD_MEMOS_SELECTED"
+msgstr "已選取 %d 項備忘錄"
+
+msgid "IDS_MEMO_OPT_SEND_EMAIL"
+msgstr "傳送電子郵件"
+
+msgid "IDS_MEMO_BODY_ADD_COMMENT"
+msgstr "加入評語"
+
+msgid "IDS_MEMO_BODY_ADD_TO_CONTACT"
+msgstr "加到聯絡人"
+
+msgid "IDS_MEMO_BODY_DRAWING"
+msgstr "繪圖"
+
+msgid "IDS_MEMO_BODY_EDIT_NOTE"
+msgstr "編輯備註"
+
+msgid "IDS_MEMO_BODY_TEXT"
+msgstr "文字"
+
+msgid "IDS_MEMO_HEADER_SELECT_MEMO_ABB"
+msgstr "選擇備忘錄"
+
diff --git a/scripts/copyright b/scripts/copyright
new file mode 100644 (file)
index 0000000..f317db9
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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/scripts/str.in b/scripts/str.in
new file mode 100644 (file)
index 0000000..22e63b1
--- /dev/null
@@ -0,0 +1,38 @@
+Add
+Add comment
+Add to contact
+Back
+Calendar
+Cancel
+Close
+Delete
+Done
+Drawing
+Edit
+Edit comment
+Edit drawing
+Edit note
+Email
+Memo
+Message
+New
+New drawing
+New note
+No
+Quit
+Save memo?
+Search
+Select all
+Select memo
+Send
+Send email
+Send message
+Set
+Share
+Text
+Video call
+Voice call
+Welcome to Samsung Memo
+Yes
+1 memo selected
+%d memos selected
diff --git a/scripts/string.sh b/scripts/string.sh
new file mode 100755 (executable)
index 0000000..a7804cf
--- /dev/null
@@ -0,0 +1,93 @@
+SYS_MO="$HOME/sbs/target-armel/usr/share/locale/en/LC_MESSAGES/sys_string.mo"
+APP_MO="$HOME/sbs/target-armel/opt/apps/com.samsung.memo/res/locale/en/LC_MESSAGES/memo.mo"
+TEMP_STR="./temp"
+IN="str.in"
+APP_NAME="memo"
+
+declare -a SYS_ID
+declare -a APP_ID
+declare -a CUSTOM_ID
+
+out=../include/"$APP_NAME""_string.h"
+rm -fr $out
+
+sbs -et apt-get install sys-string-0 -y --force-yes
+
+function get_str_id () {
+    local str=$1
+    local mo=$2
+    local result=""
+    if [[ -e $mo ]] ; then
+        result=`msgunfmt $mo | grep "\"$str\"" -B 1 | head -n 1 | awk '{print $2}'`
+    fi
+    echo $result
+}
+
+function get_tmp_id () {
+    local str=$1
+    local result=""
+    if [[ -e $TEMP_STR ]] ; then
+        result=`cat $TEMP_STR | grep "$str" -A 1 | tail -n 1 | awk '{print $1}'`
+    fi
+    echo $result
+}
+
+function gen_id () {
+    local prefix=$1
+    local str=$2
+    local id=$prefix`echo $str | tr a-z A-Z | sed "s/ /_/g" | sed "s/?//g" | sed "s/%//g"`
+    echo $id
+}
+
+function dump () {
+    local dest=$1
+    local str=$2
+    printf "$str\n" >> $dest
+}
+
+#copy right
+cat ./copyright > $out
+dump $out ""
+dump $out "#ifndef __MEMO_STRING_H__"
+dump $out "#define __MEMO_STRING_H__"
+
+LINES=`cat $IN |wc -l`
+for (( i=1; i<=$LINES; i++ )) ; do
+    string=`cat $IN | sed -n "$i p"`
+    sys_id=$(get_str_id "$string" "$SYS_MO")
+    app_id=$(get_str_id "$string" "$APP_MO")
+    tmp_id=$(get_tmp_id "$string")
+    if [ "$sys_id" != "" ] ; then
+        SYS_ID[${#SYS_ID[@]}]=$(gen_id "MEMO_I18N_" "$string") #append id to array
+        SYS_ID[${#SYS_ID[@]}]="dgettext(\"sys_string\", $sys_id) /* $string */" #append def to array
+    elif [ "$app_id" != "" ] ; then
+        APP_ID[${#APP_ID[@]}]=$(gen_id "MEMO_I18N_" "$string")
+        APP_ID[${#APP_ID[@]}]="dgettext(\"memo\", $app_id) /* $string */"
+    elif [ "$tmp_id" != "" ] ; then
+        CUSTOM_ID[${#CUSTOM_ID[@]}]=$(gen_id "MEMO_I18N_" "$string")
+        CUSTOM_ID[${#CUSTOM_ID[@]}]="dgettext(\"memo\", \"$tmp_id\") /* $string */"
+    else
+        CUSTOM_ID[${#CUSTOM_ID[@]}]=$(gen_id "MEMO_I18N_" "$string")
+        CUSTOM_ID[${#CUSTOM_ID[@]}]="_(\"$string\") /* $string */"
+    fi
+done
+
+#dump results
+dump $out ""
+dump $out "/* system string */"
+for (( i=0; i<${#SYS_ID[@]} ; i+=2 )) ; do
+    printf "#define %-36s %s\n" ${SYS_ID[$i]} "${SYS_ID[$i+1]}">> $out
+done
+dump $out ""
+dump $out "/* app string */"
+for (( i=0; i<${#APP_ID[@]} ; i+=2 )) ; do
+    printf "#define %-36s %s\n" ${APP_ID[$i]} "${APP_ID[$i+1]}">> $out
+done
+dump $out ""
+dump $out "/* custom string */"
+for (( i=0; i<${#CUSTOM_ID[@]} ; i+=2 )) ; do
+    printf "#define %-36s %s\n" "${CUSTOM_ID[$i]}" "${CUSTOM_ID[$i+1]}" >> $out
+done
+
+dump $out ""
+dump $out "#endif                /* __MEMO_STRING_H__ */"
diff --git a/scripts/temp b/scripts/temp
new file mode 100644 (file)
index 0000000..650ebc9
--- /dev/null
@@ -0,0 +1,2 @@
+#Add comment
+#IDS_MEMO_ADD_COMMENT
diff --git a/src/edit.c b/src/edit.c
new file mode 100644 (file)
index 0000000..b6644ba
--- /dev/null
@@ -0,0 +1,199 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <Elementary.h>
+#include <dlog.h>
+#include <ui-gadget-module.h>
+#include <supplement.h>
+#include <memo_string.h>
+#include <gravel.h>
+#include <extended-elm.h>
+#include <memo-assist.h>
+#include <memo_text_editor.h>
+#include <memo_doodle_editor.h>
+#include <memo-efl.h>
+#include <memo-genlist.h>
+
+typedef struct __edit_view_t {
+    ug_data_t *ugd;
+    Evas_Object *navigator;
+    Elm_Object_Item *navi_it;
+    Evas_Object *ctrl_bar;
+    Evas_Object *body_main;    /* content */
+    Evas_Object *l_btn;
+    Evas_Object *r_btn;
+    Eina_Bool drawing;    /* drawing or text mode */
+
+    /* add more variables here */
+    void *h_ed;
+} edit_view_t;
+
+static void _text_editor_callback(void *data, const char *msg, void *event);
+static void _doodle_editor_callback(void *data, const char *msg, void *event);
+extern service_h text_service;
+
+static void _on_left_btn_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+    edit_view_t *ev = (edit_view_t *)data;
+    if (ev->drawing) {
+        memo_doodle_editor_save(ev->h_ed);
+    } else {
+        memo_text_editor_save(ev->h_ed);
+    }
+}
+
+static void _on_right_btn_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+    edit_view_t *ev = (edit_view_t *)data;
+    if (ev->drawing) {
+        memo_doodle_editor_cancel(ev->h_ed);
+    } else {
+        memo_text_editor_cancel(ev->h_ed);
+    }
+}
+static void _text_editor_callback(void *data, const char *msg, void *event)
+{
+       edit_view_t *ev = (edit_view_t *)data;
+       if (strcmp(msg, "layout") == 0) {
+               elm_object_part_content_set(ev->body_main, "elm.swallow.content", (Evas_Object *)event);
+       } else if (strcmp(msg, "title") == 0) {
+               elm_object_item_text_set(ev->navi_it, (const char *)event);
+       } else if (strcmp(msg, "savable") == 0) {
+               elm_object_disabled_set(ev->r_btn, (int)event==0? EINA_TRUE:EINA_FALSE);
+       } else if (strcmp(msg, "save") == 0) {
+               ug_send_result(ev->ugd->ug,text_service);
+               service_destroy(text_service);
+               ug_destroy_me(ev->ugd->ug);
+       } else if (strcmp(msg, "cancel") == 0) {
+               ug_destroy_me(ev->ugd->ug);
+       } else if (strcmp(msg, "drawing") == 0) {
+               elm_object_part_content_unset(ev->body_main, "elm.swallow.content");
+               memo_destroy_text_editor(ev->h_ed);
+               ev->h_ed = memo_load_doodle_editor(ug_get_window(), ev->body_main, NULL, _doodle_editor_callback, ev);
+               ev->drawing = EINA_TRUE;
+       }
+}
+
+static void _doodle_editor_callback(void *data, const char *msg, void *event)
+{
+    edit_view_t *ev = (edit_view_t *)data;
+    if (strcmp(msg, "layout") == 0) {
+        elm_object_part_content_set(ev->body_main, "elm.swallow.content", (Evas_Object *)event);
+    } else if (strcmp(msg, "title") == 0) {
+        elm_object_item_text_set(ev->navi_it, (const char *)event);
+    } else if (strcmp(msg, "savable") == 0) {
+        elm_object_disabled_set(ev->r_btn, (int)event==0? EINA_TRUE:EINA_FALSE);
+    } else if (strcmp(msg, "save") == 0) {
+        ug_destroy_me(ev->ugd->ug);
+    } else if (strcmp(msg, "cancel") == 0) {
+        ug_destroy_me(ev->ugd->ug);
+    } else if (strcmp(msg, "text") == 0) {
+        elm_object_part_content_unset(ev->body_main, "elm.swallow.content");
+        memo_destroy_doodle_editor(ev->h_ed);
+        ev->h_ed = memo_load_text_editor(ug_get_window(), ev->body_main, NULL, _text_editor_callback, ev);
+        ev->drawing = EINA_FALSE;
+    }
+}
+
+static void _create_edit_layout(edit_view_t *ev, service_h data)
+{
+       ug_data_t *ugd = ev->ugd;
+
+       /* add navigationbar */
+       ev->navigator = elm_naviframe_add(ugd->base);
+       elm_object_part_content_set(ugd->base, "elm.swallow.content", ev->navigator);
+
+       /* custom body main here */
+       ev->body_main = elm_layout_create(ev->navigator, EDJ_FILE, "empty_layout");
+       /* compose */
+       elm_naviframe_prev_btn_auto_pushed_set(ev->navigator, EINA_FALSE);
+       Elm_Object_Item *navi_it = elm_naviframe_item_push(ev->navigator, MEMO_I18N_MEMO, NULL, NULL, ev->body_main, NULL);
+       ev->navi_it = navi_it;
+       /* buttons */
+       ev->r_btn = elm_button_create(ev->navigator, MEMO_I18N_CANCEL,
+                                                                       _on_right_btn_clicked, ev);
+    elm_object_style_set(ev->r_btn, "naviframe/back_btn/default");
+       elm_object_item_part_content_set(navi_it, "title_right_btn", ev->r_btn);
+       ev->l_btn = elm_button_create(ev->navigator, MEMO_I18N_DONE,
+                                                                               _on_left_btn_clicked, ev);
+    elm_object_style_set(ev->l_btn, "naviframe/title/icon/edit");
+       elm_object_item_part_content_set(navi_it, "title_left_btn", ev->l_btn);
+
+       /* load editor */
+       service_h service = NULL;
+       service_create(&service);
+
+       service_add_extra_data(service, "toggle", "disable");
+       if (service_key_check(data, "type", "draw")) {
+               ev->h_ed = memo_load_doodle_editor(ug_get_window(), ev->body_main, service, _doodle_editor_callback, ev);
+               ev->drawing = EINA_TRUE;
+       } else {
+               char *str = NULL;
+               service_get_extra_data(data, "text", &str);
+               if (str != NULL) { /* set init string */
+                       service_add_extra_data(service, "init_str", str);
+                       SFREE(str);
+               }
+               ev->h_ed = memo_load_text_editor(ug_get_window(), ev->body_main, service, _text_editor_callback, ev);
+               ev->drawing = EINA_FALSE;
+       }
+       service_destroy(service);
+}
+
+Eina_Bool edit_view_pre_condition_check(service_h service)
+{
+       char *str = NULL;
+       service_get_extra_data(service, "type", &str);
+       if (str != NULL) {
+               if (!strcmp(str, "edit")) {
+                       SFREE(str);
+                       return EINA_TRUE;
+               } else if (!strcmp(str, "draw")) {
+                       SFREE(str);
+                       return EINA_TRUE;
+               }
+               SFREE(str);
+       }
+       return EINA_FALSE;
+}
+
+void *memo_load_edit_view(ug_data_t *ugd, service_h service)
+{
+    edit_view_t *ev = SMALLOC(edit_view_t);
+    RETVIF(ev == NULL, NULL);
+    ev->ugd = ugd;
+
+    _create_edit_layout(ev, service);
+    return (void *)ev;
+}
+
+void memo_del_edit_view(void *h_ev)
+{
+    edit_view_t *ev = (edit_view_t *) h_ev;
+    elm_object_part_content_unset(ev->body_main, "elm.swallow.content");
+    if (ev->drawing) {
+        memo_destroy_doodle_editor(ev->h_ed);
+    } else {
+        memo_destroy_text_editor(ev->h_ed);
+    }
+    evas_object_del(ev->navigator);
+    SFREE(ev);
+}
+
diff --git a/src/memo-assist.c b/src/memo-assist.c
new file mode 100644 (file)
index 0000000..ff25664
--- /dev/null
@@ -0,0 +1,637 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 <unicode/ustring.h>
+#include <unicode/utypes.h>
+#include <unicode/udat.h>
+#include <unicode/udatpg.h>
+#include <iniparser.h>
+#include <dictionary.h>
+#include <vconf-keys.h>
+#include <vconf.h>
+#include <gravel.h>
+#include <extended-elm.h>
+#include <supplement.h>
+#include <memo-assist.h>
+#include <appcore-common.h>
+
+#define ICU_TIME_BUFFER 256
+static UDateFormat* dfmt = NULL;
+
+/**
+ * memo_get_doodle_title
+ *
+ * @brief
+ *
+ * @return
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+char *memo_get_doodle_title()
+{
+    memo_data_list_t *l = NULL;
+    memo_data_list_t *t = NULL;
+    char buf[MEMO_BUFFER_SIZE];
+    int i = 0;
+    int d = 0;
+    l = memo_get_all_data_list();
+    for (t = l; t != NULL; t = t->next) {
+        if (t->md.has_doodle) {
+            d = atoi(t->md.content + strlen(DOODLE_TITLE_PREFIX));
+            i = (d > i) ? d : i;
+        }
+    }
+    i++;
+    snprintf(buf, MEMO_BUFFER_SIZE, "%s%04d", DOODLE_TITLE_PREFIX, i);
+    memo_free_data_list(l);
+    return strdup(buf);
+}
+
+void icu_init()
+{
+    UErrorCode status = U_ZERO_ERROR;
+    const char *locale;
+    UChar ubuf[ICU_TIME_BUFFER];
+    UChar bestPattern[ICU_TIME_BUFFER];
+    UDateTimePatternGenerator *generator;
+    enum appcore_time_format timeformat;
+    char *timezone_id = NULL;
+    UChar utimezone_id[256] = {0,};
+
+    /* reset timezone according to vconf */
+    timezone_id = vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_ID);
+    u_uastrcpy(utimezone_id, timezone_id);
+    SFREE(timezone_id);
+    ucal_setDefaultTimeZone(utimezone_id , &status);
+    /* init */
+    uloc_setDefault(getenv("LC_TIME"), &status); /* ICU API to set default locale */
+    locale = uloc_getDefault();
+    /* format */
+    appcore_get_timeformat(&timeformat);
+    if (timeformat==APPCORE_TIME_FORMAT_24) {
+        /* 14 May 09 15:37 */
+        u_strFromUTF8(ubuf, MEMO_BUFFER_SIZE, NULL, "dMMMyyHHmm", -1, &status);
+    } else {
+        /* 14 May 09 03:37 PM */
+        u_strFromUTF8(ubuf, MEMO_BUFFER_SIZE, NULL, "dMMMyyhhmma", -1, &status);
+    }
+    /* get pattern */
+    generator = udatpg_open(locale, &status);
+    udatpg_getBestPattern(generator, ubuf, u_strlen(ubuf), bestPattern, ICU_TIME_BUFFER, &status);
+    udatpg_close(generator);
+    /* format */
+    if (dfmt != NULL) {
+        udat_close(dfmt);
+    }
+    dfmt = udat_open(UDAT_IGNORE, UDAT_IGNORE, locale, NULL, -1, bestPattern, -1, &status);
+}
+
+/**
+ * memo_time_format
+ *
+ * @brief
+ *
+ * @param   [in] buf    buffer used to store formated time
+ *
+ * @param   [in] len    length of buf
+ *
+ * @param   [in] time  actual time
+ *
+ * @return
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+void memo_time_format(char *buf, int len, time_t time)
+{
+    UErrorCode status = U_ZERO_ERROR;
+    UChar ubuf[ICU_TIME_BUFFER];
+
+    if (dfmt == NULL) {
+        icu_init();
+    }
+    udat_format(dfmt, (UDate)time*1000, ubuf, ICU_TIME_BUFFER, NULL, &status);
+    u_strToUTF8(buf, len, NULL, ubuf, -1, &status);
+}
+
+time_t memo_get_binary_release_date()
+{
+    struct tm time = {0};
+    char *date = NULL;
+    dictionary *about_dic = iniparser_load("/etc/info.ini");
+
+    RETVIF(about_dic==NULL, 0);
+    date = iniparser_getstr(about_dic, "Build:Date");
+    strptime(date, "%Y.%m.%d", &time);
+    iniparser_freedict(about_dic);
+    return timelocal(&time);
+}
+
+/**
+ * mouse_event_identify
+ *
+ * @brief
+ *
+ * @param   [in] startx
+ *
+ * @param   [in] starty
+ *
+ * @param   [in] endx
+ *
+ * @param   [in] endy
+ *
+ * @return
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+mouse_behaviour_t mouse_event_identify(int startx, int starty, int endx, int endy)
+{
+    int gapx = 0;
+    int gapy = 0;
+
+    if ((startx == MOUSE_POSITION_INVALID)
+        || (starty == MOUSE_POSITION_INVALID)
+        || (endx == MOUSE_POSITION_INVALID)
+        || (endy == MOUSE_POSITION_INVALID)) {
+        return MOUSE_EVENT_INVALID;
+    }
+
+    gapx = endx - startx;
+    gapy = endy - starty;
+    if ((abs(gapx) <= 10) && (abs(gapy) <= 10)) {    /* click */
+        return MOUSE_EVENT_CLICK;
+    } else if (abs(gapx) > abs(gapy)) {    /* horizonal drag */
+        return gapx > 0 ? MOUSE_EVENT_DRAG_RIGHT : MOUSE_EVENT_DRAG_LEFT;
+    } else {        /* vertical drag */
+        return gapy > 0 ? MOUSE_EVENT_DRAG_DOWN : MOUSE_EVENT_DRAG_UP;
+    }
+}
+
+static void _evas_object_on_mouse_down(void *data, Evas *e, Evas_Object *evas_obj, void *event_info)
+{
+    Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down *)event_info;
+    evas_object_data_set(evas_obj, "startx", (const void *)ev->output.x);
+    evas_object_data_set(evas_obj, "starty", (const void *)ev->output.y);
+}
+
+static void _evas_object_on_mouse_up(void *data, Evas *e, Evas_Object *evas_obj, void *event_info)
+{
+    Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down *)event_info;
+    int startx = (int)evas_object_data_get(evas_obj, "startx");
+    int starty = (int)evas_object_data_get(evas_obj, "starty");
+    Evas_Smart_Cb on_flick = (Evas_Smart_Cb)evas_object_data_get(evas_obj, "on_flick");
+    mouse_behaviour_t mbt = mouse_event_identify(startx, starty, ev->output.x, ev->output.y);
+    evas_object_data_set(evas_obj, "startx", (const void *)MOUSE_POSITION_INVALID);
+    evas_object_data_set(evas_obj, "starty", (const void *)MOUSE_POSITION_INVALID);
+    if (on_flick != NULL) {
+        on_flick(data, evas_obj, (void *)mbt);
+    }
+}
+
+void evas_object_flick_callback_add(Evas_Object *obj, Evas_Smart_Cb on_flick, void *data)
+{
+    evas_object_data_set(obj, "startx", (const void *)MOUSE_POSITION_INVALID);
+    evas_object_data_set(obj, "starty", (const void *)MOUSE_POSITION_INVALID);
+    evas_object_data_set(obj, "on_flick", (const void *)on_flick);
+    evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_DOWN, _evas_object_on_mouse_down, data);
+    evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_UP, _evas_object_on_mouse_up, data);
+}
+
+void memo_com_dummy_cb(void *data, const char *msg, void *event)
+{
+    LOGD("msg : %s\n", msg);
+}
+
+typedef struct __pop_data_t {
+    Evas_Smart_Cb on_yes;
+    Evas_Smart_Cb on_no;
+    void *user_data;
+    Evas_Object *pop;
+} pop_data_t;
+
+static void _on_yes_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       pop_data_t *pData = (pop_data_t *)data;
+        if (pData->on_yes != NULL) {
+            pData->on_yes(pData->user_data, obj, event_info);
+        }
+        evas_object_del(pData->pop);
+       SFREE(pData);
+}
+
+static void _on_no_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       pop_data_t *pData = (pop_data_t *)data;
+        if (pData->on_no != NULL) {
+            pData->on_no(pData->user_data, obj, event_info);
+        }
+        evas_object_del(pData->pop);
+       SFREE(pData);
+}
+
+/**
+ * memo_create_yes_no_popup
+ *
+ * @brief
+ *
+ * @param   [in] win
+ *
+ * @param   [in] msg
+ *
+ * @param   [in] on_yes
+ *
+ * @param   [in] on_no
+ *
+ * @param   [in] data
+ *
+ * @return
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+void memo_create_yes_no_popup(Evas_Object *win, const char *msg, Evas_Smart_Cb on_yes, Evas_Smart_Cb on_no, void *data)
+{
+    pop_data_t *pd = SMALLOC(pop_data_t);
+    RETIF(pd == NULL);
+
+    pd->on_yes = on_yes;
+    pd->on_no = on_no;
+    pd->user_data = data;
+    Evas_Object *popup = elm_popup_add(win);
+    pd->pop = popup;
+    evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    elm_object_text_set(popup, msg);
+    Evas_Object *btn1 = elm_button_add(popup);
+    elm_object_text_set(btn1, MEMO_I18N_YES);
+    elm_object_part_content_set(popup, "button1", btn1);
+    evas_object_smart_callback_add(btn1, "clicked", _on_yes_cb, pd);
+    Evas_Object *btn2 = elm_button_add(popup);
+    elm_object_text_set(btn2, MEMO_I18N_NO);
+    elm_object_part_content_set(popup, "button2", btn2);
+    evas_object_smart_callback_add(btn2, "clicked", _on_no_cb, pd);
+    evas_object_show(popup);
+}
+
+void memo_tool_btn_focus_set(Evas_Object *eo, Eina_Bool status)
+{
+    edje_object_signal_emit(elm_layout_edje_get(eo), (status ? "focus" : "normal"), "elm");
+}
+
+static void _set_bg(Evas_Object *obj, service_h service)
+{
+       unsigned char *color = NULL;
+       int bg_color = 0xFFFFFFFF; /* ARGB */
+       char *s = NULL;
+       service_get_extra_data(service, "bg_color" , &s);
+       if (s != NULL) {
+               bg_color = atoi(s);
+               SFREE(s);
+       }
+       color = (unsigned char *)&bg_color;
+       evas_object_color_set(obj, color[2], color[1], color[0], color[3]);
+}
+
+typedef struct __font_size_selector_t {
+    Evas_Object *parent;
+    Memo_Component_Callback cb;
+    void *data;
+    /* content */
+    Evas_Object *body_main;
+    Evas_Object *slider;
+    Evas_Object *label;
+    Evas_Object *event_rect; /* for sweep */
+    /* other */
+    int min;
+    int max;
+    int current;
+}font_size_selector_t;
+
+static void _on_font_size_change_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    font_size_selector_t *fss = (font_size_selector_t *)data;
+    fss->current = elm_slider_value_get(fss->slider);
+    char buf[MEMO_BUFFER_SIZE];
+    snprintf(buf, MEMO_BUFFER_SIZE, "<color=#000000FF><font_size=%d><align=center>Abc</align></font_size></color>", fss->current);
+    elm_object_text_set(fss->label, buf);
+    fss->cb(fss->data, "change", (void *)fss->current);
+}
+
+static void _fss_on_flick(void *data, Evas_Object *evas_obj, void *event_info)
+{
+    font_size_selector_t *fss = (font_size_selector_t *)data;
+    if ((mouse_behaviour_t)event_info == MOUSE_EVENT_DRAG_DOWN) {
+        fss->cb(fss->data, "flick,down", (void *)fss->current);
+    }
+}
+
+void *memo_load_font_size_selector(Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data)
+{
+       font_size_selector_t *fss = SMALLOC(font_size_selector_t);
+       RETVIF(fss==NULL, NULL);
+       service_dump(service);
+       fss->parent = parent;
+       fss->cb = (cb==NULL ? memo_com_dummy_cb : cb); /* make sure cb is not null, no need to check legitimacy of cb when call */
+       fss->data = data;
+
+       /* init */
+       fss->min = 20;
+       fss->max = 60;
+       fss->current = 30;
+       char *s = NULL;
+       service_get_extra_data(service, "current", &s);
+       if (s != NULL) {
+               fss->current = atoi(s);
+               SFREE(s);
+       }
+
+       fss->body_main = elm_layout_create(fss->parent, EDJ_FILE, "font_size_selector");
+       fss->cb(fss->data, "layout", fss->body_main);
+
+       /* background */
+       Evas_Object *bg = evas_object_rectangle_add(evas_object_evas_get(parent));
+       _set_bg(bg, service);
+       elm_object_part_content_set(fss->body_main, "bg.color", bg);
+       /* slider */
+       fss->slider = elm_slider_add(fss->body_main);
+       elm_object_style_set(fss->slider, "expanded_indicator_button");
+       elm_slider_indicator_show_set(fss->slider, EINA_TRUE);
+       elm_slider_min_max_set(fss->slider, fss->min, fss->max);
+       elm_slider_indicator_format_set(fss->slider, "%1.0f");
+       elm_slider_value_set(fss->slider, fss->current);
+       evas_object_smart_callback_add(fss->slider, "changed", _on_font_size_change_cb, fss);
+       elm_object_part_content_set(fss->body_main, "elm.swallow.selector", fss->slider);
+       /* preview text */
+       fss->label = elm_label_add(fss->body_main);
+       char buf[MEMO_BUFFER_SIZE];
+       snprintf(buf, MEMO_BUFFER_SIZE, "<color=#000000FF><font_size=%d><align=center>Abc</align></font_size></color>", fss->current);
+       elm_object_text_set(fss->label, buf);
+       elm_object_part_content_set(fss->body_main, "elm.swallow.label", fss->label);
+       /* for flick event */
+       fss->event_rect = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(fss->body_main), "event");
+       evas_object_flick_callback_add(fss->event_rect, _fss_on_flick, fss);
+
+       return (void *)fss;
+}
+
+void memo_del_font_size_selector(void *h_fss)
+{
+    font_size_selector_t *fss = (font_size_selector_t *)h_fss;
+    evas_object_del(fss->body_main);
+    SFREE(fss);
+}
+
+typedef struct __color_selector_t {
+    Evas_Object *parent;
+    Memo_Component_Callback cb;
+    void *data;
+    /* content */
+    Evas_Object *body_main;
+    Evas_Object *selector;
+    Evas_Object *rect; /* color rect */
+    Evas_Object *event_rect; /* for sweep */
+    /* other */
+    int color; /* ARGB */
+}color_selector_t;
+
+static void _on_color_change_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    int r, g, b, a;
+    color_selector_t *cs = (color_selector_t *)data;
+    elm_colorselector_color_get(cs->selector, &r, &g, &b, &a);
+    evas_object_color_set(cs->rect, r, g, b, a);
+    int color = ARGB_JOIN(a, r, g, b);
+    if (cs->color != color) {
+        cs->color = color;
+        cs->cb(cs->data, "change", (void *)cs->color);
+    }
+}
+
+static void _cs_on_flick(void *data, Evas_Object *evas_obj, void *event_info)
+{
+    color_selector_t *cs = (color_selector_t *)data;
+    if ((mouse_behaviour_t)event_info == MOUSE_EVENT_DRAG_DOWN) {
+        cs->cb(cs->data, "flick,down", (void *)cs->color);
+    }
+}
+
+void *memo_load_color_selector(Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data)
+{
+    color_selector_t *cs = SMALLOC(color_selector_t);
+    RETVIF(cs==NULL, NULL);
+    service_dump(service);
+    cs->parent = parent;
+    cs->cb = (cb==NULL ? memo_com_dummy_cb : cb); /* make sure cb is not null, no need to check legitimacy of cb when call */
+    cs->data = data;
+
+    /* init */
+    cs->color = 0xff000000;
+    char *s = NULL;
+    service_get_extra_data(service, "color" , &s);
+    if (s != NULL) {
+        cs->color = atoi(s);
+       SFREE(s);
+    }
+    cs->body_main = elm_layout_create(cs->parent, EDJ_FILE, "color_selector");
+    cs->cb(cs->data, "layout", cs->body_main);
+
+    /* background */
+    service_get_extra_data(service, "bg_color", &s);
+    if (s != NULL) {
+        edje_object_signal_emit(elm_layout_edje_get(cs->body_main), "white", "elm");
+       SFREE(s);
+    } else {
+        edje_object_signal_emit(elm_layout_edje_get(cs->body_main), "black", "elm");
+    }
+    /* selector */
+    cs->selector = elm_colorselector_add(cs->body_main);
+    elm_colorselector_mode_set(cs->selector, ELM_COLORSELECTOR_COMPONENTS);
+    elm_object_part_content_set(cs->body_main, "elm.swallow.selector", cs->selector);
+    unsigned char *color = (unsigned char *)&cs->color;
+    elm_colorselector_color_set(cs->selector, color[2], color[1], color[0], color[3]);
+    evas_object_smart_callback_add(cs->selector, "changed", _on_color_change_cb, cs);
+    /* preview color rect */
+    cs->rect = evas_object_rectangle_add(evas_object_evas_get(parent));
+    evas_object_color_set(cs->rect, color[2], color[1], color[0], color[3]);
+    elm_object_part_content_set(cs->body_main, "elm.swallow.color", cs->rect);
+    /* for flick event */
+    cs->event_rect = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(cs->body_main), "event");
+    evas_object_flick_callback_add(cs->event_rect, _cs_on_flick, cs);
+
+    return (void *)cs;
+}
+
+void memo_del_color_selector(void *h_cs)
+{
+    color_selector_t *cs = (color_selector_t *)h_cs;
+    evas_object_del(cs->body_main);
+    SFREE(cs);
+}
+
+typedef struct __pencil_size_selector_t {
+    Evas_Object *parent;
+    Memo_Component_Callback cb;
+    void *data;
+    /* content */
+    Evas_Object *body_main;
+    Evas_Object *slider;
+    Evas_Object *rect; /* previw rect */
+    Evas_Object *event_rect; /* for sweep */
+    /* other */
+    int min;
+    int max;
+    int current;
+}pencil_size_selector_t;
+
+static void _on_pencil_size_change_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    pencil_size_selector_t *pss = (pencil_size_selector_t *)data;
+    pss->current = elm_slider_value_get(pss->slider);
+    evas_object_size_hint_min_set(pss->rect, 0, pss->current);
+    pss->cb(pss->data, "change", (void *)pss->current);
+}
+
+static void _pss_on_flick(void *data, Evas_Object *evas_obj, void *event_info)
+{
+    pencil_size_selector_t *pss = (pencil_size_selector_t *)data;
+    if ((mouse_behaviour_t)event_info == MOUSE_EVENT_DRAG_DOWN) {
+        pss->cb(pss->data, "flick,down", (void *)pss->current);
+    }
+}
+
+void *memo_load_pencil_size_selector(Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data)
+{
+    pencil_size_selector_t *pss = SMALLOC(pencil_size_selector_t);
+    RETVIF(pss==NULL, NULL);
+    service_dump(service);
+    pss->parent = parent;
+    pss->cb = (cb==NULL ? memo_com_dummy_cb : cb); /* make sure cb is not null, no need to check legitimacy of cb when call */
+    pss->data = data;
+
+    /* init */
+    pss->min = 1;
+    pss->max = 8;
+    pss->current = 8;
+    char *s = NULL;
+    service_get_extra_data(service, "current", &s);
+    if (s != NULL) {
+        pss->current = atoi(s);
+       SFREE(s);
+    }
+
+    pss->body_main = elm_layout_create(pss->parent, EDJ_FILE, "pencil_size_selector");
+    pss->cb(pss->data, "layout", pss->body_main);
+
+    /* background */
+    Evas_Object *bg = evas_object_rectangle_add(evas_object_evas_get(parent));
+    _set_bg(bg, service);
+    elm_object_part_content_set(pss->body_main, "bg.color", bg);
+    /* slider */
+    pss->slider = elm_slider_add(pss->body_main);
+    elm_object_style_set(pss->slider, "expanded_indicator_button");
+    elm_slider_indicator_show_set(pss->slider, EINA_TRUE);
+    elm_slider_min_max_set(pss->slider, pss->min, pss->max);
+    elm_slider_indicator_format_set(pss->slider, "%1.0f");
+    elm_slider_value_set(pss->slider, pss->current);
+    evas_object_smart_callback_add(pss->slider, "changed", _on_pencil_size_change_cb, pss);
+    elm_object_part_content_set(pss->body_main, "elm.swallow.selector", pss->slider);
+    /* preview size rect */
+    pss->rect = evas_object_rectangle_add(evas_object_evas_get(parent));
+    evas_object_color_set(pss->rect, 0, 0, 0, 255);
+    evas_object_size_hint_min_set(pss->rect, 0, pss->current);
+    elm_object_part_content_set(pss->body_main, "elm.swallow.pencil", pss->rect);
+    /* for flick event */
+    pss->event_rect = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(pss->body_main), "event");
+    evas_object_flick_callback_add(pss->event_rect, _pss_on_flick, pss);
+
+    return (void *)pss;
+}
+
+void memo_del_pencil_size_selector(void *h_pss)
+{
+    pencil_size_selector_t *pss = (pencil_size_selector_t *)h_pss;
+    evas_object_del(pss->body_main);
+    SFREE(pss);
+}
+
+void memo_navigator_pop(Evas_Object *navi)
+{
+    Elm_Object_Item *top_it = elm_naviframe_top_item_get(navi);
+    Evas_Object *eo = elm_object_item_content_get(top_it);
+    Evas_Object *prev_eo = evas_object_data_get(eo, "previous_obj");
+    if(prev_eo == NULL) { /* exit when view stack is empty */
+        elm_exit();
+    } else {
+        Evas_Smart_Cb cb = evas_object_data_get(prev_eo, "update_cb");
+        RETIF(cb == NULL);
+        void *cb_data = evas_object_data_get(prev_eo, "update_data");
+        cb(cb_data, NULL, NULL);
+    }
+    elm_naviframe_item_pop(navi);
+}
+
+Elm_Object_Item *memo_naviframe_item_push(Evas_Object *obj, const char *title_label,
+    Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style)
+{
+    Elm_Object_Item *top_it = elm_naviframe_top_item_get(obj);
+    if (top_it != NULL) {
+        Evas_Object *eo = elm_object_item_content_get(top_it);
+        if (eo != NULL) {
+            evas_object_data_set(content, "previous_obj", eo);
+        }
+    }
+
+    return elm_naviframe_item_push(obj, title_label, prev_btn, next_btn, content, item_style);
+}
+
+Evas_Object *memo_controlbar_add(Evas_Object *parent)
+{
+       Evas_Object *toolbar = elm_toolbar_add(parent);
+       elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_EXPAND);
+       elm_toolbar_homogeneous_set(toolbar, EINA_FALSE);
+       return toolbar;
+}
+
+void memo_comment_recover(Evas_Object *entry, const char *orig_utf8)
+{
+    if (orig_utf8 == NULL) {
+        elm_entry_entry_set(entry, MEMO_I18N_ADD_COMMENT);
+    } else {
+        char *content = elm_entry_utf8_to_markup(orig_utf8);
+        elm_entry_entry_set(entry, content);
+        SFREE(content);
+    }
+}
diff --git a/src/memo-efl.c b/src/memo-efl.c
new file mode 100644 (file)
index 0000000..47ab308
--- /dev/null
@@ -0,0 +1,270 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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_MODULE_API
+#define UG_MODULE_API __attribute__ ((visibility("default")))
+#endif
+
+#include <Elementary.h>
+#include <ui-gadget-module.h>
+#include <supplement.h>
+#include <memo_ug.h>
+#include "memo-efl.h"
+#include "gravel.h"
+
+
+static Evas_Object *create_fullview(Evas_Object *parent, struct ug_data *ugd)
+{
+    Evas_Object *base;
+
+    base = elm_layout_add(parent);
+    if (!base)
+        return NULL;
+    elm_layout_theme_set(base, "layout", "application", "default");
+
+    /* set bg */
+    Evas_Object *bg = elm_bg_add(base);
+    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    elm_object_part_content_set(base, "elm.swallow.bg", bg);
+
+    return base;
+}
+
+static Evas_Object *create_frameview(Evas_Object *parent, struct ug_data *ugd)
+{
+    Evas_Object *base;
+
+    base = elm_layout_add(parent);
+    if (!base)
+        return NULL;
+    elm_layout_theme_set(base, "layout", "application", "default");
+
+    return base;
+}
+
+static Evas_Object *create_error_popup_layout(Evas_Object *parent, bool is_fullview)
+{
+    Evas_Object *base;
+
+    base = elm_layout_add(parent);
+    if (!base)
+        return NULL;
+
+    if (is_fullview)
+        elm_layout_theme_set(base, "layout", "application", "default");
+    else
+        elm_layout_theme_set(base, "layout", "application", "noindicator");
+
+    evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+    return base;
+}
+
+void memo_ug_hide_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       ug_destroy_me(data);
+}
+
+static void *on_create(ui_gadget_h ug, enum ug_mode mode, service_h service, void *priv)
+{
+       Evas_Object *parent;
+       struct ug_data *ugd;
+       char *index = NULL;
+
+       if (!ug || !priv)
+               return NULL;
+
+       ugd = priv;
+       ugd->ug = ug;
+
+       service_dump(service);
+
+       /* theme extension */
+       ugd->th = elm_theme_new();
+       elm_theme_ref_set(ugd->th, NULL);
+       elm_theme_extension_add(ugd->th, EDJ_FILE);
+
+       /* open database */
+       memo_init(NULL);
+
+       /* i18n */
+       bindtextdomain("memo", LOCALEDIR);
+
+       parent = ug_get_parent_layout(ug);
+       if (!parent)
+               return NULL;
+
+       service_get_extra_data(service, "index", &index);
+       if (index != NULL) {/* legitimacy check of memo record */
+               memo_data_t *md = memo_get_data(atoi(index));
+               if (md == NULL) {
+                       if (mode == UG_MODE_FULLVIEW)
+                               ugd->base = create_error_popup_layout(parent, TRUE);
+                       else
+                               ugd->base = create_error_popup_layout(parent, FALSE);
+
+                       Evas_Object *popup;
+                       popup = elm_popup_add(ugd->base);
+                       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                       elm_object_text_set(popup, dgettext("sys_string", "IDS_COM_POP_FILE_NOT_FOUND"));
+                       elm_popup_timeout_set(popup, 1.5);
+                       evas_object_show(popup);
+                       ugd->ug = ug;
+                       evas_object_smart_callback_add(popup, "timeout", memo_ug_hide_cb, ugd->ug);
+                       SFREE(index);
+                       return ugd->base;
+               } else {
+                       memo_free_data(md);
+               }
+       }
+
+       if (mode == UG_MODE_FULLVIEW)
+               ugd->base = create_fullview(parent, ugd);
+       else
+               ugd->base = create_frameview(parent, ugd);
+
+       if (ugd->base) {
+               if (edit_view_pre_condition_check(service)) {
+                       ugd->h_ug = memo_load_edit_view(ugd, service);
+               } else if (service_key_check(service, "type", "select")) {
+                       memo_load_select_view(ugd, service);
+               } else if (index != NULL) {
+                       SFREE(index);
+                       memo_load_detail_view(ugd, service);
+               } else {
+                       memo_load_select_view(ugd, service);
+               }
+       }
+       SFREE(index);
+       return ugd->base;
+}
+
+static void on_start(ui_gadget_h ug, service_h service, void *priv)
+{
+}
+
+static void on_pause(ui_gadget_h ug, service_h service, void *priv)
+{
+
+}
+
+static void on_resume(ui_gadget_h ug, service_h service, void *priv)
+{
+
+}
+
+static void on_destroy(ui_gadget_h ug, service_h service, void *priv)
+{
+    struct ug_data *ugd;
+
+    if (!ug || !priv)
+        return;
+
+    /* close database */
+    memo_fini();
+
+    ugd = priv;
+
+    /* free theme */
+    elm_theme_extension_del(ugd->th, EDJ_FILE);
+    elm_theme_free(ugd->th);
+    ugd->th = NULL;
+
+    if (ugd->h_ug != NULL) {
+        memo_del_edit_view(ugd->h_ug);
+        ugd->h_ug = NULL;
+    }
+    evas_object_del(ugd->base);
+    ugd->base = NULL;
+}
+
+static void on_message(ui_gadget_h ug, service_h msg, service_h service, void *priv)
+{
+}
+
+static void on_event(ui_gadget_h ug, enum ug_event event, service_h service, void *priv)
+{
+    switch (event) {
+    case UG_EVENT_LOW_MEMORY:
+        break;
+    case UG_EVENT_LOW_BATTERY:
+        break;
+    case UG_EVENT_LANG_CHANGE:
+        break;
+    case UG_EVENT_ROTATE_PORTRAIT:
+        break;
+    case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN:
+        break;
+    case UG_EVENT_ROTATE_LANDSCAPE:
+        break;
+    case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN:
+        break;
+    default:
+        break;
+    }
+}
+
+static void on_key_event(ui_gadget_h ug, enum ug_key_event event, service_h service, void *priv)
+{
+    if (!ug)
+        return;
+
+    switch (event) {
+    case UG_KEY_EVENT_END:
+        ug_destroy_me(ug);
+        break;
+    default:
+        break;
+    }
+}
+
+UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops)
+{
+    struct ug_data *ugd;
+
+    if (!ops)
+        return -1;
+
+    ugd = calloc(1, sizeof(struct ug_data));
+    if (!ugd)
+        return -1;
+
+    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->key_event = on_key_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)
+        return;
+
+    ugd = ops->priv;
+    if (ugd)
+        free(ugd);
+}
diff --git a/src/memo-genlist.c b/src/memo-genlist.c
new file mode 100644 (file)
index 0000000..c24bf79
--- /dev/null
@@ -0,0 +1,290 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 <gravel.h>
+#include <extended-elm.h>
+#include <memo-db.h>
+#include <appcore-common.h>
+#include <memo-assist.h>
+#include <memo_string.h>
+#include <memo-genlist.h>
+
+static void _str_append_utf8(char *s, int size, const char *utf8)
+{
+    char *content = NULL;
+    content = elm_entry_utf8_to_markup(utf8);
+    RETIF(content == NULL);
+    sncat(s,size, content);
+    SFREE(content);
+}
+/**
+ * memo_gl_label_get
+ *
+ * @brief
+ *
+ * @param   [in] data   user specified data
+ *
+ * @param   [in] obj    evas_object of elm_genlist_item
+ *
+ * @param   [in] part   part name in genlist group
+ *
+ * @return
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+char *memo_gl_label_get(void *data, Evas_Object *obj, const char *part)
+{
+    gl_data_t *gld = (gl_data_t *)data;
+    char buf[MEMO_BUFFER_SIZE] = {0};
+    char input[MEMO_BUFFER_SIZE] = {0};
+    char output[MEMO_BUFFER_SIZE] = {0};
+    const char *p = NULL;
+    const char *pre = NULL;
+
+    if (!strcmp(part, "elm.text.date")) {
+        memo_time_format(buf, MEMO_BUFFER_SIZE, gld->mod_time);
+        return strdup(buf);
+    } else if (!strcmp(part, "elm.slide.text.1")) {
+        if (gld->index == -1) {
+            return strdup(MEMO_I18N_WELCOME_TO_TIZEN_MEMO);
+        } else {
+            memo_data_t *md = memo_get_data(gld->index);
+            snprintf(input, MEMO_BUFFER_SIZE, "%s",
+                (md->comment == NULL ? md->content : md->comment)); /* limit input */
+            memo_free_data(md);
+            return strdup(input);
+        }
+    } else if (!strcmp(part, "elm.text")) {
+        if (gld->index == -1) {
+            return strdup(MEMO_I18N_WELCOME_TO_TIZEN_MEMO);
+        } else {
+            memo_data_t *md = memo_get_data(gld->index);
+            /* limit input */
+            if (md->comment != NULL) {
+                snprintf(input, MEMO_BUFFER_SIZE, "%s", md->comment);
+            } else {
+                snprintf(input, MEMO_BUFFER_SIZE, "%s", md->content);
+            }
+            /* truncate to single line */
+            p = strstr(input, "\342\200\251");
+            if (p != NULL) {
+                input[p-input] = '\0';
+            }
+            /* font color information */
+            unsigned char *color = (unsigned char *)&md->font_color;
+            snprintf(output, MEMO_BUFFER_SIZE, "<color=#%02x%02x%02x>", color[2], color[1], color[0]);
+            /* append text information */
+            if (gld->search == NULL) {
+                _str_append_utf8(output, MEMO_BUFFER_SIZE, input);
+            } else {
+                pre = input;
+                /* search and composite */
+                p = (const char *)strcasestr(pre, gld->search);
+                if (p != NULL) {
+                    /* append characters before matched string */
+                    if (p != pre) {
+                        buf[0]='\0';
+                        strncat(buf, pre, p-pre);
+                        _str_append_utf8(output, MEMO_BUFFER_SIZE, buf);
+                    }
+                    /* highlight str */
+                    sncat(output, MEMO_BUFFER_SIZE, "<color=#FF0000>");
+                    buf[0]='\0';
+                    strncat(buf, p, strlen(gld->search));
+                    _str_append_utf8(output, MEMO_BUFFER_SIZE, buf);
+                    sncat(output, MEMO_BUFFER_SIZE, "</color>");
+                    /* set pointer after matched string */
+                    pre = p+strlen(gld->search);
+                }
+                /* append remaining string */
+                _str_append_utf8(output, MEMO_BUFFER_SIZE, pre);
+            }
+            memo_free_data(md);
+            return strdup(output);
+        }
+    }
+    return NULL;
+}
+
+/**
+ * memo_gl_icon_get
+ *
+ * @brief
+ *
+ * @param   [in] data   user specified data
+ *
+ * @param   [in] obj    evas_object of elm_genlist_item
+ *
+ * @param   [in] part   part name in genlist group
+ *
+ * @return
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+Evas_Object *memo_gl_icon_get(void *data, Evas_Object *obj, const char *part)
+{
+    gl_data_t *gld = (gl_data_t *)data;
+    char buf[MEMO_BUFFER_SIZE];
+    Evas_Object *eo = NULL;
+
+    if (!strcmp(part, "elm.swallow.doodle")) {
+        if (gld->has_doodle != 0) {
+            snprintf(buf, MEMO_BUFFER_SIZE, DOODLEDIR "/%d.png", gld->index);
+            eo = elm_icon_create(obj, buf);
+        }
+    } else if (!strcmp(part, "elm.swallow.check")) {
+        if (gld->index != -1) {    /* only add checkbox for non-sentinel data, as required by CQ defect H0100123202 */
+            eo = elm_check_add(obj);
+            elm_check_state_pointer_set(eo, &gld->check);
+            if (gld->on_change != NULL) {
+                evas_object_smart_callback_add(eo, "changed", gld->on_change, gld);
+            }
+        }
+    } else if (!strcmp(part, "elm.slide.swallow.1")) {
+        eo = elm_button_create(obj, MEMO_I18N_DELETE, gld->on_delete, gld);
+    } else if (!strcmp(part, "elm.slide.swallow.2")) {
+        eo = elm_button_create(obj, MEMO_I18N_SHARE, gld->on_send, gld);
+    }
+    return eo;
+}
+
+Eina_Bool memo_gl_state_get(void *data, Evas_Object *obj, const char *part)
+{
+    return EINA_FALSE;
+}
+
+/**
+ * memo_gl_del
+ *
+ * @brief
+ *
+ * @param   [in] data   user specified data
+ *
+ * @param   [in] obj    evas_object of elm_genlist_item
+ *
+ * @return
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+void memo_gl_del(void *data, Evas_Object *obj)
+{
+    gl_data_t *gld = (gl_data_t *)data;
+    SFREE(gld);
+    return;
+}
+
+/**
+ * memo_gl_itc_init
+ *
+ * @brief
+ *
+ * @param   [in] itc    handle of Elm_Genlist_Item_Class
+ *
+ * @param   [in] style
+ *
+ * @return
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+void memo_gl_itc_init(Elm_Genlist_Item_Class *itc, const char *style)
+{
+    itc->item_style = style;
+    itc->func.text_get = memo_gl_label_get;
+    itc->func.content_get = memo_gl_icon_get;
+    itc->func.state_get = memo_gl_state_get;
+    itc->func.del = memo_gl_del;
+}
+
+/**
+ * memo_gld_init
+ *
+ * @brief
+ *
+ * @param   [in] data   handle of gl_data_t
+ *
+ * @param   [in] md     original memo record data
+ *
+ * @param   [in] user_data user specified data
+ *
+ * @param   [in] on_select callback function when genlist item is selected
+ *
+ * @return
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+void memo_gld_init(gl_data_t *data, memo_data_t *md, void *user_data, Evas_Smart_Cb on_select)
+{
+    data->index = md->id;
+    data->has_doodle = md->has_doodle;
+    data->mod_time = md->modi_time;
+    data->on_select = on_select;
+    data->user_data = user_data;
+}
+
+/**
+ * memo_gld_sentinel_create
+ *
+ * @brief
+ *
+ * @param   [in] user_data
+ *
+ * @return
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+gl_data_t * memo_gld_sentinel_create(void *user_data)
+{
+    gl_data_t *data = SMALLOC(gl_data_t);
+    RETVIF(data == NULL, NULL);
+    data->index = -1;
+    data->mod_time = memo_get_binary_release_date();
+    data->user_data = user_data;
+    return data;
+}
+
diff --git a/src/memo_autolink.c b/src/memo_autolink.c
new file mode 100644 (file)
index 0000000..1b610e2
--- /dev/null
@@ -0,0 +1,547 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 <dlog.h>
+#include <gravel.h>
+#include <extended-elm.h>
+#include <assert.h>
+#include <glib.h>
+#include <memo_string.h>
+#include <aul.h>
+#include <appsvc.h>
+#include <contacts-ug.h>
+#include <memo_autolink.h>
+#include <memo_ug.h>
+
+static void _autolink_popup_response_cb(void *data, Evas_Object *obj, void *event_info);
+/* BEGIN CONVERTE BETWEEN enum anchor_t AND string  */
+
+static char *_autolink_anchor_type_to_string(enum anchor_t type)
+{
+    switch (type) {
+    case ANCHOR_EMAIL:
+        return "email";
+    case ANCHOR_PHONE:
+        return "phone_num";
+    case ANCHOR_URL:
+        return "url";
+    default:
+        return "";
+    }
+}
+
+/* END CONVERTE BETWEEN enum anchor_t AND string  */
+
+/* BEGIN POPUP CALLBACK */
+
+static void _autolink_send_email_selected_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       struct autolink_data_t *ald = (struct autolink_data_t *)data;
+       service_h service = NULL;
+       service_create(&service);
+       service_add_extra_data(service, "RUN_TYPE", "5");
+       service_add_extra_data(service, "TO", ald->info);
+
+       ug_launch_common(service, UG_NAME_EMAIL);
+       _autolink_popup_response_cb(ald, ald->popup, NULL);
+}
+
+static void _autolink_send_message_selected_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    struct autolink_data_t *ald = (struct autolink_data_t *)data;
+
+    ug_launch_common_var(UG_NAME_MESSAGE, "TO", ald->info, NULL);
+    _autolink_popup_response_cb(ald, ald->popup, NULL);
+}
+
+static void _autolink_vioce_call_selected_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       struct autolink_data_t *ald = (struct autolink_data_t *)data;
+       bundle *bd = bundle_create();
+       char telnum[255] = {0,};
+
+       appsvc_set_operation(bd, APPSVC_OPERATION_CALL);
+       snprintf(telnum, sizeof(telnum), "tel:%s", ald->info);
+       appsvc_set_uri(bd, telnum);
+       appsvc_run_service(bd, 0, NULL, NULL);
+
+       bundle_free(bd);
+       _autolink_popup_response_cb(ald, ald->popup, NULL);
+}
+
+static void _autolink_video_call_selected_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       struct autolink_data_t *ald = (struct autolink_data_t *)data;
+       service_h service = NULL;
+       service_create(&service);
+       service_add_extra_data(service, "KEY_CALL_TYPE", "mo");
+       service_add_extra_data(service, "KEY_CALL_HANDLE", "1");
+       service_add_extra_data(service, "KEY_CALLING_PARTY_NUMBER", ald->info);
+       service_add_extra_data(service, "KEY_CLI_CAUSE", "-1");
+       service_add_extra_data(service, "KEY_FORWARDED", "-1");
+       service_set_package(service, AUL_NAME_VEDIO_CALL);
+       service_send_launch_request(service, NULL, NULL);
+
+       service_destroy(service);
+       _autolink_popup_response_cb(ald, ald->popup, NULL);
+}
+
+static void _autolink_email_add_to_contact_selected_cb(void *data, Evas_Object *obj,
+                               void *event_info)
+{
+       struct autolink_data_t *ald = (struct autolink_data_t *)data;
+
+       char buf[10];
+       snprintf(buf, sizeof(buf), "%d", CT_UG_REQUEST_ADD_WITH_EMAIL);
+
+       service_h service = NULL;
+       service_create(&service);
+       service_add_extra_data(service, CT_UG_BUNDLE_TYPE, buf);
+       service_add_extra_data(service, CT_UG_BUNDLE_EMAIL, ald->info);
+
+       ug_launch_common(service, UG_CONTACTS_DETAILS);
+       _autolink_popup_response_cb(ald, ald->popup, NULL);
+}
+
+static void _autolink_phone_add_to_contact_selected_cb(void *data, Evas_Object *obj,
+                               void *event_info)
+{
+       struct autolink_data_t *ald = (struct autolink_data_t *)data;
+
+       char buf[10];
+       snprintf(buf, sizeof(buf), "%d", CT_UG_REQUEST_ADD_WITH_NUM);
+
+       service_h service = NULL;
+       service_create(&service);
+       service_add_extra_data(service, CT_UG_BUNDLE_TYPE, buf);
+       service_add_extra_data(service, CT_UG_BUNDLE_NUM, ald->info);
+
+       ug_launch_common(service, UG_CONTACTS_DETAILS);
+       _autolink_popup_response_cb(ald, ald->popup, NULL);
+}
+
+/* END POPUP CALLBACK */
+
+static struct anchor_popup_item_t g_email_list[] = {
+    {"IDS_MEMO_OPT_SEND_EMAIL", _autolink_send_email_selected_cb, "memo"},
+    {"IDS_MEMO_BODY_ADD_TO_CONTACT", _autolink_email_add_to_contact_selected_cb, "memo"},
+};
+
+static struct anchor_popup_item_t g_phone_list[] = {
+    {"IDS_COM_BODY_VOICE_CALL", _autolink_vioce_call_selected_cb, "sys_string"},
+    {"IDS_COM_BODY_SEND_MESSAGE", _autolink_send_message_selected_cb, "sys_string"},
+    {"IDS_COM_BODY_VIDEO_CALL", _autolink_video_call_selected_cb, "sys_string"},
+    {"IDS_MEMO_BODY_ADD_TO_CONTACT", _autolink_phone_add_to_contact_selected_cb, "memo"},
+};
+
+static char *_autolink_gl_label_get(void *data, Evas_Object *obj, const char *part)
+{
+    char *label = (char *)data;
+    if (strcmp(part, "elm.text") == 0) {
+        return strdup(label);
+    }
+    return NULL;
+}
+
+static void _autolink_popup_response_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    PFUNC_ENTER;
+
+    assert(data != NULL);
+    struct autolink_data_t *ald = (struct autolink_data_t *)data;
+    if (ald->popup != NULL) {
+        evas_object_del(ald->popup);
+    }
+
+    assert(ald->info != NULL);
+    free(ald->info);
+    free(ald);
+
+    PFUNC_LEAVE;
+}
+
+void _autolink_popup_show(char *title, struct autolink_data_t *ald)
+{
+    struct anchor_popup_item_t *list = NULL;
+    int count = 0;
+    Evas_Object *box = NULL;
+
+    switch (ald->type) {
+    case ANCHOR_EMAIL:
+        list = g_email_list;
+        count = ARRAY_SIZE(g_email_list);
+        break;
+    case ANCHOR_PHONE:
+        list = g_phone_list;
+        count = ARRAY_SIZE(g_phone_list);
+        break;
+    default:
+        break;
+    }
+
+    Evas_Object *popup = elm_popup_add(ald->win_main);
+    ald->popup = popup;
+    elm_object_part_text_set(popup, "title,text", title);
+    Evas_Object *btn1 = elm_button_add(popup);
+    elm_object_text_set(btn1, MEMO_I18N_CLOSE);
+    elm_object_part_content_set(popup, "button1", btn1);
+    evas_object_smart_callback_add(btn1, "clicked", _autolink_popup_response_cb, ald);
+    evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+    static Elm_Genlist_Item_Class itc;
+    memset(&itc, 0, sizeof(Elm_Genlist_Item_Class));
+    itc.item_style = "1text";
+    itc.func.text_get = _autolink_gl_label_get;
+
+    Evas_Object *genlist = elm_genlist_add(popup);
+    evas_object_smart_callback_add(genlist, "selected", NULL, NULL);
+    evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+    int i = 0;
+    for (i = 0; i < count; ++i) {
+        elm_genlist_item_append(genlist, &itc, dgettext(list[i].domain, list[i].label),
+                    NULL, ELM_GENLIST_ITEM_NONE, list[i].response, ald);
+    }
+
+    evas_object_show(genlist);
+    box = elm_box_add(popup);
+    evas_object_size_hint_min_set(box, 0, (count>3 ? 3 : count)*71);
+    elm_box_pack_end(box, genlist);
+    evas_object_show(box);
+    elm_object_content_set(popup, box);
+    evas_object_show(popup);
+}
+
+void autolink_anchor_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    Elm_Entry_Anchor_Info *ei = (Elm_Entry_Anchor_Info *)event_info;
+    autolink_data *ald = SMALLOC(autolink_data);
+    RETIF(ald == NULL);
+
+    int info_len = strlen(ei->name) + 1;
+    ald->info = calloc(1, info_len);
+    if (ald->info == NULL) {
+        SFREE(ald);
+        return;
+    }
+
+    ald->win_main = (Evas_Object *)data;
+    /* retrieve anchor info, eg `url|www  phone_num|8888 email|abc@k.com` */
+    switch (ei->name[0]) {
+    case 'u':
+        ald->type = ANCHOR_URL;
+        break;
+    case 'p':
+        ald->type = ANCHOR_PHONE;
+        break;
+    case 'e':
+        ald->type = ANCHOR_EMAIL;
+        break;
+    default :
+        ald->type = NOT_ANCHOR;
+        break;
+    }
+    const char *start = ei->name + strlen(_autolink_anchor_type_to_string(ald->type)) +1;
+    const char *end = strchr(ei->name, ' ');
+    strncpy(ald->info, start, end - start);
+    LOGD("Anchor clicked (%s)\n", ald->info);
+
+    if ((ald->type == ANCHOR_EMAIL) || (ald->type == ANCHOR_PHONE)){
+        _autolink_popup_show(ald->info, ald);
+        return;
+    }
+
+    if (ald->type == ANCHOR_URL) {
+        aul_open_content(ald->info);    /* launch browser */
+    }
+    SFREE(ald->info);
+    SFREE(ald);
+}
+
+static Eina_Bool str_is_begin_with(const char *str, const char *prefix)
+{
+    if (strlen(str) < strlen(prefix)) {
+        return EINA_FALSE;
+    }
+
+    int i = 0;
+    for (i = 0; i < strlen(prefix); ++i) {
+        if (str[i] != prefix[i]) {
+            return EINA_FALSE;
+        }
+    }
+
+    return EINA_TRUE;
+}
+
+/* TYPE CHECKER BEGIN */
+/*
+ * [Checker Function Specification]
+ * These function get target type from beginning of string.
+ * The only parameter str is the string that want to be checked.
+ * Let's assume the returned value is r. There are 3 cases:
+ *     r > 0 : From beginning to r of str match the target type.
+ *     r = 0 : Str doesn't have target type, no longer check.
+ *     r < 0 : It doesn't match from beginning, but from -r position maybe matched.
+ *             It will be checked next time.
+ */
+static int _autolink_url_checker(const char* str)
+{
+    char *prefix[] = {"http://", "www.", "wap."};
+
+    int i = 0;
+    for (i = 0; i < ARRAY_SIZE(prefix); ++i) {
+        if (str_is_begin_with(str, prefix[i])) { /* Begin with specified prefix */
+            int j = 0;
+            while(str[j] != '\0' && !isspace(str[j])) {
+                if (str[j] == '<') { /* tag begin */
+                    break;
+                }
+                j++;
+            }
+
+            if(j == strlen(prefix[i])) { /* only with prefix alone */
+                break;
+            } else {
+                return j;
+            }
+        }
+    }
+
+    /* not matched, get next position */
+#if 0 /* Need correct */
+    int next = 0;
+    char *p = NULL;
+    for (i = 0; i < ARRAY_SIZE(prefix); ++i) {
+        p = strstr(str, prefix[i]);
+        if (p != NULL) {
+            if (next == 0) {
+                next = p - str;
+            } else if (next > p - str) {
+                next = p - str;
+            }
+        }
+    }
+#endif
+
+    return -1;
+}
+
+static int _autolink_email_checker(const char* str)
+{
+    char *p = NULL;
+    p = strchr(str, '@');
+
+    if (NULL == p) {
+        return 0;
+    } else if (p == str) { /* '@' at beginning */
+        return -1;
+    }
+
+    char next = p[1];
+    if (next == '@') { /* consecutive '@' */
+        return -(p + 2 - str);
+    } else if (next == '.') { /* "@." */
+        return -(p + 2 - str);
+    } else if (next == '\0') { /* '@' at end of string */
+        return -(p + 1 - str);
+    } else if (isspace(next) || next == '<') { /* '@' at end of word */
+        return -(p + 2 - str);
+    }
+
+    /* check if valid before @ */
+    char *q = p;
+    while (q >= str) {
+        if (isspace(*q)) {
+            return -(q + 1 - str);
+        }
+
+        if (*q == '>' || *q == '/') { /* tag end and other illega character */
+            return -(q + 1 - str);
+        }
+
+        if (*q == '.' && ( q == str || *(q - 1) == '.')) {
+            return -(q + 1 - str);
+        }
+
+        q--;
+    }
+
+    /* get the end position of email */
+    q = p + 1;
+    while (*q != '\0' && !isspace(*q)) {
+        if (*q == '.' && *(q + 1) == '.') {
+            break;
+        }
+
+        if (*q == '<') { /* tag begin */
+            break;
+        }
+
+        q++;
+    }
+    return q - str;
+}
+
+static int _autolink_phone_checker(const char *str)
+{
+    /* search beginning */
+    int i = 0;
+    for (i = 0; str[i] != '\0'; ++i) {
+        /* digit, '+', '*' and '#' at the beginning of phone is valid. */
+        if (isdigit(str[i]) || str[i] == '+' || str[i] == '*' || str[i] == '#') {
+            break;
+        }
+    }
+
+    if (i > 0) {
+        return -i;
+    }
+
+    for (i = 1; str[i] != '\0'; ++i) {
+        if (isdigit(str[i]) || str[i] == '*' || str[i] == '#') {
+            /* NOP */
+        } else if (str[i] == '-') {
+            if (str[i - 1] == '-' || str[i - 1] == ' ') { /* "--" or " -" */
+                i -= 1;
+                break;
+            }
+        } else if (str[i] == ' ') {
+            if (str[i - 1] == '-') { /* "- " */
+                i -= 1;
+                break;
+            } else if (str[i - 1] == ' ' && isdigit(str[i + 1])) { /* consecutive ' ' */
+                int j = 0;
+                while (isdigit(str[i + 1 + j])) { ++j; }
+                if (j > 5) {
+                    while (str[i] == ' ') { i--; }
+                    return i + 1;
+                }
+            }
+        } else { /* other character */
+            break;
+        }
+    }
+
+    int len = i;
+    if (len < 3) {
+        return -len;
+    } else {
+        return len;
+    }
+}
+
+/* TYEP CHECKER END */
+
+static void _autolink_box_anchor(GString *text, char *type, char *content)
+{
+    char *buf = NULL;
+    if (strcmp(type, "phone_num") == 0) { /* remove '-' and ' ' in phone num. */
+        buf = (char *)malloc(strlen(content) + 1);
+        RETIF(buf == NULL);
+        int i = 0, j = 0;
+        while (content[i] != '\0') {
+            if (content[i] == '-' || content[i] == ' ') {
+                ++i;
+            } else {
+                buf[j] = content[i];
+                ++i;
+                ++j;
+            }
+        }
+        buf[j] = '\0';
+    } else {
+        buf = content;
+    }
+
+    g_string_append_printf(text,
+        "<color=#72b1f2FF><a href=%s|%s underline=on underline_color=#72b1f2FF>%s</a></color>",
+        type, buf, content);
+
+    if (buf != content) {
+        free(buf);
+    }
+}
+
+GString *autolink_add_anchor(const char *content)
+{
+    assert(content != NULL);
+
+    const char *p = content;
+    char *gt = NULL;
+    GString *text = g_string_new("");
+    GString *buf = g_string_new("");
+
+    struct checker_t {
+        int (*check)(const char* str);
+        char *type;
+        Eina_Bool invoke;
+    } checkers[] = {
+        {_autolink_url_checker, "url", EINA_TRUE},
+        {_autolink_email_checker, "email", EINA_TRUE},
+        {_autolink_phone_checker, "phone_num", EINA_TRUE},
+    };
+
+    while (*p != '\0') {
+
+        if (p[0] == '<') {    /* tag begin */
+            gt = strchr(p, '>');    /* search tag end */
+            assert(gt != NULL);    /* assert '<' and '>' are matched */
+            g_string_append_len(text, p, gt - p + 1);
+            p = gt + 1;
+        }
+
+        int i = 0;
+        int r = 0;
+        int next_pos = -1;
+        for (i = 0; i < ARRAY_SIZE(checkers); ++i) {
+            if (checkers[i].invoke == EINA_TRUE) {
+                r = checkers[i].check(p);
+                if (r == 0) { /* no longer check */
+                    checkers[i].invoke = EINA_FALSE;
+                } else if (r > 0) { /* Get */
+                    g_string_assign(buf, "");    /* reset buffer */
+                    g_string_append_len(buf, p, r);
+                    _autolink_box_anchor(text, checkers[i].type, buf->str);
+                    next_pos = r;
+                    break;
+                } else { /* r < 0 */
+                    if (next_pos <= 0 || next_pos > -r) {
+                        next_pos = -r;
+                    }
+                }
+            }
+        }
+
+        if (next_pos < 0) {
+            g_string_append(text, p);
+            break;
+        } else if ( i == ARRAY_SIZE(checkers)) {
+            g_string_append_len(text, p, next_pos);
+        }
+
+        p += next_pos;
+    }
+
+    g_string_free(buf, TRUE);
+    printf("\t\t********** %s\n", text->str);
+
+    return text;
+}
diff --git a/src/memo_doodle_editor.c b/src/memo_doodle_editor.c
new file mode 100644 (file)
index 0000000..fe093c5
--- /dev/null
@@ -0,0 +1,586 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <appcore-efl.h>
+#include <Elementary.h>
+#include <dlog.h>
+#include <gravel.h>
+#include <extended-elm.h>
+#include <supplement.h>
+#include <memo-assist.h>
+#include <memo_string.h>
+
+typedef struct __doodle_editor_t {
+    Evas_Object *win;
+    Evas_Object *parent;
+    Memo_Component_Callback cb;
+    void *data;
+    memo_data_t *record;
+    char buf[MEMO_BUFFER_SIZE]; /* for temporarily usage only */
+    Eina_Bool savable;
+    Eina_Bool erase;    /* erase mode */
+    Eina_Bool comment;    /* edit comment mode */
+    Eina_Bool doodle_init;
+    Eina_Bool stroke_down;    /* see comment in _on_doodle_move_cb */
+    int stroke_size;
+    int stroke_color;
+
+    /* content */
+    Evas_Object *body_main;
+    Evas_Object *doodle;
+    Evas_Object *toolbar;
+    Evas_Object *btn_size;
+    void *h_ss;
+    Evas_Object *btn_color;
+    void *h_cs;
+    Evas_Object *edit_field;
+
+    /* entry */
+    Evas_Object *entry;
+    Ecore_IMF_Context *imf_context;
+} doodle_editor_t;
+
+static void _stroke_size_selector_del(doodle_editor_t *de);
+static void _stroke_color_selector_del(doodle_editor_t *de);
+
+static void _save_record(doodle_editor_t *de)
+{
+    memo_begin_trans();
+    if (de->record->id != -1) {
+        memo_mod_data(de->record);
+    } else {
+        de->record->content = memo_get_doodle_title();
+        memo_add_data(de->record);
+    }
+    /* save doodle to file */
+    snprintf(de->buf, MEMO_BUFFER_SIZE, DOODLEDIR "/%d.png", (int)de->record->id);
+    evas_object_image_save(de->doodle, de->buf, NULL, NULL);
+    memo_end_trans();
+}
+
+static void _on_save_yes(void *data, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    _save_record(de);
+    de->cb(de->data, "save", NULL);
+}
+
+static void _on_save_no(void *data, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    de->cb(de->data, "cancel", NULL);
+}
+
+static Eina_Bool _launch_yes_no_popup(void *data)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    memo_create_yes_no_popup(de->win, MEMO_I18N_SAVE_MEMO, _on_save_yes, _on_save_no, de);
+    return EINA_FALSE;
+}
+
+static Eina_Bool _comment_savable(doodle_editor_t *de)
+{
+    const char *text = elm_entry_entry_get(de->entry);
+    Eina_Bool savable = EINA_TRUE;
+
+    if (strcmp(text, "") == 0) {
+        savable = EINA_FALSE;
+    } else if (de->record->comment != NULL) { /* check if same as init string */
+        if (strcmp(de->record->comment, text)==0) {
+            savable = EINA_FALSE;
+        }
+    }
+    return savable;
+}
+
+static void _stroke_size_selector_callback(void *data, const char *msg, void *event)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    if (strcmp(msg, "layout") == 0) {
+        elm_object_part_content_set(de->body_main, "elm.swallow.tool", (Evas_Object *)event);
+    } else if (strcmp(msg, "change") == 0) {
+        de->stroke_size = (int)event;
+    } else if (strcmp(msg, "flick,down") == 0) {
+        _stroke_size_selector_del(de);
+        edje_object_signal_emit(elm_layout_edje_get(de->body_main), "expand", "elm");
+    }
+}
+
+static void _stroke_size_selector_del(doodle_editor_t *de)
+{
+    if (de->h_ss != NULL) {
+        elm_object_part_content_unset(de->body_main, "elm.swallow.tool");
+        memo_del_pencil_size_selector(de->h_ss);
+        de->h_ss = NULL;
+        memo_tool_btn_focus_set(de->btn_size, EINA_FALSE);
+    }
+}
+
+static void _on_stroke_size_btn_up(void *data, Evas *e, Evas_Object *evas_obj, void *event_info)
+{
+       doodle_editor_t *de = (doodle_editor_t *)data;
+       if (de->h_ss != NULL) { /* stroke size selector already open */
+               return;
+       }
+       if (de->h_cs != NULL) { /* destroy stroke color selector */
+               _stroke_color_selector_del(de);
+       }
+       if (de->erase) { /* deselect eraser */
+               de->erase = EINA_FALSE;
+               Evas_Object *eo = (Evas_Object *)elm_object_part_content_get(de->toolbar, "elm.swallow.btn3");
+               memo_tool_btn_focus_set(eo, de->erase);
+       }
+       /* load stroke size selector */
+       service_h service = NULL;
+       service_create(&service);
+       snprintf(de->buf, MEMO_BUFFER_SIZE, "%d", de->stroke_size);
+       service_add_extra_data(service, "current", de->buf);
+       snprintf(de->buf, MEMO_BUFFER_SIZE, "%d", 0xFFFFFFFF);
+       service_add_extra_data(service, "bg_color", de->buf);
+       de->h_ss = memo_load_pencil_size_selector(de->body_main, service, _stroke_size_selector_callback, de);
+       service_destroy(service);
+       memo_tool_btn_focus_set(de->btn_size, EINA_TRUE);
+       edje_object_signal_emit(elm_layout_edje_get(de->body_main), "abbrev", "elm");
+}
+
+void _stroke_color_selector_callback(void *data, const char *msg, void *event)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    if (strcmp(msg, "layout") == 0) {
+        elm_object_part_content_set(de->body_main, "elm.swallow.tool", (Evas_Object *)event);
+    } else if (strcmp(msg, "change") == 0) {
+        de->stroke_color = (int)event;
+    } else if (strcmp(msg, "flick,down") == 0) {
+        _stroke_color_selector_del(de);
+        edje_object_signal_emit(elm_layout_edje_get(de->body_main), "expand", "elm");
+    }
+}
+
+static void _stroke_color_selector_del(doodle_editor_t *de)
+{
+    if (de->h_cs != NULL) {
+        elm_object_part_content_unset(de->body_main, "elm.swallow.tool");
+        memo_del_color_selector(de->h_cs);
+        memo_tool_btn_focus_set(de->btn_color, EINA_FALSE);
+        de->h_cs = NULL;
+    }
+}
+
+static void _on_stroke_color_btn_up(void *data, Evas *e, Evas_Object *evas_obj, void *event_info)
+{
+       doodle_editor_t *de = (doodle_editor_t *)data;
+       if (de->h_cs!= NULL) { /* stroke color selector already open */
+               return;
+       }
+       if (de->h_ss!= NULL) { /* destroy stroke  size selector */
+               _stroke_size_selector_del(de);
+       }
+       if (de->erase) { /* deselect eraser */
+               de->erase = EINA_FALSE;
+               Evas_Object *eo = (Evas_Object *)elm_object_part_content_get(de->toolbar, "elm.swallow.btn3");
+               memo_tool_btn_focus_set(eo, de->erase);
+       }
+       /* load stroke color selector */
+       service_h service = NULL;
+       service_create(&service);
+       snprintf(de->buf, MEMO_BUFFER_SIZE, "%d", de->stroke_color);
+       service_add_extra_data(service, "color", de->buf);
+       snprintf(de->buf, MEMO_BUFFER_SIZE, "%d", 0xFFFFFFFF);
+       service_add_extra_data(service, "bg_color", de->buf);
+       de->h_cs = memo_load_color_selector(de->body_main, service, _stroke_color_selector_callback, de);
+       service_destroy(service);
+       memo_tool_btn_focus_set(de->btn_color, EINA_TRUE);
+       edje_object_signal_emit(elm_layout_edje_get(de->body_main), "abbrev", "elm");
+}
+
+static void _input_panel_event_callback(void *data, Ecore_IMF_Context *ctx, int value)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    if (value == ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
+        if (de->comment) {
+            edje_object_signal_emit(elm_layout_edje_get(de->body_main), "expand", "comment");
+        }
+    } else if (value == ECORE_IMF_INPUT_PANEL_STATE_SHOW) {
+        edje_object_signal_emit(elm_layout_edje_get(de->body_main), "abbrev", "comment");
+        if (!de->comment) { /* first shift to comment mode */
+            if (de->record->comment == NULL) { /* remove DUMMY_COMMENT */
+                elm_entry_entry_set(de->entry, "");
+            }
+            de->cb(de->data, "savable", (void *)0);
+        }
+        de->comment = EINA_TRUE;
+        de->cb(de->data, "title", de->record->comment == NULL ? MEMO_I18N_ADD_COMMENT : MEMO_I18N_EDIT_COMMENT);
+    }
+}
+
+static void _on_entry_content_change(void *data, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    if (elm_object_focus_get(de->edit_field)) {
+        if (elm_entry_is_empty(obj)) {
+            elm_object_signal_emit(de->edit_field, "elm,state,eraser,hide", "elm");
+        } else {
+            elm_object_signal_emit(de->edit_field, "elm,state,eraser,show", "elm");
+        }
+    }
+    RETIF(!de->comment);
+    Eina_Bool savable = _comment_savable(de);
+    de->cb(de->data, "savable", (void *)(savable?1:0));
+}
+
+// Focused callback will show X marked button and hide guidetext
+static void _focused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    if (!elm_entry_is_empty(obj))
+       elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+    elm_object_signal_emit(data, "elm,state,guidetext,hide", "elm");
+}
+
+// Unfocused callback will show guidetext and hide X marked button
+static void _unfocused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    if (elm_entry_is_empty(obj))
+       elm_object_signal_emit(data, "elm,state,guidetext,show", "elm");
+    elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+}
+
+// When X marked button is clicked, empty entry’s contents
+static void _eraser_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+    elm_entry_entry_set(data, "");
+}
+
+static void _draw_argb32(int *img, int w, int h, int x, int y, int size, int color)
+{
+    int cx, cy, cw, ch;
+    int i, j;
+
+    cx = x;
+    cy = y;
+    cw = size;
+    ch = size;
+    CLIP_RECT_TO_RECT(cx, cy, cw, ch, 0, 0, w, h);
+    for (i = 0; i < ch; i++) {
+        for (j = 0; j < cw; j++) {
+            memcpy(img + (i + cy) * w + (cx + j), &color, 4);
+        }
+    }
+}
+
+static void _on_doodle_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    if (de->comment) {
+        return;
+    }
+    if (de->h_ss!= NULL) { /* destroy stroke  size selector */
+        _stroke_size_selector_del(de);
+    }
+    if (de->h_cs != NULL) { /* destroy stroke color selector */
+        _stroke_color_selector_del(de);
+    }
+    edje_object_signal_emit(elm_layout_edje_get(de->body_main), "expand", "elm");
+    de->stroke_down = EINA_TRUE;
+    de->record->has_doodle = 1;
+    if (!de->erase) {
+        de->savable = EINA_TRUE;
+    } else if (de->record->id != -1) { /* edit existing doodle with eraser */
+        de->savable = EINA_TRUE;
+    }
+    de->cb(de->data, "savable", (void *)(de->savable?1:0));
+}
+
+static void _on_doodle_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    Evas_Event_Mouse_Move *event = (Evas_Event_Mouse_Move *)event_info;
+    int *img_data = NULL;
+    Evas_Coord x, y, w, h;
+    int px = 0;
+    int py = 0;
+    int i = 0;
+    int gap_max = 0;
+    int gap_x = 0;
+    int gap_y = 0;
+    int color = 0;
+
+    /* a little mouse move events will be received before mouse down event,
+       if those mouse move event is not filtered,
+       a line (from last up point to current move point) will be draw */
+    if (!de->stroke_down) {
+        return;
+    }
+
+    color = de->erase ? 0xFFFFFFFF : de->stroke_color;
+    evas_object_geometry_get(de->doodle, &x, &y, &w, &h);
+    img_data = evas_object_image_data_get(de->doodle, 1);
+    gap_x = event->cur.output.x - event->prev.output.x;
+    gap_y = event->cur.output.y - event->prev.output.y;
+    gap_max = MAX(abs(gap_x), abs(gap_y));
+
+    for (i = 0; i < gap_max; i++) {
+        px = event->prev.output.x + i * gap_x / gap_max;
+        py = event->prev.output.y + i * gap_y / gap_max;
+        /* mouse position in image */
+        px -= x;
+        py -= y;
+        _draw_argb32(img_data, w, h, px, py, de->stroke_size, color);
+    }
+    evas_object_image_data_update_add(de->doodle, 0, 0, w, h);
+}
+
+static void _on_doodle_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    de->stroke_down = EINA_FALSE;
+}
+
+/* this function must be execute only once
+ * in resize callback we will get the actual size of doodle
+ * we need to transfer origin image data to fit the actual canvas size
+ */
+static void _on_doodle_resize_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    Evas_Coord w, h;
+    int *img_data = NULL;
+
+    if (de->doodle_init) {    /* reenter control */
+        return;
+    } else {
+        de->doodle_init = EINA_TRUE;
+        evas_object_geometry_get(de->doodle, NULL, NULL, &w, &h);
+        evas_object_image_size_set(de->doodle, w, h);
+        img_data = evas_object_image_data_get(de->doodle, 1);
+        if (img_data != NULL) { /* set background color as white */
+            memset(img_data, 0xFFFFFFFF, sizeof(int)*w*h);
+            evas_object_image_data_update_add(de->doodle, 0, 0, w, h);
+        }
+    }
+}
+
+static void _on_eraser_up(void *data, Evas *e, Evas_Object *evas_obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    if (de->h_ss!= NULL) { /* destroy stroke  size selector */
+        _stroke_size_selector_del(de);
+    }
+    if (de->h_cs != NULL) { /* destroy stroke color selector */
+        _stroke_color_selector_del(de);
+    }
+    de->erase = !(de->erase);
+    Evas_Object *eo = (Evas_Object *)elm_object_part_content_get(de->toolbar, "elm.swallow.btn3");
+    memo_tool_btn_focus_set(eo, de->erase);
+    edje_object_signal_emit(elm_layout_edje_get(de->body_main), "expand", "elm");
+}
+
+static void _on_yes(void *data, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    _save_record(de);
+    de->cb(de->data, "text", NULL);
+}
+
+static void _on_no(void *data, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    de->cb(de->data, "text", NULL);
+}
+
+static void _on_text_mode(void *data, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    if (de->savable) { /* modified, need user confirmation */
+        memo_create_yes_no_popup(de->parent, MEMO_I18N_SAVE_MEMO, _on_yes, _on_no, de);
+    } else {
+        de->cb(de->data, "text", NULL);
+    }
+}
+
+static void _create_doodle_editor_layout(doodle_editor_t *de, service_h service)
+{
+    de->body_main = elm_layout_create(de->parent, EDJ_FILE, "doodle_editor");
+    de->cb(de->data, "layout", de->body_main);
+    /* title */
+    de->cb(de->data, "title", de->record->id==-1 ? MEMO_I18N_NEW_DRAWING : MEMO_I18N_EDIT_DRAWING);
+    /* date */
+    memo_time_format(de->buf, MEMO_BUFFER_SIZE, de->record->modi_time);
+    edje_object_part_text_set(elm_layout_edje_get(de->body_main), "elm.text.date", de->buf);
+
+    /* toolbar */
+    de->toolbar = elm_swallowed_layout(de->body_main, "elm.swallow.toolbar", EDJ_FILE, "edit_toolbar");
+    de->btn_size = elm_swallowed_layout(de->toolbar, "elm.swallow.btn1", EDJ_DIR"/black/memo.edj", "tl_stroke_size");
+    evas_object_event_callback_add(de->btn_size, EVAS_CALLBACK_MOUSE_UP, _on_stroke_size_btn_up, de);
+    de->btn_color = elm_swallowed_layout(de->toolbar, "elm.swallow.btn2", EDJ_DIR"/black/memo.edj", "tl_stroke_color");
+    evas_object_event_callback_add(de->btn_color, EVAS_CALLBACK_MOUSE_UP, _on_stroke_color_btn_up, de);
+    Evas_Object *eo = elm_swallowed_layout(de->toolbar, "elm.swallow.btn3", EDJ_DIR"/black/memo.edj", "tl_stroke_eraser");
+    evas_object_event_callback_add(eo, EVAS_CALLBACK_MOUSE_UP, _on_eraser_up, de);
+    if (!service_key_check(service, "toggle", "disable")) {
+        elm_swallowed_button(de->toolbar, "elm.swallow.btn4", MEMO_I18N_TEXT, _on_text_mode, de);
+    }
+
+    /* doodle */
+    Evas *evas = evas_object_evas_get(de->parent);
+    de->doodle = evas_object_image_filled_add(evas);
+    evas_object_image_colorspace_set(de->doodle, EVAS_COLORSPACE_ARGB8888);
+    evas_object_image_alpha_set(de->doodle, 1);
+    /* doodle data */
+    if (de->record->has_doodle == 1) {
+        snprintf(de->buf, MEMO_BUFFER_SIZE, DOODLEDIR "/%d.png", (int)de->record->id);
+        evas_object_image_file_set(de->doodle, de->buf, NULL);
+    } else {
+        evas_object_render_flush_hook(de->doodle, _on_doodle_resize_cb, de);
+    }
+    evas_object_event_callback_add(de->doodle, EVAS_CALLBACK_MOUSE_DOWN, _on_doodle_down_cb, de);
+    evas_object_event_callback_add(de->doodle, EVAS_CALLBACK_MOUSE_MOVE, _on_doodle_move_cb, de);
+    evas_object_event_callback_add(de->doodle, EVAS_CALLBACK_MOUSE_UP, _on_doodle_up_cb, de);
+    evas_object_show(de->doodle);
+    elm_object_part_content_set(de->body_main, "elm.swallow.doodle", de->doodle);
+
+    /* comment */
+    eo = elm_swallowed_layout(de->body_main, "elm.swallow.comment", EDJ_FILE, "doodle_comment");
+    //EditField
+    Evas_Object *layout = elm_layout_add(eo);
+    elm_layout_theme_set(layout, "layout", "editfield", "default");
+    elm_object_part_content_set(eo, "elm.swallow.editfield", layout);
+    Evas_Object *ef = elm_entry_add(eo);
+    elm_object_part_content_set(layout, "elm.swallow.content", ef);
+    de->edit_field = layout;
+
+    elm_object_style_set(ef, "font_color_black");
+    elm_entry_single_line_set(ef, EINA_TRUE);
+    elm_entry_scrollable_set(ef, EINA_TRUE);
+    evas_object_size_hint_weight_set(ef, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(ef, EVAS_HINT_EXPAND, 0.5);
+
+    de->entry = ef;
+    elm_entry_cnp_mode_set(de->entry, ELM_CNP_MODE_PLAINTEXT);
+    de->imf_context = elm_entry_imf_context_get(de->entry);
+    /* if not hide explicitly, seems hide event of sweep down can not be received */
+    ecore_imf_context_input_panel_hide(de->imf_context);
+    elm_entry_entry_set(de->entry, de->record->comment == NULL ? MEMO_I18N_ADD_COMMENT : de->record->comment);
+    ecore_imf_context_input_panel_event_callback_add(de->imf_context, ECORE_IMF_INPUT_PANEL_STATE_EVENT,
+        _input_panel_event_callback, de);
+    evas_object_smart_callback_add(de->entry, "changed", _on_entry_content_change, de);
+    evas_object_smart_callback_add(de->entry, "preedit,changed", _on_entry_content_change, de);
+    evas_object_smart_callback_add(de->entry, "focused", _focused_cb, layout);
+    evas_object_smart_callback_add(de->entry, "unfocused", _unfocused_cb, layout);
+    elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm", _eraser_clicked_cb, de->entry);
+
+    /* savable */
+    de->cb(de->data, "savable", (void *)(de->savable?1:0));
+}
+
+void memo_doodle_editor_time_format_update(void *h_de)
+{
+    doodle_editor_t *de = (doodle_editor_t *)h_de;
+    memo_time_format(de->buf, MEMO_BUFFER_SIZE, de->record->modi_time);
+    edje_object_part_text_set(elm_layout_edje_get(de->body_main), "elm.text.date", de->buf);
+}
+
+void memo_doodle_editor_cancel(void *h_de)
+{
+    doodle_editor_t *de = (doodle_editor_t *)h_de;
+    if (de->comment) {
+        de->comment = EINA_FALSE;
+        ecore_imf_context_input_panel_hide(de->imf_context);
+        edje_object_signal_emit(elm_layout_edje_get(de->body_main), "expand", "elm");
+        if (de->record->comment == NULL) {
+            elm_entry_entry_set(de->entry, MEMO_I18N_ADD_COMMENT);
+        } else { /* recover origin comment */
+            elm_entry_entry_set(de->entry, de->record->comment);
+        }
+        de->cb(de->data, "title", de->record->id==-1 ? MEMO_I18N_NEW_DRAWING : MEMO_I18N_EDIT_DRAWING);
+        de->cb(de->data, "savable", (void *)(de->savable?1:0));
+        de->cb(de->data, "comment cancel", NULL);
+    } else {
+        if (!de->savable) { /* not modified, return directly */
+            de->cb(de->data, "cancel", NULL);
+        } else {
+            _launch_yes_no_popup(de);
+        }
+    }
+}
+
+void memo_doodle_editor_save(void *h_de)
+{
+    doodle_editor_t *de = (doodle_editor_t *)h_de;
+    if (de->comment) {
+        de->comment = EINA_FALSE;
+        ecore_imf_context_input_panel_hide(de->imf_context);
+        edje_object_signal_emit(elm_layout_edje_get(de->body_main), "expand", "elm");
+        Eina_Bool savable = _comment_savable(de);
+        if (savable) {
+            de->record->comment = strdup(elm_entry_entry_get(de->entry));
+            if (de->record->id != -1) { /* when edit existing, modification of comment will make record savable */
+                de->savable = EINA_TRUE;
+            }
+        }
+        de->cb(de->data, "title", de->record->id==-1 ? MEMO_I18N_NEW_DRAWING : MEMO_I18N_EDIT_DRAWING);
+        de->cb(de->data, "savable", (void *)(de->savable?1:0));
+        elm_object_focus_set(de->edit_field, EINA_FALSE); /* when disable done button, focus may reset to edit field */
+        de->cb(de->data, "comment done", NULL);
+    } else {
+        _save_record(de);
+        de->cb(de->data, "save", NULL);
+    }
+}
+
+void *memo_load_doodle_editor(Evas_Object *win, Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data)
+{
+    doodle_editor_t *de = SMALLOC(doodle_editor_t);
+    RETVIF(de==NULL, NULL);
+    service_dump(service);
+    de->win = win;
+    de->parent = parent;
+    de->cb = (cb==NULL ? memo_com_dummy_cb : cb); /* make sure cb is not null, no need to check legitimacy of cb when call */
+    de->data = data;
+
+    /* init */
+    const char *s = NULL;
+    service_get_extra_data(service, "index", &s);
+    if (s == NULL) {
+        de->record = memo_create_data();
+        de->record->id = -1;
+        de->record->modi_time = time((time_t *) 0);
+    } else {        /* load item */
+        de->record = memo_get_data(atoi(s));
+       SFREE(s);
+    }
+    de->stroke_size = 8;
+    de->stroke_color = 0xff000000;
+
+    _create_doodle_editor_layout(de, service);
+    return (void *)de;
+}
+
+void memo_destroy_doodle_editor(void *h_de)
+{
+    doodle_editor_t *de = (doodle_editor_t *)h_de;
+    if (de->h_ss!= NULL) { /* destroy stroke  size selector */
+        _stroke_size_selector_del(de);
+    }
+    if (de->h_cs != NULL) { /* destroy stroke color selector */
+        _stroke_color_selector_del(de);
+    }
+    memo_free_data(de->record);
+    evas_object_del(de->body_main);
+    SFREE(de);
+}
diff --git a/src/memo_text_editor.c b/src/memo_text_editor.c
new file mode 100644 (file)
index 0000000..68e9b10
--- /dev/null
@@ -0,0 +1,420 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <appcore-efl.h>
+#include <Elementary.h>
+#include <dlog.h>
+#include <gravel.h>
+#include <vconf-keys.h>
+#include <extended-elm.h>
+#include <supplement.h>
+#include <memo-assist.h>
+#include <memo_string.h>
+
+typedef struct __text_editor_t {
+    Evas_Object *win;
+    Evas_Object *parent;
+    Memo_Component_Callback cb;
+    void *data;
+    memo_data_t *record;
+    char buf[MEMO_BUFFER_SIZE]; /* for temporarily usage only */
+    Eina_Bool savable;
+
+    /* content */
+    Evas_Object *body_main;
+    Evas_Object *toolbar;
+    Evas_Object *btn_size;
+    void *h_fss;
+    Evas_Object *btn_color;
+    void *h_fcs;
+
+    /* entry */
+    Evas_Object *entry;
+    Ecore_IMF_Context *imf_context;
+    Elm_Entry_Filter_Limit_Size limit_filter_data;
+
+    /* original font information */
+    int init_fsize;
+    int init_fcolor;
+} text_editor_t;
+
+static void _font_size_selector_del(text_editor_t *te);
+static void _font_color_selector_del(text_editor_t *te);
+service_h text_service = NULL;
+static void _save_record(text_editor_t *te)
+{
+    if (te->record->content != NULL) {
+        SFREE(te->record->content);
+    }
+
+    /* content will be freed automatically in memo_free_data when editor destoried */
+    te->record->content = elm_entry_markup_to_utf8(elm_entry_entry_get(te->entry));
+    /* records synced from KIES has no font info, apply font enforce policy here to overwrite default font info */
+    te->record->font_respect = 1;
+    if (te->record->id != -1) {
+        memo_mod_data(te->record);
+    } else {
+        memo_add_data(te->record);
+    }
+}
+
+static void _on_save_yes(void *data, Evas_Object *obj, void *event_info)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    _save_record(te);
+    te->cb(te->data, "save", NULL);
+}
+
+static void _on_save_no(void *data, Evas_Object *obj, void *event_info)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    te->cb(te->data, "cancel", NULL);
+}
+
+static Eina_Bool _launch_yes_no_popup(void *data)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    memo_create_yes_no_popup(te->win, MEMO_I18N_SAVE_MEMO, _on_save_yes, _on_save_no, te);
+    return EINA_FALSE;
+}
+
+static void _entry_content_update(text_editor_t *te)
+{
+    unsigned char *color = (unsigned char *)&te->record->font_color;
+    char *content = elm_entry_markup_to_utf8(elm_entry_entry_get(te->entry));
+    char *markup = elm_entry_utf8_to_markup(content);
+    snprintf(te->buf, MEMO_BUFFER_SIZE,
+         "<font_size=%d><color=#%02x%02x%02x>", te->record->font_size, color[2], color[1],
+         color[0]);
+    elm_entry_entry_set(te->entry, te->buf);
+    elm_entry_entry_insert(te->entry, markup);
+    SFREE(content);
+    SFREE(markup);
+}
+
+static void _font_size_selector_callback(void *data, const char *msg, void *event)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    if (strcmp(msg, "layout") == 0) {
+        elm_object_part_content_set(te->body_main, "elm.swallow.tool", (Evas_Object *)event);
+    } else if (strcmp(msg, "change") == 0) {
+        te->record->font_size = (int)event;
+        _entry_content_update(te);
+    } else if (strcmp(msg, "flick,down") == 0) {
+        _font_size_selector_del(te);
+        edje_object_signal_emit(elm_layout_edje_get(te->body_main), "expand", "elm");
+    }
+}
+
+static void _font_size_selector_del(text_editor_t *te)
+{
+    if (te->h_fss != NULL) {
+        elm_object_part_content_unset(te->body_main, "elm.swallow.tool");
+        memo_del_font_size_selector(te->h_fss);
+        te->h_fss = NULL;
+        memo_tool_btn_focus_set(te->btn_size, EINA_FALSE);
+    }
+}
+
+static void _on_font_size_btn_up(void *data, Evas *e, Evas_Object *evas_obj, void *event_info)
+{
+       text_editor_t *te = (text_editor_t *)data;
+       if (te->h_fss != NULL) { /* font size selector already open */
+               return;
+       }
+       if (te->h_fcs != NULL) { /* destroy font color selector */
+               _font_color_selector_del(te);
+       }
+       /* load font size selector */
+       service_h service = NULL;
+       service_create(&service);
+       snprintf(te->buf, MEMO_BUFFER_SIZE, "%d", te->record->font_size);
+       service_add_extra_data(service, "current", te->buf);
+       snprintf(te->buf, MEMO_BUFFER_SIZE, "%d", 0xFFFFFFFF);
+       service_add_extra_data(service, "bg_color", te->buf);
+       te->h_fss = memo_load_font_size_selector(te->body_main, service, _font_size_selector_callback, te);
+       service_destroy(service);
+       memo_tool_btn_focus_set(te->btn_size, EINA_TRUE);
+       edje_object_signal_emit(elm_layout_edje_get(te->body_main), "abbrev", "elm");
+       /* hide input panel */
+       ecore_imf_context_input_panel_hide(te->imf_context);
+}
+
+void _font_color_selector_callback(void *data, const char *msg, void *event)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    if (strcmp(msg, "layout") == 0) {
+        elm_object_part_content_set(te->body_main, "elm.swallow.tool", (Evas_Object *)event);
+    } else if (strcmp(msg, "change") == 0) {
+        LOGD("%s : %x\n", msg, (int)event);
+        te->record->font_color = (int)event;
+        _entry_content_update(te);
+    } else if (strcmp(msg, "flick,down") == 0) {
+        _font_color_selector_del(te);
+        edje_object_signal_emit(elm_layout_edje_get(te->body_main), "expand", "elm");
+    }
+}
+
+static void _font_color_selector_del(text_editor_t *te)
+{
+    if (te->h_fcs != NULL) {
+        elm_object_part_content_unset(te->body_main, "elm.swallow.tool");
+        memo_del_color_selector(te->h_fcs);
+        memo_tool_btn_focus_set(te->btn_color, EINA_FALSE);
+        te->h_fcs = NULL;
+    }
+}
+
+static void _on_font_color_btn_up(void *data, Evas *e, Evas_Object *evas_obj, void *event_info)
+{
+       text_editor_t *te = (text_editor_t *)data;
+       if (te->h_fcs!= NULL) { /* font color selector already open */
+               return;
+       }
+       if (te->h_fss!= NULL) { /* destroy font  size selector */
+               _font_size_selector_del(te);
+       }
+       /* load font color selector */
+       service_h service = NULL;
+       service_create(&service);
+       snprintf(te->buf, MEMO_BUFFER_SIZE, "%d", te->record->font_color);
+       service_add_extra_data(service, "color", te->buf);
+       snprintf(te->buf, MEMO_BUFFER_SIZE, "%d", 0xFFFFFFFF);
+       service_add_extra_data(service, "bg_color", te->buf);
+       te->h_fcs = memo_load_color_selector(te->body_main, service, _font_color_selector_callback, te);
+       service_destroy(service);
+       memo_tool_btn_focus_set(te->btn_color, EINA_TRUE);
+       edje_object_signal_emit(elm_layout_edje_get(te->body_main), "abbrev", "elm");
+       /* hide input panel */
+       ecore_imf_context_input_panel_hide(te->imf_context);
+}
+
+static void _input_panel_event_callback(void *data, Ecore_IMF_Context *ctx, int value)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    if (value == ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
+        if ((te->h_fss==NULL) && (te->h_fcs==NULL)) { /* hide by sweep donw */
+            edje_object_signal_emit(elm_layout_edje_get(te->body_main), "expand", "elm");
+        }
+    } else if (value == ECORE_IMF_INPUT_PANEL_STATE_SHOW) {
+        edje_object_signal_emit(elm_layout_edje_get(te->body_main), "abbrev", "elm");
+    }
+}
+
+static void _on_entry_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    if (te->h_fss!= NULL) { /* destroy font  size selector */
+        _font_size_selector_del(te);
+    }
+    if (te->h_fcs != NULL) { /* destroy font color selector */
+        _font_color_selector_del(te);
+    }
+}
+
+static void _on_entry_content_change(void *data, Evas_Object *obj, void *event_info)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    unsigned char *color = (unsigned char *)&te->record->font_color;
+
+    const char *text = elm_entry_entry_get(te->entry);
+    char *content = elm_entry_markup_to_utf8(text);
+    te->savable = EINA_TRUE;
+    if (strcmp(content, "") == 0) {
+        te->savable = EINA_FALSE;
+    } else if (te->record->content != NULL) { /* check if same as init string */
+        if ((te->init_fsize==te->record->font_size)
+            && (te->init_fcolor==te->record->font_color)
+            && (strcmp(te->record->content, content)==0)) {
+            te->savable = EINA_FALSE;
+        }
+    }
+    te->cb(te->data, "savable", (void *)(te->savable?1:0));
+
+    /* after paste/cut, the font size/color information may be cleared */
+    snprintf(te->buf, MEMO_BUFFER_SIZE, "<font_size=%d><color=#%02x%02x%02x>",
+        te->record->font_size, color[2], color[1], color[0]);
+    if (text[0] == '\0') { /* no content */
+        elm_entry_entry_insert(te->entry, te->buf);
+    } else if (text[0] != '<') { /* insert font information */
+        elm_entry_cursor_begin_set(te->entry);
+        elm_entry_entry_insert(te->entry, te->buf);
+        elm_entry_cursor_end_set(te->entry);
+    }
+    SFREE(content);
+}
+
+static void _on_yes(void *data, Evas_Object *obj, void *event_info)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    _save_record(te);
+    te->cb(te->data, "drawing", NULL);
+}
+
+static void _on_no(void *data, Evas_Object *obj, void *event_info)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    te->cb(te->data, "drawing", NULL);
+}
+
+static void _on_drawing_mode(void *data, Evas_Object *obj, void *event_info)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    if (te->savable) { /* modified, need user confirmation */
+        memo_create_yes_no_popup(te->parent, MEMO_I18N_SAVE_MEMO, _on_yes, _on_no, te);
+    } else {
+        te->cb(te->data, "drawing", NULL);
+    }
+}
+
+static void _create_text_editor_layout(text_editor_t *te, service_h service)
+{
+    te->body_main = elm_layout_create(te->parent, EDJ_FILE, "text_editor");
+    te->cb(te->data, "layout", te->body_main);
+    /* title */
+    te->cb(te->data, "title", te->record->id==-1 ? MEMO_I18N_NEW_NOTE : MEMO_I18N_EDIT_NOTE);
+    /* date */
+    memo_time_format(te->buf, MEMO_BUFFER_SIZE, te->record->modi_time);
+    edje_object_part_text_set(elm_layout_edje_get(te->body_main), "elm.text.date", te->buf);
+    /* toolbar */
+    te->toolbar = elm_swallowed_layout(te->body_main, "elm.swallow.toolbar", EDJ_FILE, "edit_toolbar");
+    te->btn_size = elm_swallowed_layout(te->toolbar, "elm.swallow.btn1", EDJ_DIR"/white/memo.edj", "tl_font_size");
+    evas_object_event_callback_add(te->btn_size, EVAS_CALLBACK_MOUSE_UP, _on_font_size_btn_up, te);
+    te->btn_color = elm_swallowed_layout(te->toolbar, "elm.swallow.btn2", EDJ_DIR"/white/memo.edj", "tl_font_color");
+    evas_object_event_callback_add(te->btn_color, EVAS_CALLBACK_MOUSE_UP, _on_font_color_btn_up, te);
+    if (!service_key_check(service, "toggle", "disable")) {
+        elm_swallowed_button(te->toolbar, "elm.swallow.btn4", MEMO_I18N_DRAWING, _on_drawing_mode, te);
+    }
+    /* entry */
+    Evas_Object *sc = elm_swallowed_scroller(te->body_main, "elm.swallow.text");
+    unsigned char *color = (unsigned char *)&te->record->font_color;
+    snprintf(te->buf, MEMO_BUFFER_SIZE, "<font_size=%d><color=#%02x%02x%02x>",
+        te->record->font_size, color[2], color[1], color[0]);
+    te->entry = elm_entry_create(te->body_main, te->buf);
+    elm_entry_input_panel_enabled_set(te->entry, EINA_TRUE);
+    evas_object_size_hint_align_set(te->entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
+    evas_object_size_hint_weight_set(te->entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    elm_entry_autocapital_type_set(te->entry, ELM_AUTOCAPITAL_TYPE_SENTENCE);
+    elm_object_content_set(sc, te->entry);
+    evas_object_smart_callback_add(te->entry, "changed", _on_entry_content_change, te);
+    evas_object_smart_callback_add(te->entry, "preedit,changed", _on_entry_content_change, te);
+    evas_object_smart_callback_add(te->entry, "clicked", _on_entry_clicked, te);
+    /* limit size */
+    elm_entry_markup_filter_append(te->entry, elm_entry_filter_limit_size, &te->limit_filter_data);
+    /* entry content */
+    if (te->record->content != NULL) {
+        char *content = elm_entry_utf8_to_markup(te->record->content);
+        elm_entry_entry_insert(te->entry, content);
+        SFREE(content);
+    } else { /* set init string */
+        char *str = NULL;
+       service_get_extra_data(service, "init_str", &str);
+        if (str != NULL) {
+            elm_entry_entry_insert(te->entry, str);
+           SFREE(str);
+        }
+    }
+    elm_object_focus_set(te->entry, EINA_TRUE);
+    /* imf context */
+    te->imf_context = elm_entry_imf_context_get(te->entry);
+    ecore_imf_context_input_panel_event_callback_add(te->imf_context,
+        ECORE_IMF_INPUT_PANEL_STATE_EVENT, _input_panel_event_callback, te);
+    /* savable */
+    te->cb(te->data, "savable", (void *)(te->savable?1:0));
+}
+
+void memo_text_editor_time_format_update(void *h_te)
+{
+    text_editor_t *te = (text_editor_t *)h_te;
+    memo_time_format(te->buf, MEMO_BUFFER_SIZE, te->record->modi_time);
+    edje_object_part_text_set(elm_layout_edje_get(te->body_main), "elm.text.date", te->buf);
+}
+
+void memo_text_editor_cancel(void *h_te)
+{
+    text_editor_t *te = (text_editor_t *)h_te;
+    if (!te->savable) { /* not modified, return directly */
+        te->cb(te->data, "cancel", NULL);
+    } else {
+        /* hide imf, otherwise popup will be covered by imf */
+        if (te->imf_context != NULL) {
+            ecore_imf_context_input_panel_hide(te->imf_context);
+        }
+        _launch_yes_no_popup(te);
+    }
+}
+void memo_text_editor_save(void *h_te)
+{
+       text_editor_t *te = (text_editor_t *)h_te;
+       service_create(&text_service);
+       service_add_extra_data(text_service, "ug_text", te->data);
+       _save_record(te);
+       te->cb(te->data, "save", NULL);
+}
+
+void *memo_load_text_editor(Evas_Object *win, Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data)
+{
+    text_editor_t *te = SMALLOC(text_editor_t);
+    RETVIF(te==NULL, NULL);
+    service_dump(service);
+    te->win = win;
+    te->parent = parent;
+    te->cb = (cb==NULL ? memo_com_dummy_cb : cb); /* make sure cb is not null, no need to check legitimacy of cb when call */
+    te->data = data;
+
+    /* init */
+    const char *s = NULL;
+    service_get_extra_data(service, "index", &s);
+    if (s == NULL) {
+        te->record = memo_create_data();
+        te->record->id = -1;
+        te->record->modi_time = time((time_t *) 0);
+        te->record->font_size = 44;
+        te->record->font_color = 0xff000000;
+    } else {        /* load item */
+        te->record = memo_get_data(atoi(s));
+       SFREE(s);
+    }
+    te->init_fsize = te->record->font_size;
+    te->init_fcolor = te->record->font_color;
+    /* limitation */
+    te->limit_filter_data.max_char_count = 0;
+    te->limit_filter_data.max_byte_count = 1000;
+
+    _create_text_editor_layout(te, service);
+    return (void *)te;
+}
+
+void memo_destroy_text_editor(void *h_te)
+{
+    text_editor_t *te = (text_editor_t *)h_te;
+    ecore_imf_context_input_panel_event_callback_del(te->imf_context,
+        ECORE_IMF_INPUT_PANEL_STATE_EVENT, _input_panel_event_callback);
+    ecore_imf_context_input_panel_hide(te->imf_context);
+    if (te->h_fss!= NULL) { /* destroy font  size selector */
+        _font_size_selector_del(te);
+    }
+    if (te->h_fcs != NULL) { /* destroy font color selector */
+        _font_color_selector_del(te);
+    }
+    memo_free_data(te->record);
+    evas_object_del(te->body_main);
+    SFREE(te);
+}
diff --git a/src/memo_ug.c b/src/memo_ug.c
new file mode 100644 (file)
index 0000000..af8362d
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+#include <ui-gadget.h>
+#include <Ecore_X.h>
+#include <aul.h>
+#include <supplement.h>
+#include <memo-db.h>
+#include "memo_ug.h"
+
+static void _ug_layout_cb(ui_gadget_h ug, enum ug_mode mode, void *priv)
+{
+    Evas_Object *base, *win;
+    base = (Evas_Object *)ug_get_layout(ug);
+    if (base == NULL) {
+        return;
+    }
+
+    win = ug_get_window();
+    switch (mode) {
+    case UG_MODE_FULLVIEW:
+        evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+        elm_win_resize_object_add(win, base);
+        /* disable effect */
+        //ug_disable_effect(ug);
+        evas_object_show(base);
+        break;
+    default:
+        break;
+    }
+}
+
+static void _ug_result_cb(ui_gadget_h ug, service_h service, void *priv)
+{
+    service_dump(service);
+}
+
+static void _ug_destroy_cb(ui_gadget_h ug, void *priv)
+{
+    if (ug != NULL) {
+        ug_destroy(ug);
+    }
+}
+
+/**
+ * ug_launch_common
+ *
+ * @description
+ *  This is a basic function which designed to invoke any ui gadget.
+ *
+ * @param[in]   service         a service type which will send to ug directly
+ * @param[in]   ug_name    UG name marco defined in memo_ug.h
+ * @return      void
+ */
+void ug_launch_common(service_h service, char *ug_name)
+{
+    ug_cbs_t cbs={0, };
+
+    cbs.layout_cb = _ug_layout_cb;
+    cbs.destroy_cb = _ug_destroy_cb;
+    cbs.result_cb = _ug_result_cb;
+    cbs.priv = NULL;
+
+    ug_create(NULL, ug_name, UG_MODE_FULLVIEW, service, &cbs);
+    service_destroy(service);
+}
+
+/**
+ * ug_launch_common_var
+ *
+ * @description
+ *  This function supply a variadic version of ug_launch_common_var.
+ *  The first and only required variable is the ug_name.
+ *  Its type is string, but the caller should use the macro name which defined in memo_ug.h
+ *  The other variables are optional, it should appear for key-value pair
+ *  The end of optional variables must be NULL.
+ *
+ * @param[in]   ug_name    UG name marco defined in memo_ug.h
+ * @param[in]   ...        pair of key and value, end with NULL
+ * @return      void
+ */
+void ug_launch_common_var(char *ug_name, ...)
+{
+       char *key = NULL;
+       char *val = NULL;
+       service_h service = NULL;
+       service_create(&service);
+
+       va_list ap;
+       va_start(ap, ug_name);
+       while (1) {
+               key = va_arg(ap, char *);
+               val = va_arg(ap, char *);
+
+               if (key == NULL || val == NULL) {
+                       break;
+               }
+               service_add_extra_data(service, key, val);
+       }
+       va_end(ap);
+
+       ug_launch_common(service, ug_name);
+}
+
diff --git a/src/ug-detail.c b/src/ug-detail.c
new file mode 100644 (file)
index 0000000..322bdb6
--- /dev/null
@@ -0,0 +1,174 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <Elementary.h>
+#include <dlog.h>
+#include <ui-gadget-module.h>
+#include <gravel.h>
+#include <memo_string.h>
+#include <extended-elm.h>
+#include <supplement.h>
+#include <memo-assist.h>
+#include <memo-genlist.h>
+#include <memo-assist.h>
+#include <memo_ug.h>
+#include <memo_autolink.h>
+#include <memo-efl.h>
+
+typedef struct __detail_view_t {
+    ug_data_t *ugd;
+    Evas_Object *navigator;
+    Evas_Object *ctrl_bar;
+    Evas_Object *body_main;
+    Evas_Object *entry;
+    char *content;
+
+    /* add more variables here */
+    int index;
+       memo_data_t * md;
+} detail_view_t;
+
+static void _on_quit(void *data, Evas_Object *obj, void *event_info)
+{
+    RETIF(data == NULL);
+    detail_view_t *dv = (detail_view_t *)data;
+    ug_data_t *ugd = dv->ugd;
+    ug_destroy_me(ugd->ug);
+}
+
+static void _on_entry_resize(void *data, Evas_Object *obj, void *event_info)
+{
+    LOGD("---------------_on_entry_resize");
+    detail_view_t *dv = (detail_view_t *)data;
+    elm_entry_entry_set(dv->entry, dv->content);
+    SFREE(dv->content);
+}
+
+static void _create_text_viewer_layout(detail_view_t *dv)
+{
+       dv->body_main = elm_layout_create(dv->navigator, EDJ_FILE, "detail_frame");
+    /* date */
+    memo_time_format(dv->ugd->buf, MEMO_BUFFER_SIZE, dv->md->modi_time);
+    edje_object_part_text_set(_EDJ(dv->body_main), "elm.text.date", dv->ugd->buf);
+    /* content */
+       #if 0
+       char buf[MEMO_BUFFER_SIZE];
+    GString *text =
+        autolink_add_anchor(elm_entry_utf8_to_markup
+                (md->content));
+    unsigned char *color = (unsigned char *)&md->font_color;
+    snprintf(buf, MEMO_BUFFER_SIZE,
+        "<font_size=%d><color=#%02x%02x%02x>",
+        md->font_size, color[2], color[1], color[0]);
+    g_string_prepend(text, buf);
+       g_string_free(text, TRUE);
+       #endif
+
+       char * markup = elm_entry_utf8_to_markup
+                (dv->md->content);
+
+    Evas_Object *sc = NULL;
+    sc = elm_swallowed_scroller(dv->body_main, "elm.swallow.content");
+    Evas_Object * content = elm_entry_create(dv->body_main, markup);
+    dv->content = strdup(markup);
+       SFREE(markup);
+    //evas_object_smart_callback_add(content, "anchor,clicked", autolink_anchor_clicked_cb, ug_get_parent_layout(ugd->ug));
+    evas_object_size_hint_weight_set(content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(content, EVAS_HINT_FILL, EVAS_HINT_EXPAND);
+    elm_entry_editable_set(content, EINA_FALSE);
+    elm_entry_autocapital_type_set(content, ELM_AUTOCAPITAL_TYPE_SENTENCE);
+    elm_object_content_set(sc, content);
+    dv->entry = content;
+    evas_object_render_flush_hook(dv->entry, _on_entry_resize, dv);
+
+    edje_object_signal_emit(_EDJ(dv->body_main), "sig_text_mode", "");
+}
+
+static void _create_doodle_viewer_layout(detail_view_t *dv)
+{
+       dv->body_main = elm_layout_create(dv->navigator, EDJ_FILE, "doodle_viewer");
+
+       /* date */
+       memo_time_format(dv->ugd->buf, MEMO_BUFFER_SIZE, dv->md->modi_time);
+       edje_object_part_text_set(elm_layout_edje_get(dv->body_main), "elm.text.date", dv->ugd->buf);
+
+       /* doodle */
+       snprintf(dv->ugd->buf, MEMO_BUFFER_SIZE, DOODLEDIR "/%d.png", dv->md->id);
+       Evas_Object * doodle = elm_swallowed_icon(dv->body_main, "elm.swallow.doodle", dv->ugd->buf);
+
+       /* comment */
+       Evas_Object *eo = elm_swallowed_layout(dv->body_main, "elm.swallow.comment", EDJ_FILE, "doodle_comment");
+       Evas_Object *ef = elm_entry_add(eo);
+       elm_object_part_content_set(eo, "elm.swallow.editfield", ef);
+
+       elm_entry_editable_set(ef, EINA_FALSE);
+       elm_entry_single_line_set(ef, EINA_TRUE);
+       elm_entry_scrollable_set(ef, EINA_TRUE);
+       dv->entry = ef;
+       elm_entry_cnp_mode_set(dv->entry, ELM_CNP_MODE_PLAINTEXT);
+       memo_comment_recover(dv->entry, dv->md->comment);
+}
+
+static void _create_detail_layout(detail_view_t *dv)
+{
+    dv->md = memo_get_data(dv->index);
+
+    /* add navigationbar */
+    dv->navigator = elm_naviframe_add(dv->ugd->base);
+    if (dv->md != NULL) {
+        if(!dv->md->has_doodle) {
+                       _create_text_viewer_layout(dv);
+        } else {
+                       _create_doodle_viewer_layout(dv);
+               }
+        memo_free_data(dv->md);
+    }
+
+       /* prev button */
+       Evas_Object *btn = elm_button_add(dv->navigator);
+       evas_object_smart_callback_add(btn, "clicked", _on_quit, dv);
+       elm_object_style_set(btn, "naviframe/back_btn/default");
+       /* compose */
+       Elm_Object_Item *navi_it = memo_naviframe_item_push(dv->navigator, MEMO_I18N_MEMO, btn, NULL, dv->body_main, NULL);
+}
+
+void *memo_load_detail_view(ug_data_t *ugd, service_h service)
+{
+    detail_view_t *dv = SMALLOC(detail_view_t);
+    RETVIF(dv == NULL, NULL);
+    dv->ugd = ugd;
+
+    /* init */
+    char *str = NULL;;
+    service_get_extra_data(service, "index", &str);
+       LOGD("index = [%s]",str);
+    if (str != NULL) {
+        dv->index = atoi(str);
+       SFREE(str);
+    } else {
+        SFREE(dv);
+        return NULL;
+    }
+
+    /* create */
+    _create_detail_layout(dv);
+    elm_object_part_content_set(ugd->base, "elm.swallow.content", dv->navigator);
+    return (void *)dv;
+}
diff --git a/src/ug-select.c b/src/ug-select.c
new file mode 100644 (file)
index 0000000..c3e52f7
--- /dev/null
@@ -0,0 +1,254 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <Elementary.h>
+#include <dlog.h>
+#include <ui-gadget-module.h>
+#include <gravel.h>
+#include <memo_string.h>
+#include <extended-elm.h>
+#include <supplement.h>
+#include <memo-assist.h>
+#include <memo-genlist.h>
+#include <memo-assist.h>
+#include <memo-efl.h>
+
+typedef struct __select_view_t {
+    ug_data_t *ugd;
+    Evas_Object *navigator;
+    Evas_Object *ctrl_bar;
+    Evas_Object *r_btn;
+    Evas_Object *body_main;
+
+    /* add more variables here */
+    Elm_Genlist_Item_Class itc;
+    Elm_Genlist_Item_Class itc_draw;
+    Evas_Object *genlist;
+    int selected;
+    int total;
+    Evas_Object *selectioninfo;
+    Evas_Object *selectioninfo_layout;
+
+    Eina_Bool is_textonly;
+} select_view_t;
+
+static void memo_data_iterate_cb (memo_data_t *md, void *user_data);
+
+static void _on_data_update(void *data)
+{
+    select_view_t *sv = (select_view_t *)data;
+    elm_genlist_clear(sv->genlist);
+        memo_all_data(memo_data_iterate_cb, sv);
+    sv->selected = 0;
+        elm_object_disabled_set(sv->r_btn, EINA_TRUE);
+}
+
+static void _on_quit(void *data, Evas_Object *obj, void *event_info)
+{
+    RETIF(data == NULL);
+    select_view_t *sv = (select_view_t *)data;
+    ug_data_t *ugd = sv->ugd;
+    memo_unsubscribe_change(_on_data_update);
+    ug_destroy_me(ugd->ug);
+}
+
+static void _on_add(void *data, Evas_Object *obj, void *event_info)
+{
+    RETIF(data == NULL);
+    select_view_t *sv = (select_view_t *)data;
+    ug_data_t *ugd = sv->ugd;
+    service_h service = NULL;
+    Elm_Object_Item *it;
+    gl_data_t *gld = NULL;
+    int c_text = 0;
+    int c_image = 0;
+    char path[MEMO_BUFFER_SIZE] = {0};
+    memo_data_t *md = NULL;
+
+    service_create(&service);
+    it = elm_genlist_first_item_get(sv->genlist);
+    while (it != NULL) {
+        gld = (gl_data_t *)elm_object_item_data_get(it);
+        md = memo_get_data(gld->index);
+        if (gld->check) {
+            if (gld->has_doodle) {
+                c_image++;
+                snprintf(ugd->buf, MEMO_BUFFER_SIZE, "image%d", c_image);
+                snprintf(path, MEMO_BUFFER_SIZE, "/opt/apps/org.tizen.memo/data/doodle/%d.png", gld->index);
+                service_add_extra_data(service, ugd->buf, path);
+                               LOGD("path = (%s)", path);
+            } else {
+                c_text++;
+                               int length = strlen(md->content) + 2;
+                               char * text = (char *) calloc(1, length);
+                snprintf(ugd->buf, MEMO_BUFFER_SIZE, "text%d", c_text);
+                               memcpy(text, md->content, length - 2);
+                               text[length - 2] = '\n';
+                               text[length - 1] = '\0';
+                service_add_extra_data(service, ugd->buf, text);
+                               if(text) {
+                                       free(text);
+                                       text = NULL;
+                               }
+            }
+        }
+        memo_free_data(md);
+        it = elm_genlist_item_next_get(it);
+    }
+
+    snprintf(ugd->buf, MEMO_BUFFER_SIZE, "%d", c_image);
+    service_add_extra_data(service, "image", ugd->buf);
+    snprintf(ugd->buf, MEMO_BUFFER_SIZE, "%d", c_text);
+    service_add_extra_data(service, "text", ugd->buf);
+    ug_send_result(ugd->ug, service);
+    service_dump(service);
+    service_destroy(service);
+    memo_unsubscribe_change(_on_data_update);
+    ug_destroy_me(ugd->ug);
+}
+
+#pragma GCC diagnostic ignored "-Wformat-extra-args"
+static void _create_selectioninfo(select_view_t *sv)
+{
+    if (sv->selectioninfo == NULL)
+    {
+        sv->selectioninfo = elm_notify_add(sv->body_main);
+        elm_notify_orient_set(sv->selectioninfo, ELM_NOTIFY_ORIENT_BOTTOM);
+        sv->selectioninfo_layout = elm_layout_add(sv->body_main);
+        elm_layout_theme_set(sv->selectioninfo_layout, "standard", "selectioninfo", "vertical/bottom_12");
+        elm_object_content_set(sv->selectioninfo, sv->selectioninfo_layout);
+    }
+
+    if (sv->selected == 0) {
+        evas_object_hide(sv->selectioninfo);
+    } else {
+        char text[128];
+        if (sv->selected == 1) {
+            snprintf(text, 128, "%s", MEMO_I18N_1_MEMO_SELECTED);
+        } else {
+            snprintf(text, 128, MEMO_I18N_D_MEMOS_SELECTED, sv->selected);
+        }
+        edje_object_part_text_set(_EDJ(sv->selectioninfo_layout), "elm.text", text);
+        evas_object_show(sv->selectioninfo);
+    }
+}
+#pragma GCC diagnostic warning "-Wformat-extra-args"
+
+static void _on_item_select_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    Elm_Object_Item *it = (Elm_Object_Item *)event_info;
+    gl_data_t *gld = (gl_data_t *)elm_object_item_data_get(it);
+    select_view_t *sv = (select_view_t *)gld->user_data;
+
+    gld->check = !gld->check;
+    elm_genlist_item_update(it);
+    gld->check ? sv->selected++ : sv->selected--;
+
+    /* update add button and selectinfo */
+    if (sv->selected == 0) {
+        elm_object_disabled_set(sv->r_btn, EINA_TRUE);
+    } else {
+        elm_object_disabled_set(sv->r_btn, EINA_FALSE);
+    }
+    _create_selectioninfo(sv);
+
+    /* reset state, next click event will be triggered as selected */
+    elm_genlist_item_selected_set(it, 0);
+}
+
+static void memo_data_iterate_cb (memo_data_t *md, void *user_data)
+{
+    select_view_t *sv = (select_view_t *)user_data;
+    gl_data_t *gld = SMALLOC(gl_data_t);
+    RETIF(gld == NULL);
+    memo_gld_init(gld, md, sv, NULL);
+    if (md->has_doodle) {
+        if (!sv->is_textonly) {
+            elm_genlist_item_append(sv->genlist, &sv->itc_draw,(void *)gld,
+                NULL, ELM_GENLIST_ITEM_NONE, _on_item_select_cb, NULL);
+            sv->total++;
+        } else {
+               SFREE(gld);
+        }
+    } else {
+        elm_genlist_item_append(sv->genlist, &sv->itc,(void *)gld,
+            NULL, ELM_GENLIST_ITEM_NONE, _on_item_select_cb, NULL);
+        sv->total++;
+    }
+}
+
+static void _create_select_layout(select_view_t *sv)
+{
+    ug_data_t *ugd = sv->ugd;
+
+    /* add navigationbar */
+    sv->navigator = elm_naviframe_add(ugd->base);
+
+    /* body main */
+    sv->body_main = elm_layout_create(sv->navigator, EDJ_FILE, "selector_frame");
+    /* genlist */
+    sv->genlist = elm_genlist_add(sv->body_main);
+    /* apply customized theme */
+    elm_object_theme_set(sv->genlist, sv->ugd->th);
+    elm_genlist_block_count_set(sv->genlist, 10);
+    memo_all_data(memo_data_iterate_cb, sv);
+
+    elm_object_part_content_set(sv->body_main, "elm.swallow.content", sv->genlist);
+    edje_object_part_text_set(_EDJ(sv->body_main), "text", (sv->total == 0 ? "No item" : ""));
+
+    /* compose */
+    Elm_Object_Item *navi_it = elm_naviframe_item_push(sv->navigator, MEMO_I18N_MEMO, NULL, NULL, sv->body_main, NULL);
+    /* control bar */
+       Evas_Object *btn1 = elm_button_add(sv->navigator);
+       elm_object_text_set(btn1, MEMO_I18N_ADD);
+       elm_object_style_set(btn1, "naviframe/toolbar/default");
+       elm_object_item_part_content_set(navi_it, "toolbar_button1", btn1);
+       evas_object_smart_callback_add(btn1, "clicked", _on_add,
+                                                               sv);
+       sv->r_btn = btn1;
+       elm_object_disabled_set(sv->r_btn, EINA_TRUE); /* disable add defaultly */
+
+       Evas_Object *btn2 = elm_button_add(sv->navigator);
+       elm_object_text_set(btn2, MEMO_I18N_CANCEL);
+       elm_object_style_set(btn2, "naviframe/toolbar/default");
+       elm_object_item_part_content_set(navi_it, "toolbar_button2", btn2);
+       evas_object_smart_callback_add(btn2, "clicked", _on_quit,
+                                                               sv);
+}
+
+void *memo_load_select_view(ug_data_t *ugd, service_h service)
+{
+    select_view_t *sv = SMALLOC(select_view_t);
+    RETVIF(sv == NULL, NULL);
+    sv->ugd = ugd;
+    sv->is_textonly = service_key_check(service, "type", "textonly");
+
+    /* date update hooker */
+    memo_subscribe_change(_on_data_update, sv);
+
+    /* init */
+    memo_gl_itc_init(&sv->itc, "memo/edit/list");
+    memo_gl_itc_init(&sv->itc_draw, "memo/edit/list_draw");
+
+    /* create */
+    _create_select_layout(sv);
+    elm_object_part_content_set(ugd->base, "elm.swallow.content", sv->navigator);
+    return (void *)sv;
+}
diff --git a/theme/CMakeLists.txt b/theme/CMakeLists.txt
new file mode 100644 (file)
index 0000000..990eec3
--- /dev/null
@@ -0,0 +1,18 @@
+SET(THFILES white black)
+
+FOREACH(thfile ${THFILES})
+       SET(src ${CMAKE_CURRENT_SOURCE_DIR}/${thfile}/memo.edc)
+       SET(obj ${CMAKE_CURRENT_BINARY_DIR}/${thfile}.edj)
+       MESSAGE("THEME: ${thfile}")
+       ADD_CUSTOM_COMMAND(
+               OUTPUT ${obj}
+               COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/${thfile}/images
+               ${src} ${obj} DEPENDS ${src}
+       )
+       INSTALL(FILES ${obj}
+                       DESTINATION ${EDJDIR}/${thfile} RENAME memo.edj)
+       SET(edjFiles ${edjFiles} ${obj})
+ENDFOREACH(thfile)
+
+MESSAGE(".edj files: ${edjFiles}")
+ADD_CUSTOM_TARGET(th ALL DEPENDS ${edjFiles})
diff --git a/theme/black/images/00_picker_btn_normal.png b/theme/black/images/00_picker_btn_normal.png
new file mode 100644 (file)
index 0000000..9dc73c4
Binary files /dev/null and b/theme/black/images/00_picker_btn_normal.png differ
diff --git a/theme/black/images/00_picker_btn_press.png b/theme/black/images/00_picker_btn_press.png
new file mode 100644 (file)
index 0000000..f65239f
Binary files /dev/null and b/theme/black/images/00_picker_btn_press.png differ
diff --git a/theme/black/images/P02_icon_color.png b/theme/black/images/P02_icon_color.png
new file mode 100644 (file)
index 0000000..8394206
Binary files /dev/null and b/theme/black/images/P02_icon_color.png differ
diff --git a/theme/black/images/P02_icon_color_focus.png b/theme/black/images/P02_icon_color_focus.png
new file mode 100644 (file)
index 0000000..8394206
Binary files /dev/null and b/theme/black/images/P02_icon_color_focus.png differ
diff --git a/theme/black/images/P02_icon_eraser.png b/theme/black/images/P02_icon_eraser.png
new file mode 100644 (file)
index 0000000..0cab038
Binary files /dev/null and b/theme/black/images/P02_icon_eraser.png differ
diff --git a/theme/black/images/P02_icon_eraser_press.png b/theme/black/images/P02_icon_eraser_press.png
new file mode 100644 (file)
index 0000000..0cab038
Binary files /dev/null and b/theme/black/images/P02_icon_eraser_press.png differ
diff --git a/theme/black/images/P02_icon_font_color.png b/theme/black/images/P02_icon_font_color.png
new file mode 100644 (file)
index 0000000..a2bd5b4
Binary files /dev/null and b/theme/black/images/P02_icon_font_color.png differ
diff --git a/theme/black/images/P02_icon_font_color_press.png b/theme/black/images/P02_icon_font_color_press.png
new file mode 100644 (file)
index 0000000..a2bd5b4
Binary files /dev/null and b/theme/black/images/P02_icon_font_color_press.png differ
diff --git a/theme/black/images/P02_icon_font_size.png b/theme/black/images/P02_icon_font_size.png
new file mode 100644 (file)
index 0000000..52931cb
Binary files /dev/null and b/theme/black/images/P02_icon_font_size.png differ
diff --git a/theme/black/images/P02_icon_font_size_press.png b/theme/black/images/P02_icon_font_size_press.png
new file mode 100644 (file)
index 0000000..52931cb
Binary files /dev/null and b/theme/black/images/P02_icon_font_size_press.png differ
diff --git a/theme/black/images/P02_icon_font_type.png b/theme/black/images/P02_icon_font_type.png
new file mode 100644 (file)
index 0000000..abd2499
Binary files /dev/null and b/theme/black/images/P02_icon_font_type.png differ
diff --git a/theme/black/images/P02_icon_font_type_press.png b/theme/black/images/P02_icon_font_type_press.png
new file mode 100644 (file)
index 0000000..abd2499
Binary files /dev/null and b/theme/black/images/P02_icon_font_type_press.png differ
diff --git a/theme/black/images/P02_icon_stroke.png b/theme/black/images/P02_icon_stroke.png
new file mode 100644 (file)
index 0000000..656b788
Binary files /dev/null and b/theme/black/images/P02_icon_stroke.png differ
diff --git a/theme/black/images/P02_icon_stroke_press.png b/theme/black/images/P02_icon_stroke_press.png
new file mode 100644 (file)
index 0000000..656b788
Binary files /dev/null and b/theme/black/images/P02_icon_stroke_press.png differ
diff --git a/theme/black/memo.edc b/theme/black/memo.edc
new file mode 100644 (file)
index 0000000..ed0442d
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 <../../extend/extended-edc.h>
+
+collections {
+    #include <../common.edc>
+}
diff --git a/theme/common.edc b/theme/common.edc
new file mode 100644 (file)
index 0000000..8d5c456
--- /dev/null
@@ -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://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 ICON_BUTTON(iName, img_default, img_focus)\
+group {\
+    name: iName;\
+    images{\
+        image: img_default COMP;\
+        image: img_focus COMP;\
+        image: "00_picker_btn_press.png" COMP;\
+        image: "00_picker_btn_normal.png" COMP;\
+    }\
+    parts {\
+        PART_BG("bg")\
+        PART_BORDER_IMAGE("image_bg", "bg", "00_picker_btn_normal.png", 4, 4, 0, 0)\
+        PART_IMAGE("image_icon", "bg", img_default)\
+        PART_EVENT_RECT("event", "bg")\
+    }/* end parts */\
+\
+    programs {\
+        program {\
+            name: "init";\
+            signal: "load";\
+            source: "";\
+            script {\
+                SCRIPT_CUSTOM_PART("image_bg");\
+                SCRIPT_CUSTOM_PART("image_icon");\
+            }\
+        } /* end program */\
+        program {\
+            name:   "focus";\
+            signal: "focus";\
+            source: "elm";\
+            script {\
+                SCRIPT_SET_IMAGE("image_bg", "00_picker_btn_press.png");\
+                SCRIPT_SET_IMAGE("image_icon", img_focus);\
+           }\
+        } /* end program */\
+        program {\
+            name:   "normal";\
+            signal: "normal";\
+            source: "elm";\
+            script {\
+                SCRIPT_SET_IMAGE("image_bg", "00_picker_btn_normal.png");\
+                SCRIPT_SET_IMAGE("image_icon", img_default);\
+           }\
+        } /* end program */\
+    }/* end programs */\
+}
+
+ICON_BUTTON("tl_font_size", "P02_icon_font_size.png", "P02_icon_font_size_press.png")
+ICON_BUTTON("tl_font_color", "P02_icon_font_color.png", "P02_icon_font_color_press.png")
+ICON_BUTTON("tl_stroke_size", "P02_icon_stroke.png", "P02_icon_stroke_press.png")
+ICON_BUTTON("tl_stroke_color", "P02_icon_color.png", "P02_icon_color_focus.png")
+ICON_BUTTON("tl_stroke_eraser", "P02_icon_eraser.png", "P02_icon_eraser_press.png")
+
diff --git a/theme/white/images/00_picker_btn_normal.png b/theme/white/images/00_picker_btn_normal.png
new file mode 100644 (file)
index 0000000..df4433e
Binary files /dev/null and b/theme/white/images/00_picker_btn_normal.png differ
diff --git a/theme/white/images/00_picker_btn_press.png b/theme/white/images/00_picker_btn_press.png
new file mode 100644 (file)
index 0000000..83284d1
Binary files /dev/null and b/theme/white/images/00_picker_btn_press.png differ
diff --git a/theme/white/images/P02_icon_color.png b/theme/white/images/P02_icon_color.png
new file mode 100644 (file)
index 0000000..23a7fe7
Binary files /dev/null and b/theme/white/images/P02_icon_color.png differ
diff --git a/theme/white/images/P02_icon_color_focus.png b/theme/white/images/P02_icon_color_focus.png
new file mode 100644 (file)
index 0000000..23a7fe7
Binary files /dev/null and b/theme/white/images/P02_icon_color_focus.png differ
diff --git a/theme/white/images/P02_icon_eraser.png b/theme/white/images/P02_icon_eraser.png
new file mode 100644 (file)
index 0000000..ab26f48
Binary files /dev/null and b/theme/white/images/P02_icon_eraser.png differ
diff --git a/theme/white/images/P02_icon_eraser_press.png b/theme/white/images/P02_icon_eraser_press.png
new file mode 100644 (file)
index 0000000..82e1ce1
Binary files /dev/null and b/theme/white/images/P02_icon_eraser_press.png differ
diff --git a/theme/white/images/P02_icon_font_color.png b/theme/white/images/P02_icon_font_color.png
new file mode 100644 (file)
index 0000000..2e9c514
Binary files /dev/null and b/theme/white/images/P02_icon_font_color.png differ
diff --git a/theme/white/images/P02_icon_font_color_press.png b/theme/white/images/P02_icon_font_color_press.png
new file mode 100644 (file)
index 0000000..2e75f62
Binary files /dev/null and b/theme/white/images/P02_icon_font_color_press.png differ
diff --git a/theme/white/images/P02_icon_font_size.png b/theme/white/images/P02_icon_font_size.png
new file mode 100644 (file)
index 0000000..b397b98
Binary files /dev/null and b/theme/white/images/P02_icon_font_size.png differ
diff --git a/theme/white/images/P02_icon_font_size_press.png b/theme/white/images/P02_icon_font_size_press.png
new file mode 100644 (file)
index 0000000..4966066
Binary files /dev/null and b/theme/white/images/P02_icon_font_size_press.png differ
diff --git a/theme/white/images/P02_icon_font_type.png b/theme/white/images/P02_icon_font_type.png
new file mode 100644 (file)
index 0000000..10d9186
Binary files /dev/null and b/theme/white/images/P02_icon_font_type.png differ
diff --git a/theme/white/images/P02_icon_font_type_press.png b/theme/white/images/P02_icon_font_type_press.png
new file mode 100644 (file)
index 0000000..abd2499
Binary files /dev/null and b/theme/white/images/P02_icon_font_type_press.png differ
diff --git a/theme/white/images/P02_icon_stroke.png b/theme/white/images/P02_icon_stroke.png
new file mode 100644 (file)
index 0000000..5a317a8
Binary files /dev/null and b/theme/white/images/P02_icon_stroke.png differ
diff --git a/theme/white/images/P02_icon_stroke_press.png b/theme/white/images/P02_icon_stroke_press.png
new file mode 100644 (file)
index 0000000..5e26ff8
Binary files /dev/null and b/theme/white/images/P02_icon_stroke_press.png differ
diff --git a/theme/white/memo.edc b/theme/white/memo.edc
new file mode 100644 (file)
index 0000000..ed0442d
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://floralicense.org/license/
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 <../../extend/extended-edc.h>
+
+collections {
+    #include <../common.edc>
+}
diff --git a/ug-memo-efl.desktop b/ug-memo-efl.desktop
new file mode 100644 (file)
index 0000000..e5b1a32
--- /dev/null
@@ -0,0 +1,11 @@
+Name=ug-memo-efl
+Exec=/opt/ug/bin/ug-memo-efl
+Icon=
+Type=Application
+Version=0.1.0-0
+NoDisplay=true
+X-TIZEN-Multiple=true
+X-TIZEN-TaskManage=false
+X-TIZEN-Removable=false
+X-TIZEN-SVC=http://tizen.org/appsvc/operation/test|NULL|NULL
+
diff --git a/ug-memo-efl.manifest b/ug-memo-efl.manifest
new file mode 100644 (file)
index 0000000..a76fdba
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+       <request>
+               <domain name="_" />
+       </request>
+</manifest>