From 1b0b4fe2d379cdf6a28260c0edc266dc42e1814e Mon Sep 17 00:00:00 2001 From: "jk7744.park" Date: Tue, 8 Sep 2015 21:38:02 +0900 Subject: [PATCH] tizen 2.3.1 release --- AUTHORS | 3 + CMakeLists.txt | 57 +- LICENSE | 255 +++-- NOTICE | 0 data/CMakeLists.txt | 7 +- data/edje/CMakeLists.txt | 20 + data/edje/all_apps_portrait.edc | 117 ++- data/edje/button_edit.edc | 301 ++++++ data/edje/conf.edc | 1 + data/edje/group_4x4_portrait.edc | 134 ++- data/edje/index.edc | 186 ++++ data/edje/item_4x4.edc | 301 +++++- data/edje/layout_portrait.edc | 207 +++- data/edje/pagecontrol.edc | 155 --- data/icons/org.tizen.menu-screen.png | Bin 0 -> 6016 bytes data/images/CMakeLists.txt | 1 + data/images/RM06_App tray_Btn_Uninstall.png | Bin 0 -> 6062 bytes .../RM06_App tray_Btn_Uninstall_press.png | Bin 0 -> 6231 bytes data/images/RM06_App_tray_edit_btn.png | Bin 0 -> 3040 bytes data/images/RM06_App_tray_edit_btn_press.png | Bin 0 -> 3029 bytes data/images/RM06_App_tray_setting.png | Bin 0 -> 4380 bytes data/images/RM06_App_tray_setting_press.png | Bin 0 -> 3331 bytes data/images/btn_edit_nor.9.png | Bin 0 -> 6025 bytes data/images/btn_edit_press.9.png | Bin 0 -> 6603 bytes data/images/default.png | Bin 0 -> 17581 bytes data/images/icon_btn_done_nor.png | Bin 0 -> 3176 bytes data/images/icon_btn_done_press.png | Bin 0 -> 3135 bytes data/images/icon_btn_edit_nor.png | Bin 0 -> 1468 bytes data/images/icon_btn_edit_press.png | Bin 0 -> 1375 bytes data/images/menu_badge_01.png | Bin 0 -> 1414 bytes data/images/page indicator.png | Bin 0 -> 412 bytes data/images/page indicator_focus.png | Bin 0 -> 391 bytes data/main_operation.launch | 2 + data/org.tizen.menu-screen.desktop.in | 7 - data/org.tizen.menu-screen.xml.in | 23 +- data/po/CMakeLists.txt | 76 ++ data/po/ar.po | 9 + data/po/az.po | 9 + data/po/bg.po | 9 + data/po/ca.po | 9 + data/po/cs.po | 9 + data/po/da.po | 9 + data/po/de.po | 9 + data/po/de_DE.po | 8 + data/po/el_GR.po | 9 + data/po/en.po | 9 + data/po/en_PH.po | 9 + data/po/en_US.po | 9 + data/po/es_ES.po | 9 + data/po/es_MX.po | 8 + data/po/es_US.po | 9 + data/po/et.po | 9 + data/po/eu.po | 9 + data/po/fa.po | 8 + data/po/fi.po | 9 + data/po/fr.po | 9 + data/po/fr_CA.po | 9 + data/po/fr_FR.po | 8 + data/po/ga.po | 9 + data/po/gl.po | 9 + data/po/hi.po | 9 + data/po/hr.po | 9 + data/po/hu.po | 9 + data/po/hy.po | 9 + data/po/is.po | 9 + data/po/it_IT.po | 9 + data/po/ja_JP.po | 9 + data/po/ka.po | 9 + data/po/kk.po | 9 + data/po/ko_KR.po | 9 + data/po/lt.po | 9 + data/po/lv.po | 9 + data/po/mk.po | 9 + data/po/nb.po | 8 + data/po/nl.po | 9 + data/po/nl_NL.po | 8 + data/po/pl.po | 9 + data/po/pt_BR.po | 9 + data/po/pt_PT.po | 9 + data/po/ro.po | 9 + data/po/ru_RU.po | 9 + data/po/sk.po | 9 + data/po/sl.po | 9 + data/po/sr.po | 9 + data/po/sv.po | 9 + data/po/th.po | 8 + data/po/tr_TR.po | 9 + data/po/uk.po | 9 + data/po/ur.po | 8 + data/po/uz.po | 9 + data/po/zh_CN.po | 9 + data/po/zh_HK.po | 9 + data/po/zh_SG.po | 8 + data/po/zh_TW.po | 9 + debian/changelog | 17 - debian/compat | 1 - debian/control | 19 - debian/copyright | 0 debian/jobs | 0 debian/org.tizen.menu-screen.install.in | 2 - debian/org.tizen.menu-screen.postinst | 19 - debian/rules | 153 --- include/all_apps/db.h | 50 + include/all_apps/layout.h | 44 +- include/all_apps/list.h | 37 +- include/all_apps/shortcut.h | 39 + include/conf.h | 53 +- include/db.h | 53 + include/index.h | 48 +- include/item.h | 51 +- include/item_badge.h | 39 + include/item_event.h | 36 +- include/key.h | 35 + include/layout.h | 44 +- include/list.h | 43 +- include/mapbuf.h | 38 +- include/menu_screen.h | 44 +- include/mouse.h | 38 +- include/page.h | 38 +- include/page_scroller.h | 49 +- include/pkgmgr.h | 83 +- include/popup.h | 52 +- include/util.h | 67 +- org.tizen.menu-screen.efl | 98 ++ org.tizen.menu-screen.manifest | 12 + packaging/org.tizen.menu-screen.changes | 3 - packaging/org.tizen.menu-screen.spec | 162 ++- src/all_apps/db.c | 217 ++++ src/all_apps/layout.c | 287 +++++- src/all_apps/list.c | 186 +++- src/all_apps/shortcut.c | 240 +++++ src/db.c | 326 ++++++ src/index.c | 81 +- src/item.c | 648 +++++++++--- src/item_badge.c | 184 ++++ src/item_event.c | 88 +- src/key.c | 237 +++++ src/layout.c | 272 ++++- src/list.c | 115 ++- src/mapbuf.c | 83 +- src/menu_screen.c | 427 ++++++-- src/mouse.c | 44 +- src/page.c | 129 +-- src/page_scroller.c | 850 +++++++-------- src/pkgmgr.c | 973 ++++++++---------- src/popup.c | 227 +++- src/util.c | 46 +- 147 files changed, 6940 insertions(+), 2553 deletions(-) create mode 100644 AUTHORS mode change 100644 => 100755 CMakeLists.txt mode change 100644 => 100755 LICENSE delete mode 100644 NOTICE create mode 100644 data/edje/button_edit.edc create mode 120000 data/edje/conf.edc create mode 100644 data/edje/index.edc delete mode 100644 data/edje/pagecontrol.edc create mode 100755 data/icons/org.tizen.menu-screen.png create mode 100644 data/images/CMakeLists.txt create mode 100644 data/images/RM06_App tray_Btn_Uninstall.png create mode 100644 data/images/RM06_App tray_Btn_Uninstall_press.png create mode 100644 data/images/RM06_App_tray_edit_btn.png create mode 100644 data/images/RM06_App_tray_edit_btn_press.png create mode 100644 data/images/RM06_App_tray_setting.png create mode 100644 data/images/RM06_App_tray_setting_press.png create mode 100644 data/images/btn_edit_nor.9.png create mode 100644 data/images/btn_edit_press.9.png create mode 100644 data/images/default.png create mode 100644 data/images/icon_btn_done_nor.png create mode 100644 data/images/icon_btn_done_press.png create mode 100644 data/images/icon_btn_edit_nor.png create mode 100644 data/images/icon_btn_edit_press.png create mode 100644 data/images/menu_badge_01.png create mode 100644 data/images/page indicator.png create mode 100644 data/images/page indicator_focus.png create mode 100644 data/main_operation.launch delete mode 100644 data/org.tizen.menu-screen.desktop.in create mode 100644 data/po/CMakeLists.txt create mode 100644 data/po/ar.po create mode 100644 data/po/az.po create mode 100644 data/po/bg.po create mode 100644 data/po/ca.po create mode 100644 data/po/cs.po create mode 100644 data/po/da.po create mode 100755 data/po/de.po create mode 100644 data/po/de_DE.po create mode 100644 data/po/el_GR.po create mode 100644 data/po/en.po create mode 100644 data/po/en_PH.po create mode 100644 data/po/en_US.po create mode 100644 data/po/es_ES.po create mode 100644 data/po/es_MX.po create mode 100755 data/po/es_US.po create mode 100644 data/po/et.po create mode 100644 data/po/eu.po create mode 100755 data/po/fa.po create mode 100644 data/po/fi.po create mode 100755 data/po/fr.po create mode 100644 data/po/fr_CA.po create mode 100644 data/po/fr_FR.po create mode 100644 data/po/ga.po create mode 100644 data/po/gl.po create mode 100644 data/po/hi.po create mode 100644 data/po/hr.po create mode 100644 data/po/hu.po create mode 100644 data/po/hy.po create mode 100644 data/po/is.po create mode 100644 data/po/it_IT.po create mode 100644 data/po/ja_JP.po create mode 100644 data/po/ka.po create mode 100644 data/po/kk.po create mode 100644 data/po/ko_KR.po create mode 100644 data/po/lt.po create mode 100644 data/po/lv.po create mode 100644 data/po/mk.po create mode 100644 data/po/nb.po create mode 100755 data/po/nl.po create mode 100644 data/po/nl_NL.po create mode 100644 data/po/pl.po create mode 100644 data/po/pt_BR.po create mode 100644 data/po/pt_PT.po create mode 100644 data/po/ro.po create mode 100644 data/po/ru_RU.po create mode 100644 data/po/sk.po create mode 100644 data/po/sl.po create mode 100644 data/po/sr.po create mode 100644 data/po/sv.po create mode 100755 data/po/th.po create mode 100644 data/po/tr_TR.po create mode 100644 data/po/uk.po create mode 100755 data/po/ur.po create mode 100644 data/po/uz.po create mode 100644 data/po/zh_CN.po create mode 100644 data/po/zh_HK.po create mode 100644 data/po/zh_SG.po create mode 100644 data/po/zh_TW.po delete mode 100644 debian/changelog delete mode 100644 debian/compat delete mode 100644 debian/control delete mode 100644 debian/copyright delete mode 100644 debian/jobs delete mode 100644 debian/org.tizen.menu-screen.install.in delete mode 100644 debian/org.tizen.menu-screen.postinst delete mode 100755 debian/rules create mode 100644 include/all_apps/db.h create mode 100644 include/all_apps/shortcut.h create mode 100644 include/db.h create mode 100644 include/item_badge.h create mode 100644 include/key.h create mode 100755 org.tizen.menu-screen.efl create mode 100644 org.tizen.menu-screen.manifest delete mode 100644 packaging/org.tizen.menu-screen.changes mode change 100644 => 100755 packaging/org.tizen.menu-screen.spec create mode 100644 src/all_apps/db.c create mode 100644 src/all_apps/shortcut.c create mode 100644 src/db.c create mode 100644 src/item_badge.c create mode 100644 src/key.c mode change 100644 => 100755 src/menu_screen.c diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..49e578b --- /dev/null +++ b/AUTHORS @@ -0,0 +1,3 @@ +Jin Yoon +Junkyu Han +Youngjoo Park diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100644 new mode 100755 index 0c437bc..bf11187 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,22 +2,36 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(menu-screen C) SET(PACKAGE_NAME "org.tizen.${PROJECT_NAME}") -SET(PREFIX "/opt/apps/${PACKAGE_NAME}") +SET(PREFIX "/usr/apps/${PACKAGE_NAME}") SET(EXEC_PREFIX "${PREFIX}/bin") SET(LIBDIR "${PREFIX}/lib") -SET(DATADIR "${PREFIX}/data") +SET(DATADIR "/opt${PREFIX}/data") SET(RESDIR "${PREFIX}/res") +SET(ICONDIR "/usr/share/icons/default/small") SET(IMAGEDIR "${RESDIR}/images") SET(EDJEDIR "${RESDIR}/edje") SET(LOCALEDIR "${RESDIR}/locale") SET(VERSION 0.1.0) +#IF("${ARCH}" STREQUAL "arm") +# OPTION(USE_ARM "Use Arm" ON) +# ADD_DEFINITIONS("-DARM_TYPE") +#ELSE() +# OPTION(USE_EMULATOR "Use Emulator" ON) +# ADD_DEFINITIONS("-DEMULATOR_TYPE") +#ENDIF() +#MESSAGE("ARCH: ${ARCH}") + INCLUDE(FindPkgConfig) pkg_check_modules(MENU_PKGS REQUIRED ail + appcore-efl + appsvc aul + badge bundle capi-appfw-application + capi-system-info dlog ecore ecore-evas @@ -30,15 +44,22 @@ pkg_check_modules(MENU_PKGS REQUIRED eina elementary evas - heynoti pkgmgr - sysman + pkgmgr-info + shortcut syspopup-caller utilX ) +IF(USE_ARM) +pkg_check_modules(ARM_PKGS REQUIRED + bincfg + factory +) +ENDIF() + ADD_DEFINITIONS("-DENABLE_BGIMAGE") -ADD_DEFINITIONS("-DLOG_TAG=\"menu-screen\"") +ADD_DEFINITIONS("-DLOG_TAG=\"MENU_SCREEN\"") ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"") ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE_NAME}\"") ADD_DEFINITIONS("-DVERSION=\"${VERSION}\"") @@ -52,14 +73,31 @@ FOREACH (flag ${MENU_PKGS_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") +FOREACH(flag ${ARM_PKGS_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fdata-sections -ffunction-sections -Wl,--gc-sections") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE") +SET(CMAKE_C_FLAGS_PROFILING "-O0 -g -pg -fPIE") +SET(CMAKE_CXX_FLAGS_PROFILING "-O0 -std=c++0x -g -pg -fPIE") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fPIE") +SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -std=c++0x -g -fPIE") +SET(CMAKE_C_FLAGS_RELEASE "-O2 -g -fPIE") +SET(CMAKE_CXX_FLAGS_RELEASE "-O2 std=c++0x -g -fPIE") +SET(CMAKE_C_FLAGS_CCOV "-O2 -g --coverage -fPIE") +SET(CMAKE_CXX_FLAGS_CCOV "-O2 std=c++0x -g --coverage -fPIE") +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie") INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) ADD_EXECUTABLE(${PROJECT_NAME} + src/db.c src/index.c src/item.c + src/item_badge.c src/item_event.c + src/key.c src/layout.c src/list.c src/mapbuf.c @@ -70,15 +108,18 @@ ADD_EXECUTABLE(${PROJECT_NAME} src/pkgmgr.c src/popup.c src/util.c + src/all_apps/db.c src/all_apps/layout.c src/all_apps/list.c + src/all_apps/shortcut.c ) -TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -lm) +TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ARM_PKGS_LDFLAGS}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${MENU_PKGS_LDFLAGS}) -# Install +# Install INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${EXEC_PREFIX}) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PACKAGE_NAME}.efl DESTINATION /etc/smack/accesses.d) ADD_SUBDIRECTORY(data) diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 index 7ccb5b5..3d4a47d --- a/LICENSE +++ b/LICENSE @@ -1,75 +1,204 @@ -Flora License - -Version 1.0, May, 2012 - -http://www.tizenopensource.org/license - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -"Tizen Certified Platform" shall mean a software platform that complies with the standards set forth in the Compatibility Definition Document and passes the Compatibility Test Suite as defined from time to time by the Tizen Technical Steering Group and certified by the Tizen Association or its designated agent. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work solely as incorporated into a Tizen Certified Platform, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work solely as incorporated into a Tizen Certified Platform to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof pursuant to the copyright license above, in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - - 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and - - 2. You must cause any modified files to carry prominent notices stating that You changed the files; and - - 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - - 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Flora License to your work - -To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. +Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. Copyright [yyyy] [name of copyright owner] - Licensed under the Flora License, Version 1.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.tizenopensource.org/license + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + diff --git a/NOTICE b/NOTICE deleted file mode 100644 index e69de29..0000000 diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index e743f02..9c423e5 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,9 +1,14 @@ -SET(MANIFESTDIR "/opt/share/packages") +SET(MANIFESTDIR "/usr/share/packages") # manifest CONFIGURE_FILE(${PACKAGE_NAME}.xml.in ${CMAKE_BINARY_DIR}/${PACKAGE_NAME}.xml) INSTALL(FILES ${CMAKE_BINARY_DIR}/${PACKAGE_NAME}.xml DESTINATION ${MANIFESTDIR}) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/main_operation.launch DESTINATION ${RESDIR}/data) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/${PACKAGE_NAME}.png DESTINATION /usr/share/icons/default/small) + ADD_SUBDIRECTORY(edje) +ADD_SUBDIRECTORY(images) +ADD_SUBDIRECTORY(po) # End of a file diff --git a/data/edje/CMakeLists.txt b/data/edje/CMakeLists.txt index 2f3351e..2e334a0 100644 --- a/data/edje/CMakeLists.txt +++ b/data/edje/CMakeLists.txt @@ -1,3 +1,13 @@ +ADD_CUSTOM_TARGET(index.edj + COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../images ${EDJE_CFLAGS} + ${CMAKE_CURRENT_SOURCE_DIR}/index.edc index.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/index.edc +) +ADD_DEPENDENCIES(${PROJECT_NAME} index.edj) +INSTALL(FILES index.edj DESTINATION ${EDJEDIR}) + + + ADD_CUSTOM_TARGET(item_4x4.edj COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../images ${EDJE_CFLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/item_4x4.edc item_4x4.edj @@ -38,4 +48,14 @@ INSTALL(FILES layout_portrait.edj DESTINATION ${EDJEDIR}) +ADD_CUSTOM_TARGET(button_edit.edj + COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../images ${EDJE_CFLAGS} + ${CMAKE_CURRENT_SOURCE_DIR}/button_edit.edc button_edit.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/button_edit.edc +) +ADD_DEPENDENCIES(${PROJECT_NAME} button_edit.edj) +INSTALL(FILES button_edit.edj DESTINATION ${EDJEDIR}) + + + # End of a file diff --git a/data/edje/all_apps_portrait.edc b/data/edje/all_apps_portrait.edc index e7985ee..4b2c759 100644 --- a/data/edje/all_apps_portrait.edc +++ b/data/edje/all_apps_portrait.edc @@ -1,28 +1,37 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +#include "conf.edc" + +#define _BASE_HEIGHT 1280 collections { + base_scale: 1.8; group { name: "all_apps"; parts { part { name: "bg"; - type: RECT; + type: SWALLOW; scale: 1; mouse_events: 1; description { @@ -32,7 +41,17 @@ collections { visible: 0; } } - + part { + name: "indicator_spacer"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; to, "bg"; } + rel2 { relative: 1.0 INDICATOR_HEIGHT_PROP; to, "bg"; } + } + } part { name: "index_bg"; type: RECT; @@ -40,38 +59,50 @@ collections { mouse_events: 0; description { state: "default" 0.0; - rel1 { relative: 0.0 50/1280; to, "bg";} - rel2 { relative: 1.0 154/1280; to, "bg";} - color: 0 0 0 255; + rel1 { relative: 0.0 80/_BASE_HEIGHT; to, "bg";} // 1280 - 70(indicator) + rel2 { relative: 1.0 184/_BASE_HEIGHT; to, "bg";} // 174 - 70 visible: 0; } } - part { - name: "index"; - type: SWALLOW; - mouse_events: 0; - description { - state: "default" 0.0; - align: 0.5 0.5; - rel1 { relative: 0.0 0.0; to, "index_bg";} - rel2 { relative: 1.0 1.0; to, "index_bg";} + part { + name: "index"; + type: SWALLOW; + mouse_events: 0; + description { + state: "default" 0.0; + align: 0.5 0.5; + rel1 { relative: 0.2 0.0; to, "index_bg";} + rel2 { relative: 0.8 1.0; to, "index_bg";} visible: 1; - } - } - - part { - name: "content_bg"; - type: RECT; - scale: 1; - mouse_events: 1; - description { + } + } + part { + name: "button_edit"; + type: SWALLOW; + scale: 1; + mouse_events: 1; + description { state: "default" 0.0; - rel1 { relative: 0.0 154/1280; to, "bg"; } - rel2 { relative: 1.0 1214/1280; to, "bg"; } + align: 0.5 0.5; + rel1 { relative: 16/720 8/70; to, "index_bg";} + rel2 { relative: 144/720 62/70; to, "index_bg";} + fixed: 1 1; + visible: 1; + } + } + part { + name: "content_bg"; + type: RECT; + scale: 1; + mouse_events: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 194/_BASE_HEIGHT; to, "bg"; } // 154 - 70 + rel2 { relative: 1.0 1224/_BASE_HEIGHT; to, "bg"; } color: 34 34 34 255; visible: 0; - } - } + } + } part { name: "content"; @@ -80,7 +111,7 @@ collections { mouse_events: 1; description { state: "default" 0.0; - align: 0.5 0.0; + align: 0.5 0.0; rel1 { relative: 0.0 0.0; to, "content_bg";} rel2 { relative: 1.0 1.0; to, "content_bg";} visible: 1; diff --git a/data/edje/button_edit.edc b/data/edje/button_edit.edc new file mode 100644 index 0000000..fefa59f --- /dev/null +++ b/data/edje/button_edit.edc @@ -0,0 +1,301 @@ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#define BUTTON_EDIT_BG_SIZE 98 56 +#define BUTTON_EDIT_BG_SIZE_MIN 45 30 +#define BUTTON_EDIT_IMAGE_SIZE 35 35 +#define BUTTON_EDIT_IMAGE_SIZE_MIN 17 17 +#define BUTTON_EDIT_W 128 +#define BUTTON_EDIT_H 80 + + + +images { + image: "../images/btn_edit_nor.9.png" COMP; + image: "../images/btn_edit_press.9.png" COMP; + image: "../images/icon_btn_edit_press.png" COMP; + image: "../images/icon_btn_edit_nor.png" COMP; + image: "../images/icon_btn_done_press.png" COMP; + image: "../images/icon_btn_done_nor.png" COMP; +} + + + +collections { + base_scale: 1.8; + group { + name: "button_edit"; + parts { + part { + name: "edit_button"; + type: RECT; + scale: 1; + mouse_events: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; } + rel2 { relative: 1.0 1.0; } + visible: 0; + } + description { + state: "enable" 0.0; + inherit: "default" 0.0; + } + description { + state: "hide" 0.0; + inherit: "default" 0.0; + } + } + part { + name: "edit_button_bg"; + type: IMAGE; + scale: 1; + mouse_events: 1; + description { + state: "default" 0.0; + rel1 { relative: 15/BUTTON_EDIT_W 12/BUTTON_EDIT_H; to, "edit_button"; } + rel2 { relative: 113/BUTTON_EDIT_W 68/BUTTON_EDIT_H; to, "edit_button"; } + min: BUTTON_EDIT_BG_SIZE_MIN; + fixed: 1 1; + image { + normal: "../images/btn_edit_nor.9.png"; + border: 15 15 0 0; + middle: DEFAULT; + border_scale: 1; + } + color: 255 255 255 255; + visible: 1; + } + description { + state: "edit" 0.0; + inherit: "default" 0.0; + } + description { + state: "enable" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + } + description { + state: "press" 0.0; + inherit: "default" 0.0; + image { + normal: "../images/btn_edit_press.9.png"; + } + } + description { + state: "hide" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { + name: "edit_button_image"; + type: IMAGE; + scale: 1; + mouse_events: 1; + description { + state: "default" 0.0; + align: 0.5 0.5; + rel1 { relative: 46/BUTTON_EDIT_W 22/BUTTON_EDIT_H; to, "edit_button_bg";} + rel2 { relative: 81/BUTTON_EDIT_W 57/BUTTON_EDIT_H; to, "edit_button_bg";} + image { + normal: "../images/icon_btn_edit_nor.png"; + } + min: BUTTON_EDIT_IMAGE_SIZE_MIN; + fixed: 1 1; + visible: 1; + } + description { + state: "edit" 0.0; + inherit: "default" 0.0; + image { + normal: "../images/icon_btn_done_nor.png"; + } + } + description { + state: "press" 0.0; + inherit: "default" 0.0; + image { + normal: "../images/icon_btn_edit_press.png"; + } + } + description { + state: "edit_press" 0.0; + inherit: "default" 0.0; + image { + normal: "../images/icon_btn_done_press.png"; + } + } + } + part { + name: "edit_button_event"; + type: RECT; + scale: 1; + mouse_events: 1; + description { + state: "default" 0.0; + rel1 { relative: -0.1 -0.1; to: "edit_button_bg"; } + rel2 { relative: 1.1 1.1; to: "edit_button_bg"; } + color: 0 0 0 0; + visible: 1; + } + description { + state: "hide" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { + name: "focus"; + type: SWALLOW; + scale: 1; + mouse_events: 1; + repeat_events: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; to: "edit_button_event"; } + rel2 { relative: 1.0 1.0; to: "edit_button_event"; } + fixed: 1 1; + visible: 1; + } + } + part { + name: "state_edit"; + type: RECT; + scale: 1; + mouse_events: 1; + description { + state: "default" 0.0; + visible: 0; + } + description { + state: "edit" 0.0; + inherit: "default" 0.0; + } + } + } + + programs { + program { + name: "edit_button,down"; + signal: "mouse,down,1"; + source: "edit_button_event"; + action: STATE_SET "press" 0.0; + target: "edit_button_bg"; + after: "press_state"; + } + program { + name: "press_state"; + script { + new st[31]; + new Float:vl; + get_state(PART:"state_edit", st, 30, vl); + if (!strcmp(st, "default")) + { + set_state(PART:"edit_button_image", "press", 0.0); + } + else + { + set_state(PART:"edit_button_image", "edit_press", 0.0); + } + } + after: "edit_button,down,after"; + } + program { + name: "edit_button,down,after"; + action: SIGNAL_EMIT "edit_button,down" "menu"; + } + + program { + name: "edit_button,up"; + signal: "mouse,up,1"; + source: "edit_button_event"; + action: STATE_SET "default" 0.0; + target: "edit_button_bg"; + after: "edit_button,up,after"; + } + program { // Edit or unedit in C codes. + name: "edit_button,up,after"; + action: SIGNAL_EMIT "edit_button,up" "menu"; + } + program { // This program is called from C. + name: "release_state"; + signal: "edit_button,release"; + source: "menu"; + script { + new st[31]; + new Float:vl; + get_state(PART:"state_edit", st, 30, vl); + if (!strcmp(st, "default")) // Normal mode + { + set_state(PART:"edit_button_image", "default", 0.0); + } + else // Edit mode + { + set_state(PART:"edit_button_image", "edit", 0.0); + } + } + } + + program { // Edit mode + name: "edit_button_state,edit"; + signal: "edit_button_state,edit"; + source: "menu"; + action: STATE_SET "edit" 0.0; + target: "state_edit"; + target: "edit_button_bg"; + target: "edit_button_image"; + } + program { // Normal mode + name: "edit_button_state,unedit"; + signal: "edit_button_state,unedit"; + source: "menu"; + action: STATE_SET "default" 0.0; + target: "state_edit"; + target: "edit_button_bg"; + target: "edit_button_image"; + } + + program { + name: "edit_button,show"; + signal: "edit_button,show"; + source: "menu"; + action: STATE_SET "default" 0.0; + target: "edit_button_bg"; + target: "edit_button_image"; + target: "edit_button_event"; + } + program { + name: "edit_button,hide"; + signal: "edit_button,hide"; + source: "menu"; + action: STATE_SET "hide" 0.0; + target: "edit_button_bg"; + target: "edit_button_image"; + target: "edit_button_event"; + } + } + } +} + + +// End of file diff --git a/data/edje/conf.edc b/data/edje/conf.edc new file mode 120000 index 0000000..de97229 --- /dev/null +++ b/data/edje/conf.edc @@ -0,0 +1 @@ +../../include/conf.h \ No newline at end of file diff --git a/data/edje/group_4x4_portrait.edc b/data/edje/group_4x4_portrait.edc index a4a5132..ff7a34a 100644 --- a/data/edje/group_4x4_portrait.edc +++ b/data/edje/group_4x4_portrait.edc @@ -1,22 +1,26 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ - -#define MENU(part_name, p_relx, p_rely, relx, rely, n_relx, n_rely, ratio) \ +#define MENU(part_name, p_relx, p_rely, relx, rely, n_relx, n_rely) \ part { \ name: "menu_swallow_"part_name; \ type: SWALLOW; \ @@ -26,27 +30,27 @@ state: "default" 0.0; \ visible: 1; \ fixed: 1 1; \ - rel1 { relative: (relx)+(ratio) (rely)+(ratio); to, "bg"; } \ - rel2 { relative: (relx)+(ratio) (rely)+(ratio); to, "bg"; } \ + rel1 { relative: (relx) (rely); to, "bg"; } \ + rel2 { relative: (relx) (rely); to, "bg"; } \ } \ description { \ state: "prev" 0.0; \ inherit: "default" 0.0; \ - rel1.relative: (p_relx)+(ratio) (p_rely)+(ratio); \ - rel2.relative: (p_relx)+(ratio) (p_rely)+(ratio); \ + rel1.relative: (p_relx) (p_rely); \ + rel2.relative: (p_relx) (p_rely); \ } \ description { \ state: "next" 0.0; \ inherit: "default" 0.0; \ - rel1.relative: (n_relx)+(ratio) (n_rely)+(ratio); \ - rel2.relative: (n_relx)+(ratio) (n_rely)+(ratio); \ + rel1.relative: (n_relx) (n_rely); \ + rel2.relative: (n_relx) (n_rely); \ } \ description { \ state: "invisible" 0.0; \ inherit: "default" 0.0; \ visible: 0; \ - rel1.relative: (n_relx)+(ratio) (n_rely)+(ratio); \ - rel2.relative: (n_relx)+(ratio) (n_rely)+(ratio); \ + rel1.relative: (n_relx) (n_rely); \ + rel2.relative: (n_relx) (n_rely); \ } \ } \ @@ -81,8 +85,44 @@ target: "menu_swallow_"part_name; \ } +#define ITEM_00_X (1.0/8.0) +#define ITEM_00_Y (1.0/8.0) +#define ITEM_01_X (3.0/8.0) +#define ITEM_01_Y ITEM_00_Y +#define ITEM_02_X (5.0/8.0) +#define ITEM_02_Y ITEM_00_Y +#define ITEM_03_X (7.0/8.0) +#define ITEM_03_Y ITEM_00_Y + +#define ITEM_04_X ITEM_00_X +#define ITEM_04_Y (3.0/8.0) +#define ITEM_05_X ITEM_01_X +#define ITEM_05_Y ITEM_04_Y +#define ITEM_06_X ITEM_02_X +#define ITEM_06_Y ITEM_04_Y +#define ITEM_07_X ITEM_03_X +#define ITEM_07_Y ITEM_04_Y + +#define ITEM_08_X ITEM_00_X +#define ITEM_08_Y (5.0/8.0) +#define ITEM_09_X ITEM_01_X +#define ITEM_09_Y ITEM_08_Y +#define ITEM_10_X ITEM_02_X +#define ITEM_10_Y ITEM_08_Y +#define ITEM_11_X ITEM_03_X +#define ITEM_11_Y ITEM_08_Y + +#define ITEM_12_X ITEM_00_X +#define ITEM_12_Y (7.0/8.0) +#define ITEM_13_X ITEM_01_X +#define ITEM_13_Y ITEM_12_Y +#define ITEM_14_X ITEM_02_X +#define ITEM_14_Y ITEM_12_Y +#define ITEM_15_X ITEM_03_X +#define ITEM_15_Y ITEM_12_Y collections { + base_scale: 1.8; group { name: "menu_bg"; parts { @@ -97,30 +137,22 @@ collections { } } - MENU("0", -0.25, 0.0, 0.0, 0.0, 0.25, 0.0, 0.125) - MENU("1", 0.0, 0.0, 0.25, 0.0, 0.50, 0.0, 0.125) - MENU("2", 0.25, 0.0, 0.50, 0.0, 0.75, 0.0, 0.125) - MENU("3", 0.50, 0.0, 0.75, 0.0, 0.0, 0.20, 0.125) - - MENU("4", 0.75, 0.0, 0.0, 0.20, 0.25, 0.20, 0.125) - MENU("5", 0.0, 0.20, 0.25, 0.20, 0.50, 0.20, 0.125) - MENU("6", 0.25, 0.20, 0.50, 0.20, 0.75, 0.20, 0.125) - MENU("7", 0.50, 0.20, 0.75, 0.20, 0.0, 0.40, 0.125) - - MENU("8", 0.75, 0.20, 0.0, 0.40, 0.25, 0.40, 0.125) - MENU("9", 0.0, 0.40, 0.25, 0.40, 0.50, 0.40, 0.125) - MENU("10", 0.25, 0.40, 0.50, 0.40, 0.75, 0.40, 0.125) - MENU("11", 0.50, 0.40, 0.75, 0.40, 0.0, 0.60, 0.125) - - MENU("12", 0.75, 0.40, 0.0, 0.60, 0.25, 0.60, 0.125) - MENU("13", 0.0, 0.60, 0.25, 0.60, 0.50, 0.60, 0.125) - MENU("14", 0.25, 0.60, 0.50, 0.60, 0.75, 0.60, 0.125) - MENU("15", 0.50, 0.60, 0.75, 0.60, 1.0, 0.80, 0.125) - - MENU("16", 0.75, 0.60, 0.0, 0.80, 0.25, 0.80, 0.125) - MENU("17", 0.0, 0.80, 0.25, 0.80, 0.50, 0.80, 0.125) - MENU("18", 0.25, 0.80, 0.50, 0.80, 0.75, 0.80, 0.125) - MENU("19", 0.50, 0.80, 0.75, 0.80, 1.0, 0.80, 0.125) + MENU("0", ITEM_00_X, ITEM_00_Y, ITEM_00_X, ITEM_00_Y, ITEM_01_X, ITEM_01_Y) + MENU("1", ITEM_00_X, ITEM_00_Y, ITEM_01_X, ITEM_01_Y, ITEM_02_X, ITEM_02_Y) + MENU("2", ITEM_01_X, ITEM_01_Y, ITEM_02_X, ITEM_02_Y, ITEM_03_X, ITEM_03_Y) + MENU("3", ITEM_02_X, ITEM_02_Y, ITEM_03_X, ITEM_03_Y, ITEM_04_X, ITEM_04_Y) + MENU("4", ITEM_03_X, ITEM_03_Y, ITEM_04_X, ITEM_04_Y, ITEM_05_X, ITEM_05_Y) + MENU("5", ITEM_04_X, ITEM_04_Y, ITEM_05_X, ITEM_05_Y, ITEM_06_X, ITEM_06_Y) + MENU("6", ITEM_05_X, ITEM_05_Y, ITEM_06_X, ITEM_06_Y, ITEM_07_X, ITEM_07_Y) + MENU("7", ITEM_06_X, ITEM_06_Y, ITEM_07_X, ITEM_07_Y, ITEM_08_X, ITEM_08_Y) + MENU("8", ITEM_07_X, ITEM_07_Y, ITEM_08_X, ITEM_08_Y, ITEM_09_X, ITEM_09_Y) + MENU("9", ITEM_08_X, ITEM_08_Y, ITEM_09_X, ITEM_09_Y, ITEM_10_X, ITEM_10_Y) + MENU("10", ITEM_09_X, ITEM_09_Y, ITEM_10_X, ITEM_10_Y, ITEM_11_X, ITEM_11_Y) + MENU("11", ITEM_10_X, ITEM_10_Y, ITEM_11_X, ITEM_11_Y, ITEM_12_X, ITEM_12_Y) + MENU("12", ITEM_11_X, ITEM_11_Y, ITEM_12_X, ITEM_12_Y, ITEM_13_X, ITEM_13_Y) + MENU("13", ITEM_12_X, ITEM_12_Y, ITEM_13_X, ITEM_13_Y, ITEM_14_X, ITEM_14_Y) + MENU("14", ITEM_13_X, ITEM_13_Y, ITEM_14_X, ITEM_14_Y, ITEM_15_X, ITEM_15_Y) + MENU("15", ITEM_14_X, ITEM_14_Y, ITEM_15_X, ITEM_15_Y, ITEM_15_X, ITEM_15_Y) part { name: "dim"; @@ -159,10 +191,6 @@ collections { MENU_PROGRAM("13") MENU_PROGRAM("14") MENU_PROGRAM("15") - MENU_PROGRAM("16") - MENU_PROGRAM("17") - MENU_PROGRAM("18") - MENU_PROGRAM("19") program { name: "dim,on"; diff --git a/data/edje/index.edc b/data/edje/index.edc new file mode 100644 index 0000000..713e382 --- /dev/null +++ b/data/edje/index.edc @@ -0,0 +1,186 @@ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#define INDEX_PAGECONTROL_IND_INC 35 35 +#define INDEX_PAGECONTROL_IND_MIN_INC 35 35 +#define INDEX_PAGECONTROL_FONT_COLOR_INC 255 255 255 +#define INDEX_PAGECONTROL_FONT_SIZE_INC 18 + +collections { + base_scale: 1.8; + group { + name: "elm/index/base/vertical/menuscreen/index"; + alias: "elm/index/base/horizontal/menuscreen/index"; + parts { + part { name: "clip"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + color: 255 255 255 0; + } + description { state: "active" 0.0; + visible: 1; + color: 255 255 255 255; + } + } + part { name: "elm.swallow.index.0"; + type: SWALLOW; + scale: 1; + mouse_events: 0; + clip_to: "clip"; + description { + state: "default" 0.0; + align: 0.5 0.5; + rel1.relative: 0 0; + rel2.relative: 1 1; + } + } + part { name: "elm.swallow.event.0"; + type: SWALLOW; + mouse_events: 0; + repeat_events: 0; + description { state: "default" 0.0; + align: 0.5 0.5; + } + } + } + programs { + program { name: "active"; + signal: "elm,state,active"; + source: "elm"; + action: STATE_SET "active" 0.0; + transition: DECELERATE 0.5; + target: "clip"; + } + program { name: "inactive"; + signal: "elm,state,inactive"; + source: "elm"; + action: STATE_SET "default" 0.0; + transition: DECELERATE 0.5; + target: "clip"; + } + } + } + group { + name: "elm/index/item/vertical/menuscreen/index"; + alias: "elm/index/item_odd/vertical/menuscreen/index"; + alias: "elm/index/item/horizontal/menuscreen/index"; + alias: "elm/index/item_odd/horizontal/menuscreen/index"; + images { + image: "../images/page indicator.png" COMP; + image: "../images/page indicator_focus.png" COMP; + } + parts { + part { name:"bg"; + type : RECT; + scale: 1; + description { state: "default" 0.0; + min: INDEX_PAGECONTROL_IND_INC; + max: INDEX_PAGECONTROL_IND_INC; + visible: 0; + align: 0.5 0.5; + } + } + part { name: "indicator1"; + type: IMAGE; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + align: 0.5 0.5; + fixed: 1 1; + rel1.to: "bg"; + rel2.to: "bg"; + image { + normal: "../images/page indicator.png"; + } + } + description { state: "active" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { name: "indicator2"; + type: IMAGE; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + align: 0.5 0.5; + fixed: 1 1; + min: INDEX_PAGECONTROL_IND_MIN_INC; + max: INDEX_PAGECONTROL_IND_MIN_INC; + image.normal: "../images/page indicator_focus.png"; + visible: 0; + } + description { state: "active" 0.0; + inherit: "default" 0.0; + min: INDEX_PAGECONTROL_IND_INC; + max: INDEX_PAGECONTROL_IND_INC; + visible: 1; + } + } + part { name: "elm.text"; + type: TEXT; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + color: INDEX_PAGECONTROL_FONT_COLOR_INC 0; + align: 0.5 0.5; + text { + font: "TIZEN:style=Bold"; + size: INDEX_PAGECONTROL_FONT_SIZE_INC; + min: 0 1; + //FIXME:values should be 0.5 0.5 when fonts are aligned correctly. + align: 0.53 0.56; + } + rel1 { to: "indicator2"; } + rel2 { to: "indicator2"; } + } + description { state: "active" 0.0; + inherit: "default" 0.0; + color: INDEX_PAGECONTROL_FONT_COLOR_INC 255; + } + } + } + programs { + program { name: "active"; + signal: "elm,state,active"; + source: "elm"; + action: STATE_SET "active" 0.0; + target: "indicator1"; + target: "indicator2"; + target: "elm.text"; + transition: LINEAR 0.2; + } + program { name: "inactive"; + signal: "elm,state,inactive"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "indicator1"; + target: "indicator2"; + target: "elm.text"; + transition: LINEAR 0.2; + } + } + } +} diff --git a/data/edje/item_4x4.edc b/data/edje/item_4x4.edc index 03f1e05..541e59c 100644 --- a/data/edje/item_4x4.edc +++ b/data/edje/item_4x4.edc @@ -1,33 +1,49 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +#include "conf.edc" + +#define _ITEM_HEIGHT 180.0 +#define _ITEM_WIDTH 198.0 styles { style { name: "app_name_style"; - base: "font=SLP:style=MEDIUM font_size=27 align=center valign=top color=#FFFFFF style=soft_shadow shadow_color=#00000060 ellipsis=1"; + base: "font=TIZEN:style=MEDIUM font_size=27 align=center valign=top color=#FFFFFF style=soft_shadow shadow_color=#00000060 ellipsis=1"; tag: "br" "\n"; } } +images { + image: "../images/RM06_App tray_Btn_Uninstall.png" COMP; + image: "../images/RM06_App tray_Btn_Uninstall_press.png" COMP; + image: "../images/menu_badge_01.png" COMP; +} + collections { + base_scale: 1.8; group { name: "icon"; @@ -41,47 +57,88 @@ collections { state: "default" 0.0; rel1 { relative: 0.0 0.0; } rel2 { relative: 1.0 1.0; } - color: 0 0 0 0; + fixed: 1 1; + visible: 0; } } - part { - name: "icon_bg"; - type: RECT; + name: "icon_image"; + type: SWALLOW; scale: 1; mouse_events: 1; description { state: "default" 0.0; - rel1 { relative: 48/180 30/180; to, "bg"; } - rel2 { relative: 132/180 114/180; to, "bg"; } - color: 0 0 0 0; + rel1 { relative: 31/_ITEM_WIDTH 0.0; to: "bg"; } + rel2 { relative: 148/_ITEM_WIDTH 117/_ITEM_HEIGHT; to: "bg"; } + align: 0.5 0.5; + //min: 117 117; + fixed: 1 1; } } part { - name: "icon_image"; - type: SWALLOW; + name: "icon_image_event"; + type: RECT; scale: 1; mouse_events: 1; description { state: "default" 0.0; - rel1 { relative: 0.0 0.0; to, "icon_bg"; } - rel2 { relative: 1.0 1.0; to, "icon_bg"; } + /* Enlarge the starting point of Y for tester's request */ + rel1 { relative: 0.0 0.0; to, "bg"; } //0.0 -0.1 + rel2 { relative: 1.0 1.0; to, "bg"; } + color: 0 0 0 0; + visible: 1; } } part { - name: "icon_image_event"; - type: RECT; + name: "badge"; + type: IMAGE; scale: 1; - mouse_events: 1; + mouse_events: 0; description { state: "default" 0.0; - rel1 { relative: 15/180 10/180; to, "bg"; } - rel2 { relative: 165/180 160/180; to, "bg"; } - color: 0 0 0 0; + visible: 0; + rel1 { relative: 110/_ITEM_WIDTH 0.0; to, "bg"; } + rel2 { relative: 170/_ITEM_WIDTH 60/_ITEM_HEIGHT; to, "bg"; } + image { + normal: "../images/menu_badge_01.png"; + } + } + description { + state: "badge" 0.0; + inherit: "default" 0.0; visible: 1; } } + part { + name: "badge,txt"; + type: TEXT; + scale: 1; + mouse_events: 0; + description { + state: "default" 0.0; + visible: 0; + rel1 { relative: 0.1 0.1; to, "badge"; } + rel2 { relative: 0.9 0.9; to, "badge"; } + align: 0.5 0.5; + color: 255 255 255 255; + color2: 0 0 0 35; + color3: 0 0 0 35; + text { + text_class: "tizen"; + font: "TIZEN:style=medium"; + size: 12; + text: "1"; + align: 0.5 0.5; + fit: 1 1; + } + } + description { + state: "badge" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } part { name: "block_event"; type: RECT; @@ -100,9 +157,38 @@ collections { visible: 0; } } + part { + name: "uninstall"; + type: IMAGE; + scale: 1; + mouse_events: 1; + description { + state: "default" 0.0; + rel1 { relative: 13/_ITEM_WIDTH 3/_ITEM_HEIGHT; to, "bg"; } + rel2 { relative: 67/_ITEM_WIDTH 57/_ITEM_HEIGHT; to, "bg"; } + image { + normal: "../images/RM06_App tray_Btn_Uninstall.png"; + } + //min: 54 54; + fixed: 1 1; + visible: 0; + } + description { + state: "edit,release" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { + state: "edit,press" 0.0; + inherit: "default" 0.0; + image { + normal: "../images/RM06_App tray_Btn_Uninstall_press.png"; + } + visible: 1; + } + } part { name: "txt"; - //type: TEXTBLOCK; type: TEXT; effect: SOFT_SHADOW; scale: 1; @@ -110,22 +196,19 @@ collections { description { state: "default" 0.0; - //rel1 { relative: 0.0 120/180; to, "bg"; } - //rel2 { relative: 1.0 180/180; to, "bg"; } - rel1 { relative: 0.0 114/180; to, "bg"; } - rel2 { relative: 1.0 175/180; to, "bg"; } - align: 0.5 0.5; + rel1 { relative: 0.0 1.0; to_x, "bg"; to_y, "icon_image"; offset: 0 7; } + rel2 { relative: 1.0 1.0; to, "bg"; } + align: 0.5 0.0; color: 255 255 255 255; color2: 0 0 0 35; color3: 0 0 0 35; text { - //style: "app_name_style"; - text_class: "menu_item"; - font: "SLP:style=medium"; - size: 16; - text: "Icon"; + text_class: "tizen"; + font: "TIZEN:style=medium"; + size: 24; align: 0.5 0.1; } + visible: 1; } description { @@ -135,8 +218,59 @@ collections { color: 0 0 0 0; } } + part { + name: "focus"; + type: SWALLOW; + scale: 1; + mouse_events: 1; + repeat_events: 1; + description { + state: "default" 0.0; + /* Enlarge the starting point of Y for tester's request */ + rel1 { relative: 0.0 -0.1; to, "bg"; } + rel2 { relative: 1.0 1.0; to, "bg"; } + fixed: 1 1; + visible: 1; + } + } + part { + name: "uninstall_event"; + type: RECT; + scale: 1; + mouse_events: 1; + description { + state: "default" 0.0; + rel1 { relative: -0.2 -0.2; to, "uninstall"; } + rel2 { relative: 1.1 1.1; to, "uninstall"; } + color: 0 0 0 0; + visible: 0; + } + description { + state: "edit,release" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: "uninstall_focus"; + type: SWALLOW; + scale: 1; + mouse_events: 1; + repeat_events: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; to, "uninstall_event"; } + rel2 { relative: 1.0 1.0; to, "uninstall_event"; } + visible: 0; + } + description { + state: "edit,release" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } } - + programs { program { name: "item,down"; @@ -150,7 +284,84 @@ collections { source: "icon_image_event"; action: SIGNAL_EMIT "item,up" "menu"; } + program { + name: "text,on"; + signal: "text,on"; + source: "menu"; + action: STATE_SET "default" 0.0; + target: "txt"; + } + program { + name: "text,off"; + signal: "text,off"; + source: "menu"; + action: STATE_SET "hide" 0.0; + target: "txt"; + } + + + // Badge + program { + name: "badge,on"; + signal: "badge,on"; + source: "menu"; + action: STATE_SET "badge" 0.0; + target: "badge"; + target: "badge,txt"; + } + program { + name: "badge,off"; + signal: "badge,off"; + source: "menu"; + action: STATE_SET "default" 0.0; + target: "badge"; + target: "badge,txt"; + } + program { + name: "uninstall,on"; + signal: "uninstall,on"; + source: "menu"; + action: STATE_SET "edit,release" 0.0; + target: "block_event"; + target: "uninstall"; + target: "uninstall_event"; + target: "uninstall_focus"; + } + program { + name: "uninstall,off"; + signal: "uninstall,off"; + source: "menu"; + action: STATE_SET "default" 0.0; + target: "block_event"; + target: "uninstall"; + target: "uninstall_event"; + target: "uninstall_focus"; + } + program { + name: "uninstall,down"; + signal: "mouse,down,*"; + source: "uninstall_event"; + action: SIGNAL_EMIT "uninstall,down" "menu"; + after: "uninstall,down,after"; + } + program { + name: "uninstall,down,after"; + action: STATE_SET "edit,press" 0.0; + target: "uninstall"; + } + program { + name: "uninstall,up"; + signal: "mouse,up,*"; + source: "uninstall_event"; + action: SIGNAL_EMIT "uninstall,up" "menu"; + after: "uninstall,up,after"; + } + program { + name: "uninstall,up,after"; + action: STATE_SET "edit,release" 0.0; + target: "uninstall"; + } } } // group } // collections diff --git a/data/edje/layout_portrait.edc b/data/edje/layout_portrait.edc index da4dff1..dc95b87 100644 --- a/data/edje/layout_portrait.edc +++ b/data/edje/layout_portrait.edc @@ -1,35 +1,65 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +styles { + style { + name: "factory_text_style_big"; + base: "font=TIZEN:style=MEDIUM font_size=28 align=left valign=top color=#FFFFFF style=soft_shadow shadow_color=#00000060 ellipsis=1"; + + tag: "b" "+ font_weight=Bold"; + tag: "u" "+ underline=on underline_color=#FFFFFF"; + } + style { + name: "factory_text_style_small"; + base: "font=TIZEN:style=MEDIUM font_size=10 align=left valign=top color=#FFFFFF style=soft_shadow shadow_color=#00000060 ellipsis=1"; + + tag: "b" "+ font_weight=Bold"; + tag: "u" "+ underline=on underline_color=#FFFFFF"; + } + style { + name: "factory_text_style_middle"; + base: "font=TIZEN:style=MEDIUM font_size=17 align=left valign=top color=#FFFFFF style=soft_shadow shadow_color=#00000060 ellipsis=1"; + + tag: "b" "+ font_weight=Bold"; + tag: "u" "+ underline=on underline_color=#FFFFFF"; + } +} collections { + base_scale: 1.8; group { name: "layout"; parts { part { name: "bg"; - type: RECT; + type: SWALLOW; scale: 1; mouse_events: 1; description { state: "default" 0.0; rel1 { relative: 0.0 0.0; } rel2 { relative: 1.0 1.0; } - color: 0 0 0 0; visible: 0; } } @@ -45,9 +75,152 @@ collections { visible: 1; } } + + part { + name: "factory_bg"; + type: RECT; + scale: 1; + mouse_events: 1; + repeat_events: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.05 0.0; + to_x: "bg"; + to_y: "factory_text"; + offset: 0 -15; + } + rel2 { relative: 0.95 1.0; + to_x: "bg"; + to_y: "factory_text"; + offset: 0 15; + } + color: 0 0 0 125; + visible: 0; + } + description { + state: "show" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { + state: "show_small" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { + state: "show_middle" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: "factory_text"; + type: TEXTBLOCK; + scale: 1; + mouse_events: 1; + repeat_events: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.1 0.9; to, "bg"; } + rel2 { relative: 0.1 0.9; to, "bg"; } + text { + style: "factory_text_style_big"; + align: 0.0 0.5; + min: 1 1; + } + align: 0.0 1.0; + visible: 0; + } + description { + state: "show_big" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { + state: "show_small" 0.0; + inherit: "default" 0.0; + text { + style: "factory_text_style_small"; + } + visible: 1; + } + description { + state: "show_middle" 0.0; + inherit: "default" 0.0; + text { + style: "factory_text_style_middle"; + } + visible: 1; + } + } + part { + name: "content,blocker"; + type: RECT; + scale: 1; + mouse_events: 1; + repeat_events: 0; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; } + rel2 { relative: 1.0 1.0; } + color: 0 0 0 0; + visible: 0; + } + description { + state: "block" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } } programs { + program { + name: "block,content"; + signal: "block"; + source: "layout"; + action: STATE_SET "block" 0.0; + target: "content,blocker"; + } + program { + name: "unblock,content"; + signal: "unblock"; + source: "layout"; + action: STATE_SET "default" 0.0; + target: "content,blocker"; + } + program { + name: "factory_text,hide"; + signal: "hide"; + source: "factory_text"; + action: STATE_SET "default" 0.0; + target: "factory_bg"; + target: "factory_text"; + } + program { + name: "factory_text,show"; + signal: "show"; + source: "factory_text"; + action: STATE_SET "show" 0.0; + target: "factory_bg"; + target: "factory_text"; + } + program { + name: "factory_text,show_small"; + signal: "show_small"; + source: "factory_text"; + action: STATE_SET "show_small" 0.0; + target: "factory_bg"; + target: "factory_text"; + } + program { + name: "factory_text,show_middle"; + signal: "show_middle"; + source: "factory_text"; + action: STATE_SET "show_middle" 0.0; + target: "factory_bg"; + target: "factory_text"; + } } } // group } // collections diff --git a/data/edje/pagecontrol.edc b/data/edje/pagecontrol.edc deleted file mode 100644 index ebb5c31..0000000 --- a/data/edje/pagecontrol.edc +++ /dev/null @@ -1,155 +0,0 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - - -collections { - group { - name: "elm/pagecontrol/base/default"; - - parts { - part { - name: "bg"; - type: RECT; - mouse_events: 1; - scale: 1; - description { - state: "default" 0.0; - color: 0 0 0 0; - } - } - part { - name: "elm.swallow.page"; - type: SWALLOW; - mouse_events: 1; - scale: 1; - description { - state: "default" 0.0; - min: 332 32; - } - } - } - } - - #define PAGE_ITEM(number) \ - group { \ - name: "elm/page/item/default_"number; \ - images { \ - image: "../images/RM06_App tray_page indicator.png" COMP; \ - image: "../images/RM06_App tray_page indicator_focus.png" COMP; \ - } \ - parts { \ - part { \ - name: "bg"; \ - type: RECT; \ - mouse_events: 0; \ - scale: 1; \ - description { \ - state: "default" 0.0; \ - min: 44 40; \ - max: 44 40; \ - align: 0.5 0.5; \ - color: 0 0 0 0; \ - } \ - } \ - part { \ - name: "indicator_1"; \ - mouse_events: 0; \ - scale: 1; \ - description { \ - state: "default" 0.0; \ - min: 8 8; \ - max: 8 8; \ - fixed: 1 1; \ - align: 0.5 0.5; \ - visible: 1; \ - rel1 { to: "bg"; } \ - rel2 { to: "bg"; } \ - image { \ - normal: "../images/RM06_App tray_page indicator.png"; \ - } \ - } \ - description { \ - state: "selected" 0.0; \ - inherit: "default" 0.0; \ - min: 8 8; \ - max: 8 8; \ - visible: 0; \ - } \ - } \ - part { \ - name: "indicator_2"; \ - mouse_events: 0; \ - scale: 1; \ - description { \ - state: "default" 0.0; \ - min: 8 8; \ - max: 8 8; \ - fixed: 1 1; \ - align: 0.5 0.5; \ - visible: 0; \ - rel1 { to: "bg"; } \ - rel2 { to: "bg"; } \ - image { \ - normal: "../images/RM06_App tray_page indicator_focus.png"; \ - } \ - } \ - description { \ - state: "selected" 0.0; \ - inherit: "default" 0.0; \ - min: 8 8; \ - max: 8 8; \ - visible: 1; \ - } \ - } \ - } \ - programs { \ - program { \ - name: "indicator_on"; \ - signal: "elm,state,indicator,on"; \ - source: "elm"; \ - action: STATE_SET "selected" 0.0; \ - target: "indicator_1"; \ - target: "indicator_2"; \ - } \ - program { \ - name: "indicator_off"; \ - signal: "elm,state,indicator,off"; \ - source: "elm"; \ - action: STATE_SET "default" 0.0; \ - target: "indicator_1"; \ - target: "indicator_2"; \ - } \ - program { \ - name: "indicator_clicked"; \ - signal: "mouse,clicked,1"; \ - source: "bg"; \ - action: SIGNAL_EMIT "clicked" "indicator_clicked"; \ - } \ - } \ - } \ - - PAGE_ITEM(1) - PAGE_ITEM(2) - PAGE_ITEM(3) - PAGE_ITEM(4) - PAGE_ITEM(5) - PAGE_ITEM(6) - PAGE_ITEM(7) - PAGE_ITEM(8) - PAGE_ITEM(9) - PAGE_ITEM(10) -} diff --git a/data/icons/org.tizen.menu-screen.png b/data/icons/org.tizen.menu-screen.png new file mode 100755 index 0000000000000000000000000000000000000000..ee06044c844a721994003827bd37464d62f999ce GIT binary patch literal 6016 zcmV-`7k}u9P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8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28}5PL1O0E>p928! WM<)VQ^V*UC0000c(O literal 0 HcmV?d00001 diff --git a/data/images/RM06_App_tray_setting_press.png b/data/images/RM06_App_tray_setting_press.png new file mode 100644 index 0000000000000000000000000000000000000000..38589452b10dbc74e28bf0966d70bb16d0b04902 GIT binary patch literal 3331 zcmV+e4gB(nP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^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u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0006mNkl8nu5XXNG0&ac+KR^}l)(fPWTW8P5T%&sd&ndD8>72TI+Rm-B z$JtZ&0rUjgytvB|AP9;&OSF)nI)IQs@#BBT{~hn_!FIdlHOK+4M0%kAEzrYI=Vr5M zvep$a4fHR7>s=Ny#_ZLiM-~0qOFQ~1KzY|dGvHC$@s418CC;6-R2CnE0)Bv_8SoVt zI(i zIXVLFl}BGldjcjhcceV}Q<)pI=%I4+Tj6QU8eb}`k_Q~fmum~Mt=Gr6dMm9?&Lhf> zQ{7Bc1;`Az5ru5KapL46qR_NW9L-M z&_{*y*v&Q0<~mEAQug@Anxofv_-}c>SBxLZICoxWNl7WsiE{kJo7ZRfRrGjJj(^yJ zR!M=rb+V{ZL6fC7PeUtJc*@12--xH~GdvZ*56LSEW6Zkg%~S=%t%ovT<|Wlj3G#O1 znKWNMIu>u7=B2tqt3Y;gg<1f2k)$J+@3WdbpmizIB+V;K<8?gWSGjDn`VsK1#`0_6n{e>V3t`F1Wgn~!Nel1WeFW&GSEd{T zpXL3+FCg0jt&``vGWezZNVeK%xqXm0yoBUWip2;0pA9|G9%vf*HvmSh+wWys4MP9` N002ovPDHLkV1iQ`Ktlik literal 0 HcmV?d00001 diff --git a/data/images/btn_edit_nor.9.png b/data/images/btn_edit_nor.9.png new file mode 100644 index 0000000000000000000000000000000000000000..1cb7440890f476a5d8449d826e6dfc32f60c68b3 GIT binary patch literal 6025 zcmV;47k220P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgW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Ns{87`&8JLtlw-1 z0!wFWllR}dKoAzF)*5Kj7uw_sBjlx(<)z=r0lSYQsS1JG!Gn{3?@`ZM8!+gCcu&-A z(`j!}EEJfXo2OVRlcp)oxn1dFYo#)<*3#{Excb2ry4^12$_T|$8Ldr5Y8l5eZ2a?Pnu-{v{dgTnTc{h>l zJ>?rK>eG)37^X% zlO!gNBGNP=&9i)8A#nSQoGFQI5MXUUSSXUoxzsJ1Q11nQs~~n`r)KOEgC5H2l_#Hk z>e(w-KKNSd{cjp$bLq3`Gp|`4&B?fdaGiUUK4(w1&&SQuXRGzU&Cbqz_x0Cbd+~O) zc-KG=eJ}tjj~+YmmFqWdd`*PU-(KXd1~($_7~M5PqlQ^$xs%BKfA@`#fA^iYfAW1Y z@#{TpZ`h6P37w+QyaL?49K@2gAK>PwF4T+mu{R@$BjrrT-rQPx$hPm#|>k00000NkvXXu0mjf DRRFHd literal 0 HcmV?d00001 diff --git a/data/images/btn_edit_press.9.png b/data/images/btn_edit_press.9.png new file mode 100644 index 0000000000000000000000000000000000000000..8619ff3cad9200043031203e8902d12364b48ae8 GIT binary patch literal 6603 zcmV;+88qgJP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*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z Z4gkKT&JQGniW>j`002ovPDHLkV1ndu)l2{Y literal 0 HcmV?d00001 diff --git a/data/images/icon_btn_edit_nor.png b/data/images/icon_btn_edit_nor.png new file mode 100644 index 0000000000000000000000000000000000000000..f79ea9250caf0c5108cf7053b777e7e0e43b079e GIT binary patch literal 1468 zcmeAS@N?(olHy`uVBq!ia0vp^${@_a1|;QfZjJ;}k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDi`X>M-r=;Y$&Xk=n(Xy|HWY3SzYW@zf-;^yXN z>1JpE)9aF-T$-DjR|3-)y{k_+Y+zn(Lh=K<@U2KEi?7Z_GX z1T?PlQcAUUa2S9eB!4kHFoYko=eh#t_NAK+!^vPV*BCyldmjJzAHb|;J^|N zg~QBKOoGg(HJ9xO(n;3z!*Lxp)=lsqez#=27#`SagajFuk3v z&m($M%V6K6CvpZX76QqP2?q`=T&~!7U5@|K}nvxw)_)B8>tuhLmrW?=ql!Lu_O)3}UN8=tEy zE>XW=U0ada`1ibe=^2N0pHFO4XODGy_*tRh=Jy$uleHOceSdqaE7ITXp2Mbl)m}G6 zH_aE3NS>Fuan-V@d@T+)bH>bqBSNe7&HGJQ6~qlSg=e6!?Mc9gz0JiyU(qUcSqCG&;Q{pW22x3kKA(YT*p7puOZ jdV9pS#dSM>i6t-u8}4_nK2kdcRGxae`njxgN@xNAD-0U? literal 0 HcmV?d00001 diff --git a/data/images/icon_btn_edit_press.png b/data/images/icon_btn_edit_press.png new file mode 100644 index 0000000000000000000000000000000000000000..aaaa7fab503bd3ac7b7207e6decb693912ba771d GIT binary patch literal 1375 zcmeAS@N?(olHy`uVBq!ia0vp^${@_a1|;QfZjJ;}k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDkcXl!6)>}F!*Xk=n(Xy|HWVP@{^Xlm@_=;-WZ zY3k|%)9aF-T$-DjR|3Q!gkfv4~Pj*wm=R%;iu*SQ+p9GSx@wJJIlbpc-hm%F{I+w zo(S%V%?1Kz7cy{KvU@yGxxy$kp`kUnfkmZ&uZg)}g4K!Eb7^Wzf9_E^F#G1qDS2k= zXa8kgHYI7nl_)FS)zfC~`~BtH{nlxA3%)CM2wgYIn)pig(B_LJ7bb6+H{a1s!+u%w zJBbTZ!zUZIM76ueaJ>8aHA&>ynx&~vZ)~Y)7ttz{-!|jW+>}KfvcYRpm!1!@c{yXA zp;1it0$=fL$6_JD*%u!DINX2TkV#Xrd5MxbcTSJm*4IqVzjr+gP-y3=-d%Tg#gWxc z=S}8Ko6s~bRmX{Q>8-fc0VV1SmOVPbe_o#R+xD30zb;tqF=lw((kW@Oc*24w^VZ3~ z&fU5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cb*;vvQ0<8=Dm za6v!hkNl<-I%aXR;=fwO@4fzWT-W?@%}0#V1r-R+#ja)74F8 zrY0+?@j^ve^3e;&I;-*mE>aAeijq!wiWn^g9VM!wL?tj8vkkm|b@&P@N+R(OVv-d( zaXa0#o1!F9Z)Z`eAabaCY-ihRkG545JVILA!p95DI2F>(Tnpv=~tV;`W_tQAJY!${CvJX5Wm8YKgZ z6p_eh%V=Va8P7;btZvYDU1tO$tlaOK{h9oKM#l&kw2hIbk|&sRiCw2%6aE!o0CWl| U9b!e3T>t<807*qoM6N<$f~Z@#n*aa+ literal 0 HcmV?d00001 diff --git a/data/images/page indicator.png b/data/images/page indicator.png new file mode 100644 index 0000000000000000000000000000000000000000..28081e7b1d23685ab1db57b790a9b87dc26f6e9f GIT binary patch literal 412 zcmeAS@N?(olHy`uVBq!ia0vp^N+8U^3=*07`vZ__4DbnY{r~?zkXc+>JWxp8bQUAf z1zIIRe!&b3awm=X+ih-K`YF-7i}RieTbFkTbIZex$F|p*t@w7hV*Zw^x21Iz*Lm=S z7;FRTTHxv87*Y{;_40MD!v;KU7pv0DU;2EXSM{G=M^_@nTcK*^`(F*lb^UEKxH4x) zu63G{asSZvYuWRBma%h8{W?SOs#L);r6ZyO(|1qVqmVm!g5-r~hME$S^bKw@hPR!Z zrt0nUO(!z3D5dk@l8GlH?Ov$ZzjLn0e0cfqN9HT79c?`iXLZb8JlSZXL3!B>Rav#U p<^P#$|E4^Xef8#c*^5a$8~88naoFV&+5-xI22WQ%mvv4FO#q@YuQC7t literal 0 HcmV?d00001 diff --git a/data/images/page indicator_focus.png b/data/images/page indicator_focus.png new file mode 100644 index 0000000000000000000000000000000000000000..42beee6e463acb06c956f2e9c6b24463f107d220 GIT binary patch literal 391 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM3?#3wJbMaAH3s;Exc>kDpP_XL4N>P324n=W z3nBt$&leQ@1ayp6NswPK!yiT6X+l4F9*WLsTzcu%Jp;4n-_Ex%tJFzzPL|L*^F+eZ zY`(PmjTT-0D}SQ-fx5aqT^vIy;z}=G=R2&x(-tVKu=(Y^>i++K@g1ocsU) literal 0 HcmV?d00001 diff --git a/data/main_operation.launch b/data/main_operation.launch new file mode 100644 index 0000000..5bac5ca --- /dev/null +++ b/data/main_operation.launch @@ -0,0 +1,2 @@ +org.tizen.phone +org.tizen.contacts diff --git a/data/org.tizen.menu-screen.desktop.in b/data/org.tizen.menu-screen.desktop.in deleted file mode 100644 index a762e53..0000000 --- a/data/org.tizen.menu-screen.desktop.in +++ /dev/null @@ -1,7 +0,0 @@ -Name=Simple Menu Screen -Type=Application -Exec=@EXEC_PREFIX@/@PROJECT_NAME@ -Icon=@PACKAGE_NAME@.png -NoDisplay=True -X-Tizen-TaskManage=False -X-Tizen-Removable=False diff --git a/data/org.tizen.menu-screen.xml.in b/data/org.tizen.menu-screen.xml.in index 732d48e..75ab124 100755 --- a/data/org.tizen.menu-screen.xml.in +++ b/data/org.tizen.menu-screen.xml.in @@ -1,10 +1,13 @@ - - - - Jin Yoon - Youngjoo Park - Menu-screen Application - - - - + + + + Jin Yoon + Junkyu Han + Youngjoo Park + Simple Menu-screen Application + + + + /usr/share/icons/default/small/org.tizen.menu-screen.png + + diff --git a/data/po/CMakeLists.txt b/data/po/CMakeLists.txt new file mode 100644 index 0000000..e804a6a --- /dev/null +++ b/data/po/CMakeLists.txt @@ -0,0 +1,76 @@ +# for i18n + +SET(POFILES + ar.po + az.po + bg.po + ca.po + cs.po + da.po + de.po + el_GR.po + en.po + en_PH.po + en_US.po + es_ES.po + es_US.po + et.po + eu.po + fi.po + fr_CA.po + fr.po + ga.po + gl.po + hi.po + hr.po + hu.po + hy.po + is.po + it_IT.po + ja_JP.po + ka.po + kk.po + ko_KR.po + lt.po + lv.po + mk.po + nb.po + nl.po + pl.po + pt_BR.po + pt_PT.po + ro.po + ru_RU.po + sk.po + sl.po + sr.po + sv.po + tr_TR.po + uk.po + uz.po + zh_CN.po + zh_HK.po + zh_TW.po + zh_SG.po +) + +SET(MSGFMT "/usr/bin/msgfmt") + +MESSAGE(STATUS "po files ---") +FOREACH(pofile ${POFILES}) + SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile}) + MESSAGE(STATUS " ${pofile}") + GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE) + GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE) + SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo) + ADD_CUSTOM_COMMAND( + OUTPUT ${moFile} + COMMAND ${MSGFMT} -o ${moFile} ${absPofile} + DEPENDS ${absPofile} + ) + INSTALL(FILES ${moFile} + DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo) + SET(moFiles ${moFiles} ${moFile}) +ENDFOREACH(pofile) + +ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles}) diff --git a/data/po/ar.po b/data/po/ar.po new file mode 100644 index 0000000..319a578 --- /dev/null +++ b/data/po/ar.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "تم" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "هل تريد إلغاء تثبيت %s؟" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "إلغاء التثبيت" + diff --git a/data/po/az.po b/data/po/az.po new file mode 100644 index 0000000..b6bf270 --- /dev/null +++ b/data/po/az.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Tamam" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "%s silinsin?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Quraşdırılma ləğv edilsin" + diff --git a/data/po/bg.po b/data/po/bg.po new file mode 100644 index 0000000..f82bad0 --- /dev/null +++ b/data/po/bg.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Готово" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Деинсталиране на %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Деинсталиране" + diff --git a/data/po/ca.po b/data/po/ca.po new file mode 100644 index 0000000..cc107cf --- /dev/null +++ b/data/po/ca.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Fet" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Desinstal·lar %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Desinstal·lar" + diff --git a/data/po/cs.po b/data/po/cs.po new file mode 100644 index 0000000..792da6b --- /dev/null +++ b/data/po/cs.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Hot." + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Odinstalovat %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Odinstalovat" + diff --git a/data/po/da.po b/data/po/da.po new file mode 100644 index 0000000..0acd840 --- /dev/null +++ b/data/po/da.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Udført" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Afinstallér %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Afinstallér" + diff --git a/data/po/de.po b/data/po/de.po new file mode 100755 index 0000000..b356e8b --- /dev/null +++ b/data/po/de.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Fertig" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "%s deinstallieren?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Deinstallieren" + diff --git a/data/po/de_DE.po b/data/po/de_DE.po new file mode 100644 index 0000000..f5f4d32 --- /dev/null +++ b/data/po/de_DE.po @@ -0,0 +1,8 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Fertig" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "%s deinstallieren?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Deinstallieren" \ No newline at end of file diff --git a/data/po/el_GR.po b/data/po/el_GR.po new file mode 100644 index 0000000..094af6f --- /dev/null +++ b/data/po/el_GR.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Τέλος" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Κατάργηση της εγκατάστασης του %s;" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Κατάργηση εγκατάστασης" + diff --git a/data/po/en.po b/data/po/en.po new file mode 100644 index 0000000..43627f4 --- /dev/null +++ b/data/po/en.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Done" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Uninstall %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Uninstall" + diff --git a/data/po/en_PH.po b/data/po/en_PH.po new file mode 100644 index 0000000..43627f4 --- /dev/null +++ b/data/po/en_PH.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Done" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Uninstall %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Uninstall" + diff --git a/data/po/en_US.po b/data/po/en_US.po new file mode 100644 index 0000000..43627f4 --- /dev/null +++ b/data/po/en_US.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Done" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Uninstall %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Uninstall" + diff --git a/data/po/es_ES.po b/data/po/es_ES.po new file mode 100644 index 0000000..0678bb5 --- /dev/null +++ b/data/po/es_ES.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Hecho" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "¿Desinstalar %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Desinstalar" + diff --git a/data/po/es_MX.po b/data/po/es_MX.po new file mode 100644 index 0000000..279a111 --- /dev/null +++ b/data/po/es_MX.po @@ -0,0 +1,8 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Realiz." + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "¿Desinstalar %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Desinstalar" \ No newline at end of file diff --git a/data/po/es_US.po b/data/po/es_US.po new file mode 100755 index 0000000..c83a4b6 --- /dev/null +++ b/data/po/es_US.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Aceptar" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "¿Desinstalar %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Desinstalar" + diff --git a/data/po/et.po b/data/po/et.po new file mode 100644 index 0000000..ff243b2 --- /dev/null +++ b/data/po/et.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Valmis" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Kas desinstallida %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Deinstalli" + diff --git a/data/po/eu.po b/data/po/eu.po new file mode 100644 index 0000000..9bbcfbe --- /dev/null +++ b/data/po/eu.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Egina" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Desinstalatu %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Desinstalatu" + diff --git a/data/po/fa.po b/data/po/fa.po new file mode 100755 index 0000000..e77e4a2 --- /dev/null +++ b/data/po/fa.po @@ -0,0 +1,8 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "انجام شد" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "لغو نصب %s؟" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "لغو نصب" diff --git a/data/po/fi.po b/data/po/fi.po new file mode 100644 index 0000000..73c0bc1 --- /dev/null +++ b/data/po/fi.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Valmis" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Poistetaanko kohteen %s asennus?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Poista asennus" + diff --git a/data/po/fr.po b/data/po/fr.po new file mode 100755 index 0000000..a08eb14 --- /dev/null +++ b/data/po/fr.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "OK" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Désinstaller %s ?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Désinstaller" + diff --git a/data/po/fr_CA.po b/data/po/fr_CA.po new file mode 100644 index 0000000..a08eb14 --- /dev/null +++ b/data/po/fr_CA.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "OK" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Désinstaller %s ?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Désinstaller" + diff --git a/data/po/fr_FR.po b/data/po/fr_FR.po new file mode 100644 index 0000000..7977fd8 --- /dev/null +++ b/data/po/fr_FR.po @@ -0,0 +1,8 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "OK" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Désinstaller %s ?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Désinstaller" \ No newline at end of file diff --git a/data/po/ga.po b/data/po/ga.po new file mode 100644 index 0000000..58c44f0 --- /dev/null +++ b/data/po/ga.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Déanta" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Díshuiteáil %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Díshuiteáil" + diff --git a/data/po/gl.po b/data/po/gl.po new file mode 100644 index 0000000..d6b9554 --- /dev/null +++ b/data/po/gl.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Feito" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Desexas desinstalar %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Desinstalar" + diff --git a/data/po/hi.po b/data/po/hi.po new file mode 100644 index 0000000..463c733 --- /dev/null +++ b/data/po/hi.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "पूर्ण" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "%s की स्थापना रद्द करें?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "स्थापना रद्द करें" + diff --git a/data/po/hr.po b/data/po/hr.po new file mode 100644 index 0000000..abe4bc5 --- /dev/null +++ b/data/po/hr.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "OK" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Deinstalirati %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Deinstaliraj" + diff --git a/data/po/hu.po b/data/po/hu.po new file mode 100644 index 0000000..a2deccc --- /dev/null +++ b/data/po/hu.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Kész" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Eltávolítja a(z) %s animált emotikont?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Eltávolítás" + diff --git a/data/po/hy.po b/data/po/hy.po new file mode 100644 index 0000000..7c199dd --- /dev/null +++ b/data/po/hy.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Արված է" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Ապատեղադրե՞լ %s-ը:" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Ապատեղադրել" + diff --git a/data/po/is.po b/data/po/is.po new file mode 100644 index 0000000..78593e2 --- /dev/null +++ b/data/po/is.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Lokið" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Fjarlægja %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Fjarlægja" + diff --git a/data/po/it_IT.po b/data/po/it_IT.po new file mode 100644 index 0000000..ccaa8bc --- /dev/null +++ b/data/po/it_IT.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Fatto" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Disinstallare %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Disinstalla" + diff --git a/data/po/ja_JP.po b/data/po/ja_JP.po new file mode 100644 index 0000000..3396a50 --- /dev/null +++ b/data/po/ja_JP.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "完了" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "%sをアンインストールしますか?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "アンインストール" + diff --git a/data/po/ka.po b/data/po/ka.po new file mode 100644 index 0000000..5143b50 --- /dev/null +++ b/data/po/ka.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "შესრულდა" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "ამოინსტალირდეს %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "ინსტალაციის გაუქმება" + diff --git a/data/po/kk.po b/data/po/kk.po new file mode 100644 index 0000000..42005b6 --- /dev/null +++ b/data/po/kk.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Дайын" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "%s жою керек пе?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Жою" + diff --git a/data/po/ko_KR.po b/data/po/ko_KR.po new file mode 100644 index 0000000..f7f6c2c --- /dev/null +++ b/data/po/ko_KR.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "완료" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "%s을(를) 삭제할까요?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "삭제" + diff --git a/data/po/lt.po b/data/po/lt.po new file mode 100644 index 0000000..357647f --- /dev/null +++ b/data/po/lt.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Atlikta" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Pašalinti „%s“?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Pašalinti" + diff --git a/data/po/lv.po b/data/po/lv.po new file mode 100644 index 0000000..3aeba4d --- /dev/null +++ b/data/po/lv.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Gatavs" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Vai atinstalēt %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Atinstalēt" + diff --git a/data/po/mk.po b/data/po/mk.po new file mode 100644 index 0000000..2ff16dc --- /dev/null +++ b/data/po/mk.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Готово" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Да се деинсталира %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Деинсталирај" + diff --git a/data/po/nb.po b/data/po/nb.po new file mode 100644 index 0000000..e6961ca --- /dev/null +++ b/data/po/nb.po @@ -0,0 +1,8 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Utført" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Avinstallere %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Avinstaller" \ No newline at end of file diff --git a/data/po/nl.po b/data/po/nl.po new file mode 100755 index 0000000..2084f23 --- /dev/null +++ b/data/po/nl.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Gereed" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "%s verwijderen?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Verwijderen" + diff --git a/data/po/nl_NL.po b/data/po/nl_NL.po new file mode 100644 index 0000000..f29bdb7 --- /dev/null +++ b/data/po/nl_NL.po @@ -0,0 +1,8 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Gereed" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "%s verwijderen?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Verwijderen" \ No newline at end of file diff --git a/data/po/pl.po b/data/po/pl.po new file mode 100644 index 0000000..092015d --- /dev/null +++ b/data/po/pl.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Gotowe" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Odinstalować %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Odinstaluj" + diff --git a/data/po/pt_BR.po b/data/po/pt_BR.po new file mode 100644 index 0000000..c173dd4 --- /dev/null +++ b/data/po/pt_BR.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "OK" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Desinstalar %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Desinstalar" + diff --git a/data/po/pt_PT.po b/data/po/pt_PT.po new file mode 100644 index 0000000..77e33c5 --- /dev/null +++ b/data/po/pt_PT.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Concluir" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Desinstalar %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Desinstalar" + diff --git a/data/po/ro.po b/data/po/ro.po new file mode 100644 index 0000000..ba7787e --- /dev/null +++ b/data/po/ro.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Efectuat" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Dezinstalaţi %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Dezinstalare" + diff --git a/data/po/ru_RU.po b/data/po/ru_RU.po new file mode 100644 index 0000000..576f9c2 --- /dev/null +++ b/data/po/ru_RU.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Готово" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Удалить %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Удалить" + diff --git a/data/po/sk.po b/data/po/sk.po new file mode 100644 index 0000000..20559e2 --- /dev/null +++ b/data/po/sk.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Hotovo" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Odinštalovať program %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Odinštalovať" + diff --git a/data/po/sl.po b/data/po/sl.po new file mode 100644 index 0000000..cf4858b --- /dev/null +++ b/data/po/sl.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Končano" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Želite odstraniti %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Odstrani" + diff --git a/data/po/sr.po b/data/po/sr.po new file mode 100644 index 0000000..e559c92 --- /dev/null +++ b/data/po/sr.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Gotovo" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Deinstalirati %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Deinstaliraj" + diff --git a/data/po/sv.po b/data/po/sv.po new file mode 100644 index 0000000..494db5b --- /dev/null +++ b/data/po/sv.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Klar" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Avinstallera %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Avinstallera" + diff --git a/data/po/th.po b/data/po/th.po new file mode 100755 index 0000000..57e613c --- /dev/null +++ b/data/po/th.po @@ -0,0 +1,8 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "เรียบร้อย" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "ถอนการติดตั้ง %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "ลบการติดตั้ง" diff --git a/data/po/tr_TR.po b/data/po/tr_TR.po new file mode 100644 index 0000000..e0a2c44 --- /dev/null +++ b/data/po/tr_TR.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Tamam" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "%s kaldırılsın mı?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Kaldır" + diff --git a/data/po/uk.po b/data/po/uk.po new file mode 100644 index 0000000..02250ae --- /dev/null +++ b/data/po/uk.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "Готово" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "Видалити %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Видалити" + diff --git a/data/po/ur.po b/data/po/ur.po new file mode 100755 index 0000000..08ede49 --- /dev/null +++ b/data/po/ur.po @@ -0,0 +1,8 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "مکمل" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "%s نا تنصیب کریں؟" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "نا تنصیب کریں" diff --git a/data/po/uz.po b/data/po/uz.po new file mode 100644 index 0000000..6234c67 --- /dev/null +++ b/data/po/uz.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "OK" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "%s olib tashlansinmi?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "Olib tashlash" + diff --git a/data/po/zh_CN.po b/data/po/zh_CN.po new file mode 100644 index 0000000..e47a0ee --- /dev/null +++ b/data/po/zh_CN.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "完成" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "是否卸载 %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "卸载" + diff --git a/data/po/zh_HK.po b/data/po/zh_HK.po new file mode 100644 index 0000000..81236c8 --- /dev/null +++ b/data/po/zh_HK.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "完成" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "解除安裝 %s 嗎?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "解除安裝" + diff --git a/data/po/zh_SG.po b/data/po/zh_SG.po new file mode 100644 index 0000000..781b4f0 --- /dev/null +++ b/data/po/zh_SG.po @@ -0,0 +1,8 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "完成" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "是否卸载 %s?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "卸载" \ No newline at end of file diff --git a/data/po/zh_TW.po b/data/po/zh_TW.po new file mode 100644 index 0000000..629d4db --- /dev/null +++ b/data/po/zh_TW.po @@ -0,0 +1,9 @@ +msgid "IDS_HS_BUTTON_DONE" +msgstr "確定" + +msgid "IDS_AT_POP_UNINSTALL_PS_Q" +msgstr "解除安裝 %s 嗎?" + +msgid "IDS_AT_BODY_UNINSTALL" +msgstr "解除安裝" + diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 6b877ed..0000000 --- a/debian/changelog +++ /dev/null @@ -1,17 +0,0 @@ -org.tizen.menu-screen (1.0.13) unstable; urgency=low - - * Git: apps/home/menu-screen - * Tag: menu-screen_1.0.13 - - * modify the vconf key for the selected menu-screen. - - -- Jin Yoon Tue, 21 Aug 2012 10:37:58 +0900 - -org.tizen.menu-screen (1.0.12) unstable; urgency=low - - * Git: apps/home/menu-screen - * Tag: menu-screen_1.0.12 - - * [Modify] Environment for ELM_ENGINE, ELM_FPS - - -- Jin Yoon Wed, 02 May 2012 19:00:43 +0900 diff --git a/debian/compat b/debian/compat deleted file mode 100644 index 7ed6ff8..0000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/debian/control b/debian/control deleted file mode 100644 index 1a1fe81..0000000 --- a/debian/control +++ /dev/null @@ -1,19 +0,0 @@ -Source: menu-screen -Section: utils -Priority: extra -Maintainer: Jin Yoon -Build-Depends: debhelper (>= 5), libelm-dev, libslp-utilx-dev, libslp-setting-dev, libefreet-dev, libslp-sysman-dev, libslp-pm-dev, dlog-dev, libecore-dev, libaul-1-dev, libpkgmgr-client-dev, syspopup-caller-dev, libheynoti-dev, libail-0-dev, librua-dev, libslp-shortcut-dev, menu-daemon, capi-appfw-application-dev -Homepage: N/A -Standards-Version: 0.1.0 - -Package: org.tizen.menu-screen -Section: utils -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libelm, libeina, libslp-utilx-0, libslp-setting-0, libefreet, libslp-sysman, libslp-pm-0, libdlog-0, libaul-1, libpkgmgr-client-0, syspopup-caller-0, libheynoti-0, libail-0, menu-daemon, capi-appfw-application -Description: inhouse menu-screen - -Package: org.tizen.menu-screen-dbg -Section: debug -Architecture: any -Depends: org.tizen.menu-screen (= ${Source-Version}) -Description: inhouse menu-screen (unstripped) diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index e69de29..0000000 diff --git a/debian/jobs b/debian/jobs deleted file mode 100644 index e69de29..0000000 diff --git a/debian/org.tizen.menu-screen.install.in b/debian/org.tizen.menu-screen.install.in deleted file mode 100644 index 2f9f68e..0000000 --- a/debian/org.tizen.menu-screen.install.in +++ /dev/null @@ -1,2 +0,0 @@ -/opt/apps/org.tizen.menu-screen/* -/opt/share/packages/* diff --git a/debian/org.tizen.menu-screen.postinst b/debian/org.tizen.menu-screen.postinst deleted file mode 100644 index 129d28f..0000000 --- a/debian/org.tizen.menu-screen.postinst +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -INHOUSE_ID="5000" - -init_vconf() -{ - # for menu daemon - vconftool set -t int memory/menu-screen/is_menu_screen_done 0 -i -f - - # for menu-screen - vconftool set -t int memory/idle_screen/top 0 -i -u 5000 -f - vconftool set -t string db/setting/menuscreen/package_name "org.tizen.menu-screen" -i -u 5000 -f -} - - - -init_vconf - -# End of a file diff --git a/debian/rules b/debian/rules deleted file mode 100755 index 7fb4408..0000000 --- a/debian/rules +++ /dev/null @@ -1,153 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -CFLAGS += -Wall -fPIC -fpie -CXXFLAGS += -Wall -fPIC -fpie -LDFLAGS ?= -PREFIX ?= /usr -DATADIR ?= /opt - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 - CXXFLAGS += -O0 -else - CFLAGS += -O2 - CXXFLAGS += -O2 -endif - -ifneq (,$(findstring arm,$(DEB_HOST_ARCH))) - export ARCH = arm -else - export ARCH = i686 -endif - -LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--hash-style=both -Wl,--as-needed -pie - -configure: configure-stamp -configure-stamp: - dh_testdir - # Add here commands to configure the package. - CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake . -DCMAKE_INSTALL_PREFIX=$(PREFIX) - - touch configure-stamp - -build: build-stamp - -build-stamp: configure-stamp - dh_testdir - - # Add here commands to compile the package. - $(MAKE) - #docbook-to-man debian/wavplayer.sgml > wavplayer.1 - - for f in `find $(CURDIR)/debian/ -name "*.in"`; do \ - cat $$f > $${f%.in}; \ - sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \ - sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \ - done - - - touch $@ - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - - # Add here commands to clean up after the build process. - -$(MAKE) clean - rm -rf CMakeCache.txt - rm -rf CMakeFiles - rm -rf cmake_install.cmake - rm -rf Makefile - rm -rf install_manifest.txt - - rm -rf data/CMakeCache.txt - rm -rf data/CMakeFiles - rm -rf data/cmake_install.cmake - rm -rf data/install_manifest.txt - rm -rf data/Makefile - - rm -rf data/themes/CMakeCache.txt - rm -rf data/themes/CMakeFiles - rm -rf data/themes/cmake_install.cmake - rm -rf data/themes/install_manifest.txt - rm -rf data/themes/Makefile - - rm -rf data/kdm/CMakeCache.txt - rm -rf data/kdm/CMakeFiles - rm -rf data/kdm/cmake_install.cmake - rm -rf data/kdm/install_manifest.txt - rm -rf data/kdm/Makefile - - rm -rf data/po/CMakeCache.txt - rm -rf data/po/CMakeFiles - rm -rf data/po/cmake_install.cmake - rm -rf data/po/install_manifest.txt - rm -rf data/po/Makefile - - rm -rf data/themes/*.edj - rm -rf data/*.edj - rm -rf *.so - - for f in `find $(CURDIR)/debian/ -name "*.in"`; do \ - rm -f $${f%.in}; \ - done - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/wavplayer. - $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install - - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot -# dh_installchangelogs -# dh_installdocs -# dh_installexamples - dh_install --sourcedir=debian/tmp -# dh_installmenu -# dh_installdebconf -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_python -# dh_installinit -# dh_installcron -# dh_installinfo - dh_installman - dh_link - dh_strip --dbg-package=org.tizen.menu-screen-dbg - dh_compress - dh_fixperms -# dh_perl - dh_makeshlibs - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/include/all_apps/db.h b/include/all_apps/db.h new file mode 100644 index 0000000..08997d5 --- /dev/null +++ b/include/all_apps/db.h @@ -0,0 +1,50 @@ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef __MENU_SCREEN_ALL_APPS_DB_H__ +#define __MENU_SCREEN_ALL_APPS_DB_H__ + +#include "Elementary.h" +#include "util.h" + +typedef struct _db_info { + long long rowid; + int type; + char *appid; + char *name; + char *content_info; + char *icon; +} db_info; + +extern menu_screen_error_e all_apps_db_init(void); +extern void all_apps_db_fini(void); + +extern Eina_List *all_apps_db_retrieve_all_info(void); +extern void all_apps_db_unretrieve_info(db_info *info); +extern void all_apps_db_unretrieve_all_info(Eina_List *list); + +extern long long all_apps_db_insert_shortcut(const char *appid, const char *name, int type, const char *content_info, const char *icon); +extern menu_screen_error_e all_apps_db_delete_shortcut(long long rowid); +extern int all_apps_db_count_shortcut(const char *appid, const char *name); + +#endif // __MENU_SCREEN_ALL_APPS_DB_H__ +// End of file diff --git a/include/all_apps/layout.h b/include/all_apps/layout.h index 71eac50..f3d6151 100644 --- a/include/all_apps/layout.h +++ b/include/all_apps/layout.h @@ -1,27 +1,35 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #ifndef _MENU_SCREEN_CONTROLBAR_ALL_APPS_H_ #define _MENU_SCREEN_CONTROLBAR_ALL_APPS_H_ #include -#define PAGE_MAX_APP 20 +#define PAGE_MAX_APP 16 + +extern bool all_apps_layout_is_edited(Evas_Object *all_apps); +extern void all_apps_layout_edit(Evas_Object *all_apps); +extern void all_apps_layout_unedit(Evas_Object *all_apps); extern Evas_Object *all_apps_layout_create(Evas_Object *controlbar, int rotate); extern void all_apps_layout_destroy(Evas_Object *all_apps); diff --git a/include/all_apps/list.h b/include/all_apps/list.h index 7197f50..126aed8 100644 --- a/include/all_apps/list.h +++ b/include/all_apps/list.h @@ -1,25 +1,30 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #ifndef __MENU_SCREEN_LIST_ALL_APPS_H__ #define __MENU_SCREEN_LIST_ALL_APPS_H__ extern app_list *all_apps_list_create(void); +extern int all_apps_list_find_installed_time(const char *id); extern void all_apps_list_destroy(app_list *list); #endif //__MENU_SCREEN_LIST_ALL_APPS_H__ diff --git a/include/all_apps/shortcut.h b/include/all_apps/shortcut.h new file mode 100644 index 0000000..2421671 --- /dev/null +++ b/include/all_apps/shortcut.h @@ -0,0 +1,39 @@ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef _MENU_SCREEN_ALL_APPS_SHORTCUT_H_ +#define _MENU_SCREEN_ALL_APPS_SHORTCUT_H_ + +#include +#include + +extern Evas_Object *all_apps_shortcut_add(Evas_Object *scroller, long long rowid, const char *pkgname, const char *exec, const char *name, const char *icon, int type); +extern void all_apps_shortcut_remove(Evas_Object *item); + +extern menu_screen_error_e all_apps_shortcut_add_all(Evas_Object *scroller); + +extern bool all_apps_shortcut_init(Evas_Object *all_apps); +extern void all_apps_shortcut_fini(void); + +#endif // _MENU_SCREEN_ALL_APPS_SHORTCUT_H_ + +// End of a file diff --git a/include/conf.h b/include/conf.h index 0df39be..47cb96c 100644 --- a/include/conf.h +++ b/include/conf.h @@ -1,30 +1,45 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #ifndef _MENU_SCREEN_CONF_H_ #define _MENU_SCREEN_CONF_H_ -#define MAX_PAGE_NO 9 +#define MAX_PAGE_NO 10 #define BASE_HEIGHT 1280.0f #define BASE_WIDTH 720.0f -#define PAGE_PORTRAIT_HEIGHT 1060.0f +#define INDICATOR_PORT_HEIGHT 70 +#define INDICATOR_HEIGHT_PROP (INDICATOR_PORT_HEIGHT/BASE_HEIGHT) + +#define PAGE_PORTRAIT_HEIGHT 1030.0f +#define INDEX_HEIGHT 70 + +#define ITEM_WIDTH 180.0 //180.0 +#define LITE_ITEM_WIDTH 90.0 +#define ITEM_WIDTH_PROP (ITEM_WIDTH/BASE_WIDTH) +#define ITEM_HEIGHT 198.0 //198.0 +#define LITE_ITEM_HEIGHT 99.0 +#define ITEM_HEIGHT_PROP (ITEM_HEIGHT/BASE_HEIGHT) #endif // _MENU_SCREEN_CONF_H_ diff --git a/include/db.h b/include/db.h new file mode 100644 index 0000000..5ec5bd9 --- /dev/null +++ b/include/db.h @@ -0,0 +1,53 @@ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef __MENU_SCREEN_DB_H__ +#define __MENU_SCREEN_DB_H__ + +#include + +#include "util.h" + +typedef struct stmt stmt_h; + +extern stmt_h *db_prepare(const char *query); +extern menu_screen_error_e db_bind_bool(stmt_h *handle, int idx, bool value); +extern menu_screen_error_e db_bind_int(stmt_h *handle, int idx, int value); +extern menu_screen_error_e db_bind_str(stmt_h *handle, int idx, const char *str); +extern menu_screen_error_e db_next(stmt_h *handle); +extern bool db_get_bool(stmt_h *handle, int index); +extern int db_get_int(stmt_h *handle, int index); +extern long long db_get_long_long(stmt_h *handle, int index); +extern const char *db_get_str(stmt_h *handle, int index); +extern menu_screen_error_e db_reset(stmt_h *handle); +extern menu_screen_error_e db_finalize(stmt_h *handle); +extern menu_screen_error_e db_exec(const char *query); +extern long long db_last_insert_rowid(void); + +extern menu_screen_error_e db_open(const char *db_file); +extern void db_close(void); + +extern menu_screen_error_e db_begin_transaction(void); +extern menu_screen_error_e db_end_transaction(bool success); + +#endif // __MENU_SCREEN_DB_H__ +// End of file diff --git a/include/index.h b/include/index.h index 1f3b75b..27ef1c0 100644 --- a/include/index.h +++ b/include/index.h @@ -1,35 +1,39 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 __APP_TRAY_PAGE_CONTROL_H__ -#define __APP_TRAY_PAGE_CONTROL_H__ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef __MENU_SCREEN_PAGE_CONTROL_H__ +#define __MENU_SCREEN_PAGE_CONTROL_H__ #include extern void index_bring_in(Evas_Object *index, int idx); -extern Evas_Object *index_create(Evas_Object *layout, unsigned int count); +extern Evas_Object *index_create(Evas_Object *layout, unsigned int count, unsigned int current_idx); extern Evas_Object *index_update(Evas_Object *layout, Evas_Object *index, unsigned int count); extern void index_destroy(Evas_Object *index); extern void index_show(Evas_Object *index); extern void index_hide(Evas_Object *index); -#endif //__APP_TRAY_PAGE_CONTROL_H__ +#endif //__MENU_SCREEN_PAGE_CONTROL_H__ // End of the file diff --git a/include/item.h b/include/item.h index 70844a3..a42d3c8 100644 --- a/include/item.h +++ b/include/item.h @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #ifndef __MENU_SCREEN_ITEM_H__ #define __MENU_SCREEN_ITEM_H__ @@ -30,6 +34,9 @@ extern void item_set_icon(Evas_Object *item, char *icon, int sync); extern char *item_get_name(Evas_Object *item); extern void item_set_name(Evas_Object *item, char *name, int sync); +extern void item_set_pkgid(Evas_Object *edje, char *package, int sync); +extern char *item_get_pkgid(Evas_Object *edje); + extern char *item_get_package(Evas_Object *item); extern void item_set_package(Evas_Object *item, char *package, int sync); @@ -42,9 +49,19 @@ extern void item_set_page(Evas_Object *edje, Evas_Object *page, int sync); extern char *item_get_desktop(Evas_Object *item); extern void item_set_desktop(Evas_Object *item, char *name, int sync); +extern int item_get_type(Evas_Object *item); +extern void item_set_type(Evas_Object *edje, int type, int sync); + extern void item_enable_delete(Evas_Object *obj); extern void item_disable_delete(Evas_Object *item); +extern void item_show_badge(Evas_Object *obj, int value); +extern void item_hide_badge(Evas_Object *obj); +extern int item_is_enabled_badge(Evas_Object *obj); + +extern void item_edit(Evas_Object *item); +extern void item_unedit(Evas_Object *item); + extern Evas_Object *item_create(Evas_Object *scroller, app_info_t* ai); extern void item_update(Evas_Object *item, app_info_t *ai); extern void item_destroy(Evas_Object *obj); diff --git a/include/item_badge.h b/include/item_badge.h new file mode 100644 index 0000000..659b323 --- /dev/null +++ b/include/item_badge.h @@ -0,0 +1,39 @@ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef __MENU_SCREEN_BADGE_H__ +#define __MENU_SCREEN_BADGE_H__ + +#include + +#include "util.h" + +extern menu_screen_error_e item_badge_register(Evas_Object *item); +extern void item_badge_unregister(Evas_Object *item); +extern bool item_badge_is_registered(Evas_Object *item); +extern int item_badge_count(char *package); + +extern void item_badge_register_changed_cb(Evas_Object *scroller); +extern void item_badge_unregister_changed_cb(void); + +#endif +// End of a file diff --git a/include/item_event.h b/include/item_event.h index 3e65df3..d140130 100644 --- a/include/item_event.h +++ b/include/item_event.h @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #ifndef __MENU_SCREEN_ITEM_EVENT_H__ #define __MENU_SCREEN_ITEM_EVENT_H__ diff --git a/include/key.h b/include/key.h new file mode 100644 index 0000000..b3bb91c --- /dev/null +++ b/include/key.h @@ -0,0 +1,35 @@ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef __MENU_SCREEN_INPUT_KEY_H__ +#define __MENU_SCREEN_INPUT_KEY_H__ + +#include "util.h" + +HAPI void key_register(void); +HAPI void key_unregister(void); +HAPI void key_grab_home(void); +HAPI void key_ungrab_home(void); + +#endif //__MENU_SCREEN_INPUT_KEY_H__ + +// End of a file diff --git a/include/layout.h b/include/layout.h index 8dc322d..4edc6b0 100644 --- a/include/layout.h +++ b/include/layout.h @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #ifndef __MENU_SCREEN_LAYOUT_H__ #define __MENU_SCREEN_LAYOUT_H__ @@ -22,7 +26,7 @@ #include #include "util.h" -extern Evas_Object *layout_create(Evas_Object *win, const char *file, const char *group, int rotate); +extern Evas_Object *layout_create(Evas_Object *conformant, const char *file, const char *group, int rotate); extern void layout_destroy(Evas_Object *layout); extern void layout_enable_block(Evas_Object *layout); @@ -31,6 +35,10 @@ extern void layout_disable_block(Evas_Object *layout); extern Evas_Object* layout_load_edj(Evas_Object *parent, const char *edjname, const char *grpname); extern void layout_unload_edj(Evas_Object *layout); +HAPI void layout_create_package(Evas_Object *layout, const char *package); +HAPI void layout_update_package(Evas_Object *layout, const char *package); +HAPI void layout_delete_package(Evas_Object *layout, const char *package); + #endif //__MENU_SCREEN_LAYOUT_H__ // End of a file diff --git a/include/list.h b/include/list.h index 7e5465b..9c6c1b9 100644 --- a/include/list.h +++ b/include/list.h @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #ifndef __MENU_SCREEN_LIST_H__ #define __MENU_SCREEN_LIST_H__ @@ -26,12 +30,14 @@ typedef struct { - char *package; + char *pkgid; + char *package; /* appid */ char *exec; char *name; char *icon; char *desktop; bool nodisplay; + bool enabled; bool x_slp_removable; bool x_slp_taskmanage; pid_t pid; @@ -47,7 +53,7 @@ typedef struct _app_list_item { char *package; pid_t pid; time_t launch_time; - long long installed_time; + int installed_time; void *data; } app_list_item; @@ -63,6 +69,7 @@ extern void list_free_values(app_info_t *ai); extern menu_screen_error_e list_append_item(app_list *list, app_list_item *item); extern menu_screen_error_e list_remove_item(app_list *list, app_list_item *item); extern menu_screen_error_e list_sort(app_list *list, int (*_sort_cb)(const void *d1, const void *d2)); +extern app_list_item *list_nth(app_list *parent, unsigned int nth); #endif //__MENU_SCREEN_LIST_H__ diff --git a/include/mapbuf.h b/include/mapbuf.h index 839ddc7..db20904 100644 --- a/include/mapbuf.h +++ b/include/mapbuf.h @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #ifndef __MENU_SCREEN_MAPBUF_H__ #define __MENU_SCREEN_MAPBUF_H__ diff --git a/include/menu_screen.h b/include/menu_screen.h index 12ed017..06d8fc3 100644 --- a/include/menu_screen.h +++ b/include/menu_screen.h @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #ifndef __MENU_SCREEN_H__ #define __MENU_SCREEN_H__ @@ -25,11 +29,17 @@ extern int menu_screen_get_root_width(void); extern int menu_screen_get_root_height(void); -extern double menu_screen_get_yscale(void); extern Evas *menu_screen_get_evas(void); extern Evas_Object *menu_screen_get_win(void); +extern Elm_Theme *menu_screen_get_theme(void); extern bool menu_screen_get_done(void); extern void menu_screen_set_done(bool is_done); +extern int menu_screen_get_state(void); +extern int menu_screen_is_tts(void); + +extern void menu_screen_inc_booting_state(void); +extern void menu_screen_dec_booting_state(void); +extern int menu_screen_get_booting_state(void); #endif //__MENU_SCREEN_H__ diff --git a/include/mouse.h b/include/mouse.h index 8d4a5ea..85d0a29 100644 --- a/include/mouse.h +++ b/include/mouse.h @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #ifndef __MENU_SCREEN_EVENT_H__ #define __MENU_SCREEN_EVENT_H__ diff --git a/include/page.h b/include/page.h index f0921fc..4c4ad3a 100644 --- a/include/page.h +++ b/include/page.h @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #ifndef __MENU_SCREEN_PAGE_H__ #define __MENU_SCREEN_PAGE_H__ diff --git a/include/page_scroller.h b/include/page_scroller.h index 4f12bda..da9e4f2 100644 --- a/include/page_scroller.h +++ b/include/page_scroller.h @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #ifndef __MENU_SCREEN_PAGE_SCROLLER_H__ #define __MENU_SCREEN_PAGE_SCROLLER_H__ @@ -39,12 +43,21 @@ extern Evas_Object *page_scroller_get_page_at(Evas_Object *scroller, unsigned in extern unsigned int page_scroller_count_page(Evas_Object *scroller); extern int page_scroller_get_page_no(Evas_Object* scroller, Evas_Object *page); -extern menu_screen_error_e page_scroller_push_item(Evas_Object *scroller, app_info_t *ai); +extern Evas_Object *page_scroller_push_item(Evas_Object *scroller, app_info_t *ai); +extern Evas_Object *page_scroller_push_item_by_order(Evas_Object *scroller, app_info_t *ai); +extern int page_scroller_get_current_page_no(Evas_Object *scroller); extern Evas_Object *page_scroller_find_item_by_package(Evas_Object *scroller, const char *package, int *page_no); extern void page_scroller_trim_items(Evas_Object *scroller); extern void page_scroller_bring_in(Evas_Object *scroller, int idx); extern void page_scroller_show_region(Evas_Object *scroller, int idx); +extern void page_scroller_edit(Evas_Object *scroller); +extern void page_scroller_unedit(Evas_Object *scroller); +extern bool page_scroller_is_edited(Evas_Object *scroller); + +extern void page_scroller_focus(Evas_Object *scroller); +extern void page_scroller_focus_into_vector(Evas_Object *scroller, int vector); + #endif //__MENU_SCREEN_PAGE_SCROLLER_H__ // End of a file diff --git a/include/pkgmgr.h b/include/pkgmgr.h index 179732c..bd2aa06 100644 --- a/include/pkgmgr.h +++ b/include/pkgmgr.h @@ -1,65 +1,42 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #ifndef __MENU_SCREEN_PKGMGR_H__ #define __MENU_SCREEN_PKGMGR_H__ -#include - -#include "list.h" -#include "util.h" - - - -enum package_install_status { - UNKNOWN = 0x00, - DOWNLOAD_BEGIN, - DOWNLOADING, - DOWNLOAD_END, - INSTALL_BEGIN, - INSTALLING, - INSTALL_END, - UNINSTALL_BEGIN, - UNINSTALLING, - UNINSTALL_END, - UPDATE_BEGIN, - UPDATING, - UPDATE_END, - MAX_STATUS, -}; - +HAPI menu_screen_error_e pkgmgr_item_list_append_item(const char *pkg_id, const char *app_id, Evas_Object *item); +HAPI menu_screen_error_e pkgmgr_item_list_remove_item(const char *pkg_id, const char *app_id, Evas_Object *item); -struct package_info { - enum package_install_status status; - app_info_t ai; - Evas_Object *item; - Evas_Object *page; - Eina_Bool desktop_file_found; - int error_count; -}; +HAPI void pkgmgr_item_list_affect_pkgid(const char *pkg_id, Eina_Bool (*_affected_cb)(const char *, Evas_Object *, void *), void *data); +HAPI void pkgmgr_item_list_affect_appid(const char *app_id, Eina_Bool (*_affected_cb)(const char *, Evas_Object *, void *), void *data); +HAPI inline menu_screen_error_e pkgmgr_uninstall(Evas_Object *item); +HAPI menu_screen_error_e pkgmgr_reserve_list_push_request(const char *package, const char *key, const char *val); +HAPI menu_screen_error_e pkgmgr_reserve_list_pop_request(void); -extern menu_screen_error_e pkgmgr_init(Evas_Object *scroller); -extern void pkgmgr_fini(void); -extern Evas_Object *pkgmgr_find_pended_object(const char *package, int with_desktop_file, Evas_Object *scroller, Evas_Object **page); -extern menu_screen_error_e pkgmgr_uninstall(Evas_Object *obj); +HAPI menu_screen_error_e pkgmgr_init(void); +HAPI void pkgmgr_fini(void); #endif //__MENU_SCREEN_PKGMGR_H__ diff --git a/include/popup.h b/include/popup.h index f07d162..d871b91 100644 --- a/include/popup.h +++ b/include/popup.h @@ -1,31 +1,33 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +#ifndef __MENU_SCREEN_POPUP_H__ +#define __MENU_SCREEN_POPUP_H__ -#ifndef __APP_TRAY_POPUP_H__ -#define __APP_TRAY_POPUP_H__ +extern Evas_Object *popup_exist(void); +extern void popup_destroy_all(void); +extern Evas_Object *popup_create_confirm(Evas_Object *parent, const char *warning); +extern Evas_Object *popup_create_uninstall(Evas_Object *parent, Evas_Object *item); -extern void popup_append_list(Evas_Object *popup); -extern void popup_remove_list(Evas_Object *popup); -extern void popup_free_list(); - -extern Evas_Object *popup_create(Evas_Object *parent, const char *warning); -extern void popup_destroy(Evas_Object *popup); - -#endif //__APP_TRAY_POPUP_H__ +#endif //__MENU_SCREEN_POPUP_H__ // End of a file diff --git a/include/util.h b/include/util.h index 68d6e66..4ddc2b7 100644 --- a/include/util.h +++ b/include/util.h @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #ifndef __MENU_SCREEN_UTIL_H__ #define __MENU_SCREEN_UTIL_H__ @@ -27,27 +31,50 @@ #define STR_ENV_MAPBUF "BEATUX_MAPBUF" #define ALL_APPS_TABLE "all_apps" +#define BOOTING_STATE_DONE 1 + +/* Data key */ +#define DATA_KEY_MAIN_OPERATION_LIST "ma_op_li" + +/* Accessibility */ +#define ACCESS_BUTTON "button" +#define ACCESS_EDIT "edit" /* Multi-language */ #define D_(str) dgettext("sys_string", str) /* Log */ #if !defined(_W) -#define _W(fmt, arg...) LOGW("[%s:%d] "fmt"\n", __func__, __LINE__, ##arg) +#define _W(fmt, arg...) LOGW(fmt"\n", ##arg) #endif #if !defined(_D) -#define _D(fmt, arg...) LOGD("[%s:%d] "fmt"\n", __func__, __LINE__, ##arg) +#define _D(fmt, arg...) LOGD(fmt"\n", ##arg) #endif #if !defined(_E) -#define _E(fmt, arg...) LOGE("[%s:%d] "fmt"\n", __func__, __LINE__, ##arg) +#define _E(fmt, arg...) LOGE(fmt"\n", ##arg) #endif #if !defined(_T) #define _T(package) LOG(LOG_DEBUG, "LAUNCH", "[%s:Menuscreen:launch:done]", package); #endif +/* Multi-language */ +#ifndef _ +#define _(str) gettext(str) +#endif + +#define gettext_noop(str) (str) +#define N_(str) gettext_noop(str) +#define D_(str) dgettext("sys_string", str) + +/* Build */ +#define HAPI __attribute__((visibility("hidden"))) + +/* Packaging */ +#define DEFAULT_ICON IMAGEDIR"/default.png" + #ifdef APPFWK_MEASUREMENT #define PRINT_APPFWK() do { \ struct timeval tv; \ diff --git a/org.tizen.menu-screen.efl b/org.tizen.menu-screen.efl new file mode 100755 index 0000000..ee4a59f --- /dev/null +++ b/org.tizen.menu-screen.efl @@ -0,0 +1,98 @@ +org.tizen.menu-screen app-svc rwx--- ------ +org.tizen.menu-screen pkgmgr::db rw---l ------ +org.tizen.menu-screen ail::db rw---- ------ +org.tizen.menu-screen system::use_internet r----- ------ +org.tizen.menu-screen device::app_logging -w---- ------ +org.tizen.menu-screen net-config r-x--- ------ +org.tizen.menu-screen xorg rwx--- ------ +org.tizen.menu-screen isf rwx--- ------ +org.tizen.menu-screen dbus rwx--- ------ +org.tizen.menu-screen ug-image-viewer-efl r-x--- ------ +org.tizen.menu-screen cbhm r-x--- ------ +org.tizen.menu-screen sound_server rwx--- ------ +org.tizen.menu-screen svi-data r-x--- ------ +org.tizen.menu-screen data-provider-master rwx--- ------ +org.tizen.menu-screen org.tizen.indicator rwx--- ------ +org.tizen.menu-screen org.tizen.setting r-x--- ------ +org.tizen.menu-screen sqlfs r-x--- ------ +org.tizen.menu-screen e17 rwx--- ------ +org.tizen.menu-screen dlogutil r-x--- ------ +org.tizen.menu-screen immvibed rwx--- ------ +org.tizen.menu-screen rua::db rw---- ------ +org.tizen.menu-screen org.tizen.clock -w---- ------ +org.tizen.menu-screen badge::db rw---- ------ +org.tizen.menu-screen aul rwx--- ------ +org.tizen.menu-screen system-server r-x--- ------ +org.tizen.menu-screen deviced r-x--- ------ +org.tizen.menu-screen sensor-framework r-x--- ------ +org.tizen.menu-screen secure-storage r-x--- ------ +org.tizen.menu-screen pkgmgr-client r-x--- ------ +org.tizen.menu-screen syslogd -w---- ------ +org.tizen.indicator org.tizen.menu-screen rwx--- ------ +org.tizen.browser org.tizen.menu-screen rw---- ------ +org.tizen.contact org.tizen.menu-screen rw---- ------ +org.tizen.youtube-shortcut org.tizen.menu-screen rw---- ------ +org.tizen.message org.tizen.menu-screen rw---- ------ +org.tizen.voicerecorder org.tizen.menu-screen rw---- ------ +org.tizen.calendar org.tizen.menu-screen rw---- ------ +org.tizen.episode org.tizen.menu-screen rw---- ------ +org.tizen.keepit org.tizen.menu-screen rw---- ------ +org.tizen.calculator org.tizen.menu-screen rw---- ------ +org.tizen.clock org.tizen.menu-screen rw---- ------ +org.tizen.camera-app org.tizen.menu-screen rw---- ------ +org.tizen.svoice org.tizen.menu-screen rw---- ------ +org.tizen.group-cast org.tizen.menu-screen rw---- ------ +org.tizen.phone org.tizen.menu-screen rw---- ------ +org.tizen.smartsearch org.tizen.menu-screen rw---- ------ +org.tizen.setting org.tizen.menu-screen rw---- ------ +org.tizen.myfile org.tizen.menu-screen rw---- ------ +org.tizen.rcs-im org.tizen.menu-screen rw---- ------ +org.tizen.smemo org.tizen.menu-screen rw---- ------ +org.tizen.facebook org.tizen.menu-screen rw---- ------ +org.tizen.gallery org.tizen.menu-screen rw---- ------ +org.tizen.email org.tizen.menu-screen rw---- ------ +org.tizen.music-player org.tizen.menu-screen rw---- ------ +org.tizen.nfc-app org.tizen.menu-screen rw---- ------ +org.tizen.video-player org.tizen.menu-screen rw---- ------ +org.tizen.contacts org.tizen.menu-screen rw---- ------ +dbus org.tizen.menu-screen rwx--- ------ +stest-service org.tizen.menu-screen r-x--- ------ +org.tizen.menu-screen stest-service -w---- ------ +org.tizen.menu-screen org.tizen.setting::default-resources r-x--- ------ +org.tizen.menu-screen pkgmgr::svc r-x--- ------ +org.tizen.menu-screen pkgmgr::info r----- ------ +org.tizen.menu-screen system::vconf_system rw---- ------ +org.tizen.menu-screen system::vconf_inhouse rw---- ------ +org.tizen.menu-screen aul::launch --x--- ------ +org.tizen.menu-screen data-provider-master::shortcut rw---- ------ +org.tizen.menu-screen data-provider-master::shortcut.shortcut -w---- ------ +org.tizen.menu-screen data-provider-master::notification rw---- ------ +org.tizen.menu-screen data-provider-master::notification.client -w---- ------ +org.tizen.menu-screen data-provider-master::badge rw---- ------ +org.tizen.menu-screen data-provider-master::badge.client -w---- ------ +org.tizen.menu-screen tts-server rwx--- ------ +org.tizen.menu-screen idlescreen::vconf rwx--- ------ +org.tizen.app-tray org.tizen.menu-screen r-x--- ------ +org.tizen.menu-screen factory-15 r-x--- ------ +org.tizen.menu-screen telephony_framework::api_manager r----- ------ +org.tizen.menu-screen telephony_framework::api_modem r-x--- ------ +org.tizen.menu-screen telephony_framework::api_network r-x--- ------ +org.tizen.menu-screen atd-server r----- ------ +org.tizen.menu-screen factory::vconf rw---- ------ +org.tizen.menu-screen dfms-kernel r----- ------ +org.tizen.menu-screen system::homedir rwxat- ------ +org.tizen.menu-screen system::vconf rwxat- ------ +org.tizen.menu-screen system::media rwxat- ------ +org.tizen.menu-screen system::share rwxat- ------ +org.tizen.menu-screen pulseaudio rwxat- ------ +e17 org.tizen.menu-screen -w---- ------ +org.tizen.menu-screen sys-assert::core rwxat- ------ +org.tizen.menu-screen privacy-manager::db r----l ------ +org.tizen.menu-screen system::vconf_setting rw---- ------ +org.tizen.menu-screen system::vconf_privacy rw---- ------ +org.tizen.menu-screen system::vconf_multimedia rw---- ------ +org.tizen.menu-screen system::vconf_network rw---- ------ +org.tizen.menu-screen system::vconf_misc rw---- ------ +org.tizen.menu-screen ecore::lock rwxat- ------ +org.tizen.menu-screen org.tizen.wallpaper-ui-service rwxat- ------ +org.tizen.menu-screen system::storage rwxat- ------ diff --git a/org.tizen.menu-screen.manifest b/org.tizen.menu-screen.manifest new file mode 100644 index 0000000..180519a --- /dev/null +++ b/org.tizen.menu-screen.manifest @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/packaging/org.tizen.menu-screen.changes b/packaging/org.tizen.menu-screen.changes deleted file mode 100644 index 41d21f9..0000000 --- a/packaging/org.tizen.menu-screen.changes +++ /dev/null @@ -1,3 +0,0 @@ -* Tue Jan 29 00:14:44 UTC 2013 - tracy.graydon@intel.com -- Add the .changes file - diff --git a/packaging/org.tizen.menu-screen.spec b/packaging/org.tizen.menu-screen.spec old mode 100644 new mode 100755 index 3e287a1..cde2b6f --- a/packaging/org.tizen.menu-screen.spec +++ b/packaging/org.tizen.menu-screen.spec @@ -1,39 +1,61 @@ %define _optdir /opt -%define _appdir %{_optdir}/apps -%define _opt_datadir %{_optdir}/share +%define _usrdir /usr +%define _appdir %{_usrdir}/apps +%define _usr_datadir %{_usrdir}/share + +%define _project_name menu-screen +%define _package_name org.tizen.%{_project_name} + +%define _packagedir %{_appdir}/%{_package_name} +%define _bindir %{_packagedir}/bin +%define _datadir %{_optdir}%{_packagedir}/data +%define _resdir %{_packagedir}/res +%define _sharedir %{_packagedir}/share + +%define _localedir %{_resdir}/locale Name: org.tizen.menu-screen Summary: An utility library of the menu screen -Version: 1.0.13 +Version: 1.2.5 Release: 1.1 Group: TO_BE/FILLED_IN -License: Flora Software License +License: Apache-2.0 Source0: %{name}-%{version}.tar.gz -BuildRequires: pkgconfig(elementary) +BuildRequires: pkgconfig(ail) BuildRequires: pkgconfig(appcore-efl) -BuildRequires: pkgconfig(utilX) +BuildRequires: pkgconfig(appsvc) BuildRequires: pkgconfig(aul) -BuildRequires: pkgconfig(dlog) -BuildRequires: pkgconfig(sysman) +BuildRequires: pkgconfig(badge) BuildRequires: pkgconfig(bundle) -BuildRequires: pkgconfig(pkgmgr) -BuildRequires: pkgconfig(syspopup-caller) -BuildRequires: pkgconfig(heynoti) -BuildRequires: pkgconfig(evas) -BuildRequires: pkgconfig(ecore-evas) -BuildRequires: pkgconfig(edje) +BuildRequires: pkgconfig(capi-appfw-application) +BuildRequires: pkgconfig(capi-system-info) +BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(ecore) +BuildRequires: pkgconfig(ecore-evas) BuildRequires: pkgconfig(ecore-file) BuildRequires: pkgconfig(ecore-imf) BuildRequires: pkgconfig(ecore-input) +BuildRequires: pkgconfig(edje) BuildRequires: pkgconfig(eet) BuildRequires: pkgconfig(eina) -BuildRequires: pkgconfig(ail) -BuildRequires: pkgconfig(capi-appfw-application) +BuildRequires: pkgconfig(elementary) +BuildRequires: pkgconfig(evas) +BuildRequires: pkgconfig(pkgmgr) +BuildRequires: pkgconfig(pkgmgr-info) +BuildRequires: pkgconfig(shortcut) +BuildRequires: pkgconfig(syspopup-caller) +BuildRequires: pkgconfig(utilX) BuildRequires: cmake BuildRequires: edje-tools BuildRequires: gettext-tools - +BuildRequires: hash-signer +# %ifarch %{arm} +# %define ARCH arm +# BuildRequires: pkgconfig(bincfg) +# BuildRequires: pkgconfig(factory) +# %else +# %define ARCH emulator +# %endif %description An utility library for developers of the menu screen. @@ -53,42 +75,100 @@ An utility library for developers of the menu screen (devel) %setup -q %build -CFLAGS="-I/usr/lib/glib-2.0/include/ -I/usr/include/glib-2.0 -I/usr/lib/dbus-1.0/include -I/usr/include/dbus-1.0 -I/usr/include/e_dbus-1 -I/usr/include/ethumb-0 -I/usr/include/edje-1 -I/usr/include/efreet-1 -I/usr/include/embryo-1 -I/usr/include/ecore-1 -I/usr/include/eet-1 -I/usr/include/evas-1 -I/usr/include/eina-1 -I/usr/include/eina-1/eina $CFLAGS" CXXFLAGS=$CXXFLAGS cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} - +CFLAGS+=" -fPIC -fPIE ";export CFLAGS +CXXFLAGS+=" -fPIC -fPIE -fvisibility=hidden -fvisibility-inlines-hidden ";export CXXFLAGS +LDFLAGS+=" -Wl,--hash-style=both -Wl,--as-needed -pie ";export LDFLAGS + +%if 0%{?sec_build_binary_debug_enable} +export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE" +export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE" +export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE" +%endif + +%if 0%{?tizen_build_binary_release_type_eng} +export CFLAGS="${CFLAGS} -DTIZEN_ENGINEER_MODE" +export CXXFLAGS="${CXXFLAGS} -DTIZEN_ENGINEER_MODE" +export FFLAGS="${FFLAGS} -DTIZEN_ENGINEER_MODE" +%endif + +cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCH=%{ARCH} make %{?jobs:-j%jobs} %install %make_install -mkdir %{buildroot}/opt/apps/org.tizen.menu-screen/data +%define tizen_sign 1 +%define tizen_sign_base %{_packagedir} +%define tizen_sign_level platform +%define tizen_author_sign 1 +%define tizen_dist_sign 1 +mkdir -p %{buildroot}%{_datadir} +mkdir -p %{buildroot}/usr/share/license %post +/usr/bin/signing-client/hash-signer-client.sh -a -d -p platform %{_packagedir} -INHOUSE_ID="5000" - -chown -R 5000:5000 /opt/apps/org.tizen.menu-screen/data +VCONF_OPTION="-f -u 5000" +PRIVATE_OPTION="-s org.tizen.menu-screen" +INHOUSE_OPTION="-s idlescreen::vconf" init_vconf() { - # for menu daemon - vconftool set -t int memory/menu-screen/is_menu_screen_done 0 -i -f - - # for menu-screen - vconftool set -t int memory/idle_screen/top 0 -i -u 5000 -f - vconftool set -t string db/setting/menuscreen/package_name "org.tizen.menu-screen" -i -u 5000 -f + vconftool set -t int memory/idle-screen/top 0 -i $VCONF_OPTION $INHOUSE_OPTION + vconftool set -t string file/private/org.tizen.menu-screen/engine "gl" $VCONF_OPTION $PRIVATE_OPTION } - - - init_vconf -#%files -f %{name}.lang -%files -%{_appdir}/org.tizen.menu-screen/bin/menu-screen -%{_appdir}/org.tizen.menu-screen/res/edje/all_apps_portrait.edj -%{_appdir}/org.tizen.menu-screen/res/edje/group_4x4_portrait.edj -%{_appdir}/org.tizen.menu-screen/res/edje/item_4x4.edj -%{_appdir}/org.tizen.menu-screen/res/edje/layout_portrait.edj -%{_opt_datadir}/packages/org.tizen.menu-screen.xml - +if [ ! -d %{_datadir}/dbspace ] +then + mkdir -p %{_datadir}/dbspace +fi + +if [ ! -d %{_datadir}/shortcut ] +then + mkdir -p %{_datadir}/shortcut +else + rm -rf %{_datadir}/shortcut/* +fi + +sqlite3 %{_datadir}/dbspace/.menu_screen.db 'PRAGMA journal_mode = PERSIST; + create table if not exists shortcut ( + ROWID INTEGER PRIMARY KEY AUTOINCREMENT, + appid TEXT, + name TEXT, + type INTEGER, + content_info TEXT, + icon TEXT + ); +' +INHOUSE_ID="5000" +chown -R $INHOUSE_ID:$INHOUSE_ID %{_datadir} +chown root:$INHOUSE_ID %{_datadir}/dbspace/.menu_screen.db +chown root:$INHOUSE_ID %{_datadir}/dbspace/.menu_screen.db-journal + +chmod 660 %{_datadir}/dbspace/.menu_screen.db +chmod 660 %{_datadir}/dbspace/.menu_screen.db-journal + +if [ -f /usr/lib/rpm-plugins/msm.so ] +then + chsmack -a 'org.tizen.menu-screen' %{_datadir}/dbspace/.menu_screen.db* +fi + +%files +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_bindir}/menu-screen +%{_resdir}/edje/all_apps_portrait.edj +%{_resdir}/edje/button_edit.edj +%{_resdir}/edje/group_4x4_portrait.edj +%{_resdir}/edje/item_4x4.edj +%{_resdir}/edje/layout_portrait.edj +%{_resdir}/edje/index.edj +%{_resdir}/images/default.png +%{_resdir}/data/main_operation.launch +%{_localedir}/*/*/*.mo +%{_usr_datadir}/icons/default/small/org.tizen.menu-screen.png +%{_usr_datadir}/packages/org.tizen.menu-screen.xml +%{_packagedir}/*.xml +/etc/smack/accesses.d/%{_package_name}.efl diff --git a/src/all_apps/db.c b/src/all_apps/db.c new file mode 100644 index 0000000..eb5485d --- /dev/null +++ b/src/all_apps/db.c @@ -0,0 +1,217 @@ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include +#include +#include + +#include "db.h" +#include "util.h" +#include "all_apps/db.h" + +#define QUERY_LEN 1024 + +#define MENU_SCREEN_DB_FILE "/opt/usr/apps/org.tizen.menu-screen/data/dbspace/.menu_screen.db" +#define SHORTCUT_TABLE "shortcut" +#define QUERY_INSERT_SHORTCUT "INSERT INTO "SHORTCUT_TABLE" ("\ + "appid,"\ + "name,"\ + "type,"\ + "content_info,"\ + "icon"\ + ") VALUES ("\ + "'%s', '%s', %d, '%s', '%s');" +#define QUERY_DELETE_SHORTCUT "DELETE FROM "SHORTCUT_TABLE" WHERE ROWID=%lld" +#define QUERY_GET_ALL "SELECT ROWID, appid, name, type, content_info, icon FROM "SHORTCUT_TABLE +#define QUERY_COUNT_SHORTCUT "SELECT COUNT(*) FROM "SHORTCUT_TABLE" WHERE appid='%s' AND name='%s'" + + + +HAPI menu_screen_error_e all_apps_db_init(void) +{ + return db_open(MENU_SCREEN_DB_FILE); +} + + + +HAPI void all_apps_db_fini(void) +{ + db_close(); +} + + + +HAPI Eina_List *all_apps_db_retrieve_all_info(void) +{ + stmt_h *st; + Eina_List *list = NULL; + + retv_if(MENU_SCREEN_ERROR_OK != db_open(MENU_SCREEN_DB_FILE), NULL); + + st = db_prepare(QUERY_GET_ALL); + retv_if(NULL == st, NULL); + + menu_screen_error_e ret = MENU_SCREEN_ERROR_FAIL; + for (ret = db_next(st); MENU_SCREEN_ERROR_FAIL != ret && MENU_SCREEN_ERROR_NO_DATA != ret; ret = db_next(st)) { + db_info *info; + info = calloc(1, sizeof(db_info)); + break_if(NULL == info); + + info->rowid = db_get_long_long(st, 0); // 0 : ROWID + + char *tmp = NULL; + tmp = (char *) db_get_str(st, 1); // 1 : appid + if (tmp && strlen(tmp)) { + info->appid = strdup(tmp); + goto_if(NULL == info->appid, APP_ERROR); + } + + tmp = (char *) db_get_str(st, 2); // 2 : name + if (tmp && strlen(tmp)) { + info->name = strdup(tmp); + goto_if(NULL == info->name, APP_ERROR); + } + + info->type = db_get_int(st, 3); // 3 : type + + tmp = (char *) db_get_str(st, 4); // 4 : content_info + if (tmp && strlen(tmp)) { + info->content_info = strdup(tmp); + goto_if(NULL == info->content_info, APP_ERROR); + } + + tmp = (char *) db_get_str(st, 5); // 5 : icon + if (tmp && strlen(tmp)) { + info->icon = strdup(tmp); + goto_if(NULL == info->icon, APP_ERROR); + } + + list = eina_list_append(list, info); + + continue; +APP_ERROR: + if (info->appid) free(info->appid); + if (info->name) free(info->name); + if (info->content_info) free(info->content_info); + if (info->icon) free(info->icon); + if (info) free(info); + } + + db_finalize(st); + + return list; +} + + + +HAPI void all_apps_db_unretrieve_info(db_info *info) +{ + ret_if(NULL == info); + if (info->appid) free(info->appid); + if (info->name) free(info->name); + if (info->content_info) free(info->content_info); + if (info->icon) free(info->icon); + if (info) free(info); +} + + + +HAPI void all_apps_db_unretrieve_all_info(Eina_List *list) +{ + db_info *info = NULL; + + EINA_LIST_FREE(list, info) { + if (NULL == info) break; + if (info->appid) free(info->appid); + if (info->name) free(info->name); + if (info->content_info) free(info->content_info); + if (info->icon) free(info->icon); + if (info) free(info); + } + + eina_list_free(list); +} + + + +HAPI int all_apps_db_count_shortcut(const char *appid, const char *name) +{ + int count = -1; + char q[QUERY_LEN]; + menu_screen_error_e ret = MENU_SCREEN_ERROR_FAIL; + + retv_if(MENU_SCREEN_ERROR_OK != db_open(MENU_SCREEN_DB_FILE), -1); + + snprintf(q, sizeof(q), QUERY_COUNT_SHORTCUT, appid, name); + + stmt_h *st; + st = db_prepare(q); + retv_if(NULL == st, -1); + + ret = db_next(st); + if (MENU_SCREEN_ERROR_FAIL == ret) { + db_finalize(st); + return -1; + } + + count = db_get_int(st, 0); + + db_finalize(st); + + return count; +} + + + +HAPI long long all_apps_db_insert_shortcut(const char *appid, const char *name, int type, const char *content_info, const char *icon) +{ + char q[QUERY_LEN]; + + retv_if(MENU_SCREEN_ERROR_OK != db_open(MENU_SCREEN_DB_FILE), -1l); + + snprintf(q, sizeof(q), QUERY_INSERT_SHORTCUT, appid, name, type, content_info, icon); + retv_if(db_exec(q) < 0, -1l); + + long long id = -1l; + id = db_last_insert_rowid(); + + return id; +} + + + +HAPI menu_screen_error_e all_apps_db_delete_shortcut(long long rowid) +{ + char q[QUERY_LEN]; + + retv_if(MENU_SCREEN_ERROR_OK != db_open(MENU_SCREEN_DB_FILE), MENU_SCREEN_ERROR_FAIL); + + snprintf(q, sizeof(q), QUERY_DELETE_SHORTCUT, rowid); + retv_if(db_exec(q) < 0, MENU_SCREEN_ERROR_FAIL); + + return MENU_SCREEN_ERROR_OK; +} + + + +// END diff --git a/src/all_apps/layout.c b/src/all_apps/layout.c index e22070f..3842193 100644 --- a/src/all_apps/layout.c +++ b/src/all_apps/layout.c @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #include @@ -22,18 +26,195 @@ #include "conf.h" #include "index.h" #include "item_event.h" +#include "key.h" #include "layout.h" #include "list.h" #include "page_scroller.h" +#include "popup.h" #include "util.h" #include "all_apps/layout.h" #include "all_apps/list.h" +#include "all_apps/shortcut.h" #define ALL_APPS_EDJE_PORTRAIT EDJEDIR"/all_apps_portrait.edj" #define ALL_APPS_GROUP "all_apps" #define GROUP_4X4_EDJE_PORTRAIT EDJEDIR"/group_4x4_portrait.edj"; +#define ALL_APPS_EDIT_BUTTON_EDJE EDJEDIR"/button_edit.edj" +#define ALL_APPS_EDIT_BUTTON_GROUP "button_edit" +#define ALL_APPS_EDIT_BUTTON_PART "button_edit" + +#define IDS_HS_BUTTON_DONE "IDS_HS_BUTTON_DONE" + + + +HAPI bool all_apps_layout_is_edited(Evas_Object *all_apps) +{ + retv_if(NULL == all_apps, false); + return (bool) evas_object_data_get(all_apps, "is_edited"); +} + + + +HAPI void all_apps_layout_edit(Evas_Object *all_apps) +{ + Evas_Object *edit_button; + Evas_Object *scroller; + + //elm_object_tree_focus_allow_set(all_apps, EINA_FALSE); + evas_object_data_set(all_apps, "is_edited", (void *) true); + + edit_button = elm_object_part_content_get(all_apps, ALL_APPS_EDIT_BUTTON_PART); + ret_if(NULL == edit_button); + elm_object_signal_emit(edit_button, "edit_button_state,edit", "menu"); + + scroller = elm_object_part_content_get(all_apps, "content"); + ret_if(NULL == scroller); + page_scroller_edit(scroller); + + key_grab_home(); +} + + + +HAPI void all_apps_layout_unedit(Evas_Object *all_apps) +{ + Evas_Object *edit_button; + + ret_if(NULL == all_apps); + + //elm_object_tree_focus_allow_set(all_apps, EINA_TRUE); + key_ungrab_home(); + popup_destroy_all(); + + bool is_edited = (bool) evas_object_data_get(all_apps, "is_edited"); + if (false == is_edited) return; + + do { + edit_button = elm_object_part_content_get(all_apps, ALL_APPS_EDIT_BUTTON_PART); + ret_if(NULL == edit_button); + elm_object_signal_emit(edit_button, "edit_button_state,unedit", "menu"); + } while (0); + + do { + Evas_Object *scroller; + + scroller = elm_object_part_content_get(all_apps, "content"); + ret_if(NULL == scroller); + + page_scroller_unedit(scroller); + } while (0); +} + + + +static char *_access_info_cb(void *data, Evas_Object *obj) +{ + Evas_Object *scroller = data; + + char *info; + if (page_scroller_is_edited(scroller)) { + info = _(IDS_HS_BUTTON_DONE); + } else { + info = ACCESS_EDIT; + } + + char *tmp; + tmp = strdup(info); + if (!tmp) return NULL; + return tmp; +} + + + +static void _focus_clicked_cb(void *data, Evas_Object *obj, void *event_info) +{ + Evas_Object *scroller = data; + + _D("Edit button is up"); + + Evas_Object *all_apps; + all_apps = evas_object_data_get(scroller, "tab"); + ret_if(NULL == all_apps); + + if (page_scroller_is_edited(scroller)) { + _D("Go to the normal mode"); + all_apps_layout_unedit(all_apps); + } else { + _D("Go to the edit mode"); + all_apps_layout_edit(all_apps); + } + + elm_object_signal_emit(obj, "edit_button,release", "menu"); +} + + + + +static void _edit_button_down_cb(void *data, Evas_Object *obj, const char* emission, const char* source) +{ + _D("Edit button is down"); +} + + + +static void _edit_button_up_cb(void *data, Evas_Object *obj, const char* emission, const char* source) +{ + _D("Edit button is up"); + + elm_object_signal_emit(obj, "edit_button,release", "menu"); +} + + + +static Evas_Object *_add_edit_button(Evas_Object *parent, Evas_Object *scroller) +{ + Evas_Object *button; + + retv_if(NULL == parent, NULL); + retv_if(NULL == scroller, NULL); + + button = layout_load_edj(parent, ALL_APPS_EDIT_BUTTON_EDJE, ALL_APPS_EDIT_BUTTON_GROUP); + retv_if(NULL == button, NULL); + + edje_object_signal_callback_add(_EDJ(button), "edit_button,down", "menu", _edit_button_down_cb, scroller); + edje_object_signal_callback_add(_EDJ(button), "edit_button,up", "menu", _edit_button_up_cb, scroller); + + do { // focus + Evas_Object *focus= NULL; + focus = elm_button_add(button); + retv_if(NULL == focus, NULL); + + elm_object_style_set(focus, "focus"); + elm_object_part_content_set(button, "focus", focus); + elm_access_info_cb_set(focus, ELM_ACCESS_INFO, _access_info_cb, scroller); + evas_object_smart_callback_add(focus, "clicked", _focus_clicked_cb, scroller); + } while (0); + + return button; +} + + + +static void _remove_edit_button(Evas_Object *button) +{ + ret_if(NULL == button); + + do { + Evas_Object *focus = NULL; + focus = elm_object_part_content_unset(button, "focus"); + if (NULL == focus) break; + evas_object_smart_callback_del(focus, "clicked", _focus_clicked_cb); + evas_object_del(focus); + } while (0); + + edje_object_signal_callback_del(_EDJ(button), "edit_button,down", "menu", _edit_button_down_cb); + edje_object_signal_callback_del(_EDJ(button), "edit_button,up", "menu", _edit_button_up_cb); + + layout_unload_edj(button); +} + static menu_screen_error_e _load_item(Evas_Object *scroller, app_list_item *item) @@ -42,11 +223,11 @@ static menu_screen_error_e _load_item(Evas_Object *scroller, app_list_item *item retv_if(NULL == item, MENU_SCREEN_ERROR_FAIL); ai = item->data; - if (ai->nodisplay == true) { - return MENU_SCREEN_ERROR_FAIL; + if (ai->nodisplay || !ai->enabled) { + return MENU_SCREEN_ERROR_OK; } - retv_if(MENU_SCREEN_ERROR_FAIL == page_scroller_push_item(scroller, ai), MENU_SCREEN_ERROR_FAIL); + retv_if(NULL == page_scroller_push_item_by_order(scroller, ai), MENU_SCREEN_ERROR_FAIL); return MENU_SCREEN_ERROR_OK; @@ -78,7 +259,9 @@ ERROR: all_apps_list_destroy(list); evas_object_data_del(all_apps, "list"); page_scroller_bring_in(scroller, 0); + page_scroller_focus(scroller); menu_screen_set_done(true); + menu_screen_inc_booting_state(); return ECORE_CALLBACK_CANCEL; } @@ -95,22 +278,39 @@ static menu_screen_error_e _push_items(Evas_Object *all_apps) evas_object_data_set(all_apps, "list", list); idle_timer = ecore_idler_add(_push_items_idler_cb, all_apps); + retv_if(NULL == idle_timer, MENU_SCREEN_ERROR_FAIL); + + Evas_Object *scroller; + scroller = evas_object_data_get(all_apps, "scroller"); + if (MENU_SCREEN_ERROR_OK != all_apps_shortcut_add_all(scroller)) + _E("Cannot add shortcuts"); + + do { + Evas_Object *button; + button = _add_edit_button(all_apps, scroller); + if (NULL == button) { + _D("cannot make the edit button"); + } + elm_object_part_content_set(all_apps, ALL_APPS_EDIT_BUTTON_PART, button); + } while (0); return MENU_SCREEN_ERROR_OK; } -Evas_Object *all_apps_layout_create(Evas_Object *controlbar, int rotate) +HAPI Evas_Object *all_apps_layout_create(Evas_Object *controlbar, int rotate) { Evas_Object *all_apps; Evas_Object *index; Evas_Object *scroller; + Evas_Object *bg; + Evas *evas; static const char item_edje[] = EDJEDIR"/item_4x4.edj"; static const char *page_edje; static const char *all_apps_edje; - int item_width; + int item_width, item_height; int width; int height; @@ -121,7 +321,9 @@ Evas_Object *all_apps_layout_create(Evas_Object *controlbar, int rotate) page_edje = GROUP_4X4_EDJE_PORTRAIT; width = menu_screen_get_root_width(); height = menu_screen_get_root_height(); - item_width = width / 4.0f; + + item_width = ITEM_WIDTH_PROP * menu_screen_get_root_width(); + item_height = ITEM_HEIGHT_PROP * menu_screen_get_root_height(); if (EINA_FALSE == elm_layout_file_set(all_apps, all_apps_edje, ALL_APPS_GROUP)) { evas_object_del(all_apps); @@ -129,6 +331,14 @@ Evas_Object *all_apps_layout_create(Evas_Object *controlbar, int rotate) return NULL; } + evas = menu_screen_get_evas(); + bg = evas_object_rectangle_add(evas); + evas_object_size_hint_min_set(bg, width, height); + evas_object_size_hint_max_set(bg, width, height); + evas_object_resize(bg, width, height); + elm_object_part_content_set(all_apps, "bg", bg); + evas_object_show(bg); + evas_object_data_set(all_apps, "win", evas_object_data_get(controlbar, "win")); evas_object_data_set(all_apps, "layout", evas_object_data_get(controlbar, "layout")); evas_object_data_set(all_apps, "controlbar", controlbar); @@ -136,15 +346,18 @@ Evas_Object *all_apps_layout_create(Evas_Object *controlbar, int rotate) evas_object_data_set(all_apps, "page_max_app", (void *) PAGE_MAX_APP); evas_object_data_set(all_apps, "item_edje", (void *) item_edje); evas_object_data_set(all_apps, "item_width", (void *) item_width); - evas_object_data_set(all_apps, "item_height", (void *) item_width); + evas_object_data_set(all_apps, "item_height", (void *) item_height); evas_object_data_set(all_apps, "item_enable_long_press", (void *) true); evas_object_data_set(all_apps, "item_text_dual_line", (void *) true); evas_object_data_set(all_apps, "is_under_pkgmgr", (void *) true); evas_object_data_set(all_apps, "rotate", (void *) rotate); evas_object_data_set(all_apps, "enable_bg_image", (void *) true); + evas_object_data_set(all_apps, "is_edited", (void *) true); + evas_object_size_hint_min_set(all_apps, width, height); + evas_object_size_hint_max_set(all_apps, width, height); evas_object_resize(all_apps, width, height); - index = index_create(all_apps, 0); + index = index_create(all_apps, 0, 0); if (NULL == index) { evas_object_del(all_apps); _E("cannot create index."); @@ -163,7 +376,7 @@ Evas_Object *all_apps_layout_create(Evas_Object *controlbar, int rotate) elm_object_part_content_set(all_apps, "content", scroller); evas_object_data_set(all_apps, "scroller", scroller); - + if (!all_apps_shortcut_init(all_apps)) _E("Cannot initialize shortcut"); retv_if(MENU_SCREEN_ERROR_FAIL == _push_items(all_apps), NULL); return all_apps; @@ -171,15 +384,30 @@ Evas_Object *all_apps_layout_create(Evas_Object *controlbar, int rotate) -void all_apps_layout_destroy(Evas_Object *all_apps) +HAPI void all_apps_layout_destroy(Evas_Object *all_apps) { Evas_Object *index; Evas_Object *scroller; - index = evas_object_data_get(all_apps, "index"); - scroller = evas_object_data_get(all_apps, "scroller"); + ret_if(NULL == all_apps); + + all_apps_shortcut_fini(); + + do { + Evas_Object *button; + if(all_apps) { + button = elm_object_part_content_unset(all_apps, ALL_APPS_EDIT_BUTTON_PART); + _remove_edit_button(button); + } else { + _D("cannot find the all_apps object"); + } + } while (0); + scroller = evas_object_data_get(all_apps, "scroller"); + ret_if(NULL == scroller); if (scroller) page_scroller_destroy(scroller); + + index = evas_object_data_get(scroller, "index"); if (index) index_destroy(index); evas_object_data_del(all_apps, "win"); @@ -197,6 +425,7 @@ void all_apps_layout_destroy(Evas_Object *all_apps) evas_object_data_del(all_apps, "is_under_pkgmgr"); evas_object_data_del(all_apps, "rotate"); evas_object_data_del(all_apps, "enable_bg_image"); + evas_object_data_del(all_apps, "is_edited"); evas_object_del(all_apps); } diff --git a/src/all_apps/list.c b/src/all_apps/list.c index e3bc0b8..2144455 100644 --- a/src/all_apps/list.c +++ b/src/all_apps/list.c @@ -1,27 +1,64 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #include +#include #include #include "menu_screen.h" #include "conf.h" #include "list.h" +#include "all_apps/layout.h" + + +HAPI int all_apps_list_find_installed_time(const char *id) +{ + pkgmgrinfo_pkginfo_h handle = NULL; + pkgmgrinfo_appinfo_h appinfo_h = NULL; + + int ret = 0; + int installed_time = 0; + + goto_if(0> pkgmgrinfo_appinfo_get_appinfo(id, &appinfo_h), ERROR); + + char *pkgid = NULL; + goto_if(PMINFO_R_OK != pkgmgrinfo_appinfo_get_pkgid(appinfo_h, &pkgid), ERROR); + goto_if (NULL == pkgid, ERROR); + + goto_if (0>pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle), ERROR); + + ret = pkgmgrinfo_pkginfo_get_installed_time(handle, &installed_time); + goto_if (ret != PMINFO_R_OK, ERROR); + + pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h); + pkgmgrinfo_pkginfo_destroy_pkginfo(handle); + + return installed_time; + +ERROR: + if (appinfo_h) pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h); + if (handle) pkgmgrinfo_pkginfo_destroy_pkginfo(handle); + return 0; +} @@ -29,6 +66,8 @@ static ail_cb_ret_e _all_apps_cb(ail_appinfo_h ai, void *data) { app_list *list = data; app_list_item *item; + app_info_t *item_info; + int installed_time = 0; char *value; retv_if(ail_appinfo_get_str(ai, AIL_PROP_PACKAGE_STR, &value) == AIL_ERROR_FAIL, AIL_CB_RET_CANCEL); @@ -52,6 +91,31 @@ static ail_cb_ret_e _all_apps_cb(ail_appinfo_h ai, void *data) return AIL_CB_RET_CANCEL; } + item_info = item->data; + if (NULL == item_info) { + free(item->data); + free(item->package); + free(item); + return AIL_CB_RET_CANCEL; + } + + if (item_info->nodisplay || !item_info->enabled) { + free(item->data); + free(item->package); + free(item); + return AIL_CB_RET_CONTINUE; + } + + installed_time = all_apps_list_find_installed_time(item->package); + item->installed_time = installed_time; + + if (0 == item->installed_time) { + free(item->data); + free(item->package); + free(item); + return AIL_CB_RET_CANCEL; + } + if (list_append_item(list, item) != MENU_SCREEN_ERROR_OK) { free(item->data); free(item->package); @@ -66,6 +130,24 @@ static ail_cb_ret_e _all_apps_cb(ail_appinfo_h ai, void *data) +static int _all_apps_installed_time_sort_cb(const void *d1, const void *d2) +{ + app_list_item *item[2]; + + retv_if(NULL == d1, 0); + retv_if(NULL == d2, 0); + + item[0] = (app_list_item *) d1; + item[1] = (app_list_item *) d2; + + + if (item[0]->installed_time > item[1]->installed_time) return (1); + if (item[0]->installed_time < item[1]->installed_time) return (-1); + else return (0); +} + + + static int _all_apps_sort_cb(const void *d1, const void *d2) { app_info_t *ai[2]; @@ -85,7 +167,30 @@ static int _all_apps_sort_cb(const void *d1, const void *d2) -app_list *all_apps_list_create(void) +HAPI void all_apps_list_destroy(app_list *list) +{ + app_list_item *item; + + ret_if(NULL == list); + ret_if(NULL == list->list); + + EINA_LIST_FREE(list->list, item) { + if (NULL == item) break; + if (item->package) free(item->package); + if (item->data) { + list_free_values(item->data); + free(item->data); + } + free(item); + } + + eina_list_free(list->list); + free(list); +} + + + +HAPI app_list *all_apps_list_create(void) { int count = 0; app_list *list; @@ -94,7 +199,11 @@ app_list *all_apps_list_create(void) list = calloc(1, sizeof(app_list)); retv_if(NULL == list, NULL); - retv_if(ail_filter_new(&f) != AIL_ERROR_OK, NULL); + if (ail_filter_new(&f) != AIL_ERROR_OK) { + free(list); + return NULL; + } + if (ail_filter_add_bool(f, AIL_PROP_NODISPLAY_BOOL, false) != AIL_ERROR_OK){ _E("Failed to add filter"); ail_filter_destroy(f); @@ -105,39 +214,36 @@ app_list *all_apps_list_create(void) ail_filter_list_appinfo_foreach(f, _all_apps_cb, list); ail_filter_destroy(f); - if(MENU_SCREEN_ERROR_FAIL == list_sort(list, _all_apps_sort_cb)) { - _D("Cannot sort apps."); - } - - if(MENU_SCREEN_ERROR_FAIL == list_count(list, &count)) { + if (MENU_SCREEN_ERROR_FAIL == list_count(list, &count)) { _D("Cannot count apps."); } + _D("Total package count = %d", count); - return list; -} + if (count > (MAX_PAGE_NO * PAGE_MAX_APP)) { + int i; + if (MENU_SCREEN_ERROR_FAIL == list_sort(list, _all_apps_installed_time_sort_cb)) { + _E("Cannot sort installed_time"); + } -void all_apps_list_destroy(app_list *list) -{ - app_list_item *item; + for(i = (MAX_PAGE_NO * PAGE_MAX_APP); ilist); + _D("%d: %s will be removed", i, item->package); - EINA_LIST_FREE(list->list, item) { - if (NULL == item) break; - if (item->package) free(item->package); - if (item->data) { - list_free_values(item->data); - free(item->data); + retv_if(MENU_SCREEN_ERROR_FAIL == list_remove_item(list, item), NULL); } - free(item); } - eina_list_free(list->list); - free(list); + if (MENU_SCREEN_ERROR_FAIL == list_sort(list, _all_apps_sort_cb)) { + _D("Cannot sort apps."); + } + + return list; } diff --git a/src/all_apps/shortcut.c b/src/all_apps/shortcut.c new file mode 100644 index 0000000..0554491 --- /dev/null +++ b/src/all_apps/shortcut.c @@ -0,0 +1,240 @@ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include + +#include "item.h" +#include "list.h" +#include "page_scroller.h" +#include "util.h" +#include "all_apps/db.h" + + + +HAPI Evas_Object *all_apps_shortcut_add( + Evas_Object *scroller, + long long rowid, + const char *pkgname, + const char *exec, + const char *name, + const char *content_info, + const char *icon, + int type) +{ + _D("Shortcut : pkgname(%s) exec(%s) name(%s) icon(%s)", pkgname, exec, name, icon); + + app_info_t ai = {0, }; + ai.package = (char *) pkgname; + ai.exec = (char *) exec; + ai.name = (char *) name; + ai.icon = (char *) icon; + ai.nodisplay = 0; + ai.enabled = 1; + ai.x_slp_removable = 1; + ai.x_slp_taskmanage = 0; + + if (ADD_TO_HOME_IS_DYNAMICBOX(type)) { + _D("This is a dynamic box"); + return NULL; + } + + Evas_Object *item = NULL; + retv_if(NULL == (item = page_scroller_push_item(scroller, &ai)), NULL); + + long long *tmp; + tmp = calloc(1, sizeof(long long)); + if (NULL == tmp) { + item_destroy(item); + return NULL; + } + + if (LAUNCH_BY_PACKAGE == type) { + _D("This is a package"); + evas_object_data_set(item, "shortcut_launch_package", (void *) true); + } else { + _D("This is a shortcut"); + evas_object_data_set(item, "shortcut_launch_package", (void *) false); + } + + *tmp = rowid; + evas_object_data_set(item, "is_shortcut", (void *) true); + evas_object_data_set(item, "rowid", tmp); + evas_object_data_set(item, "type", (void *) type); + evas_object_data_set(item, "content_info", content_info); + + return item; +} + + + +static Eina_Bool _push_items_idler_cb(void *data) +{ + Evas_Object *scroller = data; + Eina_List *list = evas_object_data_get(scroller, "list"); + Eina_List *n; + Eina_List *t; + db_info *info = NULL; + EINA_LIST_FOREACH_SAFE(list, n, t, info) { + goto_if(NULL == info, ERROR); + Evas_Object *item = NULL; + item = all_apps_shortcut_add( + scroller, + info->rowid, + info->appid, + NULL, + info->name, + info->content_info, + info->icon, + info->type); + + list = eina_list_remove(list, info); + evas_object_data_set(scroller, "list", list); + + all_apps_db_unretrieve_info(info); + break_if(NULL == item); + } + + return ECORE_CALLBACK_RENEW; +ERROR: + list = evas_object_data_del(scroller, "list"); + all_apps_db_unretrieve_all_info(list); + return ECORE_CALLBACK_CANCEL; +} + + + +HAPI menu_screen_error_e all_apps_shortcut_add_all(Evas_Object *scroller) +{ + Eina_List *list; + + list = all_apps_db_retrieve_all_info(); + if (NULL == list) { + _D("There is no shortcut"); + return MENU_SCREEN_ERROR_OK; + } + + evas_object_data_set(scroller, "list", list); + + Ecore_Idler *idle_timer = NULL; + idle_timer = ecore_idler_add(_push_items_idler_cb, scroller); + retv_if(NULL == idle_timer, MENU_SCREEN_ERROR_FAIL); + + return MENU_SCREEN_ERROR_OK; +} + + + +HAPI void all_apps_shortcut_remove(Evas_Object *item) +{ + long long *tmp; + tmp = evas_object_data_del(item, "rowid"); + if (tmp) { + all_apps_db_delete_shortcut(*tmp); + free(tmp); + } + + Evas_Object *scroller; + scroller = evas_object_data_get(item, "scroller"); + + evas_object_data_del(item, "type"); + evas_object_data_del(item, "content_info"); + evas_object_data_del(item, "shortcut_launch_package"); + evas_object_data_del(item, "is_shortcut"); + item_destroy(item); + + if (scroller) page_scroller_trim_items(scroller); +} + + + +static int _shorcut_request_cb( + const char *pkgname, + const char *name, + int type, + const char *content_info, + const char *icon, + int pid, + double period, + int allow_duplicate, + void *data) +{ + Evas_Object *scroller = data; + + retv_if(NULL == pkgname, -1); + + _D("Package name: %s", pkgname); + _D("Name: %s", name); + _D("Type: %d", type); + _D("Content: %s", content_info); + _D("Icon: %s", icon); + _D("Requested from: %d", pid); + _D("period : %.2f", period); + _D("CBDATA: %p", data); + + if (!allow_duplicate) { + int count = 0; + count = all_apps_db_count_shortcut(pkgname, name); + if (0 < count) { + _D("There is already a package(%s:%s) in the Menu-screen", pkgname, name); + return -1; + } + } + + long long rowid = -1l; + rowid = all_apps_db_insert_shortcut(pkgname, name, type, content_info, icon); + retv_if(0l > rowid, -1); + + Evas_Object *item = NULL; + item = all_apps_shortcut_add(scroller, rowid, pkgname, NULL, name, content_info, icon, type); + retv_if(NULL == item, -1); + + return 0; +} + + + +HAPI bool all_apps_shortcut_init(Evas_Object *all_apps) +{ + retv_if(NULL == all_apps, false); + retv_if(MENU_SCREEN_ERROR_OK != all_apps_db_init(), false); + + Evas_Object *scroller; + scroller = evas_object_data_get(all_apps, "scroller"); + retv_if(NULL == scroller, false); + + int ret; + ret = shortcut_set_request_cb(_shorcut_request_cb, scroller); + + return 0 == ret ? true : false; +} + + + +HAPI void all_apps_shortcut_fini(void) +{ + all_apps_db_fini(); +} + + + +// End of file. diff --git a/src/db.c b/src/db.c new file mode 100644 index 0000000..9efce2d --- /dev/null +++ b/src/db.c @@ -0,0 +1,326 @@ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include +#include +#include +#include +#include + +#include "util.h" +#include "db.h" + + + +#define retv_with_dbmsg_if(expr, val) do { \ + if (expr) { \ + _E("%s", sqlite3_errmsg(db_info.db)); \ + return (val); \ + } \ +} while (0) + + + +static struct { + sqlite3 *db; +} db_info = { + .db = NULL, +}; + +struct stmt { + sqlite3_stmt *stmt; +}; + + + +HAPI menu_screen_error_e db_open(const char *db_file) +{ + int ret; + + retv_if(NULL == db_file, MENU_SCREEN_ERROR_INVALID_PARAMETER); + if (db_info.db) { + return MENU_SCREEN_ERROR_OK; + } + + ret = db_util_open(db_file, &db_info.db, DB_UTIL_REGISTER_HOOK_METHOD); + retv_with_dbmsg_if(ret != SQLITE_OK, MENU_SCREEN_ERROR_FAIL); + + return MENU_SCREEN_ERROR_OK; +} + + + +HAPI stmt_h *db_prepare(const char *query) +{ + int ret; + stmt_h *handle; + + retv_if(NULL == query, NULL); + + handle = calloc(1, sizeof(stmt_h)); + retv_if(NULL == handle, NULL); + + ret = sqlite3_prepare_v2(db_info.db, query, strlen(query), &(handle->stmt), NULL); + if (ret != SQLITE_OK) { + free(handle); + _E("%s", sqlite3_errmsg(db_info.db)); + return NULL; + } + + return handle; +} + + + +HAPI menu_screen_error_e db_bind_bool(stmt_h *handle, int idx, bool value) +{ + int ret; + + retv_if(NULL == handle, MENU_SCREEN_ERROR_FAIL); + + ret = sqlite3_bind_int(handle->stmt, idx, (int) value); + retv_with_dbmsg_if(ret != SQLITE_OK, MENU_SCREEN_ERROR_FAIL); + + return MENU_SCREEN_ERROR_OK; +} + + + +HAPI menu_screen_error_e db_bind_int(stmt_h *handle, int idx, int value) +{ + int ret; + + retv_if(NULL == handle, MENU_SCREEN_ERROR_FAIL); + + ret = sqlite3_bind_int(handle->stmt, idx, value); + retv_with_dbmsg_if(ret != SQLITE_OK, MENU_SCREEN_ERROR_FAIL); + + return MENU_SCREEN_ERROR_OK; +} + + + +HAPI menu_screen_error_e db_bind_str(stmt_h *handle, int idx, const char *str) +{ + int ret; + + retv_if(NULL == handle, MENU_SCREEN_ERROR_FAIL); + + ret = sqlite3_bind_text(handle->stmt, idx, str, strlen(str), SQLITE_TRANSIENT); + retv_with_dbmsg_if(ret != SQLITE_OK, MENU_SCREEN_ERROR_FAIL); + + return MENU_SCREEN_ERROR_OK; +} + + + +HAPI menu_screen_error_e db_next(stmt_h *handle) +{ + int ret; + + retv_if(NULL == handle, MENU_SCREEN_ERROR_FAIL); + + ret = sqlite3_step(handle->stmt); + switch (ret) { + case SQLITE_ROW: + return MENU_SCREEN_ERROR_OK; + case SQLITE_DONE: + return MENU_SCREEN_ERROR_NO_DATA; + default: + retv_with_dbmsg_if(1, MENU_SCREEN_ERROR_FAIL); + } +} + + + +HAPI bool db_get_bool(stmt_h *handle, int index) +{ + retv_if(NULL == handle, false); + return (bool) sqlite3_column_int(handle->stmt, index); +} + + + +HAPI int db_get_int(stmt_h *handle, int index) +{ + retv_if(NULL == handle, 0); + return sqlite3_column_int(handle->stmt, index); +} + + + +HAPI long long db_get_long_long(stmt_h *handle, int index) +{ + retv_if(NULL == handle, 0l); + return sqlite3_column_int64(handle->stmt, index); +} + + +HAPI const char *db_get_str(stmt_h *handle, int index) +{ + retv_if(NULL == handle, NULL); + return (const char *) sqlite3_column_text(handle->stmt, index); +} + + + +HAPI menu_screen_error_e db_reset(stmt_h *handle) +{ + int ret; + + retv_if(NULL == handle, MENU_SCREEN_ERROR_INVALID_PARAMETER); + retv_if(NULL == handle->stmt, MENU_SCREEN_ERROR_INVALID_PARAMETER); + + ret = sqlite3_reset(handle->stmt); + retv_with_dbmsg_if(ret != SQLITE_OK, MENU_SCREEN_ERROR_FAIL); + + sqlite3_clear_bindings(handle->stmt); + + return MENU_SCREEN_ERROR_OK; +} + + + +HAPI menu_screen_error_e db_finalize(stmt_h *handle) +{ + int ret; + + retv_if(NULL == handle, MENU_SCREEN_ERROR_INVALID_PARAMETER); + retv_if(NULL == handle->stmt, MENU_SCREEN_ERROR_INVALID_PARAMETER); + + ret = sqlite3_finalize(handle->stmt); + if(ret != SQLITE_OK) { + _E("Cannot finalize handle"); + } + free(handle); + + return MENU_SCREEN_ERROR_OK; +} + + + +HAPI long long db_last_insert_rowid(void) +{ + retv_if(NULL == db_info.db, -1l); + + long long rowid = sqlite3_last_insert_rowid(db_info.db); + + return rowid; +} + + + +HAPI menu_screen_error_e db_exec(const char *query) +{ + retv_if(NULL == query, MENU_SCREEN_ERROR_INVALID_PARAMETER); + retv_if(NULL == db_info.db, MENU_SCREEN_ERROR_FAIL); + + stmt_h *handle = db_prepare(query); + retv_if(NULL == handle, MENU_SCREEN_ERROR_FAIL); + + goto_if(MENU_SCREEN_ERROR_FAIL == db_next(handle), ERROR); + if (MENU_SCREEN_ERROR_OK != db_finalize(handle)) return MENU_SCREEN_ERROR_FAIL; + + return MENU_SCREEN_ERROR_OK; + +ERROR: + if (handle) db_finalize(handle); + return MENU_SCREEN_ERROR_FAIL; +} + + + +HAPI void db_close(void) +{ + ret_if(!db_info.db); + sqlite3_close(db_info.db); + db_info.db = NULL; +} + + + +HAPI menu_screen_error_e db_begin_transaction(void) +{ + int ret = -1; + + ret = sqlite3_exec(db_info.db, "BEGIN IMMEDIATE TRANSACTION", NULL, NULL, NULL); + + while (SQLITE_BUSY == ret) { + sleep(1); + ret = sqlite3_exec(db_info.db, "BEGIN IMMEDIATE TRANSACTION", NULL, NULL, NULL); + } + + if (SQLITE_OK != ret) { + _E("sqlite3_exec() Failed(%d)", ret); + return MENU_SCREEN_ERROR_FAIL; + } + + return MENU_SCREEN_ERROR_OK; +} + + + +#define MENU_SCREEN_COMMIT_TRY_MAX 3 +HAPI menu_screen_error_e db_end_transaction(bool success) +{ + int ret = -1; + int i = 0; + char *errmsg = NULL; + + if (success) { + ret = sqlite3_exec(db_info.db, "COMMIT TRANSACTION", NULL, NULL, &errmsg); + if (SQLITE_OK != ret) { + _E("sqlite3_exec(COMMIT) Failed(%d, %s)", ret, errmsg); + sqlite3_free(errmsg); + + while (SQLITE_BUSY == ret && i < MENU_SCREEN_COMMIT_TRY_MAX) { + i++; + sleep(1); + ret = sqlite3_exec(db_info.db, "COMMIT TRANSACTION", NULL, NULL, NULL); + } + + if (SQLITE_OK != ret) { + _E("sqlite3_exec() Failed(%d)", ret); + ret = sqlite3_exec(db_info.db, "ROLLBACK TRANSACTION", NULL, NULL, NULL); + if (SQLITE_OK != ret) { + _E("sqlite3_exec() Failed(%d)", ret); + } + + return MENU_SCREEN_ERROR_FAIL; + } + } + } else { + ret = sqlite3_exec(db_info.db, "ROLLBACK TRANSACTION", NULL, NULL, NULL); + if (SQLITE_OK != ret) { + _E("sqlite3_exec() Faild(%d)", ret); + + return MENU_SCREEN_ERROR_FAIL; + } + } + + return MENU_SCREEN_ERROR_OK; +} + + + +// End of file. diff --git a/src/index.c b/src/index.c index 296acac..82a71d0 100644 --- a/src/index.c +++ b/src/index.c @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #include @@ -28,7 +32,7 @@ -inline void index_bring_in(Evas_Object *index, int idx) +HAPI inline void index_bring_in(Evas_Object *index, int idx) { Elm_Object_Item *idx_it; @@ -39,8 +43,10 @@ inline void index_bring_in(Evas_Object *index, int idx) -void index_destroy(Evas_Object *index) +HAPI void index_destroy(Evas_Object *index) { + ret_if(NULL == index); + evas_object_data_del(index, "win"); evas_object_data_del(index, "layout"); evas_object_data_del(index, "controlbar"); @@ -52,32 +58,34 @@ void index_destroy(Evas_Object *index) -Evas_Object *index_create(Evas_Object *tab, unsigned int count) +HAPI Evas_Object *index_create(Evas_Object *tab, unsigned int count, unsigned int current_idx) { Evas_Object *index; Evas_Object *scroller; register int i; - char *number; + char number_pre[256] = { 0, }; + char *number = NULL; retv_if(NULL == tab, NULL); index = elm_index_add(tab); retv_if(NULL == index, NULL); - elm_object_style_set(index, "pagecontrol"); + elm_object_theme_set(index, menu_screen_get_theme()); + elm_object_style_set(index, "menuscreen/index"); elm_index_horizontal_set(index, EINA_TRUE); elm_index_autohide_disabled_set(index, EINA_TRUE); - number = malloc(((size_t) log10((double) MAX_PAGE_NO)) + 2); - retv_if(NULL == number, NULL); - for (i = 0; i < count; i++) { - sprintf(number, "%d", i + 1); + snprintf(number_pre, sizeof(number_pre), "%d", i + 1); + number = strdup(number_pre); + retv_if(!number, NULL); elm_index_item_append(index, number, NULL, (void *) i); + free(number); } elm_index_level_go(index, 0); if (count > 0) { - index_bring_in(index, 0); + index_bring_in(index, current_idx); } elm_object_part_content_set(tab, PAGE_CONTROLLER_GROUP_NAME, index); @@ -104,23 +112,34 @@ Evas_Object *index_create(Evas_Object *tab, unsigned int count) -Evas_Object *index_update(Evas_Object *layout, Evas_Object *index, unsigned int count) +HAPI Evas_Object *index_update(Evas_Object *layout, Evas_Object *index, unsigned int count) { + int idx = 0; + + int cur_count = (int) evas_object_data_get(index, "count"); + if (cur_count > 0) { + Elm_Object_Item *idx_it = elm_index_selected_item_get(index, 0); + if (idx_it) idx = (int) elm_object_item_data_get(idx_it); + } + + if(count == idx) idx--; + if(idx == -1) idx = 0; + _D("Current index %d, Current count: %d", idx,count); index_destroy(index); - return index_create(layout, count); + return index_create(layout, count, idx); } -void index_hide(Evas_Object *index) +HAPI void index_hide(Evas_Object *index) { edje_object_signal_emit(_EDJ(index), "hide", "index"); } -void index_show(Evas_Object *index) +HAPI void index_show(Evas_Object *index) { edje_object_signal_emit(_EDJ(index), "show", "index"); } diff --git a/src/item.c b/src/item.c index a9dd107..e914489 100644 --- a/src/item.c +++ b/src/item.c @@ -1,27 +1,36 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #include +#include +#include #include -#include #include +#include +#include +#include #include "menu_screen.h" +#include "item_badge.h" #include "conf.h" #include "item.h" #include "item_event.h" @@ -29,6 +38,8 @@ #include "list.h" #include "mapbuf.h" #include "page.h" +#include "page_scroller.h" +#include "pkgmgr.h" #include "popup.h" #include "util.h" @@ -36,11 +47,14 @@ #define LAYOUT_BLOCK_INTERVAL 1.0 #define ITEM_GROUP_NAME "icon" +#define DATA_KEY_ITEM_LAUNCH_MAIN_OPERATION "dk_it_launch" +#define STR_ATTRIBUTE_PKGID "pkgid" #define STR_ATTRIBUTE_NAME "name" #define STR_ATTRIBUTE_ICON "icon" #define STR_ATTRIBUTE_PKG_NAME "package" #define STR_ATTRIBUTE_REMOVABLE "removable" #define STR_ATTRIBUTE_DESKTOP "desktop" +#define STR_ATTRIBUTE_TYPE "type" #define STR_ATTRIBUTE_PAGE "pending,page" #define STR_ICON_IMAGE_TYPE_OBJECT "object" #define STR_ICON_IMAGE_TYPE_EDJE "edje" @@ -49,46 +63,7 @@ -#if 0 // Dual line is disabled temporarily. -static char *_space_to_new_line(const char *str) -{ - char *tmp; - int len; - int space_idx = 0; - - retv_if(NULL == str, NULL); - len = strlen(str); - - if (len > LINE_SIZE) { - for (space_idx = LINE_SIZE - 1; str[space_idx] != ' ' && space_idx > 0; space_idx--); - if (!space_idx) { - space_idx = strcspn(str, " "); - space_idx = (space_idx == len ? 0 : space_idx); - } - } - - if (space_idx) { - int i; - retv_if(NULL == (tmp = calloc(1, len + 4)), NULL); - - for (i = 0; i < space_idx; i++) { - tmp[i] = str[i]; - } - strcat(tmp, "
"); - for (i = space_idx + 1; i < len; i++) { - tmp[i + 3] = str[i]; - } - } else { - retv_if(NULL == (tmp = strdup(str)), NULL); - } - - return tmp; -} -#endif - - - -void item_set_icon(Evas_Object *edje, char *icon, int sync) +HAPI void item_set_icon(Evas_Object *edje, char *icon, int sync) { char *tmp; int changed; @@ -114,68 +89,49 @@ void item_set_icon(Evas_Object *edje, char *icon, int sync) -inline char *item_get_icon(Evas_Object *edje) +HAPI char *item_get_icon(Evas_Object *edje) { return evas_object_data_get(edje, STR_ATTRIBUTE_ICON); } - -void item_set_name(Evas_Object *edje, char *name, int sync) +HAPI void item_set_name(Evas_Object *edje, char *name, int sync) { char *tmp; int changed; - bool is_dual_line; tmp = evas_object_data_get(edje, STR_ATTRIBUTE_NAME); + if (!(tmp||name)) return; changed = (tmp && name) ? strcmp(name, tmp) : 1; if (!changed) { return; } - free(tmp); + if (tmp) free(tmp); evas_object_data_del(edje, STR_ATTRIBUTE_NAME); - if (name) { + if (name && (strcmp(name, "(NULL)"))) { tmp = strdup(name); - if (tmp) { - evas_object_data_set(edje, STR_ATTRIBUTE_NAME, tmp); - }else { - _E("No more memory for allocating space \"%s\"", name); - } - - is_dual_line = (bool) evas_object_data_get(edje, "item_text_dual_line"); - if (is_dual_line) { - char *dual_txt; - - # if 0 // Dual line is disabled temporarily. - dual_txt = _space_to_new_line(name); - #else - dual_txt = strdup(name); - #endif - if (edje_object_part_text_set(_EDJ(edje), "txt", dual_txt) == EINA_FALSE){ - //_E("Failed to set text on the part"); - } - free(dual_txt); - } else { - if (edje_object_part_text_set(_EDJ(edje), "txt", name) == EINA_FALSE){ - //_E("Failed to set text on the part"); - } + ret_if(NULL == tmp); + evas_object_data_set(edje, STR_ATTRIBUTE_NAME, tmp); + if (edje_object_part_text_set(_EDJ(edje), "txt", tmp) == EINA_FALSE){ + _E("Failed to set text on the part"); } + elm_object_signal_emit(edje, "text,on", "menu"); } } -inline char *item_get_name(Evas_Object *edje) +HAPI inline char *item_get_name(Evas_Object *edje) { return evas_object_data_get(edje, STR_ATTRIBUTE_NAME); } -void item_set_desktop(Evas_Object *edje, char *name, int sync) +HAPI void item_set_desktop(Evas_Object *edje, char *name, int sync) { char *tmp; int changed; @@ -201,14 +157,38 @@ void item_set_desktop(Evas_Object *edje, char *name, int sync) -inline char *item_get_desktop(Evas_Object *edje) +HAPI inline char *item_get_desktop(Evas_Object *edje) { return evas_object_data_get(edje, STR_ATTRIBUTE_DESKTOP); } -void item_set_package(Evas_Object *edje, char *package, int sync) +HAPI void item_set_type(Evas_Object *edje, int type, int sync) +{ + int tmp; + int changed; + + tmp = (int) evas_object_data_get(edje, STR_ATTRIBUTE_TYPE); + changed = (tmp == type ? 0 : 1); // We have to do sync when an attribute is created + + if (!changed) { + return ; + } + + evas_object_data_set(edje, STR_ATTRIBUTE_TYPE, (void *) type); +} + + + +HAPI inline int item_get_type(Evas_Object *edje) +{ + return (int) evas_object_data_get(edje, STR_ATTRIBUTE_TYPE); +} + + + +HAPI void item_set_package(Evas_Object *edje, char *package, int sync) { char *tmp; int changed; @@ -235,14 +215,48 @@ void item_set_package(Evas_Object *edje, char *package, int sync) -inline char *item_get_package(Evas_Object *edje) +HAPI char *item_get_package(Evas_Object *edje) { return evas_object_data_get(edje, STR_ATTRIBUTE_PKG_NAME); } -void item_set_removable(Evas_Object *edje, int removable, int sync) +HAPI void item_set_pkgid(Evas_Object *edje, char *package, int sync) +{ + char *tmp; + int changed; + + tmp = evas_object_data_get(edje, STR_ATTRIBUTE_PKGID); + changed = (package && tmp) ? strcmp(tmp, package) : 1; + + if (!changed) { + return; + } + + free(tmp); + evas_object_data_del(edje, STR_ATTRIBUTE_PKGID); + + if (package) { + tmp = strdup(package); + if (!tmp) { + _E("No more space for string \"%s\"", package); + } else { + evas_object_data_set(edje, STR_ATTRIBUTE_PKGID, tmp); + } + } +} + + + +HAPI char *item_get_pkgid(Evas_Object *edje) +{ + return evas_object_data_get(edje, STR_ATTRIBUTE_PKGID); +} + + + +HAPI void item_set_removable(Evas_Object *edje, int removable, int sync) { int value; int changed; @@ -263,14 +277,14 @@ void item_set_removable(Evas_Object *edje, int removable, int sync) -inline int item_get_removable(Evas_Object *edje) +HAPI int item_get_removable(Evas_Object *edje) { return (int) evas_object_data_get(edje, STR_ATTRIBUTE_REMOVABLE); } -void item_set_page(Evas_Object *edje, Evas_Object *page, int sync) +HAPI void item_set_page(Evas_Object *edje, Evas_Object *page, int sync) { Evas_Object *value; int changed; @@ -291,7 +305,7 @@ void item_set_page(Evas_Object *edje, Evas_Object *page, int sync) -inline Evas_Object *item_get_page(Evas_Object *edje) +HAPI Evas_Object *item_get_page(Evas_Object *edje) { return evas_object_data_get(edje, STR_ATTRIBUTE_PAGE); } @@ -299,7 +313,7 @@ inline Evas_Object *item_get_page(Evas_Object *edje) -inline void item_enable_delete(Evas_Object *item) +HAPI void item_enable_delete(Evas_Object *item) { if (item_get_removable(item) > 0) { edje_object_signal_emit(_EDJ(item), "delete,on", "menu"); @@ -308,7 +322,7 @@ inline void item_enable_delete(Evas_Object *item) -inline void item_disable_delete(Evas_Object *item) +HAPI void item_disable_delete(Evas_Object *item) { if (item_get_removable(item) > 0) { edje_object_signal_emit(_EDJ(item), "delete,off", "menu"); @@ -316,7 +330,50 @@ inline void item_disable_delete(Evas_Object *item) } -void item_enable_progress(Evas_Object *obj) + +HAPI void item_show_badge(Evas_Object *obj, int value) +{ + char str[BUFSZE]; + Evas_Object *scroller; + + ret_if(NULL == obj); + ret_if(value <= 0); + + snprintf(str, sizeof(str), "%d", value); + if (edje_object_part_text_set(_EDJ(obj), "badge,txt", str) == EINA_FALSE) { + _E("Failed to set text on the part, edje:%p, part:%s, text:%s", _EDJ(obj), "badge,txt", str); + } + + scroller = evas_object_data_get(obj, "scroller"); + ret_if(NULL == scroller); + ret_if(page_scroller_is_edited(scroller)); + + edje_object_signal_emit(_EDJ(obj), "badge,on", "menu"); + evas_object_data_set(obj, "badge,enabled", (void*)1); + + _D("Badge is updated to %s", str); +} + + + +HAPI void item_hide_badge(Evas_Object *obj) +{ + ret_if(NULL == obj); + + edje_object_signal_emit(_EDJ(obj), "badge,off", "menu"); + evas_object_data_del(obj, "badge,enabled"); +} + + + +HAPI int item_is_enabled_badge(Evas_Object *obj) +{ + return evas_object_data_get(obj, "badge,enabled") != NULL; +} + + + +HAPI void item_enable_progress(Evas_Object *obj) { Evas_Object *progress; @@ -328,7 +385,7 @@ void item_enable_progress(Evas_Object *obj) evas_object_del(progress); } - progress = elm_progressbar_add(menu_screen_get_win()); + progress = elm_progressbar_add(obj); ret_if(NULL == progress); elm_object_part_content_set(obj, "progress,swallow", progress); @@ -347,7 +404,7 @@ void item_enable_progress(Evas_Object *obj) -void item_update_progress(Evas_Object *obj, int value) +HAPI void item_update_progress(Evas_Object *obj, int value) { Evas_Object *progress; @@ -363,7 +420,7 @@ void item_update_progress(Evas_Object *obj, int value) -void item_disable_progress(Evas_Object *obj) +HAPI void item_disable_progress(Evas_Object *obj) { Evas_Object *progress; @@ -381,28 +438,60 @@ void item_disable_progress(Evas_Object *obj) -int item_is_enabled_progress(Evas_Object *obj) +HAPI int item_is_enabled_progress(Evas_Object *obj) { return evas_object_data_get(obj, "progress,enabled") != NULL; } -static Evas_Object *_add_icon_image(const char *icon_file) +HAPI void item_edit(Evas_Object *item) +{ + if (item_get_removable(item)) { + edje_object_signal_emit(_EDJ(item), "uninstall,on", "menu"); + } + edje_object_signal_emit(_EDJ(item), "badge,off", "menu"); + item_unmark_dirty(item); +} + + + +HAPI void item_unedit(Evas_Object *item) +{ + char *package; + + edje_object_signal_emit(_EDJ(item), "uninstall,off", "menu"); + + package = item_get_package(item); + if (item_badge_is_registered(item) + && item_badge_count(package) > 0) + { + edje_object_signal_emit(_EDJ(item), "badge,on", "menu"); + } +} + + + +static Evas_Object *_add_icon_image(Evas_Object *item, const char *icon_file) { Evas_Object *icon; - icon = elm_icon_add(menu_screen_get_win()); - if (elm_icon_file_set(icon, icon_file, NULL) == EINA_FALSE) { + retv_if(NULL == item, NULL); + retv_if(NULL == icon_file, NULL); + + icon = elm_icon_add(item); + retv_if(NULL == icon, NULL); + + if (elm_image_file_set(icon, icon_file, NULL) == EINA_FALSE) { _E("Icon file is not accessible (%s)", icon_file); evas_object_del(icon); icon = NULL; } - elm_icon_resizable_set(icon, EINA_TRUE, EINA_TRUE); + elm_image_resizable_set(icon, EINA_TRUE, EINA_TRUE); - if (menu_screen_get_root_height() >= BASE_HEIGHT || menu_screen_get_root_width() >= BASE_WIDTH) { - elm_icon_no_scale_set(icon, EINA_TRUE); + if (menu_screen_get_root_height() > BASE_HEIGHT || menu_screen_get_root_width() > BASE_WIDTH) { + elm_image_no_scale_set(icon, EINA_TRUE); } return icon; @@ -410,15 +499,19 @@ static Evas_Object *_add_icon_image(const char *icon_file) -static Evas_Object *_add_edje_icon(const char *icon_file) +static Evas_Object *_add_edje_icon(Evas_Object *item, const char *icon_file) { Evas_Object *icon; + + retv_if(NULL == item, NULL); + retv_if(NULL == icon_file, NULL); + if (access(icon_file, R_OK) != 0) { _E("Failed to get an icon"); return NULL; } - icon = layout_load_edj(menu_screen_get_win(), (char*)icon_file, ITEM_GROUP_NAME); + icon = layout_load_edj(item, (char*)icon_file, ITEM_GROUP_NAME); if (!icon) { _E("Failed to load an edje, [%s] group icon", icon_file); evas_object_del(icon); @@ -430,7 +523,7 @@ static Evas_Object *_add_edje_icon(const char *icon_file) -menu_screen_error_e item_is_edje_icon(const char *icon) +HAPI menu_screen_error_e item_is_edje_icon(const char *icon) { int len; const char *ext = "jde."; @@ -449,17 +542,57 @@ menu_screen_error_e item_is_edje_icon(const char *icon) -void item_update(Evas_Object *item, app_info_t *ai) +static int _is_main_operation_launch(Evas_Object *scroller, const char *package) { - Evas_Object *icon; + Eina_List *main_operation_list; + + retv_if(!package, 0); + + main_operation_list = evas_object_data_get(scroller, DATA_KEY_MAIN_OPERATION_LIST); + if (!main_operation_list) { + _D("main operation list is NULL"); + return 0; + } + + const Eina_List *l, *l_next; + char *data; + EINA_LIST_FOREACH_SAFE(main_operation_list, l, l_next, data) { + continue_if(!data); + if (!strcmp(package, data)) { + return 1; + } + } + + return 0; +} + + + +HAPI void item_update(Evas_Object *item, app_info_t *ai) +{ + Evas_Object *icon = NULL; + + ret_if(NULL == item); + ret_if(NULL == ai); if (!ai->image) { - if (item_is_edje_icon(ai->icon) == MENU_SCREEN_ERROR_OK) { - icon = _add_edje_icon(ai->icon); - evas_object_data_set(item, "icon_image_type", STR_ICON_IMAGE_TYPE_EDJE); - } else { - icon = _add_icon_image(ai->icon); - evas_object_data_set(item, "icon_image_type", STR_ICON_IMAGE_TYPE_OBJECT); + if (ai->icon) { + FILE *fp; + fp = fopen(ai->icon, "rb"); + if (fp) { + fseek(fp, 0L, SEEK_END); + _D("Access to file [%s], size[%ld]", ai->icon, ftell(fp)); + fclose(fp); + } else _E("Cannot get the file pointer[%s]", ai->icon); + + if (item_is_edje_icon(ai->icon) == MENU_SCREEN_ERROR_OK) { + icon = _add_edje_icon(item, ai->icon); + evas_object_data_set(item, "icon_image_type", STR_ICON_IMAGE_TYPE_EDJE); + } else { + icon = _add_icon_image(item, ai->icon); + ret_if(!icon); + evas_object_data_set(item, "icon_image_type", STR_ICON_IMAGE_TYPE_OBJECT); + } } } else { icon = ai->image; @@ -477,17 +610,103 @@ void item_update(Evas_Object *item, app_info_t *ai) evas_object_data_set(item, "icon_image", icon); } + item_set_pkgid(item, ai->pkgid, 0); item_set_package(item, ai->package, 0); item_set_desktop(item, ai->desktop, 0); item_set_name(item, ai->name, 0); item_set_icon(item, ai->icon, 0); evas_object_data_set(item, STR_ATTRIBUTE_REMOVABLE, (void*) ai->x_slp_removable); evas_object_data_set(item, "pid", (void *) ai->pid); + + item_badge_register(item); + + do { + Evas_Object *scroller; + + scroller = evas_object_data_get(item, "scroller"); + break_if(NULL == scroller); + + if (false == page_scroller_is_edited(scroller)) break; + item_edit(item); + } while (0); +} + + + +static char *_access_info_cb(void *data, Evas_Object *obj) +{ + Evas_Object *item = data; + char *name = NULL; + name = item_get_name(item); + retv_if(NULL == name, NULL); + + char *tmp = NULL; + tmp = strdup(name); + retv_if(NULL == tmp, NULL); + return tmp; +} + + + +/* This function is similar to _item_up_cb. But it's apparently different */ +static void _focus_clicked_cb(void *data, Evas_Object *obj, void *event_info) +{ + Evas_Object *scroller; + + Evas_Object *item = data; + ret_if(NULL == item); + + _D("ITEM: mouse up event callback is invoked for %p", item); + PRINT_APPFWK(); + + scroller = evas_object_data_get(item, "scroller"); + ret_if(NULL == scroller); + + if (true == page_scroller_is_edited(scroller)) { + return; + } + item_launch(item); } -Evas_Object *item_create(Evas_Object *scroller, app_info_t* ai) +#define IDS_AT_BODY_UNINSTALL "IDS_AT_BODY_UNINSTALL" +static char *_access_uninstall_cb(void *data, Evas_Object *obj) +{ + char *info; + char *tmp; + info = _(IDS_AT_BODY_UNINSTALL); + if (!info) return NULL; + tmp = strdup(info); + if (!tmp) return NULL; + return tmp; +} + + + +/* This function is similar to _uninstall_up_cb in item_event.c */ +static void _uninstall_focus_clicked_cb(void *data, Evas_Object *obj, void *event_info) +{ + Evas_Object *win; + char *package; + + win = menu_screen_get_win(); + ret_if(NULL == win); + + _D("Uninstall button is up"); + + Evas_Object *item = data; + package = item_get_package(item); + ret_if(!package || strlen(package) == 0); + + _D("Uninstalling... [%s]", package); + + popup_create_uninstall(win, item); +} + + + +HAPI Evas_Object *item_create(Evas_Object *scroller, app_info_t* ai) { Evas_Object *item; Evas_Object *bg; @@ -497,14 +716,42 @@ Evas_Object *item_create(Evas_Object *scroller, app_info_t* ai) int item_height; item_edje = evas_object_data_get(scroller, "item_edje"); - item = layout_load_edj(menu_screen_get_win(), item_edje, ITEM_GROUP_NAME); + retv_if(!item_edje, NULL); + item = layout_load_edj(scroller, item_edje, ITEM_GROUP_NAME); if (!item) { _E("Failed to load an item object"); return NULL; } + Evas_Object *item_focus = NULL; + Evas_Object *focus = NULL; + + do { // focus + item_focus = elm_button_add(item); + retv_if(NULL == item_focus, NULL); + + elm_object_style_set(item_focus, "focus"); + elm_object_part_content_set(item, "focus", item_focus); + elm_access_info_cb_set(item_focus, ELM_ACCESS_INFO, _access_info_cb, item); + evas_object_smart_callback_add(item_focus, "clicked", _focus_clicked_cb, item); + } while (0); + + do { // make a button for a focus button of deleting. + focus = elm_button_add(item); + retv_if(NULL == focus, NULL); + + elm_object_style_set(focus, "focus"); + elm_object_part_content_set(item, "uninstall_focus", focus); + elm_access_info_cb_set(focus, ELM_ACCESS_INFO, _access_uninstall_cb, item); + evas_object_smart_callback_add(focus, "clicked", _uninstall_focus_clicked_cb, item); + } while (0); + + elm_object_focus_next_object_set(item_focus, focus, ELM_FOCUS_UP); + elm_object_focus_next_object_set(focus, item_focus, ELM_FOCUS_DOWN); + bg = evas_object_rectangle_add(menu_screen_get_evas()); if (!bg) { + _E("Cannot add an rectangle"); evas_object_del(item); return NULL; } @@ -518,8 +765,6 @@ Evas_Object *item_create(Evas_Object *scroller, app_info_t* ai) evas_object_size_hint_max_set(bg, item_width, item_height); elm_object_part_content_set(item, "bg", bg); - edje_object_text_class_set(_EDJ(item), "menu_item", "SLP:style=medium", 24); - evas_object_data_set(item, "win", evas_object_data_get(scroller, "win")); evas_object_data_set(item, "layout", evas_object_data_get(scroller, "layout")); evas_object_data_set(item, "controlbar", evas_object_data_get(scroller, "controlbar")); @@ -531,16 +776,24 @@ Evas_Object *item_create(Evas_Object *scroller, app_info_t* ai) evas_object_data_set(item, "x", (void *) 0); evas_object_data_set(item, "y", (void *) 0); evas_object_data_set(item, "dirty", (void *) 0); + if (_is_main_operation_launch(scroller, ai->package)) { + evas_object_data_set(item, DATA_KEY_ITEM_LAUNCH_MAIN_OPERATION, (void *) 1); + } item_update(item, ai); item_event_register(item); + if (MENU_SCREEN_ERROR_OK != + pkgmgr_item_list_append_item(ai->pkgid, ai->package, item)) + { + _E("Cannot append an item into the item list"); + } return item; } -void item_destroy(Evas_Object *item) +HAPI void item_destroy(Evas_Object *item) { Evas_Object *icon; Evas_Object *bg; @@ -549,24 +802,39 @@ void item_destroy(Evas_Object *item) Eina_List *n; Eina_List *t; Evas_Object *pend_item; - int pending_idx; const char *icon_image_type; + char *pkgid = NULL; + char *package= NULL; ret_if(NULL == item); + pkgid = item_get_pkgid(item); + package = item_get_package(item); + + if (pkgid + && package + && MENU_SCREEN_ERROR_OK != + pkgmgr_item_list_remove_item(pkgid, package, item)) + { + _E("Cannot remove an item in the item list"); + } + page = item_get_page(item); pending_list = evas_object_data_get(page, "pending,list"); EINA_LIST_FOREACH_SAFE(pending_list, n, t, pend_item) { if (pend_item == item) { - pending_idx = (int)evas_object_data_get(pend_item, "pending,idx"); pending_list = eina_list_remove(pending_list, pend_item); evas_object_data_set(page, "pending,list", pending_list); evas_object_data_del(pend_item, "pending,idx"); } } + if (item_badge_is_registered(item)) { + item_badge_unregister(item); + } item_event_unregister(item); + item_set_pkgid(item, NULL, 0); item_set_package(item, NULL, 1); item_set_desktop(item, NULL, 1); item_set_name(item, NULL, 1); @@ -602,6 +870,24 @@ void item_destroy(Evas_Object *item) evas_object_data_del(item, "x"); evas_object_data_del(item, "y"); evas_object_data_del(item, "dirty"); + evas_object_data_del(item, DATA_KEY_ITEM_LAUNCH_MAIN_OPERATION); + + do { + Evas_Object *focus = NULL; + focus = elm_object_part_content_unset(item, "focus"); + if (NULL == focus) break; + evas_object_smart_callback_del(focus, "clicked", _focus_clicked_cb); + evas_object_del(focus); + } while (0); + + do { + Evas_Object *focus = NULL; + focus = elm_object_part_content_unset(item, "uninstall_focus"); + if (NULL == focus) break; + evas_object_smart_callback_del(focus, "clicked", _uninstall_focus_clicked_cb); + evas_object_del(focus); + } while (0); + layout_unload_edj(item); } @@ -610,50 +896,104 @@ void item_destroy(Evas_Object *item) static Eina_Bool _unblock_cb(void *data) { Evas_Object *layout; - layout = evas_object_data_get(menu_screen_get_win(), "layout_current"); + layout = evas_object_data_get(menu_screen_get_win(), "layout"); layout_disable_block(layout); return EINA_FALSE; } -void item_launch(Evas_Object *obj) +static void _run_cb(bundle *b, int request_code, appsvc_result_val result, void *data) +{ +} + + +#define BUNDLE_KEY_OPERATION "__APP_SVC_OP_TYPE__" +HAPI void item_launch(Evas_Object *obj) { char *package; char *name; - int ret_aul; - Evas_Object *layout; + bundle *b = NULL; + Evas_Object *layout = NULL; - ret_if(NULL == obj); + Evas_Object *item = obj; + ret_if(NULL == item); - name = item_get_name(obj); - package = item_get_package(obj); + name = item_get_name(item); + package = item_get_package(item); ret_if(NULL == package); - layout = evas_object_data_get(menu_screen_get_win(), "layout_current"); + layout = evas_object_data_get(menu_screen_get_win(), "layout"); layout_enable_block(layout); - ret_aul = aul_open_app(package); - if (ret_aul == AUL_R_EINVAL) { - char* sinform; - int len; + bool is_shortcut = (bool) evas_object_data_get(item, "is_shortcut"); + bool shortcut_launch_package = (bool) evas_object_data_get(item, "shortcut_launch_package"); + if (is_shortcut && !shortcut_launch_package) { + b = bundle_create(); + ret_if(NULL == b); - // IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS : "Unable to launch %s" - len = strlen(D_("IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS")) + strlen(name) + 1; + appsvc_set_operation(b, APPSVC_OPERATION_VIEW); + appsvc_set_uri(b, evas_object_data_get(item, "content_info")); - sinform = calloc(len, sizeof(char)); - if (!sinform) { - _E("cannot calloc for popup."); - return; + int ret = -1; + ret = appsvc_run_service(b, 0, _run_cb, NULL); + if (0 > ret) { + _E("cannot run service. ret [%d]", ret); + layout_disable_block(layout); + } else { + _D("Launch app's ret : [%d]", ret); + ecore_timer_add(LAYOUT_BLOCK_INTERVAL, _unblock_cb, NULL); } - snprintf(sinform, len, D_("IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS"), name); - popup_create(obj, sinform); - - free(sinform); - layout_disable_block(layout); + bundle_free(b); } else { + int ret_aul = AUL_R_OK; + if (evas_object_data_get(item, DATA_KEY_ITEM_LAUNCH_MAIN_OPERATION)) { + b = bundle_create(); + ret_if(NULL == b); + + if (0 != bundle_add(b, BUNDLE_KEY_OPERATION, APP_CONTROL_OPERATION_MAIN)) { + _E("Cannot add to a bundle"); + bundle_free(b); + return; + } + + if (b) { + ret_aul = aul_launch_app(package, b); + if (AUL_R_EINVAL == ret_aul) { + _E("cannot launch app"); + } + bundle_free(b); + } + } else { + ret_aul = aul_open_app(package); + if (AUL_R_EINVAL == ret_aul) { + char* sinform; + int len; + + if (!name) { + name = package; + } + + // IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS : "Unable to launch %s" + len = strlen(D_("IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS")) + strlen(name) + 1; + + sinform = calloc(len, sizeof(char)); + if (!sinform) { + _E("cannot calloc for popup."); + return; + } + + snprintf(sinform, len, D_("IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS"), name); + popup_create_confirm(layout, sinform); + + free(sinform); + layout_disable_block(layout); + } + } + _D("Launch app's ret : [%d]", ret_aul); + _T(package); ecore_timer_add(LAYOUT_BLOCK_INTERVAL, _unblock_cb, NULL); } @@ -661,7 +1001,7 @@ void item_launch(Evas_Object *obj) -int item_get_position(Evas_Object *item) +HAPI int item_get_position(Evas_Object *item) { Evas_Object *scroller; Evas_Object *layout; @@ -716,21 +1056,21 @@ int item_get_position(Evas_Object *item) -void item_mark_dirty(Evas_Object *item) +HAPI void item_mark_dirty(Evas_Object *item) { evas_object_data_set(item, "dirty", (void *) 1); } -void item_unmark_dirty(Evas_Object *item) +HAPI void item_unmark_dirty(Evas_Object *item) { evas_object_data_set(item, "dirty", (void *) 0); } -int item_is_dirty(Evas_Object *item) +HAPI int item_is_dirty(Evas_Object *item) { return (int) evas_object_data_get(item, "dirty"); } diff --git a/src/item_badge.c b/src/item_badge.c new file mode 100644 index 0000000..aa52032 --- /dev/null +++ b/src/item_badge.c @@ -0,0 +1,184 @@ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include +#include + +#include "menu_screen.h" +#include "conf.h" +#include "item.h" +#include "page_scroller.h" +#include "util.h" + + + +HAPI int item_badge_count(char *package) +{ + unsigned int is_display = 0; + unsigned int count = 0; + badge_error_e err = BADGE_ERROR_NONE; + + err = badge_get_display(package, &is_display); + if (BADGE_ERROR_NONE != err) _D("cannot get badge display"); + + if (0 == is_display) return 0; + + err = badge_get_count(package, &count); + if (BADGE_ERROR_NONE != err) _D("cannot get badge count"); + + _D("Badge for package %s : %u", package, count); + + return (int) count; +} + + + +static Eina_Bool _idler_cb(void *data) +{ + char *package; + int count; + Evas_Object *item = data; + + package = item_get_package(item); + if (!package) { + _D("Failed to get a package name"); + evas_object_data_del(item, "idle_timer"); + return ECORE_CALLBACK_CANCEL; + } + + count = item_badge_count(package); + _D("Register badge to Item, count: %d", count); + if (count) item_show_badge(item, count); + else item_hide_badge(item); + + evas_object_data_del(item, "idle_timer"); + + return ECORE_CALLBACK_CANCEL; +} + + + +HAPI bool item_badge_is_registered(Evas_Object *item) +{ + const char *pkgname; + badge_error_e err; + bool existing = false; + + pkgname = item_get_package(item); + retv_if(NULL == pkgname, false); + + err = badge_is_existing(pkgname, &existing); + if (BADGE_ERROR_NONE != err) _E("cannot know whether the badge for %s is or not.", pkgname); + + return existing? true : false; +} + + + +HAPI menu_screen_error_e item_badge_register(Evas_Object *item) +{ + Ecore_Idler *idle_timer; + bool is_registered; + + is_registered = item_badge_is_registered(item); + if (false == is_registered) return MENU_SCREEN_ERROR_OK; + + idle_timer = ecore_idler_add(_idler_cb, item); + retv_if(NULL == idle_timer, MENU_SCREEN_ERROR_FAIL); + evas_object_data_set(item, "idle_timer", idle_timer); + + return MENU_SCREEN_ERROR_OK; +} + + + +HAPI void item_badge_unregister(Evas_Object *item) +{ + char *package; + Ecore_Idler *idle_timer; + + package = item_get_package(item); + if (!package) return; + + idle_timer = evas_object_data_get(item, "idle_timer"); + if (idle_timer) { + _D("Badge handler for package %s is not yet ready", package); + evas_object_data_del(item, "idle_timer"); + ecore_idler_del(idle_timer); + return; + } + + item_hide_badge(item); +} + + + +static void _badge_change_cb(unsigned int action, const char *pkgname, unsigned int count, void *data) +{ + Evas_Object *scroller = data; + Evas_Object *item; + unsigned int is_display = 0; + badge_error_e err; + + _D("Badge changed, action : %u, pkgname : %s, count : %u", action, pkgname, count); + + ret_if(NULL == pkgname); + + if (BADGE_ACTION_REMOVE == action) { + count = 0; + is_display = false; + } else { + count = item_badge_count(pkgname); + } + + item = page_scroller_find_item_by_package(scroller, pkgname, NULL); + if (NULL == item) return; + + _D("Badge change cb, count: %d", count); + if (count) item_show_badge(item, count); + else item_hide_badge(item); +} + + + +HAPI void item_badge_register_changed_cb(Evas_Object *scroller) +{ + badge_error_e err; + + err = badge_register_changed_cb(_badge_change_cb, scroller); + ret_if(BADGE_ERROR_NONE != err); +} + + + +HAPI void item_badge_unregister_changed_cb(void) +{ + badge_error_e err; + + err = badge_unregister_changed_cb(_badge_change_cb); + ret_if(BADGE_ERROR_NONE != err); +} + + + +// End of a file diff --git a/src/item_event.c b/src/item_event.c index 4742b9b..01aa4f1 100644 --- a/src/item_event.c +++ b/src/item_event.c @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #include #include @@ -29,6 +33,8 @@ #include "mouse.h" #include "page.h" #include "page_scroller.h" +#include "pkgmgr.h" +#include "popup.h" #include "util.h" #include "all_apps/layout.h" @@ -83,26 +89,44 @@ static void _item_up_cb(void *data, Evas_Object *obj, const char* emission, cons evas_object_color_set(icon_image, 255, 255, 255, 255); ret_if(NULL == item_event_info.pressed_item); + if (item != item_event_info.pressed_item) { + item_event_info.pressed_item = NULL; + return; + } + item_event_info.pressed_item = NULL; +} - if (item_event_info.pressed_item == item) { - bool item_enable_long_press; - item_enable_long_press = (bool) evas_object_data_get(item, "item_enable_long_press"); - _D("Not Edit Mode"); - if (mouse_is_scrolling()) { - return; - } +static void _uninstall_down_cb(void *data, Evas_Object *obj, const char* emission, const char* source) +{ + _D("Uninstall button is down"); + obj = evas_object_data_get(obj, "evas_object"); + if (obj) evas_object_data_set(obj, "removing", (void*)1); +} - item_launch(item); - } - item_event_info.pressed_item = NULL; + +static void _uninstall_up_cb(void *item, Evas_Object *obj, const char* emission, const char* source) +{ + Evas_Object *win; + + ret_if(mouse_is_scrolling()); + + win = menu_screen_get_win(); + ret_if(NULL == win); + + _D("Uninstall button is up"); + obj = evas_object_data_get(obj, "evas_object"); + ret_if(NULL == obj); + ret_if(NULL == evas_object_data_get(obj, "removing")); + + evas_object_data_del(obj, "removing"); } -void item_event_register(Evas_Object *item) +HAPI void item_event_register(Evas_Object *item) { Evas_Object *item_edje; item_edje = _EDJ(item); @@ -110,11 +134,14 @@ void item_event_register(Evas_Object *item) edje_object_signal_callback_add(item_edje, "item,down", "menu", _item_down_cb, NULL); edje_object_signal_callback_add(item_edje, "item,up", "menu", _item_up_cb, NULL); + + edje_object_signal_callback_add(item_edje, "uninstall,down", "menu", _uninstall_down_cb, NULL); + edje_object_signal_callback_add(item_edje, "uninstall,up", "menu", _uninstall_up_cb, item); } -void item_event_unregister(Evas_Object *item) +HAPI void item_event_unregister(Evas_Object *item) { Evas_Object *item_edje; item_edje = _EDJ(item); @@ -122,6 +149,9 @@ void item_event_unregister(Evas_Object *item) edje_object_signal_callback_del(item_edje, "item,down", "menu", _item_down_cb); edje_object_signal_callback_del(item_edje, "item,up", "menu", _item_up_cb); + edje_object_signal_callback_del(item_edje, "uninstall,down", "menu", _uninstall_down_cb); + edje_object_signal_callback_del(item_edje, "uninstall,up", "menu", _uninstall_up_cb); + evas_object_data_del(item_edje, "item"); } diff --git a/src/key.c b/src/key.c new file mode 100644 index 0000000..682deb4 --- /dev/null +++ b/src/key.c @@ -0,0 +1,237 @@ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include +#include +#include + +#include "conf.h" +#include "key.h" +#include "menu_screen.h" +#include "page_scroller.h" +#include "popup.h" +#include "util.h" +#include "all_apps/layout.h" + + + +static struct { + Eina_Bool pressed; + Ecore_Event_Handler *press_handler; + Ecore_Event_Handler *release_handler; + Eina_Bool register_handler; + Ecore_Timer *long_press; + Eina_Bool home_grabbed; +} key_info = { + .pressed = 0, + .press_handler = NULL, + .release_handler = NULL, + .register_handler = EINA_FALSE, + .long_press = NULL, + .home_grabbed = EINA_FALSE, +}; + + + +#define KEY_LEFT "Left" +#define KEY_RIGHT "Right" +#define KEY_UP "Up" +#define KEY_DOWN "Down" +#define KEY_ESC "Escape" +static Eina_Bool _key_release_cb(void *data, int type, void *event) +{ + Evas_Event_Key_Up *ev = event; + + retv_if(EINA_FALSE == key_info.register_handler, ECORE_CALLBACK_CANCEL); + retv_if(NULL == ev, ECORE_CALLBACK_CANCEL); + + _D("Key(%s) released %d", ev->keyname, key_info.pressed); + + if (key_info.pressed == EINA_FALSE) return ECORE_CALLBACK_CANCEL; + + do { + Evas_Object *win; + win = menu_screen_get_win(); + break_if(NULL == win); + + Evas_Object *layout; + layout = evas_object_data_get(win, "layout"); + break_if(NULL == layout); + + Evas_Object *all_apps; + all_apps = evas_object_data_get(layout, "all_apps"); + break_if(NULL == all_apps); + + Evas_Object *scroller = evas_object_data_get(all_apps, "scroller"); + break_if(NULL == scroller); + + if (!strcmp(ev->keyname, KEY_SELECT) || !strcmp(ev->keyname, KEY_BACK)) { + if (popup_exist()) { + popup_destroy_all(); + break; + } + + if (all_apps_layout_is_edited(all_apps)) { + all_apps_layout_unedit(all_apps); + } + } else if (!strcmp(ev->keyname, KEY_LEFT) || + !strcmp(ev->keyname, KEY_RIGHT) || + !strcmp(ev->keyname, KEY_UP) || + !strcmp(ev->keyname, KEY_DOWN)) + { + int cur_idx = page_scroller_get_current_page_no(scroller); + int idx = 0, x = 0, w = 0; + elm_scroller_region_get(scroller, &x, NULL, &w, NULL); + + if (w) idx = x / w; + if (cur_idx != idx) { + page_scroller_bring_in(scroller, idx); + break; + } + + /* If there are no items to be focused after pressing keys, + Menu-screen forces to focus the first item of the other page */ + int rest = 0; + if (w) { + rest = x % w; + } + if (rest) { + page_scroller_focus_into_vector(scroller, rest > w / 2 ? -1 : 1); + } + } + else if (!strcmp(ev->keyname, KEY_ESC)) + { + if (popup_exist()) + { + popup_destroy_all(); + break; + } + if (all_apps_layout_is_edited(all_apps)) { + all_apps_layout_unedit(all_apps); + } + } + } while (0); + + key_info.pressed = EINA_FALSE; + + return ECORE_CALLBACK_CANCEL; +} + + + +static Eina_Bool _key_press_cb(void *data, int type, void *event) +{ + Evas_Event_Key_Down *ev = event; + + retv_if(EINA_FALSE == key_info.register_handler, ECORE_CALLBACK_CANCEL); + retv_if(NULL == ev, ECORE_CALLBACK_CANCEL); + + key_info.pressed = EINA_TRUE; + _D("Key pressed %d", key_info.pressed); + + return ECORE_CALLBACK_CANCEL; +} + + + +HAPI void key_register(void) +{ + if (!key_info.release_handler) { + key_info.release_handler = ecore_event_handler_add(ECORE_EVENT_KEY_UP, _key_release_cb, NULL); + if (!key_info.release_handler) { + _E("Failed to register a key up event handler"); + } + } + + if (!key_info.press_handler) { + key_info.press_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _key_press_cb, NULL); + if (!key_info.press_handler) { + _E("Failed to register a key down event handler"); + } + } + + key_info.pressed = EINA_FALSE; + key_info.register_handler = EINA_TRUE; +} + + + +HAPI void key_unregister(void) +{ + if (key_info.long_press) { + ecore_timer_del(key_info.long_press); + key_info.long_press = NULL; + } + + if (key_info.release_handler) { + ecore_event_handler_del(key_info.release_handler); + key_info.release_handler = NULL; + } + + if (key_info.press_handler) { + ecore_event_handler_del(key_info.press_handler); + key_info.press_handler = NULL; + } + + key_info.register_handler = EINA_FALSE; +} + + + +HAPI void key_grab_home(void) +{ + if (EINA_TRUE == key_info.home_grabbed) return; + + Ecore_X_Window win = elm_win_xwindow_get(menu_screen_get_win()); + Display* dpy = ecore_x_display_get(); + + int ret = utilx_grab_key(dpy, win, KEY_SELECT, TOP_POSITION_GRAB); + ret_if(0 != ret); + + ret = utilx_grab_key(dpy, win, KEY_BACK, TOP_POSITION_GRAB); + ret_if(0 != ret); + + key_info.home_grabbed = EINA_TRUE; +} + + + +HAPI void key_ungrab_home(void) +{ + if (key_info.home_grabbed == EINA_FALSE) return; + + Ecore_X_Window win = elm_win_xwindow_get(menu_screen_get_win()); + Display* dpy = ecore_x_display_get(); + + int ret = utilx_ungrab_key(dpy, win, KEY_SELECT); + ret_if(0 != ret); + + ret = utilx_ungrab_key(dpy, win, KEY_BACK); + ret_if(0 != ret); + + key_info.home_grabbed = EINA_FALSE; +} + + + +// End of a file diff --git a/src/layout.c b/src/layout.c index cc5a60d..6eef4b3 100644 --- a/src/layout.c +++ b/src/layout.c @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #include #include @@ -27,57 +31,75 @@ #include "layout.h" #include "mapbuf.h" #include "page.h" +#include "page_scroller.h" #include "item.h" #include "util.h" #include "all_apps/layout.h" -Evas_Object *layout_create(Evas_Object *win, const char *file, const char *group, int rotate) +HAPI Evas_Object *layout_create(Evas_Object *conformant, const char *file, const char *group, int rotate) { Evas_Object *layout; - Evas_Object *all_apps; - int width; - int height; - - layout = layout_load_edj(win, file, group); - retv_if(NULL == layout, NULL); - - evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_win_resize_object_add(win, layout); - - evas_object_data_set(layout, "win", win); - evas_object_data_set(layout, "rotate", (void *) rotate); - - width = menu_screen_get_root_width(); - height = menu_screen_get_root_height(); - - evas_object_data_set(layout, "width", (void *) width); - evas_object_data_set(layout, "height", (void *) height); - - all_apps = all_apps_layout_create(layout, rotate); - if (NULL == all_apps) { - _E("Failed to create scroller"); - layout_destroy(layout); - return NULL; - } - evas_object_data_set(layout, "all_apps", all_apps); - elm_object_part_content_set(layout, "content", all_apps); + Evas_Object *bg; + Evas *evas; + + do { + int width; + int height; + + layout = layout_load_edj(conformant, file, group); + retv_if(NULL == layout, NULL); + + width = menu_screen_get_root_width(); + height = menu_screen_get_root_height(); + + evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_min_set(layout, width, height); + evas_object_size_hint_max_set(layout, width, height); + evas_object_resize(layout, width, height); + evas_object_show(layout); + + evas = evas_object_evas_get(layout); + bg = evas_object_rectangle_add(evas); + evas_object_size_hint_min_set(bg, width, height); + evas_object_size_hint_max_set(bg, width, height); + evas_object_resize(bg, width, height); + elm_object_part_content_set(layout, "bg", bg); + evas_object_show(bg); + + evas_object_data_set(layout, "win", menu_screen_get_win()); + evas_object_data_set(layout, "rotate", (void *) rotate); + evas_object_data_set(layout, "width", (void *) width); + evas_object_data_set(layout, "height", (void *) height); + } while (0); + + do { + Evas_Object *all_apps; + + all_apps = all_apps_layout_create(layout, rotate); + if (NULL == all_apps) { + _E("Failed to create scroller"); + layout_destroy(layout); + return NULL; + } + evas_object_data_set(layout, "all_apps", all_apps); + elm_object_part_content_set(layout, "content", all_apps); + } while (0); return layout; } -void layout_destroy(Evas_Object *layout) +HAPI void layout_destroy(Evas_Object *layout) { Evas_Object *all_apps; - all_apps = evas_object_data_get(layout, "all_apps"); + all_apps = evas_object_data_del(layout, "all_apps"); all_apps_layout_destroy(all_apps); evas_object_data_del(layout, "win"); - evas_object_data_del(layout, "all_apps"); evas_object_data_del(layout, "rotate"); evas_object_data_del(layout, "width"); evas_object_data_del(layout, "height"); @@ -87,7 +109,7 @@ void layout_destroy(Evas_Object *layout) -void layout_enable_block(Evas_Object *layout) +HAPI void layout_enable_block(Evas_Object *layout) { ret_if(NULL == layout); @@ -97,7 +119,7 @@ void layout_enable_block(Evas_Object *layout) -void layout_disable_block(Evas_Object *layout) +HAPI void layout_disable_block(Evas_Object *layout) { ret_if(NULL == layout); @@ -107,7 +129,7 @@ void layout_disable_block(Evas_Object *layout) -Evas_Object* layout_load_edj(Evas_Object *parent, const char *edjname, const char *grpname) +HAPI Evas_Object* layout_load_edj(Evas_Object *parent, const char *edjname, const char *grpname) { Evas_Object *eo; @@ -125,7 +147,7 @@ Evas_Object* layout_load_edj(Evas_Object *parent, const char *edjname, const cha -void layout_unload_edj(Evas_Object *layout) +HAPI void layout_unload_edj(Evas_Object *layout) { Evas_Object *evas_object; @@ -141,4 +163,150 @@ void layout_unload_edj(Evas_Object *layout) +HAPI void layout_create_package(Evas_Object *layout, const char *package) +{ + app_info_t ai = {0,}; + Evas_Object *all_apps = NULL; + Evas_Object *scroller = NULL; + Evas_Object *item = NULL; + + if (MENU_SCREEN_ERROR_FAIL == list_get_values(package, &ai)) { + list_free_values(&ai); + return; + } + + if (ai.nodisplay) { + _D("This app(%s) is nodisplay", ai.package); + list_free_values(&ai); + return; + } + + + all_apps = evas_object_data_get(layout, "all_apps"); + goto_if(!all_apps, EXIT); + + scroller = evas_object_data_get(all_apps, "scroller"); + goto_if(!scroller, EXIT); + + /* Update the package */ + item = page_scroller_find_item_by_package(scroller, ai.package, NULL); + if (item) { + _D("Package %s is found, update it!", package); + item_update(item, &ai); + goto EXIT; + } + + /* Create the package */ + _D("package %s is installed directly", package); + item = page_scroller_push_item_by_order(scroller, &ai); + if (!item) _E("item is NULL"); + +EXIT: + list_free_values(&ai); + return; +} + + + +HAPI void layout_update_package(Evas_Object *layout, const char *package) +{ + layout_create_package(layout, package); +} + + + +static Evas_Object *_animated_unpack_item(Evas_Object *scroller, Evas_Object *page, unsigned int pos) +{ + Evas_Object *out = NULL; + Evas_Object *item; + Evas_Object *next_page; + + char buf[32]; + unsigned int page_max_app; + unsigned int page_no; + page_scroller_sort_type_e sort_type; + + out = page_unpack_item_at(page, pos); + retv_if(NULL == out, NULL); + + page_no = page_scroller_get_page_no(scroller, page); + page_max_app = (unsigned int) evas_object_data_get(scroller, "page_max_app"); + sort_type = (page_scroller_sort_type_e) evas_object_data_get(scroller, "sort_type"); + + pos ++; + while (page && page_no < MAX_PAGE_NO) { + if (0 == page_count_item(page)) { + page_destroy(scroller, page); + break; + } + + for (; pos < page_max_app; pos ++) { + item = page_unpack_item_at(page, pos); + if (NULL == item) continue; + + page_pack_item(page, pos - 1, item); + snprintf(buf, 32, "menu%d", pos - 1); + edje_object_signal_emit(_EDJ(page), STR_MOVE_NEXT, buf); + edje_object_signal_emit(_EDJ(page), STR_ANI_RETURN, buf); + } + + if (sort_type == PAGE_SCROLLER_SORT_MAX) { + return NULL; + } + + page_no ++; + next_page = page_scroller_get_page_at(scroller, page_no); + if (next_page) { + item = page_unpack_item_at(next_page, 0); + if (NULL == item) continue; + + page_pack_item(page, page_max_app - 1, item); + } else break; + + pos = 1; + page = next_page; + } + + return out; +} + + + +HAPI void layout_delete_package(Evas_Object *layout, const char *package) +{ + Evas_Object *all_apps = NULL; + Evas_Object *scroller = NULL; + Evas_Object *page = NULL; + Evas_Object *item = NULL; + int page_no = 0; + register unsigned int i; + unsigned int page_max_app; + + all_apps = evas_object_data_get(layout, "all_apps"); + ret_if(!all_apps); + + scroller = evas_object_data_get(all_apps, "scroller"); + ret_if(!scroller); + + item = page_scroller_find_item_by_package(scroller, package, &page_no); + if (!item) return; + + page = page_scroller_get_page_at(scroller, page_no); + ret_if(!page); + + page_max_app = (unsigned int) evas_object_data_get(scroller, "page_max_app"); + for (i = 0; i < page_max_app; i++) { + if (item == page_get_item_at(page, i)) { + break; + } + } + if (i == page_max_app) return; + + item = _animated_unpack_item(scroller, page, i); + ret_if(!item); + item_destroy(item); +} + + + // End of file diff --git a/src/list.c b/src/list.c index 5109904..3532887 100644 --- a/src/list.c +++ b/src/list.c @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #include #include @@ -27,7 +31,7 @@ -menu_screen_error_e list_count(app_list *list, int *count) +HAPI menu_screen_error_e list_count(app_list *list, int *count) { retv_if(NULL == list, MENU_SCREEN_ERROR_INVALID_PARAMETER); retv_if(NULL == list->list, MENU_SCREEN_ERROR_INVALID_PARAMETER); @@ -40,7 +44,7 @@ menu_screen_error_e list_count(app_list *list, int *count) -menu_screen_error_e list_first(app_list *list) +HAPI menu_screen_error_e list_first(app_list *list) { retv_if(NULL == list, MENU_SCREEN_ERROR_INVALID_PARAMETER); @@ -51,7 +55,7 @@ menu_screen_error_e list_first(app_list *list) -menu_screen_error_e list_next(app_list *list) +HAPI menu_screen_error_e list_next(app_list *list) { int count; @@ -68,7 +72,7 @@ menu_screen_error_e list_next(app_list *list) -menu_screen_error_e list_is_ended(app_list *list, bool *flag) +HAPI menu_screen_error_e list_is_ended(app_list *list, bool *flag) { int count; @@ -83,7 +87,7 @@ menu_screen_error_e list_is_ended(app_list *list, bool *flag) -menu_screen_error_e list_get_item(app_list *list, app_list_item **item) +HAPI menu_screen_error_e list_get_item(app_list *list, app_list_item **item) { retv_if(NULL == list, MENU_SCREEN_ERROR_INVALID_PARAMETER); retv_if(NULL == list->list, MENU_SCREEN_ERROR_INVALID_PARAMETER); @@ -95,10 +99,11 @@ menu_screen_error_e list_get_item(app_list *list, app_list_item **item) - -menu_screen_error_e list_get_values(const char *package, app_info_t *ai) +/* FIXME : package -> appid */ +HAPI menu_screen_error_e list_get_values(const char *package, app_info_t *ai) { ail_appinfo_h appinfo_h; + char *pkgid; char *exec; char *name; char *icon; @@ -108,51 +113,77 @@ menu_screen_error_e list_get_values(const char *package, app_info_t *ai) retv_if(NULL == ai, MENU_SCREEN_ERROR_FAIL); retv_if(NULL == (ai->package = strdup(package)), MENU_SCREEN_ERROR_FAIL); - ret = ail_package_get_appinfo(ai->package, &appinfo_h); + ret = ail_get_appinfo(ai->package, &appinfo_h); if (AIL_ERROR_OK == ret) { do { + /* FIXME : Please check this */ + break_if(ail_appinfo_get_str(appinfo_h, AIL_PROP_X_SLP_PKGID_STR, &pkgid) < 0); break_if(ail_appinfo_get_str(appinfo_h, AIL_PROP_EXEC_STR, &exec) < 0); break_if(ail_appinfo_get_str(appinfo_h, AIL_PROP_NAME_STR, &name) < 0); break_if(ail_appinfo_get_str(appinfo_h, AIL_PROP_ICON_STR, &icon) < 0); break_if(ail_appinfo_get_bool(appinfo_h, AIL_PROP_NODISPLAY_BOOL, &ai->nodisplay) < 0); + break_if(ail_appinfo_get_bool(appinfo_h, AIL_PROP_X_SLP_ENABLED_BOOL, &ai->enabled) < 0); break_if(ail_appinfo_get_bool(appinfo_h, AIL_PROP_X_SLP_REMOVABLE_BOOL, &ai->x_slp_removable) < 0); break_if(ail_appinfo_get_bool(appinfo_h, AIL_PROP_X_SLP_TASKMANAGE_BOOL, &ai->x_slp_taskmanage) < 0); + break_if(NULL == pkgid || NULL == (ai->pkgid = strdup(pkgid))); break_if(NULL == exec || NULL == (ai->exec = strdup(exec))); break_if(NULL == name || NULL == (ai->name = strdup(name))); break_if(NULL == icon || NULL == (ai->icon = strdup(icon))); - ail_package_destroy_appinfo(appinfo_h); + ail_destroy_appinfo(appinfo_h); return MENU_SCREEN_ERROR_OK; } while(0); - ail_package_destroy_appinfo(appinfo_h); + ail_destroy_appinfo(appinfo_h); list_free_values(ai); return MENU_SCREEN_ERROR_FAIL; } else if (AIL_ERROR_NO_DATA == ret) { return MENU_SCREEN_ERROR_OK; } + if (appinfo_h) ail_destroy_appinfo(appinfo_h); + return MENU_SCREEN_ERROR_FAIL; } -void list_free_values(app_info_t *ai) +HAPI void list_free_values(app_info_t *ai) { ret_if(NULL == ai); /* Origin field */ - if (ai->package) free(ai->package); - if (ai->exec) free(ai->exec); - if (ai->name) free(ai->name); - if (ai->icon) free(ai->icon); + if (ai->pkgid) { + free(ai->pkgid); + ai->pkgid = NULL; + } + + if (ai->package) { + free(ai->package); + ai->package = NULL; + } + + if (ai->exec) { + free(ai->exec); + ai->exec = NULL; + } + + if (ai->name) { + free(ai->name); + ai->name = NULL; + } + + if (ai->icon) { + free(ai->icon); + ai->icon = NULL; + } } -menu_screen_error_e list_append_item(app_list *list, app_list_item *item) +HAPI menu_screen_error_e list_append_item(app_list *list, app_list_item *item) { retv_if(NULL == list, MENU_SCREEN_ERROR_INVALID_PARAMETER); retv_if(NULL == item, MENU_SCREEN_ERROR_INVALID_PARAMETER); @@ -165,7 +196,7 @@ menu_screen_error_e list_append_item(app_list *list, app_list_item *item) -menu_screen_error_e list_remove_item(app_list *list, app_list_item *item) +HAPI menu_screen_error_e list_remove_item(app_list *list, app_list_item *item) { retv_if(NULL == list, MENU_SCREEN_ERROR_INVALID_PARAMETER); retv_if(NULL == list->list, MENU_SCREEN_ERROR_INVALID_PARAMETER); @@ -178,7 +209,7 @@ menu_screen_error_e list_remove_item(app_list *list, app_list_item *item) -menu_screen_error_e list_sort(app_list *list, int (*_sort_cb)(const void *d1, const void *d2)) +HAPI menu_screen_error_e list_sort(app_list *list, int (*_sort_cb)(const void *d1, const void *d2)) { retv_if(NULL == list, MENU_SCREEN_ERROR_INVALID_PARAMETER); @@ -190,4 +221,18 @@ menu_screen_error_e list_sort(app_list *list, int (*_sort_cb)(const void *d1, co +HAPI app_list_item *list_nth(app_list *parent, unsigned int nth) +{ + Eina_List *list; + + retv_if(NULL == parent, NULL); + + list = parent->list; + retv_if(NULL == list, NULL); + + return eina_list_nth(list, nth); +} + + + // End of a file diff --git a/src/mapbuf.c b/src/mapbuf.c index e2ac478..a9fb5bb 100644 --- a/src/mapbuf.c +++ b/src/mapbuf.c @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #include @@ -26,7 +30,7 @@ -Evas_Object *mapbuf_get_mapbuf(Evas_Object *obj) +HAPI Evas_Object *mapbuf_get_mapbuf(Evas_Object *obj) { Evas_Object *mapbuf; @@ -42,7 +46,7 @@ Evas_Object *mapbuf_get_mapbuf(Evas_Object *obj) -Evas_Object *mapbuf_get_page(Evas_Object *obj) +HAPI Evas_Object *mapbuf_get_page(Evas_Object *obj) { Evas_Object *page; @@ -58,7 +62,21 @@ Evas_Object *mapbuf_get_page(Evas_Object *obj) -menu_screen_error_e mapbuf_enable(Evas_Object *obj, int force) +static void _move_pages(Evas_Object *page) +{ + if(NULL == page) return; + + Evas_Object *scroller = evas_object_data_get(page, "scroller"); + if(NULL == scroller) return; + + Evas_Coord x, y; + evas_object_geometry_get(scroller, &x, &y, NULL, NULL); + evas_object_move(page, x, y); +} + + + +HAPI menu_screen_error_e mapbuf_enable(Evas_Object *obj, int force) { Evas_Object *mapbuf; int cnt; @@ -69,9 +87,21 @@ menu_screen_error_e mapbuf_enable(Evas_Object *obj, int force) return MENU_SCREEN_ERROR_FAIL; } + Evas_Object *page = mapbuf_get_page(obj); + if(!page) { + return MENU_SCREEN_ERROR_FAIL; + } + + if(menu_screen_is_tts()) { + evas_object_data_set(mapbuf, "mapbuf_enabled", (void*)0); + elm_mapbuf_enabled_set(mapbuf, 0); + return MENU_SCREEN_ERROR_OK; + } + if (force) { evas_object_data_set(mapbuf, "mapbuf_enabled", (void*)0); - elm_mapbuf_enabled_set(mapbuf, 1); + _move_pages(page); + elm_mapbuf_enabled_set(mapbuf, 1); // Mapbuf has been disabled because of a mapbuf bug. return MENU_SCREEN_ERROR_OK; } @@ -82,7 +112,8 @@ menu_screen_error_e mapbuf_enable(Evas_Object *obj, int force) if (cnt == 0) { if (!elm_mapbuf_enabled_get(mapbuf)) { - elm_mapbuf_enabled_set(mapbuf, 1); + _move_pages(page); + elm_mapbuf_enabled_set(mapbuf, 1); // Mapbuf has been disabled because of a mapbuf bug. //_D("[%s] mapbuf enabled", __func__); } } @@ -92,7 +123,7 @@ menu_screen_error_e mapbuf_enable(Evas_Object *obj, int force) -int mapbuf_is_enabled(Evas_Object *obj) +HAPI int mapbuf_is_enabled(Evas_Object *obj) { Evas_Object *mapbuf; mapbuf = mapbuf_get_mapbuf(obj); @@ -105,7 +136,7 @@ int mapbuf_is_enabled(Evas_Object *obj) -int mapbuf_disable(Evas_Object *obj, int force) +HAPI int mapbuf_disable(Evas_Object *obj, int force) { Evas_Object *mapbuf; int cnt; @@ -139,7 +170,7 @@ int mapbuf_disable(Evas_Object *obj, int force) -Evas_Object *mapbuf_bind(Evas_Object *box, Evas_Object *page) +HAPI Evas_Object *mapbuf_bind(Evas_Object *box, Evas_Object *page) { Evas_Object *mapbuf; @@ -163,7 +194,7 @@ Evas_Object *mapbuf_bind(Evas_Object *box, Evas_Object *page) -Evas_Object *mapbuf_unbind(Evas_Object *obj) +HAPI Evas_Object *mapbuf_unbind(Evas_Object *obj) { Evas_Object *page; Evas_Object *mapbuf; diff --git a/src/menu_screen.c b/src/menu_screen.c old mode 100644 new mode 100755 index 20e4beb..ee36cc3 --- a/src/menu_screen.c +++ b/src/menu_screen.c @@ -1,42 +1,48 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ - - -#include -#include #include #include +#include +#include +#include +#include #include +#include #include -#include -#include #include "conf.h" #include "item.h" +#include "key.h" #include "layout.h" #include "mapbuf.h" #include "menu_screen.h" #include "mouse.h" #include "page.h" #include "page_scroller.h" +#include "pkgmgr.h" #include "util.h" -#define STR_ENV_ENGINE "LAUNCHER_ENGINE" -#define STR_ENV_FPS "LAUNCHER_FPS" +#define MENU_SCREEN_ENGINE "file/private/org.tizen.menu-screen/engine" #define LAYOUT_EDJE_PORTRAIT EDJEDIR"/layout_portrait.edj" #define LAYOUT_GROUP_NAME "layout" @@ -49,74 +55,177 @@ static struct { int state; int root_width; int root_height; - double xscale; - double yscale; + int is_tts; + int booting_state; Evas *evas; Ecore_Evas *ee; Evas_Object *win; + Elm_Theme *theme; bool is_done; } menu_screen_info = { .state = APP_STATE_PAUSE, + .is_tts = false, + .booting_state = 0, .evas = NULL, .ee = NULL, .win = NULL, + .theme = NULL, .is_done = false, }; -Evas *menu_screen_get_evas(void) +HAPI Evas *menu_screen_get_evas(void) { return menu_screen_info.evas; } -int menu_screen_get_root_width(void) +HAPI int menu_screen_get_root_width(void) { return menu_screen_info.root_width; } -int menu_screen_get_root_height(void) +HAPI int menu_screen_get_root_height(void) { return menu_screen_info.root_height; } -double menu_screen_get_yscale(void) +HAPI Evas_Object *menu_screen_get_win(void) { - return menu_screen_info.yscale; + return menu_screen_info.win; } -Evas_Object *menu_screen_get_win(void) +HAPI Elm_Theme *menu_screen_get_theme(void) { - return menu_screen_info.win; + return menu_screen_info.theme; } -bool menu_screen_get_done(void) +HAPI bool menu_screen_get_done(void) { return menu_screen_info.is_done; } -void menu_screen_set_done(bool is_done) +HAPI void menu_screen_set_done(bool is_done) { menu_screen_info.is_done = is_done; } +HAPI int menu_screen_get_state(void) +{ + return menu_screen_info.state; +} + + + +HAPI int menu_screen_is_tts(void) +{ + return menu_screen_info.is_tts; +} + + +static Eina_Bool _appcore_flush_cb(void *data) +{ + if (APP_STATE_PAUSE != menu_screen_info.state) return ECORE_CALLBACK_CANCEL; + if (0 != appcore_flush_memory()) _E("Cannot flush memory"); + return ECORE_CALLBACK_CANCEL; +} + + + +HAPI void menu_screen_inc_booting_state(void) +{ + menu_screen_info.booting_state++; + if (BOOTING_STATE_DONE > menu_screen_info.booting_state) return; + + menu_screen_error_e ret = MENU_SCREEN_ERROR_OK; + do { + ret = pkgmgr_reserve_list_pop_request(); + } while (MENU_SCREEN_ERROR_OK == ret); + + /* Cache memory is cleared when the application paused (every time, after 5 seconds (in appcore)), + * but after running in a minimized mode (HIDE_LAUNCH) application have status AS_RUNNING. + * Application have status AS_PAUSED only after change of visibility to hidden condition by user (on hiding window) + * Cleaning must be performed only once after application loading in hidden condition + * (and stay in a hidden condition at time of cleaning). + */ + if (APP_STATE_PAUSE == menu_screen_info.state) + ecore_timer_add(5, _appcore_flush_cb, NULL); +} + + + +HAPI void menu_screen_dec_booting_state(void) +{ + menu_screen_info.booting_state --; +} + + + +HAPI int menu_screen_get_booting_state(void) +{ + return menu_screen_info.booting_state; +} + + + +static bool _is_emulator_on(void) +{ + int ret; + char *model; + + ret = system_info_get_platform_string("tizen.org/system/model_name", &model); + if (SYSTEM_INFO_ERROR_NONE != ret) { + if (model) { + free(model); + } + return false; + } + + if (!strncmp(model, "Emulator", strlen(model))) { + _D("This model is on Emulator"); + free(model); + return true; + } + + _D("This model is NOT on Emulator"); + free(model); + return false; +} + + static menu_screen_error_e _create_canvas(char *name, char *title) { Ecore_X_Atom ATOM_WM_WINDOW_ROLE; + char *buf; + + if (_is_emulator_on()) { + _D("ELM_ENGINE is set as [software_x11]"); + elm_config_accel_preference_set("opengl"); + } else { + buf = vconf_get_str(MENU_SCREEN_ENGINE); + if (buf) { + _D("ELM_ENGINE is set as [%s]", buf); + elm_config_accel_preference_set(buf); + free(buf); + } else { + _D("ELM_ENGINE is set as [gl]"); + elm_config_accel_preference_set("gl"); + } + } menu_screen_info.win = elm_win_add(NULL, name, ELM_WIN_BASIC); retv_if(NULL == menu_screen_info.win, MENU_SCREEN_ERROR_FAIL); @@ -144,7 +253,8 @@ static menu_screen_error_e _create_canvas(char *name, char *title) _E("[%s] Failed to get ecore_evas object", __func__); } - evas_object_move(menu_screen_info.win, 0, 0); + evas_object_size_hint_min_set(menu_screen_info.win, menu_screen_info.root_width, menu_screen_info.root_height); + evas_object_size_hint_max_set(menu_screen_info.win, menu_screen_info.root_width, menu_screen_info.root_height); evas_object_resize(menu_screen_info.win, menu_screen_info.root_width, menu_screen_info.root_height); evas_object_show(menu_screen_info.win); @@ -162,19 +272,13 @@ static void _destroy_canvas(void) static int _dead_cb(int pid, void *data) { - utilx_hide_fake_effect( - ecore_x_display_get(), - ecore_x_window_root_get(ecore_evas_window_get(menu_screen_info.ee)) - ); - return EXIT_SUCCESS; } -static void _set_scale(void) +static void _get_window_size(void) { - double scale; Ecore_X_Window focus_win; Ecore_X_Window root_win; @@ -182,11 +286,7 @@ static void _set_scale(void) root_win = ecore_x_window_root_get(focus_win); ecore_x_window_size_get(root_win, &menu_screen_info.root_width, &menu_screen_info.root_height); - menu_screen_info.xscale = (double) menu_screen_info.root_width / (double) BASE_WIDTH; - menu_screen_info.yscale = (double) menu_screen_info.root_height / (double) BASE_HEIGHT; - scale = menu_screen_info.xscale < menu_screen_info.yscale ? menu_screen_info.xscale : menu_screen_info.yscale; - _D("width:%d, height:%d, scale:%f", menu_screen_info.root_width, menu_screen_info.root_height, scale); - elm_config_scale_set(scale); + _D("width:%d, height:%d", menu_screen_info.root_width, menu_screen_info.root_height); } @@ -227,6 +327,7 @@ static void _create_bg(void) free(buf); return; } + evas_object_image_load_orientation_set(bg, EINA_TRUE); evas_object_data_set(menu_screen_get_win(), "bg", bg); } @@ -245,7 +346,7 @@ static void _create_bg(void) wf = (double) width / (double) w; hf = (double) height / (double) h; - f = wf > hf ? hf : wf; + f = wf < hf ? hf : wf; w = (int) ((double) f * (double) w); h = (int) ((double) f * (double) h); @@ -284,31 +385,152 @@ static void _change_bg_cb(keynode_t *node, void *data) -static bool _create_cb(void *data) +static void _init_theme(void) { - Evas_Object *layout; + menu_screen_info.theme = elm_theme_new(); + elm_theme_ref_set(menu_screen_info.theme, NULL); + elm_theme_extension_add(menu_screen_info.theme, EDJEDIR"/index.edj"); +} + - _set_scale(); - retv_if(MENU_SCREEN_ERROR_FAIL == _create_canvas(PACKAGE, PACKAGE), EXIT_FAILURE); + +static void _fini_theme(void) +{ + elm_theme_extension_del(menu_screen_info.theme, EDJEDIR"/index.edj"); + elm_theme_free(menu_screen_info.theme); + menu_screen_info.theme = NULL; + +} + + + +static Evas_Object *_create_conformant(Evas_Object *win) +{ + Evas_Object *conformant; + + conformant = elm_conformant_add(win); + retv_if(NULL == conformant, NULL); + + elm_win_indicator_opacity_set(win, ELM_WIN_INDICATOR_TRANSLUCENT); + evas_object_size_hint_weight_set(conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_signal_emit(conformant, "elm,state,indicator,overlap", "elm"); elm_win_indicator_mode_set(menu_screen_info.win, ELM_WIN_INDICATOR_SHOW); + evas_object_data_set(conformant, "win", win); + evas_object_show(conformant); + + elm_win_resize_object_add(win, conformant); + elm_win_conformant_set(win, EINA_TRUE); + + return conformant; +} + + + +static void _destroy_conformant(Evas_Object *conformant) +{ + evas_object_data_del(conformant, "win"); + evas_object_del(conformant); +} + + +static char *_replace_str(char *str, const char *before, const char *after) +{ + retv_if(NULL == str, NULL); + retv_if(NULL == before, NULL); + retv_if(NULL == after, NULL); + + size_t before_len = strlen(before); + retv_if(before_len < 1, str); + + size_t after_len = strlen(after); + size_t i, count = 0; + if (after_len != before_len) { + for (i = 0; str[i] != '\0';) { + if (0 == memcmp(&str[i], before, before_len)) { + count++; + i += before_len; + } else { + i++; + } + } + } else { + i = strlen(str); + } + + char *result; + result = malloc(i + 1 + count * (after_len - before_len)); + retv_if(result == NULL, NULL); + + char *sr; + sr = result; + while (*str) { + if (0 == memcmp(str, before, before_len)) { + memcpy(sr, after, after_len); + sr += after_len; + str += before_len; + } else { + *sr++ = *str++; + } + } + *sr = '\0'; + + return result; +} + + +static void _tts_cb(keynode_t *node, void *data) +{ + _D("change tts"); + + int val = -1; + if (0 == vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &val) && + menu_screen_info.is_tts != val) + { + menu_screen_info.is_tts = val; + } +} + + + +static bool _create_cb(void *data) +{ + Evas_Object *conformant; + + _get_window_size(); + _init_theme(); + retv_if(MENU_SCREEN_ERROR_FAIL == _create_canvas(PACKAGE, PACKAGE), false); if (vconf_notify_key_changed(VCONFKEY_BGSET, _change_bg_cb, NULL) < 0) { _E("Failed to register a vconf cb for %s\n", VCONFKEY_BGSET); } _create_bg(); - layout = layout_create(menu_screen_info.win, LAYOUT_EDJE_PORTRAIT, + conformant = _create_conformant(menu_screen_info.win); + retv_if(NULL == conformant, false); + evas_object_data_set(menu_screen_info.win, "conformant", conformant); + + Evas_Object *layout; + layout = layout_create(conformant, LAYOUT_EDJE_PORTRAIT, LAYOUT_GROUP_NAME, MENU_SCREEN_ROTATE_PORTRAIT); if (NULL == layout) { - _E("Faield to load an edje object"); + _E("Failed to load an edje object"); evas_object_del(menu_screen_info.win); - return EXIT_FAILURE; + return false; } evas_object_data_set(menu_screen_info.win, "layout", layout); - evas_object_show(layout); + if (vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, _tts_cb, NULL) < 0) { + _E("Failed to register the tts callback"); + } + retv_if(vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &menu_screen_info.is_tts) < 0, MENU_SCREEN_ERROR_FAIL); + + elm_object_content_set(conformant, layout); mouse_register(); aul_listen_app_dead_signal(_dead_cb, NULL); + key_register(); + + // FIXME : This will be enabled after rebuilding the routine for appid <-> pkgid. + pkgmgr_init(); return true; } @@ -317,21 +539,34 @@ static bool _create_cb(void *data) static void _terminate_cb(void *data) { + Evas_Object *conformant; Evas_Object *layout; + // FIXME : This will be enabled after rebuilding the routine for appid <-> pkgid. + pkgmgr_fini(); + if (vconf_ignore_key_changed(VCONFKEY_BGSET, _change_bg_cb) < 0) { - _E("Failed to remove bgset %s\n", VCONFKEY_BGSET); + _E("Failed to remove bgset [%s]\n", VCONFKEY_BGSET); + } + + if (vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, _tts_cb) < 0) { + _E("Failed to ignore the alpha callback"); } evas_object_hide(menu_screen_info.win); + key_unregister(); mouse_unregister(); layout = evas_object_data_del(menu_screen_info.win, "layout"); - layout_destroy(layout); + if (layout) layout_destroy(layout); + + conformant = evas_object_data_del(menu_screen_info.win, "conformant"); + if (conformant) _destroy_conformant(conformant); _destroy_bg(); _destroy_canvas(); + _fini_theme(); evas_object_del(menu_screen_info.win); } @@ -341,10 +576,6 @@ static void _pause_cb(void *data) { _D("Pause start"); - if (vconf_set_int(VCONFKEY_IDLE_SCREEN_TOP, VCONFKEY_IDLE_SCREEN_TOP_FALSE) < 0) { - _E("Failed to set memory/idle/top to 0"); - } - menu_screen_info.state = APP_STATE_PAUSE; } @@ -354,32 +585,40 @@ static void _resume_cb(void *data) { _D("START RESUME"); - if (vconf_set_int(VCONFKEY_IDLE_SCREEN_TOP, VCONFKEY_IDLE_SCREEN_TOP_TRUE) < 0) { - _E("Failed to set memory/idle/top to 1"); - } + do { // Focus + Evas_Object *layout = evas_object_data_get(menu_screen_info.win, "layout"); + break_if(NULL == layout); + + Evas_Object *all_apps = evas_object_data_get(layout, "all_apps"); + break_if(NULL == all_apps); + + Evas_Object *scroller = elm_object_part_content_get(all_apps, "content"); + break_if(NULL == scroller); - utilx_hide_fake_effect( - ecore_x_display_get(), - ecore_x_window_root_get(ecore_evas_window_get(menu_screen_info.ee)) - ); + page_scroller_focus(scroller); + } while (0); menu_screen_info.state = APP_STATE_RESUME; } -static void _service_cb(service_h service, void *data) +static void _app_control_cb(app_control_h service, void *data) { _D("START RESET : %d", menu_screen_info.state); - if (vconf_set_int(VCONFKEY_IDLE_SCREEN_TOP, VCONFKEY_IDLE_SCREEN_TOP_TRUE) < 0) { - _E("Failed to set memory/idle/top to 1"); - } + do { // Focus + Evas_Object *layout = evas_object_data_get(menu_screen_info.win, "layout"); + break_if(NULL == layout); + + Evas_Object *all_apps = evas_object_data_get(layout, "all_apps"); + break_if(NULL == all_apps); - utilx_hide_fake_effect( - ecore_x_display_get(), - ecore_x_window_root_get(ecore_evas_window_get(menu_screen_info.ee)) - ); + Evas_Object *scroller = elm_object_part_content_get(all_apps, "content"); + break_if(NULL == scroller); + + page_scroller_focus(scroller); + } while (0); } @@ -425,20 +664,23 @@ static void _language_changed_cb(void *data) item = page_get_item_at(page, j); if (!item) continue; - if (ail_package_get_appinfo(item_get_package(item), &ai) < 0) continue; + if (ail_get_appinfo(item_get_package(item), &ai) < 0) { + ail_destroy_appinfo(ai); + continue; + } if (ail_appinfo_get_str(ai, AIL_PROP_NAME_STR, &name) < 0) { - ail_package_destroy_appinfo(ai); + ail_destroy_appinfo(ai); continue; } if (!name) { - _D("Faield to get name for %s", item_get_package(item)); - ail_package_destroy_appinfo(ai); + _D("Failed to get name for %s", item_get_package(item)); + ail_destroy_appinfo(ai); continue; } item_set_name(item, name, 0); - ail_package_destroy_appinfo(ai); + ail_destroy_appinfo(ai); } mapbuf_enable(page, 1); @@ -453,7 +695,7 @@ static void _init(app_event_callback_s *event_callback) event_callback->terminate = _terminate_cb; event_callback->pause = _pause_cb; event_callback->resume = _resume_cb; - event_callback->service = _service_cb; + event_callback->app_control = _app_control_cb; event_callback->low_memory = NULL; event_callback->low_battery = NULL; event_callback->device_orientation = NULL; @@ -471,27 +713,8 @@ static void _fini(void) int main(int argc, char *argv[]) { - const char *env; app_event_callback_s event_callback; - env = getenv(STR_ENV_ENGINE); - if (env) { - _D("ELM_ENGINE is set as [%s]", env); - setenv("ELM_ENGINE", env, 1); - } else { - _D("ELM_ENGINE is set as [%s]", "gl"); - setenv("ELM_ENGINE", "gl", 1); - } - - env = getenv(STR_ENV_FPS); - if (env) { - _D("ELM_FPS is set as [%s]", env); - setenv("ELM_FPS", env, 1); - } else { - _D("ELM_FPS is set as [%s]", "6000"); - setenv("ELM_FPS", "6000", 1); - } - _init(&event_callback); app_efl_main(&argc, &argv, &event_callback, NULL); _fini(); diff --git a/src/mouse.c b/src/mouse.c index 078323f..1dec1db 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #include #include @@ -68,7 +72,7 @@ static struct { -bool mouse_is_scrolling(void) +HAPI bool mouse_is_scrolling(void) { bool scroll_x = false; bool scroll_y = false; @@ -141,7 +145,7 @@ static Eina_Bool _move_cb(void *data, int type, void *event) -void mouse_register(void) +HAPI void mouse_register(void) { mouse_info.mouse_down = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _down_cb, NULL); if (!mouse_info.mouse_down) { @@ -168,7 +172,7 @@ void mouse_register(void) -void mouse_unregister(void) +HAPI void mouse_unregister(void) { if (mouse_info.mouse_down) { ecore_event_handler_del(mouse_info.mouse_down); diff --git a/src/page.c b/src/page.c index c37cc8d..edb31e1 100644 --- a/src/page.c +++ b/src/page.c @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #include @@ -34,7 +38,7 @@ -inline void page_mark_dirty(Evas_Object *page) +HAPI inline void page_mark_dirty(Evas_Object *page) { int value; value = (int) evas_object_data_get(page, "dirty"); @@ -43,7 +47,7 @@ inline void page_mark_dirty(Evas_Object *page) -inline void page_unmark_dirty(Evas_Object *page) +HAPI inline void page_unmark_dirty(Evas_Object *page) { int value; value = (int) evas_object_data_get(page, "dirty"); @@ -54,35 +58,20 @@ inline void page_unmark_dirty(Evas_Object *page) -inline void page_clean_dirty(Evas_Object *page) +HAPI inline void page_clean_dirty(Evas_Object *page) { evas_object_data_set(page, "dirty", 0); } -inline int page_is_dirty(Evas_Object *page) +HAPI inline int page_is_dirty(Evas_Object *page) { return (int) evas_object_data_get(page, "dirty"); } -static void _changed_size_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) -{ - Evas_Object *map; - Evas_Coord w, h; - - evas_object_size_hint_min_get(obj, &w, &h); - - map = mapbuf_get_mapbuf(obj); - if (map) { - evas_object_size_hint_min_set(map, w, h); - } -} - - - static menu_screen_error_e _insert_page_at(Evas_Object *scroller, Evas_Object *page, int index) { unsigned int nr_of_pages; @@ -152,7 +141,7 @@ static void _dim_up_cb(void *data, Evas_Object *obj, const char* emission, const -Evas_Object *page_create(Evas_Object *scroller, int idx, int rotate) +HAPI Evas_Object *page_create(Evas_Object *scroller, int idx, int rotate) { Evas_Object *page; Evas_Object *bg; @@ -162,8 +151,6 @@ Evas_Object *page_create(Evas_Object *scroller, int idx, int rotate) Evas_Object *box; char *page_edje; - bool enable_bg_image; - unsigned int count; int page_height; int page_width; @@ -171,12 +158,11 @@ Evas_Object *page_create(Evas_Object *scroller, int idx, int rotate) _D("Create a new page[%d]", idx); page_edje = evas_object_data_get(scroller, "page_edje"); - enable_bg_image = (bool) evas_object_data_get(scroller, "enable_bg_image"); + retv_if(!page_edje, NULL); page = layout_load_edj(scroller, page_edje, PAGE_GROUP_NAME); retv_if(!page, NULL); - evas_object_event_callback_add(page, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints_cb, NULL); edje_object_signal_callback_add(_EDJ(page), "dim,down", "menu", _dim_down_cb, NULL); edje_object_signal_callback_add(_EDJ(page), "dim,up", "menu", _dim_up_cb, NULL); @@ -198,6 +184,11 @@ Evas_Object *page_create(Evas_Object *scroller, int idx, int rotate) evas_object_size_hint_min_set(bg, page_width, page_height); evas_object_size_hint_max_set(bg, page_width, page_height); + + evas_object_size_hint_min_set(page, page_width, page_height); + evas_object_size_hint_max_set(page, page_width, page_height); + evas_object_resize(page, page_width, page_height); + elm_object_part_content_set(page, "bg", bg); evas_object_data_set(page, "win", evas_object_data_get(scroller, "win")); @@ -221,7 +212,8 @@ Evas_Object *page_create(Evas_Object *scroller, int idx, int rotate) if (index) { tab = evas_object_data_get(scroller, "tab"); count = page_scroller_count_page(scroller); - index_update(tab, index, count); + index = index_update(tab, index, count); + evas_object_data_set(scroller, "index", index); } return page; @@ -229,7 +221,7 @@ Evas_Object *page_create(Evas_Object *scroller, int idx, int rotate) -void page_destroy(Evas_Object *scroller, Evas_Object *page) +HAPI void page_destroy(Evas_Object *scroller, Evas_Object *page) { Evas_Object *mapbuf; Evas_Object *bg; @@ -243,8 +235,6 @@ void page_destroy(Evas_Object *scroller, Evas_Object *page) int page_max_app; unsigned int count; - evas_object_event_callback_del(page, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints_cb); - page_max_app = (int) evas_object_data_get(scroller, "page_max_app"); for (i = 0; i < page_max_app; i ++) { item = page_unpack_item_at(page, i); @@ -271,10 +261,17 @@ void page_destroy(Evas_Object *scroller, Evas_Object *page) } index = evas_object_data_get(scroller, "index"); - if (index) { - tab = evas_object_data_get(scroller, "tab"); + tab = evas_object_data_get(scroller, "tab"); + if (index && tab) { count = page_scroller_count_page(scroller); - index_update(tab, index, count); + if (count) { + index = index_update(tab, index, count); + evas_object_data_set(scroller, "index", index); + } + else { + index_destroy(index); + evas_object_data_set(scroller, "index", NULL); + } } evas_object_data_del(page, "win"); @@ -292,7 +289,7 @@ void page_destroy(Evas_Object *scroller, Evas_Object *page) -Evas_Object *page_get_item_at(Evas_Object *page, unsigned int idx) +HAPI Evas_Object *page_get_item_at(Evas_Object *page, unsigned int idx) { Eina_List *pending_list; Eina_List *n; @@ -318,7 +315,7 @@ Evas_Object *page_get_item_at(Evas_Object *page, unsigned int idx) -menu_screen_error_e page_unpack_item(Evas_Object *page, Evas_Object *item) +HAPI menu_screen_error_e page_unpack_item(Evas_Object *page, Evas_Object *item) { char tmp[PATH_MAX]; Evas_Object *check_item; @@ -341,7 +338,7 @@ menu_screen_error_e page_unpack_item(Evas_Object *page, Evas_Object *item) } retv_if(pending_idx == -1, MENU_SCREEN_ERROR_FAIL); - sprintf(tmp, "menu_swallow_%d", pending_idx); + snprintf(tmp, sizeof(tmp), "menu_swallow_%d", pending_idx); check_item = edje_object_part_swallow_get(_EDJ(page), tmp); retv_if(check_item != item, MENU_SCREEN_ERROR_FAIL); @@ -352,12 +349,15 @@ menu_screen_error_e page_unpack_item(Evas_Object *page, Evas_Object *item) page_mark_dirty(page); } + mapbuf_disable(page, 1); + mapbuf_enable(page, 1); + return MENU_SCREEN_ERROR_OK; } -Evas_Object *page_unpack_item_at(Evas_Object *page, int idx) +HAPI Evas_Object *page_unpack_item_at(Evas_Object *page, int idx) { Eina_List *pending_list; Eina_List *n; @@ -381,7 +381,7 @@ Evas_Object *page_unpack_item_at(Evas_Object *page, int idx) object = page_get_item_at(page, idx); if (object) { Evas_Object *check_object; - sprintf(tmp, "menu_swallow_%d", idx); + snprintf(tmp, sizeof(tmp), "menu_swallow_%d", idx); check_object = elm_object_part_content_unset(page, tmp); if (check_object != object) { @@ -391,12 +391,16 @@ Evas_Object *page_unpack_item_at(Evas_Object *page, int idx) page_mark_dirty(page); } + + mapbuf_disable(page, 1); + mapbuf_enable(page, 1); + return object; } -void page_pack_item(Evas_Object *page, int idx, Evas_Object *item) +HAPI void page_pack_item(Evas_Object *page, int idx, Evas_Object *item) { char tmp[PATH_MAX]; Evas_Object *object; @@ -425,12 +429,14 @@ void page_pack_item(Evas_Object *page, int idx, Evas_Object *item) item_mark_dirty(item); elm_object_part_content_set(page, tmp, item); page_mark_dirty(page); - mapbuf_enable(page, 0); + + mapbuf_disable(page, 1); + mapbuf_enable(page, 1); } -void page_set_item(Evas_Object *page, int idx, Evas_Object *item) +HAPI void page_set_item(Evas_Object *page, int idx, Evas_Object *item) { Eina_List *list; @@ -445,11 +451,14 @@ void page_set_item(Evas_Object *page, int idx, Evas_Object *item) evas_object_data_set(item, "pending,idx", (void *) idx); item_set_page(item, page, 1); + + mapbuf_disable(page, 1); + mapbuf_enable(page, 1); } -inline unsigned int page_count_item(Evas_Object *page) +HAPI inline unsigned int page_count_item(Evas_Object *page) { register unsigned int i; unsigned int count = 0; @@ -467,7 +476,7 @@ inline unsigned int page_count_item(Evas_Object *page) -int page_find_empty_near(Evas_Object *page, int pivot) +HAPI int page_find_empty_near(Evas_Object *page, int pivot) { int pivot_saved = pivot; Evas_Object *obj; @@ -504,7 +513,7 @@ int page_find_empty_near(Evas_Object *page, int pivot) -int page_find_first_empty(Evas_Object *page, int pivot) +HAPI int page_find_first_empty(Evas_Object *page, int pivot) { Evas_Object *item; Evas_Object *scroller; @@ -526,7 +535,7 @@ int page_find_first_empty(Evas_Object *page, int pivot) -void page_trim_items(Evas_Object *page) +HAPI void page_trim_items(Evas_Object *page) { Evas_Object *item; register unsigned int i; diff --git a/src/page_scroller.c b/src/page_scroller.c index 337cabb..178fd8e 100644 --- a/src/page_scroller.c +++ b/src/page_scroller.c @@ -1,33 +1,39 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #include +#include #include -#include "menu_screen.h" +#include "item_badge.h" #include "conf.h" -#include "list.h" -#include "mapbuf.h" -#include "page.h" #include "index.h" #include "item.h" #include "item_event.h" #include "layout.h" +#include "list.h" +#include "mapbuf.h" +#include "menu_screen.h" +#include "page.h" #include "page_scroller.h" #include "pkgmgr.h" #include "util.h" @@ -38,21 +44,7 @@ -static int _count_pages(Evas_Object *scroller) -{ - const Eina_List *children; - Evas_Object *box; - - box = evas_object_data_get(scroller, "box"); - retv_if(NULL == box, 0); - - children = elm_box_children_get(box); - return eina_list_count(children); -} - - - -void page_scroller_bring_in(Evas_Object *scroller, int idx) +HAPI void page_scroller_bring_in(Evas_Object *scroller, int idx) { Evas_Object *index; int w, h; @@ -74,7 +66,7 @@ void page_scroller_bring_in(Evas_Object *scroller, int idx) -void page_scroller_show_region(Evas_Object *scroller, int idx) +HAPI void page_scroller_show_region(Evas_Object *scroller, int idx) { Evas_Object *index; int w, h; @@ -94,49 +86,44 @@ void page_scroller_show_region(Evas_Object *scroller, int idx) static void _anim_stop_cb(void *data, Evas_Object *scroller, void *event_info) { - _D("Invoked"); -} + _D("stop the scroller(%p) animation", scroller); + /* page_scroller_focus & index_bring_in in _drag_stop_cb & _anim_stop_cb */ + Evas_Coord x, y, w, h; + elm_scroller_region_get(scroller, &x, &y, &w, &h); + if (x % w) return; -static void _anim_start_cb(void *data, Evas_Object *scroller, void *event_info) -{ - Evas_Coord x; - Evas_Coord y; - Evas_Coord w; - Evas_Coord h; - Evas_Object *index; - Elm_Object_Item *idx_it; + if(evas_object_data_get(scroller, "mouse_wheel_scroller_start")) { + // "page_scroller_bring_in" was invoked in "_mouse_wheel_cb", + // so condition cur_idx == idx will be true and "page_scroller_focus" won't be executed + // so "page_scroller_focus" is executed here. + evas_object_data_set(scroller, "mouse_wheel_scroller_start", (void *) 0); + page_scroller_focus(scroller); + } - int idx; - int drag_start; - int previous_x; - int threshold; + int cur_idx = page_scroller_get_current_page_no(scroller); + int idx = 0; + if (w) idx = x / w; + if (cur_idx == idx) return; - _D("Invoked"); + page_scroller_bring_in(scroller, idx); + page_scroller_focus(scroller); +} - drag_start = (int) evas_object_data_get(scroller, "drag_start"); - previous_x = (int) evas_object_data_get(scroller, "previous_x"); - index = evas_object_data_get(scroller, "index"); - ret_if(drag_start == 0); - evas_object_data_set(scroller, "drag_start", (void *) 0); - elm_scroller_region_get(scroller, &x, &y, &w, &h); - threshold = w * PAGE_SCROLL_SENSITIVE; +static void _anim_start_cb(void *data, Evas_Object *scroller, void *event_info) +{ + _D("start the scroller(%p) animation", scroller); - idx_it = elm_index_selected_item_get(index, 0); - idx = (int) elm_object_item_data_get(idx_it); + int drag_start = (int) evas_object_data_get(scroller, "drag_start"); + if (drag_start == 0) return; + evas_object_data_set(scroller, "drag_start", (void *) 0); +} - if (abs(previous_x - x) > threshold) { - if (x > previous_x) idx ++; - else if ((x < previous_x) && (idx != 0)) idx --; - } - ret_if(idx >= _count_pages(scroller) || idx < 0); - page_scroller_bring_in(scroller, idx); -} @@ -155,10 +142,7 @@ static void _drag_start_cb(void *data, Evas_Object *scroller, void *event_info) static void _drag_stop_cb(void *data, Evas_Object *scroller, void *event_info) { - Evas_Coord x; - Evas_Coord w; - Evas_Coord y; - Evas_Coord h; + Evas_Coord x, y, w, h; int previous_x; _D("Invoked"); @@ -168,31 +152,79 @@ static void _drag_stop_cb(void *data, Evas_Object *scroller, void *event_info) if (x == previous_x) { _D("Hold scroller (previous) %d (current) %d", previous_x, x); } -} + /* page_scroller_focus & index_bring_in in _drag_stop_cb & _anim_stop_cb */ + if (x % w) return; + + int cur_idx = page_scroller_get_current_page_no(scroller); + int idx = 0; + if (w) idx = x / w; + if (cur_idx == idx) return; -static void _scroller_register(Evas_Object *scroller) + page_scroller_bring_in(scroller, idx); + page_scroller_focus(scroller); +} + + +static void _scroll_cb(void *data, Evas_Object *scroller, void *event_info) { - evas_object_smart_callback_add(scroller, "scroll,anim,start", _anim_start_cb, NULL); - evas_object_smart_callback_add(scroller, "scroll,anim,stop", _anim_stop_cb, NULL); - evas_object_smart_callback_add(scroller, "scroll,drag,start", _drag_start_cb, NULL); - evas_object_smart_callback_add(scroller, "scroll,drag,stop", _drag_stop_cb, NULL); + _drag_stop_cb(data, scroller, event_info); } -static void _scroller_unregister(Evas_Object *scroller) +static menu_screen_error_e _find_position_all_page(Evas_Object *scroller, int *candidate_page, int *candidate_pos, void *data) { - evas_object_smart_callback_del(scroller, "scroll,anim,start", _anim_start_cb); - evas_object_smart_callback_del(scroller, "scroll,anim,stop", _anim_stop_cb); - evas_object_smart_callback_del(scroller, "scroll,drag,start", _drag_start_cb); - evas_object_smart_callback_del(scroller, "scroll,drag,stop", _drag_stop_cb); + Evas_Object *page; + Evas_Object *item; + register unsigned int page_no; + register unsigned int position_no; + int nr_of_pages; + int page_max_app; + + retv_if(NULL == scroller, MENU_SCREEN_ERROR_INVALID_PARAMETER); + retv_if(NULL == candidate_page, MENU_SCREEN_ERROR_INVALID_PARAMETER); + retv_if(NULL == candidate_pos, MENU_SCREEN_ERROR_INVALID_PARAMETER); + + *candidate_page = -1; + *candidate_pos = -1; + nr_of_pages = page_scroller_count_page(scroller); + page_max_app = (int) evas_object_data_get(scroller, "page_max_app"); + + page = page_scroller_get_page_at(scroller, nr_of_pages-1); + page_no = nr_of_pages-1; + for (position_no = 0; position_no < page_max_app; position_no ++) { + item = page_get_item_at(page, position_no); + if (!item) { + *candidate_page = page_no; + *candidate_pos = position_no; + return MENU_SCREEN_ERROR_OK; + } + } + + for (page_no = 0; page_no < nr_of_pages -1; page_no ++) { + page = page_scroller_get_page_at(scroller, page_no); + if(!page) { + return MENU_SCREEN_ERROR_FAIL; + } + + for (position_no = 0; position_no < page_max_app; position_no ++) { + item = page_get_item_at(page, position_no); + if (!item) { + *candidate_page = page_no; + *candidate_pos = position_no; + return MENU_SCREEN_ERROR_OK; + } + } + } + + return MENU_SCREEN_ERROR_OK; } -menu_screen_error_e _find_position_by_default(Evas_Object *scroller, int *candidate_page, int *candidate_pos, void *data) +static menu_screen_error_e _find_position_by_default(Evas_Object *scroller, int *candidate_page, int *candidate_pos, void *data) { Evas_Object *page; Evas_Object *item; @@ -234,7 +266,7 @@ menu_screen_error_e _find_position_by_default(Evas_Object *scroller, int *candid -menu_screen_error_e _find_position_by_package(Evas_Object *scroller, int *candidate_page, int *candidate_pos, void *data) +static menu_screen_error_e _find_position_by_package(Evas_Object *scroller, int *candidate_page, int *candidate_pos, void *data) { Evas_Object *page; Evas_Object *item; @@ -282,6 +314,54 @@ menu_screen_error_e _find_position_by_package(Evas_Object *scroller, int *candid +static menu_screen_error_e _find_position_by_name(Evas_Object *scroller, int *candidate_page, int *candidate_pos, void *data) +{ + Evas_Object *page; + Evas_Object *item; + register int page_no; + register int position_no; + unsigned int nr_of_pages; + int page_max_app; + app_info_t *ai = data; + + retv_if(NULL == scroller, MENU_SCREEN_ERROR_INVALID_PARAMETER); + retv_if(NULL == candidate_page, MENU_SCREEN_ERROR_INVALID_PARAMETER); + retv_if(NULL == candidate_pos, MENU_SCREEN_ERROR_INVALID_PARAMETER); + retv_if(NULL == data, MENU_SCREEN_ERROR_INVALID_PARAMETER); + retv_if(NULL == ai->name, MENU_SCREEN_ERROR_INVALID_PARAMETER); + + *candidate_page = 0; + *candidate_pos = 0; + nr_of_pages = page_scroller_count_page(scroller); + page_max_app = (int) evas_object_data_get(scroller, "page_max_app"); + for (page_no = 0; page_no < nr_of_pages; page_no ++) { + page = page_scroller_get_page_at(scroller, page_no); + if (!page) { + _D("Page is not found at %d", page_no); + return MENU_SCREEN_ERROR_FAIL; + } + + for (position_no = 0; position_no < page_max_app; position_no ++) { + char *name; + + item = page_get_item_at(page, position_no); + if (!item) { + *candidate_page = page_no; + *candidate_pos = position_no; + return MENU_SCREEN_ERROR_OK; + } else if ((name = item_get_name(item)) && strcmp(name, ai->name) > 0) { + *candidate_page = page_no; + *candidate_pos = position_no; + return MENU_SCREEN_ERROR_OK; + } + } + } + + return MENU_SCREEN_ERROR_OK; +} + + + static menu_screen_error_e _animated_pack_item(Evas_Object *item, Evas_Object *scroller, Evas_Object *page, int from) { Evas_Object *item_out_page = NULL; @@ -336,60 +416,7 @@ static menu_screen_error_e _animated_pack_item(Evas_Object *item, Evas_Object *s -static Evas_Object *_animated_unpack_item(Evas_Object *scroller, Evas_Object *page, unsigned int pos) -{ - Evas_Object *out = NULL; - Evas_Object *item; - Evas_Object *next_page; - - char buf[32]; - unsigned int page_max_app; - unsigned int page_no; - page_scroller_sort_type_e sort_type; - - out = page_unpack_item_at(page, pos); - retv_if(NULL == out, NULL); - - page_no = page_scroller_get_page_no(scroller, page); - page_max_app = (unsigned int) evas_object_data_get(scroller, "page_max_app"); - sort_type = (page_scroller_sort_type_e) evas_object_data_get(scroller, "sort_type"); - - pos ++; - while (page && page_no < MAX_PAGE_NO) { - if (0 == page_count_item(page)) { - page_destroy(scroller, page); - break; - } - - for (; pos < page_max_app; pos ++) { - item = page_unpack_item_at(page, pos); - page_pack_item(page, pos - 1, item); - snprintf(buf, 32, "menu%d", pos - 1); - edje_object_signal_emit(_EDJ(page), STR_MOVE_NEXT, buf); - edje_object_signal_emit(_EDJ(page), STR_ANI_RETURN, buf); - } - - if (sort_type == PAGE_SCROLLER_SORT_MAX) { - return NULL; - } - - page_no ++; - next_page = page_scroller_get_page_at(scroller, page_no); - if (next_page) { - item = page_unpack_item_at(next_page, 0); - page_pack_item(page, page_max_app - 1, item); - } else break; - - pos = 1; - page = next_page; - } - - return out; -} - - - -menu_screen_error_e page_scroller_push_item(Evas_Object *scroller, app_info_t *ai) +HAPI Evas_Object *page_scroller_push_item(Evas_Object *scroller, app_info_t *ai) { Evas_Object *page; Evas_Object *item; @@ -413,7 +440,7 @@ menu_screen_error_e page_scroller_push_item(Evas_Object *scroller, app_info_t *a }, { .sort_type = PAGE_SCROLLER_SORT_BY_NAME, - .sort_func = NULL, + .sort_func = _find_position_by_name, }, { .sort_type = PAGE_SCROLLER_SORT_MAX, @@ -432,307 +459,204 @@ menu_screen_error_e page_scroller_push_item(Evas_Object *scroller, app_info_t *a rotate = (int) evas_object_data_get(scroller, "rotate"); new_page = page_create(scroller, nr_of_pages, rotate); - retv_if(NULL == new_page, MENU_SCREEN_ERROR_FAIL); + retv_if(NULL == new_page, NULL); mapbuf_enable(new_page, 0); } item = item_create(scroller, ai); - retv_if(NULL == item, MENU_SCREEN_ERROR_FAIL); + retv_if(NULL == item, NULL); page = page_scroller_get_page_at(scroller, candidate_page); if (!page) { _D("Impossible, page is not found"); item_destroy(item); - return MENU_SCREEN_ERROR_FAIL; + return NULL; } retv_if(MENU_SCREEN_ERROR_OK != _animated_pack_item(item, scroller, page, candidate_pos), - MENU_SCREEN_ERROR_FAIL); + NULL); - return MENU_SCREEN_ERROR_OK; + return item; } -static inline menu_screen_error_e _create_cb(const char *package, void *data) +HAPI Evas_Object *page_scroller_push_item_by_order(Evas_Object *scroller, app_info_t *ai) { - app_info_t ai = {0,}; - Evas_Object *item; - Evas_Object *scroller = data; + int candidate_page = -1; + int candidate_pos = -1; + Evas_Object *item = NULL; - if (MENU_SCREEN_ERROR_FAIL == list_get_values(package, &ai)) { - list_free_values(&ai); - return MENU_SCREEN_ERROR_FAIL; + if (MAX_PAGE_NO == page_scroller_count_page(scroller)) { + _find_position_all_page(scroller, &candidate_page, &candidate_pos, &ai); + if (-1 != candidate_page || -1 != candidate_pos) { + item = page_scroller_push_item(scroller, ai); + } } + else item = page_scroller_push_item(scroller, ai); - do { - if (!scroller) { - _D("Scroller is NULL."); - break; - } + return item; +} - if (ai.nodisplay) { - Evas_Object *page; - _D("package %s is not visible", package); - item = pkgmgr_find_pended_object(ai.package, 1, scroller, &page); - if (item) { - if (page) { - page_unpack_item(page, item); - page_trim_items(page); - } - item_destroy(item); - } +static void _mapbuf_cb(keynode_t *node, void *data) +{ + int value; + int nr_of_pages; + register int i; + Evas_Object *page; - break; - } + if (vconf_get_int("memory/menuscreen/mapbuf", &value) < 0) { + _D("Failed to get mapbuf status"); + return; + } - item = pkgmgr_find_pended_object(ai.package, 1, scroller, NULL); - if (!item) { - item = page_scroller_find_item_by_package(scroller, ai.package, NULL); - if (!item) { - int ret; - - _D("package %s is installed directly", package); - ret = page_scroller_push_item(scroller, &ai); - if (ret == MENU_SCREEN_ERROR_OK) { - break; - } else { - list_free_values(&ai); - retv_if(1, MENU_SCREEN_ERROR_FAIL); - } + nr_of_pages = page_scroller_count_page(data); + if (value) { + for (i = 0; i < nr_of_pages; i ++) { + page = page_scroller_get_page_at(data, i); + if (!page) continue; + + if (!mapbuf_is_enabled(page)) { + _D("Enable mapbuf %d", i); + mapbuf_enable(page, 1); } } + } else { + for (i = 0; i < nr_of_pages; i ++) { + page = page_scroller_get_page_at(data, i); + if (!page) continue; - _D("Package %s is found, update it!", package); - item_update(item, &ai); - } while(0); - - list_free_values(&ai); - return MENU_SCREEN_ERROR_OK; + if (mapbuf_is_enabled(page)) { + _D("Disable mapbuf %d", i); + mapbuf_disable(page, 1); + } + } + } } -static inline menu_screen_error_e _update_cb(const char *package, void *data) +static void _mouse_wheel_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { + Evas_Event_Mouse_Wheel *ei = event_info; Evas_Object *scroller = data; - Evas_Object *item; - int page_no = 0; - app_info_t ai = {0,}; + int x, y, w, h; + int idx = -1; - if (MENU_SCREEN_ERROR_FAIL == list_get_values(package, &ai)) { - list_free_values(&ai); - return MENU_SCREEN_ERROR_FAIL; - } - - do { - if (!scroller) { - _D("Scroller is NULL."); - break; - } - - item = page_scroller_find_item_by_package(scroller, package, &page_no); - if (!item) { - Evas_Object *page; - _D("There is no loaded item is found"); - item = pkgmgr_find_pended_object(package, 1, scroller, &page); - if (item) { - if (!ai.nodisplay) { - _D("Item is found for updating from the install list, Ignore this."); - item_update(item, &ai); - } else { - _D("Item is found for updating from the install list, But nodisplay"); - if (page) { - page_unpack_item(page, item); - page_trim_items(page); - } - item_destroy(item); - } - } else { - int ret; - _D("Item is not found. Create a new one"); - - ret = (ai.nodisplay == false ? page_scroller_push_item(scroller, &ai) : MENU_SCREEN_ERROR_OK); - if (ret == MENU_SCREEN_ERROR_OK) { - break; - } else { - list_free_values(&ai); - retv_if(1, MENU_SCREEN_ERROR_FAIL); - } - } - } else { - Evas_Object *page; - Evas_Object *pended_item; - - pended_item = pkgmgr_find_pended_object(package, 1, scroller, &page); - if (!pended_item ) { - _D("Cannot find package in the install list"); - } - - if (ai.nodisplay == false) { - item_update(item, &ai); - break; - } + _D("Wheel's up or down(%d)", ei->z); - page = page_scroller_get_page_at(scroller, page_no); - if (page) { - page_unpack_item(page, item); - page_trim_items(page); - } - item_destroy(item); - } - } while (0); + elm_scroller_region_get(scroller, &x, &y, &w, &h); + if (ei->z > 0) { // Wheel's up + idx = x / w; + idx ++; + } else if (ei->z < 0) { // Wheel's down + idx = x / w; // Scroller got ECORE events at first, then Menu-screen gets EVAS events. + } else { // Wheel's not moving. + _D("Wheel's not moving"); + } - list_free_values(&ai); - return MENU_SCREEN_ERROR_OK; + if (idx >= page_scroller_count_page(scroller) || idx < 0) return; + evas_object_data_set(scroller, "mouse_wheel_scroller_start", (void *) 1); + page_scroller_bring_in(scroller, idx); } -static inline menu_screen_error_e _delete_cb(const char *package, void *data) +static inline char *_ltrim(char *str) { - Evas_Object *item; - Evas_Object *page; - Evas_Object *scroller = data; - Evas_Object *tmp; - int page_no = 0; - register unsigned int i; - unsigned int page_max_app; - - do { - if (!scroller) { - _D("Scroller is NULL."); - break; - } - - tmp = pkgmgr_find_pended_object(package, 1, scroller, NULL); + retv_if(NULL == str, NULL); + while (*str && (*str == ' ' || *str == '\t' || *str == '\n')) str ++; + return str; +} - item = page_scroller_find_item_by_package(scroller, package, &page_no); - retv_if(NULL == item, MENU_SCREEN_ERROR_FAIL); - if (tmp != item) { - _D("Pended item is %p, Found item is %p", tmp, item); - } - page = page_scroller_get_page_at(scroller, page_no); - retv_if(NULL == page, MENU_SCREEN_ERROR_FAIL); +static inline int _rtrim(char *str) +{ + int len; - page_max_app = (unsigned int) evas_object_data_get(scroller, "page_max_app"); - for (i = 0; i < page_max_app; i++) { - if (item == page_get_item_at(page, i)) { - break; - } - } + retv_if(NULL == str, 0); - item = _animated_unpack_item(scroller, page, i); - retv_if(NULL == item, MENU_SCREEN_ERROR_FAIL); - item_destroy(item); - } while (0); + len = strlen(str); + while (--len >= 0 && (str[len] == ' ' || str[len] == '\n' || str[len] == '\t')) { + str[len] = '\0'; + } - return MENU_SCREEN_ERROR_OK; + return len; } -static struct pkg_event_handler { - const char *event_name; - int (*event_handler)(const char *package, void *data); -} event_table[] = { - { - .event_name = "create", - .event_handler = _create_cb, - }, - { - .event_name = "update", - .event_handler = _update_cb, - }, - { - .event_name = "delete", - .event_handler = _delete_cb, - }, - { - .event_name = NULL, - .event_handler = NULL, - }, -}; - - - -static void _desktop_cb(keynode_t *node, void *data) +static int _create_main_operation_list(Evas_Object *scroller) { - char *event; - char type[10]; - char package[BUFSZE]; - register int i; + FILE *fp; + const char *filename = RESDIR"/data/main_operation.launch"; + char *line = NULL; + size_t size = 0; + ssize_t read; + char *data = NULL; + Eina_List *main_operation_list = NULL; + + fp = fopen(filename, "r"); + if (!fp) { + _D("cannot open fp"); + return 0; + } - event = vconf_get_str(vconf_keynode_get_name(node)); - ret_if(NULL == event); + while ((read = getline(&line, &size, fp)) != -1) { + char *begin; - if (sscanf(event, "%10[^:]:%1023s", type, package) != 2) { - _D("Failed to parse the event format : [%s], [%s]", type, package); - } + if (size <= 0) { + free(line); + line = NULL; + break; + } - _D("command[%s], package[%s]", type, package); + begin = _ltrim(line); + _rtrim(line); - for (i = 0; event_table[i].event_name; i ++) { - if (!strcasecmp(type, event_table[i].event_name)) { - if (event_table[i].event_handler(package, data) == MENU_SCREEN_ERROR_FAIL) { - _E("Failed to handles the desktop notification event"); - } + if (*begin == '#' || *begin == '\0') { + free(line); + line = NULL; + continue; + } - free(event); - return; + data = strdup(begin); + main_operation_list = eina_list_append(main_operation_list, data); + + if (line) { + free(line); + line = NULL; } } - _E("Failed to find a proper event handler"); - free(event); + fclose(fp); + evas_object_data_set(scroller, DATA_KEY_MAIN_OPERATION_LIST, main_operation_list); + + return 1; } -static void _mapbuf_cb(keynode_t *node, void *data) +static void _destroy_main_operation_list(Evas_Object *scroller) { - int value; - int nr_of_pages; - register int i; - Evas_Object *page; - - if (vconf_get_int("memory/menuscreen/mapbuf", &value) < 0) { - _D("Failed to get mapbuf status"); - return; - } + char *data = NULL; + Eina_List *main_operation_list = NULL; - nr_of_pages = page_scroller_count_page(data); - if (value) { - for (i = 0; i < nr_of_pages; i ++) { - page = page_scroller_get_page_at(data, i); - if (!page) continue; + main_operation_list = evas_object_data_del(scroller, DATA_KEY_MAIN_OPERATION_LIST); + ret_if(!main_operation_list); - if (!mapbuf_is_enabled(page)) { - _D("Enable mapbuf %d", i); - mapbuf_enable(page, 1); - } - } - } else { - for (i = 0; i < nr_of_pages; i ++) { - page = page_scroller_get_page_at(data, i); - if (!page) continue; - - if (mapbuf_is_enabled(page)) { - _D("Disable mapbuf %d", i); - mapbuf_disable(page, 1); - } - } + EINA_LIST_FREE(main_operation_list, data) { + free(data); } } -Evas_Object *page_scroller_create(Evas_Object *tab, Evas_Object *index, page_scroller_sort_type_e sort_type, int rotate) +HAPI Evas_Object *page_scroller_create(Evas_Object *tab, Evas_Object *index, page_scroller_sort_type_e sort_type, int rotate) { Evas_Object *box; Evas_Object *scroller; @@ -749,14 +673,13 @@ Evas_Object *page_scroller_create(Evas_Object *tab, Evas_Object *index, page_scr width = menu_screen_get_root_width(); height = (int) ((double) PROP_PORTRAIT_HEIGHT * ((double) menu_screen_get_root_height())); elm_scroller_page_size_set(scroller, width, height); + elm_scroller_page_scroll_limit_set(scroller, 1, 1); evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(scroller, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_size_hint_min_set(scroller, width, height); evas_object_size_hint_max_set(scroller, width, height); - _scroller_register(scroller); - box = elm_box_add(scroller); if (!box) { _D("Failed to create box"); @@ -788,32 +711,36 @@ Evas_Object *page_scroller_create(Evas_Object *tab, Evas_Object *index, page_scr evas_object_data_set(scroller, "is_edited", (void *) false); elm_object_content_set(scroller, box); + evas_object_smart_callback_add(scroller, "scroll,anim,start", _anim_start_cb, NULL); + evas_object_smart_callback_add(scroller, "scroll,anim,stop", _anim_stop_cb, NULL); + evas_object_smart_callback_add(scroller, "scroll,drag,start", _drag_start_cb, NULL); + evas_object_smart_callback_add(scroller, "scroll,drag,stop", _drag_stop_cb, NULL); + evas_object_smart_callback_add(scroller, "scroll", _scroll_cb, NULL); evas_object_event_callback_add(box, EVAS_CALLBACK_DEL, _evas_object_event_del_cb, "BOX"); + evas_object_event_callback_add(scroller, EVAS_CALLBACK_MOUSE_WHEEL, _mouse_wheel_cb, scroller); evas_object_show(box); evas_object_show(scroller); - if (vconf_notify_key_changed("memory/menuscreen/desktop", _desktop_cb, scroller) < 0) { - _E("Failed to register a desktop change event handler"); - } - if (vconf_notify_key_changed("memory/menuscreen/mapbuf", _mapbuf_cb, scroller) < 0) { _E("Failed to register a vconf cb for %s", "memory/menuscreen/mapbuf"); } - pkgmgr_init(scroller); + item_badge_register_changed_cb(scroller); + if (!_create_main_operation_list(scroller)) { + _E("Cannot create the main operation list"); + } return scroller; } -void page_scroller_destroy(Evas_Object *scroller) +HAPI void page_scroller_destroy(Evas_Object *scroller) { Evas_Object *box; Evas_Object *page; Evas_Object *tmp; - Evas_Object *tab; const Eina_List *page_list; const Eina_List *l; @@ -823,9 +750,8 @@ void page_scroller_destroy(Evas_Object *scroller) ret_if(NULL == (box = evas_object_data_get(scroller, "box"))); ret_if(NULL == (page_list = elm_box_children_get(box))); - tab = evas_object_data_get(scroller, "tab"); - - pkgmgr_fini(); + _destroy_main_operation_list(scroller); + item_badge_unregister_changed_cb(); EINA_LIST_FOREACH_SAFE(page_list, l, ln, page) { int count; @@ -850,7 +776,6 @@ void page_scroller_destroy(Evas_Object *scroller) box = elm_object_content_unset(scroller); evas_object_del(box); - _scroller_unregister(scroller); evas_object_data_del(scroller, "win"); evas_object_data_del(scroller, "layout"); evas_object_data_del(scroller, "controlbar"); @@ -872,12 +797,15 @@ void page_scroller_destroy(Evas_Object *scroller) evas_object_data_del(scroller, "is_edited"); evas_object_data_del(scroller, "install_list"); - evas_object_del(scroller); + evas_object_smart_callback_del(scroller, "scroll,anim,start", _anim_start_cb); + evas_object_smart_callback_del(scroller, "scroll,anim,stop", _anim_stop_cb); + evas_object_smart_callback_del(scroller, "scroll,drag,start", _drag_start_cb); + evas_object_smart_callback_del(scroller, "scroll,drag,stop", _drag_stop_cb); + evas_object_smart_callback_del(scroller, "scroll", _scroll_cb); evas_object_event_callback_del(box, EVAS_CALLBACK_DEL, _evas_object_event_del_cb); + evas_object_event_callback_del(scroller, EVAS_CALLBACK_MOUSE_WHEEL, _mouse_wheel_cb); - if (vconf_ignore_key_changed("memory/menuscreen/desktop", _desktop_cb) < 0) { - _E("Failed to ignore the desktop event"); - } + evas_object_del(scroller); if (vconf_ignore_key_changed("memory/menuscreen/mapbuf", _mapbuf_cb) < 0) { _E("Failed to remove vconf %s", "memory/menuscreen/mapbuf"); @@ -886,7 +814,7 @@ void page_scroller_destroy(Evas_Object *scroller) -void page_scroller_clean(Evas_Object *scroller) +HAPI void page_scroller_clean(Evas_Object *scroller) { Evas_Object *page; Evas_Object *item; @@ -919,13 +847,13 @@ void page_scroller_clean(Evas_Object *scroller) -Evas_Object *page_scroller_get_page_at(Evas_Object *scroller, unsigned int idx) +HAPI Evas_Object *page_scroller_get_page_at(Evas_Object *scroller, unsigned int idx) { const Eina_List *page_list; Evas_Object *item; Evas_Object *box; - retv_if(idx >= MAX_PAGE_NO, NULL); + retv_if(idx > MAX_PAGE_NO, NULL); box = evas_object_data_get(scroller, "box"); retv_if(NULL == box, NULL); @@ -943,7 +871,7 @@ Evas_Object *page_scroller_get_page_at(Evas_Object *scroller, unsigned int idx) -unsigned int page_scroller_count_page(Evas_Object *scroller) +HAPI unsigned int page_scroller_count_page(Evas_Object *scroller) { const Eina_List *page_list; Evas_Object *box; @@ -959,7 +887,7 @@ unsigned int page_scroller_count_page(Evas_Object *scroller) -int page_scroller_get_page_no(Evas_Object* scroller, Evas_Object *page) +HAPI int page_scroller_get_page_no(Evas_Object* scroller, Evas_Object *page) { Evas_Object *item; Evas_Object *box; @@ -990,7 +918,14 @@ int page_scroller_get_page_no(Evas_Object* scroller, Evas_Object *page) -Evas_Object *page_scroller_find_item_by_package(Evas_Object *scroller, const char *package, int *page_no) +HAPI int page_scroller_get_current_page_no(Evas_Object *scroller) +{ + return (int) evas_object_data_get(scroller, "current_idx"); +} + + + +HAPI Evas_Object *page_scroller_find_item_by_package(Evas_Object *scroller, const char *package, int *page_no) { register int i; register int j; @@ -1031,18 +966,7 @@ Evas_Object *page_scroller_find_item_by_package(Evas_Object *scroller, const cha -void _show(Evas_Object *scroller, int page) -{ - Evas_Coord w; - Evas_Coord h; - - evas_object_geometry_get(scroller, NULL, NULL, &w, &h); - elm_scroller_region_show(scroller, page * w, 0, w, h); -} - - - -void page_scroller_trim_items(Evas_Object *scroller) +HAPI void page_scroller_trim_items(Evas_Object *scroller) { register unsigned int i; register unsigned int j; @@ -1114,16 +1038,128 @@ void page_scroller_trim_items(Evas_Object *scroller) -Evas_Object *_unpack_updated_item(Evas_Object *scroller, unsigned int page_no, unsigned int position_no) +HAPI void page_scroller_edit(Evas_Object *scroller) { Evas_Object *page; - Evas_Object *temp; + Evas_Object *item; + register unsigned int page_no; + register unsigned int position_no; + unsigned int nr_of_pages; + int page_max_app; + + nr_of_pages = page_scroller_count_page(scroller); + page_max_app = (int) evas_object_data_get(scroller, "page_max_app"); + for (page_no = 0; page_no < nr_of_pages; page_no ++) { + page = page_scroller_get_page_at(scroller, page_no); + if(!page) continue; + + for (position_no = 0; position_no < page_max_app; position_no ++) { + item = page_get_item_at(page, position_no); + if (!item) { + continue; + } + + item_edit(item); + } + } + evas_object_data_set(scroller, "is_edited", (void *) true); +} + + + +HAPI void page_scroller_unedit(Evas_Object *scroller) +{ + Evas_Object *all_apps; + Evas_Object *page; + Evas_Object *item; + register int page_no; + register unsigned int position_no; + unsigned int nr_of_pages; + int page_max_app; + + ret_if(NULL == scroller); + + all_apps = evas_object_data_get(scroller, "tab"); + ret_if(NULL == all_apps); + + nr_of_pages = page_scroller_count_page(scroller); + page_max_app = (int) evas_object_data_get(scroller, "page_max_app"); + + for (page_no = nr_of_pages - 1; page_no >= 0; page_no --) { + page = page_scroller_get_page_at(scroller, page_no); + if(NULL == page) continue; + + page_scroller_trim_items(scroller); + + for (position_no = 0; position_no < page_max_app; position_no ++) { + item = page_get_item_at(page, position_no); + if (!item) { + break; + } + + item_unedit(item); + } + } + + evas_object_data_set(scroller, "is_edited", (void *) false); +} - retv_if(NULL == scroller, NULL); - page = page_scroller_get_page_at(scroller, page_no); - temp = page_unpack_item_at(page, (int) position_no); - return temp; + +HAPI bool page_scroller_is_edited(Evas_Object *scroller) +{ + return (bool) evas_object_data_get(scroller, "is_edited"); +} + + + +HAPI void page_scroller_focus(Evas_Object *scroller) +{ + int idx = 0; + idx = page_scroller_get_current_page_no(scroller); + + Evas_Object *page = NULL; + page = page_scroller_get_page_at(scroller, (unsigned int) idx); + ret_if(NULL == page); + + Evas_Object *item = NULL; + item = page_get_item_at(page, 0); + ret_if(NULL == item); + + Evas_Object *focus_button = NULL; + focus_button = elm_object_part_content_get(item, "focus"); + ret_if(NULL == focus_button); + + _D("Focus set scroller(%p), page:%d, item:%s", scroller, idx, item_get_name(item)); + elm_object_focus_set(focus_button, EINA_TRUE); +} + + + +HAPI void page_scroller_focus_into_vector(Evas_Object *scroller, int vector) +{ + int idx = 0; + idx = page_scroller_get_current_page_no(scroller); + idx += vector; + + ret_if(0 > idx); + + Evas_Object *page = NULL; + page = page_scroller_get_page_at(scroller, (unsigned int) idx); + ret_if(NULL == page); + + Evas_Object *item = NULL; + item = page_get_item_at(page, 0); + ret_if(NULL == item); + + Evas_Object *focus_button = NULL; + focus_button = elm_object_part_content_get(item, "focus"); + ret_if(NULL == focus_button); + + _D("Focus set scroller(%p), page:%d, item:%s", scroller, idx, item_get_name(item)); + elm_object_focus_set(focus_button, EINA_TRUE); + + page_scroller_bring_in(scroller, idx); } diff --git a/src/pkgmgr.c b/src/pkgmgr.c index f39a7c1..8ffe7ed 100644 --- a/src/pkgmgr.c +++ b/src/pkgmgr.c @@ -1,31 +1,36 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #include #include +#include #include "conf.h" -#include "index.h" +#include "menu_screen.h" #include "item.h" +#include "layout.h" #include "list.h" #include "page.h" #include "page_scroller.h" -#include "mapbuf.h" #include "pkgmgr.h" #include "util.h" @@ -36,226 +41,330 @@ struct pkgmgr_handler { int (*func)(const char *package, const char *val, void *data); }; +typedef struct { + char* package; + char* key; + char* val; +} pkgmgr_reserve_s; +typedef struct { + char* package; + char* status; +} pkgmgr_request_s; + +typedef struct { + char* pkg_id; + char* app_id; + Evas_Object *item; +} pkgmgr_install_s; static struct { pkgmgr_client *listen_pc; + Eina_List *reserve_list; + Eina_List *request_list; + Eina_List *item_list; } pkg_mgr_info = { .listen_pc = NULL, + .reserve_list = NULL, + .request_list = NULL, + .item_list = NULL, }; -inline menu_screen_error_e pkgmgr_uninstall(Evas_Object *item) +static menu_screen_error_e _append_request_in_list(const char *package, const char *status) { - pkgmgr_client *req_pc = NULL; - int ret = MENU_SCREEN_ERROR_OK; + retv_if(NULL == package, MENU_SCREEN_ERROR_INVALID_PARAMETER); + retv_if(NULL == status, MENU_SCREEN_ERROR_INVALID_PARAMETER); - retv_if(NULL == item, MENU_SCREEN_ERROR_FAIL); + pkgmgr_request_s *rt = calloc(1, sizeof(pkgmgr_request_s)); + retv_if(NULL == rt, MENU_SCREEN_ERROR_FAIL); - req_pc = pkgmgr_client_new(PC_REQUEST); - retv_if(NULL == req_pc, MENU_SCREEN_ERROR_FAIL); + rt->package = strdup(package); + goto_if(NULL == rt->package, ERROR); - if (pkgmgr_client_uninstall(req_pc, NULL, item_get_package(item), PM_DEFAULT, NULL, NULL) < 0) { - _E("cannot uninstall %s.", item_get_package(item)); - ret = MENU_SCREEN_ERROR_FAIL; + rt->status = strdup(status); + goto_if(NULL == rt->status, ERROR); + + pkg_mgr_info.request_list = eina_list_append(pkg_mgr_info.request_list, rt); + goto_if(NULL == pkg_mgr_info.request_list, ERROR); + + return MENU_SCREEN_ERROR_OK; + +ERROR: + if (rt->status) free(rt->status); + if (rt->package) free(rt->package); + if (rt) free(rt); + + return MENU_SCREEN_ERROR_FAIL; +} + + + +static menu_screen_error_e _remove_request_in_list(const char *package) +{ + retv_if(NULL == package, MENU_SCREEN_ERROR_INVALID_PARAMETER); + + if (NULL == pkg_mgr_info.request_list) return MENU_SCREEN_ERROR_OK; + + const Eina_List *l = NULL; + const Eina_List *ln = NULL; + pkgmgr_request_s *rt = NULL; + EINA_LIST_FOREACH_SAFE(pkg_mgr_info.request_list, l, ln, rt) { + if (!rt) continue; + if (!rt->package) continue; + if (strcmp(rt->package, package)) continue; + + pkg_mgr_info.request_list = eina_list_remove(pkg_mgr_info.request_list, rt); + free(rt->package); + if (rt->status) free(rt->status); + free(rt); + return MENU_SCREEN_ERROR_OK; } - if (pkgmgr_client_free(req_pc) != PKGMGR_R_OK) { - _E("cannot free pkgmgr_client for request."); + return MENU_SCREEN_ERROR_FAIL; +} + + + +static int _exist_request_in_list(const char *package) +{ + retv_if(NULL == package, 0); + + if (NULL == pkg_mgr_info.request_list) return 0; + + const Eina_List *l = NULL; + const Eina_List *ln = NULL; + pkgmgr_request_s *rt = NULL; + EINA_LIST_FOREACH_SAFE(pkg_mgr_info.request_list, l, ln, rt) { + if (!rt) continue; + if (!rt->package) continue; + if (strcmp(rt->package, package)) continue; + return 1; } - return ret; + return 0; } -static menu_screen_error_e _start_download(const char *package, void *scroller) +static pkgmgr_request_s *_get_request_in_list(const char *package) { - struct package_info *pi; - Eina_List *install_list; + retv_if(NULL == package, NULL); - install_list = evas_object_data_get(scroller, "install_list"); - pi = calloc(1, sizeof(struct package_info)); - retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL); + if (NULL == pkg_mgr_info.request_list) return NULL; - pi->status = DOWNLOAD_BEGIN; - pi->ai.package = strdup(package); - pi->ai.name = strdup("Download"); + const Eina_List *l = NULL; + const Eina_List *ln = NULL; + pkgmgr_request_s *rt = NULL; + EINA_LIST_FOREACH_SAFE(pkg_mgr_info.request_list, l, ln, rt) { + if (!rt) continue; + if (!rt->package) continue; + if (strcmp(rt->package, package)) continue; + return rt; + } - install_list = eina_list_append(install_list, pi); - evas_object_data_set(scroller, "install_list", install_list); - _D("Package [%s] is jump into the downloading phase", package); + return NULL; +} + + + +HAPI menu_screen_error_e pkgmgr_item_list_append_item(const char *pkg_id, const char *app_id, Evas_Object *item) +{ + retv_if(NULL == pkg_id, MENU_SCREEN_ERROR_INVALID_PARAMETER); + retv_if(NULL == app_id, MENU_SCREEN_ERROR_INVALID_PARAMETER); + retv_if(NULL == item, MENU_SCREEN_ERROR_INVALID_PARAMETER); + + char *tmp_pkg_id = NULL; + char *tmp_app_id = NULL; + + pkgmgr_install_s *pi = calloc(1, sizeof(pkgmgr_install_s)); + goto_if(NULL == pi, ERROR); + + tmp_pkg_id = strdup(pkg_id); + goto_if(NULL == tmp_pkg_id, ERROR); + + tmp_app_id = strdup(app_id); + goto_if(NULL == tmp_app_id, ERROR); + + pi->pkg_id = tmp_pkg_id; + pi->app_id = tmp_app_id; + pi->item = item; + + pkg_mgr_info.item_list = eina_list_append(pkg_mgr_info.item_list, pi); + goto_if(NULL == pkg_mgr_info.item_list, ERROR); return MENU_SCREEN_ERROR_OK; + +ERROR: + if (tmp_app_id) free(tmp_app_id); + if (tmp_pkg_id) free(tmp_pkg_id); + free(pi); + + return MENU_SCREEN_ERROR_FAIL; } -static menu_screen_error_e _start_uninstall(const char *package, void *scroller) +HAPI menu_screen_error_e pkgmgr_item_list_remove_item(const char *pkg_id, const char *app_id, Evas_Object *item) { - Eina_List *l; - Eina_List *tmp; - int page_no = 0; - struct package_info *pi = NULL; - Eina_List *install_list; - - install_list = evas_object_data_get(scroller, "install_list"); - EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) { - if (pi->ai.package && !strcmp(pi->ai.package, package)) { - break; - } - pi = NULL; - } + retv_if(NULL == pkg_id, MENU_SCREEN_ERROR_INVALID_PARAMETER); + retv_if(NULL == app_id, MENU_SCREEN_ERROR_INVALID_PARAMETER); + retv_if(NULL == item, MENU_SCREEN_ERROR_INVALID_PARAMETER); + + const Eina_List *l = NULL; + const Eina_List *ln = NULL; + pkgmgr_install_s *pi = NULL; + EINA_LIST_FOREACH_SAFE(pkg_mgr_info.item_list, l, ln, pi) { + continue_if(NULL == pi); + continue_if(NULL == pi->pkg_id); + continue_if(NULL == pi->app_id); + continue_if(NULL == pi->item); + + if (strcmp(pi->pkg_id, pkg_id)) continue; + if (strcmp(pi->app_id, app_id)) continue; + if (pi->item != item) continue; + + pkg_mgr_info.item_list = eina_list_remove(pkg_mgr_info.item_list, pi); + + free(pi->app_id); + free(pi->pkg_id); + free(pi); - retv_if(pi, MENU_SCREEN_ERROR_FAIL); + return MENU_SCREEN_ERROR_OK; + } - pi = calloc(1, sizeof(struct package_info)); - retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL); + return MENU_SCREEN_ERROR_FAIL; +} - pi->status = UNINSTALL_BEGIN; - pi->ai.package = strdup(package); - pi->ai.nodisplay = false; - pi->item = page_scroller_find_item_by_package(scroller, package, &page_no); - pi->page = page_scroller_get_page_at(scroller, page_no); - install_list = eina_list_append(install_list, pi); - evas_object_data_set(scroller, "install_list", install_list); - return MENU_SCREEN_ERROR_OK; +HAPI void pkgmgr_item_list_affect_pkgid(const char *pkg_id, Eina_Bool (*_affected_cb)(const char *, Evas_Object *, void *), void *data) +{ + ret_if(NULL == pkg_mgr_info.item_list); + ret_if(NULL == pkg_id); + ret_if(NULL == _affected_cb); + + const Eina_List *l; + const Eina_List *ln; + pkgmgr_install_s *pi; + EINA_LIST_FOREACH_SAFE(pkg_mgr_info.item_list, l, ln, pi) { + continue_if(NULL == pi); + continue_if(NULL == pi->app_id); + continue_if(NULL == pi->item); + + if (strcmp(pkg_id, pi->pkg_id)) continue; + /* It's possible that many items with the same package name are in the install list */ + continue_if(EINA_TRUE != _affected_cb(pi->app_id, pi->item, data)); + } } -static menu_screen_error_e _start_update(const char *package, void *scroller) +HAPI void pkgmgr_item_list_affect_appid(const char *app_id, Eina_Bool (*_affected_cb)(const char *, Evas_Object *, void *), void *data) { - Eina_List *l; - Eina_List *tmp; - struct package_info *pi = NULL; - Eina_List *install_list; - - install_list = evas_object_data_get(scroller, "install_list"); - EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) { - if (pi->ai.package && !strcmp(pi->ai.package, package)) { - break; - } - pi = NULL; + ret_if(NULL == pkg_mgr_info.item_list); + ret_if(NULL == app_id); + ret_if(NULL == _affected_cb); + + const Eina_List *l; + const Eina_List *ln; + pkgmgr_install_s *pi; + EINA_LIST_FOREACH_SAFE(pkg_mgr_info.item_list, l, ln, pi) { + continue_if(NULL == pi); + continue_if(NULL == pi->app_id); + continue_if(NULL == pi->item); + + if (strcmp(app_id, pi->app_id)) continue; + /* It's possible that many items with the same package name are in the install list */ + if (EINA_FALSE == _affected_cb(pi->app_id, pi->item, data)) break; } +} - if (!pi) { - int page_no = 0; - _D("Package [%s] is starting update phase directly (without downloading phase)", package); - pi = calloc(1, sizeof(struct package_info)); - retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL); - pi->ai.package = strdup(package); - pi->item = page_scroller_find_item_by_package(scroller, package, &page_no); - if (pi->item) { - pi->page = page_scroller_get_page_at(scroller, page_no); - } +HAPI inline menu_screen_error_e pkgmgr_uninstall(Evas_Object *item) +{ + char *pkgid = NULL; + char *appid = NULL; + pkgmgr_client *req_pc = NULL; + pkgmgrinfo_appinfo_h handle = NULL; + int ret = MENU_SCREEN_ERROR_OK; - if (pi->item && pi->page) { - pi->ai.nodisplay = false; - } + retv_if(NULL == item, MENU_SCREEN_ERROR_FAIL); - install_list = eina_list_append(install_list, pi); - evas_object_data_set(scroller, "install_list", install_list); - } else { - if (pi->status != DOWNLOAD_END) { - _D("Package [%s] is in invalid state (%d), cancel this", package, pi->status); - install_list = eina_list_remove(install_list, pi); - evas_object_data_set(scroller, "install_list", install_list); - if (pi->item) { - page_unpack_item(pi->page, pi->item); - page_trim_items(pi->page); - item_destroy(pi->item); - } - - list_free_values(&pi->ai); - free(pi); - return MENU_SCREEN_ERROR_FAIL; + pkgid = item_get_pkgid(item); + retv_if(NULL == pkgid, MENU_SCREEN_ERROR_FAIL); + + appid = item_get_package(item); + retv_if(NULL == appid, MENU_SCREEN_ERROR_FAIL); + + req_pc = pkgmgr_client_new(PC_REQUEST); + retv_if(NULL == req_pc, MENU_SCREEN_ERROR_FAIL); + + if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_appinfo(appid, &handle)) { + if (PKGMGR_R_OK != pkgmgr_client_free(req_pc)) { + _E("cannot free pkgmgr_client for request."); } + return MENU_SCREEN_ERROR_FAIL; } - pi->status = UPDATE_BEGIN; - pi->ai.name = strdup("Update"); - if (pi->item) { - item_set_name(pi->item, pi->ai.name, 0); + if (PMINFO_R_OK != pkgmgrinfo_appinfo_destroy_appinfo(handle)) { + _E("cannot destroy the appinfo"); + ret = MENU_SCREEN_ERROR_FAIL; } - _D("Package [%s] is jump into the updating phase", package); + _D("Uninstall a package[%s] from an app[%s]", pkgid, appid); + if (pkgmgr_client_uninstall(req_pc, NULL, pkgid, PM_QUIET, NULL, NULL) < 0) { + _E("cannot uninstall %s.", item_get_package(item)); + ret = MENU_SCREEN_ERROR_FAIL; + } + if (PMINFO_R_OK != pkgmgr_client_free(req_pc)) { + _E("cannot free pkgmgr_client"); + ret = MENU_SCREEN_ERROR_FAIL; + } + + return ret; +} + + + +static menu_screen_error_e _start_download(const char *package, void *scroller) +{ + _D("Start downloading for the package(%s)", package); return MENU_SCREEN_ERROR_OK; } -static menu_screen_error_e _start_recover(const char *package, void *scroller) +static menu_screen_error_e _start_uninstall(const char *package, void *scroller) { + _D("Start uninstalling for the package(%s)", package); return MENU_SCREEN_ERROR_OK; } -static menu_screen_error_e _start_install(const char *package, void *scroller) +static menu_screen_error_e _start_update(const char *package, void *scroller) { - Eina_List *l; - Eina_List *tmp; - struct package_info *pi = NULL; - Eina_List *install_list; - - install_list = evas_object_data_get(scroller, "install_list"); - EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) { - if (pi->ai.package && !strcmp(pi->ai.package, package)) { - break; - } - pi = NULL; - } + _D("Start updating for the package(%s)", package); + return MENU_SCREEN_ERROR_OK; +} - if (!pi) { - int page_no = 0; - _D("Package [%s] is starting install phase directly (without downloading phase)", package); - pi = calloc(1, sizeof(struct package_info)); - retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL); - pi->ai.package = strdup(package); - pi->item = page_scroller_find_item_by_package(scroller, package, &page_no); - if (pi->item) { - pi->page = page_scroller_get_page_at(scroller, page_no); - } - if (pi->item && pi->page) { - pi->ai.nodisplay = false; - } +static menu_screen_error_e _start_recover(const char *package, void *scroller) +{ + _D("Start recovering for the package(%s)", package); + return MENU_SCREEN_ERROR_OK; +} - install_list = eina_list_append(install_list, pi); - evas_object_data_set(scroller, "install_list", install_list); - } else { - if (pi->status != DOWNLOAD_END) { - _D("Package [%s] is in invalid state (%d), cancel this", package, pi->status); - install_list = eina_list_remove(install_list, pi); - evas_object_data_set(scroller, "install_list", install_list); - if (pi->item) { - page_unpack_item(pi->page, pi->item); - page_trim_items(pi->page); - item_destroy(pi->item); - } - - list_free_values(&pi->ai); - free(pi); - return MENU_SCREEN_ERROR_FAIL; - } - } - pi->status = INSTALL_BEGIN; - pi->ai.name = strdup("Install"); - if (pi->item) { - // Update app name to install - item_set_name(pi->item, pi->ai.name, 0); - } - _D("Package [%s] is jump into the installing phase", package); +static menu_screen_error_e _start_install(const char *package, void *scroller) +{ + _D("Start installing for the package(%s)", package); return MENU_SCREEN_ERROR_OK; } @@ -293,18 +402,18 @@ static menu_screen_error_e _start(const char *package, const char *val, void *sc }, }; - register unsigned int i; - - _D("package [%s]", package); + _D("package [%s], val [%s]", package, val); + retv_if(_exist_request_in_list(package), MENU_SCREEN_ERROR_FAIL); + retv_if(MENU_SCREEN_ERROR_OK != _append_request_in_list(package, val), MENU_SCREEN_ERROR_FAIL); + register unsigned int i; for (i = 0; start_cb[i].name; i ++) { - if (!strcasecmp(val, start_cb[i].name) && start_cb[i].handler) { - return start_cb[i].handler(package, scroller); - } + if (strcasecmp(val, start_cb[i].name)) continue; + break_if(NULL == start_cb[i].handler); + return start_cb[i].handler(package, scroller); } - _D("Unknown status for starting phase signal'd from package manager"); - + _E("Unknown status for starting phase signal'd from package manager"); return MENU_SCREEN_ERROR_OK; } @@ -312,44 +421,7 @@ static menu_screen_error_e _start(const char *package, const char *val, void *sc static menu_screen_error_e _icon_path(const char *package, const char *val, void *scroller) { - Eina_List *l; - Eina_List *tmp; - struct package_info *pi = NULL; - Eina_List *install_list; - - install_list = evas_object_data_get(scroller, "install_list"); - retv_if(!package, MENU_SCREEN_ERROR_FAIL); - retv_if(!val, MENU_SCREEN_ERROR_FAIL); - - _D("package [%s] with %s", package, val); - - EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) { - if (pi->ai.package && !strcmp(pi->ai.package, package)) { - break; - } - pi = NULL; - } - retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL); - - if (strlen(val)) { - pi->ai.icon = strdup(val); - retv_if (NULL == pi->ai.icon, MENU_SCREEN_ERROR_OUT_OF_MEMORY); - - if (!pi->item) { - pi->ai.nodisplay = false; - - if (MENU_SCREEN_ERROR_FAIL == page_scroller_push_item(scroller, &pi->ai)) { - _E("Failed to create a new item, remove this package from the installing list"); - list_free_values(&pi->ai); - install_list = eina_list_remove(install_list, pi); - evas_object_data_set(scroller, "install_list", install_list); - free(pi); - } - } else { - item_update(pi->item, &pi->ai); - } - } - + _D("package(%s) with %s", package, val); return MENU_SCREEN_ERROR_OK; } @@ -357,39 +429,7 @@ static menu_screen_error_e _icon_path(const char *package, const char *val, void static menu_screen_error_e _download_percent(const char *package, const char *val, void *scroller) { - Eina_List *l; - Eina_List *tmp; - struct package_info *pi = NULL; - Eina_List *install_list; - - _D("package [%s] with %s", package, val); - - install_list = evas_object_data_get(scroller, "install_list"); - EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) { - if (pi->ai.package && !strcmp(pi->ai.package, package)) { - break; - } - pi = NULL; - } - - retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL); - - if (pi->status == DOWNLOAD_BEGIN) { - pi->status = DOWNLOADING; - } else if (pi->status == DOWNLOADING) { - // Do nothing, just we are in proper state - } else { - _D("Invalid state for %s, This is not started from the download_begin state(%s)", package, val); - } - - if (!pi->ai.nodisplay && pi->item) { - if (!item_is_enabled_progress(pi->item)) { - item_enable_progress(pi->item); - } - - item_update_progress(pi->item, atoi(val)); - } - + _D("package(%s) with %s", package, val); return MENU_SCREEN_ERROR_OK; } @@ -397,51 +437,9 @@ static menu_screen_error_e _download_percent(const char *package, const char *va static menu_screen_error_e _install_percent(const char *package, const char *val, void *scroller) { - Eina_List *l; - Eina_List *tmp; - struct package_info *pi; - int progress; - Eina_List *install_list; - - _D("package [%s] with %s", package, val); - - pi = NULL; - install_list = evas_object_data_get(scroller, "install_list"); - EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) { - if (pi->ai.package && !strcmp(pi->ai.package, package)) { - break; - } - - pi = NULL; - } - - retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL); - - progress = atoi(val); - - if (pi->status == INSTALL_BEGIN) { - pi->status = INSTALLING; - } else if (pi->status == UNINSTALL_BEGIN) { - progress = 100 - progress; - pi->status = UNINSTALLING; - } else if (pi->status == UPDATE_BEGIN) { - pi->status = UPDATING; - } else if (pi->status == INSTALLING) { - } else if (pi->status == UNINSTALLING) { - progress = 100 - progress; - } else if (pi->status == UPDATING) { - } else { - _D("Invalid state for %s, This is not the uninstall or install_begin state(%s)", package, val); - } - - if (!pi->ai.nodisplay && pi->item) { - if (!item_is_enabled_progress(pi->item)) { - item_enable_progress(pi->item); - } - - item_update_progress(pi->item, progress); - } - + _D("package(%s) with %s", package, val); + if (_exist_request_in_list(package)) return MENU_SCREEN_ERROR_OK; + retv_if(MENU_SCREEN_ERROR_OK != _append_request_in_list(package, "install"), MENU_SCREEN_ERROR_FAIL); return MENU_SCREEN_ERROR_OK; } @@ -449,247 +447,115 @@ static menu_screen_error_e _install_percent(const char *package, const char *val static menu_screen_error_e _error(const char *package, const char *val, void *scroller) { - struct package_info *pi = NULL; - Eina_List *l; - Eina_List *tmp; - Eina_List *install_list; - - _D("package [%s] with %s", package, val); - - install_list = evas_object_data_get(scroller, "install_list"); - EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) { - if (pi->ai.package && !strcmp(pi->ai.package, package)) { - break; - } - - pi = NULL; - } - - retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL); - - pi->error_count ++; + _D("package(%s) with %s", package, val); return MENU_SCREEN_ERROR_OK; } -static menu_screen_error_e _end_downloading(const char *package, struct package_info *pi, void *scroller) +static int _end_cb(pkgmgrinfo_appinfo_h handle, void *user_data) { - pi->status = DOWNLOAD_END; - _D("Package downloading is complete, waiting install progress"); - return MENU_SCREEN_ERROR_OK; -} + retv_if(NULL == handle, -1); + retv_if(NULL == user_data, -1); + char *appid = NULL; + pkgmgrinfo_appinfo_get_appid(handle, &appid); + Evas_Object *layout = evas_object_data_get(menu_screen_get_win(), "layout"); + retv_if(NULL == layout, MENU_SCREEN_ERROR_FAIL); -static menu_screen_error_e _end_installing(const char *package, struct package_info *pi, void *scroller) -{ - // This status will not be referenced from the others. - // because it will be freed right after set it. ;) - Eina_List *install_list; - - pi->status = INSTALL_END; - _D("Package installing is complete"); - - install_list = evas_object_data_get(scroller, "install_list"); - if (pi->desktop_file_found == 1) { - install_list = eina_list_remove(install_list, pi); - evas_object_data_set(scroller, "install_list", install_list); - list_free_values(&pi->ai); - free(pi); + pkgmgr_request_s *rt = user_data; + if (!strcmp(rt->status, "install")) { + layout_create_package(layout, appid); + } else if (!strcmp(rt->status, "update")) { + layout_update_package(layout, appid); + } else { + _E("No routines for this status (%s:%s)", rt->package, rt->status); } - - // TODO: Need to register a timer callback - return MENU_SCREEN_ERROR_OK; + return 0; } -static menu_screen_error_e _end_updating(const char *package, struct package_info *pi, void *scroller) +static Eina_Bool _uninstall_cb(const char *app_id, Evas_Object *item, void *data) { - // This status will not be referenced from the others. - // because it will be freed right after set it. ;) - Eina_List *install_list; - - pi->status = UPDATE_END; - _D("Package updating is complete"); - - install_list = evas_object_data_get(scroller, "install_list"); - if (pi->desktop_file_found == 1) { - install_list = eina_list_remove(install_list, pi); - evas_object_data_set(scroller, "install_list", install_list); - list_free_values(&pi->ai); - free(pi); - } + retv_if(NULL == data, EINA_FALSE); + Evas_Object *layout = data; + layout_delete_package(layout, app_id); - // TODO: Need to register a timer callback - return MENU_SCREEN_ERROR_OK; + return EINA_TRUE; } -static menu_screen_error_e _end_uninstalling(const char *package, struct package_info *pi, void *scroller) +static Eina_Bool _set_removable_cb(const char *app_id, Evas_Object *item, void *data) { - Eina_List *install_list; - - pi->status = UNINSTALL_END; - _D("Package uninstalling is complete"); + retv_if(NULL == item, EINA_FALSE); - install_list = evas_object_data_get(scroller, "install_list"); - if (pi->desktop_file_found == 1) { - install_list = eina_list_remove(install_list, pi); - evas_object_data_set(scroller, "install_list", install_list); - list_free_values(&pi->ai); - free(pi); - } + item_set_removable(item, 1, 0); + elm_object_signal_emit(item, "uninstall,on", "menu"); - return MENU_SCREEN_ERROR_OK; + return EINA_TRUE; } -static menu_screen_error_e _end_unknown(const char *package, struct package_info *pi, void *scroller) +static menu_screen_error_e _end(const char *package, const char *val, void *data) { - Eina_List *install_list; - - install_list = evas_object_data_get(scroller, "install_list"); - install_list = eina_list_remove(install_list, pi); - evas_object_data_set(scroller, "install_list", install_list); - - if (pi->item) { - // Remove an item only if it is installing. - if ( - pi->status == INSTALL_BEGIN || pi->status == INSTALLING || pi->status == INSTALL_END || - pi->status == DOWNLOAD_BEGIN || pi->status == DOWNLOADING || pi->status == DOWNLOAD_END || - pi->status == UPDATE_BEGIN || pi->status == UPDATING || pi->status == UPDATE_END - ) - { - if (pi->page) { - page_unpack_item(pi->page, pi->item); - page_trim_items(pi->page); - } else { - _D("Page is not valid (%s)", package); - } - item_destroy(pi->item); - page_scroller_trim_items(scroller); - } - } + pkgmgrinfo_pkginfo_h handle = NULL; - list_free_values(&pi->ai); - free(pi); + retv_if(!_exist_request_in_list(package), MENU_SCREEN_ERROR_FAIL); - return MENU_SCREEN_ERROR_OK; -} + pkgmgr_request_s *rt = _get_request_in_list(package); + retv_if(NULL == rt, MENU_SCREEN_ERROR_FAIL); + if(strcasecmp(val, "ok")) { + pkgmgr_item_list_affect_pkgid(package, _set_removable_cb, NULL); + _E("cannot end that package(%s) is %s", rt->package, rt->status); + goto ERROR; + } + _D("Package(%s) : key(%s) - val(%s)", package, rt->status, val); -static menu_screen_error_e _end(const char *package, const char *val, void *scroller) -{ - Eina_List *l; - Eina_List *tmp; - struct package_info *pi; - register int i; - struct end_cb_set { - int status; - int (*handler)(const char *package, struct package_info *pi, void *scroller); - } end_cb[] = { - { - .status = DOWNLOADING, - .handler = _end_downloading, - }, - { - .status = INSTALLING, - .handler = _end_installing, - }, - { - .status = UNINSTALLING, - .handler = _end_uninstalling, - }, - { - .status = UPDATING, - .handler = _end_updating, - }, - { - .status = UNKNOWN, - .handler = _end_unknown, - }, - { - .status = MAX_STATUS, - .handler = NULL, - }, - }; - Eina_List *install_list; + /* Criteria : pkgid */ + if (!strcasecmp("uninstall", rt->status)) { + Evas_Object *layout = evas_object_data_get(menu_screen_get_win(), "layout"); + goto_if(NULL == layout, ERROR); - _D("package [%s]", package); - - pi = NULL; - install_list = evas_object_data_get(scroller, "install_list"); - EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) { - if (pi->ai.package && !strcmp(pi->ai.package, package)) { - break; - } - pi = NULL; + pkgmgr_item_list_affect_pkgid(package, _uninstall_cb, layout); + goto OUT; } - retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL); + goto_if(PMINFO_R_OK != pkgmgrinfo_pkginfo_get_pkginfo(package, &handle), ERROR); - if (item_is_enabled_progress(pi->item)) { - item_disable_progress(pi->item); + /* Criteria : appid */ + if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_list(handle, PMINFO_UI_APP, _end_cb, rt)) { + goto ERROR; } - // NOTE: Don't release the 'pi' - // Release it from each handler - for (i = 0; end_cb[i].handler; i ++) { - if (end_cb[i].status == pi->status && end_cb[i].handler) { - int ret; +OUT: + if (MENU_SCREEN_ERROR_OK != _remove_request_in_list(package)) + _E("cannot remove a request(%s:%s)", rt->package, rt->status); + if (handle) pkgmgrinfo_pkginfo_destroy_pkginfo(handle); - if (strcasecmp(val, "ok")) { - ret = _end_unknown(package, pi, scroller); - } else { - ret = end_cb[i].handler(package, pi, scroller); - } + return MENU_SCREEN_ERROR_OK; - return ret; - } - } +ERROR: + if (MENU_SCREEN_ERROR_OK != _remove_request_in_list(package)) + _E("cannot remove a request(%s:%s)", rt->package, rt->status); + if (handle) pkgmgrinfo_pkginfo_destroy_pkginfo(handle); - return _end_unknown(package, pi, scroller); + return MENU_SCREEN_ERROR_FAIL; } static menu_screen_error_e _change_pkg_name(const char *package, const char *val, void *scroller) { - Eina_List *l; - Eina_List *tmp; - struct package_info *pi; - Eina_List *install_list; - - _D("package [%s]", package); - - install_list = evas_object_data_get(scroller, "install_list"); - EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) { - if (!pi) { - continue; - } - if (pi->ai.package && !strcmp(pi->ai.package, package)) { - _D("Replace package name %s to %s", pi->ai.package, val); - free(pi->ai.package); - pi->ai.package = strdup(val); - if (!pi->ai.package) { - _E("cannot strdup"); - return MENU_SCREEN_ERROR_FAIL; - } - if (pi->item) { - item_set_package(pi->item, (char*) val, 0); - } - return MENU_SCREEN_ERROR_OK; - } - } - - return MENU_SCREEN_ERROR_FAIL; + _D("package(%s) with %s", package, val); + return MENU_SCREEN_ERROR_OK; } @@ -710,21 +576,23 @@ static struct pkgmgr_handler pkgmgr_cbs[] = { static menu_screen_error_e _pkgmgr_cb(int req_id, const char *pkg_type, const char *package, const char *key, const char *val, const void *pmsg, void *data) { register unsigned int i; - Evas_Object *scroller = data; - _D("pkgmgr request [%s] for %s, val(%s)", key, package, val); + _D("pkgmgr request [%s:%s] for %s", key, val, package); + + if (BOOTING_STATE_DONE > menu_screen_get_booting_state()) { + pkgmgr_reserve_list_push_request(package, key, val); + return MENU_SCREEN_ERROR_OK; + } for (i = 0; i < sizeof(pkgmgr_cbs) / sizeof(struct pkgmgr_handler); i++) { - if (!strcasecmp(pkgmgr_cbs[i].key, key)) { - if (pkgmgr_cbs[i].func) { - if (MENU_SCREEN_ERROR_OK != pkgmgr_cbs[i].func(package, val, scroller)) { - _E("pkgmgr_cbs[%u].func has errors.", i); - } - } else { - _E("Cannot find pkgmgr_cbs[%u].func.", i); - } - return MENU_SCREEN_ERROR_OK; + if (strcasecmp(pkgmgr_cbs[i].key, key)) continue; + break_if(!pkgmgr_cbs[i].func); + + if (MENU_SCREEN_ERROR_OK != pkgmgr_cbs[i].func(package, val, NULL)) { + _E("pkgmgr_cbs[%u].func has errors.", i); } + + return MENU_SCREEN_ERROR_OK; } return MENU_SCREEN_ERROR_FAIL; @@ -732,7 +600,76 @@ static menu_screen_error_e _pkgmgr_cb(int req_id, const char *pkg_type, const ch -menu_screen_error_e pkgmgr_init(Evas_Object *scroller) +HAPI menu_screen_error_e pkgmgr_reserve_list_push_request(const char *package, const char *key, const char *val) +{ + retv_if(NULL == package, MENU_SCREEN_ERROR_INVALID_PARAMETER); + retv_if(NULL == key, MENU_SCREEN_ERROR_INVALID_PARAMETER); + retv_if(NULL == val, MENU_SCREEN_ERROR_INVALID_PARAMETER); + + char *tmp_package = NULL; + char *tmp_key = NULL; + char *tmp_val = NULL; + + pkgmgr_reserve_s *pr = calloc(1, sizeof(pkgmgr_reserve_s)); + retv_if(NULL == pr, MENU_SCREEN_ERROR_FAIL); + + tmp_package = strdup(package); + goto_if(NULL == tmp_package, ERROR); + pr->package = tmp_package; + + tmp_key = strdup(key); + goto_if(NULL == tmp_key, ERROR); + pr->key = tmp_key; + + tmp_val = strdup(val); + goto_if(NULL == tmp_val, ERROR); + pr->val = tmp_val; + + pkg_mgr_info.reserve_list = eina_list_append(pkg_mgr_info.reserve_list, pr); + goto_if(NULL == pkg_mgr_info.reserve_list, ERROR); + + return MENU_SCREEN_ERROR_OK; + +ERROR: + if (tmp_val) free(tmp_val); + if (tmp_key) free(tmp_key); + if (tmp_package) free(tmp_package); + free(pr); + + return MENU_SCREEN_ERROR_FAIL; +} + + + +HAPI menu_screen_error_e pkgmgr_reserve_list_pop_request(void) +{ + if (!pkg_mgr_info.reserve_list) return MENU_SCREEN_ERROR_NO_DATA; + + pkgmgr_reserve_s *pr = eina_list_nth(pkg_mgr_info.reserve_list, 0); + if (!pr) return MENU_SCREEN_ERROR_NO_DATA; + pkg_mgr_info.reserve_list = eina_list_remove(pkg_mgr_info.reserve_list, pr); + + goto_if(MENU_SCREEN_ERROR_OK != _pkgmgr_cb(0, NULL, pr->package, pr->key, pr->val, NULL, NULL), ERROR); + + if (pr->package) free(pr->package); + if (pr->key) free(pr->key); + if (pr->val) free(pr->val); + free(pr); + + return MENU_SCREEN_ERROR_OK; + +ERROR: + if (pr->package) free(pr->package); + if (pr->key) free(pr->key); + if (pr->val) free(pr->val); + free(pr); + + return MENU_SCREEN_ERROR_FAIL; +} + + + +HAPI menu_screen_error_e pkgmgr_init(void) { if (NULL != pkg_mgr_info.listen_pc) { return MENU_SCREEN_ERROR_OK; @@ -741,14 +678,14 @@ menu_screen_error_e pkgmgr_init(Evas_Object *scroller) pkg_mgr_info.listen_pc = pkgmgr_client_new(PC_LISTENING); retv_if(NULL == pkg_mgr_info.listen_pc, MENU_SCREEN_ERROR_FAIL); retv_if(pkgmgr_client_listen_status(pkg_mgr_info.listen_pc, - _pkgmgr_cb, scroller) != PKGMGR_R_OK, MENU_SCREEN_ERROR_FAIL); + _pkgmgr_cb, NULL) != PKGMGR_R_OK, MENU_SCREEN_ERROR_FAIL); return MENU_SCREEN_ERROR_OK; } -void pkgmgr_fini(void) +HAPI void pkgmgr_fini(void) { ret_if(NULL == pkg_mgr_info.listen_pc); if (pkgmgr_client_free(pkg_mgr_info.listen_pc) != PKGMGR_R_OK) { @@ -759,50 +696,4 @@ void pkgmgr_fini(void) -Evas_Object *pkgmgr_find_pended_object(const char *package, int with_desktop_file, Evas_Object *scroller, Evas_Object **page) -{ - Eina_List *l; - Eina_List *tmp; - struct package_info *pi; - Eina_List *install_list; - - _D("package [%s]", package); - - retv_if(NULL == package, NULL); - install_list = evas_object_data_get(scroller, "install_list"); - EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) { - if (!pi) { - continue; - } - if (pi->ai.package && !strcmp(pi->ai.package, package)) { - Evas_Object *item; - _D("Installing(Downloading) package is found (%p)", pi->item); - - item = pi->item; - - if (with_desktop_file) { - pi->desktop_file_found = 1; - - if (pi->status == INSTALL_END || pi->status == UNINSTALL_END || pi->status == UPDATE_END) { - install_list = eina_list_remove(install_list, pi); - evas_object_data_set(scroller, "install_list", install_list); - list_free_values(&pi->ai); - free(pi); - pi = NULL; - } - } - - if (page) { - *page = pi ? pi->page : NULL; - } - return item; - } - } - - _D("Failed to find a installing/downloading package"); - return NULL; -} - - - // End of a file diff --git a/src/popup.c b/src/popup.c index 3849383..8e3c3dc 100644 --- a/src/popup.c +++ b/src/popup.c @@ -1,48 +1,92 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #include #include "conf.h" +#include "item.h" #include "menu_screen.h" +#include "pkgmgr.h" #include "util.h" +#include "all_apps/shortcut.h" +#define BUFSZE 1024 +#define ELLIPSIS "..." +#define STRSZE 128 -static void _response_cb(void *data, Evas_Object *obj, void *event_info) -{ + +static struct { Evas_Object *popup; +} popup_info = { + .popup = NULL, +}; + + +HAPI Evas_Object *popup_exist(void) +{ + return popup_info.popup; +} + + + +HAPI void popup_destroy_all(void) +{ + void (*_destroy_popup)(void *data, Evas_Object *obj, void *event_info); + + if (NULL == popup_info.popup) return; + + _destroy_popup = evas_object_data_get(popup_info.popup, "func_destroy_popup"); + if (_destroy_popup) _destroy_popup(popup_info.popup, NULL, NULL); + + popup_info.popup = NULL; +} + + + +static void _response_cb(void *data, Evas_Object *obj, void *event_info) +{ ret_if(NULL == data); - popup = data; + + Evas_Object *popup = data; + evas_object_data_del(popup, "func_destroy_popup"); + popup_info.popup = NULL; + evas_object_del(evas_object_data_del(popup, "button")); evas_object_del(popup); } -Evas_Object *popup_create(Evas_Object *parent, const char *warning) +HAPI Evas_Object *popup_create_confirm(Evas_Object *parent, const char *warning) { Evas_Object *popup; Evas_Object *btn; retv_if(NULL == warning, NULL); + popup_destroy_all(); + popup = elm_popup_add(parent); retv_if(NULL == popup, NULL); @@ -57,11 +101,152 @@ Evas_Object *popup_create(Evas_Object *parent, const char *warning) elm_object_part_content_set(popup, "button1", btn); evas_object_smart_callback_add(btn, "clicked", _response_cb, popup); - evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_part_text_set(popup, "title,text", D_("IDS_COM_POP_WARNING")); elm_object_text_set(popup, warning); + elm_popup_orient_set(popup, ELM_POPUP_ORIENT_CENTER); + evas_object_show(popup); + + evas_object_data_set(popup, "func_destroy_popup", _response_cb); + popup_info.popup = popup; + + return popup; +} + + + +static void _uninstall_no_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(NULL == data); + + Evas_Object *popup = data; + evas_object_data_del(popup, "func_destroy_popup"); + popup_info.popup = NULL; + + evas_object_del(evas_object_data_del(popup, "button1")); + evas_object_del(evas_object_data_del(popup, "button2")); + evas_object_data_del(popup, "item"); + evas_object_del(popup); +} + + + +static void _uninstall_yes_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(NULL == data); + + Evas_Object *popup = data; + evas_object_data_del(popup, "func_destroy_popup"); + popup_info.popup = NULL; + + Evas_Object *item; + item = evas_object_data_del(popup, "item"); + ret_if(!item); + + evas_object_del(evas_object_data_del(popup, "button1")); + evas_object_del(evas_object_data_del(popup, "button2")); + evas_object_del(popup); + + bool is_shortcut = false; + is_shortcut = (bool) evas_object_data_get(item, "is_shortcut"); + + if (is_shortcut) { + all_apps_shortcut_remove(item); + } else { + if (MENU_SCREEN_ERROR_OK != pkgmgr_uninstall(item)) { + _E("Cannot communicate with the pkgmgr-server."); + } + } +} + + + +static char *_popup_set_name(Evas_Object *item) +{ + char *name; + char *get_name = item_get_name(item); + if(!get_name) get_name = item_get_package(item); + retv_if(NULL == get_name, NULL); + + name = calloc(strlen(get_name)+1, sizeof(char)); + retv_if(NULL == name, NULL); + strncpy(name, get_name, strlen(get_name)); + + if (strlen(name) > STRSZE) { + char *temp, *ellipsis = ELLIPSIS; + + name = realloc(name, (STRSZE + strlen(ellipsis) + 1)*sizeof(char)); + retv_if(NULL == name, NULL); + + temp = name + STRSZE; + + while (*ellipsis) *temp++ = *ellipsis++; + *temp = '\0'; + } + return name; +} + + + +#define IDS_AT_POP_UNINSTALL_PS_Q "IDS_AT_POP_UNINSTALL_PS_Q" +HAPI Evas_Object *popup_create_uninstall(Evas_Object *parent, Evas_Object *item) +{ + Evas_Object *popup; + Evas_Object *btn1; + Evas_Object *btn2; + char warning[BUFSZE]; + + retv_if(!item, NULL); + + popup_destroy_all(); + + popup = elm_popup_add(parent); + retv_if(NULL == popup, NULL); + + evas_object_data_set(popup, "item", item); + + btn1 = elm_button_add(popup); + if (NULL == btn1) { + evas_object_del(popup); + return NULL; + } + elm_object_style_set(btn1, "popup_button/default"); + elm_object_text_set(btn1, D_("IDS_COM_SK_CANCEL")); + evas_object_data_set(popup, "button1", btn1); + elm_object_part_content_set(popup, "button1", btn1); + evas_object_smart_callback_add(btn1, "clicked", _uninstall_no_cb, popup); + + btn2 = elm_button_add(popup); + if (NULL == btn2) { + evas_object_del(popup); + return NULL; + } + elm_object_style_set(btn2, "popup_button/default"); + elm_object_text_set(btn2, D_("IDS_COM_SK_OK")); + evas_object_data_set(popup, "button2", btn2); + elm_object_part_content_set(popup, "button2", btn2); + evas_object_smart_callback_add(btn2, "clicked", _uninstall_yes_cb, popup); + + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_data_set(popup, "func_destroy_popup", _uninstall_no_cb); + popup_info.popup = popup; evas_object_show(popup); + char *name = _popup_set_name(item); + retv_if(NULL == name, popup); + + char *markup_name = elm_entry_utf8_to_markup(name); + if (NULL == markup_name) { + _E("(NULL == markup_name) -> %s() return", __func__); + free(name); + return popup; + } + + snprintf(warning, sizeof(warning), _(IDS_AT_POP_UNINSTALL_PS_Q), markup_name); + free(name); + free(markup_name); + + elm_object_text_set(popup, warning); return popup; } diff --git a/src/util.c b/src/util.c index 7ec1f36..2f518bc 100644 --- a/src/util.c +++ b/src/util.c @@ -1,20 +1,24 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - +/* + * MENU-SCREEN + * + * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Contact: Jin Yoon + * Junkyu Han + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #include @@ -22,7 +26,7 @@ -void _evas_object_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +HAPI void _evas_object_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { Evas_Coord x; Evas_Coord y; @@ -35,14 +39,14 @@ void _evas_object_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_i -void _evas_object_event_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +HAPI void _evas_object_event_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { _D("%s IS REMOVED!", (const char *) data); } -void _evas_object_event_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +HAPI void _evas_object_event_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { Evas_Coord x; Evas_Coord y; @@ -55,7 +59,7 @@ void _evas_object_event_move_cb(void *data, Evas *e, Evas_Object *obj, void *eve -void _evas_object_event_show_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +HAPI void _evas_object_event_show_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { Evas_Coord x; Evas_Coord y; -- 2.34.1