APPLY_RSA 2.0alpha master 2.0_alpha submit/master/20120920.150953
authorbyungjai.im <byungjai.im@samsung.com>
Tue, 21 Aug 2012 13:17:12 +0000 (22:17 +0900)
committerbyungjai.im <byungjai.im@samsung.com>
Tue, 21 Aug 2012 13:17:12 +0000 (22:17 +0900)
75 files changed:
CMakeLists.txt
LICENSE
debian/changelog
debian/control
debian/libsg-memo-efl.install.in [deleted file]
edc/common.edc
edc/detail.edc
edc/doodle_editor.edc [new file with mode: 0644]
edc/edit_list.edc
edc/edit_tool.edc [new file with mode: 0644]
edc/gl_edit_list.edc
edc/selector.edc
edc/text_editor.edc [new file with mode: 0644]
extend/extended-edc.h
extend/extended-elm.c
extend/extended-elm.h
extend/gravel.h
extend/supplement.c
extend/supplement.h
include/memo-assist.h
include/memo-efl.h
include/memo-genlist.h
include/memo_autolink.h [new file with mode: 0644]
include/memo_doodle_editor.h [new file with mode: 0644]
include/memo_string.h
include/memo_text_editor.h
include/memo_ug.h
memo.edc
packaging/ug-memo-efl.spec [moved from packaging/sg-memo-efl.spec with 60% similarity]
scripts/copyright [new file with mode: 0644]
scripts/str.in
scripts/string.sh
src/edit.c [new file with mode: 0644]
src/memo-assist.c
src/memo-efl.c
src/memo-genlist.c
src/memo_autolink.c [new file with mode: 0644]
src/memo_doodle_editor.c [new file with mode: 0644]
src/memo_text_editor.c [new file with mode: 0644]
src/memo_ug.c
src/ug-detail.c
src/ug-select.c
theme/CMakeLists.txt [new file with mode: 0644]
theme/black/images/00_picker_btn_normal.png [new file with mode: 0644]
theme/black/images/00_picker_btn_press.png [new file with mode: 0644]
theme/black/images/P02_icon_color.png [new file with mode: 0644]
theme/black/images/P02_icon_color_focus.png [new file with mode: 0644]
theme/black/images/P02_icon_eraser.png [new file with mode: 0644]
theme/black/images/P02_icon_eraser_press.png [new file with mode: 0644]
theme/black/images/P02_icon_font_color.png [new file with mode: 0644]
theme/black/images/P02_icon_font_color_press.png [new file with mode: 0644]
theme/black/images/P02_icon_font_size.png [new file with mode: 0644]
theme/black/images/P02_icon_font_size_press.png [new file with mode: 0644]
theme/black/images/P02_icon_font_type.png [new file with mode: 0644]
theme/black/images/P02_icon_font_type_press.png [new file with mode: 0644]
theme/black/images/P02_icon_stroke.png [new file with mode: 0644]
theme/black/images/P02_icon_stroke_press.png [new file with mode: 0644]
theme/black/memo.edc [new file with mode: 0644]
theme/common.edc [new file with mode: 0644]
theme/white/images/00_picker_btn_normal.png [new file with mode: 0644]
theme/white/images/00_picker_btn_press.png [new file with mode: 0644]
theme/white/images/P02_icon_color.png [new file with mode: 0644]
theme/white/images/P02_icon_color_focus.png [new file with mode: 0644]
theme/white/images/P02_icon_eraser.png [new file with mode: 0644]
theme/white/images/P02_icon_eraser_press.png [new file with mode: 0644]
theme/white/images/P02_icon_font_color.png [new file with mode: 0644]
theme/white/images/P02_icon_font_color_press.png [new file with mode: 0644]
theme/white/images/P02_icon_font_size.png [new file with mode: 0644]
theme/white/images/P02_icon_font_size_press.png [new file with mode: 0644]
theme/white/images/P02_icon_font_type.png [new file with mode: 0644]
theme/white/images/P02_icon_font_type_press.png [new file with mode: 0644]
theme/white/images/P02_icon_stroke.png [new file with mode: 0644]
theme/white/images/P02_icon_stroke_press.png [new file with mode: 0644]
theme/white/memo.edc [new file with mode: 0644]
ug-memo-efl.desktop [new file with mode: 0644]

index 1cf798e..bc77731 100644 (file)
@@ -14,10 +14,14 @@ SET(VERSION 0.1.0)
 SET(SRCS extend/extended-elm.c
          extend/supplement.c
          src/memo-efl.c
+         src/memo_autolink.c
+         src/edit.c
          src/ug-select.c
          src/ug-detail.c
          src/memo-genlist.c
          src/memo-assist.c
+         src/memo_doodle_editor.c
+         src/memo_text_editor.c
          src/memo_ug.c)
 
 SET(VENDOR      "tizen")
@@ -32,7 +36,7 @@ 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)
+pkg_check_modules(pkgs REQUIRED appcore-efl appsvc elementary ui-gadget-1 ecore evas memo iniparser dlog bundle)
 
 FOREACH(flag ${pkgs_CFLAGS})
        SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
@@ -40,7 +44,7 @@ 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})
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS}")
 
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 ADD_DEFINITIONS("-DPACKAGE_PREFIX=\"${PKGPREFIX}\"")
@@ -63,6 +67,10 @@ ADD_CUSTOM_TARGET(memo.edj
 )
 ADD_DEPENDENCIES(${PROJECT_NAME} memo.edj)
 
+
+
+CONFIGURE_FILE(${PROJECT_NAME}.desktop ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.desktop)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.desktop DESTINATION /opt/share/applications)
 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})
@@ -70,3 +78,4 @@ INSTALL(FILES ${CMAKE_SOURCE_DIR}/images/01_header_icon_cancel.png DESTINATION $
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/images/01_header_icon_done.png DESTINATION ${ICONDIR})
 
 ADD_SUBDIRECTORY(po)
+ADD_SUBDIRECTORY(theme)
diff --git a/LICENSE b/LICENSE
index 7ccb5b5..7365be5 100644 (file)
--- a/LICENSE
+++ b/LICENSE
@@ -60,7 +60,7 @@ 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]
+   copyright 2012  Samsung Electronics Co., Ltd
 
    Licensed under the Flora License, Version 1.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -73,3 +73,4 @@ To apply the Flora License to your work, attach the following boilerplate notice
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
+
index 8c75e17..bdcab8e 100644 (file)
-ug-memo-efl (0.1.0-8) unstable; urgency=low
+ug-memo-efl (0.1.1-37) unstable; urgency=low
+
+  * Fix Voice call launching problem
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-37
+
+ -- Goo Lee <goo81.lee@samsung.com>  Sat, 21 July 2012 18:12:30 +0800
+
+ug-memo-efl (0.1.1-36) unstable; urgency=low
+
+  * [Request]UG api migration.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-36
+
+ -- Wei Hua <wei2012.hua@samsung.com>  Sat, 14 Jul 2012 14:48:30 +0800
+
+ug-memo-efl (0.1.1-34) unstable; urgency=low
+
+  * [Request]Apply package strip
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-34
+
+ -- Goo Lee <goo81.lee@samsung.com>  Fri, 13 July 2012 19:35:30 +0800
+
+ug-memo-efl (0.1.1-33) unstable; urgency=low
+
+  * [Request]Remove discard vconf code.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-33
+
+ -- Wei Hua <wei2012.hua@samsung.com>  Fri, 8 Jun 2012 16:03:30 +0800
+
+ug-memo-efl (0.1.1-32) unstable; urgency=low
+
+  * [Request]Fix add new memo can't be added to favourites list in NFC.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-32
+
+ -- Wei Hua <wei2012.hua@samsung.com>  Wen, 23 May 2012 09:11:30 +0800
+
+ug-memo-efl (0.1.1-31) unstable; urgency=low
+
+  * [Request]Support Dynamic Font Change
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-31
+
+ -- Wei Hua <wei2012.hua@samsung.com>  Tue, 15 May 2012 14:03:30 +0800
+
+ug-memo-efl (0.1.1-30) unstable; urgency=low
+
+  * [Request]Support Dynamic Font Change
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-30
+
+ -- Wei Hua <wei2012.hua@samsung.com>  Mon, 14 May 2012 17:55:00 +0800
+
+ug-memo-efl (0.1.1-29) unstable; urgency=low
+
+  * Upload package 
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-29
+
+ -- Goo Lee <goo81.lee@samsung.com>  Wed, 9 May 2012 17:18:39 +0800
+ug-memo-efl (0.1.1-28) unstable; urgency=low
+
+  * [Request]Filtering memo list for select only text memo
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-28
+
+ -- Goo Lee <goo81.lee@samsung.com>  Wed, 9 May 2012 17:05:39 +0800
+
+ug-memo-efl (0.1.1-27) unstable; urgency=low
+
+  * [Request]PKG upload for S1-2910 and S1-2911.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-27
+
+ -- Feng Li <feng.li@samsung.com>  Thu, 3 May 2012 17:05:39 +0800
+
+ug-memo-efl (0.1.1-26) unstable; urgency=low
+
+  * [Request]Elementary v1.0 PKG upload.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-26
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 13 Mar 2012 20:34:44 +0800
+
+ug-memo-efl (0.1.1-25) unstable; urgency=low
+
+  * [Request]elm_entry_autocapitalization_set API is deprecated.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-25
+
+ -- Feng Li <feng.li@samsung.com>  Mon, 12 Mar 2012 17:15:39 +0800
+
+ug-memo-efl (0.1.1-24) unstable; urgency=low
+
+  * [Request]Changeset2 for Elm_Editfield and Elm_Searchbar widgets deprecation.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-24
+
+ -- Feng Li <feng.li@samsung.com>  Sat, 3 Mar 2012 17:15:18 +0800
+
+ug-memo-efl (0.1.1-23) unstable; urgency=low
+
+  * [Request]upload
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-23
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 03 Mar 2012 09:02:01 +0800
+
+ug-memo-efl (0.1.1-22) unstable; urgency=low
+
+  * [Request]Changeset1 for Elm_Editfield and Elm_Searchbar widgets deprecation.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-22
+
+ -- Feng Li <feng.li@samsung.com>  Fri, 2 Mar 2012 15:00:32 +0800
+
+ug-memo-efl (0.1.1-21) unstable; urgency=low
+
+  * [Request]Changeset1 for Elementary API change as EFL migration.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-21
+
+ -- Feng Li <feng.li@samsung.com>  Wed, 15 Feb 2012 18:00:47 +0800
+
+ug-memo-efl (0.1.1-20) unstable; urgency=low
+
+  * [Request]Voice call launch method changes from AUL to appsvc.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-20
+
+ -- Feng Li <feng.li@samsung.com>  Mon, 30 Jan 2012 11:07:47 +0800
+
+ug-memo-efl (0.1.1-19) unstable; urgency=low
+
+  * [Upload]Increase version.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-19
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 05 Jan 2012 11:24:47 +0800
+
+ug-memo-efl (0.1.1-18) unstable; urgency=low
+
+  * [Upload]Increase version.
+  * Git : slp/apps/u/ug-memo-efl
+  * Tag : ug-memo-efl_0.1.1-18
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 04 Jan 2012 17:03:47 +0800
+
+ug-memo-efl (0.1.1-17) unstable; urgency=low
+
+  * [Request]rename package name
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : ug-memo-efl_0.1.1-17
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 07 Dec 2011 15:00:42 +0800
+
+sg-memo-efl (0.1.1-16) unstable; urgency=low
+
+  * [CQ][H0100137846]Title of bottom button isn't in line with UI guideline.
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-16
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 03 Dec 2011 15:00:42 +0800
+
+sg-memo-efl (0.1.1-15) unstable; urgency=low
+
+  * only pure text can be pasted into entry(editfield, searchbar) with new introduced API elm_entry_cnp_mode_set
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-15
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 01 Dec 2011 17:20:35 +0800
+
+sg-memo-efl (0.1.1-14) unstable; urgency=low
+
+  * [CQ][H0100137227]use 1 pixel for bottom margin of genlist
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-14
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 23 Nov 2011 14:30:54 +0800
+
+sg-memo-efl (0.1.1-13) unstable; urgency=low
+
+  * [CQ][H0100137310]customized border color for font/stroke color selector
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-13
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 23 Nov 2011 14:08:54 +0800
+
+sg-memo-efl (0.1.1-12) unstable; urgency=low
+
+  * remove unnecessary ecore_idler, since popup and imf hide effect do not conflict anymore
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-12
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 21 Nov 2011 13:38:46 +0800
+
+sg-memo-efl (0.1.1-11) unstable; urgency=low
+
+  * [fix bug]H0100137141, use win as parent of popup to prevent mouse events received by cancel button
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-11
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 21 Nov 2011 13:20:36 +0800
+
+sg-memo-efl (0.1.1-10) unstable; urgency=low
+
+  * adjust font style of time
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-10
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 21 Nov 2011 10:27:16 +0800
+
+sg-memo-efl (0.1.1-9) unstable; urgency=low
+
+  * ug effect update
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-9
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 14 Nov 2011 17:21:31 +0800
+
+sg-memo-efl (0.1.1-8) unstable; urgency=low
+
+  * disable right button of selector with elm_controlbar_item_disabled_set
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-8
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 09 Nov 2011 11:37:01 +0800
+
+sg-memo-efl (0.1.1-7) unstable; urgency=low
+
+  * naviframe layout update
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-7
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 09 Nov 2011 11:15:24 +0800
+
+sg-memo-efl (0.1.1-6) unstable; urgency=low
+
+  * [fix bug]H0100136395, update select view when data modified by external application
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-6
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 05 Nov 2011 14:29:14 +0800
+
+sg-memo-efl (0.1.1-5) unstable; urgency=low
+
+  * copyright for edc
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-5
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 19 Oct 2011 14:56:33 +0800
+
+sg-memo-efl (0.1.1-4) unstable; urgency=low
+
+  * copyright update
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-4
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 19 Oct 2011 14:37:00 +0800
+
+sg-memo-efl (0.1.1-3) unstable; urgency=low
+
+  * variable height of genlist
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-3
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 12 Oct 2011 16:22:12 +0800
+
+sg-memo-efl (0.1.1-2) unstable; urgency=low
+
+  * sync modification from memo
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-2
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 12 Oct 2011 13:46:04 +0800
+
+sg-memo-efl (0.1.1-1) unstable; urgency=low
+
+  * upload
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-1
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 06 Oct 2011 10:48:48 +0800
+
+sg-memo-efl (0.1.1-0) unstable; urgency=low
+
+  * [detail ug]filter mouse event
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.1-0
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 21 Sep 2011 14:07:21 +0800
+
+sg-memo-efl (0.1.0-99) unstable; urgency=low
+
+  * unused postinst script
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-99
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 20 Sep 2011 15:22:22 +0800
+
+sg-memo-efl (0.1.0-98) unstable; urgency=low
+
+  * package size optimize
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-98
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 20 Sep 2011 09:02:33 +0800
+
+sg-memo-efl (0.1.0-97) unstable; urgency=low
+
+  * return failed if id of record is illegal
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-97
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 07 Sep 2011 09:55:00 +0800
+
+sg-memo-efl (0.1.0-96) unstable; urgency=low
+
+  * acquire user confirmation when shift between text/draw mode if record already been modified
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-96
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 03 Sep 2011 14:14:08 +0800
+
+sg-memo-efl (0.1.0-95) unstable; urgency=low
+
+  * [i18n]sync from memo
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-95
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 01 Sep 2011 10:52:39 +0800
+
+sg-memo-efl (0.1.0-94) unstable; urgency=low
+
+  * sync from memo(customized edc for each theme)
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-94
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 30 Aug 2011 09:58:55 +0800
+
+sg-memo-efl (0.1.0-93) unstable; urgency=low
+
+  * whitespace of korean character may disappear sometimes
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-93
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 27 Aug 2011 13:11:12 +0800
+
+sg-memo-efl (0.1.0-92) unstable; urgency=low
+
+  * sync modification from memo
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-92
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 22 Aug 2011 08:53:28 +0800
+
+sg-memo-efl (0.1.0-91) unstable; urgency=low
+
+  * elm_bg swallowed in elm_layout(application, default)
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-91
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 09 Aug 2011 09:30:35 +0800
+
+sg-memo-efl (0.1.0-90) unstable; urgency=low
+
+  * sync modification from memo
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-90
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Fri, 05 Aug 2011 16:33:28 +0800
+
+sg-memo-efl (0.1.0-89) unstable; urgency=low
+
+  * NBeat layout update
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-89
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 01 Aug 2011 14:57:06 +0800
+
+sg-memo-efl (0.1.0-88) unstable; urgency=low
+
+  * sync modification from memo
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-88
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 30 Jul 2011 10:32:29 +0800
+
+sg-memo-efl (0.1.0-87) unstable; urgency=low
+
+  * sync from memo
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-87
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 26 Jul 2011 14:51:35 +0800
+
+sg-memo-efl (0.1.0-86) unstable; urgency=low
+
+  * apply customize theme to genlist only
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-86
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 25 Jul 2011 10:46:40 +0800
+
+sg-memo-efl (0.1.0-85) unstable; urgency=low
+
+  * upload
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-85
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 21 Jul 2011 11:45:15 +0800
+
+sg-memo-efl (0.1.0-84) unstable; urgency=low
+
+  * efl update
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-84
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 21 Jul 2011 11:10:24 +0800
+
+sg-memo-efl (0.1.0-83) unstable; urgency=low
+
+  * upload
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-83
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 21 Jul 2011 10:47:26 +0800
+
+sg-memo-efl (0.1.0-82) unstable; urgency=low
+
+  * adjust dependency
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-82
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 20 Jul 2011 14:20:18 +0800
+
+sg-memo-efl (0.1.0-81) unstable; urgency=low
+
+  * modify copyright as lgpl
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-81
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 18 Jul 2011 09:03:05 +0800
+
+sg-memo-efl (0.1.0-80) unstable; urgency=low
+
+  * UG hide/show effect update
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-80
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 13 Jul 2011 08:53:08 +0800
+
+sg-memo-efl (0.1.0-79) unstable; urgency=low
+
+  * sync
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-79
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 28 Jun 2011 11:40:49 +0800
+
+sg-memo-efl (0.1.0-78) unstable; urgency=low
+
+  * sync
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-78
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 22 Jun 2011 14:57:33 +0800
+
+sg-memo-efl (0.1.0-77) unstable; urgency=low
+
+  * i18n, adjust time format by udatpg_getBestPattern
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-77
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 20 Jun 2011 13:11:18 +0800
+
+sg-memo-efl (0.1.0-76) unstable; urgency=low
+
+  * UG hide/show effect update
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-76
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 20 Jun 2011 09:43:59 +0800
+
+sg-memo-efl (0.1.0-75) unstable; urgency=low
+
+  * upload
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-75
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 30 May 2011 11:15:22 +0800
+
+sg-memo-efl (0.1.0-74) unstable; urgency=low
 
   * upload
