apply FSL(Flora Software License)
authorKim Kibum <kb0929.kim@samsung.com>
Fri, 8 Jun 2012 05:54:16 +0000 (14:54 +0900)
committerKim Kibum <kb0929.kim@samsung.com>
Fri, 8 Jun 2012 05:54:16 +0000 (14:54 +0900)
111 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/libsg-memo-efl.install.in [new file with mode: 0755]
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/edit_list.edc [new file with mode: 0644]
edc/gl_edit_list.edc [new file with mode: 0644]
edc/selector.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_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/sg-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/str.in [new file with mode: 0644]
scripts/string.sh [new file with mode: 0755]
scripts/temp [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_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]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..1cf798e
--- /dev/null
@@ -0,0 +1,72 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(ug-memo-efl C)
+
+#debug option
+#SET(CMAKE_BUILD_TYPE Debug)
+#ADD_DEFINITIONS("-DMEMO_DEBUG")
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(EXEC_PREFIX "\${prefix}")
+SET(LIBDIR "\${prefix}/lib")
+SET(INCLUDEDIR "\${prefix}/include")
+SET(VERSION 0.1.0)
+
+SET(SRCS extend/extended-elm.c
+         extend/supplement.c
+         src/memo-efl.c
+         src/ug-select.c
+         src/ug-detail.c
+         src/memo-genlist.c
+         src/memo-assist.c
+         src/memo_ug.c)
+
+SET(VENDOR      "tizen")
+SET(PKGPREFIX   "org.${VENDOR}")
+SET(PACKAGE     ${PROJECT_NAME})
+SET(PKGNAME     "${PKGPREFIX}.${PACKAGE}")
+SET(PREFIX      ${CMAKE_INSTALL_PREFIX})
+SET(ICONDIR     "/opt/ug/res/images/${PROJECT_NAME}")
+SET(EDJDIR      "/opt/ug/res/edje/ug-memo-efl")
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/extend)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED appcore-efl elementary ui-gadget 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_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_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)
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /opt/ug/lib)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/memo.edj DESTINATION /opt/ug/res/edje/${PROJECT_NAME})
+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)
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..7ccb5b5
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,75 @@
+Flora License
+
+Version 1.0, May, 2012
+
+http://www.tizenopensource.org/license
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+"Tizen Certified Platform" shall mean a software platform that complies with the standards set forth in the Compatibility Definition Document and passes the Compatibility Test Suite as defined from time to time by the Tizen Technical Steering Group and certified by the Tizen Association or its designated agent.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work solely as incorporated into a Tizen Certified Platform, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work solely as incorporated into a Tizen Certified Platform to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof pursuant to the copyright license above, in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+  1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+  2. You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+  3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+  4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Flora License to your work
+
+To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Flora License, Version 1.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.tizenopensource.org/license
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/NOTICE b/NOTICE
new file mode 100644 (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..8c75e17
--- /dev/null
@@ -0,0 +1,7 @@
+ug-memo-efl (0.1.0-8) unstable; urgency=low
+
+  * upload
+  * Git: apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.0-8
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 17 Mar 2012 15:32:17 +0800
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..58c2043
--- /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>
+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
+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/libsg-memo-efl.install.in b/debian/libsg-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/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..90ae8a9
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+#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: 87 87 87 255; \
+        rel1 { \
+            relative: 0.0 1.0; \
+            offset: 0 -1; \
+        } \
+    } \
+}
+
+styles
+{
+    style
+    {
+        name: "textblock_style_main";
+        base: "font=Helvetica_Neue:style=Roman font_size=42 align=left color=#F9F9F9 wrap=char";
+    }
+}
+
+#define PART_TEXT_BLACK_LEFT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iSize)\
+PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iSize, 0.0, 0.5, 0, 0, 0, 255)
+
+#define PART_TEXT_GRAY_RIGHT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iSize)\
+PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iSize, 1.0, 0.5, 85, 70, 58, 255)
+
+#define PART_TEXT_WHITE_LEFT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iSize)\
+PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iSize, 0.0, 0.5, 255, 255, 255, 255)
+
+#define PART_TEXT_GRAY_CENTER(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iSize)\
+PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iSize, 0.5, 0.5, 85, 70, 58, 255)
+
+#define PART_TEXT_DETAIL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iSize)\
+PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iSize, 0.0, 0.5, 249, 249, 249, 255)
+
+#define PART_TEXT_DATE(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iSize)\
+PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
+                            iText, iFont, iSize, 0.0, 0.5, 100, 100, 100, 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..da0cfc8
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+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";
+                    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 */
diff --git a/edc/edit_list.edc b/edc/edit_list.edc
new file mode 100644 (file)
index 0000000..64c11ed
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+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", "system_content", 25);
+        PART_EVENT_RECT("event", "bg")
+    } /* parts */
+} /* group */
diff --git a/edc/gl_edit_list.edc b/edc/gl_edit_list.edc
new file mode 100644 (file)
index 0000000..464d943
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT 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", "", "Helvetica Neue:style=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, 0, 0, 0, 255);\
+            }\
+        } /* end program */\
+        program \
+        {\
+            name:    "go_active"; \
+            signal:  "elm,state,selected"; \
+            source:  "elm"; \
+            script {\
+                SCRIPT_SET_COLOR(bg, 50, 50, 50, 255);\
+            }\
+            transition: LINEAR 0.1; \
+        } \
+        program \
+        { \
+            name:    "go_passive"; \
+            signal:  "elm,state,unselected"; \
+            source:  "elm"; \
+            script {\
+                SCRIPT_SET_COLOR(bg, 0, 0, 0, 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..4f9bb58
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT 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/extend/extended-edc.h b/extend/extended-edc.h
new file mode 100644 (file)
index 0000000..db8894c
--- /dev/null
@@ -0,0 +1,360 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT 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; } \
+               fixed: 1 1; \
+       } \
+} \
+
+#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, 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;\
+                       size: iSize;\
+                       align: iAx iAy;\
+               } \
+       } \
+} \
+
+#define PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t,\
+               iText, iFont, iSize, iAx, iAy, iCr, iCg, iCb, iCa)\
+PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
+PART_TEXT(iName, "_"iName, iText, iFont, 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..6722529
--- /dev/null
@@ -0,0 +1,436 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT 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..d6d8679
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+#ifndef __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..013a404
--- /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://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT 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..e90f903
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT 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 void _bundle_iterate_dump_cb(const char *k, const char *v, void *data)
+{
+    LOGD("%s -> %s\n", k, v);
+}
+
+void bundle_dump(bundle *b)
+{
+    if (b != NULL) {
+        bundle_iterate(b, _bundle_iterate_dump_cb, NULL);
+    }
+}
+
+Eina_Bool bundle_key_check(bundle *b, const char *key, const char *val)
+{
+    const char *str = bundle_get_val(b, key);
+    if (str != NULL) {
+        if (strcmp(str, val) == 0) {
+            return EINA_TRUE;
+        }
+    }
+    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..1f1e7ec
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+#ifndef __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 bundle_dump(bundle *b);
+Eina_Bool bundle_key_check(bundle *b, 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..7460a93
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT 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>
+
+#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;
+
+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();
+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, bundle *bd, Memo_Component_Callback cb, void *data);
+void memo_del_font_size_selector(void *h_fss);
+void *memo_load_color_selector(Evas_Object *parent, bundle *bd, Memo_Component_Callback cb, void *data);
+void memo_del_color_selector(void *h_cs);
+void *memo_load_pencil_size_selector(Evas_Object *parent, bundle *bd, Memo_Component_Callback cb, void *data);
+void memo_del_pencil_size_selector(void *h_pss);
+Eina_Bool memo_black_theme_check();
+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);
+
+#endif                /* __MEMO_ASSIST_H__ */
diff --git a/include/memo-efl.h b/include/memo-efl.h
new file mode 100644 (file)
index 0000000..227cf6e
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+#ifndef __memo_efl_H__
+#define __memo_efl_H__
+
+#include <Elementary.h>
+#include <libintl.h>
+#include <bundle.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;
+    struct ui_gadget *ug;
+    char buf[MEMO_BUFFER_SIZE]; /* for temporarily usage only */
+    void *h_ug;
+    Elm_Theme *th; /* customized theme for UG */
+}ug_data_t;
+
+void *memo_load_select_view(ug_data_t *ugd, bundle *data);
+void *memo_load_detail_view(ug_data_t *ugd, bundle *data);
+
+#endif /* __memo_efl_H__ */
diff --git a/include/memo-genlist.h b/include/memo-genlist.h
new file mode 100644 (file)
index 0000000..44ce099
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT 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_string.h b/include/memo_string.h
new file mode 100644 (file)
index 0000000..89e4520
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+#ifndef __MEMO_STRING_H__
+#define __MEMO_STRING_H__
+
+/* system string */
+#define MEMO_I18N_ADD                        dgettext("sys_string", "IDS_COM_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..7cd4cd8
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT 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, bundle *bd, 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..b072aad
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT 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 <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(bundle *bd, 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..6d782da
--- /dev/null
+++ b/memo.edc
@@ -0,0 +1,25 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT 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/gl_edit_list.edc>
+    #include <edc/selector.edc>
+}
diff --git a/packaging/sg-memo-efl.spec b/packaging/sg-memo-efl.spec
new file mode 100644 (file)
index 0000000..974f21f
--- /dev/null
@@ -0,0 +1,43 @@
+Name:       sg-memo-efl
+Summary:    Memo Public Shared-Gadget (EFL)
+Version:    0.1.0
+Release:    1
+Group:      misc
+License:    Flora Software License
+Source0:    sg-memo-efl-0.1.0.tar.gz
+BuildRequires:  pkgconfig(appcore-efl)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(ui-gadget)
+BuildRequires:  pkgconfig(ecore-input)
+BuildRequires:  pkgconfig(evas)
+BuildRequires:  pkgconfig(memo)
+BuildRequires:  pkgconfig(iniparser)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(icu-i18n)
+BuildRequires:  libug-contacts-devel
+BuildRequires:  cmake
+BuildRequires:  gettext-devel
+BuildRequires:  edje-bin
+BuildRequires:  embryo-bin
+
+%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
+               
+%files
+%defattr(-,root,root,-)
+/opt/ug/lib/*
+/opt/ug/res/*
+
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
new file mode 100644 (file)
index 0000000..92f54ba
--- /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 /opt/ug/res/locale/${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/str.in b/scripts/str.in
new file mode 100644 (file)
index 0000000..c142a0b
--- /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 Tizen 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..4e845d6
--- /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/org.tizen.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/memo-assist.c b/src/memo-assist.c
new file mode 100644 (file)
index 0000000..957653b
--- /dev/null
@@ -0,0 +1,194 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT 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);
+}
+
+void memo_com_dummy_cb(void *data, const char *msg, void *event)
+{
+    LOGD("msg : %s\n", msg);
+}
+
+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;
+}
diff --git a/src/memo-efl.c b/src/memo-efl.c
new file mode 100644 (file)
index 0000000..e7ab194
--- /dev/null
@@ -0,0 +1,260 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT 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"
+
+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(struct ui_gadget *ug, enum ug_mode mode, bundle *data, void *priv)
+{
+    Evas_Object *parent;
+    struct ug_data *ugd;
+    const char *index = NULL;
+
+    if (!ug || !priv)
+        return NULL;
+
+    ugd = priv;
+    ugd->ug = ug;
+
+    bundle_dump(data);
+
+    /* 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", "/opt/ug/res/locale");
+
+    parent = ug_get_parent_layout(ug);
+    if (!parent)
+        return NULL;
+
+    index = bundle_get_val(data, "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);
+
+            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 (bundle_key_check(data, "type", "select")) {
+            memo_load_select_view(ugd, data);
+        } else if (index != NULL) {
+            memo_load_detail_view(ugd, data);
+        } else {
+            memo_load_select_view(ugd, data);
+        }
+    }
+
+    return ugd->base;
+}
+
+static void on_start(struct ui_gadget *ug, bundle *data, void *priv)
+{
+}
+
+static void on_pause(struct ui_gadget *ug, bundle *data, void *priv)
+{
+
+}
+
+static void on_resume(struct ui_gadget *ug, bundle *data, void *priv)
+{
+
+}
+
+static void on_destroy(struct ui_gadget *ug, bundle *data, 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;
+
+    evas_object_del(ugd->base);
+    ugd->base = NULL;
+}
+
+static void on_message(struct ui_gadget *ug, bundle *msg, bundle *data, void *priv)
+{
+}
+
+static void on_event(struct ui_gadget *ug, enum ug_event event, bundle *data, 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(struct ui_gadget *ug, enum ug_key_event event, bundle *data, 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..8c085d3
--- /dev/null
@@ -0,0 +1,288 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT 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_ug.c b/src/memo_ug.c
new file mode 100644 (file)
index 0000000..ed1b8d1
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+#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(struct ui_gadget *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_t *ug, bundle *result, void *priv)
+{
+    bundle_dump(result);
+}
+
+static void _ug_destroy_cb(struct ui_gadget *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]   bd         a bundle 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(bundle *bd, 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, bd, &cbs);
+    bundle_free(bd);
+}
+
+/**
+ * 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;
+    bundle *bd = bundle_create();
+
+    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;
+        }
+        bundle_add(bd, key, val);
+    }
+    va_end(ap);
+
+    ug_launch_common(bd, ug_name);
+}
+
diff --git a/src/ug-detail.c b/src/ug-detail.c
new file mode 100644 (file)
index 0000000..234c47b
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT 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-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;
+} 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_detail_layout(detail_view_t *dv)
+{
+    ug_data_t *ugd = dv->ugd;
+    Evas_Object *content = NULL;
+    memo_data_t *md = memo_get_data(dv->index);
+
+    /* add navigationbar */
+    dv->navigator = elm_naviframe_add(ugd->base);
+
+    /* body main */
+    dv->body_main = elm_layout_create(dv->navigator, EDJ_FILE, "detail_frame");
+    if (md != NULL) {
+        /* date */
+        memo_time_format(ugd->buf, MEMO_BUFFER_SIZE, md->modi_time);
+        edje_object_part_text_set(_EDJ(dv->body_main), "elm.text.date", ugd->buf);
+        /* content */
+        if(md->has_doodle) {
+            snprintf(ugd->buf, MEMO_BUFFER_SIZE, DOODLEDIR"/%d.png", (int)md->id);
+            content = elm_swallowed_icon(dv->body_main, "elm.swallow.content", ugd->buf);
+        } else {
+            char buf[MEMO_BUFFER_SIZE];
+            Evas_Object *sc = NULL;
+            sc = elm_swallowed_scroller(dv->body_main, "elm.swallow.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]);
+            content = elm_entry_create(dv->body_main, buf);
+            elm_entry_entry_insert(content, elm_entry_utf8_to_markup(md->content));
+            dv->content = strdup(elm_entry_entry_get(content));
+            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", "");
+        }
+        memo_free_data(md);
+    }
+
+    /* compose */
+    Elm_Object_Item *navi_it = elm_naviframe_item_push(dv->navigator, MEMO_I18N_MEMO, NULL, NULL, dv->body_main, NULL);
+    Evas_Object *ctrl_bar = memo_controlbar_add(dv->navigator);
+    elm_toolbar_item_append(ctrl_bar, NULL, MEMO_I18N_QUIT, _on_quit, dv);
+    elm_object_item_part_content_set(navi_it, "controlbar", ctrl_bar);
+}
+
+void *memo_load_detail_view(ug_data_t *ugd, bundle *data)
+{
+    detail_view_t *dv = SMALLOC(detail_view_t);
+    RETVIF(dv == NULL, NULL);
+    dv->ugd = ugd;
+
+    /* init */
+    const char *str;
+    str = bundle_get_val(data, "index");
+    if (str != NULL) {
+        dv->index = atoi(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..fdef4b5
--- /dev/null
@@ -0,0 +1,224 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  * 
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  * 
+  *     http://www.tizenopensource.org/license
+  * 
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT 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;
+    Elm_Object_Item *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;
+} 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_item_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;
+    bundle *b = 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;
+
+    b = bundle_create();
+    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, DOODLEDIR"/%d.png", gld->index);
+                bundle_add(b, ugd->buf, path);
+            } else {
+                c_text++;
+                snprintf(ugd->buf, MEMO_BUFFER_SIZE, "text%d", c_text);
+                bundle_add(b, ugd->buf, md->content);
+            }
+        }
+        memo_free_data(md);
+        it = elm_genlist_item_next_get(it);
+    }
+
+    snprintf(ugd->buf, MEMO_BUFFER_SIZE, "%d", c_image);
+    bundle_add(b, "image", ugd->buf);
+    snprintf(ugd->buf, MEMO_BUFFER_SIZE, "%d", c_text);
+    bundle_add(b, "text", ugd->buf);
+    ug_send_result(ugd->ug, b);
+    bundle_dump(b);
+    bundle_free(b);
+    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_item_disabled_set(sv->r_btn, EINA_TRUE);
+    } else {
+        elm_object_item_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) {
+        elm_genlist_item_append(sv->genlist, &sv->itc_draw,(void *)gld,
+            NULL, ELM_GENLIST_ITEM_NONE, _on_item_select_cb, NULL);
+    } 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 *ctrl_bar = memo_controlbar_add(sv->navigator);
+    elm_toolbar_item_append(ctrl_bar, NULL, MEMO_I18N_CANCEL, _on_quit, sv);
+    sv->r_btn = elm_toolbar_item_append(ctrl_bar, NULL, MEMO_I18N_ADD, _on_add, sv);
+    elm_object_item_part_content_set(navi_it, "controlbar", ctrl_bar);
+    elm_object_item_disabled_set(sv->r_btn, EINA_TRUE); /* disable add defaultly */
+}
+
+void *memo_load_select_view(ug_data_t *ugd, bundle *data)
+{
+    select_view_t *sv = SMALLOC(select_view_t);
+    RETVIF(sv == NULL, NULL);
+    sv->ugd = ugd;
+
+    /* 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;
+}