-  * Git: apps/u/ug-memo-efl
-  * Tag : ug-memo-efl_0.1.0-8
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-74
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 30 May 2011 09:36:08 +0800
+
+sg-memo-efl (0.1.0-73) unstable; urgency=low
+
+  * upload
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-73
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 19 May 2011 15:09:43 +0800
+
+sg-memo-efl (0.1.0-72) unstable; urgency=low
+
+  * Standardize parsing url and email
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-72
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 18 May 2011 10:57:59 +0800
+
+sg-memo-efl (0.1.0-71) unstable; urgency=low
+
+  * update dependency of libicu
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-71
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 16 May 2011 10:35:51 +0800
+
+sg-memo-efl (0.1.0-70) unstable; urgency=low
+
+  * upload
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-70
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 12 May 2011 08:35:48 +0800
+
+sg-memo-efl (0.1.0-69) unstable; urgency=low
+
+  * add dependency
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-69
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 04 May 2011 14:29:46 +0800
+
+sg-memo-efl (0.1.0-68) unstable; urgency=low
+
+  * edit doodle done
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-68
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 04 May 2011 14:02:52 +0800
+
+sg-memo-efl (0.1.0-67) unstable; urgency=low
+
+  * upload
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-67
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 28 Apr 2011 14:29:49 +0800
+
+sg-memo-efl (0.1.0-66) unstable; urgency=low
+
+  * upload
+  * Git : git@git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-66
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 23 Apr 2011 11:22:44 +0800
+
+sg-memo-efl (0.1.0-65) unstable; urgency=low
+
+  * upload
+  * Git : git_server:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-65
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 20 Apr 2011 08:38:36 +0800
+
+sg-memo-efl (0.1.0-64) unstable; urgency=low
+
+  * add missing edc files
+  * Git : 165.213.180.234:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-64
+
+ -- canjiang lu <canjiang.lu@samsung.com>  Tue, 19 Apr 2011 08:46:33 +0800
+
+sg-memo-efl (0.1.0-63) unstable; urgency=low
+
+  * add ug template
+  * Git : 165.213.180.234:slp/apps/s/sg-memo-efl
+  * Tag : sg-memo-efl_0.1.0-63
+
+ -- canjiang lu <canjiang.lu@samsung.com>  Sat, 09 Apr 2011 16:40:10 +0800
+
+sg-memo-efl (0.1.0-62) unstable; urgency=low
+
+  * [Upload]Use correct dependence
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-62
+
+ -- Yang Qing <qing_.yang@samsung.com>  Tue, 29 Mar 2011 16:18:27 +0800
+
+sg-memo-efl (0.1.0-61) unstable; urgency=low
+
+  * [Upload]Remove contact UG dependence
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-61
+
+ -- Yang Qing <qing_.yang@samsung.com>  Mon, 28 Mar 2011 20:26:10 +0800
+
+sg-memo-efl (0.1.0-60) unstable; urgency=low
+
+  * [Upload]Increase a version
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-60
+
+ -- Yang Qing <qing_.yang@samsung.com>  Mon, 28 Mar 2011 09:48:06 +0800
+
+sg-memo-efl (0.1.0-59) unstable; urgency=low
+
+  * [Upload]Increase a version.
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-59
+
+ -- Yang Qing <qing_.yang@samsung.com>  Wed, 23 Mar 2011 15:12:35 +0800
+
+sg-memo-efl (0.1.0-58) unstable; urgency=low
+
+  * [CMakeLists]Add contacts-service in pkg_check_modules
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-58
+
+ -- Yang Qing <qing_.yang@samsung.com>  Wed, 23 Mar 2011 13:43:37 +0800
+
+sg-memo-efl (0.1.0-57) unstable; urgency=low
+
+  * [Detail]Apply autolink to show memo detail.
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-57
+
+ -- Yang Qing <qing_.yang@samsung.com>  Wed, 23 Mar 2011 13:40:28 +0800
+
+sg-memo-efl (0.1.0-56) unstable; urgency=low
+
+  * upload
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-56
+
+ -- Yang Qing <qing_.yang@samsung.com>  Thu, 17 Mar 2011 08:57:09 +0800
+
+sg-memo-efl (0.1.0-55) unstable; urgency=low
+
+  * upload
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-55
+
+ -- Yang Qing <qing_.yang@samsung.com>  Mon, 07 Mar 2011 10:40:03 +0800
+
+sg-memo-efl (0.1.0-54) unstable; urgency=low
+
+  * display no item when no record
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-54
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 07 Mar 2011 10:32:15 +0800
+
+sg-memo-efl (0.1.0-53) unstable; urgency=low
+
+  * Change ADD & QUIT button position
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-53
+
+ -- Yang Qing <qing_.yang@samsung.com>  Fri, 04 Mar 2011 10:32:15 +0800
+
+sg-memo-efl (0.1.0-52) unstable; urgency=low
+
+  * upload
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-52
+
+ -- Yang Qing <qing_.yang@samsung.com>  Fri, 25 Feb 2011 13:52:37 +0800
+
+sg-memo-efl (0.1.0-51) unstable; urgency=low
+
+  * upload
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-51
+
+ -- Yang Qing <qing_.yang@samsung.com>  Fri, 18 Feb 2011 16:22:12 +0800
+
+sg-memo-efl (0.1.0-50) unstable; urgency=low
+
+  * Remove clock ug package name in control file
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-50 
+
+ -- Junho Lee <junho4810.lee@samsung.com>  Thu, 10 Feb 2011 20:06:55 +0900
+
+sg-memo-efl (0.1.0-49) unstable; urgency=low
+
+  * Change clock ug package name in control file(temporary code).
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-49 
+
+ -- Junho Lee <junho4810.lee@samsung.com>  Thu, 10 Feb 2011 20:01:01 +0900
+
+sg-memo-efl (0.1.0-48) unstable; urgency=low
+
+  * Add UG clock dependency(temporary code).
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-48 
+
+ -- Junho Lee <junho4810.lee@samsung.com>  Wed, 09 Feb 2011 18:04:24 +0900
+
+sg-memo-efl (0.1.0-47) unstable; urgency=low
+
+  * upload
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-47
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 31 Jan 2011 10:41:55 +0800
+
+sg-memo-efl (0.1.0-46) unstable; urgency=low
+
+  * upload
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-46
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 24 Jan 2011 14:57:12 +0800
+
+sg-memo-efl (0.1.0-45) unstable; urgency=low
+
+  * upload
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-45
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 20 Jan 2011 10:05:38 +0800
+
+sg-memo-efl (0.1.0-44) unstable; urgency=low
+
+  * modify doodle path
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-44
+
+ -- Yang Qing <qing_.yang@samsung.com>  Wed, 19 Jan 2011 14:25:37 +0800
+
+sg-memo-efl (0.1.0-43) unstable; urgency=low
+
+  * fix build error
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-43
+
+ -- Yang Qing <qing_.yang@samsung.com>  Wed, 12 Jan 2011 14:44:34 +0800
+
+sg-memo-efl (0.1.0-42) unstable; urgency=low
+
+  * elm_popup_timeout_set API changed
+  * Git: git@165.213.180.234:slp/apps/s/sg-memo-efl.git
+  * Tag: sg-memo-efl_0.1.0-42
+
+ -- Yang Qing <qing_.yang@samsung.com>  Wed, 12 Jan 2011 14:11:35 +0800
+
+sg-memo-efl (0.1.0-41) unstable; urgency=low
+
+  * upload
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-41
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Fri, 07 Jan 2011 15:28:46 +0800
+
+sg-memo-efl (0.1.0-40) unstable; urgency=low
+
+  * upload
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-40
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Fri, 07 Jan 2011 15:13:12 +0800
+
+sg-memo-efl (0.1.0-39) unstable; urgency=low
+
+  * upload
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-39
+
+ -- Yang Qing <canjiang.lu@samsung.com>  Tue, 28 Dec 2010 11:31:40 +0800
+
+sg-memo-efl (0.1.0-38) unstable; urgency=low
+
+  * upload
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-38
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Fri, 24 Dec 2010 15:02:37 +0800
+
+sg-memo-efl (0.1.0-37) unstable; urgency=low
+
+  * upload
+  * Git: git@git_server:slp/apps/s/sg-memo-efl
+ssh://canjiang.lu@gerrit_server:29421/slp/apps/s/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-37
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Fri, 24 Dec 2010 14:57:54 +0800
+
+sg-memo-efl (0.1.0-36) unstable; urgency=low
+
+  * upload
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-36
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 04 Dec 2010 16:17:48 +0800
+
+sg-memo-efl (0.1.0-35) unstable; urgency=low
+
+  * draft version done
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-35
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 04 Dec 2010 10:53:31 +0800
+
+sg-memo-efl (0.1.0-34) unstable; urgency=low
+
+  * upload
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-34
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Fri, 03 Dec 2010 15:28:58 +0800
+
+sg-memo-efl (0.1.0-33) unstable; urgency=low
+
+  * upload
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-33
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Mon, 29 Nov 2010 13:59:53 +0800
+
+sg-memo-efl (0.1.0-32) unstable; urgency=low
+
+  * enable dbg package
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-32
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 11 Nov 2010 09:22:24 +0800
+
+sg-memo-efl (0.1.0-31) unstable; urgency=low
+
+  * upload
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-31
+
+ -- X536 Gong <x536.gong@samsung.com>  Thu, 16 Sep 2010 09:58:22 +0800
+
+sg-memo-efl (0.1.0-30) unstable; urgency=low
+
+  * upload
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-30
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 16 Sep 2010 08:37:56 +0800
+
+sg-memo-efl (0.1.0-29) unstable; urgency=low
+
+  * upload
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-29
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 16 Sep 2010 08:21:05 +0800
+
+sg-memo-efl (0.1.0-28) unstable; urgency=low
+
+  * upload
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl/
+  * Tag: sg-memo-efl_0.1.0-28
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 11 Sep 2010 10:01:25 +0800
+
+sg-memo-efl (0.1.0-27) unstable; urgency=low
+
+  * Apply new UI gadget mode
+  * Git: 165.213.180.234:/git/slp/apps/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-27 
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Tue, 10 Aug 2010 18:02:10 +0800
+
+sg-memo-efl (0.1.0-26) unstable; urgency=low
+
+  * Apply new UI gadget mode
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-26 
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Thu, 05 Aug 2010 16:43:31 +0800
+
+sg-memo-efl (0.1.0-25) unstable; urgency=low
+
+  * Remove retm_if
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-25 
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Sat, 24 Jul 2010 11:04:16 +0800
+
+sg-memo-efl (0.1.0-24) unstable; urgency=low
+
+  * Update
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-24 
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Sat, 24 Jul 2010 07:55:38 +0800
+
+sg-memo-efl (0.1.0-23) unstable; urgency=low
+
+  * Update .postinst file according to new DAC policy
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-23 
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Sat, 24 Jul 2010 07:42:46 +0800
+
+sg-memo-efl (0.1.0-22) unstable; urgency=low
+
+  * Update .postinst file according to new DAC policy
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-22
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Fri, 23 Jul 2010 23:16:50 +0800
+
+sg-memo-efl (0.1.0-21) unstable; urgency=low
+
+  * Remove libapputilinhouse
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-21
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Mon, 12 Jul 2010 13:52:10 +0800
+
+sg-memo-efl (0.1.0-20) unstable; urgency=low
+
+  * update isf
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-20
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 08 Jul 2010 15:02:59 +0800
+
+sg-memo-efl (0.1.0-19) unstable; urgency=low
+
+  * update font name
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-19
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 17 Jun 2010 03:30:26 +0800
+
+sg-memo-efl (0.1.0-18) unstable; urgency=low
+
+  * repackage for dlog update
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-18
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 16 Jun 2010 04:26:45 +0800
+
+sg-memo-efl (0.1.0-17) unstable; urgency=low
+
+  * enable return parameters
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-17
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 15 Jun 2010 10:47:54 +0800
+
+sg-memo-efl (0.1.0-16) unstable; urgency=low
+
+  * enable return parameters
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-16
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 15 Jun 2010 09:20:42 +0800
+
+sg-memo-efl (0.1.0-15) unstable; urgency=low
+
+  * update version
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-15 
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Mon, 14 Jun 2010 21:13:56 +0800
+
+sg-memo-efl (0.1.0-14) unstable; urgency=low
+
+  * Repackage 
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-14 
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Mon, 14 Jun 2010 20:51:04 +0800
+
+sg-memo-efl (0.1.0-13) unstable; urgency=low
+
+  * Remove applog.h
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-13
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Sat, 12 Jun 2010 09:46:31 +0800
+
+sg-memo-efl (0.1.0-12) unstable; urgency=low
+
+  * Remove UI prefixed api
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-12
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Thu, 10 Jun 2010 13:43:21 +0800
+
+sg-memo-efl (0.1.0-11) unstable; urgency=low
+
+  * Remove elm_add_notify
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-11   
+
+ -- Zhibin Zhou <zhibin.zhou@samsung.com>  Wed, 09 Jun 2010 16:48:24 +0800
+
+sg-memo-efl (0.1.0-10) unstable; urgency=low
+
+  * Remove EFL dependency of input/out parameters
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-10
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 02 Jun 2010 16:06:15 +0800
+
+sg-memo-efl (0.1.0-9) unstable; urgency=low
+
+  * Clear warnings
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-9
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 02 Jun 2010 15:59:05 +0800
+
+sg-memo-efl (0.1.0-8) unstable; urgency=low
+
+  * Remove dependency with sysman
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-8
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 02 Jun 2010 09:23:25 +0800
+
+sg-memo-efl (0.1.0-7) unstable; urgency=low
+
+  * Bind text when sg is launched
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-7
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Tue, 01 Jun 2010 10:04:23 +0800
+
+sg-memo-efl (0.1.0-6) unstable; urgency=low
+
+  * Milestone of memo gadget
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-6
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Fri, 28 May 2010 15:04:22 +0800
+
+sg-memo-efl (0.1.0-5) unstable; urgency=low
+
+  * Update version
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-efl
+  * Tag: sg-memo-efl_0.1.0-5
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 26 May 2010 17:07:07 +0800
+
+sg-memo-efl (0.1.0-4) unstable; urgency=low
+
+  * Modification according to sg development guide
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-0
+  * Tag: sg-memo-efl_0.1.0-4
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Wed, 26 May 2010 16:04:20 +0800
+
+sg-memo-efl (0.1.0-3) unstable; urgency=low
+
+  * Adjust package according name rules
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-0
+  * Tag: sg-memo-efl_0.1.0-3
+
+ -- Canjiang Lu <canjiang.lu@samsung.com>  Fri, 19 May 2010 17:28:33 +0900
+
+sg-memo (0.1.0-2) unstable; urgency=low
+
+  * Modified EDJ path for simulator
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-0
+  * Tag: sg-memo_0.1.0-2  
+
+ -- Jae-Yong Lee <jaeyong911.lee@samsung.com>  Fri, 14 May 2010 17:28:33 +0900
+
+sg-memo (0.1.0-1) unstable; urgency=low
+
+  * Initial release. 
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sg-memo-0
+  * Tag: sg-memo_0.1.0-1
 
- -- Canjiang Lu <canjiang.lu@samsung.com>  Sat, 17 Mar 2012 15:32:17 +0800
+ -- Jae-Yong Lee <jaeyong911.lee@samsung.com>  Fri, 14 May 2010 10:40:21 +0900
index 58c2043..63d9d6e 100644 (file)
@@ -1,8 +1,8 @@
 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
+Maintainer: Zhou Zhibin <zhibin.zhou@samsung.com>, Lu Canjiang <canjiang.lu@samsung.com>, Li Feng <feng.li@samsung.com>, Wei Hua <wei2012.hua@samsung.com>
+Build-Depends: debhelper (>= 5), libappcore-efl-dev, libelm-dev, libui-gadget-dev, libecore-dev, libevas-dev, libslp-memo-dev, libug-contacts-dev, iniparser-dev, dlog-dev, libbundle-dev, libicu-dev, libappsvc-dev
 Standards-Version: 0.1.0
 
 Package: libug-memo-efl
diff --git a/debian/libsg-memo-efl.install.in b/debian/libsg-memo-efl.install.in
deleted file mode 100755 (executable)
index e18df37..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/opt/ug/lib/*
-/opt/ug/res/*
index 90ae8a9..df85937 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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 { \
@@ -23,7 +25,7 @@ part { \
         min: 0 1; \
         fixed: 0 1; \
         visible: 1; \
-        color: 87 87 87 255; \
+        color: 169 169 169 255; \
         rel1 { \
             relative: 0.0 1.0; \
             offset: 0 -1; \
@@ -36,39 +38,39 @@ styles
     style
     {
         name: "textblock_style_main";
-        base: "font=Helvetica_Neue:style=Roman font_size=42 align=left color=#F9F9F9 wrap=char";
+        base: "font=SLP:style=Roman text_class=slp_roman font_size=42 align=left color=#F9F9F9 wrap=char";
     }
 }
 
 #define PART_TEXT_BLACK_LEFT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
-                            iText, iFont, iSize)\
+                            iText, iFont, iCLass, iSize)\
 PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
-                            iText, iFont, iSize, 0.0, 0.5, 0, 0, 0, 255)
+                            iText, iFont, iClass, iSize, 0.0, 0.5, 0, 0, 0, 255)
 
 #define PART_TEXT_GRAY_RIGHT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
-                            iText, iFont, iSize)\
+                            iText, iFont, iClass, iSize)\
 PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
-                            iText, iFont, iSize, 1.0, 0.5, 85, 70, 58, 255)
+                            iText, iFont, iClass, iSize, 1.0, 0.5, 85, 70, 58, 255)
 
 #define PART_TEXT_WHITE_LEFT(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
-                            iText, iFont, iSize)\
+                            iText, iFont, iClass, iSize)\
 PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
-                            iText, iFont, iSize, 0.0, 0.5, 255, 255, 255, 255)
+                            iText, iFont, iClass, iSize, 0.0, 0.5, 255, 255, 255, 255)
 
 #define PART_TEXT_GRAY_CENTER(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
-                            iText, iFont, iSize)\
+                            iText, iFont, iClass, iSize)\
 PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
-                            iText, iFont, iSize, 0.5, 0.5, 85, 70, 58, 255)
+                            iText, iFont, iClass, iSize, 0.5, 0.5, 85, 70, 58, 255)
 
 #define PART_TEXT_DETAIL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
-                            iText, iFont, iSize)\
+                            iText, iFont, iClass, iSize)\
 PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
-                            iText, iFont, iSize, 0.0, 0.5, 249, 249, 249, 255)
+                            iText, iFont, iClass, iSize, 0.0, 0.5, 0, 0, 0, 255)
 
 #define PART_TEXT_DATE(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
-                            iText, iFont, iSize)\
+                            iText, iFont, iClass, iSize)\
 PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t, \
-                            iText, iFont, iSize, 0.0, 0.5, 100, 100, 100, 255)
+                            iText, iFont, iClass, iSize, 0.0, 0.5, 124, 124, 124, 255)
 
 group{
     name: "empty_layout";
index da0cfc8..94c11cb 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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";
@@ -35,6 +37,7 @@ group{
                 text {
                     text: "date";
                     font: "SLP:style=Medium";
+                    text_class:"slp_medium";
                     size: 16;
                     align: 1 0.5;
                 }
diff --git a/edc/doodle_editor.edc b/edc/doodle_editor.edc
new file mode 100644 (file)
index 0000000..c9a914c
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+group{
+    name: "doodle_editor";
+    parts{
+        PART_BG("bg") /* 720 * unknown */
+        PART_V_PIXEL_RECT("top_margin", 16, "bg", 0.0, 0.0)
+        PART_V_PIXEL_RECT("text.bg", 48, "top_margin", 1.0, 0.0)
+        PART_V_PIXEL_RECT("top_margin2", 10, "text.bg", 1.0, 0.0)
+        PART_RECT("_doodle.bg", 0.0, 1.0, "top_margin2", 1.0, 0.0, "bottom_margin2")
+        PART_V_PIXEL_RECT("bottom_margin2", 108, "bottom_margin", 0.0, 1.0)
+        PART_V_PIXEL_RECT("bottom_margin", 86, "bg", 1.0, 1.0)
+        PART_V_PIXEL_RECT("_bottom_margin", 108, "bg", 1.0, 1.0)
+        PART_V_PIXEL_RECT("tool.bg", IMF_HEIGHT, "bg", 1.0, 1.0)
+        /* layout */
+        PART_V_PIXEL_RECT("doodle.bg", 700, "_doodle.bg", 0.5, 0.5)
+        PART_COLOR_RECT("doodle.bg.color", "doodle.bg", 255, 255, 255, 255)
+        PART_V_PIXEL_RECT("toolbar.bg", 86, "bg", 1.0, 1.0)
+        PART_V_PIXEL_RECT("toolbar.bg.up", 86, "tool.bg", 0.0, 1.0)
+        PART_V_PIXEL_RECT("comment.bg.up", 108, "tool.bg", 0.0, 1.0)
+        PART_V_PIXEL_RECT("comment.bg", 108, "bottom_margin", 0.0, 1.0)
+        PART_V_PIXEL_RECT("comment.bg.down", 108, "bg", 1.0, 1.0)
+        /* content */
+        PART_TEXT_GRAY_RIGHT("elm.text.date", 16/720, 0.0, "text.bg", (720-16)/720, 1.0, "text.bg", "date", "SLP:style=Medium", "slp_medium", 32)
+        PART_SWALLOW_REL("elm.swallow.doodle", 16/720, 0.0, "doodle.bg", (720-16)/720, 1.0, "doodle.bg")
+        PART_SWALLOW("elm.swallow.toolbar", "toolbar.bg")
+        PART_SWALLOW("elm.swallow.tool", "tool.bg")
+        PART_SWALLOW("elm.swallow.comment", "comment.bg")
+    }/* end part */
+    programs {
+        program {
+            name: "init";
+            signal: "load";
+            source: "";
+            script {
+                SCRIPT_CUSTOM_PART("elm.swallow.toolbar");
+                SCRIPT_CUSTOM_PART("elm.swallow.comment");
+                SCRIPT_CUSTOM_PART("_doodle.bg");
+            }
+        } /* end program */
+
+        program {
+            name:   "abbrev";
+            signal: "abbrev";
+            source: "elm";
+            script {
+                 SCRIPT_SET_VISIBLE(elm.swallow.toolbar, 1)
+                 SCRIPT_SET_VISIBLE(elm.swallow.comment, 0)
+                 SCRIPT_SET_REL(elm.swallow.toolbar, 0.0, 0.0, "toolbar.bg.up", 1.0, 1.0, "toolbar.bg.up");
+                 SCRIPT_SET_REL("_doodle.bg", 0.0, 1.0, "top_margin2", 1.0, 0.0, "bottom_margin2")
+           }
+        } /* end program */
+        program {
+            name:   "expand";
+            signal: "expand";
+            source: "elm";
+            script {
+                 SCRIPT_SET_VISIBLE(elm.swallow.toolbar, 1)
+                 SCRIPT_SET_VISIBLE(elm.swallow.comment, 1)
+                 SCRIPT_SET_REL(elm.swallow.toolbar, 0.0, 0.0, "toolbar.bg", 1.0, 1.0, "toolbar.bg");
+                 SCRIPT_SET_REL(elm.swallow.comment, 0.0, 0.0, "comment.bg", 1.0, 1.0, "comment.bg");
+                 SCRIPT_SET_REL("_doodle.bg", 0.0, 1.0, "top_margin2", 1.0, 0.0, "bottom_margin2")
+           }
+        } /* end program */
+        program {
+            name:   "comment_abbrev";
+            signal: "abbrev";
+            source: "comment";
+            script {
+                 SCRIPT_SET_VISIBLE(elm.swallow.toolbar, 0)
+                 SCRIPT_SET_VISIBLE(elm.swallow.comment, 1)
+                 SCRIPT_SET_REL(elm.swallow.comment, 0.0, 0.0, "comment.bg.up", 1.0, 1.0, "comment.bg.up");
+                 SCRIPT_SET_REL("_doodle.bg", 0.0, 1.0, "top_margin2", 1.0, 0.0, "_bottom_margin")
+           }
+        } /* end program */
+        program {
+            name:   "comment_expand";
+            signal: "expand";
+            source: "comment";
+            script {
+                 SCRIPT_SET_VISIBLE(elm.swallow.toolbar, 0)
+                 SCRIPT_SET_VISIBLE(elm.swallow.comment, 1)
+                 SCRIPT_SET_REL(elm.swallow.comment, 0.0, 0.0, "comment.bg.down", 1.0, 1.0, "comment.bg.down");
+                 SCRIPT_SET_REL("_doodle.bg", 0.0, 1.0, "top_margin2", 1.0, 0.0, "_bottom_margin")
+           }
+        } /* end program */
+    }/* end programs */
+}
+
+group{
+    name: "doodle_comment";
+    images {
+        image: "00_search_input_field_bg.png" COMP;
+    }
+    parts{
+        PART_BG("bg") /* 720 * 67 */
+        PART_COLOR_RECT("bg.color", "bg", 30, 25, 22, 255)
+        PART_RECT("image.bg", 16/720, 8/67, "bg", (720-16)/720, (67-9)/67, "bg")
+        PART_BORDER_IMAGE("image", "image.bg", "00_search_input_field_bg.png", 6, 6, 7, 5)
+        PART_V_PIXEL_RECT("editfield.bg", 50, "image.bg", 0.5, 0.5)
+        PART_SWALLOW_REL("elm.swallow.editfield", 10/460, 0.0, "editfield.bg", (460-10)/460, 1.0, "editfield.bg")
+    }/* end parts */
+}/* end group */
+
index 64c11ed..8816372 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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";
@@ -31,7 +33,7 @@ group {
         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_TEXT_WHITE_LEFT("elm.text.select.all", 75/480, 0.0, "bg", 1.0, 1.0, "bg", "Select all", "SLP:style=Regular", "slp_regular", 25);
         PART_EVENT_RECT("event", "bg")
     } /* parts */
 } /* group */
diff --git a/edc/edit_tool.edc b/edc/edit_tool.edc
new file mode 100644 (file)
index 0000000..4bf35df
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+group{
+    name: "color_selector";
+    parts{
+        PART_BG("bg")
+        PART_V_PIXEL_RECT("rect.up", 200, "bg", 0.0, 0.0)
+        PART_PIXEL_RECT("border.bg", (500+6), (160+5), 0.5, 0.5, "rect.up", 0.5, 0.5)
+        PART_PIXEL_RECT("color.bg", 500, 160, 0.5, 0.5, "rect.up", 0.5, 0.5)
+        PART_SWALLOW_REL("elm.swallow.color", 0.0, 0.0, "color.bg", 1.0, 1.0, "color.bg")
+        PART_EVENT_RECT("event", "rect.up")
+        PART_SWALLOW_REL("elm.swallow.selector", 4/480, 1.0, "rect.up", (480-4)/480, 1.0, "bg")
+    }/* end parts */
+    programs {
+        program {
+            name: "init";
+            signal: "load";
+            source: "";
+            script {
+                SCRIPT_CUSTOM_PART(bg);
+                SCRIPT_CUSTOM_PART(border.bg);
+            }
+        } /* end program */
+        program
+        {
+            name:    "black_theme";
+            signal:  "black";
+            source:  "elm";
+            script {
+                SCRIPT_SET_COLOR(bg, 0, 0, 0, 255);
+                SCRIPT_SET_COLOR(border.bg, 255, 255, 255, 255);
+            }
+        }
+        program
+        {
+            name:    "white_theme";
+            signal:  "white";
+            source:  "elm";
+            script {
+                SCRIPT_SET_COLOR(bg, 255, 255, 255, 255);
+                SCRIPT_SET_COLOR(border.bg, 0, 0, 0, 255);
+            }
+        }
+    }/* end programs */
+}/* end group */
+
+group{
+    name: "pencil_size_selector";
+    parts{
+        PART_BG("bg")
+        PART_SWALLOW("bg.color", "bg")
+        PART_RECT("rect.up", 0.0, 0.0, "bg", 1.0, 0.5, "bg")
+        PART_PIXEL_RECT("pencil.bg", 300, 0, 0.5, 0.5, "rect.up", 0.5, 0.5)
+        PART_SWALLOW("elm.swallow.pencil", "pencil.bg")
+        PART_EVENT_RECT("event", "rect.up")
+        PART_SWALLOW_REL("elm.swallow.selector", 5/480, 0.5, "bg", (480-5)/480, 1.0, "bg")
+    }/* end parts */
+}/* end group */
+
+group{
+    name: "font_size_selector";
+    parts{
+        PART_BG("bg")
+        PART_SWALLOW("bg.color", "bg")
+        PART_RECT("rect.up", 0.0, 0.0, "bg", 1.0, 0.5, "bg")
+        PART_SWALLOW("elm.swallow.label", "rect.up")
+        PART_EVENT_RECT("event", "rect.up")
+        PART_SWALLOW_REL("elm.swallow.selector", 5/480, 0.5, "bg", (480-5)/480, 1.0, "bg")
+    }/* end parts */
+}/* end group */
+
+group{
+    name: "edit_toolbar";
+    parts{
+        PART_BG("bg") /* 720 x 86 */
+        PART_COLOR_RECT("color", "bg", 204, 204, 204, 255)
+        PART_SWALLOW_REL("elm.swallow.btn1", (10)/720, 10/86, "bg", (10+74)/720, (86-10)/86, "bg")
+        PART_SWALLOW_REL("elm.swallow.btn2", (10+16+74)/720, 10/86, "bg", (10+16+74*2)/720, (86-10)/86, "bg")
+        PART_SWALLOW_REL("elm.swallow.btn3", (10+16*2+74*2)/720, 10/86, "bg", (10+16*2+74*3)/720, (86-10)/86, "bg")
+        PART_SWALLOW_REL("elm.swallow.btn4", (720-10-160)/720, 10/86, "bg", (720-10)/720, (86-10)/86, "bg")
+        PART_V_PIXEL_RECT("bottom_margin", 1, "bg", 1.0, 0.0)
+        PART_COLOR_RECT("bottom_margin_color", "bottom_margin", 204, 204, 204, 255)
+    }/* end parts */
+}/* end group */
index 464d943..b056cdb 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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"; \
@@ -47,7 +49,7 @@ group { name: "elm/genlist/item/memo/edit/"iStyle"/default"; \
                 } \
             } \
         } \
-        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_TEXT_DATE("elm.text.date", (16+96+16)/720, (128-16-32)/128, "bg", (720-16)/720, (128-16)/128, "bg", "", "SLP:style=Medium", "slp_medium", 32) \
         PART_SWALLOW_REL("elm.swallow.doodle", (720-16-96)/720, 16/128, "bg", (720-16)/720, (128-16)/128, "bg") \
         GENLIST_PART_BOTTOM_LINE \
         PART_EVENT_RECT("event", "bg") \
@@ -59,7 +61,7 @@ group { name: "elm/genlist/item/memo/edit/"iStyle"/default"; \
             source: "";\
             script {\
                 SCRIPT_CUSTOM_PART(bg);\
-                SCRIPT_SET_COLOR(bg, 0, 0, 0, 255);\
+                SCRIPT_SET_COLOR(bg, 249, 249, 249, 255);\
             }\
         } /* end program */\
         program \
@@ -68,7 +70,7 @@ group { name: "elm/genlist/item/memo/edit/"iStyle"/default"; \
             signal:  "elm,state,selected"; \
             source:  "elm"; \
             script {\
-                SCRIPT_SET_COLOR(bg, 50, 50, 50, 255);\
+                SCRIPT_SET_COLOR(bg, 42, 137, 194, 255);\
             }\
             transition: LINEAR 0.1; \
         } \
@@ -78,7 +80,7 @@ group { name: "elm/genlist/item/memo/edit/"iStyle"/default"; \
             signal:  "elm,state,unselected"; \
             source:  "elm"; \
             script {\
-                SCRIPT_SET_COLOR(bg, 0, 0, 0, 255);\
+                SCRIPT_SET_COLOR(bg, 249, 249, 249, 255);\
             }\
             transition: LINEAR 0.1; \
         }\
index 4f9bb58..2fd314e 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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";
diff --git a/edc/text_editor.edc b/edc/text_editor.edc
new file mode 100644 (file)
index 0000000..d10df8b
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+group{
+    name: "text_editor";
+    parts{
+        PART_BG_EX("bg", 720, 0) /* 720 * unknown */
+        PART_V_PIXEL_RECT("top_margin", 16, "bg", 0.0, 0.0)
+        PART_V_PIXEL_RECT("text.bg", 48, "top_margin", 1.0, 0.0)
+        PART_V_PIXEL_RECT("top_margin2", 10, "text.bg", 1.0, 0.0)
+        PART_V_PIXEL_RECT("toolbar.bg", 86, "tool.bg", 0.0, 1.0)
+        PART_V_PIXEL_RECT("tool.bg", 0, "bg", 1.0, 1.0)
+        /* content */
+        PART_TEXT_GRAY_RIGHT("elm.text.date", 16/720, 0.0, "text.bg", (720-16)/720, 1.0, "text.bg", "date", "SLP:style=Medium", "slp_medium", 32)
+        PART_SWALLOW_REL("elm.swallow.text", 16/720, 1.0, "top_margin2", (720-16)/720, 0.0, "toolbar.bg")
+        PART_SWALLOW("elm.swallow.toolbar", "toolbar.bg")
+        PART_SWALLOW("elm.swallow.tool", "tool.bg")
+    }/* end part */
+    programs {
+        program {
+            name: "init";
+            signal: "load";
+            source: "";
+            script {
+                SCRIPT_CUSTOM_PART("tool.bg");
+                SCRIPT_CUSTOM_PART("elm.swallow.text");
+            }
+        } /* end program */
+
+        program {
+            name:   "abbrev";
+            signal: "abbrev";
+            source: "elm";
+            script {
+                 set_state_val(PART:"tool.bg", STATE_MIN, 0, IMF_HEIGHT);
+           }
+        } /* end program */
+        program {
+            name:   "expand";
+            signal: "expand";
+            source: "elm";
+            script {
+                 set_state_val(PART:"tool.bg", STATE_MIN, 0, 0);
+           }
+        } /* end program */
+    }/* end programs */
+}
index db8894c..009c908 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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__
@@ -250,7 +252,6 @@ part {\
                state: "default" 0.0;\
                rel1 { relative: 0.0 0.0; to: iTo; } \
                rel2 { relative: 1.0 1.0; to: iTo; } \
-               fixed: 1 1; \
        } \
 } \
 
@@ -293,7 +294,7 @@ part {\
        } \
 } \
 
-#define PART_TEXT(iName, iTo, iText, iFont, iSize,\
+#define PART_TEXT(iName, iTo, iText, iFont, iClass, iSize,\
                iAx, iAy, iCr, iCg, iCb, iCa)\
 part {\
        name: iName;\
@@ -308,6 +309,7 @@ part {\
                text {\
                        text: iText;\
                        font: iFont;\
+                       text_class: iClass;\
                        size: iSize;\
                        align: iAx iAy;\
                } \
@@ -315,9 +317,9 @@ part {\
 } \
 
 #define PART_TEXT_REL(iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t,\
-               iText, iFont, iSize, iAx, iAy, iCr, iCg, iCb, iCa)\
+               iText, iFont, iClass, iSize, iAx, iAy, iCr, iCg, iCb, iCa)\
 PART_RECT("_"iName, iR1x, iR1y, iR1t, iR2x, iR2y, iR2t)\
-PART_TEXT(iName, "_"iName, iText, iFont, iSize, iAx, iAy, iCr, iCg, iCb, iCa)\
+PART_TEXT(iName, "_"iName, iText, iFont, iClass, iSize, iAx, iAy, iCr, iCg, iCb, iCa)\
 
 /***********************************************************************/
 /* script */
index 6722529..40b6ad8 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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>
 
index d6d8679..732627f 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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__
index 013a404..5aa1500 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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__
index e90f903..8725330 100644 (file)
@@ -1,44 +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.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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)
+static bool _service_iterate_dump_cb(service_h service, const char *key, void *user_data)
 {
-    LOGD("%s -> %s\n", k, v);
+    LOGD("%s -> %s\n", key, user_data);
+    return 0;
 }
 
-void bundle_dump(bundle *b)
+void service_dump(service_h service)
 {
-    if (b != NULL) {
-        bundle_iterate(b, _bundle_iterate_dump_cb, NULL);
+    if (service != NULL) {
+        service_foreach_extra_data(service, _service_iterate_dump_cb, NULL);
     }
 }
 
-Eina_Bool bundle_key_check(bundle *b, const char *key, const char *val)
+Eina_Bool service_key_check(service_h service, 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;
+       char *str = NULL;
+       service_get_extra_data(service, key, &str);
+       if (str != NULL) {
+               if (strcmp(str, val) == 0) {
+                       SFREE(str);
+                       return EINA_TRUE;
+               }
+               SFREE(str);
+       }
+       return EINA_FALSE;
 }
 
 void evas_object_geometry_dump(Evas_Object *eo)
index 1f1e7ec..d9a80ea 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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__
@@ -45,8 +47,8 @@ do { \
     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 service_dump(service_h service);
+Eina_Bool service_key_check(service_h service, const char *key, const char *val);
 void evas_object_geometry_dump(Evas_Object *eo);
 void evas_object_event_hit(void *data, Evas *e, Evas_Object *obj, void *event_info);
 void evas_object_smart_event_hit(void *data, Evas_Object *obj, void *event_info);
index 7460a93..6d8fc82 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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__
@@ -20,6 +22,8 @@
 #include <memo-db.h>
 #include <bundle.h>
 #include <memo_string.h>
+#include <ui-gadget.h>
+
 
 #define DOODLE_TITLE_PREFIX     "Draw_"
 
@@ -48,22 +52,34 @@ typedef void (*Memo_Component_Callback)(void *data, const char *msg, void *event
 typedef struct memo_data memo_data_t;
 typedef struct memo_data_list memo_data_list_t;
 
+typedef enum {
+    MOUSE_EVENT_INVALID = 0,
+    MOUSE_EVENT_CLICK,
+    MOUSE_EVENT_DRAG_LEFT,
+    MOUSE_EVENT_DRAG_RIGHT,
+    MOUSE_EVENT_DRAG_UP,
+    MOUSE_EVENT_DRAG_DOWN,
+} mouse_behaviour_t;
+
+#define MOUSE_POSITION_INVALID 9999
+
 char * strcasestr (const char *haystack, const char *needle);
 char * strptime (const char *s, const char *fmt, struct tm *tp);
 void icu_init();
 char *memo_get_doodle_title();
 void memo_time_format(char *buf, int len, time_t time);
 time_t memo_get_binary_release_date();
+mouse_behaviour_t mouse_event_identify(int startx, int starty, int endx, int endy);
+void evas_object_flick_callback_add(Evas_Object *obj, Evas_Smart_Cb on_flick, void *data);
 void memo_com_dummy_cb(void *data, const char *msg, void *event);
 void memo_create_yes_no_popup(Evas_Object *win, const char *msg, Evas_Smart_Cb on_yes, Evas_Smart_Cb on_no, void *data);
 void memo_tool_btn_focus_set(Evas_Object *eo, Eina_Bool status);
-void *memo_load_font_size_selector(Evas_Object *parent, bundle *bd, Memo_Component_Callback cb, void *data);
+void *memo_load_font_size_selector(Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data);
 void memo_del_font_size_selector(void *h_fss);
-void *memo_load_color_selector(Evas_Object *parent, bundle *bd, Memo_Component_Callback cb, void *data);
+void *memo_load_color_selector(Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data);
 void memo_del_color_selector(void *h_cs);
-void *memo_load_pencil_size_selector(Evas_Object *parent, bundle *bd, Memo_Component_Callback cb, void *data);
+void *memo_load_pencil_size_selector(Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data);
 void memo_del_pencil_size_selector(void *h_pss);
-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);
index 227cf6e..13d1ba1 100644 (file)
@@ -1,25 +1,27 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
 #ifndef __memo_efl_H__
 #define __memo_efl_H__
 
 #include <Elementary.h>
 #include <libintl.h>
 #include <bundle.h>
+#include <ui-gadget.h>
 #include <memo-assist.h>
 #include <dlog.h>
 
 
 typedef struct ug_data {
     Evas_Object *base;
-    struct ui_gadget *ug;
+    ui_gadget_h ug;
     char buf[MEMO_BUFFER_SIZE]; /* for temporarily usage only */
     void *h_ug;
     Elm_Theme *th; /* customized theme for UG */
 }ug_data_t;
 
-void *memo_load_select_view(ug_data_t *ugd, bundle *data);
-void *memo_load_detail_view(ug_data_t *ugd, bundle *data);
+Eina_Bool edit_view_pre_condition_check(service_h service);
+void *memo_load_edit_view(ug_data_t *ugd, service_h service);
+void memo_del_edit_view(void *h_ev);
+void *memo_load_select_view(ug_data_t *ugd, service_h service);
+void *memo_load_detail_view(ug_data_t *ugd, service_h service);
 
 #endif /* __memo_efl_H__ */
index 44ce099..ec210d9 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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__
diff --git a/include/memo_autolink.h b/include/memo_autolink.h
new file mode 100644 (file)
index 0000000..1664972
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+#ifndef __MEMO_AUTOLINK_H__
+#define __MEMO_AUTOLINK_H__
+
+enum anchor_t {
+    NOT_ANCHOR = 0,
+    ANCHOR_PHONE,
+    ANCHOR_EMAIL,
+    ANCHOR_URL,
+};
+
+struct anchor_popup_item_t {
+    char *label;
+    void (*response) (void *data, Evas_Object *obj, void *event_info);
+    const char *domain; /* for i18n */
+};
+
+typedef struct autolink_data_t {
+    Evas_Object *win_main;
+    Evas_Object *popup;
+    enum anchor_t type;
+    char *info;
+} autolink_data;
+
+GString *autolink_add_anchor(const char *content);
+void autolink_anchor_clicked_cb(void *data, Evas_Object *obj, void *event_info);
+
+#endif                /* __MEMO_AUTOLINK_H__ */
diff --git a/include/memo_doodle_editor.h b/include/memo_doodle_editor.h
new file mode 100644 (file)
index 0000000..9244490
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+#ifndef __MEMO_DOODLE_EDITOR_H__
+#define __MEMO_DOODLE_EDITOR_H__
+
+void memo_doodle_editor_time_format_update(void *h_de);
+void memo_doodle_editor_cancel(void *h_de);
+void memo_doodle_editor_save(void *h_de);
+void *memo_load_doodle_editor(Evas_Object *win, Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data);
+void memo_destroy_doodle_editor(void *h_de);
+
+#endif /* __MEMO_DOODLE_EDITOR_H__ */
index 89e4520..87e65b9 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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__
@@ -59,6 +61,6 @@
 #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 */
+#define MEMO_I18N_WELCOME_TO_TIZEN_MEMO    _("Welcome to Tizen Memo") /* Welcome to Tizen Memo */
 
 #endif                /* __MEMO_STRING_H__ */
index 7cd4cd8..d7eb23f 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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__
@@ -20,7 +22,7 @@
 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_load_text_editor(Evas_Object *win, Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data);
 void memo_destroy_text_editor(void *h_te);
 
 #endif                /* __MEMO_TEXT_EDITOR_H__ */
index b072aad..f0359ff 100644 (file)
@@ -1,25 +1,27 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
 #ifndef __MEMO_SG_H__
 #define __MEMO_SG_H__
 
 #include <glib.h>
 //#include <sil.h>
 #include <bundle.h>
+#include <ui-gadget.h>
 #include <stdarg.h>
 #include <Elementary.h>
 #include <memo-assist.h>
@@ -37,7 +39,7 @@
 #define AUL_NAME_VEDIO_CALL      PACKAGE_PREFIX".vtmain"
 
 /* UG Function Declaration*/
-void ug_launch_common(bundle *bd, char *ug_name);
+void ug_launch_common(service_h service, char *ug_name);
 void ug_launch_common_var(char *ug_name, ...);
 
 #endif                /* __MEMO_SG_H__ */
index 6d782da..d3c7a36 100644 (file)
--- a/memo.edc
+++ b/memo.edc
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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>
 
@@ -20,6 +22,9 @@ collections {
     #include <edc/common.edc>
     #include <edc/detail.edc>
     #include <edc/edit_list.edc>
+    #include <edc/text_editor.edc>
+    #include <edc/doodle_editor.edc>
+    #include <edc/edit_tool.edc>
     #include <edc/gl_edit_list.edc>
     #include <edc/selector.edc>
 }
similarity index 60%
rename from packaging/sg-memo-efl.spec
rename to packaging/ug-memo-efl.spec
index 974f21f..eeab794 100644 (file)
@@ -1,25 +1,26 @@
-Name:       sg-memo-efl
+#sbs-git:slp/apps/u/ug-memo-efl ug-memo-efl 0.1.1 f3ff27176aa784c4e09fa856638f75d8d4dac14d
+Name:       ug-memo-efl
 Summary:    Memo Public Shared-Gadget (EFL)
-Version:    0.1.0
-Release:    1
+Version:    0.1.1
+Release:    38
 Group:      misc
-License:    Flora Software License
-Source0:    sg-memo-efl-0.1.0.tar.gz
+License:    TO_BE_FILL
+Source0:    %{name}-%{version}.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(appsvc)
 BuildRequires:  pkgconfig(bundle)
 BuildRequires:  pkgconfig(icu-i18n)
+BuildRequires:  pkgconfig(ui-gadget-1)
 BuildRequires:  libug-contacts-devel
 BuildRequires:  cmake
-BuildRequires:  gettext-devel
-BuildRequires:  edje-bin
-BuildRequires:  embryo-bin
+BuildRequires:  gettext-tools
+BuildRequires:  edje-tools
 
 %description
 Memo Public Shared-Gadget (EFL).
@@ -35,9 +36,17 @@ make %{?jobs:-j%jobs}
 %install
 rm -rf %{buildroot}
 %make_install
-               
+
+
+%remove_docs
+
+%post
+mkdir -p /opt/ug/bin/
+ln -sf /usr/bin/ug-client /opt/ug/bin/ug-memo-efl
+
 %files
 %defattr(-,root,root,-)
 /opt/ug/lib/*
 /opt/ug/res/*
+/opt/share/applications/*.desktop
 
diff --git a/scripts/copyright b/scripts/copyright
new file mode 100644 (file)
index 0000000..7283a25
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
index c142a0b..22e63b1 100644 (file)
@@ -32,7 +32,7 @@ Share
 Text
 Video call
 Voice call
-Welcome to Tizen Memo
+Welcome to Samsung Memo
 Yes
 1 memo selected
 %d memos selected
index 4e845d6..a7804cf 100755 (executable)
@@ -1,5 +1,5 @@
 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"
+APP_MO="$HOME/sbs/target-armel/opt/apps/com.samsung.memo/res/locale/en/LC_MESSAGES/memo.mo"
 TEMP_STR="./temp"
 IN="str.in"
 APP_NAME="memo"
diff --git a/src/edit.c b/src/edit.c
new file mode 100644 (file)
index 0000000..feb4d5e
--- /dev/null
@@ -0,0 +1,199 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <Elementary.h>
+#include <dlog.h>
+#include <ui-gadget-module.h>
+#include <supplement.h>
+#include <memo_string.h>
+#include <gravel.h>
+#include <extended-elm.h>
+#include <memo-assist.h>
+#include <memo_text_editor.h>
+#include <memo_doodle_editor.h>
+#include <memo-efl.h>
+#include <memo-genlist.h>
+
+typedef struct __edit_view_t {
+    ug_data_t *ugd;
+    Evas_Object *navigator;
+    Elm_Object_Item *navi_it;
+    Evas_Object *ctrl_bar;
+    Evas_Object *body_main;    /* content */
+    Evas_Object *l_btn;
+    Evas_Object *r_btn;
+    Eina_Bool drawing;    /* drawing or text mode */
+
+    /* add more variables here */
+    void *h_ed;
+} edit_view_t;
+
+static void _text_editor_callback(void *data, const char *msg, void *event);
+static void _doodle_editor_callback(void *data, const char *msg, void *event);
+extern service_h text_service;
+
+static void _on_left_btn_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+    edit_view_t *ev = (edit_view_t *)data;
+    if (ev->drawing) {
+        memo_doodle_editor_cancel(ev->h_ed);
+    } else {
+        memo_text_editor_cancel(ev->h_ed);
+    }
+}
+
+static void _on_right_btn_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+    edit_view_t *ev = (edit_view_t *)data;
+    if (ev->drawing) {
+        memo_doodle_editor_save(ev->h_ed);
+    } else {
+        memo_text_editor_save(ev->h_ed);
+    }
+}
+static void _text_editor_callback(void *data, const char *msg, void *event)
+{
+       edit_view_t *ev = (edit_view_t *)data;
+       if (strcmp(msg, "layout") == 0) {
+               elm_object_part_content_set(ev->body_main, "elm.swallow.content", (Evas_Object *)event);
+       } else if (strcmp(msg, "title") == 0) {
+               elm_object_item_text_set(ev->navi_it, (const char *)event);
+       } else if (strcmp(msg, "savable") == 0) {
+               elm_object_disabled_set(ev->r_btn, (int)event==0? EINA_TRUE:EINA_FALSE);
+       } else if (strcmp(msg, "save") == 0) {
+               ug_send_result(ev->ugd->ug,text_service);
+               service_destroy(text_service);
+               ug_destroy_me(ev->ugd->ug);
+       } else if (strcmp(msg, "cancel") == 0) {
+               ug_destroy_me(ev->ugd->ug);
+       } else if (strcmp(msg, "drawing") == 0) {
+               elm_object_part_content_unset(ev->body_main, "elm.swallow.content");
+               memo_destroy_text_editor(ev->h_ed);
+               ev->h_ed = memo_load_doodle_editor(ug_get_window(), ev->body_main, NULL, _doodle_editor_callback, ev);
+               ev->drawing = EINA_TRUE;
+       }
+}
+
+static void _doodle_editor_callback(void *data, const char *msg, void *event)
+{
+    edit_view_t *ev = (edit_view_t *)data;
+    if (strcmp(msg, "layout") == 0) {
+        elm_object_part_content_set(ev->body_main, "elm.swallow.content", (Evas_Object *)event);
+    } else if (strcmp(msg, "title") == 0) {
+        elm_object_item_text_set(ev->navi_it, (const char *)event);
+    } else if (strcmp(msg, "savable") == 0) {
+        elm_object_disabled_set(ev->r_btn, (int)event==0? EINA_TRUE:EINA_FALSE);
+    } else if (strcmp(msg, "save") == 0) {
+        ug_destroy_me(ev->ugd->ug);
+    } else if (strcmp(msg, "cancel") == 0) {
+        ug_destroy_me(ev->ugd->ug);
+    } else if (strcmp(msg, "text") == 0) {
+        elm_object_part_content_unset(ev->body_main, "elm.swallow.content");
+        memo_destroy_doodle_editor(ev->h_ed);
+        ev->h_ed = memo_load_text_editor(ug_get_window(), ev->body_main, NULL, _text_editor_callback, ev);
+        ev->drawing = EINA_FALSE;
+    }
+}
+
+static void _create_edit_layout(edit_view_t *ev, service_h data)
+{
+       ug_data_t *ugd = ev->ugd;
+
+       /* add navigationbar */
+       ev->navigator = elm_naviframe_add(ugd->base);
+       elm_object_part_content_set(ugd->base, "elm.swallow.content", ev->navigator);
+
+       /* custom body main here */
+       ev->body_main = elm_layout_create(ev->navigator, EDJ_FILE, "empty_layout");
+       /* compose */
+       elm_naviframe_prev_btn_auto_pushed_set(ev->navigator, EINA_FALSE);
+       Elm_Object_Item *navi_it = elm_naviframe_item_push(ev->navigator, MEMO_I18N_MEMO, NULL, NULL, ev->body_main, NULL);
+       ev->navi_it = navi_it;
+       /* buttons */
+       ev->l_btn = elm_navigator_btn_create(ev->navigator, MEMO_I18N_CANCEL,
+                                               ICONDIR "/01_header_icon_cancel.png", "navigationbar_control/left",
+                                               _on_left_btn_clicked, ev);
+       elm_object_item_part_content_set(navi_it, "title_left_btn", ev->l_btn);
+       ev->r_btn = elm_navigator_btn_create(ev->navigator, MEMO_I18N_DONE,
+                                               ICONDIR "/01_header_icon_done.png", "navigationbar_control/right",
+                                               _on_right_btn_clicked, ev);
+       elm_object_item_part_content_set(navi_it, "title_right_btn", ev->r_btn);
+
+       /* load editor */
+       service_h service = NULL;
+       service_create(&service);
+
+       service_add_extra_data(service, "toggle", "disable");
+       if (service_key_check(data, "type", "draw")) {
+               ev->h_ed = memo_load_doodle_editor(ug_get_window(), ev->body_main, service, _doodle_editor_callback, ev);
+               ev->drawing = EINA_TRUE;
+       } else {
+               char *str = NULL;
+               service_get_extra_data(data, "text", &str);
+               if (str != NULL) { /* set init string */
+                       service_add_extra_data(service, "init_str", str);
+                       SFREE(str);
+               }
+               ev->h_ed = memo_load_text_editor(ug_get_window(), ev->body_main, service, _text_editor_callback, ev);
+               ev->drawing = EINA_FALSE;
+       }
+       service_destroy(service);
+}
+
+Eina_Bool edit_view_pre_condition_check(service_h service)
+{
+       char *str = NULL;
+       service_get_extra_data(service, "type", &str);
+       if (str != NULL) {
+               if (!strcmp(str, "edit")) {
+                       SFREE(str);
+                       return EINA_TRUE;
+               } else if (!strcmp(str, "draw")) {
+                       SFREE(str);
+                       return EINA_TRUE;
+               }
+               SFREE(str);
+       }
+       return EINA_FALSE;
+}
+
+void *memo_load_edit_view(ug_data_t *ugd, service_h service)
+{
+    edit_view_t *ev = SMALLOC(edit_view_t);
+    RETVIF(ev == NULL, NULL);
+    ev->ugd = ugd;
+
+    _create_edit_layout(ev, service);
+    return (void *)ev;
+}
+
+void memo_del_edit_view(void *h_ev)
+{
+    edit_view_t *ev = (edit_view_t *) h_ev;
+    elm_object_part_content_unset(ev->body_main, "elm.swallow.content");
+    if (ev->drawing) {
+        memo_destroy_doodle_editor(ev->h_ed);
+    } else {
+        memo_destroy_text_editor(ev->h_ed);
+    }
+    evas_object_del(ev->navigator);
+    SFREE(ev);
+}
+
index 957653b..00d3755 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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>
@@ -150,11 +152,441 @@ time_t memo_get_binary_release_date()
     return timelocal(&time);
 }
 
+/**
+ * mouse_event_identify
+ *
+ * @brief
+ *
+ * @param   [in] startx
+ *
+ * @param   [in] starty
+ *
+ * @param   [in] endx
+ *
+ * @param   [in] endy
+ *
+ * @return
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+mouse_behaviour_t mouse_event_identify(int startx, int starty, int endx, int endy)
+{
+    int gapx = 0;
+    int gapy = 0;
+
+    if ((startx == MOUSE_POSITION_INVALID)
+        || (starty == MOUSE_POSITION_INVALID)
+        || (endx == MOUSE_POSITION_INVALID)
+        || (endy == MOUSE_POSITION_INVALID)) {
+        return MOUSE_EVENT_INVALID;
+    }
+
+    gapx = endx - startx;
+    gapy = endy - starty;
+    if ((abs(gapx) <= 10) && (abs(gapy) <= 10)) {    /* click */
+        return MOUSE_EVENT_CLICK;
+    } else if (abs(gapx) > abs(gapy)) {    /* horizonal drag */
+        return gapx > 0 ? MOUSE_EVENT_DRAG_RIGHT : MOUSE_EVENT_DRAG_LEFT;
+    } else {        /* vertical drag */
+        return gapy > 0 ? MOUSE_EVENT_DRAG_DOWN : MOUSE_EVENT_DRAG_UP;
+    }
+}
+
+static void _evas_object_on_mouse_down(void *data, Evas *e, Evas_Object *evas_obj, void *event_info)
+{
+    Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down *)event_info;
+    evas_object_data_set(evas_obj, "startx", (const void *)ev->output.x);
+    evas_object_data_set(evas_obj, "starty", (const void *)ev->output.y);
+}
+
+static void _evas_object_on_mouse_up(void *data, Evas *e, Evas_Object *evas_obj, void *event_info)
+{
+    Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down *)event_info;
+    int startx = (int)evas_object_data_get(evas_obj, "startx");
+    int starty = (int)evas_object_data_get(evas_obj, "starty");
+    Evas_Smart_Cb on_flick = (Evas_Smart_Cb)evas_object_data_get(evas_obj, "on_flick");
+    mouse_behaviour_t mbt = mouse_event_identify(startx, starty, ev->output.x, ev->output.y);
+    evas_object_data_set(evas_obj, "startx", (const void *)MOUSE_POSITION_INVALID);
+    evas_object_data_set(evas_obj, "starty", (const void *)MOUSE_POSITION_INVALID);
+    if (on_flick != NULL) {
+        on_flick(data, evas_obj, (void *)mbt);
+    }
+}
+
+void evas_object_flick_callback_add(Evas_Object *obj, Evas_Smart_Cb on_flick, void *data)
+{
+    evas_object_data_set(obj, "startx", (const void *)MOUSE_POSITION_INVALID);
+    evas_object_data_set(obj, "starty", (const void *)MOUSE_POSITION_INVALID);
+    evas_object_data_set(obj, "on_flick", (const void *)on_flick);
+    evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_DOWN, _evas_object_on_mouse_down, data);
+    evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_UP, _evas_object_on_mouse_up, data);
+}
+
 void memo_com_dummy_cb(void *data, const char *msg, void *event)
 {
     LOGD("msg : %s\n", msg);
 }
 
+typedef struct __pop_data_t {
+    Evas_Smart_Cb on_yes;
+    Evas_Smart_Cb on_no;
+    void *user_data;
+    Evas_Object *pop;
+} pop_data_t;
+
+static void _on_yes_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       pop_data_t *pData = (pop_data_t *)data;
+        if (pData->on_yes != NULL) {
+            pData->on_yes(pData->user_data, obj, event_info);
+        }
+        evas_object_del(pData->pop);
+       SFREE(pData);
+}
+
+static void _on_no_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       pop_data_t *pData = (pop_data_t *)data;
+        if (pData->on_no != NULL) {
+            pData->on_no(pData->user_data, obj, event_info);
+        }
+        evas_object_del(pData->pop);
+       SFREE(pData);
+}
+
+/**
+ * memo_create_yes_no_popup
+ *
+ * @brief
+ *
+ * @param   [in] win
+ *
+ * @param   [in] msg
+ *
+ * @param   [in] on_yes
+ *
+ * @param   [in] on_no
+ *
+ * @param   [in] data
+ *
+ * @return
+ *
+ * @exception    None
+ *
+ * @remark       None
+ *
+ * @see
+ *
+ */
+void memo_create_yes_no_popup(Evas_Object *win, const char *msg, Evas_Smart_Cb on_yes, Evas_Smart_Cb on_no, void *data)
+{
+    pop_data_t *pd = SMALLOC(pop_data_t);
+    RETIF(pd == NULL);
+
+    pd->on_yes = on_yes;
+    pd->on_no = on_no;
+    pd->user_data = data;
+    Evas_Object *popup = elm_popup_add(win);
+    pd->pop = popup;
+    evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    elm_object_text_set(popup, msg);
+    Evas_Object *btn1 = elm_button_add(popup);
+    elm_object_text_set(btn1, MEMO_I18N_YES);
+    elm_object_part_content_set(popup, "button1", btn1);
+    evas_object_smart_callback_add(btn1, "clicked", _on_yes_cb, pd);
+    Evas_Object *btn2 = elm_button_add(popup);
+    elm_object_text_set(btn2, MEMO_I18N_NO);
+    elm_object_part_content_set(popup, "button2", btn2);
+    evas_object_smart_callback_add(btn2, "clicked", _on_no_cb, pd);
+    evas_object_show(popup);
+}
+
+void memo_tool_btn_focus_set(Evas_Object *eo, Eina_Bool status)
+{
+    edje_object_signal_emit(elm_layout_edje_get(eo), (status ? "focus" : "normal"), "elm");
+}
+
+static void _set_bg(Evas_Object *obj, service_h service)
+{
+       unsigned char *color = NULL;
+       int bg_color = 0xFFFFFFFF; /* ARGB */
+       char *s = NULL;
+       service_get_extra_data(service, "bg_color" , &s);
+       if (s != NULL) {
+               bg_color = atoi(s);
+               SFREE(s);
+       }
+       color = (unsigned char *)&bg_color;
+       evas_object_color_set(obj, color[2], color[1], color[0], color[3]);
+}
+
+typedef struct __font_size_selector_t {
+    Evas_Object *parent;
+    Memo_Component_Callback cb;
+    void *data;
+    /* content */
+    Evas_Object *body_main;
+    Evas_Object *slider;
+    Evas_Object *label;
+    Evas_Object *event_rect; /* for sweep */
+    /* other */
+    int min;
+    int max;
+    int current;
+}font_size_selector_t;
+
+static void _on_font_size_change_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    font_size_selector_t *fss = (font_size_selector_t *)data;
+    fss->current = elm_slider_value_get(fss->slider);
+    char buf[MEMO_BUFFER_SIZE];
+    snprintf(buf, MEMO_BUFFER_SIZE, "<color=#000000FF><font_size=%d><align=center>Abc</align></font_size></color>", fss->current);
+    elm_object_text_set(fss->label, buf);
+    fss->cb(fss->data, "change", (void *)fss->current);
+}
+
+static void _fss_on_flick(void *data, Evas_Object *evas_obj, void *event_info)
+{
+    font_size_selector_t *fss = (font_size_selector_t *)data;
+    if ((mouse_behaviour_t)event_info == MOUSE_EVENT_DRAG_DOWN) {
+        fss->cb(fss->data, "flick,down", (void *)fss->current);
+    }
+}
+
+void *memo_load_font_size_selector(Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data)
+{
+       font_size_selector_t *fss = SMALLOC(font_size_selector_t);
+       RETVIF(fss==NULL, NULL);
+       service_dump(service);
+       fss->parent = parent;
+       fss->cb = (cb==NULL ? memo_com_dummy_cb : cb); /* make sure cb is not null, no need to check legitimacy of cb when call */
+       fss->data = data;
+
+       /* init */
+       fss->min = 20;
+       fss->max = 60;
+       fss->current = 30;
+       char *s = NULL;
+       service_get_extra_data(service, "current", &s);
+       if (s != NULL) {
+               fss->current = atoi(s);
+               SFREE(s);
+       }
+
+       fss->body_main = elm_layout_create(fss->parent, EDJ_FILE, "font_size_selector");
+       fss->cb(fss->data, "layout", fss->body_main);
+
+       /* background */
+       Evas_Object *bg = evas_object_rectangle_add(evas_object_evas_get(parent));
+       _set_bg(bg, service);
+       elm_object_part_content_set(fss->body_main, "bg.color", bg);
+       /* slider */
+       fss->slider = elm_slider_add(fss->body_main);
+       elm_object_style_set(fss->slider, "expanded_indicator_button");
+       elm_slider_indicator_show_set(fss->slider, EINA_TRUE);
+       elm_slider_min_max_set(fss->slider, fss->min, fss->max);
+       elm_slider_indicator_format_set(fss->slider, "%1.0f");
+       elm_slider_value_set(fss->slider, fss->current);
+       evas_object_smart_callback_add(fss->slider, "changed", _on_font_size_change_cb, fss);
+       elm_object_part_content_set(fss->body_main, "elm.swallow.selector", fss->slider);
+       /* preview text */
+       fss->label = elm_label_add(fss->body_main);
+       char buf[MEMO_BUFFER_SIZE];
+       snprintf(buf, MEMO_BUFFER_SIZE, "<color=#000000FF><font_size=%d><align=center>Abc</align></font_size></color>", fss->current);
+       elm_object_text_set(fss->label, buf);
+       elm_object_part_content_set(fss->body_main, "elm.swallow.label", fss->label);
+       /* for flick event */
+       fss->event_rect = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(fss->body_main), "event");
+       evas_object_flick_callback_add(fss->event_rect, _fss_on_flick, fss);
+
+       return (void *)fss;
+}
+
+void memo_del_font_size_selector(void *h_fss)
+{
+    font_size_selector_t *fss = (font_size_selector_t *)h_fss;
+    evas_object_del(fss->body_main);
+    SFREE(fss);
+}
+
+typedef struct __color_selector_t {
+    Evas_Object *parent;
+    Memo_Component_Callback cb;
+    void *data;
+    /* content */
+    Evas_Object *body_main;
+    Evas_Object *selector;
+    Evas_Object *rect; /* color rect */
+    Evas_Object *event_rect; /* for sweep */
+    /* other */
+    int color; /* ARGB */
+}color_selector_t;
+
+static void _on_color_change_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    int r, g, b, a;
+    color_selector_t *cs = (color_selector_t *)data;
+    elm_colorselector_color_get(cs->selector, &r, &g, &b, &a);
+    evas_object_color_set(cs->rect, r, g, b, a);
+    int color = ARGB_JOIN(a, r, g, b);
+    if (cs->color != color) {
+        cs->color = color;
+        cs->cb(cs->data, "change", (void *)cs->color);
+    }
+}
+
+static void _cs_on_flick(void *data, Evas_Object *evas_obj, void *event_info)
+{
+    color_selector_t *cs = (color_selector_t *)data;
+    if ((mouse_behaviour_t)event_info == MOUSE_EVENT_DRAG_DOWN) {
+        cs->cb(cs->data, "flick,down", (void *)cs->color);
+    }
+}
+
+void *memo_load_color_selector(Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data)
+{
+    color_selector_t *cs = SMALLOC(color_selector_t);
+    RETVIF(cs==NULL, NULL);
+    service_dump(service);
+    cs->parent = parent;
+    cs->cb = (cb==NULL ? memo_com_dummy_cb : cb); /* make sure cb is not null, no need to check legitimacy of cb when call */
+    cs->data = data;
+
+    /* init */
+    cs->color = 0xff000000;
+    char *s = NULL;
+    service_get_extra_data(service, "color" , &s);
+    if (s != NULL) {
+        cs->color = atoi(s);
+       SFREE(s);
+    }
+    cs->body_main = elm_layout_create(cs->parent, EDJ_FILE, "color_selector");
+    cs->cb(cs->data, "layout", cs->body_main);
+
+    /* background */
+    service_get_extra_data(service, "bg_color", &s);
+    if (s != NULL) {
+        edje_object_signal_emit(elm_layout_edje_get(cs->body_main), "white", "elm");
+       SFREE(s);
+    } else {
+        edje_object_signal_emit(elm_layout_edje_get(cs->body_main), "black", "elm");
+    }
+    /* selector */
+    cs->selector = elm_colorselector_add(cs->body_main);
+    elm_colorselector_mode_set(cs->selector, ELM_COLORSELECTOR_COMPONENTS);
+    elm_object_part_content_set(cs->body_main, "elm.swallow.selector", cs->selector);
+    unsigned char *color = (unsigned char *)&cs->color;
+    elm_colorselector_color_set(cs->selector, color[2], color[1], color[0], color[3]);
+    evas_object_smart_callback_add(cs->selector, "changed", _on_color_change_cb, cs);
+    /* preview color rect */
+    cs->rect = evas_object_rectangle_add(evas_object_evas_get(parent));
+    evas_object_color_set(cs->rect, color[2], color[1], color[0], color[3]);
+    elm_object_part_content_set(cs->body_main, "elm.swallow.color", cs->rect);
+    /* for flick event */
+    cs->event_rect = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(cs->body_main), "event");
+    evas_object_flick_callback_add(cs->event_rect, _cs_on_flick, cs);
+
+    return (void *)cs;
+}
+
+void memo_del_color_selector(void *h_cs)
+{
+    color_selector_t *cs = (color_selector_t *)h_cs;
+    evas_object_del(cs->body_main);
+    SFREE(cs);
+}
+
+typedef struct __pencil_size_selector_t {
+    Evas_Object *parent;
+    Memo_Component_Callback cb;
+    void *data;
+    /* content */
+    Evas_Object *body_main;
+    Evas_Object *slider;
+    Evas_Object *rect; /* previw rect */
+    Evas_Object *event_rect; /* for sweep */
+    /* other */
+    int min;
+    int max;
+    int current;
+}pencil_size_selector_t;
+
+static void _on_pencil_size_change_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    pencil_size_selector_t *pss = (pencil_size_selector_t *)data;
+    pss->current = elm_slider_value_get(pss->slider);
+    evas_object_size_hint_min_set(pss->rect, 0, pss->current);
+    pss->cb(pss->data, "change", (void *)pss->current);
+}
+
+static void _pss_on_flick(void *data, Evas_Object *evas_obj, void *event_info)
+{
+    pencil_size_selector_t *pss = (pencil_size_selector_t *)data;
+    if ((mouse_behaviour_t)event_info == MOUSE_EVENT_DRAG_DOWN) {
+        pss->cb(pss->data, "flick,down", (void *)pss->current);
+    }
+}
+
+void *memo_load_pencil_size_selector(Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data)
+{
+    pencil_size_selector_t *pss = SMALLOC(pencil_size_selector_t);
+    RETVIF(pss==NULL, NULL);
+    service_dump(service);
+    pss->parent = parent;
+    pss->cb = (cb==NULL ? memo_com_dummy_cb : cb); /* make sure cb is not null, no need to check legitimacy of cb when call */
+    pss->data = data;
+
+    /* init */
+    pss->min = 1;
+    pss->max = 8;
+    pss->current = 8;
+    char *s = NULL;
+    service_get_extra_data(service, "current", &s);
+    if (s != NULL) {
+        pss->current = atoi(s);
+       SFREE(s);
+    }
+
+    pss->body_main = elm_layout_create(pss->parent, EDJ_FILE, "pencil_size_selector");
+    pss->cb(pss->data, "layout", pss->body_main);
+
+    /* background */
+    Evas_Object *bg = evas_object_rectangle_add(evas_object_evas_get(parent));
+    _set_bg(bg, service);
+    elm_object_part_content_set(pss->body_main, "bg.color", bg);
+    /* slider */
+    pss->slider = elm_slider_add(pss->body_main);
+    elm_object_style_set(pss->slider, "expanded_indicator_button");
+    elm_slider_indicator_show_set(pss->slider, EINA_TRUE);
+    elm_slider_min_max_set(pss->slider, pss->min, pss->max);
+    elm_slider_indicator_format_set(pss->slider, "%1.0f");
+    elm_slider_value_set(pss->slider, pss->current);
+    evas_object_smart_callback_add(pss->slider, "changed", _on_pencil_size_change_cb, pss);
+    elm_object_part_content_set(pss->body_main, "elm.swallow.selector", pss->slider);
+    /* preview size rect */
+    pss->rect = evas_object_rectangle_add(evas_object_evas_get(parent));
+    evas_object_color_set(pss->rect, 0, 0, 0, 255);
+    evas_object_size_hint_min_set(pss->rect, 0, pss->current);
+    elm_object_part_content_set(pss->body_main, "elm.swallow.pencil", pss->rect);
+    /* for flick event */
+    pss->event_rect = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(pss->body_main), "event");
+    evas_object_flick_callback_add(pss->event_rect, _pss_on_flick, pss);
+
+    return (void *)pss;
+}
+
+void memo_del_pencil_size_selector(void *h_pss)
+{
+    pencil_size_selector_t *pss = (pencil_size_selector_t *)h_pss;
+    evas_object_del(pss->body_main);
+    SFREE(pss);
+}
+
 void memo_navigator_pop(Evas_Object *navi)
 {
     Elm_Object_Item *top_it = elm_naviframe_top_item_get(navi);
index e7ab194..8b690a5 100644 (file)
@@ -1,19 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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
@@ -23,6 +24,8 @@
 #include <supplement.h>
 #include <memo_ug.h>
 #include "memo-efl.h"
+#include "gravel.h"
+
 
 static Evas_Object *create_fullview(Evas_Object *parent, struct ug_data *ugd)
 {
@@ -76,92 +79,95 @@ 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)
+static void *on_create(ui_gadget_h ug, enum ug_mode mode, service_h service, 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;
+       Evas_Object *parent;
+       struct ug_data *ugd;
+       char *index = NULL;
+
+       if (!ug || !priv)
+               return NULL;
+
+       ugd = priv;
+       ugd->ug = ug;
+
+       service_dump(service);
+
+       /* theme extension */
+       ugd->th = elm_theme_new();
+       elm_theme_ref_set(ugd->th, NULL);
+       elm_theme_extension_add(ugd->th, EDJ_FILE);
+
+       /* open database */
+       memo_init(NULL);
+
+       /* i18n */
+       bindtextdomain("memo", "/opt/ug/res/locale");
+
+       parent = ug_get_parent_layout(ug);
+       if (!parent)
+               return NULL;
+
+       service_get_extra_data(service, "index", &index);
+       if (index != NULL) {/* legitimacy check of memo record */
+               memo_data_t *md = memo_get_data(atoi(index));
+               if (md == NULL) {
+                       if (mode == UG_MODE_FULLVIEW)
+                               ugd->base = create_error_popup_layout(parent, TRUE);
+                       else
+                               ugd->base = create_error_popup_layout(parent, FALSE);
+
+                       Evas_Object *popup;
+                       popup = elm_popup_add(ugd->base);
+                       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                       elm_object_text_set(popup, dgettext("sys_string", "IDS_COM_POP_FILE_NOT_FOUND"));
+                       elm_popup_timeout_set(popup, 1.5);
+                       evas_object_show(popup);
+                       ugd->ug = ug;
+                       evas_object_smart_callback_add(popup, "timeout", memo_ug_hide_cb, ugd->ug);
+                       SFREE(index);
+                       return ugd->base;
+               } else {
+                       memo_free_data(md);
+               }
+       }
+
+       if (mode == UG_MODE_FULLVIEW)
+               ugd->base = create_fullview(parent, ugd);
+       else
+               ugd->base = create_frameview(parent, ugd);
+
+       if (ugd->base) {
+               if (edit_view_pre_condition_check(service)) {
+                       ugd->h_ug = memo_load_edit_view(ugd, service);
+               } else if (service_key_check(service, "type", "select")) {
+                       memo_load_select_view(ugd, service);
+               } else if (index != NULL) {
+                       SFREE(index);
+                       memo_load_detail_view(ugd, service);
+               } else {
+                       memo_load_select_view(ugd, service);
+               }
+       }
+       SFREE(index);
+       return ugd->base;
 }
 
-static void on_start(struct ui_gadget *ug, bundle *data, void *priv)
+static void on_start(ui_gadget_h ug, service_h service, void *priv)
 {
 }
 
-static void on_pause(struct ui_gadget *ug, bundle *data, void *priv)
+static void on_pause(ui_gadget_h ug, service_h service, void *priv)
 {
 
 }
 
-static void on_resume(struct ui_gadget *ug, bundle *data, void *priv)
+static void on_resume(ui_gadget_h ug, service_h service, void *priv)
 {
 
 }
 
-static void on_destroy(struct ui_gadget *ug, bundle *data, void *priv)
+static void on_destroy(ui_gadget_h ug, service_h service, void *priv)
 {
     struct ug_data *ugd;
 
@@ -178,15 +184,19 @@ static void on_destroy(struct ui_gadget *ug, bundle *data, void *priv)
     elm_theme_free(ugd->th);
     ugd->th = NULL;
 
+    if (ugd->h_ug != NULL) {
+        memo_del_edit_view(ugd->h_ug);
+        ugd->h_ug = NULL;
+    }
     evas_object_del(ugd->base);
     ugd->base = NULL;
 }
 
-static void on_message(struct ui_gadget *ug, bundle *msg, bundle *data, void *priv)
+static void on_message(ui_gadget_h ug, service_h msg, service_h service, void *priv)
 {
 }
 
-static void on_event(struct ui_gadget *ug, enum ug_event event, bundle *data, void *priv)
+static void on_event(ui_gadget_h ug, enum ug_event event, service_h service, void *priv)
 {
     switch (event) {
     case UG_EVENT_LOW_MEMORY:
@@ -208,7 +218,7 @@ static void on_event(struct ui_gadget *ug, enum ug_event event, bundle *data, vo
     }
 }
 
-static void on_key_event(struct ui_gadget *ug, enum ug_key_event event, bundle *data, void *priv)
+static void on_key_event(ui_gadget_h ug, enum ug_key_event event, service_h service, void *priv)
 {
     if (!ug)
         return;
index 8c085d3..4226377 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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>
diff --git a/src/memo_autolink.c b/src/memo_autolink.c
new file mode 100644 (file)
index 0000000..3473dec
--- /dev/null
@@ -0,0 +1,547 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+#include <Elementary.h>
+#include <dlog.h>
+#include <gravel.h>
+#include <extended-elm.h>
+#include <assert.h>
+#include <glib.h>
+#include <memo_string.h>
+#include <aul.h>
+#include <appsvc.h>
+#include <contacts-ug.h>
+#include <memo_autolink.h>
+#include <memo_ug.h>
+
+static void _autolink_popup_response_cb(void *data, Evas_Object *obj, void *event_info);
+/* BEGIN CONVERTE BETWEEN enum anchor_t AND string  */
+
+static char *_autolink_anchor_type_to_string(enum anchor_t type)
+{
+    switch (type) {
+    case ANCHOR_EMAIL:
+        return "email";
+    case ANCHOR_PHONE:
+        return "phone_num";
+    case ANCHOR_URL:
+        return "url";
+    default:
+        return "";
+    }
+}
+
+/* END CONVERTE BETWEEN enum anchor_t AND string  */
+
+/* BEGIN POPUP CALLBACK */
+
+static void _autolink_send_email_selected_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       struct autolink_data_t *ald = (struct autolink_data_t *)data;
+       service_h service = NULL;
+       service_create(&service);
+       service_add_extra_data(service, "RUN_TYPE", "5");
+       service_add_extra_data(service, "TO", ald->info);
+
+       ug_launch_common(service, UG_NAME_EMAIL);
+       _autolink_popup_response_cb(ald, ald->popup, NULL);
+}
+
+static void _autolink_send_message_selected_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    struct autolink_data_t *ald = (struct autolink_data_t *)data;
+
+    ug_launch_common_var(UG_NAME_MESSAGE, "TO", ald->info, NULL);
+    _autolink_popup_response_cb(ald, ald->popup, NULL);
+}
+
+static void _autolink_vioce_call_selected_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       struct autolink_data_t *ald = (struct autolink_data_t *)data;
+       bundle *bd = bundle_create();
+       char telnum[255] = {0,};
+
+       appsvc_set_operation(bd, APPSVC_OPERATION_CALL);
+       snprintf(telnum, sizeof(telnum), "tel:%s", ald->info);
+       appsvc_set_uri(bd, telnum);
+       appsvc_run_service(bd, 0, NULL, NULL);
+
+       bundle_free(bd);
+       _autolink_popup_response_cb(ald, ald->popup, NULL);
+}
+
+static void _autolink_video_call_selected_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       struct autolink_data_t *ald = (struct autolink_data_t *)data;
+       service_h service = NULL;
+       service_create(&service);
+       service_add_extra_data(service, "KEY_CALL_TYPE", "mo");
+       service_add_extra_data(service, "KEY_CALL_HANDLE", "1");
+       service_add_extra_data(service, "KEY_CALLING_PARTY_NUMBER", ald->info);
+       service_add_extra_data(service, "KEY_CLI_CAUSE", "-1");
+       service_add_extra_data(service, "KEY_FORWARDED", "-1");
+       service_set_package(service, AUL_NAME_VEDIO_CALL);
+       service_send_launch_request(service, NULL, NULL);
+
+       service_destroy(service);
+       _autolink_popup_response_cb(ald, ald->popup, NULL);
+}
+
+static void _autolink_email_add_to_contact_selected_cb(void *data, Evas_Object *obj,
+                               void *event_info)
+{
+       struct autolink_data_t *ald = (struct autolink_data_t *)data;
+
+       char buf[10];
+       snprintf(buf, sizeof(buf), "%d", CT_UG_REQUEST_ADD_WITH_EMAIL);
+
+       service_h service = NULL;
+       service_create(&service);
+       service_add_extra_data(service, CT_UG_BUNDLE_TYPE, buf);
+       service_add_extra_data(service, CT_UG_BUNDLE_EMAIL, ald->info);
+
+       ug_launch_common(service, UG_CONTACTS_DETAILS);
+       _autolink_popup_response_cb(ald, ald->popup, NULL);
+}
+
+static void _autolink_phone_add_to_contact_selected_cb(void *data, Evas_Object *obj,
+                               void *event_info)
+{
+       struct autolink_data_t *ald = (struct autolink_data_t *)data;
+
+       char buf[10];
+       snprintf(buf, sizeof(buf), "%d", CT_UG_REQUEST_ADD_WITH_NUM);
+
+       service_h service = NULL;
+       service_create(&service);
+       service_add_extra_data(service, CT_UG_BUNDLE_TYPE, buf);
+       service_add_extra_data(service, CT_UG_BUNDLE_NUM, ald->info);
+
+       ug_launch_common(service, UG_CONTACTS_DETAILS);
+       _autolink_popup_response_cb(ald, ald->popup, NULL);
+}
+
+/* END POPUP CALLBACK */
+
+static struct anchor_popup_item_t g_email_list[] = {
+    {"IDS_MEMO_OPT_SEND_EMAIL", _autolink_send_email_selected_cb, "memo"},
+    {"IDS_MEMO_BODY_ADD_TO_CONTACT", _autolink_email_add_to_contact_selected_cb, "memo"},
+};
+
+static struct anchor_popup_item_t g_phone_list[] = {
+    {"IDS_COM_BODY_VOICE_CALL", _autolink_vioce_call_selected_cb, "sys_string"},
+    {"IDS_COM_BODY_SEND_MESSAGE", _autolink_send_message_selected_cb, "sys_string"},
+    {"IDS_COM_BODY_VIDEO_CALL", _autolink_video_call_selected_cb, "sys_string"},
+    {"IDS_MEMO_BODY_ADD_TO_CONTACT", _autolink_phone_add_to_contact_selected_cb, "memo"},
+};
+
+static char *_autolink_gl_label_get(void *data, Evas_Object *obj, const char *part)
+{
+    char *label = (char *)data;
+    if (strcmp(part, "elm.text") == 0) {
+        return strdup(label);
+    }
+    return NULL;
+}
+
+static void _autolink_popup_response_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    PFUNC_ENTER;
+
+    assert(data != NULL);
+    struct autolink_data_t *ald = (struct autolink_data_t *)data;
+    if (ald->popup != NULL) {
+        evas_object_del(ald->popup);
+    }
+
+    assert(ald->info != NULL);
+    free(ald->info);
+    free(ald);
+
+    PFUNC_LEAVE;
+}
+
+void _autolink_popup_show(char *title, struct autolink_data_t *ald)
+{
+    struct anchor_popup_item_t *list = NULL;
+    int count = 0;
+    Evas_Object *box = NULL;
+
+    switch (ald->type) {
+    case ANCHOR_EMAIL:
+        list = g_email_list;
+        count = ARRAY_SIZE(g_email_list);
+        break;
+    case ANCHOR_PHONE:
+        list = g_phone_list;
+        count = ARRAY_SIZE(g_phone_list);
+        break;
+    default:
+        break;
+    }
+
+    Evas_Object *popup = elm_popup_add(ald->win_main);
+    ald->popup = popup;
+    elm_object_part_text_set(popup, "title,text", title);
+    Evas_Object *btn1 = elm_button_add(popup);
+    elm_object_text_set(btn1, MEMO_I18N_CLOSE);
+    elm_object_part_content_set(popup, "button1", btn1);
+    evas_object_smart_callback_add(btn1, "clicked", _autolink_popup_response_cb, ald);
+    evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+    static Elm_Genlist_Item_Class itc;
+    memset(&itc, 0, sizeof(Elm_Genlist_Item_Class));
+    itc.item_style = "1text";
+    itc.func.text_get = _autolink_gl_label_get;
+
+    Evas_Object *genlist = elm_genlist_add(popup);
+    evas_object_smart_callback_add(genlist, "selected", NULL, NULL);
+    evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+    int i = 0;
+    for (i = 0; i < count; ++i) {
+        elm_genlist_item_append(genlist, &itc, dgettext(list[i].domain, list[i].label),
+                    NULL, ELM_GENLIST_ITEM_NONE, list[i].response, ald);
+    }
+
+    evas_object_show(genlist);
+    box = elm_box_add(popup);
+    evas_object_size_hint_min_set(box, 0, (count>3 ? 3 : count)*71);
+    elm_box_pack_end(box, genlist);
+    evas_object_show(box);
+    elm_object_content_set(popup, box);
+    evas_object_show(popup);
+}
+
+void autolink_anchor_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    Elm_Entry_Anchor_Info *ei = (Elm_Entry_Anchor_Info *)event_info;
+    autolink_data *ald = SMALLOC(autolink_data);
+    RETIF(ald == NULL);
+
+    int info_len = strlen(ei->name) + 1;
+    ald->info = calloc(1, info_len);
+    if (ald->info == NULL) {
+        SFREE(ald);
+        return;
+    }
+
+    ald->win_main = (Evas_Object *)data;
+    /* retrieve anchor info, eg `url|www  phone_num|8888 email|abc@k.com` */
+    switch (ei->name[0]) {
+    case 'u':
+        ald->type = ANCHOR_URL;
+        break;
+    case 'p':
+        ald->type = ANCHOR_PHONE;
+        break;
+    case 'e':
+        ald->type = ANCHOR_EMAIL;
+        break;
+    default :
+        ald->type = NOT_ANCHOR;
+        break;
+    }
+    const char *start = ei->name + strlen(_autolink_anchor_type_to_string(ald->type)) +1;
+    const char *end = strchr(ei->name, ' ');
+    strncpy(ald->info, start, end - start);
+    LOGD("Anchor clicked (%s)\n", ald->info);
+
+    if ((ald->type == ANCHOR_EMAIL) || (ald->type == ANCHOR_PHONE)){
+        _autolink_popup_show(ald->info, ald);
+        return;
+    }
+
+    if (ald->type == ANCHOR_URL) {
+        aul_open_content(ald->info);    /* launch browser */
+    }
+    SFREE(ald->info);
+    SFREE(ald);
+}
+
+static Eina_Bool str_is_begin_with(const char *str, const char *prefix)
+{
+    if (strlen(str) < strlen(prefix)) {
+        return EINA_FALSE;
+    }
+
+    int i = 0;
+    for (i = 0; i < strlen(prefix); ++i) {
+        if (str[i] != prefix[i]) {
+            return EINA_FALSE;
+        }
+    }
+
+    return EINA_TRUE;
+}
+
+/* TYPE CHECKER BEGIN */
+/*
+ * [Checker Function Specification]
+ * These function get target type from beginning of string.
+ * The only parameter str is the string that want to be checked.
+ * Let's assume the returned value is r. There are 3 cases:
+ *     r > 0 : From beginning to r of str match the target type.
+ *     r = 0 : Str doesn't have target type, no longer check.
+ *     r < 0 : It doesn't match from beginning, but from -r position maybe matched.
+ *             It will be checked next time.
+ */
+static int _autolink_url_checker(const char* str)
+{
+    char *prefix[] = {"http://", "www.", "wap."};
+
+    int i = 0;
+    for (i = 0; i < ARRAY_SIZE(prefix); ++i) {
+        if (str_is_begin_with(str, prefix[i])) { /* Begin with specified prefix */
+            int j = 0;
+            while(str[j] != '\0' && !isspace(str[j])) {
+                if (str[j] == '<') { /* tag begin */
+                    break;
+                }
+                j++;
+            }
+
+            if(j == strlen(prefix[i])) { /* only with prefix alone */
+                break;
+            } else {
+                return j;
+            }
+        }
+    }
+
+    /* not matched, get next position */
+#if 0 /* Need correct */
+    int next = 0;
+    char *p = NULL;
+    for (i = 0; i < ARRAY_SIZE(prefix); ++i) {
+        p = strstr(str, prefix[i]);
+        if (p != NULL) {
+            if (next == 0) {
+                next = p - str;
+            } else if (next > p - str) {
+                next = p - str;
+            }
+        }
+    }
+#endif
+
+    return -1;
+}
+
+static int _autolink_email_checker(const char* str)
+{
+    char *p = NULL;
+    p = strchr(str, '@');
+
+    if (NULL == p) {
+        return 0;
+    } else if (p == str) { /* '@' at beginning */
+        return -1;
+    }
+
+    char next = p[1];
+    if (next == '@') { /* consecutive '@' */
+        return -(p + 2 - str);
+    } else if (next == '.') { /* "@." */
+        return -(p + 2 - str);
+    } else if (next == '\0') { /* '@' at end of string */
+        return -(p + 1 - str);
+    } else if (isspace(next) || next == '<') { /* '@' at end of word */
+        return -(p + 2 - str);
+    }
+
+    /* check if valid before @ */
+    char *q = p;
+    while (q >= str) {
+        if (isspace(*q)) {
+            return -(q + 1 - str);
+        }
+
+        if (*q == '>' || *q == '/') { /* tag end and other illega character */
+            return -(q + 1 - str);
+        }
+
+        if (*q == '.' && ( q == str || *(q - 1) == '.')) {
+            return -(q + 1 - str);
+        }
+
+        q--;
+    }
+
+    /* get the end position of email */
+    q = p + 1;
+    while (*q != '\0' && !isspace(*q)) {
+        if (*q == '.' && *(q + 1) == '.') {
+            break;
+        }
+
+        if (*q == '<') { /* tag begin */
+            break;
+        }
+
+        q++;
+    }
+    return q - str;
+}
+
+static int _autolink_phone_checker(const char *str)
+{
+    /* search beginning */
+    int i = 0;
+    for (i = 0; str[i] != '\0'; ++i) {
+        /* digit, '+', '*' and '#' at the beginning of phone is valid. */
+        if (isdigit(str[i]) || str[i] == '+' || str[i] == '*' || str[i] == '#') {
+            break;
+        }
+    }
+
+    if (i > 0) {
+        return -i;
+    }
+
+    for (i = 1; str[i] != '\0'; ++i) {
+        if (isdigit(str[i]) || str[i] == '*' || str[i] == '#') {
+            /* NOP */
+        } else if (str[i] == '-') {
+            if (str[i - 1] == '-' || str[i - 1] == ' ') { /* "--" or " -" */
+                i -= 1;
+                break;
+            }
+        } else if (str[i] == ' ') {
+            if (str[i - 1] == '-') { /* "- " */
+                i -= 1;
+                break;
+            } else if (str[i - 1] == ' ' && isdigit(str[i + 1])) { /* consecutive ' ' */
+                int j = 0;
+                while (isdigit(str[i + 1 + j])) { ++j; }
+                if (j > 5) {
+                    while (str[i] == ' ') { i--; }
+                    return i + 1;
+                }
+            }
+        } else { /* other character */
+            break;
+        }
+    }
+
+    int len = i;
+    if (len < 3) {
+        return -len;
+    } else {
+        return len;
+    }
+}
+
+/* TYEP CHECKER END */
+
+static void _autolink_box_anchor(GString *text, char *type, char *content)
+{
+    char *buf = NULL;
+    if (strcmp(type, "phone_num") == 0) { /* remove '-' and ' ' in phone num. */
+        buf = (char *)malloc(strlen(content) + 1);
+        RETIF(buf == NULL);
+        int i = 0, j = 0;
+        while (content[i] != '\0') {
+            if (content[i] == '-' || content[i] == ' ') {
+                ++i;
+            } else {
+                buf[j] = content[i];
+                ++i;
+                ++j;
+            }
+        }
+        buf[j] = '\0';
+    } else {
+        buf = content;
+    }
+
+    g_string_append_printf(text,
+        "<color=#72b1f2FF><a href=%s|%s underline=on underline_color=#72b1f2FF>%s</a></color>",
+        type, buf, content);
+
+    if (buf != content) {
+        free(buf);
+    }
+}
+
+GString *autolink_add_anchor(const char *content)
+{
+    assert(content != NULL);
+
+    const char *p = content;
+    char *gt = NULL;
+    GString *text = g_string_new("");
+    GString *buf = g_string_new("");
+
+    struct checker_t {
+        int (*check)(const char* str);
+        char *type;
+        Eina_Bool invoke;
+    } checkers[] = {
+        {_autolink_url_checker, "url", EINA_TRUE},
+        {_autolink_email_checker, "email", EINA_TRUE},
+        {_autolink_phone_checker, "phone_num", EINA_TRUE},
+    };
+
+    while (*p != '\0') {
+
+        if (p[0] == '<') {    /* tag begin */
+            gt = strchr(p, '>');    /* search tag end */
+            assert(gt != NULL);    /* assert '<' and '>' are matched */
+            g_string_append_len(text, p, gt - p + 1);
+            p = gt + 1;
+        }
+
+        int i = 0;
+        int r = 0;
+        int next_pos = -1;
+        for (i = 0; i < ARRAY_SIZE(checkers); ++i) {
+            if (checkers[i].invoke == EINA_TRUE) {
+                r = checkers[i].check(p);
+                if (r == 0) { /* no longer check */
+                    checkers[i].invoke = EINA_FALSE;
+                } else if (r > 0) { /* Get */
+                    g_string_assign(buf, "");    /* reset buffer */
+                    g_string_append_len(buf, p, r);
+                    _autolink_box_anchor(text, checkers[i].type, buf->str);
+                    next_pos = r;
+                    break;
+                } else { /* r < 0 */
+                    if (next_pos <= 0 || next_pos > -r) {
+                        next_pos = -r;
+                    }
+                }
+            }
+        }
+
+        if (next_pos < 0) {
+            g_string_append(text, p);
+            break;
+        } else if ( i == ARRAY_SIZE(checkers)) {
+            g_string_append_len(text, p, next_pos);
+        }
+
+        p += next_pos;
+    }
+
+    g_string_free(buf, TRUE);
+    printf("\t\t********** %s\n", text->str);
+
+    return text;
+}
diff --git a/src/memo_doodle_editor.c b/src/memo_doodle_editor.c
new file mode 100644 (file)
index 0000000..20b950a
--- /dev/null
@@ -0,0 +1,586 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <appcore-efl.h>
+#include <Elementary.h>
+#include <dlog.h>
+#include <gravel.h>
+#include <extended-elm.h>
+#include <supplement.h>
+#include <memo-assist.h>
+#include <memo_string.h>
+
+typedef struct __doodle_editor_t {
+    Evas_Object *win;
+    Evas_Object *parent;
+    Memo_Component_Callback cb;
+    void *data;
+    memo_data_t *record;
+    char buf[MEMO_BUFFER_SIZE]; /* for temporarily usage only */
+    Eina_Bool savable;
+    Eina_Bool erase;    /* erase mode */
+    Eina_Bool comment;    /* edit comment mode */
+    Eina_Bool doodle_init;
+    Eina_Bool stroke_down;    /* see comment in _on_doodle_move_cb */
+    int stroke_size;
+    int stroke_color;
+
+    /* content */
+    Evas_Object *body_main;
+    Evas_Object *doodle;
+    Evas_Object *toolbar;
+    Evas_Object *btn_size;
+    void *h_ss;
+    Evas_Object *btn_color;
+    void *h_cs;
+    Evas_Object *edit_field;
+
+    /* entry */
+    Evas_Object *entry;
+    Ecore_IMF_Context *imf_context;
+} doodle_editor_t;
+
+static void _stroke_size_selector_del(doodle_editor_t *de);
+static void _stroke_color_selector_del(doodle_editor_t *de);
+
+static void _save_record(doodle_editor_t *de)
+{
+    memo_begin_trans();
+    if (de->record->id != -1) {
+        memo_mod_data(de->record);
+    } else {
+        de->record->content = memo_get_doodle_title();
+        memo_add_data(de->record);
+    }
+    /* save doodle to file */
+    snprintf(de->buf, MEMO_BUFFER_SIZE, DOODLEDIR "/%d.png", (int)de->record->id);
+    evas_object_image_save(de->doodle, de->buf, NULL, NULL);
+    memo_end_trans();
+}
+
+static void _on_save_yes(void *data, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    _save_record(de);
+    de->cb(de->data, "save", NULL);
+}
+
+static void _on_save_no(void *data, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    de->cb(de->data, "cancel", NULL);
+}
+
+static Eina_Bool _launch_yes_no_popup(void *data)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    memo_create_yes_no_popup(de->win, MEMO_I18N_SAVE_MEMO, _on_save_yes, _on_save_no, de);
+    return EINA_FALSE;
+}
+
+static Eina_Bool _comment_savable(doodle_editor_t *de)
+{
+    const char *text = elm_entry_entry_get(de->entry);
+    Eina_Bool savable = EINA_TRUE;
+
+    if (strcmp(text, "") == 0) {
+        savable = EINA_FALSE;
+    } else if (de->record->comment != NULL) { /* check if same as init string */
+        if (strcmp(de->record->comment, text)==0) {
+            savable = EINA_FALSE;
+        }
+    }
+    return savable;
+}
+
+static void _stroke_size_selector_callback(void *data, const char *msg, void *event)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    if (strcmp(msg, "layout") == 0) {
+        elm_object_part_content_set(de->body_main, "elm.swallow.tool", (Evas_Object *)event);
+    } else if (strcmp(msg, "change") == 0) {
+        de->stroke_size = (int)event;
+    } else if (strcmp(msg, "flick,down") == 0) {
+        _stroke_size_selector_del(de);
+        edje_object_signal_emit(elm_layout_edje_get(de->body_main), "expand", "elm");
+    }
+}
+
+static void _stroke_size_selector_del(doodle_editor_t *de)
+{
+    if (de->h_ss != NULL) {
+        elm_object_part_content_unset(de->body_main, "elm.swallow.tool");
+        memo_del_pencil_size_selector(de->h_ss);
+        de->h_ss = NULL;
+        memo_tool_btn_focus_set(de->btn_size, EINA_FALSE);
+    }
+}
+
+static void _on_stroke_size_btn_up(void *data, Evas *e, Evas_Object *evas_obj, void *event_info)
+{
+       doodle_editor_t *de = (doodle_editor_t *)data;
+       if (de->h_ss != NULL) { /* stroke size selector already open */
+               return;
+       }
+       if (de->h_cs != NULL) { /* destroy stroke color selector */
+               _stroke_color_selector_del(de);
+       }
+       if (de->erase) { /* deselect eraser */
+               de->erase = EINA_FALSE;
+               Evas_Object *eo = (Evas_Object *)elm_object_part_content_get(de->toolbar, "elm.swallow.btn3");
+               memo_tool_btn_focus_set(eo, de->erase);
+       }
+       /* load stroke size selector */
+       service_h service = NULL;
+       service_create(&service);
+       snprintf(de->buf, MEMO_BUFFER_SIZE, "%d", de->stroke_size);
+       service_add_extra_data(service, "current", de->buf);
+       snprintf(de->buf, MEMO_BUFFER_SIZE, "%d", 0xFFFFFFFF);
+       service_add_extra_data(service, "bg_color", de->buf);
+       de->h_ss = memo_load_pencil_size_selector(de->body_main, service, _stroke_size_selector_callback, de);
+       service_destroy(service);
+       memo_tool_btn_focus_set(de->btn_size, EINA_TRUE);
+       edje_object_signal_emit(elm_layout_edje_get(de->body_main), "abbrev", "elm");
+}
+
+void _stroke_color_selector_callback(void *data, const char *msg, void *event)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    if (strcmp(msg, "layout") == 0) {
+        elm_object_part_content_set(de->body_main, "elm.swallow.tool", (Evas_Object *)event);
+    } else if (strcmp(msg, "change") == 0) {
+        de->stroke_color = (int)event;
+    } else if (strcmp(msg, "flick,down") == 0) {
+        _stroke_color_selector_del(de);
+        edje_object_signal_emit(elm_layout_edje_get(de->body_main), "expand", "elm");
+    }
+}
+
+static void _stroke_color_selector_del(doodle_editor_t *de)
+{
+    if (de->h_cs != NULL) {
+        elm_object_part_content_unset(de->body_main, "elm.swallow.tool");
+        memo_del_color_selector(de->h_cs);
+        memo_tool_btn_focus_set(de->btn_color, EINA_FALSE);
+        de->h_cs = NULL;
+    }
+}
+
+static void _on_stroke_color_btn_up(void *data, Evas *e, Evas_Object *evas_obj, void *event_info)
+{
+       doodle_editor_t *de = (doodle_editor_t *)data;
+       if (de->h_cs!= NULL) { /* stroke color selector already open */
+               return;
+       }
+       if (de->h_ss!= NULL) { /* destroy stroke  size selector */
+               _stroke_size_selector_del(de);
+       }
+       if (de->erase) { /* deselect eraser */
+               de->erase = EINA_FALSE;
+               Evas_Object *eo = (Evas_Object *)elm_object_part_content_get(de->toolbar, "elm.swallow.btn3");
+               memo_tool_btn_focus_set(eo, de->erase);
+       }
+       /* load stroke color selector */
+       service_h service = NULL;
+       service_create(&service);
+       snprintf(de->buf, MEMO_BUFFER_SIZE, "%d", de->stroke_color);
+       service_add_extra_data(service, "color", de->buf);
+       snprintf(de->buf, MEMO_BUFFER_SIZE, "%d", 0xFFFFFFFF);
+       service_add_extra_data(service, "bg_color", de->buf);
+       de->h_cs = memo_load_color_selector(de->body_main, service, _stroke_color_selector_callback, de);
+       service_destroy(service);
+       memo_tool_btn_focus_set(de->btn_color, EINA_TRUE);
+       edje_object_signal_emit(elm_layout_edje_get(de->body_main), "abbrev", "elm");
+}
+
+static void _input_panel_event_callback(void *data, Ecore_IMF_Context *ctx, int value)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    if (value == ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
+        if (de->comment) {
+            edje_object_signal_emit(elm_layout_edje_get(de->body_main), "expand", "comment");
+        }
+    } else if (value == ECORE_IMF_INPUT_PANEL_STATE_SHOW) {
+        edje_object_signal_emit(elm_layout_edje_get(de->body_main), "abbrev", "comment");
+        if (!de->comment) { /* first shift to comment mode */
+            if (de->record->comment == NULL) { /* remove DUMMY_COMMENT */
+                elm_entry_entry_set(de->entry, "");
+            }
+            de->cb(de->data, "savable", (void *)0);
+        }
+        de->comment = EINA_TRUE;
+        de->cb(de->data, "title", de->record->comment == NULL ? MEMO_I18N_ADD_COMMENT : MEMO_I18N_EDIT_COMMENT);
+    }
+}
+
+static void _on_entry_content_change(void *data, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    if (elm_object_focus_get(de->edit_field)) {
+        if (elm_entry_is_empty(obj)) {
+            elm_object_signal_emit(de->edit_field, "elm,state,eraser,hide", "elm");
+        } else {
+            elm_object_signal_emit(de->edit_field, "elm,state,eraser,show", "elm");
+        }
+    }
+    RETIF(!de->comment);
+    Eina_Bool savable = _comment_savable(de);
+    de->cb(de->data, "savable", (void *)(savable?1:0));
+}
+
+// Focused callback will show X marked button and hide guidetext
+static void _focused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    if (!elm_entry_is_empty(obj))
+       elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+    elm_object_signal_emit(data, "elm,state,guidetext,hide", "elm");
+}
+
+// Unfocused callback will show guidetext and hide X marked button
+static void _unfocused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    if (elm_entry_is_empty(obj))
+       elm_object_signal_emit(data, "elm,state,guidetext,show", "elm");
+    elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+}
+
+// When X marked button is clicked, empty entry’s contents
+static void _eraser_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+    elm_entry_entry_set(data, "");
+}
+
+static void _draw_argb32(int *img, int w, int h, int x, int y, int size, int color)
+{
+    int cx, cy, cw, ch;
+    int i, j;
+
+    cx = x;
+    cy = y;
+    cw = size;
+    ch = size;
+    CLIP_RECT_TO_RECT(cx, cy, cw, ch, 0, 0, w, h);
+    for (i = 0; i < ch; i++) {
+        for (j = 0; j < cw; j++) {
+            memcpy(img + (i + cy) * w + (cx + j), &color, 4);
+        }
+    }
+}
+
+static void _on_doodle_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    if (de->comment) {
+        return;
+    }
+    if (de->h_ss!= NULL) { /* destroy stroke  size selector */
+        _stroke_size_selector_del(de);
+    }
+    if (de->h_cs != NULL) { /* destroy stroke color selector */
+        _stroke_color_selector_del(de);
+    }
+    edje_object_signal_emit(elm_layout_edje_get(de->body_main), "expand", "elm");
+    de->stroke_down = EINA_TRUE;
+    de->record->has_doodle = 1;
+    if (!de->erase) {
+        de->savable = EINA_TRUE;
+    } else if (de->record->id != -1) { /* edit existing doodle with eraser */
+        de->savable = EINA_TRUE;
+    }
+    de->cb(de->data, "savable", (void *)(de->savable?1:0));
+}
+
+static void _on_doodle_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    Evas_Event_Mouse_Move *event = (Evas_Event_Mouse_Move *)event_info;
+    int *img_data = NULL;
+    Evas_Coord x, y, w, h;
+    int px = 0;
+    int py = 0;
+    int i = 0;
+    int gap_max = 0;
+    int gap_x = 0;
+    int gap_y = 0;
+    int color = 0;
+
+    /* a little mouse move events will be received before mouse down event,
+       if those mouse move event is not filtered,
+       a line (from last up point to current move point) will be draw */
+    if (!de->stroke_down) {
+        return;
+    }
+
+    color = de->erase ? 0xFFFFFFFF : de->stroke_color;
+    evas_object_geometry_get(de->doodle, &x, &y, &w, &h);
+    img_data = evas_object_image_data_get(de->doodle, 1);
+    gap_x = event->cur.output.x - event->prev.output.x;
+    gap_y = event->cur.output.y - event->prev.output.y;
+    gap_max = MAX(abs(gap_x), abs(gap_y));
+
+    for (i = 0; i < gap_max; i++) {
+        px = event->prev.output.x + i * gap_x / gap_max;
+        py = event->prev.output.y + i * gap_y / gap_max;
+        /* mouse position in image */
+        px -= x;
+        py -= y;
+        _draw_argb32(img_data, w, h, px, py, de->stroke_size, color);
+    }
+    evas_object_image_data_update_add(de->doodle, 0, 0, w, h);
+}
+
+static void _on_doodle_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    de->stroke_down = EINA_FALSE;
+}
+
+/* this function must be execute only once
+ * in resize callback we will get the actual size of doodle
+ * we need to transfer origin image data to fit the actual canvas size
+ */
+static void _on_doodle_resize_cb(void *data, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    Evas_Coord w, h;
+    int *img_data = NULL;
+
+    if (de->doodle_init) {    /* reenter control */
+        return;
+    } else {
+        de->doodle_init = EINA_TRUE;
+        evas_object_geometry_get(de->doodle, NULL, NULL, &w, &h);
+        evas_object_image_size_set(de->doodle, w, h);
+        img_data = evas_object_image_data_get(de->doodle, 1);
+        if (img_data != NULL) { /* set background color as white */
+            memset(img_data, 0xFFFFFFFF, sizeof(int)*w*h);
+            evas_object_image_data_update_add(de->doodle, 0, 0, w, h);
+        }
+    }
+}
+
+static void _on_eraser_up(void *data, Evas *e, Evas_Object *evas_obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    if (de->h_ss!= NULL) { /* destroy stroke  size selector */
+        _stroke_size_selector_del(de);
+    }
+    if (de->h_cs != NULL) { /* destroy stroke color selector */
+        _stroke_color_selector_del(de);
+    }
+    de->erase = !(de->erase);
+    Evas_Object *eo = (Evas_Object *)elm_object_part_content_get(de->toolbar, "elm.swallow.btn3");
+    memo_tool_btn_focus_set(eo, de->erase);
+    edje_object_signal_emit(elm_layout_edje_get(de->body_main), "expand", "elm");
+}
+
+static void _on_yes(void *data, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    _save_record(de);
+    de->cb(de->data, "text", NULL);
+}
+
+static void _on_no(void *data, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    de->cb(de->data, "text", NULL);
+}
+
+static void _on_text_mode(void *data, Evas_Object *obj, void *event_info)
+{
+    doodle_editor_t *de = (doodle_editor_t *)data;
+    if (de->savable) { /* modified, need user confirmation */
+        memo_create_yes_no_popup(de->parent, MEMO_I18N_SAVE_MEMO, _on_yes, _on_no, de);
+    } else {
+        de->cb(de->data, "text", NULL);
+    }
+}
+
+static void _create_doodle_editor_layout(doodle_editor_t *de, service_h service)
+{
+    de->body_main = elm_layout_create(de->parent, EDJ_FILE, "doodle_editor");
+    de->cb(de->data, "layout", de->body_main);
+    /* title */
+    de->cb(de->data, "title", de->record->id==-1 ? MEMO_I18N_NEW_DRAWING : MEMO_I18N_EDIT_DRAWING);
+    /* date */
+    memo_time_format(de->buf, MEMO_BUFFER_SIZE, de->record->modi_time);
+    edje_object_part_text_set(elm_layout_edje_get(de->body_main), "elm.text.date", de->buf);
+
+    /* toolbar */
+    de->toolbar = elm_swallowed_layout(de->body_main, "elm.swallow.toolbar", EDJ_FILE, "edit_toolbar");
+    de->btn_size = elm_swallowed_layout(de->toolbar, "elm.swallow.btn1", EDJ_DIR"/black/memo.edj", "tl_stroke_size");
+    evas_object_event_callback_add(de->btn_size, EVAS_CALLBACK_MOUSE_UP, _on_stroke_size_btn_up, de);
+    de->btn_color = elm_swallowed_layout(de->toolbar, "elm.swallow.btn2", EDJ_DIR"/black/memo.edj", "tl_stroke_color");
+    evas_object_event_callback_add(de->btn_color, EVAS_CALLBACK_MOUSE_UP, _on_stroke_color_btn_up, de);
+    Evas_Object *eo = elm_swallowed_layout(de->toolbar, "elm.swallow.btn3", EDJ_DIR"/black/memo.edj", "tl_stroke_eraser");
+    evas_object_event_callback_add(eo, EVAS_CALLBACK_MOUSE_UP, _on_eraser_up, de);
+    if (!service_key_check(service, "toggle", "disable")) {
+        elm_swallowed_button(de->toolbar, "elm.swallow.btn4", MEMO_I18N_TEXT, _on_text_mode, de);
+    }
+
+    /* doodle */
+    Evas *evas = evas_object_evas_get(de->parent);
+    de->doodle = evas_object_image_filled_add(evas);
+    evas_object_image_colorspace_set(de->doodle, EVAS_COLORSPACE_ARGB8888);
+    evas_object_image_alpha_set(de->doodle, 1);
+    /* doodle data */
+    if (de->record->has_doodle == 1) {
+        snprintf(de->buf, MEMO_BUFFER_SIZE, DOODLEDIR "/%d.png", (int)de->record->id);
+        evas_object_image_file_set(de->doodle, de->buf, NULL);
+    } else {
+        evas_object_render_flush_hook(de->doodle, _on_doodle_resize_cb, de);
+    }
+    evas_object_event_callback_add(de->doodle, EVAS_CALLBACK_MOUSE_DOWN, _on_doodle_down_cb, de);
+    evas_object_event_callback_add(de->doodle, EVAS_CALLBACK_MOUSE_MOVE, _on_doodle_move_cb, de);
+    evas_object_event_callback_add(de->doodle, EVAS_CALLBACK_MOUSE_UP, _on_doodle_up_cb, de);
+    evas_object_show(de->doodle);
+    elm_object_part_content_set(de->body_main, "elm.swallow.doodle", de->doodle);
+
+    /* comment */
+    eo = elm_swallowed_layout(de->body_main, "elm.swallow.comment", EDJ_FILE, "doodle_comment");
+    //EditField
+    Evas_Object *layout = elm_layout_add(eo);
+    elm_layout_theme_set(layout, "layout", "editfield", "default");
+    elm_object_part_content_set(eo, "elm.swallow.editfield", layout);
+    Evas_Object *ef = elm_entry_add(eo);
+    elm_object_part_content_set(layout, "elm.swallow.content", ef);
+    de->edit_field = layout;
+
+    elm_object_style_set(ef, "font_color_black");
+    elm_entry_single_line_set(ef, EINA_TRUE);
+    elm_entry_scrollable_set(ef, EINA_TRUE);
+    evas_object_size_hint_weight_set(ef, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(ef, EVAS_HINT_EXPAND, 0.5);
+
+    de->entry = ef;
+    elm_entry_cnp_mode_set(de->entry, ELM_CNP_MODE_PLAINTEXT);
+    de->imf_context = elm_entry_imf_context_get(de->entry);
+    /* if not hide explicitly, seems hide event of sweep down can not be received */
+    ecore_imf_context_input_panel_hide(de->imf_context);
+    elm_entry_entry_set(de->entry, de->record->comment == NULL ? MEMO_I18N_ADD_COMMENT : de->record->comment);
+    ecore_imf_context_input_panel_event_callback_add(de->imf_context, ECORE_IMF_INPUT_PANEL_STATE_EVENT,
+        _input_panel_event_callback, de);
+    evas_object_smart_callback_add(de->entry, "changed", _on_entry_content_change, de);
+    evas_object_smart_callback_add(de->entry, "preedit,changed", _on_entry_content_change, de);
+    evas_object_smart_callback_add(de->entry, "focused", _focused_cb, layout);
+    evas_object_smart_callback_add(de->entry, "unfocused", _unfocused_cb, layout);
+    elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm", _eraser_clicked_cb, de->entry);
+
+    /* savable */
+    de->cb(de->data, "savable", (void *)(de->savable?1:0));
+}
+
+void memo_doodle_editor_time_format_update(void *h_de)
+{
+    doodle_editor_t *de = (doodle_editor_t *)h_de;
+    memo_time_format(de->buf, MEMO_BUFFER_SIZE, de->record->modi_time);
+    edje_object_part_text_set(elm_layout_edje_get(de->body_main), "elm.text.date", de->buf);
+}
+
+void memo_doodle_editor_cancel(void *h_de)
+{
+    doodle_editor_t *de = (doodle_editor_t *)h_de;
+    if (de->comment) {
+        de->comment = EINA_FALSE;
+        ecore_imf_context_input_panel_hide(de->imf_context);
+        edje_object_signal_emit(elm_layout_edje_get(de->body_main), "expand", "elm");
+        if (de->record->comment == NULL) {
+            elm_entry_entry_set(de->entry, MEMO_I18N_ADD_COMMENT);
+        } else { /* recover origin comment */
+            elm_entry_entry_set(de->entry, de->record->comment);
+        }
+        de->cb(de->data, "title", de->record->id==-1 ? MEMO_I18N_NEW_DRAWING : MEMO_I18N_EDIT_DRAWING);
+        de->cb(de->data, "savable", (void *)(de->savable?1:0));
+        de->cb(de->data, "comment cancel", NULL);
+    } else {
+        if (!de->savable) { /* not modified, return directly */
+            de->cb(de->data, "cancel", NULL);
+        } else {
+            _launch_yes_no_popup(de);
+        }
+    }
+}
+
+void memo_doodle_editor_save(void *h_de)
+{
+    doodle_editor_t *de = (doodle_editor_t *)h_de;
+    if (de->comment) {
+        de->comment = EINA_FALSE;
+        ecore_imf_context_input_panel_hide(de->imf_context);
+        edje_object_signal_emit(elm_layout_edje_get(de->body_main), "expand", "elm");
+        Eina_Bool savable = _comment_savable(de);
+        if (savable) {
+            de->record->comment = strdup(elm_entry_entry_get(de->entry));
+            if (de->record->id != -1) { /* when edit existing, modification of comment will make record savable */
+                de->savable = EINA_TRUE;
+            }
+        }
+        de->cb(de->data, "title", de->record->id==-1 ? MEMO_I18N_NEW_DRAWING : MEMO_I18N_EDIT_DRAWING);
+        de->cb(de->data, "savable", (void *)(de->savable?1:0));
+        elm_object_focus_set(de->edit_field, EINA_FALSE); /* when disable done button, focus may reset to edit field */
+        de->cb(de->data, "comment done", NULL);
+    } else {
+        _save_record(de);
+        de->cb(de->data, "save", NULL);
+    }
+}
+
+void *memo_load_doodle_editor(Evas_Object *win, Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data)
+{
+    doodle_editor_t *de = SMALLOC(doodle_editor_t);
+    RETVIF(de==NULL, NULL);
+    service_dump(service);
+    de->win = win;
+    de->parent = parent;
+    de->cb = (cb==NULL ? memo_com_dummy_cb : cb); /* make sure cb is not null, no need to check legitimacy of cb when call */
+    de->data = data;
+
+    /* init */
+    const char *s = NULL;
+    service_get_extra_data(service, "index", &s);
+    if (s == NULL) {
+        de->record = memo_create_data();
+        de->record->id = -1;
+        de->record->modi_time = time((time_t *) 0);
+    } else {        /* load item */
+        de->record = memo_get_data(atoi(s));
+       SFREE(s);
+    }
+    de->stroke_size = 8;
+    de->stroke_color = 0xff000000;
+
+    _create_doodle_editor_layout(de, service);
+    return (void *)de;
+}
+
+void memo_destroy_doodle_editor(void *h_de)
+{
+    doodle_editor_t *de = (doodle_editor_t *)h_de;
+    if (de->h_ss!= NULL) { /* destroy stroke  size selector */
+        _stroke_size_selector_del(de);
+    }
+    if (de->h_cs != NULL) { /* destroy stroke color selector */
+        _stroke_color_selector_del(de);
+    }
+    memo_free_data(de->record);
+    evas_object_del(de->body_main);
+    SFREE(de);
+}
diff --git a/src/memo_text_editor.c b/src/memo_text_editor.c
new file mode 100644 (file)
index 0000000..fa4172c
--- /dev/null
@@ -0,0 +1,420 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <appcore-efl.h>
+#include <Elementary.h>
+#include <dlog.h>
+#include <gravel.h>
+#include <vconf-keys.h>
+#include <extended-elm.h>
+#include <supplement.h>
+#include <memo-assist.h>
+#include <memo_string.h>
+
+typedef struct __text_editor_t {
+    Evas_Object *win;
+    Evas_Object *parent;
+    Memo_Component_Callback cb;
+    void *data;
+    memo_data_t *record;
+    char buf[MEMO_BUFFER_SIZE]; /* for temporarily usage only */
+    Eina_Bool savable;
+
+    /* content */
+    Evas_Object *body_main;
+    Evas_Object *toolbar;
+    Evas_Object *btn_size;
+    void *h_fss;
+    Evas_Object *btn_color;
+    void *h_fcs;
+
+    /* entry */
+    Evas_Object *entry;
+    Ecore_IMF_Context *imf_context;
+    Elm_Entry_Filter_Limit_Size limit_filter_data;
+
+    /* original font information */
+    int init_fsize;
+    int init_fcolor;
+} text_editor_t;
+
+static void _font_size_selector_del(text_editor_t *te);
+static void _font_color_selector_del(text_editor_t *te);
+service_h text_service = NULL;
+static void _save_record(text_editor_t *te)
+{
+    if (te->record->content != NULL) {
+        SFREE(te->record->content);
+    }
+
+    /* content will be freed automatically in memo_free_data when editor destoried */
+    te->record->content = elm_entry_markup_to_utf8(elm_entry_entry_get(te->entry));
+    /* records synced from KIES has no font info, apply font enforce policy here to overwrite default font info */
+    te->record->font_respect = 1;
+    if (te->record->id != -1) {
+        memo_mod_data(te->record);
+    } else {
+        memo_add_data(te->record);
+    }
+}
+
+static void _on_save_yes(void *data, Evas_Object *obj, void *event_info)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    _save_record(te);
+    te->cb(te->data, "save", NULL);
+}
+
+static void _on_save_no(void *data, Evas_Object *obj, void *event_info)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    te->cb(te->data, "cancel", NULL);
+}
+
+static Eina_Bool _launch_yes_no_popup(void *data)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    memo_create_yes_no_popup(te->win, MEMO_I18N_SAVE_MEMO, _on_save_yes, _on_save_no, te);
+    return EINA_FALSE;
+}
+
+static void _entry_content_update(text_editor_t *te)
+{
+    unsigned char *color = (unsigned char *)&te->record->font_color;
+    char *content = elm_entry_markup_to_utf8(elm_entry_entry_get(te->entry));
+    char *markup = elm_entry_utf8_to_markup(content);
+    snprintf(te->buf, MEMO_BUFFER_SIZE,
+         "<font_size=%d><color=#%02x%02x%02x>", te->record->font_size, color[2], color[1],
+         color[0]);
+    elm_entry_entry_set(te->entry, te->buf);
+    elm_entry_entry_insert(te->entry, markup);
+    SFREE(content);
+    SFREE(markup);
+}
+
+static void _font_size_selector_callback(void *data, const char *msg, void *event)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    if (strcmp(msg, "layout") == 0) {
+        elm_object_part_content_set(te->body_main, "elm.swallow.tool", (Evas_Object *)event);
+    } else if (strcmp(msg, "change") == 0) {
+        te->record->font_size = (int)event;
+        _entry_content_update(te);
+    } else if (strcmp(msg, "flick,down") == 0) {
+        _font_size_selector_del(te);
+        edje_object_signal_emit(elm_layout_edje_get(te->body_main), "expand", "elm");
+    }
+}
+
+static void _font_size_selector_del(text_editor_t *te)
+{
+    if (te->h_fss != NULL) {
+        elm_object_part_content_unset(te->body_main, "elm.swallow.tool");
+        memo_del_font_size_selector(te->h_fss);
+        te->h_fss = NULL;
+        memo_tool_btn_focus_set(te->btn_size, EINA_FALSE);
+    }
+}
+
+static void _on_font_size_btn_up(void *data, Evas *e, Evas_Object *evas_obj, void *event_info)
+{
+       text_editor_t *te = (text_editor_t *)data;
+       if (te->h_fss != NULL) { /* font size selector already open */
+               return;
+       }
+       if (te->h_fcs != NULL) { /* destroy font color selector */
+               _font_color_selector_del(te);
+       }
+       /* load font size selector */
+       service_h service = NULL;
+       service_create(&service);
+       snprintf(te->buf, MEMO_BUFFER_SIZE, "%d", te->record->font_size);
+       service_add_extra_data(service, "current", te->buf);
+       snprintf(te->buf, MEMO_BUFFER_SIZE, "%d", 0xFFFFFFFF);
+       service_add_extra_data(service, "bg_color", te->buf);
+       te->h_fss = memo_load_font_size_selector(te->body_main, service, _font_size_selector_callback, te);
+       service_destroy(service);
+       memo_tool_btn_focus_set(te->btn_size, EINA_TRUE);
+       edje_object_signal_emit(elm_layout_edje_get(te->body_main), "abbrev", "elm");
+       /* hide input panel */
+       ecore_imf_context_input_panel_hide(te->imf_context);
+}
+
+void _font_color_selector_callback(void *data, const char *msg, void *event)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    if (strcmp(msg, "layout") == 0) {
+        elm_object_part_content_set(te->body_main, "elm.swallow.tool", (Evas_Object *)event);
+    } else if (strcmp(msg, "change") == 0) {
+        LOGD("%s : %x\n", msg, (int)event);
+        te->record->font_color = (int)event;
+        _entry_content_update(te);
+    } else if (strcmp(msg, "flick,down") == 0) {
+        _font_color_selector_del(te);
+        edje_object_signal_emit(elm_layout_edje_get(te->body_main), "expand", "elm");
+    }
+}
+
+static void _font_color_selector_del(text_editor_t *te)
+{
+    if (te->h_fcs != NULL) {
+        elm_object_part_content_unset(te->body_main, "elm.swallow.tool");
+        memo_del_color_selector(te->h_fcs);
+        memo_tool_btn_focus_set(te->btn_color, EINA_FALSE);
+        te->h_fcs = NULL;
+    }
+}
+
+static void _on_font_color_btn_up(void *data, Evas *e, Evas_Object *evas_obj, void *event_info)
+{
+       text_editor_t *te = (text_editor_t *)data;
+       if (te->h_fcs!= NULL) { /* font color selector already open */
+               return;
+       }
+       if (te->h_fss!= NULL) { /* destroy font  size selector */
+               _font_size_selector_del(te);
+       }
+       /* load font color selector */
+       service_h service = NULL;
+       service_create(&service);
+       snprintf(te->buf, MEMO_BUFFER_SIZE, "%d", te->record->font_color);
+       service_add_extra_data(service, "color", te->buf);
+       snprintf(te->buf, MEMO_BUFFER_SIZE, "%d", 0xFFFFFFFF);
+       service_add_extra_data(service, "bg_color", te->buf);
+       te->h_fcs = memo_load_color_selector(te->body_main, service, _font_color_selector_callback, te);
+       service_destroy(service);
+       memo_tool_btn_focus_set(te->btn_color, EINA_TRUE);
+       edje_object_signal_emit(elm_layout_edje_get(te->body_main), "abbrev", "elm");
+       /* hide input panel */
+       ecore_imf_context_input_panel_hide(te->imf_context);
+}
+
+static void _input_panel_event_callback(void *data, Ecore_IMF_Context *ctx, int value)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    if (value == ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
+        if ((te->h_fss==NULL) && (te->h_fcs==NULL)) { /* hide by sweep donw */
+            edje_object_signal_emit(elm_layout_edje_get(te->body_main), "expand", "elm");
+        }
+    } else if (value == ECORE_IMF_INPUT_PANEL_STATE_SHOW) {
+        edje_object_signal_emit(elm_layout_edje_get(te->body_main), "abbrev", "elm");
+    }
+}
+
+static void _on_entry_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    if (te->h_fss!= NULL) { /* destroy font  size selector */
+        _font_size_selector_del(te);
+    }
+    if (te->h_fcs != NULL) { /* destroy font color selector */
+        _font_color_selector_del(te);
+    }
+}
+
+static void _on_entry_content_change(void *data, Evas_Object *obj, void *event_info)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    unsigned char *color = (unsigned char *)&te->record->font_color;
+
+    const char *text = elm_entry_entry_get(te->entry);
+    char *content = elm_entry_markup_to_utf8(text);
+    te->savable = EINA_TRUE;
+    if (strcmp(content, "") == 0) {
+        te->savable = EINA_FALSE;
+    } else if (te->record->content != NULL) { /* check if same as init string */
+        if ((te->init_fsize==te->record->font_size)
+            && (te->init_fcolor==te->record->font_color)
+            && (strcmp(te->record->content, content)==0)) {
+            te->savable = EINA_FALSE;
+        }
+    }
+    te->cb(te->data, "savable", (void *)(te->savable?1:0));
+
+    /* after paste/cut, the font size/color information may be cleared */
+    snprintf(te->buf, MEMO_BUFFER_SIZE, "<font_size=%d><color=#%02x%02x%02x>",
+        te->record->font_size, color[2], color[1], color[0]);
+    if (text[0] == '\0') { /* no content */
+        elm_entry_entry_insert(te->entry, te->buf);
+    } else if (text[0] != '<') { /* insert font information */
+        elm_entry_cursor_begin_set(te->entry);
+        elm_entry_entry_insert(te->entry, te->buf);
+        elm_entry_cursor_end_set(te->entry);
+    }
+    SFREE(content);
+}
+
+static void _on_yes(void *data, Evas_Object *obj, void *event_info)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    _save_record(te);
+    te->cb(te->data, "drawing", NULL);
+}
+
+static void _on_no(void *data, Evas_Object *obj, void *event_info)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    te->cb(te->data, "drawing", NULL);
+}
+
+static void _on_drawing_mode(void *data, Evas_Object *obj, void *event_info)
+{
+    text_editor_t *te = (text_editor_t *)data;
+    if (te->savable) { /* modified, need user confirmation */
+        memo_create_yes_no_popup(te->parent, MEMO_I18N_SAVE_MEMO, _on_yes, _on_no, te);
+    } else {
+        te->cb(te->data, "drawing", NULL);
+    }
+}
+
+static void _create_text_editor_layout(text_editor_t *te, service_h service)
+{
+    te->body_main = elm_layout_create(te->parent, EDJ_FILE, "text_editor");
+    te->cb(te->data, "layout", te->body_main);
+    /* title */
+    te->cb(te->data, "title", te->record->id==-1 ? MEMO_I18N_NEW_NOTE : MEMO_I18N_EDIT_NOTE);
+    /* date */
+    memo_time_format(te->buf, MEMO_BUFFER_SIZE, te->record->modi_time);
+    edje_object_part_text_set(elm_layout_edje_get(te->body_main), "elm.text.date", te->buf);
+    /* toolbar */
+    te->toolbar = elm_swallowed_layout(te->body_main, "elm.swallow.toolbar", EDJ_FILE, "edit_toolbar");
+    te->btn_size = elm_swallowed_layout(te->toolbar, "elm.swallow.btn1", EDJ_DIR"/white/memo.edj", "tl_font_size");
+    evas_object_event_callback_add(te->btn_size, EVAS_CALLBACK_MOUSE_UP, _on_font_size_btn_up, te);
+    te->btn_color = elm_swallowed_layout(te->toolbar, "elm.swallow.btn2", EDJ_DIR"/white/memo.edj", "tl_font_color");
+    evas_object_event_callback_add(te->btn_color, EVAS_CALLBACK_MOUSE_UP, _on_font_color_btn_up, te);
+    if (!service_key_check(service, "toggle", "disable")) {
+        elm_swallowed_button(te->toolbar, "elm.swallow.btn4", MEMO_I18N_DRAWING, _on_drawing_mode, te);
+    }
+    /* entry */
+    Evas_Object *sc = elm_swallowed_scroller(te->body_main, "elm.swallow.text");
+    unsigned char *color = (unsigned char *)&te->record->font_color;
+    snprintf(te->buf, MEMO_BUFFER_SIZE, "<font_size=%d><color=#%02x%02x%02x>",
+        te->record->font_size, color[2], color[1], color[0]);
+    te->entry = elm_entry_create(te->body_main, te->buf);
+    elm_entry_input_panel_enabled_set(te->entry, EINA_TRUE);
+    evas_object_size_hint_align_set(te->entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
+    evas_object_size_hint_weight_set(te->entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    elm_entry_autocapital_type_set(te->entry, ELM_AUTOCAPITAL_TYPE_SENTENCE);
+    elm_object_content_set(sc, te->entry);
+    evas_object_smart_callback_add(te->entry, "changed", _on_entry_content_change, te);
+    evas_object_smart_callback_add(te->entry, "preedit,changed", _on_entry_content_change, te);
+    evas_object_smart_callback_add(te->entry, "clicked", _on_entry_clicked, te);
+    /* limit size */
+    elm_entry_markup_filter_append(te->entry, elm_entry_filter_limit_size, &te->limit_filter_data);
+    /* entry content */
+    if (te->record->content != NULL) {
+        char *content = elm_entry_utf8_to_markup(te->record->content);
+        elm_entry_entry_insert(te->entry, content);
+        SFREE(content);
+    } else { /* set init string */
+        char *str = NULL;
+       service_get_extra_data(service, "init_str", &str);
+        if (str != NULL) {
+            elm_entry_entry_insert(te->entry, str);
+           SFREE(str);
+        }
+    }
+    elm_object_focus_set(te->entry, EINA_TRUE);
+    /* imf context */
+    te->imf_context = elm_entry_imf_context_get(te->entry);
+    ecore_imf_context_input_panel_event_callback_add(te->imf_context,
+        ECORE_IMF_INPUT_PANEL_STATE_EVENT, _input_panel_event_callback, te);
+    /* savable */
+    te->cb(te->data, "savable", (void *)(te->savable?1:0));
+}
+
+void memo_text_editor_time_format_update(void *h_te)
+{
+    text_editor_t *te = (text_editor_t *)h_te;
+    memo_time_format(te->buf, MEMO_BUFFER_SIZE, te->record->modi_time);
+    edje_object_part_text_set(elm_layout_edje_get(te->body_main), "elm.text.date", te->buf);
+}
+
+void memo_text_editor_cancel(void *h_te)
+{
+    text_editor_t *te = (text_editor_t *)h_te;
+    if (!te->savable) { /* not modified, return directly */
+        te->cb(te->data, "cancel", NULL);
+    } else {
+        /* hide imf, otherwise popup will be covered by imf */
+        if (te->imf_context != NULL) {
+            ecore_imf_context_input_panel_hide(te->imf_context);
+        }
+        _launch_yes_no_popup(te);
+    }
+}
+void memo_text_editor_save(void *h_te)
+{
+       text_editor_t *te = (text_editor_t *)h_te;
+       service_create(&text_service);
+       service_add_extra_data(text_service, "ug_text", te->data);
+       _save_record(te);
+       te->cb(te->data, "save", NULL);
+}
+
+void *memo_load_text_editor(Evas_Object *win, Evas_Object *parent, service_h service, Memo_Component_Callback cb, void *data)
+{
+    text_editor_t *te = SMALLOC(text_editor_t);
+    RETVIF(te==NULL, NULL);
+    service_dump(service);
+    te->win = win;
+    te->parent = parent;
+    te->cb = (cb==NULL ? memo_com_dummy_cb : cb); /* make sure cb is not null, no need to check legitimacy of cb when call */
+    te->data = data;
+
+    /* init */
+    const char *s = NULL;
+    service_get_extra_data(service, "index", &s);
+    if (s == NULL) {
+        te->record = memo_create_data();
+        te->record->id = -1;
+        te->record->modi_time = time((time_t *) 0);
+        te->record->font_size = 44;
+        te->record->font_color = 0xff000000;
+    } else {        /* load item */
+        te->record = memo_get_data(atoi(s));
+       SFREE(s);
+    }
+    te->init_fsize = te->record->font_size;
+    te->init_fcolor = te->record->font_color;
+    /* limitation */
+    te->limit_filter_data.max_char_count = 0;
+    te->limit_filter_data.max_byte_count = 1000;
+
+    _create_text_editor_layout(te, service);
+    return (void *)te;
+}
+
+void memo_destroy_text_editor(void *h_te)
+{
+    text_editor_t *te = (text_editor_t *)h_te;
+    ecore_imf_context_input_panel_event_callback_del(te->imf_context,
+        ECORE_IMF_INPUT_PANEL_STATE_EVENT, _input_panel_event_callback);
+    ecore_imf_context_input_panel_hide(te->imf_context);
+    if (te->h_fss!= NULL) { /* destroy font  size selector */
+        _font_size_selector_del(te);
+    }
+    if (te->h_fcs != NULL) { /* destroy font color selector */
+        _font_color_selector_del(te);
+    }
+    memo_free_data(te->record);
+    evas_object_del(te->body_main);
+    SFREE(te);
+}
index ed1b8d1..31fc2ca 100644 (file)
@@ -1,19 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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>
@@ -21,7 +22,7 @@
 #include <memo-db.h>
 #include "memo_ug.h"
 
-static void _ug_layout_cb(struct ui_gadget *ug, enum ug_mode mode, void *priv)
+static void _ug_layout_cb(ui_gadget_h ug, enum ug_mode mode, void *priv)
 {
     Evas_Object *base, *win;
     base = (Evas_Object *)ug_get_layout(ug);
@@ -43,12 +44,12 @@ static void _ug_layout_cb(struct ui_gadget *ug, enum ug_mode mode, void *priv)
     }
 }
 
-static void _ug_result_cb(ui_gadget_t *ug, bundle *result, void *priv)
+static void _ug_result_cb(ui_gadget_h ug, service_h service, void *priv)
 {
-    bundle_dump(result);
+    service_dump(service);
 }
 
-static void _ug_destroy_cb(struct ui_gadget *ug, void *priv)
+static void _ug_destroy_cb(ui_gadget_h ug, void *priv)
 {
     if (ug != NULL) {
         ug_destroy(ug);
@@ -61,11 +62,11 @@ static void _ug_destroy_cb(struct ui_gadget *ug, void *priv)
  * @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]   service         a service type which will send to ug directly
  * @param[in]   ug_name    UG name marco defined in memo_ug.h
  * @return      void
  */
-void ug_launch_common(bundle *bd, char *ug_name)
+void ug_launch_common(service_h service, char *ug_name)
 {
     ug_cbs_t cbs={0, };
 
@@ -74,8 +75,8 @@ void ug_launch_common(bundle *bd, char *ug_name)
     cbs.result_cb = _ug_result_cb;
     cbs.priv = NULL;
 
-    ug_create(NULL, ug_name, UG_MODE_FULLVIEW, bd, &cbs);
-    bundle_free(bd);
+    ug_create(NULL, ug_name, UG_MODE_FULLVIEW, service, &cbs);
+    service_destroy(service);
 }
 
 /**
@@ -94,23 +95,24 @@ void ug_launch_common(bundle *bd, char *ug_name)
  */
 void ug_launch_common_var(char *ug_name, ...)
 {
-    char *key = NULL;
-    char *val = NULL;
-    bundle *bd = bundle_create();
+       char *key = NULL;
+       char *val = NULL;
+       service_h service = NULL;
+       service_create(&service);
 
-    va_list ap;
-    va_start(ap, ug_name);
-    while (1) {
-        key = va_arg(ap, char *);
-        val = va_arg(ap, char *);
+       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);
+               if (key == NULL || val == NULL) {
+                       break;
+               }
+               service_add_extra_data(service, key, val);
+       }
+       va_end(ap);
 
-    ug_launch_common(bd, ug_name);
+       ug_launch_common(service, ug_name);
 }
 
index 234c47b..a9439f4 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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>
@@ -27,6 +29,7 @@
 #include <memo-genlist.h>
 #include <memo-assist.h>
 #include <memo_ug.h>
+#include <memo_autolink.h>
 #include <memo-efl.h>
 
 typedef struct __detail_view_t {
@@ -74,26 +77,34 @@ static void _create_detail_layout(detail_view_t *dv)
         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);
+            snprintf(ugd->buf, MEMO_BUFFER_SIZE, "/opt/apps/org.tizen.memo/data/doodle/%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");
+            GString *text =
+                autolink_add_anchor(elm_entry_utf8_to_markup
+                        (md->content));
             unsigned char *color = (unsigned char *)&md->font_color;
             snprintf(buf, MEMO_BUFFER_SIZE,
                 "<font_size=%d><color=#%02x%02x%02x>",
                 md->font_size, color[2], color[1], color[0]);
-            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));
+            g_string_prepend(text, buf);
+
+            Evas_Object *sc = NULL;
+            sc = elm_swallowed_scroller(dv->body_main, "elm.swallow.content");
+            content = elm_entry_create(dv->body_main, text->str);
+            dv->content = strdup(text->str);
+            evas_object_smart_callback_add(content, "anchor,clicked", autolink_anchor_clicked_cb, ug_get_parent_layout(ugd->ug));
             evas_object_size_hint_weight_set(content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
             evas_object_size_hint_align_set(content, EVAS_HINT_FILL, EVAS_HINT_EXPAND);
             elm_entry_editable_set(content, EINA_FALSE);
-           elm_entry_autocapital_type_set(content, ELM_AUTOCAPITAL_TYPE_SENTENCE);
+            elm_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);
+
+            g_string_free(text, TRUE);
+
             edje_object_signal_emit(_EDJ(dv->body_main), "sig_text_mode", "");
         }
         memo_free_data(md);
@@ -106,17 +117,18 @@ static void _create_detail_layout(detail_view_t *dv)
     elm_object_item_part_content_set(navi_it, "controlbar", ctrl_bar);
 }
 
-void *memo_load_detail_view(ug_data_t *ugd, bundle *data)
+void *memo_load_detail_view(ug_data_t *ugd, service_h service)
 {
     detail_view_t *dv = SMALLOC(detail_view_t);
     RETVIF(dv == NULL, NULL);
     dv->ugd = ugd;
 
     /* init */
-    const char *str;
-    str = bundle_get_val(data, "index");
+    char *str = NULL;;
+    service_get_extra_data(service, "index", &str);
     if (str != NULL) {
         dv->index = atoi(str);
+       SFREE(str);
     } else {
         SFREE(dv);
         return NULL;
index fdef4b5..1d083cc 100644 (file)
@@ -1,18 +1,20 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  * 
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  * 
-  *     http://www.tizenopensource.org/license
-  * 
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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>
@@ -43,6 +45,8 @@ typedef struct __select_view_t {
     int total;
     Evas_Object *selectioninfo;
     Evas_Object *selectioninfo_layout;
+
+    Eina_Bool is_textonly;
 } select_view_t;
 
 static void memo_data_iterate_cb (memo_data_t *md, void *user_data);
@@ -70,7 +74,7 @@ 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;
+    service_h service = NULL;
     Elm_Object_Item *it;
     gl_data_t *gld = NULL;
     int c_text = 0;
@@ -78,7 +82,7 @@ static void _on_add(void *data, Evas_Object *obj, void *event_info)
     char path[MEMO_BUFFER_SIZE] = {0};
     memo_data_t *md = NULL;
 
-    b = bundle_create();
+    service_create(&service);
     it = elm_genlist_first_item_get(sv->genlist);
     while (it != NULL) {
         gld = (gl_data_t *)elm_object_item_data_get(it);
@@ -87,12 +91,12 @@ static void _on_add(void *data, Evas_Object *obj, void *event_info)
             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);
+                snprintf(path, MEMO_BUFFER_SIZE, "/opt/apps/org.tizen.memo/data/doodle/%d.png", gld->index);
+                service_add_extra_data(service, ugd->buf, path);
             } else {
                 c_text++;
                 snprintf(ugd->buf, MEMO_BUFFER_SIZE, "text%d", c_text);
-                bundle_add(b, ugd->buf, md->content);
+                service_add_extra_data(service, ugd->buf, md->content);
             }
         }
         memo_free_data(md);
@@ -100,12 +104,12 @@ static void _on_add(void *data, Evas_Object *obj, void *event_info)
     }
 
     snprintf(ugd->buf, MEMO_BUFFER_SIZE, "%d", c_image);
-    bundle_add(b, "image", ugd->buf);
+    service_add_extra_data(service, "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);
+    service_add_extra_data(service, "text", ugd->buf);
+    ug_send_result(ugd->ug, service);
+    service_dump(service);
+    service_destroy(service);
     memo_unsubscribe_change(_on_data_update);
     ug_destroy_me(ugd->ug);
 }
@@ -166,13 +170,16 @@ static void memo_data_iterate_cb (memo_data_t *md, void *user_data)
     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);
+        if (!sv->is_textonly) {
+            elm_genlist_item_append(sv->genlist, &sv->itc_draw,(void *)gld,
+                NULL, ELM_GENLIST_ITEM_NONE, _on_item_select_cb, NULL);
+            sv->total++;
+        }
     } else {
         elm_genlist_item_append(sv->genlist, &sv->itc,(void *)gld,
             NULL, ELM_GENLIST_ITEM_NONE, _on_item_select_cb, NULL);
+        sv->total++;
     }
-    sv->total++;
 }
 
 static void _create_select_layout(select_view_t *sv)
@@ -204,11 +211,12 @@ static void _create_select_layout(select_view_t *sv)
     elm_object_item_disabled_set(sv->r_btn, EINA_TRUE); /* disable add defaultly */
 }
 
-void *memo_load_select_view(ug_data_t *ugd, bundle *data)
+void *memo_load_select_view(ug_data_t *ugd, service_h service)
 {
     select_view_t *sv = SMALLOC(select_view_t);
     RETVIF(sv == NULL, NULL);
     sv->ugd = ugd;
+    sv->is_textonly = service_key_check(service, "type", "textonly");
 
     /* date update hooker */
     memo_subscribe_change(_on_data_update, sv);
diff --git a/theme/CMakeLists.txt b/theme/CMakeLists.txt
new file mode 100644 (file)
index 0000000..990eec3
--- /dev/null
@@ -0,0 +1,18 @@
+SET(THFILES white black)
+
+FOREACH(thfile ${THFILES})
+       SET(src ${CMAKE_CURRENT_SOURCE_DIR}/${thfile}/memo.edc)
+       SET(obj ${CMAKE_CURRENT_BINARY_DIR}/${thfile}.edj)
+       MESSAGE("THEME: ${thfile}")
+       ADD_CUSTOM_COMMAND(
+               OUTPUT ${obj}
+               COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/${thfile}/images
+               ${src} ${obj} DEPENDS ${src}
+       )
+       INSTALL(FILES ${obj}
+                       DESTINATION ${EDJDIR}/${thfile} RENAME memo.edj)
+       SET(edjFiles ${edjFiles} ${obj})
+ENDFOREACH(thfile)
+
+MESSAGE(".edj files: ${edjFiles}")
+ADD_CUSTOM_TARGET(th ALL DEPENDS ${edjFiles})
diff --git a/theme/black/images/00_picker_btn_normal.png b/theme/black/images/00_picker_btn_normal.png
new file mode 100644 (file)
index 0000000..9dc73c4
Binary files /dev/null and b/theme/black/images/00_picker_btn_normal.png differ
diff --git a/theme/black/images/00_picker_btn_press.png b/theme/black/images/00_picker_btn_press.png
new file mode 100644 (file)
index 0000000..f65239f
Binary files /dev/null and b/theme/black/images/00_picker_btn_press.png differ
diff --git a/theme/black/images/P02_icon_color.png b/theme/black/images/P02_icon_color.png
new file mode 100644 (file)
index 0000000..8394206
Binary files /dev/null and b/theme/black/images/P02_icon_color.png differ
diff --git a/theme/black/images/P02_icon_color_focus.png b/theme/black/images/P02_icon_color_focus.png
new file mode 100644 (file)
index 0000000..8394206
Binary files /dev/null and b/theme/black/images/P02_icon_color_focus.png differ
diff --git a/theme/black/images/P02_icon_eraser.png b/theme/black/images/P02_icon_eraser.png
new file mode 100644 (file)
index 0000000..0cab038
Binary files /dev/null and b/theme/black/images/P02_icon_eraser.png differ
diff --git a/theme/black/images/P02_icon_eraser_press.png b/theme/black/images/P02_icon_eraser_press.png
new file mode 100644 (file)
index 0000000..0cab038
Binary files /dev/null and b/theme/black/images/P02_icon_eraser_press.png differ
diff --git a/theme/black/images/P02_icon_font_color.png b/theme/black/images/P02_icon_font_color.png
new file mode 100644 (file)
index 0000000..a2bd5b4
Binary files /dev/null and b/theme/black/images/P02_icon_font_color.png differ
diff --git a/theme/black/images/P02_icon_font_color_press.png b/theme/black/images/P02_icon_font_color_press.png
new file mode 100644 (file)
index 0000000..a2bd5b4
Binary files /dev/null and b/theme/black/images/P02_icon_font_color_press.png differ
diff --git a/theme/black/images/P02_icon_font_size.png b/theme/black/images/P02_icon_font_size.png
new file mode 100644 (file)
index 0000000..52931cb
Binary files /dev/null and b/theme/black/images/P02_icon_font_size.png differ
diff --git a/theme/black/images/P02_icon_font_size_press.png b/theme/black/images/P02_icon_font_size_press.png
new file mode 100644 (file)
index 0000000..52931cb
Binary files /dev/null and b/theme/black/images/P02_icon_font_size_press.png differ
diff --git a/theme/black/images/P02_icon_font_type.png b/theme/black/images/P02_icon_font_type.png
new file mode 100644 (file)
index 0000000..abd2499
Binary files /dev/null and b/theme/black/images/P02_icon_font_type.png differ
diff --git a/theme/black/images/P02_icon_font_type_press.png b/theme/black/images/P02_icon_font_type_press.png
new file mode 100644 (file)
index 0000000..abd2499
Binary files /dev/null and b/theme/black/images/P02_icon_font_type_press.png differ
diff --git a/theme/black/images/P02_icon_stroke.png b/theme/black/images/P02_icon_stroke.png
new file mode 100644 (file)
index 0000000..656b788
Binary files /dev/null and b/theme/black/images/P02_icon_stroke.png differ
diff --git a/theme/black/images/P02_icon_stroke_press.png b/theme/black/images/P02_icon_stroke_press.png
new file mode 100644 (file)
index 0000000..656b788
Binary files /dev/null and b/theme/black/images/P02_icon_stroke_press.png differ
diff --git a/theme/black/memo.edc b/theme/black/memo.edc
new file mode 100644 (file)
index 0000000..24b9607
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+#include <../../extend/extended-edc.h>
+
+collections {
+    #include <../common.edc>
+}
diff --git a/theme/common.edc b/theme/common.edc
new file mode 100644 (file)
index 0000000..eb5852f
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+#define ICON_BUTTON(iName, img_default, img_focus)\
+group {\
+    name: iName;\
+    images{\
+        image: img_default COMP;\
+        image: img_focus COMP;\
+        image: "00_picker_btn_press.png" COMP;\
+        image: "00_picker_btn_normal.png" COMP;\
+    }\
+    parts {\
+        PART_BG("bg")\
+        PART_BORDER_IMAGE("image_bg", "bg", "00_picker_btn_normal.png", 4, 4, 0, 0)\
+        PART_IMAGE("image_icon", "bg", img_default)\
+        PART_EVENT_RECT("event", "bg")\
+    }/* end parts */\
+\
+    programs {\
+        program {\
+            name: "init";\
+            signal: "load";\
+            source: "";\
+            script {\
+                SCRIPT_CUSTOM_PART("image_bg");\
+                SCRIPT_CUSTOM_PART("image_icon");\
+            }\
+        } /* end program */\
+        program {\
+            name:   "focus";\
+            signal: "focus";\
+            source: "elm";\
+            script {\
+                SCRIPT_SET_IMAGE("image_bg", "00_picker_btn_press.png");\
+                SCRIPT_SET_IMAGE("image_icon", img_focus);\
+           }\
+        } /* end program */\
+        program {\
+            name:   "normal";\
+            signal: "normal";\
+            source: "elm";\
+            script {\
+                SCRIPT_SET_IMAGE("image_bg", "00_picker_btn_normal.png");\
+                SCRIPT_SET_IMAGE("image_icon", img_default);\
+           }\
+        } /* end program */\
+    }/* end programs */\
+}
+
+ICON_BUTTON("tl_font_size", "P02_icon_font_size.png", "P02_icon_font_size_press.png")
+ICON_BUTTON("tl_font_color", "P02_icon_font_color.png", "P02_icon_font_color_press.png")
+ICON_BUTTON("tl_stroke_size", "P02_icon_stroke.png", "P02_icon_stroke_press.png")
+ICON_BUTTON("tl_stroke_color", "P02_icon_color.png", "P02_icon_color_focus.png")
+ICON_BUTTON("tl_stroke_eraser", "P02_icon_eraser.png", "P02_icon_eraser_press.png")
+
diff --git a/theme/white/images/00_picker_btn_normal.png b/theme/white/images/00_picker_btn_normal.png
new file mode 100644 (file)
index 0000000..df4433e
Binary files /dev/null and b/theme/white/images/00_picker_btn_normal.png differ
diff --git a/theme/white/images/00_picker_btn_press.png b/theme/white/images/00_picker_btn_press.png
new file mode 100644 (file)
index 0000000..83284d1
Binary files /dev/null and b/theme/white/images/00_picker_btn_press.png differ
diff --git a/theme/white/images/P02_icon_color.png b/theme/white/images/P02_icon_color.png
new file mode 100644 (file)
index 0000000..23a7fe7
Binary files /dev/null and b/theme/white/images/P02_icon_color.png differ
diff --git a/theme/white/images/P02_icon_color_focus.png b/theme/white/images/P02_icon_color_focus.png
new file mode 100644 (file)
index 0000000..23a7fe7
Binary files /dev/null and b/theme/white/images/P02_icon_color_focus.png differ
diff --git a/theme/white/images/P02_icon_eraser.png b/theme/white/images/P02_icon_eraser.png
new file mode 100644 (file)
index 0000000..ab26f48
Binary files /dev/null and b/theme/white/images/P02_icon_eraser.png differ
diff --git a/theme/white/images/P02_icon_eraser_press.png b/theme/white/images/P02_icon_eraser_press.png
new file mode 100644 (file)
index 0000000..82e1ce1
Binary files /dev/null and b/theme/white/images/P02_icon_eraser_press.png differ
diff --git a/theme/white/images/P02_icon_font_color.png b/theme/white/images/P02_icon_font_color.png
new file mode 100644 (file)
index 0000000..2e9c514
Binary files /dev/null and b/theme/white/images/P02_icon_font_color.png differ
diff --git a/theme/white/images/P02_icon_font_color_press.png b/theme/white/images/P02_icon_font_color_press.png
new file mode 100644 (file)
index 0000000..2e75f62
Binary files /dev/null and b/theme/white/images/P02_icon_font_color_press.png differ
diff --git a/theme/white/images/P02_icon_font_size.png b/theme/white/images/P02_icon_font_size.png
new file mode 100644 (file)
index 0000000..b397b98
Binary files /dev/null and b/theme/white/images/P02_icon_font_size.png differ
diff --git a/theme/white/images/P02_icon_font_size_press.png b/theme/white/images/P02_icon_font_size_press.png
new file mode 100644 (file)
index 0000000..4966066
Binary files /dev/null and b/theme/white/images/P02_icon_font_size_press.png differ
diff --git a/theme/white/images/P02_icon_font_type.png b/theme/white/images/P02_icon_font_type.png
new file mode 100644 (file)
index 0000000..10d9186
Binary files /dev/null and b/theme/white/images/P02_icon_font_type.png differ
diff --git a/theme/white/images/P02_icon_font_type_press.png b/theme/white/images/P02_icon_font_type_press.png
new file mode 100644 (file)
index 0000000..abd2499
Binary files /dev/null and b/theme/white/images/P02_icon_font_type_press.png differ
diff --git a/theme/white/images/P02_icon_stroke.png b/theme/white/images/P02_icon_stroke.png
new file mode 100644 (file)
index 0000000..5a317a8
Binary files /dev/null and b/theme/white/images/P02_icon_stroke.png differ
diff --git a/theme/white/images/P02_icon_stroke_press.png b/theme/white/images/P02_icon_stroke_press.png
new file mode 100644 (file)
index 0000000..5e26ff8
Binary files /dev/null and b/theme/white/images/P02_icon_stroke_press.png differ
diff --git a/theme/white/memo.edc b/theme/white/memo.edc
new file mode 100644 (file)
index 0000000..24b9607
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+*
+* Copyright 2012  Samsung Electronics Co., Ltd
+*
+* Licensed under the Flora License, Version 1.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.tizenopensource.org/license
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+#include <../../extend/extended-edc.h>
+
+collections {
+    #include <../common.edc>
+}
diff --git a/ug-memo-efl.desktop b/ug-memo-efl.desktop
new file mode 100644 (file)
index 0000000..e5b1a32
--- /dev/null
@@ -0,0 +1,11 @@
+Name=ug-memo-efl
+Exec=/opt/ug/bin/ug-memo-efl
+Icon=
+Type=Application
+Version=0.1.0-0
+NoDisplay=true
+X-TIZEN-Multiple=true
+X-TIZEN-TaskManage=false
+X-TIZEN-Removable=false
+X-TIZEN-SVC=http://tizen.org/appsvc/operation/test|NULL|NULL
+